Commit | Line | Data |
---|---|---|
067d23c9 KY |
1 | #! /bin/sh |
2 | # Guess values for system-dependent variables and create Makefiles. | |
d6a003a8 | 3 | # Generated by GNU Autoconf 2.68 for emacs 24.0.50. |
067d23c9 KY |
4 | # |
5 | # | |
6 | # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, | |
d6a003a8 AS |
7 | # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software |
8 | # Foundation, Inc. | |
067d23c9 KY |
9 | # |
10 | # | |
11 | # This configure script is free software; the Free Software Foundation | |
12 | # gives unlimited permission to copy, distribute and modify it. | |
13 | ## -------------------- ## | |
14 | ## M4sh Initialization. ## | |
15 | ## -------------------- ## | |
16 | ||
17 | # Be more Bourne compatible | |
18 | DUALCASE=1; export DUALCASE # for MKS sh | |
19 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : | |
20 | emulate sh | |
21 | NULLCMD=: | |
22 | # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which | |
23 | # is contrary to our usage. Disable this feature. | |
24 | alias -g '${1+"$@"}'='"$@"' | |
25 | setopt NO_GLOB_SUBST | |
26 | else | |
27 | case `(set -o) 2>/dev/null` in #( | |
28 | *posix*) : | |
29 | set -o posix ;; #( | |
30 | *) : | |
31 | ;; | |
32 | esac | |
33 | fi | |
34 | ||
35 | ||
36 | as_nl=' | |
37 | ' | |
38 | export as_nl | |
39 | # Printing a long string crashes Solaris 7 /usr/bin/printf. | |
40 | as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' | |
41 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo | |
42 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo | |
43 | # Prefer a ksh shell builtin over an external printf program on Solaris, | |
44 | # but without wasting forks for bash or zsh. | |
45 | if 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 --' | |
49 | elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then | |
50 | as_echo='printf %s\n' | |
51 | as_echo_n='printf %s' | |
52 | else | |
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' | |
56 | else | |
57 | as_echo_body='eval expr "X$1" : "X\\(.*\\)"' | |
58 | as_echo_n_body='eval | |
59 | arg=$1; | |
60 | case $arg in #( | |
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' | |
69 | fi | |
70 | export as_echo_body | |
71 | as_echo='sh -c $as_echo_body as_echo' | |
72 | fi | |
73 | ||
74 | # The user is always right. | |
75 | if 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 | } | |
81 | fi | |
82 | ||
83 | ||
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.) | |
89 | IFS=" "" $as_nl" | |
90 | ||
91 | # Find who we are. Look in the path if we contain no directory separator. | |
d6a003a8 | 92 | as_myself= |
067d23c9 KY |
93 | case $0 in #(( |
94 | *[\\/]* ) as_myself=$0 ;; | |
95 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
96 | for as_dir in $PATH | |
97 | do | |
98 | IFS=$as_save_IFS | |
99 | test -z "$as_dir" && as_dir=. | |
100 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | |
101 | done | |
102 | IFS=$as_save_IFS | |
103 | ||
104 | ;; | |
105 | esac | |
106 | # We did not find ourselves, most probably we were run as `sh COMMAND' | |
107 | # in which case we are not to be found in the path. | |
108 | if test "x$as_myself" = x; then | |
109 | as_myself=$0 | |
110 | fi | |
111 | if test ! -f "$as_myself"; then | |
112 | $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 | |
113 | exit 1 | |
114 | fi | |
115 | ||
116 | # Unset variables that we do not need and which cause bugs (e.g. in | |
117 | # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" | |
118 | # suppresses any "Segmentation fault" message there. '((' could | |
119 | # trigger a bug in pdksh 5.2.14. | |
120 | for as_var in BASH_ENV ENV MAIL MAILPATH | |
121 | do eval test x\${$as_var+set} = xset \ | |
122 | && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : | |
123 | done | |
124 | PS1='$ ' | |
125 | PS2='> ' | |
126 | PS4='+ ' | |
127 | ||
128 | # NLS nuisances. | |
129 | LC_ALL=C | |
130 | export LC_ALL | |
131 | LANGUAGE=C | |
132 | export LANGUAGE | |
133 | ||
134 | # CDPATH. | |
135 | (unset CDPATH) >/dev/null 2>&1 && unset CDPATH | |
136 | ||
137 | if test "x$CONFIG_SHELL" = x; then | |
138 | as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : | |
139 | emulate sh | |
140 | NULLCMD=: | |
141 | # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which | |
142 | # is contrary to our usage. Disable this feature. | |
143 | alias -g '\${1+\"\$@\"}'='\"\$@\"' | |
144 | setopt NO_GLOB_SUBST | |
145 | else | |
146 | case \`(set -o) 2>/dev/null\` in #( | |
147 | *posix*) : | |
148 | set -o posix ;; #( | |
149 | *) : | |
150 | ;; | |
151 | esac | |
152 | fi | |
153 | " | |
154 | as_required="as_fn_return () { (exit \$1); } | |
155 | as_fn_success () { as_fn_return 0; } | |
156 | as_fn_failure () { as_fn_return 1; } | |
157 | as_fn_ret_success () { return 0; } | |
158 | as_fn_ret_failure () { return 1; } | |
159 | ||
160 | exitcode=0 | |
161 | as_fn_success || { exitcode=1; echo as_fn_success failed.; } | |
162 | as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } | |
163 | as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } | |
164 | as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } | |
165 | if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : | |
166 | ||
167 | else | |
168 | exitcode=1; echo positional parameters were not saved. | |
169 | fi | |
170 | test x\$exitcode = x0 || exit 1" | |
171 | as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO | |
172 | as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO | |
173 | eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && | |
174 | test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 | |
175 | test \$(( 1 + 1 )) = 2 || exit 1" | |
176 | if (eval "$as_required") 2>/dev/null; then : | |
177 | as_have_required=yes | |
178 | else | |
179 | as_have_required=no | |
180 | fi | |
181 | if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : | |
182 | ||
183 | else | |
184 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
185 | as_found=false | |
186 | for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH | |
187 | do | |
188 | IFS=$as_save_IFS | |
189 | test -z "$as_dir" && as_dir=. | |
190 | as_found=: | |
191 | case $as_dir in #( | |
192 | /*) | |
193 | for as_base in sh bash ksh sh5; do | |
194 | # Try only shells that exist, to save several forks. | |
195 | as_shell=$as_dir/$as_base | |
196 | if { test -f "$as_shell" || test -f "$as_shell.exe"; } && | |
197 | { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : | |
198 | CONFIG_SHELL=$as_shell as_have_required=yes | |
199 | if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : | |
200 | break 2 | |
201 | fi | |
202 | fi | |
203 | done;; | |
204 | esac | |
205 | as_found=false | |
206 | done | |
207 | $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && | |
208 | { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : | |
209 | CONFIG_SHELL=$SHELL as_have_required=yes | |
210 | fi; } | |
211 | IFS=$as_save_IFS | |
212 | ||
213 | ||
214 | if test "x$CONFIG_SHELL" != x; then : | |
215 | # We cannot yet assume a decent shell, so we have to provide a | |
216 | # neutralization value for shells without unset; and this also | |
217 | # works around shells that cannot unset nonexistent variables. | |
d6a003a8 | 218 | # Preserve -v and -x to the replacement shell. |
067d23c9 KY |
219 | BASH_ENV=/dev/null |
220 | ENV=/dev/null | |
221 | (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV | |
222 | export CONFIG_SHELL | |
d6a003a8 AS |
223 | case $- in # (((( |
224 | *v*x* | *x*v* ) as_opts=-vx ;; | |
225 | *v* ) as_opts=-v ;; | |
226 | *x* ) as_opts=-x ;; | |
227 | * ) as_opts= ;; | |
228 | esac | |
229 | exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} | |
067d23c9 KY |
230 | fi |
231 | ||
232 | if test x$as_have_required = xno; then : | |
233 | $as_echo "$0: This script requires a shell more modern than all" | |
234 | $as_echo "$0: the shells that I found on your system." | |
235 | if test x${ZSH_VERSION+set} = xset ; then | |
236 | $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" | |
237 | $as_echo "$0: be upgraded to zsh 4.3.4 or later." | |
238 | else | |
239 | $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, | |
240 | $0: including any error possibly output before this | |
241 | $0: message. Then install a modern shell, or manually run | |
242 | $0: the script under such a shell if you do have one." | |
243 | fi | |
244 | exit 1 | |
245 | fi | |
246 | fi | |
247 | fi | |
248 | SHELL=${CONFIG_SHELL-/bin/sh} | |
249 | export SHELL | |
250 | # Unset more variables known to interfere with behavior of common tools. | |
251 | CLICOLOR_FORCE= GREP_OPTIONS= | |
252 | unset CLICOLOR_FORCE GREP_OPTIONS | |
253 | ||
254 | ## --------------------- ## | |
255 | ## M4sh Shell Functions. ## | |
256 | ## --------------------- ## | |
257 | # as_fn_unset VAR | |
258 | # --------------- | |
259 | # Portably unset VAR. | |
260 | as_fn_unset () | |
261 | { | |
262 | { eval $1=; unset $1;} | |
263 | } | |
264 | as_unset=as_fn_unset | |
265 | ||
266 | # as_fn_set_status STATUS | |
267 | # ----------------------- | |
268 | # Set $? to STATUS, without forking. | |
269 | as_fn_set_status () | |
270 | { | |
271 | return $1 | |
272 | } # as_fn_set_status | |
273 | ||
274 | # as_fn_exit STATUS | |
275 | # ----------------- | |
276 | # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. | |
277 | as_fn_exit () | |
278 | { | |
279 | set +e | |
280 | as_fn_set_status $1 | |
281 | exit $1 | |
282 | } # as_fn_exit | |
283 | ||
284 | # as_fn_mkdir_p | |
285 | # ------------- | |
286 | # Create "$as_dir" as a directory, including parents if necessary. | |
287 | as_fn_mkdir_p () | |
288 | { | |
289 | ||
290 | case $as_dir in #( | |
291 | -*) as_dir=./$as_dir;; | |
292 | esac | |
293 | test -d "$as_dir" || eval $as_mkdir_p || { | |
294 | as_dirs= | |
295 | while :; do | |
296 | case $as_dir in #( | |
297 | *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( | |
298 | *) as_qdir=$as_dir;; | |
299 | esac | |
300 | as_dirs="'$as_qdir' $as_dirs" | |
301 | as_dir=`$as_dirname -- "$as_dir" || | |
302 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
303 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
304 | X"$as_dir" : 'X\(//\)$' \| \ | |
305 | X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || | |
306 | $as_echo X"$as_dir" | | |
307 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
308 | s//\1/ | |
309 | q | |
310 | } | |
311 | /^X\(\/\/\)[^/].*/{ | |
312 | s//\1/ | |
313 | q | |
314 | } | |
315 | /^X\(\/\/\)$/{ | |
316 | s//\1/ | |
317 | q | |
318 | } | |
319 | /^X\(\/\).*/{ | |
320 | s//\1/ | |
321 | q | |
322 | } | |
323 | s/.*/./; q'` | |
324 | test -d "$as_dir" && break | |
325 | done | |
326 | test -z "$as_dirs" || eval "mkdir $as_dirs" | |
d6a003a8 | 327 | } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" |
067d23c9 KY |
328 | |
329 | ||
330 | } # as_fn_mkdir_p | |
331 | # as_fn_append VAR VALUE | |
332 | # ---------------------- | |
333 | # Append the text in VALUE to the end of the definition contained in VAR. Take | |
334 | # advantage of any shell optimizations that allow amortized linear growth over | |
335 | # repeated appends, instead of the typical quadratic growth present in naive | |
336 | # implementations. | |
337 | if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : | |
338 | eval 'as_fn_append () | |
339 | { | |
340 | eval $1+=\$2 | |
341 | }' | |
342 | else | |
343 | as_fn_append () | |
344 | { | |
345 | eval $1=\$$1\$2 | |
346 | } | |
347 | fi # as_fn_append | |
348 | ||
349 | # as_fn_arith ARG... | |
350 | # ------------------ | |
351 | # Perform arithmetic evaluation on the ARGs, and store the result in the | |
352 | # global $as_val. Take advantage of shells that can avoid forks. The arguments | |
353 | # must be portable across $(()) and expr. | |
354 | if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : | |
355 | eval 'as_fn_arith () | |
356 | { | |
357 | as_val=$(( $* )) | |
358 | }' | |
359 | else | |
360 | as_fn_arith () | |
361 | { | |
362 | as_val=`expr "$@" || test $? -eq 1` | |
363 | } | |
364 | fi # as_fn_arith | |
365 | ||
366 | ||
d6a003a8 AS |
367 | # as_fn_error STATUS ERROR [LINENO LOG_FD] |
368 | # ---------------------------------------- | |
067d23c9 KY |
369 | # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are |
370 | # provided, also output the error to LOG_FD, referencing LINENO. Then exit the | |
d6a003a8 | 371 | # script with STATUS, using 1 if that was 0. |
067d23c9 KY |
372 | as_fn_error () |
373 | { | |
d6a003a8 AS |
374 | as_status=$1; test $as_status -eq 0 && as_status=1 |
375 | if test "$4"; then | |
376 | as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
377 | $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 | |
067d23c9 | 378 | fi |
d6a003a8 | 379 | $as_echo "$as_me: error: $2" >&2 |
067d23c9 KY |
380 | as_fn_exit $as_status |
381 | } # as_fn_error | |
382 | ||
383 | if expr a : '\(a\)' >/dev/null 2>&1 && | |
384 | test "X`expr 00001 : '.*\(...\)'`" = X001; then | |
385 | as_expr=expr | |
386 | else | |
387 | as_expr=false | |
388 | fi | |
389 | ||
390 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then | |
391 | as_basename=basename | |
392 | else | |
393 | as_basename=false | |
394 | fi | |
395 | ||
396 | if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then | |
397 | as_dirname=dirname | |
398 | else | |
399 | as_dirname=false | |
400 | fi | |
401 | ||
402 | as_me=`$as_basename -- "$0" || | |
403 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ | |
404 | X"$0" : 'X\(//\)$' \| \ | |
405 | X"$0" : 'X\(/\)' \| . 2>/dev/null || | |
406 | $as_echo X/"$0" | | |
407 | sed '/^.*\/\([^/][^/]*\)\/*$/{ | |
408 | s//\1/ | |
409 | q | |
410 | } | |
411 | /^X\/\(\/\/\)$/{ | |
412 | s//\1/ | |
413 | q | |
414 | } | |
415 | /^X\/\(\/\).*/{ | |
416 | s//\1/ | |
417 | q | |
418 | } | |
419 | s/.*/./; q'` | |
420 | ||
421 | # Avoid depending upon Character Ranges. | |
422 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
423 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
424 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
425 | as_cr_digits='0123456789' | |
426 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
427 | ||
428 | ||
429 | as_lineno_1=$LINENO as_lineno_1a=$LINENO | |
430 | as_lineno_2=$LINENO as_lineno_2a=$LINENO | |
431 | eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && | |
432 | test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { | |
433 | # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) | |
434 | sed -n ' | |
435 | p | |
436 | /[$]LINENO/= | |
437 | ' <$as_myself | | |
438 | sed ' | |
439 | s/[$]LINENO.*/&-/ | |
440 | t lineno | |
441 | b | |
442 | :lineno | |
443 | N | |
444 | :loop | |
445 | s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ | |
446 | t loop | |
447 | s/-\n.*// | |
448 | ' >$as_me.lineno && | |
449 | chmod +x "$as_me.lineno" || | |
450 | { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } | |
451 | ||
452 | # Don't try to exec as it changes $[0], causing all sort of problems | |
453 | # (the dirname of $[0] is not the place where we might find the | |
454 | # original and so on. Autoconf is especially sensitive to this). | |
455 | . "./$as_me.lineno" | |
456 | # Exit status is that of the last command. | |
457 | exit | |
458 | } | |
459 | ||
460 | ECHO_C= ECHO_N= ECHO_T= | |
461 | case `echo -n x` in #((((( | |
462 | -n*) | |
463 | case `echo 'xy\c'` in | |
464 | *c*) ECHO_T=' ';; # ECHO_T is single tab character. | |
465 | xy) ECHO_C='\c';; | |
466 | *) echo `echo ksh88 bug on AIX 6.1` > /dev/null | |
467 | ECHO_T=' ';; | |
468 | esac;; | |
469 | *) | |
470 | ECHO_N='-n';; | |
471 | esac | |
472 | ||
473 | rm -f conf$$ conf$$.exe conf$$.file | |
474 | if test -d conf$$.dir; then | |
475 | rm -f conf$$.dir/conf$$.file | |
476 | else | |
477 | rm -f conf$$.dir | |
478 | mkdir conf$$.dir 2>/dev/null | |
479 | fi | |
480 | if (echo >conf$$.file) 2>/dev/null; then | |
481 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
482 | as_ln_s='ln -s' | |
483 | # ... but there are two gotchas: | |
484 | # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. | |
485 | # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. | |
486 | # In both cases, we have to default to `cp -p'. | |
487 | ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || | |
488 | as_ln_s='cp -p' | |
489 | elif ln conf$$.file conf$$ 2>/dev/null; then | |
490 | as_ln_s=ln | |
491 | else | |
492 | as_ln_s='cp -p' | |
493 | fi | |
494 | else | |
495 | as_ln_s='cp -p' | |
496 | fi | |
497 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file | |
498 | rmdir conf$$.dir 2>/dev/null | |
499 | ||
500 | if mkdir -p . 2>/dev/null; then | |
501 | as_mkdir_p='mkdir -p "$as_dir"' | |
502 | else | |
503 | test -d ./-p && rmdir ./-p | |
504 | as_mkdir_p=false | |
505 | fi | |
506 | ||
507 | if test -x / >/dev/null 2>&1; then | |
508 | as_test_x='test -x' | |
509 | else | |
510 | if ls -dL / >/dev/null 2>&1; then | |
511 | as_ls_L_option=L | |
512 | else | |
513 | as_ls_L_option= | |
514 | fi | |
515 | as_test_x=' | |
516 | eval sh -c '\'' | |
517 | if test -d "$1"; then | |
518 | test -d "$1/."; | |
519 | else | |
520 | case $1 in #( | |
521 | -*)set "./$1";; | |
522 | esac; | |
523 | case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( | |
524 | ???[sx]*):;;*)false;;esac;fi | |
525 | '\'' sh | |
526 | ' | |
527 | fi | |
528 | as_executable_p=$as_test_x | |
529 | ||
530 | # Sed expression to map a string onto a valid CPP name. | |
531 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" | |
532 | ||
533 | # Sed expression to map a string onto a valid variable name. | |
534 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" | |
535 | ||
536 | ||
537 | test -n "$DJDIR" || exec 7<&0 </dev/null | |
538 | exec 6>&1 | |
539 | ||
540 | # Name of the host. | |
d6a003a8 | 541 | # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, |
067d23c9 KY |
542 | # so uname gets run too. |
543 | ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` | |
544 | ||
545 | # | |
546 | # Initializations. | |
547 | # | |
548 | ac_default_prefix=/usr/local | |
549 | ac_clean_files= | |
550 | ac_config_libobj_dir=. | |
551 | LIBOBJS= | |
552 | cross_compiling=no | |
553 | subdirs= | |
554 | MFLAGS= | |
555 | MAKEFLAGS= | |
556 | ||
557 | # Identity of this package. | |
558 | PACKAGE_NAME='emacs' | |
559 | PACKAGE_TARNAME='emacs' | |
560 | PACKAGE_VERSION='24.0.50' | |
561 | PACKAGE_STRING='emacs 24.0.50' | |
562 | PACKAGE_BUGREPORT='' | |
563 | PACKAGE_URL='' | |
564 | ||
565 | ac_unique_file="src/lisp.h" | |
566 | # Factoring default headers for most tests. | |
567 | ac_includes_default="\ | |
568 | #include <stdio.h> | |
569 | #ifdef HAVE_SYS_TYPES_H | |
570 | # include <sys/types.h> | |
571 | #endif | |
572 | #ifdef HAVE_SYS_STAT_H | |
573 | # include <sys/stat.h> | |
574 | #endif | |
575 | #ifdef STDC_HEADERS | |
576 | # include <stdlib.h> | |
577 | # include <stddef.h> | |
578 | #else | |
579 | # ifdef HAVE_STDLIB_H | |
580 | # include <stdlib.h> | |
581 | # endif | |
582 | #endif | |
583 | #ifdef HAVE_STRING_H | |
584 | # if !defined STDC_HEADERS && defined HAVE_MEMORY_H | |
585 | # include <memory.h> | |
586 | # endif | |
587 | # include <string.h> | |
588 | #endif | |
589 | #ifdef HAVE_STRINGS_H | |
590 | # include <strings.h> | |
591 | #endif | |
592 | #ifdef HAVE_INTTYPES_H | |
593 | # include <inttypes.h> | |
594 | #endif | |
595 | #ifdef HAVE_STDINT_H | |
596 | # include <stdint.h> | |
597 | #endif | |
598 | #ifdef HAVE_UNISTD_H | |
599 | # include <unistd.h> | |
600 | #endif" | |
601 | ||
602 | ac_config_libobj_dir=src | |
603 | ac_header_list= | |
604 | ac_func_list= | |
605 | ac_subst_vars='LTLIBOBJS | |
606 | WINDOW_SUPPORT | |
607 | TOOLTIP_SUPPORT | |
608 | MOUSE_SUPPORT | |
609 | LIB_GCC | |
610 | LD_FIRSTFLAG | |
611 | LD_SWITCH_SYSTEM_TEMACS | |
612 | POST_ALLOC_OBJ | |
613 | PRE_ALLOC_OBJ | |
614 | CYGWIN_OBJ | |
615 | RALLOC_OBJ | |
616 | OLDXMENU_DEPS | |
617 | LIBX_OTHER | |
618 | LIBXMENU | |
619 | OLDXMENU | |
620 | OLDXMENU_TARGET | |
621 | LIBXT_OTHER | |
622 | TOOLKIT_LIBW | |
623 | WIDGET_OBJ | |
624 | XOBJ | |
625 | XMENU_OBJ | |
626 | FONT_OBJ | |
627 | OTHER_FILES | |
628 | GNU_OBJC_CFLAGS | |
629 | ns_appsrc | |
630 | ns_appresdir | |
631 | ns_appbindir | |
632 | ns_appdir | |
d6a003a8 AS |
633 | S_FILE |
634 | M_FILE | |
067d23c9 KY |
635 | X_TOOLKIT_TYPE |
636 | C_SWITCH_X_SYSTEM | |
637 | C_SWITCH_X_SITE | |
638 | LD_SWITCH_X_SITE | |
639 | gameuser | |
640 | gamedir | |
641 | bitmapdir | |
642 | archlibdir | |
643 | etcdir | |
644 | x_default_search_path | |
645 | lisppath | |
646 | locallisppath | |
647 | lispdir | |
648 | srcdir | |
649 | canonical | |
650 | configuration | |
651 | version | |
652 | KRB4LIB | |
653 | DESLIB | |
654 | KRB5LIB | |
655 | CRYPTOLIB | |
656 | COM_ERRLIB | |
657 | LIBRESOLV | |
658 | LIBHESIOD | |
659 | TERMCAP_OBJ | |
660 | LIBS_TERMCAP | |
661 | GETOPTOBJS | |
662 | GETOPT_H | |
663 | GETLOADAVG_LIBS | |
664 | KMEM_GROUP | |
665 | NEED_SETGID | |
666 | LIBOBJS | |
667 | BLESSMAIL_TARGET | |
668 | LIBS_MAIL | |
669 | liblockfile | |
670 | ALLOCA | |
671 | LIBXML2_LIBS | |
672 | LIBXML2_CFLAGS | |
673 | LIBXSM | |
674 | LIBGPM | |
675 | LIBGIF | |
676 | LIBTIFF | |
677 | LIBPNG | |
678 | LIBJPEG | |
679 | LIBXPM | |
680 | FREETYPE_LIBS | |
681 | FREETYPE_CFLAGS | |
682 | M17N_FLT_LIBS | |
683 | M17N_FLT_CFLAGS | |
684 | LIBOTF_LIBS | |
685 | LIBOTF_CFLAGS | |
686 | XFT_LIBS | |
687 | XFT_CFLAGS | |
688 | FONTCONFIG_LIBS | |
689 | FONTCONFIG_CFLAGS | |
690 | LIBXMU | |
691 | LIBXTR6 | |
692 | LIBGNUTLS_LIBS | |
693 | LIBGNUTLS_CFLAGS | |
694 | LIBSELINUX_LIBS | |
695 | GCONF_LIBS | |
696 | GCONF_CFLAGS | |
697 | DBUS_OBJ | |
698 | DBUS_LIBS | |
699 | DBUS_CFLAGS | |
700 | GTK_OBJ | |
701 | GTK_LIBS | |
702 | GTK_CFLAGS | |
703 | IMAGEMAGICK_LIBS | |
704 | IMAGEMAGICK_CFLAGS | |
705 | RSVG_LIBS | |
706 | RSVG_CFLAGS | |
707 | VMLIMIT_OBJ | |
708 | GMALLOC_OBJ | |
709 | HAVE_XSERVER | |
710 | LIB_STANDARD | |
711 | NS_SUPPORT | |
712 | NS_OBJ | |
713 | TEMACS_LDFLAGS2 | |
714 | LD_SWITCH_X_SITE_AUX_RPATH | |
715 | LD_SWITCH_X_SITE_AUX | |
716 | XMKMF | |
717 | DEPFLAGS | |
718 | MKDEPDIR | |
719 | SET_MAKE | |
720 | CFLAGS_SOUND | |
721 | ALSA_LIBS | |
722 | ALSA_CFLAGS | |
723 | PKG_CONFIG | |
724 | LIBSOUND | |
725 | START_FILES | |
726 | LIB_MATH | |
727 | CRT_DIR | |
728 | LIBS_SYSTEM | |
729 | C_SWITCH_SYSTEM | |
730 | UNEXEC_OBJ | |
731 | C_SWITCH_MACHINE | |
732 | LD_SWITCH_SYSTEM | |
733 | CANNOT_DUMP | |
734 | MAKEINFO | |
735 | GZIP_PROG | |
736 | INSTALL_INFO | |
737 | RANLIB | |
738 | INSTALL_DATA | |
739 | INSTALL_SCRIPT | |
740 | INSTALL_PROGRAM | |
741 | C_WARNINGS_SWITCH | |
742 | EGREP | |
743 | GREP | |
744 | CPP | |
745 | OBJEXT | |
746 | EXEEXT | |
747 | ac_ct_CC | |
748 | CPPFLAGS | |
749 | LDFLAGS | |
750 | CFLAGS | |
751 | CC | |
752 | host_os | |
753 | host_vendor | |
754 | host_cpu | |
755 | host | |
756 | build_os | |
757 | build_vendor | |
758 | build_cpu | |
759 | build | |
760 | PROFILING_CFLAGS | |
761 | MAINT | |
762 | GZIP_INFO | |
763 | target_alias | |
764 | host_alias | |
765 | build_alias | |
766 | LIBS | |
767 | ECHO_T | |
768 | ECHO_N | |
769 | ECHO_C | |
770 | DEFS | |
771 | mandir | |
772 | localedir | |
773 | libdir | |
774 | psdir | |
775 | pdfdir | |
776 | dvidir | |
777 | htmldir | |
778 | infodir | |
779 | docdir | |
780 | oldincludedir | |
781 | includedir | |
782 | localstatedir | |
783 | sharedstatedir | |
784 | sysconfdir | |
785 | datadir | |
786 | datarootdir | |
787 | libexecdir | |
788 | sbindir | |
789 | bindir | |
790 | program_transform_name | |
791 | prefix | |
792 | exec_prefix | |
793 | PACKAGE_URL | |
794 | PACKAGE_BUGREPORT | |
795 | PACKAGE_STRING | |
796 | PACKAGE_VERSION | |
797 | PACKAGE_TARNAME | |
798 | PACKAGE_NAME | |
799 | PATH_SEPARATOR | |
800 | SHELL' | |
801 | ac_subst_files='deps_frag | |
802 | ns_frag' | |
803 | ac_user_opts=' | |
804 | enable_option_checking | |
805 | with_pop | |
806 | with_kerberos | |
807 | with_kerberos5 | |
808 | with_hesiod | |
809 | with_mmdf | |
810 | with_mail_unlink | |
811 | with_mailhost | |
812 | with_sound | |
813 | with_sync_input | |
814 | with_x_toolkit | |
815 | with_xpm | |
816 | with_jpeg | |
817 | with_tiff | |
818 | with_gif | |
819 | with_png | |
820 | with_rsvg | |
821 | with_xml2 | |
822 | with_imagemagick | |
823 | with_xft | |
824 | with_libotf | |
825 | with_m17n_flt | |
826 | with_toolkit_scroll_bars | |
827 | with_xaw3d | |
828 | with_xim | |
829 | with_ns | |
830 | with_gpm | |
831 | with_dbus | |
832 | with_gconf | |
833 | with_selinux | |
834 | with_gnutls | |
835 | with_makeinfo | |
836 | with_compress_info | |
837 | with_pkg_config_prog | |
838 | with_crt_dir | |
839 | with_gnustep_conf | |
840 | enable_ns_self_contained | |
841 | enable_asserts | |
842 | enable_maintainer_mode | |
843 | enable_locallisppath | |
844 | enable_checking | |
845 | enable_use_lisp_union_type | |
846 | enable_profiling | |
847 | enable_autodepend | |
848 | enable_largefile | |
849 | with_x | |
850 | ' | |
851 | ac_precious_vars='build_alias | |
852 | host_alias | |
853 | target_alias | |
854 | CC | |
855 | CFLAGS | |
856 | LDFLAGS | |
857 | LIBS | |
858 | CPPFLAGS | |
859 | CPP | |
860 | XMKMF' | |
861 | ||
862 | ||
863 | # Initialize some variables set by options. | |
864 | ac_init_help= | |
865 | ac_init_version=false | |
866 | ac_unrecognized_opts= | |
867 | ac_unrecognized_sep= | |
868 | # The variables have the same names as the options, with | |
869 | # dashes changed to underlines. | |
870 | cache_file=/dev/null | |
871 | exec_prefix=NONE | |
872 | no_create= | |
873 | no_recursion= | |
874 | prefix=NONE | |
875 | program_prefix=NONE | |
876 | program_suffix=NONE | |
877 | program_transform_name=s,x,x, | |
878 | silent= | |
879 | site= | |
880 | srcdir= | |
881 | verbose= | |
882 | x_includes=NONE | |
883 | x_libraries=NONE | |
884 | ||
885 | # Installation directory options. | |
886 | # These are left unexpanded so users can "make install exec_prefix=/foo" | |
887 | # and all the variables that are supposed to be based on exec_prefix | |
888 | # by default will actually change. | |
889 | # Use braces instead of parens because sh, perl, etc. also accept them. | |
890 | # (The list follows the same order as the GNU Coding Standards.) | |
891 | bindir='${exec_prefix}/bin' | |
892 | sbindir='${exec_prefix}/sbin' | |
893 | libexecdir='${exec_prefix}/libexec' | |
894 | datarootdir='${prefix}/share' | |
895 | datadir='${datarootdir}' | |
896 | sysconfdir='${prefix}/etc' | |
897 | sharedstatedir='${prefix}/com' | |
898 | localstatedir='${prefix}/var' | |
899 | includedir='${prefix}/include' | |
900 | oldincludedir='/usr/include' | |
901 | docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' | |
902 | infodir='${datarootdir}/info' | |
903 | htmldir='${docdir}' | |
904 | dvidir='${docdir}' | |
905 | pdfdir='${docdir}' | |
906 | psdir='${docdir}' | |
907 | libdir='${exec_prefix}/lib' | |
908 | localedir='${datarootdir}/locale' | |
909 | mandir='${datarootdir}/man' | |
910 | ||
911 | ac_prev= | |
912 | ac_dashdash= | |
913 | for ac_option | |
914 | do | |
915 | # If the previous option needs an argument, assign it. | |
916 | if test -n "$ac_prev"; then | |
917 | eval $ac_prev=\$ac_option | |
918 | ac_prev= | |
919 | continue | |
920 | fi | |
921 | ||
922 | case $ac_option in | |
d6a003a8 AS |
923 | *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; |
924 | *=) ac_optarg= ;; | |
925 | *) ac_optarg=yes ;; | |
067d23c9 KY |
926 | esac |
927 | ||
928 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
929 | ||
930 | case $ac_dashdash$ac_option in | |
931 | --) | |
932 | ac_dashdash=yes ;; | |
933 | ||
934 | -bindir | --bindir | --bindi | --bind | --bin | --bi) | |
935 | ac_prev=bindir ;; | |
936 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
937 | bindir=$ac_optarg ;; | |
938 | ||
939 | -build | --build | --buil | --bui | --bu) | |
940 | ac_prev=build_alias ;; | |
941 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) | |
942 | build_alias=$ac_optarg ;; | |
943 | ||
944 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
945 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
946 | ac_prev=cache_file ;; | |
947 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
948 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
949 | cache_file=$ac_optarg ;; | |
950 | ||
951 | --config-cache | -C) | |
952 | cache_file=config.cache ;; | |
953 | ||
954 | -datadir | --datadir | --datadi | --datad) | |
955 | ac_prev=datadir ;; | |
956 | -datadir=* | --datadir=* | --datadi=* | --datad=*) | |
957 | datadir=$ac_optarg ;; | |
958 | ||
959 | -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | |
960 | | --dataroo | --dataro | --datar) | |
961 | ac_prev=datarootdir ;; | |
962 | -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | |
963 | | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) | |
964 | datarootdir=$ac_optarg ;; | |
965 | ||
966 | -disable-* | --disable-*) | |
967 | ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` | |
968 | # Reject names that are not valid shell variable names. | |
969 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && | |
d6a003a8 | 970 | as_fn_error $? "invalid feature name: $ac_useropt" |
067d23c9 KY |
971 | ac_useropt_orig=$ac_useropt |
972 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
973 | case $ac_user_opts in | |
974 | *" | |
975 | "enable_$ac_useropt" | |
976 | "*) ;; | |
977 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" | |
978 | ac_unrecognized_sep=', ';; | |
979 | esac | |
980 | eval enable_$ac_useropt=no ;; | |
981 | ||
982 | -docdir | --docdir | --docdi | --doc | --do) | |
983 | ac_prev=docdir ;; | |
984 | -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) | |
985 | docdir=$ac_optarg ;; | |
986 | ||
987 | -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) | |
988 | ac_prev=dvidir ;; | |
989 | -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) | |
990 | dvidir=$ac_optarg ;; | |
991 | ||
992 | -enable-* | --enable-*) | |
993 | ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` | |
994 | # Reject names that are not valid shell variable names. | |
995 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && | |
d6a003a8 | 996 | as_fn_error $? "invalid feature name: $ac_useropt" |
067d23c9 KY |
997 | ac_useropt_orig=$ac_useropt |
998 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
999 | case $ac_user_opts in | |
1000 | *" | |
1001 | "enable_$ac_useropt" | |
1002 | "*) ;; | |
1003 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" | |
1004 | ac_unrecognized_sep=', ';; | |
1005 | esac | |
1006 | eval enable_$ac_useropt=\$ac_optarg ;; | |
1007 | ||
1008 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
1009 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
1010 | | --exec | --exe | --ex) | |
1011 | ac_prev=exec_prefix ;; | |
1012 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
1013 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
1014 | | --exec=* | --exe=* | --ex=*) | |
1015 | exec_prefix=$ac_optarg ;; | |
1016 | ||
1017 | -gas | --gas | --ga | --g) | |
1018 | # Obsolete; use --with-gas. | |
1019 | with_gas=yes ;; | |
1020 | ||
1021 | -help | --help | --hel | --he | -h) | |
1022 | ac_init_help=long ;; | |
1023 | -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) | |
1024 | ac_init_help=recursive ;; | |
1025 | -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) | |
1026 | ac_init_help=short ;; | |
1027 | ||
1028 | -host | --host | --hos | --ho) | |
1029 | ac_prev=host_alias ;; | |
1030 | -host=* | --host=* | --hos=* | --ho=*) | |
1031 | host_alias=$ac_optarg ;; | |
1032 | ||
1033 | -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) | |
1034 | ac_prev=htmldir ;; | |
1035 | -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | |
1036 | | --ht=*) | |
1037 | htmldir=$ac_optarg ;; | |
1038 | ||
1039 | -includedir | --includedir | --includedi | --included | --include \ | |
1040 | | --includ | --inclu | --incl | --inc) | |
1041 | ac_prev=includedir ;; | |
1042 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
1043 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
1044 | includedir=$ac_optarg ;; | |
1045 | ||
1046 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
1047 | ac_prev=infodir ;; | |
1048 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
1049 | infodir=$ac_optarg ;; | |
1050 | ||
1051 | -libdir | --libdir | --libdi | --libd) | |
1052 | ac_prev=libdir ;; | |
1053 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
1054 | libdir=$ac_optarg ;; | |
1055 | ||
1056 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
1057 | | --libexe | --libex | --libe) | |
1058 | ac_prev=libexecdir ;; | |
1059 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
1060 | | --libexe=* | --libex=* | --libe=*) | |
1061 | libexecdir=$ac_optarg ;; | |
1062 | ||
1063 | -localedir | --localedir | --localedi | --localed | --locale) | |
1064 | ac_prev=localedir ;; | |
1065 | -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) | |
1066 | localedir=$ac_optarg ;; | |
1067 | ||
1068 | -localstatedir | --localstatedir | --localstatedi | --localstated \ | |
1069 | | --localstate | --localstat | --localsta | --localst | --locals) | |
1070 | ac_prev=localstatedir ;; | |
1071 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
1072 | | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) | |
1073 | localstatedir=$ac_optarg ;; | |
1074 | ||
1075 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
1076 | ac_prev=mandir ;; | |
1077 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
1078 | mandir=$ac_optarg ;; | |
1079 | ||
1080 | -nfp | --nfp | --nf) | |
1081 | # Obsolete; use --without-fp. | |
1082 | with_fp=no ;; | |
1083 | ||
1084 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
1085 | | --no-cr | --no-c | -n) | |
1086 | no_create=yes ;; | |
1087 | ||
1088 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
1089 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
1090 | no_recursion=yes ;; | |
1091 | ||
1092 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | |
1093 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
1094 | | --oldin | --oldi | --old | --ol | --o) | |
1095 | ac_prev=oldincludedir ;; | |
1096 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
1097 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
1098 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
1099 | oldincludedir=$ac_optarg ;; | |
1100 | ||
1101 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
1102 | ac_prev=prefix ;; | |
1103 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
1104 | prefix=$ac_optarg ;; | |
1105 | ||
1106 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
1107 | | --program-pre | --program-pr | --program-p) | |
1108 | ac_prev=program_prefix ;; | |
1109 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
1110 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
1111 | program_prefix=$ac_optarg ;; | |
1112 | ||
1113 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
1114 | | --program-suf | --program-su | --program-s) | |
1115 | ac_prev=program_suffix ;; | |
1116 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
1117 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
1118 | program_suffix=$ac_optarg ;; | |
1119 | ||
1120 | -program-transform-name | --program-transform-name \ | |
1121 | | --program-transform-nam | --program-transform-na \ | |
1122 | | --program-transform-n | --program-transform- \ | |
1123 | | --program-transform | --program-transfor \ | |
1124 | | --program-transfo | --program-transf \ | |
1125 | | --program-trans | --program-tran \ | |
1126 | | --progr-tra | --program-tr | --program-t) | |
1127 | ac_prev=program_transform_name ;; | |
1128 | -program-transform-name=* | --program-transform-name=* \ | |
1129 | | --program-transform-nam=* | --program-transform-na=* \ | |
1130 | | --program-transform-n=* | --program-transform-=* \ | |
1131 | | --program-transform=* | --program-transfor=* \ | |
1132 | | --program-transfo=* | --program-transf=* \ | |
1133 | | --program-trans=* | --program-tran=* \ | |
1134 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
1135 | program_transform_name=$ac_optarg ;; | |
1136 | ||
1137 | -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) | |
1138 | ac_prev=pdfdir ;; | |
1139 | -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) | |
1140 | pdfdir=$ac_optarg ;; | |
1141 | ||
1142 | -psdir | --psdir | --psdi | --psd | --ps) | |
1143 | ac_prev=psdir ;; | |
1144 | -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) | |
1145 | psdir=$ac_optarg ;; | |
1146 | ||
1147 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
1148 | | -silent | --silent | --silen | --sile | --sil) | |
1149 | silent=yes ;; | |
1150 | ||
1151 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | |
1152 | ac_prev=sbindir ;; | |
1153 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
1154 | | --sbi=* | --sb=*) | |
1155 | sbindir=$ac_optarg ;; | |
1156 | ||
1157 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
1158 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
1159 | | --sharedst | --shareds | --shared | --share | --shar \ | |
1160 | | --sha | --sh) | |
1161 | ac_prev=sharedstatedir ;; | |
1162 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
1163 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
1164 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
1165 | | --sha=* | --sh=*) | |
1166 | sharedstatedir=$ac_optarg ;; | |
1167 | ||
1168 | -site | --site | --sit) | |
1169 | ac_prev=site ;; | |
1170 | -site=* | --site=* | --sit=*) | |
1171 | site=$ac_optarg ;; | |
1172 | ||
1173 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
1174 | ac_prev=srcdir ;; | |
1175 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
1176 | srcdir=$ac_optarg ;; | |
1177 | ||
1178 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | |
1179 | | --syscon | --sysco | --sysc | --sys | --sy) | |
1180 | ac_prev=sysconfdir ;; | |
1181 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
1182 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
1183 | sysconfdir=$ac_optarg ;; | |
1184 | ||
1185 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
1186 | ac_prev=target_alias ;; | |
1187 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) | |
1188 | target_alias=$ac_optarg ;; | |
1189 | ||
1190 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
1191 | verbose=yes ;; | |
1192 | ||
1193 | -version | --version | --versio | --versi | --vers | -V) | |
1194 | ac_init_version=: ;; | |
1195 | ||
1196 | -with-* | --with-*) | |
1197 | ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` | |
1198 | # Reject names that are not valid shell variable names. | |
1199 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && | |
d6a003a8 | 1200 | as_fn_error $? "invalid package name: $ac_useropt" |
067d23c9 KY |
1201 | ac_useropt_orig=$ac_useropt |
1202 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1203 | case $ac_user_opts in | |
1204 | *" | |
1205 | "with_$ac_useropt" | |
1206 | "*) ;; | |
1207 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" | |
1208 | ac_unrecognized_sep=', ';; | |
1209 | esac | |
1210 | eval with_$ac_useropt=\$ac_optarg ;; | |
1211 | ||
1212 | -without-* | --without-*) | |
1213 | ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` | |
1214 | # Reject names that are not valid shell variable names. | |
1215 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && | |
d6a003a8 | 1216 | as_fn_error $? "invalid package name: $ac_useropt" |
067d23c9 KY |
1217 | ac_useropt_orig=$ac_useropt |
1218 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1219 | case $ac_user_opts in | |
1220 | *" | |
1221 | "with_$ac_useropt" | |
1222 | "*) ;; | |
1223 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" | |
1224 | ac_unrecognized_sep=', ';; | |
1225 | esac | |
1226 | eval with_$ac_useropt=no ;; | |
1227 | ||
1228 | --x) | |
1229 | # Obsolete; use --with-x. | |
1230 | with_x=yes ;; | |
1231 | ||
1232 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
1233 | | --x-incl | --x-inc | --x-in | --x-i) | |
1234 | ac_prev=x_includes ;; | |
1235 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
1236 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
1237 | x_includes=$ac_optarg ;; | |
1238 | ||
1239 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
1240 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
1241 | ac_prev=x_libraries ;; | |
1242 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
1243 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
1244 | x_libraries=$ac_optarg ;; | |
1245 | ||
d6a003a8 AS |
1246 | -*) as_fn_error $? "unrecognized option: \`$ac_option' |
1247 | Try \`$0 --help' for more information" | |
067d23c9 KY |
1248 | ;; |
1249 | ||
1250 | *=*) | |
1251 | ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` | |
1252 | # Reject names that are not valid shell variable names. | |
1253 | case $ac_envvar in #( | |
1254 | '' | [0-9]* | *[!_$as_cr_alnum]* ) | |
d6a003a8 | 1255 | as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; |
067d23c9 KY |
1256 | esac |
1257 | eval $ac_envvar=\$ac_optarg | |
1258 | export $ac_envvar ;; | |
1259 | ||
1260 | *) | |
1261 | # FIXME: should be removed in autoconf 3.0. | |
1262 | $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 | |
1263 | expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && | |
1264 | $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 | |
d6a003a8 | 1265 | : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" |
067d23c9 KY |
1266 | ;; |
1267 | ||
1268 | esac | |
1269 | done | |
1270 | ||
1271 | if test -n "$ac_prev"; then | |
1272 | ac_option=--`echo $ac_prev | sed 's/_/-/g'` | |
d6a003a8 | 1273 | as_fn_error $? "missing argument to $ac_option" |
067d23c9 KY |
1274 | fi |
1275 | ||
1276 | if test -n "$ac_unrecognized_opts"; then | |
1277 | case $enable_option_checking in | |
1278 | no) ;; | |
d6a003a8 | 1279 | fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; |
067d23c9 KY |
1280 | *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; |
1281 | esac | |
1282 | fi | |
1283 | ||
1284 | # Check all directory arguments for consistency. | |
1285 | for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ | |
1286 | datadir sysconfdir sharedstatedir localstatedir includedir \ | |
1287 | oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ | |
1288 | libdir localedir mandir | |
1289 | do | |
1290 | eval ac_val=\$$ac_var | |
1291 | # Remove trailing slashes. | |
1292 | case $ac_val in | |
1293 | */ ) | |
1294 | ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` | |
1295 | eval $ac_var=\$ac_val;; | |
1296 | esac | |
1297 | # Be sure to have absolute directory names. | |
1298 | case $ac_val in | |
1299 | [\\/$]* | ?:[\\/]* ) continue;; | |
1300 | NONE | '' ) case $ac_var in *prefix ) continue;; esac;; | |
1301 | esac | |
d6a003a8 | 1302 | as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" |
067d23c9 KY |
1303 | done |
1304 | ||
1305 | # There might be people who depend on the old broken behavior: `$host' | |
1306 | # used to hold the argument of --host etc. | |
1307 | # FIXME: To remove some day. | |
1308 | build=$build_alias | |
1309 | host=$host_alias | |
1310 | target=$target_alias | |
1311 | ||
1312 | # FIXME: To remove some day. | |
1313 | if test "x$host_alias" != x; then | |
1314 | if test "x$build_alias" = x; then | |
1315 | cross_compiling=maybe | |
d6a003a8 AS |
1316 | $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. |
1317 | If a cross compiler is detected then cross compile mode will be used" >&2 | |
067d23c9 KY |
1318 | elif test "x$build_alias" != "x$host_alias"; then |
1319 | cross_compiling=yes | |
1320 | fi | |
1321 | fi | |
1322 | ||
1323 | ac_tool_prefix= | |
1324 | test -n "$host_alias" && ac_tool_prefix=$host_alias- | |
1325 | ||
1326 | test "$silent" = yes && exec 6>/dev/null | |
1327 | ||
1328 | ||
1329 | ac_pwd=`pwd` && test -n "$ac_pwd" && | |
1330 | ac_ls_di=`ls -di .` && | |
1331 | ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || | |
d6a003a8 | 1332 | as_fn_error $? "working directory cannot be determined" |
067d23c9 | 1333 | test "X$ac_ls_di" = "X$ac_pwd_ls_di" || |
d6a003a8 | 1334 | as_fn_error $? "pwd does not report name of working directory" |
067d23c9 KY |
1335 | |
1336 | ||
1337 | # Find the source files, if location was not specified. | |
1338 | if test -z "$srcdir"; then | |
1339 | ac_srcdir_defaulted=yes | |
1340 | # Try the directory containing this script, then the parent directory. | |
1341 | ac_confdir=`$as_dirname -- "$as_myself" || | |
1342 | $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
1343 | X"$as_myself" : 'X\(//\)[^/]' \| \ | |
1344 | X"$as_myself" : 'X\(//\)$' \| \ | |
1345 | X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || | |
1346 | $as_echo X"$as_myself" | | |
1347 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
1348 | s//\1/ | |
1349 | q | |
1350 | } | |
1351 | /^X\(\/\/\)[^/].*/{ | |
1352 | s//\1/ | |
1353 | q | |
1354 | } | |
1355 | /^X\(\/\/\)$/{ | |
1356 | s//\1/ | |
1357 | q | |
1358 | } | |
1359 | /^X\(\/\).*/{ | |
1360 | s//\1/ | |
1361 | q | |
1362 | } | |
1363 | s/.*/./; q'` | |
1364 | srcdir=$ac_confdir | |
1365 | if test ! -r "$srcdir/$ac_unique_file"; then | |
1366 | srcdir=.. | |
1367 | fi | |
1368 | else | |
1369 | ac_srcdir_defaulted=no | |
1370 | fi | |
1371 | if test ! -r "$srcdir/$ac_unique_file"; then | |
1372 | test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." | |
d6a003a8 | 1373 | as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" |
067d23c9 KY |
1374 | fi |
1375 | ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" | |
1376 | ac_abs_confdir=`( | |
d6a003a8 | 1377 | cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" |
067d23c9 KY |
1378 | pwd)` |
1379 | # When building in place, set srcdir=. | |
1380 | if test "$ac_abs_confdir" = "$ac_pwd"; then | |
1381 | srcdir=. | |
1382 | fi | |
1383 | # Remove unnecessary trailing slashes from srcdir. | |
1384 | # Double slashes in file names in object file debugging info | |
1385 | # mess up M-x gdb in Emacs. | |
1386 | case $srcdir in | |
1387 | */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; | |
1388 | esac | |
1389 | for ac_var in $ac_precious_vars; do | |
1390 | eval ac_env_${ac_var}_set=\${${ac_var}+set} | |
1391 | eval ac_env_${ac_var}_value=\$${ac_var} | |
1392 | eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} | |
1393 | eval ac_cv_env_${ac_var}_value=\$${ac_var} | |
1394 | done | |
1395 | ||
1396 | # | |
1397 | # Report the --help message. | |
1398 | # | |
1399 | if test "$ac_init_help" = "long"; then | |
1400 | # Omit some internal or obsolete options to make the list less imposing. | |
1401 | # This message is too long to be a string in the A/UX 3.1 sh. | |
1402 | cat <<_ACEOF | |
1403 | \`configure' configures emacs 24.0.50 to adapt to many kinds of systems. | |
1404 | ||
1405 | Usage: $0 [OPTION]... [VAR=VALUE]... | |
1406 | ||
1407 | To assign environment variables (e.g., CC, CFLAGS...), specify them as | |
1408 | VAR=VALUE. See below for descriptions of some of the useful variables. | |
1409 | ||
1410 | Defaults for the options are specified in brackets. | |
1411 | ||
1412 | Configuration: | |
1413 | -h, --help display this help and exit | |
1414 | --help=short display options specific to this package | |
1415 | --help=recursive display the short help of all the included packages | |
1416 | -V, --version display version information and exit | |
d6a003a8 | 1417 | -q, --quiet, --silent do not print \`checking ...' messages |
067d23c9 KY |
1418 | --cache-file=FILE cache test results in FILE [disabled] |
1419 | -C, --config-cache alias for \`--cache-file=config.cache' | |
1420 | -n, --no-create do not create output files | |
1421 | --srcdir=DIR find the sources in DIR [configure dir or \`..'] | |
1422 | ||
1423 | Installation directories: | |
1424 | --prefix=PREFIX install architecture-independent files in PREFIX | |
1425 | [$ac_default_prefix] | |
1426 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX | |
1427 | [PREFIX] | |
1428 | ||
1429 | By default, \`make install' will install all the files in | |
1430 | \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify | |
1431 | an installation prefix other than \`$ac_default_prefix' using \`--prefix', | |
1432 | for instance \`--prefix=\$HOME'. | |
1433 | ||
1434 | For better control, use the options below. | |
1435 | ||
1436 | Fine tuning of the installation directories: | |
1437 | --bindir=DIR user executables [EPREFIX/bin] | |
1438 | --sbindir=DIR system admin executables [EPREFIX/sbin] | |
1439 | --libexecdir=DIR program executables [EPREFIX/libexec] | |
1440 | --sysconfdir=DIR read-only single-machine data [PREFIX/etc] | |
1441 | --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] | |
1442 | --localstatedir=DIR modifiable single-machine data [PREFIX/var] | |
1443 | --libdir=DIR object code libraries [EPREFIX/lib] | |
1444 | --includedir=DIR C header files [PREFIX/include] | |
1445 | --oldincludedir=DIR C header files for non-gcc [/usr/include] | |
1446 | --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] | |
1447 | --datadir=DIR read-only architecture-independent data [DATAROOTDIR] | |
1448 | --infodir=DIR info documentation [DATAROOTDIR/info] | |
1449 | --localedir=DIR locale-dependent data [DATAROOTDIR/locale] | |
1450 | --mandir=DIR man documentation [DATAROOTDIR/man] | |
1451 | --docdir=DIR documentation root [DATAROOTDIR/doc/emacs] | |
1452 | --htmldir=DIR html documentation [DOCDIR] | |
1453 | --dvidir=DIR dvi documentation [DOCDIR] | |
1454 | --pdfdir=DIR pdf documentation [DOCDIR] | |
1455 | --psdir=DIR ps documentation [DOCDIR] | |
1456 | _ACEOF | |
1457 | ||
1458 | cat <<\_ACEOF | |
1459 | ||
1460 | Program names: | |
1461 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
1462 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
1463 | --program-transform-name=PROGRAM run sed PROGRAM on installed program names | |
1464 | ||
1465 | X features: | |
1466 | --x-includes=DIR X include files are in DIR | |
1467 | --x-libraries=DIR X library files are in DIR | |
1468 | ||
1469 | System types: | |
1470 | --build=BUILD configure for building on BUILD [guessed] | |
1471 | --host=HOST cross-compile to build programs to run on HOST [BUILD] | |
1472 | _ACEOF | |
1473 | fi | |
1474 | ||
1475 | if test -n "$ac_init_help"; then | |
1476 | case $ac_init_help in | |
1477 | short | recursive ) echo "Configuration of emacs 24.0.50:";; | |
1478 | esac | |
1479 | cat <<\_ACEOF | |
1480 | ||
1481 | Optional Features: | |
1482 | --disable-option-checking ignore unrecognized --enable/--with options | |
1483 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) | |
1484 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
1485 | --disable-ns-self-contained | |
1486 | disable self contained build under NeXTstep | |
1487 | --enable-asserts compile code with asserts enabled | |
1488 | --enable-maintainer-mode | |
1489 | enable make rules and dependencies not useful (and | |
1490 | sometimes confusing) to the casual installer | |
1491 | --enable-locallisppath=PATH | |
1492 | directories Emacs should search for lisp files | |
1493 | specific to this site | |
1494 | --enable-checking[=LIST] | |
1495 | enable expensive run-time checks. With LIST, enable | |
1496 | only specific categories of checks. Categories are: | |
1497 | all,yes,no. Flags are: stringbytes, stringoverrun, | |
1498 | stringfreelist, xmallocoverrun, conslist | |
1499 | --enable-use-lisp-union-type | |
1500 | use a union for the Lisp_Object data type. This is | |
1501 | only useful for development for catching certain | |
1502 | types of bugs. | |
1503 | --enable-profiling build emacs with profiling support. This might not | |
1504 | work on all platforms | |
1505 | --enable-autodepend automatically generate dependencies to .h-files. | |
1506 | Requires GNU Make and Gcc. Enabled if GNU Make and | |
1507 | Gcc is found | |
1508 | --disable-largefile omit support for large files | |
1509 | ||
1510 | Optional Packages: | |
1511 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
1512 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
1513 | --without-pop don't support POP mail retrieval with movemail | |
1514 | --with-kerberos support Kerberos-authenticated POP | |
1515 | --with-kerberos5 support Kerberos version 5 authenticated POP | |
1516 | --with-hesiod support Hesiod to get the POP server host | |
1517 | --with-mmdf support MMDF mailboxes | |
1518 | --with-mail-unlink unlink, rather than empty, mail spool after reading | |
1519 | --with-mailhost=HOSTNAME | |
1520 | string giving default POP mail host | |
1521 | --without-sound don't compile with sound support | |
1522 | --without-sync-input process async input synchronously | |
1523 | --with-x-toolkit=KIT use an X toolkit (KIT one of: yes or gtk, gtk3, | |
1524 | lucid or athena, motif, no) | |
1525 | --without-xpm don't compile with XPM image support | |
1526 | --without-jpeg don't compile with JPEG image support | |
1527 | --without-tiff don't compile with TIFF image support | |
1528 | --without-gif don't compile with GIF image support | |
1529 | --without-png don't compile with PNG image support | |
1530 | --without-rsvg don't compile with SVG image support | |
1531 | --without-xml2 don't compile with XML parsing support | |
1532 | --without-imagemagick don't compile with ImageMagick image support | |
1533 | --without-xft don't use XFT for anti aliased fonts | |
1534 | --without-libotf don't use libotf for OpenType font support | |
1535 | --without-m17n-flt don't use m17n-flt for text shaping | |
1536 | --without-toolkit-scroll-bars | |
1537 | don't use Motif or Xaw3d scroll bars | |
1538 | --without-xaw3d don't use Xaw3d | |
1539 | --without-xim don't use X11 XIM | |
1540 | --with-ns use nextstep (Cocoa or GNUstep) windowing system | |
1541 | --without-gpm don't use -lgpm for mouse support on a GNU/Linux | |
1542 | console | |
1543 | --without-dbus don't compile with D-Bus support | |
1544 | --without-gconf don't compile with GConf support | |
1545 | --without-selinux don't compile with SELinux support | |
1546 | --without-gnutls don't use -lgnutls for SSL/TLS support | |
1547 | --without-makeinfo don't require makeinfo for building manuals | |
1548 | --without-compress-info don't compress the installed Info pages | |
1549 | --with-pkg-config-prog=PATH | |
1550 | path to pkg-config for finding GTK and librsvg | |
1551 | --with-crt-dir=DIR directory containing crtn.o etc. The default is | |
1552 | /usr/lib, or /usr/lib64 on some platforms. | |
1553 | --with-gnustep-conf=PATH | |
1554 | path to GNUstep.conf; default $GNUSTEP_CONFIG_FILE, | |
1555 | or /etc/GNUstep/GNUstep.conf | |
1556 | --with-x use the X Window System | |
1557 | ||
1558 | Some influential environment variables: | |
1559 | CC C compiler command | |
1560 | CFLAGS C compiler flags | |
1561 | LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a | |
1562 | nonstandard directory <lib dir> | |
1563 | LIBS libraries to pass to the linker, e.g. -l<library> | |
1564 | CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if | |
1565 | you have headers in a nonstandard directory <include dir> | |
1566 | CPP C preprocessor | |
1567 | XMKMF Path to xmkmf, Makefile generator for X Window System | |
1568 | ||
1569 | Use these variables to override the choices made by `configure' or to help | |
1570 | it to find libraries and programs with nonstandard names/locations. | |
1571 | ||
1572 | Report bugs to the package provider. | |
1573 | _ACEOF | |
1574 | ac_status=$? | |
1575 | fi | |
1576 | ||
1577 | if test "$ac_init_help" = "recursive"; then | |
1578 | # If there are subdirs, report their specific --help. | |
1579 | for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue | |
1580 | test -d "$ac_dir" || | |
1581 | { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || | |
1582 | continue | |
1583 | ac_builddir=. | |
1584 | ||
1585 | case "$ac_dir" in | |
1586 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
1587 | *) | |
1588 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
1589 | # A ".." for each directory in $ac_dir_suffix. | |
1590 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
1591 | case $ac_top_builddir_sub in | |
1592 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
1593 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
1594 | esac ;; | |
1595 | esac | |
1596 | ac_abs_top_builddir=$ac_pwd | |
1597 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
1598 | # for backward compatibility: | |
1599 | ac_top_builddir=$ac_top_build_prefix | |
1600 | ||
1601 | case $srcdir in | |
1602 | .) # We are building in place. | |
1603 | ac_srcdir=. | |
1604 | ac_top_srcdir=$ac_top_builddir_sub | |
1605 | ac_abs_top_srcdir=$ac_pwd ;; | |
1606 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
1607 | ac_srcdir=$srcdir$ac_dir_suffix; | |
1608 | ac_top_srcdir=$srcdir | |
1609 | ac_abs_top_srcdir=$srcdir ;; | |
1610 | *) # Relative name. | |
1611 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
1612 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
1613 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
1614 | esac | |
1615 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix | |
1616 | ||
1617 | cd "$ac_dir" || { ac_status=$?; continue; } | |
1618 | # Check for guested configure. | |
1619 | if test -f "$ac_srcdir/configure.gnu"; then | |
1620 | echo && | |
1621 | $SHELL "$ac_srcdir/configure.gnu" --help=recursive | |
1622 | elif test -f "$ac_srcdir/configure"; then | |
1623 | echo && | |
1624 | $SHELL "$ac_srcdir/configure" --help=recursive | |
1625 | else | |
1626 | $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 | |
1627 | fi || ac_status=$? | |
1628 | cd "$ac_pwd" || { ac_status=$?; break; } | |
1629 | done | |
1630 | fi | |
1631 | ||
1632 | test -n "$ac_init_help" && exit $ac_status | |
1633 | if $ac_init_version; then | |
1634 | cat <<\_ACEOF | |
1635 | emacs configure 24.0.50 | |
d6a003a8 | 1636 | generated by GNU Autoconf 2.68 |
067d23c9 | 1637 | |
d6a003a8 | 1638 | Copyright (C) 2010 Free Software Foundation, Inc. |
067d23c9 KY |
1639 | This configure script is free software; the Free Software Foundation |
1640 | gives unlimited permission to copy, distribute and modify it. | |
1641 | _ACEOF | |
1642 | exit | |
1643 | fi | |
1644 | ||
1645 | ## ------------------------ ## | |
1646 | ## Autoconf initialization. ## | |
1647 | ## ------------------------ ## | |
1648 | ||
1649 | # ac_fn_c_try_compile LINENO | |
1650 | # -------------------------- | |
1651 | # Try to compile conftest.$ac_ext, and return whether this succeeded. | |
1652 | ac_fn_c_try_compile () | |
1653 | { | |
1654 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1655 | rm -f conftest.$ac_objext | |
1656 | if { { ac_try="$ac_compile" | |
1657 | case "(($ac_try" in | |
1658 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1659 | *) ac_try_echo=$ac_try;; | |
1660 | esac | |
1661 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1662 | $as_echo "$ac_try_echo"; } >&5 | |
1663 | (eval "$ac_compile") 2>conftest.err | |
1664 | ac_status=$? | |
1665 | if test -s conftest.err; then | |
1666 | grep -v '^ *+' conftest.err >conftest.er1 | |
1667 | cat conftest.er1 >&5 | |
1668 | mv -f conftest.er1 conftest.err | |
1669 | fi | |
1670 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1671 | test $ac_status = 0; } && { | |
1672 | test -z "$ac_c_werror_flag" || | |
1673 | test ! -s conftest.err | |
1674 | } && test -s conftest.$ac_objext; then : | |
1675 | ac_retval=0 | |
1676 | else | |
1677 | $as_echo "$as_me: failed program was:" >&5 | |
1678 | sed 's/^/| /' conftest.$ac_ext >&5 | |
1679 | ||
1680 | ac_retval=1 | |
1681 | fi | |
d6a003a8 | 1682 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
067d23c9 KY |
1683 | as_fn_set_status $ac_retval |
1684 | ||
1685 | } # ac_fn_c_try_compile | |
1686 | ||
1687 | # ac_fn_c_try_link LINENO | |
1688 | # ----------------------- | |
1689 | # Try to link conftest.$ac_ext, and return whether this succeeded. | |
1690 | ac_fn_c_try_link () | |
1691 | { | |
1692 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1693 | rm -f conftest.$ac_objext conftest$ac_exeext | |
1694 | if { { ac_try="$ac_link" | |
1695 | case "(($ac_try" in | |
1696 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1697 | *) ac_try_echo=$ac_try;; | |
1698 | esac | |
1699 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1700 | $as_echo "$ac_try_echo"; } >&5 | |
1701 | (eval "$ac_link") 2>conftest.err | |
1702 | ac_status=$? | |
1703 | if test -s conftest.err; then | |
1704 | grep -v '^ *+' conftest.err >conftest.er1 | |
1705 | cat conftest.er1 >&5 | |
1706 | mv -f conftest.er1 conftest.err | |
1707 | fi | |
1708 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1709 | test $ac_status = 0; } && { | |
1710 | test -z "$ac_c_werror_flag" || | |
1711 | test ! -s conftest.err | |
1712 | } && test -s conftest$ac_exeext && { | |
1713 | test "$cross_compiling" = yes || | |
1714 | $as_test_x conftest$ac_exeext | |
1715 | }; then : | |
1716 | ac_retval=0 | |
1717 | else | |
1718 | $as_echo "$as_me: failed program was:" >&5 | |
1719 | sed 's/^/| /' conftest.$ac_ext >&5 | |
1720 | ||
1721 | ac_retval=1 | |
1722 | fi | |
1723 | # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information | |
1724 | # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would | |
1725 | # interfere with the next link command; also delete a directory that is | |
1726 | # left behind by Apple's compiler. We do this before executing the actions. | |
1727 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
d6a003a8 | 1728 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
067d23c9 KY |
1729 | as_fn_set_status $ac_retval |
1730 | ||
1731 | } # ac_fn_c_try_link | |
1732 | ||
1733 | # ac_fn_c_try_cpp LINENO | |
1734 | # ---------------------- | |
1735 | # Try to preprocess conftest.$ac_ext, and return whether this succeeded. | |
1736 | ac_fn_c_try_cpp () | |
1737 | { | |
1738 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1739 | if { { ac_try="$ac_cpp conftest.$ac_ext" | |
1740 | case "(($ac_try" in | |
1741 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1742 | *) ac_try_echo=$ac_try;; | |
1743 | esac | |
1744 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1745 | $as_echo "$ac_try_echo"; } >&5 | |
1746 | (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err | |
1747 | ac_status=$? | |
1748 | if test -s conftest.err; then | |
1749 | grep -v '^ *+' conftest.err >conftest.er1 | |
1750 | cat conftest.er1 >&5 | |
1751 | mv -f conftest.er1 conftest.err | |
1752 | fi | |
1753 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
d6a003a8 | 1754 | test $ac_status = 0; } > conftest.i && { |
067d23c9 KY |
1755 | test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || |
1756 | test ! -s conftest.err | |
1757 | }; then : | |
1758 | ac_retval=0 | |
1759 | else | |
1760 | $as_echo "$as_me: failed program was:" >&5 | |
1761 | sed 's/^/| /' conftest.$ac_ext >&5 | |
1762 | ||
1763 | ac_retval=1 | |
1764 | fi | |
d6a003a8 | 1765 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
067d23c9 KY |
1766 | as_fn_set_status $ac_retval |
1767 | ||
1768 | } # ac_fn_c_try_cpp | |
1769 | ||
1770 | # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES | |
1771 | # ------------------------------------------------------- | |
1772 | # Tests whether HEADER exists, giving a warning if it cannot be compiled using | |
1773 | # the include files in INCLUDES and setting the cache variable VAR | |
1774 | # accordingly. | |
1775 | ac_fn_c_check_header_mongrel () | |
1776 | { | |
1777 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
d6a003a8 | 1778 | if eval \${$3+:} false; then : |
067d23c9 KY |
1779 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 |
1780 | $as_echo_n "checking for $2... " >&6; } | |
d6a003a8 | 1781 | if eval \${$3+:} false; then : |
067d23c9 KY |
1782 | $as_echo_n "(cached) " >&6 |
1783 | fi | |
1784 | eval ac_res=\$$3 | |
1785 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1786 | $as_echo "$ac_res" >&6; } | |
1787 | else | |
1788 | # Is the header compilable? | |
1789 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 | |
1790 | $as_echo_n "checking $2 usability... " >&6; } | |
1791 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1792 | /* end confdefs.h. */ | |
1793 | $4 | |
1794 | #include <$2> | |
1795 | _ACEOF | |
1796 | if ac_fn_c_try_compile "$LINENO"; then : | |
1797 | ac_header_compiler=yes | |
1798 | else | |
1799 | ac_header_compiler=no | |
1800 | fi | |
1801 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1802 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 | |
1803 | $as_echo "$ac_header_compiler" >&6; } | |
1804 | ||
1805 | # Is the header present? | |
1806 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 | |
1807 | $as_echo_n "checking $2 presence... " >&6; } | |
1808 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1809 | /* end confdefs.h. */ | |
1810 | #include <$2> | |
1811 | _ACEOF | |
1812 | if ac_fn_c_try_cpp "$LINENO"; then : | |
1813 | ac_header_preproc=yes | |
1814 | else | |
1815 | ac_header_preproc=no | |
1816 | fi | |
d6a003a8 | 1817 | rm -f conftest.err conftest.i conftest.$ac_ext |
067d23c9 KY |
1818 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 |
1819 | $as_echo "$ac_header_preproc" >&6; } | |
1820 | ||
1821 | # So? What about this header? | |
1822 | case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( | |
1823 | yes:no: ) | |
1824 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 | |
1825 | $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} | |
1826 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
1827 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
1828 | ;; | |
1829 | no:yes:* ) | |
1830 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 | |
1831 | $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} | |
1832 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 | |
1833 | $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} | |
1834 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 | |
1835 | $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} | |
1836 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 | |
1837 | $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} | |
1838 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
1839 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
1840 | ;; | |
1841 | esac | |
1842 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1843 | $as_echo_n "checking for $2... " >&6; } | |
d6a003a8 | 1844 | if eval \${$3+:} false; then : |
067d23c9 KY |
1845 | $as_echo_n "(cached) " >&6 |
1846 | else | |
1847 | eval "$3=\$ac_header_compiler" | |
1848 | fi | |
1849 | eval ac_res=\$$3 | |
1850 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1851 | $as_echo "$ac_res" >&6; } | |
1852 | fi | |
d6a003a8 | 1853 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
067d23c9 KY |
1854 | |
1855 | } # ac_fn_c_check_header_mongrel | |
1856 | ||
1857 | # ac_fn_c_try_run LINENO | |
1858 | # ---------------------- | |
1859 | # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes | |
1860 | # that executables *can* be run. | |
1861 | ac_fn_c_try_run () | |
1862 | { | |
1863 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1864 | if { { ac_try="$ac_link" | |
1865 | case "(($ac_try" in | |
1866 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1867 | *) ac_try_echo=$ac_try;; | |
1868 | esac | |
1869 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1870 | $as_echo "$ac_try_echo"; } >&5 | |
1871 | (eval "$ac_link") 2>&5 | |
1872 | ac_status=$? | |
1873 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1874 | test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' | |
1875 | { { case "(($ac_try" in | |
1876 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1877 | *) ac_try_echo=$ac_try;; | |
1878 | esac | |
1879 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1880 | $as_echo "$ac_try_echo"; } >&5 | |
1881 | (eval "$ac_try") 2>&5 | |
1882 | ac_status=$? | |
1883 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1884 | test $ac_status = 0; }; }; then : | |
1885 | ac_retval=0 | |
1886 | else | |
1887 | $as_echo "$as_me: program exited with status $ac_status" >&5 | |
1888 | $as_echo "$as_me: failed program was:" >&5 | |
1889 | sed 's/^/| /' conftest.$ac_ext >&5 | |
1890 | ||
1891 | ac_retval=$ac_status | |
1892 | fi | |
1893 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
d6a003a8 | 1894 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
067d23c9 KY |
1895 | as_fn_set_status $ac_retval |
1896 | ||
1897 | } # ac_fn_c_try_run | |
1898 | ||
1899 | # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES | |
1900 | # ------------------------------------------------------- | |
1901 | # Tests whether HEADER exists and can be compiled using the include files in | |
1902 | # INCLUDES, setting the cache variable VAR accordingly. | |
1903 | ac_fn_c_check_header_compile () | |
1904 | { | |
1905 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1906 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1907 | $as_echo_n "checking for $2... " >&6; } | |
d6a003a8 | 1908 | if eval \${$3+:} false; then : |
067d23c9 KY |
1909 | $as_echo_n "(cached) " >&6 |
1910 | else | |
1911 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1912 | /* end confdefs.h. */ | |
1913 | $4 | |
1914 | #include <$2> | |
1915 | _ACEOF | |
1916 | if ac_fn_c_try_compile "$LINENO"; then : | |
1917 | eval "$3=yes" | |
1918 | else | |
1919 | eval "$3=no" | |
1920 | fi | |
1921 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1922 | fi | |
1923 | eval ac_res=\$$3 | |
1924 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1925 | $as_echo "$ac_res" >&6; } | |
d6a003a8 | 1926 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
067d23c9 KY |
1927 | |
1928 | } # ac_fn_c_check_header_compile | |
1929 | ||
d6a003a8 AS |
1930 | # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES |
1931 | # --------------------------------------------- | |
1932 | # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR | |
1933 | # accordingly. | |
067d23c9 KY |
1934 | ac_fn_c_check_decl () |
1935 | { | |
1936 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
d6a003a8 AS |
1937 | as_decl_name=`echo $2|sed 's/ *(.*//'` |
1938 | as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` | |
1939 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 | |
1940 | $as_echo_n "checking whether $as_decl_name is declared... " >&6; } | |
1941 | if eval \${$3+:} false; then : | |
067d23c9 KY |
1942 | $as_echo_n "(cached) " >&6 |
1943 | else | |
1944 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1945 | /* end confdefs.h. */ | |
1946 | $4 | |
1947 | int | |
1948 | main () | |
1949 | { | |
d6a003a8 AS |
1950 | #ifndef $as_decl_name |
1951 | #ifdef __cplusplus | |
1952 | (void) $as_decl_use; | |
1953 | #else | |
1954 | (void) $as_decl_name; | |
1955 | #endif | |
067d23c9 KY |
1956 | #endif |
1957 | ||
1958 | ; | |
1959 | return 0; | |
1960 | } | |
1961 | _ACEOF | |
1962 | if ac_fn_c_try_compile "$LINENO"; then : | |
1963 | eval "$3=yes" | |
1964 | else | |
1965 | eval "$3=no" | |
1966 | fi | |
1967 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1968 | fi | |
1969 | eval ac_res=\$$3 | |
1970 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1971 | $as_echo "$ac_res" >&6; } | |
d6a003a8 | 1972 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
067d23c9 KY |
1973 | |
1974 | } # ac_fn_c_check_decl | |
1975 | ||
1976 | # ac_fn_c_check_header_preproc LINENO HEADER VAR | |
1977 | # ---------------------------------------------- | |
1978 | # Tests whether HEADER is present, setting the cache variable VAR accordingly. | |
1979 | ac_fn_c_check_header_preproc () | |
1980 | { | |
1981 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1982 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1983 | $as_echo_n "checking for $2... " >&6; } | |
d6a003a8 | 1984 | if eval \${$3+:} false; then : |
067d23c9 KY |
1985 | $as_echo_n "(cached) " >&6 |
1986 | else | |
1987 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1988 | /* end confdefs.h. */ | |
1989 | #include <$2> | |
1990 | _ACEOF | |
1991 | if ac_fn_c_try_cpp "$LINENO"; then : | |
1992 | eval "$3=yes" | |
1993 | else | |
1994 | eval "$3=no" | |
1995 | fi | |
d6a003a8 | 1996 | rm -f conftest.err conftest.i conftest.$ac_ext |
067d23c9 KY |
1997 | fi |
1998 | eval ac_res=\$$3 | |
1999 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2000 | $as_echo "$ac_res" >&6; } | |
d6a003a8 | 2001 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
067d23c9 KY |
2002 | |
2003 | } # ac_fn_c_check_header_preproc | |
2004 | ||
2005 | # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES | |
2006 | # ---------------------------------------------------- | |
2007 | # Tries to find if the field MEMBER exists in type AGGR, after including | |
2008 | # INCLUDES, setting cache variable VAR accordingly. | |
2009 | ac_fn_c_check_member () | |
2010 | { | |
2011 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2012 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 | |
2013 | $as_echo_n "checking for $2.$3... " >&6; } | |
d6a003a8 | 2014 | if eval \${$4+:} false; then : |
067d23c9 KY |
2015 | $as_echo_n "(cached) " >&6 |
2016 | else | |
2017 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2018 | /* end confdefs.h. */ | |
2019 | $5 | |
2020 | int | |
2021 | main () | |
2022 | { | |
2023 | static $2 ac_aggr; | |
2024 | if (ac_aggr.$3) | |
2025 | return 0; | |
2026 | ; | |
2027 | return 0; | |
2028 | } | |
2029 | _ACEOF | |
2030 | if ac_fn_c_try_compile "$LINENO"; then : | |
2031 | eval "$4=yes" | |
2032 | else | |
2033 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2034 | /* end confdefs.h. */ | |
2035 | $5 | |
2036 | int | |
2037 | main () | |
2038 | { | |
2039 | static $2 ac_aggr; | |
2040 | if (sizeof ac_aggr.$3) | |
2041 | return 0; | |
2042 | ; | |
2043 | return 0; | |
2044 | } | |
2045 | _ACEOF | |
2046 | if ac_fn_c_try_compile "$LINENO"; then : | |
2047 | eval "$4=yes" | |
2048 | else | |
2049 | eval "$4=no" | |
2050 | fi | |
2051 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2052 | fi | |
2053 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2054 | fi | |
2055 | eval ac_res=\$$4 | |
2056 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2057 | $as_echo "$ac_res" >&6; } | |
d6a003a8 | 2058 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
067d23c9 KY |
2059 | |
2060 | } # ac_fn_c_check_member | |
2061 | ||
2062 | # ac_fn_c_check_func LINENO FUNC VAR | |
2063 | # ---------------------------------- | |
2064 | # Tests whether FUNC exists, setting the cache variable VAR accordingly | |
2065 | ac_fn_c_check_func () | |
2066 | { | |
2067 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2068 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2069 | $as_echo_n "checking for $2... " >&6; } | |
d6a003a8 | 2070 | if eval \${$3+:} false; then : |
067d23c9 KY |
2071 | $as_echo_n "(cached) " >&6 |
2072 | else | |
2073 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2074 | /* end confdefs.h. */ | |
2075 | /* Define $2 to an innocuous variant, in case <limits.h> declares $2. | |
2076 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
2077 | #define $2 innocuous_$2 | |
2078 | ||
2079 | /* System header to define __stub macros and hopefully few prototypes, | |
2080 | which can conflict with char $2 (); below. | |
2081 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
2082 | <limits.h> exists even on freestanding compilers. */ | |
2083 | ||
2084 | #ifdef __STDC__ | |
2085 | # include <limits.h> | |
2086 | #else | |
2087 | # include <assert.h> | |
2088 | #endif | |
2089 | ||
2090 | #undef $2 | |
2091 | ||
2092 | /* Override any GCC internal prototype to avoid an error. | |
2093 | Use char because int might match the return type of a GCC | |
2094 | builtin and then its argument prototype would still apply. */ | |
2095 | #ifdef __cplusplus | |
2096 | extern "C" | |
2097 | #endif | |
2098 | char $2 (); | |
2099 | /* The GNU C library defines this for functions which it implements | |
2100 | to always fail with ENOSYS. Some functions are actually named | |
2101 | something starting with __ and the normal name is an alias. */ | |
2102 | #if defined __stub_$2 || defined __stub___$2 | |
2103 | choke me | |
2104 | #endif | |
2105 | ||
2106 | int | |
2107 | main () | |
2108 | { | |
2109 | return $2 (); | |
2110 | ; | |
2111 | return 0; | |
2112 | } | |
2113 | _ACEOF | |
2114 | if ac_fn_c_try_link "$LINENO"; then : | |
2115 | eval "$3=yes" | |
2116 | else | |
2117 | eval "$3=no" | |
2118 | fi | |
2119 | rm -f core conftest.err conftest.$ac_objext \ | |
2120 | conftest$ac_exeext conftest.$ac_ext | |
2121 | fi | |
2122 | eval ac_res=\$$3 | |
2123 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2124 | $as_echo "$ac_res" >&6; } | |
d6a003a8 | 2125 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
067d23c9 KY |
2126 | |
2127 | } # ac_fn_c_check_func | |
2128 | ||
2129 | # ac_fn_c_check_type LINENO TYPE VAR INCLUDES | |
2130 | # ------------------------------------------- | |
2131 | # Tests whether TYPE exists after having included INCLUDES, setting cache | |
2132 | # variable VAR accordingly. | |
2133 | ac_fn_c_check_type () | |
2134 | { | |
2135 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2136 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2137 | $as_echo_n "checking for $2... " >&6; } | |
d6a003a8 | 2138 | if eval \${$3+:} false; then : |
067d23c9 KY |
2139 | $as_echo_n "(cached) " >&6 |
2140 | else | |
2141 | eval "$3=no" | |
2142 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2143 | /* end confdefs.h. */ | |
2144 | $4 | |
2145 | int | |
2146 | main () | |
2147 | { | |
2148 | if (sizeof ($2)) | |
2149 | return 0; | |
2150 | ; | |
2151 | return 0; | |
2152 | } | |
2153 | _ACEOF | |
2154 | if ac_fn_c_try_compile "$LINENO"; then : | |
2155 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2156 | /* end confdefs.h. */ | |
2157 | $4 | |
2158 | int | |
2159 | main () | |
2160 | { | |
2161 | if (sizeof (($2))) | |
2162 | return 0; | |
2163 | ; | |
2164 | return 0; | |
2165 | } | |
2166 | _ACEOF | |
2167 | if ac_fn_c_try_compile "$LINENO"; then : | |
2168 | ||
2169 | else | |
2170 | eval "$3=yes" | |
2171 | fi | |
2172 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2173 | fi | |
2174 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2175 | fi | |
2176 | eval ac_res=\$$3 | |
2177 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2178 | $as_echo "$ac_res" >&6; } | |
d6a003a8 | 2179 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
067d23c9 KY |
2180 | |
2181 | } # ac_fn_c_check_type | |
2182 | cat >config.log <<_ACEOF | |
2183 | This file contains any messages produced by compilers while | |
2184 | running configure, to aid debugging if configure makes a mistake. | |
2185 | ||
2186 | It was created by emacs $as_me 24.0.50, which was | |
d6a003a8 | 2187 | generated by GNU Autoconf 2.68. Invocation command line was |
067d23c9 KY |
2188 | |
2189 | $ $0 $@ | |
2190 | ||
2191 | _ACEOF | |
2192 | exec 5>>config.log | |
2193 | { | |
2194 | cat <<_ASUNAME | |
2195 | ## --------- ## | |
2196 | ## Platform. ## | |
2197 | ## --------- ## | |
2198 | ||
2199 | hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` | |
2200 | uname -m = `(uname -m) 2>/dev/null || echo unknown` | |
2201 | uname -r = `(uname -r) 2>/dev/null || echo unknown` | |
2202 | uname -s = `(uname -s) 2>/dev/null || echo unknown` | |
2203 | uname -v = `(uname -v) 2>/dev/null || echo unknown` | |
2204 | ||
2205 | /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` | |
2206 | /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` | |
2207 | ||
2208 | /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` | |
2209 | /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` | |
2210 | /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` | |
2211 | /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` | |
2212 | /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` | |
2213 | /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` | |
2214 | /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` | |
2215 | ||
2216 | _ASUNAME | |
2217 | ||
2218 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2219 | for as_dir in $PATH | |
2220 | do | |
2221 | IFS=$as_save_IFS | |
2222 | test -z "$as_dir" && as_dir=. | |
2223 | $as_echo "PATH: $as_dir" | |
2224 | done | |
2225 | IFS=$as_save_IFS | |
2226 | ||
2227 | } >&5 | |
2228 | ||
2229 | cat >&5 <<_ACEOF | |
2230 | ||
2231 | ||
2232 | ## ----------- ## | |
2233 | ## Core tests. ## | |
2234 | ## ----------- ## | |
2235 | ||
2236 | _ACEOF | |
2237 | ||
2238 | ||
2239 | # Keep a trace of the command line. | |
2240 | # Strip out --no-create and --no-recursion so they do not pile up. | |
2241 | # Strip out --silent because we don't want to record it for future runs. | |
2242 | # Also quote any args containing shell meta-characters. | |
2243 | # Make two passes to allow for proper duplicate-argument suppression. | |
2244 | ac_configure_args= | |
2245 | ac_configure_args0= | |
2246 | ac_configure_args1= | |
2247 | ac_must_keep_next=false | |
2248 | for ac_pass in 1 2 | |
2249 | do | |
2250 | for ac_arg | |
2251 | do | |
2252 | case $ac_arg in | |
2253 | -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; | |
2254 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
2255 | | -silent | --silent | --silen | --sile | --sil) | |
2256 | continue ;; | |
2257 | *\'*) | |
2258 | ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
2259 | esac | |
2260 | case $ac_pass in | |
2261 | 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; | |
2262 | 2) | |
2263 | as_fn_append ac_configure_args1 " '$ac_arg'" | |
2264 | if test $ac_must_keep_next = true; then | |
2265 | ac_must_keep_next=false # Got value, back to normal. | |
2266 | else | |
2267 | case $ac_arg in | |
2268 | *=* | --config-cache | -C | -disable-* | --disable-* \ | |
2269 | | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | |
2270 | | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | |
2271 | | -with-* | --with-* | -without-* | --without-* | --x) | |
2272 | case "$ac_configure_args0 " in | |
2273 | "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; | |
2274 | esac | |
2275 | ;; | |
2276 | -* ) ac_must_keep_next=true ;; | |
2277 | esac | |
2278 | fi | |
2279 | as_fn_append ac_configure_args " '$ac_arg'" | |
2280 | ;; | |
2281 | esac | |
2282 | done | |
2283 | done | |
2284 | { ac_configure_args0=; unset ac_configure_args0;} | |
2285 | { ac_configure_args1=; unset ac_configure_args1;} | |
2286 | ||
2287 | # When interrupted or exit'd, cleanup temporary files, and complete | |
2288 | # config.log. We remove comments because anyway the quotes in there | |
2289 | # would cause problems or look ugly. | |
2290 | # WARNING: Use '\'' to represent an apostrophe within the trap. | |
2291 | # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. | |
2292 | trap 'exit_status=$? | |
2293 | # Save into config.log some information that might help in debugging. | |
2294 | { | |
2295 | echo | |
2296 | ||
d6a003a8 | 2297 | $as_echo "## ---------------- ## |
067d23c9 | 2298 | ## Cache variables. ## |
d6a003a8 | 2299 | ## ---------------- ##" |
067d23c9 KY |
2300 | echo |
2301 | # The following way of writing the cache mishandles newlines in values, | |
2302 | ( | |
2303 | for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do | |
2304 | eval ac_val=\$$ac_var | |
2305 | case $ac_val in #( | |
2306 | *${as_nl}*) | |
2307 | case $ac_var in #( | |
2308 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
2309 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
2310 | esac | |
2311 | case $ac_var in #( | |
2312 | _ | IFS | as_nl) ;; #( | |
2313 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
2314 | *) { eval $ac_var=; unset $ac_var;} ;; | |
2315 | esac ;; | |
2316 | esac | |
2317 | done | |
2318 | (set) 2>&1 | | |
2319 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( | |
2320 | *${as_nl}ac_space=\ *) | |
2321 | sed -n \ | |
2322 | "s/'\''/'\''\\\\'\'''\''/g; | |
2323 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" | |
2324 | ;; #( | |
2325 | *) | |
2326 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" | |
2327 | ;; | |
2328 | esac | | |
2329 | sort | |
2330 | ) | |
2331 | echo | |
2332 | ||
d6a003a8 | 2333 | $as_echo "## ----------------- ## |
067d23c9 | 2334 | ## Output variables. ## |
d6a003a8 | 2335 | ## ----------------- ##" |
067d23c9 KY |
2336 | echo |
2337 | for ac_var in $ac_subst_vars | |
2338 | do | |
2339 | eval ac_val=\$$ac_var | |
2340 | case $ac_val in | |
2341 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
2342 | esac | |
2343 | $as_echo "$ac_var='\''$ac_val'\''" | |
2344 | done | sort | |
2345 | echo | |
2346 | ||
2347 | if test -n "$ac_subst_files"; then | |
d6a003a8 | 2348 | $as_echo "## ------------------- ## |
067d23c9 | 2349 | ## File substitutions. ## |
d6a003a8 | 2350 | ## ------------------- ##" |
067d23c9 KY |
2351 | echo |
2352 | for ac_var in $ac_subst_files | |
2353 | do | |
2354 | eval ac_val=\$$ac_var | |
2355 | case $ac_val in | |
2356 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
2357 | esac | |
2358 | $as_echo "$ac_var='\''$ac_val'\''" | |
2359 | done | sort | |
2360 | echo | |
2361 | fi | |
2362 | ||
2363 | if test -s confdefs.h; then | |
d6a003a8 | 2364 | $as_echo "## ----------- ## |
067d23c9 | 2365 | ## confdefs.h. ## |
d6a003a8 | 2366 | ## ----------- ##" |
067d23c9 KY |
2367 | echo |
2368 | cat confdefs.h | |
2369 | echo | |
2370 | fi | |
2371 | test "$ac_signal" != 0 && | |
2372 | $as_echo "$as_me: caught signal $ac_signal" | |
2373 | $as_echo "$as_me: exit $exit_status" | |
2374 | } >&5 | |
2375 | rm -f core *.core core.conftest.* && | |
2376 | rm -f -r conftest* confdefs* conf$$* $ac_clean_files && | |
2377 | exit $exit_status | |
2378 | ' 0 | |
2379 | for ac_signal in 1 2 13 15; do | |
2380 | trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal | |
2381 | done | |
2382 | ac_signal=0 | |
2383 | ||
2384 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
2385 | rm -f -r conftest* confdefs.h | |
2386 | ||
2387 | $as_echo "/* confdefs.h */" > confdefs.h | |
2388 | ||
2389 | # Predefined preprocessor variables. | |
2390 | ||
2391 | cat >>confdefs.h <<_ACEOF | |
2392 | #define PACKAGE_NAME "$PACKAGE_NAME" | |
2393 | _ACEOF | |
2394 | ||
2395 | cat >>confdefs.h <<_ACEOF | |
2396 | #define PACKAGE_TARNAME "$PACKAGE_TARNAME" | |
2397 | _ACEOF | |
2398 | ||
2399 | cat >>confdefs.h <<_ACEOF | |
2400 | #define PACKAGE_VERSION "$PACKAGE_VERSION" | |
2401 | _ACEOF | |
2402 | ||
2403 | cat >>confdefs.h <<_ACEOF | |
2404 | #define PACKAGE_STRING "$PACKAGE_STRING" | |
2405 | _ACEOF | |
2406 | ||
2407 | cat >>confdefs.h <<_ACEOF | |
2408 | #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" | |
2409 | _ACEOF | |
2410 | ||
2411 | cat >>confdefs.h <<_ACEOF | |
2412 | #define PACKAGE_URL "$PACKAGE_URL" | |
2413 | _ACEOF | |
2414 | ||
2415 | ||
2416 | # Let the site file select an alternate cache file if it wants to. | |
2417 | # Prefer an explicitly selected file to automatically selected ones. | |
2418 | ac_site_file1=NONE | |
2419 | ac_site_file2=NONE | |
2420 | if test -n "$CONFIG_SITE"; then | |
d6a003a8 AS |
2421 | # We do not want a PATH search for config.site. |
2422 | case $CONFIG_SITE in #(( | |
2423 | -*) ac_site_file1=./$CONFIG_SITE;; | |
2424 | */*) ac_site_file1=$CONFIG_SITE;; | |
2425 | *) ac_site_file1=./$CONFIG_SITE;; | |
2426 | esac | |
067d23c9 KY |
2427 | elif test "x$prefix" != xNONE; then |
2428 | ac_site_file1=$prefix/share/config.site | |
2429 | ac_site_file2=$prefix/etc/config.site | |
2430 | else | |
2431 | ac_site_file1=$ac_default_prefix/share/config.site | |
2432 | ac_site_file2=$ac_default_prefix/etc/config.site | |
2433 | fi | |
2434 | for ac_site_file in "$ac_site_file1" "$ac_site_file2" | |
2435 | do | |
2436 | test "x$ac_site_file" = xNONE && continue | |
2437 | if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then | |
2438 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 | |
2439 | $as_echo "$as_me: loading site script $ac_site_file" >&6;} | |
2440 | sed 's/^/| /' "$ac_site_file" >&5 | |
d6a003a8 AS |
2441 | . "$ac_site_file" \ |
2442 | || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
2443 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
2444 | as_fn_error $? "failed to load site script $ac_site_file | |
2445 | See \`config.log' for more details" "$LINENO" 5; } | |
067d23c9 KY |
2446 | fi |
2447 | done | |
2448 | ||
2449 | if test -r "$cache_file"; then | |
2450 | # Some versions of bash will fail to source /dev/null (special files | |
2451 | # actually), so we avoid doing that. DJGPP emulates it as a regular file. | |
2452 | if test /dev/null != "$cache_file" && test -f "$cache_file"; then | |
2453 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 | |
2454 | $as_echo "$as_me: loading cache $cache_file" >&6;} | |
2455 | case $cache_file in | |
2456 | [\\/]* | ?:[\\/]* ) . "$cache_file";; | |
2457 | *) . "./$cache_file";; | |
2458 | esac | |
2459 | fi | |
2460 | else | |
2461 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 | |
2462 | $as_echo "$as_me: creating cache $cache_file" >&6;} | |
2463 | >$cache_file | |
2464 | fi | |
2465 | ||
2466 | as_fn_append ac_header_list " stdlib.h" | |
2467 | as_fn_append ac_header_list " unistd.h" | |
2468 | as_fn_append ac_header_list " sys/param.h" | |
2469 | as_fn_append ac_header_list " sys/time.h" | |
2470 | as_fn_append ac_func_list " alarm" | |
2471 | # Check that the precious variables saved in the cache have kept the same | |
2472 | # value. | |
2473 | ac_cache_corrupted=false | |
2474 | for ac_var in $ac_precious_vars; do | |
2475 | eval ac_old_set=\$ac_cv_env_${ac_var}_set | |
2476 | eval ac_new_set=\$ac_env_${ac_var}_set | |
2477 | eval ac_old_val=\$ac_cv_env_${ac_var}_value | |
2478 | eval ac_new_val=\$ac_env_${ac_var}_value | |
2479 | case $ac_old_set,$ac_new_set in | |
2480 | set,) | |
2481 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 | |
2482 | $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} | |
2483 | ac_cache_corrupted=: ;; | |
2484 | ,set) | |
2485 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 | |
2486 | $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} | |
2487 | ac_cache_corrupted=: ;; | |
2488 | ,);; | |
2489 | *) | |
2490 | if test "x$ac_old_val" != "x$ac_new_val"; then | |
2491 | # differences in whitespace do not lead to failure. | |
2492 | ac_old_val_w=`echo x $ac_old_val` | |
2493 | ac_new_val_w=`echo x $ac_new_val` | |
2494 | if test "$ac_old_val_w" != "$ac_new_val_w"; then | |
2495 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 | |
2496 | $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} | |
2497 | ac_cache_corrupted=: | |
2498 | else | |
2499 | { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 | |
2500 | $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} | |
2501 | eval $ac_var=\$ac_old_val | |
2502 | fi | |
2503 | { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 | |
2504 | $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} | |
2505 | { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 | |
2506 | $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} | |
2507 | fi;; | |
2508 | esac | |
2509 | # Pass precious variables to config.status. | |
2510 | if test "$ac_new_set" = set; then | |
2511 | case $ac_new_val in | |
2512 | *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; | |
2513 | *) ac_arg=$ac_var=$ac_new_val ;; | |
2514 | esac | |
2515 | case " $ac_configure_args " in | |
2516 | *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. | |
2517 | *) as_fn_append ac_configure_args " '$ac_arg'" ;; | |
2518 | esac | |
2519 | fi | |
2520 | done | |
2521 | if $ac_cache_corrupted; then | |
2522 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
2523 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
2524 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 | |
2525 | $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} | |
d6a003a8 | 2526 | as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 |
067d23c9 KY |
2527 | fi |
2528 | ## -------------------- ## | |
2529 | ## Main body of script. ## | |
2530 | ## -------------------- ## | |
2531 | ||
2532 | ac_ext=c | |
2533 | ac_cpp='$CPP $CPPFLAGS' | |
2534 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2535 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2536 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2537 | ||
2538 | ||
2539 | ac_config_headers="$ac_config_headers src/config.h:src/config.in" | |
2540 | ||
2541 | ||
2542 | ||
2543 | test "$program_prefix" != NONE && | |
2544 | program_transform_name="s&^&$program_prefix&;$program_transform_name" | |
2545 | # Use a double $ so make ignores it. | |
2546 | test "$program_suffix" != NONE && | |
2547 | program_transform_name="s&\$&$program_suffix&;$program_transform_name" | |
2548 | # Double any \ or $. | |
2549 | # By default was `s,x,x', remove it if useless. | |
2550 | ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' | |
2551 | program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` | |
2552 | ||
2553 | ||
2554 | lispdir='${datadir}/emacs/${version}/lisp' | |
2555 | locallisppath='${datadir}/emacs/${version}/site-lisp:'\ | |
2556 | '${datadir}/emacs/site-lisp' | |
2557 | lisppath='${locallisppath}:${lispdir}:${datadir}/emacs/${version}/leim' | |
2558 | etcdir='${datadir}/emacs/${version}/etc' | |
2559 | archlibdir='${libexecdir}/emacs/${version}/${configuration}' | |
2560 | docdir='${datadir}/emacs/${version}/etc' | |
2561 | gamedir='${localstatedir}/games/emacs' | |
2562 | ||
2563 | gameuser=games | |
2564 | ||
2565 | ||
2566 | ||
2567 | ||
2568 | # Check whether --with-pop was given. | |
2569 | if test "${with_pop+set}" = set; then : | |
2570 | withval=$with_pop; | |
2571 | else | |
2572 | with_pop=yes | |
2573 | fi | |
2574 | ||
2575 | if test "$with_pop" = yes; then | |
2576 | $as_echo "#define MAIL_USE_POP 1" >>confdefs.h | |
2577 | ||
2578 | fi | |
2579 | ||
2580 | ||
2581 | # Check whether --with-kerberos was given. | |
2582 | if test "${with_kerberos+set}" = set; then : | |
2583 | withval=$with_kerberos; | |
2584 | else | |
2585 | with_kerberos=no | |
2586 | fi | |
2587 | ||
2588 | if test "$with_kerberos" != no; then | |
2589 | $as_echo "#define KERBEROS 1" >>confdefs.h | |
2590 | ||
2591 | fi | |
2592 | ||
2593 | ||
2594 | # Check whether --with-kerberos5 was given. | |
2595 | if test "${with_kerberos5+set}" = set; then : | |
2596 | withval=$with_kerberos5; | |
2597 | else | |
2598 | with_kerberos5=no | |
2599 | fi | |
2600 | ||
2601 | if test "${with_kerberos5}" != no; then | |
2602 | if test "${with_kerberos}" = no; then | |
2603 | with_kerberos=yes | |
2604 | $as_echo "#define KERBEROS 1" >>confdefs.h | |
2605 | ||
2606 | fi | |
2607 | ||
2608 | $as_echo "#define KERBEROS5 1" >>confdefs.h | |
2609 | ||
2610 | fi | |
2611 | ||
2612 | ||
2613 | # Check whether --with-hesiod was given. | |
2614 | if test "${with_hesiod+set}" = set; then : | |
2615 | withval=$with_hesiod; | |
2616 | else | |
2617 | with_hesiod=no | |
2618 | fi | |
2619 | ||
2620 | if test "$with_hesiod" != no; then | |
2621 | ||
2622 | $as_echo "#define HESIOD 1" >>confdefs.h | |
2623 | ||
2624 | fi | |
2625 | ||
2626 | ||
2627 | # Check whether --with-mmdf was given. | |
2628 | if test "${with_mmdf+set}" = set; then : | |
2629 | withval=$with_mmdf; | |
2630 | else | |
2631 | with_mmdf=no | |
2632 | fi | |
2633 | ||
2634 | if test "$with_mmdf" != no; then | |
2635 | ||
2636 | $as_echo "#define MAIL_USE_MMDF 1" >>confdefs.h | |
2637 | ||
2638 | fi | |
2639 | ||
2640 | ||
2641 | # Check whether --with-mail-unlink was given. | |
2642 | if test "${with_mail_unlink+set}" = set; then : | |
2643 | withval=$with_mail_unlink; | |
2644 | else | |
2645 | with_mail_unlink=no | |
2646 | fi | |
2647 | ||
2648 | if test "$with_mail_unlink" != no; then | |
2649 | ||
2650 | $as_echo "#define MAIL_UNLINK_SPOOL 1" >>confdefs.h | |
2651 | ||
2652 | fi | |
2653 | ||
2654 | ||
2655 | # Check whether --with-mailhost was given. | |
2656 | if test "${with_mailhost+set}" = set; then : | |
2657 | withval=$with_mailhost; | |
2658 | cat >>confdefs.h <<_ACEOF | |
2659 | #define MAILHOST "$withval" | |
2660 | _ACEOF | |
2661 | ||
2662 | fi | |
2663 | ||
2664 | ||
2665 | ||
2666 | # Check whether --with-sound was given. | |
2667 | if test "${with_sound+set}" = set; then : | |
2668 | withval=$with_sound; | |
2669 | else | |
2670 | with_sound=yes | |
2671 | fi | |
2672 | ||
2673 | ||
2674 | ||
2675 | # Check whether --with-sync-input was given. | |
2676 | if test "${with_sync_input+set}" = set; then : | |
2677 | withval=$with_sync_input; | |
2678 | else | |
2679 | with_sync_input=yes | |
2680 | fi | |
2681 | ||
2682 | if test "$with_sync_input" = yes; then | |
2683 | ||
2684 | $as_echo "#define SYNC_INPUT 1" >>confdefs.h | |
2685 | ||
2686 | fi | |
2687 | ||
2688 | ||
2689 | # Check whether --with-x-toolkit was given. | |
2690 | if test "${with_x_toolkit+set}" = set; then : | |
2691 | withval=$with_x_toolkit; case "${withval}" in | |
2692 | y | ye | yes ) val=gtk ;; | |
2693 | n | no ) val=no ;; | |
2694 | l | lu | luc | luci | lucid ) val=lucid ;; | |
2695 | a | at | ath | athe | athen | athena ) val=athena ;; | |
2696 | m | mo | mot | moti | motif ) val=motif ;; | |
2697 | g | gt | gtk ) val=gtk ;; | |
2698 | gtk3 ) val=gtk3 ;; | |
2699 | * ) | |
d6a003a8 | 2700 | as_fn_error $? "\`--with-x-toolkit=$withval' is invalid; |
067d23c9 KY |
2701 | this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif', \`gtk' or |
2702 | \`gtk3'. \`yes' and \`gtk' are synonyms. \`athena' and \`lucid' are synonyms." "$LINENO" 5 | |
2703 | ;; | |
2704 | esac | |
2705 | with_x_toolkit=$val | |
2706 | ||
2707 | fi | |
2708 | ||
2709 | ||
2710 | ||
2711 | # Check whether --with-xpm was given. | |
2712 | if test "${with_xpm+set}" = set; then : | |
2713 | withval=$with_xpm; | |
2714 | else | |
2715 | with_xpm=yes | |
2716 | fi | |
2717 | ||
2718 | ||
2719 | # Check whether --with-jpeg was given. | |
2720 | if test "${with_jpeg+set}" = set; then : | |
2721 | withval=$with_jpeg; | |
2722 | else | |
2723 | with_jpeg=yes | |
2724 | fi | |
2725 | ||
2726 | ||
2727 | # Check whether --with-tiff was given. | |
2728 | if test "${with_tiff+set}" = set; then : | |
2729 | withval=$with_tiff; | |
2730 | else | |
2731 | with_tiff=yes | |
2732 | fi | |
2733 | ||
2734 | ||
2735 | # Check whether --with-gif was given. | |
2736 | if test "${with_gif+set}" = set; then : | |
2737 | withval=$with_gif; | |
2738 | else | |
2739 | with_gif=yes | |
2740 | fi | |
2741 | ||
2742 | ||
2743 | # Check whether --with-png was given. | |
2744 | if test "${with_png+set}" = set; then : | |
2745 | withval=$with_png; | |
2746 | else | |
2747 | with_png=yes | |
2748 | fi | |
2749 | ||
2750 | ||
2751 | # Check whether --with-rsvg was given. | |
2752 | if test "${with_rsvg+set}" = set; then : | |
2753 | withval=$with_rsvg; | |
2754 | else | |
2755 | with_rsvg=yes | |
2756 | fi | |
2757 | ||
2758 | ||
2759 | # Check whether --with-xml2 was given. | |
2760 | if test "${with_xml2+set}" = set; then : | |
2761 | withval=$with_xml2; | |
2762 | else | |
2763 | with_xml2=yes | |
2764 | fi | |
2765 | ||
2766 | ||
2767 | # Check whether --with-imagemagick was given. | |
2768 | if test "${with_imagemagick+set}" = set; then : | |
2769 | withval=$with_imagemagick; | |
2770 | else | |
2771 | with_imagemagick=yes | |
2772 | fi | |
2773 | ||
2774 | ||
2775 | ||
2776 | # Check whether --with-xft was given. | |
2777 | if test "${with_xft+set}" = set; then : | |
2778 | withval=$with_xft; | |
2779 | else | |
2780 | with_xft=yes | |
2781 | fi | |
2782 | ||
2783 | ||
2784 | # Check whether --with-libotf was given. | |
2785 | if test "${with_libotf+set}" = set; then : | |
2786 | withval=$with_libotf; | |
2787 | else | |
2788 | with_libotf=yes | |
2789 | fi | |
2790 | ||
2791 | ||
2792 | # Check whether --with-m17n-flt was given. | |
2793 | if test "${with_m17n_flt+set}" = set; then : | |
2794 | withval=$with_m17n_flt; | |
2795 | else | |
2796 | with_m17n_flt=yes | |
2797 | fi | |
2798 | ||
2799 | ||
2800 | ||
2801 | # Check whether --with-toolkit-scroll-bars was given. | |
2802 | if test "${with_toolkit_scroll_bars+set}" = set; then : | |
2803 | withval=$with_toolkit_scroll_bars; | |
2804 | else | |
2805 | with_toolkit_scroll_bars=yes | |
2806 | fi | |
2807 | ||
2808 | ||
2809 | # Check whether --with-xaw3d was given. | |
2810 | if test "${with_xaw3d+set}" = set; then : | |
2811 | withval=$with_xaw3d; | |
2812 | else | |
2813 | with_xaw3d=yes | |
2814 | fi | |
2815 | ||
2816 | ||
2817 | # Check whether --with-xim was given. | |
2818 | if test "${with_xim+set}" = set; then : | |
2819 | withval=$with_xim; | |
2820 | else | |
2821 | with_xim=yes | |
2822 | fi | |
2823 | ||
2824 | ||
2825 | # Check whether --with-ns was given. | |
2826 | if test "${with_ns+set}" = set; then : | |
2827 | withval=$with_ns; | |
2828 | else | |
2829 | with_ns=no | |
2830 | fi | |
2831 | ||
2832 | ||
2833 | ||
2834 | # Check whether --with-gpm was given. | |
2835 | if test "${with_gpm+set}" = set; then : | |
2836 | withval=$with_gpm; | |
2837 | else | |
2838 | with_gpm=yes | |
2839 | fi | |
2840 | ||
2841 | ||
2842 | # Check whether --with-dbus was given. | |
2843 | if test "${with_dbus+set}" = set; then : | |
2844 | withval=$with_dbus; | |
2845 | else | |
2846 | with_dbus=yes | |
2847 | fi | |
2848 | ||
2849 | ||
2850 | # Check whether --with-gconf was given. | |
2851 | if test "${with_gconf+set}" = set; then : | |
2852 | withval=$with_gconf; | |
2853 | else | |
2854 | with_gconf=yes | |
2855 | fi | |
2856 | ||
2857 | ||
2858 | # Check whether --with-selinux was given. | |
2859 | if test "${with_selinux+set}" = set; then : | |
2860 | withval=$with_selinux; | |
2861 | else | |
2862 | with_selinux=yes | |
2863 | fi | |
2864 | ||
2865 | ||
2866 | # Check whether --with-gnutls was given. | |
2867 | if test "${with_gnutls+set}" = set; then : | |
2868 | withval=$with_gnutls; | |
2869 | else | |
2870 | with_gnutls=yes | |
2871 | fi | |
2872 | ||
2873 | ||
2874 | ## For the times when you want to build Emacs but don't have | |
2875 | ## a suitable makeinfo, and can live without the manuals. | |
2876 | ||
2877 | # Check whether --with-makeinfo was given. | |
2878 | if test "${with_makeinfo+set}" = set; then : | |
2879 | withval=$with_makeinfo; | |
2880 | else | |
2881 | with_makeinfo=yes | |
2882 | fi | |
2883 | ||
2884 | ||
2885 | ## This is an option because I do not know if all info/man support | |
2886 | ## compressed files, nor how to test if they do so. | |
2887 | ||
2888 | # Check whether --with-compress-info was given. | |
2889 | if test "${with_compress_info+set}" = set; then : | |
2890 | withval=$with_compress_info; | |
2891 | else | |
2892 | with_compress_info=yes | |
2893 | fi | |
2894 | ||
2895 | if test $with_compress_info = yes; then | |
2896 | GZIP_INFO=yes | |
2897 | else | |
2898 | GZIP_INFO= | |
2899 | fi | |
2900 | ||
2901 | ||
2902 | ||
2903 | # Check whether --with-pkg-config-prog was given. | |
2904 | if test "${with_pkg_config_prog+set}" = set; then : | |
2905 | withval=$with_pkg_config_prog; | |
2906 | fi | |
2907 | ||
2908 | if test "X${with_pkg_config_prog}" != X; then | |
2909 | if test "${with_pkg_config_prog}" != yes; then | |
2910 | PKG_CONFIG="${with_pkg_config_prog}" | |
2911 | fi | |
2912 | fi | |
2913 | ||
2914 | CRT_DIR= | |
2915 | ||
2916 | # Check whether --with-crt-dir was given. | |
2917 | if test "${with_crt_dir+set}" = set; then : | |
2918 | withval=$with_crt_dir; | |
2919 | fi | |
2920 | ||
2921 | CRT_DIR="${with_crt_dir}" | |
2922 | ||
2923 | ||
2924 | # Check whether --with-gnustep-conf was given. | |
2925 | if test "${with_gnustep_conf+set}" = set; then : | |
2926 | withval=$with_gnustep_conf; | |
2927 | fi | |
2928 | ||
2929 | test "X${with_gnustep_conf}" != X && test "${with_gnustep_conf}" != yes && \ | |
2930 | GNUSTEP_CONFIG_FILE="${with_gnustep_conf}" | |
2931 | test "X$GNUSTEP_CONFIG_FILE" = "X" && \ | |
2932 | GNUSTEP_CONFIG_FILE=/etc/GNUstep/GNUstep.conf | |
2933 | ||
2934 | # Check whether --enable-ns-self-contained was given. | |
2935 | if test "${enable_ns_self_contained+set}" = set; then : | |
2936 | enableval=$enable_ns_self_contained; EN_NS_SELF_CONTAINED=$enableval | |
2937 | else | |
2938 | EN_NS_SELF_CONTAINED=yes | |
2939 | fi | |
2940 | ||
2941 | ||
2942 | # Check whether --enable-asserts was given. | |
2943 | if test "${enable_asserts+set}" = set; then : | |
2944 | enableval=$enable_asserts; USE_XASSERTS=$enableval | |
2945 | else | |
2946 | USE_XASSERTS=no | |
2947 | fi | |
2948 | ||
2949 | ||
2950 | # Check whether --enable-maintainer-mode was given. | |
2951 | if test "${enable_maintainer_mode+set}" = set; then : | |
2952 | enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval | |
2953 | else | |
2954 | USE_MAINTAINER_MODE=no | |
2955 | fi | |
2956 | ||
2957 | if test $USE_MAINTAINER_MODE = yes; then | |
2958 | MAINT= | |
2959 | else | |
2960 | MAINT=# | |
2961 | fi | |
2962 | ||
2963 | ||
2964 | # Check whether --enable-locallisppath was given. | |
2965 | if test "${enable_locallisppath+set}" = set; then : | |
2966 | enableval=$enable_locallisppath; if test "${enableval}" = "no"; then | |
2967 | locallisppath= | |
2968 | elif test "${enableval}" != "yes"; then | |
2969 | locallisppath=${enableval} | |
2970 | fi | |
2971 | fi | |
2972 | ||
2973 | ||
2974 | # Check whether --enable-checking was given. | |
2975 | if test "${enable_checking+set}" = set; then : | |
2976 | enableval=$enable_checking; ac_checking_flags="${enableval}" | |
2977 | fi | |
2978 | ||
2979 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS," | |
2980 | for check in $ac_checking_flags | |
2981 | do | |
2982 | case $check in | |
2983 | # these set all the flags to specific states | |
2984 | yes) ac_enable_checking=1 ;; | |
2985 | no) ac_enable_checking= ; | |
2986 | ac_gc_check_stringbytes= ; | |
2987 | ac_gc_check_string_overrun= ; | |
2988 | ac_gc_check_string_free_list= ; | |
2989 | ac_xmalloc_overrun= ; | |
2990 | ac_gc_check_cons_list= ;; | |
2991 | all) ac_enable_checking=1 ; | |
2992 | ac_gc_check_stringbytes=1 ; | |
2993 | ac_gc_check_string_overrun=1 ; | |
2994 | ac_gc_check_string_free_list=1 ; | |
2995 | ac_xmalloc_overrun=1 ; | |
2996 | ac_gc_check_cons_list=1 ;; | |
2997 | # these enable particular checks | |
2998 | stringbytes) ac_gc_check_stringbytes=1 ;; | |
2999 | stringoverrun) ac_gc_check_string_overrun=1 ;; | |
3000 | stringfreelist) ac_gc_check_string_free_list=1 ;; | |
3001 | xmallocoverrun) ac_xmalloc_overrun=1 ;; | |
3002 | conslist) ac_gc_check_cons_list=1 ;; | |
d6a003a8 | 3003 | *) as_fn_error $? "unknown check category $check" "$LINENO" 5 ;; |
067d23c9 KY |
3004 | esac |
3005 | done | |
3006 | IFS="$ac_save_IFS" | |
3007 | ||
3008 | if test x$ac_enable_checking != x ; then | |
3009 | ||
3010 | $as_echo "#define ENABLE_CHECKING 1" >>confdefs.h | |
3011 | ||
3012 | fi | |
3013 | if test x$ac_gc_check_stringbytes != x ; then | |
3014 | ||
3015 | $as_echo "#define GC_CHECK_STRING_BYTES 1" >>confdefs.h | |
3016 | ||
3017 | fi | |
3018 | if test x$ac_gc_check_stringoverrun != x ; then | |
3019 | ||
3020 | $as_echo "#define GC_CHECK_STRING_OVERRUN 1" >>confdefs.h | |
3021 | ||
3022 | fi | |
3023 | if test x$ac_gc_check_string_free_list != x ; then | |
3024 | ||
3025 | $as_echo "#define GC_CHECK_STRING_FREE_LIST 1" >>confdefs.h | |
3026 | ||
3027 | fi | |
3028 | if test x$ac_xmalloc_overrun != x ; then | |
3029 | ||
3030 | $as_echo "#define XMALLOC_OVERRUN_CHECK 1" >>confdefs.h | |
3031 | ||
3032 | fi | |
3033 | if test x$ac_gc_check_cons_list != x ; then | |
3034 | ||
3035 | $as_echo "#define GC_CHECK_CONS_LIST 1" >>confdefs.h | |
3036 | ||
3037 | fi | |
3038 | ||
3039 | # Check whether --enable-use-lisp-union-type was given. | |
3040 | if test "${enable_use_lisp_union_type+set}" = set; then : | |
3041 | enableval=$enable_use_lisp_union_type; if test "${enableval}" != "no"; then | |
3042 | ||
3043 | $as_echo "#define USE_LISP_UNION_TYPE 1" >>confdefs.h | |
3044 | ||
3045 | fi | |
3046 | fi | |
3047 | ||
3048 | ||
3049 | ||
3050 | # Check whether --enable-profiling was given. | |
3051 | if test "${enable_profiling+set}" = set; then : | |
3052 | enableval=$enable_profiling; ac_enable_profiling="${enableval}" | |
3053 | fi | |
3054 | ||
3055 | if test x$ac_enable_profiling != x ; then | |
3056 | PROFILING_CFLAGS="-DPROFILING=1 -pg" | |
3057 | else | |
3058 | PROFILING_CFLAGS= | |
3059 | fi | |
3060 | ||
3061 | ||
3062 | # Check whether --enable-autodepend was given. | |
3063 | if test "${enable_autodepend+set}" = set; then : | |
3064 | enableval=$enable_autodepend; ac_enable_autodepend="${enableval}" | |
3065 | else | |
3066 | ac_enable_autodepend=yes | |
3067 | fi | |
3068 | ||
3069 | ||
3070 | #### Make srcdir absolute, if it isn't already. It's important to | |
3071 | #### avoid running the path through pwd unnecessarily, since pwd can | |
3072 | #### give you automounter prefixes, which can go away. We do all this | |
3073 | #### so Emacs can find its files when run uninstalled. | |
3074 | ## Make sure CDPATH doesn't affect cd (in case PWD is relative). | |
3075 | unset CDPATH | |
3076 | case "${srcdir}" in | |
3077 | /* ) ;; | |
3078 | . ) | |
3079 | ## We may be able to use the $PWD environment variable to make this | |
3080 | ## absolute. But sometimes PWD is inaccurate. | |
3081 | ## Note: we used to use ${PWD} at the end instead of `pwd`, | |
3082 | ## but that tested only for a well-formed and valid PWD, | |
3083 | ## it did not object when PWD was well-formed and valid but just wrong. | |
3084 | if test ".${PWD}" != "." && test ".`(cd ${PWD} ; sh -c pwd)`" = ".`pwd`" ; | |
3085 | then | |
3086 | srcdir="$PWD" | |
3087 | else | |
3088 | srcdir="`(cd ${srcdir}; pwd)`" | |
3089 | fi | |
3090 | ;; | |
3091 | * ) srcdir="`(cd ${srcdir}; pwd)`" ;; | |
3092 | esac | |
3093 | ||
3094 | #### Check if the source directory already has a configured system in it. | |
3095 | if test `pwd` != `(cd ${srcdir} && pwd)` \ | |
3096 | && test -f "${srcdir}/src/config.h" ; then | |
3097 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The directory tree \`${srcdir}' is being used | |
3098 | as a build directory right now; it has been configured in its own | |
3099 | right. To configure in another directory as well, you MUST | |
3100 | use GNU make. If you do not have GNU make, then you must | |
3101 | now do \`make distclean' in ${srcdir}, | |
3102 | and then run $0 again." >&5 | |
3103 | $as_echo "$as_me: WARNING: The directory tree \`${srcdir}' is being used | |
3104 | as a build directory right now; it has been configured in its own | |
3105 | right. To configure in another directory as well, you MUST | |
3106 | use GNU make. If you do not have GNU make, then you must | |
3107 | now do \`make distclean' in ${srcdir}, | |
3108 | and then run $0 again." >&2;} | |
3109 | fi | |
3110 | ||
3111 | #### Given the configuration name, set machfile and opsysfile to the | |
3112 | #### names of the m/*.h and s/*.h files we should use. | |
3113 | ||
3114 | ### Canonicalize the configuration name. | |
3115 | ||
3116 | ac_aux_dir= | |
3117 | for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do | |
d6a003a8 AS |
3118 | if test -f "$ac_dir/install-sh"; then |
3119 | ac_aux_dir=$ac_dir | |
3120 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
3121 | break | |
3122 | elif test -f "$ac_dir/install.sh"; then | |
3123 | ac_aux_dir=$ac_dir | |
3124 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
3125 | break | |
3126 | elif test -f "$ac_dir/shtool"; then | |
3127 | ac_aux_dir=$ac_dir | |
3128 | ac_install_sh="$ac_aux_dir/shtool install -c" | |
3129 | break | |
3130 | fi | |
067d23c9 KY |
3131 | done |
3132 | if test -z "$ac_aux_dir"; then | |
d6a003a8 | 3133 | as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 |
067d23c9 KY |
3134 | fi |
3135 | ||
3136 | # These three variables are undocumented and unsupported, | |
3137 | # and are intended to be withdrawn in a future Autoconf release. | |
3138 | # They can cause serious problems if a builder's source tree is in a directory | |
3139 | # whose full name contains unusual characters. | |
3140 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. | |
3141 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. | |
3142 | ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. | |
3143 | ||
3144 | ||
3145 | # Make sure we can run config.sub. | |
3146 | $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || | |
d6a003a8 | 3147 | as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 |
067d23c9 KY |
3148 | |
3149 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 | |
3150 | $as_echo_n "checking build system type... " >&6; } | |
d6a003a8 | 3151 | if ${ac_cv_build+:} false; then : |
067d23c9 KY |
3152 | $as_echo_n "(cached) " >&6 |
3153 | else | |
3154 | ac_build_alias=$build_alias | |
3155 | test "x$ac_build_alias" = x && | |
3156 | ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` | |
3157 | test "x$ac_build_alias" = x && | |
d6a003a8 | 3158 | as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 |
067d23c9 | 3159 | ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || |
d6a003a8 | 3160 | as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 |
067d23c9 KY |
3161 | |
3162 | fi | |
3163 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 | |
3164 | $as_echo "$ac_cv_build" >&6; } | |
3165 | case $ac_cv_build in | |
3166 | *-*-*) ;; | |
d6a003a8 | 3167 | *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; |
067d23c9 KY |
3168 | esac |
3169 | build=$ac_cv_build | |
3170 | ac_save_IFS=$IFS; IFS='-' | |
3171 | set x $ac_cv_build | |
3172 | shift | |
3173 | build_cpu=$1 | |
3174 | build_vendor=$2 | |
3175 | shift; shift | |
3176 | # Remember, the first character of IFS is used to create $*, | |
3177 | # except with old shells: | |
3178 | build_os=$* | |
3179 | IFS=$ac_save_IFS | |
3180 | case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac | |
3181 | ||
3182 | ||
3183 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 | |
3184 | $as_echo_n "checking host system type... " >&6; } | |
d6a003a8 | 3185 | if ${ac_cv_host+:} false; then : |
067d23c9 KY |
3186 | $as_echo_n "(cached) " >&6 |
3187 | else | |
3188 | if test "x$host_alias" = x; then | |
3189 | ac_cv_host=$ac_cv_build | |
3190 | else | |
3191 | ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || | |
d6a003a8 | 3192 | as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 |
067d23c9 KY |
3193 | fi |
3194 | ||
3195 | fi | |
3196 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 | |
3197 | $as_echo "$ac_cv_host" >&6; } | |
3198 | case $ac_cv_host in | |
3199 | *-*-*) ;; | |
d6a003a8 | 3200 | *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; |
067d23c9 KY |
3201 | esac |
3202 | host=$ac_cv_host | |
3203 | ac_save_IFS=$IFS; IFS='-' | |
3204 | set x $ac_cv_host | |
3205 | shift | |
3206 | host_cpu=$1 | |
3207 | host_vendor=$2 | |
3208 | shift; shift | |
3209 | # Remember, the first character of IFS is used to create $*, | |
3210 | # except with old shells: | |
3211 | host_os=$* | |
3212 | IFS=$ac_save_IFS | |
3213 | case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac | |
3214 | ||
3215 | ||
3216 | canonical=$host | |
3217 | configuration=${host_alias-${build_alias-$host}} | |
3218 | ||
3219 | ||
3220 | ||
3221 | ### If you add support for a new configuration, add code to this | |
3222 | ### switch statement to recognize your configuration name and select | |
3223 | ### the appropriate operating system and machine description files. | |
3224 | ||
3225 | ### You would hope that you could choose an m/*.h file pretty much | |
3226 | ### based on the machine portion of the configuration name, and an s/*.h | |
3227 | ### file based on the operating system portion. However, it turns out | |
3228 | ### that each m/*.h file is pretty manufacturer-specific - for | |
3229 | ### example mips.h is MIPS | |
3230 | ### So we basically have to have a special case for each | |
3231 | ### configuration name. | |
3232 | ### | |
3233 | ### As far as handling version numbers on operating systems is | |
3234 | ### concerned, make sure things will fail in a fixable way. If | |
3235 | ### /etc/MACHINES doesn't say anything about version numbers, be | |
3236 | ### prepared to handle anything reasonably. If version numbers | |
3237 | ### matter, be sure /etc/MACHINES says something about it. | |
3238 | ||
3239 | machine='' opsys='' unported=no | |
3240 | case "${canonical}" in | |
3241 | ||
d6a003a8 AS |
3242 | ## GNU/Linux ports |
3243 | *-*-linux-gnu*) | |
3244 | opsys=gnu-linux | |
3245 | case ${canonical} in | |
3246 | alpha*) machine=alpha ;; | |
3247 | s390-*) machine=ibms390 ;; | |
3248 | s390x-*) machine=ibms390x ;; | |
3249 | powerpc*) machine=macppc ;; | |
3250 | sparc*) machine=sparc ;; | |
3251 | ia64*) machine=ia64 ;; | |
3252 | m68k*) machine=m68k ;; | |
3253 | x86_64*) machine=amdx86-64 ;; | |
3254 | esac | |
3255 | ;; | |
3256 | ||
067d23c9 KY |
3257 | ## FreeBSD ports |
3258 | *-*-freebsd* ) | |
3259 | opsys=freebsd | |
3260 | case "${canonical}" in | |
3261 | alpha*) machine=alpha ;; | |
3262 | amd64-*|x86_64-*) machine=amdx86-64 ;; | |
067d23c9 KY |
3263 | ia64-*) machine=ia64 ;; |
3264 | i[3456]86-*) machine=intel386 ;; | |
3265 | powerpc-*) machine=macppc ;; | |
3266 | sparc-*) machine=sparc ;; | |
3267 | sparc64-*) machine=sparc ;; | |
3268 | esac | |
3269 | ;; | |
3270 | ||
3271 | ## FreeBSD kernel + glibc based userland | |
3272 | *-*-kfreebsd*gnu* ) | |
3273 | opsys=gnu-kfreebsd | |
3274 | case "${canonical}" in | |
3275 | alpha*) machine=alpha ;; | |
3276 | amd64-*|x86_64-*) machine=amdx86-64 ;; | |
3277 | ia64-*) machine=ia64 ;; | |
3278 | i[3456]86-*) machine=intel386 ;; | |
3279 | powerpc-*) machine=macppc ;; | |
3280 | sparc-*) machine=sparc ;; | |
3281 | sparc64-*) machine=sparc ;; | |
3282 | esac | |
3283 | ;; | |
3284 | ||
3285 | ## NetBSD ports | |
3286 | *-*-netbsd* ) | |
3287 | opsys=netbsd | |
3288 | case "${canonical}" in | |
3289 | alpha*) machine=alpha ;; | |
3290 | x86_64-*) machine=amdx86-64 ;; | |
067d23c9 KY |
3291 | i[3456]86-*) machine=intel386 ;; |
3292 | m68k-*) machine=m68k ;; | |
3293 | powerpc-*) machine=macppc ;; | |
067d23c9 KY |
3294 | sparc*-) machine=sparc ;; |
3295 | vax-*) machine=vax ;; | |
3296 | esac | |
3297 | ;; | |
3298 | ||
3299 | ## OpenBSD ports | |
3300 | *-*-openbsd* ) | |
3301 | opsys=openbsd | |
3302 | case "${canonical}" in | |
3303 | alpha*) machine=alpha ;; | |
3304 | x86_64-*) machine=amdx86-64 ;; | |
067d23c9 KY |
3305 | i386-*) machine=intel386 ;; |
3306 | powerpc-*) machine=macppc ;; | |
3307 | sparc*) machine=sparc ;; | |
3308 | vax-*) machine=vax ;; | |
3309 | esac | |
3310 | ;; | |
3311 | ||
067d23c9 KY |
3312 | ## Apple Darwin / Mac OS X |
3313 | *-apple-darwin* ) | |
3314 | case "${canonical}" in | |
3315 | i[3456]86-* ) machine=intel386 ;; | |
3316 | powerpc-* ) machine=macppc ;; | |
3317 | x86_64-* ) machine=amdx86-64 ;; | |
3318 | * ) unported=yes ;; | |
3319 | esac | |
3320 | opsys=darwin | |
3321 | # Define CPP as follows to make autoconf work correctly. | |
3322 | CPP="${CC-cc} -E -no-cpp-precomp" | |
3323 | # Use fink packages if available. | |
3324 | if test -d /sw/include && test -d /sw/lib; then | |
3325 | GCC_TEST_OPTIONS="-I/sw/include -L/sw/lib" | |
3326 | CPP="${CPP} ${GCC_TEST_OPTIONS}" | |
3327 | NON_GCC_TEST_OPTIONS=${GCC_TEST_OPTIONS} | |
3328 | fi | |
3329 | ;; | |
3330 | ||
3331 | ## HP 9000 series 700 and 800, running HP/UX | |
3332 | hppa*-hp-hpux10.2* ) | |
d6a003a8 | 3333 | opsys=hpux10-20 |
067d23c9 KY |
3334 | ;; |
3335 | hppa*-hp-hpux1[1-9]* ) | |
d6a003a8 | 3336 | opsys=hpux11 |
067d23c9 KY |
3337 | CFLAGS="-D_INCLUDE__STDC_A1_SOURCE $CFLAGS" |
3338 | ;; | |
3339 | ||
067d23c9 | 3340 | ## IBM machines |
067d23c9 KY |
3341 | rs6000-ibm-aix4.[23]* ) |
3342 | machine=ibmrs6000 opsys=aix4-2 | |
3343 | ;; | |
3344 | powerpc-ibm-aix4.[23]* ) | |
3345 | machine=ibmrs6000 opsys=aix4-2 | |
3346 | ;; | |
3347 | rs6000-ibm-aix[56]* ) | |
3348 | machine=ibmrs6000 opsys=aix4-2 | |
3349 | ;; | |
3350 | powerpc-ibm-aix[56]* ) | |
3351 | machine=ibmrs6000 opsys=aix4-2 | |
3352 | ;; | |
3353 | ||
067d23c9 KY |
3354 | ## Silicon Graphics machines |
3355 | ## Iris 4D | |
3356 | mips-sgi-irix6.5 ) | |
3357 | machine=iris4d opsys=irix6-5 | |
3358 | # Without defining _LANGUAGE_C, things get masked out in the headers | |
3359 | # so that, for instance, grepping for `free' in stdlib.h fails and | |
3360 | # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m). | |
3361 | NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C" | |
3362 | NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C" | |
3363 | ;; | |
3364 | ||
3365 | ## Suns | |
067d23c9 KY |
3366 | *-sun-solaris* \ |
3367 | | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* \ | |
3368 | | x86_64-*-solaris2* | x86_64-*-sunos5*) | |
3369 | case "${canonical}" in | |
3370 | i[3456]86-*-* ) machine=intel386 ;; | |
3371 | amd64-*-*|x86_64-*-*) machine=amdx86-64 ;; | |
3372 | sparc* ) machine=sparc ;; | |
3373 | * ) unported=yes ;; | |
3374 | esac | |
3375 | case "${canonical}" in | |
3376 | *-sunos5.6* | *-solaris2.6* ) | |
3377 | opsys=sol2-6 | |
3378 | NON_GNU_CPP=/usr/ccs/lib/cpp | |
3379 | RANLIB="ar -ts" | |
3380 | ;; | |
3381 | *-sunos5.[7-9]* | *-solaris2.[7-9]* ) | |
3382 | opsys=sol2-6 | |
3383 | emacs_check_sunpro_c=yes | |
3384 | NON_GNU_CPP=/usr/ccs/lib/cpp | |
3385 | ;; | |
3386 | *-sunos5* | *-solaris* ) | |
3387 | opsys=sol2-10 | |
3388 | emacs_check_sunpro_c=yes | |
3389 | NON_GNU_CPP=/usr/ccs/lib/cpp | |
3390 | ;; | |
3391 | esac | |
3392 | ## Watch out for a compiler that we know will not work. | |
3393 | case "${canonical}" in | |
3394 | *-solaris* | *-sunos5* ) | |
3395 | if [ "x$CC" = x/usr/ucb/cc ]; then | |
3396 | ## /usr/ucb/cc doesn't work; | |
3397 | ## we should find some other compiler that does work. | |
3398 | unset CC | |
3399 | fi | |
3400 | ;; | |
3401 | *) ;; | |
3402 | esac | |
3403 | ;; | |
3404 | ||
067d23c9 KY |
3405 | ## Intel 386 machines where we don't care about the manufacturer. |
3406 | i[3456]86-*-* ) | |
3407 | machine=intel386 | |
3408 | case "${canonical}" in | |
3409 | *-cygwin ) opsys=cygwin ;; | |
3410 | *-darwin* ) opsys=darwin | |
3411 | CPP="${CC-cc} -E -no-cpp-precomp" | |
3412 | ;; | |
067d23c9 KY |
3413 | *-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;; |
3414 | *-sysv5uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;; | |
3415 | *-sysv5OpenUNIX* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;; | |
3416 | ## Otherwise, we'll fall through to the generic opsys code at the bottom. | |
3417 | esac | |
3418 | ;; | |
3419 | ||
067d23c9 KY |
3420 | * ) |
3421 | unported=yes | |
3422 | ;; | |
3423 | esac | |
3424 | ||
3425 | ### If the code above didn't choose an operating system, just choose | |
3426 | ### an operating system based on the configuration name. You really | |
3427 | ### only want to use this when you have no idea what the right | |
3428 | ### operating system is; if you know what operating systems a machine | |
3429 | ### runs, it's cleaner to make it explicit in the case statement | |
3430 | ### above. | |
3431 | if test x"${opsys}" = x; then | |
3432 | case "${canonical}" in | |
3433 | *-gnu* ) opsys=gnu ;; | |
3434 | * ) | |
3435 | unported=yes | |
3436 | ;; | |
3437 | esac | |
3438 | fi | |
3439 | ||
3440 | ||
3441 | ||
3442 | if test $unported = yes; then | |
d6a003a8 | 3443 | as_fn_error $? "Emacs hasn't been ported to \`${canonical}' systems. |
067d23c9 KY |
3444 | Check \`etc/MACHINES' for recognized configuration names." "$LINENO" 5 |
3445 | fi | |
3446 | ||
d6a003a8 AS |
3447 | if test -n "$machine"; then |
3448 | machfile="m/${machine}.h" | |
3449 | else | |
3450 | machfile= | |
3451 | fi | |
067d23c9 KY |
3452 | opsysfile="s/${opsys}.h" |
3453 | ||
3454 | ||
3455 | #### Choose a compiler. | |
3456 | test -n "$CC" && cc_specified=yes | |
3457 | ||
3458 | # Save the value of CFLAGS that the user specified. | |
3459 | SPECIFIED_CFLAGS="$CFLAGS" | |
3460 | ||
3461 | ac_ext=c | |
3462 | ac_cpp='$CPP $CPPFLAGS' | |
3463 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3464 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3465 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
3466 | if test -n "$ac_tool_prefix"; then | |
3467 | # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. | |
3468 | set dummy ${ac_tool_prefix}gcc; ac_word=$2 | |
3469 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3470 | $as_echo_n "checking for $ac_word... " >&6; } | |
d6a003a8 | 3471 | if ${ac_cv_prog_CC+:} false; then : |
067d23c9 KY |
3472 | $as_echo_n "(cached) " >&6 |
3473 | else | |
3474 | if test -n "$CC"; then | |
3475 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
3476 | else | |
3477 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3478 | for as_dir in $PATH | |
3479 | do | |
3480 | IFS=$as_save_IFS | |
3481 | test -z "$as_dir" && as_dir=. | |
3482 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3483 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
3484 | ac_cv_prog_CC="${ac_tool_prefix}gcc" | |
3485 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3486 | break 2 | |
3487 | fi | |
3488 | done | |
3489 | done | |
3490 | IFS=$as_save_IFS | |
3491 | ||
3492 | fi | |
3493 | fi | |
3494 | CC=$ac_cv_prog_CC | |
3495 | if test -n "$CC"; then | |
3496 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
3497 | $as_echo "$CC" >&6; } | |
3498 | else | |
3499 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3500 | $as_echo "no" >&6; } | |
3501 | fi | |
3502 | ||
3503 | ||
3504 | fi | |
3505 | if test -z "$ac_cv_prog_CC"; then | |
3506 | ac_ct_CC=$CC | |
3507 | # Extract the first word of "gcc", so it can be a program name with args. | |
3508 | set dummy gcc; ac_word=$2 | |
3509 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3510 | $as_echo_n "checking for $ac_word... " >&6; } | |
d6a003a8 | 3511 | if ${ac_cv_prog_ac_ct_CC+:} false; then : |
067d23c9 KY |
3512 | $as_echo_n "(cached) " >&6 |
3513 | else | |
3514 | if test -n "$ac_ct_CC"; then | |
3515 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
3516 | else | |
3517 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3518 | for as_dir in $PATH | |
3519 | do | |
3520 | IFS=$as_save_IFS | |
3521 | test -z "$as_dir" && as_dir=. | |
3522 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3523 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
3524 | ac_cv_prog_ac_ct_CC="gcc" | |
3525 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3526 | break 2 | |
3527 | fi | |
3528 | done | |
3529 | done | |
3530 | IFS=$as_save_IFS | |
3531 | ||
3532 | fi | |
3533 | fi | |
3534 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
3535 | if test -n "$ac_ct_CC"; then | |
3536 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 | |
3537 | $as_echo "$ac_ct_CC" >&6; } | |
3538 | else | |
3539 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3540 | $as_echo "no" >&6; } | |
3541 | fi | |
3542 | ||
3543 | if test "x$ac_ct_CC" = x; then | |
3544 | CC="" | |
3545 | else | |
3546 | case $cross_compiling:$ac_tool_warned in | |
3547 | yes:) | |
3548 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
3549 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
3550 | ac_tool_warned=yes ;; | |
3551 | esac | |
3552 | CC=$ac_ct_CC | |
3553 | fi | |
3554 | else | |
3555 | CC="$ac_cv_prog_CC" | |
3556 | fi | |
3557 | ||
3558 | if test -z "$CC"; then | |
3559 | if test -n "$ac_tool_prefix"; then | |
3560 | # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. | |
3561 | set dummy ${ac_tool_prefix}cc; ac_word=$2 | |
3562 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3563 | $as_echo_n "checking for $ac_word... " >&6; } | |
d6a003a8 | 3564 | if ${ac_cv_prog_CC+:} false; then : |
067d23c9 KY |
3565 | $as_echo_n "(cached) " >&6 |
3566 | else | |
3567 | if test -n "$CC"; then | |
3568 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
3569 | else | |
3570 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3571 | for as_dir in $PATH | |
3572 | do | |
3573 | IFS=$as_save_IFS | |
3574 | test -z "$as_dir" && as_dir=. | |
3575 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3576 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
3577 | ac_cv_prog_CC="${ac_tool_prefix}cc" | |
3578 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3579 | break 2 | |
3580 | fi | |
3581 | done | |
3582 | done | |
3583 | IFS=$as_save_IFS | |
3584 | ||
3585 | fi | |
3586 | fi | |
3587 | CC=$ac_cv_prog_CC | |
3588 | if test -n "$CC"; then | |
3589 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
3590 | $as_echo "$CC" >&6; } | |
3591 | else | |
3592 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3593 | $as_echo "no" >&6; } | |
3594 | fi | |
3595 | ||
3596 | ||
3597 | fi | |
3598 | fi | |
3599 | if test -z "$CC"; then | |
3600 | # Extract the first word of "cc", so it can be a program name with args. | |
3601 | set dummy cc; ac_word=$2 | |
3602 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3603 | $as_echo_n "checking for $ac_word... " >&6; } | |
d6a003a8 | 3604 | if ${ac_cv_prog_CC+:} false; then : |
067d23c9 KY |
3605 | $as_echo_n "(cached) " >&6 |
3606 | else | |
3607 | if test -n "$CC"; then | |
3608 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
3609 | else | |
3610 | ac_prog_rejected=no | |
3611 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3612 | for as_dir in $PATH | |
3613 | do | |
3614 | IFS=$as_save_IFS | |
3615 | test -z "$as_dir" && as_dir=. | |
3616 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3617 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
3618 | if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then | |
3619 | ac_prog_rejected=yes | |
3620 | continue | |
3621 | fi | |
3622 | ac_cv_prog_CC="cc" | |
3623 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3624 | break 2 | |
3625 | fi | |
3626 | done | |
3627 | done | |
3628 | IFS=$as_save_IFS | |
3629 | ||
3630 | if test $ac_prog_rejected = yes; then | |
3631 | # We found a bogon in the path, so make sure we never use it. | |
3632 | set dummy $ac_cv_prog_CC | |
3633 | shift | |
3634 | if test $# != 0; then | |
3635 | # We chose a different compiler from the bogus one. | |
3636 | # However, it has the same basename, so the bogon will be chosen | |
3637 | # first if we set CC to just the basename; use the full file name. | |
3638 | shift | |
3639 | ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" | |
3640 | fi | |
3641 | fi | |
3642 | fi | |
3643 | fi | |
3644 | CC=$ac_cv_prog_CC | |
3645 | if test -n "$CC"; then | |
3646 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
3647 | $as_echo "$CC" >&6; } | |
3648 | else | |
3649 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3650 | $as_echo "no" >&6; } | |
3651 | fi | |
3652 | ||
3653 | ||
3654 | fi | |
3655 | if test -z "$CC"; then | |
3656 | if test -n "$ac_tool_prefix"; then | |
3657 | for ac_prog in cl.exe | |
3658 | do | |
3659 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | |
3660 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | |
3661 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3662 | $as_echo_n "checking for $ac_word... " >&6; } | |
d6a003a8 | 3663 | if ${ac_cv_prog_CC+:} false; then : |
067d23c9 KY |
3664 | $as_echo_n "(cached) " >&6 |
3665 | else | |
3666 | if test -n "$CC"; then | |
3667 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
3668 | else | |
3669 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3670 | for as_dir in $PATH | |
3671 | do | |
3672 | IFS=$as_save_IFS | |
3673 | test -z "$as_dir" && as_dir=. | |
3674 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3675 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
3676 | ac_cv_prog_CC="$ac_tool_prefix$ac_prog" | |
3677 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3678 | break 2 | |
3679 | fi | |
3680 | done | |
3681 | done | |
3682 | IFS=$as_save_IFS | |
3683 | ||
3684 | fi | |
3685 | fi | |
3686 | CC=$ac_cv_prog_CC | |
3687 | if test -n "$CC"; then | |
3688 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
3689 | $as_echo "$CC" >&6; } | |
3690 | else | |
3691 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3692 | $as_echo "no" >&6; } | |
3693 | fi | |
3694 | ||
3695 | ||
3696 | test -n "$CC" && break | |
3697 | done | |
3698 | fi | |
3699 | if test -z "$CC"; then | |
3700 | ac_ct_CC=$CC | |
3701 | for ac_prog in cl.exe | |
3702 | do | |
3703 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
3704 | set dummy $ac_prog; ac_word=$2 | |
3705 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3706 | $as_echo_n "checking for $ac_word... " >&6; } | |
d6a003a8 | 3707 | if ${ac_cv_prog_ac_ct_CC+:} false; then : |
067d23c9 KY |
3708 | $as_echo_n "(cached) " >&6 |
3709 | else | |
3710 | if test -n "$ac_ct_CC"; then | |
3711 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
3712 | else | |
3713 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3714 | for as_dir in $PATH | |
3715 | do | |
3716 | IFS=$as_save_IFS | |
3717 | test -z "$as_dir" && as_dir=. | |
3718 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3719 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
3720 | ac_cv_prog_ac_ct_CC="$ac_prog" | |
3721 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3722 | break 2 | |
3723 | fi | |
3724 | done | |
3725 | done | |
3726 | IFS=$as_save_IFS | |
3727 | ||
3728 | fi | |
3729 | fi | |
3730 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
3731 | if test -n "$ac_ct_CC"; then | |
3732 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 | |
3733 | $as_echo "$ac_ct_CC" >&6; } | |
3734 | else | |
3735 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3736 | $as_echo "no" >&6; } | |
3737 | fi | |
3738 | ||
3739 | ||
3740 | test -n "$ac_ct_CC" && break | |
3741 | done | |
3742 | ||
3743 | if test "x$ac_ct_CC" = x; then | |
3744 | CC="" | |
3745 | else | |
3746 | case $cross_compiling:$ac_tool_warned in | |
3747 | yes:) | |
3748 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
3749 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
3750 | ac_tool_warned=yes ;; | |
3751 | esac | |
3752 | CC=$ac_ct_CC | |
3753 | fi | |
3754 | fi | |
3755 | ||
3756 | fi | |
3757 | ||
3758 | ||
3759 | test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
3760 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d6a003a8 AS |
3761 | as_fn_error $? "no acceptable C compiler found in \$PATH |
3762 | See \`config.log' for more details" "$LINENO" 5; } | |
067d23c9 KY |
3763 | |
3764 | # Provide some information about the compiler. | |
3765 | $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 | |
3766 | set X $ac_compile | |
3767 | ac_compiler=$2 | |
3768 | for ac_option in --version -v -V -qversion; do | |
3769 | { { ac_try="$ac_compiler $ac_option >&5" | |
3770 | case "(($ac_try" in | |
3771 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3772 | *) ac_try_echo=$ac_try;; | |
3773 | esac | |
3774 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3775 | $as_echo "$ac_try_echo"; } >&5 | |
3776 | (eval "$ac_compiler $ac_option >&5") 2>conftest.err | |
3777 | ac_status=$? | |
3778 | if test -s conftest.err; then | |
3779 | sed '10a\ | |
3780 | ... rest of stderr output deleted ... | |
3781 | 10q' conftest.err >conftest.er1 | |
3782 | cat conftest.er1 >&5 | |
3783 | fi | |
3784 | rm -f conftest.er1 conftest.err | |
3785 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3786 | test $ac_status = 0; } | |
3787 | done | |
3788 | ||
3789 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3790 | /* end confdefs.h. */ | |
3791 | ||
3792 | int | |
3793 | main () | |
3794 | { | |
3795 | ||
3796 | ; | |
3797 | return 0; | |
3798 | } | |
3799 | _ACEOF | |
3800 | ac_clean_files_save=$ac_clean_files | |
3801 | ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" | |
3802 | # Try to create an executable without -o first, disregard a.out. | |
3803 | # It will help us diagnose broken compilers, and finding out an intuition | |
3804 | # of exeext. | |
3805 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 | |
3806 | $as_echo_n "checking whether the C compiler works... " >&6; } | |
3807 | ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` | |
3808 | ||
3809 | # The possible output files: | |
3810 | ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" | |
3811 | ||
3812 | ac_rmfiles= | |
3813 | for ac_file in $ac_files | |
3814 | do | |
3815 | case $ac_file in | |
3816 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; | |
3817 | * ) ac_rmfiles="$ac_rmfiles $ac_file";; | |
3818 | esac | |
3819 | done | |
3820 | rm -f $ac_rmfiles | |
3821 | ||
3822 | if { { ac_try="$ac_link_default" | |
3823 | case "(($ac_try" in | |
3824 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3825 | *) ac_try_echo=$ac_try;; | |
3826 | esac | |
3827 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3828 | $as_echo "$ac_try_echo"; } >&5 | |
3829 | (eval "$ac_link_default") 2>&5 | |
3830 | ac_status=$? | |
3831 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3832 | test $ac_status = 0; }; then : | |
3833 | # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. | |
3834 | # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' | |
3835 | # in a Makefile. We should not override ac_cv_exeext if it was cached, | |
3836 | # so that the user can short-circuit this test for compilers unknown to | |
3837 | # Autoconf. | |
3838 | for ac_file in $ac_files '' | |
3839 | do | |
3840 | test -f "$ac_file" || continue | |
3841 | case $ac_file in | |
3842 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) | |
3843 | ;; | |
3844 | [ab].out ) | |
3845 | # We found the default executable, but exeext='' is most | |
3846 | # certainly right. | |
3847 | break;; | |
3848 | *.* ) | |
3849 | if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; | |
3850 | then :; else | |
3851 | ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` | |
3852 | fi | |
3853 | # We set ac_cv_exeext here because the later test for it is not | |
3854 | # safe: cross compilers may not add the suffix if given an `-o' | |
3855 | # argument, so we may need to know it at that point already. | |
3856 | # Even if this section looks crufty: it has the advantage of | |
3857 | # actually working. | |
3858 | break;; | |
3859 | * ) | |
3860 | break;; | |
3861 | esac | |
3862 | done | |
3863 | test "$ac_cv_exeext" = no && ac_cv_exeext= | |
3864 | ||
3865 | else | |
3866 | ac_file='' | |
3867 | fi | |
3868 | if test -z "$ac_file"; then : | |
3869 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3870 | $as_echo "no" >&6; } | |
3871 | $as_echo "$as_me: failed program was:" >&5 | |
3872 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3873 | ||
3874 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
3875 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d6a003a8 AS |
3876 | as_fn_error 77 "C compiler cannot create executables |
3877 | See \`config.log' for more details" "$LINENO" 5; } | |
067d23c9 KY |
3878 | else |
3879 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
3880 | $as_echo "yes" >&6; } | |
3881 | fi | |
3882 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 | |
3883 | $as_echo_n "checking for C compiler default output file name... " >&6; } | |
3884 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 | |
3885 | $as_echo "$ac_file" >&6; } | |
3886 | ac_exeext=$ac_cv_exeext | |
3887 | ||
3888 | rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out | |
3889 | ac_clean_files=$ac_clean_files_save | |
3890 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 | |
3891 | $as_echo_n "checking for suffix of executables... " >&6; } | |
3892 | if { { ac_try="$ac_link" | |
3893 | case "(($ac_try" in | |
3894 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3895 | *) ac_try_echo=$ac_try;; | |
3896 | esac | |
3897 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3898 | $as_echo "$ac_try_echo"; } >&5 | |
3899 | (eval "$ac_link") 2>&5 | |
3900 | ac_status=$? | |
3901 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3902 | test $ac_status = 0; }; then : | |
3903 | # If both `conftest.exe' and `conftest' are `present' (well, observable) | |
3904 | # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will | |
3905 | # work properly (i.e., refer to `conftest.exe'), while it won't with | |
3906 | # `rm'. | |
3907 | for ac_file in conftest.exe conftest conftest.*; do | |
3908 | test -f "$ac_file" || continue | |
3909 | case $ac_file in | |
3910 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; | |
3911 | *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` | |
3912 | break;; | |
3913 | * ) break;; | |
3914 | esac | |
3915 | done | |
3916 | else | |
3917 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
3918 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d6a003a8 AS |
3919 | as_fn_error $? "cannot compute suffix of executables: cannot compile and link |
3920 | See \`config.log' for more details" "$LINENO" 5; } | |
067d23c9 KY |
3921 | fi |
3922 | rm -f conftest conftest$ac_cv_exeext | |
3923 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 | |
3924 | $as_echo "$ac_cv_exeext" >&6; } | |
3925 | ||
3926 | rm -f conftest.$ac_ext | |
3927 | EXEEXT=$ac_cv_exeext | |
3928 | ac_exeext=$EXEEXT | |
3929 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3930 | /* end confdefs.h. */ | |
3931 | #include <stdio.h> | |
3932 | int | |
3933 | main () | |
3934 | { | |
3935 | FILE *f = fopen ("conftest.out", "w"); | |
3936 | return ferror (f) || fclose (f) != 0; | |
3937 | ||
3938 | ; | |
3939 | return 0; | |
3940 | } | |
3941 | _ACEOF | |
3942 | ac_clean_files="$ac_clean_files conftest.out" | |
3943 | # Check that the compiler produces executables we can run. If not, either | |
3944 | # the compiler is broken, or we cross compile. | |
3945 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 | |
3946 | $as_echo_n "checking whether we are cross compiling... " >&6; } | |
3947 | if test "$cross_compiling" != yes; then | |
3948 | { { ac_try="$ac_link" | |
3949 | case "(($ac_try" in | |
3950 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3951 | *) ac_try_echo=$ac_try;; | |
3952 | esac | |
3953 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3954 | $as_echo "$ac_try_echo"; } >&5 | |
3955 | (eval "$ac_link") 2>&5 | |
3956 | ac_status=$? | |
3957 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3958 | test $ac_status = 0; } | |
3959 | if { ac_try='./conftest$ac_cv_exeext' | |
3960 | { { case "(($ac_try" in | |
3961 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3962 | *) ac_try_echo=$ac_try;; | |
3963 | esac | |
3964 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3965 | $as_echo "$ac_try_echo"; } >&5 | |
3966 | (eval "$ac_try") 2>&5 | |
3967 | ac_status=$? | |
3968 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3969 | test $ac_status = 0; }; }; then | |
3970 | cross_compiling=no | |
3971 | else | |
3972 | if test "$cross_compiling" = maybe; then | |
3973 | cross_compiling=yes | |
3974 | else | |
3975 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
3976 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d6a003a8 | 3977 | as_fn_error $? "cannot run C compiled programs. |
067d23c9 | 3978 | If you meant to cross compile, use \`--host'. |
d6a003a8 | 3979 | See \`config.log' for more details" "$LINENO" 5; } |
067d23c9 KY |
3980 | fi |
3981 | fi | |
3982 | fi | |
3983 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 | |
3984 | $as_echo "$cross_compiling" >&6; } | |
3985 | ||
3986 | rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out | |
3987 | ac_clean_files=$ac_clean_files_save | |
3988 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 | |
3989 | $as_echo_n "checking for suffix of object files... " >&6; } | |
d6a003a8 | 3990 | if ${ac_cv_objext+:} false; then : |
067d23c9 KY |
3991 | $as_echo_n "(cached) " >&6 |
3992 | else | |
3993 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3994 | /* end confdefs.h. */ | |
3995 | ||
3996 | int | |
3997 | main () | |
3998 | { | |
3999 | ||
4000 | ; | |
4001 | return 0; | |
4002 | } | |
4003 | _ACEOF | |
4004 | rm -f conftest.o conftest.obj | |
4005 | if { { ac_try="$ac_compile" | |
4006 | case "(($ac_try" in | |
4007 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4008 | *) ac_try_echo=$ac_try;; | |
4009 | esac | |
4010 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
4011 | $as_echo "$ac_try_echo"; } >&5 | |
4012 | (eval "$ac_compile") 2>&5 | |
4013 | ac_status=$? | |
4014 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
4015 | test $ac_status = 0; }; then : | |
4016 | for ac_file in conftest.o conftest.obj conftest.*; do | |
4017 | test -f "$ac_file" || continue; | |
4018 | case $ac_file in | |
4019 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; | |
4020 | *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` | |
4021 | break;; | |
4022 | esac | |
4023 | done | |
4024 | else | |
4025 | $as_echo "$as_me: failed program was:" >&5 | |
4026 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4027 | ||
4028 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
4029 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d6a003a8 AS |
4030 | as_fn_error $? "cannot compute suffix of object files: cannot compile |
4031 | See \`config.log' for more details" "$LINENO" 5; } | |
067d23c9 KY |
4032 | fi |
4033 | rm -f conftest.$ac_cv_objext conftest.$ac_ext | |
4034 | fi | |
4035 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 | |
4036 | $as_echo "$ac_cv_objext" >&6; } | |
4037 | OBJEXT=$ac_cv_objext | |
4038 | ac_objext=$OBJEXT | |
4039 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 | |
4040 | $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } | |
d6a003a8 | 4041 | if ${ac_cv_c_compiler_gnu+:} false; then : |
067d23c9 KY |
4042 | $as_echo_n "(cached) " >&6 |
4043 | else | |
4044 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4045 | /* end confdefs.h. */ | |
4046 | ||
4047 | int | |
4048 | main () | |
4049 | { | |
4050 | #ifndef __GNUC__ | |
4051 | choke me | |
4052 | #endif | |
4053 | ||
4054 | ; | |
4055 | return 0; | |
4056 | } | |
4057 | _ACEOF | |
4058 | if ac_fn_c_try_compile "$LINENO"; then : | |
4059 | ac_compiler_gnu=yes | |
4060 | else | |
4061 | ac_compiler_gnu=no | |
4062 | fi | |
4063 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4064 | ac_cv_c_compiler_gnu=$ac_compiler_gnu | |
4065 | ||
4066 | fi | |
4067 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 | |
4068 | $as_echo "$ac_cv_c_compiler_gnu" >&6; } | |
4069 | if test $ac_compiler_gnu = yes; then | |
4070 | GCC=yes | |
4071 | else | |
4072 | GCC= | |
4073 | fi | |
4074 | ac_test_CFLAGS=${CFLAGS+set} | |
4075 | ac_save_CFLAGS=$CFLAGS | |
4076 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 | |
4077 | $as_echo_n "checking whether $CC accepts -g... " >&6; } | |
d6a003a8 | 4078 | if ${ac_cv_prog_cc_g+:} false; then : |
067d23c9 KY |
4079 | $as_echo_n "(cached) " >&6 |
4080 | else | |
4081 | ac_save_c_werror_flag=$ac_c_werror_flag | |
4082 | ac_c_werror_flag=yes | |
4083 | ac_cv_prog_cc_g=no | |
4084 | CFLAGS="-g" | |
4085 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4086 | /* end confdefs.h. */ | |
4087 | ||
4088 | int | |
4089 | main () | |
4090 | { | |
4091 | ||
4092 | ; | |
4093 | return 0; | |
4094 | } | |
4095 | _ACEOF | |
4096 | if ac_fn_c_try_compile "$LINENO"; then : | |
4097 | ac_cv_prog_cc_g=yes | |
4098 | else | |
4099 | CFLAGS="" | |
4100 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4101 | /* end confdefs.h. */ | |
4102 | ||
4103 | int | |
4104 | main () | |
4105 | { | |
4106 | ||
4107 | ; | |
4108 | return 0; | |
4109 | } | |
4110 | _ACEOF | |
4111 | if ac_fn_c_try_compile "$LINENO"; then : | |
4112 | ||
4113 | else | |
4114 | ac_c_werror_flag=$ac_save_c_werror_flag | |
4115 | CFLAGS="-g" | |
4116 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4117 | /* end confdefs.h. */ | |
4118 | ||
4119 | int | |
4120 | main () | |
4121 | { | |
4122 | ||
4123 | ; | |
4124 | return 0; | |
4125 | } | |
4126 | _ACEOF | |
4127 | if ac_fn_c_try_compile "$LINENO"; then : | |
4128 | ac_cv_prog_cc_g=yes | |
4129 | fi | |
4130 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4131 | fi | |
4132 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4133 | fi | |
4134 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4135 | ac_c_werror_flag=$ac_save_c_werror_flag | |
4136 | fi | |
4137 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 | |
4138 | $as_echo "$ac_cv_prog_cc_g" >&6; } | |
4139 | if test "$ac_test_CFLAGS" = set; then | |
4140 | CFLAGS=$ac_save_CFLAGS | |
4141 | elif test $ac_cv_prog_cc_g = yes; then | |
4142 | if test "$GCC" = yes; then | |
4143 | CFLAGS="-g -O2" | |
4144 | else | |
4145 | CFLAGS="-g" | |
4146 | fi | |
4147 | else | |
4148 | if test "$GCC" = yes; then | |
4149 | CFLAGS="-O2" | |
4150 | else | |
4151 | CFLAGS= | |
4152 | fi | |
4153 | fi | |
4154 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 | |
4155 | $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } | |
d6a003a8 | 4156 | if ${ac_cv_prog_cc_c89+:} false; then : |
067d23c9 KY |
4157 | $as_echo_n "(cached) " >&6 |
4158 | else | |
4159 | ac_cv_prog_cc_c89=no | |
4160 | ac_save_CC=$CC | |
4161 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4162 | /* end confdefs.h. */ | |
4163 | #include <stdarg.h> | |
4164 | #include <stdio.h> | |
4165 | #include <sys/types.h> | |
4166 | #include <sys/stat.h> | |
4167 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
4168 | struct buf { int x; }; | |
4169 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
4170 | static char *e (p, i) | |
4171 | char **p; | |
4172 | int i; | |
4173 | { | |
4174 | return p[i]; | |
4175 | } | |
4176 | static char *f (char * (*g) (char **, int), char **p, ...) | |
4177 | { | |
4178 | char *s; | |
4179 | va_list v; | |
4180 | va_start (v,p); | |
4181 | s = g (p, va_arg (v,int)); | |
4182 | va_end (v); | |
4183 | return s; | |
4184 | } | |
4185 | ||
4186 | /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has | |
4187 | function prototypes and stuff, but not '\xHH' hex character constants. | |
4188 | These don't provoke an error unfortunately, instead are silently treated | |
4189 | as 'x'. The following induces an error, until -std is added to get | |
4190 | proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an | |
4191 | array size at least. It's necessary to write '\x00'==0 to get something | |
4192 | that's true only with -std. */ | |
4193 | int osf4_cc_array ['\x00' == 0 ? 1 : -1]; | |
4194 | ||
4195 | /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters | |
4196 | inside strings and character constants. */ | |
4197 | #define FOO(x) 'x' | |
4198 | int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; | |
4199 | ||
4200 | int test (int i, double x); | |
4201 | struct s1 {int (*f) (int a);}; | |
4202 | struct s2 {int (*f) (double a);}; | |
4203 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
4204 | int argc; | |
4205 | char **argv; | |
4206 | int | |
4207 | main () | |
4208 | { | |
4209 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; | |
4210 | ; | |
4211 | return 0; | |
4212 | } | |
4213 | _ACEOF | |
4214 | for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ | |
4215 | -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
4216 | do | |
4217 | CC="$ac_save_CC $ac_arg" | |
4218 | if ac_fn_c_try_compile "$LINENO"; then : | |
4219 | ac_cv_prog_cc_c89=$ac_arg | |
4220 | fi | |
4221 | rm -f core conftest.err conftest.$ac_objext | |
4222 | test "x$ac_cv_prog_cc_c89" != "xno" && break | |
4223 | done | |
4224 | rm -f conftest.$ac_ext | |
4225 | CC=$ac_save_CC | |
4226 | ||
4227 | fi | |
4228 | # AC_CACHE_VAL | |
4229 | case "x$ac_cv_prog_cc_c89" in | |
4230 | x) | |
4231 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 | |
4232 | $as_echo "none needed" >&6; } ;; | |
4233 | xno) | |
4234 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 | |
4235 | $as_echo "unsupported" >&6; } ;; | |
4236 | *) | |
4237 | CC="$CC $ac_cv_prog_cc_c89" | |
4238 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 | |
4239 | $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; | |
4240 | esac | |
4241 | if test "x$ac_cv_prog_cc_c89" != xno; then : | |
4242 | ||
4243 | fi | |
4244 | ||
4245 | ac_ext=c | |
4246 | ac_cpp='$CPP $CPPFLAGS' | |
4247 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
4248 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
4249 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
4250 | ||
4251 | ||
4252 | # On Suns, sometimes $CPP names a directory. | |
4253 | if test -n "$CPP" && test -d "$CPP"; then | |
4254 | CPP= | |
4255 | fi | |
4256 | ||
4257 | ## If not using gcc, and on Solaris, and no CPP specified, see if | |
4258 | ## using a Sun compiler, which needs -Xs to prevent whitespace. | |
4259 | if test x"$GCC" != xyes && test x"$emacs_check_sunpro_c" = xyes && \ | |
4260 | test x"$CPP" = x; then | |
4261 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using a Sun C compiler" >&5 | |
4262 | $as_echo_n "checking whether we are using a Sun C compiler... " >&6; } | |
4263 | ||
d6a003a8 | 4264 | if ${emacs_cv_sunpro_c+:} false; then : |
067d23c9 KY |
4265 | $as_echo_n "(cached) " >&6 |
4266 | else | |
4267 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4268 | /* end confdefs.h. */ | |
4269 | ||
4270 | int | |
4271 | main () | |
4272 | { | |
4273 | #ifndef __SUNPRO_C | |
4274 | fail; | |
4275 | #endif | |
4276 | ||
4277 | ; | |
4278 | return 0; | |
4279 | } | |
4280 | _ACEOF | |
4281 | if ac_fn_c_try_link "$LINENO"; then : | |
4282 | emacs_cv_sunpro_c=yes | |
4283 | else | |
4284 | emacs_cv_sunpro_c=no | |
4285 | fi | |
4286 | rm -f core conftest.err conftest.$ac_objext \ | |
4287 | conftest$ac_exeext conftest.$ac_ext | |
4288 | fi | |
4289 | ||
4290 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_sunpro_c" >&5 | |
4291 | $as_echo "$emacs_cv_sunpro_c" >&6; } | |
4292 | ||
4293 | if test x"$emacs_cv_sunpro_c" = xyes; then | |
4294 | NON_GNU_CPP="$CC -E -Xs" | |
4295 | fi | |
4296 | fi | |
4297 | ||
4298 | #### Some systems specify a CPP to use unless we are using GCC. | |
4299 | #### Now that we know whether we are using GCC, we can decide whether | |
4300 | #### to use that one. | |
4301 | if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x | |
4302 | then | |
4303 | CPP="$NON_GNU_CPP" | |
4304 | fi | |
4305 | ||
4306 | #### Some systems specify a CC to use unless we are using GCC. | |
4307 | #### Now that we know whether we are using GCC, we can decide whether | |
4308 | #### to use that one. | |
4309 | if test "x$NON_GNU_CC" != x && test x$GCC != xyes && | |
4310 | test x$cc_specified != xyes | |
4311 | then | |
4312 | CC="$NON_GNU_CC" | |
4313 | fi | |
4314 | ||
4315 | if test x$GCC = xyes; then | |
4316 | test "x$GCC_TEST_OPTIONS" != x && CC="$CC $GCC_TEST_OPTIONS" | |
4317 | else | |
4318 | test "x$NON_GCC_TEST_OPTIONS" != x && CC="$CC $NON_GCC_TEST_OPTIONS" | |
4319 | fi | |
4320 | ||
4321 | ac_ext=c | |
4322 | ac_cpp='$CPP $CPPFLAGS' | |
4323 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
4324 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
4325 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
4326 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 | |
4327 | $as_echo_n "checking how to run the C preprocessor... " >&6; } | |
4328 | # On Suns, sometimes $CPP names a directory. | |
4329 | if test -n "$CPP" && test -d "$CPP"; then | |
4330 | CPP= | |
4331 | fi | |
4332 | if test -z "$CPP"; then | |
d6a003a8 | 4333 | if ${ac_cv_prog_CPP+:} false; then : |
067d23c9 KY |
4334 | $as_echo_n "(cached) " >&6 |
4335 | else | |
4336 | # Double quotes because CPP needs to be expanded | |
4337 | for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" | |
4338 | do | |
4339 | ac_preproc_ok=false | |
4340 | for ac_c_preproc_warn_flag in '' yes | |
4341 | do | |
4342 | # Use a header file that comes with gcc, so configuring glibc | |
4343 | # with a fresh cross-compiler works. | |
4344 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
4345 | # <limits.h> exists even on freestanding compilers. | |
4346 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
4347 | # not just through cpp. "Syntax error" is here to catch this case. | |
4348 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4349 | /* end confdefs.h. */ | |
4350 | #ifdef __STDC__ | |
4351 | # include <limits.h> | |
4352 | #else | |
4353 | # include <assert.h> | |
4354 | #endif | |
4355 | Syntax error | |
4356 | _ACEOF | |
4357 | if ac_fn_c_try_cpp "$LINENO"; then : | |
4358 | ||
4359 | else | |
4360 | # Broken: fails on valid input. | |
4361 | continue | |
4362 | fi | |
d6a003a8 | 4363 | rm -f conftest.err conftest.i conftest.$ac_ext |
067d23c9 KY |
4364 | |
4365 | # OK, works on sane cases. Now check whether nonexistent headers | |
4366 | # can be detected and how. | |
4367 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4368 | /* end confdefs.h. */ | |
4369 | #include <ac_nonexistent.h> | |
4370 | _ACEOF | |
4371 | if ac_fn_c_try_cpp "$LINENO"; then : | |
4372 | # Broken: success on invalid input. | |
4373 | continue | |
4374 | else | |
4375 | # Passes both tests. | |
4376 | ac_preproc_ok=: | |
4377 | break | |
4378 | fi | |
d6a003a8 | 4379 | rm -f conftest.err conftest.i conftest.$ac_ext |
067d23c9 KY |
4380 | |
4381 | done | |
4382 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
d6a003a8 | 4383 | rm -f conftest.i conftest.err conftest.$ac_ext |
067d23c9 KY |
4384 | if $ac_preproc_ok; then : |
4385 | break | |
4386 | fi | |
4387 | ||
4388 | done | |
4389 | ac_cv_prog_CPP=$CPP | |
4390 | ||
4391 | fi | |
4392 | CPP=$ac_cv_prog_CPP | |
4393 | else | |
4394 | ac_cv_prog_CPP=$CPP | |
4395 | fi | |
4396 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 | |
4397 | $as_echo "$CPP" >&6; } | |
4398 | ac_preproc_ok=false | |
4399 | for ac_c_preproc_warn_flag in '' yes | |
4400 | do | |
4401 | # Use a header file that comes with gcc, so configuring glibc | |
4402 | # with a fresh cross-compiler works. | |
4403 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
4404 | # <limits.h> exists even on freestanding compilers. | |
4405 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
4406 | # not just through cpp. "Syntax error" is here to catch this case. | |
4407 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4408 | /* end confdefs.h. */ | |
4409 | #ifdef __STDC__ | |
4410 | # include <limits.h> | |
4411 | #else | |
4412 | # include <assert.h> | |
4413 | #endif | |
4414 | Syntax error | |
4415 | _ACEOF | |
4416 | if ac_fn_c_try_cpp "$LINENO"; then : | |
4417 | ||
4418 | else | |
4419 | # Broken: fails on valid input. | |
4420 | continue | |
4421 | fi | |
d6a003a8 | 4422 | rm -f conftest.err conftest.i conftest.$ac_ext |
067d23c9 KY |
4423 | |
4424 | # OK, works on sane cases. Now check whether nonexistent headers | |
4425 | # can be detected and how. | |
4426 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4427 | /* end confdefs.h. */ | |
4428 | #include <ac_nonexistent.h> | |
4429 | _ACEOF | |
4430 | if ac_fn_c_try_cpp "$LINENO"; then : | |
4431 | # Broken: success on invalid input. | |
4432 | continue | |
4433 | else | |
4434 | # Passes both tests. | |
4435 | ac_preproc_ok=: | |
4436 | break | |
4437 | fi | |
d6a003a8 | 4438 | rm -f conftest.err conftest.i conftest.$ac_ext |
067d23c9 KY |
4439 | |
4440 | done | |
4441 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
d6a003a8 | 4442 | rm -f conftest.i conftest.err conftest.$ac_ext |
067d23c9 KY |
4443 | if $ac_preproc_ok; then : |
4444 | ||
4445 | else | |
4446 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
4447 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d6a003a8 AS |
4448 | as_fn_error $? "C preprocessor \"$CPP\" fails sanity check |
4449 | See \`config.log' for more details" "$LINENO" 5; } | |
067d23c9 KY |
4450 | fi |
4451 | ||
4452 | ac_ext=c | |
4453 | ac_cpp='$CPP $CPPFLAGS' | |
4454 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
4455 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
4456 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
4457 | ||
4458 | ||
4459 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 | |
4460 | $as_echo_n "checking for grep that handles long lines and -e... " >&6; } | |
d6a003a8 | 4461 | if ${ac_cv_path_GREP+:} false; then : |
067d23c9 KY |
4462 | $as_echo_n "(cached) " >&6 |
4463 | else | |
4464 | if test -z "$GREP"; then | |
4465 | ac_path_GREP_found=false | |
4466 | # Loop through the user's path and test for each of PROGNAME-LIST | |
4467 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4468 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
4469 | do | |
4470 | IFS=$as_save_IFS | |
4471 | test -z "$as_dir" && as_dir=. | |
4472 | for ac_prog in grep ggrep; do | |
4473 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4474 | ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" | |
4475 | { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue | |
4476 | # Check for GNU ac_path_GREP and select it if it is found. | |
4477 | # Check for GNU $ac_path_GREP | |
4478 | case `"$ac_path_GREP" --version 2>&1` in | |
4479 | *GNU*) | |
4480 | ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; | |
4481 | *) | |
4482 | ac_count=0 | |
4483 | $as_echo_n 0123456789 >"conftest.in" | |
4484 | while : | |
4485 | do | |
4486 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
4487 | mv "conftest.tmp" "conftest.in" | |
4488 | cp "conftest.in" "conftest.nl" | |
4489 | $as_echo 'GREP' >> "conftest.nl" | |
4490 | "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
4491 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
4492 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
4493 | if test $ac_count -gt ${ac_path_GREP_max-0}; then | |
4494 | # Best one so far, save it but keep looking for a better one | |
4495 | ac_cv_path_GREP="$ac_path_GREP" | |
4496 | ac_path_GREP_max=$ac_count | |
4497 | fi | |
4498 | # 10*(2^10) chars as input seems more than enough | |
4499 | test $ac_count -gt 10 && break | |
4500 | done | |
4501 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
4502 | esac | |
4503 | ||
4504 | $ac_path_GREP_found && break 3 | |
4505 | done | |
4506 | done | |
4507 | done | |
4508 | IFS=$as_save_IFS | |
4509 | if test -z "$ac_cv_path_GREP"; then | |
d6a003a8 | 4510 | as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 |
067d23c9 KY |
4511 | fi |
4512 | else | |
4513 | ac_cv_path_GREP=$GREP | |
4514 | fi | |
4515 | ||
4516 | fi | |
4517 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 | |
4518 | $as_echo "$ac_cv_path_GREP" >&6; } | |
4519 | GREP="$ac_cv_path_GREP" | |
4520 | ||
4521 | ||
4522 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 | |
4523 | $as_echo_n "checking for egrep... " >&6; } | |
d6a003a8 | 4524 | if ${ac_cv_path_EGREP+:} false; then : |
067d23c9 KY |
4525 | $as_echo_n "(cached) " >&6 |
4526 | else | |
4527 | if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 | |
4528 | then ac_cv_path_EGREP="$GREP -E" | |
4529 | else | |
4530 | if test -z "$EGREP"; then | |
4531 | ac_path_EGREP_found=false | |
4532 | # Loop through the user's path and test for each of PROGNAME-LIST | |
4533 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4534 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
4535 | do | |
4536 | IFS=$as_save_IFS | |
4537 | test -z "$as_dir" && as_dir=. | |
4538 | for ac_prog in egrep; do | |
4539 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4540 | ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" | |
4541 | { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue | |
4542 | # Check for GNU ac_path_EGREP and select it if it is found. | |
4543 | # Check for GNU $ac_path_EGREP | |
4544 | case `"$ac_path_EGREP" --version 2>&1` in | |
4545 | *GNU*) | |
4546 | ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; | |
4547 | *) | |
4548 | ac_count=0 | |
4549 | $as_echo_n 0123456789 >"conftest.in" | |
4550 | while : | |
4551 | do | |
4552 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
4553 | mv "conftest.tmp" "conftest.in" | |
4554 | cp "conftest.in" "conftest.nl" | |
4555 | $as_echo 'EGREP' >> "conftest.nl" | |
4556 | "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
4557 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
4558 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
4559 | if test $ac_count -gt ${ac_path_EGREP_max-0}; then | |
4560 | # Best one so far, save it but keep looking for a better one | |
4561 | ac_cv_path_EGREP="$ac_path_EGREP" | |
4562 | ac_path_EGREP_max=$ac_count | |
4563 | fi | |
4564 | # 10*(2^10) chars as input seems more than enough | |
4565 | test $ac_count -gt 10 && break | |
4566 | done | |
4567 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
4568 | esac | |
4569 | ||
4570 | $ac_path_EGREP_found && break 3 | |
4571 | done | |
4572 | done | |
4573 | done | |
4574 | IFS=$as_save_IFS | |
4575 | if test -z "$ac_cv_path_EGREP"; then | |
d6a003a8 | 4576 | as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 |
067d23c9 KY |
4577 | fi |
4578 | else | |
4579 | ac_cv_path_EGREP=$EGREP | |
4580 | fi | |
4581 | ||
4582 | fi | |
4583 | fi | |
4584 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 | |
4585 | $as_echo "$ac_cv_path_EGREP" >&6; } | |
4586 | EGREP="$ac_cv_path_EGREP" | |
4587 | ||
4588 | ||
4589 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 | |
4590 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
d6a003a8 | 4591 | if ${ac_cv_header_stdc+:} false; then : |
067d23c9 KY |
4592 | $as_echo_n "(cached) " >&6 |
4593 | else | |
4594 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4595 | /* end confdefs.h. */ | |
4596 | #include <stdlib.h> | |
4597 | #include <stdarg.h> | |
4598 | #include <string.h> | |
4599 | #include <float.h> | |
4600 | ||
4601 | int | |
4602 | main () | |
4603 | { | |
4604 | ||
4605 | ; | |
4606 | return 0; | |
4607 | } | |
4608 | _ACEOF | |
4609 | if ac_fn_c_try_compile "$LINENO"; then : | |
4610 | ac_cv_header_stdc=yes | |
4611 | else | |
4612 | ac_cv_header_stdc=no | |
4613 | fi | |
4614 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4615 | ||
4616 | if test $ac_cv_header_stdc = yes; then | |
4617 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
4618 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4619 | /* end confdefs.h. */ | |
4620 | #include <string.h> | |
4621 | ||
4622 | _ACEOF | |
4623 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
4624 | $EGREP "memchr" >/dev/null 2>&1; then : | |
4625 | ||
4626 | else | |
4627 | ac_cv_header_stdc=no | |
4628 | fi | |
4629 | rm -f conftest* | |
4630 | ||
4631 | fi | |
4632 | ||
4633 | if test $ac_cv_header_stdc = yes; then | |
4634 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
4635 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4636 | /* end confdefs.h. */ | |
4637 | #include <stdlib.h> | |
4638 | ||
4639 | _ACEOF | |
4640 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
4641 | $EGREP "free" >/dev/null 2>&1; then : | |
4642 | ||
4643 | else | |
4644 | ac_cv_header_stdc=no | |
4645 | fi | |
4646 | rm -f conftest* | |
4647 | ||
4648 | fi | |
4649 | ||
4650 | if test $ac_cv_header_stdc = yes; then | |
4651 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
4652 | if test "$cross_compiling" = yes; then : | |
4653 | : | |
4654 | else | |
4655 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4656 | /* end confdefs.h. */ | |
4657 | #include <ctype.h> | |
4658 | #include <stdlib.h> | |
4659 | #if ((' ' & 0x0FF) == 0x020) | |
4660 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
4661 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
4662 | #else | |
4663 | # define ISLOWER(c) \ | |
4664 | (('a' <= (c) && (c) <= 'i') \ | |
4665 | || ('j' <= (c) && (c) <= 'r') \ | |
4666 | || ('s' <= (c) && (c) <= 'z')) | |
4667 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
4668 | #endif | |
4669 | ||
4670 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
4671 | int | |
4672 | main () | |
4673 | { | |
4674 | int i; | |
4675 | for (i = 0; i < 256; i++) | |
4676 | if (XOR (islower (i), ISLOWER (i)) | |
4677 | || toupper (i) != TOUPPER (i)) | |
4678 | return 2; | |
4679 | return 0; | |
4680 | } | |
4681 | _ACEOF | |
4682 | if ac_fn_c_try_run "$LINENO"; then : | |
4683 | ||
4684 | else | |
4685 | ac_cv_header_stdc=no | |
4686 | fi | |
4687 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
4688 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
4689 | fi | |
4690 | ||
4691 | fi | |
4692 | fi | |
4693 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 | |
4694 | $as_echo "$ac_cv_header_stdc" >&6; } | |
4695 | if test $ac_cv_header_stdc = yes; then | |
4696 | ||
4697 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h | |
4698 | ||
4699 | fi | |
4700 | ||
4701 | # On IRIX 5.3, sys/types and inttypes.h are conflicting. | |
4702 | for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ | |
4703 | inttypes.h stdint.h unistd.h | |
4704 | do : | |
4705 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
4706 | ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default | |
4707 | " | |
d6a003a8 | 4708 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : |
067d23c9 KY |
4709 | cat >>confdefs.h <<_ACEOF |
4710 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
4711 | _ACEOF | |
4712 | ||
4713 | fi | |
4714 | ||
4715 | done | |
4716 | ||
4717 | ||
4718 | ||
4719 | ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" | |
d6a003a8 | 4720 | if test "x$ac_cv_header_minix_config_h" = xyes; then : |
067d23c9 KY |
4721 | MINIX=yes |
4722 | else | |
4723 | MINIX= | |
4724 | fi | |
4725 | ||
4726 | ||
4727 | if test "$MINIX" = yes; then | |
4728 | ||
4729 | $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h | |
4730 | ||
4731 | ||
4732 | $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h | |
4733 | ||
4734 | ||
4735 | $as_echo "#define _MINIX 1" >>confdefs.h | |
4736 | ||
4737 | fi | |
4738 | ||
4739 | ||
4740 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 | |
4741 | $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } | |
d6a003a8 | 4742 | if ${ac_cv_safe_to_define___extensions__+:} false; then : |
067d23c9 KY |
4743 | $as_echo_n "(cached) " >&6 |
4744 | else | |
4745 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4746 | /* end confdefs.h. */ | |
4747 | ||
4748 | # define __EXTENSIONS__ 1 | |
4749 | $ac_includes_default | |
4750 | int | |
4751 | main () | |
4752 | { | |
4753 | ||
4754 | ; | |
4755 | return 0; | |
4756 | } | |
4757 | _ACEOF | |
4758 | if ac_fn_c_try_compile "$LINENO"; then : | |
4759 | ac_cv_safe_to_define___extensions__=yes | |
4760 | else | |
4761 | ac_cv_safe_to_define___extensions__=no | |
4762 | fi | |
4763 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4764 | fi | |
4765 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 | |
4766 | $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } | |
4767 | test $ac_cv_safe_to_define___extensions__ = yes && | |
4768 | $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h | |
4769 | ||
4770 | $as_echo "#define _ALL_SOURCE 1" >>confdefs.h | |
4771 | ||
4772 | $as_echo "#define _GNU_SOURCE 1" >>confdefs.h | |
4773 | ||
4774 | $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h | |
4775 | ||
4776 | $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h | |
4777 | ||
4778 | ||
4779 | ||
4780 | ### Use -Wno-pointer-sign if the compiler supports it | |
4781 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -Wno-pointer-sign" >&5 | |
4782 | $as_echo_n "checking whether gcc understands -Wno-pointer-sign... " >&6; } | |
4783 | SAVE_CFLAGS="$CFLAGS" | |
4784 | CFLAGS="$CFLAGS -Wno-pointer-sign" | |
4785 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4786 | /* end confdefs.h. */ | |
4787 | ||
4788 | int | |
4789 | main () | |
4790 | { | |
4791 | ||
4792 | ; | |
4793 | return 0; | |
4794 | } | |
4795 | _ACEOF | |
4796 | if ac_fn_c_try_compile "$LINENO"; then : | |
4797 | has_option=yes | |
4798 | else | |
4799 | has_option=no | |
4800 | fi | |
4801 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4802 | if test $has_option = yes; then | |
4803 | C_WARNINGS_SWITCH="-Wno-pointer-sign $C_WARNINGS_SWITCH" | |
4804 | fi | |
4805 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_option" >&5 | |
4806 | $as_echo "$has_option" >&6; } | |
4807 | CFLAGS="$SAVE_CFLAGS" | |
4808 | unset has_option | |
4809 | unset SAVE_CFLAGS | |
4810 | ||
4811 | ### Use -Wdeclaration-after-statement if the compiler supports it | |
4812 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -Wdeclaration-after-statement" >&5 | |
4813 | $as_echo_n "checking whether gcc understands -Wdeclaration-after-statement... " >&6; } | |
4814 | SAVE_CFLAGS="$CFLAGS" | |
4815 | CFLAGS="$CFLAGS -Wdeclaration-after-statement" | |
4816 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4817 | /* end confdefs.h. */ | |
4818 | ||
4819 | int | |
4820 | main () | |
4821 | { | |
4822 | ||
4823 | ; | |
4824 | return 0; | |
4825 | } | |
4826 | _ACEOF | |
4827 | if ac_fn_c_try_compile "$LINENO"; then : | |
4828 | has_option=yes | |
4829 | else | |
4830 | has_option=no | |
4831 | fi | |
4832 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4833 | if test $has_option = yes; then | |
4834 | C_WARNINGS_SWITCH="-Wdeclaration-after-statement $C_WARNINGS_SWITCH" | |
4835 | fi | |
4836 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_option" >&5 | |
4837 | $as_echo "$has_option" >&6; } | |
4838 | CFLAGS="$SAVE_CFLAGS" | |
4839 | unset has_option | |
4840 | unset SAVE_CFLAGS | |
4841 | ||
4842 | ### Use -Wold-style-definition if the compiler supports it | |
4843 | # This can be removed when conversion to standard C is finished. | |
4844 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -Wold-style-definition" >&5 | |
4845 | $as_echo_n "checking whether gcc understands -Wold-style-definition... " >&6; } | |
4846 | SAVE_CFLAGS="$CFLAGS" | |
4847 | CFLAGS="$CFLAGS -Wold-style-definition" | |
4848 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4849 | /* end confdefs.h. */ | |
4850 | ||
4851 | int | |
4852 | main () | |
4853 | { | |
4854 | ||
4855 | ; | |
4856 | return 0; | |
4857 | } | |
4858 | _ACEOF | |
4859 | if ac_fn_c_try_compile "$LINENO"; then : | |
4860 | has_option=yes | |
4861 | else | |
4862 | has_option=no | |
4863 | fi | |
4864 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4865 | if test $has_option = yes; then | |
4866 | C_WARNINGS_SWITCH="-Wold-style-definition $C_WARNINGS_SWITCH" | |
4867 | fi | |
4868 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_option" >&5 | |
4869 | $as_echo "$has_option" >&6; } | |
4870 | CFLAGS="$SAVE_CFLAGS" | |
4871 | unset has_option | |
4872 | unset SAVE_CFLAGS | |
4873 | ||
4874 | ### Use -Wimplicit-function-declaration if the compiler supports it | |
4875 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -Wimplicit-function-declaration" >&5 | |
4876 | $as_echo_n "checking whether gcc understands -Wimplicit-function-declaration... " >&6; } | |
4877 | SAVE_CFLAGS="$CFLAGS" | |
4878 | CFLAGS="$CFLAGS -Wimplicit-function-declaration" | |
4879 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4880 | /* end confdefs.h. */ | |
4881 | ||
4882 | int | |
4883 | main () | |
4884 | { | |
4885 | ||
4886 | ; | |
4887 | return 0; | |
4888 | } | |
4889 | _ACEOF | |
4890 | if ac_fn_c_try_compile "$LINENO"; then : | |
4891 | has_option=yes | |
4892 | else | |
4893 | has_option=no | |
4894 | fi | |
4895 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4896 | if test $has_option = yes; then | |
4897 | C_WARNINGS_SWITCH="-Wimplicit-function-declaration $C_WARNINGS_SWITCH" | |
4898 | fi | |
4899 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_option" >&5 | |
4900 | $as_echo "$has_option" >&6; } | |
4901 | CFLAGS="$SAVE_CFLAGS" | |
4902 | unset has_option | |
4903 | unset SAVE_CFLAGS | |
4904 | ||
4905 | ||
4906 | ||
4907 | ||
4908 | #### Some other nice autoconf tests. | |
4909 | ||
4910 | ac_ext=c | |
4911 | ac_cpp='$CPP $CPPFLAGS' | |
4912 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
4913 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
4914 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
4915 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 | |
4916 | $as_echo_n "checking how to run the C preprocessor... " >&6; } | |
4917 | # On Suns, sometimes $CPP names a directory. | |
4918 | if test -n "$CPP" && test -d "$CPP"; then | |
4919 | CPP= | |
4920 | fi | |
4921 | if test -z "$CPP"; then | |
d6a003a8 | 4922 | if ${ac_cv_prog_CPP+:} false; then : |
067d23c9 KY |
4923 | $as_echo_n "(cached) " >&6 |
4924 | else | |
4925 | # Double quotes because CPP needs to be expanded | |
4926 | for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" | |
4927 | do | |
4928 | ac_preproc_ok=false | |
4929 | for ac_c_preproc_warn_flag in '' yes | |
4930 | do | |
4931 | # Use a header file that comes with gcc, so configuring glibc | |
4932 | # with a fresh cross-compiler works. | |
4933 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
4934 | # <limits.h> exists even on freestanding compilers. | |
4935 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
4936 | # not just through cpp. "Syntax error" is here to catch this case. | |
4937 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4938 | /* end confdefs.h. */ | |
4939 | #ifdef __STDC__ | |
4940 | # include <limits.h> | |
4941 | #else | |
4942 | # include <assert.h> | |
4943 | #endif | |
4944 | Syntax error | |
4945 | _ACEOF | |
4946 | if ac_fn_c_try_cpp "$LINENO"; then : | |
4947 | ||
4948 | else | |
4949 | # Broken: fails on valid input. | |
4950 | continue | |
4951 | fi | |
d6a003a8 | 4952 | rm -f conftest.err conftest.i conftest.$ac_ext |
067d23c9 KY |
4953 | |
4954 | # OK, works on sane cases. Now check whether nonexistent headers | |
4955 | # can be detected and how. | |
4956 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4957 | /* end confdefs.h. */ | |
4958 | #include <ac_nonexistent.h> | |
4959 | _ACEOF | |
4960 | if ac_fn_c_try_cpp "$LINENO"; then : | |
4961 | # Broken: success on invalid input. | |
4962 | continue | |
4963 | else | |
4964 | # Passes both tests. | |
4965 | ac_preproc_ok=: | |
4966 | break | |
4967 | fi | |
d6a003a8 | 4968 | rm -f conftest.err conftest.i conftest.$ac_ext |
067d23c9 KY |
4969 | |
4970 | done | |
4971 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
d6a003a8 | 4972 | rm -f conftest.i conftest.err conftest.$ac_ext |
067d23c9 KY |
4973 | if $ac_preproc_ok; then : |
4974 | break | |
4975 | fi | |
4976 | ||
4977 | done | |
4978 | ac_cv_prog_CPP=$CPP | |
4979 | ||
4980 | fi | |
4981 | CPP=$ac_cv_prog_CPP | |
4982 | else | |
4983 | ac_cv_prog_CPP=$CPP | |
4984 | fi | |
4985 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 | |
4986 | $as_echo "$CPP" >&6; } | |
4987 | ac_preproc_ok=false | |
4988 | for ac_c_preproc_warn_flag in '' yes | |
4989 | do | |
4990 | # Use a header file that comes with gcc, so configuring glibc | |
4991 | # with a fresh cross-compiler works. | |
4992 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
4993 | # <limits.h> exists even on freestanding compilers. | |
4994 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
4995 | # not just through cpp. "Syntax error" is here to catch this case. | |
4996 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4997 | /* end confdefs.h. */ | |
4998 | #ifdef __STDC__ | |
4999 | # include <limits.h> | |
5000 | #else | |
5001 | # include <assert.h> | |
5002 | #endif | |
5003 | Syntax error | |
5004 | _ACEOF | |
5005 | if ac_fn_c_try_cpp "$LINENO"; then : | |
5006 | ||
5007 | else | |
5008 | # Broken: fails on valid input. | |
5009 | continue | |
5010 | fi | |
d6a003a8 | 5011 | rm -f conftest.err conftest.i conftest.$ac_ext |
067d23c9 KY |
5012 | |
5013 | # OK, works on sane cases. Now check whether nonexistent headers | |
5014 | # can be detected and how. | |
5015 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5016 | /* end confdefs.h. */ | |
5017 | #include <ac_nonexistent.h> | |
5018 | _ACEOF | |
5019 | if ac_fn_c_try_cpp "$LINENO"; then : | |
5020 | # Broken: success on invalid input. | |
5021 | continue | |
5022 | else | |
5023 | # Passes both tests. | |
5024 | ac_preproc_ok=: | |
5025 | break | |
5026 | fi | |
d6a003a8 | 5027 | rm -f conftest.err conftest.i conftest.$ac_ext |
067d23c9 KY |
5028 | |
5029 | done | |
5030 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
d6a003a8 | 5031 | rm -f conftest.i conftest.err conftest.$ac_ext |
067d23c9 KY |
5032 | if $ac_preproc_ok; then : |
5033 | ||
5034 | else | |
5035 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
5036 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d6a003a8 AS |
5037 | as_fn_error $? "C preprocessor \"$CPP\" fails sanity check |
5038 | See \`config.log' for more details" "$LINENO" 5; } | |
067d23c9 KY |
5039 | fi |
5040 | ||
5041 | ac_ext=c | |
5042 | ac_cpp='$CPP $CPPFLAGS' | |
5043 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
5044 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
5045 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
5046 | ||
5047 | # Find a good install program. We prefer a C program (faster), | |
5048 | # so one script is as good as another. But avoid the broken or | |
5049 | # incompatible versions: | |
5050 | # SysV /etc/install, /usr/sbin/install | |
5051 | # SunOS /usr/etc/install | |
5052 | # IRIX /sbin/install | |
5053 | # AIX /bin/install | |
5054 | # AmigaOS /C/install, which installs bootblocks on floppy discs | |
5055 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag | |
5056 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
5057 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
5058 | # OS/2's system install, which has a completely different semantic | |
5059 | # ./install, which can be erroneously created by make from ./install.sh. | |
5060 | # Reject install programs that cannot install multiple files. | |
5061 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 | |
5062 | $as_echo_n "checking for a BSD-compatible install... " >&6; } | |
5063 | if test -z "$INSTALL"; then | |
d6a003a8 | 5064 | if ${ac_cv_path_install+:} false; then : |
067d23c9 KY |
5065 | $as_echo_n "(cached) " >&6 |
5066 | else | |
5067 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5068 | for as_dir in $PATH | |
5069 | do | |
5070 | IFS=$as_save_IFS | |
5071 | test -z "$as_dir" && as_dir=. | |
5072 | # Account for people who put trailing slashes in PATH elements. | |
5073 | case $as_dir/ in #(( | |
5074 | ./ | .// | /[cC]/* | \ | |
5075 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ | |
5076 | ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ | |
5077 | /usr/ucb/* ) ;; | |
5078 | *) | |
5079 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
5080 | # Don't use installbsd from OSF since it installs stuff as root | |
5081 | # by default. | |
5082 | for ac_prog in ginstall scoinst install; do | |
5083 | for ac_exec_ext in '' $ac_executable_extensions; do | |
5084 | if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then | |
5085 | if test $ac_prog = install && | |
5086 | grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
5087 | # AIX install. It has an incompatible calling convention. | |
5088 | : | |
5089 | elif test $ac_prog = install && | |
5090 | grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
5091 | # program-specific install script used by HP pwplus--don't use. | |
5092 | : | |
5093 | else | |
5094 | rm -rf conftest.one conftest.two conftest.dir | |
5095 | echo one > conftest.one | |
5096 | echo two > conftest.two | |
5097 | mkdir conftest.dir | |
5098 | if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && | |
5099 | test -s conftest.one && test -s conftest.two && | |
5100 | test -s conftest.dir/conftest.one && | |
5101 | test -s conftest.dir/conftest.two | |
5102 | then | |
5103 | ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" | |
5104 | break 3 | |
5105 | fi | |
5106 | fi | |
5107 | fi | |
5108 | done | |
5109 | done | |
5110 | ;; | |
5111 | esac | |
5112 | ||
5113 | done | |
5114 | IFS=$as_save_IFS | |
5115 | ||
5116 | rm -rf conftest.one conftest.two conftest.dir | |
5117 | ||
5118 | fi | |
5119 | if test "${ac_cv_path_install+set}" = set; then | |
5120 | INSTALL=$ac_cv_path_install | |
5121 | else | |
5122 | # As a last resort, use the slow shell script. Don't cache a | |
5123 | # value for INSTALL within a source directory, because that will | |
5124 | # break other packages using the cache if that directory is | |
5125 | # removed, or if the value is a relative name. | |
5126 | INSTALL=$ac_install_sh | |
5127 | fi | |
5128 | fi | |
5129 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 | |
5130 | $as_echo "$INSTALL" >&6; } | |
5131 | ||
5132 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
5133 | # It thinks the first close brace ends the variable substitution. | |
5134 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
5135 | ||
5136 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' | |
5137 | ||
5138 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
5139 | ||
5140 | if test "x$RANLIB" = x; then | |
5141 | if test -n "$ac_tool_prefix"; then | |
5142 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
5143 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
5144 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
5145 | $as_echo_n "checking for $ac_word... " >&6; } | |
d6a003a8 | 5146 | if ${ac_cv_prog_RANLIB+:} false; then : |
067d23c9 KY |
5147 | $as_echo_n "(cached) " >&6 |
5148 | else | |
5149 | if test -n "$RANLIB"; then | |
5150 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
5151 | else | |
5152 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5153 | for as_dir in $PATH | |
5154 | do | |
5155 | IFS=$as_save_IFS | |
5156 | test -z "$as_dir" && as_dir=. | |
5157 | for ac_exec_ext in '' $ac_executable_extensions; do | |
5158 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
5159 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" | |
5160 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
5161 | break 2 | |
5162 | fi | |
5163 | done | |
5164 | done | |
5165 | IFS=$as_save_IFS | |
5166 | ||
5167 | fi | |
5168 | fi | |
5169 | RANLIB=$ac_cv_prog_RANLIB | |
5170 | if test -n "$RANLIB"; then | |
5171 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 | |
5172 | $as_echo "$RANLIB" >&6; } | |
5173 | else | |
5174 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
5175 | $as_echo "no" >&6; } | |
5176 | fi | |
5177 | ||
5178 | ||
5179 | fi | |
5180 | if test -z "$ac_cv_prog_RANLIB"; then | |
5181 | ac_ct_RANLIB=$RANLIB | |
5182 | # Extract the first word of "ranlib", so it can be a program name with args. | |
5183 | set dummy ranlib; ac_word=$2 | |
5184 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
5185 | $as_echo_n "checking for $ac_word... " >&6; } | |
d6a003a8 | 5186 | if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : |
067d23c9 KY |
5187 | $as_echo_n "(cached) " >&6 |
5188 | else | |
5189 | if test -n "$ac_ct_RANLIB"; then | |
5190 | ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. | |
5191 | else | |
5192 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5193 | for as_dir in $PATH | |
5194 | do | |
5195 | IFS=$as_save_IFS | |
5196 | test -z "$as_dir" && as_dir=. | |
5197 | for ac_exec_ext in '' $ac_executable_extensions; do | |
5198 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
5199 | ac_cv_prog_ac_ct_RANLIB="ranlib" | |
5200 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
5201 | break 2 | |
5202 | fi | |
5203 | done | |
5204 | done | |
5205 | IFS=$as_save_IFS | |
5206 | ||
5207 | fi | |
5208 | fi | |
5209 | ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB | |
5210 | if test -n "$ac_ct_RANLIB"; then | |
5211 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 | |
5212 | $as_echo "$ac_ct_RANLIB" >&6; } | |
5213 | else | |
5214 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
5215 | $as_echo "no" >&6; } | |
5216 | fi | |
5217 | ||
5218 | if test "x$ac_ct_RANLIB" = x; then | |
5219 | RANLIB=":" | |
5220 | else | |
5221 | case $cross_compiling:$ac_tool_warned in | |
5222 | yes:) | |
5223 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
5224 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
5225 | ac_tool_warned=yes ;; | |
5226 | esac | |
5227 | RANLIB=$ac_ct_RANLIB | |
5228 | fi | |
5229 | else | |
5230 | RANLIB="$ac_cv_prog_RANLIB" | |
5231 | fi | |
5232 | ||
5233 | fi | |
5234 | ||
5235 | ## Although we're running on an amd64 kernel, we're actually compiling for | |
5236 | ## the x86 architecture. The user should probably have provided an | |
5237 | ## explicit --build to `configure', but if everything else than the kernel | |
5238 | ## is running in i386 mode, we can help them out. | |
5239 | if test "$machine" = "amdx86-64"; then | |
5240 | ac_fn_c_check_decl "$LINENO" "i386" "ac_cv_have_decl_i386" "$ac_includes_default" | |
d6a003a8 | 5241 | if test "x$ac_cv_have_decl_i386" = xyes; then : |
067d23c9 KY |
5242 | |
5243 | fi | |
5244 | ||
5245 | if test "$ac_cv_have_decl_i386" = "yes"; then | |
5246 | canonical=`echo "$canonical" | sed -e 's/^amd64/i386/' -e 's/^x86_64/i386/'` | |
5247 | machine=intel386 | |
5248 | machfile="m/${machine}.h" | |
5249 | fi | |
5250 | fi | |
5251 | ||
5252 | # Extract the first word of "install-info", so it can be a program name with args. | |
5253 | set dummy install-info; ac_word=$2 | |
5254 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
5255 | $as_echo_n "checking for $ac_word... " >&6; } | |
d6a003a8 | 5256 | if ${ac_cv_path_INSTALL_INFO+:} false; then : |
067d23c9 KY |
5257 | $as_echo_n "(cached) " >&6 |
5258 | else | |
5259 | case $INSTALL_INFO in | |
5260 | [\\/]* | ?:[\\/]*) | |
5261 | ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path. | |
5262 | ;; | |
5263 | *) | |
5264 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5265 | for as_dir in $PATH | |
5266 | do | |
5267 | IFS=$as_save_IFS | |
5268 | test -z "$as_dir" && as_dir=. | |
5269 | for ac_exec_ext in '' $ac_executable_extensions; do | |
5270 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
5271 | ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext" | |
5272 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
5273 | break 2 | |
5274 | fi | |
5275 | done | |
5276 | done | |
5277 | IFS=$as_save_IFS | |
5278 | ||
5279 | ;; | |
5280 | esac | |
5281 | fi | |
5282 | INSTALL_INFO=$ac_cv_path_INSTALL_INFO | |
5283 | if test -n "$INSTALL_INFO"; then | |
5284 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_INFO" >&5 | |
5285 | $as_echo "$INSTALL_INFO" >&6; } | |
5286 | else | |
5287 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
5288 | $as_echo "no" >&6; } | |
5289 | fi | |
5290 | ||
5291 | ||
5292 | # Extract the first word of "install-info", so it can be a program name with args. | |
5293 | set dummy install-info; ac_word=$2 | |
5294 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
5295 | $as_echo_n "checking for $ac_word... " >&6; } | |
d6a003a8 | 5296 | if ${ac_cv_path_INSTALL_INFO+:} false; then : |
067d23c9 KY |
5297 | $as_echo_n "(cached) " >&6 |
5298 | else | |
5299 | case $INSTALL_INFO in | |
5300 | [\\/]* | ?:[\\/]*) | |
5301 | ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path. | |
5302 | ;; | |
5303 | *) | |
5304 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5305 | for as_dir in /usr/sbin | |
5306 | do | |
5307 | IFS=$as_save_IFS | |
5308 | test -z "$as_dir" && as_dir=. | |
5309 | for ac_exec_ext in '' $ac_executable_extensions; do | |
5310 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
5311 | ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext" | |
5312 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
5313 | break 2 | |
5314 | fi | |
5315 | done | |
5316 | done | |
5317 | IFS=$as_save_IFS | |
5318 | ||
5319 | ;; | |
5320 | esac | |
5321 | fi | |
5322 | INSTALL_INFO=$ac_cv_path_INSTALL_INFO | |
5323 | if test -n "$INSTALL_INFO"; then | |
5324 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_INFO" >&5 | |
5325 | $as_echo "$INSTALL_INFO" >&6; } | |
5326 | else | |
5327 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
5328 | $as_echo "no" >&6; } | |
5329 | fi | |
5330 | ||
5331 | ||
5332 | # Extract the first word of "install-info", so it can be a program name with args. | |
5333 | set dummy install-info; ac_word=$2 | |
5334 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
5335 | $as_echo_n "checking for $ac_word... " >&6; } | |
d6a003a8 | 5336 | if ${ac_cv_path_INSTALL_INFO+:} false; then : |
067d23c9 KY |
5337 | $as_echo_n "(cached) " >&6 |
5338 | else | |
5339 | case $INSTALL_INFO in | |
5340 | [\\/]* | ?:[\\/]*) | |
5341 | ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path. | |
5342 | ;; | |
5343 | *) | |
5344 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5345 | for as_dir in /sbin | |
5346 | do | |
5347 | IFS=$as_save_IFS | |
5348 | test -z "$as_dir" && as_dir=. | |
5349 | for ac_exec_ext in '' $ac_executable_extensions; do | |
5350 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
5351 | ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext" | |
5352 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
5353 | break 2 | |
5354 | fi | |
5355 | done | |
5356 | done | |
5357 | IFS=$as_save_IFS | |
5358 | ||
5359 | test -z "$ac_cv_path_INSTALL_INFO" && ac_cv_path_INSTALL_INFO=":" | |
5360 | ;; | |
5361 | esac | |
5362 | fi | |
5363 | INSTALL_INFO=$ac_cv_path_INSTALL_INFO | |
5364 | if test -n "$INSTALL_INFO"; then | |
5365 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_INFO" >&5 | |
5366 | $as_echo "$INSTALL_INFO" >&6; } | |
5367 | else | |
5368 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
5369 | $as_echo "no" >&6; } | |
5370 | fi | |
5371 | ||
5372 | ||
5373 | # Extract the first word of "gzip", so it can be a program name with args. | |
5374 | set dummy gzip; ac_word=$2 | |
5375 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
5376 | $as_echo_n "checking for $ac_word... " >&6; } | |
d6a003a8 | 5377 | if ${ac_cv_path_GZIP_PROG+:} false; then : |
067d23c9 KY |
5378 | $as_echo_n "(cached) " >&6 |
5379 | else | |
5380 | case $GZIP_PROG in | |
5381 | [\\/]* | ?:[\\/]*) | |
5382 | ac_cv_path_GZIP_PROG="$GZIP_PROG" # Let the user override the test with a path. | |
5383 | ;; | |
5384 | *) | |
5385 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5386 | for as_dir in $PATH | |
5387 | do | |
5388 | IFS=$as_save_IFS | |
5389 | test -z "$as_dir" && as_dir=. | |
5390 | for ac_exec_ext in '' $ac_executable_extensions; do | |
5391 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
5392 | ac_cv_path_GZIP_PROG="$as_dir/$ac_word$ac_exec_ext" | |
5393 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
5394 | break 2 | |
5395 | fi | |
5396 | done | |
5397 | done | |
5398 | IFS=$as_save_IFS | |
5399 | ||
5400 | ;; | |
5401 | esac | |
5402 | fi | |
5403 | GZIP_PROG=$ac_cv_path_GZIP_PROG | |
5404 | if test -n "$GZIP_PROG"; then | |
5405 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP_PROG" >&5 | |
5406 | $as_echo "$GZIP_PROG" >&6; } | |
5407 | else | |
5408 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
5409 | $as_echo "no" >&6; } | |
5410 | fi | |
5411 | ||
5412 | ||
5413 | ||
5414 | ||
5415 | ## Need makeinfo >= 4.6 (?) to build the manuals. | |
5416 | # Extract the first word of "makeinfo", so it can be a program name with args. | |
5417 | set dummy makeinfo; ac_word=$2 | |
5418 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
5419 | $as_echo_n "checking for $ac_word... " >&6; } | |
d6a003a8 | 5420 | if ${ac_cv_path_MAKEINFO+:} false; then : |
067d23c9 KY |
5421 | $as_echo_n "(cached) " >&6 |
5422 | else | |
5423 | case $MAKEINFO in | |
5424 | [\\/]* | ?:[\\/]*) | |
5425 | ac_cv_path_MAKEINFO="$MAKEINFO" # Let the user override the test with a path. | |
5426 | ;; | |
5427 | *) | |
5428 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5429 | for as_dir in $PATH | |
5430 | do | |
5431 | IFS=$as_save_IFS | |
5432 | test -z "$as_dir" && as_dir=. | |
5433 | for ac_exec_ext in '' $ac_executable_extensions; do | |
5434 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
5435 | ac_cv_path_MAKEINFO="$as_dir/$ac_word$ac_exec_ext" | |
5436 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
5437 | break 2 | |
5438 | fi | |
5439 | done | |
5440 | done | |
5441 | IFS=$as_save_IFS | |
5442 | ||
5443 | test -z "$ac_cv_path_MAKEINFO" && ac_cv_path_MAKEINFO="no" | |
5444 | ;; | |
5445 | esac | |
5446 | fi | |
5447 | MAKEINFO=$ac_cv_path_MAKEINFO | |
5448 | if test -n "$MAKEINFO"; then | |
5449 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKEINFO" >&5 | |
5450 | $as_echo "$MAKEINFO" >&6; } | |
5451 | else | |
5452 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
5453 | $as_echo "no" >&6; } | |
5454 | fi | |
5455 | ||
5456 | ||
5457 | if test "$MAKEINFO" != "no" && \ | |
5458 | 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 | |
5459 | MAKEINFO=no | |
5460 | fi | |
5461 | ||
5462 | ## Makeinfo is unusual. For a released Emacs, the manuals are | |
5463 | ## pre-built, and not deleted by the normal clean rules. makeinfo is | |
5464 | ## therefore in the category of "special tools" not normally required, which | |
5465 | ## configure does not have to check for (eg autoconf itself). | |
5466 | ## In a Bazaar checkout on the other hand, the manuals are not included. | |
5467 | ## So makeinfo is a requirement to build from Bazaar, and configure | |
5468 | ## should test for it as it does for any other build requirement. | |
5469 | ## We use the presence of $srcdir/info/emacs to distinguish a release, | |
5470 | ## with pre-built manuals, from a Bazaar checkout. | |
5471 | if test "$MAKEINFO" = "no"; then | |
5472 | if test "x${with_makeinfo}" = "xno"; then | |
5473 | MAKEINFO=off | |
5474 | elif test ! -e $srcdir/info/emacs; then | |
d6a003a8 | 5475 | as_fn_error $? "You do not seem to have makeinfo >= 4.6, and your |
067d23c9 KY |
5476 | source tree does not seem to have pre-built manuals in the \`info' directory. |
5477 | Either install a suitable version of makeinfo, or re-run configure | |
5478 | with the \`--without-makeinfo' option to build without the manuals. " "$LINENO" 5 | |
5479 | fi | |
5480 | fi | |
5481 | ||
5482 | ||
5483 | if test x$GCC = xyes; then | |
5484 | test "x$GCC_LINK_TEST_OPTIONS" != x && \ | |
5485 | ac_link="$ac_link $GCC_LINK_TEST_OPTIONS" | |
5486 | else | |
5487 | test "x$NON_GCC_LINK_TEST_OPTIONS" != x && \ | |
5488 | ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS" | |
5489 | fi | |
5490 | ||
5491 | ||
5492 | late_LDFLAGS=$LDFLAGS | |
5493 | if test x$GCC = xyes; then | |
5494 | LDFLAGS="$LDFLAGS -Wl,-znocombreloc" | |
5495 | else | |
5496 | LDFLAGS="$LDFLAGS -znocombreloc" | |
5497 | fi | |
5498 | ||
5499 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -znocombreloc" >&5 | |
5500 | $as_echo_n "checking for -znocombreloc... " >&6; } | |
5501 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5502 | /* end confdefs.h. */ | |
5503 | ||
5504 | int | |
5505 | main () | |
5506 | { | |
5507 | ||
5508 | ; | |
5509 | return 0; | |
5510 | } | |
5511 | _ACEOF | |
5512 | if ac_fn_c_try_link "$LINENO"; then : | |
5513 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
5514 | $as_echo "yes" >&6; } | |
5515 | else | |
5516 | LDFLAGS=$late_LDFLAGS | |
5517 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
5518 | $as_echo "no" >&6; } | |
5519 | fi | |
5520 | rm -f core conftest.err conftest.$ac_objext \ | |
5521 | conftest$ac_exeext conftest.$ac_ext | |
5522 | ||
5523 | ||
5524 | # The value of CPP is a quoted variable reference, so we need to do this | |
5525 | # to get its actual value... | |
5526 | CPP=`eval "echo $CPP"` | |
5527 | ||
5528 | ||
5529 | CANNOT_DUMP=no | |
5530 | case "$opsys" in | |
5531 | your-opsys-here) | |
5532 | CANNOT_DUMP=yes | |
5533 | ||
5534 | $as_echo "#define CANNOT_DUMP 1" >>confdefs.h | |
5535 | ||
5536 | ;; | |
5537 | esac | |
5538 | ||
5539 | ||
5540 | ||
5541 | UNEXEC_OBJ=unexelf.o | |
5542 | case "$opsys" in | |
5543 | # MSDOS uses unexcoff.o | |
5544 | # MSWindows uses unexw32.o | |
5545 | aix4-2) | |
5546 | UNEXEC_OBJ=unexaix.o | |
5547 | ;; | |
5548 | cygwin) | |
5549 | UNEXEC_OBJ=unexcw.o | |
5550 | ;; | |
5551 | darwin) | |
5552 | UNEXEC_OBJ=unexmacosx.o | |
5553 | ;; | |
5554 | hpux10-20 | hpux11) | |
5555 | UNEXEC_OBJ=unexhp9k800.o | |
5556 | ;; | |
5557 | sol2-10) | |
5558 | # Use the Solaris dldump() function, called from unexsol.c, to dump | |
5559 | # emacs, instead of the generic ELF dump code found in unexelf.c. | |
5560 | # The resulting binary has a complete symbol table, and is better | |
5561 | # for debugging and other observability tools (debuggers, pstack, etc). | |
5562 | # | |
5563 | # If you encounter a problem using dldump(), please consider sending | |
5564 | # a message to the OpenSolaris tools-linking mailing list: | |
5565 | # http://mail.opensolaris.org/mailman/listinfo/tools-linking | |
5566 | # | |
5567 | # It is likely that dldump() works with older Solaris too, but this has | |
5568 | # not been tested, so for now this change is for Solaris 10 or newer. | |
5569 | UNEXEC_OBJ=unexsol.o | |
5570 | ;; | |
5571 | esac | |
5572 | ||
5573 | LD_SWITCH_SYSTEM= | |
5574 | case "$opsys" in | |
5575 | freebsd) | |
5576 | ## Let `ld' find image libs and similar things in /usr/local/lib. | |
5577 | ## The system compiler, GCC, has apparently been modified to not | |
5578 | ## look there, contrary to what a stock GCC would do. | |
5579 | LD_SWITCH_SYSTEM=-L/usr/local/lib | |
5580 | ;; | |
5581 | ||
5582 | gnu-linux) | |
5583 | ## cpp test was "ifdef __mips__", but presumably this is equivalent... | |
d6a003a8 | 5584 | case $host_cpu in mips*) LD_SWITCH_SYSTEM="-G 0";; esac |
067d23c9 KY |
5585 | ;; |
5586 | ||
5587 | netbsd) | |
5588 | LD_SWITCH_SYSTEM="-Wl,-rpath,/usr/pkg/lib -L/usr/pkg/lib -Wl,-rpath,/usr/local/lib -L/usr/local/lib" | |
5589 | ;; | |
5590 | ||
5591 | openbsd) | |
5592 | ## Han Boetes <han@mijncomputer.nl> says this is necessary, | |
5593 | ## otherwise Emacs dumps core on elf systems. | |
5594 | LD_SWITCH_SYSTEM="-Z" | |
5595 | ;; | |
5596 | esac | |
5597 | ||
5598 | ||
5599 | ac_link="$ac_link $LD_SWITCH_SYSTEM" | |
5600 | ||
5601 | ## This setting of LD_SWITCH_SYSTEM references LD_SWITCH_X_SITE_AUX, | |
5602 | ## which has not been defined yet. When this was handled with cpp, | |
5603 | ## it was expanded to null when configure sourced the s/*.h file. | |
5604 | ## Thus LD_SWITCH_SYSTEM had different values in configure and the Makefiles. | |
5605 | ## FIXME it would be cleaner to put this in LD_SWITCH_SYSTEM_TEMACS | |
5606 | ## (or somesuch), but because it is supposed to go at the _front_ | |
5607 | ## of LD_SWITCH_SYSTEM, we cannot do that in exactly the same way. | |
5608 | ## Compare with the gnu-linux case below, which added to the end | |
5609 | ## of LD_SWITCH_SYSTEM, and so can instead go at the front of | |
5610 | ## LD_SWITCH_SYSTEM_TEMACS. | |
5611 | case "$opsys" in | |
5612 | netbsd|openbsd) | |
5613 | ## _AUX_RPATH is like _AUX, but uses -rpath instead of -R. | |
5614 | LD_SWITCH_SYSTEM="\$(LD_SWITCH_X_SITE_AUX_RPATH) $LD_SWITCH_SYSTEM" ;; | |
5615 | esac | |
5616 | ||
5617 | ||
5618 | C_SWITCH_MACHINE= | |
5619 | if test "$machine" = "alpha"; then | |
5620 | ac_fn_c_check_decl "$LINENO" "__ELF__" "ac_cv_have_decl___ELF__" "$ac_includes_default" | |
d6a003a8 | 5621 | if test "x$ac_cv_have_decl___ELF__" = xyes; then : |
067d23c9 KY |
5622 | |
5623 | fi | |
5624 | ||
5625 | if test "$ac_cv_have_decl___ELF__" = "yes"; then | |
5626 | ## With ELF, make sure that all common symbols get allocated to in the | |
5627 | ## data section. Otherwise, the dump of temacs may miss variables in | |
5628 | ## the shared library that have been initialized. For example, with | |
5629 | ## GNU libc, __malloc_initialized would normally be resolved to the | |
5630 | ## shared library's .bss section, which is fatal. | |
5631 | if test "x$GCC" = "xyes"; then | |
5632 | C_SWITCH_MACHINE="-fno-common" | |
5633 | else | |
d6a003a8 | 5634 | as_fn_error $? "What gives? Fix me if DEC Unix supports ELF now." "$LINENO" 5 |
067d23c9 KY |
5635 | fi |
5636 | else | |
5637 | UNEXEC_OBJ=unexalpha.o | |
5638 | fi | |
5639 | fi | |
5640 | ||
5641 | ||
5642 | ||
5643 | ||
5644 | C_SWITCH_SYSTEM= | |
5645 | ## Some programs in src produce warnings saying certain subprograms | |
5646 | ## are too complex and need a MAXMEM value greater than 2000 for | |
5647 | ## additional optimization. --nils@exp-math.uni-essen.de | |
5648 | test "$opsys" = "aix4.2" && test "x$GCC" != "xyes" && \ | |
5649 | C_SWITCH_SYSTEM="-ma -qmaxmem=4000" | |
5650 | ## gnu-linux might need -D_BSD_SOURCE on old libc5 systems. | |
5651 | ## It is redundant in glibc2, since we define _GNU_SOURCE. | |
5652 | ||
5653 | ||
5654 | ||
5655 | LIBS_SYSTEM= | |
5656 | case "$opsys" in | |
5657 | ## IBM's X11R5 uses -lIM and -liconv in AIX 3.2.2. | |
5658 | aix4-2) LIBS_SYSTEM="-lrts -lIM -liconv" ;; | |
5659 | ||
5660 | freebsd) LIBS_SYSTEM="-lutil" ;; | |
5661 | ||
5662 | hpux*) LIBS_SYSTEM="-l:libdld.sl" ;; | |
5663 | ||
5664 | sol2*) LIBS_SYSTEM="-lsocket -lnsl -lkstat" ;; | |
5665 | ||
5666 | ## Motif needs -lgen. | |
5667 | unixware) LIBS_SYSTEM="-lsocket -lnsl -lelf -lgen" ;; | |
5668 | esac | |
5669 | ||
5670 | ||
5671 | ||
5672 | ### Make sure subsequent tests use flags consistent with the build flags. | |
5673 | ||
5674 | if test x"${OVERRIDE_CPPFLAGS}" != x; then | |
5675 | CPPFLAGS="${OVERRIDE_CPPFLAGS}" | |
5676 | else | |
5677 | CPPFLAGS="$C_SWITCH_SYSTEM $C_SWITCH_MACHINE $CPPFLAGS" | |
5678 | fi | |
5679 | ||
5680 | ||
5681 | ||
5682 | # Check whether --enable-largefile was given. | |
5683 | if test "${enable_largefile+set}" = set; then : | |
5684 | enableval=$enable_largefile; | |
5685 | fi | |
5686 | ||
5687 | if test "$enable_largefile" != no; then | |
5688 | ||
5689 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 | |
5690 | $as_echo_n "checking for special C compiler options needed for large files... " >&6; } | |
d6a003a8 | 5691 | if ${ac_cv_sys_largefile_CC+:} false; then : |
067d23c9 KY |
5692 | $as_echo_n "(cached) " >&6 |
5693 | else | |
5694 | ac_cv_sys_largefile_CC=no | |
5695 | if test "$GCC" != yes; then | |
5696 | ac_save_CC=$CC | |
5697 | while :; do | |
5698 | # IRIX 6.2 and later do not support large files by default, | |
5699 | # so use the C compiler's -n32 option if that helps. | |
5700 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5701 | /* end confdefs.h. */ | |
5702 | #include <sys/types.h> | |
5703 | /* Check that off_t can represent 2**63 - 1 correctly. | |
5704 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
5705 | since some C++ compilers masquerading as C compilers | |
5706 | incorrectly reject 9223372036854775807. */ | |
5707 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
5708 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
5709 | && LARGE_OFF_T % 2147483647 == 1) | |
5710 | ? 1 : -1]; | |
5711 | int | |
5712 | main () | |
5713 | { | |
5714 | ||
5715 | ; | |
5716 | return 0; | |
5717 | } | |
5718 | _ACEOF | |
5719 | if ac_fn_c_try_compile "$LINENO"; then : | |
5720 | break | |
5721 | fi | |
5722 | rm -f core conftest.err conftest.$ac_objext | |
5723 | CC="$CC -n32" | |
5724 | if ac_fn_c_try_compile "$LINENO"; then : | |
5725 | ac_cv_sys_largefile_CC=' -n32'; break | |
5726 | fi | |
5727 | rm -f core conftest.err conftest.$ac_objext | |
5728 | break | |
5729 | done | |
5730 | CC=$ac_save_CC | |
5731 | rm -f conftest.$ac_ext | |
5732 | fi | |
5733 | fi | |
5734 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 | |
5735 | $as_echo "$ac_cv_sys_largefile_CC" >&6; } | |
5736 | if test "$ac_cv_sys_largefile_CC" != no; then | |
5737 | CC=$CC$ac_cv_sys_largefile_CC | |
5738 | fi | |
5739 | ||
5740 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 | |
5741 | $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } | |
d6a003a8 | 5742 | if ${ac_cv_sys_file_offset_bits+:} false; then : |
067d23c9 KY |
5743 | $as_echo_n "(cached) " >&6 |
5744 | else | |
5745 | while :; do | |
5746 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5747 | /* end confdefs.h. */ | |
5748 | #include <sys/types.h> | |
5749 | /* Check that off_t can represent 2**63 - 1 correctly. | |
5750 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
5751 | since some C++ compilers masquerading as C compilers | |
5752 | incorrectly reject 9223372036854775807. */ | |
5753 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
5754 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
5755 | && LARGE_OFF_T % 2147483647 == 1) | |
5756 | ? 1 : -1]; | |
5757 | int | |
5758 | main () | |
5759 | { | |
5760 | ||
5761 | ; | |
5762 | return 0; | |
5763 | } | |
5764 | _ACEOF | |
5765 | if ac_fn_c_try_compile "$LINENO"; then : | |
5766 | ac_cv_sys_file_offset_bits=no; break | |
5767 | fi | |
5768 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5769 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5770 | /* end confdefs.h. */ | |
5771 | #define _FILE_OFFSET_BITS 64 | |
5772 | #include <sys/types.h> | |
5773 | /* Check that off_t can represent 2**63 - 1 correctly. | |
5774 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
5775 | since some C++ compilers masquerading as C compilers | |
5776 | incorrectly reject 9223372036854775807. */ | |
5777 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
5778 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
5779 | && LARGE_OFF_T % 2147483647 == 1) | |
5780 | ? 1 : -1]; | |
5781 | int | |
5782 | main () | |
5783 | { | |
5784 | ||
5785 | ; | |
5786 | return 0; | |
5787 | } | |
5788 | _ACEOF | |
5789 | if ac_fn_c_try_compile "$LINENO"; then : | |
5790 | ac_cv_sys_file_offset_bits=64; break | |
5791 | fi | |
5792 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5793 | ac_cv_sys_file_offset_bits=unknown | |
5794 | break | |
5795 | done | |
5796 | fi | |
5797 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 | |
5798 | $as_echo "$ac_cv_sys_file_offset_bits" >&6; } | |
5799 | case $ac_cv_sys_file_offset_bits in #( | |
5800 | no | unknown) ;; | |
5801 | *) | |
5802 | cat >>confdefs.h <<_ACEOF | |
5803 | #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits | |
5804 | _ACEOF | |
5805 | ;; | |
5806 | esac | |
5807 | rm -rf conftest* | |
5808 | if test $ac_cv_sys_file_offset_bits = unknown; then | |
5809 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 | |
5810 | $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } | |
d6a003a8 | 5811 | if ${ac_cv_sys_large_files+:} false; then : |
067d23c9 KY |
5812 | $as_echo_n "(cached) " >&6 |
5813 | else | |
5814 | while :; do | |
5815 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5816 | /* end confdefs.h. */ | |
5817 | #include <sys/types.h> | |
5818 | /* Check that off_t can represent 2**63 - 1 correctly. | |
5819 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
5820 | since some C++ compilers masquerading as C compilers | |
5821 | incorrectly reject 9223372036854775807. */ | |
5822 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
5823 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
5824 | && LARGE_OFF_T % 2147483647 == 1) | |
5825 | ? 1 : -1]; | |
5826 | int | |
5827 | main () | |
5828 | { | |
5829 | ||
5830 | ; | |
5831 | return 0; | |
5832 | } | |
5833 | _ACEOF | |
5834 | if ac_fn_c_try_compile "$LINENO"; then : | |
5835 | ac_cv_sys_large_files=no; break | |
5836 | fi | |
5837 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5838 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5839 | /* end confdefs.h. */ | |
5840 | #define _LARGE_FILES 1 | |
5841 | #include <sys/types.h> | |
5842 | /* Check that off_t can represent 2**63 - 1 correctly. | |
5843 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
5844 | since some C++ compilers masquerading as C compilers | |
5845 | incorrectly reject 9223372036854775807. */ | |
5846 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
5847 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
5848 | && LARGE_OFF_T % 2147483647 == 1) | |
5849 | ? 1 : -1]; | |
5850 | int | |
5851 | main () | |
5852 | { | |
5853 | ||
5854 | ; | |
5855 | return 0; | |
5856 | } | |
5857 | _ACEOF | |
5858 | if ac_fn_c_try_compile "$LINENO"; then : | |
5859 | ac_cv_sys_large_files=1; break | |
5860 | fi | |
5861 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5862 | ac_cv_sys_large_files=unknown | |
5863 | break | |
5864 | done | |
5865 | fi | |
5866 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 | |
5867 | $as_echo "$ac_cv_sys_large_files" >&6; } | |
5868 | case $ac_cv_sys_large_files in #( | |
5869 | no | unknown) ;; | |
5870 | *) | |
5871 | cat >>confdefs.h <<_ACEOF | |
5872 | #define _LARGE_FILES $ac_cv_sys_large_files | |
5873 | _ACEOF | |
5874 | ;; | |
5875 | esac | |
5876 | rm -rf conftest* | |
5877 | fi | |
5878 | fi | |
5879 | ||
5880 | ||
5881 | ||
5882 | ## If user specified a crt-dir, use that unconditionally. | |
5883 | if test "X$CRT_DIR" = "X"; then | |
5884 | ||
5885 | case "$canonical" in | |
5886 | x86_64-*-linux-gnu* | s390x-*-linux-gnu*) | |
5887 | ## On x86-64 and s390x GNU/Linux distributions, the standard library | |
5888 | ## can be in a variety of places. We only try /usr/lib64 and /usr/lib. | |
5889 | ## For anything else (eg /usr/lib32), it is up the user to specify | |
5890 | ## the location (bug#5655). | |
5891 | ## Test for crtn.o, not just the directory, because sometimes the | |
5892 | ## directory exists but does not have the relevant files (bug#1287). | |
5893 | ## FIXME better to test for binary compatibility somehow. | |
5894 | test -e /usr/lib64/crtn.o && CRT_DIR=/usr/lib64 | |
5895 | ;; | |
5896 | ||
5897 | powerpc64-*-linux-gnu* | sparc64-*-linux-gnu*) CRT_DIR=/usr/lib64 ;; | |
5898 | esac | |
5899 | ||
5900 | case "$opsys" in | |
5901 | hpux10-20) CRT_DIR=/lib ;; | |
5902 | esac | |
5903 | ||
5904 | ## Default is /usr/lib. | |
5905 | test "X$CRT_DIR" = "X" && CRT_DIR=/usr/lib | |
5906 | ||
5907 | else | |
5908 | ||
5909 | ## Some platforms don't use any of these files, so it is not | |
5910 | ## appropriate to put this test outside the if block. | |
5911 | test -e $CRT_DIR/crtn.o || test -e $CRT_DIR/crt0.o || \ | |
d6a003a8 | 5912 | as_fn_error $? "crt*.o not found in specified location." "$LINENO" 5 |
067d23c9 KY |
5913 | |
5914 | fi | |
5915 | ||
5916 | ||
5917 | ||
5918 | LIB_MATH=-lm | |
5919 | LIB_STANDARD= | |
5920 | START_FILES= | |
5921 | ||
5922 | case $opsys in | |
5923 | cygwin ) | |
5924 | LIB_MATH= | |
5925 | START_FILES='pre-crt0.o' | |
5926 | ;; | |
5927 | darwin ) | |
5928 | ## Adding -lm confuses the dynamic linker, so omit it. | |
5929 | LIB_MATH= | |
5930 | START_FILES='pre-crt0.o' | |
5931 | ;; | |
5932 | freebsd ) | |
5933 | LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o $(CRT_DIR)/crtn.o' | |
5934 | START_FILES='pre-crt0.o $(CRT_DIR)/crt1.o $(CRT_DIR)/crti.o $(CRT_DIR)/crtbegin.o' | |
5935 | ;; | |
5936 | gnu-linux | gnu-kfreebsd ) | |
5937 | LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtn.o' | |
5938 | START_FILES='pre-crt0.o $(CRT_DIR)/crt1.o $(CRT_DIR)/crti.o' | |
5939 | ;; | |
5940 | hpux10-20 | hpux11 ) | |
5941 | LIB_STANDARD=-lc | |
5942 | START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o' | |
5943 | ;; | |
5944 | netbsd | openbsd ) | |
5945 | if test -f $CRT_DIR/crti.o; then | |
5946 | LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o $(CRT_DIR)/crtn.o' | |
5947 | START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o $(CRT_DIR)/crti.o $(CRT_DIR)/crtbegin.o' | |
5948 | else | |
5949 | LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o' | |
5950 | START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o $(CRT_DIR)/crtbegin.o' | |
5951 | fi | |
5952 | ;; | |
5953 | esac | |
5954 | ||
5955 | ||
5956 | ||
5957 | ||
5958 | ||
5959 | ||
5960 | ||
5961 | if test "${with_sound}" != "no"; then | |
5962 | # Sound support for GNU/Linux and the free BSDs. | |
5963 | for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h | |
5964 | do : | |
5965 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
5966 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
d6a003a8 | 5967 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : |
067d23c9 KY |
5968 | cat >>confdefs.h <<_ACEOF |
5969 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
5970 | _ACEOF | |
5971 | have_sound_header=yes | |
5972 | fi | |
5973 | ||
5974 | done | |
5975 | ||
5976 | # Emulation library used on NetBSD. | |
5977 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _oss_ioctl in -lossaudio" >&5 | |
5978 | $as_echo_n "checking for _oss_ioctl in -lossaudio... " >&6; } | |
d6a003a8 | 5979 | if ${ac_cv_lib_ossaudio__oss_ioctl+:} false; then : |
067d23c9 KY |
5980 | $as_echo_n "(cached) " >&6 |
5981 | else | |
5982 | ac_check_lib_save_LIBS=$LIBS | |
5983 | LIBS="-lossaudio $LIBS" | |
5984 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5985 | /* end confdefs.h. */ | |
5986 | ||
5987 | /* Override any GCC internal prototype to avoid an error. | |
5988 | Use char because int might match the return type of a GCC | |
5989 | builtin and then its argument prototype would still apply. */ | |
5990 | #ifdef __cplusplus | |
5991 | extern "C" | |
5992 | #endif | |
5993 | char _oss_ioctl (); | |
5994 | int | |
5995 | main () | |
5996 | { | |
5997 | return _oss_ioctl (); | |
5998 | ; | |
5999 | return 0; | |
6000 | } | |
6001 | _ACEOF | |
6002 | if ac_fn_c_try_link "$LINENO"; then : | |
6003 | ac_cv_lib_ossaudio__oss_ioctl=yes | |
6004 | else | |
6005 | ac_cv_lib_ossaudio__oss_ioctl=no | |
6006 | fi | |
6007 | rm -f core conftest.err conftest.$ac_objext \ | |
6008 | conftest$ac_exeext conftest.$ac_ext | |
6009 | LIBS=$ac_check_lib_save_LIBS | |
6010 | fi | |
6011 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5 | |
6012 | $as_echo "$ac_cv_lib_ossaudio__oss_ioctl" >&6; } | |
d6a003a8 | 6013 | if test "x$ac_cv_lib_ossaudio__oss_ioctl" = xyes; then : |
067d23c9 KY |
6014 | LIBSOUND=-lossaudio |
6015 | else | |
6016 | LIBSOUND= | |
6017 | fi | |
6018 | ||
6019 | ||
6020 | ||
6021 | ALSA_REQUIRED=1.0.0 | |
6022 | ALSA_MODULES="alsa >= $ALSA_REQUIRED" | |
6023 | ||
6024 | succeeded=no | |
6025 | ||
6026 | # Extract the first word of "pkg-config", so it can be a program name with args. | |
6027 | set dummy pkg-config; ac_word=$2 | |
6028 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
6029 | $as_echo_n "checking for $ac_word... " >&6; } | |
d6a003a8 | 6030 | if ${ac_cv_path_PKG_CONFIG+:} false; then : |
067d23c9 KY |
6031 | $as_echo_n "(cached) " >&6 |
6032 | else | |
6033 | case $PKG_CONFIG in | |
6034 | [\\/]* | ?:[\\/]*) | |
6035 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
6036 | ;; | |
6037 | *) | |
6038 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6039 | for as_dir in $PATH | |
6040 | do | |
6041 | IFS=$as_save_IFS | |
6042 | test -z "$as_dir" && as_dir=. | |
6043 | for ac_exec_ext in '' $ac_executable_extensions; do | |
6044 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
6045 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
6046 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
6047 | break 2 | |
6048 | fi | |
6049 | done | |
6050 | done | |
6051 | IFS=$as_save_IFS | |
6052 | ||
6053 | test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" | |
6054 | ;; | |
6055 | esac | |
6056 | fi | |
6057 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG | |
6058 | if test -n "$PKG_CONFIG"; then | |
6059 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
6060 | $as_echo "$PKG_CONFIG" >&6; } | |
6061 | else | |
6062 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
6063 | $as_echo "no" >&6; } | |
6064 | fi | |
6065 | ||
6066 | ||
6067 | ||
6068 | if test "$PKG_CONFIG" = "no" ; then | |
6069 | HAVE_ALSA=no | |
6070 | else | |
6071 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
6072 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
6073 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ALSA_MODULES" >&5 | |
6074 | $as_echo_n "checking for $ALSA_MODULES... " >&6; } | |
6075 | ||
6076 | if $PKG_CONFIG --exists "$ALSA_MODULES" 2>&5; then | |
6077 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
6078 | $as_echo "yes" >&6; } | |
6079 | succeeded=yes | |
6080 | ||
6081 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking ALSA_CFLAGS" >&5 | |
6082 | $as_echo_n "checking ALSA_CFLAGS... " >&6; } | |
6083 | ALSA_CFLAGS=`$PKG_CONFIG --cflags "$ALSA_MODULES"|sed -e 's,///*,/,g'` | |
6084 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ALSA_CFLAGS" >&5 | |
6085 | $as_echo "$ALSA_CFLAGS" >&6; } | |
6086 | ||
6087 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking ALSA_LIBS" >&5 | |
6088 | $as_echo_n "checking ALSA_LIBS... " >&6; } | |
6089 | ALSA_LIBS=`$PKG_CONFIG --libs "$ALSA_MODULES"|sed -e 's,///*,/,g'` | |
6090 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ALSA_LIBS" >&5 | |
6091 | $as_echo "$ALSA_LIBS" >&6; } | |
6092 | else | |
6093 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
6094 | $as_echo "no" >&6; } | |
6095 | ALSA_CFLAGS="" | |
6096 | ALSA_LIBS="" | |
6097 | ## If we have a custom action on failure, don't print errors, but | |
6098 | ## do set a variable so people can do so. | |
6099 | ALSA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$ALSA_MODULES"` | |
6100 | ||
6101 | fi | |
6102 | ||
6103 | ||
6104 | ||
6105 | else | |
6106 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
6107 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
6108 | fi | |
6109 | fi | |
6110 | ||
6111 | if test $succeeded = yes; then | |
6112 | HAVE_ALSA=yes | |
6113 | else | |
6114 | HAVE_ALSA=no | |
6115 | fi | |
6116 | ||
6117 | if test $HAVE_ALSA = yes; then | |
6118 | SAVE_CFLAGS="$CFLAGS" | |
6119 | SAVE_LDFLAGS="$LDFLAGS" | |
6120 | CFLAGS="$ALSA_CFLAGS $CFLAGS" | |
6121 | LDFLAGS="$ALSA_LIBS $LDFLAGS" | |
6122 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6123 | /* end confdefs.h. */ | |
6124 | #include <asoundlib.h> | |
6125 | int | |
6126 | main () | |
6127 | { | |
6128 | snd_lib_error_set_handler (0); | |
6129 | ; | |
6130 | return 0; | |
6131 | } | |
6132 | _ACEOF | |
6133 | if ac_fn_c_try_compile "$LINENO"; then : | |
6134 | emacs_alsa_normal=yes | |
6135 | else | |
6136 | emacs_alsa_normal=no | |
6137 | fi | |
6138 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
6139 | if test "$emacs_alsa_normal" != yes; then | |
6140 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6141 | /* end confdefs.h. */ | |
6142 | #include <alsa/asoundlib.h> | |
6143 | int | |
6144 | main () | |
6145 | { | |
6146 | snd_lib_error_set_handler (0); | |
6147 | ; | |
6148 | return 0; | |
6149 | } | |
6150 | _ACEOF | |
6151 | if ac_fn_c_try_compile "$LINENO"; then : | |
6152 | emacs_alsa_subdir=yes | |
6153 | else | |
6154 | emacs_alsa_subdir=no | |
6155 | fi | |
6156 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
6157 | if test "$emacs_alsa_subdir" != yes; then | |
d6a003a8 | 6158 | as_fn_error $? "pkg-config found alsa, but it does not compile. See config.log for error messages." "$LINENO" 5 |
067d23c9 KY |
6159 | fi |
6160 | ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE" | |
6161 | fi | |
6162 | ||
6163 | CFLAGS="$SAVE_CFLAGS" | |
6164 | LDFLAGS="$SAVE_LDFLAGS" | |
6165 | LIBSOUND="$LIBSOUND $ALSA_LIBS" | |
6166 | CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS" | |
6167 | ||
6168 | $as_echo "#define HAVE_ALSA 1" >>confdefs.h | |
6169 | ||
6170 | fi | |
6171 | ||
6172 | if test x$have_sound_header = xyes || test $HAVE_ALSA = yes; then | |
6173 | case "$opsys" in | |
6174 | gnu-linux|freebsd|netbsd) | |
6175 | ||
6176 | $as_echo "#define HAVE_SOUND 1" >>confdefs.h | |
6177 | ||
6178 | ;; | |
6179 | esac | |
6180 | fi | |
6181 | ||
6182 | ||
6183 | fi | |
6184 | ||
6185 | for ac_header in sys/select.h sys/time.h unistd.h utime.h \ | |
6186 | linux/version.h sys/systeminfo.h limits.h \ | |
6187 | stdio_ext.h fcntl.h coff.h pty.h sys/mman.h \ | |
6188 | sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h \ | |
6189 | sys/utsname.h pwd.h utmp.h dirent.h util.h | |
6190 | do : | |
6191 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
6192 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
d6a003a8 | 6193 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : |
067d23c9 KY |
6194 | cat >>confdefs.h <<_ACEOF |
6195 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
6196 | _ACEOF | |
6197 | ||
6198 | fi | |
6199 | ||
6200 | done | |
6201 | ||
6202 | ||
6203 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if personality LINUX32 can be set" >&5 | |
6204 | $as_echo_n "checking if personality LINUX32 can be set... " >&6; } | |
6205 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6206 | /* end confdefs.h. */ | |
6207 | #include <sys/personality.h> | |
6208 | int | |
6209 | main () | |
6210 | { | |
6211 | personality (PER_LINUX32) | |
6212 | ; | |
6213 | return 0; | |
6214 | } | |
6215 | _ACEOF | |
6216 | if ac_fn_c_try_compile "$LINENO"; then : | |
6217 | emacs_cv_personality_linux32=yes | |
6218 | else | |
6219 | emacs_cv_personality_linux32=no | |
6220 | fi | |
6221 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
6222 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_personality_linux32" >&5 | |
6223 | $as_echo "$emacs_cv_personality_linux32" >&6; } | |
6224 | ||
6225 | if test $emacs_cv_personality_linux32 = yes; then | |
6226 | ||
6227 | $as_echo "#define HAVE_PERSONALITY_LINUX32 1" >>confdefs.h | |
6228 | ||
6229 | fi | |
6230 | ||
6231 | for ac_header in term.h | |
6232 | do : | |
6233 | ac_fn_c_check_header_preproc "$LINENO" "term.h" "ac_cv_header_term_h" | |
d6a003a8 | 6234 | if test "x$ac_cv_header_term_h" = xyes; then : |
067d23c9 KY |
6235 | cat >>confdefs.h <<_ACEOF |
6236 | #define HAVE_TERM_H 1 | |
6237 | _ACEOF | |
6238 | ||
6239 | fi | |
6240 | ||
6241 | done | |
6242 | ||
6243 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 | |
6244 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
d6a003a8 | 6245 | if ${ac_cv_header_stdc+:} false; then : |
067d23c9 KY |
6246 | $as_echo_n "(cached) " >&6 |
6247 | else | |
6248 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6249 | /* end confdefs.h. */ | |
6250 | #include <stdlib.h> | |
6251 | #include <stdarg.h> | |
6252 | #include <string.h> | |
6253 | #include <float.h> | |
6254 | ||
6255 | int | |
6256 | main () | |
6257 | { | |
6258 | ||
6259 | ; | |
6260 | return 0; | |
6261 | } | |
6262 | _ACEOF | |
6263 | if ac_fn_c_try_compile "$LINENO"; then : | |
6264 | ac_cv_header_stdc=yes | |
6265 | else | |
6266 | ac_cv_header_stdc=no | |
6267 | fi | |
6268 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
6269 | ||
6270 | if test $ac_cv_header_stdc = yes; then | |
6271 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
6272 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6273 | /* end confdefs.h. */ | |
6274 | #include <string.h> | |
6275 | ||
6276 | _ACEOF | |
6277 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
6278 | $EGREP "memchr" >/dev/null 2>&1; then : | |
6279 | ||
6280 | else | |
6281 | ac_cv_header_stdc=no | |
6282 | fi | |
6283 | rm -f conftest* | |
6284 | ||
6285 | fi | |
6286 | ||
6287 | if test $ac_cv_header_stdc = yes; then | |
6288 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
6289 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6290 | /* end confdefs.h. */ | |
6291 | #include <stdlib.h> | |
6292 | ||
6293 | _ACEOF | |
6294 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
6295 | $EGREP "free" >/dev/null 2>&1; then : | |
6296 | ||
6297 | else | |
6298 | ac_cv_header_stdc=no | |
6299 | fi | |
6300 | rm -f conftest* | |
6301 | ||
6302 | fi | |
6303 | ||
6304 | if test $ac_cv_header_stdc = yes; then | |
6305 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
6306 | if test "$cross_compiling" = yes; then : | |
6307 | : | |
6308 | else | |
6309 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6310 | /* end confdefs.h. */ | |
6311 | #include <ctype.h> | |
6312 | #include <stdlib.h> | |
6313 | #if ((' ' & 0x0FF) == 0x020) | |
6314 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
6315 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
6316 | #else | |
6317 | # define ISLOWER(c) \ | |
6318 | (('a' <= (c) && (c) <= 'i') \ | |
6319 | || ('j' <= (c) && (c) <= 'r') \ | |
6320 | || ('s' <= (c) && (c) <= 'z')) | |
6321 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
6322 | #endif | |
6323 | ||
6324 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
6325 | int | |
6326 | main () | |
6327 | { | |
6328 | int i; | |
6329 | for (i = 0; i < 256; i++) | |
6330 | if (XOR (islower (i), ISLOWER (i)) | |
6331 | || toupper (i) != TOUPPER (i)) | |
6332 | return 2; | |
6333 | return 0; | |
6334 | } | |
6335 | _ACEOF | |
6336 | if ac_fn_c_try_run "$LINENO"; then : | |
6337 | ||
6338 | else | |
6339 | ac_cv_header_stdc=no | |
6340 | fi | |
6341 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
6342 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
6343 | fi | |
6344 | ||
6345 | fi | |
6346 | fi | |
6347 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 | |
6348 | $as_echo "$ac_cv_header_stdc" >&6; } | |
6349 | if test $ac_cv_header_stdc = yes; then | |
6350 | ||
6351 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h | |
6352 | ||
6353 | fi | |
6354 | ||
6355 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 | |
6356 | $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } | |
d6a003a8 | 6357 | if ${ac_cv_header_time+:} false; then : |
067d23c9 KY |
6358 | $as_echo_n "(cached) " >&6 |
6359 | else | |
6360 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6361 | /* end confdefs.h. */ | |
6362 | #include <sys/types.h> | |
6363 | #include <sys/time.h> | |
6364 | #include <time.h> | |
6365 | ||
6366 | int | |
6367 | main () | |
6368 | { | |
6369 | if ((struct tm *) 0) | |
6370 | return 0; | |
6371 | ; | |
6372 | return 0; | |
6373 | } | |
6374 | _ACEOF | |
6375 | if ac_fn_c_try_compile "$LINENO"; then : | |
6376 | ac_cv_header_time=yes | |
6377 | else | |
6378 | ac_cv_header_time=no | |
6379 | fi | |
6380 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
6381 | fi | |
6382 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 | |
6383 | $as_echo "$ac_cv_header_time" >&6; } | |
6384 | if test $ac_cv_header_time = yes; then | |
6385 | ||
6386 | $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h | |
6387 | ||
6388 | fi | |
6389 | ||
6390 | ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "$ac_includes_default" | |
d6a003a8 | 6391 | if test "x$ac_cv_have_decl_sys_siglist" = xyes; then : |
067d23c9 KY |
6392 | ac_have_decl=1 |
6393 | else | |
6394 | ac_have_decl=0 | |
6395 | fi | |
6396 | ||
6397 | cat >>confdefs.h <<_ACEOF | |
6398 | #define HAVE_DECL_SYS_SIGLIST $ac_have_decl | |
6399 | _ACEOF | |
6400 | ||
6401 | if test $ac_cv_have_decl_sys_siglist != yes; then | |
6402 | # For Tru64, at least: | |
6403 | ac_fn_c_check_decl "$LINENO" "__sys_siglist" "ac_cv_have_decl___sys_siglist" "$ac_includes_default" | |
d6a003a8 | 6404 | if test "x$ac_cv_have_decl___sys_siglist" = xyes; then : |
067d23c9 KY |
6405 | ac_have_decl=1 |
6406 | else | |
6407 | ac_have_decl=0 | |
6408 | fi | |
6409 | ||
6410 | cat >>confdefs.h <<_ACEOF | |
6411 | #define HAVE_DECL___SYS_SIGLIST $ac_have_decl | |
6412 | _ACEOF | |
6413 | ||
6414 | if test $ac_cv_have_decl___sys_siglist = yes; then | |
6415 | ||
6416 | $as_echo "#define sys_siglist __sys_siglist" >>confdefs.h | |
6417 | ||
6418 | fi | |
6419 | fi | |
6420 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5 | |
6421 | $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; } | |
d6a003a8 | 6422 | if ${ac_cv_header_sys_wait_h+:} false; then : |
067d23c9 KY |
6423 | $as_echo_n "(cached) " >&6 |
6424 | else | |
6425 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6426 | /* end confdefs.h. */ | |
6427 | #include <sys/types.h> | |
6428 | #include <sys/wait.h> | |
6429 | #ifndef WEXITSTATUS | |
6430 | # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8) | |
6431 | #endif | |
6432 | #ifndef WIFEXITED | |
6433 | # define WIFEXITED(stat_val) (((stat_val) & 255) == 0) | |
6434 | #endif | |
6435 | ||
6436 | int | |
6437 | main () | |
6438 | { | |
6439 | int s; | |
6440 | wait (&s); | |
6441 | s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; | |
6442 | ; | |
6443 | return 0; | |
6444 | } | |
6445 | _ACEOF | |
6446 | if ac_fn_c_try_compile "$LINENO"; then : | |
6447 | ac_cv_header_sys_wait_h=yes | |
6448 | else | |
6449 | ac_cv_header_sys_wait_h=no | |
6450 | fi | |
6451 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
6452 | fi | |
6453 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5 | |
6454 | $as_echo "$ac_cv_header_sys_wait_h" >&6; } | |
6455 | if test $ac_cv_header_sys_wait_h = yes; then | |
6456 | ||
6457 | $as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h | |
6458 | ||
6459 | fi | |
6460 | ||
6461 | ||
6462 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct utimbuf" >&5 | |
6463 | $as_echo_n "checking for struct utimbuf... " >&6; } | |
d6a003a8 | 6464 | if ${emacs_cv_struct_utimbuf+:} false; then : |
067d23c9 KY |
6465 | $as_echo_n "(cached) " >&6 |
6466 | else | |
6467 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6468 | /* end confdefs.h. */ | |
6469 | #ifdef TIME_WITH_SYS_TIME | |
6470 | #include <sys/time.h> | |
6471 | #include <time.h> | |
6472 | #else | |
6473 | #ifdef HAVE_SYS_TIME_H | |
6474 | #include <sys/time.h> | |
6475 | #else | |
6476 | #include <time.h> | |
6477 | #endif | |
6478 | #endif | |
6479 | #ifdef HAVE_UTIME_H | |
6480 | #include <utime.h> | |
6481 | #endif | |
6482 | int | |
6483 | main () | |
6484 | { | |
6485 | static struct utimbuf x; x.actime = x.modtime; | |
6486 | ; | |
6487 | return 0; | |
6488 | } | |
6489 | _ACEOF | |
6490 | if ac_fn_c_try_compile "$LINENO"; then : | |
6491 | emacs_cv_struct_utimbuf=yes | |
6492 | else | |
6493 | emacs_cv_struct_utimbuf=no | |
6494 | fi | |
6495 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
6496 | fi | |
6497 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_struct_utimbuf" >&5 | |
6498 | $as_echo "$emacs_cv_struct_utimbuf" >&6; } | |
6499 | if test $emacs_cv_struct_utimbuf = yes; then | |
6500 | ||
6501 | $as_echo "#define HAVE_STRUCT_UTIMBUF 1" >>confdefs.h | |
6502 | ||
6503 | fi | |
6504 | ||
6505 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 | |
6506 | $as_echo_n "checking return type of signal handlers... " >&6; } | |
d6a003a8 | 6507 | if ${ac_cv_type_signal+:} false; then : |
067d23c9 KY |
6508 | $as_echo_n "(cached) " >&6 |
6509 | else | |
6510 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6511 | /* end confdefs.h. */ | |
6512 | #include <sys/types.h> | |
6513 | #include <signal.h> | |
6514 | ||
6515 | int | |
6516 | main () | |
6517 | { | |
6518 | return *(signal (0, 0)) (0) == 1; | |
6519 | ; | |
6520 | return 0; | |
6521 | } | |
6522 | _ACEOF | |
6523 | if ac_fn_c_try_compile "$LINENO"; then : | |
6524 | ac_cv_type_signal=int | |
6525 | else | |
6526 | ac_cv_type_signal=void | |
6527 | fi | |
6528 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
6529 | fi | |
6530 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5 | |
6531 | $as_echo "$ac_cv_type_signal" >&6; } | |
6532 | ||
6533 | cat >>confdefs.h <<_ACEOF | |
6534 | #define RETSIGTYPE $ac_cv_type_signal | |
6535 | _ACEOF | |
6536 | ||
6537 | ||
6538 | ||
6539 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for speed_t" >&5 | |
6540 | $as_echo_n "checking for speed_t... " >&6; } | |
d6a003a8 | 6541 | if ${emacs_cv_speed_t+:} false; then : |
067d23c9 KY |
6542 | $as_echo_n "(cached) " >&6 |
6543 | else | |
6544 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6545 | /* end confdefs.h. */ | |
6546 | #include <termios.h> | |
6547 | int | |
6548 | main () | |
6549 | { | |
6550 | speed_t x = 1; | |
6551 | ; | |
6552 | return 0; | |
6553 | } | |
6554 | _ACEOF | |
6555 | if ac_fn_c_try_compile "$LINENO"; then : | |
6556 | emacs_cv_speed_t=yes | |
6557 | else | |
6558 | emacs_cv_speed_t=no | |
6559 | fi | |
6560 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
6561 | fi | |
6562 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_speed_t" >&5 | |
6563 | $as_echo "$emacs_cv_speed_t" >&6; } | |
6564 | if test $emacs_cv_speed_t = yes; then | |
6565 | ||
6566 | $as_echo "#define HAVE_SPEED_T 1" >>confdefs.h | |
6567 | ||
6568 | fi | |
6569 | ||
6570 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5 | |
6571 | $as_echo_n "checking for struct timeval... " >&6; } | |
d6a003a8 | 6572 | if ${emacs_cv_struct_timeval+:} false; then : |
067d23c9 KY |
6573 | $as_echo_n "(cached) " >&6 |
6574 | else | |
6575 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6576 | /* end confdefs.h. */ | |
6577 | #ifdef TIME_WITH_SYS_TIME | |
6578 | #include <sys/time.h> | |
6579 | #include <time.h> | |
6580 | #else | |
6581 | #ifdef HAVE_SYS_TIME_H | |
6582 | #include <sys/time.h> | |
6583 | #else | |
6584 | #include <time.h> | |
6585 | #endif | |
6586 | #endif | |
6587 | int | |
6588 | main () | |
6589 | { | |
6590 | static struct timeval x; x.tv_sec = x.tv_usec; | |
6591 | ; | |
6592 | return 0; | |
6593 | } | |
6594 | _ACEOF | |
6595 | if ac_fn_c_try_compile "$LINENO"; then : | |
6596 | emacs_cv_struct_timeval=yes | |
6597 | else | |
6598 | emacs_cv_struct_timeval=no | |
6599 | fi | |
6600 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
6601 | fi | |
6602 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_struct_timeval" >&5 | |
6603 | $as_echo "$emacs_cv_struct_timeval" >&6; } | |
6604 | HAVE_TIMEVAL=$emacs_cv_struct_timeval | |
6605 | if test $emacs_cv_struct_timeval = yes; then | |
6606 | ||
6607 | $as_echo "#define HAVE_TIMEVAL 1" >>confdefs.h | |
6608 | ||
6609 | fi | |
6610 | ||
6611 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct exception" >&5 | |
6612 | $as_echo_n "checking for struct exception... " >&6; } | |
d6a003a8 | 6613 | if ${emacs_cv_struct_exception+:} false; then : |
067d23c9 KY |
6614 | $as_echo_n "(cached) " >&6 |
6615 | else | |
6616 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6617 | /* end confdefs.h. */ | |
6618 | #include <math.h> | |
6619 | int | |
6620 | main () | |
6621 | { | |
6622 | static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1; | |
6623 | ; | |
6624 | return 0; | |
6625 | } | |
6626 | _ACEOF | |
6627 | if ac_fn_c_try_compile "$LINENO"; then : | |
6628 | emacs_cv_struct_exception=yes | |
6629 | else | |
6630 | emacs_cv_struct_exception=no | |
6631 | fi | |
6632 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
6633 | fi | |
6634 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_struct_exception" >&5 | |
6635 | $as_echo "$emacs_cv_struct_exception" >&6; } | |
6636 | HAVE_EXCEPTION=$emacs_cv_struct_exception | |
6637 | if test $emacs_cv_struct_exception != yes; then | |
6638 | ||
6639 | $as_echo "#define NO_MATHERR 1" >>confdefs.h | |
6640 | ||
6641 | fi | |
6642 | ||
6643 | for ac_header in sys/socket.h | |
6644 | do : | |
6645 | ac_fn_c_check_header_mongrel "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default" | |
d6a003a8 | 6646 | if test "x$ac_cv_header_sys_socket_h" = xyes; then : |
067d23c9 KY |
6647 | cat >>confdefs.h <<_ACEOF |
6648 | #define HAVE_SYS_SOCKET_H 1 | |
6649 | _ACEOF | |
6650 | ||
6651 | fi | |
6652 | ||
6653 | done | |
6654 | ||
6655 | for ac_header in net/if.h | |
6656 | do : | |
6657 | ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default | |
6658 | #if HAVE_SYS_SOCKET_H | |
6659 | #include <sys/socket.h> | |
6660 | #endif | |
6661 | " | |
d6a003a8 | 6662 | if test "x$ac_cv_header_net_if_h" = xyes; then : |
067d23c9 KY |
6663 | cat >>confdefs.h <<_ACEOF |
6664 | #define HAVE_NET_IF_H 1 | |
6665 | _ACEOF | |
6666 | ||
6667 | fi | |
6668 | ||
6669 | done | |
6670 | ||
6671 | ||
6672 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 | |
6673 | $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; } | |
d6a003a8 | 6674 | if ${ac_cv_struct_tm+:} false; then : |
067d23c9 KY |
6675 | $as_echo_n "(cached) " >&6 |
6676 | else | |
6677 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6678 | /* end confdefs.h. */ | |
6679 | #include <sys/types.h> | |
6680 | #include <time.h> | |
6681 | ||
6682 | int | |
6683 | main () | |
6684 | { | |
6685 | struct tm tm; | |
6686 | int *p = &tm.tm_sec; | |
6687 | return !p; | |
6688 | ; | |
6689 | return 0; | |
6690 | } | |
6691 | _ACEOF | |
6692 | if ac_fn_c_try_compile "$LINENO"; then : | |
6693 | ac_cv_struct_tm=time.h | |
6694 | else | |
6695 | ac_cv_struct_tm=sys/time.h | |
6696 | fi | |
6697 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
6698 | fi | |
6699 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5 | |
6700 | $as_echo "$ac_cv_struct_tm" >&6; } | |
6701 | if test $ac_cv_struct_tm = sys/time.h; then | |
6702 | ||
6703 | $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h | |
6704 | ||
6705 | fi | |
6706 | ||
6707 | ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h> | |
6708 | #include <$ac_cv_struct_tm> | |
6709 | ||
6710 | " | |
d6a003a8 | 6711 | if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then : |
067d23c9 KY |
6712 | |
6713 | cat >>confdefs.h <<_ACEOF | |
6714 | #define HAVE_STRUCT_TM_TM_ZONE 1 | |
6715 | _ACEOF | |
6716 | ||
6717 | ||
6718 | fi | |
6719 | ||
6720 | if test "$ac_cv_member_struct_tm_tm_zone" = yes; then | |
6721 | ||
6722 | $as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h | |
6723 | ||
6724 | else | |
6725 | ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h> | |
6726 | " | |
d6a003a8 | 6727 | if test "x$ac_cv_have_decl_tzname" = xyes; then : |
067d23c9 KY |
6728 | ac_have_decl=1 |
6729 | else | |
6730 | ac_have_decl=0 | |
6731 | fi | |
6732 | ||
6733 | cat >>confdefs.h <<_ACEOF | |
6734 | #define HAVE_DECL_TZNAME $ac_have_decl | |
6735 | _ACEOF | |
6736 | ||
6737 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5 | |
6738 | $as_echo_n "checking for tzname... " >&6; } | |
d6a003a8 | 6739 | if ${ac_cv_var_tzname+:} false; then : |
067d23c9 KY |
6740 | $as_echo_n "(cached) " >&6 |
6741 | else | |
6742 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6743 | /* end confdefs.h. */ | |
6744 | #include <time.h> | |
6745 | #if !HAVE_DECL_TZNAME | |
6746 | extern char *tzname[]; | |
6747 | #endif | |
6748 | ||
6749 | int | |
6750 | main () | |
6751 | { | |
6752 | return tzname[0][0]; | |
6753 | ; | |
6754 | return 0; | |
6755 | } | |
6756 | _ACEOF | |
6757 | if ac_fn_c_try_link "$LINENO"; then : | |
6758 | ac_cv_var_tzname=yes | |
6759 | else | |
6760 | ac_cv_var_tzname=no | |
6761 | fi | |
6762 | rm -f core conftest.err conftest.$ac_objext \ | |
6763 | conftest$ac_exeext conftest.$ac_ext | |
6764 | fi | |
6765 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5 | |
6766 | $as_echo "$ac_cv_var_tzname" >&6; } | |
6767 | if test $ac_cv_var_tzname = yes; then | |
6768 | ||
6769 | $as_echo "#define HAVE_TZNAME 1" >>confdefs.h | |
6770 | ||
6771 | fi | |
6772 | fi | |
6773 | ||
6774 | ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include <time.h> | |
6775 | " | |
d6a003a8 | 6776 | if test "x$ac_cv_member_struct_tm_tm_gmtoff" = xyes; then : |
067d23c9 KY |
6777 | |
6778 | $as_echo "#define HAVE_TM_GMTOFF 1" >>confdefs.h | |
6779 | ||
6780 | fi | |
6781 | ||
6782 | ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_flags" "ac_cv_member_struct_ifreq_ifr_flags" "$ac_includes_default | |
6783 | #if HAVE_SYS_SOCKET_H | |
6784 | #include <sys/socket.h> | |
6785 | #endif | |
6786 | #if HAVE_NET_IF_H | |
6787 | #include <net/if.h> | |
6788 | #endif | |
6789 | " | |
d6a003a8 | 6790 | if test "x$ac_cv_member_struct_ifreq_ifr_flags" = xyes; then : |
067d23c9 KY |
6791 | |
6792 | cat >>confdefs.h <<_ACEOF | |
6793 | #define HAVE_STRUCT_IFREQ_IFR_FLAGS 1 | |
6794 | _ACEOF | |
6795 | ||
6796 | ||
6797 | fi | |
6798 | ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_hwaddr" "ac_cv_member_struct_ifreq_ifr_hwaddr" "$ac_includes_default | |
6799 | #if HAVE_SYS_SOCKET_H | |
6800 | #include <sys/socket.h> | |
6801 | #endif | |
6802 | #if HAVE_NET_IF_H | |
6803 | #include <net/if.h> | |
6804 | #endif | |
6805 | " | |
d6a003a8 | 6806 | if test "x$ac_cv_member_struct_ifreq_ifr_hwaddr" = xyes; then : |
067d23c9 KY |
6807 | |
6808 | cat >>confdefs.h <<_ACEOF | |
6809 | #define HAVE_STRUCT_IFREQ_IFR_HWADDR 1 | |
6810 | _ACEOF | |
6811 | ||
6812 | ||
6813 | fi | |
6814 | ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_netmask" "ac_cv_member_struct_ifreq_ifr_netmask" "$ac_includes_default | |
6815 | #if HAVE_SYS_SOCKET_H | |
6816 | #include <sys/socket.h> | |
6817 | #endif | |
6818 | #if HAVE_NET_IF_H | |
6819 | #include <net/if.h> | |
6820 | #endif | |
6821 | " | |
d6a003a8 | 6822 | if test "x$ac_cv_member_struct_ifreq_ifr_netmask" = xyes; then : |
067d23c9 KY |
6823 | |
6824 | cat >>confdefs.h <<_ACEOF | |
6825 | #define HAVE_STRUCT_IFREQ_IFR_NETMASK 1 | |
6826 | _ACEOF | |
6827 | ||
6828 | ||
6829 | fi | |
6830 | ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_broadaddr" "ac_cv_member_struct_ifreq_ifr_broadaddr" "$ac_includes_default | |
6831 | #if HAVE_SYS_SOCKET_H | |
6832 | #include <sys/socket.h> | |
6833 | #endif | |
6834 | #if HAVE_NET_IF_H | |
6835 | #include <net/if.h> | |
6836 | #endif | |
6837 | " | |
d6a003a8 | 6838 | if test "x$ac_cv_member_struct_ifreq_ifr_broadaddr" = xyes; then : |
067d23c9 KY |
6839 | |
6840 | cat >>confdefs.h <<_ACEOF | |
6841 | #define HAVE_STRUCT_IFREQ_IFR_BROADADDR 1 | |
6842 | _ACEOF | |
6843 | ||
6844 | ||
6845 | fi | |
6846 | ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_addr" "ac_cv_member_struct_ifreq_ifr_addr" "$ac_includes_default | |
6847 | #if HAVE_SYS_SOCKET_H | |
6848 | #include <sys/socket.h> | |
6849 | #endif | |
6850 | #if HAVE_NET_IF_H | |
6851 | #include <net/if.h> | |
6852 | #endif | |
6853 | " | |
d6a003a8 | 6854 | if test "x$ac_cv_member_struct_ifreq_ifr_addr" = xyes; then : |
067d23c9 KY |
6855 | |
6856 | cat >>confdefs.h <<_ACEOF | |
6857 | #define HAVE_STRUCT_IFREQ_IFR_ADDR 1 | |
6858 | _ACEOF | |
6859 | ||
6860 | ||
6861 | fi | |
6862 | ||
6863 | ||
6864 | ||
6865 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for function prototypes" >&5 | |
6866 | $as_echo_n "checking for function prototypes... " >&6; } | |
6867 | if test "$ac_cv_prog_cc_c89" != no; then | |
6868 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
6869 | $as_echo "yes" >&6; } | |
6870 | ||
6871 | $as_echo "#define PROTOTYPES 1" >>confdefs.h | |
6872 | ||
6873 | ||
6874 | $as_echo "#define __PROTOTYPES 1" >>confdefs.h | |
6875 | ||
6876 | else | |
6877 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
6878 | $as_echo "no" >&6; } | |
6879 | fi | |
6880 | ||
6881 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5 | |
6882 | $as_echo_n "checking for working volatile... " >&6; } | |
d6a003a8 | 6883 | if ${ac_cv_c_volatile+:} false; then : |
067d23c9 KY |
6884 | $as_echo_n "(cached) " >&6 |
6885 | else | |
6886 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6887 | /* end confdefs.h. */ | |
6888 | ||
6889 | int | |
6890 | main () | |
6891 | { | |
6892 | ||
6893 | volatile int x; | |
6894 | int * volatile y = (int *) 0; | |
6895 | return !x && !y; | |
6896 | ; | |
6897 | return 0; | |
6898 | } | |
6899 | _ACEOF | |
6900 | if ac_fn_c_try_compile "$LINENO"; then : | |
6901 | ac_cv_c_volatile=yes | |
6902 | else | |
6903 | ac_cv_c_volatile=no | |
6904 | fi | |
6905 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
6906 | fi | |
6907 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5 | |
6908 | $as_echo "$ac_cv_c_volatile" >&6; } | |
6909 | if test $ac_cv_c_volatile = no; then | |
6910 | ||
6911 | $as_echo "#define volatile /**/" >>confdefs.h | |
6912 | ||
6913 | fi | |
6914 | ||
6915 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 | |
6916 | $as_echo_n "checking for an ANSI C-conforming const... " >&6; } | |
d6a003a8 | 6917 | if ${ac_cv_c_const+:} false; then : |
067d23c9 KY |
6918 | $as_echo_n "(cached) " >&6 |
6919 | else | |
6920 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6921 | /* end confdefs.h. */ | |
6922 | ||
6923 | int | |
6924 | main () | |
6925 | { | |
6926 | /* FIXME: Include the comments suggested by Paul. */ | |
6927 | #ifndef __cplusplus | |
6928 | /* Ultrix mips cc rejects this. */ | |
6929 | typedef int charset[2]; | |
6930 | const charset cs; | |
6931 | /* SunOS 4.1.1 cc rejects this. */ | |
6932 | char const *const *pcpcc; | |
6933 | char **ppc; | |
6934 | /* NEC SVR4.0.2 mips cc rejects this. */ | |
6935 | struct point {int x, y;}; | |
6936 | static struct point const zero = {0,0}; | |
6937 | /* AIX XL C 1.02.0.0 rejects this. | |
6938 | It does not let you subtract one const X* pointer from another in | |
6939 | an arm of an if-expression whose if-part is not a constant | |
6940 | expression */ | |
6941 | const char *g = "string"; | |
6942 | pcpcc = &g + (g ? g-g : 0); | |
6943 | /* HPUX 7.0 cc rejects these. */ | |
6944 | ++pcpcc; | |
6945 | ppc = (char**) pcpcc; | |
6946 | pcpcc = (char const *const *) ppc; | |
6947 | { /* SCO 3.2v4 cc rejects this. */ | |
6948 | char *t; | |
6949 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
6950 | ||
6951 | *t++ = 0; | |
6952 | if (s) return 0; | |
6953 | } | |
6954 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
6955 | int x[] = {25, 17}; | |
6956 | const int *foo = &x[0]; | |
6957 | ++foo; | |
6958 | } | |
6959 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
6960 | typedef const int *iptr; | |
6961 | iptr p = 0; | |
6962 | ++p; | |
6963 | } | |
6964 | { /* AIX XL C 1.02.0.0 rejects this saying | |
6965 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
6966 | struct s { int j; const int *ap[3]; }; | |
6967 | struct s *b; b->j = 5; | |
6968 | } | |
6969 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
6970 | const int foo = 10; | |
6971 | if (!foo) return 0; | |
6972 | } | |
6973 | return !cs[0] && !zero.x; | |
6974 | #endif | |
6975 | ||
6976 | ; | |
6977 | return 0; | |
6978 | } | |
6979 | _ACEOF | |
6980 | if ac_fn_c_try_compile "$LINENO"; then : | |
6981 | ac_cv_c_const=yes | |
6982 | else | |
6983 | ac_cv_c_const=no | |
6984 | fi | |
6985 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
6986 | fi | |
6987 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 | |
6988 | $as_echo "$ac_cv_c_const" >&6; } | |
6989 | if test $ac_cv_c_const = no; then | |
6990 | ||
6991 | $as_echo "#define const /**/" >>confdefs.h | |
6992 | ||
6993 | fi | |
6994 | ||
6995 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for void * support" >&5 | |
6996 | $as_echo_n "checking for void * support... " >&6; } | |
d6a003a8 | 6997 | if ${emacs_cv_void_star+:} false; then : |
067d23c9 KY |
6998 | $as_echo_n "(cached) " >&6 |
6999 | else | |
7000 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7001 | /* end confdefs.h. */ | |
7002 | ||
7003 | int | |
7004 | main () | |
7005 | { | |
7006 | void * foo; | |
7007 | ; | |
7008 | return 0; | |
7009 | } | |
7010 | _ACEOF | |
7011 | if ac_fn_c_try_compile "$LINENO"; then : | |
7012 | emacs_cv_void_star=yes | |
7013 | else | |
7014 | emacs_cv_void_star=no | |
7015 | fi | |
7016 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7017 | fi | |
7018 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_void_star" >&5 | |
7019 | $as_echo "$emacs_cv_void_star" >&6; } | |
7020 | if test $emacs_cv_void_star = yes; then | |
7021 | $as_echo "#define POINTER_TYPE void" >>confdefs.h | |
7022 | ||
7023 | else | |
7024 | $as_echo "#define POINTER_TYPE char" >>confdefs.h | |
7025 | ||
7026 | fi | |
7027 | ||
7028 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 | |
7029 | $as_echo_n "checking whether byte ordering is bigendian... " >&6; } | |
d6a003a8 | 7030 | if ${ac_cv_c_bigendian+:} false; then : |
067d23c9 KY |
7031 | $as_echo_n "(cached) " >&6 |
7032 | else | |
7033 | ac_cv_c_bigendian=unknown | |
7034 | # See if we're dealing with a universal compiler. | |
7035 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7036 | /* end confdefs.h. */ | |
7037 | #ifndef __APPLE_CC__ | |
7038 | not a universal capable compiler | |
7039 | #endif | |
7040 | typedef int dummy; | |
7041 | ||
7042 | _ACEOF | |
7043 | if ac_fn_c_try_compile "$LINENO"; then : | |
7044 | ||
7045 | # Check for potential -arch flags. It is not universal unless | |
7046 | # there are at least two -arch flags with different values. | |
7047 | ac_arch= | |
7048 | ac_prev= | |
7049 | for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do | |
7050 | if test -n "$ac_prev"; then | |
7051 | case $ac_word in | |
7052 | i?86 | x86_64 | ppc | ppc64) | |
7053 | if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then | |
7054 | ac_arch=$ac_word | |
7055 | else | |
7056 | ac_cv_c_bigendian=universal | |
7057 | break | |
7058 | fi | |
7059 | ;; | |
7060 | esac | |
7061 | ac_prev= | |
7062 | elif test "x$ac_word" = "x-arch"; then | |
7063 | ac_prev=arch | |
7064 | fi | |
7065 | done | |
7066 | fi | |
7067 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7068 | if test $ac_cv_c_bigendian = unknown; then | |
7069 | # See if sys/param.h defines the BYTE_ORDER macro. | |
7070 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7071 | /* end confdefs.h. */ | |
7072 | #include <sys/types.h> | |
7073 | #include <sys/param.h> | |
7074 | ||
7075 | int | |
7076 | main () | |
7077 | { | |
7078 | #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ | |
7079 | && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ | |
7080 | && LITTLE_ENDIAN) | |
7081 | bogus endian macros | |
7082 | #endif | |
7083 | ||
7084 | ; | |
7085 | return 0; | |
7086 | } | |
7087 | _ACEOF | |
7088 | if ac_fn_c_try_compile "$LINENO"; then : | |
7089 | # It does; now see whether it defined to BIG_ENDIAN or not. | |
7090 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7091 | /* end confdefs.h. */ | |
7092 | #include <sys/types.h> | |
7093 | #include <sys/param.h> | |
7094 | ||
7095 | int | |
7096 | main () | |
7097 | { | |
7098 | #if BYTE_ORDER != BIG_ENDIAN | |
7099 | not big endian | |
7100 | #endif | |
7101 | ||
7102 | ; | |
7103 | return 0; | |
7104 | } | |
7105 | _ACEOF | |
7106 | if ac_fn_c_try_compile "$LINENO"; then : | |
7107 | ac_cv_c_bigendian=yes | |
7108 | else | |
7109 | ac_cv_c_bigendian=no | |
7110 | fi | |
7111 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7112 | fi | |
7113 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7114 | fi | |
7115 | if test $ac_cv_c_bigendian = unknown; then | |
7116 | # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). | |
7117 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7118 | /* end confdefs.h. */ | |
7119 | #include <limits.h> | |
7120 | ||
7121 | int | |
7122 | main () | |
7123 | { | |
7124 | #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) | |
7125 | bogus endian macros | |
7126 | #endif | |
7127 | ||
7128 | ; | |
7129 | return 0; | |
7130 | } | |
7131 | _ACEOF | |
7132 | if ac_fn_c_try_compile "$LINENO"; then : | |
7133 | # It does; now see whether it defined to _BIG_ENDIAN or not. | |
7134 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7135 | /* end confdefs.h. */ | |
7136 | #include <limits.h> | |
7137 | ||
7138 | int | |
7139 | main () | |
7140 | { | |
7141 | #ifndef _BIG_ENDIAN | |
7142 | not big endian | |
7143 | #endif | |
7144 | ||
7145 | ; | |
7146 | return 0; | |
7147 | } | |
7148 | _ACEOF | |
7149 | if ac_fn_c_try_compile "$LINENO"; then : | |
7150 | ac_cv_c_bigendian=yes | |
7151 | else | |
7152 | ac_cv_c_bigendian=no | |
7153 | fi | |
7154 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7155 | fi | |
7156 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7157 | fi | |
7158 | if test $ac_cv_c_bigendian = unknown; then | |
7159 | # Compile a test program. | |
7160 | if test "$cross_compiling" = yes; then : | |
7161 | # Try to guess by grepping values from an object file. | |
7162 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7163 | /* end confdefs.h. */ | |
7164 | short int ascii_mm[] = | |
7165 | { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; | |
7166 | short int ascii_ii[] = | |
7167 | { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; | |
7168 | int use_ascii (int i) { | |
7169 | return ascii_mm[i] + ascii_ii[i]; | |
7170 | } | |
7171 | short int ebcdic_ii[] = | |
7172 | { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; | |
7173 | short int ebcdic_mm[] = | |
7174 | { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; | |
7175 | int use_ebcdic (int i) { | |
7176 | return ebcdic_mm[i] + ebcdic_ii[i]; | |
7177 | } | |
7178 | extern int foo; | |
7179 | ||
7180 | int | |
7181 | main () | |
7182 | { | |
7183 | return use_ascii (foo) == use_ebcdic (foo); | |
7184 | ; | |
7185 | return 0; | |
7186 | } | |
7187 | _ACEOF | |
7188 | if ac_fn_c_try_compile "$LINENO"; then : | |
7189 | if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then | |
7190 | ac_cv_c_bigendian=yes | |
7191 | fi | |
7192 | if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then | |
7193 | if test "$ac_cv_c_bigendian" = unknown; then | |
7194 | ac_cv_c_bigendian=no | |
7195 | else | |
7196 | # finding both strings is unlikely to happen, but who knows? | |
7197 | ac_cv_c_bigendian=unknown | |
7198 | fi | |
7199 | fi | |
7200 | fi | |
7201 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7202 | else | |
7203 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7204 | /* end confdefs.h. */ | |
7205 | $ac_includes_default | |
7206 | int | |
7207 | main () | |
7208 | { | |
7209 | ||
7210 | /* Are we little or big endian? From Harbison&Steele. */ | |
7211 | union | |
7212 | { | |
7213 | long int l; | |
7214 | char c[sizeof (long int)]; | |
7215 | } u; | |
7216 | u.l = 1; | |
7217 | return u.c[sizeof (long int) - 1] == 1; | |
7218 | ||
7219 | ; | |
7220 | return 0; | |
7221 | } | |
7222 | _ACEOF | |
7223 | if ac_fn_c_try_run "$LINENO"; then : | |
7224 | ac_cv_c_bigendian=no | |
7225 | else | |
7226 | ac_cv_c_bigendian=yes | |
7227 | fi | |
7228 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
7229 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
7230 | fi | |
7231 | ||
7232 | fi | |
7233 | fi | |
7234 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 | |
7235 | $as_echo "$ac_cv_c_bigendian" >&6; } | |
7236 | case $ac_cv_c_bigendian in #( | |
7237 | yes) | |
7238 | $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h | |
7239 | ;; #( | |
7240 | no) | |
7241 | ;; #( | |
7242 | universal) | |
7243 | ||
7244 | $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h | |
7245 | ||
7246 | ;; #( | |
7247 | *) | |
d6a003a8 | 7248 | as_fn_error $? "unknown endianness |
067d23c9 KY |
7249 | presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; |
7250 | esac | |
7251 | ||
7252 | ||
7253 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 | |
7254 | $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } | |
7255 | set x ${MAKE-make} | |
7256 | ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` | |
d6a003a8 | 7257 | if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : |
067d23c9 KY |
7258 | $as_echo_n "(cached) " >&6 |
7259 | else | |
7260 | cat >conftest.make <<\_ACEOF | |
7261 | SHELL = /bin/sh | |
7262 | all: | |
7263 | @echo '@@@%%%=$(MAKE)=@@@%%%' | |
7264 | _ACEOF | |
d6a003a8 | 7265 | # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. |
067d23c9 KY |
7266 | case `${MAKE-make} -f conftest.make 2>/dev/null` in |
7267 | *@@@%%%=?*=@@@%%%*) | |
7268 | eval ac_cv_prog_make_${ac_make}_set=yes;; | |
7269 | *) | |
7270 | eval ac_cv_prog_make_${ac_make}_set=no;; | |
7271 | esac | |
7272 | rm -f conftest.make | |
7273 | fi | |
7274 | if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then | |
7275 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
7276 | $as_echo "yes" >&6; } | |
7277 | SET_MAKE= | |
7278 | else | |
7279 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
7280 | $as_echo "no" >&6; } | |
7281 | SET_MAKE="MAKE=${MAKE-make}" | |
7282 | fi | |
7283 | ||
7284 | ||
7285 | DEPFLAGS= | |
7286 | MKDEPDIR=":" | |
7287 | deps_frag=deps.mk | |
7288 | if test "$GCC" = yes && test "$ac_enable_autodepend" = yes; then | |
7289 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using GNU Make" >&5 | |
7290 | $as_echo_n "checking whether we are using GNU Make... " >&6; } | |
7291 | HAVE_GNU_MAKE=no | |
7292 | testval=`make --version 2>/dev/null | grep 'GNU Make'` | |
7293 | if test "x$testval" != x; then | |
7294 | HAVE_GNU_MAKE=yes | |
7295 | else | |
7296 | ac_enable_autodepend=no | |
7297 | fi | |
7298 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_GNU_MAKE" >&5 | |
7299 | $as_echo "$HAVE_GNU_MAKE" >&6; } | |
7300 | if test $HAVE_GNU_MAKE = yes; then | |
7301 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -MMD -MF" >&5 | |
7302 | $as_echo_n "checking whether gcc understands -MMD -MF... " >&6; } | |
7303 | SAVE_CFLAGS="$CFLAGS" | |
7304 | CFLAGS="$CFLAGS -MMD -MF deps.d" | |
7305 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7306 | /* end confdefs.h. */ | |
7307 | ||
7308 | int | |
7309 | main () | |
7310 | { | |
7311 | ||
7312 | ; | |
7313 | return 0; | |
7314 | } | |
7315 | _ACEOF | |
7316 | if ac_fn_c_try_compile "$LINENO"; then : | |
7317 | ||
7318 | else | |
7319 | ac_enable_autodepend=no | |
7320 | fi | |
7321 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7322 | CFLAGS="$SAVE_CFLAGS" | |
7323 | test -f deps.d || ac_enable_autodepend=no | |
7324 | rm -rf deps.d | |
7325 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_autodepend" >&5 | |
7326 | $as_echo "$ac_enable_autodepend" >&6; } | |
7327 | fi | |
7328 | if test $ac_enable_autodepend = yes; then | |
7329 | DEPFLAGS='-MMD -MF ${DEPDIR}/$*.d' | |
7330 | ## In parallel builds, another make might create depdir between | |
7331 | ## the first test and mkdir, so stick another test on the end. | |
7332 | ## Or use mkinstalldirs? mkdir -p is not portable. | |
7333 | MKDEPDIR='test -d ${DEPDIR} || mkdir ${DEPDIR} || test -d ${DEPDIR}' | |
7334 | deps_frag=autodeps.mk | |
7335 | fi | |
7336 | fi | |
7337 | deps_frag=$srcdir/src/$deps_frag | |
7338 | ||
7339 | ||
7340 | ||
7341 | ||
7342 | ||
7343 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long file names" >&5 | |
7344 | $as_echo_n "checking for long file names... " >&6; } | |
d6a003a8 | 7345 | if ${ac_cv_sys_long_file_names+:} false; then : |
067d23c9 KY |
7346 | $as_echo_n "(cached) " >&6 |
7347 | else | |
7348 | ac_cv_sys_long_file_names=yes | |
7349 | # Test for long file names in all the places we know might matter: | |
7350 | # . the current directory, where building will happen | |
7351 | # $prefix/lib where we will be installing things | |
7352 | # $exec_prefix/lib likewise | |
7353 | # $TMPDIR if set, where it might want to write temporary files | |
7354 | # /tmp where it might want to write temporary files | |
7355 | # /var/tmp likewise | |
7356 | # /usr/tmp likewise | |
7357 | for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do | |
7358 | # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib | |
7359 | # in the usual case where exec_prefix is '${prefix}'. | |
7360 | case $ac_dir in #( | |
7361 | . | /* | ?:[\\/]*) ;; #( | |
7362 | *) continue;; | |
7363 | esac | |
7364 | test -w "$ac_dir/." || continue # It is less confusing to not echo anything here. | |
7365 | ac_xdir=$ac_dir/cf$$ | |
7366 | (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue | |
7367 | ac_tf1=$ac_xdir/conftest9012345 | |
7368 | ac_tf2=$ac_xdir/conftest9012346 | |
7369 | touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" || | |
7370 | ac_cv_sys_long_file_names=no | |
7371 | rm -f -r "$ac_xdir" 2>/dev/null | |
7372 | test $ac_cv_sys_long_file_names = no && break | |
7373 | done | |
7374 | fi | |
7375 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_long_file_names" >&5 | |
7376 | $as_echo "$ac_cv_sys_long_file_names" >&6; } | |
7377 | if test $ac_cv_sys_long_file_names = yes; then | |
7378 | ||
7379 | $as_echo "#define HAVE_LONG_FILE_NAMES 1" >>confdefs.h | |
7380 | ||
7381 | fi | |
7382 | ||
7383 | ||
7384 | #### Choose a window system. | |
7385 | ||
7386 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5 | |
7387 | $as_echo_n "checking for X... " >&6; } | |
7388 | ||
7389 | ||
7390 | # Check whether --with-x was given. | |
7391 | if test "${with_x+set}" = set; then : | |
7392 | withval=$with_x; | |
7393 | fi | |
7394 | ||
7395 | # $have_x is `yes', `no', `disabled', or empty when we do not yet know. | |
7396 | if test "x$with_x" = xno; then | |
7397 | # The user explicitly disabled X. | |
7398 | have_x=disabled | |
7399 | else | |
7400 | case $x_includes,$x_libraries in #( | |
d6a003a8 AS |
7401 | *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #( |
7402 | *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then : | |
067d23c9 KY |
7403 | $as_echo_n "(cached) " >&6 |
7404 | else | |
7405 | # One or both of the vars are not set, and there is no cached value. | |
7406 | ac_x_includes=no ac_x_libraries=no | |
7407 | rm -f -r conftest.dir | |
7408 | if mkdir conftest.dir; then | |
7409 | cd conftest.dir | |
7410 | cat >Imakefile <<'_ACEOF' | |
7411 | incroot: | |
7412 | @echo incroot='${INCROOT}' | |
7413 | usrlibdir: | |
7414 | @echo usrlibdir='${USRLIBDIR}' | |
7415 | libdir: | |
7416 | @echo libdir='${LIBDIR}' | |
7417 | _ACEOF | |
7418 | if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then | |
d6a003a8 | 7419 | # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. |
067d23c9 KY |
7420 | for ac_var in incroot usrlibdir libdir; do |
7421 | eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" | |
7422 | done | |
7423 | # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. | |
7424 | for ac_extension in a so sl dylib la dll; do | |
7425 | if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && | |
7426 | test -f "$ac_im_libdir/libX11.$ac_extension"; then | |
7427 | ac_im_usrlibdir=$ac_im_libdir; break | |
7428 | fi | |
7429 | done | |
7430 | # Screen out bogus values from the imake configuration. They are | |
7431 | # bogus both because they are the default anyway, and because | |
7432 | # using them would break gcc on systems where it needs fixed includes. | |
7433 | case $ac_im_incroot in | |
7434 | /usr/include) ac_x_includes= ;; | |
7435 | *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; | |
7436 | esac | |
7437 | case $ac_im_usrlibdir in | |
7438 | /usr/lib | /usr/lib64 | /lib | /lib64) ;; | |
7439 | *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; | |
7440 | esac | |
7441 | fi | |
7442 | cd .. | |
7443 | rm -f -r conftest.dir | |
7444 | fi | |
7445 | ||
7446 | # Standard set of common directories for X headers. | |
7447 | # Check X11 before X11Rn because it is often a symlink to the current release. | |
7448 | ac_x_header_dirs=' | |
7449 | /usr/X11/include | |
7450 | /usr/X11R7/include | |
7451 | /usr/X11R6/include | |
7452 | /usr/X11R5/include | |
7453 | /usr/X11R4/include | |
7454 | ||
7455 | /usr/include/X11 | |
7456 | /usr/include/X11R7 | |
7457 | /usr/include/X11R6 | |
7458 | /usr/include/X11R5 | |
7459 | /usr/include/X11R4 | |
7460 | ||
7461 | /usr/local/X11/include | |
7462 | /usr/local/X11R7/include | |
7463 | /usr/local/X11R6/include | |
7464 | /usr/local/X11R5/include | |
7465 | /usr/local/X11R4/include | |
7466 | ||
7467 | /usr/local/include/X11 | |
7468 | /usr/local/include/X11R7 | |
7469 | /usr/local/include/X11R6 | |
7470 | /usr/local/include/X11R5 | |
7471 | /usr/local/include/X11R4 | |
7472 | ||
7473 | /usr/X386/include | |
7474 | /usr/x386/include | |
7475 | /usr/XFree86/include/X11 | |
7476 | ||
7477 | /usr/include | |
7478 | /usr/local/include | |
7479 | /usr/unsupported/include | |
7480 | /usr/athena/include | |
7481 | /usr/local/x11r5/include | |
7482 | /usr/lpp/Xamples/include | |
7483 | ||
7484 | /usr/openwin/include | |
7485 | /usr/openwin/share/include' | |
7486 | ||
7487 | if test "$ac_x_includes" = no; then | |
7488 | # Guess where to find include files, by looking for Xlib.h. | |
7489 | # First, try using that file with no special directory specified. | |
7490 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7491 | /* end confdefs.h. */ | |
7492 | #include <X11/Xlib.h> | |
7493 | _ACEOF | |
7494 | if ac_fn_c_try_cpp "$LINENO"; then : | |
7495 | # We can compile using X headers with no special include directory. | |
7496 | ac_x_includes= | |
7497 | else | |
7498 | for ac_dir in $ac_x_header_dirs; do | |
7499 | if test -r "$ac_dir/X11/Xlib.h"; then | |
7500 | ac_x_includes=$ac_dir | |
7501 | break | |
7502 | fi | |
7503 | done | |
7504 | fi | |
d6a003a8 | 7505 | rm -f conftest.err conftest.i conftest.$ac_ext |
067d23c9 KY |
7506 | fi # $ac_x_includes = no |
7507 | ||
7508 | if test "$ac_x_libraries" = no; then | |
7509 | # Check for the libraries. | |
7510 | # See if we find them without any special options. | |
7511 | # Don't add to $LIBS permanently. | |
7512 | ac_save_LIBS=$LIBS | |
7513 | LIBS="-lX11 $LIBS" | |
7514 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7515 | /* end confdefs.h. */ | |
7516 | #include <X11/Xlib.h> | |
7517 | int | |
7518 | main () | |
7519 | { | |
7520 | XrmInitialize () | |
7521 | ; | |
7522 | return 0; | |
7523 | } | |
7524 | _ACEOF | |
7525 | if ac_fn_c_try_link "$LINENO"; then : | |
7526 | LIBS=$ac_save_LIBS | |
7527 | # We can link X programs with no special library path. | |
7528 | ac_x_libraries= | |
7529 | else | |
7530 | LIBS=$ac_save_LIBS | |
7531 | for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` | |
7532 | do | |
7533 | # Don't even attempt the hair of trying to link an X program! | |
7534 | for ac_extension in a so sl dylib la dll; do | |
7535 | if test -r "$ac_dir/libX11.$ac_extension"; then | |
7536 | ac_x_libraries=$ac_dir | |
7537 | break 2 | |
7538 | fi | |
7539 | done | |
7540 | done | |
7541 | fi | |
7542 | rm -f core conftest.err conftest.$ac_objext \ | |
7543 | conftest$ac_exeext conftest.$ac_ext | |
7544 | fi # $ac_x_libraries = no | |
7545 | ||
7546 | case $ac_x_includes,$ac_x_libraries in #( | |
7547 | no,* | *,no | *\'*) | |
7548 | # Didn't find X, or a directory has "'" in its name. | |
7549 | ac_cv_have_x="have_x=no";; #( | |
7550 | *) | |
7551 | # Record where we found X for the cache. | |
7552 | ac_cv_have_x="have_x=yes\ | |
7553 | ac_x_includes='$ac_x_includes'\ | |
7554 | ac_x_libraries='$ac_x_libraries'" | |
7555 | esac | |
7556 | fi | |
7557 | ;; #( | |
7558 | *) have_x=yes;; | |
7559 | esac | |
7560 | eval "$ac_cv_have_x" | |
7561 | fi # $with_x != no | |
7562 | ||
7563 | if test "$have_x" != yes; then | |
7564 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5 | |
7565 | $as_echo "$have_x" >&6; } | |
7566 | no_x=yes | |
7567 | else | |
7568 | # If each of the values was on the command line, it overrides each guess. | |
7569 | test "x$x_includes" = xNONE && x_includes=$ac_x_includes | |
7570 | test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries | |
7571 | # Update the cache value to reflect the command line values. | |
7572 | ac_cv_have_x="have_x=yes\ | |
7573 | ac_x_includes='$x_includes'\ | |
7574 | ac_x_libraries='$x_libraries'" | |
7575 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5 | |
7576 | $as_echo "libraries $x_libraries, headers $x_includes" >&6; } | |
7577 | fi | |
7578 | ||
7579 | if test "$no_x" = yes; then | |
7580 | window_system=none | |
7581 | else | |
7582 | window_system=x11 | |
7583 | fi | |
7584 | ||
7585 | ## Workaround for bug in autoconf <= 2.62. | |
7586 | ## http://lists.gnu.org/archive/html/emacs-devel/2008-04/msg01551.html | |
7587 | ## No need to do anything special for these standard directories. | |
7588 | if test -n "${x_libraries}" && test x"${x_libraries}" != xNONE; then | |
7589 | ||
7590 | x_libraries=`echo :${x_libraries}: | sed -e 's|:/usr/lib64:|:|g' -e 's|:/lib64:|:|g' -e 's|^:||' -e 's|:$||'` | |
7591 | ||
7592 | fi | |
7593 | ||
7594 | LD_SWITCH_X_SITE_AUX= | |
7595 | LD_SWITCH_X_SITE_AUX_RPATH= | |
7596 | if test "${x_libraries}" != NONE; then | |
7597 | if test -n "${x_libraries}"; then | |
7598 | LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"` | |
7599 | LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"` | |
7600 | LD_SWITCH_X_SITE_AUX_RPATH=`echo ${LD_SWITCH_X_SITE_AUX} | sed -e 's/-R/-Wl,-rpath,/'` | |
7601 | fi | |
7602 | x_default_search_path="" | |
7603 | x_search_path=${x_libraries} | |
7604 | if test -z "${x_search_path}"; then | |
7605 | x_search_path=/usr/lib | |
7606 | fi | |
7607 | for x_library in `echo ${x_search_path}: | \ | |
7608 | sed -e "s/:/ /g" -e p -e "s:/lib[^ /]* :/share :g"`; do | |
7609 | x_search_path="\ | |
7610 | ${x_library}/X11/%L/%T/%N%C%S:\ | |
7611 | ${x_library}/X11/%l/%T/%N%C%S:\ | |
7612 | ${x_library}/X11/%T/%N%C%S:\ | |
7613 | ${x_library}/X11/%L/%T/%N%S:\ | |
7614 | ${x_library}/X11/%l/%T/%N%S:\ | |
7615 | ${x_library}/X11/%T/%N%S" | |
7616 | if test x"${x_default_search_path}" = x; then | |
7617 | x_default_search_path=${x_search_path} | |
7618 | else | |
7619 | x_default_search_path="${x_search_path}:${x_default_search_path}" | |
7620 | fi | |
7621 | done | |
7622 | fi | |
7623 | ||
7624 | ||
7625 | ||
7626 | if test "${x_includes}" != NONE && test -n "${x_includes}"; then | |
7627 | C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"` | |
7628 | fi | |
7629 | ||
7630 | if test x"${x_includes}" = x; then | |
7631 | bitmapdir=/usr/include/X11/bitmaps | |
7632 | else | |
7633 | # accumulate include directories that have X11 bitmap subdirectories | |
7634 | bmd_acc="dummyval" | |
7635 | for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do | |
7636 | if test -d "${bmd}/X11/bitmaps"; then | |
7637 | bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps" | |
7638 | fi | |
7639 | if test -d "${bmd}/bitmaps"; then | |
7640 | bmd_acc="${bmd_acc}:${bmd}/bitmaps" | |
7641 | fi | |
7642 | done | |
7643 | if test ${bmd_acc} != "dummyval"; then | |
7644 | bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"` | |
7645 | fi | |
7646 | fi | |
7647 | ||
7648 | HAVE_NS=no | |
7649 | NS_IMPL_COCOA=no | |
7650 | NS_IMPL_GNUSTEP=no | |
7651 | tmp_CPPFLAGS="$CPPFLAGS" | |
7652 | tmp_CFLAGS="$CFLAGS" | |
7653 | CPPFLAGS="$CPPFLAGS -x objective-c" | |
7654 | CFLAGS="$CFLAGS -x objective-c" | |
7655 | TEMACS_LDFLAGS2="\${LDFLAGS}" | |
7656 | if test "${with_ns}" != no; then | |
7657 | if test "${opsys}" = darwin; then | |
7658 | NS_IMPL_COCOA=yes | |
7659 | ns_appdir=`pwd`/nextstep/Emacs.app | |
7660 | ns_appbindir=${ns_appdir}/Contents/MacOS/ | |
7661 | ns_appresdir=${ns_appdir}/Contents/Resources | |
7662 | ns_appsrc=${srcdir}/nextstep/Cocoa/Emacs.base | |
7663 | elif test -f $GNUSTEP_CONFIG_FILE; then | |
7664 | NS_IMPL_GNUSTEP=yes | |
7665 | ns_appdir=`pwd`/nextstep/Emacs.app | |
7666 | ns_appbindir=${ns_appdir}/ | |
7667 | ns_appresdir=${ns_appdir}/Resources | |
7668 | ns_appsrc=${srcdir}/nextstep/GNUstep/Emacs.base | |
7669 | GNUSTEP_SYSTEM_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_HEADERS)" | |
7670 | GNUSTEP_SYSTEM_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_LIBRARIES)" | |
7671 | GNUSTEP_LOCAL_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_HEADERS)" | |
7672 | GNUSTEP_LOCAL_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_LIBRARIES)" | |
7673 | test "x${GNUSTEP_LOCAL_HEADERS}" != "x" && \ | |
7674 | GNUSTEP_LOCAL_HEADERS="-I${GNUSTEP_LOCAL_HEADERS}" | |
7675 | test "x${GNUSTEP_LOCAL_LIBRARIES}" != "x" && \ | |
7676 | GNUSTEP_LOCAL_LIBRARIES="-L${GNUSTEP_LOCAL_LIBRARIES}" | |
7677 | CPPFLAGS="$CPPFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}" | |
7678 | CFLAGS="$CFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}" | |
7679 | LDFLAGS="$LDFLAGS -L${GNUSTEP_SYSTEM_LIBRARIES} ${GNUSTEP_LOCAL_LIBRARIES}" | |
7680 | LIB_STANDARD= | |
7681 | START_FILES= | |
7682 | TEMACS_LDFLAGS2= | |
7683 | fi | |
7684 | ac_fn_c_check_header_mongrel "$LINENO" "AppKit/AppKit.h" "ac_cv_header_AppKit_AppKit_h" "$ac_includes_default" | |
d6a003a8 | 7685 | if test "x$ac_cv_header_AppKit_AppKit_h" = xyes; then : |
067d23c9 KY |
7686 | HAVE_NS=yes |
7687 | else | |
d6a003a8 | 7688 | as_fn_error $? "\`--with-ns' was specified, but the include |
067d23c9 KY |
7689 | files are missing or cannot be compiled." "$LINENO" 5 |
7690 | fi | |
7691 | ||
7692 | ||
7693 | NS_HAVE_NSINTEGER=yes | |
7694 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7695 | /* end confdefs.h. */ | |
7696 | #include <Foundation/NSObjCRuntime.h> | |
7697 | int | |
7698 | main () | |
7699 | { | |
7700 | NSInteger i; | |
7701 | ; | |
7702 | return 0; | |
7703 | } | |
7704 | _ACEOF | |
7705 | if ac_fn_c_try_compile "$LINENO"; then : | |
7706 | ns_have_nsinteger=yes | |
7707 | else | |
7708 | ns_have_nsinteger=no | |
7709 | fi | |
7710 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7711 | if test $ns_have_nsinteger = no; then | |
7712 | NS_HAVE_NSINTEGER=no | |
7713 | fi | |
7714 | fi | |
7715 | ||
7716 | ||
7717 | ns_frag=/dev/null | |
7718 | NS_OBJ= | |
7719 | NS_SUPPORT= | |
7720 | if test "${HAVE_NS}" = yes; then | |
7721 | window_system=nextstep | |
7722 | with_xft=no | |
7723 | # set up packaging dirs | |
7724 | exec_prefix=${ns_appbindir} | |
7725 | libexecdir=${ns_appbindir}/libexec | |
7726 | if test "${EN_NS_SELF_CONTAINED}" = yes; then | |
7727 | prefix=${ns_appresdir} | |
7728 | fi | |
7729 | ns_frag=$srcdir/src/ns.mk | |
7730 | NS_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o fontset.o fringe.o image.o" | |
7731 | NS_SUPPORT="\${lispsource}/emacs-lisp/easymenu.elc \${lispsource}/term/ns-win.elc" | |
7732 | fi | |
7733 | CFLAGS="$tmp_CFLAGS" | |
7734 | CPPFLAGS="$tmp_CPPFLAGS" | |
7735 | ||
7736 | ||
7737 | ||
7738 | ||
7739 | ||
7740 | case "${window_system}" in | |
7741 | x11 ) | |
7742 | HAVE_X_WINDOWS=yes | |
7743 | HAVE_X11=yes | |
7744 | case "${with_x_toolkit}" in | |
7745 | athena | lucid ) USE_X_TOOLKIT=LUCID ;; | |
7746 | motif ) USE_X_TOOLKIT=MOTIF ;; | |
7747 | gtk ) with_gtk=yes | |
7748 | USE_X_TOOLKIT=none ;; | |
7749 | gtk3 ) with_gtk3=yes | |
7750 | USE_X_TOOLKIT=none ;; | |
7751 | no ) USE_X_TOOLKIT=none ;; | |
7752 | * ) USE_X_TOOLKIT=maybe ;; | |
7753 | esac | |
7754 | ;; | |
7755 | nextstep | none ) | |
7756 | HAVE_X_WINDOWS=no | |
7757 | HAVE_X11=no | |
7758 | USE_X_TOOLKIT=none | |
7759 | ;; | |
7760 | esac | |
7761 | ||
7762 | if test "$window_system" = none && test "X$with_x" != "Xno"; then | |
7763 | # Extract the first word of "X", so it can be a program name with args. | |
7764 | set dummy X; ac_word=$2 | |
7765 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
7766 | $as_echo_n "checking for $ac_word... " >&6; } | |
d6a003a8 | 7767 | if ${ac_cv_prog_HAVE_XSERVER+:} false; then : |
067d23c9 KY |
7768 | $as_echo_n "(cached) " >&6 |
7769 | else | |
7770 | if test -n "$HAVE_XSERVER"; then | |
7771 | ac_cv_prog_HAVE_XSERVER="$HAVE_XSERVER" # Let the user override the test. | |
7772 | else | |
7773 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7774 | for as_dir in $PATH | |
7775 | do | |
7776 | IFS=$as_save_IFS | |
7777 | test -z "$as_dir" && as_dir=. | |
7778 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7779 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
7780 | ac_cv_prog_HAVE_XSERVER="true" | |
7781 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7782 | break 2 | |
7783 | fi | |
7784 | done | |
7785 | done | |
7786 | IFS=$as_save_IFS | |
7787 | ||
7788 | test -z "$ac_cv_prog_HAVE_XSERVER" && ac_cv_prog_HAVE_XSERVER="false" | |
7789 | fi | |
7790 | fi | |
7791 | HAVE_XSERVER=$ac_cv_prog_HAVE_XSERVER | |
7792 | if test -n "$HAVE_XSERVER"; then | |
7793 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_XSERVER" >&5 | |
7794 | $as_echo "$HAVE_XSERVER" >&6; } | |
7795 | else | |
7796 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
7797 | $as_echo "no" >&6; } | |
7798 | fi | |
7799 | ||
7800 | ||
7801 | if test "$HAVE_XSERVER" = true || | |
7802 | test -n "$DISPLAY" || | |
7803 | test "`echo /usr/lib/libX11.*`" != "/usr/lib/libX11.*"; then | |
d6a003a8 | 7804 | as_fn_error $? "You seem to be running X, but no X development libraries |
067d23c9 KY |
7805 | were found. You should install the relevant development files for X |
7806 | and for the toolkit you want, such as Gtk+, Lesstif or Motif. Also make | |
7807 | sure you have development files for image handling, i.e. | |
7808 | tiff, gif, jpeg, png and xpm. | |
7809 | If you are sure you want Emacs compiled without X window support, pass | |
7810 | --without-x | |
7811 | to configure." "$LINENO" 5 | |
7812 | fi | |
7813 | fi | |
7814 | ||
7815 | ### If we're using X11, we should use the X menu package. | |
7816 | HAVE_MENUS=no | |
7817 | case ${HAVE_X11} in | |
7818 | yes ) HAVE_MENUS=yes ;; | |
7819 | esac | |
7820 | ||
7821 | # Do the opsystem or machine files prohibit the use of the GNU malloc? | |
7822 | # Assume not, until told otherwise. | |
7823 | GNU_MALLOC=yes | |
7824 | doug_lea_malloc=yes | |
7825 | ac_fn_c_check_func "$LINENO" "malloc_get_state" "ac_cv_func_malloc_get_state" | |
d6a003a8 | 7826 | if test "x$ac_cv_func_malloc_get_state" = xyes; then : |
067d23c9 KY |
7827 | |
7828 | else | |
7829 | doug_lea_malloc=no | |
7830 | fi | |
7831 | ||
7832 | ac_fn_c_check_func "$LINENO" "malloc_set_state" "ac_cv_func_malloc_set_state" | |
d6a003a8 | 7833 | if test "x$ac_cv_func_malloc_set_state" = xyes; then : |
067d23c9 KY |
7834 | |
7835 | else | |
7836 | doug_lea_malloc=no | |
7837 | fi | |
7838 | ||
7839 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __after_morecore_hook exists" >&5 | |
7840 | $as_echo_n "checking whether __after_morecore_hook exists... " >&6; } | |
d6a003a8 | 7841 | if ${emacs_cv_var___after_morecore_hook+:} false; then : |
067d23c9 KY |
7842 | $as_echo_n "(cached) " >&6 |
7843 | else | |
7844 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7845 | /* end confdefs.h. */ | |
7846 | extern void (* __after_morecore_hook)(); | |
7847 | int | |
7848 | main () | |
7849 | { | |
7850 | __after_morecore_hook = 0 | |
7851 | ; | |
7852 | return 0; | |
7853 | } | |
7854 | _ACEOF | |
7855 | if ac_fn_c_try_link "$LINENO"; then : | |
7856 | emacs_cv_var___after_morecore_hook=yes | |
7857 | else | |
7858 | emacs_cv_var___after_morecore_hook=no | |
7859 | fi | |
7860 | rm -f core conftest.err conftest.$ac_objext \ | |
7861 | conftest$ac_exeext conftest.$ac_ext | |
7862 | fi | |
7863 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_var___after_morecore_hook" >&5 | |
7864 | $as_echo "$emacs_cv_var___after_morecore_hook" >&6; } | |
7865 | if test $emacs_cv_var___after_morecore_hook = no; then | |
7866 | doug_lea_malloc=no | |
7867 | fi | |
7868 | ||
7869 | ||
7870 | system_malloc=no | |
7871 | case "$opsys" in | |
7872 | ## darwin ld insists on the use of malloc routines in the System framework. | |
7873 | darwin|sol2-10) system_malloc=yes ;; | |
7874 | esac | |
7875 | ||
7876 | if test "${system_malloc}" = "yes"; then | |
7877 | ||
7878 | $as_echo "#define SYSTEM_MALLOC 1" >>confdefs.h | |
7879 | ||
7880 | GNU_MALLOC=no | |
7881 | GNU_MALLOC_reason=" | |
7882 | (The GNU allocators don't work with this system configuration.)" | |
7883 | GMALLOC_OBJ= | |
7884 | VMLIMIT_OBJ= | |
7885 | else | |
7886 | test "$doug_lea_malloc" != "yes" && GMALLOC_OBJ=gmalloc.o | |
7887 | VMLIMIT_OBJ=vm-limit.o | |
7888 | fi | |
7889 | ||
7890 | ||
7891 | ||
7892 | if test "$doug_lea_malloc" = "yes" ; then | |
7893 | if test "$GNU_MALLOC" = yes ; then | |
7894 | GNU_MALLOC_reason=" | |
7895 | (Using Doug Lea's new malloc from the GNU C Library.)" | |
7896 | fi | |
7897 | ||
7898 | $as_echo "#define DOUG_LEA_MALLOC 1" >>confdefs.h | |
7899 | ||
7900 | ||
7901 | ## Use mmap directly for allocating larger buffers. | |
7902 | ## FIXME this comes from src/s/{gnu,gnu-linux}.h: | |
7903 | ## #ifdef DOUG_LEA_MALLOC; #undef REL_ALLOC; #endif | |
7904 | ## Does the AC_FUNC_MMAP test below make this check unecessary? | |
7905 | case "$opsys" in | |
7906 | gnu*) REL_ALLOC=no ;; | |
7907 | esac | |
7908 | fi | |
7909 | ||
7910 | if test x"${REL_ALLOC}" = x; then | |
7911 | REL_ALLOC=${GNU_MALLOC} | |
7912 | fi | |
7913 | ||
7914 | use_mmap_for_buffers=no | |
7915 | case "$opsys" in | |
7916 | freebsd|irix6-5) use_mmap_for_buffers=yes ;; | |
7917 | esac | |
7918 | ||
7919 | ||
7920 | ||
7921 | ||
7922 | for ac_header in $ac_header_list | |
7923 | do : | |
7924 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
7925 | ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default | |
7926 | " | |
d6a003a8 | 7927 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : |
067d23c9 KY |
7928 | cat >>confdefs.h <<_ACEOF |
7929 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
7930 | _ACEOF | |
7931 | ||
7932 | fi | |
7933 | ||
7934 | done | |
7935 | ||
7936 | ||
7937 | ||
7938 | ||
7939 | ||
7940 | ||
7941 | ||
7942 | ||
7943 | for ac_func in getpagesize | |
7944 | do : | |
7945 | ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" | |
d6a003a8 | 7946 | if test "x$ac_cv_func_getpagesize" = xyes; then : |
067d23c9 KY |
7947 | cat >>confdefs.h <<_ACEOF |
7948 | #define HAVE_GETPAGESIZE 1 | |
7949 | _ACEOF | |
7950 | ||
7951 | fi | |
7952 | done | |
7953 | ||
7954 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 | |
7955 | $as_echo_n "checking for working mmap... " >&6; } | |
d6a003a8 | 7956 | if ${ac_cv_func_mmap_fixed_mapped+:} false; then : |
067d23c9 KY |
7957 | $as_echo_n "(cached) " >&6 |
7958 | else | |
7959 | if test "$cross_compiling" = yes; then : | |
7960 | ac_cv_func_mmap_fixed_mapped=no | |
7961 | else | |
7962 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7963 | /* end confdefs.h. */ | |
7964 | $ac_includes_default | |
7965 | /* malloc might have been renamed as rpl_malloc. */ | |
7966 | #undef malloc | |
7967 | ||
7968 | /* Thanks to Mike Haertel and Jim Avera for this test. | |
7969 | Here is a matrix of mmap possibilities: | |
7970 | mmap private not fixed | |
7971 | mmap private fixed at somewhere currently unmapped | |
7972 | mmap private fixed at somewhere already mapped | |
7973 | mmap shared not fixed | |
7974 | mmap shared fixed at somewhere currently unmapped | |
7975 | mmap shared fixed at somewhere already mapped | |
7976 | For private mappings, we should verify that changes cannot be read() | |
7977 | back from the file, nor mmap's back from the file at a different | |
7978 | address. (There have been systems where private was not correctly | |
7979 | implemented like the infamous i386 svr4.0, and systems where the | |
7980 | VM page cache was not coherent with the file system buffer cache | |
7981 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
7982 | For shared mappings, we should conversely verify that changes get | |
7983 | propagated back to all the places they're supposed to be. | |
7984 | ||
7985 | Grep wants private fixed already mapped. | |
7986 | The main things grep needs to know about mmap are: | |
7987 | * does it exist and is it safe to write into the mmap'd area | |
7988 | * how to use it (BSD variants) */ | |
7989 | ||
7990 | #include <fcntl.h> | |
7991 | #include <sys/mman.h> | |
7992 | ||
7993 | #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H | |
7994 | char *malloc (); | |
7995 | #endif | |
7996 | ||
7997 | /* This mess was copied from the GNU getpagesize.h. */ | |
7998 | #ifndef HAVE_GETPAGESIZE | |
7999 | # ifdef _SC_PAGESIZE | |
8000 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
8001 | # else /* no _SC_PAGESIZE */ | |
8002 | # ifdef HAVE_SYS_PARAM_H | |
8003 | # include <sys/param.h> | |
8004 | # ifdef EXEC_PAGESIZE | |
8005 | # define getpagesize() EXEC_PAGESIZE | |
8006 | # else /* no EXEC_PAGESIZE */ | |
8007 | # ifdef NBPG | |
8008 | # define getpagesize() NBPG * CLSIZE | |
8009 | # ifndef CLSIZE | |
8010 | # define CLSIZE 1 | |
8011 | # endif /* no CLSIZE */ | |
8012 | # else /* no NBPG */ | |
8013 | # ifdef NBPC | |
8014 | # define getpagesize() NBPC | |
8015 | # else /* no NBPC */ | |
8016 | # ifdef PAGESIZE | |
8017 | # define getpagesize() PAGESIZE | |
8018 | # endif /* PAGESIZE */ | |
8019 | # endif /* no NBPC */ | |
8020 | # endif /* no NBPG */ | |
8021 | # endif /* no EXEC_PAGESIZE */ | |
8022 | # else /* no HAVE_SYS_PARAM_H */ | |
8023 | # define getpagesize() 8192 /* punt totally */ | |
8024 | # endif /* no HAVE_SYS_PARAM_H */ | |
8025 | # endif /* no _SC_PAGESIZE */ | |
8026 | ||
8027 | #endif /* no HAVE_GETPAGESIZE */ | |
8028 | ||
8029 | int | |
8030 | main () | |
8031 | { | |
8032 | char *data, *data2, *data3; | |
d6a003a8 | 8033 | const char *cdata2; |
067d23c9 KY |
8034 | int i, pagesize; |
8035 | int fd, fd2; | |
8036 | ||
8037 | pagesize = getpagesize (); | |
8038 | ||
8039 | /* First, make a file with some known garbage in it. */ | |
8040 | data = (char *) malloc (pagesize); | |
8041 | if (!data) | |
8042 | return 1; | |
8043 | for (i = 0; i < pagesize; ++i) | |
8044 | *(data + i) = rand (); | |
8045 | umask (0); | |
8046 | fd = creat ("conftest.mmap", 0600); | |
8047 | if (fd < 0) | |
8048 | return 2; | |
8049 | if (write (fd, data, pagesize) != pagesize) | |
8050 | return 3; | |
8051 | close (fd); | |
8052 | ||
8053 | /* Next, check that the tail of a page is zero-filled. File must have | |
8054 | non-zero length, otherwise we risk SIGBUS for entire page. */ | |
8055 | fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600); | |
8056 | if (fd2 < 0) | |
8057 | return 4; | |
d6a003a8 AS |
8058 | cdata2 = ""; |
8059 | if (write (fd2, cdata2, 1) != 1) | |
067d23c9 | 8060 | return 5; |
d6a003a8 | 8061 | data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L); |
067d23c9 KY |
8062 | if (data2 == MAP_FAILED) |
8063 | return 6; | |
8064 | for (i = 0; i < pagesize; ++i) | |
8065 | if (*(data2 + i)) | |
8066 | return 7; | |
8067 | close (fd2); | |
8068 | if (munmap (data2, pagesize)) | |
8069 | return 8; | |
8070 | ||
8071 | /* Next, try to mmap the file at a fixed address which already has | |
8072 | something else allocated at it. If we can, also make sure that | |
8073 | we see the same garbage. */ | |
8074 | fd = open ("conftest.mmap", O_RDWR); | |
8075 | if (fd < 0) | |
8076 | return 9; | |
8077 | if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, | |
8078 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
8079 | return 10; | |
8080 | for (i = 0; i < pagesize; ++i) | |
8081 | if (*(data + i) != *(data2 + i)) | |
8082 | return 11; | |
8083 | ||
8084 | /* Finally, make sure that changes to the mapped area do not | |
8085 | percolate back to the file as seen by read(). (This is a bug on | |
8086 | some variants of i386 svr4.0.) */ | |
8087 | for (i = 0; i < pagesize; ++i) | |
8088 | *(data2 + i) = *(data2 + i) + 1; | |
8089 | data3 = (char *) malloc (pagesize); | |
8090 | if (!data3) | |
8091 | return 12; | |
8092 | if (read (fd, data3, pagesize) != pagesize) | |
8093 | return 13; | |
8094 | for (i = 0; i < pagesize; ++i) | |
8095 | if (*(data + i) != *(data3 + i)) | |
8096 | return 14; | |
8097 | close (fd); | |
8098 | return 0; | |
8099 | } | |
8100 | _ACEOF | |
8101 | if ac_fn_c_try_run "$LINENO"; then : | |
8102 | ac_cv_func_mmap_fixed_mapped=yes | |
8103 | else | |
8104 | ac_cv_func_mmap_fixed_mapped=no | |
8105 | fi | |
8106 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
8107 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
8108 | fi | |
8109 | ||
8110 | fi | |
8111 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5 | |
8112 | $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; } | |
8113 | if test $ac_cv_func_mmap_fixed_mapped = yes; then | |
8114 | ||
8115 | $as_echo "#define HAVE_MMAP 1" >>confdefs.h | |
8116 | ||
8117 | fi | |
8118 | rm -f conftest.mmap conftest.txt | |
8119 | ||
8120 | if test $use_mmap_for_buffers = yes; then | |
8121 | ||
8122 | $as_echo "#define USE_MMAP_FOR_BUFFERS 1" >>confdefs.h | |
8123 | ||
8124 | REL_ALLOC=no | |
8125 | fi | |
8126 | ||
8127 | LIBS="$LIBS_SYSTEM $LIBS" | |
8128 | ||
8129 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5 | |
8130 | $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; } | |
d6a003a8 | 8131 | if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then : |
067d23c9 KY |
8132 | $as_echo_n "(cached) " >&6 |
8133 | else | |
8134 | ac_check_lib_save_LIBS=$LIBS | |
8135 | LIBS="-ldnet $LIBS" | |
8136 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8137 | /* end confdefs.h. */ | |
8138 | ||
8139 | /* Override any GCC internal prototype to avoid an error. | |
8140 | Use char because int might match the return type of a GCC | |
8141 | builtin and then its argument prototype would still apply. */ | |
8142 | #ifdef __cplusplus | |
8143 | extern "C" | |
8144 | #endif | |
8145 | char dnet_ntoa (); | |
8146 | int | |
8147 | main () | |
8148 | { | |
8149 | return dnet_ntoa (); | |
8150 | ; | |
8151 | return 0; | |
8152 | } | |
8153 | _ACEOF | |
8154 | if ac_fn_c_try_link "$LINENO"; then : | |
8155 | ac_cv_lib_dnet_dnet_ntoa=yes | |
8156 | else | |
8157 | ac_cv_lib_dnet_dnet_ntoa=no | |
8158 | fi | |
8159 | rm -f core conftest.err conftest.$ac_objext \ | |
8160 | conftest$ac_exeext conftest.$ac_ext | |
8161 | LIBS=$ac_check_lib_save_LIBS | |
8162 | fi | |
8163 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 | |
8164 | $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; } | |
d6a003a8 | 8165 | if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then : |
067d23c9 KY |
8166 | cat >>confdefs.h <<_ACEOF |
8167 | #define HAVE_LIBDNET 1 | |
8168 | _ACEOF | |
8169 | ||
8170 | LIBS="-ldnet $LIBS" | |
8171 | ||
8172 | fi | |
8173 | ||
8174 | ||
8175 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lXbsd" >&5 | |
8176 | $as_echo_n "checking for main in -lXbsd... " >&6; } | |
d6a003a8 | 8177 | if ${ac_cv_lib_Xbsd_main+:} false; then : |
067d23c9 KY |
8178 | $as_echo_n "(cached) " >&6 |
8179 | else | |
8180 | ac_check_lib_save_LIBS=$LIBS | |
8181 | LIBS="-lXbsd $LIBS" | |
8182 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8183 | /* end confdefs.h. */ | |
8184 | ||
8185 | ||
8186 | int | |
8187 | main () | |
8188 | { | |
8189 | return main (); | |
8190 | ; | |
8191 | return 0; | |
8192 | } | |
8193 | _ACEOF | |
8194 | if ac_fn_c_try_link "$LINENO"; then : | |
8195 | ac_cv_lib_Xbsd_main=yes | |
8196 | else | |
8197 | ac_cv_lib_Xbsd_main=no | |
8198 | fi | |
8199 | rm -f core conftest.err conftest.$ac_objext \ | |
8200 | conftest$ac_exeext conftest.$ac_ext | |
8201 | LIBS=$ac_check_lib_save_LIBS | |
8202 | fi | |
8203 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xbsd_main" >&5 | |
8204 | $as_echo "$ac_cv_lib_Xbsd_main" >&6; } | |
d6a003a8 | 8205 | if test "x$ac_cv_lib_Xbsd_main" = xyes; then : |
067d23c9 KY |
8206 | LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd" |
8207 | fi | |
8208 | ||
8209 | ||
8210 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cma_open in -lpthreads" >&5 | |
8211 | $as_echo_n "checking for cma_open in -lpthreads... " >&6; } | |
d6a003a8 | 8212 | if ${ac_cv_lib_pthreads_cma_open+:} false; then : |
067d23c9 KY |
8213 | $as_echo_n "(cached) " >&6 |
8214 | else | |
8215 | ac_check_lib_save_LIBS=$LIBS | |
8216 | LIBS="-lpthreads $LIBS" | |
8217 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8218 | /* end confdefs.h. */ | |
8219 | ||
8220 | /* Override any GCC internal prototype to avoid an error. | |
8221 | Use char because int might match the return type of a GCC | |
8222 | builtin and then its argument prototype would still apply. */ | |
8223 | #ifdef __cplusplus | |
8224 | extern "C" | |
8225 | #endif | |
8226 | char cma_open (); | |
8227 | int | |
8228 | main () | |
8229 | { | |
8230 | return cma_open (); | |
8231 | ; | |
8232 | return 0; | |
8233 | } | |
8234 | _ACEOF | |
8235 | if ac_fn_c_try_link "$LINENO"; then : | |
8236 | ac_cv_lib_pthreads_cma_open=yes | |
8237 | else | |
8238 | ac_cv_lib_pthreads_cma_open=no | |
8239 | fi | |
8240 | rm -f core conftest.err conftest.$ac_objext \ | |
8241 | conftest$ac_exeext conftest.$ac_ext | |
8242 | LIBS=$ac_check_lib_save_LIBS | |
8243 | fi | |
8244 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_cma_open" >&5 | |
8245 | $as_echo "$ac_cv_lib_pthreads_cma_open" >&6; } | |
d6a003a8 | 8246 | if test "x$ac_cv_lib_pthreads_cma_open" = xyes; then : |
067d23c9 KY |
8247 | cat >>confdefs.h <<_ACEOF |
8248 | #define HAVE_LIBPTHREADS 1 | |
8249 | _ACEOF | |
8250 | ||
8251 | LIBS="-lpthreads $LIBS" | |
8252 | ||
8253 | fi | |
8254 | ||
8255 | ||
8256 | ## Note: when using cpp in s/aix4.2.h, this definition depended on | |
8257 | ## HAVE_LIBPTHREADS. That was not defined earlier in configure when | |
8258 | ## the system file was sourced. Hence the value of LIBS_SYSTEM | |
8259 | ## added to LIBS in configure would never contain the pthreads part, | |
8260 | ## but the value used in Makefiles might. FIXME? | |
8261 | ## | |
8262 | ## -lpthreads seems to be necessary for Xlib in X11R6, and should | |
8263 | ## be harmless on older versions of X where it happens to exist. | |
8264 | test "$opsys" = "aix4-2" && \ | |
8265 | test $ac_cv_lib_pthreads_cma_open = yes && \ | |
8266 | LIBS_SYSTEM="$LIBS_SYSTEM -lpthreads" | |
8267 | ||
8268 | ||
8269 | case ${host_os} in | |
8270 | aix*) | |
8271 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5 | |
8272 | $as_echo_n "checking for -bbigtoc option... " >&6; } | |
d6a003a8 | 8273 | if ${gdb_cv_bigtoc+:} false; then : |
067d23c9 KY |
8274 | $as_echo_n "(cached) " >&6 |
8275 | else | |
8276 | ||
8277 | case $GCC in | |
8278 | yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;; | |
8279 | *) gdb_cv_bigtoc=-bbigtoc ;; | |
8280 | esac | |
8281 | ||
8282 | LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc | |
8283 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8284 | /* end confdefs.h. */ | |
8285 | ||
8286 | int | |
8287 | main () | |
8288 | { | |
8289 | int i; | |
8290 | ; | |
8291 | return 0; | |
8292 | } | |
8293 | _ACEOF | |
8294 | if ac_fn_c_try_link "$LINENO"; then : | |
8295 | ||
8296 | else | |
8297 | gdb_cv_bigtoc= | |
8298 | fi | |
8299 | rm -f core conftest.err conftest.$ac_objext \ | |
8300 | conftest$ac_exeext conftest.$ac_ext | |
8301 | ||
8302 | fi | |
8303 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5 | |
8304 | $as_echo "$gdb_cv_bigtoc" >&6; } | |
8305 | ;; | |
8306 | esac | |
8307 | ||
8308 | # Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets | |
8309 | # used for the tests that follow. We set them back to REAL_CFLAGS and | |
8310 | # REAL_CPPFLAGS later on. | |
8311 | ||
8312 | REAL_CFLAGS="$CFLAGS" | |
8313 | REAL_CPPFLAGS="$CPPFLAGS" | |
8314 | ||
8315 | if test "${HAVE_X11}" = "yes"; then | |
8316 | DEFS="$C_SWITCH_X_SITE $DEFS" | |
8317 | LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE" | |
8318 | LIBS="-lX11 $LIBS" | |
8319 | CFLAGS="$C_SWITCH_X_SITE $CFLAGS" | |
8320 | CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS" | |
8321 | ||
8322 | # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests. | |
8323 | # This is handled by LD_SWITCH_X_SITE_AUX during the real build, | |
8324 | # but it's more convenient here to set LD_RUN_PATH | |
8325 | # since this also works on hosts that don't understand LD_SWITCH_X_SITE_AUX. | |
8326 | if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then | |
8327 | LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH | |
8328 | export LD_RUN_PATH | |
8329 | fi | |
8330 | ||
8331 | if test "${opsys}" = "gnu-linux"; then | |
8332 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether X on GNU/Linux needs -b to link" >&5 | |
8333 | $as_echo_n "checking whether X on GNU/Linux needs -b to link... " >&6; } | |
8334 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8335 | /* end confdefs.h. */ | |
8336 | ||
8337 | int | |
8338 | main () | |
8339 | { | |
8340 | XOpenDisplay ("foo"); | |
8341 | ; | |
8342 | return 0; | |
8343 | } | |
8344 | _ACEOF | |
8345 | if ac_fn_c_try_link "$LINENO"; then : | |
8346 | xlinux_first_failure=no | |
8347 | else | |
8348 | xlinux_first_failure=yes | |
8349 | fi | |
8350 | rm -f core conftest.err conftest.$ac_objext \ | |
8351 | conftest$ac_exeext conftest.$ac_ext | |
8352 | if test "${xlinux_first_failure}" = "yes"; then | |
8353 | OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE" | |
8354 | OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE" | |
8355 | OLD_CPPFLAGS="$CPPFLAGS" | |
8356 | OLD_LIBS="$LIBS" | |
8357 | LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout" | |
8358 | C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout" | |
8359 | CPPFLAGS="$CPPFLAGS -b i486-linuxaout" | |
8360 | LIBS="$LIBS -b i486-linuxaout" | |
8361 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8362 | /* end confdefs.h. */ | |
8363 | ||
8364 | int | |
8365 | main () | |
8366 | { | |
8367 | XOpenDisplay ("foo"); | |
8368 | ; | |
8369 | return 0; | |
8370 | } | |
8371 | _ACEOF | |
8372 | if ac_fn_c_try_link "$LINENO"; then : | |
8373 | xlinux_second_failure=no | |
8374 | else | |
8375 | xlinux_second_failure=yes | |
8376 | fi | |
8377 | rm -f core conftest.err conftest.$ac_objext \ | |
8378 | conftest$ac_exeext conftest.$ac_ext | |
8379 | if test "${xlinux_second_failure}" = "yes"; then | |
8380 | # If we get the same failure with -b, there is no use adding -b. | |
8381 | # So take it out. This plays safe. | |
8382 | LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE" | |
8383 | C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE" | |
8384 | CPPFLAGS="$OLD_CPPFLAGS" | |
8385 | LIBS="$OLD_LIBS" | |
8386 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
8387 | $as_echo "no" >&6; } | |
8388 | else | |
8389 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
8390 | $as_echo "yes" >&6; } | |
8391 | fi | |
8392 | else | |
8393 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
8394 | $as_echo "no" >&6; } | |
8395 | fi | |
8396 | fi | |
8397 | ||
8398 | # Reportedly, some broken Solaris systems have XKBlib.h but are missing | |
8399 | # header files included from there. | |
8400 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Xkb" >&5 | |
8401 | $as_echo_n "checking for Xkb... " >&6; } | |
8402 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8403 | /* end confdefs.h. */ | |
8404 | #include <X11/Xlib.h> | |
8405 | #include <X11/XKBlib.h> | |
8406 | int | |
8407 | main () | |
8408 | { | |
8409 | XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd); | |
8410 | ; | |
8411 | return 0; | |
8412 | } | |
8413 | _ACEOF | |
8414 | if ac_fn_c_try_link "$LINENO"; then : | |
8415 | emacs_xkb=yes | |
8416 | else | |
8417 | emacs_xkb=no | |
8418 | fi | |
8419 | rm -f core conftest.err conftest.$ac_objext \ | |
8420 | conftest$ac_exeext conftest.$ac_ext | |
8421 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_xkb" >&5 | |
8422 | $as_echo "$emacs_xkb" >&6; } | |
8423 | if test $emacs_xkb = yes; then | |
8424 | ||
8425 | $as_echo "#define HAVE_XKBGETKEYBOARD 1" >>confdefs.h | |
8426 | ||
8427 | fi | |
8428 | ||
8429 | for ac_func in XrmSetDatabase XScreenResourceString \ | |
8430 | XScreenNumberOfScreen XSetWMProtocols | |
8431 | do : | |
8432 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
8433 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
d6a003a8 | 8434 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : |
067d23c9 KY |
8435 | cat >>confdefs.h <<_ACEOF |
8436 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
8437 | _ACEOF | |
8438 | ||
8439 | fi | |
8440 | done | |
8441 | ||
8442 | fi | |
8443 | ||
8444 | if test "${window_system}" = "x11"; then | |
8445 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 version 6" >&5 | |
8446 | $as_echo_n "checking X11 version 6... " >&6; } | |
d6a003a8 | 8447 | if ${emacs_cv_x11_version_6+:} false; then : |
067d23c9 KY |
8448 | $as_echo_n "(cached) " >&6 |
8449 | else | |
8450 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8451 | /* end confdefs.h. */ | |
8452 | #include <X11/Xlib.h> | |
8453 | int | |
8454 | main () | |
8455 | { | |
8456 | #if XlibSpecificationRelease < 6 | |
8457 | fail; | |
8458 | #endif | |
8459 | ||
8460 | ; | |
8461 | return 0; | |
8462 | } | |
8463 | _ACEOF | |
8464 | if ac_fn_c_try_link "$LINENO"; then : | |
8465 | emacs_cv_x11_version_6=yes | |
8466 | else | |
8467 | emacs_cv_x11_version_6=no | |
8468 | fi | |
8469 | rm -f core conftest.err conftest.$ac_objext \ | |
8470 | conftest$ac_exeext conftest.$ac_ext | |
8471 | fi | |
8472 | ||
8473 | if test $emacs_cv_x11_version_6 = yes; then | |
8474 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5 | |
8475 | $as_echo "6 or newer" >&6; } | |
8476 | ||
8477 | $as_echo "#define HAVE_X11R6 1" >>confdefs.h | |
8478 | ||
8479 | ||
8480 | $as_echo "#define HAVE_X_I18N 1" >>confdefs.h | |
8481 | ||
8482 | ## inoue@ainet.or.jp says Solaris has a bug related to X11R6-style | |
8483 | ## XIM support. | |
8484 | case "$opsys" in | |
8485 | sol2-*) : ;; | |
8486 | *) | |
8487 | $as_echo "#define HAVE_X11R6_XIM 1" >>confdefs.h | |
8488 | ||
8489 | ;; | |
8490 | esac | |
8491 | else | |
8492 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5 | |
8493 | $as_echo "before 6" >&6; } | |
8494 | fi | |
8495 | fi | |
8496 | ||
8497 | ||
8498 | ### Use -lrsvg-2 if available, unless `--with-rsvg=no' is specified. | |
8499 | HAVE_RSVG=no | |
8500 | if test "${HAVE_X11}" = "yes" || test "${NS_IMPL_GNUSTEP}" = "yes"; then | |
8501 | if test "${with_rsvg}" != "no"; then | |
8502 | RSVG_REQUIRED=2.11.0 | |
8503 | RSVG_MODULE="librsvg-2.0 >= $RSVG_REQUIRED" | |
8504 | ||
8505 | ||
8506 | succeeded=no | |
8507 | ||
8508 | # Extract the first word of "pkg-config", so it can be a program name with args. | |
8509 | set dummy pkg-config; ac_word=$2 | |
8510 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
8511 | $as_echo_n "checking for $ac_word... " >&6; } | |
d6a003a8 | 8512 | if ${ac_cv_path_PKG_CONFIG+:} false; then : |
067d23c9 KY |
8513 | $as_echo_n "(cached) " >&6 |
8514 | else | |
8515 | case $PKG_CONFIG in | |
8516 | [\\/]* | ?:[\\/]*) | |
8517 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
8518 | ;; | |
8519 | *) | |
8520 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8521 | for as_dir in $PATH | |
8522 | do | |
8523 | IFS=$as_save_IFS | |
8524 | test -z "$as_dir" && as_dir=. | |
8525 | for ac_exec_ext in '' $ac_executable_extensions; do | |
8526 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
8527 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
8528 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
8529 | break 2 | |
8530 | fi | |
8531 | done | |
8532 | done | |
8533 | IFS=$as_save_IFS | |
8534 | ||
8535 | test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" | |
8536 | ;; | |
8537 | esac | |
8538 | fi | |
8539 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG | |
8540 | if test -n "$PKG_CONFIG"; then | |
8541 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
8542 | $as_echo "$PKG_CONFIG" >&6; } | |
8543 | else | |
8544 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
8545 | $as_echo "no" >&6; } | |
8546 | fi | |
8547 | ||
8548 | ||
8549 | ||
8550 | if test "$PKG_CONFIG" = "no" ; then | |
8551 | : | |
8552 | else | |
8553 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
8554 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
8555 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $RSVG_MODULE" >&5 | |
8556 | $as_echo_n "checking for $RSVG_MODULE... " >&6; } | |
8557 | ||
8558 | if $PKG_CONFIG --exists "$RSVG_MODULE" 2>&5; then | |
8559 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
8560 | $as_echo "yes" >&6; } | |
8561 | succeeded=yes | |
8562 | ||
8563 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking RSVG_CFLAGS" >&5 | |
8564 | $as_echo_n "checking RSVG_CFLAGS... " >&6; } | |
8565 | RSVG_CFLAGS=`$PKG_CONFIG --cflags "$RSVG_MODULE"|sed -e 's,///*,/,g'` | |
8566 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RSVG_CFLAGS" >&5 | |
8567 | $as_echo "$RSVG_CFLAGS" >&6; } | |
8568 | ||
8569 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking RSVG_LIBS" >&5 | |
8570 | $as_echo_n "checking RSVG_LIBS... " >&6; } | |
8571 | RSVG_LIBS=`$PKG_CONFIG --libs "$RSVG_MODULE"|sed -e 's,///*,/,g'` | |
8572 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RSVG_LIBS" >&5 | |
8573 | $as_echo "$RSVG_LIBS" >&6; } | |
8574 | else | |
8575 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
8576 | $as_echo "no" >&6; } | |
8577 | RSVG_CFLAGS="" | |
8578 | RSVG_LIBS="" | |
8579 | ## If we have a custom action on failure, don't print errors, but | |
8580 | ## do set a variable so people can do so. | |
8581 | RSVG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$RSVG_MODULE"` | |
8582 | ||
8583 | fi | |
8584 | ||
8585 | ||
8586 | ||
8587 | else | |
8588 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
8589 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
8590 | fi | |
8591 | fi | |
8592 | ||
8593 | if test $succeeded = yes; then | |
8594 | HAVE_RSVG=yes | |
8595 | else | |
8596 | : | |
8597 | fi | |
8598 | ||
8599 | ||
8600 | ||
8601 | ||
8602 | if test $HAVE_RSVG = yes; then | |
8603 | ||
8604 | $as_echo "#define HAVE_RSVG 1" >>confdefs.h | |
8605 | ||
8606 | CFLAGS="$CFLAGS $RSVG_CFLAGS" | |
8607 | LIBS="$RSVG_LIBS $LIBS" | |
8608 | fi | |
8609 | fi | |
8610 | fi | |
8611 | ||
8612 | HAVE_IMAGEMAGICK=no | |
8613 | if test "${HAVE_X11}" = "yes"; then | |
8614 | if test "${with_imagemagick}" != "no"; then | |
8615 | IMAGEMAGICK_MODULE="Wand" | |
8616 | ||
8617 | succeeded=no | |
8618 | ||
8619 | # Extract the first word of "pkg-config", so it can be a program name with args. | |
8620 | set dummy pkg-config; ac_word=$2 | |
8621 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
8622 | $as_echo_n "checking for $ac_word... " >&6; } | |
d6a003a8 | 8623 | if ${ac_cv_path_PKG_CONFIG+:} false; then : |
067d23c9 KY |
8624 | $as_echo_n "(cached) " >&6 |
8625 | else | |
8626 | case $PKG_CONFIG in | |
8627 | [\\/]* | ?:[\\/]*) | |
8628 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
8629 | ;; | |
8630 | *) | |
8631 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8632 | for as_dir in $PATH | |
8633 | do | |
8634 | IFS=$as_save_IFS | |
8635 | test -z "$as_dir" && as_dir=. | |
8636 | for ac_exec_ext in '' $ac_executable_extensions; do | |
8637 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
8638 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
8639 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
8640 | break 2 | |
8641 | fi | |
8642 | done | |
8643 | done | |
8644 | IFS=$as_save_IFS | |
8645 | ||
8646 | test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" | |
8647 | ;; | |
8648 | esac | |
8649 | fi | |
8650 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG | |
8651 | if test -n "$PKG_CONFIG"; then | |
8652 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
8653 | $as_echo "$PKG_CONFIG" >&6; } | |
8654 | else | |
8655 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
8656 | $as_echo "no" >&6; } | |
8657 | fi | |
8658 | ||
8659 | ||
8660 | ||
8661 | if test "$PKG_CONFIG" = "no" ; then | |
8662 | : | |
8663 | else | |
8664 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
8665 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
8666 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $IMAGEMAGICK_MODULE" >&5 | |
8667 | $as_echo_n "checking for $IMAGEMAGICK_MODULE... " >&6; } | |
8668 | ||
8669 | if $PKG_CONFIG --exists "$IMAGEMAGICK_MODULE" 2>&5; then | |
8670 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
8671 | $as_echo "yes" >&6; } | |
8672 | succeeded=yes | |
8673 | ||
8674 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking IMAGEMAGICK_CFLAGS" >&5 | |
8675 | $as_echo_n "checking IMAGEMAGICK_CFLAGS... " >&6; } | |
8676 | IMAGEMAGICK_CFLAGS=`$PKG_CONFIG --cflags "$IMAGEMAGICK_MODULE"|sed -e 's,///*,/,g'` | |
8677 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $IMAGEMAGICK_CFLAGS" >&5 | |
8678 | $as_echo "$IMAGEMAGICK_CFLAGS" >&6; } | |
8679 | ||
8680 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking IMAGEMAGICK_LIBS" >&5 | |
8681 | $as_echo_n "checking IMAGEMAGICK_LIBS... " >&6; } | |
8682 | IMAGEMAGICK_LIBS=`$PKG_CONFIG --libs "$IMAGEMAGICK_MODULE"|sed -e 's,///*,/,g'` | |
8683 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $IMAGEMAGICK_LIBS" >&5 | |
8684 | $as_echo "$IMAGEMAGICK_LIBS" >&6; } | |
8685 | else | |
8686 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
8687 | $as_echo "no" >&6; } | |
8688 | IMAGEMAGICK_CFLAGS="" | |
8689 | IMAGEMAGICK_LIBS="" | |
8690 | ## If we have a custom action on failure, don't print errors, but | |
8691 | ## do set a variable so people can do so. | |
8692 | IMAGEMAGICK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$IMAGEMAGICK_MODULE"` | |
8693 | ||
8694 | fi | |
8695 | ||
8696 | ||
8697 | ||
8698 | else | |
8699 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
8700 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
8701 | fi | |
8702 | fi | |
8703 | ||
8704 | if test $succeeded = yes; then | |
8705 | HAVE_IMAGEMAGICK=yes | |
8706 | else | |
8707 | : | |
8708 | fi | |
8709 | ||
8710 | ||
8711 | ||
8712 | ||
8713 | if test $HAVE_IMAGEMAGICK = yes; then | |
8714 | ||
8715 | $as_echo "#define HAVE_IMAGEMAGICK 1" >>confdefs.h | |
8716 | ||
8717 | CFLAGS="$CFLAGS $IMAGEMAGICK_CFLAGS" | |
8718 | LIBS="$IMAGEMAGICK_LIBS $LIBS" | |
8719 | for ac_func in MagickExportImagePixels | |
8720 | do : | |
8721 | ac_fn_c_check_func "$LINENO" "MagickExportImagePixels" "ac_cv_func_MagickExportImagePixels" | |
d6a003a8 | 8722 | if test "x$ac_cv_func_MagickExportImagePixels" = xyes; then : |
067d23c9 KY |
8723 | cat >>confdefs.h <<_ACEOF |
8724 | #define HAVE_MAGICKEXPORTIMAGEPIXELS 1 | |
8725 | _ACEOF | |
8726 | ||
8727 | fi | |
8728 | done | |
8729 | ||
8730 | fi | |
8731 | fi | |
8732 | fi | |
8733 | ||
8734 | ||
8735 | HAVE_GTK=no | |
8736 | if test "${with_gtk3}" = "yes"; then | |
8737 | GLIB_REQUIRED=2.6 | |
8738 | GTK_REQUIRED=2.90 | |
8739 | GTK_MODULES="gtk+-3.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED" | |
8740 | ||
8741 | ||
8742 | succeeded=no | |
8743 | ||
8744 | # Extract the first word of "pkg-config", so it can be a program name with args. | |
8745 | set dummy pkg-config; ac_word=$2 | |
8746 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
8747 | $as_echo_n "checking for $ac_word... " >&6; } | |
d6a003a8 | 8748 | if ${ac_cv_path_PKG_CONFIG+:} false; then : |
067d23c9 KY |
8749 | $as_echo_n "(cached) " >&6 |
8750 | else | |
8751 | case $PKG_CONFIG in | |
8752 | [\\/]* | ?:[\\/]*) | |
8753 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
8754 | ;; | |
8755 | *) | |
8756 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8757 | for as_dir in $PATH | |
8758 | do | |
8759 | IFS=$as_save_IFS | |
8760 | test -z "$as_dir" && as_dir=. | |
8761 | for ac_exec_ext in '' $ac_executable_extensions; do | |
8762 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
8763 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
8764 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
8765 | break 2 | |
8766 | fi | |
8767 | done | |
8768 | done | |
8769 | IFS=$as_save_IFS | |
8770 | ||
8771 | test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" | |
8772 | ;; | |
8773 | esac | |
8774 | fi | |
8775 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG | |
8776 | if test -n "$PKG_CONFIG"; then | |
8777 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
8778 | $as_echo "$PKG_CONFIG" >&6; } | |
8779 | else | |
8780 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
8781 | $as_echo "no" >&6; } | |
8782 | fi | |
8783 | ||
8784 | ||
8785 | ||
8786 | if test "$PKG_CONFIG" = "no" ; then | |
8787 | pkg_check_gtk=no | |
8788 | else | |
8789 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
8790 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
8791 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTK_MODULES" >&5 | |
8792 | $as_echo_n "checking for $GTK_MODULES... " >&6; } | |
8793 | ||
8794 | if $PKG_CONFIG --exists "$GTK_MODULES" 2>&5; then | |
8795 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
8796 | $as_echo "yes" >&6; } | |
8797 | succeeded=yes | |
8798 | ||
8799 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking GTK_CFLAGS" >&5 | |
8800 | $as_echo_n "checking GTK_CFLAGS... " >&6; } | |
8801 | GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES"|sed -e 's,///*,/,g'` | |
8802 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_CFLAGS" >&5 | |
8803 | $as_echo "$GTK_CFLAGS" >&6; } | |
8804 | ||
8805 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking GTK_LIBS" >&5 | |
8806 | $as_echo_n "checking GTK_LIBS... " >&6; } | |
8807 | GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES"|sed -e 's,///*,/,g'` | |
8808 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_LIBS" >&5 | |
8809 | $as_echo "$GTK_LIBS" >&6; } | |
8810 | else | |
8811 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
8812 | $as_echo "no" >&6; } | |
8813 | GTK_CFLAGS="" | |
8814 | GTK_LIBS="" | |
8815 | ## If we have a custom action on failure, don't print errors, but | |
8816 | ## do set a variable so people can do so. | |
8817 | GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"` | |
8818 | ||
8819 | fi | |
8820 | ||
8821 | ||
8822 | ||
8823 | else | |
8824 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
8825 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
8826 | fi | |
8827 | fi | |
8828 | ||
8829 | if test $succeeded = yes; then | |
8830 | pkg_check_gtk=yes | |
8831 | else | |
8832 | pkg_check_gtk=no | |
8833 | fi | |
8834 | ||
8835 | if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then | |
d6a003a8 | 8836 | as_fn_error $? "$GTK_PKG_ERRORS" "$LINENO" 5 |
067d23c9 KY |
8837 | fi |
8838 | fi | |
8839 | ||
8840 | if test "$pkg_check_gtk" != "yes"; then | |
8841 | HAVE_GTK=no | |
8842 | if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "maybe"; then | |
8843 | GLIB_REQUIRED=2.6 | |
8844 | GTK_REQUIRED=2.6 | |
8845 | GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED" | |
8846 | ||
8847 | ||
8848 | succeeded=no | |
8849 | ||
8850 | # Extract the first word of "pkg-config", so it can be a program name with args. | |
8851 | set dummy pkg-config; ac_word=$2 | |
8852 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
8853 | $as_echo_n "checking for $ac_word... " >&6; } | |
d6a003a8 | 8854 | if ${ac_cv_path_PKG_CONFIG+:} false; then : |
067d23c9 KY |
8855 | $as_echo_n "(cached) " >&6 |
8856 | else | |
8857 | case $PKG_CONFIG in | |
8858 | [\\/]* | ?:[\\/]*) | |
8859 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
8860 | ;; | |
8861 | *) | |
8862 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8863 | for as_dir in $PATH | |
8864 | do | |
8865 | IFS=$as_save_IFS | |
8866 | test -z "$as_dir" && as_dir=. | |
8867 | for ac_exec_ext in '' $ac_executable_extensions; do | |
8868 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
8869 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
8870 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
8871 | break 2 | |
8872 | fi | |
8873 | done | |
8874 | done | |
8875 | IFS=$as_save_IFS | |
8876 | ||
8877 | test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" | |
8878 | ;; | |
8879 | esac | |
8880 | fi | |
8881 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG | |
8882 | if test -n "$PKG_CONFIG"; then | |
8883 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
8884 | $as_echo "$PKG_CONFIG" >&6; } | |
8885 | else | |
8886 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
8887 | $as_echo "no" >&6; } | |
8888 | fi | |
8889 | ||
8890 | ||
8891 | ||
8892 | if test "$PKG_CONFIG" = "no" ; then | |
8893 | pkg_check_gtk=no | |
8894 | else | |
8895 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
8896 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
8897 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTK_MODULES" >&5 | |
8898 | $as_echo_n "checking for $GTK_MODULES... " >&6; } | |
8899 | ||
8900 | if $PKG_CONFIG --exists "$GTK_MODULES" 2>&5; then | |
8901 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
8902 | $as_echo "yes" >&6; } | |
8903 | succeeded=yes | |
8904 | ||
8905 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking GTK_CFLAGS" >&5 | |
8906 | $as_echo_n "checking GTK_CFLAGS... " >&6; } | |
8907 | GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES"|sed -e 's,///*,/,g'` | |
8908 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_CFLAGS" >&5 | |
8909 | $as_echo "$GTK_CFLAGS" >&6; } | |
8910 | ||
8911 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking GTK_LIBS" >&5 | |
8912 | $as_echo_n "checking GTK_LIBS... " >&6; } | |
8913 | GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES"|sed -e 's,///*,/,g'` | |
8914 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_LIBS" >&5 | |
8915 | $as_echo "$GTK_LIBS" >&6; } | |
8916 | else | |
8917 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
8918 | $as_echo "no" >&6; } | |
8919 | GTK_CFLAGS="" | |
8920 | GTK_LIBS="" | |
8921 | ## If we have a custom action on failure, don't print errors, but | |
8922 | ## do set a variable so people can do so. | |
8923 | GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"` | |
8924 | ||
8925 | fi | |
8926 | ||
8927 | ||
8928 | ||
8929 | else | |
8930 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
8931 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
8932 | fi | |
8933 | fi | |
8934 | ||
8935 | if test $succeeded = yes; then | |
8936 | pkg_check_gtk=yes | |
8937 | else | |
8938 | pkg_check_gtk=no | |
8939 | fi | |
8940 | ||
8941 | if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then | |
d6a003a8 | 8942 | as_fn_error $? "$GTK_PKG_ERRORS" "$LINENO" 5 |
067d23c9 KY |
8943 | fi |
8944 | fi | |
8945 | fi | |
8946 | ||
8947 | GTK_OBJ= | |
8948 | if test x"$pkg_check_gtk" = xyes; then | |
8949 | ||
8950 | ||
8951 | ||
8952 | C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS" | |
8953 | CFLAGS="$CFLAGS $GTK_CFLAGS" | |
8954 | LIBS="$GTK_LIBS $LIBS" | |
8955 | GTK_COMPILES=no | |
8956 | for ac_func in gtk_main | |
8957 | do : | |
8958 | ac_fn_c_check_func "$LINENO" "gtk_main" "ac_cv_func_gtk_main" | |
d6a003a8 | 8959 | if test "x$ac_cv_func_gtk_main" = xyes; then : |
067d23c9 KY |
8960 | cat >>confdefs.h <<_ACEOF |
8961 | #define HAVE_GTK_MAIN 1 | |
8962 | _ACEOF | |
8963 | GTK_COMPILES=yes | |
8964 | fi | |
8965 | done | |
8966 | ||
8967 | if test "${GTK_COMPILES}" != "yes"; then | |
8968 | if test "$USE_X_TOOLKIT" != "maybe"; then | |
d6a003a8 | 8969 | as_fn_error $? "Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" "$LINENO" 5; |
067d23c9 KY |
8970 | fi |
8971 | else | |
8972 | HAVE_GTK=yes | |
8973 | ||
8974 | $as_echo "#define USE_GTK 1" >>confdefs.h | |
8975 | ||
8976 | GTK_OBJ=gtkutil.o | |
8977 | USE_X_TOOLKIT=none | |
8978 | if $PKG_CONFIG --atleast-version=2.10 gtk+-2.0; then | |
8979 | : | |
8980 | else | |
8981 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your version of Gtk+ will have problems with | |
8982 | closing open displays. This is no problem if you just use | |
8983 | one display, but if you use more than one and close one of them | |
8984 | Emacs may crash." >&5 | |
8985 | $as_echo "$as_me: WARNING: Your version of Gtk+ will have problems with | |
8986 | closing open displays. This is no problem if you just use | |
8987 | one display, but if you use more than one and close one of them | |
8988 | Emacs may crash." >&2;} | |
8989 | sleep 3 | |
8990 | fi | |
8991 | fi | |
8992 | ||
8993 | fi | |
8994 | ||
8995 | ||
8996 | ||
8997 | if test "${HAVE_GTK}" = "yes"; then | |
8998 | ||
8999 | if test "$with_toolkit_scroll_bars" != no; then | |
9000 | with_toolkit_scroll_bars=yes | |
9001 | fi | |
9002 | ||
9003 | HAVE_GTK_FILE_SELECTION=no | |
9004 | ac_fn_c_check_decl "$LINENO" "GTK_TYPE_FILE_SELECTION" "ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" "$ac_includes_default | |
9005 | #include <gtk/gtk.h> | |
9006 | " | |
d6a003a8 | 9007 | if test "x$ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" = xyes; then : |
067d23c9 KY |
9008 | HAVE_GTK_FILE_SELECTION=yes |
9009 | else | |
9010 | HAVE_GTK_FILE_SELECTION=no | |
9011 | fi | |
9012 | ||
9013 | if test "$HAVE_GTK_FILE_SELECTION" = yes; then | |
9014 | for ac_func in gtk_file_selection_new | |
9015 | do : | |
9016 | ac_fn_c_check_func "$LINENO" "gtk_file_selection_new" "ac_cv_func_gtk_file_selection_new" | |
d6a003a8 | 9017 | if test "x$ac_cv_func_gtk_file_selection_new" = xyes; then : |
067d23c9 KY |
9018 | cat >>confdefs.h <<_ACEOF |
9019 | #define HAVE_GTK_FILE_SELECTION_NEW 1 | |
9020 | _ACEOF | |
9021 | ||
9022 | fi | |
9023 | done | |
9024 | ||
9025 | fi | |
9026 | ||
9027 | HAVE_GTK_AND_PTHREAD=no | |
9028 | for ac_header in pthread.h | |
9029 | do : | |
9030 | ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default" | |
d6a003a8 | 9031 | if test "x$ac_cv_header_pthread_h" = xyes; then : |
067d23c9 KY |
9032 | cat >>confdefs.h <<_ACEOF |
9033 | #define HAVE_PTHREAD_H 1 | |
9034 | _ACEOF | |
9035 | ||
9036 | fi | |
9037 | ||
9038 | done | |
9039 | ||
9040 | if test "$ac_cv_header_pthread_h"; then | |
9041 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_self in -lpthread" >&5 | |
9042 | $as_echo_n "checking for pthread_self in -lpthread... " >&6; } | |
d6a003a8 | 9043 | if ${ac_cv_lib_pthread_pthread_self+:} false; then : |
067d23c9 KY |
9044 | $as_echo_n "(cached) " >&6 |
9045 | else | |
9046 | ac_check_lib_save_LIBS=$LIBS | |
9047 | LIBS="-lpthread $LIBS" | |
9048 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9049 | /* end confdefs.h. */ | |
9050 | ||
9051 | /* Override any GCC internal prototype to avoid an error. | |
9052 | Use char because int might match the return type of a GCC | |
9053 | builtin and then its argument prototype would still apply. */ | |
9054 | #ifdef __cplusplus | |
9055 | extern "C" | |
9056 | #endif | |
9057 | char pthread_self (); | |
9058 | int | |
9059 | main () | |
9060 | { | |
9061 | return pthread_self (); | |
9062 | ; | |
9063 | return 0; | |
9064 | } | |
9065 | _ACEOF | |
9066 | if ac_fn_c_try_link "$LINENO"; then : | |
9067 | ac_cv_lib_pthread_pthread_self=yes | |
9068 | else | |
9069 | ac_cv_lib_pthread_pthread_self=no | |
9070 | fi | |
9071 | rm -f core conftest.err conftest.$ac_objext \ | |
9072 | conftest$ac_exeext conftest.$ac_ext | |
9073 | LIBS=$ac_check_lib_save_LIBS | |
9074 | fi | |
9075 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_self" >&5 | |
9076 | $as_echo "$ac_cv_lib_pthread_pthread_self" >&6; } | |
d6a003a8 | 9077 | if test "x$ac_cv_lib_pthread_pthread_self" = xyes; then : |
067d23c9 KY |
9078 | HAVE_GTK_AND_PTHREAD=yes |
9079 | fi | |
9080 | ||
9081 | fi | |
9082 | if test "$HAVE_GTK_AND_PTHREAD" = yes; then | |
9083 | case "${canonical}" in | |
9084 | *-hpux*) ;; | |
9085 | *) GTK_LIBS="$GTK_LIBS -lpthread" ;; | |
9086 | esac | |
9087 | ||
9088 | $as_echo "#define HAVE_GTK_AND_PTHREAD 1" >>confdefs.h | |
9089 | ||
9090 | fi | |
9091 | ||
9092 | for ac_func in gtk_widget_get_window gtk_widget_set_has_window \ | |
9093 | gtk_dialog_get_action_area gtk_widget_get_sensitive \ | |
9094 | gtk_widget_get_mapped gtk_adjustment_get_page_size \ | |
9095 | gtk_orientable_set_orientation | |
9096 | do : | |
9097 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
9098 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
d6a003a8 | 9099 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : |
067d23c9 KY |
9100 | cat >>confdefs.h <<_ACEOF |
9101 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
9102 | _ACEOF | |
9103 | ||
9104 | fi | |
9105 | done | |
9106 | ||
9107 | ||
9108 | fi | |
9109 | ||
9110 | HAVE_DBUS=no | |
9111 | DBUS_OBJ= | |
9112 | if test "${with_dbus}" = "yes"; then | |
9113 | ||
9114 | succeeded=no | |
9115 | ||
9116 | # Extract the first word of "pkg-config", so it can be a program name with args. | |
9117 | set dummy pkg-config; ac_word=$2 | |
9118 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
9119 | $as_echo_n "checking for $ac_word... " >&6; } | |
d6a003a8 | 9120 | if ${ac_cv_path_PKG_CONFIG+:} false; then : |
067d23c9 KY |
9121 | $as_echo_n "(cached) " >&6 |
9122 | else | |
9123 | case $PKG_CONFIG in | |
9124 | [\\/]* | ?:[\\/]*) | |
9125 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
9126 | ;; | |
9127 | *) | |
9128 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
9129 | for as_dir in $PATH | |
9130 | do | |
9131 | IFS=$as_save_IFS | |
9132 | test -z "$as_dir" && as_dir=. | |
9133 | for ac_exec_ext in '' $ac_executable_extensions; do | |
9134 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
9135 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
9136 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
9137 | break 2 | |
9138 | fi | |
9139 | done | |
9140 | done | |
9141 | IFS=$as_save_IFS | |
9142 | ||
9143 | test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" | |
9144 | ;; | |
9145 | esac | |
9146 | fi | |
9147 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG | |
9148 | if test -n "$PKG_CONFIG"; then | |
9149 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
9150 | $as_echo "$PKG_CONFIG" >&6; } | |
9151 | else | |
9152 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
9153 | $as_echo "no" >&6; } | |
9154 | fi | |
9155 | ||
9156 | ||
9157 | ||
9158 | if test "$PKG_CONFIG" = "no" ; then | |
9159 | HAVE_DBUS=no | |
9160 | else | |
9161 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
9162 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
9163 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbus-1 >= 1.0" >&5 | |
9164 | $as_echo_n "checking for dbus-1 >= 1.0... " >&6; } | |
9165 | ||
9166 | if $PKG_CONFIG --exists "dbus-1 >= 1.0" 2>&5; then | |
9167 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
9168 | $as_echo "yes" >&6; } | |
9169 | succeeded=yes | |
9170 | ||
9171 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking DBUS_CFLAGS" >&5 | |
9172 | $as_echo_n "checking DBUS_CFLAGS... " >&6; } | |
9173 | DBUS_CFLAGS=`$PKG_CONFIG --cflags "dbus-1 >= 1.0"|sed -e 's,///*,/,g'` | |
9174 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBUS_CFLAGS" >&5 | |
9175 | $as_echo "$DBUS_CFLAGS" >&6; } | |
9176 | ||
9177 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking DBUS_LIBS" >&5 | |
9178 | $as_echo_n "checking DBUS_LIBS... " >&6; } | |
9179 | DBUS_LIBS=`$PKG_CONFIG --libs "dbus-1 >= 1.0"|sed -e 's,///*,/,g'` | |
9180 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBUS_LIBS" >&5 | |
9181 | $as_echo "$DBUS_LIBS" >&6; } | |
9182 | else | |
9183 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
9184 | $as_echo "no" >&6; } | |
9185 | DBUS_CFLAGS="" | |
9186 | DBUS_LIBS="" | |
9187 | ## If we have a custom action on failure, don't print errors, but | |
9188 | ## do set a variable so people can do so. | |
9189 | DBUS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "dbus-1 >= 1.0"` | |
9190 | ||
9191 | fi | |
9192 | ||
9193 | ||
9194 | ||
9195 | else | |
9196 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
9197 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
9198 | fi | |
9199 | fi | |
9200 | ||
9201 | if test $succeeded = yes; then | |
9202 | HAVE_DBUS=yes | |
9203 | else | |
9204 | HAVE_DBUS=no | |
9205 | fi | |
9206 | ||
9207 | if test "$HAVE_DBUS" = yes; then | |
9208 | LIBS="$LIBS $DBUS_LIBS" | |
9209 | ||
9210 | $as_echo "#define HAVE_DBUS 1" >>confdefs.h | |
9211 | ||
9212 | for ac_func in dbus_watch_get_unix_fd | |
9213 | do : | |
9214 | ac_fn_c_check_func "$LINENO" "dbus_watch_get_unix_fd" "ac_cv_func_dbus_watch_get_unix_fd" | |
d6a003a8 | 9215 | if test "x$ac_cv_func_dbus_watch_get_unix_fd" = xyes; then : |
067d23c9 KY |
9216 | cat >>confdefs.h <<_ACEOF |
9217 | #define HAVE_DBUS_WATCH_GET_UNIX_FD 1 | |
9218 | _ACEOF | |
9219 | ||
9220 | fi | |
9221 | done | |
9222 | ||
9223 | DBUS_OBJ=dbusbind.o | |
9224 | fi | |
9225 | fi | |
9226 | ||
9227 | ||
9228 | HAVE_GCONF=no | |
9229 | if test "${HAVE_X11}" = "yes" && test "${with_gconf}" = "yes"; then | |
9230 | ||
9231 | succeeded=no | |
9232 | ||
9233 | # Extract the first word of "pkg-config", so it can be a program name with args. | |
9234 | set dummy pkg-config; ac_word=$2 | |
9235 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
9236 | $as_echo_n "checking for $ac_word... " >&6; } | |
d6a003a8 | 9237 | if ${ac_cv_path_PKG_CONFIG+:} false; then : |
067d23c9 KY |
9238 | $as_echo_n "(cached) " >&6 |
9239 | else | |
9240 | case $PKG_CONFIG in | |
9241 | [\\/]* | ?:[\\/]*) | |
9242 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
9243 | ;; | |
9244 | *) | |
9245 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
9246 | for as_dir in $PATH | |
9247 | do | |
9248 | IFS=$as_save_IFS | |
9249 | test -z "$as_dir" && as_dir=. | |
9250 | for ac_exec_ext in '' $ac_executable_extensions; do | |
9251 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
9252 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
9253 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
9254 | break 2 | |
9255 | fi | |
9256 | done | |
9257 | done | |
9258 | IFS=$as_save_IFS | |
9259 | ||
9260 | test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" | |
9261 | ;; | |
9262 | esac | |
9263 | fi | |
9264 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG | |
9265 | if test -n "$PKG_CONFIG"; then | |
9266 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
9267 | $as_echo "$PKG_CONFIG" >&6; } | |
9268 | else | |
9269 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
9270 | $as_echo "no" >&6; } | |
9271 | fi | |
9272 | ||
9273 | ||
9274 | ||
9275 | if test "$PKG_CONFIG" = "no" ; then | |
9276 | HAVE_GCONF=no | |
9277 | else | |
9278 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
9279 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
9280 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gconf-2.0 >= 2.13" >&5 | |
9281 | $as_echo_n "checking for gconf-2.0 >= 2.13... " >&6; } | |
9282 | ||
9283 | if $PKG_CONFIG --exists "gconf-2.0 >= 2.13" 2>&5; then | |
9284 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
9285 | $as_echo "yes" >&6; } | |
9286 | succeeded=yes | |
9287 | ||
9288 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking GCONF_CFLAGS" >&5 | |
9289 | $as_echo_n "checking GCONF_CFLAGS... " >&6; } | |
9290 | GCONF_CFLAGS=`$PKG_CONFIG --cflags "gconf-2.0 >= 2.13"|sed -e 's,///*,/,g'` | |
9291 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCONF_CFLAGS" >&5 | |
9292 | $as_echo "$GCONF_CFLAGS" >&6; } | |
9293 | ||
9294 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking GCONF_LIBS" >&5 | |
9295 | $as_echo_n "checking GCONF_LIBS... " >&6; } | |
9296 | GCONF_LIBS=`$PKG_CONFIG --libs "gconf-2.0 >= 2.13"|sed -e 's,///*,/,g'` | |
9297 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCONF_LIBS" >&5 | |
9298 | $as_echo "$GCONF_LIBS" >&6; } | |
9299 | else | |
9300 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
9301 | $as_echo "no" >&6; } | |
9302 | GCONF_CFLAGS="" | |
9303 | GCONF_LIBS="" | |
9304 | ## If we have a custom action on failure, don't print errors, but | |
9305 | ## do set a variable so people can do so. | |
9306 | GCONF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gconf-2.0 >= 2.13"` | |
9307 | ||
9308 | fi | |
9309 | ||
9310 | ||
9311 | ||
9312 | else | |
9313 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
9314 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
9315 | fi | |
9316 | fi | |
9317 | ||
9318 | if test $succeeded = yes; then | |
9319 | HAVE_GCONF=yes | |
9320 | else | |
9321 | HAVE_GCONF=no | |
9322 | fi | |
9323 | ||
9324 | if test "$HAVE_GCONF" = yes; then | |
9325 | ||
9326 | $as_echo "#define HAVE_GCONF 1" >>confdefs.h | |
9327 | ||
9328 | for ac_func in g_type_init | |
9329 | do : | |
9330 | ac_fn_c_check_func "$LINENO" "g_type_init" "ac_cv_func_g_type_init" | |
d6a003a8 | 9331 | if test "x$ac_cv_func_g_type_init" = xyes; then : |
067d23c9 KY |
9332 | cat >>confdefs.h <<_ACEOF |
9333 | #define HAVE_G_TYPE_INIT 1 | |
9334 | _ACEOF | |
9335 | ||
9336 | fi | |
9337 | done | |
9338 | ||
9339 | fi | |
9340 | fi | |
9341 | ||
9342 | HAVE_LIBSELINUX=no | |
9343 | LIBSELINUX_LIBS= | |
9344 | if test "${with_selinux}" = "yes"; then | |
9345 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lgetfilecon in -lselinux" >&5 | |
9346 | $as_echo_n "checking for lgetfilecon in -lselinux... " >&6; } | |
d6a003a8 | 9347 | if ${ac_cv_lib_selinux_lgetfilecon+:} false; then : |
067d23c9 KY |
9348 | $as_echo_n "(cached) " >&6 |
9349 | else | |
9350 | ac_check_lib_save_LIBS=$LIBS | |
9351 | LIBS="-lselinux $LIBS" | |
9352 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9353 | /* end confdefs.h. */ | |
9354 | ||
9355 | /* Override any GCC internal prototype to avoid an error. | |
9356 | Use char because int might match the return type of a GCC | |
9357 | builtin and then its argument prototype would still apply. */ | |
9358 | #ifdef __cplusplus | |
9359 | extern "C" | |
9360 | #endif | |
9361 | char lgetfilecon (); | |
9362 | int | |
9363 | main () | |
9364 | { | |
9365 | return lgetfilecon (); | |
9366 | ; | |
9367 | return 0; | |
9368 | } | |
9369 | _ACEOF | |
9370 | if ac_fn_c_try_link "$LINENO"; then : | |
9371 | ac_cv_lib_selinux_lgetfilecon=yes | |
9372 | else | |
9373 | ac_cv_lib_selinux_lgetfilecon=no | |
9374 | fi | |
9375 | rm -f core conftest.err conftest.$ac_objext \ | |
9376 | conftest$ac_exeext conftest.$ac_ext | |
9377 | LIBS=$ac_check_lib_save_LIBS | |
9378 | fi | |
9379 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_lgetfilecon" >&5 | |
9380 | $as_echo "$ac_cv_lib_selinux_lgetfilecon" >&6; } | |
d6a003a8 | 9381 | if test "x$ac_cv_lib_selinux_lgetfilecon" = xyes; then : |
067d23c9 KY |
9382 | HAVE_LIBSELINUX=yes |
9383 | else | |
9384 | HAVE_LIBSELINUX=no | |
9385 | fi | |
9386 | ||
9387 | if test "$HAVE_LIBSELINUX" = yes; then | |
9388 | ||
9389 | $as_echo "#define HAVE_LIBSELINUX 1" >>confdefs.h | |
9390 | ||
9391 | LIBSELINUX_LIBS=-lselinux | |
9392 | fi | |
9393 | fi | |
9394 | ||
9395 | ||
9396 | HAVE_GNUTLS=no | |
9397 | if test "${with_gnutls}" = "yes" ; then | |
9398 | ||
9399 | succeeded=no | |
9400 | ||
9401 | # Extract the first word of "pkg-config", so it can be a program name with args. | |
9402 | set dummy pkg-config; ac_word=$2 | |
9403 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
9404 | $as_echo_n "checking for $ac_word... " >&6; } | |
d6a003a8 | 9405 | if ${ac_cv_path_PKG_CONFIG+:} false; then : |
067d23c9 KY |
9406 | $as_echo_n "(cached) " >&6 |
9407 | else | |
9408 | case $PKG_CONFIG in | |
9409 | [\\/]* | ?:[\\/]*) | |
9410 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
9411 | ;; | |
9412 | *) | |
9413 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
9414 | for as_dir in $PATH | |
9415 | do | |
9416 | IFS=$as_save_IFS | |
9417 | test -z "$as_dir" && as_dir=. | |
9418 | for ac_exec_ext in '' $ac_executable_extensions; do | |
9419 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
9420 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
9421 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
9422 | break 2 | |
9423 | fi | |
9424 | done | |
9425 | done | |
9426 | IFS=$as_save_IFS | |
9427 | ||
9428 | test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" | |
9429 | ;; | |
9430 | esac | |
9431 | fi | |
9432 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG | |
9433 | if test -n "$PKG_CONFIG"; then | |
9434 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
9435 | $as_echo "$PKG_CONFIG" >&6; } | |
9436 | else | |
9437 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
9438 | $as_echo "no" >&6; } | |
9439 | fi | |
9440 | ||
9441 | ||
9442 | ||
9443 | if test "$PKG_CONFIG" = "no" ; then | |
9444 | HAVE_GNUTLS=no | |
9445 | else | |
9446 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
9447 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
9448 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gnutls >= 2.2.4" >&5 | |
9449 | $as_echo_n "checking for gnutls >= 2.2.4... " >&6; } | |
9450 | ||
9451 | if $PKG_CONFIG --exists "gnutls >= 2.2.4" 2>&5; then | |
9452 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
9453 | $as_echo "yes" >&6; } | |
9454 | succeeded=yes | |
9455 | ||
9456 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBGNUTLS_CFLAGS" >&5 | |
9457 | $as_echo_n "checking LIBGNUTLS_CFLAGS... " >&6; } | |
9458 | LIBGNUTLS_CFLAGS=`$PKG_CONFIG --cflags "gnutls >= 2.2.4"|sed -e 's,///*,/,g'` | |
9459 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBGNUTLS_CFLAGS" >&5 | |
9460 | $as_echo "$LIBGNUTLS_CFLAGS" >&6; } | |
9461 | ||
9462 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBGNUTLS_LIBS" >&5 | |
9463 | $as_echo_n "checking LIBGNUTLS_LIBS... " >&6; } | |
9464 | LIBGNUTLS_LIBS=`$PKG_CONFIG --libs "gnutls >= 2.2.4"|sed -e 's,///*,/,g'` | |
9465 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBGNUTLS_LIBS" >&5 | |
9466 | $as_echo "$LIBGNUTLS_LIBS" >&6; } | |
9467 | else | |
9468 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
9469 | $as_echo "no" >&6; } | |
9470 | LIBGNUTLS_CFLAGS="" | |
9471 | LIBGNUTLS_LIBS="" | |
9472 | ## If we have a custom action on failure, don't print errors, but | |
9473 | ## do set a variable so people can do so. | |
9474 | LIBGNUTLS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gnutls >= 2.2.4"` | |
9475 | ||
9476 | fi | |
9477 | ||
9478 | ||
9479 | ||
9480 | else | |
9481 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
9482 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
9483 | fi | |
9484 | fi | |
9485 | ||
9486 | if test $succeeded = yes; then | |
9487 | HAVE_GNUTLS=yes | |
9488 | else | |
9489 | HAVE_GNUTLS=no | |
9490 | fi | |
9491 | ||
9492 | if test "${HAVE_GNUTLS}" = "yes"; then | |
9493 | ||
9494 | $as_echo "#define HAVE_GNUTLS 1" >>confdefs.h | |
9495 | ||
9496 | fi | |
9497 | fi | |
9498 | ||
9499 | ||
9500 | ||
9501 | HAVE_XAW3D=no | |
9502 | LUCID_LIBW= | |
9503 | if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then | |
9504 | if test "$with_xaw3d" != no; then | |
9505 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xaw3d" >&5 | |
9506 | $as_echo_n "checking for xaw3d... " >&6; } | |
d6a003a8 | 9507 | if ${emacs_cv_xaw3d+:} false; then : |
067d23c9 KY |
9508 | $as_echo_n "(cached) " >&6 |
9509 | else | |
9510 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9511 | /* end confdefs.h. */ | |
9512 | ||
9513 | #include <X11/Intrinsic.h> | |
9514 | #include <X11/Xaw3d/Simple.h> | |
9515 | int | |
9516 | main () | |
9517 | { | |
9518 | ||
9519 | ; | |
9520 | return 0; | |
9521 | } | |
9522 | _ACEOF | |
9523 | if ac_fn_c_try_link "$LINENO"; then : | |
9524 | emacs_cv_xaw3d=yes | |
9525 | else | |
9526 | emacs_cv_xaw3d=no | |
9527 | fi | |
9528 | rm -f core conftest.err conftest.$ac_objext \ | |
9529 | conftest$ac_exeext conftest.$ac_ext | |
9530 | fi | |
9531 | ||
9532 | else | |
9533 | emacs_cv_xaw3d=no | |
9534 | fi | |
9535 | if test $emacs_cv_xaw3d = yes; then | |
9536 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5 | |
9537 | $as_echo "yes; using Lucid toolkit" >&6; } | |
9538 | USE_X_TOOLKIT=LUCID | |
9539 | HAVE_XAW3D=yes | |
9540 | LUCID_LIBW=-lXaw3d | |
9541 | ||
9542 | $as_echo "#define HAVE_XAW3D 1" >>confdefs.h | |
9543 | ||
9544 | else | |
9545 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
9546 | $as_echo "no" >&6; } | |
9547 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libXaw" >&5 | |
9548 | $as_echo_n "checking for libXaw... " >&6; } | |
d6a003a8 | 9549 | if ${emacs_cv_xaw+:} false; then : |
067d23c9 KY |
9550 | $as_echo_n "(cached) " >&6 |
9551 | else | |
9552 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9553 | /* end confdefs.h. */ | |
9554 | ||
9555 | #include <X11/Intrinsic.h> | |
9556 | #include <X11/Xaw/Simple.h> | |
9557 | int | |
9558 | main () | |
9559 | { | |
9560 | ||
9561 | ; | |
9562 | return 0; | |
9563 | } | |
9564 | _ACEOF | |
9565 | if ac_fn_c_try_link "$LINENO"; then : | |
9566 | emacs_cv_xaw=yes | |
9567 | else | |
9568 | emacs_cv_xaw=no | |
9569 | fi | |
9570 | rm -f core conftest.err conftest.$ac_objext \ | |
9571 | conftest$ac_exeext conftest.$ac_ext | |
9572 | fi | |
9573 | ||
9574 | if test $emacs_cv_xaw = yes; then | |
9575 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5 | |
9576 | $as_echo "yes; using Lucid toolkit" >&6; } | |
9577 | USE_X_TOOLKIT=LUCID | |
9578 | LUCID_LIBW=-lXaw | |
9579 | elif test x"${USE_X_TOOLKIT}" = xLUCID; then | |
d6a003a8 | 9580 | as_fn_error $? "Lucid toolkit requires X11/Xaw include files" "$LINENO" 5 |
067d23c9 KY |
9581 | else |
9582 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no; do not use toolkit by default" >&5 | |
9583 | $as_echo "no; do not use toolkit by default" >&6; } | |
9584 | USE_X_TOOLKIT=none | |
9585 | fi | |
9586 | fi | |
9587 | fi | |
9588 | ||
9589 | X_TOOLKIT_TYPE=$USE_X_TOOLKIT | |
9590 | ||
9591 | LIBXTR6= | |
9592 | if test "${USE_X_TOOLKIT}" != "none"; then | |
9593 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 toolkit version" >&5 | |
9594 | $as_echo_n "checking X11 toolkit version... " >&6; } | |
d6a003a8 | 9595 | if ${emacs_cv_x11_toolkit_version_6+:} false; then : |
067d23c9 KY |
9596 | $as_echo_n "(cached) " >&6 |
9597 | else | |
9598 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9599 | /* end confdefs.h. */ | |
9600 | #include <X11/Intrinsic.h> | |
9601 | int | |
9602 | main () | |
9603 | { | |
9604 | #if XtSpecificationRelease < 6 | |
9605 | fail; | |
9606 | #endif | |
9607 | ||
9608 | ; | |
9609 | return 0; | |
9610 | } | |
9611 | _ACEOF | |
9612 | if ac_fn_c_try_link "$LINENO"; then : | |
9613 | emacs_cv_x11_toolkit_version_6=yes | |
9614 | else | |
9615 | emacs_cv_x11_toolkit_version_6=no | |
9616 | fi | |
9617 | rm -f core conftest.err conftest.$ac_objext \ | |
9618 | conftest$ac_exeext conftest.$ac_ext | |
9619 | fi | |
9620 | ||
9621 | HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6 | |
9622 | if test $emacs_cv_x11_toolkit_version_6 = yes; then | |
9623 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5 | |
9624 | $as_echo "6 or newer" >&6; } | |
9625 | ||
9626 | $as_echo "#define HAVE_X11XTR6 1" >>confdefs.h | |
9627 | ||
9628 | LIBXTR6="-lSM -lICE" | |
9629 | case "$opsys" in | |
9630 | ## Use libw.a along with X11R6 Xt. | |
9631 | unixware) LIBXTR6="$LIBXTR6 -lw" ;; | |
9632 | esac | |
9633 | else | |
9634 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5 | |
9635 | $as_echo "before 6" >&6; } | |
9636 | fi | |
9637 | ||
9638 | OLDLIBS="$LIBS" | |
9639 | if test x$HAVE_X11XTR6 = xyes; then | |
9640 | LIBS="-lXt -lSM -lICE $LIBS" | |
9641 | else | |
9642 | LIBS="-lXt $LIBS" | |
9643 | fi | |
9644 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XmuConvertStandardSelection in -lXmu" >&5 | |
9645 | $as_echo_n "checking for XmuConvertStandardSelection in -lXmu... " >&6; } | |
d6a003a8 | 9646 | if ${ac_cv_lib_Xmu_XmuConvertStandardSelection+:} false; then : |
067d23c9 KY |
9647 | $as_echo_n "(cached) " >&6 |
9648 | else | |
9649 | ac_check_lib_save_LIBS=$LIBS | |
9650 | LIBS="-lXmu $LIBS" | |
9651 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9652 | /* end confdefs.h. */ | |
9653 | ||
9654 | /* Override any GCC internal prototype to avoid an error. | |
9655 | Use char because int might match the return type of a GCC | |
9656 | builtin and then its argument prototype would still apply. */ | |
9657 | #ifdef __cplusplus | |
9658 | extern "C" | |
9659 | #endif | |
9660 | char XmuConvertStandardSelection (); | |
9661 | int | |
9662 | main () | |
9663 | { | |
9664 | return XmuConvertStandardSelection (); | |
9665 | ; | |
9666 | return 0; | |
9667 | } | |
9668 | _ACEOF | |
9669 | if ac_fn_c_try_link "$LINENO"; then : | |
9670 | ac_cv_lib_Xmu_XmuConvertStandardSelection=yes | |
9671 | else | |
9672 | ac_cv_lib_Xmu_XmuConvertStandardSelection=no | |
9673 | fi | |
9674 | rm -f core conftest.err conftest.$ac_objext \ | |
9675 | conftest$ac_exeext conftest.$ac_ext | |
9676 | LIBS=$ac_check_lib_save_LIBS | |
9677 | fi | |
9678 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5 | |
9679 | $as_echo "$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6; } | |
d6a003a8 | 9680 | if test "x$ac_cv_lib_Xmu_XmuConvertStandardSelection" = xyes; then : |
067d23c9 KY |
9681 | cat >>confdefs.h <<_ACEOF |
9682 | #define HAVE_LIBXMU 1 | |
9683 | _ACEOF | |
9684 | ||
9685 | LIBS="-lXmu $LIBS" | |
9686 | ||
9687 | fi | |
9688 | ||
9689 | test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS" | |
9690 | fi | |
9691 | ||
9692 | ||
9693 | LIBXMU=-lXmu | |
d6a003a8 AS |
9694 | case $opsys in |
9695 | ## These systems don't supply Xmu. | |
067d23c9 KY |
9696 | hpux* | aix4-2 ) |
9697 | test "X$ac_cv_lib_Xmu_XmuConvertStandardSelection" != "Xyes" && LIBXMU= | |
9698 | ;; | |
9699 | esac | |
9700 | ||
9701 | ||
9702 | # On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D. | |
9703 | if test "${HAVE_X11}" = "yes"; then | |
9704 | if test "${USE_X_TOOLKIT}" != "none"; then | |
9705 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XShapeQueryExtension in -lXext" >&5 | |
9706 | $as_echo_n "checking for XShapeQueryExtension in -lXext... " >&6; } | |
d6a003a8 | 9707 | if ${ac_cv_lib_Xext_XShapeQueryExtension+:} false; then : |
067d23c9 KY |
9708 | $as_echo_n "(cached) " >&6 |
9709 | else | |
9710 | ac_check_lib_save_LIBS=$LIBS | |
9711 | LIBS="-lXext $LIBS" | |
9712 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9713 | /* end confdefs.h. */ | |
9714 | ||
9715 | /* Override any GCC internal prototype to avoid an error. | |
9716 | Use char because int might match the return type of a GCC | |
9717 | builtin and then its argument prototype would still apply. */ | |
9718 | #ifdef __cplusplus | |
9719 | extern "C" | |
9720 | #endif | |
9721 | char XShapeQueryExtension (); | |
9722 | int | |
9723 | main () | |
9724 | { | |
9725 | return XShapeQueryExtension (); | |
9726 | ; | |
9727 | return 0; | |
9728 | } | |
9729 | _ACEOF | |
9730 | if ac_fn_c_try_link "$LINENO"; then : | |
9731 | ac_cv_lib_Xext_XShapeQueryExtension=yes | |
9732 | else | |
9733 | ac_cv_lib_Xext_XShapeQueryExtension=no | |
9734 | fi | |
9735 | rm -f core conftest.err conftest.$ac_objext \ | |
9736 | conftest$ac_exeext conftest.$ac_ext | |
9737 | LIBS=$ac_check_lib_save_LIBS | |
9738 | fi | |
9739 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5 | |
9740 | $as_echo "$ac_cv_lib_Xext_XShapeQueryExtension" >&6; } | |
d6a003a8 | 9741 | if test "x$ac_cv_lib_Xext_XShapeQueryExtension" = xyes; then : |
067d23c9 KY |
9742 | cat >>confdefs.h <<_ACEOF |
9743 | #define HAVE_LIBXEXT 1 | |
9744 | _ACEOF | |
9745 | ||
9746 | LIBS="-lXext $LIBS" | |
9747 | ||
9748 | fi | |
9749 | ||
9750 | fi | |
9751 | fi | |
9752 | ||
9753 | LIBXP= | |
9754 | if test "${USE_X_TOOLKIT}" = "MOTIF"; then | |
9755 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Motif version 2.1" >&5 | |
9756 | $as_echo_n "checking for Motif version 2.1... " >&6; } | |
d6a003a8 | 9757 | if ${emacs_cv_motif_version_2_1+:} false; then : |
067d23c9 KY |
9758 | $as_echo_n "(cached) " >&6 |
9759 | else | |
9760 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9761 | /* end confdefs.h. */ | |
9762 | #include <Xm/Xm.h> | |
9763 | int | |
9764 | main () | |
9765 | { | |
9766 | #if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1) | |
9767 | int x = 5; | |
9768 | #else | |
9769 | Motif version prior to 2.1. | |
9770 | #endif | |
9771 | ; | |
9772 | return 0; | |
9773 | } | |
9774 | _ACEOF | |
9775 | if ac_fn_c_try_compile "$LINENO"; then : | |
9776 | emacs_cv_motif_version_2_1=yes | |
9777 | else | |
9778 | emacs_cv_motif_version_2_1=no | |
9779 | fi | |
9780 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
9781 | fi | |
9782 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_motif_version_2_1" >&5 | |
9783 | $as_echo "$emacs_cv_motif_version_2_1" >&6; } | |
9784 | if test $emacs_cv_motif_version_2_1 = yes; then | |
9785 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpCreateContext in -lXp" >&5 | |
9786 | $as_echo_n "checking for XpCreateContext in -lXp... " >&6; } | |
d6a003a8 | 9787 | if ${ac_cv_lib_Xp_XpCreateContext+:} false; then : |
067d23c9 KY |
9788 | $as_echo_n "(cached) " >&6 |
9789 | else | |
9790 | ac_check_lib_save_LIBS=$LIBS | |
9791 | LIBS="-lXp $LIBS" | |
9792 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9793 | /* end confdefs.h. */ | |
9794 | ||
9795 | /* Override any GCC internal prototype to avoid an error. | |
9796 | Use char because int might match the return type of a GCC | |
9797 | builtin and then its argument prototype would still apply. */ | |
9798 | #ifdef __cplusplus | |
9799 | extern "C" | |
9800 | #endif | |
9801 | char XpCreateContext (); | |
9802 | int | |
9803 | main () | |
9804 | { | |
9805 | return XpCreateContext (); | |
9806 | ; | |
9807 | return 0; | |
9808 | } | |
9809 | _ACEOF | |
9810 | if ac_fn_c_try_link "$LINENO"; then : | |
9811 | ac_cv_lib_Xp_XpCreateContext=yes | |
9812 | else | |
9813 | ac_cv_lib_Xp_XpCreateContext=no | |
9814 | fi | |
9815 | rm -f core conftest.err conftest.$ac_objext \ | |
9816 | conftest$ac_exeext conftest.$ac_ext | |
9817 | LIBS=$ac_check_lib_save_LIBS | |
9818 | fi | |
9819 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xp_XpCreateContext" >&5 | |
9820 | $as_echo "$ac_cv_lib_Xp_XpCreateContext" >&6; } | |
d6a003a8 | 9821 | if test "x$ac_cv_lib_Xp_XpCreateContext" = xyes; then : |
067d23c9 KY |
9822 | LIBXP=-lXp |
9823 | fi | |
9824 | ||
9825 | else | |
9826 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LessTif where some systems put it" >&5 | |
9827 | $as_echo_n "checking for LessTif where some systems put it... " >&6; } | |
d6a003a8 | 9828 | if ${emacs_cv_lesstif+:} false; then : |
067d23c9 KY |
9829 | $as_echo_n "(cached) " >&6 |
9830 | else | |
9831 | # We put this in CFLAGS temporarily to precede other -I options | |
9832 | # that might be in CFLAGS temporarily. | |
9833 | # We put this in CPPFLAGS where it precedes the other -I options. | |
9834 | OLD_CPPFLAGS=$CPPFLAGS | |
9835 | OLD_CFLAGS=$CFLAGS | |
9836 | CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS" | |
9837 | CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS" | |
9838 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9839 | /* end confdefs.h. */ | |
9840 | #include </usr/X11R6/LessTif/Motif1.2/include/Xm/Xm.h> | |
9841 | int | |
9842 | main () | |
9843 | { | |
9844 | int x = 5; | |
9845 | ; | |
9846 | return 0; | |
9847 | } | |
9848 | _ACEOF | |
9849 | if ac_fn_c_try_compile "$LINENO"; then : | |
9850 | emacs_cv_lesstif=yes | |
9851 | else | |
9852 | emacs_cv_lesstif=no | |
9853 | fi | |
9854 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
9855 | fi | |
9856 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_lesstif" >&5 | |
9857 | $as_echo "$emacs_cv_lesstif" >&6; } | |
9858 | if test $emacs_cv_lesstif = yes; then | |
9859 | # Make sure this -I option remains in CPPFLAGS after it is set | |
9860 | # back to REAL_CPPFLAGS. | |
9861 | # There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not | |
9862 | # have those other -I options anyway. Ultimately, having this | |
9863 | # directory ultimately in CPPFLAGS will be enough. | |
9864 | REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS" | |
9865 | LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS" | |
9866 | else | |
9867 | CFLAGS=$OLD_CFLAGS | |
9868 | CPPFLAGS=$OLD_CPPFLAGS | |
9869 | fi | |
9870 | fi | |
9871 | fi | |
9872 | ||
9873 | ||
9874 | USE_TOOLKIT_SCROLL_BARS=no | |
9875 | if test "${with_toolkit_scroll_bars}" != "no"; then | |
9876 | if test "${USE_X_TOOLKIT}" != "none"; then | |
9877 | if test "${USE_X_TOOLKIT}" = "MOTIF"; then | |
9878 | $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h | |
9879 | ||
9880 | HAVE_XAW3D=no | |
9881 | USE_TOOLKIT_SCROLL_BARS=yes | |
9882 | elif test "${HAVE_XAW3D}" = "yes"; then | |
9883 | $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h | |
9884 | ||
9885 | USE_TOOLKIT_SCROLL_BARS=yes | |
9886 | fi | |
9887 | elif test "${HAVE_GTK}" = "yes"; then | |
9888 | $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h | |
9889 | ||
9890 | USE_TOOLKIT_SCROLL_BARS=yes | |
9891 | elif test "${HAVE_NS}" = "yes"; then | |
9892 | $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h | |
9893 | ||
9894 | USE_TOOLKIT_SCROLL_BARS=yes | |
9895 | fi | |
9896 | fi | |
9897 | ||
9898 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9899 | /* end confdefs.h. */ | |
9900 | ||
9901 | #include <X11/Xlib.h> | |
9902 | #include <X11/Xresource.h> | |
9903 | int | |
9904 | main () | |
9905 | { | |
9906 | XIMProc callback; | |
9907 | ; | |
9908 | return 0; | |
9909 | } | |
9910 | _ACEOF | |
9911 | if ac_fn_c_try_compile "$LINENO"; then : | |
9912 | HAVE_XIM=yes | |
9913 | ||
9914 | $as_echo "#define HAVE_XIM 1" >>confdefs.h | |
9915 | ||
9916 | else | |
9917 | HAVE_XIM=no | |
9918 | fi | |
9919 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
9920 | ||
9921 | ||
9922 | if test "${with_xim}" != "no"; then | |
9923 | ||
9924 | $as_echo "#define USE_XIM 1" >>confdefs.h | |
9925 | ||
9926 | fi | |
9927 | ||
9928 | ||
9929 | if test "${HAVE_XIM}" != "no"; then | |
9930 | late_CFLAGS=$CFLAGS | |
9931 | if test "$GCC" = yes; then | |
9932 | CFLAGS="$CFLAGS --pedantic-errors" | |
9933 | fi | |
9934 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9935 | /* end confdefs.h. */ | |
9936 | ||
9937 | #include <X11/Xlib.h> | |
9938 | #include <X11/Xresource.h> | |
9939 | int | |
9940 | main () | |
9941 | { | |
9942 | Display *display; | |
9943 | XrmDatabase db; | |
9944 | char *res_name; | |
9945 | char *res_class; | |
9946 | XIMProc callback; | |
9947 | XPointer *client_data; | |
9948 | #ifndef __GNUC__ | |
9949 | /* If we're not using GCC, it's probably not XFree86, and this is | |
9950 | probably right, but we can't use something like --pedantic-errors. */ | |
9951 | extern Bool XRegisterIMInstantiateCallback(Display*, XrmDatabase, char*, | |
9952 | char*, XIMProc, XPointer*); | |
9953 | #endif | |
9954 | (void)XRegisterIMInstantiateCallback(display, db, res_name, res_class, callback, | |
9955 | client_data); | |
9956 | ; | |
9957 | return 0; | |
9958 | } | |
9959 | _ACEOF | |
9960 | if ac_fn_c_try_compile "$LINENO"; then : | |
9961 | emacs_cv_arg6_star=yes | |
9962 | fi | |
9963 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
9964 | if test "$emacs_cv_arg6_star" = yes; then | |
9965 | $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer*" >>confdefs.h | |
9966 | ||
9967 | else | |
9968 | $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer" >>confdefs.h | |
9969 | ||
9970 | fi | |
9971 | CFLAGS=$late_CFLAGS | |
9972 | fi | |
9973 | ||
9974 | ### Start of font-backend (under any platform) section. | |
9975 | # (nothing here yet -- this is a placeholder) | |
9976 | ### End of font-backend (under any platform) section. | |
9977 | ||
9978 | ### Start of font-backend (under X11) section. | |
9979 | if test "${HAVE_X11}" = "yes"; then | |
9980 | ||
9981 | succeeded=no | |
9982 | ||
9983 | # Extract the first word of "pkg-config", so it can be a program name with args. | |
9984 | set dummy pkg-config; ac_word=$2 | |
9985 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
9986 | $as_echo_n "checking for $ac_word... " >&6; } | |
d6a003a8 | 9987 | if ${ac_cv_path_PKG_CONFIG+:} false; then : |
067d23c9 KY |
9988 | $as_echo_n "(cached) " >&6 |
9989 | else | |
9990 | case $PKG_CONFIG in | |
9991 | [\\/]* | ?:[\\/]*) | |
9992 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
9993 | ;; | |
9994 | *) | |
9995 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
9996 | for as_dir in $PATH | |
9997 | do | |
9998 | IFS=$as_save_IFS | |
9999 | test -z "$as_dir" && as_dir=. | |
10000 | for ac_exec_ext in '' $ac_executable_extensions; do | |
10001 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
10002 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
10003 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
10004 | break 2 | |
10005 | fi | |
10006 | done | |
10007 | done | |
10008 | IFS=$as_save_IFS | |
10009 | ||
10010 | test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" | |
10011 | ;; | |
10012 | esac | |
10013 | fi | |
10014 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG | |
10015 | if test -n "$PKG_CONFIG"; then | |
10016 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
10017 | $as_echo "$PKG_CONFIG" >&6; } | |
10018 | else | |
10019 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
10020 | $as_echo "no" >&6; } | |
10021 | fi | |
10022 | ||
10023 | ||
10024 | ||
10025 | if test "$PKG_CONFIG" = "no" ; then | |
10026 | HAVE_FC=no | |
10027 | else | |
10028 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
10029 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
10030 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fontconfig >= 2.2.0" >&5 | |
10031 | $as_echo_n "checking for fontconfig >= 2.2.0... " >&6; } | |
10032 | ||
10033 | if $PKG_CONFIG --exists "fontconfig >= 2.2.0" 2>&5; then | |
10034 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
10035 | $as_echo "yes" >&6; } | |
10036 | succeeded=yes | |
10037 | ||
10038 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking FONTCONFIG_CFLAGS" >&5 | |
10039 | $as_echo_n "checking FONTCONFIG_CFLAGS... " >&6; } | |
10040 | FONTCONFIG_CFLAGS=`$PKG_CONFIG --cflags "fontconfig >= 2.2.0"|sed -e 's,///*,/,g'` | |
10041 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FONTCONFIG_CFLAGS" >&5 | |
10042 | $as_echo "$FONTCONFIG_CFLAGS" >&6; } | |
10043 | ||
10044 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking FONTCONFIG_LIBS" >&5 | |
10045 | $as_echo_n "checking FONTCONFIG_LIBS... " >&6; } | |
10046 | FONTCONFIG_LIBS=`$PKG_CONFIG --libs "fontconfig >= 2.2.0"|sed -e 's,///*,/,g'` | |
10047 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FONTCONFIG_LIBS" >&5 | |
10048 | $as_echo "$FONTCONFIG_LIBS" >&6; } | |
10049 | else | |
10050 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
10051 | $as_echo "no" >&6; } | |
10052 | FONTCONFIG_CFLAGS="" | |
10053 | FONTCONFIG_LIBS="" | |
10054 | ## If we have a custom action on failure, don't print errors, but | |
10055 | ## do set a variable so people can do so. | |
10056 | FONTCONFIG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "fontconfig >= 2.2.0"` | |
10057 | ||
10058 | fi | |
10059 | ||
10060 | ||
10061 | ||
10062 | else | |
10063 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
10064 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
10065 | fi | |
10066 | fi | |
10067 | ||
10068 | if test $succeeded = yes; then | |
10069 | HAVE_FC=yes | |
10070 | else | |
10071 | HAVE_FC=no | |
10072 | fi | |
10073 | ||
10074 | ||
10075 | ## Use -lXft if available, unless `--with-xft=no'. | |
10076 | HAVE_XFT=maybe | |
10077 | if test "${HAVE_FC}" = "no" || test "x${with_x}" = "xno"; then | |
10078 | with_xft="no"; | |
10079 | fi | |
10080 | if test "x${with_xft}" != "xno"; then | |
10081 | ||
10082 | ||
10083 | succeeded=no | |
10084 | ||
10085 | # Extract the first word of "pkg-config", so it can be a program name with args. | |
10086 | set dummy pkg-config; ac_word=$2 | |
10087 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
10088 | $as_echo_n "checking for $ac_word... " >&6; } | |
d6a003a8 | 10089 | if ${ac_cv_path_PKG_CONFIG+:} false; then : |
067d23c9 KY |
10090 | $as_echo_n "(cached) " >&6 |
10091 | else | |
10092 | case $PKG_CONFIG in | |
10093 | [\\/]* | ?:[\\/]*) | |
10094 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
10095 | ;; | |
10096 | *) | |
10097 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
10098 | for as_dir in $PATH | |
10099 | do | |
10100 | IFS=$as_save_IFS | |
10101 | test -z "$as_dir" && as_dir=. | |
10102 | for ac_exec_ext in '' $ac_executable_extensions; do | |
10103 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
10104 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
10105 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
10106 | break 2 | |
10107 | fi | |
10108 | done | |
10109 | done | |
10110 | IFS=$as_save_IFS | |
10111 | ||
10112 | test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" | |
10113 | ;; | |
10114 | esac | |
10115 | fi | |
10116 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG | |
10117 | if test -n "$PKG_CONFIG"; then | |
10118 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
10119 | $as_echo "$PKG_CONFIG" >&6; } | |
10120 | else | |
10121 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
10122 | $as_echo "no" >&6; } | |
10123 | fi | |
10124 | ||
10125 | ||
10126 | ||
10127 | if test "$PKG_CONFIG" = "no" ; then | |
10128 | HAVE_XFT=no | |
10129 | else | |
10130 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
10131 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
10132 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xft >= 0.13.0" >&5 | |
10133 | $as_echo_n "checking for xft >= 0.13.0... " >&6; } | |
10134 | ||
10135 | if $PKG_CONFIG --exists "xft >= 0.13.0" 2>&5; then | |
10136 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
10137 | $as_echo "yes" >&6; } | |
10138 | succeeded=yes | |
10139 | ||
10140 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking XFT_CFLAGS" >&5 | |
10141 | $as_echo_n "checking XFT_CFLAGS... " >&6; } | |
10142 | XFT_CFLAGS=`$PKG_CONFIG --cflags "xft >= 0.13.0"|sed -e 's,///*,/,g'` | |
10143 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XFT_CFLAGS" >&5 | |
10144 | $as_echo "$XFT_CFLAGS" >&6; } | |
10145 | ||
10146 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking XFT_LIBS" >&5 | |
10147 | $as_echo_n "checking XFT_LIBS... " >&6; } | |
10148 | XFT_LIBS=`$PKG_CONFIG --libs "xft >= 0.13.0"|sed -e 's,///*,/,g'` | |
10149 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XFT_LIBS" >&5 | |
10150 | $as_echo "$XFT_LIBS" >&6; } | |
10151 | else | |
10152 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
10153 | $as_echo "no" >&6; } | |
10154 | XFT_CFLAGS="" | |
10155 | XFT_LIBS="" | |
10156 | ## If we have a custom action on failure, don't print errors, but | |
10157 | ## do set a variable so people can do so. | |
10158 | XFT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xft >= 0.13.0"` | |
10159 | ||
10160 | fi | |
10161 | ||
10162 | ||
10163 | ||
10164 | else | |
10165 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
10166 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
10167 | fi | |
10168 | fi | |
10169 | ||
10170 | if test $succeeded = yes; then | |
10171 | : | |
10172 | else | |
10173 | HAVE_XFT=no | |
10174 | fi | |
10175 | ||
10176 | ## Because xftfont.c uses XRenderQueryExtension, we also | |
10177 | ## need to link to -lXrender. | |
10178 | HAVE_XRENDER=no | |
10179 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRenderQueryExtension in -lXrender" >&5 | |
10180 | $as_echo_n "checking for XRenderQueryExtension in -lXrender... " >&6; } | |
d6a003a8 | 10181 | if ${ac_cv_lib_Xrender_XRenderQueryExtension+:} false; then : |
067d23c9 KY |
10182 | $as_echo_n "(cached) " >&6 |
10183 | else | |
10184 | ac_check_lib_save_LIBS=$LIBS | |
10185 | LIBS="-lXrender $LIBS" | |
10186 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10187 | /* end confdefs.h. */ | |
10188 | ||
10189 | /* Override any GCC internal prototype to avoid an error. | |
10190 | Use char because int might match the return type of a GCC | |
10191 | builtin and then its argument prototype would still apply. */ | |
10192 | #ifdef __cplusplus | |
10193 | extern "C" | |
10194 | #endif | |
10195 | char XRenderQueryExtension (); | |
10196 | int | |
10197 | main () | |
10198 | { | |
10199 | return XRenderQueryExtension (); | |
10200 | ; | |
10201 | return 0; | |
10202 | } | |
10203 | _ACEOF | |
10204 | if ac_fn_c_try_link "$LINENO"; then : | |
10205 | ac_cv_lib_Xrender_XRenderQueryExtension=yes | |
10206 | else | |
10207 | ac_cv_lib_Xrender_XRenderQueryExtension=no | |
10208 | fi | |
10209 | rm -f core conftest.err conftest.$ac_objext \ | |
10210 | conftest$ac_exeext conftest.$ac_ext | |
10211 | LIBS=$ac_check_lib_save_LIBS | |
10212 | fi | |
10213 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrender_XRenderQueryExtension" >&5 | |
10214 | $as_echo "$ac_cv_lib_Xrender_XRenderQueryExtension" >&6; } | |
d6a003a8 | 10215 | if test "x$ac_cv_lib_Xrender_XRenderQueryExtension" = xyes; then : |
067d23c9 KY |
10216 | HAVE_XRENDER=yes |
10217 | fi | |
10218 | ||
10219 | if test "$HAVE_XFT" != no && test "$HAVE_XRENDER" != no; then | |
10220 | OLD_CPPFLAGS="$CPPFLAGS" | |
10221 | OLD_CFLAGS="$CFLAGS" | |
10222 | OLD_LIBS="$LIBS" | |
10223 | CPPFLAGS="$CPPFLAGS $XFT_CFLAGS" | |
10224 | CFLAGS="$CFLAGS $XFT_CFLAGS" | |
10225 | XFT_LIBS="-lXrender $XFT_LIBS" | |
10226 | LIBS="$XFT_LIBS $LIBS" | |
10227 | ac_fn_c_check_header_mongrel "$LINENO" "X11/Xft/Xft.h" "ac_cv_header_X11_Xft_Xft_h" "$ac_includes_default" | |
d6a003a8 | 10228 | if test "x$ac_cv_header_X11_Xft_Xft_h" = xyes; then : |
067d23c9 KY |
10229 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XftFontOpen in -lXft" >&5 |
10230 | $as_echo_n "checking for XftFontOpen in -lXft... " >&6; } | |
d6a003a8 | 10231 | if ${ac_cv_lib_Xft_XftFontOpen+:} false; then : |
067d23c9 KY |
10232 | $as_echo_n "(cached) " >&6 |
10233 | else | |
10234 | ac_check_lib_save_LIBS=$LIBS | |
10235 | LIBS="-lXft $XFT_LIBS $LIBS" | |
10236 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10237 | /* end confdefs.h. */ | |
10238 | ||
10239 | /* Override any GCC internal prototype to avoid an error. | |
10240 | Use char because int might match the return type of a GCC | |
10241 | builtin and then its argument prototype would still apply. */ | |
10242 | #ifdef __cplusplus | |
10243 | extern "C" | |
10244 | #endif | |
10245 | char XftFontOpen (); | |
10246 | int | |
10247 | main () | |
10248 | { | |
10249 | return XftFontOpen (); | |
10250 | ; | |
10251 | return 0; | |
10252 | } | |
10253 | _ACEOF | |
10254 | if ac_fn_c_try_link "$LINENO"; then : | |
10255 | ac_cv_lib_Xft_XftFontOpen=yes | |
10256 | else | |
10257 | ac_cv_lib_Xft_XftFontOpen=no | |
10258 | fi | |
10259 | rm -f core conftest.err conftest.$ac_objext \ | |
10260 | conftest$ac_exeext conftest.$ac_ext | |
10261 | LIBS=$ac_check_lib_save_LIBS | |
10262 | fi | |
10263 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xft_XftFontOpen" >&5 | |
10264 | $as_echo "$ac_cv_lib_Xft_XftFontOpen" >&6; } | |
d6a003a8 | 10265 | if test "x$ac_cv_lib_Xft_XftFontOpen" = xyes; then : |
067d23c9 KY |
10266 | HAVE_XFT=yes |
10267 | fi | |
10268 | ||
10269 | fi | |
10270 | ||
10271 | ||
10272 | ||
10273 | if test "${HAVE_XFT}" = "yes"; then | |
10274 | ||
10275 | $as_echo "#define HAVE_XFT 1" >>confdefs.h | |
10276 | ||
10277 | ||
10278 | C_SWITCH_X_SITE="$C_SWITCH_X_SITE $XFT_CFLAGS" | |
10279 | else | |
10280 | CPPFLAGS="$OLD_CPPFLAGS" | |
10281 | CFLAGS="$OLD_CFLAGS" | |
10282 | LIBS="$OLD_LIBS" | |
10283 | fi # "${HAVE_XFT}" = "yes" | |
10284 | fi # "$HAVE_XFT" != no | |
10285 | fi # "x${with_xft}" != "xno" | |
10286 | ||
10287 | if test "$HAVE_XFT" != "yes"; then | |
10288 | HAVE_XFT=no | |
10289 | fi | |
10290 | ||
10291 | ||
10292 | HAVE_FREETYPE=no | |
10293 | ## We used to allow building with FreeType and without Xft. | |
10294 | ## However, the ftx font backend driver is not in good shape. | |
10295 | if test "${HAVE_XFT}" = "yes"; then | |
10296 | HAVE_FREETYPE=yes | |
10297 | FONTCONFIG_CFLAGS= | |
10298 | FONTCONFIG_LIBS= | |
10299 | fi | |
10300 | ||
10301 | HAVE_LIBOTF=no | |
10302 | if test "${HAVE_FREETYPE}" = "yes"; then | |
10303 | ||
10304 | $as_echo "#define HAVE_FREETYPE 1" >>confdefs.h | |
10305 | ||
10306 | if test "${with_libotf}" != "no"; then | |
10307 | ||
10308 | succeeded=no | |
10309 | ||
10310 | # Extract the first word of "pkg-config", so it can be a program name with args. | |
10311 | set dummy pkg-config; ac_word=$2 | |
10312 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
10313 | $as_echo_n "checking for $ac_word... " >&6; } | |
d6a003a8 | 10314 | if ${ac_cv_path_PKG_CONFIG+:} false; then : |
067d23c9 KY |
10315 | $as_echo_n "(cached) " >&6 |
10316 | else | |
10317 | case $PKG_CONFIG in | |
10318 | [\\/]* | ?:[\\/]*) | |
10319 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
10320 | ;; | |
10321 | *) | |
10322 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
10323 | for as_dir in $PATH | |
10324 | do | |
10325 | IFS=$as_save_IFS | |
10326 | test -z "$as_dir" && as_dir=. | |
10327 | for ac_exec_ext in '' $ac_executable_extensions; do | |
10328 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
10329 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
10330 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
10331 | break 2 | |
10332 | fi | |
10333 | done | |
10334 | done | |
10335 | IFS=$as_save_IFS | |
10336 | ||
10337 | test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" | |
10338 | ;; | |
10339 | esac | |
10340 | fi | |
10341 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG | |
10342 | if test -n "$PKG_CONFIG"; then | |
10343 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
10344 | $as_echo "$PKG_CONFIG" >&6; } | |
10345 | else | |
10346 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
10347 | $as_echo "no" >&6; } | |
10348 | fi | |
10349 | ||
10350 | ||
10351 | ||
10352 | if test "$PKG_CONFIG" = "no" ; then | |
10353 | HAVE_LIBOTF=no | |
10354 | else | |
10355 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
10356 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
10357 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libotf" >&5 | |
10358 | $as_echo_n "checking for libotf... " >&6; } | |
10359 | ||
10360 | if $PKG_CONFIG --exists "libotf" 2>&5; then | |
10361 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
10362 | $as_echo "yes" >&6; } | |
10363 | succeeded=yes | |
10364 | ||
10365 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBOTF_CFLAGS" >&5 | |
10366 | $as_echo_n "checking LIBOTF_CFLAGS... " >&6; } | |
10367 | LIBOTF_CFLAGS=`$PKG_CONFIG --cflags "libotf"|sed -e 's,///*,/,g'` | |
10368 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBOTF_CFLAGS" >&5 | |
10369 | $as_echo "$LIBOTF_CFLAGS" >&6; } | |
10370 | ||
10371 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBOTF_LIBS" >&5 | |
10372 | $as_echo_n "checking LIBOTF_LIBS... " >&6; } | |
10373 | LIBOTF_LIBS=`$PKG_CONFIG --libs "libotf"|sed -e 's,///*,/,g'` | |
10374 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBOTF_LIBS" >&5 | |
10375 | $as_echo "$LIBOTF_LIBS" >&6; } | |
10376 | else | |
10377 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
10378 | $as_echo "no" >&6; } | |
10379 | LIBOTF_CFLAGS="" | |
10380 | LIBOTF_LIBS="" | |
10381 | ## If we have a custom action on failure, don't print errors, but | |
10382 | ## do set a variable so people can do so. | |
10383 | LIBOTF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libotf"` | |
10384 | ||
10385 | fi | |
10386 | ||
10387 | ||
10388 | ||
10389 | else | |
10390 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
10391 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
10392 | fi | |
10393 | fi | |
10394 | ||
10395 | if test $succeeded = yes; then | |
10396 | HAVE_LIBOTF=yes | |
10397 | else | |
10398 | HAVE_LIBOTF=no | |
10399 | fi | |
10400 | ||
10401 | if test "$HAVE_LIBOTF" = "yes"; then | |
10402 | ||
10403 | $as_echo "#define HAVE_LIBOTF 1" >>confdefs.h | |
10404 | ||
10405 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTF_get_variation_glyphs in -lotf" >&5 | |
10406 | $as_echo_n "checking for OTF_get_variation_glyphs in -lotf... " >&6; } | |
d6a003a8 | 10407 | if ${ac_cv_lib_otf_OTF_get_variation_glyphs+:} false; then : |
067d23c9 KY |
10408 | $as_echo_n "(cached) " >&6 |
10409 | else | |
10410 | ac_check_lib_save_LIBS=$LIBS | |
10411 | LIBS="-lotf $LIBS" | |
10412 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10413 | /* end confdefs.h. */ | |
10414 | ||
10415 | /* Override any GCC internal prototype to avoid an error. | |
10416 | Use char because int might match the return type of a GCC | |
10417 | builtin and then its argument prototype would still apply. */ | |
10418 | #ifdef __cplusplus | |
10419 | extern "C" | |
10420 | #endif | |
10421 | char OTF_get_variation_glyphs (); | |
10422 | int | |
10423 | main () | |
10424 | { | |
10425 | return OTF_get_variation_glyphs (); | |
10426 | ; | |
10427 | return 0; | |
10428 | } | |
10429 | _ACEOF | |
10430 | if ac_fn_c_try_link "$LINENO"; then : | |
10431 | ac_cv_lib_otf_OTF_get_variation_glyphs=yes | |
10432 | else | |
10433 | ac_cv_lib_otf_OTF_get_variation_glyphs=no | |
10434 | fi | |
10435 | rm -f core conftest.err conftest.$ac_objext \ | |
10436 | conftest$ac_exeext conftest.$ac_ext | |
10437 | LIBS=$ac_check_lib_save_LIBS | |
10438 | fi | |
10439 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_otf_OTF_get_variation_glyphs" >&5 | |
10440 | $as_echo "$ac_cv_lib_otf_OTF_get_variation_glyphs" >&6; } | |
d6a003a8 | 10441 | if test "x$ac_cv_lib_otf_OTF_get_variation_glyphs" = xyes; then : |
067d23c9 KY |
10442 | HAVE_OTF_GET_VARIATION_GLYPHS=yes |
10443 | else | |
10444 | HAVE_OTF_GET_VARIATION_GLYPHS=no | |
10445 | fi | |
10446 | ||
10447 | if test "${HAVE_OTF_GET_VARIATION_GLYPHS}" = "yes"; then | |
10448 | ||
10449 | $as_echo "#define HAVE_OTF_GET_VARIATION_GLYPHS 1" >>confdefs.h | |
10450 | ||
10451 | fi | |
10452 | fi | |
10453 | fi | |
10454 | fi | |
10455 | ||
10456 | HAVE_M17N_FLT=no | |
10457 | if test "${HAVE_LIBOTF}" = yes; then | |
10458 | if test "${with_m17n_flt}" != "no"; then | |
10459 | ||
10460 | succeeded=no | |
10461 | ||
10462 | # Extract the first word of "pkg-config", so it can be a program name with args. | |
10463 | set dummy pkg-config; ac_word=$2 | |
10464 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
10465 | $as_echo_n "checking for $ac_word... " >&6; } | |
d6a003a8 | 10466 | if ${ac_cv_path_PKG_CONFIG+:} false; then : |
067d23c9 KY |
10467 | $as_echo_n "(cached) " >&6 |
10468 | else | |
10469 | case $PKG_CONFIG in | |
10470 | [\\/]* | ?:[\\/]*) | |
10471 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
10472 | ;; | |
10473 | *) | |
10474 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
10475 | for as_dir in $PATH | |
10476 | do | |
10477 | IFS=$as_save_IFS | |
10478 | test -z "$as_dir" && as_dir=. | |
10479 | for ac_exec_ext in '' $ac_executable_extensions; do | |
10480 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
10481 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
10482 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
10483 | break 2 | |
10484 | fi | |
10485 | done | |
10486 | done | |
10487 | IFS=$as_save_IFS | |
10488 | ||
10489 | test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" | |
10490 | ;; | |
10491 | esac | |
10492 | fi | |
10493 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG | |
10494 | if test -n "$PKG_CONFIG"; then | |
10495 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
10496 | $as_echo "$PKG_CONFIG" >&6; } | |
10497 | else | |
10498 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
10499 | $as_echo "no" >&6; } | |
10500 | fi | |
10501 | ||
10502 | ||
10503 | ||
10504 | if test "$PKG_CONFIG" = "no" ; then | |
10505 | HAVE_M17N_FLT=no | |
10506 | else | |
10507 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
10508 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
10509 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for m17n-flt" >&5 | |
10510 | $as_echo_n "checking for m17n-flt... " >&6; } | |
10511 | ||
10512 | if $PKG_CONFIG --exists "m17n-flt" 2>&5; then | |
10513 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
10514 | $as_echo "yes" >&6; } | |
10515 | succeeded=yes | |
10516 | ||
10517 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking M17N_FLT_CFLAGS" >&5 | |
10518 | $as_echo_n "checking M17N_FLT_CFLAGS... " >&6; } | |
10519 | M17N_FLT_CFLAGS=`$PKG_CONFIG --cflags "m17n-flt"|sed -e 's,///*,/,g'` | |
10520 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $M17N_FLT_CFLAGS" >&5 | |
10521 | $as_echo "$M17N_FLT_CFLAGS" >&6; } | |
10522 | ||
10523 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking M17N_FLT_LIBS" >&5 | |
10524 | $as_echo_n "checking M17N_FLT_LIBS... " >&6; } | |
10525 | M17N_FLT_LIBS=`$PKG_CONFIG --libs "m17n-flt"|sed -e 's,///*,/,g'` | |
10526 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $M17N_FLT_LIBS" >&5 | |
10527 | $as_echo "$M17N_FLT_LIBS" >&6; } | |
10528 | else | |
10529 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
10530 | $as_echo "no" >&6; } | |
10531 | M17N_FLT_CFLAGS="" | |
10532 | M17N_FLT_LIBS="" | |
10533 | ## If we have a custom action on failure, don't print errors, but | |
10534 | ## do set a variable so people can do so. | |
10535 | M17N_FLT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "m17n-flt"` | |
10536 | ||
10537 | fi | |
10538 | ||
10539 | ||
10540 | ||
10541 | else | |
10542 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
10543 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
10544 | fi | |
10545 | fi | |
10546 | ||
10547 | if test $succeeded = yes; then | |
10548 | HAVE_M17N_FLT=yes | |
10549 | else | |
10550 | HAVE_M17N_FLT=no | |
10551 | fi | |
10552 | ||
10553 | if test "$HAVE_M17N_FLT" = "yes"; then | |
10554 | ||
10555 | $as_echo "#define HAVE_M17N_FLT 1" >>confdefs.h | |
10556 | ||
10557 | fi | |
10558 | fi | |
10559 | fi | |
10560 | else | |
10561 | HAVE_XFT=no | |
10562 | HAVE_FREETYPE=no | |
10563 | HAVE_LIBOTF=no | |
10564 | HAVE_M17N_FLT=no | |
10565 | fi | |
10566 | ||
10567 | ### End of font-backend (under X11) section. | |
10568 | ||
10569 | ||
10570 | ||
10571 | ||
10572 | ||
10573 | ||
10574 | ||
10575 | ||
10576 | ||
10577 | ||
10578 | ### Use -lXpm if available, unless `--with-xpm=no'. | |
10579 | HAVE_XPM=no | |
10580 | LIBXPM= | |
10581 | if test "${HAVE_X11}" = "yes"; then | |
10582 | if test "${with_xpm}" != "no"; then | |
10583 | ac_fn_c_check_header_mongrel "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "$ac_includes_default" | |
d6a003a8 | 10584 | if test "x$ac_cv_header_X11_xpm_h" = xyes; then : |
067d23c9 KY |
10585 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReadFileToPixmap in -lXpm" >&5 |
10586 | $as_echo_n "checking for XpmReadFileToPixmap in -lXpm... " >&6; } | |
d6a003a8 | 10587 | if ${ac_cv_lib_Xpm_XpmReadFileToPixmap+:} false; then : |
067d23c9 KY |
10588 | $as_echo_n "(cached) " >&6 |
10589 | else | |
10590 | ac_check_lib_save_LIBS=$LIBS | |
10591 | LIBS="-lXpm -lX11 $LIBS" | |
10592 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10593 | /* end confdefs.h. */ | |
10594 | ||
10595 | /* Override any GCC internal prototype to avoid an error. | |
10596 | Use char because int might match the return type of a GCC | |
10597 | builtin and then its argument prototype would still apply. */ | |
10598 | #ifdef __cplusplus | |
10599 | extern "C" | |
10600 | #endif | |
10601 | char XpmReadFileToPixmap (); | |
10602 | int | |
10603 | main () | |
10604 | { | |
10605 | return XpmReadFileToPixmap (); | |
10606 | ; | |
10607 | return 0; | |
10608 | } | |
10609 | _ACEOF | |
10610 | if ac_fn_c_try_link "$LINENO"; then : | |
10611 | ac_cv_lib_Xpm_XpmReadFileToPixmap=yes | |
10612 | else | |
10613 | ac_cv_lib_Xpm_XpmReadFileToPixmap=no | |
10614 | fi | |
10615 | rm -f core conftest.err conftest.$ac_objext \ | |
10616 | conftest$ac_exeext conftest.$ac_ext | |
10617 | LIBS=$ac_check_lib_save_LIBS | |
10618 | fi | |
10619 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5 | |
10620 | $as_echo "$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6; } | |
d6a003a8 | 10621 | if test "x$ac_cv_lib_Xpm_XpmReadFileToPixmap" = xyes; then : |
067d23c9 KY |
10622 | HAVE_XPM=yes |
10623 | fi | |
10624 | ||
10625 | fi | |
10626 | ||
10627 | ||
10628 | if test "${HAVE_XPM}" = "yes"; then | |
10629 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReturnAllocPixels preprocessor define" >&5 | |
10630 | $as_echo_n "checking for XpmReturnAllocPixels preprocessor define... " >&6; } | |
10631 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10632 | /* end confdefs.h. */ | |
10633 | #include "X11/xpm.h" | |
10634 | #ifndef XpmReturnAllocPixels | |
10635 | no_return_alloc_pixels | |
10636 | #endif | |
10637 | ||
10638 | _ACEOF | |
10639 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
10640 | $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then : | |
10641 | HAVE_XPM=no | |
10642 | else | |
10643 | HAVE_XPM=yes | |
10644 | fi | |
10645 | rm -f conftest* | |
10646 | ||
10647 | ||
10648 | if test "${HAVE_XPM}" = "yes"; then | |
10649 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
10650 | $as_echo "yes" >&6; } | |
10651 | else | |
10652 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
10653 | $as_echo "no" >&6; } | |
10654 | fi | |
10655 | fi | |
10656 | fi | |
10657 | ||
10658 | if test "${HAVE_XPM}" = "yes"; then | |
10659 | ||
10660 | $as_echo "#define HAVE_XPM 1" >>confdefs.h | |
10661 | ||
10662 | LIBXPM=-lXpm | |
10663 | fi | |
10664 | fi | |
10665 | ||
10666 | ||
10667 | ### Use -ljpeg if available, unless `--with-jpeg=no'. | |
10668 | HAVE_JPEG=no | |
10669 | LIBJPEG= | |
10670 | if test "${HAVE_X11}" = "yes"; then | |
10671 | if test "${with_jpeg}" != "no"; then | |
10672 | ac_fn_c_check_header_mongrel "$LINENO" "jerror.h" "ac_cv_header_jerror_h" "$ac_includes_default" | |
d6a003a8 | 10673 | if test "x$ac_cv_header_jerror_h" = xyes; then : |
067d23c9 KY |
10674 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_destroy_compress in -ljpeg" >&5 |
10675 | $as_echo_n "checking for jpeg_destroy_compress in -ljpeg... " >&6; } | |
d6a003a8 | 10676 | if ${ac_cv_lib_jpeg_jpeg_destroy_compress+:} false; then : |
067d23c9 KY |
10677 | $as_echo_n "(cached) " >&6 |
10678 | else | |
10679 | ac_check_lib_save_LIBS=$LIBS | |
10680 | LIBS="-ljpeg $LIBS" | |
10681 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10682 | /* end confdefs.h. */ | |
10683 | ||
10684 | /* Override any GCC internal prototype to avoid an error. | |
10685 | Use char because int might match the return type of a GCC | |
10686 | builtin and then its argument prototype would still apply. */ | |
10687 | #ifdef __cplusplus | |
10688 | extern "C" | |
10689 | #endif | |
10690 | char jpeg_destroy_compress (); | |
10691 | int | |
10692 | main () | |
10693 | { | |
10694 | return jpeg_destroy_compress (); | |
10695 | ; | |
10696 | return 0; | |
10697 | } | |
10698 | _ACEOF | |
10699 | if ac_fn_c_try_link "$LINENO"; then : | |
10700 | ac_cv_lib_jpeg_jpeg_destroy_compress=yes | |
10701 | else | |
10702 | ac_cv_lib_jpeg_jpeg_destroy_compress=no | |
10703 | fi | |
10704 | rm -f core conftest.err conftest.$ac_objext \ | |
10705 | conftest$ac_exeext conftest.$ac_ext | |
10706 | LIBS=$ac_check_lib_save_LIBS | |
10707 | fi | |
10708 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5 | |
10709 | $as_echo "$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6; } | |
d6a003a8 | 10710 | if test "x$ac_cv_lib_jpeg_jpeg_destroy_compress" = xyes; then : |
067d23c9 KY |
10711 | HAVE_JPEG=yes |
10712 | fi | |
10713 | ||
10714 | fi | |
10715 | ||
10716 | ||
10717 | fi | |
10718 | ||
10719 | if test "${HAVE_JPEG}" = "yes"; then | |
10720 | $as_echo "#define HAVE_JPEG 1" >>confdefs.h | |
10721 | ||
10722 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10723 | /* end confdefs.h. */ | |
10724 | #include <jpeglib.h> | |
10725 | version=JPEG_LIB_VERSION | |
10726 | ||
10727 | _ACEOF | |
10728 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
10729 | $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then : | |
10730 | $as_echo "#define HAVE_JPEG 1" >>confdefs.h | |
10731 | ||
10732 | else | |
10733 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libjpeg found, but not version 6b or later" >&5 | |
10734 | $as_echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;} | |
10735 | HAVE_JPEG=no | |
10736 | fi | |
10737 | rm -f conftest* | |
10738 | ||
10739 | fi | |
10740 | if test "${HAVE_JPEG}" = "yes"; then | |
10741 | LIBJPEG=-ljpeg | |
10742 | fi | |
10743 | fi | |
10744 | ||
10745 | ||
10746 | ### Use -lpng if available, unless `--with-png=no'. | |
10747 | HAVE_PNG=no | |
10748 | LIBPNG= | |
10749 | if test "${HAVE_X11}" = "yes"; then | |
10750 | if test "${with_png}" != "no"; then | |
10751 | # Debian unstable as of July 2003 has multiple libpngs, and puts png.h | |
10752 | # in /usr/include/libpng. | |
10753 | for ac_header in png.h libpng/png.h | |
10754 | do : | |
10755 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
10756 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
d6a003a8 | 10757 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : |
067d23c9 KY |
10758 | cat >>confdefs.h <<_ACEOF |
10759 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
10760 | _ACEOF | |
10761 | ||
10762 | fi | |
10763 | ||
10764 | done | |
10765 | ||
10766 | if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then | |
10767 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_get_channels in -lpng" >&5 | |
10768 | $as_echo_n "checking for png_get_channels in -lpng... " >&6; } | |
d6a003a8 | 10769 | if ${ac_cv_lib_png_png_get_channels+:} false; then : |
067d23c9 KY |
10770 | $as_echo_n "(cached) " >&6 |
10771 | else | |
10772 | ac_check_lib_save_LIBS=$LIBS | |
10773 | LIBS="-lpng -lz -lm $LIBS" | |
10774 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10775 | /* end confdefs.h. */ | |
10776 | ||
10777 | /* Override any GCC internal prototype to avoid an error. | |
10778 | Use char because int might match the return type of a GCC | |
10779 | builtin and then its argument prototype would still apply. */ | |
10780 | #ifdef __cplusplus | |
10781 | extern "C" | |
10782 | #endif | |
10783 | char png_get_channels (); | |
10784 | int | |
10785 | main () | |
10786 | { | |
10787 | return png_get_channels (); | |
10788 | ; | |
10789 | return 0; | |
10790 | } | |
10791 | _ACEOF | |
10792 | if ac_fn_c_try_link "$LINENO"; then : | |
10793 | ac_cv_lib_png_png_get_channels=yes | |
10794 | else | |
10795 | ac_cv_lib_png_png_get_channels=no | |
10796 | fi | |
10797 | rm -f core conftest.err conftest.$ac_objext \ | |
10798 | conftest$ac_exeext conftest.$ac_ext | |
10799 | LIBS=$ac_check_lib_save_LIBS | |
10800 | fi | |
10801 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_png_png_get_channels" >&5 | |
10802 | $as_echo "$ac_cv_lib_png_png_get_channels" >&6; } | |
d6a003a8 | 10803 | if test "x$ac_cv_lib_png_png_get_channels" = xyes; then : |
067d23c9 KY |
10804 | HAVE_PNG=yes |
10805 | fi | |
10806 | ||
10807 | fi | |
10808 | fi | |
10809 | ||
10810 | if test "${HAVE_PNG}" = "yes"; then | |
10811 | ||
10812 | $as_echo "#define HAVE_PNG 1" >>confdefs.h | |
10813 | ||
10814 | LIBPNG="-lpng -lz -lm" | |
10815 | fi | |
10816 | fi | |
10817 | ||
10818 | ||
10819 | ### Use -ltiff if available, unless `--with-tiff=no'. | |
10820 | HAVE_TIFF=no | |
10821 | LIBTIFF= | |
10822 | if test "${HAVE_X11}" = "yes"; then | |
10823 | if test "${with_tiff}" != "no"; then | |
10824 | ac_fn_c_check_header_mongrel "$LINENO" "tiffio.h" "ac_cv_header_tiffio_h" "$ac_includes_default" | |
d6a003a8 | 10825 | if test "x$ac_cv_header_tiffio_h" = xyes; then : |
067d23c9 KY |
10826 | tifflibs="-lz -lm" |
10827 | # At least one tiff package requires the jpeg library. | |
10828 | if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi | |
10829 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIFFGetVersion in -ltiff" >&5 | |
10830 | $as_echo_n "checking for TIFFGetVersion in -ltiff... " >&6; } | |
d6a003a8 | 10831 | if ${ac_cv_lib_tiff_TIFFGetVersion+:} false; then : |
067d23c9 KY |
10832 | $as_echo_n "(cached) " >&6 |
10833 | else | |
10834 | ac_check_lib_save_LIBS=$LIBS | |
10835 | LIBS="-ltiff $tifflibs $LIBS" | |
10836 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10837 | /* end confdefs.h. */ | |
10838 | ||
10839 | /* Override any GCC internal prototype to avoid an error. | |
10840 | Use char because int might match the return type of a GCC | |
10841 | builtin and then its argument prototype would still apply. */ | |
10842 | #ifdef __cplusplus | |
10843 | extern "C" | |
10844 | #endif | |
10845 | char TIFFGetVersion (); | |
10846 | int | |
10847 | main () | |
10848 | { | |
10849 | return TIFFGetVersion (); | |
10850 | ; | |
10851 | return 0; | |
10852 | } | |
10853 | _ACEOF | |
10854 | if ac_fn_c_try_link "$LINENO"; then : | |
10855 | ac_cv_lib_tiff_TIFFGetVersion=yes | |
10856 | else | |
10857 | ac_cv_lib_tiff_TIFFGetVersion=no | |
10858 | fi | |
10859 | rm -f core conftest.err conftest.$ac_objext \ | |
10860 | conftest$ac_exeext conftest.$ac_ext | |
10861 | LIBS=$ac_check_lib_save_LIBS | |
10862 | fi | |
10863 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5 | |
10864 | $as_echo "$ac_cv_lib_tiff_TIFFGetVersion" >&6; } | |
d6a003a8 | 10865 | if test "x$ac_cv_lib_tiff_TIFFGetVersion" = xyes; then : |
067d23c9 KY |
10866 | HAVE_TIFF=yes |
10867 | fi | |
10868 | ||
10869 | fi | |
10870 | ||
10871 | ||
10872 | fi | |
10873 | ||
10874 | if test "${HAVE_TIFF}" = "yes"; then | |
10875 | ||
10876 | $as_echo "#define HAVE_TIFF 1" >>confdefs.h | |
10877 | ||
10878 | LIBTIFF=-ltiff | |
10879 | fi | |
10880 | fi | |
10881 | ||
10882 | ||
10883 | ### Use -lgif or -lungif if available, unless `--with-gif=no'. | |
10884 | HAVE_GIF=no | |
10885 | LIBGIF= | |
10886 | if test "${HAVE_X11}" = "yes" && test "${with_gif}" != "no"; then | |
10887 | ac_fn_c_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default" | |
d6a003a8 | 10888 | if test "x$ac_cv_header_gif_lib_h" = xyes; then : |
067d23c9 KY |
10889 | # EGifPutExtensionLast only exists from version libungif-4.1.0b1. |
10890 | # Earlier versions can crash Emacs. | |
10891 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lgif" >&5 | |
10892 | $as_echo_n "checking for EGifPutExtensionLast in -lgif... " >&6; } | |
d6a003a8 | 10893 | if ${ac_cv_lib_gif_EGifPutExtensionLast+:} false; then : |
067d23c9 KY |
10894 | $as_echo_n "(cached) " >&6 |
10895 | else | |
10896 | ac_check_lib_save_LIBS=$LIBS | |
10897 | LIBS="-lgif $LIBS" | |
10898 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10899 | /* end confdefs.h. */ | |
10900 | ||
10901 | /* Override any GCC internal prototype to avoid an error. | |
10902 | Use char because int might match the return type of a GCC | |
10903 | builtin and then its argument prototype would still apply. */ | |
10904 | #ifdef __cplusplus | |
10905 | extern "C" | |
10906 | #endif | |
10907 | char EGifPutExtensionLast (); | |
10908 | int | |
10909 | main () | |
10910 | { | |
10911 | return EGifPutExtensionLast (); | |
10912 | ; | |
10913 | return 0; | |
10914 | } | |
10915 | _ACEOF | |
10916 | if ac_fn_c_try_link "$LINENO"; then : | |
10917 | ac_cv_lib_gif_EGifPutExtensionLast=yes | |
10918 | else | |
10919 | ac_cv_lib_gif_EGifPutExtensionLast=no | |
10920 | fi | |
10921 | rm -f core conftest.err conftest.$ac_objext \ | |
10922 | conftest$ac_exeext conftest.$ac_ext | |
10923 | LIBS=$ac_check_lib_save_LIBS | |
10924 | fi | |
10925 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_EGifPutExtensionLast" >&5 | |
10926 | $as_echo "$ac_cv_lib_gif_EGifPutExtensionLast" >&6; } | |
d6a003a8 | 10927 | if test "x$ac_cv_lib_gif_EGifPutExtensionLast" = xyes; then : |
067d23c9 KY |
10928 | HAVE_GIF=yes |
10929 | else | |
10930 | HAVE_GIF=maybe | |
10931 | fi | |
10932 | ||
10933 | fi | |
10934 | ||
10935 | ||
10936 | ||
10937 | if test "$HAVE_GIF" = yes; then | |
10938 | LIBGIF=-lgif | |
10939 | elif test "$HAVE_GIF" = maybe; then | |
10940 | # If gif_lib.h but no libgif, try libungif. | |
10941 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lungif" >&5 | |
10942 | $as_echo_n "checking for EGifPutExtensionLast in -lungif... " >&6; } | |
d6a003a8 | 10943 | if ${ac_cv_lib_ungif_EGifPutExtensionLast+:} false; then : |
067d23c9 KY |
10944 | $as_echo_n "(cached) " >&6 |
10945 | else | |
10946 | ac_check_lib_save_LIBS=$LIBS | |
10947 | LIBS="-lungif $LIBS" | |
10948 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10949 | /* end confdefs.h. */ | |
10950 | ||
10951 | /* Override any GCC internal prototype to avoid an error. | |
10952 | Use char because int might match the return type of a GCC | |
10953 | builtin and then its argument prototype would still apply. */ | |
10954 | #ifdef __cplusplus | |
10955 | extern "C" | |
10956 | #endif | |
10957 | char EGifPutExtensionLast (); | |
10958 | int | |
10959 | main () | |
10960 | { | |
10961 | return EGifPutExtensionLast (); | |
10962 | ; | |
10963 | return 0; | |
10964 | } | |
10965 | _ACEOF | |
10966 | if ac_fn_c_try_link "$LINENO"; then : | |
10967 | ac_cv_lib_ungif_EGifPutExtensionLast=yes | |
10968 | else | |
10969 | ac_cv_lib_ungif_EGifPutExtensionLast=no | |
10970 | fi | |
10971 | rm -f core conftest.err conftest.$ac_objext \ | |
10972 | conftest$ac_exeext conftest.$ac_ext | |
10973 | LIBS=$ac_check_lib_save_LIBS | |
10974 | fi | |
10975 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5 | |
10976 | $as_echo "$ac_cv_lib_ungif_EGifPutExtensionLast" >&6; } | |
d6a003a8 | 10977 | if test "x$ac_cv_lib_ungif_EGifPutExtensionLast" = xyes; then : |
067d23c9 KY |
10978 | HAVE_GIF=yes |
10979 | else | |
10980 | HAVE_GIF=no | |
10981 | fi | |
10982 | ||
10983 | test "$HAVE_GIF" = yes && LIBGIF=-lungif | |
10984 | fi | |
10985 | ||
10986 | if test "${HAVE_GIF}" = "yes"; then | |
10987 | ||
10988 | $as_echo "#define HAVE_GIF 1" >>confdefs.h | |
10989 | ||
10990 | fi | |
10991 | fi | |
10992 | ||
10993 | ||
10994 | if test "${HAVE_X11}" = "yes"; then | |
10995 | MISSING="" | |
10996 | WITH_NO="" | |
10997 | test "${with_xpm}" != "no" && test "${HAVE_XPM}" != "yes" && | |
10998 | MISSING="libXpm" && WITH_NO="--with-xpm=no" | |
10999 | test "${with_jpeg}" != "no" && test "${HAVE_JPEG}" != "yes" && | |
11000 | MISSING="$MISSING libjpeg" && WITH_NO="$WITH_NO --with-jpeg=no" | |
11001 | test "${with_png}" != "no" && test "${HAVE_PNG}" != "yes" && | |
11002 | MISSING="$MISSING libpng" && WITH_NO="$WITH_NO --with-png=no" | |
11003 | test "${with_gif}" != "no" && test "${HAVE_GIF}" != "yes" && | |
11004 | MISSING="$MISSING libgif/libungif" && WITH_NO="$WITH_NO --with-gif=no" | |
11005 | test "${with_tiff}" != "no" && test "${HAVE_TIFF}" != "yes" && | |
11006 | MISSING="$MISSING libtiff" && WITH_NO="$WITH_NO --with-tiff=no" | |
11007 | ||
11008 | if test "X${MISSING}" != X; then | |
d6a003a8 | 11009 | as_fn_error $? "The following required libraries were not found: |
067d23c9 KY |
11010 | $MISSING |
11011 | Maybe some development libraries/packages are missing? | |
11012 | If you don't want to link with them give | |
11013 | $WITH_NO | |
11014 | as options to configure" "$LINENO" 5 | |
11015 | fi | |
11016 | fi | |
11017 | ||
11018 | ### Use -lgpm if available, unless `--with-gpm=no'. | |
11019 | HAVE_GPM=no | |
11020 | LIBGPM= | |
11021 | MOUSE_SUPPORT= | |
11022 | if test "${with_gpm}" != "no"; then | |
11023 | ac_fn_c_check_header_mongrel "$LINENO" "gpm.h" "ac_cv_header_gpm_h" "$ac_includes_default" | |
d6a003a8 | 11024 | if test "x$ac_cv_header_gpm_h" = xyes; then : |
067d23c9 KY |
11025 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Gpm_Open in -lgpm" >&5 |
11026 | $as_echo_n "checking for Gpm_Open in -lgpm... " >&6; } | |
d6a003a8 | 11027 | if ${ac_cv_lib_gpm_Gpm_Open+:} false; then : |
067d23c9 KY |
11028 | $as_echo_n "(cached) " >&6 |
11029 | else | |
11030 | ac_check_lib_save_LIBS=$LIBS | |
11031 | LIBS="-lgpm $LIBS" | |
11032 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11033 | /* end confdefs.h. */ | |
11034 | ||
11035 | /* Override any GCC internal prototype to avoid an error. | |
11036 | Use char because int might match the return type of a GCC | |
11037 | builtin and then its argument prototype would still apply. */ | |
11038 | #ifdef __cplusplus | |
11039 | extern "C" | |
11040 | #endif | |
11041 | char Gpm_Open (); | |
11042 | int | |
11043 | main () | |
11044 | { | |
11045 | return Gpm_Open (); | |
11046 | ; | |
11047 | return 0; | |
11048 | } | |
11049 | _ACEOF | |
11050 | if ac_fn_c_try_link "$LINENO"; then : | |
11051 | ac_cv_lib_gpm_Gpm_Open=yes | |
11052 | else | |
11053 | ac_cv_lib_gpm_Gpm_Open=no | |
11054 | fi | |
11055 | rm -f core conftest.err conftest.$ac_objext \ | |
11056 | conftest$ac_exeext conftest.$ac_ext | |
11057 | LIBS=$ac_check_lib_save_LIBS | |
11058 | fi | |
11059 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gpm_Gpm_Open" >&5 | |
11060 | $as_echo "$ac_cv_lib_gpm_Gpm_Open" >&6; } | |
d6a003a8 | 11061 | if test "x$ac_cv_lib_gpm_Gpm_Open" = xyes; then : |
067d23c9 KY |
11062 | HAVE_GPM=yes |
11063 | fi | |
11064 | ||
11065 | fi | |
11066 | ||
11067 | ||
11068 | ||
11069 | if test "${HAVE_GPM}" = "yes"; then | |
11070 | ||
11071 | $as_echo "#define HAVE_GPM 1" >>confdefs.h | |
11072 | ||
11073 | LIBGPM=-lgpm | |
11074 | ## May be reset below. | |
11075 | MOUSE_SUPPORT="\$(GPM_MOUSE_SUPPORT)" | |
11076 | fi | |
11077 | fi | |
11078 | ||
11079 | ||
11080 | ac_fn_c_check_header_mongrel "$LINENO" "malloc/malloc.h" "ac_cv_header_malloc_malloc_h" "$ac_includes_default" | |
d6a003a8 | 11081 | if test "x$ac_cv_header_malloc_malloc_h" = xyes; then : |
067d23c9 KY |
11082 | |
11083 | $as_echo "#define HAVE_MALLOC_MALLOC_H 1" >>confdefs.h | |
11084 | ||
11085 | fi | |
11086 | ||
11087 | ||
11088 | ||
11089 | C_SWITCH_X_SYSTEM= | |
11090 | ### Use NeXTstep API to implement GUI. | |
11091 | if test "${HAVE_NS}" = "yes"; then | |
11092 | ||
11093 | $as_echo "#define HAVE_NS 1" >>confdefs.h | |
11094 | ||
11095 | if test "${NS_IMPL_COCOA}" = "yes"; then | |
11096 | ||
11097 | $as_echo "#define NS_IMPL_COCOA 1" >>confdefs.h | |
11098 | ||
11099 | GNU_OBJC_CFLAGS= | |
11100 | fi | |
11101 | if test "${NS_IMPL_GNUSTEP}" = "yes"; then | |
11102 | ||
11103 | $as_echo "#define NS_IMPL_GNUSTEP 1" >>confdefs.h | |
11104 | ||
11105 | # See also .m.o rule in Makefile.in */ | |
11106 | # FIXME: are all these flags really needed? Document here why. */ | |
11107 | C_SWITCH_X_SYSTEM="-D_REENTRANT -fPIC -fno-strict-aliasing" | |
11108 | GNU_OBJC_CFLAGS="-fgnu-runtime -Wno-import -fconstant-string-class=NSConstantString -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGSWARN -DGSDIAGNOSE" | |
11109 | fi | |
11110 | if test "${NS_HAVE_NSINTEGER}" = "yes"; then | |
11111 | ||
11112 | $as_echo "#define NS_HAVE_NSINTEGER 1" >>confdefs.h | |
11113 | ||
11114 | fi | |
11115 | # We also have mouse menus. | |
11116 | HAVE_MENUS=yes | |
11117 | OTHER_FILES=ns-app | |
11118 | fi | |
11119 | ||
11120 | ||
11121 | ### Use session management (-lSM -lICE) if available | |
11122 | HAVE_X_SM=no | |
11123 | LIBXSM= | |
11124 | if test "${HAVE_X11}" = "yes"; then | |
11125 | ac_fn_c_check_header_mongrel "$LINENO" "X11/SM/SMlib.h" "ac_cv_header_X11_SM_SMlib_h" "$ac_includes_default" | |
d6a003a8 | 11126 | if test "x$ac_cv_header_X11_SM_SMlib_h" = xyes; then : |
067d23c9 KY |
11127 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SmcOpenConnection in -lSM" >&5 |
11128 | $as_echo_n "checking for SmcOpenConnection in -lSM... " >&6; } | |
d6a003a8 | 11129 | if ${ac_cv_lib_SM_SmcOpenConnection+:} false; then : |
067d23c9 KY |
11130 | $as_echo_n "(cached) " >&6 |
11131 | else | |
11132 | ac_check_lib_save_LIBS=$LIBS | |
11133 | LIBS="-lSM -lICE $LIBS" | |
11134 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11135 | /* end confdefs.h. */ | |
11136 | ||
11137 | /* Override any GCC internal prototype to avoid an error. | |
11138 | Use char because int might match the return type of a GCC | |
11139 | builtin and then its argument prototype would still apply. */ | |
11140 | #ifdef __cplusplus | |
11141 | extern "C" | |
11142 | #endif | |
11143 | char SmcOpenConnection (); | |
11144 | int | |
11145 | main () | |
11146 | { | |
11147 | return SmcOpenConnection (); | |
11148 | ; | |
11149 | return 0; | |
11150 | } | |
11151 | _ACEOF | |
11152 | if ac_fn_c_try_link "$LINENO"; then : | |
11153 | ac_cv_lib_SM_SmcOpenConnection=yes | |
11154 | else | |
11155 | ac_cv_lib_SM_SmcOpenConnection=no | |
11156 | fi | |
11157 | rm -f core conftest.err conftest.$ac_objext \ | |
11158 | conftest$ac_exeext conftest.$ac_ext | |
11159 | LIBS=$ac_check_lib_save_LIBS | |
11160 | fi | |
11161 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_SM_SmcOpenConnection" >&5 | |
11162 | $as_echo "$ac_cv_lib_SM_SmcOpenConnection" >&6; } | |
d6a003a8 | 11163 | if test "x$ac_cv_lib_SM_SmcOpenConnection" = xyes; then : |
067d23c9 KY |
11164 | HAVE_X_SM=yes |
11165 | fi | |
11166 | ||
11167 | fi | |
11168 | ||
11169 | ||
11170 | ||
11171 | if test "${HAVE_X_SM}" = "yes"; then | |
11172 | ||
11173 | $as_echo "#define HAVE_X_SM 1" >>confdefs.h | |
11174 | ||
11175 | LIBXSM="-lSM -lICE" | |
11176 | case "$LIBS" in | |
11177 | *-lSM*) ;; | |
11178 | *) LIBS="$LIBXSM $LIBS" ;; | |
11179 | esac | |
11180 | fi | |
11181 | fi | |
11182 | ||
11183 | ||
11184 | ### Use libxml (-lxml2) if available | |
11185 | if test "${with_xml2}" != "no"; then | |
11186 | ### I'm not sure what the version number should be, so I just guessed. | |
11187 | ||
11188 | succeeded=no | |
11189 | ||
11190 | # Extract the first word of "pkg-config", so it can be a program name with args. | |
11191 | set dummy pkg-config; ac_word=$2 | |
11192 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
11193 | $as_echo_n "checking for $ac_word... " >&6; } | |
d6a003a8 | 11194 | if ${ac_cv_path_PKG_CONFIG+:} false; then : |
067d23c9 KY |
11195 | $as_echo_n "(cached) " >&6 |
11196 | else | |
11197 | case $PKG_CONFIG in | |
11198 | [\\/]* | ?:[\\/]*) | |
11199 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
11200 | ;; | |
11201 | *) | |
11202 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
11203 | for as_dir in $PATH | |
11204 | do | |
11205 | IFS=$as_save_IFS | |
11206 | test -z "$as_dir" && as_dir=. | |
11207 | for ac_exec_ext in '' $ac_executable_extensions; do | |
11208 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
11209 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
11210 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
11211 | break 2 | |
11212 | fi | |
11213 | done | |
11214 | done | |
11215 | IFS=$as_save_IFS | |
11216 | ||
11217 | test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" | |
11218 | ;; | |
11219 | esac | |
11220 | fi | |
11221 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG | |
11222 | if test -n "$PKG_CONFIG"; then | |
11223 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
11224 | $as_echo "$PKG_CONFIG" >&6; } | |
11225 | else | |
11226 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
11227 | $as_echo "no" >&6; } | |
11228 | fi | |
11229 | ||
11230 | ||
11231 | ||
11232 | if test "$PKG_CONFIG" = "no" ; then | |
11233 | HAVE_LIBXML2=no | |
11234 | else | |
11235 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
11236 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
11237 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxml-2.0 > 2.2.0" >&5 | |
11238 | $as_echo_n "checking for libxml-2.0 > 2.2.0... " >&6; } | |
11239 | ||
11240 | if $PKG_CONFIG --exists "libxml-2.0 > 2.2.0" 2>&5; then | |
11241 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
11242 | $as_echo "yes" >&6; } | |
11243 | succeeded=yes | |
11244 | ||
11245 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBXML2_CFLAGS" >&5 | |
11246 | $as_echo_n "checking LIBXML2_CFLAGS... " >&6; } | |
11247 | LIBXML2_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0 > 2.2.0"|sed -e 's,///*,/,g'` | |
11248 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBXML2_CFLAGS" >&5 | |
11249 | $as_echo "$LIBXML2_CFLAGS" >&6; } | |
11250 | ||
11251 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBXML2_LIBS" >&5 | |
11252 | $as_echo_n "checking LIBXML2_LIBS... " >&6; } | |
11253 | LIBXML2_LIBS=`$PKG_CONFIG --libs "libxml-2.0 > 2.2.0"|sed -e 's,///*,/,g'` | |
11254 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBXML2_LIBS" >&5 | |
11255 | $as_echo "$LIBXML2_LIBS" >&6; } | |
11256 | else | |
11257 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
11258 | $as_echo "no" >&6; } | |
11259 | LIBXML2_CFLAGS="" | |
11260 | LIBXML2_LIBS="" | |
11261 | ## If we have a custom action on failure, don't print errors, but | |
11262 | ## do set a variable so people can do so. | |
11263 | LIBXML2_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libxml-2.0 > 2.2.0"` | |
11264 | ||
11265 | fi | |
11266 | ||
11267 | ||
11268 | ||
11269 | else | |
11270 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
11271 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
11272 | fi | |
11273 | fi | |
11274 | ||
11275 | if test $succeeded = yes; then | |
11276 | HAVE_LIBXML2=yes | |
11277 | else | |
11278 | HAVE_LIBXML2=no | |
11279 | fi | |
11280 | ||
11281 | if test "${HAVE_LIBXML2}" = "yes"; then | |
11282 | LIBS="$LIBXML2_LIBS $LIBS" | |
11283 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for htmlReadMemory in -lxml2" >&5 | |
11284 | $as_echo_n "checking for htmlReadMemory in -lxml2... " >&6; } | |
d6a003a8 | 11285 | if ${ac_cv_lib_xml2_htmlReadMemory+:} false; then : |
067d23c9 KY |
11286 | $as_echo_n "(cached) " >&6 |
11287 | else | |
11288 | ac_check_lib_save_LIBS=$LIBS | |
11289 | LIBS="-lxml2 $LIBS" | |
11290 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11291 | /* end confdefs.h. */ | |
11292 | ||
11293 | /* Override any GCC internal prototype to avoid an error. | |
11294 | Use char because int might match the return type of a GCC | |
11295 | builtin and then its argument prototype would still apply. */ | |
11296 | #ifdef __cplusplus | |
11297 | extern "C" | |
11298 | #endif | |
11299 | char htmlReadMemory (); | |
11300 | int | |
11301 | main () | |
11302 | { | |
11303 | return htmlReadMemory (); | |
11304 | ; | |
11305 | return 0; | |
11306 | } | |
11307 | _ACEOF | |
11308 | if ac_fn_c_try_link "$LINENO"; then : | |
11309 | ac_cv_lib_xml2_htmlReadMemory=yes | |
11310 | else | |
11311 | ac_cv_lib_xml2_htmlReadMemory=no | |
11312 | fi | |
11313 | rm -f core conftest.err conftest.$ac_objext \ | |
11314 | conftest$ac_exeext conftest.$ac_ext | |
11315 | LIBS=$ac_check_lib_save_LIBS | |
11316 | fi | |
11317 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_htmlReadMemory" >&5 | |
11318 | $as_echo "$ac_cv_lib_xml2_htmlReadMemory" >&6; } | |
d6a003a8 | 11319 | if test "x$ac_cv_lib_xml2_htmlReadMemory" = xyes; then : |
067d23c9 KY |
11320 | HAVE_LIBXML2=yes |
11321 | else | |
11322 | HAVE_LIBXML2=no | |
11323 | fi | |
11324 | ||
11325 | if test "${HAVE_LIBXML2}" = "yes"; then | |
11326 | ||
11327 | $as_echo "#define HAVE_LIBXML2 1" >>confdefs.h | |
11328 | ||
11329 | else | |
11330 | LIBXML2_LIBS="" | |
11331 | LIBXML2_CFLAGS="" | |
11332 | fi | |
11333 | fi | |
11334 | fi | |
11335 | ||
11336 | ||
11337 | ||
11338 | # If netdb.h doesn't declare h_errno, we must declare it by hand. | |
11339 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether netdb declares h_errno" >&5 | |
11340 | $as_echo_n "checking whether netdb declares h_errno... " >&6; } | |
d6a003a8 | 11341 | if ${emacs_cv_netdb_declares_h_errno+:} false; then : |
067d23c9 KY |
11342 | $as_echo_n "(cached) " >&6 |
11343 | else | |
11344 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11345 | /* end confdefs.h. */ | |
11346 | #include <netdb.h> | |
11347 | int | |
11348 | main () | |
11349 | { | |
11350 | return h_errno; | |
11351 | ; | |
11352 | return 0; | |
11353 | } | |
11354 | _ACEOF | |
11355 | if ac_fn_c_try_link "$LINENO"; then : | |
11356 | emacs_cv_netdb_declares_h_errno=yes | |
11357 | else | |
11358 | emacs_cv_netdb_declares_h_errno=no | |
11359 | fi | |
11360 | rm -f core conftest.err conftest.$ac_objext \ | |
11361 | conftest$ac_exeext conftest.$ac_ext | |
11362 | fi | |
11363 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_netdb_declares_h_errno" >&5 | |
11364 | $as_echo "$emacs_cv_netdb_declares_h_errno" >&6; } | |
11365 | if test $emacs_cv_netdb_declares_h_errno = yes; then | |
11366 | ||
11367 | $as_echo "#define HAVE_H_ERRNO 1" >>confdefs.h | |
11368 | ||
11369 | fi | |
11370 | ||
d6a003a8 AS |
11371 | ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" |
11372 | if test "x$ac_cv_type_size_t" = xyes; then : | |
11373 | ||
11374 | else | |
11375 | ||
11376 | cat >>confdefs.h <<_ACEOF | |
11377 | #define size_t unsigned int | |
11378 | _ACEOF | |
11379 | ||
11380 | fi | |
11381 | ||
067d23c9 KY |
11382 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works |
11383 | # for constant arguments. Useless! | |
11384 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 | |
11385 | $as_echo_n "checking for working alloca.h... " >&6; } | |
d6a003a8 | 11386 | if ${ac_cv_working_alloca_h+:} false; then : |
067d23c9 KY |
11387 | $as_echo_n "(cached) " >&6 |
11388 | else | |
11389 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11390 | /* end confdefs.h. */ | |
11391 | #include <alloca.h> | |
11392 | int | |
11393 | main () | |
11394 | { | |
11395 | char *p = (char *) alloca (2 * sizeof (int)); | |
11396 | if (p) return 0; | |
11397 | ; | |
11398 | return 0; | |
11399 | } | |
11400 | _ACEOF | |
11401 | if ac_fn_c_try_link "$LINENO"; then : | |
11402 | ac_cv_working_alloca_h=yes | |
11403 | else | |
11404 | ac_cv_working_alloca_h=no | |
11405 | fi | |
11406 | rm -f core conftest.err conftest.$ac_objext \ | |
11407 | conftest$ac_exeext conftest.$ac_ext | |
11408 | fi | |
11409 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 | |
11410 | $as_echo "$ac_cv_working_alloca_h" >&6; } | |
11411 | if test $ac_cv_working_alloca_h = yes; then | |
11412 | ||
11413 | $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h | |
11414 | ||
11415 | fi | |
11416 | ||
11417 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 | |
11418 | $as_echo_n "checking for alloca... " >&6; } | |
d6a003a8 | 11419 | if ${ac_cv_func_alloca_works+:} false; then : |
067d23c9 KY |
11420 | $as_echo_n "(cached) " >&6 |
11421 | else | |
11422 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11423 | /* end confdefs.h. */ | |
11424 | #ifdef __GNUC__ | |
11425 | # define alloca __builtin_alloca | |
11426 | #else | |
11427 | # ifdef _MSC_VER | |
11428 | # include <malloc.h> | |
11429 | # define alloca _alloca | |
11430 | # else | |
11431 | # ifdef HAVE_ALLOCA_H | |
11432 | # include <alloca.h> | |
11433 | # else | |
11434 | # ifdef _AIX | |
11435 | #pragma alloca | |
11436 | # else | |
11437 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
d6a003a8 | 11438 | void *alloca (size_t); |
067d23c9 KY |
11439 | # endif |
11440 | # endif | |
11441 | # endif | |
11442 | # endif | |
11443 | #endif | |
11444 | ||
11445 | int | |
11446 | main () | |
11447 | { | |
11448 | char *p = (char *) alloca (1); | |
11449 | if (p) return 0; | |
11450 | ; | |
11451 | return 0; | |
11452 | } | |
11453 | _ACEOF | |
11454 | if ac_fn_c_try_link "$LINENO"; then : | |
11455 | ac_cv_func_alloca_works=yes | |
11456 | else | |
11457 | ac_cv_func_alloca_works=no | |
11458 | fi | |
11459 | rm -f core conftest.err conftest.$ac_objext \ | |
11460 | conftest$ac_exeext conftest.$ac_ext | |
11461 | fi | |
11462 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 | |
11463 | $as_echo "$ac_cv_func_alloca_works" >&6; } | |
11464 | ||
11465 | if test $ac_cv_func_alloca_works = yes; then | |
11466 | ||
11467 | $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h | |
11468 | ||
11469 | else | |
11470 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
11471 | # that cause trouble. Some versions do not even contain alloca or | |
11472 | # contain a buggy version. If you still want to use their alloca, | |
11473 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
11474 | ||
11475 | ALLOCA=\${LIBOBJDIR}alloca.$ac_objext | |
11476 | ||
11477 | $as_echo "#define C_ALLOCA 1" >>confdefs.h | |
11478 | ||
11479 | ||
11480 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 | |
11481 | $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } | |
d6a003a8 | 11482 | if ${ac_cv_os_cray+:} false; then : |
067d23c9 KY |
11483 | $as_echo_n "(cached) " >&6 |
11484 | else | |
11485 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11486 | /* end confdefs.h. */ | |
11487 | #if defined CRAY && ! defined CRAY2 | |
11488 | webecray | |
11489 | #else | |
11490 | wenotbecray | |
11491 | #endif | |
11492 | ||
11493 | _ACEOF | |
11494 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
11495 | $EGREP "webecray" >/dev/null 2>&1; then : | |
11496 | ac_cv_os_cray=yes | |
11497 | else | |
11498 | ac_cv_os_cray=no | |
11499 | fi | |
11500 | rm -f conftest* | |
11501 | ||
11502 | fi | |
11503 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 | |
11504 | $as_echo "$ac_cv_os_cray" >&6; } | |
11505 | if test $ac_cv_os_cray = yes; then | |
11506 | for ac_func in _getb67 GETB67 getb67; do | |
11507 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
11508 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
d6a003a8 | 11509 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : |
067d23c9 KY |
11510 | |
11511 | cat >>confdefs.h <<_ACEOF | |
11512 | #define CRAY_STACKSEG_END $ac_func | |
11513 | _ACEOF | |
11514 | ||
11515 | break | |
11516 | fi | |
11517 | ||
11518 | done | |
11519 | fi | |
11520 | ||
11521 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 | |
11522 | $as_echo_n "checking stack direction for C alloca... " >&6; } | |
d6a003a8 | 11523 | if ${ac_cv_c_stack_direction+:} false; then : |
067d23c9 KY |
11524 | $as_echo_n "(cached) " >&6 |
11525 | else | |
11526 | if test "$cross_compiling" = yes; then : | |
11527 | ac_cv_c_stack_direction=0 | |
11528 | else | |
11529 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11530 | /* end confdefs.h. */ | |
11531 | $ac_includes_default | |
11532 | int | |
11533 | find_stack_direction () | |
11534 | { | |
11535 | static char *addr = 0; | |
11536 | auto char dummy; | |
11537 | if (addr == 0) | |
11538 | { | |
11539 | addr = &dummy; | |
11540 | return find_stack_direction (); | |
11541 | } | |
11542 | else | |
11543 | return (&dummy > addr) ? 1 : -1; | |
11544 | } | |
11545 | ||
11546 | int | |
11547 | main () | |
11548 | { | |
11549 | return find_stack_direction () < 0; | |
11550 | } | |
11551 | _ACEOF | |
11552 | if ac_fn_c_try_run "$LINENO"; then : | |
11553 | ac_cv_c_stack_direction=1 | |
11554 | else | |
11555 | ac_cv_c_stack_direction=-1 | |
11556 | fi | |
11557 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
11558 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
11559 | fi | |
11560 | ||
11561 | fi | |
11562 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 | |
11563 | $as_echo "$ac_cv_c_stack_direction" >&6; } | |
11564 | cat >>confdefs.h <<_ACEOF | |
11565 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
11566 | _ACEOF | |
11567 | ||
11568 | ||
11569 | fi | |
11570 | ||
11571 | ||
11572 | if test x"$ac_cv_func_alloca_works" != xyes; then | |
d6a003a8 | 11573 | as_fn_error $? "a system implementation of alloca is required " "$LINENO" 5 |
067d23c9 KY |
11574 | fi |
11575 | ||
11576 | # fmod, logb, and frexp are found in -lm on most systems. | |
11577 | # On HPUX 9.01, -lm does not contain logb, so check for sqrt. | |
11578 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5 | |
11579 | $as_echo_n "checking for sqrt in -lm... " >&6; } | |
d6a003a8 | 11580 | if ${ac_cv_lib_m_sqrt+:} false; then : |
067d23c9 KY |
11581 | $as_echo_n "(cached) " >&6 |
11582 | else | |
11583 | ac_check_lib_save_LIBS=$LIBS | |
11584 | LIBS="-lm $LIBS" | |
11585 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11586 | /* end confdefs.h. */ | |
11587 | ||
11588 | /* Override any GCC internal prototype to avoid an error. | |
11589 | Use char because int might match the return type of a GCC | |
11590 | builtin and then its argument prototype would still apply. */ | |
11591 | #ifdef __cplusplus | |
11592 | extern "C" | |
11593 | #endif | |
11594 | char sqrt (); | |
11595 | int | |
11596 | main () | |
11597 | { | |
11598 | return sqrt (); | |
11599 | ; | |
11600 | return 0; | |
11601 | } | |
11602 | _ACEOF | |
11603 | if ac_fn_c_try_link "$LINENO"; then : | |
11604 | ac_cv_lib_m_sqrt=yes | |
11605 | else | |
11606 | ac_cv_lib_m_sqrt=no | |
11607 | fi | |
11608 | rm -f core conftest.err conftest.$ac_objext \ | |
11609 | conftest$ac_exeext conftest.$ac_ext | |
11610 | LIBS=$ac_check_lib_save_LIBS | |
11611 | fi | |
11612 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sqrt" >&5 | |
11613 | $as_echo "$ac_cv_lib_m_sqrt" >&6; } | |
d6a003a8 | 11614 | if test "x$ac_cv_lib_m_sqrt" = xyes; then : |
067d23c9 KY |
11615 | cat >>confdefs.h <<_ACEOF |
11616 | #define HAVE_LIBM 1 | |
11617 | _ACEOF | |
11618 | ||
11619 | LIBS="-lm $LIBS" | |
11620 | ||
11621 | fi | |
11622 | ||
11623 | ||
11624 | # Check for mail-locking functions in a "mail" library. Probably this should | |
11625 | # have the same check as for liblockfile below. | |
11626 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -lmail" >&5 | |
11627 | $as_echo_n "checking for maillock in -lmail... " >&6; } | |
d6a003a8 | 11628 | if ${ac_cv_lib_mail_maillock+:} false; then : |
067d23c9 KY |
11629 | $as_echo_n "(cached) " >&6 |
11630 | else | |
11631 | ac_check_lib_save_LIBS=$LIBS | |
11632 | LIBS="-lmail $LIBS" | |
11633 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11634 | /* end confdefs.h. */ | |
11635 | ||
11636 | /* Override any GCC internal prototype to avoid an error. | |
11637 | Use char because int might match the return type of a GCC | |
11638 | builtin and then its argument prototype would still apply. */ | |
11639 | #ifdef __cplusplus | |
11640 | extern "C" | |
11641 | #endif | |
11642 | char maillock (); | |
11643 | int | |
11644 | main () | |
11645 | { | |
11646 | return maillock (); | |
11647 | ; | |
11648 | return 0; | |
11649 | } | |
11650 | _ACEOF | |
11651 | if ac_fn_c_try_link "$LINENO"; then : | |
11652 | ac_cv_lib_mail_maillock=yes | |
11653 | else | |
11654 | ac_cv_lib_mail_maillock=no | |
11655 | fi | |
11656 | rm -f core conftest.err conftest.$ac_objext \ | |
11657 | conftest$ac_exeext conftest.$ac_ext | |
11658 | LIBS=$ac_check_lib_save_LIBS | |
11659 | fi | |
11660 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mail_maillock" >&5 | |
11661 | $as_echo "$ac_cv_lib_mail_maillock" >&6; } | |
d6a003a8 | 11662 | if test "x$ac_cv_lib_mail_maillock" = xyes; then : |
067d23c9 KY |
11663 | have_mail=yes |
11664 | else | |
11665 | have_mail=no | |
11666 | fi | |
11667 | ||
11668 | if test $have_mail = yes; then | |
11669 | LIBS_MAIL=-lmail | |
11670 | LIBS="$LIBS_MAIL $LIBS" | |
11671 | ||
11672 | $as_echo "#define HAVE_LIBMAIL 1" >>confdefs.h | |
11673 | ||
11674 | else | |
11675 | LIBS_MAIL= | |
11676 | fi | |
11677 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -llockfile" >&5 | |
11678 | $as_echo_n "checking for maillock in -llockfile... " >&6; } | |
d6a003a8 | 11679 | if ${ac_cv_lib_lockfile_maillock+:} false; then : |
067d23c9 KY |
11680 | $as_echo_n "(cached) " >&6 |
11681 | else | |
11682 | ac_check_lib_save_LIBS=$LIBS | |
11683 | LIBS="-llockfile $LIBS" | |
11684 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11685 | /* end confdefs.h. */ | |
11686 | ||
11687 | /* Override any GCC internal prototype to avoid an error. | |
11688 | Use char because int might match the return type of a GCC | |
11689 | builtin and then its argument prototype would still apply. */ | |
11690 | #ifdef __cplusplus | |
11691 | extern "C" | |
11692 | #endif | |
11693 | char maillock (); | |
11694 | int | |
11695 | main () | |
11696 | { | |
11697 | return maillock (); | |
11698 | ; | |
11699 | return 0; | |
11700 | } | |
11701 | _ACEOF | |
11702 | if ac_fn_c_try_link "$LINENO"; then : | |
11703 | ac_cv_lib_lockfile_maillock=yes | |
11704 | else | |
11705 | ac_cv_lib_lockfile_maillock=no | |
11706 | fi | |
11707 | rm -f core conftest.err conftest.$ac_objext \ | |
11708 | conftest$ac_exeext conftest.$ac_ext | |
11709 | LIBS=$ac_check_lib_save_LIBS | |
11710 | fi | |
11711 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lockfile_maillock" >&5 | |
11712 | $as_echo "$ac_cv_lib_lockfile_maillock" >&6; } | |
d6a003a8 | 11713 | if test "x$ac_cv_lib_lockfile_maillock" = xyes; then : |
067d23c9 KY |
11714 | have_lockfile=yes |
11715 | else | |
11716 | have_lockfile=no | |
11717 | fi | |
11718 | ||
11719 | if test $have_lockfile = yes; then | |
11720 | LIBS_MAIL=-llockfile | |
11721 | LIBS="$LIBS_MAIL $LIBS" | |
11722 | ||
11723 | $as_echo "#define HAVE_LIBLOCKFILE 1" >>confdefs.h | |
11724 | ||
11725 | else | |
11726 | # If we have the shared liblockfile, assume we must use it for mail | |
11727 | # locking (e.g. Debian). If we couldn't link against liblockfile | |
11728 | # (no liblockfile.a installed), ensure that we don't need to. | |
11729 | # Extract the first word of "liblockfile.so", so it can be a program name with args. | |
11730 | set dummy liblockfile.so; ac_word=$2 | |
11731 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
11732 | $as_echo_n "checking for $ac_word... " >&6; } | |
d6a003a8 | 11733 | if ${ac_cv_prog_liblockfile+:} false; then : |
067d23c9 KY |
11734 | $as_echo_n "(cached) " >&6 |
11735 | else | |
11736 | if test -n "$liblockfile"; then | |
11737 | ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test. | |
11738 | else | |
11739 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
11740 | as_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH" | |
11741 | for as_dir in $as_dummy | |
11742 | do | |
11743 | IFS=$as_save_IFS | |
11744 | test -z "$as_dir" && as_dir=. | |
11745 | for ac_exec_ext in '' $ac_executable_extensions; do | |
11746 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
11747 | ac_cv_prog_liblockfile="yes" | |
11748 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
11749 | break 2 | |
11750 | fi | |
11751 | done | |
11752 | done | |
11753 | IFS=$as_save_IFS | |
11754 | ||
11755 | test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no" | |
11756 | fi | |
11757 | fi | |
11758 | liblockfile=$ac_cv_prog_liblockfile | |
11759 | if test -n "$liblockfile"; then | |
11760 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $liblockfile" >&5 | |
11761 | $as_echo "$liblockfile" >&6; } | |
11762 | else | |
11763 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
11764 | $as_echo "no" >&6; } | |
11765 | fi | |
11766 | ||
11767 | ||
11768 | if test $ac_cv_prog_liblockfile = yes; then | |
d6a003a8 | 11769 | as_fn_error $? "Shared liblockfile found but can't link against it. |
067d23c9 KY |
11770 | This probably means that movemail could lose mail. |
11771 | There may be a \`development' package to install containing liblockfile." "$LINENO" 5 | |
11772 | fi | |
11773 | fi | |
11774 | for ac_func in touchlock | |
11775 | do : | |
11776 | ac_fn_c_check_func "$LINENO" "touchlock" "ac_cv_func_touchlock" | |
d6a003a8 | 11777 | if test "x$ac_cv_func_touchlock" = xyes; then : |
067d23c9 KY |
11778 | cat >>confdefs.h <<_ACEOF |
11779 | #define HAVE_TOUCHLOCK 1 | |
11780 | _ACEOF | |
11781 | ||
11782 | fi | |
11783 | done | |
11784 | ||
11785 | for ac_header in maillock.h | |
11786 | do : | |
11787 | ac_fn_c_check_header_mongrel "$LINENO" "maillock.h" "ac_cv_header_maillock_h" "$ac_includes_default" | |
d6a003a8 | 11788 | if test "x$ac_cv_header_maillock_h" = xyes; then : |
067d23c9 KY |
11789 | cat >>confdefs.h <<_ACEOF |
11790 | #define HAVE_MAILLOCK_H 1 | |
11791 | _ACEOF | |
11792 | ||
11793 | fi | |
11794 | ||
11795 | done | |
11796 | ||
11797 | ||
11798 | ||
11799 | ## Define MAIL_USE_FLOCK (or LOCKF) if the mailer uses flock (or lockf) to | |
11800 | ## interlock access to the mail spool. The alternative is a lock file named | |
11801 | ## /usr/spool/mail/$USER.lock. | |
11802 | mail_lock=no | |
11803 | case "$opsys" in | |
11804 | aix4-2) mail_lock="lockf" ;; | |
11805 | ||
11806 | gnu|freebsd|netbsd|openbsd|darwin|irix6-5) mail_lock="flock" ;; | |
11807 | ||
11808 | ## On GNU/Linux systems, both methods are used by various mail programs. | |
11809 | ## I assume most people are using newer mailers that have heard of flock. | |
11810 | ## Change this if you need to. | |
11811 | ## Debian contains a patch which says: ``On Debian/GNU/Linux systems, | |
11812 | ## configure gets the right answers, and that means *NOT* using flock. | |
11813 | ## Using flock is guaranteed to be the wrong thing. See Debian Policy | |
11814 | ## for details.'' and then uses `#ifdef DEBIAN'. Unfortunately the | |
11815 | ## Debian maintainer hasn't provided a clean fix for Emacs. | |
11816 | ## movemail.c will use `maillock' when MAILDIR, HAVE_LIBMAIL and | |
11817 | ## HAVE_MAILLOCK_H are defined, so the following appears to be the | |
11818 | ## correct logic. -- fx | |
11819 | ## We must check for HAVE_LIBLOCKFILE too, as movemail does. | |
11820 | ## liblockfile is a Free Software replacement for libmail, used on | |
11821 | ## Debian systems and elsewhere. -rfr. | |
11822 | gnu-*) | |
11823 | mail_lock="flock" | |
11824 | if test $have_mail = yes || test $have_lockfile = yes; then | |
11825 | test $ac_cv_header_maillock_h = yes && mail_lock=no | |
11826 | fi | |
11827 | ;; | |
11828 | esac | |
11829 | ||
11830 | BLESSMAIL_TARGET= | |
11831 | case "$mail_lock" in | |
11832 | flock) | |
11833 | $as_echo "#define MAIL_USE_FLOCK 1" >>confdefs.h | |
11834 | ;; | |
11835 | ||
11836 | lockf) | |
11837 | $as_echo "#define MAIL_USE_LOCKF 1" >>confdefs.h | |
11838 | ;; | |
11839 | ||
11840 | *) BLESSMAIL_TARGET="need-blessmail" ;; | |
11841 | esac | |
11842 | ||
11843 | ||
11844 | ||
11845 | for ac_func in gethostname getdomainname dup2 \ | |
11846 | rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \ | |
11847 | random lrand48 logb frexp fmod rint cbrt ftime setsid \ | |
11848 | strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \ | |
11849 | utimes getrlimit setrlimit setpgid getcwd getwd shutdown getaddrinfo \ | |
11850 | __fpending mblen mbrlen mbsinit strsignal setitimer ualarm strchr strrchr \ | |
11851 | sendto recvfrom getsockopt setsockopt getsockname getpeername \ | |
11852 | gai_strerror mkstemp getline getdelim mremap memmove fsync sync \ | |
11853 | memset memcmp difftime memcpy mempcpy mblen mbrlen posix_memalign \ | |
11854 | cfmakeraw cfsetspeed isnan copysign __executable_start | |
11855 | do : | |
11856 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
11857 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
d6a003a8 | 11858 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : |
067d23c9 KY |
11859 | cat >>confdefs.h <<_ACEOF |
11860 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
11861 | _ACEOF | |
11862 | ||
11863 | fi | |
11864 | done | |
11865 | ||
11866 | ||
11867 | for ac_header in sys/un.h | |
11868 | do : | |
11869 | ac_fn_c_check_header_mongrel "$LINENO" "sys/un.h" "ac_cv_header_sys_un_h" "$ac_includes_default" | |
d6a003a8 | 11870 | if test "x$ac_cv_header_sys_un_h" = xyes; then : |
067d23c9 KY |
11871 | cat >>confdefs.h <<_ACEOF |
11872 | #define HAVE_SYS_UN_H 1 | |
11873 | _ACEOF | |
11874 | ||
11875 | fi | |
11876 | ||
11877 | done | |
11878 | ||
11879 | ||
11880 | ||
11881 | ||
11882 | ||
11883 | ||
11884 | ||
11885 | for ac_func in $ac_func_list | |
11886 | do : | |
11887 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
11888 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
d6a003a8 | 11889 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : |
067d23c9 KY |
11890 | cat >>confdefs.h <<_ACEOF |
11891 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
11892 | _ACEOF | |
11893 | ||
11894 | fi | |
11895 | done | |
11896 | ||
11897 | ||
11898 | ||
11899 | ||
11900 | ||
11901 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5 | |
11902 | $as_echo_n "checking for working mktime... " >&6; } | |
d6a003a8 | 11903 | if ${ac_cv_func_working_mktime+:} false; then : |
067d23c9 KY |
11904 | $as_echo_n "(cached) " >&6 |
11905 | else | |
11906 | if test "$cross_compiling" = yes; then : | |
11907 | ac_cv_func_working_mktime=no | |
11908 | else | |
11909 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11910 | /* end confdefs.h. */ | |
11911 | /* Test program from Paul Eggert and Tony Leneis. */ | |
11912 | #ifdef TIME_WITH_SYS_TIME | |
11913 | # include <sys/time.h> | |
11914 | # include <time.h> | |
11915 | #else | |
11916 | # ifdef HAVE_SYS_TIME_H | |
11917 | # include <sys/time.h> | |
11918 | # else | |
11919 | # include <time.h> | |
11920 | # endif | |
11921 | #endif | |
11922 | ||
11923 | #include <limits.h> | |
11924 | #include <stdlib.h> | |
11925 | ||
11926 | #ifdef HAVE_UNISTD_H | |
11927 | # include <unistd.h> | |
11928 | #endif | |
11929 | ||
11930 | #ifndef HAVE_ALARM | |
11931 | # define alarm(X) /* empty */ | |
11932 | #endif | |
11933 | ||
11934 | /* Work around redefinition to rpl_putenv by other config tests. */ | |
11935 | #undef putenv | |
11936 | ||
11937 | static time_t time_t_max; | |
11938 | static time_t time_t_min; | |
11939 | ||
11940 | /* Values we'll use to set the TZ environment variable. */ | |
d6a003a8 AS |
11941 | static const char *tz_strings[] = { |
11942 | (const char *) 0, "TZ=GMT0", "TZ=JST-9", | |
067d23c9 KY |
11943 | "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00" |
11944 | }; | |
11945 | #define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0])) | |
11946 | ||
11947 | /* Return 0 if mktime fails to convert a date in the spring-forward gap. | |
11948 | Based on a problem report from Andreas Jaeger. */ | |
11949 | static int | |
11950 | spring_forward_gap () | |
11951 | { | |
11952 | /* glibc (up to about 1998-10-07) failed this test. */ | |
11953 | struct tm tm; | |
11954 | ||
11955 | /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0" | |
11956 | instead of "TZ=America/Vancouver" in order to detect the bug even | |
11957 | on systems that don't support the Olson extension, or don't have the | |
11958 | full zoneinfo tables installed. */ | |
d6a003a8 | 11959 | putenv ((char*) "TZ=PST8PDT,M4.1.0,M10.5.0"); |
067d23c9 KY |
11960 | |
11961 | tm.tm_year = 98; | |
11962 | tm.tm_mon = 3; | |
11963 | tm.tm_mday = 5; | |
11964 | tm.tm_hour = 2; | |
11965 | tm.tm_min = 0; | |
11966 | tm.tm_sec = 0; | |
11967 | tm.tm_isdst = -1; | |
11968 | return mktime (&tm) != (time_t) -1; | |
11969 | } | |
11970 | ||
11971 | static int | |
d6a003a8 | 11972 | mktime_test1 (time_t now) |
067d23c9 KY |
11973 | { |
11974 | struct tm *lt; | |
11975 | return ! (lt = localtime (&now)) || mktime (lt) == now; | |
11976 | } | |
11977 | ||
11978 | static int | |
d6a003a8 | 11979 | mktime_test (time_t now) |
067d23c9 KY |
11980 | { |
11981 | return (mktime_test1 (now) | |
11982 | && mktime_test1 ((time_t) (time_t_max - now)) | |
11983 | && mktime_test1 ((time_t) (time_t_min + now))); | |
11984 | } | |
11985 | ||
11986 | static int | |
11987 | irix_6_4_bug () | |
11988 | { | |
11989 | /* Based on code from Ariel Faigon. */ | |
11990 | struct tm tm; | |
11991 | tm.tm_year = 96; | |
11992 | tm.tm_mon = 3; | |
11993 | tm.tm_mday = 0; | |
11994 | tm.tm_hour = 0; | |
11995 | tm.tm_min = 0; | |
11996 | tm.tm_sec = 0; | |
11997 | tm.tm_isdst = -1; | |
11998 | mktime (&tm); | |
11999 | return tm.tm_mon == 2 && tm.tm_mday == 31; | |
12000 | } | |
12001 | ||
12002 | static int | |
d6a003a8 | 12003 | bigtime_test (int j) |
067d23c9 KY |
12004 | { |
12005 | struct tm tm; | |
12006 | time_t now; | |
12007 | tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j; | |
12008 | now = mktime (&tm); | |
12009 | if (now != (time_t) -1) | |
12010 | { | |
12011 | struct tm *lt = localtime (&now); | |
12012 | if (! (lt | |
12013 | && lt->tm_year == tm.tm_year | |
12014 | && lt->tm_mon == tm.tm_mon | |
12015 | && lt->tm_mday == tm.tm_mday | |
12016 | && lt->tm_hour == tm.tm_hour | |
12017 | && lt->tm_min == tm.tm_min | |
12018 | && lt->tm_sec == tm.tm_sec | |
12019 | && lt->tm_yday == tm.tm_yday | |
12020 | && lt->tm_wday == tm.tm_wday | |
12021 | && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst) | |
12022 | == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst)))) | |
12023 | return 0; | |
12024 | } | |
12025 | return 1; | |
12026 | } | |
12027 | ||
12028 | static int | |
12029 | year_2050_test () | |
12030 | { | |
12031 | /* The correct answer for 2050-02-01 00:00:00 in Pacific time, | |
12032 | ignoring leap seconds. */ | |
12033 | unsigned long int answer = 2527315200UL; | |
12034 | ||
12035 | struct tm tm; | |
12036 | time_t t; | |
12037 | tm.tm_year = 2050 - 1900; | |
12038 | tm.tm_mon = 2 - 1; | |
12039 | tm.tm_mday = 1; | |
12040 | tm.tm_hour = tm.tm_min = tm.tm_sec = 0; | |
12041 | tm.tm_isdst = -1; | |
12042 | ||
12043 | /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0" | |
12044 | instead of "TZ=America/Vancouver" in order to detect the bug even | |
12045 | on systems that don't support the Olson extension, or don't have the | |
12046 | full zoneinfo tables installed. */ | |
d6a003a8 | 12047 | putenv ((char*) "TZ=PST8PDT,M4.1.0,M10.5.0"); |
067d23c9 KY |
12048 | |
12049 | t = mktime (&tm); | |
12050 | ||
12051 | /* Check that the result is either a failure, or close enough | |
12052 | to the correct answer that we can assume the discrepancy is | |
12053 | due to leap seconds. */ | |
12054 | return (t == (time_t) -1 | |
12055 | || (0 < t && answer - 120 <= t && t <= answer + 120)); | |
12056 | } | |
12057 | ||
12058 | int | |
12059 | main () | |
12060 | { | |
12061 | time_t t, delta; | |
12062 | int i, j; | |
12063 | ||
12064 | /* This test makes some buggy mktime implementations loop. | |
12065 | Give up after 60 seconds; a mktime slower than that | |
12066 | isn't worth using anyway. */ | |
12067 | alarm (60); | |
12068 | ||
12069 | for (;;) | |
12070 | { | |
12071 | t = (time_t_max << 1) + 1; | |
12072 | if (t <= time_t_max) | |
12073 | break; | |
12074 | time_t_max = t; | |
12075 | } | |
12076 | time_t_min = - ((time_t) ~ (time_t) 0 == (time_t) -1) - time_t_max; | |
12077 | ||
12078 | delta = time_t_max / 997; /* a suitable prime number */ | |
12079 | for (i = 0; i < N_STRINGS; i++) | |
12080 | { | |
12081 | if (tz_strings[i]) | |
d6a003a8 | 12082 | putenv ((char*) tz_strings[i]); |
067d23c9 KY |
12083 | |
12084 | for (t = 0; t <= time_t_max - delta; t += delta) | |
12085 | if (! mktime_test (t)) | |
12086 | return 1; | |
12087 | if (! (mktime_test ((time_t) 1) | |
12088 | && mktime_test ((time_t) (60 * 60)) | |
12089 | && mktime_test ((time_t) (60 * 60 * 24)))) | |
12090 | return 1; | |
12091 | ||
12092 | for (j = 1; ; j <<= 1) | |
12093 | if (! bigtime_test (j)) | |
12094 | return 1; | |
12095 | else if (INT_MAX / 2 < j) | |
12096 | break; | |
12097 | if (! bigtime_test (INT_MAX)) | |
12098 | return 1; | |
12099 | } | |
12100 | return ! (irix_6_4_bug () && spring_forward_gap () && year_2050_test ()); | |
12101 | } | |
12102 | _ACEOF | |
12103 | if ac_fn_c_try_run "$LINENO"; then : | |
12104 | ac_cv_func_working_mktime=yes | |
12105 | else | |
12106 | ac_cv_func_working_mktime=no | |
12107 | fi | |
12108 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
12109 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
12110 | fi | |
12111 | ||
12112 | fi | |
12113 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_working_mktime" >&5 | |
12114 | $as_echo "$ac_cv_func_working_mktime" >&6; } | |
12115 | if test $ac_cv_func_working_mktime = no; then | |
12116 | case " $LIBOBJS " in | |
12117 | *" mktime.$ac_objext "* ) ;; | |
12118 | *) LIBOBJS="$LIBOBJS mktime.$ac_objext" | |
12119 | ;; | |
12120 | esac | |
12121 | ||
12122 | fi | |
12123 | ||
12124 | if test "$ac_cv_func_working_mktime" = no; then | |
12125 | ||
12126 | $as_echo "#define BROKEN_MKTIME 1" >>confdefs.h | |
12127 | ||
12128 | fi | |
12129 | ||
12130 | ac_have_func=no # yes means we've found a way to get the load average. | |
12131 | ||
12132 | # Make sure getloadavg.c is where it belongs, at configure-time. | |
12133 | test -f "$srcdir/$ac_config_libobj_dir/getloadavg.c" || | |
d6a003a8 | 12134 | as_fn_error $? "$srcdir/$ac_config_libobj_dir/getloadavg.c is missing" "$LINENO" 5 |
067d23c9 KY |
12135 | |
12136 | ac_save_LIBS=$LIBS | |
12137 | ||
12138 | # Check for getloadavg, but be sure not to touch the cache variable. | |
12139 | (ac_fn_c_check_func "$LINENO" "getloadavg" "ac_cv_func_getloadavg" | |
d6a003a8 | 12140 | if test "x$ac_cv_func_getloadavg" = xyes; then : |
067d23c9 KY |
12141 | exit 0 |
12142 | else | |
12143 | exit 1 | |
12144 | fi | |
12145 | ) && ac_have_func=yes | |
12146 | ||
12147 | # On HPUX9, an unprivileged user can get load averages through this function. | |
12148 | for ac_func in pstat_getdynamic | |
12149 | do : | |
12150 | ac_fn_c_check_func "$LINENO" "pstat_getdynamic" "ac_cv_func_pstat_getdynamic" | |
d6a003a8 | 12151 | if test "x$ac_cv_func_pstat_getdynamic" = xyes; then : |
067d23c9 KY |
12152 | cat >>confdefs.h <<_ACEOF |
12153 | #define HAVE_PSTAT_GETDYNAMIC 1 | |
12154 | _ACEOF | |
12155 | ||
12156 | fi | |
12157 | done | |
12158 | ||
12159 | ||
12160 | # Solaris has libkstat which does not require root. | |
12161 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kstat_open in -lkstat" >&5 | |
12162 | $as_echo_n "checking for kstat_open in -lkstat... " >&6; } | |
d6a003a8 | 12163 | if ${ac_cv_lib_kstat_kstat_open+:} false; then : |
067d23c9 KY |
12164 | $as_echo_n "(cached) " >&6 |
12165 | else | |
12166 | ac_check_lib_save_LIBS=$LIBS | |
12167 | LIBS="-lkstat $LIBS" | |
12168 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12169 | /* end confdefs.h. */ | |
12170 | ||
12171 | /* Override any GCC internal prototype to avoid an error. | |
12172 | Use char because int might match the return type of a GCC | |
12173 | builtin and then its argument prototype would still apply. */ | |
12174 | #ifdef __cplusplus | |
12175 | extern "C" | |
12176 | #endif | |
12177 | char kstat_open (); | |
12178 | int | |
12179 | main () | |
12180 | { | |
12181 | return kstat_open (); | |
12182 | ; | |
12183 | return 0; | |
12184 | } | |
12185 | _ACEOF | |
12186 | if ac_fn_c_try_link "$LINENO"; then : | |
12187 | ac_cv_lib_kstat_kstat_open=yes | |
12188 | else | |
12189 | ac_cv_lib_kstat_kstat_open=no | |
12190 | fi | |
12191 | rm -f core conftest.err conftest.$ac_objext \ | |
12192 | conftest$ac_exeext conftest.$ac_ext | |
12193 | LIBS=$ac_check_lib_save_LIBS | |
12194 | fi | |
12195 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kstat_kstat_open" >&5 | |
12196 | $as_echo "$ac_cv_lib_kstat_kstat_open" >&6; } | |
d6a003a8 | 12197 | if test "x$ac_cv_lib_kstat_kstat_open" = xyes; then : |
067d23c9 KY |
12198 | cat >>confdefs.h <<_ACEOF |
12199 | #define HAVE_LIBKSTAT 1 | |
12200 | _ACEOF | |
12201 | ||
12202 | LIBS="-lkstat $LIBS" | |
12203 | ||
12204 | fi | |
12205 | ||
12206 | test $ac_cv_lib_kstat_kstat_open = yes && ac_have_func=yes | |
12207 | ||
12208 | # Some systems with -lutil have (and need) -lkvm as well, some do not. | |
12209 | # On Solaris, -lkvm requires nlist from -lelf, so check that first | |
12210 | # to get the right answer into the cache. | |
12211 | # For kstat on solaris, we need libelf to force the definition of SVR4 below. | |
12212 | if test $ac_have_func = no; then | |
12213 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_begin in -lelf" >&5 | |
12214 | $as_echo_n "checking for elf_begin in -lelf... " >&6; } | |
d6a003a8 | 12215 | if ${ac_cv_lib_elf_elf_begin+:} false; then : |
067d23c9 KY |
12216 | $as_echo_n "(cached) " >&6 |
12217 | else | |
12218 | ac_check_lib_save_LIBS=$LIBS | |
12219 | LIBS="-lelf $LIBS" | |
12220 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12221 | /* end confdefs.h. */ | |
12222 | ||
12223 | /* Override any GCC internal prototype to avoid an error. | |
12224 | Use char because int might match the return type of a GCC | |
12225 | builtin and then its argument prototype would still apply. */ | |
12226 | #ifdef __cplusplus | |
12227 | extern "C" | |
12228 | #endif | |
12229 | char elf_begin (); | |
12230 | int | |
12231 | main () | |
12232 | { | |
12233 | return elf_begin (); | |
12234 | ; | |
12235 | return 0; | |
12236 | } | |
12237 | _ACEOF | |
12238 | if ac_fn_c_try_link "$LINENO"; then : | |
12239 | ac_cv_lib_elf_elf_begin=yes | |
12240 | else | |
12241 | ac_cv_lib_elf_elf_begin=no | |
12242 | fi | |
12243 | rm -f core conftest.err conftest.$ac_objext \ | |
12244 | conftest$ac_exeext conftest.$ac_ext | |
12245 | LIBS=$ac_check_lib_save_LIBS | |
12246 | fi | |
12247 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_elf_elf_begin" >&5 | |
12248 | $as_echo "$ac_cv_lib_elf_elf_begin" >&6; } | |
d6a003a8 | 12249 | if test "x$ac_cv_lib_elf_elf_begin" = xyes; then : |
067d23c9 KY |
12250 | LIBS="-lelf $LIBS" |
12251 | fi | |
12252 | ||
12253 | fi | |
12254 | if test $ac_have_func = no; then | |
12255 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kvm_open in -lkvm" >&5 | |
12256 | $as_echo_n "checking for kvm_open in -lkvm... " >&6; } | |
d6a003a8 | 12257 | if ${ac_cv_lib_kvm_kvm_open+:} false; then : |
067d23c9 KY |
12258 | $as_echo_n "(cached) " >&6 |
12259 | else | |
12260 | ac_check_lib_save_LIBS=$LIBS | |
12261 | LIBS="-lkvm $LIBS" | |
12262 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12263 | /* end confdefs.h. */ | |
12264 | ||
12265 | /* Override any GCC internal prototype to avoid an error. | |
12266 | Use char because int might match the return type of a GCC | |
12267 | builtin and then its argument prototype would still apply. */ | |
12268 | #ifdef __cplusplus | |
12269 | extern "C" | |
12270 | #endif | |
12271 | char kvm_open (); | |
12272 | int | |
12273 | main () | |
12274 | { | |
12275 | return kvm_open (); | |
12276 | ; | |
12277 | return 0; | |
12278 | } | |
12279 | _ACEOF | |
12280 | if ac_fn_c_try_link "$LINENO"; then : | |
12281 | ac_cv_lib_kvm_kvm_open=yes | |
12282 | else | |
12283 | ac_cv_lib_kvm_kvm_open=no | |
12284 | fi | |
12285 | rm -f core conftest.err conftest.$ac_objext \ | |
12286 | conftest$ac_exeext conftest.$ac_ext | |
12287 | LIBS=$ac_check_lib_save_LIBS | |
12288 | fi | |
12289 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kvm_kvm_open" >&5 | |
12290 | $as_echo "$ac_cv_lib_kvm_kvm_open" >&6; } | |
d6a003a8 | 12291 | if test "x$ac_cv_lib_kvm_kvm_open" = xyes; then : |
067d23c9 KY |
12292 | LIBS="-lkvm $LIBS" |
12293 | fi | |
12294 | ||
12295 | # Check for the 4.4BSD definition of getloadavg. | |
12296 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lutil" >&5 | |
12297 | $as_echo_n "checking for getloadavg in -lutil... " >&6; } | |
d6a003a8 | 12298 | if ${ac_cv_lib_util_getloadavg+:} false; then : |
067d23c9 KY |
12299 | $as_echo_n "(cached) " >&6 |
12300 | else | |
12301 | ac_check_lib_save_LIBS=$LIBS | |
12302 | LIBS="-lutil $LIBS" | |
12303 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12304 | /* end confdefs.h. */ | |
12305 | ||
12306 | /* Override any GCC internal prototype to avoid an error. | |
12307 | Use char because int might match the return type of a GCC | |
12308 | builtin and then its argument prototype would still apply. */ | |
12309 | #ifdef __cplusplus | |
12310 | extern "C" | |
12311 | #endif | |
12312 | char getloadavg (); | |
12313 | int | |
12314 | main () | |
12315 | { | |
12316 | return getloadavg (); | |
12317 | ; | |
12318 | return 0; | |
12319 | } | |
12320 | _ACEOF | |
12321 | if ac_fn_c_try_link "$LINENO"; then : | |
12322 | ac_cv_lib_util_getloadavg=yes | |
12323 | else | |
12324 | ac_cv_lib_util_getloadavg=no | |
12325 | fi | |
12326 | rm -f core conftest.err conftest.$ac_objext \ | |
12327 | conftest$ac_exeext conftest.$ac_ext | |
12328 | LIBS=$ac_check_lib_save_LIBS | |
12329 | fi | |
12330 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_getloadavg" >&5 | |
12331 | $as_echo "$ac_cv_lib_util_getloadavg" >&6; } | |
d6a003a8 | 12332 | if test "x$ac_cv_lib_util_getloadavg" = xyes; then : |
067d23c9 KY |
12333 | LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes |
12334 | fi | |
12335 | ||
12336 | fi | |
12337 | ||
12338 | if test $ac_have_func = no; then | |
12339 | # There is a commonly available library for RS/6000 AIX. | |
12340 | # Since it is not a standard part of AIX, it might be installed locally. | |
12341 | ac_getloadavg_LIBS=$LIBS | |
12342 | LIBS="-L/usr/local/lib $LIBS" | |
12343 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lgetloadavg" >&5 | |
12344 | $as_echo_n "checking for getloadavg in -lgetloadavg... " >&6; } | |
d6a003a8 | 12345 | if ${ac_cv_lib_getloadavg_getloadavg+:} false; then : |
067d23c9 KY |
12346 | $as_echo_n "(cached) " >&6 |
12347 | else | |
12348 | ac_check_lib_save_LIBS=$LIBS | |
12349 | LIBS="-lgetloadavg $LIBS" | |
12350 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12351 | /* end confdefs.h. */ | |
12352 | ||
12353 | /* Override any GCC internal prototype to avoid an error. | |
12354 | Use char because int might match the return type of a GCC | |
12355 | builtin and then its argument prototype would still apply. */ | |
12356 | #ifdef __cplusplus | |
12357 | extern "C" | |
12358 | #endif | |
12359 | char getloadavg (); | |
12360 | int | |
12361 | main () | |
12362 | { | |
12363 | return getloadavg (); | |
12364 | ; | |
12365 | return 0; | |
12366 | } | |
12367 | _ACEOF | |
12368 | if ac_fn_c_try_link "$LINENO"; then : | |
12369 | ac_cv_lib_getloadavg_getloadavg=yes | |
12370 | else | |
12371 | ac_cv_lib_getloadavg_getloadavg=no | |
12372 | fi | |
12373 | rm -f core conftest.err conftest.$ac_objext \ | |
12374 | conftest$ac_exeext conftest.$ac_ext | |
12375 | LIBS=$ac_check_lib_save_LIBS | |
12376 | fi | |
12377 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_getloadavg_getloadavg" >&5 | |
12378 | $as_echo "$ac_cv_lib_getloadavg_getloadavg" >&6; } | |
d6a003a8 | 12379 | if test "x$ac_cv_lib_getloadavg_getloadavg" = xyes; then : |
067d23c9 KY |
12380 | LIBS="-lgetloadavg $LIBS" |
12381 | else | |
12382 | LIBS=$ac_getloadavg_LIBS | |
12383 | fi | |
12384 | ||
12385 | fi | |
12386 | ||
12387 | # Make sure it is really in the library, if we think we found it, | |
12388 | # otherwise set up the replacement function. | |
12389 | for ac_func in getloadavg | |
12390 | do : | |
12391 | ac_fn_c_check_func "$LINENO" "getloadavg" "ac_cv_func_getloadavg" | |
d6a003a8 | 12392 | if test "x$ac_cv_func_getloadavg" = xyes; then : |
067d23c9 KY |
12393 | cat >>confdefs.h <<_ACEOF |
12394 | #define HAVE_GETLOADAVG 1 | |
12395 | _ACEOF | |
12396 | ||
12397 | else | |
12398 | case " $LIBOBJS " in | |
12399 | *" getloadavg.$ac_objext "* ) ;; | |
12400 | *) LIBOBJS="$LIBOBJS getloadavg.$ac_objext" | |
12401 | ;; | |
12402 | esac | |
12403 | ||
12404 | ||
12405 | $as_echo "#define C_GETLOADAVG 1" >>confdefs.h | |
12406 | ||
12407 | # Figure out what our getloadavg.c needs. | |
12408 | ac_have_func=no | |
12409 | ac_fn_c_check_header_mongrel "$LINENO" "sys/dg_sys_info.h" "ac_cv_header_sys_dg_sys_info_h" "$ac_includes_default" | |
d6a003a8 | 12410 | if test "x$ac_cv_header_sys_dg_sys_info_h" = xyes; then : |
067d23c9 KY |
12411 | ac_have_func=yes |
12412 | ||
12413 | $as_echo "#define DGUX 1" >>confdefs.h | |
12414 | ||
12415 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dg_sys_info in -ldgc" >&5 | |
12416 | $as_echo_n "checking for dg_sys_info in -ldgc... " >&6; } | |
d6a003a8 | 12417 | if ${ac_cv_lib_dgc_dg_sys_info+:} false; then : |
067d23c9 KY |
12418 | $as_echo_n "(cached) " >&6 |
12419 | else | |
12420 | ac_check_lib_save_LIBS=$LIBS | |
12421 | LIBS="-ldgc $LIBS" | |
12422 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12423 | /* end confdefs.h. */ | |
12424 | ||
12425 | /* Override any GCC internal prototype to avoid an error. | |
12426 | Use char because int might match the return type of a GCC | |
12427 | builtin and then its argument prototype would still apply. */ | |
12428 | #ifdef __cplusplus | |
12429 | extern "C" | |
12430 | #endif | |
12431 | char dg_sys_info (); | |
12432 | int | |
12433 | main () | |
12434 | { | |
12435 | return dg_sys_info (); | |
12436 | ; | |
12437 | return 0; | |
12438 | } | |
12439 | _ACEOF | |
12440 | if ac_fn_c_try_link "$LINENO"; then : | |
12441 | ac_cv_lib_dgc_dg_sys_info=yes | |
12442 | else | |
12443 | ac_cv_lib_dgc_dg_sys_info=no | |
12444 | fi | |
12445 | rm -f core conftest.err conftest.$ac_objext \ | |
12446 | conftest$ac_exeext conftest.$ac_ext | |
12447 | LIBS=$ac_check_lib_save_LIBS | |
12448 | fi | |
12449 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dgc_dg_sys_info" >&5 | |
12450 | $as_echo "$ac_cv_lib_dgc_dg_sys_info" >&6; } | |
d6a003a8 | 12451 | if test "x$ac_cv_lib_dgc_dg_sys_info" = xyes; then : |
067d23c9 KY |
12452 | cat >>confdefs.h <<_ACEOF |
12453 | #define HAVE_LIBDGC 1 | |
12454 | _ACEOF | |
12455 | ||
12456 | LIBS="-ldgc $LIBS" | |
12457 | ||
12458 | fi | |
12459 | ||
12460 | fi | |
12461 | ||
12462 | ||
12463 | ||
12464 | ac_fn_c_check_header_mongrel "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default" | |
d6a003a8 | 12465 | if test "x$ac_cv_header_locale_h" = xyes; then : |
067d23c9 KY |
12466 | |
12467 | fi | |
12468 | ||
12469 | ||
12470 | for ac_func in setlocale | |
12471 | do : | |
12472 | ac_fn_c_check_func "$LINENO" "setlocale" "ac_cv_func_setlocale" | |
d6a003a8 | 12473 | if test "x$ac_cv_func_setlocale" = xyes; then : |
067d23c9 KY |
12474 | cat >>confdefs.h <<_ACEOF |
12475 | #define HAVE_SETLOCALE 1 | |
12476 | _ACEOF | |
12477 | ||
12478 | fi | |
12479 | done | |
12480 | ||
12481 | ||
12482 | # We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it | |
12483 | # uses stabs), but it is still SVR4. We cannot check for <elf.h> because | |
12484 | # Irix 4.0.5F has the header but not the library. | |
d6a003a8 AS |
12485 | if test $ac_have_func = no && test "$ac_cv_lib_elf_elf_begin" = yes \ |
12486 | && test "$ac_cv_lib_kvm_kvm_open" = yes; then | |
067d23c9 KY |
12487 | ac_have_func=yes |
12488 | ||
12489 | $as_echo "#define SVR4 1" >>confdefs.h | |
12490 | ||
12491 | fi | |
12492 | ||
12493 | if test $ac_have_func = no; then | |
12494 | ac_fn_c_check_header_mongrel "$LINENO" "inq_stats/cpustats.h" "ac_cv_header_inq_stats_cpustats_h" "$ac_includes_default" | |
d6a003a8 | 12495 | if test "x$ac_cv_header_inq_stats_cpustats_h" = xyes; then : |
067d23c9 KY |
12496 | ac_have_func=yes |
12497 | ||
12498 | $as_echo "#define UMAX 1" >>confdefs.h | |
12499 | ||
12500 | ||
12501 | $as_echo "#define UMAX4_3 1" >>confdefs.h | |
12502 | ||
12503 | fi | |
12504 | ||
12505 | ||
12506 | fi | |
12507 | ||
12508 | if test $ac_have_func = no; then | |
12509 | ac_fn_c_check_header_mongrel "$LINENO" "sys/cpustats.h" "ac_cv_header_sys_cpustats_h" "$ac_includes_default" | |
d6a003a8 | 12510 | if test "x$ac_cv_header_sys_cpustats_h" = xyes; then : |
067d23c9 KY |
12511 | ac_have_func=yes; $as_echo "#define UMAX 1" >>confdefs.h |
12512 | ||
12513 | fi | |
12514 | ||
12515 | ||
12516 | fi | |
12517 | ||
12518 | if test $ac_have_func = no; then | |
12519 | for ac_header in mach/mach.h | |
12520 | do : | |
12521 | ac_fn_c_check_header_mongrel "$LINENO" "mach/mach.h" "ac_cv_header_mach_mach_h" "$ac_includes_default" | |
d6a003a8 | 12522 | if test "x$ac_cv_header_mach_mach_h" = xyes; then : |
067d23c9 KY |
12523 | cat >>confdefs.h <<_ACEOF |
12524 | #define HAVE_MACH_MACH_H 1 | |
12525 | _ACEOF | |
12526 | ||
12527 | fi | |
12528 | ||
12529 | done | |
12530 | ||
12531 | fi | |
12532 | ||
12533 | for ac_header in nlist.h | |
12534 | do : | |
12535 | ac_fn_c_check_header_mongrel "$LINENO" "nlist.h" "ac_cv_header_nlist_h" "$ac_includes_default" | |
d6a003a8 | 12536 | if test "x$ac_cv_header_nlist_h" = xyes; then : |
067d23c9 KY |
12537 | cat >>confdefs.h <<_ACEOF |
12538 | #define HAVE_NLIST_H 1 | |
12539 | _ACEOF | |
12540 | ac_fn_c_check_member "$LINENO" "struct nlist" "n_un.n_name" "ac_cv_member_struct_nlist_n_un_n_name" "#include <nlist.h> | |
12541 | " | |
d6a003a8 | 12542 | if test "x$ac_cv_member_struct_nlist_n_un_n_name" = xyes; then : |
067d23c9 KY |
12543 | |
12544 | cat >>confdefs.h <<_ACEOF | |
12545 | #define HAVE_STRUCT_NLIST_N_UN_N_NAME 1 | |
12546 | _ACEOF | |
12547 | ||
12548 | ||
12549 | $as_echo "#define NLIST_NAME_UNION 1" >>confdefs.h | |
12550 | ||
12551 | fi | |
12552 | ||
12553 | ||
12554 | fi | |
12555 | ||
12556 | done | |
12557 | ||
12558 | fi | |
12559 | done | |
12560 | ||
12561 | ||
12562 | # Some definitions of getloadavg require that the program be installed setgid. | |
12563 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getloadavg requires setgid" >&5 | |
12564 | $as_echo_n "checking whether getloadavg requires setgid... " >&6; } | |
d6a003a8 | 12565 | if ${ac_cv_func_getloadavg_setgid+:} false; then : |
067d23c9 KY |
12566 | $as_echo_n "(cached) " >&6 |
12567 | else | |
12568 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12569 | /* end confdefs.h. */ | |
12570 | #include "$srcdir/$ac_config_libobj_dir/getloadavg.c" | |
12571 | #ifdef LDAV_PRIVILEGED | |
12572 | Yowza Am I SETGID yet | |
12573 | #endif | |
12574 | _ACEOF | |
12575 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
12576 | $EGREP "Yowza Am I SETGID yet" >/dev/null 2>&1; then : | |
12577 | ac_cv_func_getloadavg_setgid=yes | |
12578 | else | |
12579 | ac_cv_func_getloadavg_setgid=no | |
12580 | fi | |
12581 | rm -f conftest* | |
12582 | ||
12583 | fi | |
12584 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getloadavg_setgid" >&5 | |
12585 | $as_echo "$ac_cv_func_getloadavg_setgid" >&6; } | |
12586 | if test $ac_cv_func_getloadavg_setgid = yes; then | |
12587 | NEED_SETGID=true | |
12588 | ||
12589 | $as_echo "#define GETLOADAVG_PRIVILEGED 1" >>confdefs.h | |
12590 | ||
12591 | else | |
12592 | NEED_SETGID=false | |
12593 | fi | |
12594 | ||
12595 | if test $ac_cv_func_getloadavg_setgid = yes; then | |
12596 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking group of /dev/kmem" >&5 | |
12597 | $as_echo_n "checking group of /dev/kmem... " >&6; } | |
d6a003a8 | 12598 | if ${ac_cv_group_kmem+:} false; then : |
067d23c9 KY |
12599 | $as_echo_n "(cached) " >&6 |
12600 | else | |
12601 | # On Solaris, /dev/kmem is a symlink. Get info on the real file. | |
12602 | ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null` | |
12603 | # If we got an error (system does not support symlinks), try without -L. | |
12604 | test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem` | |
12605 | ac_cv_group_kmem=`$as_echo "$ac_ls_output" \ | |
12606 | | sed -ne 's/[ ][ ]*/ /g; | |
12607 | s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/; | |
12608 | / /s/.* //;p;'` | |
12609 | ||
12610 | fi | |
12611 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_group_kmem" >&5 | |
12612 | $as_echo "$ac_cv_group_kmem" >&6; } | |
12613 | KMEM_GROUP=$ac_cv_group_kmem | |
12614 | fi | |
12615 | if test "x$ac_save_LIBS" = x; then | |
12616 | GETLOADAVG_LIBS=$LIBS | |
12617 | else | |
12618 | GETLOADAVG_LIBS=`$as_echo "$LIBS" | sed "s|$ac_save_LIBS||"` | |
12619 | fi | |
12620 | LIBS=$ac_save_LIBS | |
12621 | ||
12622 | ||
12623 | ||
12624 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5 | |
12625 | $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; } | |
d6a003a8 | 12626 | if ${ac_cv_sys_largefile_source+:} false; then : |
067d23c9 KY |
12627 | $as_echo_n "(cached) " >&6 |
12628 | else | |
12629 | while :; do | |
12630 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12631 | /* end confdefs.h. */ | |
12632 | #include <sys/types.h> /* for off_t */ | |
12633 | #include <stdio.h> | |
12634 | int | |
12635 | main () | |
12636 | { | |
12637 | int (*fp) (FILE *, off_t, int) = fseeko; | |
12638 | return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); | |
12639 | ; | |
12640 | return 0; | |
12641 | } | |
12642 | _ACEOF | |
12643 | if ac_fn_c_try_link "$LINENO"; then : | |
12644 | ac_cv_sys_largefile_source=no; break | |
12645 | fi | |
12646 | rm -f core conftest.err conftest.$ac_objext \ | |
12647 | conftest$ac_exeext conftest.$ac_ext | |
12648 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12649 | /* end confdefs.h. */ | |
12650 | #define _LARGEFILE_SOURCE 1 | |
12651 | #include <sys/types.h> /* for off_t */ | |
12652 | #include <stdio.h> | |
12653 | int | |
12654 | main () | |
12655 | { | |
12656 | int (*fp) (FILE *, off_t, int) = fseeko; | |
12657 | return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); | |
12658 | ; | |
12659 | return 0; | |
12660 | } | |
12661 | _ACEOF | |
12662 | if ac_fn_c_try_link "$LINENO"; then : | |
12663 | ac_cv_sys_largefile_source=1; break | |
12664 | fi | |
12665 | rm -f core conftest.err conftest.$ac_objext \ | |
12666 | conftest$ac_exeext conftest.$ac_ext | |
12667 | ac_cv_sys_largefile_source=unknown | |
12668 | break | |
12669 | done | |
12670 | fi | |
12671 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5 | |
12672 | $as_echo "$ac_cv_sys_largefile_source" >&6; } | |
12673 | case $ac_cv_sys_largefile_source in #( | |
12674 | no | unknown) ;; | |
12675 | *) | |
12676 | cat >>confdefs.h <<_ACEOF | |
12677 | #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source | |
12678 | _ACEOF | |
12679 | ;; | |
12680 | esac | |
12681 | rm -rf conftest* | |
12682 | ||
12683 | # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug | |
12684 | # in glibc 2.1.3, but that breaks too many other things. | |
12685 | # If you want fseeko and ftello with glibc, upgrade to a fixed glibc. | |
12686 | if test $ac_cv_sys_largefile_source != unknown; then | |
12687 | ||
12688 | $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h | |
12689 | ||
12690 | fi | |
12691 | ||
12692 | ||
12693 | # Configure getopt. | |
12694 | # getopt.m4 serial 10 | |
12695 | ||
12696 | # The getopt module assume you want GNU getopt, with getopt_long etc, | |
12697 | # rather than vanilla POSIX getopt. This means your your code should | |
12698 | # always include <getopt.h> for the getopt prototypes. | |
12699 | ||
12700 | ||
12701 | ||
12702 | ||
12703 | ||
12704 | ||
12705 | ||
12706 | ||
12707 | ||
12708 | ||
12709 | ||
12710 | # Prerequisites of lib/getopt*. | |
12711 | ||
12712 | ||
12713 | ||
12714 | ||
12715 | GETOPT_H= | |
12716 | for ac_header in getopt.h | |
12717 | do : | |
12718 | ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default" | |
d6a003a8 | 12719 | if test "x$ac_cv_header_getopt_h" = xyes; then : |
067d23c9 KY |
12720 | cat >>confdefs.h <<_ACEOF |
12721 | #define HAVE_GETOPT_H 1 | |
12722 | _ACEOF | |
12723 | ||
12724 | else | |
12725 | GETOPT_H=getopt.h | |
12726 | fi | |
12727 | ||
12728 | done | |
12729 | ||
12730 | if test -z "$GETOPT_H"; then | |
12731 | for ac_func in getopt_long_only | |
12732 | do : | |
12733 | ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only" | |
d6a003a8 | 12734 | if test "x$ac_cv_func_getopt_long_only" = xyes; then : |
067d23c9 KY |
12735 | cat >>confdefs.h <<_ACEOF |
12736 | #define HAVE_GETOPT_LONG_ONLY 1 | |
12737 | _ACEOF | |
12738 | ||
12739 | else | |
12740 | GETOPT_H=getopt.h | |
12741 | fi | |
12742 | done | |
12743 | ||
12744 | fi | |
12745 | ||
12746 | if test -z "$GETOPT_H"; then | |
12747 | ac_fn_c_check_decl "$LINENO" "optreset" "ac_cv_have_decl_optreset" "#include <getopt.h> | |
12748 | " | |
d6a003a8 | 12749 | if test "x$ac_cv_have_decl_optreset" = xyes; then : |
067d23c9 KY |
12750 | GETOPT_H=getopt.h |
12751 | fi | |
12752 | ||
12753 | fi | |
12754 | ||
12755 | if test -z "$GETOPT_H"; then | |
12756 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5 | |
12757 | $as_echo_n "checking for working GNU getopt function... " >&6; } | |
d6a003a8 | 12758 | if ${gl_cv_func_gnu_getopt+:} false; then : |
067d23c9 KY |
12759 | $as_echo_n "(cached) " >&6 |
12760 | else | |
12761 | if test "$cross_compiling" = yes; then : | |
12762 | ac_fn_c_check_decl "$LINENO" "getopt_clip" "ac_cv_have_decl_getopt_clip" "#include <getopt.h> | |
12763 | " | |
d6a003a8 | 12764 | if test "x$ac_cv_have_decl_getopt_clip" = xyes; then : |
067d23c9 KY |
12765 | gl_cv_func_gnu_getopt=no |
12766 | else | |
12767 | gl_cv_func_gnu_getopt=yes | |
12768 | fi | |
12769 | ||
12770 | else | |
12771 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12772 | /* end confdefs.h. */ | |
12773 | #include <getopt.h> | |
12774 | int | |
12775 | main () | |
12776 | { | |
12777 | ||
12778 | char *myargv[3]; | |
12779 | myargv[0] = "conftest"; | |
12780 | myargv[1] = "-+"; | |
12781 | myargv[2] = 0; | |
12782 | return getopt (2, myargv, "+a") != '?'; | |
12783 | ||
12784 | ; | |
12785 | return 0; | |
12786 | } | |
12787 | _ACEOF | |
12788 | if ac_fn_c_try_run "$LINENO"; then : | |
12789 | gl_cv_func_gnu_getopt=yes | |
12790 | else | |
12791 | gl_cv_func_gnu_getopt=no | |
12792 | fi | |
12793 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
12794 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
12795 | fi | |
12796 | ||
12797 | fi | |
12798 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gnu_getopt" >&5 | |
12799 | $as_echo "$gl_cv_func_gnu_getopt" >&6; } | |
12800 | if test "$gl_cv_func_gnu_getopt" = "no"; then | |
12801 | GETOPT_H=getopt.h | |
12802 | fi | |
12803 | fi | |
12804 | ||
12805 | ||
12806 | ||
12807 | if test -n "$GETOPT_H"; then : | |
12808 | ||
12809 | ||
12810 | GETOPT_H=getopt.h | |
12811 | ||
12812 | $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h | |
12813 | ||
12814 | ||
12815 | ||
12816 | : | |
12817 | GETOPTOBJS='getopt.o getopt1.o' | |
12818 | ||
12819 | fi | |
12820 | ||
12821 | ||
12822 | ||
12823 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getpgrp requires zero arguments" >&5 | |
12824 | $as_echo_n "checking whether getpgrp requires zero arguments... " >&6; } | |
d6a003a8 | 12825 | if ${ac_cv_func_getpgrp_void+:} false; then : |
067d23c9 KY |
12826 | $as_echo_n "(cached) " >&6 |
12827 | else | |
12828 | # Use it with a single arg. | |
12829 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12830 | /* end confdefs.h. */ | |
12831 | $ac_includes_default | |
12832 | int | |
12833 | main () | |
12834 | { | |
12835 | getpgrp (0); | |
12836 | ; | |
12837 | return 0; | |
12838 | } | |
12839 | _ACEOF | |
12840 | if ac_fn_c_try_compile "$LINENO"; then : | |
12841 | ac_cv_func_getpgrp_void=no | |
12842 | else | |
12843 | ac_cv_func_getpgrp_void=yes | |
12844 | fi | |
12845 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
12846 | ||
12847 | fi | |
12848 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getpgrp_void" >&5 | |
12849 | $as_echo "$ac_cv_func_getpgrp_void" >&6; } | |
12850 | if test $ac_cv_func_getpgrp_void = yes; then | |
12851 | ||
12852 | $as_echo "#define GETPGRP_VOID 1" >>confdefs.h | |
12853 | ||
12854 | fi | |
12855 | ||
12856 | ||
12857 | for ac_func in strftime | |
12858 | do : | |
12859 | ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime" | |
d6a003a8 | 12860 | if test "x$ac_cv_func_strftime" = xyes; then : |
067d23c9 KY |
12861 | cat >>confdefs.h <<_ACEOF |
12862 | #define HAVE_STRFTIME 1 | |
12863 | _ACEOF | |
12864 | ||
12865 | else | |
12866 | # strftime is in -lintl on SCO UNIX. | |
12867 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strftime in -lintl" >&5 | |
12868 | $as_echo_n "checking for strftime in -lintl... " >&6; } | |
d6a003a8 | 12869 | if ${ac_cv_lib_intl_strftime+:} false; then : |
067d23c9 KY |
12870 | $as_echo_n "(cached) " >&6 |
12871 | else | |
12872 | ac_check_lib_save_LIBS=$LIBS | |
12873 | LIBS="-lintl $LIBS" | |
12874 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12875 | /* end confdefs.h. */ | |
12876 | ||
12877 | /* Override any GCC internal prototype to avoid an error. | |
12878 | Use char because int might match the return type of a GCC | |
12879 | builtin and then its argument prototype would still apply. */ | |
12880 | #ifdef __cplusplus | |
12881 | extern "C" | |
12882 | #endif | |
12883 | char strftime (); | |
12884 | int | |
12885 | main () | |
12886 | { | |
12887 | return strftime (); | |
12888 | ; | |
12889 | return 0; | |
12890 | } | |
12891 | _ACEOF | |
12892 | if ac_fn_c_try_link "$LINENO"; then : | |
12893 | ac_cv_lib_intl_strftime=yes | |
12894 | else | |
12895 | ac_cv_lib_intl_strftime=no | |
12896 | fi | |
12897 | rm -f core conftest.err conftest.$ac_objext \ | |
12898 | conftest$ac_exeext conftest.$ac_ext | |
12899 | LIBS=$ac_check_lib_save_LIBS | |
12900 | fi | |
12901 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_strftime" >&5 | |
12902 | $as_echo "$ac_cv_lib_intl_strftime" >&6; } | |
d6a003a8 | 12903 | if test "x$ac_cv_lib_intl_strftime" = xyes; then : |
067d23c9 KY |
12904 | $as_echo "#define HAVE_STRFTIME 1" >>confdefs.h |
12905 | ||
12906 | LIBS="-lintl $LIBS" | |
12907 | fi | |
12908 | ||
12909 | fi | |
12910 | done | |
12911 | ||
12912 | ||
12913 | # UNIX98 PTYs. | |
12914 | for ac_func in grantpt | |
12915 | do : | |
12916 | ac_fn_c_check_func "$LINENO" "grantpt" "ac_cv_func_grantpt" | |
d6a003a8 | 12917 | if test "x$ac_cv_func_grantpt" = xyes; then : |
067d23c9 KY |
12918 | cat >>confdefs.h <<_ACEOF |
12919 | #define HAVE_GRANTPT 1 | |
12920 | _ACEOF | |
12921 | ||
12922 | fi | |
12923 | done | |
12924 | ||
12925 | ||
12926 | # PTY-related GNU extensions. | |
12927 | for ac_func in getpt | |
12928 | do : | |
12929 | ac_fn_c_check_func "$LINENO" "getpt" "ac_cv_func_getpt" | |
d6a003a8 | 12930 | if test "x$ac_cv_func_getpt" = xyes; then : |
067d23c9 KY |
12931 | cat >>confdefs.h <<_ACEOF |
12932 | #define HAVE_GETPT 1 | |
12933 | _ACEOF | |
12934 | ||
12935 | fi | |
12936 | done | |
12937 | ||
12938 | ||
12939 | # Check this now, so that we will NOT find the above functions in ncurses. | |
12940 | # That is because we have not set up to link ncurses in lib-src. | |
12941 | # It's better to believe a function is not available | |
12942 | # than to expect to find it in ncurses. | |
12943 | # Also we need tputs and friends to be able to build at all. | |
12944 | have_tputs_et_al=true | |
12945 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tputs" >&5 | |
12946 | $as_echo_n "checking for library containing tputs... " >&6; } | |
d6a003a8 | 12947 | if ${ac_cv_search_tputs+:} false; then : |
067d23c9 KY |
12948 | $as_echo_n "(cached) " >&6 |
12949 | else | |
12950 | ac_func_search_save_LIBS=$LIBS | |
12951 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12952 | /* end confdefs.h. */ | |
12953 | ||
12954 | /* Override any GCC internal prototype to avoid an error. | |
12955 | Use char because int might match the return type of a GCC | |
12956 | builtin and then its argument prototype would still apply. */ | |
12957 | #ifdef __cplusplus | |
12958 | extern "C" | |
12959 | #endif | |
12960 | char tputs (); | |
12961 | int | |
12962 | main () | |
12963 | { | |
12964 | return tputs (); | |
12965 | ; | |
12966 | return 0; | |
12967 | } | |
12968 | _ACEOF | |
12969 | for ac_lib in '' ncurses terminfo termcap; do | |
12970 | if test -z "$ac_lib"; then | |
12971 | ac_res="none required" | |
12972 | else | |
12973 | ac_res=-l$ac_lib | |
12974 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
12975 | fi | |
12976 | if ac_fn_c_try_link "$LINENO"; then : | |
12977 | ac_cv_search_tputs=$ac_res | |
12978 | fi | |
12979 | rm -f core conftest.err conftest.$ac_objext \ | |
12980 | conftest$ac_exeext | |
d6a003a8 | 12981 | if ${ac_cv_search_tputs+:} false; then : |
067d23c9 KY |
12982 | break |
12983 | fi | |
12984 | done | |
d6a003a8 | 12985 | if ${ac_cv_search_tputs+:} false; then : |
067d23c9 KY |
12986 | |
12987 | else | |
12988 | ac_cv_search_tputs=no | |
12989 | fi | |
12990 | rm conftest.$ac_ext | |
12991 | LIBS=$ac_func_search_save_LIBS | |
12992 | fi | |
12993 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tputs" >&5 | |
12994 | $as_echo "$ac_cv_search_tputs" >&6; } | |
12995 | ac_res=$ac_cv_search_tputs | |
12996 | if test "$ac_res" != no; then : | |
12997 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
12998 | ||
12999 | else | |
13000 | have_tputs_et_al=false | |
13001 | fi | |
13002 | ||
13003 | if test "$have_tputs_et_al" != true; then | |
d6a003a8 | 13004 | as_fn_error $? "I couldn't find termcap functions (tputs and friends). |
067d23c9 KY |
13005 | Maybe some development libraries/packages are missing? Try installing |
13006 | libncurses-dev(el), libterminfo-dev(el) or similar." "$LINENO" 5 | |
13007 | fi | |
13008 | # Must define this when any termcap library is found. | |
13009 | ||
13010 | $as_echo "#define HAVE_LIBNCURSES 1" >>confdefs.h | |
13011 | ||
13012 | ## FIXME This was the cpp logic, but I am not sure it is right. | |
13013 | ## The above test has not necessarily found libncurses. | |
13014 | HAVE_LIBNCURSES=yes | |
13015 | ||
13016 | ## Use terminfo instead of termcap? | |
13017 | ## Note only system files NOT using terminfo are: | |
13018 | ## freebsd < 40000, ms-w32, msdos, netbsd < 599002500, and | |
13019 | ## darwin|gnu without ncurses. | |
13020 | TERMINFO=no | |
13021 | LIBS_TERMCAP= | |
13022 | case "$opsys" in | |
13023 | ## cygwin: Fewer environment variables to go wrong, more terminal types. | |
13024 | ## hpux10-20: Use the system provided termcap(3) library. | |
13025 | ## openbsd: David Mazieres <dm@reeducation-labor.lcs.mit.edu> says this | |
13026 | ## is necessary. Otherwise Emacs dumps core when run -nw. | |
13027 | aix4-2|cygwin|hpux*|irix6-5|openbsd|sol2*|unixware) TERMINFO=yes ;; | |
13028 | ||
13029 | ## darwin: Prevents crashes when running Emacs in Terminal.app under 10.2. | |
13030 | ## The ncurses library has been moved out of the System framework in | |
13031 | ## Mac OS X 10.2. So if configure detects it, set the command-line | |
13032 | ## option to use it. | |
13033 | darwin|gnu*) | |
13034 | ## (HAVE_LIBNCURSES was not always true, but is since 2010-03-18.) | |
13035 | if test "x$HAVE_LIBNCURSES" = "xyes"; then | |
13036 | TERMINFO=yes | |
13037 | LIBS_TERMCAP="-lncurses" | |
13038 | fi | |
13039 | ;; | |
13040 | ||
13041 | freebsd) | |
13042 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether FreeBSD is new enough to use terminfo" >&5 | |
13043 | $as_echo_n "checking whether FreeBSD is new enough to use terminfo... " >&6; } | |
d6a003a8 | 13044 | if ${emacs_cv_freebsd_terminfo+:} false; then : |
067d23c9 KY |
13045 | $as_echo_n "(cached) " >&6 |
13046 | else | |
13047 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13048 | /* end confdefs.h. */ | |
13049 | #include <osreldate.h> | |
13050 | int | |
13051 | main () | |
13052 | { | |
13053 | #if __FreeBSD_version < 400000 | |
13054 | fail; | |
13055 | #endif | |
13056 | ||
13057 | ; | |
13058 | return 0; | |
13059 | } | |
13060 | _ACEOF | |
13061 | if ac_fn_c_try_link "$LINENO"; then : | |
13062 | emacs_cv_freebsd_terminfo=yes | |
13063 | else | |
13064 | emacs_cv_freebsd_terminfo=no | |
13065 | fi | |
13066 | rm -f core conftest.err conftest.$ac_objext \ | |
13067 | conftest$ac_exeext conftest.$ac_ext | |
13068 | fi | |
13069 | ||
13070 | ||
13071 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_freebsd_terminfo" >&5 | |
13072 | $as_echo "$emacs_cv_freebsd_terminfo" >&6; } | |
13073 | ||
13074 | if test $emacs_cv_freebsd_terminfo = yes; then | |
13075 | TERMINFO=yes | |
13076 | LIBS_TERMCAP="-lncurses" | |
13077 | else | |
13078 | LIBS_TERMCAP="-ltermcap" | |
13079 | fi | |
13080 | ;; | |
13081 | ||
13082 | netbsd) | |
13083 | if test $ac_cv_search_tputs = -lterminfo; then | |
13084 | TERMINFO=yes | |
13085 | LIBS_TERMCAP="-lterminfo" | |
13086 | else | |
13087 | LIBS_TERMCAP="-ltermcap" | |
13088 | fi | |
13089 | ;; | |
13090 | ||
13091 | esac | |
13092 | ||
13093 | case "$opsys" in | |
13094 | ## hpux: Make sure we get select from libc rather than from libcurses | |
13095 | ## because libcurses on HPUX 10.10 has a broken version of select. | |
13096 | ## We used to use -lc -lcurses, but this may be cleaner. | |
13097 | hpux*) LIBS_TERMCAP="-ltermcap" ;; | |
13098 | ||
13099 | openbsd) LIBS_TERMCAP="-lncurses" ;; | |
13100 | ||
13101 | ## Must use system termcap, if we use any termcap. It does special things. | |
13102 | sol2*) test "$TERMINFO" != yes && LIBS_TERMCAP="-ltermcap" ;; | |
13103 | esac | |
13104 | ||
13105 | TERMCAP_OBJ=tparam.o | |
13106 | if test $TERMINFO = yes; then | |
13107 | ||
13108 | $as_echo "#define TERMINFO 1" >>confdefs.h | |
13109 | ||
13110 | ||
13111 | ## Default used to be -ltermcap. Add a case above if need something else. | |
13112 | test "x$LIBS_TERMCAP" = "x" && LIBS_TERMCAP="-lcurses" | |
13113 | ||
13114 | TERMCAP_OBJ=terminfo.o | |
13115 | fi | |
13116 | ||
13117 | ||
13118 | ||
13119 | ||
13120 | # Do we have res_init, for detecting changes in /etc/resolv.conf? | |
13121 | resolv=no | |
13122 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13123 | /* end confdefs.h. */ | |
13124 | #include <netinet/in.h> | |
13125 | #include <arpa/nameser.h> | |
13126 | #include <resolv.h> | |
13127 | int | |
13128 | main () | |
13129 | { | |
13130 | return res_init(); | |
13131 | ; | |
13132 | return 0; | |
13133 | } | |
13134 | _ACEOF | |
13135 | if ac_fn_c_try_link "$LINENO"; then : | |
13136 | have_res_init=yes | |
13137 | else | |
13138 | have_res_init=no | |
13139 | fi | |
13140 | rm -f core conftest.err conftest.$ac_objext \ | |
13141 | conftest$ac_exeext conftest.$ac_ext | |
13142 | if test "$have_res_init" = no; then | |
13143 | OLIBS="$LIBS" | |
13144 | LIBS="$LIBS -lresolv" | |
13145 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_init with -lresolv" >&5 | |
13146 | $as_echo_n "checking for res_init with -lresolv... " >&6; } | |
13147 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13148 | /* end confdefs.h. */ | |
13149 | #include <netinet/in.h> | |
13150 | #include <arpa/nameser.h> | |
13151 | #include <resolv.h> | |
13152 | int | |
13153 | main () | |
13154 | { | |
13155 | return res_init(); | |
13156 | ; | |
13157 | return 0; | |
13158 | } | |
13159 | _ACEOF | |
13160 | if ac_fn_c_try_link "$LINENO"; then : | |
13161 | have_res_init=yes | |
13162 | else | |
13163 | have_res_init=no | |
13164 | fi | |
13165 | rm -f core conftest.err conftest.$ac_objext \ | |
13166 | conftest$ac_exeext conftest.$ac_ext | |
13167 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_res_init" >&5 | |
13168 | $as_echo "$have_res_init" >&6; } | |
13169 | if test "$have_res_init" = yes ; then | |
13170 | resolv=yes | |
13171 | fi | |
13172 | LIBS="$OLIBS" | |
13173 | fi | |
13174 | ||
13175 | if test "$have_res_init" = yes; then | |
13176 | ||
13177 | $as_echo "#define HAVE_RES_INIT 1" >>confdefs.h | |
13178 | ||
13179 | fi | |
13180 | ||
13181 | # Do we need the Hesiod library to provide the support routines? | |
13182 | LIBHESIOD= | |
13183 | if test "$with_hesiod" != no ; then | |
13184 | # Don't set $LIBS here -- see comments above. FIXME which comments? | |
13185 | ac_fn_c_check_func "$LINENO" "res_send" "ac_cv_func_res_send" | |
d6a003a8 | 13186 | if test "x$ac_cv_func_res_send" = xyes; then : |
067d23c9 KY |
13187 | |
13188 | else | |
13189 | ac_fn_c_check_func "$LINENO" "__res_send" "ac_cv_func___res_send" | |
d6a003a8 | 13190 | if test "x$ac_cv_func___res_send" = xyes; then : |
067d23c9 KY |
13191 | |
13192 | else | |
13193 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_send in -lresolv" >&5 | |
13194 | $as_echo_n "checking for res_send in -lresolv... " >&6; } | |
d6a003a8 | 13195 | if ${ac_cv_lib_resolv_res_send+:} false; then : |
067d23c9 KY |
13196 | $as_echo_n "(cached) " >&6 |
13197 | else | |
13198 | ac_check_lib_save_LIBS=$LIBS | |
13199 | LIBS="-lresolv $LIBS" | |
13200 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13201 | /* end confdefs.h. */ | |
13202 | ||
13203 | /* Override any GCC internal prototype to avoid an error. | |
13204 | Use char because int might match the return type of a GCC | |
13205 | builtin and then its argument prototype would still apply. */ | |
13206 | #ifdef __cplusplus | |
13207 | extern "C" | |
13208 | #endif | |
13209 | char res_send (); | |
13210 | int | |
13211 | main () | |
13212 | { | |
13213 | return res_send (); | |
13214 | ; | |
13215 | return 0; | |
13216 | } | |
13217 | _ACEOF | |
13218 | if ac_fn_c_try_link "$LINENO"; then : | |
13219 | ac_cv_lib_resolv_res_send=yes | |
13220 | else | |
13221 | ac_cv_lib_resolv_res_send=no | |
13222 | fi | |
13223 | rm -f core conftest.err conftest.$ac_objext \ | |
13224 | conftest$ac_exeext conftest.$ac_ext | |
13225 | LIBS=$ac_check_lib_save_LIBS | |
13226 | fi | |
13227 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_send" >&5 | |
13228 | $as_echo "$ac_cv_lib_resolv_res_send" >&6; } | |
d6a003a8 | 13229 | if test "x$ac_cv_lib_resolv_res_send" = xyes; then : |
067d23c9 KY |
13230 | resolv=yes |
13231 | else | |
13232 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __res_send in -lresolv" >&5 | |
13233 | $as_echo_n "checking for __res_send in -lresolv... " >&6; } | |
d6a003a8 | 13234 | if ${ac_cv_lib_resolv___res_send+:} false; then : |
067d23c9 KY |
13235 | $as_echo_n "(cached) " >&6 |
13236 | else | |
13237 | ac_check_lib_save_LIBS=$LIBS | |
13238 | LIBS="-lresolv $LIBS" | |
13239 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13240 | /* end confdefs.h. */ | |
13241 | ||
13242 | /* Override any GCC internal prototype to avoid an error. | |
13243 | Use char because int might match the return type of a GCC | |
13244 | builtin and then its argument prototype would still apply. */ | |
13245 | #ifdef __cplusplus | |
13246 | extern "C" | |
13247 | #endif | |
13248 | char __res_send (); | |
13249 | int | |
13250 | main () | |
13251 | { | |
13252 | return __res_send (); | |
13253 | ; | |
13254 | return 0; | |
13255 | } | |
13256 | _ACEOF | |
13257 | if ac_fn_c_try_link "$LINENO"; then : | |
13258 | ac_cv_lib_resolv___res_send=yes | |
13259 | else | |
13260 | ac_cv_lib_resolv___res_send=no | |
13261 | fi | |
13262 | rm -f core conftest.err conftest.$ac_objext \ | |
13263 | conftest$ac_exeext conftest.$ac_ext | |
13264 | LIBS=$ac_check_lib_save_LIBS | |
13265 | fi | |
13266 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv___res_send" >&5 | |
13267 | $as_echo "$ac_cv_lib_resolv___res_send" >&6; } | |
d6a003a8 | 13268 | if test "x$ac_cv_lib_resolv___res_send" = xyes; then : |
067d23c9 KY |
13269 | resolv=yes |
13270 | fi | |
13271 | ||
13272 | fi | |
13273 | ||
13274 | fi | |
13275 | ||
13276 | fi | |
13277 | ||
13278 | if test "$resolv" = yes ; then | |
13279 | RESOLVLIB=-lresolv | |
13280 | else | |
13281 | RESOLVLIB= | |
13282 | fi | |
13283 | ac_fn_c_check_func "$LINENO" "hes_getmailhost" "ac_cv_func_hes_getmailhost" | |
d6a003a8 | 13284 | if test "x$ac_cv_func_hes_getmailhost" = xyes; then : |
067d23c9 KY |
13285 | |
13286 | else | |
13287 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hes_getmailhost in -lhesiod" >&5 | |
13288 | $as_echo_n "checking for hes_getmailhost in -lhesiod... " >&6; } | |
d6a003a8 | 13289 | if ${ac_cv_lib_hesiod_hes_getmailhost+:} false; then : |
067d23c9 KY |
13290 | $as_echo_n "(cached) " >&6 |
13291 | else | |
13292 | ac_check_lib_save_LIBS=$LIBS | |
13293 | LIBS="-lhesiod $RESOLVLIB $LIBS" | |
13294 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13295 | /* end confdefs.h. */ | |
13296 | ||
13297 | /* Override any GCC internal prototype to avoid an error. | |
13298 | Use char because int might match the return type of a GCC | |
13299 | builtin and then its argument prototype would still apply. */ | |
13300 | #ifdef __cplusplus | |
13301 | extern "C" | |
13302 | #endif | |
13303 | char hes_getmailhost (); | |
13304 | int | |
13305 | main () | |
13306 | { | |
13307 | return hes_getmailhost (); | |
13308 | ; | |
13309 | return 0; | |
13310 | } | |
13311 | _ACEOF | |
13312 | if ac_fn_c_try_link "$LINENO"; then : | |
13313 | ac_cv_lib_hesiod_hes_getmailhost=yes | |
13314 | else | |
13315 | ac_cv_lib_hesiod_hes_getmailhost=no | |
13316 | fi | |
13317 | rm -f core conftest.err conftest.$ac_objext \ | |
13318 | conftest$ac_exeext conftest.$ac_ext | |
13319 | LIBS=$ac_check_lib_save_LIBS | |
13320 | fi | |
13321 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5 | |
13322 | $as_echo "$ac_cv_lib_hesiod_hes_getmailhost" >&6; } | |
d6a003a8 | 13323 | if test "x$ac_cv_lib_hesiod_hes_getmailhost" = xyes; then : |
067d23c9 KY |
13324 | hesiod=yes |
13325 | else | |
13326 | : | |
13327 | fi | |
13328 | ||
13329 | fi | |
13330 | ||
13331 | ||
13332 | if test x"$hesiod" = xyes; then | |
13333 | ||
13334 | $as_echo "#define HAVE_LIBHESIOD 1" >>confdefs.h | |
13335 | ||
13336 | LIBHESIOD=-lhesiod | |
13337 | fi | |
13338 | fi | |
13339 | ||
13340 | ||
13341 | # Do we need libresolv (due to res_init or Hesiod)? | |
13342 | if test "$resolv" = yes ; then | |
13343 | ||
13344 | $as_echo "#define HAVE_LIBRESOLV 1" >>confdefs.h | |
13345 | ||
13346 | LIBRESOLV=-lresolv | |
13347 | else | |
13348 | LIBRESOLV= | |
13349 | fi | |
13350 | ||
13351 | ||
13352 | # These tell us which Kerberos-related libraries to use. | |
13353 | COM_ERRLIB= | |
13354 | CRYPTOLIB= | |
13355 | KRB5LIB= | |
13356 | DESLIB= | |
13357 | KRB4LIB= | |
13358 | ||
13359 | if test "${with_kerberos}" != no; then | |
13360 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for com_err in -lcom_err" >&5 | |
13361 | $as_echo_n "checking for com_err in -lcom_err... " >&6; } | |
d6a003a8 | 13362 | if ${ac_cv_lib_com_err_com_err+:} false; then : |
067d23c9 KY |
13363 | $as_echo_n "(cached) " >&6 |
13364 | else | |
13365 | ac_check_lib_save_LIBS=$LIBS | |
13366 | LIBS="-lcom_err $LIBS" | |
13367 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13368 | /* end confdefs.h. */ | |
13369 | ||
13370 | /* Override any GCC internal prototype to avoid an error. | |
13371 | Use char because int might match the return type of a GCC | |
13372 | builtin and then its argument prototype would still apply. */ | |
13373 | #ifdef __cplusplus | |
13374 | extern "C" | |
13375 | #endif | |
13376 | char com_err (); | |
13377 | int | |
13378 | main () | |
13379 | { | |
13380 | return com_err (); | |
13381 | ; | |
13382 | return 0; | |
13383 | } | |
13384 | _ACEOF | |
13385 | if ac_fn_c_try_link "$LINENO"; then : | |
13386 | ac_cv_lib_com_err_com_err=yes | |
13387 | else | |
13388 | ac_cv_lib_com_err_com_err=no | |
13389 | fi | |
13390 | rm -f core conftest.err conftest.$ac_objext \ | |
13391 | conftest$ac_exeext conftest.$ac_ext | |
13392 | LIBS=$ac_check_lib_save_LIBS | |
13393 | fi | |
13394 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_com_err_com_err" >&5 | |
13395 | $as_echo "$ac_cv_lib_com_err_com_err" >&6; } | |
d6a003a8 | 13396 | if test "x$ac_cv_lib_com_err_com_err" = xyes; then : |
067d23c9 KY |
13397 | have_com_err=yes |
13398 | else | |
13399 | have_com_err=no | |
13400 | fi | |
13401 | ||
13402 | if test $have_com_err = yes; then | |
13403 | COM_ERRLIB=-lcom_err | |
13404 | LIBS="$COM_ERRLIB $LIBS" | |
13405 | ||
13406 | $as_echo "#define HAVE_LIBCOM_ERR 1" >>confdefs.h | |
13407 | ||
13408 | fi | |
13409 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lcrypto" >&5 | |
13410 | $as_echo_n "checking for mit_des_cbc_encrypt in -lcrypto... " >&6; } | |
d6a003a8 | 13411 | if ${ac_cv_lib_crypto_mit_des_cbc_encrypt+:} false; then : |
067d23c9 KY |
13412 | $as_echo_n "(cached) " >&6 |
13413 | else | |
13414 | ac_check_lib_save_LIBS=$LIBS | |
13415 | LIBS="-lcrypto $LIBS" | |
13416 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13417 | /* end confdefs.h. */ | |
13418 | ||
13419 | /* Override any GCC internal prototype to avoid an error. | |
13420 | Use char because int might match the return type of a GCC | |
13421 | builtin and then its argument prototype would still apply. */ | |
13422 | #ifdef __cplusplus | |
13423 | extern "C" | |
13424 | #endif | |
13425 | char mit_des_cbc_encrypt (); | |
13426 | int | |
13427 | main () | |
13428 | { | |
13429 | return mit_des_cbc_encrypt (); | |
13430 | ; | |
13431 | return 0; | |
13432 | } | |
13433 | _ACEOF | |
13434 | if ac_fn_c_try_link "$LINENO"; then : | |
13435 | ac_cv_lib_crypto_mit_des_cbc_encrypt=yes | |
13436 | else | |
13437 | ac_cv_lib_crypto_mit_des_cbc_encrypt=no | |
13438 | fi | |
13439 | rm -f core conftest.err conftest.$ac_objext \ | |
13440 | conftest$ac_exeext conftest.$ac_ext | |
13441 | LIBS=$ac_check_lib_save_LIBS | |
13442 | fi | |
13443 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5 | |
13444 | $as_echo "$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6; } | |
d6a003a8 | 13445 | if test "x$ac_cv_lib_crypto_mit_des_cbc_encrypt" = xyes; then : |
067d23c9 KY |
13446 | have_crypto=yes |
13447 | else | |
13448 | have_crypto=no | |
13449 | fi | |
13450 | ||
13451 | if test $have_crypto = yes; then | |
13452 | CRYPTOLIB=-lcrypto | |
13453 | LIBS="$CRYPTOLIB $LIBS" | |
13454 | ||
13455 | $as_echo "#define HAVE_LIBCRYPTO 1" >>confdefs.h | |
13456 | ||
13457 | fi | |
13458 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lk5crypto" >&5 | |
13459 | $as_echo_n "checking for mit_des_cbc_encrypt in -lk5crypto... " >&6; } | |
d6a003a8 | 13460 | if ${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+:} false; then : |
067d23c9 KY |
13461 | $as_echo_n "(cached) " >&6 |
13462 | else | |
13463 | ac_check_lib_save_LIBS=$LIBS | |
13464 | LIBS="-lk5crypto $LIBS" | |
13465 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13466 | /* end confdefs.h. */ | |
13467 | ||
13468 | /* Override any GCC internal prototype to avoid an error. | |
13469 | Use char because int might match the return type of a GCC | |
13470 | builtin and then its argument prototype would still apply. */ | |
13471 | #ifdef __cplusplus | |
13472 | extern "C" | |
13473 | #endif | |
13474 | char mit_des_cbc_encrypt (); | |
13475 | int | |
13476 | main () | |
13477 | { | |
13478 | return mit_des_cbc_encrypt (); | |
13479 | ; | |
13480 | return 0; | |
13481 | } | |
13482 | _ACEOF | |
13483 | if ac_fn_c_try_link "$LINENO"; then : | |
13484 | ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes | |
13485 | else | |
13486 | ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no | |
13487 | fi | |
13488 | rm -f core conftest.err conftest.$ac_objext \ | |
13489 | conftest$ac_exeext conftest.$ac_ext | |
13490 | LIBS=$ac_check_lib_save_LIBS | |
13491 | fi | |
13492 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5 | |
13493 | $as_echo "$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6; } | |
d6a003a8 | 13494 | if test "x$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" = xyes; then : |
067d23c9 KY |
13495 | have_k5crypto=yes |
13496 | else | |
13497 | have_k5crypto=no | |
13498 | fi | |
13499 | ||
13500 | if test $have_k5crypto = yes; then | |
13501 | CRYPTOLIB=-lk5crypto | |
13502 | LIBS="$CRYPTOLIB $LIBS" | |
13503 | ||
13504 | $as_echo "#define HAVE_LIBK5CRYPTO 1" >>confdefs.h | |
13505 | ||
13506 | fi | |
13507 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5_init_context in -lkrb5" >&5 | |
13508 | $as_echo_n "checking for krb5_init_context in -lkrb5... " >&6; } | |
d6a003a8 | 13509 | if ${ac_cv_lib_krb5_krb5_init_context+:} false; then : |
067d23c9 KY |
13510 | $as_echo_n "(cached) " >&6 |
13511 | else | |
13512 | ac_check_lib_save_LIBS=$LIBS | |
13513 | LIBS="-lkrb5 $LIBS" | |
13514 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13515 | /* end confdefs.h. */ | |
13516 | ||
13517 | /* Override any GCC internal prototype to avoid an error. | |
13518 | Use char because int might match the return type of a GCC | |
13519 | builtin and then its argument prototype would still apply. */ | |
13520 | #ifdef __cplusplus | |
13521 | extern "C" | |
13522 | #endif | |
13523 | char krb5_init_context (); | |
13524 | int | |
13525 | main () | |
13526 | { | |
13527 | return krb5_init_context (); | |
13528 | ; | |
13529 | return 0; | |
13530 | } | |
13531 | _ACEOF | |
13532 | if ac_fn_c_try_link "$LINENO"; then : | |
13533 | ac_cv_lib_krb5_krb5_init_context=yes | |
13534 | else | |
13535 | ac_cv_lib_krb5_krb5_init_context=no | |
13536 | fi | |
13537 | rm -f core conftest.err conftest.$ac_objext \ | |
13538 | conftest$ac_exeext conftest.$ac_ext | |
13539 | LIBS=$ac_check_lib_save_LIBS | |
13540 | fi | |
13541 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb5_krb5_init_context" >&5 | |
13542 | $as_echo "$ac_cv_lib_krb5_krb5_init_context" >&6; } | |
d6a003a8 | 13543 | if test "x$ac_cv_lib_krb5_krb5_init_context" = xyes; then : |
067d23c9 KY |
13544 | have_krb5=yes |
13545 | else | |
13546 | have_krb5=no | |
13547 | fi | |
13548 | ||
13549 | if test $have_krb5=yes; then | |
13550 | KRB5LIB=-lkrb5 | |
13551 | LIBS="$KRB5LIB $LIBS" | |
13552 | ||
13553 | $as_echo "#define HAVE_LIBKRB5 1" >>confdefs.h | |
13554 | ||
13555 | fi | |
13556 | if test "${with_kerberos5}" = no; then | |
13557 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes425" >&5 | |
13558 | $as_echo_n "checking for des_cbc_encrypt in -ldes425... " >&6; } | |
d6a003a8 | 13559 | if ${ac_cv_lib_des425_des_cbc_encrypt+:} false; then : |
067d23c9 KY |
13560 | $as_echo_n "(cached) " >&6 |
13561 | else | |
13562 | ac_check_lib_save_LIBS=$LIBS | |
13563 | LIBS="-ldes425 $LIBS" | |
13564 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13565 | /* end confdefs.h. */ | |
13566 | ||
13567 | /* Override any GCC internal prototype to avoid an error. | |
13568 | Use char because int might match the return type of a GCC | |
13569 | builtin and then its argument prototype would still apply. */ | |
13570 | #ifdef __cplusplus | |
13571 | extern "C" | |
13572 | #endif | |
13573 | char des_cbc_encrypt (); | |
13574 | int | |
13575 | main () | |
13576 | { | |
13577 | return des_cbc_encrypt (); | |
13578 | ; | |
13579 | return 0; | |
13580 | } | |
13581 | _ACEOF | |
13582 | if ac_fn_c_try_link "$LINENO"; then : | |
13583 | ac_cv_lib_des425_des_cbc_encrypt=yes | |
13584 | else | |
13585 | ac_cv_lib_des425_des_cbc_encrypt=no | |
13586 | fi | |
13587 | rm -f core conftest.err conftest.$ac_objext \ | |
13588 | conftest$ac_exeext conftest.$ac_ext | |
13589 | LIBS=$ac_check_lib_save_LIBS | |
13590 | fi | |
13591 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5 | |
13592 | $as_echo "$ac_cv_lib_des425_des_cbc_encrypt" >&6; } | |
d6a003a8 | 13593 | if test "x$ac_cv_lib_des425_des_cbc_encrypt" = xyes; then : |
067d23c9 KY |
13594 | have_des425=yes |
13595 | else | |
13596 | have_des425=no | |
13597 | fi | |
13598 | ||
13599 | if test $have_des425 = yes; then | |
13600 | DESLIB=-ldes425 | |
13601 | LIBS="$DESLIB $LIBS" | |
13602 | ||
13603 | $as_echo "#define HAVE_LIBDES425 1" >>confdefs.h | |
13604 | ||
13605 | else | |
13606 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes" >&5 | |
13607 | $as_echo_n "checking for des_cbc_encrypt in -ldes... " >&6; } | |
d6a003a8 | 13608 | if ${ac_cv_lib_des_des_cbc_encrypt+:} false; then : |
067d23c9 KY |
13609 | $as_echo_n "(cached) " >&6 |
13610 | else | |
13611 | ac_check_lib_save_LIBS=$LIBS | |
13612 | LIBS="-ldes $LIBS" | |
13613 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13614 | /* end confdefs.h. */ | |
13615 | ||
13616 | /* Override any GCC internal prototype to avoid an error. | |
13617 | Use char because int might match the return type of a GCC | |
13618 | builtin and then its argument prototype would still apply. */ | |
13619 | #ifdef __cplusplus | |
13620 | extern "C" | |
13621 | #endif | |
13622 | char des_cbc_encrypt (); | |
13623 | int | |
13624 | main () | |
13625 | { | |
13626 | return des_cbc_encrypt (); | |
13627 | ; | |
13628 | return 0; | |
13629 | } | |
13630 | _ACEOF | |
13631 | if ac_fn_c_try_link "$LINENO"; then : | |
13632 | ac_cv_lib_des_des_cbc_encrypt=yes | |
13633 | else | |
13634 | ac_cv_lib_des_des_cbc_encrypt=no | |
13635 | fi | |
13636 | rm -f core conftest.err conftest.$ac_objext \ | |
13637 | conftest$ac_exeext conftest.$ac_ext | |
13638 | LIBS=$ac_check_lib_save_LIBS | |
13639 | fi | |
13640 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des_des_cbc_encrypt" >&5 | |
13641 | $as_echo "$ac_cv_lib_des_des_cbc_encrypt" >&6; } | |
d6a003a8 | 13642 | if test "x$ac_cv_lib_des_des_cbc_encrypt" = xyes; then : |
067d23c9 KY |
13643 | have_des=yes |
13644 | else | |
13645 | have_des=no | |
13646 | fi | |
13647 | ||
13648 | if test $have_des = yes; then | |
13649 | DESLIB=-ldes | |
13650 | LIBS="$DESLIB $LIBS" | |
13651 | ||
13652 | $as_echo "#define HAVE_LIBDES 1" >>confdefs.h | |
13653 | ||
13654 | fi | |
13655 | fi | |
13656 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb4" >&5 | |
13657 | $as_echo_n "checking for krb_get_cred in -lkrb4... " >&6; } | |
d6a003a8 | 13658 | if ${ac_cv_lib_krb4_krb_get_cred+:} false; then : |
067d23c9 KY |
13659 | $as_echo_n "(cached) " >&6 |
13660 | else | |
13661 | ac_check_lib_save_LIBS=$LIBS | |
13662 | LIBS="-lkrb4 $LIBS" | |
13663 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13664 | /* end confdefs.h. */ | |
13665 | ||
13666 | /* Override any GCC internal prototype to avoid an error. | |
13667 | Use char because int might match the return type of a GCC | |
13668 | builtin and then its argument prototype would still apply. */ | |
13669 | #ifdef __cplusplus | |
13670 | extern "C" | |
13671 | #endif | |
13672 | char krb_get_cred (); | |
13673 | int | |
13674 | main () | |
13675 | { | |
13676 | return krb_get_cred (); | |
13677 | ; | |
13678 | return 0; | |
13679 | } | |
13680 | _ACEOF | |
13681 | if ac_fn_c_try_link "$LINENO"; then : | |
13682 | ac_cv_lib_krb4_krb_get_cred=yes | |
13683 | else | |
13684 | ac_cv_lib_krb4_krb_get_cred=no | |
13685 | fi | |
13686 | rm -f core conftest.err conftest.$ac_objext \ | |
13687 | conftest$ac_exeext conftest.$ac_ext | |
13688 | LIBS=$ac_check_lib_save_LIBS | |
13689 | fi | |
13690 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb4_krb_get_cred" >&5 | |
13691 | $as_echo "$ac_cv_lib_krb4_krb_get_cred" >&6; } | |
d6a003a8 | 13692 | if test "x$ac_cv_lib_krb4_krb_get_cred" = xyes; then : |
067d23c9 KY |
13693 | have_krb4=yes |
13694 | else | |
13695 | have_krb4=no | |
13696 | fi | |
13697 | ||
13698 | if test $have_krb4 = yes; then | |
13699 | KRB4LIB=-lkrb4 | |
13700 | LIBS="$KRB4LIB $LIBS" | |
13701 | ||
13702 | $as_echo "#define HAVE_LIBKRB4 1" >>confdefs.h | |
13703 | ||
13704 | else | |
13705 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb" >&5 | |
13706 | $as_echo_n "checking for krb_get_cred in -lkrb... " >&6; } | |
d6a003a8 | 13707 | if ${ac_cv_lib_krb_krb_get_cred+:} false; then : |
067d23c9 KY |
13708 | $as_echo_n "(cached) " >&6 |
13709 | else | |
13710 | ac_check_lib_save_LIBS=$LIBS | |
13711 | LIBS="-lkrb $LIBS" | |
13712 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13713 | /* end confdefs.h. */ | |
13714 | ||
13715 | /* Override any GCC internal prototype to avoid an error. | |
13716 | Use char because int might match the return type of a GCC | |
13717 | builtin and then its argument prototype would still apply. */ | |
13718 | #ifdef __cplusplus | |
13719 | extern "C" | |
13720 | #endif | |
13721 | char krb_get_cred (); | |
13722 | int | |
13723 | main () | |
13724 | { | |
13725 | return krb_get_cred (); | |
13726 | ; | |
13727 | return 0; | |
13728 | } | |
13729 | _ACEOF | |
13730 | if ac_fn_c_try_link "$LINENO"; then : | |
13731 | ac_cv_lib_krb_krb_get_cred=yes | |
13732 | else | |
13733 | ac_cv_lib_krb_krb_get_cred=no | |
13734 | fi | |
13735 | rm -f core conftest.err conftest.$ac_objext \ | |
13736 | conftest$ac_exeext conftest.$ac_ext | |
13737 | LIBS=$ac_check_lib_save_LIBS | |
13738 | fi | |
13739 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb_krb_get_cred" >&5 | |
13740 | $as_echo "$ac_cv_lib_krb_krb_get_cred" >&6; } | |
d6a003a8 | 13741 | if test "x$ac_cv_lib_krb_krb_get_cred" = xyes; then : |
067d23c9 KY |
13742 | have_krb=yes |
13743 | else | |
13744 | have_krb=no | |
13745 | fi | |
13746 | ||
13747 | if test $have_krb = yes; then | |
13748 | KRB4LIB=-lkrb | |
13749 | LIBS="$KRB4LIB $LIBS" | |
13750 | ||
13751 | $as_echo "#define HAVE_LIBKRB 1" >>confdefs.h | |
13752 | ||
13753 | fi | |
13754 | fi | |
13755 | fi | |
13756 | ||
13757 | if test "${with_kerberos5}" != no; then | |
13758 | for ac_header in krb5.h | |
13759 | do : | |
13760 | ac_fn_c_check_header_mongrel "$LINENO" "krb5.h" "ac_cv_header_krb5_h" "$ac_includes_default" | |
d6a003a8 | 13761 | if test "x$ac_cv_header_krb5_h" = xyes; then : |
067d23c9 KY |
13762 | cat >>confdefs.h <<_ACEOF |
13763 | #define HAVE_KRB5_H 1 | |
13764 | _ACEOF | |
13765 | ac_fn_c_check_member "$LINENO" "krb5_error" "text" "ac_cv_member_krb5_error_text" "#include <krb5.h> | |
13766 | " | |
d6a003a8 | 13767 | if test "x$ac_cv_member_krb5_error_text" = xyes; then : |
067d23c9 KY |
13768 | |
13769 | cat >>confdefs.h <<_ACEOF | |
13770 | #define HAVE_KRB5_ERROR_TEXT 1 | |
13771 | _ACEOF | |
13772 | ||
13773 | ||
13774 | fi | |
13775 | ac_fn_c_check_member "$LINENO" "krb5_error" "e_text" "ac_cv_member_krb5_error_e_text" "#include <krb5.h> | |
13776 | " | |
d6a003a8 | 13777 | if test "x$ac_cv_member_krb5_error_e_text" = xyes; then : |
067d23c9 KY |
13778 | |
13779 | cat >>confdefs.h <<_ACEOF | |
13780 | #define HAVE_KRB5_ERROR_E_TEXT 1 | |
13781 | _ACEOF | |
13782 | ||
13783 | ||
13784 | fi | |
13785 | ||
13786 | fi | |
13787 | ||
13788 | done | |
13789 | ||
13790 | else | |
13791 | for ac_header in des.h | |
13792 | do : | |
13793 | ac_fn_c_check_header_mongrel "$LINENO" "des.h" "ac_cv_header_des_h" "$ac_includes_default" | |
d6a003a8 | 13794 | if test "x$ac_cv_header_des_h" = xyes; then : |
067d23c9 KY |
13795 | cat >>confdefs.h <<_ACEOF |
13796 | #define HAVE_DES_H 1 | |
13797 | _ACEOF | |
13798 | ||
13799 | else | |
13800 | for ac_header in kerberosIV/des.h | |
13801 | do : | |
13802 | ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/des.h" "ac_cv_header_kerberosIV_des_h" "$ac_includes_default" | |
d6a003a8 | 13803 | if test "x$ac_cv_header_kerberosIV_des_h" = xyes; then : |
067d23c9 KY |
13804 | cat >>confdefs.h <<_ACEOF |
13805 | #define HAVE_KERBEROSIV_DES_H 1 | |
13806 | _ACEOF | |
13807 | ||
13808 | else | |
13809 | for ac_header in kerberos/des.h | |
13810 | do : | |
13811 | ac_fn_c_check_header_mongrel "$LINENO" "kerberos/des.h" "ac_cv_header_kerberos_des_h" "$ac_includes_default" | |
d6a003a8 | 13812 | if test "x$ac_cv_header_kerberos_des_h" = xyes; then : |
067d23c9 KY |
13813 | cat >>confdefs.h <<_ACEOF |
13814 | #define HAVE_KERBEROS_DES_H 1 | |
13815 | _ACEOF | |
13816 | ||
13817 | fi | |
13818 | ||
13819 | done | |
13820 | ||
13821 | fi | |
13822 | ||
13823 | done | |
13824 | ||
13825 | fi | |
13826 | ||
13827 | done | |
13828 | ||
13829 | for ac_header in krb.h | |
13830 | do : | |
13831 | ac_fn_c_check_header_mongrel "$LINENO" "krb.h" "ac_cv_header_krb_h" "$ac_includes_default" | |
d6a003a8 | 13832 | if test "x$ac_cv_header_krb_h" = xyes; then : |
067d23c9 KY |
13833 | cat >>confdefs.h <<_ACEOF |
13834 | #define HAVE_KRB_H 1 | |
13835 | _ACEOF | |
13836 | ||
13837 | else | |
13838 | for ac_header in kerberosIV/krb.h | |
13839 | do : | |
13840 | ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/krb.h" "ac_cv_header_kerberosIV_krb_h" "$ac_includes_default" | |
d6a003a8 | 13841 | if test "x$ac_cv_header_kerberosIV_krb_h" = xyes; then : |
067d23c9 KY |
13842 | cat >>confdefs.h <<_ACEOF |
13843 | #define HAVE_KERBEROSIV_KRB_H 1 | |
13844 | _ACEOF | |
13845 | ||
13846 | else | |
13847 | for ac_header in kerberos/krb.h | |
13848 | do : | |
13849 | ac_fn_c_check_header_mongrel "$LINENO" "kerberos/krb.h" "ac_cv_header_kerberos_krb_h" "$ac_includes_default" | |
d6a003a8 | 13850 | if test "x$ac_cv_header_kerberos_krb_h" = xyes; then : |
067d23c9 KY |
13851 | cat >>confdefs.h <<_ACEOF |
13852 | #define HAVE_KERBEROS_KRB_H 1 | |
13853 | _ACEOF | |
13854 | ||
13855 | fi | |
13856 | ||
13857 | done | |
13858 | ||
13859 | fi | |
13860 | ||
13861 | done | |
13862 | ||
13863 | fi | |
13864 | ||
13865 | done | |
13866 | ||
13867 | fi | |
13868 | for ac_header in com_err.h | |
13869 | do : | |
13870 | ac_fn_c_check_header_mongrel "$LINENO" "com_err.h" "ac_cv_header_com_err_h" "$ac_includes_default" | |
d6a003a8 | 13871 | if test "x$ac_cv_header_com_err_h" = xyes; then : |
067d23c9 KY |
13872 | cat >>confdefs.h <<_ACEOF |
13873 | #define HAVE_COM_ERR_H 1 | |
13874 | _ACEOF | |
13875 | ||
13876 | fi | |
13877 | ||
13878 | done | |
13879 | ||
13880 | fi | |
13881 | ||
13882 | ||
13883 | ||
13884 | ||
13885 | ||
13886 | ||
13887 | ||
13888 | # Solaris requires -lintl if you want strerror (which calls dgettext) | |
13889 | # to return localized messages. | |
13890 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dgettext in -lintl" >&5 | |
13891 | $as_echo_n "checking for dgettext in -lintl... " >&6; } | |
d6a003a8 | 13892 | if ${ac_cv_lib_intl_dgettext+:} false; then : |
067d23c9 KY |
13893 | $as_echo_n "(cached) " >&6 |
13894 | else | |
13895 | ac_check_lib_save_LIBS=$LIBS | |
13896 | LIBS="-lintl $LIBS" | |
13897 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13898 | /* end confdefs.h. */ | |
13899 | ||
13900 | /* Override any GCC internal prototype to avoid an error. | |
13901 | Use char because int might match the return type of a GCC | |
13902 | builtin and then its argument prototype would still apply. */ | |
13903 | #ifdef __cplusplus | |
13904 | extern "C" | |
13905 | #endif | |
13906 | char dgettext (); | |
13907 | int | |
13908 | main () | |
13909 | { | |
13910 | return dgettext (); | |
13911 | ; | |
13912 | return 0; | |
13913 | } | |
13914 | _ACEOF | |
13915 | if ac_fn_c_try_link "$LINENO"; then : | |
13916 | ac_cv_lib_intl_dgettext=yes | |
13917 | else | |
13918 | ac_cv_lib_intl_dgettext=no | |
13919 | fi | |
13920 | rm -f core conftest.err conftest.$ac_objext \ | |
13921 | conftest$ac_exeext conftest.$ac_ext | |
13922 | LIBS=$ac_check_lib_save_LIBS | |
13923 | fi | |
13924 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_dgettext" >&5 | |
13925 | $as_echo "$ac_cv_lib_intl_dgettext" >&6; } | |
d6a003a8 | 13926 | if test "x$ac_cv_lib_intl_dgettext" = xyes; then : |
067d23c9 KY |
13927 | cat >>confdefs.h <<_ACEOF |
13928 | #define HAVE_LIBINTL 1 | |
13929 | _ACEOF | |
13930 | ||
13931 | LIBS="-lintl $LIBS" | |
13932 | ||
13933 | fi | |
13934 | ||
13935 | ||
13936 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime caches TZ" >&5 | |
13937 | $as_echo_n "checking whether localtime caches TZ... " >&6; } | |
d6a003a8 | 13938 | if ${emacs_cv_localtime_cache+:} false; then : |
067d23c9 KY |
13939 | $as_echo_n "(cached) " >&6 |
13940 | else | |
13941 | if test x$ac_cv_func_tzset = xyes; then | |
13942 | if test "$cross_compiling" = yes; then : | |
13943 | # If we have tzset, assume the worst when cross-compiling. | |
13944 | emacs_cv_localtime_cache=yes | |
13945 | else | |
13946 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13947 | /* end confdefs.h. */ | |
13948 | #include <time.h> | |
13949 | char TZ_GMT0[] = "TZ=GMT0"; | |
13950 | char TZ_PST8[] = "TZ=PST8"; | |
13951 | main() | |
13952 | { | |
13953 | time_t now = time ((time_t *) 0); | |
13954 | int hour_GMT0, hour_unset; | |
13955 | if (putenv (TZ_GMT0) != 0) | |
13956 | exit (1); | |
13957 | hour_GMT0 = localtime (&now)->tm_hour; | |
13958 | unsetenv("TZ"); | |
13959 | hour_unset = localtime (&now)->tm_hour; | |
13960 | if (putenv (TZ_PST8) != 0) | |
13961 | exit (1); | |
13962 | if (localtime (&now)->tm_hour == hour_GMT0) | |
13963 | exit (1); | |
13964 | unsetenv("TZ"); | |
13965 | if (localtime (&now)->tm_hour != hour_unset) | |
13966 | exit (1); | |
13967 | exit (0); | |
13968 | } | |
13969 | _ACEOF | |
13970 | if ac_fn_c_try_run "$LINENO"; then : | |
13971 | emacs_cv_localtime_cache=no | |
13972 | else | |
13973 | emacs_cv_localtime_cache=yes | |
13974 | fi | |
13975 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
13976 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
13977 | fi | |
13978 | ||
13979 | else | |
13980 | # If we lack tzset, report that localtime does not cache TZ, | |
13981 | # since we can't invalidate the cache if we don't have tzset. | |
13982 | emacs_cv_localtime_cache=no | |
13983 | fi | |
13984 | fi | |
13985 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_localtime_cache" >&5 | |
13986 | $as_echo "$emacs_cv_localtime_cache" >&6; } | |
13987 | if test $emacs_cv_localtime_cache = yes; then | |
13988 | ||
13989 | $as_echo "#define LOCALTIME_CACHE 1" >>confdefs.h | |
13990 | ||
13991 | fi | |
13992 | ||
13993 | if test "x$HAVE_TIMEVAL" = xyes; then | |
13994 | for ac_func in gettimeofday | |
13995 | do : | |
13996 | ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday" | |
d6a003a8 | 13997 | if test "x$ac_cv_func_gettimeofday" = xyes; then : |
067d23c9 KY |
13998 | cat >>confdefs.h <<_ACEOF |
13999 | #define HAVE_GETTIMEOFDAY 1 | |
14000 | _ACEOF | |
14001 | ||
14002 | fi | |
14003 | done | |
14004 | ||
14005 | if test $ac_cv_func_gettimeofday = yes; then | |
14006 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday can accept two arguments" >&5 | |
14007 | $as_echo_n "checking whether gettimeofday can accept two arguments... " >&6; } | |
d6a003a8 | 14008 | if ${emacs_cv_gettimeofday_two_arguments+:} false; then : |
067d23c9 KY |
14009 | $as_echo_n "(cached) " >&6 |
14010 | else | |
14011 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14012 | /* end confdefs.h. */ | |
14013 | ||
14014 | #ifdef TIME_WITH_SYS_TIME | |
14015 | #include <sys/time.h> | |
14016 | #include <time.h> | |
14017 | #else | |
14018 | #ifdef HAVE_SYS_TIME_H | |
14019 | #include <sys/time.h> | |
14020 | #else | |
14021 | #include <time.h> | |
14022 | #endif | |
14023 | #endif | |
14024 | int | |
14025 | main () | |
14026 | { | |
14027 | struct timeval time; | |
14028 | gettimeofday (&time, 0); | |
14029 | ; | |
14030 | return 0; | |
14031 | } | |
14032 | _ACEOF | |
14033 | if ac_fn_c_try_compile "$LINENO"; then : | |
14034 | emacs_cv_gettimeofday_two_arguments=yes | |
14035 | else | |
14036 | emacs_cv_gettimeofday_two_arguments=no | |
14037 | fi | |
14038 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
14039 | fi | |
14040 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_gettimeofday_two_arguments" >&5 | |
14041 | $as_echo "$emacs_cv_gettimeofday_two_arguments" >&6; } | |
14042 | if test $emacs_cv_gettimeofday_two_arguments = no; then | |
14043 | ||
14044 | $as_echo "#define GETTIMEOFDAY_ONE_ARGUMENT 1" >>confdefs.h | |
14045 | ||
14046 | fi | |
14047 | fi | |
14048 | fi | |
14049 | ||
14050 | ok_so_far=yes | |
14051 | ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket" | |
d6a003a8 | 14052 | if test "x$ac_cv_func_socket" = xyes; then : |
067d23c9 KY |
14053 | |
14054 | else | |
14055 | ok_so_far=no | |
14056 | fi | |
14057 | ||
14058 | if test $ok_so_far = yes; then | |
14059 | ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default" | |
d6a003a8 | 14060 | if test "x$ac_cv_header_netinet_in_h" = xyes; then : |
067d23c9 KY |
14061 | |
14062 | else | |
14063 | ok_so_far=no | |
14064 | fi | |
14065 | ||
14066 | ||
14067 | fi | |
14068 | if test $ok_so_far = yes; then | |
14069 | ac_fn_c_check_header_mongrel "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$ac_includes_default" | |
d6a003a8 | 14070 | if test "x$ac_cv_header_arpa_inet_h" = xyes; then : |
067d23c9 KY |
14071 | |
14072 | else | |
14073 | ok_so_far=no | |
14074 | fi | |
14075 | ||
14076 | ||
14077 | fi | |
14078 | if test $ok_so_far = yes; then | |
14079 | ||
14080 | $as_echo "#define HAVE_INET_SOCKETS 1" >>confdefs.h | |
14081 | ||
14082 | fi | |
14083 | ||
14084 | if test -f /usr/lpp/X11/bin/smt.exp; then | |
14085 | ||
14086 | $as_echo "#define HAVE_AIX_SMT_EXP 1" >>confdefs.h | |
14087 | ||
14088 | fi | |
14089 | ||
14090 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system supports dynamic ptys" >&5 | |
14091 | $as_echo_n "checking whether system supports dynamic ptys... " >&6; } | |
14092 | if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then | |
14093 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
14094 | $as_echo "yes" >&6; } | |
14095 | ||
14096 | $as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h | |
14097 | ||
14098 | else | |
14099 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
14100 | $as_echo "no" >&6; } | |
14101 | fi | |
14102 | ||
14103 | ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" | |
d6a003a8 | 14104 | if test "x$ac_cv_type_pid_t" = xyes; then : |
067d23c9 KY |
14105 | |
14106 | else | |
14107 | ||
14108 | cat >>confdefs.h <<_ACEOF | |
14109 | #define pid_t int | |
14110 | _ACEOF | |
14111 | ||
14112 | fi | |
14113 | ||
14114 | for ac_header in vfork.h | |
14115 | do : | |
14116 | ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default" | |
d6a003a8 | 14117 | if test "x$ac_cv_header_vfork_h" = xyes; then : |
067d23c9 KY |
14118 | cat >>confdefs.h <<_ACEOF |
14119 | #define HAVE_VFORK_H 1 | |
14120 | _ACEOF | |
14121 | ||
14122 | fi | |
14123 | ||
14124 | done | |
14125 | ||
14126 | for ac_func in fork vfork | |
14127 | do : | |
14128 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
14129 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
d6a003a8 | 14130 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : |
067d23c9 KY |
14131 | cat >>confdefs.h <<_ACEOF |
14132 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
14133 | _ACEOF | |
14134 | ||
14135 | fi | |
14136 | done | |
14137 | ||
14138 | if test "x$ac_cv_func_fork" = xyes; then | |
14139 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 | |
14140 | $as_echo_n "checking for working fork... " >&6; } | |
d6a003a8 | 14141 | if ${ac_cv_func_fork_works+:} false; then : |
067d23c9 KY |
14142 | $as_echo_n "(cached) " >&6 |
14143 | else | |
14144 | if test "$cross_compiling" = yes; then : | |
14145 | ac_cv_func_fork_works=cross | |
14146 | else | |
14147 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14148 | /* end confdefs.h. */ | |
14149 | $ac_includes_default | |
14150 | int | |
14151 | main () | |
14152 | { | |
14153 | ||
14154 | /* By Ruediger Kuhlmann. */ | |
14155 | return fork () < 0; | |
14156 | ||
14157 | ; | |
14158 | return 0; | |
14159 | } | |
14160 | _ACEOF | |
14161 | if ac_fn_c_try_run "$LINENO"; then : | |
14162 | ac_cv_func_fork_works=yes | |
14163 | else | |
14164 | ac_cv_func_fork_works=no | |
14165 | fi | |
14166 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
14167 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
14168 | fi | |
14169 | ||
14170 | fi | |
14171 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5 | |
14172 | $as_echo "$ac_cv_func_fork_works" >&6; } | |
14173 | ||
14174 | else | |
14175 | ac_cv_func_fork_works=$ac_cv_func_fork | |
14176 | fi | |
14177 | if test "x$ac_cv_func_fork_works" = xcross; then | |
14178 | case $host in | |
14179 | *-*-amigaos* | *-*-msdosdjgpp*) | |
14180 | # Override, as these systems have only a dummy fork() stub | |
14181 | ac_cv_func_fork_works=no | |
14182 | ;; | |
14183 | *) | |
14184 | ac_cv_func_fork_works=yes | |
14185 | ;; | |
14186 | esac | |
14187 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 | |
14188 | $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} | |
14189 | fi | |
14190 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
14191 | if test "x$ac_cv_func_vfork" = xyes; then | |
14192 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 | |
14193 | $as_echo_n "checking for working vfork... " >&6; } | |
d6a003a8 | 14194 | if ${ac_cv_func_vfork_works+:} false; then : |
067d23c9 KY |
14195 | $as_echo_n "(cached) " >&6 |
14196 | else | |
14197 | if test "$cross_compiling" = yes; then : | |
14198 | ac_cv_func_vfork_works=cross | |
14199 | else | |
14200 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14201 | /* end confdefs.h. */ | |
14202 | /* Thanks to Paul Eggert for this test. */ | |
14203 | $ac_includes_default | |
14204 | #include <sys/wait.h> | |
14205 | #ifdef HAVE_VFORK_H | |
14206 | # include <vfork.h> | |
14207 | #endif | |
14208 | /* On some sparc systems, changes by the child to local and incoming | |
14209 | argument registers are propagated back to the parent. The compiler | |
14210 | is told about this with #include <vfork.h>, but some compilers | |
14211 | (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a | |
14212 | static variable whose address is put into a register that is | |
14213 | clobbered by the vfork. */ | |
14214 | static void | |
14215 | #ifdef __cplusplus | |
14216 | sparc_address_test (int arg) | |
14217 | # else | |
14218 | sparc_address_test (arg) int arg; | |
14219 | #endif | |
14220 | { | |
14221 | static pid_t child; | |
14222 | if (!child) { | |
14223 | child = vfork (); | |
14224 | if (child < 0) { | |
14225 | perror ("vfork"); | |
14226 | _exit(2); | |
14227 | } | |
14228 | if (!child) { | |
14229 | arg = getpid(); | |
14230 | write(-1, "", 0); | |
14231 | _exit (arg); | |
14232 | } | |
14233 | } | |
14234 | } | |
14235 | ||
14236 | int | |
14237 | main () | |
14238 | { | |
14239 | pid_t parent = getpid (); | |
14240 | pid_t child; | |
14241 | ||
14242 | sparc_address_test (0); | |
14243 | ||
14244 | child = vfork (); | |
14245 | ||
14246 | if (child == 0) { | |
14247 | /* Here is another test for sparc vfork register problems. This | |
14248 | test uses lots of local variables, at least as many local | |
14249 | variables as main has allocated so far including compiler | |
14250 | temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris | |
14251 | 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should | |
14252 | reuse the register of parent for one of the local variables, | |
14253 | since it will think that parent can't possibly be used any more | |
14254 | in this routine. Assigning to the local variable will thus | |
14255 | munge parent in the parent process. */ | |
14256 | pid_t | |
14257 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
14258 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
14259 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
14260 | use the same hardware register for all 8 local variables. */ | |
14261 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
14262 | || p != p5 || p != p6 || p != p7) | |
14263 | _exit(1); | |
14264 | ||
14265 | /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent | |
14266 | from child file descriptors. If the child closes a descriptor | |
14267 | before it execs or exits, this munges the parent's descriptor | |
14268 | as well. Test for this by closing stdout in the child. */ | |
14269 | _exit(close(fileno(stdout)) != 0); | |
14270 | } else { | |
14271 | int status; | |
14272 | struct stat st; | |
14273 | ||
14274 | while (wait(&status) != child) | |
14275 | ; | |
14276 | return ( | |
14277 | /* Was there some problem with vforking? */ | |
14278 | child < 0 | |
14279 | ||
14280 | /* Did the child fail? (This shouldn't happen.) */ | |
14281 | || status | |
14282 | ||
14283 | /* Did the vfork/compiler bug occur? */ | |
14284 | || parent != getpid() | |
14285 | ||
14286 | /* Did the file descriptor bug occur? */ | |
14287 | || fstat(fileno(stdout), &st) != 0 | |
14288 | ); | |
14289 | } | |
14290 | } | |
14291 | _ACEOF | |
14292 | if ac_fn_c_try_run "$LINENO"; then : | |
14293 | ac_cv_func_vfork_works=yes | |
14294 | else | |
14295 | ac_cv_func_vfork_works=no | |
14296 | fi | |
14297 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
14298 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
14299 | fi | |
14300 | ||
14301 | fi | |
14302 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 | |
14303 | $as_echo "$ac_cv_func_vfork_works" >&6; } | |
14304 | ||
14305 | fi; | |
14306 | if test "x$ac_cv_func_fork_works" = xcross; then | |
14307 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
14308 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 | |
14309 | $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} | |
14310 | fi | |
14311 | ||
14312 | if test "x$ac_cv_func_vfork_works" = xyes; then | |
14313 | ||
14314 | $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h | |
14315 | ||
14316 | else | |
14317 | ||
14318 | $as_echo "#define vfork fork" >>confdefs.h | |
14319 | ||
14320 | fi | |
14321 | if test "x$ac_cv_func_fork_works" = xyes; then | |
14322 | ||
14323 | $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h | |
14324 | ||
14325 | fi | |
14326 | ||
14327 | ||
14328 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 | |
14329 | $as_echo_n "checking for nl_langinfo and CODESET... " >&6; } | |
d6a003a8 | 14330 | if ${emacs_cv_langinfo_codeset+:} false; then : |
067d23c9 KY |
14331 | $as_echo_n "(cached) " >&6 |
14332 | else | |
14333 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14334 | /* end confdefs.h. */ | |
14335 | #include <langinfo.h> | |
14336 | int | |
14337 | main () | |
14338 | { | |
14339 | char* cs = nl_langinfo(CODESET); | |
14340 | ; | |
14341 | return 0; | |
14342 | } | |
14343 | _ACEOF | |
14344 | if ac_fn_c_try_link "$LINENO"; then : | |
14345 | emacs_cv_langinfo_codeset=yes | |
14346 | else | |
14347 | emacs_cv_langinfo_codeset=no | |
14348 | fi | |
14349 | rm -f core conftest.err conftest.$ac_objext \ | |
14350 | conftest$ac_exeext conftest.$ac_ext | |
14351 | ||
14352 | fi | |
14353 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_langinfo_codeset" >&5 | |
14354 | $as_echo "$emacs_cv_langinfo_codeset" >&6; } | |
14355 | if test $emacs_cv_langinfo_codeset = yes; then | |
14356 | ||
14357 | $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h | |
14358 | ||
14359 | fi | |
14360 | ||
14361 | ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" | |
d6a003a8 | 14362 | if test "x$ac_cv_type_size_t" = xyes; then : |
067d23c9 KY |
14363 | |
14364 | cat >>confdefs.h <<_ACEOF | |
14365 | #define HAVE_SIZE_T 1 | |
14366 | _ACEOF | |
14367 | ||
14368 | ||
14369 | fi | |
14370 | ||
14371 | ||
14372 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5 | |
14373 | $as_echo_n "checking for mbstate_t... " >&6; } | |
d6a003a8 | 14374 | if ${ac_cv_type_mbstate_t+:} false; then : |
067d23c9 KY |
14375 | $as_echo_n "(cached) " >&6 |
14376 | else | |
14377 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14378 | /* end confdefs.h. */ | |
14379 | $ac_includes_default | |
14380 | # include <wchar.h> | |
14381 | int | |
14382 | main () | |
14383 | { | |
14384 | mbstate_t x; return sizeof x; | |
14385 | ; | |
14386 | return 0; | |
14387 | } | |
14388 | _ACEOF | |
14389 | if ac_fn_c_try_compile "$LINENO"; then : | |
14390 | ac_cv_type_mbstate_t=yes | |
14391 | else | |
14392 | ac_cv_type_mbstate_t=no | |
14393 | fi | |
14394 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
14395 | fi | |
14396 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5 | |
14397 | $as_echo "$ac_cv_type_mbstate_t" >&6; } | |
14398 | if test $ac_cv_type_mbstate_t = yes; then | |
14399 | ||
14400 | $as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h | |
14401 | ||
14402 | else | |
14403 | ||
14404 | $as_echo "#define mbstate_t int" >>confdefs.h | |
14405 | ||
14406 | fi | |
14407 | ||
14408 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C restrict keyword" >&5 | |
14409 | $as_echo_n "checking for C restrict keyword... " >&6; } | |
d6a003a8 | 14410 | if ${emacs_cv_c_restrict+:} false; then : |
067d23c9 KY |
14411 | $as_echo_n "(cached) " >&6 |
14412 | else | |
14413 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14414 | /* end confdefs.h. */ | |
14415 | void fred (int *restrict x); | |
14416 | int | |
14417 | main () | |
14418 | { | |
14419 | ||
14420 | ; | |
14421 | return 0; | |
14422 | } | |
14423 | _ACEOF | |
14424 | if ac_fn_c_try_compile "$LINENO"; then : | |
14425 | emacs_cv_c_restrict=yes | |
14426 | else | |
14427 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14428 | /* end confdefs.h. */ | |
14429 | void fred (int *__restrict x); | |
14430 | int | |
14431 | main () | |
14432 | { | |
14433 | ||
14434 | ; | |
14435 | return 0; | |
14436 | } | |
14437 | _ACEOF | |
14438 | if ac_fn_c_try_compile "$LINENO"; then : | |
14439 | emacs_cv_c_restrict=__restrict | |
14440 | else | |
14441 | emacs_cv_c_restrict=no | |
14442 | fi | |
14443 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
14444 | fi | |
14445 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
14446 | fi | |
14447 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_c_restrict" >&5 | |
14448 | $as_echo "$emacs_cv_c_restrict" >&6; } | |
14449 | case "$emacs_cv_c_restrict" in | |
14450 | yes) emacs_restrict=restrict;; | |
14451 | no) emacs_restrict="";; | |
14452 | *) emacs_restrict="$emacs_cv_c_restrict";; | |
14453 | esac | |
14454 | if test "$emacs_restrict" != __restrict; then | |
14455 | ||
14456 | cat >>confdefs.h <<_ACEOF | |
14457 | #define __restrict $emacs_restrict | |
14458 | _ACEOF | |
14459 | ||
14460 | fi | |
14461 | ||
14462 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C restricted array declarations" >&5 | |
14463 | $as_echo_n "checking for C restricted array declarations... " >&6; } | |
d6a003a8 | 14464 | if ${emacs_cv_c_restrict_arr+:} false; then : |
067d23c9 KY |
14465 | $as_echo_n "(cached) " >&6 |
14466 | else | |
14467 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14468 | /* end confdefs.h. */ | |
14469 | void fred (int x[__restrict]); | |
14470 | int | |
14471 | main () | |
14472 | { | |
14473 | ||
14474 | ; | |
14475 | return 0; | |
14476 | } | |
14477 | _ACEOF | |
14478 | if ac_fn_c_try_compile "$LINENO"; then : | |
14479 | emacs_cv_c_restrict_arr=yes | |
14480 | else | |
14481 | emacs_cv_c_restrict_arr=no | |
14482 | fi | |
14483 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
14484 | fi | |
14485 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_c_restrict_arr" >&5 | |
14486 | $as_echo "$emacs_cv_c_restrict_arr" >&6; } | |
14487 | if test "$emacs_cv_c_restrict_arr" = yes; then | |
14488 | ||
14489 | $as_echo "#define __restrict_arr __restrict" >>confdefs.h | |
14490 | ||
14491 | fi | |
14492 | ||
14493 | ||
14494 | ||
14495 | # Set up the CFLAGS for real compilation, so we can substitute it. | |
14496 | CFLAGS="$REAL_CFLAGS" | |
14497 | CPPFLAGS="$REAL_CPPFLAGS" | |
14498 | ||
14499 | ## Hack to detect a buggy GCC version. | |
14500 | if test "x$GCC" = xyes \ | |
14501 | && test x"`$CC --version 2> /dev/null | grep 'gcc.* 4.5.0'`" != x \ | |
14502 | && test x"`echo $CFLAGS | grep '\-O[23]'`" != x \ | |
14503 | && test x"`echo $CFLAGS | grep '\-fno-optimize-sibling-calls'`" = x; then | |
d6a003a8 | 14504 | as_fn_error $? "GCC 4.5.0 has problems compiling Emacs; see etc/PROBLEMS'." "$LINENO" 5 |
067d23c9 KY |
14505 | fi |
14506 | ||
14507 | #### Find out which version of Emacs this is. | |
14508 | version=`grep 'const char emacs_version' ${srcdir}/src/emacs.c \ | |
14509 | | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'` | |
14510 | if test x"${version}" = x; then | |
d6a003a8 | 14511 | as_fn_error $? "can't find current emacs version in \`${srcdir}/src/emacs.c'." "$LINENO" 5 |
067d23c9 KY |
14512 | fi |
14513 | if test x"${version}" != x"$PACKAGE_VERSION"; then | |
14514 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: version mismatch between \`${srcdir}/configure.in' and \`${srcdir}/src/emacs.c'." >&5 | |
14515 | $as_echo "$as_me: WARNING: version mismatch between \`${srcdir}/configure.in' and \`${srcdir}/src/emacs.c'." >&2;} | |
14516 | fi | |
14517 | ||
14518 | ### Specify what sort of things we'll be editing into Makefile and config.h. | |
14519 | ### Use configuration here uncanonicalized to avoid exceeding size limits. | |
14520 | ||
14521 | ||
14522 | ## Unused? | |
14523 | ||
14524 | ||
14525 | ||
14526 | ||
14527 | ||
14528 | ||
14529 | ||
14530 | ||
14531 | ||
14532 | ||
14533 | ||
14534 | ||
14535 | ||
14536 | ||
14537 | ||
14538 | ||
14539 | ||
14540 | ||
14541 | ||
14542 | ||
14543 | ## FIXME? Nothing uses @LD_SWITCH_X_SITE@. | |
14544 | ## src/Makefile.in did add LD_SWITCH_X_SITE (as a cpp define) to the | |
14545 | ## end of LIBX_BASE, but nothing ever set it. | |
14546 | ||
14547 | ||
14548 | ||
14549 | ||
14550 | ## Used in lwlib/Makefile.in. | |
14551 | ||
d6a003a8 AS |
14552 | if test -n "${machfile}"; then |
14553 | M_FILE="\$(srcdir)/${machfile}" | |
14554 | else | |
14555 | M_FILE= | |
14556 | fi | |
14557 | S_FILE="\$(srcdir)/${opsysfile}" | |
067d23c9 KY |
14558 | |
14559 | ||
14560 | ||
14561 | ||
14562 | ||
14563 | ||
14564 | ||
14565 | ||
14566 | ||
14567 | ||
14568 | ||
14569 | cat >>confdefs.h <<_ACEOF | |
14570 | #define EMACS_CONFIGURATION "${canonical}" | |
14571 | _ACEOF | |
14572 | ||
14573 | ||
14574 | cat >>confdefs.h <<_ACEOF | |
14575 | #define EMACS_CONFIG_OPTIONS "${ac_configure_args}" | |
14576 | _ACEOF | |
14577 | ||
d6a003a8 | 14578 | if test -n "$machfile"; then |
067d23c9 KY |
14579 | |
14580 | cat >>confdefs.h <<_ACEOF | |
14581 | #define config_machfile "${machfile}" | |
14582 | _ACEOF | |
14583 | ||
d6a003a8 | 14584 | fi |
067d23c9 KY |
14585 | |
14586 | cat >>confdefs.h <<_ACEOF | |
14587 | #define config_opsysfile "${opsysfile}" | |
14588 | _ACEOF | |
14589 | ||
14590 | ||
14591 | XMENU_OBJ= | |
14592 | XOBJ= | |
14593 | FONT_OBJ= | |
14594 | if test "${HAVE_X_WINDOWS}" = "yes" ; then | |
14595 | ||
14596 | $as_echo "#define HAVE_X_WINDOWS 1" >>confdefs.h | |
14597 | ||
14598 | XMENU_OBJ=xmenu.o | |
14599 | XOBJ="xterm.o xfns.o xselect.o xrdb.o fontset.o xsmfns.o fringe.o image.o xsettings.o xgselect.o" | |
14600 | FONT_OBJ=xfont.o | |
14601 | if test "$HAVE_XFT" = "yes"; then | |
14602 | FONT_OBJ="$FONT_OBJ ftfont.o xftfont.o ftxfont.o" | |
14603 | elif test "$HAVE_FREETYPE" = "yes"; then | |
14604 | FONT_OBJ="$FONT_OBJ ftfont.o ftxfont.o" | |
14605 | fi | |
14606 | ||
14607 | fi | |
14608 | ||
14609 | ||
14610 | ||
14611 | ||
14612 | WIDGET_OBJ= | |
14613 | MOTIF_LIBW= | |
14614 | if test "${USE_X_TOOLKIT}" != "none" ; then | |
14615 | WIDGET_OBJ=widget.o | |
14616 | ||
14617 | $as_echo "#define USE_X_TOOLKIT 1" >>confdefs.h | |
14618 | ||
14619 | if test "${USE_X_TOOLKIT}" = "LUCID"; then | |
14620 | ||
14621 | $as_echo "#define USE_LUCID 1" >>confdefs.h | |
14622 | ||
14623 | elif test "${USE_X_TOOLKIT}" = "MOTIF"; then | |
14624 | ||
14625 | $as_echo "#define USE_MOTIF 1" >>confdefs.h | |
14626 | ||
14627 | MOTIF_LIBW=-lXm | |
14628 | case "$opsys" in | |
14629 | gnu-linux) | |
14630 | ## Paul Abrahams <abrahams at equinox.shaysnet.com> says this is needed. | |
14631 | MOTIF_LIBW="$MOTIF_LIBW -lXpm" | |
14632 | ;; | |
14633 | ||
14634 | unixware) | |
14635 | ## Richard Anthony Ryan <ryanr at ellingtn.ftc.nrcs.usda.gov> | |
14636 | ## says -lXimp is needed in UNIX_SV ... 4.2 1.1.2. | |
14637 | MOTIF_LIBW="MOTIF_LIBW -lXimp" | |
14638 | ;; | |
14639 | ||
14640 | aix4-2) | |
14641 | ## olson@mcs.anl.gov says -li18n is needed by -lXm. | |
14642 | MOTIF_LIBW="$MOTIF_LIBW -li18n" | |
14643 | ;; | |
14644 | esac | |
14645 | MOTIF_LIBW="$MOTIF_LIBW $LIBXP" | |
14646 | fi | |
14647 | fi | |
14648 | ||
14649 | ||
14650 | TOOLKIT_LIBW= | |
14651 | case "$USE_X_TOOLKIT" in | |
14652 | MOTIF) TOOLKIT_LIBW="$MOTIF_LIBW" ;; | |
14653 | LUCID) TOOLKIT_LIBW="$LUCID_LIBW" ;; | |
14654 | none) test "x$HAVE_GTK" = "xyes" && TOOLKIT_LIBW="$GTK_LIBS" ;; | |
14655 | esac | |
14656 | ||
14657 | ||
14658 | if test "$USE_X_TOOLKIT" = "none"; then | |
14659 | LIBXT_OTHER="\$(LIBXSM)" | |
14660 | OLDXMENU_TARGET="really-oldXMenu" | |
14661 | else | |
14662 | LIBXT_OTHER="\$(LIBXMU) -lXt \$(LIBXTR6) -lXext" | |
14663 | OLDXMENU_TARGET="really-lwlib" | |
14664 | fi | |
14665 | ||
14666 | ||
14667 | ## The X Menu stuff is present in the X10 distribution, but missing | |
14668 | ## from X11. If we have X10, just use the installed library; | |
14669 | ## otherwise, use our own copy. | |
14670 | if test "${HAVE_X11}" = "yes" ; then | |
14671 | ||
14672 | $as_echo "#define HAVE_X11 1" >>confdefs.h | |
14673 | ||
14674 | ||
14675 | if test "$USE_X_TOOLKIT" = "none"; then | |
14676 | OLDXMENU="\${oldXMenudir}/libXMenu11.a" | |
14677 | else | |
14678 | OLDXMENU="\${lwlibdir}/liblw.a" | |
14679 | fi | |
14680 | LIBXMENU="\$(OLDXMENU)" | |
14681 | LIBX_OTHER="\$(LIBXT) \$(LIBX_EXTRA)" | |
14682 | OLDXMENU_DEPS="\${OLDXMENU} ../src/\${OLDXMENU}" | |
14683 | else | |
14684 | ## For a syntactically valid Makefile; not actually used for anything. | |
14685 | ## See comments in src/Makefile.in. | |
14686 | OLDXMENU=nothing | |
14687 | ## FIXME This case (!HAVE_X11 && HAVE_X_WINDOWS) is no longer possible(?). | |
14688 | if test "${HAVE_X_WINDOWS}" = "yes"; then | |
14689 | LIBXMENU="-lXMenu" | |
14690 | else | |
14691 | LIBXMENU= | |
14692 | fi | |
14693 | LIBX_OTHER= | |
14694 | OLDXMENU_DEPS= | |
14695 | fi | |
14696 | ||
14697 | if test "$HAVE_GTK" = "yes" || test "$HAVE_MENUS" != "yes"; then | |
14698 | OLDXMENU_TARGET= | |
14699 | OLDXMENU=nothing | |
14700 | LIBXMENU= | |
14701 | OLDXMENU_DEPS= | |
14702 | fi | |
14703 | ||
14704 | ||
14705 | ||
14706 | ||
14707 | ||
14708 | ||
14709 | ||
14710 | if test "${HAVE_MENUS}" = "yes" ; then | |
14711 | ||
14712 | $as_echo "#define HAVE_MENUS 1" >>confdefs.h | |
14713 | ||
14714 | fi | |
14715 | ||
14716 | if test "${GNU_MALLOC}" = "yes" ; then | |
14717 | ||
14718 | $as_echo "#define GNU_MALLOC 1" >>confdefs.h | |
14719 | ||
14720 | fi | |
14721 | ||
14722 | RALLOC_OBJ= | |
14723 | if test "${REL_ALLOC}" = "yes" ; then | |
14724 | ||
14725 | $as_echo "#define REL_ALLOC 1" >>confdefs.h | |
14726 | ||
14727 | ||
14728 | test "$system_malloc" != "yes" && RALLOC_OBJ=ralloc.o | |
14729 | fi | |
14730 | ||
14731 | ||
14732 | if test "$opsys" = "cygwin"; then | |
14733 | CYGWIN_OBJ="sheap.o" | |
14734 | ## Cygwin differs because of its unexec(). | |
14735 | PRE_ALLOC_OBJ= | |
14736 | POST_ALLOC_OBJ=lastfile.o | |
14737 | else | |
14738 | CYGWIN_OBJ= | |
14739 | PRE_ALLOC_OBJ=lastfile.o | |
14740 | POST_ALLOC_OBJ= | |
14741 | fi | |
14742 | ||
14743 | ||
14744 | ||
14745 | ||
14746 | ||
14747 | case "$opsys" in | |
14748 | aix4-2) LD_SWITCH_SYSTEM_TEMACS="-Wl,-bnodelcsect" ;; | |
14749 | ||
14750 | darwin) | |
14751 | ## The -headerpad option tells ld (see man page) to leave room at the | |
14752 | ## end of the header for adding load commands. Needed for dumping. | |
14753 | ## 0x690 is the total size of 30 segment load commands (at 56 | |
14754 | ## each); under Cocoa 31 commands are required. | |
14755 | if test "$HAVE_NS" = "yes"; then | |
14756 | libs_nsgui="-framework AppKit" | |
14757 | headerpad_extra=6C8 | |
14758 | else | |
14759 | libs_nsgui= | |
14760 | headerpad_extra=690 | |
14761 | fi | |
14762 | LD_SWITCH_SYSTEM_TEMACS="-prebind $libs_nsgui -Xlinker -headerpad -Xlinker $headerpad_extra" | |
14763 | ||
14764 | ## This is here because src/Makefile.in did some extra fiddling around | |
14765 | ## with LD_SWITCH_SYSTEM. The cpp logic was: | |
14766 | ## #ifndef LD_SWITCH_SYSTEM | |
14767 | ## #if !defined (__GNUC__) && ((defined (BSD_SYSTEM) && !defined (COFF))) | |
14768 | ## Since all the *bsds define LD_SWITCH_SYSTEM, this simplifies to: | |
14769 | ## not using gcc, darwin system not on an alpha (ie darwin, since | |
14770 | ## darwin + alpha does not occur). | |
14771 | ## Because this was done in src/Makefile.in, the resulting part of | |
14772 | ## LD_SWITCH_SYSTEM was not used in configure (ie, in ac_link). | |
14773 | ## It therefore seems cleaner to put this in LD_SWITCH_SYSTEM_TEMACS, | |
14774 | ## rather than LD_SWITCH_SYSTEM. | |
14775 | test "x$LD_SWITCH_SYSTEM" = "x" && test "x$GCC" != "xyes" && \ | |
14776 | LD_SWITCH_SYSTEM_TEMACS="-X $LD_SWITCH_SYSTEM_TEMACS" | |
14777 | ;; | |
14778 | ||
14779 | ## LD_SWITCH_X_SITE_AUX is a -R option saying where to find X at run-time. | |
14780 | ## When handled by cpp, this was in LD_SWITCH_SYSTEM. However, at | |
14781 | ## the point where configure sourced the s/*.h file, LD_SWITCH_X_SITE_AUX | |
14782 | ## had not yet been defined and was expanded to null. Hence LD_SWITCH_SYSTEM | |
14783 | ## had different values in configure (in ac_link) and src/Makefile.in. | |
14784 | ## It seems clearer therefore to put this piece in LD_SWITCH_SYSTEM_TEMACS. | |
14785 | gnu-linux) LD_SWITCH_SYSTEM_TEMACS="\$(LD_SWITCH_X_SITE_AUX)" ;; | |
14786 | ||
14787 | *) LD_SWITCH_SYSTEM_TEMACS= ;; | |
14788 | esac | |
14789 | ||
14790 | if test "$NS_IMPL_GNUSTEP" = "yes"; then | |
14791 | LD_SWITCH_SYSTEM_TEMACS="${LD_SWITCH_SYSTEM_TEMACS} -L${GNUSTEP_SYSTEM_LIBRARIES} ${GNUSTEP_LOCAL_LIBRARIES} -lgnustep-gui -lgnustep-base -lobjc -lpthread" | |
14792 | fi | |
14793 | ||
14794 | ||
14795 | ||
14796 | ||
14797 | LD_FIRSTFLAG= | |
14798 | ORDINARY_LINK= | |
14799 | case "$opsys" in | |
14800 | ## gnu: GNU needs its own crt0. | |
14801 | aix4-2|cygwin|darwin|gnu|hpux*|irix6-5|sol2*|unixware) ORDINARY_LINK=yes ;; | |
14802 | ||
14803 | ## On post 1.3 releases of NetBSD, gcc -nostdlib also clears the | |
14804 | ## library search parth, i.e. it won't search /usr/lib for libc and | |
14805 | ## friends. Using -nostartfiles instead avoids this problem, and | |
14806 | ## will also work on earlier NetBSD releases. | |
14807 | netbsd|openbsd) LD_FIRSTFLAG="-nostartfiles" ;; | |
14808 | ||
14809 | ## macpcc: NAKAJI Hiroyuki <nakaji@tutrp.tut.ac.jp> says | |
14810 | ## MkLinux/LinuxPPC needs this. | |
14811 | ## ibms390x only supports opsys = gnu-linux so it can be added here. | |
14812 | gnu-*) | |
14813 | case "$machine" in | |
14814 | macppc|ibms390x) LD_FIRSTFLAG="-nostdlib" ;; | |
14815 | esac | |
14816 | ;; | |
14817 | esac | |
14818 | ||
14819 | ||
14820 | if test "x$ORDINARY_LINK" = "xyes"; then | |
14821 | ||
14822 | LD_FIRSTFLAG="" | |
14823 | ||
14824 | $as_echo "#define ORDINARY_LINK 1" >>confdefs.h | |
14825 | ||
14826 | ||
14827 | ## The system files defining neither ORDINARY_LINK nor LD_FIRSTFLAG are: | |
14828 | ## freebsd, gnu-* not on macppc|ibms390x. | |
14829 | elif test "x$GCC" = "xyes" && test "x$LD_FIRSTFLAG" = "x"; then | |
14830 | ||
14831 | ## Versions of GCC >= 2.0 put their library, libgcc.a, in obscure | |
14832 | ## places that are difficult to figure out at make time. Fortunately, | |
14833 | ## these same versions allow you to pass arbitrary flags on to the | |
14834 | ## linker, so there is no reason not to use it as a linker. | |
14835 | ## | |
14836 | ## Well, it is not quite perfect. The "-nostdlib" keeps GCC from | |
14837 | ## searching for libraries in its internal directories, so we have to | |
14838 | ## ask GCC explicitly where to find libgcc.a (LIB_GCC below). | |
14839 | LD_FIRSTFLAG="-nostdlib" | |
14840 | fi | |
14841 | ||
14842 | ## FIXME? What setting of EDIT_LDFLAGS should this have? | |
14843 | test "$NS_IMPL_GNUSTEP" = "yes" && LD_FIRSTFLAG="-rdynamic" | |
14844 | ||
14845 | ||
14846 | ||
14847 | ||
14848 | ## FIXME? The logic here is not precisely the same as that above. | |
14849 | ## There is no check here for a pre-defined LD_FIRSTFLAG. | |
14850 | ## Should we only be setting LIB_GCC if LD ~ -nostdlib? | |
14851 | LIB_GCC= | |
14852 | if test "x$GCC" = "xyes" && test "x$ORDINARY_LINK" != "xyes"; then | |
14853 | ||
14854 | case "$opsys" in | |
14855 | freebsd|netbsd|openbsd) LIB_GCC= ;; | |
14856 | ||
14857 | gnu-*) | |
14858 | ## armin76@gentoo.org reported that the lgcc_s flag is necessary to | |
14859 | ## build on ARM EABI under GNU/Linux. (Bug#5518) | |
d6a003a8 AS |
14860 | case $host_cpu in |
14861 | arm*) | |
067d23c9 | 14862 | LIB_GCC="-lgcc_s" |
d6a003a8 AS |
14863 | ;; |
14864 | *) | |
067d23c9 KY |
14865 | ## FIXME? s/gnu-linux.h used to define LIB_GCC as below, then |
14866 | ## immediately undefine it again and redefine it to empty. | |
14867 | ## Was the C_SWITCH_X_SITE part really necessary? | |
14868 | ## LIB_GCC=`$CC $C_SWITCH_X_SITE -print-libgcc-file-name` | |
14869 | LIB_GCC= | |
d6a003a8 AS |
14870 | ;; |
14871 | esac | |
067d23c9 KY |
14872 | ;; |
14873 | ||
14874 | ## Ask GCC where to find libgcc.a. | |
14875 | *) LIB_GCC=`$CC -print-libgcc-file-name 2> /dev/null` ;; | |
14876 | esac | |
14877 | fi | |
14878 | ||
14879 | ||
14880 | TOOLTIP_SUPPORT= | |
14881 | WINDOW_SUPPORT= | |
14882 | ## If we're using X11/GNUstep, define some consequences. | |
14883 | if test "$HAVE_X_WINDOWS" = "yes" || test "$HAVE_NS" = "yes"; then | |
14884 | ||
14885 | $as_echo "#define HAVE_WINDOW_SYSTEM 1" >>confdefs.h | |
14886 | ||
14887 | ||
14888 | $as_echo "#define HAVE_MOUSE 1" >>confdefs.h | |
14889 | ||
14890 | MOUSE_SUPPORT="\$(REAL_MOUSE_SUPPORT)" | |
14891 | TOOLTIP_SUPPORT="\${lispsource}/mouse.elc" | |
14892 | ||
14893 | WINDOW_SUPPORT="\$(BASE_WINDOW_SUPPORT)" | |
14894 | test "$HAVE_X_WINDOWS" = "yes" && \ | |
14895 | WINDOW_SUPPORT="$WINDOW_SUPPORT \$(X_WINDOW_SUPPORT)" | |
14896 | ||
14897 | fi | |
14898 | ||
14899 | ||
14900 | ||
14901 | ||
14902 | ||
14903 | ||
14904 | ||
14905 | #### Report on what we decided to do. | |
14906 | #### Report GTK as a toolkit, even if it doesn't use Xt. | |
14907 | #### It makes printing result more understandable as using GTK sets | |
14908 | #### toolkit_scroll_bars to yes by default. | |
14909 | if test "${HAVE_GTK}" = "yes"; then | |
14910 | USE_X_TOOLKIT=GTK | |
14911 | fi | |
14912 | ||
14913 | echo " | |
14914 | Configured for \`${canonical}'. | |
14915 | ||
14916 | Where should the build process find the source code? ${srcdir} | |
14917 | What operating system and machine description files should Emacs use? | |
d6a003a8 | 14918 | \`${opsysfile}' and ${machfile:+\`${machfile}'}${machfile:-none} |
067d23c9 KY |
14919 | What compiler should emacs be built with? ${CC} ${CFLAGS} |
14920 | Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason} | |
14921 | Should Emacs use a relocating allocator for buffers? ${REL_ALLOC} | |
14922 | Should Emacs use mmap(2) for buffer allocation? $use_mmap_for_buffers | |
14923 | What window system should Emacs use? ${window_system} | |
14924 | What toolkit should Emacs use? ${USE_X_TOOLKIT}" | |
14925 | ||
14926 | if test -n "${x_includes}"; then | |
14927 | echo " Where do we find X Windows header files? ${x_includes}" | |
14928 | else | |
14929 | echo " Where do we find X Windows header files? Standard dirs" | |
14930 | fi | |
14931 | if test -n "${x_libraries}"; then | |
14932 | echo " Where do we find X Windows libraries? ${x_libraries}" | |
14933 | else | |
14934 | echo " Where do we find X Windows libraries? Standard dirs" | |
14935 | fi | |
14936 | ||
14937 | echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}" | |
14938 | echo " Does Emacs use -lXpm? ${HAVE_XPM}" | |
14939 | echo " Does Emacs use -ljpeg? ${HAVE_JPEG}" | |
14940 | echo " Does Emacs use -ltiff? ${HAVE_TIFF}" | |
14941 | echo " Does Emacs use a gif library? ${HAVE_GIF} $LIBGIF" | |
14942 | echo " Does Emacs use -lpng? ${HAVE_PNG}" | |
14943 | echo " Does Emacs use -lrsvg-2? ${HAVE_RSVG}" | |
14944 | echo " Does Emacs use imagemagick? ${HAVE_IMAGEMAGICK}" | |
14945 | ||
14946 | echo " Does Emacs use -lgpm? ${HAVE_GPM}" | |
14947 | echo " Does Emacs use -ldbus? ${HAVE_DBUS}" | |
14948 | echo " Does Emacs use -lgconf? ${HAVE_GCONF}" | |
14949 | echo " Does Emacs use -lselinux? ${HAVE_LIBSELINUX}" | |
14950 | echo " Does Emacs use -lgnutls? ${HAVE_GNUTLS}" | |
14951 | echo " Does Emacs use -lxml2? ${HAVE_LIBXML2}" | |
14952 | ||
14953 | echo " Does Emacs use -lfreetype? ${HAVE_FREETYPE}" | |
14954 | echo " Does Emacs use -lm17n-flt? ${HAVE_M17N_FLT}" | |
14955 | echo " Does Emacs use -lotf? ${HAVE_LIBOTF}" | |
14956 | echo " Does Emacs use -lxft? ${HAVE_XFT}" | |
14957 | ||
14958 | echo " Does Emacs use toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}" | |
14959 | echo | |
14960 | ||
14961 | if test $USE_XASSERTS = yes; then | |
14962 | echo " Compiling with asserts turned on." | |
14963 | CPPFLAGS="$CPPFLAGS -DXASSERTS=1" | |
14964 | fi | |
14965 | ||
14966 | echo | |
14967 | ||
14968 | if test "$HAVE_NS" = "yes"; then | |
14969 | echo | |
14970 | echo "You must run \"make install\" in order to test the built application. | |
14971 | The installed application will go to nextstep/Emacs.app and can be | |
14972 | run or moved from there." | |
14973 | if test "$EN_NS_SELF_CONTAINED" = "yes"; then | |
14974 | echo "The application will be fully self-contained." | |
14975 | else | |
14976 | echo "The lisp resources for the application will be installed under ${prefix}. | |
14977 | You may need to run \"make install\" with sudo. The application will fail | |
14978 | to run if these resources are not installed." | |
14979 | fi | |
14980 | echo | |
14981 | fi | |
14982 | ||
14983 | ||
14984 | # Remove any trailing slashes in these variables. | |
14985 | test "${prefix}" != NONE && | |
14986 | prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'` | |
14987 | test "${exec_prefix}" != NONE && | |
14988 | exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'` | |
14989 | ||
14990 | ac_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" | |
14991 | ||
14992 | ac_config_commands="$ac_config_commands default" | |
14993 | ||
14994 | cat >confcache <<\_ACEOF | |
14995 | # This file is a shell script that caches the results of configure | |
14996 | # tests run on this system so they can be shared between configure | |
14997 | # scripts and configure runs, see configure's option --config-cache. | |
14998 | # It is not useful on other systems. If it contains results you don't | |
14999 | # want to keep, you may remove or edit it. | |
15000 | # | |
15001 | # config.status only pays attention to the cache file if you give it | |
15002 | # the --recheck option to rerun configure. | |
15003 | # | |
15004 | # `ac_cv_env_foo' variables (set or unset) will be overridden when | |
15005 | # loading this file, other *unset* `ac_cv_foo' will be assigned the | |
15006 | # following values. | |
15007 | ||
15008 | _ACEOF | |
15009 | ||
15010 | # The following way of writing the cache mishandles newlines in values, | |
15011 | # but we know of no workaround that is simple, portable, and efficient. | |
15012 | # So, we kill variables containing newlines. | |
15013 | # Ultrix sh set writes to stderr and can't be redirected directly, | |
15014 | # and sets the high bit in the cache file unless we assign to the vars. | |
15015 | ( | |
15016 | for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do | |
15017 | eval ac_val=\$$ac_var | |
15018 | case $ac_val in #( | |
15019 | *${as_nl}*) | |
15020 | case $ac_var in #( | |
15021 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
15022 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
15023 | esac | |
15024 | case $ac_var in #( | |
15025 | _ | IFS | as_nl) ;; #( | |
15026 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
15027 | *) { eval $ac_var=; unset $ac_var;} ;; | |
15028 | esac ;; | |
15029 | esac | |
15030 | done | |
15031 | ||
15032 | (set) 2>&1 | | |
15033 | case $as_nl`(ac_space=' '; set) 2>&1` in #( | |
15034 | *${as_nl}ac_space=\ *) | |
15035 | # `set' does not quote correctly, so add quotes: double-quote | |
15036 | # substitution turns \\\\ into \\, and sed turns \\ into \. | |
15037 | sed -n \ | |
15038 | "s/'/'\\\\''/g; | |
15039 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" | |
15040 | ;; #( | |
15041 | *) | |
15042 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
15043 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" | |
15044 | ;; | |
15045 | esac | | |
15046 | sort | |
15047 | ) | | |
15048 | sed ' | |
15049 | /^ac_cv_env_/b end | |
15050 | t clear | |
15051 | :clear | |
15052 | s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ | |
15053 | t end | |
15054 | s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ | |
15055 | :end' >>confcache | |
15056 | if diff "$cache_file" confcache >/dev/null 2>&1; then :; else | |
15057 | if test -w "$cache_file"; then | |
d6a003a8 | 15058 | if test "x$cache_file" != "x/dev/null"; then |
067d23c9 KY |
15059 | { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 |
15060 | $as_echo "$as_me: updating cache $cache_file" >&6;} | |
d6a003a8 AS |
15061 | if test ! -f "$cache_file" || test -h "$cache_file"; then |
15062 | cat confcache >"$cache_file" | |
15063 | else | |
15064 | case $cache_file in #( | |
15065 | */* | ?:*) | |
15066 | mv -f confcache "$cache_file"$$ && | |
15067 | mv -f "$cache_file"$$ "$cache_file" ;; #( | |
15068 | *) | |
15069 | mv -f confcache "$cache_file" ;; | |
15070 | esac | |
15071 | fi | |
15072 | fi | |
067d23c9 KY |
15073 | else |
15074 | { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 | |
15075 | $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} | |
15076 | fi | |
15077 | fi | |
15078 | rm -f confcache | |
15079 | ||
15080 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
15081 | # Let make expand exec_prefix. | |
15082 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
15083 | ||
15084 | DEFS=-DHAVE_CONFIG_H | |
15085 | ||
15086 | ac_libobjs= | |
15087 | ac_ltlibobjs= | |
d6a003a8 | 15088 | U= |
067d23c9 KY |
15089 | for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue |
15090 | # 1. Remove the extension, and $U if already installed. | |
15091 | ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' | |
15092 | ac_i=`$as_echo "$ac_i" | sed "$ac_script"` | |
15093 | # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR | |
15094 | # will be set to the directory where LIBOBJS objects are built. | |
15095 | as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" | |
15096 | as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' | |
15097 | done | |
15098 | LIBOBJS=$ac_libobjs | |
15099 | ||
15100 | LTLIBOBJS=$ac_ltlibobjs | |
15101 | ||
15102 | ||
15103 | ||
15104 | ||
d6a003a8 | 15105 | : "${CONFIG_STATUS=./config.status}" |
067d23c9 KY |
15106 | ac_write_fail=0 |
15107 | ac_clean_files_save=$ac_clean_files | |
15108 | ac_clean_files="$ac_clean_files $CONFIG_STATUS" | |
15109 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 | |
15110 | $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} | |
15111 | as_write_fail=0 | |
15112 | cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 | |
15113 | #! $SHELL | |
15114 | # Generated by $as_me. | |
15115 | # Run this file to recreate the current configuration. | |
15116 | # Compiler output produced by configure, useful for debugging | |
15117 | # configure, is in config.log if it exists. | |
15118 | ||
15119 | debug=false | |
15120 | ac_cs_recheck=false | |
15121 | ac_cs_silent=false | |
15122 | ||
15123 | SHELL=\${CONFIG_SHELL-$SHELL} | |
15124 | export SHELL | |
15125 | _ASEOF | |
15126 | cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 | |
15127 | ## -------------------- ## | |
15128 | ## M4sh Initialization. ## | |
15129 | ## -------------------- ## | |
15130 | ||
15131 | # Be more Bourne compatible | |
15132 | DUALCASE=1; export DUALCASE # for MKS sh | |
15133 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : | |
15134 | emulate sh | |
15135 | NULLCMD=: | |
15136 | # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which | |
15137 | # is contrary to our usage. Disable this feature. | |
15138 | alias -g '${1+"$@"}'='"$@"' | |
15139 | setopt NO_GLOB_SUBST | |
15140 | else | |
15141 | case `(set -o) 2>/dev/null` in #( | |
15142 | *posix*) : | |
15143 | set -o posix ;; #( | |
15144 | *) : | |
15145 | ;; | |
15146 | esac | |
15147 | fi | |
15148 | ||
15149 | ||
15150 | as_nl=' | |
15151 | ' | |
15152 | export as_nl | |
15153 | # Printing a long string crashes Solaris 7 /usr/bin/printf. | |
15154 | as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' | |
15155 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo | |
15156 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo | |
15157 | # Prefer a ksh shell builtin over an external printf program on Solaris, | |
15158 | # but without wasting forks for bash or zsh. | |
15159 | if test -z "$BASH_VERSION$ZSH_VERSION" \ | |
15160 | && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then | |
15161 | as_echo='print -r --' | |
15162 | as_echo_n='print -rn --' | |
15163 | elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then | |
15164 | as_echo='printf %s\n' | |
15165 | as_echo_n='printf %s' | |
15166 | else | |
15167 | if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then | |
15168 | as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' | |
15169 | as_echo_n='/usr/ucb/echo -n' | |
15170 | else | |
15171 | as_echo_body='eval expr "X$1" : "X\\(.*\\)"' | |
15172 | as_echo_n_body='eval | |
15173 | arg=$1; | |
15174 | case $arg in #( | |
15175 | *"$as_nl"*) | |
15176 | expr "X$arg" : "X\\(.*\\)$as_nl"; | |
15177 | arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; | |
15178 | esac; | |
15179 | expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" | |
15180 | ' | |
15181 | export as_echo_n_body | |
15182 | as_echo_n='sh -c $as_echo_n_body as_echo' | |
15183 | fi | |
15184 | export as_echo_body | |
15185 | as_echo='sh -c $as_echo_body as_echo' | |
15186 | fi | |
15187 | ||
15188 | # The user is always right. | |
15189 | if test "${PATH_SEPARATOR+set}" != set; then | |
15190 | PATH_SEPARATOR=: | |
15191 | (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { | |
15192 | (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || | |
15193 | PATH_SEPARATOR=';' | |
15194 | } | |
15195 | fi | |
15196 | ||
15197 | ||
15198 | # IFS | |
15199 | # We need space, tab and new line, in precisely that order. Quoting is | |
15200 | # there to prevent editors from complaining about space-tab. | |
15201 | # (If _AS_PATH_WALK were called with IFS unset, it would disable word | |
15202 | # splitting by setting IFS to empty value.) | |
15203 | IFS=" "" $as_nl" | |
15204 | ||
15205 | # Find who we are. Look in the path if we contain no directory separator. | |
d6a003a8 | 15206 | as_myself= |
067d23c9 KY |
15207 | case $0 in #(( |
15208 | *[\\/]* ) as_myself=$0 ;; | |
15209 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
15210 | for as_dir in $PATH | |
15211 | do | |
15212 | IFS=$as_save_IFS | |
15213 | test -z "$as_dir" && as_dir=. | |
15214 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | |
15215 | done | |
15216 | IFS=$as_save_IFS | |
15217 | ||
15218 | ;; | |
15219 | esac | |
15220 | # We did not find ourselves, most probably we were run as `sh COMMAND' | |
15221 | # in which case we are not to be found in the path. | |
15222 | if test "x$as_myself" = x; then | |
15223 | as_myself=$0 | |
15224 | fi | |
15225 | if test ! -f "$as_myself"; then | |
15226 | $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 | |
15227 | exit 1 | |
15228 | fi | |
15229 | ||
15230 | # Unset variables that we do not need and which cause bugs (e.g. in | |
15231 | # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" | |
15232 | # suppresses any "Segmentation fault" message there. '((' could | |
15233 | # trigger a bug in pdksh 5.2.14. | |
15234 | for as_var in BASH_ENV ENV MAIL MAILPATH | |
15235 | do eval test x\${$as_var+set} = xset \ | |
15236 | && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : | |
15237 | done | |
15238 | PS1='$ ' | |
15239 | PS2='> ' | |
15240 | PS4='+ ' | |
15241 | ||
15242 | # NLS nuisances. | |
15243 | LC_ALL=C | |
15244 | export LC_ALL | |
15245 | LANGUAGE=C | |
15246 | export LANGUAGE | |
15247 | ||
15248 | # CDPATH. | |
15249 | (unset CDPATH) >/dev/null 2>&1 && unset CDPATH | |
15250 | ||
15251 | ||
d6a003a8 AS |
15252 | # as_fn_error STATUS ERROR [LINENO LOG_FD] |
15253 | # ---------------------------------------- | |
067d23c9 KY |
15254 | # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are |
15255 | # provided, also output the error to LOG_FD, referencing LINENO. Then exit the | |
d6a003a8 | 15256 | # script with STATUS, using 1 if that was 0. |
067d23c9 KY |
15257 | as_fn_error () |
15258 | { | |
d6a003a8 AS |
15259 | as_status=$1; test $as_status -eq 0 && as_status=1 |
15260 | if test "$4"; then | |
15261 | as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
15262 | $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 | |
067d23c9 | 15263 | fi |
d6a003a8 | 15264 | $as_echo "$as_me: error: $2" >&2 |
067d23c9 KY |
15265 | as_fn_exit $as_status |
15266 | } # as_fn_error | |
15267 | ||
15268 | ||
15269 | # as_fn_set_status STATUS | |
15270 | # ----------------------- | |
15271 | # Set $? to STATUS, without forking. | |
15272 | as_fn_set_status () | |
15273 | { | |
15274 | return $1 | |
15275 | } # as_fn_set_status | |
15276 | ||
15277 | # as_fn_exit STATUS | |
15278 | # ----------------- | |
15279 | # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. | |
15280 | as_fn_exit () | |
15281 | { | |
15282 | set +e | |
15283 | as_fn_set_status $1 | |
15284 | exit $1 | |
15285 | } # as_fn_exit | |
15286 | ||
15287 | # as_fn_unset VAR | |
15288 | # --------------- | |
15289 | # Portably unset VAR. | |
15290 | as_fn_unset () | |
15291 | { | |
15292 | { eval $1=; unset $1;} | |
15293 | } | |
15294 | as_unset=as_fn_unset | |
15295 | # as_fn_append VAR VALUE | |
15296 | # ---------------------- | |
15297 | # Append the text in VALUE to the end of the definition contained in VAR. Take | |
15298 | # advantage of any shell optimizations that allow amortized linear growth over | |
15299 | # repeated appends, instead of the typical quadratic growth present in naive | |
15300 | # implementations. | |
15301 | if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : | |
15302 | eval 'as_fn_append () | |
15303 | { | |
15304 | eval $1+=\$2 | |
15305 | }' | |
15306 | else | |
15307 | as_fn_append () | |
15308 | { | |
15309 | eval $1=\$$1\$2 | |
15310 | } | |
15311 | fi # as_fn_append | |
15312 | ||
15313 | # as_fn_arith ARG... | |
15314 | # ------------------ | |
15315 | # Perform arithmetic evaluation on the ARGs, and store the result in the | |
15316 | # global $as_val. Take advantage of shells that can avoid forks. The arguments | |
15317 | # must be portable across $(()) and expr. | |
15318 | if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : | |
15319 | eval 'as_fn_arith () | |
15320 | { | |
15321 | as_val=$(( $* )) | |
15322 | }' | |
15323 | else | |
15324 | as_fn_arith () | |
15325 | { | |
15326 | as_val=`expr "$@" || test $? -eq 1` | |
15327 | } | |
15328 | fi # as_fn_arith | |
15329 | ||
15330 | ||
15331 | if expr a : '\(a\)' >/dev/null 2>&1 && | |
15332 | test "X`expr 00001 : '.*\(...\)'`" = X001; then | |
15333 | as_expr=expr | |
15334 | else | |
15335 | as_expr=false | |
15336 | fi | |
15337 | ||
15338 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then | |
15339 | as_basename=basename | |
15340 | else | |
15341 | as_basename=false | |
15342 | fi | |
15343 | ||
15344 | if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then | |
15345 | as_dirname=dirname | |
15346 | else | |
15347 | as_dirname=false | |
15348 | fi | |
15349 | ||
15350 | as_me=`$as_basename -- "$0" || | |
15351 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ | |
15352 | X"$0" : 'X\(//\)$' \| \ | |
15353 | X"$0" : 'X\(/\)' \| . 2>/dev/null || | |
15354 | $as_echo X/"$0" | | |
15355 | sed '/^.*\/\([^/][^/]*\)\/*$/{ | |
15356 | s//\1/ | |
15357 | q | |
15358 | } | |
15359 | /^X\/\(\/\/\)$/{ | |
15360 | s//\1/ | |
15361 | q | |
15362 | } | |
15363 | /^X\/\(\/\).*/{ | |
15364 | s//\1/ | |
15365 | q | |
15366 | } | |
15367 | s/.*/./; q'` | |
15368 | ||
15369 | # Avoid depending upon Character Ranges. | |
15370 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
15371 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
15372 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
15373 | as_cr_digits='0123456789' | |
15374 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
15375 | ||
15376 | ECHO_C= ECHO_N= ECHO_T= | |
15377 | case `echo -n x` in #((((( | |
15378 | -n*) | |
15379 | case `echo 'xy\c'` in | |
15380 | *c*) ECHO_T=' ';; # ECHO_T is single tab character. | |
15381 | xy) ECHO_C='\c';; | |
15382 | *) echo `echo ksh88 bug on AIX 6.1` > /dev/null | |
15383 | ECHO_T=' ';; | |
15384 | esac;; | |
15385 | *) | |
15386 | ECHO_N='-n';; | |
15387 | esac | |
15388 | ||
15389 | rm -f conf$$ conf$$.exe conf$$.file | |
15390 | if test -d conf$$.dir; then | |
15391 | rm -f conf$$.dir/conf$$.file | |
15392 | else | |
15393 | rm -f conf$$.dir | |
15394 | mkdir conf$$.dir 2>/dev/null | |
15395 | fi | |
15396 | if (echo >conf$$.file) 2>/dev/null; then | |
15397 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
15398 | as_ln_s='ln -s' | |
15399 | # ... but there are two gotchas: | |
15400 | # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. | |
15401 | # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. | |
15402 | # In both cases, we have to default to `cp -p'. | |
15403 | ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || | |
15404 | as_ln_s='cp -p' | |
15405 | elif ln conf$$.file conf$$ 2>/dev/null; then | |
15406 | as_ln_s=ln | |
15407 | else | |
15408 | as_ln_s='cp -p' | |
15409 | fi | |
15410 | else | |
15411 | as_ln_s='cp -p' | |
15412 | fi | |
15413 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file | |
15414 | rmdir conf$$.dir 2>/dev/null | |
15415 | ||
15416 | ||
15417 | # as_fn_mkdir_p | |
15418 | # ------------- | |
15419 | # Create "$as_dir" as a directory, including parents if necessary. | |
15420 | as_fn_mkdir_p () | |
15421 | { | |
15422 | ||
15423 | case $as_dir in #( | |
15424 | -*) as_dir=./$as_dir;; | |
15425 | esac | |
15426 | test -d "$as_dir" || eval $as_mkdir_p || { | |
15427 | as_dirs= | |
15428 | while :; do | |
15429 | case $as_dir in #( | |
15430 | *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( | |
15431 | *) as_qdir=$as_dir;; | |
15432 | esac | |
15433 | as_dirs="'$as_qdir' $as_dirs" | |
15434 | as_dir=`$as_dirname -- "$as_dir" || | |
15435 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
15436 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
15437 | X"$as_dir" : 'X\(//\)$' \| \ | |
15438 | X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || | |
15439 | $as_echo X"$as_dir" | | |
15440 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
15441 | s//\1/ | |
15442 | q | |
15443 | } | |
15444 | /^X\(\/\/\)[^/].*/{ | |
15445 | s//\1/ | |
15446 | q | |
15447 | } | |
15448 | /^X\(\/\/\)$/{ | |
15449 | s//\1/ | |
15450 | q | |
15451 | } | |
15452 | /^X\(\/\).*/{ | |
15453 | s//\1/ | |
15454 | q | |
15455 | } | |
15456 | s/.*/./; q'` | |
15457 | test -d "$as_dir" && break | |
15458 | done | |
15459 | test -z "$as_dirs" || eval "mkdir $as_dirs" | |
d6a003a8 | 15460 | } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" |
067d23c9 KY |
15461 | |
15462 | ||
15463 | } # as_fn_mkdir_p | |
15464 | if mkdir -p . 2>/dev/null; then | |
15465 | as_mkdir_p='mkdir -p "$as_dir"' | |
15466 | else | |
15467 | test -d ./-p && rmdir ./-p | |
15468 | as_mkdir_p=false | |
15469 | fi | |
15470 | ||
15471 | if test -x / >/dev/null 2>&1; then | |
15472 | as_test_x='test -x' | |
15473 | else | |
15474 | if ls -dL / >/dev/null 2>&1; then | |
15475 | as_ls_L_option=L | |
15476 | else | |
15477 | as_ls_L_option= | |
15478 | fi | |
15479 | as_test_x=' | |
15480 | eval sh -c '\'' | |
15481 | if test -d "$1"; then | |
15482 | test -d "$1/."; | |
15483 | else | |
15484 | case $1 in #( | |
15485 | -*)set "./$1";; | |
15486 | esac; | |
15487 | case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( | |
15488 | ???[sx]*):;;*)false;;esac;fi | |
15489 | '\'' sh | |
15490 | ' | |
15491 | fi | |
15492 | as_executable_p=$as_test_x | |
15493 | ||
15494 | # Sed expression to map a string onto a valid CPP name. | |
15495 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" | |
15496 | ||
15497 | # Sed expression to map a string onto a valid variable name. | |
15498 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" | |
15499 | ||
15500 | ||
15501 | exec 6>&1 | |
15502 | ## ----------------------------------- ## | |
15503 | ## Main body of $CONFIG_STATUS script. ## | |
15504 | ## ----------------------------------- ## | |
15505 | _ASEOF | |
15506 | test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 | |
15507 | ||
15508 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
15509 | # Save the log message, to keep $0 and so on meaningful, and to | |
15510 | # report actual input values of CONFIG_FILES etc. instead of their | |
15511 | # values after options handling. | |
15512 | ac_log=" | |
15513 | This file was extended by emacs $as_me 24.0.50, which was | |
d6a003a8 | 15514 | generated by GNU Autoconf 2.68. Invocation command line was |
067d23c9 KY |
15515 | |
15516 | CONFIG_FILES = $CONFIG_FILES | |
15517 | CONFIG_HEADERS = $CONFIG_HEADERS | |
15518 | CONFIG_LINKS = $CONFIG_LINKS | |
15519 | CONFIG_COMMANDS = $CONFIG_COMMANDS | |
15520 | $ $0 $@ | |
15521 | ||
15522 | on `(hostname || uname -n) 2>/dev/null | sed 1q` | |
15523 | " | |
15524 | ||
15525 | _ACEOF | |
15526 | ||
15527 | case $ac_config_files in *" | |
15528 | "*) set x $ac_config_files; shift; ac_config_files=$*;; | |
15529 | esac | |
15530 | ||
15531 | case $ac_config_headers in *" | |
15532 | "*) set x $ac_config_headers; shift; ac_config_headers=$*;; | |
15533 | esac | |
15534 | ||
15535 | ||
15536 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
15537 | # Files that config.status was made for. | |
15538 | config_files="$ac_config_files" | |
15539 | config_headers="$ac_config_headers" | |
15540 | config_commands="$ac_config_commands" | |
15541 | ||
15542 | _ACEOF | |
15543 | ||
15544 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
15545 | ac_cs_usage="\ | |
15546 | \`$as_me' instantiates files and other configuration actions | |
15547 | from templates according to the current configuration. Unless the files | |
15548 | and actions are specified as TAGs, all are instantiated by default. | |
15549 | ||
15550 | Usage: $0 [OPTION]... [TAG]... | |
15551 | ||
15552 | -h, --help print this help, then exit | |
15553 | -V, --version print version number and configuration settings, then exit | |
15554 | --config print configuration, then exit | |
15555 | -q, --quiet, --silent | |
15556 | do not print progress messages | |
15557 | -d, --debug don't remove temporary files | |
15558 | --recheck update $as_me by reconfiguring in the same conditions | |
15559 | --file=FILE[:TEMPLATE] | |
15560 | instantiate the configuration file FILE | |
15561 | --header=FILE[:TEMPLATE] | |
15562 | instantiate the configuration header FILE | |
15563 | ||
15564 | Configuration files: | |
15565 | $config_files | |
15566 | ||
15567 | Configuration headers: | |
15568 | $config_headers | |
15569 | ||
15570 | Configuration commands: | |
15571 | $config_commands | |
15572 | ||
15573 | Report bugs to the package provider." | |
15574 | ||
15575 | _ACEOF | |
15576 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
15577 | ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" | |
15578 | ac_cs_version="\\ | |
15579 | emacs config.status 24.0.50 | |
d6a003a8 | 15580 | configured by $0, generated by GNU Autoconf 2.68, |
067d23c9 KY |
15581 | with options \\"\$ac_cs_config\\" |
15582 | ||
d6a003a8 | 15583 | Copyright (C) 2010 Free Software Foundation, Inc. |
067d23c9 KY |
15584 | This config.status script is free software; the Free Software Foundation |
15585 | gives unlimited permission to copy, distribute and modify it." | |
15586 | ||
15587 | ac_pwd='$ac_pwd' | |
15588 | srcdir='$srcdir' | |
15589 | INSTALL='$INSTALL' | |
15590 | test -n "\$AWK" || AWK=awk | |
15591 | _ACEOF | |
15592 | ||
15593 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
15594 | # The default lists apply if the user does not specify any file. | |
15595 | ac_need_defaults=: | |
15596 | while test $# != 0 | |
15597 | do | |
15598 | case $1 in | |
d6a003a8 | 15599 | --*=?*) |
067d23c9 KY |
15600 | ac_option=`expr "X$1" : 'X\([^=]*\)='` |
15601 | ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` | |
15602 | ac_shift=: | |
15603 | ;; | |
d6a003a8 AS |
15604 | --*=) |
15605 | ac_option=`expr "X$1" : 'X\([^=]*\)='` | |
15606 | ac_optarg= | |
15607 | ac_shift=: | |
15608 | ;; | |
067d23c9 KY |
15609 | *) |
15610 | ac_option=$1 | |
15611 | ac_optarg=$2 | |
15612 | ac_shift=shift | |
15613 | ;; | |
15614 | esac | |
15615 | ||
15616 | case $ac_option in | |
15617 | # Handling of the options. | |
15618 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) | |
15619 | ac_cs_recheck=: ;; | |
15620 | --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) | |
15621 | $as_echo "$ac_cs_version"; exit ;; | |
15622 | --config | --confi | --conf | --con | --co | --c ) | |
15623 | $as_echo "$ac_cs_config"; exit ;; | |
15624 | --debug | --debu | --deb | --de | --d | -d ) | |
15625 | debug=: ;; | |
15626 | --file | --fil | --fi | --f ) | |
15627 | $ac_shift | |
15628 | case $ac_optarg in | |
15629 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
d6a003a8 | 15630 | '') as_fn_error $? "missing file argument" ;; |
067d23c9 KY |
15631 | esac |
15632 | as_fn_append CONFIG_FILES " '$ac_optarg'" | |
15633 | ac_need_defaults=false;; | |
15634 | --header | --heade | --head | --hea ) | |
15635 | $ac_shift | |
15636 | case $ac_optarg in | |
15637 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
15638 | esac | |
15639 | as_fn_append CONFIG_HEADERS " '$ac_optarg'" | |
15640 | ac_need_defaults=false;; | |
15641 | --he | --h) | |
15642 | # Conflict between --help and --header | |
d6a003a8 | 15643 | as_fn_error $? "ambiguous option: \`$1' |
067d23c9 KY |
15644 | Try \`$0 --help' for more information.";; |
15645 | --help | --hel | -h ) | |
15646 | $as_echo "$ac_cs_usage"; exit ;; | |
15647 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
15648 | | -silent | --silent | --silen | --sile | --sil | --si | --s) | |
15649 | ac_cs_silent=: ;; | |
15650 | ||
15651 | # This is an error. | |
d6a003a8 | 15652 | -*) as_fn_error $? "unrecognized option: \`$1' |
067d23c9 KY |
15653 | Try \`$0 --help' for more information." ;; |
15654 | ||
15655 | *) as_fn_append ac_config_targets " $1" | |
15656 | ac_need_defaults=false ;; | |
15657 | ||
15658 | esac | |
15659 | shift | |
15660 | done | |
15661 | ||
15662 | ac_configure_extra_args= | |
15663 | ||
15664 | if $ac_cs_silent; then | |
15665 | exec 6>/dev/null | |
15666 | ac_configure_extra_args="$ac_configure_extra_args --silent" | |
15667 | fi | |
15668 | ||
15669 | _ACEOF | |
15670 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
15671 | if \$ac_cs_recheck; then | |
15672 | set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion | |
15673 | shift | |
15674 | \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 | |
15675 | CONFIG_SHELL='$SHELL' | |
15676 | export CONFIG_SHELL | |
15677 | exec "\$@" | |
15678 | fi | |
15679 | ||
15680 | _ACEOF | |
15681 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
15682 | exec 5>>config.log | |
15683 | { | |
15684 | echo | |
15685 | sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX | |
15686 | ## Running $as_me. ## | |
15687 | _ASBOX | |
15688 | $as_echo "$ac_log" | |
15689 | } >&5 | |
15690 | ||
15691 | _ACEOF | |
15692 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
15693 | # | |
15694 | # INIT-COMMANDS | |
15695 | # | |
15696 | GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPPFLAGS="$CPPFLAGS" | |
15697 | ||
15698 | _ACEOF | |
15699 | ||
15700 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
15701 | ||
15702 | # Handling of arguments. | |
15703 | for ac_config_target in $ac_config_targets | |
15704 | do | |
15705 | case $ac_config_target in | |
15706 | "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:src/config.in" ;; | |
15707 | "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; | |
15708 | "lib-src/Makefile") CONFIG_FILES="$CONFIG_FILES lib-src/Makefile" ;; | |
15709 | "oldXMenu/Makefile") CONFIG_FILES="$CONFIG_FILES oldXMenu/Makefile" ;; | |
15710 | "doc/emacs/Makefile") CONFIG_FILES="$CONFIG_FILES doc/emacs/Makefile" ;; | |
15711 | "doc/misc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/misc/Makefile" ;; | |
15712 | "doc/lispintro/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispintro/Makefile" ;; | |
15713 | "doc/lispref/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispref/Makefile" ;; | |
15714 | "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; | |
15715 | "lwlib/Makefile") CONFIG_FILES="$CONFIG_FILES lwlib/Makefile" ;; | |
15716 | "lisp/Makefile") CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;; | |
15717 | "leim/Makefile") CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;; | |
15718 | "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; | |
15719 | ||
d6a003a8 | 15720 | *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; |
067d23c9 KY |
15721 | esac |
15722 | done | |
15723 | ||
15724 | ||
15725 | # If the user did not use the arguments to specify the items to instantiate, | |
15726 | # then the envvar interface is used. Set only those that are not. | |
15727 | # We use the long form for the default assignment because of an extremely | |
15728 | # bizarre bug on SunOS 4.1.3. | |
15729 | if $ac_need_defaults; then | |
15730 | test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files | |
15731 | test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers | |
15732 | test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands | |
15733 | fi | |
15734 | ||
15735 | # Have a temporary directory for convenience. Make it in the build tree | |
15736 | # simply because there is no reason against having it here, and in addition, | |
15737 | # creating and moving files from /tmp can sometimes cause problems. | |
15738 | # Hook for its removal unless debugging. | |
15739 | # Note that there is a small window in which the directory will not be cleaned: | |
15740 | # after its creation but before its name has been assigned to `$tmp'. | |
15741 | $debug || | |
15742 | { | |
d6a003a8 | 15743 | tmp= ac_tmp= |
067d23c9 | 15744 | trap 'exit_status=$? |
d6a003a8 AS |
15745 | : "${ac_tmp:=$tmp}" |
15746 | { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status | |
067d23c9 KY |
15747 | ' 0 |
15748 | trap 'as_fn_exit 1' 1 2 13 15 | |
15749 | } | |
15750 | # Create a (secure) tmp directory for tmp files. | |
15751 | ||
15752 | { | |
15753 | tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && | |
d6a003a8 | 15754 | test -d "$tmp" |
067d23c9 KY |
15755 | } || |
15756 | { | |
15757 | tmp=./conf$$-$RANDOM | |
15758 | (umask 077 && mkdir "$tmp") | |
d6a003a8 AS |
15759 | } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 |
15760 | ac_tmp=$tmp | |
067d23c9 KY |
15761 | |
15762 | # Set up the scripts for CONFIG_FILES section. | |
15763 | # No need to generate them if there are no CONFIG_FILES. | |
15764 | # This happens for instance with `./config.status config.h'. | |
15765 | if test -n "$CONFIG_FILES"; then | |
15766 | ||
15767 | if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then | |
15768 | ac_cs_awk_getline=: | |
15769 | ac_cs_awk_pipe_init= | |
15770 | ac_cs_awk_read_file=' | |
15771 | while ((getline aline < (F[key])) > 0) | |
15772 | print(aline) | |
15773 | close(F[key])' | |
15774 | ac_cs_awk_pipe_fini= | |
15775 | else | |
15776 | ac_cs_awk_getline=false | |
15777 | ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\"" | |
15778 | ac_cs_awk_read_file=' | |
15779 | print "|#_!!_#|" | |
15780 | print "cat " F[key] " &&" | |
15781 | '$ac_cs_awk_pipe_init | |
15782 | # The final `:' finishes the AND list. | |
15783 | ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }' | |
15784 | fi | |
15785 | ac_cr=`echo X | tr X '\015'` | |
15786 | # On cygwin, bash can eat \r inside `` if the user requested igncr. | |
15787 | # But we know of no other shell where ac_cr would be empty at this | |
15788 | # point, so we can use a bashism as a fallback. | |
15789 | if test "x$ac_cr" = x; then | |
15790 | eval ac_cr=\$\'\\r\' | |
15791 | fi | |
15792 | ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` | |
15793 | if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then | |
d6a003a8 | 15794 | ac_cs_awk_cr='\\r' |
067d23c9 KY |
15795 | else |
15796 | ac_cs_awk_cr=$ac_cr | |
15797 | fi | |
15798 | ||
d6a003a8 | 15799 | echo 'BEGIN {' >"$ac_tmp/subs1.awk" && |
067d23c9 KY |
15800 | _ACEOF |
15801 | ||
15802 | # Create commands to substitute file output variables. | |
15803 | { | |
15804 | echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" && | |
d6a003a8 | 15805 | echo 'cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&' && |
067d23c9 KY |
15806 | echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' && |
15807 | echo "_ACAWK" && | |
15808 | echo "_ACEOF" | |
15809 | } >conf$$files.sh && | |
15810 | . ./conf$$files.sh || | |
d6a003a8 | 15811 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 |
067d23c9 KY |
15812 | rm -f conf$$files.sh |
15813 | ||
15814 | { | |
15815 | echo "cat >conf$$subs.awk <<_ACEOF" && | |
15816 | echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && | |
15817 | echo "_ACEOF" | |
15818 | } >conf$$subs.sh || | |
d6a003a8 AS |
15819 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 |
15820 | ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` | |
067d23c9 KY |
15821 | ac_delim='%!_!# ' |
15822 | for ac_last_try in false false false false false :; do | |
15823 | . ./conf$$subs.sh || | |
d6a003a8 | 15824 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 |
067d23c9 KY |
15825 | |
15826 | ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` | |
15827 | if test $ac_delim_n = $ac_delim_num; then | |
15828 | break | |
15829 | elif $ac_last_try; then | |
d6a003a8 | 15830 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 |
067d23c9 KY |
15831 | else |
15832 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
15833 | fi | |
15834 | done | |
15835 | rm -f conf$$subs.sh | |
15836 | ||
15837 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
d6a003a8 | 15838 | cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && |
067d23c9 KY |
15839 | _ACEOF |
15840 | sed -n ' | |
15841 | h | |
15842 | s/^/S["/; s/!.*/"]=/ | |
15843 | p | |
15844 | g | |
15845 | s/^[^!]*!// | |
15846 | :repl | |
15847 | t repl | |
15848 | s/'"$ac_delim"'$// | |
15849 | t delim | |
15850 | :nl | |
15851 | h | |
15852 | s/\(.\{148\}\)..*/\1/ | |
15853 | t more1 | |
15854 | s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ | |
15855 | p | |
15856 | n | |
15857 | b repl | |
15858 | :more1 | |
15859 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
15860 | p | |
15861 | g | |
15862 | s/.\{148\}// | |
15863 | t nl | |
15864 | :delim | |
15865 | h | |
15866 | s/\(.\{148\}\)..*/\1/ | |
15867 | t more2 | |
15868 | s/["\\]/\\&/g; s/^/"/; s/$/"/ | |
15869 | p | |
15870 | b | |
15871 | :more2 | |
15872 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
15873 | p | |
15874 | g | |
15875 | s/.\{148\}// | |
15876 | t delim | |
15877 | ' <conf$$subs.awk | sed ' | |
15878 | /^[^""]/{ | |
15879 | N | |
15880 | s/\n// | |
15881 | } | |
15882 | ' >>$CONFIG_STATUS || ac_write_fail=1 | |
15883 | rm -f conf$$subs.awk | |
15884 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
15885 | _ACAWK | |
d6a003a8 | 15886 | cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && |
067d23c9 KY |
15887 | for (key in S) S_is_set[key] = 1 |
15888 | FS = "\a" | |
15889 | \$ac_cs_awk_pipe_init | |
15890 | } | |
15891 | { | |
15892 | line = $ 0 | |
15893 | nfields = split(line, field, "@") | |
15894 | substed = 0 | |
15895 | len = length(field[1]) | |
15896 | for (i = 2; i < nfields; i++) { | |
15897 | key = field[i] | |
15898 | keylen = length(key) | |
15899 | if (S_is_set[key]) { | |
15900 | value = S[key] | |
15901 | line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) | |
15902 | len += length(value) + length(field[++i]) | |
15903 | substed = 1 | |
15904 | } else | |
15905 | len += 1 + keylen | |
15906 | } | |
15907 | if (nfields == 3 && !substed) { | |
15908 | key = field[2] | |
15909 | if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) { | |
15910 | \$ac_cs_awk_read_file | |
15911 | next | |
15912 | } | |
15913 | } | |
15914 | print line | |
15915 | } | |
15916 | \$ac_cs_awk_pipe_fini | |
15917 | _ACAWK | |
15918 | _ACEOF | |
15919 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
15920 | if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then | |
15921 | sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" | |
15922 | else | |
15923 | cat | |
d6a003a8 AS |
15924 | fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ |
15925 | || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 | |
067d23c9 KY |
15926 | _ACEOF |
15927 | ||
d6a003a8 AS |
15928 | # VPATH may cause trouble with some makes, so we remove sole $(srcdir), |
15929 | # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and | |
067d23c9 KY |
15930 | # trailing colons and then remove the whole line if VPATH becomes empty |
15931 | # (actually we leave an empty line to preserve line numbers). | |
15932 | if test "x$srcdir" = x.; then | |
d6a003a8 AS |
15933 | ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ |
15934 | h | |
15935 | s/// | |
15936 | s/^/:/ | |
15937 | s/[ ]*$/:/ | |
15938 | s/:\$(srcdir):/:/g | |
15939 | s/:\${srcdir}:/:/g | |
15940 | s/:@srcdir@:/:/g | |
15941 | s/^:*// | |
067d23c9 | 15942 | s/:*$// |
d6a003a8 AS |
15943 | x |
15944 | s/\(=[ ]*\).*/\1/ | |
15945 | G | |
15946 | s/\n// | |
067d23c9 KY |
15947 | s/^[^=]*=[ ]*$// |
15948 | }' | |
15949 | fi | |
15950 | ||
15951 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
15952 | fi # test -n "$CONFIG_FILES" | |
15953 | ||
15954 | # Set up the scripts for CONFIG_HEADERS section. | |
15955 | # No need to generate them if there are no CONFIG_HEADERS. | |
15956 | # This happens for instance with `./config.status Makefile'. | |
15957 | if test -n "$CONFIG_HEADERS"; then | |
d6a003a8 | 15958 | cat >"$ac_tmp/defines.awk" <<\_ACAWK || |
067d23c9 KY |
15959 | BEGIN { |
15960 | _ACEOF | |
15961 | ||
15962 | # Transform confdefs.h into an awk script `defines.awk', embedded as | |
15963 | # here-document in config.status, that substitutes the proper values into | |
15964 | # config.h.in to produce config.h. | |
15965 | ||
15966 | # Create a delimiter string that does not exist in confdefs.h, to ease | |
15967 | # handling of long lines. | |
15968 | ac_delim='%!_!# ' | |
15969 | for ac_last_try in false false :; do | |
d6a003a8 AS |
15970 | ac_tt=`sed -n "/$ac_delim/p" confdefs.h` |
15971 | if test -z "$ac_tt"; then | |
067d23c9 KY |
15972 | break |
15973 | elif $ac_last_try; then | |
d6a003a8 | 15974 | as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 |
067d23c9 KY |
15975 | else |
15976 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
15977 | fi | |
15978 | done | |
15979 | ||
15980 | # For the awk script, D is an array of macro values keyed by name, | |
15981 | # likewise P contains macro parameters if any. Preserve backslash | |
15982 | # newline sequences. | |
15983 | ||
15984 | ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* | |
15985 | sed -n ' | |
15986 | s/.\{148\}/&'"$ac_delim"'/g | |
15987 | t rset | |
15988 | :rset | |
15989 | s/^[ ]*#[ ]*define[ ][ ]*/ / | |
15990 | t def | |
15991 | d | |
15992 | :def | |
15993 | s/\\$// | |
15994 | t bsnl | |
15995 | s/["\\]/\\&/g | |
15996 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
15997 | D["\1"]=" \3"/p | |
15998 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p | |
15999 | d | |
16000 | :bsnl | |
16001 | s/["\\]/\\&/g | |
16002 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
16003 | D["\1"]=" \3\\\\\\n"\\/p | |
16004 | t cont | |
16005 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p | |
16006 | t cont | |
16007 | d | |
16008 | :cont | |
16009 | n | |
16010 | s/.\{148\}/&'"$ac_delim"'/g | |
16011 | t clear | |
16012 | :clear | |
16013 | s/\\$// | |
16014 | t bsnlc | |
16015 | s/["\\]/\\&/g; s/^/"/; s/$/"/p | |
16016 | d | |
16017 | :bsnlc | |
16018 | s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p | |
16019 | b cont | |
16020 | ' <confdefs.h | sed ' | |
16021 | s/'"$ac_delim"'/"\\\ | |
16022 | "/g' >>$CONFIG_STATUS || ac_write_fail=1 | |
16023 | ||
16024 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
16025 | for (key in D) D_is_set[key] = 1 | |
16026 | FS = "\a" | |
16027 | } | |
16028 | /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { | |
16029 | line = \$ 0 | |
16030 | split(line, arg, " ") | |
16031 | if (arg[1] == "#") { | |
16032 | defundef = arg[2] | |
16033 | mac1 = arg[3] | |
16034 | } else { | |
16035 | defundef = substr(arg[1], 2) | |
16036 | mac1 = arg[2] | |
16037 | } | |
16038 | split(mac1, mac2, "(") #) | |
16039 | macro = mac2[1] | |
16040 | prefix = substr(line, 1, index(line, defundef) - 1) | |
16041 | if (D_is_set[macro]) { | |
16042 | # Preserve the white space surrounding the "#". | |
16043 | print prefix "define", macro P[macro] D[macro] | |
16044 | next | |
16045 | } else { | |
16046 | # Replace #undef with comments. This is necessary, for example, | |
16047 | # in the case of _POSIX_SOURCE, which is predefined and required | |
16048 | # on some systems where configure will not decide to define it. | |
16049 | if (defundef == "undef") { | |
16050 | print "/*", prefix defundef, macro, "*/" | |
16051 | next | |
16052 | } | |
16053 | } | |
16054 | } | |
16055 | { print } | |
16056 | _ACAWK | |
16057 | _ACEOF | |
16058 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
d6a003a8 | 16059 | as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 |
067d23c9 KY |
16060 | fi # test -n "$CONFIG_HEADERS" |
16061 | ||
16062 | ||
16063 | eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" | |
16064 | shift | |
16065 | for ac_tag | |
16066 | do | |
16067 | case $ac_tag in | |
16068 | :[FHLC]) ac_mode=$ac_tag; continue;; | |
16069 | esac | |
16070 | case $ac_mode$ac_tag in | |
16071 | :[FHL]*:*);; | |
d6a003a8 | 16072 | :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; |
067d23c9 KY |
16073 | :[FH]-) ac_tag=-:-;; |
16074 | :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; | |
16075 | esac | |
16076 | ac_save_IFS=$IFS | |
16077 | IFS=: | |
16078 | set x $ac_tag | |
16079 | IFS=$ac_save_IFS | |
16080 | shift | |
16081 | ac_file=$1 | |
16082 | shift | |
16083 | ||
16084 | case $ac_mode in | |
16085 | :L) ac_source=$1;; | |
16086 | :[FH]) | |
16087 | ac_file_inputs= | |
16088 | for ac_f | |
16089 | do | |
16090 | case $ac_f in | |
d6a003a8 | 16091 | -) ac_f="$ac_tmp/stdin";; |
067d23c9 KY |
16092 | *) # Look for the file first in the build tree, then in the source tree |
16093 | # (if the path is not absolute). The absolute path cannot be DOS-style, | |
16094 | # because $ac_f cannot contain `:'. | |
16095 | test -f "$ac_f" || | |
16096 | case $ac_f in | |
16097 | [\\/$]*) false;; | |
16098 | *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; | |
16099 | esac || | |
d6a003a8 | 16100 | as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; |
067d23c9 KY |
16101 | esac |
16102 | case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac | |
16103 | as_fn_append ac_file_inputs " '$ac_f'" | |
16104 | done | |
16105 | ||
16106 | # Let's still pretend it is `configure' which instantiates (i.e., don't | |
16107 | # use $as_me), people would be surprised to read: | |
16108 | # /* config.h. Generated by config.status. */ | |
16109 | configure_input='Generated from '` | |
16110 | $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' | |
16111 | `' by configure.' | |
16112 | if test x"$ac_file" != x-; then | |
16113 | configure_input="$ac_file. $configure_input" | |
16114 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 | |
16115 | $as_echo "$as_me: creating $ac_file" >&6;} | |
16116 | fi | |
16117 | # Neutralize special characters interpreted by sed in replacement strings. | |
16118 | case $configure_input in #( | |
16119 | *\&* | *\|* | *\\* ) | |
16120 | ac_sed_conf_input=`$as_echo "$configure_input" | | |
16121 | sed 's/[\\\\&|]/\\\\&/g'`;; #( | |
16122 | *) ac_sed_conf_input=$configure_input;; | |
16123 | esac | |
16124 | ||
16125 | case $ac_tag in | |
d6a003a8 AS |
16126 | *:-:* | *:-) cat >"$ac_tmp/stdin" \ |
16127 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; | |
067d23c9 KY |
16128 | esac |
16129 | ;; | |
16130 | esac | |
16131 | ||
16132 | ac_dir=`$as_dirname -- "$ac_file" || | |
16133 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
16134 | X"$ac_file" : 'X\(//\)[^/]' \| \ | |
16135 | X"$ac_file" : 'X\(//\)$' \| \ | |
16136 | X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || | |
16137 | $as_echo X"$ac_file" | | |
16138 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
16139 | s//\1/ | |
16140 | q | |
16141 | } | |
16142 | /^X\(\/\/\)[^/].*/{ | |
16143 | s//\1/ | |
16144 | q | |
16145 | } | |
16146 | /^X\(\/\/\)$/{ | |
16147 | s//\1/ | |
16148 | q | |
16149 | } | |
16150 | /^X\(\/\).*/{ | |
16151 | s//\1/ | |
16152 | q | |
16153 | } | |
16154 | s/.*/./; q'` | |
16155 | as_dir="$ac_dir"; as_fn_mkdir_p | |
16156 | ac_builddir=. | |
16157 | ||
16158 | case "$ac_dir" in | |
16159 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
16160 | *) | |
16161 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
16162 | # A ".." for each directory in $ac_dir_suffix. | |
16163 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
16164 | case $ac_top_builddir_sub in | |
16165 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
16166 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
16167 | esac ;; | |
16168 | esac | |
16169 | ac_abs_top_builddir=$ac_pwd | |
16170 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
16171 | # for backward compatibility: | |
16172 | ac_top_builddir=$ac_top_build_prefix | |
16173 | ||
16174 | case $srcdir in | |
16175 | .) # We are building in place. | |
16176 | ac_srcdir=. | |
16177 | ac_top_srcdir=$ac_top_builddir_sub | |
16178 | ac_abs_top_srcdir=$ac_pwd ;; | |
16179 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
16180 | ac_srcdir=$srcdir$ac_dir_suffix; | |
16181 | ac_top_srcdir=$srcdir | |
16182 | ac_abs_top_srcdir=$srcdir ;; | |
16183 | *) # Relative name. | |
16184 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
16185 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
16186 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
16187 | esac | |
16188 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix | |
16189 | ||
16190 | ||
16191 | case $ac_mode in | |
16192 | :F) | |
16193 | # | |
16194 | # CONFIG_FILE | |
16195 | # | |
16196 | ||
16197 | case $INSTALL in | |
16198 | [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; | |
16199 | *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; | |
16200 | esac | |
16201 | _ACEOF | |
16202 | ||
16203 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
16204 | # If the template does not know about datarootdir, expand it. | |
16205 | # FIXME: This hack should be removed a few years after 2.60. | |
16206 | ac_datarootdir_hack=; ac_datarootdir_seen= | |
16207 | ac_sed_dataroot=' | |
16208 | /datarootdir/ { | |
16209 | p | |
16210 | q | |
16211 | } | |
16212 | /@datadir@/p | |
16213 | /@docdir@/p | |
16214 | /@infodir@/p | |
16215 | /@localedir@/p | |
16216 | /@mandir@/p' | |
16217 | case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in | |
16218 | *datarootdir*) ac_datarootdir_seen=yes;; | |
16219 | *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) | |
16220 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 | |
16221 | $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} | |
16222 | _ACEOF | |
16223 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
16224 | ac_datarootdir_hack=' | |
16225 | s&@datadir@&$datadir&g | |
16226 | s&@docdir@&$docdir&g | |
16227 | s&@infodir@&$infodir&g | |
16228 | s&@localedir@&$localedir&g | |
16229 | s&@mandir@&$mandir&g | |
16230 | s&\\\${datarootdir}&$datarootdir&g' ;; | |
16231 | esac | |
16232 | _ACEOF | |
16233 | ||
16234 | # Neutralize VPATH when `$srcdir' = `.'. | |
16235 | # Shell code in configure.ac might set extrasub. | |
16236 | # FIXME: do we really want to maintain this feature? | |
16237 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
16238 | ac_sed_extra="$ac_vpsub | |
16239 | $extrasub | |
16240 | _ACEOF | |
16241 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
16242 | :t | |
16243 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b | |
16244 | s|@configure_input@|$ac_sed_conf_input|;t t | |
16245 | s&@top_builddir@&$ac_top_builddir_sub&;t t | |
16246 | s&@top_build_prefix@&$ac_top_build_prefix&;t t | |
16247 | s&@srcdir@&$ac_srcdir&;t t | |
16248 | s&@abs_srcdir@&$ac_abs_srcdir&;t t | |
16249 | s&@top_srcdir@&$ac_top_srcdir&;t t | |
16250 | s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t | |
16251 | s&@builddir@&$ac_builddir&;t t | |
16252 | s&@abs_builddir@&$ac_abs_builddir&;t t | |
16253 | s&@abs_top_builddir@&$ac_abs_top_builddir&;t t | |
16254 | s&@INSTALL@&$ac_INSTALL&;t t | |
16255 | $ac_datarootdir_hack | |
16256 | " | |
16257 | eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | | |
16258 | if $ac_cs_awk_getline; then | |
d6a003a8 | 16259 | $AWK -f "$ac_tmp/subs.awk" |
067d23c9 | 16260 | else |
d6a003a8 AS |
16261 | $AWK -f "$ac_tmp/subs.awk" | $SHELL |
16262 | fi \ | |
16263 | >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 | |
067d23c9 KY |
16264 | |
16265 | test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && | |
d6a003a8 AS |
16266 | { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && |
16267 | { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ | |
16268 | "$ac_tmp/out"`; test -z "$ac_out"; } && | |
067d23c9 | 16269 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' |
d6a003a8 | 16270 | which seems to be undefined. Please make sure it is defined" >&5 |
067d23c9 | 16271 | $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' |
d6a003a8 | 16272 | which seems to be undefined. Please make sure it is defined" >&2;} |
067d23c9 | 16273 | |
d6a003a8 | 16274 | rm -f "$ac_tmp/stdin" |
067d23c9 | 16275 | case $ac_file in |
d6a003a8 AS |
16276 | -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; |
16277 | *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; | |
067d23c9 | 16278 | esac \ |
d6a003a8 | 16279 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 |
067d23c9 KY |
16280 | ;; |
16281 | :H) | |
16282 | # | |
16283 | # CONFIG_HEADER | |
16284 | # | |
16285 | if test x"$ac_file" != x-; then | |
16286 | { | |
16287 | $as_echo "/* $configure_input */" \ | |
d6a003a8 AS |
16288 | && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" |
16289 | } >"$ac_tmp/config.h" \ | |
16290 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 | |
16291 | if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then | |
067d23c9 KY |
16292 | { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 |
16293 | $as_echo "$as_me: $ac_file is unchanged" >&6;} | |
16294 | else | |
16295 | rm -f "$ac_file" | |
d6a003a8 AS |
16296 | mv "$ac_tmp/config.h" "$ac_file" \ |
16297 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 | |
067d23c9 KY |
16298 | fi |
16299 | else | |
16300 | $as_echo "/* $configure_input */" \ | |
d6a003a8 AS |
16301 | && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ |
16302 | || as_fn_error $? "could not create -" "$LINENO" 5 | |
067d23c9 KY |
16303 | fi |
16304 | ;; | |
16305 | ||
16306 | :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 | |
16307 | $as_echo "$as_me: executing $ac_file commands" >&6;} | |
16308 | ;; | |
16309 | esac | |
16310 | ||
16311 | ||
16312 | case $ac_file$ac_mode in | |
16313 | "default":C) | |
16314 | ||
16315 | ### Make the necessary directories, if they don't exist. | |
16316 | for dir in etc lisp ; do | |
16317 | test -d ${dir} || mkdir ${dir} | |
16318 | done | |
16319 | ||
16320 | echo creating src/epaths.h | |
16321 | ${MAKE-make} epaths-force | |
16322 | ||
16323 | if test ! -f src/.gdbinit && test -f $srcdir/src/.gdbinit; then | |
16324 | echo creating src/.gdbinit | |
16325 | echo source $srcdir/src/.gdbinit > src/.gdbinit | |
16326 | fi | |
16327 | ||
16328 | ;; | |
16329 | ||
16330 | esac | |
16331 | done # for ac_tag | |
16332 | ||
16333 | ||
16334 | as_fn_exit 0 | |
16335 | _ACEOF | |
16336 | ac_clean_files=$ac_clean_files_save | |
16337 | ||
16338 | test $ac_write_fail = 0 || | |
d6a003a8 | 16339 | as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 |
067d23c9 KY |
16340 | |
16341 | ||
16342 | # configure is writing to config.log, and then calls config.status. | |
16343 | # config.status does its own redirection, appending to config.log. | |
16344 | # Unfortunately, on DOS this fails, as config.log is still kept open | |
16345 | # by configure, so config.status won't be able to write to it; its | |
16346 | # output is simply discarded. So we exec the FD to /dev/null, | |
16347 | # effectively closing config.log, so it can be properly (re)opened and | |
16348 | # appended to by config.status. When coming back to configure, we | |
16349 | # need to make the FD available again. | |
16350 | if test "$no_create" != yes; then | |
16351 | ac_cs_success=: | |
16352 | ac_config_status_args= | |
16353 | test "$silent" = yes && | |
16354 | ac_config_status_args="$ac_config_status_args --quiet" | |
16355 | exec 5>/dev/null | |
16356 | $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false | |
16357 | exec 5>>config.log | |
16358 | # Use ||, not &&, to avoid exiting from the if with $? = 1, which | |
16359 | # would make configure fail if this is the last instruction. | |
d6a003a8 | 16360 | $ac_cs_success || as_fn_exit 1 |
067d23c9 KY |
16361 | fi |
16362 | if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then | |
16363 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 | |
16364 | $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} | |
16365 | fi | |
16366 | ||
16367 |