Commit | Line | Data |
---|---|---|
067d23c9 KY |
1 | #! /bin/sh |
2 | # Guess values for system-dependent variables and create Makefiles. | |
d6974efa | 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, | |
2018939f 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. | |
d6974efa | 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. | |
d6974efa | 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 | |
d6974efa PE |
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" | |
2018939f | 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 | ||
2018939f 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 | |
2018939f | 371 | # script with STATUS, using 1 if that was 0. |
067d23c9 KY |
372 | as_fn_error () |
373 | { | |
2018939f 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 |
2018939f | 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. | |
2018939f | 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= | |
e275c824 PE |
604 | gl_getopt_required=POSIX |
605 | gl_getopt_required=POSIX | |
067d23c9 | 606 | ac_func_list= |
743c80a7 PE |
607 | ac_subst_vars='gltests_LTLIBOBJS |
608 | gltests_LIBOBJS | |
609 | gl_LTLIBOBJS | |
610 | gl_LIBOBJS | |
611 | am__EXEEXT_FALSE | |
612 | am__EXEEXT_TRUE | |
613 | LTLIBOBJS | |
067d23c9 KY |
614 | WINDOW_SUPPORT |
615 | TOOLTIP_SUPPORT | |
616 | MOUSE_SUPPORT | |
617 | LIB_GCC | |
618 | LD_FIRSTFLAG | |
619 | LD_SWITCH_SYSTEM_TEMACS | |
620 | POST_ALLOC_OBJ | |
621 | PRE_ALLOC_OBJ | |
622 | CYGWIN_OBJ | |
623 | RALLOC_OBJ | |
624 | OLDXMENU_DEPS | |
625 | LIBX_OTHER | |
626 | LIBXMENU | |
627 | OLDXMENU | |
628 | OLDXMENU_TARGET | |
629 | LIBXT_OTHER | |
630 | TOOLKIT_LIBW | |
631 | WIDGET_OBJ | |
632 | XOBJ | |
633 | XMENU_OBJ | |
634 | FONT_OBJ | |
635 | OTHER_FILES | |
636 | GNU_OBJC_CFLAGS | |
637 | ns_appsrc | |
638 | ns_appresdir | |
639 | ns_appbindir | |
640 | ns_appdir | |
d6a003a8 AS |
641 | S_FILE |
642 | M_FILE | |
067d23c9 KY |
643 | X_TOOLKIT_TYPE |
644 | C_SWITCH_X_SYSTEM | |
645 | C_SWITCH_X_SITE | |
646 | LD_SWITCH_X_SITE | |
647 | gameuser | |
648 | gamedir | |
649 | bitmapdir | |
650 | archlibdir | |
651 | etcdir | |
652 | x_default_search_path | |
653 | lisppath | |
654 | locallisppath | |
655 | lispdir | |
656 | srcdir | |
657 | canonical | |
658 | configuration | |
659 | version | |
660 | KRB4LIB | |
661 | DESLIB | |
662 | KRB5LIB | |
663 | CRYPTOLIB | |
664 | COM_ERRLIB | |
665 | LIBRESOLV | |
666 | LIBHESIOD | |
667 | TERMCAP_OBJ | |
668 | LIBS_TERMCAP | |
743c80a7 PE |
669 | LIBGNU_LTLIBDEPS |
670 | LIBGNU_LIBDEPS | |
671 | gltests_WITNESS | |
e275c824 PE |
672 | HAVE_UNISTD_H |
673 | NEXT_AS_FIRST_DIRECTIVE_UNISTD_H | |
674 | NEXT_UNISTD_H | |
1fd182f0 PE |
675 | PTHREAD_H_DEFINES_STRUCT_TIMESPEC |
676 | SYS_TIME_H_DEFINES_STRUCT_TIMESPEC | |
677 | TIME_H_DEFINES_STRUCT_TIMESPEC | |
678 | NEXT_AS_FIRST_DIRECTIVE_TIME_H | |
679 | NEXT_TIME_H | |
680 | NEXT_AS_FIRST_DIRECTIVE_STDDEF_H | |
681 | NEXT_STDDEF_H | |
1fd182f0 PE |
682 | STDDEF_H |
683 | HAVE_WCHAR_T | |
684 | REPLACE_NULL | |
16c3e636 PE |
685 | HAVE__BOOL |
686 | STDBOOL_H | |
1fd182f0 PE |
687 | APPLE_UNIVERSAL_BUILD |
688 | REPLACE_TIMEGM | |
689 | REPLACE_NANOSLEEP | |
690 | REPLACE_MKTIME | |
691 | REPLACE_LOCALTIME_R | |
692 | HAVE_TIMEGM | |
693 | HAVE_STRPTIME | |
694 | HAVE_NANOSLEEP | |
695 | HAVE_DECL_LOCALTIME_R | |
696 | GNULIB_TIME_R | |
697 | GNULIB_TIMEGM | |
698 | GNULIB_STRPTIME | |
699 | GNULIB_NANOSLEEP | |
700 | GNULIB_MKTIME | |
e275c824 PE |
701 | LTLIBINTL |
702 | LIBINTL | |
703 | GETOPT_H | |
704 | HAVE_GETOPT_H | |
705 | NEXT_AS_FIRST_DIRECTIVE_GETOPT_H | |
706 | NEXT_GETOPT_H | |
707 | PRAGMA_COLUMNS | |
708 | PRAGMA_SYSTEM_HEADER | |
709 | INCLUDE_NEXT_AS_FIRST_DIRECTIVE | |
710 | INCLUDE_NEXT | |
711 | UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS | |
712 | UNISTD_H_HAVE_WINSOCK2_H | |
713 | REPLACE_WRITE | |
714 | REPLACE_USLEEP | |
715 | REPLACE_UNLINKAT | |
716 | REPLACE_UNLINK | |
717 | REPLACE_TTYNAME_R | |
718 | REPLACE_SYMLINK | |
719 | REPLACE_SLEEP | |
720 | REPLACE_RMDIR | |
721 | REPLACE_READLINK | |
722 | REPLACE_PWRITE | |
723 | REPLACE_PREAD | |
724 | REPLACE_LSEEK | |
725 | REPLACE_LINKAT | |
726 | REPLACE_LINK | |
727 | REPLACE_LCHOWN | |
728 | REPLACE_GETPAGESIZE | |
729 | REPLACE_GETGROUPS | |
730 | REPLACE_GETLOGIN_R | |
731 | REPLACE_GETDOMAINNAME | |
732 | REPLACE_GETCWD | |
733 | REPLACE_FCHOWNAT | |
734 | REPLACE_DUP2 | |
735 | REPLACE_DUP | |
736 | REPLACE_CLOSE | |
737 | REPLACE_CHOWN | |
738 | HAVE_SYS_PARAM_H | |
739 | HAVE_OS_H | |
740 | HAVE_DECL_TTYNAME_R | |
741 | HAVE_DECL_GETUSERSHELL | |
742 | HAVE_DECL_GETPAGESIZE | |
743 | HAVE_DECL_GETLOGIN_R | |
744 | HAVE_DECL_GETDOMAINNAME | |
745 | HAVE_DECL_FCHDIR | |
746 | HAVE_DECL_ENVIRON | |
747 | HAVE_USLEEP | |
748 | HAVE_UNLINKAT | |
749 | HAVE_SYMLINKAT | |
750 | HAVE_SYMLINK | |
751 | HAVE_SLEEP | |
752 | HAVE_READLINKAT | |
753 | HAVE_READLINK | |
754 | HAVE_PWRITE | |
755 | HAVE_PREAD | |
756 | HAVE_PIPE2 | |
757 | HAVE_PIPE | |
758 | HAVE_LINKAT | |
759 | HAVE_LINK | |
760 | HAVE_LCHOWN | |
761 | HAVE_GETPAGESIZE | |
762 | HAVE_GETLOGIN | |
763 | HAVE_GETHOSTNAME | |
764 | HAVE_GETGROUPS | |
765 | HAVE_GETDTABLESIZE | |
766 | HAVE_FTRUNCATE | |
767 | HAVE_FSYNC | |
768 | HAVE_FCHOWNAT | |
769 | HAVE_FCHDIR | |
770 | HAVE_FACCESSAT | |
771 | HAVE_EUIDACCESS | |
772 | HAVE_DUP3 | |
773 | HAVE_DUP2 | |
774 | HAVE_CHOWN | |
775 | GNULIB_WRITE | |
776 | GNULIB_USLEEP | |
777 | GNULIB_UNLINKAT | |
778 | GNULIB_UNLINK | |
779 | GNULIB_UNISTD_H_SIGPIPE | |
780 | GNULIB_UNISTD_H_GETOPT | |
781 | GNULIB_TTYNAME_R | |
782 | GNULIB_SYMLINKAT | |
783 | GNULIB_SYMLINK | |
784 | GNULIB_SLEEP | |
785 | GNULIB_RMDIR | |
786 | GNULIB_READLINKAT | |
787 | GNULIB_READLINK | |
788 | GNULIB_PWRITE | |
789 | GNULIB_PREAD | |
790 | GNULIB_PIPE2 | |
791 | GNULIB_PIPE | |
792 | GNULIB_LSEEK | |
793 | GNULIB_LINKAT | |
794 | GNULIB_LINK | |
795 | GNULIB_LCHOWN | |
796 | GNULIB_GETUSERSHELL | |
797 | GNULIB_GETPAGESIZE | |
798 | GNULIB_GETLOGIN_R | |
799 | GNULIB_GETLOGIN | |
800 | GNULIB_GETHOSTNAME | |
801 | GNULIB_GETGROUPS | |
802 | GNULIB_GETDTABLESIZE | |
803 | GNULIB_GETDOMAINNAME | |
804 | GNULIB_GETCWD | |
805 | GNULIB_FTRUNCATE | |
806 | GNULIB_FSYNC | |
807 | GNULIB_FCHOWNAT | |
808 | GNULIB_FCHDIR | |
809 | GNULIB_FACCESSAT | |
810 | GNULIB_EUIDACCESS | |
811 | GNULIB_ENVIRON | |
812 | GNULIB_DUP3 | |
813 | GNULIB_DUP2 | |
814 | GNULIB_CLOSE | |
815 | GNULIB_CHOWN | |
743c80a7 PE |
816 | GL_COND_LIBTOOL_FALSE |
817 | GL_COND_LIBTOOL_TRUE | |
067d23c9 KY |
818 | GETLOADAVG_LIBS |
819 | KMEM_GROUP | |
820 | NEED_SETGID | |
821 | LIBOBJS | |
822 | BLESSMAIL_TARGET | |
823 | LIBS_MAIL | |
824 | liblockfile | |
825 | ALLOCA | |
826 | LIBXML2_LIBS | |
827 | LIBXML2_CFLAGS | |
828 | LIBXSM | |
829 | LIBGPM | |
830 | LIBGIF | |
831 | LIBTIFF | |
832 | LIBPNG | |
833 | LIBJPEG | |
834 | LIBXPM | |
835 | FREETYPE_LIBS | |
836 | FREETYPE_CFLAGS | |
837 | M17N_FLT_LIBS | |
838 | M17N_FLT_CFLAGS | |
839 | LIBOTF_LIBS | |
840 | LIBOTF_CFLAGS | |
841 | XFT_LIBS | |
842 | XFT_CFLAGS | |
843 | FONTCONFIG_LIBS | |
844 | FONTCONFIG_CFLAGS | |
845 | LIBXMU | |
846 | LIBXTR6 | |
847 | LIBGNUTLS_LIBS | |
848 | LIBGNUTLS_CFLAGS | |
849 | LIBSELINUX_LIBS | |
850 | GCONF_LIBS | |
851 | GCONF_CFLAGS | |
852 | DBUS_OBJ | |
853 | DBUS_LIBS | |
854 | DBUS_CFLAGS | |
855 | GTK_OBJ | |
856 | GTK_LIBS | |
857 | GTK_CFLAGS | |
858 | IMAGEMAGICK_LIBS | |
859 | IMAGEMAGICK_CFLAGS | |
860 | RSVG_LIBS | |
861 | RSVG_CFLAGS | |
862 | VMLIMIT_OBJ | |
863 | GMALLOC_OBJ | |
864 | HAVE_XSERVER | |
865 | LIB_STANDARD | |
866 | NS_SUPPORT | |
00b3c7ac | 867 | NS_OBJC_OBJ |
067d23c9 KY |
868 | NS_OBJ |
869 | TEMACS_LDFLAGS2 | |
870 | LD_SWITCH_X_SITE_AUX_RPATH | |
871 | LD_SWITCH_X_SITE_AUX | |
872 | XMKMF | |
873 | DEPFLAGS | |
874 | MKDEPDIR | |
067d23c9 KY |
875 | CFLAGS_SOUND |
876 | ALSA_LIBS | |
877 | ALSA_CFLAGS | |
878 | PKG_CONFIG | |
879 | LIBSOUND | |
880 | START_FILES | |
881 | LIB_MATH | |
882 | CRT_DIR | |
883 | LIBS_SYSTEM | |
884 | C_SWITCH_SYSTEM | |
885 | UNEXEC_OBJ | |
886 | C_SWITCH_MACHINE | |
887 | LD_SWITCH_SYSTEM | |
888 | CANNOT_DUMP | |
96f129d5 | 889 | HAVE_MAKEINFO |
067d23c9 KY |
890 | GZIP_PROG |
891 | INSTALL_INFO | |
067d23c9 KY |
892 | C_WARNINGS_SWITCH |
893 | EGREP | |
894 | GREP | |
895 | CPP | |
743c80a7 PE |
896 | RANLIB |
897 | am__fastdepCC_FALSE | |
898 | am__fastdepCC_TRUE | |
899 | CCDEPMODE | |
900 | AMDEPBACKSLASH | |
901 | AMDEP_FALSE | |
902 | AMDEP_TRUE | |
903 | am__quote | |
904 | am__include | |
905 | DEPDIR | |
067d23c9 KY |
906 | OBJEXT |
907 | EXEEXT | |
908 | ac_ct_CC | |
909 | CPPFLAGS | |
910 | LDFLAGS | |
911 | CFLAGS | |
912 | CC | |
913 | host_os | |
914 | host_vendor | |
915 | host_cpu | |
916 | host | |
917 | build_os | |
918 | build_vendor | |
919 | build_cpu | |
920 | build | |
921 | PROFILING_CFLAGS | |
922 | MAINT | |
923 | GZIP_INFO | |
743c80a7 PE |
924 | am__untar |
925 | am__tar | |
926 | AMTAR | |
927 | am__leading_dot | |
928 | SET_MAKE | |
929 | AWK | |
930 | mkdir_p | |
931 | MKDIR_P | |
932 | INSTALL_STRIP_PROGRAM | |
933 | STRIP | |
934 | install_sh | |
935 | MAKEINFO | |
936 | AUTOHEADER | |
937 | AUTOMAKE | |
938 | AUTOCONF | |
939 | ACLOCAL | |
940 | VERSION | |
941 | PACKAGE | |
942 | CYGPATH_W | |
943 | am__isrc | |
944 | INSTALL_DATA | |
945 | INSTALL_SCRIPT | |
946 | INSTALL_PROGRAM | |
067d23c9 KY |
947 | target_alias |
948 | host_alias | |
949 | build_alias | |
950 | LIBS | |
951 | ECHO_T | |
952 | ECHO_N | |
953 | ECHO_C | |
954 | DEFS | |
955 | mandir | |
956 | localedir | |
957 | libdir | |
958 | psdir | |
959 | pdfdir | |
960 | dvidir | |
961 | htmldir | |
962 | infodir | |
963 | docdir | |
964 | oldincludedir | |
965 | includedir | |
966 | localstatedir | |
967 | sharedstatedir | |
968 | sysconfdir | |
969 | datadir | |
970 | datarootdir | |
971 | libexecdir | |
972 | sbindir | |
973 | bindir | |
974 | program_transform_name | |
975 | prefix | |
976 | exec_prefix | |
977 | PACKAGE_URL | |
978 | PACKAGE_BUGREPORT | |
979 | PACKAGE_STRING | |
980 | PACKAGE_VERSION | |
981 | PACKAGE_TARNAME | |
982 | PACKAGE_NAME | |
983 | PATH_SEPARATOR | |
984 | SHELL' | |
985 | ac_subst_files='deps_frag | |
986 | ns_frag' | |
987 | ac_user_opts=' | |
988 | enable_option_checking | |
989 | with_pop | |
990 | with_kerberos | |
991 | with_kerberos5 | |
992 | with_hesiod | |
993 | with_mmdf | |
994 | with_mail_unlink | |
995 | with_mailhost | |
996 | with_sound | |
997 | with_sync_input | |
998 | with_x_toolkit | |
999 | with_xpm | |
1000 | with_jpeg | |
1001 | with_tiff | |
1002 | with_gif | |
1003 | with_png | |
1004 | with_rsvg | |
1005 | with_xml2 | |
1006 | with_imagemagick | |
1007 | with_xft | |
1008 | with_libotf | |
1009 | with_m17n_flt | |
1010 | with_toolkit_scroll_bars | |
1011 | with_xaw3d | |
1012 | with_xim | |
1013 | with_ns | |
1014 | with_gpm | |
1015 | with_dbus | |
1016 | with_gconf | |
1017 | with_selinux | |
1018 | with_gnutls | |
1019 | with_makeinfo | |
1020 | with_compress_info | |
1021 | with_pkg_config_prog | |
1022 | with_crt_dir | |
4fc5868a | 1023 | with_gameuser |
067d23c9 KY |
1024 | with_gnustep_conf |
1025 | enable_ns_self_contained | |
1026 | enable_asserts | |
1027 | enable_maintainer_mode | |
1028 | enable_locallisppath | |
1029 | enable_checking | |
1030 | enable_use_lisp_union_type | |
1031 | enable_profiling | |
1032 | enable_autodepend | |
743c80a7 | 1033 | enable_dependency_tracking |
067d23c9 KY |
1034 | enable_largefile |
1035 | with_x | |
1036 | ' | |
1037 | ac_precious_vars='build_alias | |
1038 | host_alias | |
1039 | target_alias | |
1040 | CC | |
1041 | CFLAGS | |
1042 | LDFLAGS | |
1043 | LIBS | |
1044 | CPPFLAGS | |
1045 | CPP | |
1046 | XMKMF' | |
1047 | ||
1048 | ||
1049 | # Initialize some variables set by options. | |
1050 | ac_init_help= | |
1051 | ac_init_version=false | |
1052 | ac_unrecognized_opts= | |
1053 | ac_unrecognized_sep= | |
1054 | # The variables have the same names as the options, with | |
1055 | # dashes changed to underlines. | |
1056 | cache_file=/dev/null | |
1057 | exec_prefix=NONE | |
1058 | no_create= | |
1059 | no_recursion= | |
1060 | prefix=NONE | |
1061 | program_prefix=NONE | |
1062 | program_suffix=NONE | |
1063 | program_transform_name=s,x,x, | |
1064 | silent= | |
1065 | site= | |
1066 | srcdir= | |
1067 | verbose= | |
1068 | x_includes=NONE | |
1069 | x_libraries=NONE | |
1070 | ||
1071 | # Installation directory options. | |
1072 | # These are left unexpanded so users can "make install exec_prefix=/foo" | |
1073 | # and all the variables that are supposed to be based on exec_prefix | |
1074 | # by default will actually change. | |
1075 | # Use braces instead of parens because sh, perl, etc. also accept them. | |
1076 | # (The list follows the same order as the GNU Coding Standards.) | |
1077 | bindir='${exec_prefix}/bin' | |
1078 | sbindir='${exec_prefix}/sbin' | |
1079 | libexecdir='${exec_prefix}/libexec' | |
1080 | datarootdir='${prefix}/share' | |
1081 | datadir='${datarootdir}' | |
1082 | sysconfdir='${prefix}/etc' | |
1083 | sharedstatedir='${prefix}/com' | |
1084 | localstatedir='${prefix}/var' | |
1085 | includedir='${prefix}/include' | |
1086 | oldincludedir='/usr/include' | |
1087 | docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' | |
1088 | infodir='${datarootdir}/info' | |
1089 | htmldir='${docdir}' | |
1090 | dvidir='${docdir}' | |
1091 | pdfdir='${docdir}' | |
1092 | psdir='${docdir}' | |
1093 | libdir='${exec_prefix}/lib' | |
1094 | localedir='${datarootdir}/locale' | |
1095 | mandir='${datarootdir}/man' | |
1096 | ||
1097 | ac_prev= | |
1098 | ac_dashdash= | |
1099 | for ac_option | |
1100 | do | |
1101 | # If the previous option needs an argument, assign it. | |
1102 | if test -n "$ac_prev"; then | |
1103 | eval $ac_prev=\$ac_option | |
1104 | ac_prev= | |
1105 | continue | |
1106 | fi | |
1107 | ||
1108 | case $ac_option in | |
2018939f AS |
1109 | *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; |
1110 | *=) ac_optarg= ;; | |
1111 | *) ac_optarg=yes ;; | |
067d23c9 KY |
1112 | esac |
1113 | ||
1114 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
1115 | ||
1116 | case $ac_dashdash$ac_option in | |
1117 | --) | |
1118 | ac_dashdash=yes ;; | |
1119 | ||
1120 | -bindir | --bindir | --bindi | --bind | --bin | --bi) | |
1121 | ac_prev=bindir ;; | |
1122 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
1123 | bindir=$ac_optarg ;; | |
1124 | ||
1125 | -build | --build | --buil | --bui | --bu) | |
1126 | ac_prev=build_alias ;; | |
1127 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) | |
1128 | build_alias=$ac_optarg ;; | |
1129 | ||
1130 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
1131 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
1132 | ac_prev=cache_file ;; | |
1133 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
1134 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
1135 | cache_file=$ac_optarg ;; | |
1136 | ||
1137 | --config-cache | -C) | |
1138 | cache_file=config.cache ;; | |
1139 | ||
1140 | -datadir | --datadir | --datadi | --datad) | |
1141 | ac_prev=datadir ;; | |
1142 | -datadir=* | --datadir=* | --datadi=* | --datad=*) | |
1143 | datadir=$ac_optarg ;; | |
1144 | ||
1145 | -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | |
1146 | | --dataroo | --dataro | --datar) | |
1147 | ac_prev=datarootdir ;; | |
1148 | -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | |
1149 | | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) | |
1150 | datarootdir=$ac_optarg ;; | |
1151 | ||
1152 | -disable-* | --disable-*) | |
1153 | ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` | |
1154 | # Reject names that are not valid shell variable names. | |
1155 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && | |
2018939f | 1156 | as_fn_error $? "invalid feature name: $ac_useropt" |
067d23c9 KY |
1157 | ac_useropt_orig=$ac_useropt |
1158 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1159 | case $ac_user_opts in | |
1160 | *" | |
1161 | "enable_$ac_useropt" | |
1162 | "*) ;; | |
1163 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" | |
1164 | ac_unrecognized_sep=', ';; | |
1165 | esac | |
1166 | eval enable_$ac_useropt=no ;; | |
1167 | ||
1168 | -docdir | --docdir | --docdi | --doc | --do) | |
1169 | ac_prev=docdir ;; | |
1170 | -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) | |
1171 | docdir=$ac_optarg ;; | |
1172 | ||
1173 | -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) | |
1174 | ac_prev=dvidir ;; | |
1175 | -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) | |
1176 | dvidir=$ac_optarg ;; | |
1177 | ||
1178 | -enable-* | --enable-*) | |
1179 | ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` | |
1180 | # Reject names that are not valid shell variable names. | |
1181 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && | |
2018939f | 1182 | as_fn_error $? "invalid feature name: $ac_useropt" |
067d23c9 KY |
1183 | ac_useropt_orig=$ac_useropt |
1184 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1185 | case $ac_user_opts in | |
1186 | *" | |
1187 | "enable_$ac_useropt" | |
1188 | "*) ;; | |
1189 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" | |
1190 | ac_unrecognized_sep=', ';; | |
1191 | esac | |
1192 | eval enable_$ac_useropt=\$ac_optarg ;; | |
1193 | ||
1194 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
1195 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
1196 | | --exec | --exe | --ex) | |
1197 | ac_prev=exec_prefix ;; | |
1198 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
1199 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
1200 | | --exec=* | --exe=* | --ex=*) | |
1201 | exec_prefix=$ac_optarg ;; | |
1202 | ||
1203 | -gas | --gas | --ga | --g) | |
1204 | # Obsolete; use --with-gas. | |
1205 | with_gas=yes ;; | |
1206 | ||
1207 | -help | --help | --hel | --he | -h) | |
1208 | ac_init_help=long ;; | |
1209 | -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) | |
1210 | ac_init_help=recursive ;; | |
1211 | -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) | |
1212 | ac_init_help=short ;; | |
1213 | ||
1214 | -host | --host | --hos | --ho) | |
1215 | ac_prev=host_alias ;; | |
1216 | -host=* | --host=* | --hos=* | --ho=*) | |
1217 | host_alias=$ac_optarg ;; | |
1218 | ||
1219 | -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) | |
1220 | ac_prev=htmldir ;; | |
1221 | -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | |
1222 | | --ht=*) | |
1223 | htmldir=$ac_optarg ;; | |
1224 | ||
1225 | -includedir | --includedir | --includedi | --included | --include \ | |
1226 | | --includ | --inclu | --incl | --inc) | |
1227 | ac_prev=includedir ;; | |
1228 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
1229 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
1230 | includedir=$ac_optarg ;; | |
1231 | ||
1232 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
1233 | ac_prev=infodir ;; | |
1234 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
1235 | infodir=$ac_optarg ;; | |
1236 | ||
1237 | -libdir | --libdir | --libdi | --libd) | |
1238 | ac_prev=libdir ;; | |
1239 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
1240 | libdir=$ac_optarg ;; | |
1241 | ||
1242 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
1243 | | --libexe | --libex | --libe) | |
1244 | ac_prev=libexecdir ;; | |
1245 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
1246 | | --libexe=* | --libex=* | --libe=*) | |
1247 | libexecdir=$ac_optarg ;; | |
1248 | ||
1249 | -localedir | --localedir | --localedi | --localed | --locale) | |
1250 | ac_prev=localedir ;; | |
1251 | -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) | |
1252 | localedir=$ac_optarg ;; | |
1253 | ||
1254 | -localstatedir | --localstatedir | --localstatedi | --localstated \ | |
1255 | | --localstate | --localstat | --localsta | --localst | --locals) | |
1256 | ac_prev=localstatedir ;; | |
1257 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
1258 | | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) | |
1259 | localstatedir=$ac_optarg ;; | |
1260 | ||
1261 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
1262 | ac_prev=mandir ;; | |
1263 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
1264 | mandir=$ac_optarg ;; | |
1265 | ||
1266 | -nfp | --nfp | --nf) | |
1267 | # Obsolete; use --without-fp. | |
1268 | with_fp=no ;; | |
1269 | ||
1270 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
1271 | | --no-cr | --no-c | -n) | |
1272 | no_create=yes ;; | |
1273 | ||
1274 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
1275 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
1276 | no_recursion=yes ;; | |
1277 | ||
1278 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | |
1279 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
1280 | | --oldin | --oldi | --old | --ol | --o) | |
1281 | ac_prev=oldincludedir ;; | |
1282 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
1283 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
1284 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
1285 | oldincludedir=$ac_optarg ;; | |
1286 | ||
1287 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
1288 | ac_prev=prefix ;; | |
1289 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
1290 | prefix=$ac_optarg ;; | |
1291 | ||
1292 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
1293 | | --program-pre | --program-pr | --program-p) | |
1294 | ac_prev=program_prefix ;; | |
1295 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
1296 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
1297 | program_prefix=$ac_optarg ;; | |
1298 | ||
1299 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
1300 | | --program-suf | --program-su | --program-s) | |
1301 | ac_prev=program_suffix ;; | |
1302 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
1303 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
1304 | program_suffix=$ac_optarg ;; | |
1305 | ||
1306 | -program-transform-name | --program-transform-name \ | |
1307 | | --program-transform-nam | --program-transform-na \ | |
1308 | | --program-transform-n | --program-transform- \ | |
1309 | | --program-transform | --program-transfor \ | |
1310 | | --program-transfo | --program-transf \ | |
1311 | | --program-trans | --program-tran \ | |
1312 | | --progr-tra | --program-tr | --program-t) | |
1313 | ac_prev=program_transform_name ;; | |
1314 | -program-transform-name=* | --program-transform-name=* \ | |
1315 | | --program-transform-nam=* | --program-transform-na=* \ | |
1316 | | --program-transform-n=* | --program-transform-=* \ | |
1317 | | --program-transform=* | --program-transfor=* \ | |
1318 | | --program-transfo=* | --program-transf=* \ | |
1319 | | --program-trans=* | --program-tran=* \ | |
1320 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
1321 | program_transform_name=$ac_optarg ;; | |
1322 | ||
1323 | -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) | |
1324 | ac_prev=pdfdir ;; | |
1325 | -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) | |
1326 | pdfdir=$ac_optarg ;; | |
1327 | ||
1328 | -psdir | --psdir | --psdi | --psd | --ps) | |
1329 | ac_prev=psdir ;; | |
1330 | -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) | |
1331 | psdir=$ac_optarg ;; | |
1332 | ||
1333 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
1334 | | -silent | --silent | --silen | --sile | --sil) | |
1335 | silent=yes ;; | |
1336 | ||
1337 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | |
1338 | ac_prev=sbindir ;; | |
1339 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
1340 | | --sbi=* | --sb=*) | |
1341 | sbindir=$ac_optarg ;; | |
1342 | ||
1343 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
1344 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
1345 | | --sharedst | --shareds | --shared | --share | --shar \ | |
1346 | | --sha | --sh) | |
1347 | ac_prev=sharedstatedir ;; | |
1348 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
1349 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
1350 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
1351 | | --sha=* | --sh=*) | |
1352 | sharedstatedir=$ac_optarg ;; | |
1353 | ||
1354 | -site | --site | --sit) | |
1355 | ac_prev=site ;; | |
1356 | -site=* | --site=* | --sit=*) | |
1357 | site=$ac_optarg ;; | |
1358 | ||
1359 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
1360 | ac_prev=srcdir ;; | |
1361 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
1362 | srcdir=$ac_optarg ;; | |
1363 | ||
1364 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | |
1365 | | --syscon | --sysco | --sysc | --sys | --sy) | |
1366 | ac_prev=sysconfdir ;; | |
1367 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
1368 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
1369 | sysconfdir=$ac_optarg ;; | |
1370 | ||
1371 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
1372 | ac_prev=target_alias ;; | |
1373 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) | |
1374 | target_alias=$ac_optarg ;; | |
1375 | ||
1376 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
1377 | verbose=yes ;; | |
1378 | ||
1379 | -version | --version | --versio | --versi | --vers | -V) | |
1380 | ac_init_version=: ;; | |
1381 | ||
1382 | -with-* | --with-*) | |
1383 | ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` | |
1384 | # Reject names that are not valid shell variable names. | |
1385 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && | |
2018939f | 1386 | as_fn_error $? "invalid package name: $ac_useropt" |
067d23c9 KY |
1387 | ac_useropt_orig=$ac_useropt |
1388 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1389 | case $ac_user_opts in | |
1390 | *" | |
1391 | "with_$ac_useropt" | |
1392 | "*) ;; | |
1393 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" | |
1394 | ac_unrecognized_sep=', ';; | |
1395 | esac | |
1396 | eval with_$ac_useropt=\$ac_optarg ;; | |
1397 | ||
1398 | -without-* | --without-*) | |
1399 | ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` | |
1400 | # Reject names that are not valid shell variable names. | |
1401 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && | |
2018939f | 1402 | as_fn_error $? "invalid package name: $ac_useropt" |
067d23c9 KY |
1403 | ac_useropt_orig=$ac_useropt |
1404 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1405 | case $ac_user_opts in | |
1406 | *" | |
1407 | "with_$ac_useropt" | |
1408 | "*) ;; | |
1409 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" | |
1410 | ac_unrecognized_sep=', ';; | |
1411 | esac | |
1412 | eval with_$ac_useropt=no ;; | |
1413 | ||
1414 | --x) | |
1415 | # Obsolete; use --with-x. | |
1416 | with_x=yes ;; | |
1417 | ||
1418 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
1419 | | --x-incl | --x-inc | --x-in | --x-i) | |
1420 | ac_prev=x_includes ;; | |
1421 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
1422 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
1423 | x_includes=$ac_optarg ;; | |
1424 | ||
1425 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
1426 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
1427 | ac_prev=x_libraries ;; | |
1428 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
1429 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
1430 | x_libraries=$ac_optarg ;; | |
1431 | ||
2018939f AS |
1432 | -*) as_fn_error $? "unrecognized option: \`$ac_option' |
1433 | Try \`$0 --help' for more information" | |
067d23c9 KY |
1434 | ;; |
1435 | ||
1436 | *=*) | |
1437 | ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` | |
1438 | # Reject names that are not valid shell variable names. | |
1439 | case $ac_envvar in #( | |
1440 | '' | [0-9]* | *[!_$as_cr_alnum]* ) | |
2018939f | 1441 | as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; |
067d23c9 KY |
1442 | esac |
1443 | eval $ac_envvar=\$ac_optarg | |
1444 | export $ac_envvar ;; | |
1445 | ||
1446 | *) | |
1447 | # FIXME: should be removed in autoconf 3.0. | |
1448 | $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 | |
1449 | expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && | |
1450 | $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 | |
d6974efa | 1451 | : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" |
067d23c9 KY |
1452 | ;; |
1453 | ||
1454 | esac | |
1455 | done | |
1456 | ||
1457 | if test -n "$ac_prev"; then | |
1458 | ac_option=--`echo $ac_prev | sed 's/_/-/g'` | |
2018939f | 1459 | as_fn_error $? "missing argument to $ac_option" |
067d23c9 KY |
1460 | fi |
1461 | ||
1462 | if test -n "$ac_unrecognized_opts"; then | |
1463 | case $enable_option_checking in | |
1464 | no) ;; | |
2018939f | 1465 | fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; |
067d23c9 KY |
1466 | *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; |
1467 | esac | |
1468 | fi | |
1469 | ||
1470 | # Check all directory arguments for consistency. | |
1471 | for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ | |
1472 | datadir sysconfdir sharedstatedir localstatedir includedir \ | |
1473 | oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ | |
1474 | libdir localedir mandir | |
1475 | do | |
1476 | eval ac_val=\$$ac_var | |
1477 | # Remove trailing slashes. | |
1478 | case $ac_val in | |
1479 | */ ) | |
1480 | ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` | |
1481 | eval $ac_var=\$ac_val;; | |
1482 | esac | |
1483 | # Be sure to have absolute directory names. | |
1484 | case $ac_val in | |
1485 | [\\/$]* | ?:[\\/]* ) continue;; | |
1486 | NONE | '' ) case $ac_var in *prefix ) continue;; esac;; | |
1487 | esac | |
2018939f | 1488 | as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" |
067d23c9 KY |
1489 | done |
1490 | ||
1491 | # There might be people who depend on the old broken behavior: `$host' | |
1492 | # used to hold the argument of --host etc. | |
1493 | # FIXME: To remove some day. | |
1494 | build=$build_alias | |
1495 | host=$host_alias | |
1496 | target=$target_alias | |
1497 | ||
1498 | # FIXME: To remove some day. | |
1499 | if test "x$host_alias" != x; then | |
1500 | if test "x$build_alias" = x; then | |
1501 | cross_compiling=maybe | |
2018939f AS |
1502 | $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. |
1503 | If a cross compiler is detected then cross compile mode will be used" >&2 | |
067d23c9 KY |
1504 | elif test "x$build_alias" != "x$host_alias"; then |
1505 | cross_compiling=yes | |
1506 | fi | |
1507 | fi | |
1508 | ||
1509 | ac_tool_prefix= | |
1510 | test -n "$host_alias" && ac_tool_prefix=$host_alias- | |
1511 | ||
1512 | test "$silent" = yes && exec 6>/dev/null | |
1513 | ||
1514 | ||
1515 | ac_pwd=`pwd` && test -n "$ac_pwd" && | |
1516 | ac_ls_di=`ls -di .` && | |
1517 | ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || | |
2018939f | 1518 | as_fn_error $? "working directory cannot be determined" |
067d23c9 | 1519 | test "X$ac_ls_di" = "X$ac_pwd_ls_di" || |
2018939f | 1520 | as_fn_error $? "pwd does not report name of working directory" |
067d23c9 KY |
1521 | |
1522 | ||
1523 | # Find the source files, if location was not specified. | |
1524 | if test -z "$srcdir"; then | |
1525 | ac_srcdir_defaulted=yes | |
1526 | # Try the directory containing this script, then the parent directory. | |
1527 | ac_confdir=`$as_dirname -- "$as_myself" || | |
1528 | $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
1529 | X"$as_myself" : 'X\(//\)[^/]' \| \ | |
1530 | X"$as_myself" : 'X\(//\)$' \| \ | |
1531 | X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || | |
1532 | $as_echo X"$as_myself" | | |
1533 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
1534 | s//\1/ | |
1535 | q | |
1536 | } | |
1537 | /^X\(\/\/\)[^/].*/{ | |
1538 | s//\1/ | |
1539 | q | |
1540 | } | |
1541 | /^X\(\/\/\)$/{ | |
1542 | s//\1/ | |
1543 | q | |
1544 | } | |
1545 | /^X\(\/\).*/{ | |
1546 | s//\1/ | |
1547 | q | |
1548 | } | |
1549 | s/.*/./; q'` | |
1550 | srcdir=$ac_confdir | |
1551 | if test ! -r "$srcdir/$ac_unique_file"; then | |
1552 | srcdir=.. | |
1553 | fi | |
1554 | else | |
1555 | ac_srcdir_defaulted=no | |
1556 | fi | |
1557 | if test ! -r "$srcdir/$ac_unique_file"; then | |
1558 | test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." | |
2018939f | 1559 | as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" |
067d23c9 KY |
1560 | fi |
1561 | ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" | |
1562 | ac_abs_confdir=`( | |
2018939f | 1563 | cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" |
067d23c9 KY |
1564 | pwd)` |
1565 | # When building in place, set srcdir=. | |
1566 | if test "$ac_abs_confdir" = "$ac_pwd"; then | |
1567 | srcdir=. | |
1568 | fi | |
1569 | # Remove unnecessary trailing slashes from srcdir. | |
1570 | # Double slashes in file names in object file debugging info | |
1571 | # mess up M-x gdb in Emacs. | |
1572 | case $srcdir in | |
1573 | */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; | |
1574 | esac | |
1575 | for ac_var in $ac_precious_vars; do | |
1576 | eval ac_env_${ac_var}_set=\${${ac_var}+set} | |
1577 | eval ac_env_${ac_var}_value=\$${ac_var} | |
1578 | eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} | |
1579 | eval ac_cv_env_${ac_var}_value=\$${ac_var} | |
1580 | done | |
1581 | ||
1582 | # | |
1583 | # Report the --help message. | |
1584 | # | |
1585 | if test "$ac_init_help" = "long"; then | |
1586 | # Omit some internal or obsolete options to make the list less imposing. | |
1587 | # This message is too long to be a string in the A/UX 3.1 sh. | |
1588 | cat <<_ACEOF | |
1589 | \`configure' configures emacs 24.0.50 to adapt to many kinds of systems. | |
1590 | ||
1591 | Usage: $0 [OPTION]... [VAR=VALUE]... | |
1592 | ||
1593 | To assign environment variables (e.g., CC, CFLAGS...), specify them as | |
1594 | VAR=VALUE. See below for descriptions of some of the useful variables. | |
1595 | ||
1596 | Defaults for the options are specified in brackets. | |
1597 | ||
1598 | Configuration: | |
1599 | -h, --help display this help and exit | |
1600 | --help=short display options specific to this package | |
1601 | --help=recursive display the short help of all the included packages | |
1602 | -V, --version display version information and exit | |
2018939f | 1603 | -q, --quiet, --silent do not print \`checking ...' messages |
067d23c9 KY |
1604 | --cache-file=FILE cache test results in FILE [disabled] |
1605 | -C, --config-cache alias for \`--cache-file=config.cache' | |
1606 | -n, --no-create do not create output files | |
1607 | --srcdir=DIR find the sources in DIR [configure dir or \`..'] | |
1608 | ||
1609 | Installation directories: | |
1610 | --prefix=PREFIX install architecture-independent files in PREFIX | |
1611 | [$ac_default_prefix] | |
1612 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX | |
1613 | [PREFIX] | |
1614 | ||
1615 | By default, \`make install' will install all the files in | |
1616 | \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify | |
1617 | an installation prefix other than \`$ac_default_prefix' using \`--prefix', | |
1618 | for instance \`--prefix=\$HOME'. | |
1619 | ||
1620 | For better control, use the options below. | |
1621 | ||
1622 | Fine tuning of the installation directories: | |
1623 | --bindir=DIR user executables [EPREFIX/bin] | |
1624 | --sbindir=DIR system admin executables [EPREFIX/sbin] | |
1625 | --libexecdir=DIR program executables [EPREFIX/libexec] | |
1626 | --sysconfdir=DIR read-only single-machine data [PREFIX/etc] | |
1627 | --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] | |
1628 | --localstatedir=DIR modifiable single-machine data [PREFIX/var] | |
1629 | --libdir=DIR object code libraries [EPREFIX/lib] | |
1630 | --includedir=DIR C header files [PREFIX/include] | |
1631 | --oldincludedir=DIR C header files for non-gcc [/usr/include] | |
1632 | --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] | |
1633 | --datadir=DIR read-only architecture-independent data [DATAROOTDIR] | |
1634 | --infodir=DIR info documentation [DATAROOTDIR/info] | |
1635 | --localedir=DIR locale-dependent data [DATAROOTDIR/locale] | |
1636 | --mandir=DIR man documentation [DATAROOTDIR/man] | |
1637 | --docdir=DIR documentation root [DATAROOTDIR/doc/emacs] | |
1638 | --htmldir=DIR html documentation [DOCDIR] | |
1639 | --dvidir=DIR dvi documentation [DOCDIR] | |
1640 | --pdfdir=DIR pdf documentation [DOCDIR] | |
1641 | --psdir=DIR ps documentation [DOCDIR] | |
1642 | _ACEOF | |
1643 | ||
1644 | cat <<\_ACEOF | |
1645 | ||
1646 | Program names: | |
1647 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
1648 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
1649 | --program-transform-name=PROGRAM run sed PROGRAM on installed program names | |
1650 | ||
1651 | X features: | |
1652 | --x-includes=DIR X include files are in DIR | |
1653 | --x-libraries=DIR X library files are in DIR | |
1654 | ||
1655 | System types: | |
1656 | --build=BUILD configure for building on BUILD [guessed] | |
1657 | --host=HOST cross-compile to build programs to run on HOST [BUILD] | |
1658 | _ACEOF | |
1659 | fi | |
1660 | ||
1661 | if test -n "$ac_init_help"; then | |
1662 | case $ac_init_help in | |
1663 | short | recursive ) echo "Configuration of emacs 24.0.50:";; | |
1664 | esac | |
1665 | cat <<\_ACEOF | |
1666 | ||
1667 | Optional Features: | |
1668 | --disable-option-checking ignore unrecognized --enable/--with options | |
1669 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) | |
1670 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
1671 | --disable-ns-self-contained | |
1672 | disable self contained build under NeXTstep | |
1673 | --enable-asserts compile code with asserts enabled | |
1674 | --enable-maintainer-mode | |
1675 | enable make rules and dependencies not useful (and | |
1676 | sometimes confusing) to the casual installer | |
1677 | --enable-locallisppath=PATH | |
1678 | directories Emacs should search for lisp files | |
1679 | specific to this site | |
1680 | --enable-checking[=LIST] | |
1681 | enable expensive run-time checks. With LIST, enable | |
1682 | only specific categories of checks. Categories are: | |
1683 | all,yes,no. Flags are: stringbytes, stringoverrun, | |
1684 | stringfreelist, xmallocoverrun, conslist | |
1685 | --enable-use-lisp-union-type | |
1686 | use a union for the Lisp_Object data type. This is | |
1687 | only useful for development for catching certain | |
1688 | types of bugs. | |
1689 | --enable-profiling build emacs with profiling support. This might not | |
1690 | work on all platforms | |
1691 | --enable-autodepend automatically generate dependencies to .h-files. | |
1692 | Requires GNU Make and Gcc. Enabled if GNU Make and | |
1693 | Gcc is found | |
743c80a7 PE |
1694 | --disable-dependency-tracking speeds up one-time build |
1695 | --enable-dependency-tracking do not reject slow dependency extractors | |
067d23c9 KY |
1696 | --disable-largefile omit support for large files |
1697 | ||
1698 | Optional Packages: | |
1699 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
1700 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
1701 | --without-pop don't support POP mail retrieval with movemail | |
1702 | --with-kerberos support Kerberos-authenticated POP | |
1703 | --with-kerberos5 support Kerberos version 5 authenticated POP | |
1704 | --with-hesiod support Hesiod to get the POP server host | |
1705 | --with-mmdf support MMDF mailboxes | |
1706 | --with-mail-unlink unlink, rather than empty, mail spool after reading | |
1707 | --with-mailhost=HOSTNAME | |
1708 | string giving default POP mail host | |
1709 | --without-sound don't compile with sound support | |
1710 | --without-sync-input process async input synchronously | |
1711 | --with-x-toolkit=KIT use an X toolkit (KIT one of: yes or gtk, gtk3, | |
1712 | lucid or athena, motif, no) | |
1713 | --without-xpm don't compile with XPM image support | |
1714 | --without-jpeg don't compile with JPEG image support | |
1715 | --without-tiff don't compile with TIFF image support | |
1716 | --without-gif don't compile with GIF image support | |
1717 | --without-png don't compile with PNG image support | |
1718 | --without-rsvg don't compile with SVG image support | |
1719 | --without-xml2 don't compile with XML parsing support | |
1720 | --without-imagemagick don't compile with ImageMagick image support | |
1721 | --without-xft don't use XFT for anti aliased fonts | |
1722 | --without-libotf don't use libotf for OpenType font support | |
1723 | --without-m17n-flt don't use m17n-flt for text shaping | |
1724 | --without-toolkit-scroll-bars | |
1725 | don't use Motif or Xaw3d scroll bars | |
1726 | --without-xaw3d don't use Xaw3d | |
1727 | --without-xim don't use X11 XIM | |
1728 | --with-ns use nextstep (Cocoa or GNUstep) windowing system | |
1729 | --without-gpm don't use -lgpm for mouse support on a GNU/Linux | |
1730 | console | |
1731 | --without-dbus don't compile with D-Bus support | |
1732 | --without-gconf don't compile with GConf support | |
1733 | --without-selinux don't compile with SELinux support | |
1734 | --without-gnutls don't use -lgnutls for SSL/TLS support | |
1735 | --without-makeinfo don't require makeinfo for building manuals | |
1736 | --without-compress-info don't compress the installed Info pages | |
1737 | --with-pkg-config-prog=PATH | |
1738 | path to pkg-config for finding GTK and librsvg | |
1739 | --with-crt-dir=DIR directory containing crtn.o etc. The default is | |
1740 | /usr/lib, or /usr/lib64 on some platforms. | |
4fc5868a | 1741 | --with-gameuser=USER user for shared game score files |
067d23c9 KY |
1742 | --with-gnustep-conf=PATH |
1743 | path to GNUstep.conf; default $GNUSTEP_CONFIG_FILE, | |
1744 | or /etc/GNUstep/GNUstep.conf | |
1745 | --with-x use the X Window System | |
1746 | ||
1747 | Some influential environment variables: | |
1748 | CC C compiler command | |
1749 | CFLAGS C compiler flags | |
1750 | LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a | |
1751 | nonstandard directory <lib dir> | |
1752 | LIBS libraries to pass to the linker, e.g. -l<library> | |
1753 | CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if | |
1754 | you have headers in a nonstandard directory <include dir> | |
1755 | CPP C preprocessor | |
1756 | XMKMF Path to xmkmf, Makefile generator for X Window System | |
1757 | ||
1758 | Use these variables to override the choices made by `configure' or to help | |
1759 | it to find libraries and programs with nonstandard names/locations. | |
1760 | ||
1761 | Report bugs to the package provider. | |
1762 | _ACEOF | |
1763 | ac_status=$? | |
1764 | fi | |
1765 | ||
1766 | if test "$ac_init_help" = "recursive"; then | |
1767 | # If there are subdirs, report their specific --help. | |
1768 | for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue | |
1769 | test -d "$ac_dir" || | |
1770 | { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || | |
1771 | continue | |
1772 | ac_builddir=. | |
1773 | ||
1774 | case "$ac_dir" in | |
1775 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
1776 | *) | |
1777 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
1778 | # A ".." for each directory in $ac_dir_suffix. | |
1779 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
1780 | case $ac_top_builddir_sub in | |
1781 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
1782 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
1783 | esac ;; | |
1784 | esac | |
1785 | ac_abs_top_builddir=$ac_pwd | |
1786 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
1787 | # for backward compatibility: | |
1788 | ac_top_builddir=$ac_top_build_prefix | |
1789 | ||
1790 | case $srcdir in | |
1791 | .) # We are building in place. | |
1792 | ac_srcdir=. | |
1793 | ac_top_srcdir=$ac_top_builddir_sub | |
1794 | ac_abs_top_srcdir=$ac_pwd ;; | |
1795 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
1796 | ac_srcdir=$srcdir$ac_dir_suffix; | |
1797 | ac_top_srcdir=$srcdir | |
1798 | ac_abs_top_srcdir=$srcdir ;; | |
1799 | *) # Relative name. | |
1800 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
1801 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
1802 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
1803 | esac | |
1804 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix | |
1805 | ||
1806 | cd "$ac_dir" || { ac_status=$?; continue; } | |
1807 | # Check for guested configure. | |
1808 | if test -f "$ac_srcdir/configure.gnu"; then | |
1809 | echo && | |
1810 | $SHELL "$ac_srcdir/configure.gnu" --help=recursive | |
1811 | elif test -f "$ac_srcdir/configure"; then | |
1812 | echo && | |
1813 | $SHELL "$ac_srcdir/configure" --help=recursive | |
1814 | else | |
1815 | $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 | |
1816 | fi || ac_status=$? | |
1817 | cd "$ac_pwd" || { ac_status=$?; break; } | |
1818 | done | |
1819 | fi | |
1820 | ||
1821 | test -n "$ac_init_help" && exit $ac_status | |
1822 | if $ac_init_version; then | |
1823 | cat <<\_ACEOF | |
1824 | emacs configure 24.0.50 | |
d6974efa | 1825 | generated by GNU Autoconf 2.68 |
067d23c9 | 1826 | |
2018939f | 1827 | Copyright (C) 2010 Free Software Foundation, Inc. |
067d23c9 KY |
1828 | This configure script is free software; the Free Software Foundation |
1829 | gives unlimited permission to copy, distribute and modify it. | |
1830 | _ACEOF | |
1831 | exit | |
1832 | fi | |
1833 | ||
1834 | ## ------------------------ ## | |
1835 | ## Autoconf initialization. ## | |
1836 | ## ------------------------ ## | |
1837 | ||
1838 | # ac_fn_c_try_compile LINENO | |
1839 | # -------------------------- | |
1840 | # Try to compile conftest.$ac_ext, and return whether this succeeded. | |
1841 | ac_fn_c_try_compile () | |
1842 | { | |
1843 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1844 | rm -f conftest.$ac_objext | |
1845 | if { { ac_try="$ac_compile" | |
1846 | case "(($ac_try" in | |
1847 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1848 | *) ac_try_echo=$ac_try;; | |
1849 | esac | |
1850 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1851 | $as_echo "$ac_try_echo"; } >&5 | |
1852 | (eval "$ac_compile") 2>conftest.err | |
1853 | ac_status=$? | |
1854 | if test -s conftest.err; then | |
1855 | grep -v '^ *+' conftest.err >conftest.er1 | |
1856 | cat conftest.er1 >&5 | |
1857 | mv -f conftest.er1 conftest.err | |
1858 | fi | |
1859 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1860 | test $ac_status = 0; } && { | |
1861 | test -z "$ac_c_werror_flag" || | |
1862 | test ! -s conftest.err | |
1863 | } && test -s conftest.$ac_objext; then : | |
1864 | ac_retval=0 | |
1865 | else | |
1866 | $as_echo "$as_me: failed program was:" >&5 | |
1867 | sed 's/^/| /' conftest.$ac_ext >&5 | |
1868 | ||
1869 | ac_retval=1 | |
1870 | fi | |
d6974efa | 1871 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
067d23c9 KY |
1872 | as_fn_set_status $ac_retval |
1873 | ||
1874 | } # ac_fn_c_try_compile | |
1875 | ||
067d23c9 KY |
1876 | # ac_fn_c_try_cpp LINENO |
1877 | # ---------------------- | |
1878 | # Try to preprocess conftest.$ac_ext, and return whether this succeeded. | |
1879 | ac_fn_c_try_cpp () | |
1880 | { | |
1881 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1882 | if { { ac_try="$ac_cpp conftest.$ac_ext" | |
1883 | case "(($ac_try" in | |
1884 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1885 | *) ac_try_echo=$ac_try;; | |
1886 | esac | |
1887 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1888 | $as_echo "$ac_try_echo"; } >&5 | |
1889 | (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err | |
1890 | ac_status=$? | |
1891 | if test -s conftest.err; then | |
1892 | grep -v '^ *+' conftest.err >conftest.er1 | |
1893 | cat conftest.er1 >&5 | |
1894 | mv -f conftest.er1 conftest.err | |
1895 | fi | |
1896 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
2018939f | 1897 | test $ac_status = 0; } > conftest.i && { |
067d23c9 KY |
1898 | test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || |
1899 | test ! -s conftest.err | |
1900 | }; then : | |
1901 | ac_retval=0 | |
1902 | else | |
1903 | $as_echo "$as_me: failed program was:" >&5 | |
1904 | sed 's/^/| /' conftest.$ac_ext >&5 | |
1905 | ||
1906 | ac_retval=1 | |
1907 | fi | |
d6974efa | 1908 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
067d23c9 KY |
1909 | as_fn_set_status $ac_retval |
1910 | ||
1911 | } # ac_fn_c_try_cpp | |
1912 | ||
1913 | # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES | |
1914 | # ------------------------------------------------------- | |
1915 | # Tests whether HEADER exists, giving a warning if it cannot be compiled using | |
1916 | # the include files in INCLUDES and setting the cache variable VAR | |
1917 | # accordingly. | |
1918 | ac_fn_c_check_header_mongrel () | |
1919 | { | |
1920 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
d6974efa | 1921 | if eval \${$3+:} false; then : |
067d23c9 KY |
1922 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 |
1923 | $as_echo_n "checking for $2... " >&6; } | |
d6974efa | 1924 | if eval \${$3+:} false; then : |
067d23c9 KY |
1925 | $as_echo_n "(cached) " >&6 |
1926 | fi | |
1927 | eval ac_res=\$$3 | |
1928 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1929 | $as_echo "$ac_res" >&6; } | |
1930 | else | |
1931 | # Is the header compilable? | |
1932 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 | |
1933 | $as_echo_n "checking $2 usability... " >&6; } | |
1934 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1935 | /* end confdefs.h. */ | |
1936 | $4 | |
1937 | #include <$2> | |
1938 | _ACEOF | |
1939 | if ac_fn_c_try_compile "$LINENO"; then : | |
1940 | ac_header_compiler=yes | |
1941 | else | |
1942 | ac_header_compiler=no | |
1943 | fi | |
1944 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1945 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 | |
1946 | $as_echo "$ac_header_compiler" >&6; } | |
1947 | ||
1948 | # Is the header present? | |
1949 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 | |
1950 | $as_echo_n "checking $2 presence... " >&6; } | |
1951 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1952 | /* end confdefs.h. */ | |
1953 | #include <$2> | |
1954 | _ACEOF | |
1955 | if ac_fn_c_try_cpp "$LINENO"; then : | |
1956 | ac_header_preproc=yes | |
1957 | else | |
1958 | ac_header_preproc=no | |
1959 | fi | |
2018939f | 1960 | rm -f conftest.err conftest.i conftest.$ac_ext |
067d23c9 KY |
1961 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 |
1962 | $as_echo "$ac_header_preproc" >&6; } | |
1963 | ||
1964 | # So? What about this header? | |
1965 | case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( | |
1966 | yes:no: ) | |
1967 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 | |
1968 | $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} | |
1969 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
1970 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
1971 | ;; | |
1972 | no:yes:* ) | |
1973 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 | |
1974 | $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} | |
1975 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 | |
1976 | $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} | |
1977 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 | |
1978 | $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} | |
1979 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 | |
1980 | $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} | |
1981 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
1982 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
1983 | ;; | |
1984 | esac | |
1985 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1986 | $as_echo_n "checking for $2... " >&6; } | |
d6974efa | 1987 | if eval \${$3+:} false; then : |
067d23c9 KY |
1988 | $as_echo_n "(cached) " >&6 |
1989 | else | |
1990 | eval "$3=\$ac_header_compiler" | |
1991 | fi | |
1992 | eval ac_res=\$$3 | |
1993 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1994 | $as_echo "$ac_res" >&6; } | |
1995 | fi | |
d6974efa | 1996 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
067d23c9 KY |
1997 | |
1998 | } # ac_fn_c_check_header_mongrel | |
1999 | ||
2000 | # ac_fn_c_try_run LINENO | |
2001 | # ---------------------- | |
2002 | # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes | |
2003 | # that executables *can* be run. | |
2004 | ac_fn_c_try_run () | |
2005 | { | |
2006 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2007 | if { { ac_try="$ac_link" | |
2008 | case "(($ac_try" in | |
2009 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2010 | *) ac_try_echo=$ac_try;; | |
2011 | esac | |
2012 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
2013 | $as_echo "$ac_try_echo"; } >&5 | |
2014 | (eval "$ac_link") 2>&5 | |
2015 | ac_status=$? | |
2016 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
2017 | test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' | |
2018 | { { case "(($ac_try" in | |
2019 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2020 | *) ac_try_echo=$ac_try;; | |
2021 | esac | |
2022 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
2023 | $as_echo "$ac_try_echo"; } >&5 | |
2024 | (eval "$ac_try") 2>&5 | |
2025 | ac_status=$? | |
2026 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
2027 | test $ac_status = 0; }; }; then : | |
2028 | ac_retval=0 | |
2029 | else | |
2030 | $as_echo "$as_me: program exited with status $ac_status" >&5 | |
2031 | $as_echo "$as_me: failed program was:" >&5 | |
2032 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2033 | ||
2034 | ac_retval=$ac_status | |
2035 | fi | |
2036 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
d6974efa | 2037 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
067d23c9 KY |
2038 | as_fn_set_status $ac_retval |
2039 | ||
2040 | } # ac_fn_c_try_run | |
2041 | ||
2042 | # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES | |
2043 | # ------------------------------------------------------- | |
2044 | # Tests whether HEADER exists and can be compiled using the include files in | |
2045 | # INCLUDES, setting the cache variable VAR accordingly. | |
2046 | ac_fn_c_check_header_compile () | |
2047 | { | |
2048 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2049 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2050 | $as_echo_n "checking for $2... " >&6; } | |
d6974efa | 2051 | if eval \${$3+:} false; then : |
067d23c9 KY |
2052 | $as_echo_n "(cached) " >&6 |
2053 | else | |
2054 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2055 | /* end confdefs.h. */ | |
2056 | $4 | |
2057 | #include <$2> | |
2058 | _ACEOF | |
2059 | if ac_fn_c_try_compile "$LINENO"; then : | |
2060 | eval "$3=yes" | |
2061 | else | |
2062 | eval "$3=no" | |
2063 | fi | |
2064 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2065 | fi | |
2066 | eval ac_res=\$$3 | |
2067 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2068 | $as_echo "$ac_res" >&6; } | |
d6974efa | 2069 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
067d23c9 KY |
2070 | |
2071 | } # ac_fn_c_check_header_compile | |
2072 | ||
1fd182f0 PE |
2073 | # ac_fn_c_try_link LINENO |
2074 | # ----------------------- | |
2075 | # Try to link conftest.$ac_ext, and return whether this succeeded. | |
2076 | ac_fn_c_try_link () | |
2077 | { | |
2078 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2079 | rm -f conftest.$ac_objext conftest$ac_exeext | |
2080 | if { { ac_try="$ac_link" | |
2081 | case "(($ac_try" in | |
2082 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2083 | *) ac_try_echo=$ac_try;; | |
2084 | esac | |
2085 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
2086 | $as_echo "$ac_try_echo"; } >&5 | |
2087 | (eval "$ac_link") 2>conftest.err | |
2088 | ac_status=$? | |
2089 | if test -s conftest.err; then | |
2090 | grep -v '^ *+' conftest.err >conftest.er1 | |
2091 | cat conftest.er1 >&5 | |
2092 | mv -f conftest.er1 conftest.err | |
2093 | fi | |
2094 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
2095 | test $ac_status = 0; } && { | |
2096 | test -z "$ac_c_werror_flag" || | |
2097 | test ! -s conftest.err | |
2098 | } && test -s conftest$ac_exeext && { | |
2099 | test "$cross_compiling" = yes || | |
2100 | $as_test_x conftest$ac_exeext | |
2101 | }; then : | |
2102 | ac_retval=0 | |
2103 | else | |
2104 | $as_echo "$as_me: failed program was:" >&5 | |
2105 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2106 | ||
2107 | ac_retval=1 | |
2108 | fi | |
2109 | # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information | |
2110 | # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would | |
2111 | # interfere with the next link command; also delete a directory that is | |
2112 | # left behind by Apple's compiler. We do this before executing the actions. | |
2113 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
d6974efa | 2114 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
1fd182f0 PE |
2115 | as_fn_set_status $ac_retval |
2116 | ||
2117 | } # ac_fn_c_try_link | |
2118 | ||
2018939f AS |
2119 | # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES |
2120 | # --------------------------------------------- | |
2121 | # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR | |
2122 | # accordingly. | |
067d23c9 KY |
2123 | ac_fn_c_check_decl () |
2124 | { | |
2125 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2018939f AS |
2126 | as_decl_name=`echo $2|sed 's/ *(.*//'` |
2127 | as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` | |
2128 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 | |
2129 | $as_echo_n "checking whether $as_decl_name is declared... " >&6; } | |
d6974efa | 2130 | if eval \${$3+:} false; then : |
067d23c9 KY |
2131 | $as_echo_n "(cached) " >&6 |
2132 | else | |
2133 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2134 | /* end confdefs.h. */ | |
2135 | $4 | |
2136 | int | |
2137 | main () | |
2138 | { | |
2018939f AS |
2139 | #ifndef $as_decl_name |
2140 | #ifdef __cplusplus | |
2141 | (void) $as_decl_use; | |
2142 | #else | |
2143 | (void) $as_decl_name; | |
2144 | #endif | |
067d23c9 KY |
2145 | #endif |
2146 | ||
2147 | ; | |
2148 | return 0; | |
2149 | } | |
2150 | _ACEOF | |
2151 | if ac_fn_c_try_compile "$LINENO"; then : | |
2152 | eval "$3=yes" | |
2153 | else | |
2154 | eval "$3=no" | |
2155 | fi | |
2156 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2157 | fi | |
2158 | eval ac_res=\$$3 | |
2159 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2160 | $as_echo "$ac_res" >&6; } | |
d6974efa | 2161 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
067d23c9 KY |
2162 | |
2163 | } # ac_fn_c_check_decl | |
2164 | ||
2165 | # ac_fn_c_check_header_preproc LINENO HEADER VAR | |
2166 | # ---------------------------------------------- | |
2167 | # Tests whether HEADER is present, setting the cache variable VAR accordingly. | |
2168 | ac_fn_c_check_header_preproc () | |
2169 | { | |
2170 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2171 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2172 | $as_echo_n "checking for $2... " >&6; } | |
d6974efa | 2173 | if eval \${$3+:} false; then : |
067d23c9 KY |
2174 | $as_echo_n "(cached) " >&6 |
2175 | else | |
2176 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2177 | /* end confdefs.h. */ | |
2178 | #include <$2> | |
2179 | _ACEOF | |
2180 | if ac_fn_c_try_cpp "$LINENO"; then : | |
2181 | eval "$3=yes" | |
2182 | else | |
2183 | eval "$3=no" | |
2184 | fi | |
2018939f | 2185 | rm -f conftest.err conftest.i conftest.$ac_ext |
067d23c9 KY |
2186 | fi |
2187 | eval ac_res=\$$3 | |
2188 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2189 | $as_echo "$ac_res" >&6; } | |
d6974efa | 2190 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
067d23c9 KY |
2191 | |
2192 | } # ac_fn_c_check_header_preproc | |
2193 | ||
2194 | # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES | |
2195 | # ---------------------------------------------------- | |
2196 | # Tries to find if the field MEMBER exists in type AGGR, after including | |
2197 | # INCLUDES, setting cache variable VAR accordingly. | |
2198 | ac_fn_c_check_member () | |
2199 | { | |
2200 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2201 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 | |
2202 | $as_echo_n "checking for $2.$3... " >&6; } | |
d6974efa | 2203 | if eval \${$4+:} false; then : |
067d23c9 KY |
2204 | $as_echo_n "(cached) " >&6 |
2205 | else | |
2206 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2207 | /* end confdefs.h. */ | |
2208 | $5 | |
2209 | int | |
2210 | main () | |
2211 | { | |
2212 | static $2 ac_aggr; | |
2213 | if (ac_aggr.$3) | |
2214 | return 0; | |
2215 | ; | |
2216 | return 0; | |
2217 | } | |
2218 | _ACEOF | |
2219 | if ac_fn_c_try_compile "$LINENO"; then : | |
2220 | eval "$4=yes" | |
2221 | else | |
2222 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2223 | /* end confdefs.h. */ | |
2224 | $5 | |
2225 | int | |
2226 | main () | |
2227 | { | |
2228 | static $2 ac_aggr; | |
2229 | if (sizeof ac_aggr.$3) | |
2230 | return 0; | |
2231 | ; | |
2232 | return 0; | |
2233 | } | |
2234 | _ACEOF | |
2235 | if ac_fn_c_try_compile "$LINENO"; then : | |
2236 | eval "$4=yes" | |
2237 | else | |
2238 | eval "$4=no" | |
2239 | fi | |
2240 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2241 | fi | |
2242 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2243 | fi | |
2244 | eval ac_res=\$$4 | |
2245 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2246 | $as_echo "$ac_res" >&6; } | |
d6974efa | 2247 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
067d23c9 KY |
2248 | |
2249 | } # ac_fn_c_check_member | |
2250 | ||
2251 | # ac_fn_c_check_func LINENO FUNC VAR | |
2252 | # ---------------------------------- | |
2253 | # Tests whether FUNC exists, setting the cache variable VAR accordingly | |
2254 | ac_fn_c_check_func () | |
2255 | { | |
2256 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2257 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2258 | $as_echo_n "checking for $2... " >&6; } | |
d6974efa | 2259 | if eval \${$3+:} false; then : |
067d23c9 KY |
2260 | $as_echo_n "(cached) " >&6 |
2261 | else | |
2262 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2263 | /* end confdefs.h. */ | |
2264 | /* Define $2 to an innocuous variant, in case <limits.h> declares $2. | |
2265 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
2266 | #define $2 innocuous_$2 | |
2267 | ||
2268 | /* System header to define __stub macros and hopefully few prototypes, | |
2269 | which can conflict with char $2 (); below. | |
2270 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
2271 | <limits.h> exists even on freestanding compilers. */ | |
2272 | ||
2273 | #ifdef __STDC__ | |
2274 | # include <limits.h> | |
2275 | #else | |
2276 | # include <assert.h> | |
2277 | #endif | |
2278 | ||
2279 | #undef $2 | |
2280 | ||
2281 | /* Override any GCC internal prototype to avoid an error. | |
2282 | Use char because int might match the return type of a GCC | |
2283 | builtin and then its argument prototype would still apply. */ | |
2284 | #ifdef __cplusplus | |
2285 | extern "C" | |
2286 | #endif | |
2287 | char $2 (); | |
2288 | /* The GNU C library defines this for functions which it implements | |
2289 | to always fail with ENOSYS. Some functions are actually named | |
2290 | something starting with __ and the normal name is an alias. */ | |
2291 | #if defined __stub_$2 || defined __stub___$2 | |
2292 | choke me | |
2293 | #endif | |
2294 | ||
2295 | int | |
2296 | main () | |
2297 | { | |
2298 | return $2 (); | |
2299 | ; | |
2300 | return 0; | |
2301 | } | |
2302 | _ACEOF | |
2303 | if ac_fn_c_try_link "$LINENO"; then : | |
2304 | eval "$3=yes" | |
2305 | else | |
2306 | eval "$3=no" | |
2307 | fi | |
2308 | rm -f core conftest.err conftest.$ac_objext \ | |
2309 | conftest$ac_exeext conftest.$ac_ext | |
2310 | fi | |
2311 | eval ac_res=\$$3 | |
2312 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2313 | $as_echo "$ac_res" >&6; } | |
d6974efa | 2314 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
067d23c9 KY |
2315 | |
2316 | } # ac_fn_c_check_func | |
2317 | ||
2318 | # ac_fn_c_check_type LINENO TYPE VAR INCLUDES | |
2319 | # ------------------------------------------- | |
2320 | # Tests whether TYPE exists after having included INCLUDES, setting cache | |
2321 | # variable VAR accordingly. | |
2322 | ac_fn_c_check_type () | |
2323 | { | |
2324 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2325 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2326 | $as_echo_n "checking for $2... " >&6; } | |
d6974efa | 2327 | if eval \${$3+:} false; then : |
067d23c9 KY |
2328 | $as_echo_n "(cached) " >&6 |
2329 | else | |
2330 | eval "$3=no" | |
2331 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2332 | /* end confdefs.h. */ | |
2333 | $4 | |
2334 | int | |
2335 | main () | |
2336 | { | |
2337 | if (sizeof ($2)) | |
2338 | return 0; | |
2339 | ; | |
2340 | return 0; | |
2341 | } | |
2342 | _ACEOF | |
2343 | if ac_fn_c_try_compile "$LINENO"; then : | |
2344 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2345 | /* end confdefs.h. */ | |
2346 | $4 | |
2347 | int | |
2348 | main () | |
2349 | { | |
2350 | if (sizeof (($2))) | |
2351 | return 0; | |
2352 | ; | |
2353 | return 0; | |
2354 | } | |
2355 | _ACEOF | |
2356 | if ac_fn_c_try_compile "$LINENO"; then : | |
2357 | ||
2358 | else | |
2359 | eval "$3=yes" | |
2360 | fi | |
2361 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2362 | fi | |
2363 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2364 | fi | |
2365 | eval ac_res=\$$3 | |
2366 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2367 | $as_echo "$ac_res" >&6; } | |
d6974efa | 2368 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
067d23c9 KY |
2369 | |
2370 | } # ac_fn_c_check_type | |
2371 | cat >config.log <<_ACEOF | |
2372 | This file contains any messages produced by compilers while | |
2373 | running configure, to aid debugging if configure makes a mistake. | |
2374 | ||
2375 | It was created by emacs $as_me 24.0.50, which was | |
d6974efa | 2376 | generated by GNU Autoconf 2.68. Invocation command line was |
067d23c9 KY |
2377 | |
2378 | $ $0 $@ | |
2379 | ||
2380 | _ACEOF | |
2381 | exec 5>>config.log | |
2382 | { | |
2383 | cat <<_ASUNAME | |
2384 | ## --------- ## | |
2385 | ## Platform. ## | |
2386 | ## --------- ## | |
2387 | ||
2388 | hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` | |
2389 | uname -m = `(uname -m) 2>/dev/null || echo unknown` | |
2390 | uname -r = `(uname -r) 2>/dev/null || echo unknown` | |
2391 | uname -s = `(uname -s) 2>/dev/null || echo unknown` | |
2392 | uname -v = `(uname -v) 2>/dev/null || echo unknown` | |
2393 | ||
2394 | /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` | |
2395 | /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` | |
2396 | ||
2397 | /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` | |
2398 | /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` | |
2399 | /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` | |
2400 | /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` | |
2401 | /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` | |
2402 | /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` | |
2403 | /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` | |
2404 | ||
2405 | _ASUNAME | |
2406 | ||
2407 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2408 | for as_dir in $PATH | |
2409 | do | |
2410 | IFS=$as_save_IFS | |
2411 | test -z "$as_dir" && as_dir=. | |
2412 | $as_echo "PATH: $as_dir" | |
2413 | done | |
2414 | IFS=$as_save_IFS | |
2415 | ||
2416 | } >&5 | |
2417 | ||
2418 | cat >&5 <<_ACEOF | |
2419 | ||
2420 | ||
2421 | ## ----------- ## | |
2422 | ## Core tests. ## | |
2423 | ## ----------- ## | |
2424 | ||
2425 | _ACEOF | |
2426 | ||
2427 | ||
2428 | # Keep a trace of the command line. | |
2429 | # Strip out --no-create and --no-recursion so they do not pile up. | |
2430 | # Strip out --silent because we don't want to record it for future runs. | |
2431 | # Also quote any args containing shell meta-characters. | |
2432 | # Make two passes to allow for proper duplicate-argument suppression. | |
2433 | ac_configure_args= | |
2434 | ac_configure_args0= | |
2435 | ac_configure_args1= | |
2436 | ac_must_keep_next=false | |
2437 | for ac_pass in 1 2 | |
2438 | do | |
2439 | for ac_arg | |
2440 | do | |
2441 | case $ac_arg in | |
2442 | -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; | |
2443 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
2444 | | -silent | --silent | --silen | --sile | --sil) | |
2445 | continue ;; | |
2446 | *\'*) | |
2447 | ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
2448 | esac | |
2449 | case $ac_pass in | |
2450 | 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; | |
2451 | 2) | |
2452 | as_fn_append ac_configure_args1 " '$ac_arg'" | |
2453 | if test $ac_must_keep_next = true; then | |
2454 | ac_must_keep_next=false # Got value, back to normal. | |
2455 | else | |
2456 | case $ac_arg in | |
2457 | *=* | --config-cache | -C | -disable-* | --disable-* \ | |
2458 | | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | |
2459 | | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | |
2460 | | -with-* | --with-* | -without-* | --without-* | --x) | |
2461 | case "$ac_configure_args0 " in | |
2462 | "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; | |
2463 | esac | |
2464 | ;; | |
2465 | -* ) ac_must_keep_next=true ;; | |
2466 | esac | |
2467 | fi | |
2468 | as_fn_append ac_configure_args " '$ac_arg'" | |
2469 | ;; | |
2470 | esac | |
2471 | done | |
2472 | done | |
2473 | { ac_configure_args0=; unset ac_configure_args0;} | |
2474 | { ac_configure_args1=; unset ac_configure_args1;} | |
2475 | ||
2476 | # When interrupted or exit'd, cleanup temporary files, and complete | |
2477 | # config.log. We remove comments because anyway the quotes in there | |
2478 | # would cause problems or look ugly. | |
2479 | # WARNING: Use '\'' to represent an apostrophe within the trap. | |
2480 | # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. | |
2481 | trap 'exit_status=$? | |
2482 | # Save into config.log some information that might help in debugging. | |
2483 | { | |
2484 | echo | |
2485 | ||
2018939f | 2486 | $as_echo "## ---------------- ## |
067d23c9 | 2487 | ## Cache variables. ## |
2018939f | 2488 | ## ---------------- ##" |
067d23c9 KY |
2489 | echo |
2490 | # The following way of writing the cache mishandles newlines in values, | |
2491 | ( | |
2492 | for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do | |
2493 | eval ac_val=\$$ac_var | |
2494 | case $ac_val in #( | |
2495 | *${as_nl}*) | |
2496 | case $ac_var in #( | |
2497 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
2498 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
2499 | esac | |
2500 | case $ac_var in #( | |
2501 | _ | IFS | as_nl) ;; #( | |
2502 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
2503 | *) { eval $ac_var=; unset $ac_var;} ;; | |
2504 | esac ;; | |
2505 | esac | |
2506 | done | |
2507 | (set) 2>&1 | | |
2508 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( | |
2509 | *${as_nl}ac_space=\ *) | |
2510 | sed -n \ | |
2511 | "s/'\''/'\''\\\\'\'''\''/g; | |
2512 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" | |
2513 | ;; #( | |
2514 | *) | |
2515 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" | |
2516 | ;; | |
2517 | esac | | |
2518 | sort | |
2519 | ) | |
2520 | echo | |
2521 | ||
2018939f | 2522 | $as_echo "## ----------------- ## |
067d23c9 | 2523 | ## Output variables. ## |
2018939f | 2524 | ## ----------------- ##" |
067d23c9 KY |
2525 | echo |
2526 | for ac_var in $ac_subst_vars | |
2527 | do | |
2528 | eval ac_val=\$$ac_var | |
2529 | case $ac_val in | |
2530 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
2531 | esac | |
2532 | $as_echo "$ac_var='\''$ac_val'\''" | |
2533 | done | sort | |
2534 | echo | |
2535 | ||
2536 | if test -n "$ac_subst_files"; then | |
2018939f | 2537 | $as_echo "## ------------------- ## |
067d23c9 | 2538 | ## File substitutions. ## |
2018939f | 2539 | ## ------------------- ##" |
067d23c9 KY |
2540 | echo |
2541 | for ac_var in $ac_subst_files | |
2542 | do | |
2543 | eval ac_val=\$$ac_var | |
2544 | case $ac_val in | |
2545 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
2546 | esac | |
2547 | $as_echo "$ac_var='\''$ac_val'\''" | |
2548 | done | sort | |
2549 | echo | |
2550 | fi | |
2551 | ||
2552 | if test -s confdefs.h; then | |
2018939f | 2553 | $as_echo "## ----------- ## |
067d23c9 | 2554 | ## confdefs.h. ## |
2018939f | 2555 | ## ----------- ##" |
067d23c9 KY |
2556 | echo |
2557 | cat confdefs.h | |
2558 | echo | |
2559 | fi | |
2560 | test "$ac_signal" != 0 && | |
2561 | $as_echo "$as_me: caught signal $ac_signal" | |
2562 | $as_echo "$as_me: exit $exit_status" | |
2563 | } >&5 | |
2564 | rm -f core *.core core.conftest.* && | |
2565 | rm -f -r conftest* confdefs* conf$$* $ac_clean_files && | |
2566 | exit $exit_status | |
2567 | ' 0 | |
2568 | for ac_signal in 1 2 13 15; do | |
2569 | trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal | |
2570 | done | |
2571 | ac_signal=0 | |
2572 | ||
2573 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
2574 | rm -f -r conftest* confdefs.h | |
2575 | ||
2576 | $as_echo "/* confdefs.h */" > confdefs.h | |
2577 | ||
2578 | # Predefined preprocessor variables. | |
2579 | ||
2580 | cat >>confdefs.h <<_ACEOF | |
2581 | #define PACKAGE_NAME "$PACKAGE_NAME" | |
2582 | _ACEOF | |
2583 | ||
2584 | cat >>confdefs.h <<_ACEOF | |
2585 | #define PACKAGE_TARNAME "$PACKAGE_TARNAME" | |
2586 | _ACEOF | |
2587 | ||
2588 | cat >>confdefs.h <<_ACEOF | |
2589 | #define PACKAGE_VERSION "$PACKAGE_VERSION" | |
2590 | _ACEOF | |
2591 | ||
2592 | cat >>confdefs.h <<_ACEOF | |
2593 | #define PACKAGE_STRING "$PACKAGE_STRING" | |
2594 | _ACEOF | |
2595 | ||
2596 | cat >>confdefs.h <<_ACEOF | |
2597 | #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" | |
2598 | _ACEOF | |
2599 | ||
2600 | cat >>confdefs.h <<_ACEOF | |
2601 | #define PACKAGE_URL "$PACKAGE_URL" | |
2602 | _ACEOF | |
2603 | ||
2604 | ||
2605 | # Let the site file select an alternate cache file if it wants to. | |
2606 | # Prefer an explicitly selected file to automatically selected ones. | |
2607 | ac_site_file1=NONE | |
2608 | ac_site_file2=NONE | |
2609 | if test -n "$CONFIG_SITE"; then | |
2018939f AS |
2610 | # We do not want a PATH search for config.site. |
2611 | case $CONFIG_SITE in #(( | |
2612 | -*) ac_site_file1=./$CONFIG_SITE;; | |
2613 | */*) ac_site_file1=$CONFIG_SITE;; | |
2614 | *) ac_site_file1=./$CONFIG_SITE;; | |
2615 | esac | |
067d23c9 KY |
2616 | elif test "x$prefix" != xNONE; then |
2617 | ac_site_file1=$prefix/share/config.site | |
2618 | ac_site_file2=$prefix/etc/config.site | |
2619 | else | |
2620 | ac_site_file1=$ac_default_prefix/share/config.site | |
2621 | ac_site_file2=$ac_default_prefix/etc/config.site | |
2622 | fi | |
2623 | for ac_site_file in "$ac_site_file1" "$ac_site_file2" | |
2624 | do | |
2625 | test "x$ac_site_file" = xNONE && continue | |
2626 | if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then | |
2627 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 | |
2628 | $as_echo "$as_me: loading site script $ac_site_file" >&6;} | |
2629 | sed 's/^/| /' "$ac_site_file" >&5 | |
2018939f AS |
2630 | . "$ac_site_file" \ |
2631 | || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
2632 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
2633 | as_fn_error $? "failed to load site script $ac_site_file | |
d6974efa | 2634 | See \`config.log' for more details" "$LINENO" 5; } |
067d23c9 KY |
2635 | fi |
2636 | done | |
2637 | ||
2638 | if test -r "$cache_file"; then | |
2639 | # Some versions of bash will fail to source /dev/null (special files | |
2640 | # actually), so we avoid doing that. DJGPP emulates it as a regular file. | |
2641 | if test /dev/null != "$cache_file" && test -f "$cache_file"; then | |
2642 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 | |
2643 | $as_echo "$as_me: loading cache $cache_file" >&6;} | |
2644 | case $cache_file in | |
2645 | [\\/]* | ?:[\\/]* ) . "$cache_file";; | |
2646 | *) . "./$cache_file";; | |
2647 | esac | |
2648 | fi | |
2649 | else | |
2650 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 | |
2651 | $as_echo "$as_me: creating cache $cache_file" >&6;} | |
2652 | >$cache_file | |
2653 | fi | |
2654 | ||
2655 | as_fn_append ac_header_list " stdlib.h" | |
2656 | as_fn_append ac_header_list " unistd.h" | |
2657 | as_fn_append ac_header_list " sys/param.h" | |
e275c824 PE |
2658 | gl_getopt_required=GNU |
2659 | as_fn_append ac_header_list " getopt.h" | |
067d23c9 | 2660 | as_fn_append ac_func_list " alarm" |
16c3e636 | 2661 | as_fn_append ac_func_list " tzset" |
1fd182f0 PE |
2662 | as_fn_append ac_header_list " sys/time.h" |
2663 | as_fn_append ac_func_list " localtime_r" | |
067d23c9 KY |
2664 | # Check that the precious variables saved in the cache have kept the same |
2665 | # value. | |
2666 | ac_cache_corrupted=false | |
2667 | for ac_var in $ac_precious_vars; do | |
2668 | eval ac_old_set=\$ac_cv_env_${ac_var}_set | |
2669 | eval ac_new_set=\$ac_env_${ac_var}_set | |
2670 | eval ac_old_val=\$ac_cv_env_${ac_var}_value | |
2671 | eval ac_new_val=\$ac_env_${ac_var}_value | |
2672 | case $ac_old_set,$ac_new_set in | |
2673 | set,) | |
2674 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 | |
2675 | $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} | |
2676 | ac_cache_corrupted=: ;; | |
2677 | ,set) | |
2678 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 | |
2679 | $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} | |
2680 | ac_cache_corrupted=: ;; | |
2681 | ,);; | |
2682 | *) | |
2683 | if test "x$ac_old_val" != "x$ac_new_val"; then | |
2684 | # differences in whitespace do not lead to failure. | |
2685 | ac_old_val_w=`echo x $ac_old_val` | |
2686 | ac_new_val_w=`echo x $ac_new_val` | |
2687 | if test "$ac_old_val_w" != "$ac_new_val_w"; then | |
2688 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 | |
2689 | $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} | |
2690 | ac_cache_corrupted=: | |
2691 | else | |
2692 | { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 | |
2693 | $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} | |
2694 | eval $ac_var=\$ac_old_val | |
2695 | fi | |
2696 | { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 | |
2697 | $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} | |
2698 | { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 | |
2699 | $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} | |
2700 | fi;; | |
2701 | esac | |
2702 | # Pass precious variables to config.status. | |
2703 | if test "$ac_new_set" = set; then | |
2704 | case $ac_new_val in | |
2705 | *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; | |
2706 | *) ac_arg=$ac_var=$ac_new_val ;; | |
2707 | esac | |
2708 | case " $ac_configure_args " in | |
2709 | *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. | |
2710 | *) as_fn_append ac_configure_args " '$ac_arg'" ;; | |
2711 | esac | |
2712 | fi | |
2713 | done | |
2714 | if $ac_cache_corrupted; then | |
2715 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
2716 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
2717 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 | |
2718 | $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} | |
2018939f | 2719 | as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 |
067d23c9 KY |
2720 | fi |
2721 | ## -------------------- ## | |
2722 | ## Main body of script. ## | |
2723 | ## -------------------- ## | |
2724 | ||
2725 | ac_ext=c | |
2726 | ac_cpp='$CPP $CPPFLAGS' | |
2727 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2728 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2729 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2730 | ||
2731 | ||
2732 | ac_config_headers="$ac_config_headers src/config.h:src/config.in" | |
2733 | ||
2734 | ||
743c80a7 | 2735 | am__api_version='1.11' |
067d23c9 | 2736 | |
743c80a7 PE |
2737 | ac_aux_dir= |
2738 | for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do | |
2739 | if test -f "$ac_dir/install-sh"; then | |
2740 | ac_aux_dir=$ac_dir | |
2741 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
2742 | break | |
2743 | elif test -f "$ac_dir/install.sh"; then | |
2744 | ac_aux_dir=$ac_dir | |
2745 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
2746 | break | |
2747 | elif test -f "$ac_dir/shtool"; then | |
2748 | ac_aux_dir=$ac_dir | |
2749 | ac_install_sh="$ac_aux_dir/shtool install -c" | |
2750 | break | |
2751 | fi | |
2752 | done | |
2753 | if test -z "$ac_aux_dir"; then | |
2754 | as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 | |
2755 | fi | |
067d23c9 | 2756 | |
743c80a7 PE |
2757 | # These three variables are undocumented and unsupported, |
2758 | # and are intended to be withdrawn in a future Autoconf release. | |
2759 | # They can cause serious problems if a builder's source tree is in a directory | |
2760 | # whose full name contains unusual characters. | |
2761 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. | |
2762 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. | |
2763 | ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. | |
067d23c9 | 2764 | |
067d23c9 | 2765 | |
743c80a7 PE |
2766 | # Find a good install program. We prefer a C program (faster), |
2767 | # so one script is as good as another. But avoid the broken or | |
2768 | # incompatible versions: | |
2769 | # SysV /etc/install, /usr/sbin/install | |
2770 | # SunOS /usr/etc/install | |
2771 | # IRIX /sbin/install | |
2772 | # AIX /bin/install | |
2773 | # AmigaOS /C/install, which installs bootblocks on floppy discs | |
2774 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag | |
2775 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
2776 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
2777 | # OS/2's system install, which has a completely different semantic | |
2778 | # ./install, which can be erroneously created by make from ./install.sh. | |
2779 | # Reject install programs that cannot install multiple files. | |
2780 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 | |
2781 | $as_echo_n "checking for a BSD-compatible install... " >&6; } | |
2782 | if test -z "$INSTALL"; then | |
d6974efa | 2783 | if ${ac_cv_path_install+:} false; then : |
743c80a7 PE |
2784 | $as_echo_n "(cached) " >&6 |
2785 | else | |
2786 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2787 | for as_dir in $PATH | |
2788 | do | |
2789 | IFS=$as_save_IFS | |
2790 | test -z "$as_dir" && as_dir=. | |
2791 | # Account for people who put trailing slashes in PATH elements. | |
2792 | case $as_dir/ in #(( | |
2793 | ./ | .// | /[cC]/* | \ | |
2794 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ | |
2795 | ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ | |
2796 | /usr/ucb/* ) ;; | |
2797 | *) | |
2798 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
2799 | # Don't use installbsd from OSF since it installs stuff as root | |
2800 | # by default. | |
2801 | for ac_prog in ginstall scoinst install; do | |
2802 | for ac_exec_ext in '' $ac_executable_extensions; do | |
2803 | if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then | |
2804 | if test $ac_prog = install && | |
2805 | grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
2806 | # AIX install. It has an incompatible calling convention. | |
2807 | : | |
2808 | elif test $ac_prog = install && | |
2809 | grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
2810 | # program-specific install script used by HP pwplus--don't use. | |
2811 | : | |
2812 | else | |
2813 | rm -rf conftest.one conftest.two conftest.dir | |
2814 | echo one > conftest.one | |
2815 | echo two > conftest.two | |
2816 | mkdir conftest.dir | |
2817 | if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && | |
2818 | test -s conftest.one && test -s conftest.two && | |
2819 | test -s conftest.dir/conftest.one && | |
2820 | test -s conftest.dir/conftest.two | |
2821 | then | |
2822 | ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" | |
2823 | break 3 | |
2824 | fi | |
2825 | fi | |
2826 | fi | |
2827 | done | |
2828 | done | |
2829 | ;; | |
2830 | esac | |
067d23c9 | 2831 | |
743c80a7 PE |
2832 | done |
2833 | IFS=$as_save_IFS | |
067d23c9 | 2834 | |
743c80a7 | 2835 | rm -rf conftest.one conftest.two conftest.dir |
067d23c9 | 2836 | |
067d23c9 | 2837 | fi |
743c80a7 PE |
2838 | if test "${ac_cv_path_install+set}" = set; then |
2839 | INSTALL=$ac_cv_path_install | |
2840 | else | |
2841 | # As a last resort, use the slow shell script. Don't cache a | |
2842 | # value for INSTALL within a source directory, because that will | |
2843 | # break other packages using the cache if that directory is | |
2844 | # removed, or if the value is a relative name. | |
2845 | INSTALL=$ac_install_sh | |
2846 | fi | |
067d23c9 | 2847 | fi |
743c80a7 PE |
2848 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 |
2849 | $as_echo "$INSTALL" >&6; } | |
067d23c9 | 2850 | |
743c80a7 PE |
2851 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. |
2852 | # It thinks the first close brace ends the variable substitution. | |
2853 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
067d23c9 | 2854 | |
743c80a7 | 2855 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' |
067d23c9 | 2856 | |
743c80a7 | 2857 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' |
067d23c9 | 2858 | |
743c80a7 PE |
2859 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 |
2860 | $as_echo_n "checking whether build environment is sane... " >&6; } | |
2861 | # Just in case | |
2862 | sleep 1 | |
2863 | echo timestamp > conftest.file | |
2864 | # Reject unsafe characters in $srcdir or the absolute working directory | |
2865 | # name. Accept space and tab only in the latter. | |
2866 | am_lf=' | |
2867 | ' | |
2868 | case `pwd` in | |
2869 | *[\\\"\#\$\&\'\`$am_lf]*) | |
d6974efa | 2870 | as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; |
743c80a7 PE |
2871 | esac |
2872 | case $srcdir in | |
2873 | *[\\\"\#\$\&\'\`$am_lf\ \ ]*) | |
d6974efa | 2874 | as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; |
743c80a7 | 2875 | esac |
067d23c9 | 2876 | |
743c80a7 PE |
2877 | # Do `set' in a subshell so we don't clobber the current shell's |
2878 | # arguments. Must try -L first in case configure is actually a | |
2879 | # symlink; some systems play weird games with the mod time of symlinks | |
2880 | # (eg FreeBSD returns the mod time of the symlink's containing | |
2881 | # directory). | |
2882 | if ( | |
2883 | set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` | |
2884 | if test "$*" = "X"; then | |
2885 | # -L didn't work. | |
2886 | set X `ls -t "$srcdir/configure" conftest.file` | |
2887 | fi | |
2888 | rm -f conftest.file | |
2889 | if test "$*" != "X $srcdir/configure conftest.file" \ | |
2890 | && test "$*" != "X conftest.file $srcdir/configure"; then | |
2891 | ||
2892 | # If neither matched, then we have a broken ls. This can happen | |
2893 | # if, for instance, CONFIG_SHELL is bash and it inherits a | |
2894 | # broken ls alias from the environment. This has actually | |
2895 | # happened. Such a system could not be considered "sane". | |
2896 | as_fn_error $? "ls -t appears to fail. Make sure there is not a broken | |
2897 | alias in your environment" "$LINENO" 5 | |
2898 | fi | |
067d23c9 | 2899 | |
743c80a7 PE |
2900 | test "$2" = conftest.file |
2901 | ) | |
2902 | then | |
2903 | # Ok. | |
2904 | : | |
067d23c9 | 2905 | else |
743c80a7 PE |
2906 | as_fn_error $? "newly created file is older than distributed files! |
2907 | Check your system clock" "$LINENO" 5 | |
067d23c9 | 2908 | fi |
743c80a7 PE |
2909 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
2910 | $as_echo "yes" >&6; } | |
2911 | test "$program_prefix" != NONE && | |
2912 | program_transform_name="s&^&$program_prefix&;$program_transform_name" | |
2913 | # Use a double $ so make ignores it. | |
2914 | test "$program_suffix" != NONE && | |
2915 | program_transform_name="s&\$&$program_suffix&;$program_transform_name" | |
2916 | # Double any \ or $. | |
2917 | # By default was `s,x,x', remove it if useless. | |
2918 | ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' | |
2919 | program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` | |
067d23c9 | 2920 | |
743c80a7 PE |
2921 | # expand $ac_aux_dir to an absolute path |
2922 | am_aux_dir=`cd $ac_aux_dir && pwd` | |
067d23c9 | 2923 | |
743c80a7 PE |
2924 | if test x"${MISSING+set}" != xset; then |
2925 | case $am_aux_dir in | |
2926 | *\ * | *\ *) | |
2927 | MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; | |
2928 | *) | |
2929 | MISSING="\${SHELL} $am_aux_dir/missing" ;; | |
2930 | esac | |
067d23c9 | 2931 | fi |
743c80a7 PE |
2932 | # Use eval to expand $SHELL |
2933 | if eval "$MISSING --run true"; then | |
2934 | am_missing_run="$MISSING --run " | |
067d23c9 | 2935 | else |
743c80a7 PE |
2936 | am_missing_run= |
2937 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 | |
2938 | $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} | |
067d23c9 KY |
2939 | fi |
2940 | ||
743c80a7 PE |
2941 | if test x"${install_sh}" != xset; then |
2942 | case $am_aux_dir in | |
2943 | *\ * | *\ *) | |
2944 | install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; | |
2945 | *) | |
2946 | install_sh="\${SHELL} $am_aux_dir/install-sh" | |
2947 | esac | |
067d23c9 KY |
2948 | fi |
2949 | ||
743c80a7 PE |
2950 | # Installed binaries are usually stripped using `strip' when the user |
2951 | # run `make install-strip'. However `strip' might not be the right | |
2952 | # tool to use in cross-compilation environments, therefore Automake | |
2953 | # will honor the `STRIP' environment variable to overrule this program. | |
2954 | if test "$cross_compiling" != no; then | |
2955 | if test -n "$ac_tool_prefix"; then | |
2956 | # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. | |
2957 | set dummy ${ac_tool_prefix}strip; ac_word=$2 | |
2958 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2959 | $as_echo_n "checking for $ac_word... " >&6; } | |
d6974efa | 2960 | if ${ac_cv_prog_STRIP+:} false; then : |
743c80a7 | 2961 | $as_echo_n "(cached) " >&6 |
067d23c9 | 2962 | else |
743c80a7 PE |
2963 | if test -n "$STRIP"; then |
2964 | ac_cv_prog_STRIP="$STRIP" # Let the user override the test. | |
2965 | else | |
2966 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2967 | for as_dir in $PATH | |
2968 | do | |
2969 | IFS=$as_save_IFS | |
2970 | test -z "$as_dir" && as_dir=. | |
2971 | for ac_exec_ext in '' $ac_executable_extensions; do | |
2972 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
2973 | ac_cv_prog_STRIP="${ac_tool_prefix}strip" | |
2974 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
2975 | break 2 | |
2976 | fi | |
2977 | done | |
2978 | done | |
2979 | IFS=$as_save_IFS | |
067d23c9 KY |
2980 | |
2981 | fi | |
067d23c9 | 2982 | fi |
743c80a7 PE |
2983 | STRIP=$ac_cv_prog_STRIP |
2984 | if test -n "$STRIP"; then | |
2985 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 | |
2986 | $as_echo "$STRIP" >&6; } | |
2987 | else | |
2988 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
2989 | $as_echo "no" >&6; } | |
067d23c9 KY |
2990 | fi |
2991 | ||
2992 | ||
067d23c9 | 2993 | fi |
743c80a7 PE |
2994 | if test -z "$ac_cv_prog_STRIP"; then |
2995 | ac_ct_STRIP=$STRIP | |
2996 | # Extract the first word of "strip", so it can be a program name with args. | |
2997 | set dummy strip; ac_word=$2 | |
2998 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2999 | $as_echo_n "checking for $ac_word... " >&6; } | |
d6974efa | 3000 | if ${ac_cv_prog_ac_ct_STRIP+:} false; then : |
743c80a7 PE |
3001 | $as_echo_n "(cached) " >&6 |
3002 | else | |
3003 | if test -n "$ac_ct_STRIP"; then | |
3004 | ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. | |
3005 | else | |
3006 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3007 | for as_dir in $PATH | |
3008 | do | |
3009 | IFS=$as_save_IFS | |
3010 | test -z "$as_dir" && as_dir=. | |
3011 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3012 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
3013 | ac_cv_prog_ac_ct_STRIP="strip" | |
3014 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3015 | break 2 | |
3016 | fi | |
3017 | done | |
3018 | done | |
3019 | IFS=$as_save_IFS | |
3020 | ||
3021 | fi | |
3022 | fi | |
3023 | ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP | |
3024 | if test -n "$ac_ct_STRIP"; then | |
3025 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 | |
3026 | $as_echo "$ac_ct_STRIP" >&6; } | |
3027 | else | |
3028 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3029 | $as_echo "no" >&6; } | |
3030 | fi | |
3031 | ||
3032 | if test "x$ac_ct_STRIP" = x; then | |
3033 | STRIP=":" | |
3034 | else | |
3035 | case $cross_compiling:$ac_tool_warned in | |
3036 | yes:) | |
3037 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
3038 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
3039 | ac_tool_warned=yes ;; | |
3040 | esac | |
3041 | STRIP=$ac_ct_STRIP | |
3042 | fi | |
3043 | else | |
3044 | STRIP="$ac_cv_prog_STRIP" | |
3045 | fi | |
3046 | ||
3047 | fi | |
3048 | INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" | |
3049 | ||
3050 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 | |
3051 | $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } | |
3052 | if test -z "$MKDIR_P"; then | |
d6974efa | 3053 | if ${ac_cv_path_mkdir+:} false; then : |
743c80a7 PE |
3054 | $as_echo_n "(cached) " >&6 |
3055 | else | |
3056 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3057 | for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin | |
3058 | do | |
3059 | IFS=$as_save_IFS | |
3060 | test -z "$as_dir" && as_dir=. | |
3061 | for ac_prog in mkdir gmkdir; do | |
3062 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3063 | { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue | |
3064 | case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( | |
3065 | 'mkdir (GNU coreutils) '* | \ | |
3066 | 'mkdir (coreutils) '* | \ | |
3067 | 'mkdir (fileutils) '4.1*) | |
3068 | ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext | |
3069 | break 3;; | |
3070 | esac | |
3071 | done | |
3072 | done | |
3073 | done | |
3074 | IFS=$as_save_IFS | |
3075 | ||
3076 | fi | |
3077 | ||
3078 | test -d ./--version && rmdir ./--version | |
3079 | if test "${ac_cv_path_mkdir+set}" = set; then | |
3080 | MKDIR_P="$ac_cv_path_mkdir -p" | |
3081 | else | |
3082 | # As a last resort, use the slow shell script. Don't cache a | |
3083 | # value for MKDIR_P within a source directory, because that will | |
3084 | # break other packages using the cache if that directory is | |
3085 | # removed, or if the value is a relative name. | |
3086 | MKDIR_P="$ac_install_sh -d" | |
3087 | fi | |
3088 | fi | |
3089 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 | |
3090 | $as_echo "$MKDIR_P" >&6; } | |
3091 | ||
a451f14b | 3092 | |
743c80a7 PE |
3093 | mkdir_p="$MKDIR_P" |
3094 | case $mkdir_p in | |
3095 | [\\/$]* | ?:[\\/]*) ;; | |
3096 | */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; | |
3097 | esac | |
3098 | ||
3099 | for ac_prog in gawk mawk nawk awk | |
3100 | do | |
3101 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
3102 | set dummy $ac_prog; ac_word=$2 | |
3103 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3104 | $as_echo_n "checking for $ac_word... " >&6; } | |
d6974efa | 3105 | if ${ac_cv_prog_AWK+:} false; then : |
743c80a7 PE |
3106 | $as_echo_n "(cached) " >&6 |
3107 | else | |
3108 | if test -n "$AWK"; then | |
3109 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
3110 | else | |
3111 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3112 | for as_dir in $PATH | |
3113 | do | |
3114 | IFS=$as_save_IFS | |
3115 | test -z "$as_dir" && as_dir=. | |
3116 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3117 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
3118 | ac_cv_prog_AWK="$ac_prog" | |
3119 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3120 | break 2 | |
3121 | fi | |
3122 | done | |
3123 | done | |
3124 | IFS=$as_save_IFS | |
3125 | ||
3126 | fi | |
3127 | fi | |
3128 | AWK=$ac_cv_prog_AWK | |
3129 | if test -n "$AWK"; then | |
3130 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 | |
3131 | $as_echo "$AWK" >&6; } | |
3132 | else | |
3133 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3134 | $as_echo "no" >&6; } | |
3135 | fi | |
3136 | ||
3137 | ||
3138 | test -n "$AWK" && break | |
3139 | done | |
3140 | ||
3141 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 | |
3142 | $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } | |
3143 | set x ${MAKE-make} | |
3144 | ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` | |
d6974efa | 3145 | if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : |
743c80a7 PE |
3146 | $as_echo_n "(cached) " >&6 |
3147 | else | |
3148 | cat >conftest.make <<\_ACEOF | |
3149 | SHELL = /bin/sh | |
3150 | all: | |
3151 | @echo '@@@%%%=$(MAKE)=@@@%%%' | |
3152 | _ACEOF | |
3153 | # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. | |
3154 | case `${MAKE-make} -f conftest.make 2>/dev/null` in | |
3155 | *@@@%%%=?*=@@@%%%*) | |
3156 | eval ac_cv_prog_make_${ac_make}_set=yes;; | |
3157 | *) | |
3158 | eval ac_cv_prog_make_${ac_make}_set=no;; | |
3159 | esac | |
3160 | rm -f conftest.make | |
3161 | fi | |
3162 | if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then | |
3163 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
3164 | $as_echo "yes" >&6; } | |
3165 | SET_MAKE= | |
3166 | else | |
3167 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3168 | $as_echo "no" >&6; } | |
3169 | SET_MAKE="MAKE=${MAKE-make}" | |
3170 | fi | |
3171 | ||
3172 | rm -rf .tst 2>/dev/null | |
3173 | mkdir .tst 2>/dev/null | |
3174 | if test -d .tst; then | |
3175 | am__leading_dot=. | |
3176 | else | |
3177 | am__leading_dot=_ | |
3178 | fi | |
3179 | rmdir .tst 2>/dev/null | |
3180 | ||
3181 | if test "`cd $srcdir && pwd`" != "`pwd`"; then | |
3182 | # Use -I$(srcdir) only when $(srcdir) != ., so that make's output | |
3183 | # is not polluted with repeated "-I." | |
3184 | am__isrc=' -I$(srcdir)' | |
3185 | # test to see if srcdir already configured | |
3186 | if test -f $srcdir/config.status; then | |
3187 | as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 | |
3188 | fi | |
3189 | fi | |
3190 | ||
3191 | # test whether we have cygpath | |
3192 | if test -z "$CYGPATH_W"; then | |
3193 | if (cygpath --version) >/dev/null 2>/dev/null; then | |
3194 | CYGPATH_W='cygpath -w' | |
3195 | else | |
3196 | CYGPATH_W=echo | |
3197 | fi | |
3198 | fi | |
3199 | ||
3200 | ||
3201 | # Define the identity of the package. | |
3202 | PACKAGE='emacs' | |
3203 | VERSION='24.0.50' | |
3204 | ||
3205 | ||
3206 | cat >>confdefs.h <<_ACEOF | |
3207 | #define PACKAGE "$PACKAGE" | |
3208 | _ACEOF | |
3209 | ||
3210 | ||
3211 | cat >>confdefs.h <<_ACEOF | |
3212 | #define VERSION "$VERSION" | |
3213 | _ACEOF | |
3214 | ||
3215 | # Some tools Automake needs. | |
3216 | ||
3217 | ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} | |
3218 | ||
3219 | ||
3220 | AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} | |
3221 | ||
3222 | ||
3223 | AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} | |
3224 | ||
3225 | ||
3226 | AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} | |
3227 | ||
3228 | ||
3229 | MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} | |
3230 | ||
3231 | # We need awk for the "check" target. The system "awk" is bad on | |
3232 | # some platforms. | |
3233 | # Always define AMTAR for backward compatibility. | |
3234 | ||
3235 | AMTAR=${AMTAR-"${am_missing_run}tar"} | |
3236 | ||
3237 | am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' | |
3238 | ||
3239 | ||
3240 | ||
3241 | ||
3242 | ||
3243 | ||
3244 | ||
3245 | ||
3246 | lispdir='${datadir}/emacs/${version}/lisp' | |
3247 | locallisppath='${datadir}/emacs/${version}/site-lisp:'\ | |
3248 | '${datadir}/emacs/site-lisp' | |
3249 | lisppath='${locallisppath}:${lispdir}:${datadir}/emacs/${version}/leim' | |
3250 | etcdir='${datadir}/emacs/${version}/etc' | |
3251 | archlibdir='${libexecdir}/emacs/${version}/${configuration}' | |
3252 | docdir='${datadir}/emacs/${version}/etc' | |
3253 | gamedir='${localstatedir}/games/emacs' | |
3254 | ||
3255 | ||
3256 | ||
3257 | ||
3258 | # Check whether --with-pop was given. | |
3259 | if test "${with_pop+set}" = set; then : | |
3260 | withval=$with_pop; | |
3261 | else | |
3262 | with_pop=yes | |
3263 | fi | |
3264 | ||
3265 | if test "$with_pop" = yes; then | |
3266 | $as_echo "#define MAIL_USE_POP 1" >>confdefs.h | |
3267 | ||
3268 | fi | |
3269 | ||
3270 | ||
3271 | # Check whether --with-kerberos was given. | |
3272 | if test "${with_kerberos+set}" = set; then : | |
3273 | withval=$with_kerberos; | |
3274 | else | |
3275 | with_kerberos=no | |
3276 | fi | |
3277 | ||
3278 | if test "$with_kerberos" != no; then | |
3279 | $as_echo "#define KERBEROS 1" >>confdefs.h | |
3280 | ||
3281 | fi | |
3282 | ||
3283 | ||
3284 | # Check whether --with-kerberos5 was given. | |
3285 | if test "${with_kerberos5+set}" = set; then : | |
3286 | withval=$with_kerberos5; | |
3287 | else | |
3288 | with_kerberos5=no | |
3289 | fi | |
3290 | ||
3291 | if test "${with_kerberos5}" != no; then | |
3292 | if test "${with_kerberos}" = no; then | |
3293 | with_kerberos=yes | |
3294 | $as_echo "#define KERBEROS 1" >>confdefs.h | |
3295 | ||
3296 | fi | |
3297 | ||
3298 | $as_echo "#define KERBEROS5 1" >>confdefs.h | |
3299 | ||
3300 | fi | |
3301 | ||
3302 | ||
3303 | # Check whether --with-hesiod was given. | |
3304 | if test "${with_hesiod+set}" = set; then : | |
3305 | withval=$with_hesiod; | |
3306 | else | |
3307 | with_hesiod=no | |
3308 | fi | |
3309 | ||
3310 | if test "$with_hesiod" != no; then | |
3311 | ||
3312 | $as_echo "#define HESIOD 1" >>confdefs.h | |
3313 | ||
3314 | fi | |
3315 | ||
3316 | ||
3317 | # Check whether --with-mmdf was given. | |
3318 | if test "${with_mmdf+set}" = set; then : | |
3319 | withval=$with_mmdf; | |
3320 | else | |
3321 | with_mmdf=no | |
3322 | fi | |
3323 | ||
3324 | if test "$with_mmdf" != no; then | |
3325 | ||
3326 | $as_echo "#define MAIL_USE_MMDF 1" >>confdefs.h | |
3327 | ||
3328 | fi | |
3329 | ||
3330 | ||
3331 | # Check whether --with-mail-unlink was given. | |
3332 | if test "${with_mail_unlink+set}" = set; then : | |
3333 | withval=$with_mail_unlink; | |
3334 | else | |
3335 | with_mail_unlink=no | |
3336 | fi | |
3337 | ||
3338 | if test "$with_mail_unlink" != no; then | |
3339 | ||
3340 | $as_echo "#define MAIL_UNLINK_SPOOL 1" >>confdefs.h | |
3341 | ||
3342 | fi | |
3343 | ||
3344 | ||
3345 | # Check whether --with-mailhost was given. | |
3346 | if test "${with_mailhost+set}" = set; then : | |
3347 | withval=$with_mailhost; | |
3348 | cat >>confdefs.h <<_ACEOF | |
3349 | #define MAILHOST "$withval" | |
3350 | _ACEOF | |
3351 | ||
3352 | fi | |
3353 | ||
3354 | ||
3355 | ||
067d23c9 KY |
3356 | # Check whether --with-sound was given. |
3357 | if test "${with_sound+set}" = set; then : | |
3358 | withval=$with_sound; | |
3359 | else | |
3360 | with_sound=yes | |
3361 | fi | |
3362 | ||
3363 | ||
3364 | ||
3365 | # Check whether --with-sync-input was given. | |
3366 | if test "${with_sync_input+set}" = set; then : | |
3367 | withval=$with_sync_input; | |
3368 | else | |
3369 | with_sync_input=yes | |
3370 | fi | |
3371 | ||
3372 | if test "$with_sync_input" = yes; then | |
3373 | ||
3374 | $as_echo "#define SYNC_INPUT 1" >>confdefs.h | |
3375 | ||
3376 | fi | |
3377 | ||
3378 | ||
3379 | # Check whether --with-x-toolkit was given. | |
3380 | if test "${with_x_toolkit+set}" = set; then : | |
3381 | withval=$with_x_toolkit; case "${withval}" in | |
3382 | y | ye | yes ) val=gtk ;; | |
3383 | n | no ) val=no ;; | |
3384 | l | lu | luc | luci | lucid ) val=lucid ;; | |
3385 | a | at | ath | athe | athen | athena ) val=athena ;; | |
3386 | m | mo | mot | moti | motif ) val=motif ;; | |
3387 | g | gt | gtk ) val=gtk ;; | |
3388 | gtk3 ) val=gtk3 ;; | |
3389 | * ) | |
2018939f | 3390 | as_fn_error $? "\`--with-x-toolkit=$withval' is invalid; |
067d23c9 KY |
3391 | this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif', \`gtk' or |
3392 | \`gtk3'. \`yes' and \`gtk' are synonyms. \`athena' and \`lucid' are synonyms." "$LINENO" 5 | |
3393 | ;; | |
3394 | esac | |
3395 | with_x_toolkit=$val | |
3396 | ||
3397 | fi | |
3398 | ||
3399 | ||
3400 | ||
3401 | # Check whether --with-xpm was given. | |
3402 | if test "${with_xpm+set}" = set; then : | |
3403 | withval=$with_xpm; | |
3404 | else | |
3405 | with_xpm=yes | |
3406 | fi | |
3407 | ||
3408 | ||
3409 | # Check whether --with-jpeg was given. | |
3410 | if test "${with_jpeg+set}" = set; then : | |
3411 | withval=$with_jpeg; | |
3412 | else | |
3413 | with_jpeg=yes | |
3414 | fi | |
3415 | ||
3416 | ||
3417 | # Check whether --with-tiff was given. | |
3418 | if test "${with_tiff+set}" = set; then : | |
3419 | withval=$with_tiff; | |
3420 | else | |
3421 | with_tiff=yes | |
3422 | fi | |
3423 | ||
3424 | ||
3425 | # Check whether --with-gif was given. | |
3426 | if test "${with_gif+set}" = set; then : | |
3427 | withval=$with_gif; | |
3428 | else | |
3429 | with_gif=yes | |
3430 | fi | |
3431 | ||
3432 | ||
3433 | # Check whether --with-png was given. | |
3434 | if test "${with_png+set}" = set; then : | |
3435 | withval=$with_png; | |
3436 | else | |
3437 | with_png=yes | |
3438 | fi | |
3439 | ||
3440 | ||
3441 | # Check whether --with-rsvg was given. | |
3442 | if test "${with_rsvg+set}" = set; then : | |
3443 | withval=$with_rsvg; | |
3444 | else | |
3445 | with_rsvg=yes | |
3446 | fi | |
3447 | ||
3448 | ||
3449 | # Check whether --with-xml2 was given. | |
3450 | if test "${with_xml2+set}" = set; then : | |
3451 | withval=$with_xml2; | |
3452 | else | |
3453 | with_xml2=yes | |
3454 | fi | |
3455 | ||
3456 | ||
3457 | # Check whether --with-imagemagick was given. | |
3458 | if test "${with_imagemagick+set}" = set; then : | |
3459 | withval=$with_imagemagick; | |
3460 | else | |
3461 | with_imagemagick=yes | |
3462 | fi | |
3463 | ||
3464 | ||
3465 | ||
3466 | # Check whether --with-xft was given. | |
3467 | if test "${with_xft+set}" = set; then : | |
3468 | withval=$with_xft; | |
3469 | else | |
3470 | with_xft=yes | |
3471 | fi | |
3472 | ||
3473 | ||
3474 | # Check whether --with-libotf was given. | |
3475 | if test "${with_libotf+set}" = set; then : | |
3476 | withval=$with_libotf; | |
3477 | else | |
3478 | with_libotf=yes | |
3479 | fi | |
3480 | ||
3481 | ||
3482 | # Check whether --with-m17n-flt was given. | |
3483 | if test "${with_m17n_flt+set}" = set; then : | |
3484 | withval=$with_m17n_flt; | |
3485 | else | |
3486 | with_m17n_flt=yes | |
3487 | fi | |
3488 | ||
3489 | ||
3490 | ||
3491 | # Check whether --with-toolkit-scroll-bars was given. | |
3492 | if test "${with_toolkit_scroll_bars+set}" = set; then : | |
3493 | withval=$with_toolkit_scroll_bars; | |
3494 | else | |
3495 | with_toolkit_scroll_bars=yes | |
3496 | fi | |
3497 | ||
3498 | ||
3499 | # Check whether --with-xaw3d was given. | |
3500 | if test "${with_xaw3d+set}" = set; then : | |
3501 | withval=$with_xaw3d; | |
3502 | else | |
3503 | with_xaw3d=yes | |
3504 | fi | |
3505 | ||
3506 | ||
3507 | # Check whether --with-xim was given. | |
3508 | if test "${with_xim+set}" = set; then : | |
3509 | withval=$with_xim; | |
3510 | else | |
3511 | with_xim=yes | |
3512 | fi | |
3513 | ||
3514 | ||
3515 | # Check whether --with-ns was given. | |
3516 | if test "${with_ns+set}" = set; then : | |
3517 | withval=$with_ns; | |
3518 | else | |
3519 | with_ns=no | |
3520 | fi | |
3521 | ||
3522 | ||
3523 | ||
3524 | # Check whether --with-gpm was given. | |
3525 | if test "${with_gpm+set}" = set; then : | |
3526 | withval=$with_gpm; | |
3527 | else | |
3528 | with_gpm=yes | |
3529 | fi | |
3530 | ||
3531 | ||
3532 | # Check whether --with-dbus was given. | |
3533 | if test "${with_dbus+set}" = set; then : | |
3534 | withval=$with_dbus; | |
3535 | else | |
3536 | with_dbus=yes | |
3537 | fi | |
3538 | ||
3539 | ||
3540 | # Check whether --with-gconf was given. | |
3541 | if test "${with_gconf+set}" = set; then : | |
3542 | withval=$with_gconf; | |
3543 | else | |
3544 | with_gconf=yes | |
3545 | fi | |
3546 | ||
3547 | ||
3548 | # Check whether --with-selinux was given. | |
3549 | if test "${with_selinux+set}" = set; then : | |
3550 | withval=$with_selinux; | |
3551 | else | |
3552 | with_selinux=yes | |
3553 | fi | |
3554 | ||
3555 | ||
3556 | # Check whether --with-gnutls was given. | |
3557 | if test "${with_gnutls+set}" = set; then : | |
3558 | withval=$with_gnutls; | |
3559 | else | |
3560 | with_gnutls=yes | |
3561 | fi | |
3562 | ||
3563 | ||
3564 | ## For the times when you want to build Emacs but don't have | |
3565 | ## a suitable makeinfo, and can live without the manuals. | |
3566 | ||
3567 | # Check whether --with-makeinfo was given. | |
3568 | if test "${with_makeinfo+set}" = set; then : | |
3569 | withval=$with_makeinfo; | |
3570 | else | |
3571 | with_makeinfo=yes | |
3572 | fi | |
3573 | ||
3574 | ||
3575 | ## This is an option because I do not know if all info/man support | |
3576 | ## compressed files, nor how to test if they do so. | |
3577 | ||
3578 | # Check whether --with-compress-info was given. | |
3579 | if test "${with_compress_info+set}" = set; then : | |
3580 | withval=$with_compress_info; | |
3581 | else | |
3582 | with_compress_info=yes | |
3583 | fi | |
3584 | ||
3585 | if test $with_compress_info = yes; then | |
3586 | GZIP_INFO=yes | |
3587 | else | |
3588 | GZIP_INFO= | |
3589 | fi | |
3590 | ||
3591 | ||
3592 | ||
3593 | # Check whether --with-pkg-config-prog was given. | |
3594 | if test "${with_pkg_config_prog+set}" = set; then : | |
3595 | withval=$with_pkg_config_prog; | |
3596 | fi | |
3597 | ||
3598 | if test "X${with_pkg_config_prog}" != X; then | |
3599 | if test "${with_pkg_config_prog}" != yes; then | |
3600 | PKG_CONFIG="${with_pkg_config_prog}" | |
3601 | fi | |
3602 | fi | |
3603 | ||
3604 | CRT_DIR= | |
3605 | ||
3606 | # Check whether --with-crt-dir was given. | |
3607 | if test "${with_crt_dir+set}" = set; then : | |
3608 | withval=$with_crt_dir; | |
3609 | fi | |
3610 | ||
3611 | CRT_DIR="${with_crt_dir}" | |
3612 | ||
3613 | ||
4fc5868a UM |
3614 | # Check whether --with-gameuser was given. |
3615 | if test "${with_gameuser+set}" = set; then : | |
3616 | withval=$with_gameuser; | |
3617 | fi | |
3618 | ||
3619 | test "X${with_gameuser}" != X && test "${with_gameuser}" != yes \ | |
3620 | && gameuser="${with_gameuser}" | |
3621 | test "X$gameuser" = X && gameuser=games | |
3622 | ||
3623 | ||
067d23c9 KY |
3624 | # Check whether --with-gnustep-conf was given. |
3625 | if test "${with_gnustep_conf+set}" = set; then : | |
3626 | withval=$with_gnustep_conf; | |
3627 | fi | |
3628 | ||
3629 | test "X${with_gnustep_conf}" != X && test "${with_gnustep_conf}" != yes && \ | |
3630 | GNUSTEP_CONFIG_FILE="${with_gnustep_conf}" | |
3631 | test "X$GNUSTEP_CONFIG_FILE" = "X" && \ | |
3632 | GNUSTEP_CONFIG_FILE=/etc/GNUstep/GNUstep.conf | |
3633 | ||
3634 | # Check whether --enable-ns-self-contained was given. | |
3635 | if test "${enable_ns_self_contained+set}" = set; then : | |
3636 | enableval=$enable_ns_self_contained; EN_NS_SELF_CONTAINED=$enableval | |
3637 | else | |
3638 | EN_NS_SELF_CONTAINED=yes | |
3639 | fi | |
3640 | ||
3641 | ||
3642 | # Check whether --enable-asserts was given. | |
3643 | if test "${enable_asserts+set}" = set; then : | |
3644 | enableval=$enable_asserts; USE_XASSERTS=$enableval | |
3645 | else | |
3646 | USE_XASSERTS=no | |
3647 | fi | |
3648 | ||
3649 | ||
3650 | # Check whether --enable-maintainer-mode was given. | |
3651 | if test "${enable_maintainer_mode+set}" = set; then : | |
3652 | enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval | |
3653 | else | |
3654 | USE_MAINTAINER_MODE=no | |
3655 | fi | |
3656 | ||
3657 | if test $USE_MAINTAINER_MODE = yes; then | |
3658 | MAINT= | |
3659 | else | |
3660 | MAINT=# | |
3661 | fi | |
3662 | ||
3663 | ||
3664 | # Check whether --enable-locallisppath was given. | |
3665 | if test "${enable_locallisppath+set}" = set; then : | |
3666 | enableval=$enable_locallisppath; if test "${enableval}" = "no"; then | |
3667 | locallisppath= | |
3668 | elif test "${enableval}" != "yes"; then | |
3669 | locallisppath=${enableval} | |
3670 | fi | |
3671 | fi | |
3672 | ||
3673 | ||
3674 | # Check whether --enable-checking was given. | |
3675 | if test "${enable_checking+set}" = set; then : | |
3676 | enableval=$enable_checking; ac_checking_flags="${enableval}" | |
3677 | fi | |
3678 | ||
3679 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS," | |
3680 | for check in $ac_checking_flags | |
3681 | do | |
3682 | case $check in | |
3683 | # these set all the flags to specific states | |
3684 | yes) ac_enable_checking=1 ;; | |
3685 | no) ac_enable_checking= ; | |
3686 | ac_gc_check_stringbytes= ; | |
3687 | ac_gc_check_string_overrun= ; | |
3688 | ac_gc_check_string_free_list= ; | |
3689 | ac_xmalloc_overrun= ; | |
3690 | ac_gc_check_cons_list= ;; | |
3691 | all) ac_enable_checking=1 ; | |
3692 | ac_gc_check_stringbytes=1 ; | |
3693 | ac_gc_check_string_overrun=1 ; | |
3694 | ac_gc_check_string_free_list=1 ; | |
3695 | ac_xmalloc_overrun=1 ; | |
3696 | ac_gc_check_cons_list=1 ;; | |
3697 | # these enable particular checks | |
3698 | stringbytes) ac_gc_check_stringbytes=1 ;; | |
3699 | stringoverrun) ac_gc_check_string_overrun=1 ;; | |
3700 | stringfreelist) ac_gc_check_string_free_list=1 ;; | |
3701 | xmallocoverrun) ac_xmalloc_overrun=1 ;; | |
3702 | conslist) ac_gc_check_cons_list=1 ;; | |
d6974efa | 3703 | *) as_fn_error $? "unknown check category $check" "$LINENO" 5 ;; |
067d23c9 KY |
3704 | esac |
3705 | done | |
3706 | IFS="$ac_save_IFS" | |
3707 | ||
3708 | if test x$ac_enable_checking != x ; then | |
3709 | ||
3710 | $as_echo "#define ENABLE_CHECKING 1" >>confdefs.h | |
3711 | ||
3712 | fi | |
3713 | if test x$ac_gc_check_stringbytes != x ; then | |
3714 | ||
3715 | $as_echo "#define GC_CHECK_STRING_BYTES 1" >>confdefs.h | |
3716 | ||
3717 | fi | |
3718 | if test x$ac_gc_check_stringoverrun != x ; then | |
3719 | ||
3720 | $as_echo "#define GC_CHECK_STRING_OVERRUN 1" >>confdefs.h | |
3721 | ||
3722 | fi | |
3723 | if test x$ac_gc_check_string_free_list != x ; then | |
3724 | ||
3725 | $as_echo "#define GC_CHECK_STRING_FREE_LIST 1" >>confdefs.h | |
3726 | ||
3727 | fi | |
3728 | if test x$ac_xmalloc_overrun != x ; then | |
3729 | ||
3730 | $as_echo "#define XMALLOC_OVERRUN_CHECK 1" >>confdefs.h | |
3731 | ||
3732 | fi | |
3733 | if test x$ac_gc_check_cons_list != x ; then | |
3734 | ||
3735 | $as_echo "#define GC_CHECK_CONS_LIST 1" >>confdefs.h | |
3736 | ||
3737 | fi | |
3738 | ||
3739 | # Check whether --enable-use-lisp-union-type was given. | |
3740 | if test "${enable_use_lisp_union_type+set}" = set; then : | |
3741 | enableval=$enable_use_lisp_union_type; if test "${enableval}" != "no"; then | |
3742 | ||
3743 | $as_echo "#define USE_LISP_UNION_TYPE 1" >>confdefs.h | |
3744 | ||
3745 | fi | |
3746 | fi | |
3747 | ||
3748 | ||
3749 | ||
3750 | # Check whether --enable-profiling was given. | |
3751 | if test "${enable_profiling+set}" = set; then : | |
3752 | enableval=$enable_profiling; ac_enable_profiling="${enableval}" | |
3753 | fi | |
3754 | ||
3755 | if test x$ac_enable_profiling != x ; then | |
3756 | PROFILING_CFLAGS="-DPROFILING=1 -pg" | |
3757 | else | |
3758 | PROFILING_CFLAGS= | |
3759 | fi | |
3760 | ||
3761 | ||
3762 | # Check whether --enable-autodepend was given. | |
3763 | if test "${enable_autodepend+set}" = set; then : | |
3764 | enableval=$enable_autodepend; ac_enable_autodepend="${enableval}" | |
3765 | else | |
3766 | ac_enable_autodepend=yes | |
3767 | fi | |
3768 | ||
3769 | ||
3770 | #### Make srcdir absolute, if it isn't already. It's important to | |
3771 | #### avoid running the path through pwd unnecessarily, since pwd can | |
3772 | #### give you automounter prefixes, which can go away. We do all this | |
3773 | #### so Emacs can find its files when run uninstalled. | |
3774 | ## Make sure CDPATH doesn't affect cd (in case PWD is relative). | |
3775 | unset CDPATH | |
3776 | case "${srcdir}" in | |
3777 | /* ) ;; | |
3778 | . ) | |
3779 | ## We may be able to use the $PWD environment variable to make this | |
3780 | ## absolute. But sometimes PWD is inaccurate. | |
3781 | ## Note: we used to use ${PWD} at the end instead of `pwd`, | |
3782 | ## but that tested only for a well-formed and valid PWD, | |
3783 | ## it did not object when PWD was well-formed and valid but just wrong. | |
3784 | if test ".${PWD}" != "." && test ".`(cd ${PWD} ; sh -c pwd)`" = ".`pwd`" ; | |
3785 | then | |
3786 | srcdir="$PWD" | |
3787 | else | |
3788 | srcdir="`(cd ${srcdir}; pwd)`" | |
3789 | fi | |
3790 | ;; | |
3791 | * ) srcdir="`(cd ${srcdir}; pwd)`" ;; | |
3792 | esac | |
3793 | ||
3794 | #### Check if the source directory already has a configured system in it. | |
3795 | if test `pwd` != `(cd ${srcdir} && pwd)` \ | |
3796 | && test -f "${srcdir}/src/config.h" ; then | |
3797 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The directory tree \`${srcdir}' is being used | |
3798 | as a build directory right now; it has been configured in its own | |
3799 | right. To configure in another directory as well, you MUST | |
3800 | use GNU make. If you do not have GNU make, then you must | |
3801 | now do \`make distclean' in ${srcdir}, | |
3802 | and then run $0 again." >&5 | |
3803 | $as_echo "$as_me: WARNING: The directory tree \`${srcdir}' is being used | |
3804 | as a build directory right now; it has been configured in its own | |
3805 | right. To configure in another directory as well, you MUST | |
3806 | use GNU make. If you do not have GNU make, then you must | |
3807 | now do \`make distclean' in ${srcdir}, | |
3808 | and then run $0 again." >&2;} | |
3809 | fi | |
3810 | ||
3811 | #### Given the configuration name, set machfile and opsysfile to the | |
3812 | #### names of the m/*.h and s/*.h files we should use. | |
3813 | ||
3814 | ### Canonicalize the configuration name. | |
3815 | ||
067d23c9 KY |
3816 | # Make sure we can run config.sub. |
3817 | $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || | |
2018939f | 3818 | as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 |
067d23c9 KY |
3819 | |
3820 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 | |
3821 | $as_echo_n "checking build system type... " >&6; } | |
d6974efa | 3822 | if ${ac_cv_build+:} false; then : |
067d23c9 KY |
3823 | $as_echo_n "(cached) " >&6 |
3824 | else | |
3825 | ac_build_alias=$build_alias | |
3826 | test "x$ac_build_alias" = x && | |
3827 | ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` | |
3828 | test "x$ac_build_alias" = x && | |
2018939f | 3829 | as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 |
067d23c9 | 3830 | ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || |
2018939f | 3831 | as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 |
067d23c9 KY |
3832 | |
3833 | fi | |
3834 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 | |
3835 | $as_echo "$ac_cv_build" >&6; } | |
3836 | case $ac_cv_build in | |
3837 | *-*-*) ;; | |
d6974efa | 3838 | *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; |
067d23c9 KY |
3839 | esac |
3840 | build=$ac_cv_build | |
3841 | ac_save_IFS=$IFS; IFS='-' | |
3842 | set x $ac_cv_build | |
3843 | shift | |
3844 | build_cpu=$1 | |
3845 | build_vendor=$2 | |
3846 | shift; shift | |
3847 | # Remember, the first character of IFS is used to create $*, | |
3848 | # except with old shells: | |
3849 | build_os=$* | |
3850 | IFS=$ac_save_IFS | |
3851 | case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac | |
3852 | ||
3853 | ||
3854 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 | |
3855 | $as_echo_n "checking host system type... " >&6; } | |
d6974efa | 3856 | if ${ac_cv_host+:} false; then : |
067d23c9 KY |
3857 | $as_echo_n "(cached) " >&6 |
3858 | else | |
3859 | if test "x$host_alias" = x; then | |
3860 | ac_cv_host=$ac_cv_build | |
3861 | else | |
3862 | ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || | |
2018939f | 3863 | as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 |
067d23c9 KY |
3864 | fi |
3865 | ||
3866 | fi | |
3867 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 | |
3868 | $as_echo "$ac_cv_host" >&6; } | |
3869 | case $ac_cv_host in | |
3870 | *-*-*) ;; | |
d6974efa | 3871 | *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; |
067d23c9 KY |
3872 | esac |
3873 | host=$ac_cv_host | |
3874 | ac_save_IFS=$IFS; IFS='-' | |
3875 | set x $ac_cv_host | |
3876 | shift | |
3877 | host_cpu=$1 | |
3878 | host_vendor=$2 | |
3879 | shift; shift | |
3880 | # Remember, the first character of IFS is used to create $*, | |
3881 | # except with old shells: | |
3882 | host_os=$* | |
3883 | IFS=$ac_save_IFS | |
3884 | case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac | |
3885 | ||
3886 | ||
3887 | canonical=$host | |
3888 | configuration=${host_alias-${build_alias-$host}} | |
3889 | ||
3890 | ||
3891 | ||
3892 | ### If you add support for a new configuration, add code to this | |
3893 | ### switch statement to recognize your configuration name and select | |
3894 | ### the appropriate operating system and machine description files. | |
3895 | ||
3896 | ### You would hope that you could choose an m/*.h file pretty much | |
3897 | ### based on the machine portion of the configuration name, and an s/*.h | |
3898 | ### file based on the operating system portion. However, it turns out | |
3899 | ### that each m/*.h file is pretty manufacturer-specific - for | |
3900 | ### example mips.h is MIPS | |
3901 | ### So we basically have to have a special case for each | |
3902 | ### configuration name. | |
3903 | ### | |
3904 | ### As far as handling version numbers on operating systems is | |
3905 | ### concerned, make sure things will fail in a fixable way. If | |
3906 | ### /etc/MACHINES doesn't say anything about version numbers, be | |
3907 | ### prepared to handle anything reasonably. If version numbers | |
3908 | ### matter, be sure /etc/MACHINES says something about it. | |
3909 | ||
3910 | machine='' opsys='' unported=no | |
3911 | case "${canonical}" in | |
3912 | ||
d6a003a8 AS |
3913 | ## GNU/Linux ports |
3914 | *-*-linux-gnu*) | |
3915 | opsys=gnu-linux | |
3916 | case ${canonical} in | |
3917 | alpha*) machine=alpha ;; | |
3918 | s390-*) machine=ibms390 ;; | |
3919 | s390x-*) machine=ibms390x ;; | |
3920 | powerpc*) machine=macppc ;; | |
3921 | sparc*) machine=sparc ;; | |
3922 | ia64*) machine=ia64 ;; | |
3923 | m68k*) machine=m68k ;; | |
3924 | x86_64*) machine=amdx86-64 ;; | |
3925 | esac | |
3926 | ;; | |
3927 | ||
067d23c9 KY |
3928 | ## FreeBSD ports |
3929 | *-*-freebsd* ) | |
3930 | opsys=freebsd | |
3931 | case "${canonical}" in | |
3932 | alpha*) machine=alpha ;; | |
3933 | amd64-*|x86_64-*) machine=amdx86-64 ;; | |
067d23c9 KY |
3934 | ia64-*) machine=ia64 ;; |
3935 | i[3456]86-*) machine=intel386 ;; | |
3936 | powerpc-*) machine=macppc ;; | |
3937 | sparc-*) machine=sparc ;; | |
3938 | sparc64-*) machine=sparc ;; | |
3939 | esac | |
3940 | ;; | |
3941 | ||
3942 | ## FreeBSD kernel + glibc based userland | |
3943 | *-*-kfreebsd*gnu* ) | |
3944 | opsys=gnu-kfreebsd | |
3945 | case "${canonical}" in | |
3946 | alpha*) machine=alpha ;; | |
3947 | amd64-*|x86_64-*) machine=amdx86-64 ;; | |
3948 | ia64-*) machine=ia64 ;; | |
3949 | i[3456]86-*) machine=intel386 ;; | |
3950 | powerpc-*) machine=macppc ;; | |
3951 | sparc-*) machine=sparc ;; | |
3952 | sparc64-*) machine=sparc ;; | |
3953 | esac | |
3954 | ;; | |
3955 | ||
3956 | ## NetBSD ports | |
3957 | *-*-netbsd* ) | |
3958 | opsys=netbsd | |
3959 | case "${canonical}" in | |
3960 | alpha*) machine=alpha ;; | |
3961 | x86_64-*) machine=amdx86-64 ;; | |
067d23c9 KY |
3962 | i[3456]86-*) machine=intel386 ;; |
3963 | m68k-*) machine=m68k ;; | |
3964 | powerpc-*) machine=macppc ;; | |
067d23c9 KY |
3965 | sparc*-) machine=sparc ;; |
3966 | vax-*) machine=vax ;; | |
3967 | esac | |
3968 | ;; | |
3969 | ||
3970 | ## OpenBSD ports | |
3971 | *-*-openbsd* ) | |
3972 | opsys=openbsd | |
3973 | case "${canonical}" in | |
3974 | alpha*) machine=alpha ;; | |
3975 | x86_64-*) machine=amdx86-64 ;; | |
067d23c9 KY |
3976 | i386-*) machine=intel386 ;; |
3977 | powerpc-*) machine=macppc ;; | |
3978 | sparc*) machine=sparc ;; | |
3979 | vax-*) machine=vax ;; | |
3980 | esac | |
3981 | ;; | |
3982 | ||
067d23c9 KY |
3983 | ## Apple Darwin / Mac OS X |
3984 | *-apple-darwin* ) | |
3985 | case "${canonical}" in | |
3986 | i[3456]86-* ) machine=intel386 ;; | |
3987 | powerpc-* ) machine=macppc ;; | |
3988 | x86_64-* ) machine=amdx86-64 ;; | |
3989 | * ) unported=yes ;; | |
3990 | esac | |
3991 | opsys=darwin | |
3992 | # Define CPP as follows to make autoconf work correctly. | |
3993 | CPP="${CC-cc} -E -no-cpp-precomp" | |
3994 | # Use fink packages if available. | |
3995 | if test -d /sw/include && test -d /sw/lib; then | |
3996 | GCC_TEST_OPTIONS="-I/sw/include -L/sw/lib" | |
3997 | CPP="${CPP} ${GCC_TEST_OPTIONS}" | |
3998 | NON_GCC_TEST_OPTIONS=${GCC_TEST_OPTIONS} | |
3999 | fi | |
4000 | ;; | |
4001 | ||
4002 | ## HP 9000 series 700 and 800, running HP/UX | |
4003 | hppa*-hp-hpux10.2* ) | |
d6a003a8 | 4004 | opsys=hpux10-20 |
067d23c9 KY |
4005 | ;; |
4006 | hppa*-hp-hpux1[1-9]* ) | |
d6a003a8 | 4007 | opsys=hpux11 |
067d23c9 KY |
4008 | CFLAGS="-D_INCLUDE__STDC_A1_SOURCE $CFLAGS" |
4009 | ;; | |
4010 | ||
125c3718 PE |
4011 | ia64*-hp-hpux1[1-9]* ) |
4012 | machine=hp800 opsys=hpux11 | |
4013 | ## FIXME. Peter O'Gorman reports that dumping using unexelf.o doesn't | |
4014 | ## work either: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=6811 | |
4015 | CANNOT_DUMP=yes | |
4016 | ;; | |
4017 | ||
4018 | hppa*-*-linux-gnu* ) | |
4019 | machine=hp800 opsys=gnu-linux | |
4020 | ;; | |
4021 | ||
067d23c9 | 4022 | ## IBM machines |
067d23c9 KY |
4023 | rs6000-ibm-aix4.[23]* ) |
4024 | machine=ibmrs6000 opsys=aix4-2 | |
4025 | ;; | |
4026 | powerpc-ibm-aix4.[23]* ) | |
4027 | machine=ibmrs6000 opsys=aix4-2 | |
4028 | ;; | |
4029 | rs6000-ibm-aix[56]* ) | |
4030 | machine=ibmrs6000 opsys=aix4-2 | |
4031 | ;; | |
4032 | powerpc-ibm-aix[56]* ) | |
4033 | machine=ibmrs6000 opsys=aix4-2 | |
4034 | ;; | |
4035 | ||
067d23c9 KY |
4036 | ## Silicon Graphics machines |
4037 | ## Iris 4D | |
4038 | mips-sgi-irix6.5 ) | |
4039 | machine=iris4d opsys=irix6-5 | |
4040 | # Without defining _LANGUAGE_C, things get masked out in the headers | |
4041 | # so that, for instance, grepping for `free' in stdlib.h fails and | |
4042 | # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m). | |
4043 | NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C" | |
4044 | NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C" | |
4045 | ;; | |
4046 | ||
4047 | ## Suns | |
067d23c9 KY |
4048 | *-sun-solaris* \ |
4049 | | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* \ | |
4050 | | x86_64-*-solaris2* | x86_64-*-sunos5*) | |
4051 | case "${canonical}" in | |
4052 | i[3456]86-*-* ) machine=intel386 ;; | |
4053 | amd64-*-*|x86_64-*-*) machine=amdx86-64 ;; | |
4054 | sparc* ) machine=sparc ;; | |
4055 | * ) unported=yes ;; | |
4056 | esac | |
4057 | case "${canonical}" in | |
4058 | *-sunos5.6* | *-solaris2.6* ) | |
4059 | opsys=sol2-6 | |
4060 | NON_GNU_CPP=/usr/ccs/lib/cpp | |
4061 | RANLIB="ar -ts" | |
4062 | ;; | |
4063 | *-sunos5.[7-9]* | *-solaris2.[7-9]* ) | |
4064 | opsys=sol2-6 | |
4065 | emacs_check_sunpro_c=yes | |
4066 | NON_GNU_CPP=/usr/ccs/lib/cpp | |
4067 | ;; | |
4068 | *-sunos5* | *-solaris* ) | |
4069 | opsys=sol2-10 | |
4070 | emacs_check_sunpro_c=yes | |
4071 | NON_GNU_CPP=/usr/ccs/lib/cpp | |
4072 | ;; | |
4073 | esac | |
4074 | ## Watch out for a compiler that we know will not work. | |
4075 | case "${canonical}" in | |
4076 | *-solaris* | *-sunos5* ) | |
4077 | if [ "x$CC" = x/usr/ucb/cc ]; then | |
4078 | ## /usr/ucb/cc doesn't work; | |
4079 | ## we should find some other compiler that does work. | |
4080 | unset CC | |
4081 | fi | |
4082 | ;; | |
4083 | *) ;; | |
4084 | esac | |
4085 | ;; | |
4086 | ||
067d23c9 KY |
4087 | ## Intel 386 machines where we don't care about the manufacturer. |
4088 | i[3456]86-*-* ) | |
4089 | machine=intel386 | |
4090 | case "${canonical}" in | |
4091 | *-cygwin ) opsys=cygwin ;; | |
4092 | *-darwin* ) opsys=darwin | |
4093 | CPP="${CC-cc} -E -no-cpp-precomp" | |
4094 | ;; | |
067d23c9 KY |
4095 | *-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;; |
4096 | *-sysv5uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;; | |
4097 | *-sysv5OpenUNIX* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;; | |
4098 | ## Otherwise, we'll fall through to the generic opsys code at the bottom. | |
4099 | esac | |
4100 | ;; | |
4101 | ||
067d23c9 KY |
4102 | * ) |
4103 | unported=yes | |
4104 | ;; | |
4105 | esac | |
4106 | ||
4107 | ### If the code above didn't choose an operating system, just choose | |
4108 | ### an operating system based on the configuration name. You really | |
4109 | ### only want to use this when you have no idea what the right | |
4110 | ### operating system is; if you know what operating systems a machine | |
4111 | ### runs, it's cleaner to make it explicit in the case statement | |
4112 | ### above. | |
4113 | if test x"${opsys}" = x; then | |
4114 | case "${canonical}" in | |
4115 | *-gnu* ) opsys=gnu ;; | |
4116 | * ) | |
4117 | unported=yes | |
4118 | ;; | |
4119 | esac | |
4120 | fi | |
4121 | ||
4122 | ||
4123 | ||
4124 | if test $unported = yes; then | |
2018939f | 4125 | as_fn_error $? "Emacs hasn't been ported to \`${canonical}' systems. |
067d23c9 KY |
4126 | Check \`etc/MACHINES' for recognized configuration names." "$LINENO" 5 |
4127 | fi | |
4128 | ||
d6a003a8 AS |
4129 | if test -n "$machine"; then |
4130 | machfile="m/${machine}.h" | |
4131 | else | |
4132 | machfile= | |
4133 | fi | |
067d23c9 KY |
4134 | opsysfile="s/${opsys}.h" |
4135 | ||
4136 | ||
4137 | #### Choose a compiler. | |
4138 | test -n "$CC" && cc_specified=yes | |
4139 | ||
4140 | # Save the value of CFLAGS that the user specified. | |
4141 | SPECIFIED_CFLAGS="$CFLAGS" | |
4142 | ||
4143 | ac_ext=c | |
4144 | ac_cpp='$CPP $CPPFLAGS' | |
4145 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
4146 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
4147 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
4148 | if test -n "$ac_tool_prefix"; then | |
4149 | # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. | |
4150 | set dummy ${ac_tool_prefix}gcc; ac_word=$2 | |
4151 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4152 | $as_echo_n "checking for $ac_word... " >&6; } | |
d6974efa | 4153 | if ${ac_cv_prog_CC+:} false; then : |
067d23c9 KY |
4154 | $as_echo_n "(cached) " >&6 |
4155 | else | |
4156 | if test -n "$CC"; then | |
4157 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
4158 | else | |
4159 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4160 | for as_dir in $PATH | |
4161 | do | |
4162 | IFS=$as_save_IFS | |
4163 | test -z "$as_dir" && as_dir=. | |
4164 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4165 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
4166 | ac_cv_prog_CC="${ac_tool_prefix}gcc" | |
4167 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4168 | break 2 | |
4169 | fi | |
4170 | done | |
4171 | done | |
4172 | IFS=$as_save_IFS | |
4173 | ||
4174 | fi | |
4175 | fi | |
4176 | CC=$ac_cv_prog_CC | |
4177 | if test -n "$CC"; then | |
4178 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
4179 | $as_echo "$CC" >&6; } | |
4180 | else | |
4181 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4182 | $as_echo "no" >&6; } | |
4183 | fi | |
4184 | ||
4185 | ||
4186 | fi | |
4187 | if test -z "$ac_cv_prog_CC"; then | |
4188 | ac_ct_CC=$CC | |
4189 | # Extract the first word of "gcc", so it can be a program name with args. | |
4190 | set dummy gcc; ac_word=$2 | |
4191 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4192 | $as_echo_n "checking for $ac_word... " >&6; } | |
d6974efa | 4193 | if ${ac_cv_prog_ac_ct_CC+:} false; then : |
067d23c9 KY |
4194 | $as_echo_n "(cached) " >&6 |
4195 | else | |
4196 | if test -n "$ac_ct_CC"; then | |
4197 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
4198 | else | |
4199 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4200 | for as_dir in $PATH | |
4201 | do | |
4202 | IFS=$as_save_IFS | |
4203 | test -z "$as_dir" && as_dir=. | |
4204 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4205 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
4206 | ac_cv_prog_ac_ct_CC="gcc" | |
4207 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4208 | break 2 | |
4209 | fi | |
4210 | done | |
4211 | done | |
4212 | IFS=$as_save_IFS | |
4213 | ||
4214 | fi | |
4215 | fi | |
4216 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
4217 | if test -n "$ac_ct_CC"; then | |
4218 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 | |
4219 | $as_echo "$ac_ct_CC" >&6; } | |
4220 | else | |
4221 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4222 | $as_echo "no" >&6; } | |
4223 | fi | |
4224 | ||
4225 | if test "x$ac_ct_CC" = x; then | |
4226 | CC="" | |
4227 | else | |
4228 | case $cross_compiling:$ac_tool_warned in | |
4229 | yes:) | |
4230 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
4231 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
4232 | ac_tool_warned=yes ;; | |
4233 | esac | |
4234 | CC=$ac_ct_CC | |
4235 | fi | |
4236 | else | |
4237 | CC="$ac_cv_prog_CC" | |
4238 | fi | |
4239 | ||
4240 | if test -z "$CC"; then | |
4241 | if test -n "$ac_tool_prefix"; then | |
4242 | # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. | |
4243 | set dummy ${ac_tool_prefix}cc; ac_word=$2 | |
4244 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4245 | $as_echo_n "checking for $ac_word... " >&6; } | |
d6974efa | 4246 | if ${ac_cv_prog_CC+:} false; then : |
067d23c9 KY |
4247 | $as_echo_n "(cached) " >&6 |
4248 | else | |
4249 | if test -n "$CC"; then | |
4250 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
4251 | else | |
4252 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4253 | for as_dir in $PATH | |
4254 | do | |
4255 | IFS=$as_save_IFS | |
4256 | test -z "$as_dir" && as_dir=. | |
4257 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4258 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
4259 | ac_cv_prog_CC="${ac_tool_prefix}cc" | |
4260 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4261 | break 2 | |
4262 | fi | |
4263 | done | |
4264 | done | |
4265 | IFS=$as_save_IFS | |
4266 | ||
4267 | fi | |
4268 | fi | |
4269 | CC=$ac_cv_prog_CC | |
4270 | if test -n "$CC"; then | |
4271 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
4272 | $as_echo "$CC" >&6; } | |
4273 | else | |
4274 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4275 | $as_echo "no" >&6; } | |
4276 | fi | |
4277 | ||
4278 | ||
4279 | fi | |
4280 | fi | |
4281 | if test -z "$CC"; then | |
4282 | # Extract the first word of "cc", so it can be a program name with args. | |
4283 | set dummy cc; ac_word=$2 | |
4284 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4285 | $as_echo_n "checking for $ac_word... " >&6; } | |
d6974efa | 4286 | if ${ac_cv_prog_CC+:} false; then : |
067d23c9 KY |
4287 | $as_echo_n "(cached) " >&6 |
4288 | else | |
4289 | if test -n "$CC"; then | |
4290 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
4291 | else | |
4292 | ac_prog_rejected=no | |
4293 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4294 | for as_dir in $PATH | |
4295 | do | |
4296 | IFS=$as_save_IFS | |
4297 | test -z "$as_dir" && as_dir=. | |
4298 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4299 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
4300 | if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then | |
4301 | ac_prog_rejected=yes | |
4302 | continue | |
4303 | fi | |
4304 | ac_cv_prog_CC="cc" | |
4305 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4306 | break 2 | |
4307 | fi | |
4308 | done | |
4309 | done | |
4310 | IFS=$as_save_IFS | |
4311 | ||
4312 | if test $ac_prog_rejected = yes; then | |
4313 | # We found a bogon in the path, so make sure we never use it. | |
4314 | set dummy $ac_cv_prog_CC | |
4315 | shift | |
4316 | if test $# != 0; then | |
4317 | # We chose a different compiler from the bogus one. | |
4318 | # However, it has the same basename, so the bogon will be chosen | |
4319 | # first if we set CC to just the basename; use the full file name. | |
4320 | shift | |
4321 | ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" | |
4322 | fi | |
4323 | fi | |
4324 | fi | |
4325 | fi | |
4326 | CC=$ac_cv_prog_CC | |
4327 | if test -n "$CC"; then | |
4328 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
4329 | $as_echo "$CC" >&6; } | |
4330 | else | |
4331 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4332 | $as_echo "no" >&6; } | |
4333 | fi | |
4334 | ||
4335 | ||
4336 | fi | |
4337 | if test -z "$CC"; then | |
4338 | if test -n "$ac_tool_prefix"; then | |
4339 | for ac_prog in cl.exe | |
4340 | do | |
4341 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | |
4342 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | |
4343 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4344 | $as_echo_n "checking for $ac_word... " >&6; } | |
d6974efa | 4345 | if ${ac_cv_prog_CC+:} false; then : |
067d23c9 KY |
4346 | $as_echo_n "(cached) " >&6 |
4347 | else | |
4348 | if test -n "$CC"; then | |
4349 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
4350 | else | |
4351 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4352 | for as_dir in $PATH | |
4353 | do | |
4354 | IFS=$as_save_IFS | |
4355 | test -z "$as_dir" && as_dir=. | |
4356 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4357 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
4358 | ac_cv_prog_CC="$ac_tool_prefix$ac_prog" | |
4359 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4360 | break 2 | |
4361 | fi | |
4362 | done | |
4363 | done | |
4364 | IFS=$as_save_IFS | |
4365 | ||
4366 | fi | |
4367 | fi | |
4368 | CC=$ac_cv_prog_CC | |
4369 | if test -n "$CC"; then | |
4370 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
4371 | $as_echo "$CC" >&6; } | |
4372 | else | |
4373 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4374 | $as_echo "no" >&6; } | |
4375 | fi | |
4376 | ||
4377 | ||
4378 | test -n "$CC" && break | |
4379 | done | |
4380 | fi | |
4381 | if test -z "$CC"; then | |
4382 | ac_ct_CC=$CC | |
4383 | for ac_prog in cl.exe | |
4384 | do | |
4385 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
4386 | set dummy $ac_prog; ac_word=$2 | |
4387 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4388 | $as_echo_n "checking for $ac_word... " >&6; } | |
d6974efa | 4389 | if ${ac_cv_prog_ac_ct_CC+:} false; then : |
067d23c9 KY |
4390 | $as_echo_n "(cached) " >&6 |
4391 | else | |
4392 | if test -n "$ac_ct_CC"; then | |
4393 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
4394 | else | |
4395 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4396 | for as_dir in $PATH | |
4397 | do | |
4398 | IFS=$as_save_IFS | |
4399 | test -z "$as_dir" && as_dir=. | |
4400 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4401 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
4402 | ac_cv_prog_ac_ct_CC="$ac_prog" | |
4403 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4404 | break 2 | |
4405 | fi | |
4406 | done | |
4407 | done | |
4408 | IFS=$as_save_IFS | |
4409 | ||
4410 | fi | |
4411 | fi | |
4412 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
4413 | if test -n "$ac_ct_CC"; then | |
4414 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 | |
4415 | $as_echo "$ac_ct_CC" >&6; } | |
4416 | else | |
4417 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4418 | $as_echo "no" >&6; } | |
4419 | fi | |
4420 | ||
4421 | ||
4422 | test -n "$ac_ct_CC" && break | |
4423 | done | |
4424 | ||
4425 | if test "x$ac_ct_CC" = x; then | |
4426 | CC="" | |
4427 | else | |
4428 | case $cross_compiling:$ac_tool_warned in | |
4429 | yes:) | |
4430 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
4431 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
4432 | ac_tool_warned=yes ;; | |
4433 | esac | |
4434 | CC=$ac_ct_CC | |
4435 | fi | |
4436 | fi | |
4437 | ||
4438 | fi | |
4439 | ||
4440 | ||
4441 | test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
4442 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
2018939f | 4443 | as_fn_error $? "no acceptable C compiler found in \$PATH |
d6974efa | 4444 | See \`config.log' for more details" "$LINENO" 5; } |
067d23c9 KY |
4445 | |
4446 | # Provide some information about the compiler. | |
4447 | $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 | |
4448 | set X $ac_compile | |
4449 | ac_compiler=$2 | |
4450 | for ac_option in --version -v -V -qversion; do | |
4451 | { { ac_try="$ac_compiler $ac_option >&5" | |
4452 | case "(($ac_try" in | |
4453 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4454 | *) ac_try_echo=$ac_try;; | |
4455 | esac | |
4456 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
4457 | $as_echo "$ac_try_echo"; } >&5 | |
4458 | (eval "$ac_compiler $ac_option >&5") 2>conftest.err | |
4459 | ac_status=$? | |
4460 | if test -s conftest.err; then | |
4461 | sed '10a\ | |
4462 | ... rest of stderr output deleted ... | |
4463 | 10q' conftest.err >conftest.er1 | |
4464 | cat conftest.er1 >&5 | |
4465 | fi | |
4466 | rm -f conftest.er1 conftest.err | |
4467 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
4468 | test $ac_status = 0; } | |
4469 | done | |
4470 | ||
4471 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4472 | /* end confdefs.h. */ | |
4473 | ||
4474 | int | |
4475 | main () | |
4476 | { | |
4477 | ||
4478 | ; | |
4479 | return 0; | |
4480 | } | |
4481 | _ACEOF | |
4482 | ac_clean_files_save=$ac_clean_files | |
4483 | ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" | |
4484 | # Try to create an executable without -o first, disregard a.out. | |
4485 | # It will help us diagnose broken compilers, and finding out an intuition | |
4486 | # of exeext. | |
4487 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 | |
4488 | $as_echo_n "checking whether the C compiler works... " >&6; } | |
4489 | ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` | |
4490 | ||
4491 | # The possible output files: | |
4492 | ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" | |
4493 | ||
4494 | ac_rmfiles= | |
4495 | for ac_file in $ac_files | |
4496 | do | |
4497 | case $ac_file in | |
4498 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; | |
4499 | * ) ac_rmfiles="$ac_rmfiles $ac_file";; | |
4500 | esac | |
4501 | done | |
4502 | rm -f $ac_rmfiles | |
4503 | ||
4504 | if { { ac_try="$ac_link_default" | |
4505 | case "(($ac_try" in | |
4506 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4507 | *) ac_try_echo=$ac_try;; | |
4508 | esac | |
4509 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
4510 | $as_echo "$ac_try_echo"; } >&5 | |
4511 | (eval "$ac_link_default") 2>&5 | |
4512 | ac_status=$? | |
4513 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
4514 | test $ac_status = 0; }; then : | |
4515 | # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. | |
4516 | # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' | |
4517 | # in a Makefile. We should not override ac_cv_exeext if it was cached, | |
4518 | # so that the user can short-circuit this test for compilers unknown to | |
4519 | # Autoconf. | |
4520 | for ac_file in $ac_files '' | |
4521 | do | |
4522 | test -f "$ac_file" || continue | |
4523 | case $ac_file in | |
4524 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) | |
4525 | ;; | |
4526 | [ab].out ) | |
4527 | # We found the default executable, but exeext='' is most | |
4528 | # certainly right. | |
4529 | break;; | |
4530 | *.* ) | |
4531 | if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; | |
4532 | then :; else | |
4533 | ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` | |
4534 | fi | |
4535 | # We set ac_cv_exeext here because the later test for it is not | |
4536 | # safe: cross compilers may not add the suffix if given an `-o' | |
4537 | # argument, so we may need to know it at that point already. | |
4538 | # Even if this section looks crufty: it has the advantage of | |
4539 | # actually working. | |
4540 | break;; | |
4541 | * ) | |
4542 | break;; | |
4543 | esac | |
4544 | done | |
4545 | test "$ac_cv_exeext" = no && ac_cv_exeext= | |
4546 | ||
4547 | else | |
4548 | ac_file='' | |
4549 | fi | |
4550 | if test -z "$ac_file"; then : | |
4551 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4552 | $as_echo "no" >&6; } | |
4553 | $as_echo "$as_me: failed program was:" >&5 | |
4554 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4555 | ||
4556 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
4557 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
2018939f | 4558 | as_fn_error 77 "C compiler cannot create executables |
d6974efa | 4559 | See \`config.log' for more details" "$LINENO" 5; } |
067d23c9 KY |
4560 | else |
4561 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
4562 | $as_echo "yes" >&6; } | |
4563 | fi | |
4564 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 | |
4565 | $as_echo_n "checking for C compiler default output file name... " >&6; } | |
4566 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 | |
4567 | $as_echo "$ac_file" >&6; } | |
4568 | ac_exeext=$ac_cv_exeext | |
4569 | ||
4570 | rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out | |
4571 | ac_clean_files=$ac_clean_files_save | |
4572 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 | |
4573 | $as_echo_n "checking for suffix of executables... " >&6; } | |
4574 | if { { ac_try="$ac_link" | |
4575 | case "(($ac_try" in | |
4576 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4577 | *) ac_try_echo=$ac_try;; | |
4578 | esac | |
4579 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
4580 | $as_echo "$ac_try_echo"; } >&5 | |
4581 | (eval "$ac_link") 2>&5 | |
4582 | ac_status=$? | |
4583 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
4584 | test $ac_status = 0; }; then : | |
4585 | # If both `conftest.exe' and `conftest' are `present' (well, observable) | |
4586 | # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will | |
4587 | # work properly (i.e., refer to `conftest.exe'), while it won't with | |
4588 | # `rm'. | |
4589 | for ac_file in conftest.exe conftest conftest.*; do | |
4590 | test -f "$ac_file" || continue | |
4591 | case $ac_file in | |
4592 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; | |
4593 | *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` | |
4594 | break;; | |
4595 | * ) break;; | |
4596 | esac | |
4597 | done | |
4598 | else | |
4599 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
4600 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
2018939f | 4601 | as_fn_error $? "cannot compute suffix of executables: cannot compile and link |
d6974efa | 4602 | See \`config.log' for more details" "$LINENO" 5; } |
067d23c9 KY |
4603 | fi |
4604 | rm -f conftest conftest$ac_cv_exeext | |
4605 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 | |
4606 | $as_echo "$ac_cv_exeext" >&6; } | |
4607 | ||
4608 | rm -f conftest.$ac_ext | |
4609 | EXEEXT=$ac_cv_exeext | |
4610 | ac_exeext=$EXEEXT | |
4611 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4612 | /* end confdefs.h. */ | |
4613 | #include <stdio.h> | |
4614 | int | |
4615 | main () | |
4616 | { | |
4617 | FILE *f = fopen ("conftest.out", "w"); | |
4618 | return ferror (f) || fclose (f) != 0; | |
4619 | ||
4620 | ; | |
4621 | return 0; | |
4622 | } | |
4623 | _ACEOF | |
4624 | ac_clean_files="$ac_clean_files conftest.out" | |
4625 | # Check that the compiler produces executables we can run. If not, either | |
4626 | # the compiler is broken, or we cross compile. | |
4627 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 | |
4628 | $as_echo_n "checking whether we are cross compiling... " >&6; } | |
4629 | if test "$cross_compiling" != yes; then | |
4630 | { { ac_try="$ac_link" | |
4631 | case "(($ac_try" in | |
4632 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4633 | *) ac_try_echo=$ac_try;; | |
4634 | esac | |
4635 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
4636 | $as_echo "$ac_try_echo"; } >&5 | |
4637 | (eval "$ac_link") 2>&5 | |
4638 | ac_status=$? | |
4639 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
4640 | test $ac_status = 0; } | |
4641 | if { ac_try='./conftest$ac_cv_exeext' | |
4642 | { { case "(($ac_try" in | |
4643 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4644 | *) ac_try_echo=$ac_try;; | |
4645 | esac | |
4646 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
4647 | $as_echo "$ac_try_echo"; } >&5 | |
4648 | (eval "$ac_try") 2>&5 | |
4649 | ac_status=$? | |
4650 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
4651 | test $ac_status = 0; }; }; then | |
4652 | cross_compiling=no | |
4653 | else | |
4654 | if test "$cross_compiling" = maybe; then | |
4655 | cross_compiling=yes | |
4656 | else | |
4657 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
4658 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
2018939f | 4659 | as_fn_error $? "cannot run C compiled programs. |
067d23c9 | 4660 | If you meant to cross compile, use \`--host'. |
d6974efa | 4661 | See \`config.log' for more details" "$LINENO" 5; } |
067d23c9 KY |
4662 | fi |
4663 | fi | |
4664 | fi | |
4665 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 | |
4666 | $as_echo "$cross_compiling" >&6; } | |
4667 | ||
4668 | rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out | |
4669 | ac_clean_files=$ac_clean_files_save | |
4670 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 | |
4671 | $as_echo_n "checking for suffix of object files... " >&6; } | |
d6974efa | 4672 | if ${ac_cv_objext+:} false; then : |
067d23c9 KY |
4673 | $as_echo_n "(cached) " >&6 |
4674 | else | |
4675 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4676 | /* end confdefs.h. */ | |
4677 | ||
4678 | int | |
4679 | main () | |
4680 | { | |
4681 | ||
4682 | ; | |
4683 | return 0; | |
4684 | } | |
4685 | _ACEOF | |
4686 | rm -f conftest.o conftest.obj | |
4687 | if { { ac_try="$ac_compile" | |
4688 | case "(($ac_try" in | |
4689 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4690 | *) ac_try_echo=$ac_try;; | |
4691 | esac | |
4692 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
4693 | $as_echo "$ac_try_echo"; } >&5 | |
4694 | (eval "$ac_compile") 2>&5 | |
4695 | ac_status=$? | |
4696 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
4697 | test $ac_status = 0; }; then : | |
4698 | for ac_file in conftest.o conftest.obj conftest.*; do | |
4699 | test -f "$ac_file" || continue; | |
4700 | case $ac_file in | |
4701 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; | |
4702 | *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` | |
4703 | break;; | |
4704 | esac | |
4705 | done | |
4706 | else | |
4707 | $as_echo "$as_me: failed program was:" >&5 | |
4708 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4709 | ||
4710 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
4711 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
2018939f | 4712 | as_fn_error $? "cannot compute suffix of object files: cannot compile |
d6974efa | 4713 | See \`config.log' for more details" "$LINENO" 5; } |
067d23c9 KY |
4714 | fi |
4715 | rm -f conftest.$ac_cv_objext conftest.$ac_ext | |
4716 | fi | |
4717 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 | |
4718 | $as_echo "$ac_cv_objext" >&6; } | |
4719 | OBJEXT=$ac_cv_objext | |
4720 | ac_objext=$OBJEXT | |
4721 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 | |
4722 | $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } | |
d6974efa | 4723 | if ${ac_cv_c_compiler_gnu+:} false; then : |
067d23c9 KY |
4724 | $as_echo_n "(cached) " >&6 |
4725 | else | |
4726 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4727 | /* end confdefs.h. */ | |
4728 | ||
4729 | int | |
4730 | main () | |
4731 | { | |
4732 | #ifndef __GNUC__ | |
4733 | choke me | |
4734 | #endif | |
4735 | ||
4736 | ; | |
4737 | return 0; | |
4738 | } | |
4739 | _ACEOF | |
4740 | if ac_fn_c_try_compile "$LINENO"; then : | |
4741 | ac_compiler_gnu=yes | |
4742 | else | |
4743 | ac_compiler_gnu=no | |
4744 | fi | |
4745 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4746 | ac_cv_c_compiler_gnu=$ac_compiler_gnu | |
4747 | ||
4748 | fi | |
4749 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 | |
4750 | $as_echo "$ac_cv_c_compiler_gnu" >&6; } | |
4751 | if test $ac_compiler_gnu = yes; then | |
4752 | GCC=yes | |
4753 | else | |
4754 | GCC= | |
4755 | fi | |
4756 | ac_test_CFLAGS=${CFLAGS+set} | |
4757 | ac_save_CFLAGS=$CFLAGS | |
4758 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 | |
4759 | $as_echo_n "checking whether $CC accepts -g... " >&6; } | |
d6974efa | 4760 | if ${ac_cv_prog_cc_g+:} false; then : |
067d23c9 KY |
4761 | $as_echo_n "(cached) " >&6 |
4762 | else | |
4763 | ac_save_c_werror_flag=$ac_c_werror_flag | |
4764 | ac_c_werror_flag=yes | |
4765 | ac_cv_prog_cc_g=no | |
4766 | CFLAGS="-g" | |
4767 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4768 | /* end confdefs.h. */ | |
4769 | ||
4770 | int | |
4771 | main () | |
4772 | { | |
4773 | ||
4774 | ; | |
4775 | return 0; | |
4776 | } | |
4777 | _ACEOF | |
4778 | if ac_fn_c_try_compile "$LINENO"; then : | |
4779 | ac_cv_prog_cc_g=yes | |
4780 | else | |
4781 | CFLAGS="" | |
4782 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4783 | /* end confdefs.h. */ | |
4784 | ||
4785 | int | |
4786 | main () | |
4787 | { | |
4788 | ||
4789 | ; | |
4790 | return 0; | |
4791 | } | |
4792 | _ACEOF | |
4793 | if ac_fn_c_try_compile "$LINENO"; then : | |
4794 | ||
4795 | else | |
4796 | ac_c_werror_flag=$ac_save_c_werror_flag | |
4797 | CFLAGS="-g" | |
4798 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4799 | /* end confdefs.h. */ | |
4800 | ||
4801 | int | |
4802 | main () | |
4803 | { | |
4804 | ||
4805 | ; | |
4806 | return 0; | |
4807 | } | |
4808 | _ACEOF | |
4809 | if ac_fn_c_try_compile "$LINENO"; then : | |
4810 | ac_cv_prog_cc_g=yes | |
4811 | fi | |
4812 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4813 | fi | |
4814 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4815 | fi | |
4816 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4817 | ac_c_werror_flag=$ac_save_c_werror_flag | |
4818 | fi | |
4819 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 | |
4820 | $as_echo "$ac_cv_prog_cc_g" >&6; } | |
4821 | if test "$ac_test_CFLAGS" = set; then | |
4822 | CFLAGS=$ac_save_CFLAGS | |
4823 | elif test $ac_cv_prog_cc_g = yes; then | |
4824 | if test "$GCC" = yes; then | |
4825 | CFLAGS="-g -O2" | |
4826 | else | |
4827 | CFLAGS="-g" | |
4828 | fi | |
4829 | else | |
4830 | if test "$GCC" = yes; then | |
4831 | CFLAGS="-O2" | |
4832 | else | |
4833 | CFLAGS= | |
4834 | fi | |
4835 | fi | |
4836 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 | |
4837 | $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } | |
d6974efa | 4838 | if ${ac_cv_prog_cc_c89+:} false; then : |
067d23c9 KY |
4839 | $as_echo_n "(cached) " >&6 |
4840 | else | |
4841 | ac_cv_prog_cc_c89=no | |
4842 | ac_save_CC=$CC | |
4843 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4844 | /* end confdefs.h. */ | |
4845 | #include <stdarg.h> | |
4846 | #include <stdio.h> | |
4847 | #include <sys/types.h> | |
4848 | #include <sys/stat.h> | |
4849 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
4850 | struct buf { int x; }; | |
4851 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
4852 | static char *e (p, i) | |
4853 | char **p; | |
4854 | int i; | |
4855 | { | |
4856 | return p[i]; | |
4857 | } | |
4858 | static char *f (char * (*g) (char **, int), char **p, ...) | |
4859 | { | |
4860 | char *s; | |
4861 | va_list v; | |
4862 | va_start (v,p); | |
4863 | s = g (p, va_arg (v,int)); | |
4864 | va_end (v); | |
4865 | return s; | |
4866 | } | |
4867 | ||
4868 | /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has | |
4869 | function prototypes and stuff, but not '\xHH' hex character constants. | |
4870 | These don't provoke an error unfortunately, instead are silently treated | |
4871 | as 'x'. The following induces an error, until -std is added to get | |
4872 | proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an | |
4873 | array size at least. It's necessary to write '\x00'==0 to get something | |
4874 | that's true only with -std. */ | |
4875 | int osf4_cc_array ['\x00' == 0 ? 1 : -1]; | |
4876 | ||
4877 | /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters | |
4878 | inside strings and character constants. */ | |
4879 | #define FOO(x) 'x' | |
4880 | int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; | |
4881 | ||
4882 | int test (int i, double x); | |
4883 | struct s1 {int (*f) (int a);}; | |
4884 | struct s2 {int (*f) (double a);}; | |
4885 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
4886 | int argc; | |
4887 | char **argv; | |
4888 | int | |
4889 | main () | |
4890 | { | |
4891 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; | |
4892 | ; | |
4893 | return 0; | |
4894 | } | |
4895 | _ACEOF | |
4896 | for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ | |
4897 | -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
4898 | do | |
4899 | CC="$ac_save_CC $ac_arg" | |
4900 | if ac_fn_c_try_compile "$LINENO"; then : | |
4901 | ac_cv_prog_cc_c89=$ac_arg | |
4902 | fi | |
4903 | rm -f core conftest.err conftest.$ac_objext | |
4904 | test "x$ac_cv_prog_cc_c89" != "xno" && break | |
4905 | done | |
743c80a7 PE |
4906 | rm -f conftest.$ac_ext |
4907 | CC=$ac_save_CC | |
4908 | ||
4909 | fi | |
4910 | # AC_CACHE_VAL | |
4911 | case "x$ac_cv_prog_cc_c89" in | |
4912 | x) | |
4913 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 | |
4914 | $as_echo "none needed" >&6; } ;; | |
4915 | xno) | |
4916 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 | |
4917 | $as_echo "unsupported" >&6; } ;; | |
4918 | *) | |
4919 | CC="$CC $ac_cv_prog_cc_c89" | |
4920 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 | |
4921 | $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; | |
4922 | esac | |
4923 | if test "x$ac_cv_prog_cc_c89" != xno; then : | |
4924 | ||
4925 | fi | |
4926 | ||
4927 | ac_ext=c | |
4928 | ac_cpp='$CPP $CPPFLAGS' | |
4929 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
4930 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
4931 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
4932 | DEPDIR="${am__leading_dot}deps" | |
4933 | ||
4934 | ac_config_commands="$ac_config_commands depfiles" | |
4935 | ||
4936 | ||
4937 | am_make=${MAKE-make} | |
4938 | cat > confinc << 'END' | |
4939 | am__doit: | |
4940 | @echo this is the am__doit target | |
4941 | .PHONY: am__doit | |
4942 | END | |
4943 | # If we don't find an include directive, just comment out the code. | |
4944 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 | |
4945 | $as_echo_n "checking for style of include used by $am_make... " >&6; } | |
4946 | am__include="#" | |
4947 | am__quote= | |
4948 | _am_result=none | |
4949 | # First try GNU make style include. | |
4950 | echo "include confinc" > confmf | |
4951 | # Ignore all kinds of additional output from `make'. | |
4952 | case `$am_make -s -f confmf 2> /dev/null` in #( | |
4953 | *the\ am__doit\ target*) | |
4954 | am__include=include | |
4955 | am__quote= | |
4956 | _am_result=GNU | |
4957 | ;; | |
4958 | esac | |
4959 | # Now try BSD make style include. | |
4960 | if test "$am__include" = "#"; then | |
4961 | echo '.include "confinc"' > confmf | |
4962 | case `$am_make -s -f confmf 2> /dev/null` in #( | |
4963 | *the\ am__doit\ target*) | |
4964 | am__include=.include | |
4965 | am__quote="\"" | |
4966 | _am_result=BSD | |
4967 | ;; | |
4968 | esac | |
4969 | fi | |
4970 | ||
4971 | ||
4972 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 | |
4973 | $as_echo "$_am_result" >&6; } | |
4974 | rm -f confinc confmf | |
4975 | ||
4976 | # Check whether --enable-dependency-tracking was given. | |
4977 | if test "${enable_dependency_tracking+set}" = set; then : | |
4978 | enableval=$enable_dependency_tracking; | |
4979 | fi | |
4980 | ||
4981 | if test "x$enable_dependency_tracking" != xno; then | |
4982 | am_depcomp="$ac_aux_dir/depcomp" | |
4983 | AMDEPBACKSLASH='\' | |
4984 | fi | |
4985 | if test "x$enable_dependency_tracking" != xno; then | |
4986 | AMDEP_TRUE= | |
4987 | AMDEP_FALSE='#' | |
4988 | else | |
4989 | AMDEP_TRUE='#' | |
4990 | AMDEP_FALSE= | |
4991 | fi | |
4992 | ||
4993 | ||
4994 | ||
4995 | depcc="$CC" am_compiler_list= | |
4996 | ||
4997 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 | |
4998 | $as_echo_n "checking dependency style of $depcc... " >&6; } | |
d6974efa | 4999 | if ${am_cv_CC_dependencies_compiler_type+:} false; then : |
743c80a7 PE |
5000 | $as_echo_n "(cached) " >&6 |
5001 | else | |
5002 | if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then | |
5003 | # We make a subdir and do the tests there. Otherwise we can end up | |
5004 | # making bogus files that we don't know about and never remove. For | |
5005 | # instance it was reported that on HP-UX the gcc test will end up | |
5006 | # making a dummy file named `D' -- because `-MD' means `put the output | |
5007 | # in D'. | |
5008 | mkdir conftest.dir | |
5009 | # Copy depcomp to subdir because otherwise we won't find it if we're | |
5010 | # using a relative directory. | |
5011 | cp "$am_depcomp" conftest.dir | |
5012 | cd conftest.dir | |
5013 | # We will build objects and dependencies in a subdirectory because | |
5014 | # it helps to detect inapplicable dependency modes. For instance | |
5015 | # both Tru64's cc and ICC support -MD to output dependencies as a | |
5016 | # side effect of compilation, but ICC will put the dependencies in | |
5017 | # the current directory while Tru64 will put them in the object | |
5018 | # directory. | |
5019 | mkdir sub | |
5020 | ||
5021 | am_cv_CC_dependencies_compiler_type=none | |
5022 | if test "$am_compiler_list" = ""; then | |
5023 | am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` | |
5024 | fi | |
5025 | am__universal=false | |
5026 | case " $depcc " in #( | |
5027 | *\ -arch\ *\ -arch\ *) am__universal=true ;; | |
5028 | esac | |
5029 | ||
5030 | for depmode in $am_compiler_list; do | |
5031 | # Setup a source with many dependencies, because some compilers | |
5032 | # like to wrap large dependency lists on column 80 (with \), and | |
5033 | # we should not choose a depcomp mode which is confused by this. | |
5034 | # | |
5035 | # We need to recreate these files for each test, as the compiler may | |
5036 | # overwrite some of them when testing with obscure command lines. | |
5037 | # This happens at least with the AIX C compiler. | |
5038 | : > sub/conftest.c | |
5039 | for i in 1 2 3 4 5 6; do | |
5040 | echo '#include "conftst'$i'.h"' >> sub/conftest.c | |
5041 | # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with | |
5042 | # Solaris 8's {/usr,}/bin/sh. | |
5043 | touch sub/conftst$i.h | |
5044 | done | |
5045 | echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf | |
5046 | ||
5047 | # We check with `-c' and `-o' for the sake of the "dashmstdout" | |
5048 | # mode. It turns out that the SunPro C++ compiler does not properly | |
5049 | # handle `-M -o', and we need to detect this. Also, some Intel | |
5050 | # versions had trouble with output in subdirs | |
5051 | am__obj=sub/conftest.${OBJEXT-o} | |
5052 | am__minus_obj="-o $am__obj" | |
5053 | case $depmode in | |
5054 | gcc) | |
5055 | # This depmode causes a compiler race in universal mode. | |
5056 | test "$am__universal" = false || continue | |
5057 | ;; | |
5058 | nosideeffect) | |
5059 | # after this tag, mechanisms are not by side-effect, so they'll | |
5060 | # only be used when explicitly requested | |
5061 | if test "x$enable_dependency_tracking" = xyes; then | |
5062 | continue | |
5063 | else | |
5064 | break | |
5065 | fi | |
5066 | ;; | |
5067 | msvisualcpp | msvcmsys) | |
5068 | # This compiler won't grok `-c -o', but also, the minuso test has | |
5069 | # not run yet. These depmodes are late enough in the game, and | |
5070 | # so weak that their functioning should not be impacted. | |
5071 | am__obj=conftest.${OBJEXT-o} | |
5072 | am__minus_obj= | |
5073 | ;; | |
5074 | none) break ;; | |
5075 | esac | |
5076 | if depmode=$depmode \ | |
5077 | source=sub/conftest.c object=$am__obj \ | |
5078 | depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ | |
5079 | $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ | |
5080 | >/dev/null 2>conftest.err && | |
5081 | grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && | |
5082 | grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && | |
5083 | grep $am__obj sub/conftest.Po > /dev/null 2>&1 && | |
5084 | ${MAKE-make} -s -f confmf > /dev/null 2>&1; then | |
5085 | # icc doesn't choke on unknown options, it will just issue warnings | |
5086 | # or remarks (even with -Werror). So we grep stderr for any message | |
5087 | # that says an option was ignored or not supported. | |
5088 | # When given -MP, icc 7.0 and 7.1 complain thusly: | |
5089 | # icc: Command line warning: ignoring option '-M'; no argument required | |
5090 | # The diagnosis changed in icc 8.0: | |
5091 | # icc: Command line remark: option '-MP' not supported | |
5092 | if (grep 'ignoring option' conftest.err || | |
5093 | grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else | |
5094 | am_cv_CC_dependencies_compiler_type=$depmode | |
5095 | break | |
5096 | fi | |
5097 | fi | |
5098 | done | |
5099 | ||
5100 | cd .. | |
5101 | rm -rf conftest.dir | |
5102 | else | |
5103 | am_cv_CC_dependencies_compiler_type=none | |
5104 | fi | |
5105 | ||
5106 | fi | |
5107 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 | |
5108 | $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } | |
5109 | CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type | |
5110 | ||
5111 | if | |
5112 | test "x$enable_dependency_tracking" != xno \ | |
5113 | && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then | |
5114 | am__fastdepCC_TRUE= | |
5115 | am__fastdepCC_FALSE='#' | |
5116 | else | |
5117 | am__fastdepCC_TRUE='#' | |
5118 | am__fastdepCC_FALSE= | |
5119 | fi | |
5120 | ||
5121 | ||
5122 | if test "x$CC" != xcc; then | |
5123 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5 | |
5124 | $as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; } | |
5125 | else | |
5126 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5 | |
5127 | $as_echo_n "checking whether cc understands -c and -o together... " >&6; } | |
5128 | fi | |
5129 | set dummy $CC; ac_cc=`$as_echo "$2" | | |
5130 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` | |
d6974efa | 5131 | if eval \${ac_cv_prog_cc_${ac_cc}_c_o+:} false; then : |
743c80a7 PE |
5132 | $as_echo_n "(cached) " >&6 |
5133 | else | |
5134 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5135 | /* end confdefs.h. */ | |
5136 | ||
5137 | int | |
5138 | main () | |
5139 | { | |
5140 | ||
5141 | ; | |
5142 | return 0; | |
5143 | } | |
5144 | _ACEOF | |
5145 | # Make sure it works both with $CC and with simple cc. | |
5146 | # We do the test twice because some compilers refuse to overwrite an | |
5147 | # existing .o file with -o, though they will create one. | |
5148 | ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5' | |
5149 | rm -f conftest2.* | |
5150 | if { { case "(($ac_try" in | |
5151 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5152 | *) ac_try_echo=$ac_try;; | |
5153 | esac | |
5154 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
5155 | $as_echo "$ac_try_echo"; } >&5 | |
5156 | (eval "$ac_try") 2>&5 | |
5157 | ac_status=$? | |
5158 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
5159 | test $ac_status = 0; } && | |
5160 | test -f conftest2.$ac_objext && { { case "(($ac_try" in | |
5161 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5162 | *) ac_try_echo=$ac_try;; | |
5163 | esac | |
5164 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
5165 | $as_echo "$ac_try_echo"; } >&5 | |
5166 | (eval "$ac_try") 2>&5 | |
5167 | ac_status=$? | |
5168 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
5169 | test $ac_status = 0; }; | |
5170 | then | |
5171 | eval ac_cv_prog_cc_${ac_cc}_c_o=yes | |
5172 | if test "x$CC" != xcc; then | |
5173 | # Test first that cc exists at all. | |
5174 | if { ac_try='cc -c conftest.$ac_ext >&5' | |
5175 | { { case "(($ac_try" in | |
5176 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5177 | *) ac_try_echo=$ac_try;; | |
5178 | esac | |
5179 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
5180 | $as_echo "$ac_try_echo"; } >&5 | |
5181 | (eval "$ac_try") 2>&5 | |
5182 | ac_status=$? | |
5183 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
5184 | test $ac_status = 0; }; }; then | |
5185 | ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5' | |
5186 | rm -f conftest2.* | |
5187 | if { { case "(($ac_try" in | |
5188 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5189 | *) ac_try_echo=$ac_try;; | |
5190 | esac | |
5191 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
5192 | $as_echo "$ac_try_echo"; } >&5 | |
5193 | (eval "$ac_try") 2>&5 | |
5194 | ac_status=$? | |
5195 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
5196 | test $ac_status = 0; } && | |
5197 | test -f conftest2.$ac_objext && { { case "(($ac_try" in | |
5198 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5199 | *) ac_try_echo=$ac_try;; | |
5200 | esac | |
5201 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
5202 | $as_echo "$ac_try_echo"; } >&5 | |
5203 | (eval "$ac_try") 2>&5 | |
5204 | ac_status=$? | |
5205 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
5206 | test $ac_status = 0; }; | |
5207 | then | |
5208 | # cc works too. | |
5209 | : | |
5210 | else | |
5211 | # cc exists but doesn't like -o. | |
5212 | eval ac_cv_prog_cc_${ac_cc}_c_o=no | |
5213 | fi | |
5214 | fi | |
5215 | fi | |
5216 | else | |
5217 | eval ac_cv_prog_cc_${ac_cc}_c_o=no | |
5218 | fi | |
5219 | rm -f core conftest* | |
5220 | ||
5221 | fi | |
5222 | if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then | |
5223 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
5224 | $as_echo "yes" >&6; } | |
5225 | else | |
5226 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
5227 | $as_echo "no" >&6; } | |
5228 | ||
5229 | $as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h | |
5230 | ||
5231 | fi | |
5232 | ||
5233 | # FIXME: we rely on the cache variable name because | |
5234 | # there is no other way. | |
5235 | set dummy $CC | |
5236 | am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` | |
5237 | eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o | |
5238 | if test "$am_t" != yes; then | |
5239 | # Losing compiler, so override with the script. | |
5240 | # FIXME: It is wrong to rewrite CC. | |
5241 | # But if we don't then we get into trouble of one sort or another. | |
5242 | # A longer-term fix would be to have automake use am__CC in this case, | |
5243 | # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" | |
5244 | CC="$am_aux_dir/compile $CC" | |
5245 | fi | |
5246 | ||
5247 | ||
5248 | ||
5249 | # Initialize gnulib right after verifying that the C compiler works. | |
5250 | if test -n "$ac_tool_prefix"; then | |
5251 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
5252 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
5253 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
5254 | $as_echo_n "checking for $ac_word... " >&6; } | |
d6974efa | 5255 | if ${ac_cv_prog_RANLIB+:} false; then : |
743c80a7 PE |
5256 | $as_echo_n "(cached) " >&6 |
5257 | else | |
5258 | if test -n "$RANLIB"; then | |
5259 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
5260 | else | |
5261 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5262 | for as_dir in $PATH | |
5263 | do | |
5264 | IFS=$as_save_IFS | |
5265 | test -z "$as_dir" && as_dir=. | |
5266 | for ac_exec_ext in '' $ac_executable_extensions; do | |
5267 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
5268 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" | |
5269 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
5270 | break 2 | |
5271 | fi | |
5272 | done | |
5273 | done | |
5274 | IFS=$as_save_IFS | |
5275 | ||
5276 | fi | |
5277 | fi | |
5278 | RANLIB=$ac_cv_prog_RANLIB | |
5279 | if test -n "$RANLIB"; then | |
5280 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 | |
5281 | $as_echo "$RANLIB" >&6; } | |
5282 | else | |
5283 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
5284 | $as_echo "no" >&6; } | |
5285 | fi | |
5286 | ||
5287 | ||
5288 | fi | |
5289 | if test -z "$ac_cv_prog_RANLIB"; then | |
5290 | ac_ct_RANLIB=$RANLIB | |
5291 | # Extract the first word of "ranlib", so it can be a program name with args. | |
5292 | set dummy ranlib; ac_word=$2 | |
5293 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
5294 | $as_echo_n "checking for $ac_word... " >&6; } | |
d6974efa | 5295 | if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : |
743c80a7 PE |
5296 | $as_echo_n "(cached) " >&6 |
5297 | else | |
5298 | if test -n "$ac_ct_RANLIB"; then | |
5299 | ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. | |
5300 | else | |
5301 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5302 | for as_dir in $PATH | |
5303 | do | |
5304 | IFS=$as_save_IFS | |
5305 | test -z "$as_dir" && as_dir=. | |
5306 | for ac_exec_ext in '' $ac_executable_extensions; do | |
5307 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
5308 | ac_cv_prog_ac_ct_RANLIB="ranlib" | |
5309 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
5310 | break 2 | |
5311 | fi | |
5312 | done | |
5313 | done | |
5314 | IFS=$as_save_IFS | |
067d23c9 KY |
5315 | |
5316 | fi | |
743c80a7 PE |
5317 | fi |
5318 | ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB | |
5319 | if test -n "$ac_ct_RANLIB"; then | |
5320 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 | |
5321 | $as_echo "$ac_ct_RANLIB" >&6; } | |
5322 | else | |
5323 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
5324 | $as_echo "no" >&6; } | |
5325 | fi | |
067d23c9 | 5326 | |
743c80a7 PE |
5327 | if test "x$ac_ct_RANLIB" = x; then |
5328 | RANLIB=":" | |
5329 | else | |
5330 | case $cross_compiling:$ac_tool_warned in | |
5331 | yes:) | |
5332 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
5333 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
5334 | ac_tool_warned=yes ;; | |
5335 | esac | |
5336 | RANLIB=$ac_ct_RANLIB | |
5337 | fi | |
5338 | else | |
5339 | RANLIB="$ac_cv_prog_RANLIB" | |
067d23c9 KY |
5340 | fi |
5341 | ||
743c80a7 | 5342 | |
067d23c9 KY |
5343 | ac_ext=c |
5344 | ac_cpp='$CPP $CPPFLAGS' | |
5345 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
5346 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
5347 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
5348 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 | |
5349 | $as_echo_n "checking how to run the C preprocessor... " >&6; } | |
5350 | # On Suns, sometimes $CPP names a directory. | |
5351 | if test -n "$CPP" && test -d "$CPP"; then | |
5352 | CPP= | |
5353 | fi | |
5354 | if test -z "$CPP"; then | |
d6974efa | 5355 | if ${ac_cv_prog_CPP+:} false; then : |
067d23c9 KY |
5356 | $as_echo_n "(cached) " >&6 |
5357 | else | |
5358 | # Double quotes because CPP needs to be expanded | |
5359 | for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" | |
5360 | do | |
5361 | ac_preproc_ok=false | |
5362 | for ac_c_preproc_warn_flag in '' yes | |
5363 | do | |
5364 | # Use a header file that comes with gcc, so configuring glibc | |
5365 | # with a fresh cross-compiler works. | |
5366 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
5367 | # <limits.h> exists even on freestanding compilers. | |
5368 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
5369 | # not just through cpp. "Syntax error" is here to catch this case. | |
5370 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5371 | /* end confdefs.h. */ | |
5372 | #ifdef __STDC__ | |
5373 | # include <limits.h> | |
5374 | #else | |
5375 | # include <assert.h> | |
5376 | #endif | |
5377 | Syntax error | |
5378 | _ACEOF | |
5379 | if ac_fn_c_try_cpp "$LINENO"; then : | |
5380 | ||
5381 | else | |
5382 | # Broken: fails on valid input. | |
5383 | continue | |
5384 | fi | |
2018939f | 5385 | rm -f conftest.err conftest.i conftest.$ac_ext |
067d23c9 KY |
5386 | |
5387 | # OK, works on sane cases. Now check whether nonexistent headers | |
5388 | # can be detected and how. | |
5389 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5390 | /* end confdefs.h. */ | |
5391 | #include <ac_nonexistent.h> | |
5392 | _ACEOF | |
5393 | if ac_fn_c_try_cpp "$LINENO"; then : | |
5394 | # Broken: success on invalid input. | |
5395 | continue | |
5396 | else | |
5397 | # Passes both tests. | |
5398 | ac_preproc_ok=: | |
5399 | break | |
5400 | fi | |
2018939f | 5401 | rm -f conftest.err conftest.i conftest.$ac_ext |
067d23c9 KY |
5402 | |
5403 | done | |
5404 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
2018939f | 5405 | rm -f conftest.i conftest.err conftest.$ac_ext |
067d23c9 KY |
5406 | if $ac_preproc_ok; then : |
5407 | break | |
5408 | fi | |
5409 | ||
5410 | done | |
5411 | ac_cv_prog_CPP=$CPP | |
5412 | ||
5413 | fi | |
5414 | CPP=$ac_cv_prog_CPP | |
5415 | else | |
5416 | ac_cv_prog_CPP=$CPP | |
5417 | fi | |
5418 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 | |
5419 | $as_echo "$CPP" >&6; } | |
5420 | ac_preproc_ok=false | |
5421 | for ac_c_preproc_warn_flag in '' yes | |
5422 | do | |
5423 | # Use a header file that comes with gcc, so configuring glibc | |
5424 | # with a fresh cross-compiler works. | |
5425 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
5426 | # <limits.h> exists even on freestanding compilers. | |
5427 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
5428 | # not just through cpp. "Syntax error" is here to catch this case. | |
5429 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5430 | /* end confdefs.h. */ | |
5431 | #ifdef __STDC__ | |
5432 | # include <limits.h> | |
5433 | #else | |
5434 | # include <assert.h> | |
5435 | #endif | |
5436 | Syntax error | |
5437 | _ACEOF | |
5438 | if ac_fn_c_try_cpp "$LINENO"; then : | |
5439 | ||
5440 | else | |
5441 | # Broken: fails on valid input. | |
5442 | continue | |
5443 | fi | |
2018939f | 5444 | rm -f conftest.err conftest.i conftest.$ac_ext |
067d23c9 KY |
5445 | |
5446 | # OK, works on sane cases. Now check whether nonexistent headers | |
5447 | # can be detected and how. | |
5448 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5449 | /* end confdefs.h. */ | |
5450 | #include <ac_nonexistent.h> | |
5451 | _ACEOF | |
5452 | if ac_fn_c_try_cpp "$LINENO"; then : | |
5453 | # Broken: success on invalid input. | |
5454 | continue | |
5455 | else | |
5456 | # Passes both tests. | |
5457 | ac_preproc_ok=: | |
5458 | break | |
5459 | fi | |
2018939f | 5460 | rm -f conftest.err conftest.i conftest.$ac_ext |
067d23c9 KY |
5461 | |
5462 | done | |
5463 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
2018939f | 5464 | rm -f conftest.i conftest.err conftest.$ac_ext |
067d23c9 KY |
5465 | if $ac_preproc_ok; then : |
5466 | ||
5467 | else | |
5468 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
5469 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
2018939f | 5470 | as_fn_error $? "C preprocessor \"$CPP\" fails sanity check |
d6974efa | 5471 | See \`config.log' for more details" "$LINENO" 5; } |
067d23c9 KY |
5472 | fi |
5473 | ||
5474 | ac_ext=c | |
5475 | ac_cpp='$CPP $CPPFLAGS' | |
5476 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
5477 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
5478 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
5479 | ||
5480 | ||
5481 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 | |
5482 | $as_echo_n "checking for grep that handles long lines and -e... " >&6; } | |
d6974efa | 5483 | if ${ac_cv_path_GREP+:} false; then : |
067d23c9 KY |
5484 | $as_echo_n "(cached) " >&6 |
5485 | else | |
5486 | if test -z "$GREP"; then | |
5487 | ac_path_GREP_found=false | |
5488 | # Loop through the user's path and test for each of PROGNAME-LIST | |
5489 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5490 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
5491 | do | |
5492 | IFS=$as_save_IFS | |
5493 | test -z "$as_dir" && as_dir=. | |
5494 | for ac_prog in grep ggrep; do | |
5495 | for ac_exec_ext in '' $ac_executable_extensions; do | |
5496 | ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" | |
5497 | { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue | |
5498 | # Check for GNU ac_path_GREP and select it if it is found. | |
5499 | # Check for GNU $ac_path_GREP | |
5500 | case `"$ac_path_GREP" --version 2>&1` in | |
5501 | *GNU*) | |
5502 | ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; | |
5503 | *) | |
5504 | ac_count=0 | |
5505 | $as_echo_n 0123456789 >"conftest.in" | |
5506 | while : | |
5507 | do | |
5508 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
5509 | mv "conftest.tmp" "conftest.in" | |
5510 | cp "conftest.in" "conftest.nl" | |
5511 | $as_echo 'GREP' >> "conftest.nl" | |
5512 | "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
5513 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
5514 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
5515 | if test $ac_count -gt ${ac_path_GREP_max-0}; then | |
5516 | # Best one so far, save it but keep looking for a better one | |
5517 | ac_cv_path_GREP="$ac_path_GREP" | |
5518 | ac_path_GREP_max=$ac_count | |
5519 | fi | |
5520 | # 10*(2^10) chars as input seems more than enough | |
5521 | test $ac_count -gt 10 && break | |
5522 | done | |
5523 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
5524 | esac | |
5525 | ||
5526 | $ac_path_GREP_found && break 3 | |
5527 | done | |
5528 | done | |
5529 | done | |
5530 | IFS=$as_save_IFS | |
5531 | if test -z "$ac_cv_path_GREP"; then | |
2018939f | 5532 | as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 |
067d23c9 KY |
5533 | fi |
5534 | else | |
5535 | ac_cv_path_GREP=$GREP | |
5536 | fi | |
5537 | ||
5538 | fi | |
5539 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 | |
5540 | $as_echo "$ac_cv_path_GREP" >&6; } | |
5541 | GREP="$ac_cv_path_GREP" | |
5542 | ||
5543 | ||
5544 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 | |
5545 | $as_echo_n "checking for egrep... " >&6; } | |
d6974efa | 5546 | if ${ac_cv_path_EGREP+:} false; then : |
067d23c9 KY |
5547 | $as_echo_n "(cached) " >&6 |
5548 | else | |
5549 | if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 | |
5550 | then ac_cv_path_EGREP="$GREP -E" | |
5551 | else | |
5552 | if test -z "$EGREP"; then | |
5553 | ac_path_EGREP_found=false | |
5554 | # Loop through the user's path and test for each of PROGNAME-LIST | |
5555 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5556 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
5557 | do | |
5558 | IFS=$as_save_IFS | |
5559 | test -z "$as_dir" && as_dir=. | |
5560 | for ac_prog in egrep; do | |
5561 | for ac_exec_ext in '' $ac_executable_extensions; do | |
5562 | ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" | |
5563 | { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue | |
5564 | # Check for GNU ac_path_EGREP and select it if it is found. | |
5565 | # Check for GNU $ac_path_EGREP | |
5566 | case `"$ac_path_EGREP" --version 2>&1` in | |
5567 | *GNU*) | |
5568 | ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; | |
5569 | *) | |
5570 | ac_count=0 | |
5571 | $as_echo_n 0123456789 >"conftest.in" | |
5572 | while : | |
5573 | do | |
5574 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
5575 | mv "conftest.tmp" "conftest.in" | |
5576 | cp "conftest.in" "conftest.nl" | |
5577 | $as_echo 'EGREP' >> "conftest.nl" | |
5578 | "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
5579 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
5580 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
5581 | if test $ac_count -gt ${ac_path_EGREP_max-0}; then | |
5582 | # Best one so far, save it but keep looking for a better one | |
5583 | ac_cv_path_EGREP="$ac_path_EGREP" | |
5584 | ac_path_EGREP_max=$ac_count | |
5585 | fi | |
5586 | # 10*(2^10) chars as input seems more than enough | |
5587 | test $ac_count -gt 10 && break | |
5588 | done | |
5589 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
5590 | esac | |
5591 | ||
5592 | $ac_path_EGREP_found && break 3 | |
5593 | done | |
5594 | done | |
5595 | done | |
5596 | IFS=$as_save_IFS | |
5597 | if test -z "$ac_cv_path_EGREP"; then | |
2018939f | 5598 | as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 |
067d23c9 KY |
5599 | fi |
5600 | else | |
5601 | ac_cv_path_EGREP=$EGREP | |
5602 | fi | |
5603 | ||
5604 | fi | |
5605 | fi | |
5606 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 | |
5607 | $as_echo "$ac_cv_path_EGREP" >&6; } | |
5608 | EGREP="$ac_cv_path_EGREP" | |
5609 | ||
5610 | ||
5611 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 | |
5612 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
d6974efa | 5613 | if ${ac_cv_header_stdc+:} false; then : |
067d23c9 KY |
5614 | $as_echo_n "(cached) " >&6 |
5615 | else | |
5616 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5617 | /* end confdefs.h. */ | |
5618 | #include <stdlib.h> | |
5619 | #include <stdarg.h> | |
5620 | #include <string.h> | |
5621 | #include <float.h> | |
5622 | ||
5623 | int | |
5624 | main () | |
5625 | { | |
5626 | ||
5627 | ; | |
5628 | return 0; | |
5629 | } | |
5630 | _ACEOF | |
5631 | if ac_fn_c_try_compile "$LINENO"; then : | |
5632 | ac_cv_header_stdc=yes | |
5633 | else | |
5634 | ac_cv_header_stdc=no | |
5635 | fi | |
5636 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5637 | ||
5638 | if test $ac_cv_header_stdc = yes; then | |
5639 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
5640 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5641 | /* end confdefs.h. */ | |
5642 | #include <string.h> | |
5643 | ||
5644 | _ACEOF | |
5645 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
5646 | $EGREP "memchr" >/dev/null 2>&1; then : | |
5647 | ||
5648 | else | |
5649 | ac_cv_header_stdc=no | |
5650 | fi | |
5651 | rm -f conftest* | |
5652 | ||
5653 | fi | |
5654 | ||
5655 | if test $ac_cv_header_stdc = yes; then | |
5656 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
5657 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5658 | /* end confdefs.h. */ | |
5659 | #include <stdlib.h> | |
5660 | ||
5661 | _ACEOF | |
5662 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
5663 | $EGREP "free" >/dev/null 2>&1; then : | |
5664 | ||
5665 | else | |
5666 | ac_cv_header_stdc=no | |
5667 | fi | |
5668 | rm -f conftest* | |
5669 | ||
5670 | fi | |
5671 | ||
5672 | if test $ac_cv_header_stdc = yes; then | |
5673 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
5674 | if test "$cross_compiling" = yes; then : | |
5675 | : | |
5676 | else | |
5677 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5678 | /* end confdefs.h. */ | |
5679 | #include <ctype.h> | |
5680 | #include <stdlib.h> | |
5681 | #if ((' ' & 0x0FF) == 0x020) | |
5682 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
5683 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
5684 | #else | |
5685 | # define ISLOWER(c) \ | |
5686 | (('a' <= (c) && (c) <= 'i') \ | |
5687 | || ('j' <= (c) && (c) <= 'r') \ | |
5688 | || ('s' <= (c) && (c) <= 'z')) | |
5689 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
5690 | #endif | |
5691 | ||
5692 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
5693 | int | |
5694 | main () | |
5695 | { | |
5696 | int i; | |
5697 | for (i = 0; i < 256; i++) | |
5698 | if (XOR (islower (i), ISLOWER (i)) | |
5699 | || toupper (i) != TOUPPER (i)) | |
5700 | return 2; | |
5701 | return 0; | |
5702 | } | |
5703 | _ACEOF | |
5704 | if ac_fn_c_try_run "$LINENO"; then : | |
5705 | ||
5706 | else | |
5707 | ac_cv_header_stdc=no | |
5708 | fi | |
5709 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
5710 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
5711 | fi | |
5712 | ||
5713 | fi | |
5714 | fi | |
5715 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 | |
5716 | $as_echo "$ac_cv_header_stdc" >&6; } | |
5717 | if test $ac_cv_header_stdc = yes; then | |
5718 | ||
5719 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h | |
5720 | ||
5721 | fi | |
5722 | ||
5723 | # On IRIX 5.3, sys/types and inttypes.h are conflicting. | |
5724 | for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ | |
5725 | inttypes.h stdint.h unistd.h | |
5726 | do : | |
5727 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
5728 | ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default | |
5729 | " | |
2018939f | 5730 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : |
067d23c9 KY |
5731 | cat >>confdefs.h <<_ACEOF |
5732 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
5733 | _ACEOF | |
5734 | ||
5735 | fi | |
5736 | ||
5737 | done | |
5738 | ||
5739 | ||
5740 | ||
1fd182f0 PE |
5741 | |
5742 | ||
067d23c9 | 5743 | ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" |
d6974efa | 5744 | if test "x$ac_cv_header_minix_config_h" = xyes; then : |
067d23c9 KY |
5745 | MINIX=yes |
5746 | else | |
5747 | MINIX= | |
5748 | fi | |
5749 | ||
5750 | ||
5751 | if test "$MINIX" = yes; then | |
5752 | ||
5753 | $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h | |
5754 | ||
5755 | ||
5756 | $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h | |
5757 | ||
5758 | ||
5759 | $as_echo "#define _MINIX 1" >>confdefs.h | |
5760 | ||
5761 | fi | |
5762 | ||
1fd182f0 PE |
5763 | case "$host_os" in |
5764 | hpux*) | |
5765 | ||
5766 | $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h | |
5767 | ||
5768 | ;; | |
5769 | esac | |
5770 | ||
067d23c9 KY |
5771 | |
5772 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 | |
5773 | $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } | |
d6974efa | 5774 | if ${ac_cv_safe_to_define___extensions__+:} false; then : |
067d23c9 KY |
5775 | $as_echo_n "(cached) " >&6 |
5776 | else | |
5777 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5778 | /* end confdefs.h. */ | |
5779 | ||
1fd182f0 PE |
5780 | # define __EXTENSIONS__ 1 |
5781 | $ac_includes_default | |
067d23c9 KY |
5782 | int |
5783 | main () | |
5784 | { | |
5785 | ||
5786 | ; | |
5787 | return 0; | |
5788 | } | |
5789 | _ACEOF | |
5790 | if ac_fn_c_try_compile "$LINENO"; then : | |
5791 | ac_cv_safe_to_define___extensions__=yes | |
5792 | else | |
5793 | ac_cv_safe_to_define___extensions__=no | |
5794 | fi | |
5795 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5796 | fi | |
5797 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 | |
5798 | $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } | |
5799 | test $ac_cv_safe_to_define___extensions__ = yes && | |
5800 | $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h | |
5801 | ||
5802 | $as_echo "#define _ALL_SOURCE 1" >>confdefs.h | |
5803 | ||
5804 | $as_echo "#define _GNU_SOURCE 1" >>confdefs.h | |
5805 | ||
5806 | $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h | |
5807 | ||
5808 | $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h | |
5809 | ||
5810 | ||
5811 | ||
1fd182f0 PE |
5812 | |
5813 | ||
5814 | ||
5815 | ||
5816 | ||
5817 | ||
5818 | ||
5819 | # Code from module arg-nonnull: | |
5820 | # Code from module c++defs: | |
f737437b | 5821 | # Code from module dtoastr: |
1fd182f0 PE |
5822 | # Code from module extensions: |
5823 | ||
e275c824 PE |
5824 | # Code from module getopt-gnu: |
5825 | # Code from module getopt-posix: | |
5826 | # Code from module gettext-h: | |
67342916 | 5827 | # Code from module ignore-value: |
1fd182f0 PE |
5828 | # Code from module include_next: |
5829 | # Code from module intprops: | |
5830 | # Code from module mktime: | |
5831 | # Code from module multiarch: | |
16c3e636 | 5832 | # Code from module stdbool: |
1fd182f0 | 5833 | # Code from module stddef: |
16c3e636 | 5834 | # Code from module strftime: |
1fd182f0 PE |
5835 | # Code from module time: |
5836 | # Code from module time_r: | |
e275c824 | 5837 | # Code from module unistd: |
1fd182f0 PE |
5838 | # Code from module warn-on-use: |
5839 | ||
5840 | ||
5841 | # On Suns, sometimes $CPP names a directory. | |
5842 | if test -n "$CPP" && test -d "$CPP"; then | |
5843 | CPP= | |
5844 | fi | |
5845 | ||
5846 | ## If not using gcc, and on Solaris, and no CPP specified, see if | |
5847 | ## using a Sun compiler, which needs -Xs to prevent whitespace. | |
5848 | if test x"$GCC" != xyes && test x"$emacs_check_sunpro_c" = xyes && \ | |
5849 | test x"$CPP" = x; then | |
5850 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using a Sun C compiler" >&5 | |
5851 | $as_echo_n "checking whether we are using a Sun C compiler... " >&6; } | |
d6974efa | 5852 | if ${emacs_cv_sunpro_c+:} false; then : |
1fd182f0 PE |
5853 | $as_echo_n "(cached) " >&6 |
5854 | else | |
5855 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5856 | /* end confdefs.h. */ | |
5857 | ||
5858 | int | |
5859 | main () | |
5860 | { | |
5861 | #ifndef __SUNPRO_C | |
5862 | fail; | |
5863 | #endif | |
5864 | ||
5865 | ; | |
5866 | return 0; | |
5867 | } | |
5868 | _ACEOF | |
5869 | if ac_fn_c_try_link "$LINENO"; then : | |
5870 | emacs_cv_sunpro_c=yes | |
5871 | else | |
5872 | emacs_cv_sunpro_c=no | |
5873 | fi | |
5874 | rm -f core conftest.err conftest.$ac_objext \ | |
5875 | conftest$ac_exeext conftest.$ac_ext | |
5876 | fi | |
5877 | ||
5878 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_sunpro_c" >&5 | |
5879 | $as_echo "$emacs_cv_sunpro_c" >&6; } | |
5880 | ||
5881 | if test x"$emacs_cv_sunpro_c" = xyes; then | |
5882 | NON_GNU_CPP="$CC -E -Xs" | |
5883 | fi | |
5884 | fi | |
5885 | ||
5886 | #### Some systems specify a CPP to use unless we are using GCC. | |
5887 | #### Now that we know whether we are using GCC, we can decide whether | |
5888 | #### to use that one. | |
5889 | if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x | |
5890 | then | |
5891 | CPP="$NON_GNU_CPP" | |
5892 | fi | |
5893 | ||
5894 | #### Some systems specify a CC to use unless we are using GCC. | |
5895 | #### Now that we know whether we are using GCC, we can decide whether | |
5896 | #### to use that one. | |
5897 | if test "x$NON_GNU_CC" != x && test x$GCC != xyes && | |
5898 | test x$cc_specified != xyes | |
5899 | then | |
5900 | CC="$NON_GNU_CC" | |
5901 | fi | |
5902 | ||
5903 | if test x$GCC = xyes; then | |
5904 | test "x$GCC_TEST_OPTIONS" != x && CC="$CC $GCC_TEST_OPTIONS" | |
5905 | else | |
5906 | test "x$NON_GCC_TEST_OPTIONS" != x && CC="$CC $NON_GCC_TEST_OPTIONS" | |
5907 | fi | |
5908 | ||
067d23c9 KY |
5909 | ### Use -Wno-pointer-sign if the compiler supports it |
5910 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -Wno-pointer-sign" >&5 | |
5911 | $as_echo_n "checking whether gcc understands -Wno-pointer-sign... " >&6; } | |
5912 | SAVE_CFLAGS="$CFLAGS" | |
5913 | CFLAGS="$CFLAGS -Wno-pointer-sign" | |
5914 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5915 | /* end confdefs.h. */ | |
5916 | ||
5917 | int | |
5918 | main () | |
5919 | { | |
5920 | ||
5921 | ; | |
5922 | return 0; | |
5923 | } | |
5924 | _ACEOF | |
5925 | if ac_fn_c_try_compile "$LINENO"; then : | |
5926 | has_option=yes | |
5927 | else | |
5928 | has_option=no | |
5929 | fi | |
5930 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5931 | if test $has_option = yes; then | |
5932 | C_WARNINGS_SWITCH="-Wno-pointer-sign $C_WARNINGS_SWITCH" | |
5933 | fi | |
5934 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_option" >&5 | |
5935 | $as_echo "$has_option" >&6; } | |
5936 | CFLAGS="$SAVE_CFLAGS" | |
5937 | unset has_option | |
5938 | unset SAVE_CFLAGS | |
5939 | ||
5940 | ### Use -Wdeclaration-after-statement if the compiler supports it | |
5941 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -Wdeclaration-after-statement" >&5 | |
5942 | $as_echo_n "checking whether gcc understands -Wdeclaration-after-statement... " >&6; } | |
5943 | SAVE_CFLAGS="$CFLAGS" | |
5944 | CFLAGS="$CFLAGS -Wdeclaration-after-statement" | |
5945 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5946 | /* end confdefs.h. */ | |
5947 | ||
5948 | int | |
5949 | main () | |
5950 | { | |
5951 | ||
5952 | ; | |
5953 | return 0; | |
5954 | } | |
5955 | _ACEOF | |
5956 | if ac_fn_c_try_compile "$LINENO"; then : | |
5957 | has_option=yes | |
5958 | else | |
5959 | has_option=no | |
5960 | fi | |
5961 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5962 | if test $has_option = yes; then | |
5963 | C_WARNINGS_SWITCH="-Wdeclaration-after-statement $C_WARNINGS_SWITCH" | |
5964 | fi | |
5965 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_option" >&5 | |
5966 | $as_echo "$has_option" >&6; } | |
5967 | CFLAGS="$SAVE_CFLAGS" | |
5968 | unset has_option | |
5969 | unset SAVE_CFLAGS | |
5970 | ||
5971 | ### Use -Wold-style-definition if the compiler supports it | |
5972 | # This can be removed when conversion to standard C is finished. | |
5973 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -Wold-style-definition" >&5 | |
5974 | $as_echo_n "checking whether gcc understands -Wold-style-definition... " >&6; } | |
5975 | SAVE_CFLAGS="$CFLAGS" | |
5976 | CFLAGS="$CFLAGS -Wold-style-definition" | |
5977 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5978 | /* end confdefs.h. */ | |
5979 | ||
5980 | int | |
5981 | main () | |
5982 | { | |
5983 | ||
5984 | ; | |
5985 | return 0; | |
5986 | } | |
5987 | _ACEOF | |
5988 | if ac_fn_c_try_compile "$LINENO"; then : | |
5989 | has_option=yes | |
5990 | else | |
5991 | has_option=no | |
5992 | fi | |
5993 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5994 | if test $has_option = yes; then | |
5995 | C_WARNINGS_SWITCH="-Wold-style-definition $C_WARNINGS_SWITCH" | |
5996 | fi | |
5997 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_option" >&5 | |
5998 | $as_echo "$has_option" >&6; } | |
5999 | CFLAGS="$SAVE_CFLAGS" | |
6000 | unset has_option | |
6001 | unset SAVE_CFLAGS | |
6002 | ||
6003 | ### Use -Wimplicit-function-declaration if the compiler supports it | |
6004 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -Wimplicit-function-declaration" >&5 | |
6005 | $as_echo_n "checking whether gcc understands -Wimplicit-function-declaration... " >&6; } | |
6006 | SAVE_CFLAGS="$CFLAGS" | |
6007 | CFLAGS="$CFLAGS -Wimplicit-function-declaration" | |
6008 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6009 | /* end confdefs.h. */ | |
6010 | ||
6011 | int | |
6012 | main () | |
6013 | { | |
6014 | ||
6015 | ; | |
6016 | return 0; | |
6017 | } | |
6018 | _ACEOF | |
6019 | if ac_fn_c_try_compile "$LINENO"; then : | |
6020 | has_option=yes | |
6021 | else | |
6022 | has_option=no | |
6023 | fi | |
6024 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
6025 | if test $has_option = yes; then | |
6026 | C_WARNINGS_SWITCH="-Wimplicit-function-declaration $C_WARNINGS_SWITCH" | |
6027 | fi | |
6028 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_option" >&5 | |
6029 | $as_echo "$has_option" >&6; } | |
6030 | CFLAGS="$SAVE_CFLAGS" | |
6031 | unset has_option | |
6032 | unset SAVE_CFLAGS | |
6033 | ||
6034 | ||
6035 | ||
6036 | ||
6037 | #### Some other nice autoconf tests. | |
6038 | ||
6039 | ac_ext=c | |
6040 | ac_cpp='$CPP $CPPFLAGS' | |
6041 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
6042 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
6043 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
6044 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 | |
6045 | $as_echo_n "checking how to run the C preprocessor... " >&6; } | |
6046 | # On Suns, sometimes $CPP names a directory. | |
6047 | if test -n "$CPP" && test -d "$CPP"; then | |
6048 | CPP= | |
6049 | fi | |
6050 | if test -z "$CPP"; then | |
d6974efa | 6051 | if ${ac_cv_prog_CPP+:} false; then : |
067d23c9 KY |
6052 | $as_echo_n "(cached) " >&6 |
6053 | else | |
6054 | # Double quotes because CPP needs to be expanded | |
6055 | for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" | |
6056 | do | |
6057 | ac_preproc_ok=false | |
6058 | for ac_c_preproc_warn_flag in '' yes | |
6059 | do | |
6060 | # Use a header file that comes with gcc, so configuring glibc | |
6061 | # with a fresh cross-compiler works. | |
6062 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
6063 | # <limits.h> exists even on freestanding compilers. | |
6064 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
6065 | # not just through cpp. "Syntax error" is here to catch this case. | |
6066 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6067 | /* end confdefs.h. */ | |
6068 | #ifdef __STDC__ | |
6069 | # include <limits.h> | |
6070 | #else | |
6071 | # include <assert.h> | |
6072 | #endif | |
6073 | Syntax error | |
6074 | _ACEOF | |
6075 | if ac_fn_c_try_cpp "$LINENO"; then : | |
6076 | ||
6077 | else | |
6078 | # Broken: fails on valid input. | |
6079 | continue | |
6080 | fi | |
2018939f | 6081 | rm -f conftest.err conftest.i conftest.$ac_ext |
067d23c9 KY |
6082 | |
6083 | # OK, works on sane cases. Now check whether nonexistent headers | |
6084 | # can be detected and how. | |
6085 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6086 | /* end confdefs.h. */ | |
6087 | #include <ac_nonexistent.h> | |
6088 | _ACEOF | |
6089 | if ac_fn_c_try_cpp "$LINENO"; then : | |
6090 | # Broken: success on invalid input. | |
6091 | continue | |
6092 | else | |
6093 | # Passes both tests. | |
6094 | ac_preproc_ok=: | |
6095 | break | |
6096 | fi | |
2018939f | 6097 | rm -f conftest.err conftest.i conftest.$ac_ext |
067d23c9 KY |
6098 | |
6099 | done | |
6100 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
2018939f | 6101 | rm -f conftest.i conftest.err conftest.$ac_ext |
067d23c9 KY |
6102 | if $ac_preproc_ok; then : |
6103 | break | |
6104 | fi | |
6105 | ||
6106 | done | |
6107 | ac_cv_prog_CPP=$CPP | |
6108 | ||
6109 | fi | |
6110 | CPP=$ac_cv_prog_CPP | |
6111 | else | |
6112 | ac_cv_prog_CPP=$CPP | |
6113 | fi | |
6114 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 | |
6115 | $as_echo "$CPP" >&6; } | |
6116 | ac_preproc_ok=false | |
6117 | for ac_c_preproc_warn_flag in '' yes | |
6118 | do | |
6119 | # Use a header file that comes with gcc, so configuring glibc | |
6120 | # with a fresh cross-compiler works. | |
6121 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
6122 | # <limits.h> exists even on freestanding compilers. | |
6123 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
6124 | # not just through cpp. "Syntax error" is here to catch this case. | |
6125 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6126 | /* end confdefs.h. */ | |
6127 | #ifdef __STDC__ | |
6128 | # include <limits.h> | |
6129 | #else | |
6130 | # include <assert.h> | |
6131 | #endif | |
6132 | Syntax error | |
6133 | _ACEOF | |
6134 | if ac_fn_c_try_cpp "$LINENO"; then : | |
6135 | ||
6136 | else | |
6137 | # Broken: fails on valid input. | |
6138 | continue | |
6139 | fi | |
2018939f | 6140 | rm -f conftest.err conftest.i conftest.$ac_ext |
067d23c9 KY |
6141 | |
6142 | # OK, works on sane cases. Now check whether nonexistent headers | |
6143 | # can be detected and how. | |
6144 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6145 | /* end confdefs.h. */ | |
6146 | #include <ac_nonexistent.h> | |
6147 | _ACEOF | |
6148 | if ac_fn_c_try_cpp "$LINENO"; then : | |
6149 | # Broken: success on invalid input. | |
6150 | continue | |
6151 | else | |
6152 | # Passes both tests. | |
6153 | ac_preproc_ok=: | |
6154 | break | |
6155 | fi | |
2018939f | 6156 | rm -f conftest.err conftest.i conftest.$ac_ext |
067d23c9 KY |
6157 | |
6158 | done | |
6159 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
2018939f | 6160 | rm -f conftest.i conftest.err conftest.$ac_ext |
067d23c9 KY |
6161 | if $ac_preproc_ok; then : |
6162 | ||
6163 | else | |
6164 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
6165 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
2018939f | 6166 | as_fn_error $? "C preprocessor \"$CPP\" fails sanity check |
d6974efa | 6167 | See \`config.log' for more details" "$LINENO" 5; } |
067d23c9 KY |
6168 | fi |
6169 | ||
6170 | ac_ext=c | |
6171 | ac_cpp='$CPP $CPPFLAGS' | |
6172 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
6173 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
6174 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
6175 | ||
067d23c9 KY |
6176 | |
6177 | if test "x$RANLIB" = x; then | |
6178 | if test -n "$ac_tool_prefix"; then | |
6179 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
6180 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
6181 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
6182 | $as_echo_n "checking for $ac_word... " >&6; } | |
d6974efa | 6183 | if ${ac_cv_prog_RANLIB+:} false; then : |
067d23c9 KY |
6184 | $as_echo_n "(cached) " >&6 |
6185 | else | |
6186 | if test -n "$RANLIB"; then | |
6187 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
6188 | else | |
6189 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6190 | for as_dir in $PATH | |
6191 | do | |
6192 | IFS=$as_save_IFS | |
6193 | test -z "$as_dir" && as_dir=. | |
6194 | for ac_exec_ext in '' $ac_executable_extensions; do | |
6195 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
6196 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" | |
6197 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
6198 | break 2 | |
6199 | fi | |
6200 | done | |
6201 | done | |
6202 | IFS=$as_save_IFS | |
6203 | ||
6204 | fi | |
6205 | fi | |
6206 | RANLIB=$ac_cv_prog_RANLIB | |
6207 | if test -n "$RANLIB"; then | |
6208 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 | |
6209 | $as_echo "$RANLIB" >&6; } | |
6210 | else | |
6211 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
6212 | $as_echo "no" >&6; } | |
6213 | fi | |
6214 | ||
6215 | ||
6216 | fi | |
6217 | if test -z "$ac_cv_prog_RANLIB"; then | |
6218 | ac_ct_RANLIB=$RANLIB | |
6219 | # Extract the first word of "ranlib", so it can be a program name with args. | |
6220 | set dummy ranlib; ac_word=$2 | |
6221 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
6222 | $as_echo_n "checking for $ac_word... " >&6; } | |
d6974efa | 6223 | if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : |
067d23c9 KY |
6224 | $as_echo_n "(cached) " >&6 |
6225 | else | |
6226 | if test -n "$ac_ct_RANLIB"; then | |
6227 | ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. | |
6228 | else | |
6229 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6230 | for as_dir in $PATH | |
6231 | do | |
6232 | IFS=$as_save_IFS | |
6233 | test -z "$as_dir" && as_dir=. | |
6234 | for ac_exec_ext in '' $ac_executable_extensions; do | |
6235 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
6236 | ac_cv_prog_ac_ct_RANLIB="ranlib" | |
6237 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
6238 | break 2 | |
6239 | fi | |
6240 | done | |
6241 | done | |
6242 | IFS=$as_save_IFS | |
6243 | ||
6244 | fi | |
6245 | fi | |
6246 | ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB | |
6247 | if test -n "$ac_ct_RANLIB"; then | |
6248 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 | |
6249 | $as_echo "$ac_ct_RANLIB" >&6; } | |
6250 | else | |
6251 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
6252 | $as_echo "no" >&6; } | |
6253 | fi | |
6254 | ||
6255 | if test "x$ac_ct_RANLIB" = x; then | |
6256 | RANLIB=":" | |
6257 | else | |
6258 | case $cross_compiling:$ac_tool_warned in | |
6259 | yes:) | |
6260 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
6261 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
6262 | ac_tool_warned=yes ;; | |
6263 | esac | |
6264 | RANLIB=$ac_ct_RANLIB | |
6265 | fi | |
6266 | else | |
6267 | RANLIB="$ac_cv_prog_RANLIB" | |
6268 | fi | |
6269 | ||
6270 | fi | |
6271 | ||
6272 | ## Although we're running on an amd64 kernel, we're actually compiling for | |
6273 | ## the x86 architecture. The user should probably have provided an | |
6274 | ## explicit --build to `configure', but if everything else than the kernel | |
6275 | ## is running in i386 mode, we can help them out. | |
6276 | if test "$machine" = "amdx86-64"; then | |
6277 | ac_fn_c_check_decl "$LINENO" "i386" "ac_cv_have_decl_i386" "$ac_includes_default" | |
d6974efa | 6278 | if test "x$ac_cv_have_decl_i386" = xyes; then : |
067d23c9 KY |
6279 | |
6280 | fi | |
6281 | ||
6282 | if test "$ac_cv_have_decl_i386" = "yes"; then | |
6283 | canonical=`echo "$canonical" | sed -e 's/^amd64/i386/' -e 's/^x86_64/i386/'` | |
6284 | machine=intel386 | |
6285 | machfile="m/${machine}.h" | |
6286 | fi | |
6287 | fi | |
6288 | ||
6289 | # Extract the first word of "install-info", so it can be a program name with args. | |
6290 | set dummy install-info; ac_word=$2 | |
6291 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
6292 | $as_echo_n "checking for $ac_word... " >&6; } | |
d6974efa | 6293 | if ${ac_cv_path_INSTALL_INFO+:} false; then : |
067d23c9 KY |
6294 | $as_echo_n "(cached) " >&6 |
6295 | else | |
6296 | case $INSTALL_INFO in | |
6297 | [\\/]* | ?:[\\/]*) | |
6298 | ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path. | |
6299 | ;; | |
6300 | *) | |
6301 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6302 | for as_dir in $PATH | |
6303 | do | |
6304 | IFS=$as_save_IFS | |
6305 | test -z "$as_dir" && as_dir=. | |
6306 | for ac_exec_ext in '' $ac_executable_extensions; do | |
6307 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
6308 | ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext" | |
6309 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
6310 | break 2 | |
6311 | fi | |
6312 | done | |
6313 | done | |
6314 | IFS=$as_save_IFS | |
6315 | ||
6316 | ;; | |
6317 | esac | |
6318 | fi | |
6319 | INSTALL_INFO=$ac_cv_path_INSTALL_INFO | |
6320 | if test -n "$INSTALL_INFO"; then | |
6321 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_INFO" >&5 | |
6322 | $as_echo "$INSTALL_INFO" >&6; } | |
6323 | else | |
6324 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
6325 | $as_echo "no" >&6; } | |
6326 | fi | |
6327 | ||
6328 | ||
6329 | # Extract the first word of "install-info", so it can be a program name with args. | |
6330 | set dummy install-info; ac_word=$2 | |
6331 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
6332 | $as_echo_n "checking for $ac_word... " >&6; } | |
d6974efa | 6333 | if ${ac_cv_path_INSTALL_INFO+:} false; then : |
067d23c9 KY |
6334 | $as_echo_n "(cached) " >&6 |
6335 | else | |
6336 | case $INSTALL_INFO in | |
6337 | [\\/]* | ?:[\\/]*) | |
6338 | ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path. | |
6339 | ;; | |
6340 | *) | |
6341 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6342 | for as_dir in /usr/sbin | |
6343 | do | |
6344 | IFS=$as_save_IFS | |
6345 | test -z "$as_dir" && as_dir=. | |
6346 | for ac_exec_ext in '' $ac_executable_extensions; do | |
6347 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
6348 | ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext" | |
6349 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
6350 | break 2 | |
6351 | fi | |
6352 | done | |
6353 | done | |
6354 | IFS=$as_save_IFS | |
6355 | ||
6356 | ;; | |
6357 | esac | |
6358 | fi | |
6359 | INSTALL_INFO=$ac_cv_path_INSTALL_INFO | |
6360 | if test -n "$INSTALL_INFO"; then | |
6361 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_INFO" >&5 | |
6362 | $as_echo "$INSTALL_INFO" >&6; } | |
6363 | else | |
6364 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
6365 | $as_echo "no" >&6; } | |
6366 | fi | |
6367 | ||
6368 | ||
6369 | # Extract the first word of "install-info", so it can be a program name with args. | |
6370 | set dummy install-info; ac_word=$2 | |
6371 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
6372 | $as_echo_n "checking for $ac_word... " >&6; } | |
d6974efa | 6373 | if ${ac_cv_path_INSTALL_INFO+:} false; then : |
067d23c9 KY |
6374 | $as_echo_n "(cached) " >&6 |
6375 | else | |
6376 | case $INSTALL_INFO in | |
6377 | [\\/]* | ?:[\\/]*) | |
6378 | ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path. | |
6379 | ;; | |
6380 | *) | |
6381 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6382 | for as_dir in /sbin | |
6383 | do | |
6384 | IFS=$as_save_IFS | |
6385 | test -z "$as_dir" && as_dir=. | |
6386 | for ac_exec_ext in '' $ac_executable_extensions; do | |
6387 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
6388 | ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext" | |
6389 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
6390 | break 2 | |
6391 | fi | |
6392 | done | |
6393 | done | |
6394 | IFS=$as_save_IFS | |
6395 | ||
6396 | test -z "$ac_cv_path_INSTALL_INFO" && ac_cv_path_INSTALL_INFO=":" | |
6397 | ;; | |
6398 | esac | |
6399 | fi | |
6400 | INSTALL_INFO=$ac_cv_path_INSTALL_INFO | |
6401 | if test -n "$INSTALL_INFO"; then | |
6402 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_INFO" >&5 | |
6403 | $as_echo "$INSTALL_INFO" >&6; } | |
6404 | else | |
6405 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
6406 | $as_echo "no" >&6; } | |
6407 | fi | |
6408 | ||
6409 | ||
6410 | # Extract the first word of "gzip", so it can be a program name with args. | |
6411 | set dummy gzip; ac_word=$2 | |
6412 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
6413 | $as_echo_n "checking for $ac_word... " >&6; } | |
d6974efa | 6414 | if ${ac_cv_path_GZIP_PROG+:} false; then : |
067d23c9 KY |
6415 | $as_echo_n "(cached) " >&6 |
6416 | else | |
6417 | case $GZIP_PROG in | |
6418 | [\\/]* | ?:[\\/]*) | |
6419 | ac_cv_path_GZIP_PROG="$GZIP_PROG" # Let the user override the test with a path. | |
6420 | ;; | |
6421 | *) | |
6422 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6423 | for as_dir in $PATH | |
6424 | do | |
6425 | IFS=$as_save_IFS | |
6426 | test -z "$as_dir" && as_dir=. | |
6427 | for ac_exec_ext in '' $ac_executable_extensions; do | |
6428 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
6429 | ac_cv_path_GZIP_PROG="$as_dir/$ac_word$ac_exec_ext" | |
6430 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
6431 | break 2 | |
6432 | fi | |
6433 | done | |
6434 | done | |
6435 | IFS=$as_save_IFS | |
6436 | ||
6437 | ;; | |
6438 | esac | |
6439 | fi | |
6440 | GZIP_PROG=$ac_cv_path_GZIP_PROG | |
6441 | if test -n "$GZIP_PROG"; then | |
6442 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP_PROG" >&5 | |
6443 | $as_echo "$GZIP_PROG" >&6; } | |
6444 | else | |
6445 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
6446 | $as_echo "no" >&6; } | |
6447 | fi | |
6448 | ||
6449 | ||
6450 | ||
6451 | ||
6452 | ## Need makeinfo >= 4.6 (?) to build the manuals. | |
6453 | # Extract the first word of "makeinfo", so it can be a program name with args. | |
6454 | set dummy makeinfo; ac_word=$2 | |
6455 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
6456 | $as_echo_n "checking for $ac_word... " >&6; } | |
d6974efa | 6457 | if ${ac_cv_path_MAKEINFO+:} false; then : |
067d23c9 KY |
6458 | $as_echo_n "(cached) " >&6 |
6459 | else | |
6460 | case $MAKEINFO in | |
6461 | [\\/]* | ?:[\\/]*) | |
6462 | ac_cv_path_MAKEINFO="$MAKEINFO" # Let the user override the test with a path. | |
6463 | ;; | |
6464 | *) | |
6465 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6466 | for as_dir in $PATH | |
6467 | do | |
6468 | IFS=$as_save_IFS | |
6469 | test -z "$as_dir" && as_dir=. | |
6470 | for ac_exec_ext in '' $ac_executable_extensions; do | |
6471 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
6472 | ac_cv_path_MAKEINFO="$as_dir/$ac_word$ac_exec_ext" | |
6473 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
6474 | break 2 | |
6475 | fi | |
6476 | done | |
6477 | done | |
6478 | IFS=$as_save_IFS | |
6479 | ||
6480 | test -z "$ac_cv_path_MAKEINFO" && ac_cv_path_MAKEINFO="no" | |
6481 | ;; | |
6482 | esac | |
6483 | fi | |
6484 | MAKEINFO=$ac_cv_path_MAKEINFO | |
6485 | if test -n "$MAKEINFO"; then | |
6486 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKEINFO" >&5 | |
6487 | $as_echo "$MAKEINFO" >&6; } | |
6488 | else | |
6489 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
6490 | $as_echo "no" >&6; } | |
6491 | fi | |
6492 | ||
6493 | ||
6494 | if test "$MAKEINFO" != "no" && \ | |
6495 | 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 | |
6496 | MAKEINFO=no | |
6497 | fi | |
6498 | ||
6499 | ## Makeinfo is unusual. For a released Emacs, the manuals are | |
6500 | ## pre-built, and not deleted by the normal clean rules. makeinfo is | |
6501 | ## therefore in the category of "special tools" not normally required, which | |
6502 | ## configure does not have to check for (eg autoconf itself). | |
6503 | ## In a Bazaar checkout on the other hand, the manuals are not included. | |
6504 | ## So makeinfo is a requirement to build from Bazaar, and configure | |
6505 | ## should test for it as it does for any other build requirement. | |
6506 | ## We use the presence of $srcdir/info/emacs to distinguish a release, | |
6507 | ## with pre-built manuals, from a Bazaar checkout. | |
96f129d5 GM |
6508 | HAVE_MAKEINFO=yes |
6509 | ||
067d23c9 | 6510 | if test "$MAKEINFO" = "no"; then |
96f129d5 | 6511 | MAKEINFO=makeinfo |
067d23c9 | 6512 | if test "x${with_makeinfo}" = "xno"; then |
96f129d5 | 6513 | HAVE_MAKEINFO=no |
067d23c9 | 6514 | elif test ! -e $srcdir/info/emacs; then |
2018939f | 6515 | as_fn_error $? "You do not seem to have makeinfo >= 4.6, and your |
067d23c9 KY |
6516 | source tree does not seem to have pre-built manuals in the \`info' directory. |
6517 | Either install a suitable version of makeinfo, or re-run configure | |
6518 | with the \`--without-makeinfo' option to build without the manuals. " "$LINENO" 5 | |
6519 | fi | |
6520 | fi | |
6521 | ||
6522 | ||
96f129d5 | 6523 | |
067d23c9 KY |
6524 | if test x$GCC = xyes; then |
6525 | test "x$GCC_LINK_TEST_OPTIONS" != x && \ | |
6526 | ac_link="$ac_link $GCC_LINK_TEST_OPTIONS" | |
6527 | else | |
6528 | test "x$NON_GCC_LINK_TEST_OPTIONS" != x && \ | |
6529 | ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS" | |
6530 | fi | |
6531 | ||
6532 | ||
6533 | late_LDFLAGS=$LDFLAGS | |
6534 | if test x$GCC = xyes; then | |
6535 | LDFLAGS="$LDFLAGS -Wl,-znocombreloc" | |
6536 | else | |
6537 | LDFLAGS="$LDFLAGS -znocombreloc" | |
6538 | fi | |
6539 | ||
6540 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -znocombreloc" >&5 | |
6541 | $as_echo_n "checking for -znocombreloc... " >&6; } | |
6542 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6543 | /* end confdefs.h. */ | |
6544 | ||
6545 | int | |
6546 | main () | |
6547 | { | |
6548 | ||
6549 | ; | |
6550 | return 0; | |
6551 | } | |
6552 | _ACEOF | |
6553 | if ac_fn_c_try_link "$LINENO"; then : | |
6554 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
6555 | $as_echo "yes" >&6; } | |
6556 | else | |
6557 | LDFLAGS=$late_LDFLAGS | |
6558 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
6559 | $as_echo "no" >&6; } | |
6560 | fi | |
6561 | rm -f core conftest.err conftest.$ac_objext \ | |
6562 | conftest$ac_exeext conftest.$ac_ext | |
6563 | ||
6564 | ||
6565 | # The value of CPP is a quoted variable reference, so we need to do this | |
6566 | # to get its actual value... | |
6567 | CPP=`eval "echo $CPP"` | |
6568 | ||
6569 | ||
125c3718 | 6570 | test "x$CANNOT_DUMP" = "x" && CANNOT_DUMP=no |
067d23c9 | 6571 | case "$opsys" in |
125c3718 PE |
6572 | your-opsys-here) CANNOT_DUMP=yes ;; |
6573 | esac | |
6574 | ||
6575 | test "$CANNOT_DUMP" = "yes" && \ | |
067d23c9 KY |
6576 | |
6577 | $as_echo "#define CANNOT_DUMP 1" >>confdefs.h | |
6578 | ||
125c3718 | 6579 | |
067d23c9 KY |
6580 | |
6581 | ||
6582 | ||
6583 | UNEXEC_OBJ=unexelf.o | |
6584 | case "$opsys" in | |
6585 | # MSDOS uses unexcoff.o | |
6586 | # MSWindows uses unexw32.o | |
6587 | aix4-2) | |
6588 | UNEXEC_OBJ=unexaix.o | |
6589 | ;; | |
6590 | cygwin) | |
6591 | UNEXEC_OBJ=unexcw.o | |
6592 | ;; | |
6593 | darwin) | |
6594 | UNEXEC_OBJ=unexmacosx.o | |
6595 | ;; | |
6596 | hpux10-20 | hpux11) | |
6597 | UNEXEC_OBJ=unexhp9k800.o | |
6598 | ;; | |
6599 | sol2-10) | |
6600 | # Use the Solaris dldump() function, called from unexsol.c, to dump | |
6601 | # emacs, instead of the generic ELF dump code found in unexelf.c. | |
6602 | # The resulting binary has a complete symbol table, and is better | |
6603 | # for debugging and other observability tools (debuggers, pstack, etc). | |
6604 | # | |
6605 | # If you encounter a problem using dldump(), please consider sending | |
6606 | # a message to the OpenSolaris tools-linking mailing list: | |
6607 | # http://mail.opensolaris.org/mailman/listinfo/tools-linking | |
6608 | # | |
6609 | # It is likely that dldump() works with older Solaris too, but this has | |
6610 | # not been tested, so for now this change is for Solaris 10 or newer. | |
6611 | UNEXEC_OBJ=unexsol.o | |
6612 | ;; | |
6613 | esac | |
6614 | ||
6615 | LD_SWITCH_SYSTEM= | |
6616 | case "$opsys" in | |
6617 | freebsd) | |
6618 | ## Let `ld' find image libs and similar things in /usr/local/lib. | |
6619 | ## The system compiler, GCC, has apparently been modified to not | |
6620 | ## look there, contrary to what a stock GCC would do. | |
6621 | LD_SWITCH_SYSTEM=-L/usr/local/lib | |
6622 | ;; | |
6623 | ||
6624 | gnu-linux) | |
6625 | ## cpp test was "ifdef __mips__", but presumably this is equivalent... | |
d6a003a8 | 6626 | case $host_cpu in mips*) LD_SWITCH_SYSTEM="-G 0";; esac |
067d23c9 KY |
6627 | ;; |
6628 | ||
6629 | netbsd) | |
6630 | LD_SWITCH_SYSTEM="-Wl,-rpath,/usr/pkg/lib -L/usr/pkg/lib -Wl,-rpath,/usr/local/lib -L/usr/local/lib" | |
6631 | ;; | |
6632 | ||
6633 | openbsd) | |
6634 | ## Han Boetes <han@mijncomputer.nl> says this is necessary, | |
6635 | ## otherwise Emacs dumps core on elf systems. | |
6636 | LD_SWITCH_SYSTEM="-Z" | |
6637 | ;; | |
6638 | esac | |
6639 | ||
6640 | ||
6641 | ac_link="$ac_link $LD_SWITCH_SYSTEM" | |
6642 | ||
6643 | ## This setting of LD_SWITCH_SYSTEM references LD_SWITCH_X_SITE_AUX, | |
6644 | ## which has not been defined yet. When this was handled with cpp, | |
6645 | ## it was expanded to null when configure sourced the s/*.h file. | |
6646 | ## Thus LD_SWITCH_SYSTEM had different values in configure and the Makefiles. | |
6647 | ## FIXME it would be cleaner to put this in LD_SWITCH_SYSTEM_TEMACS | |
6648 | ## (or somesuch), but because it is supposed to go at the _front_ | |
6649 | ## of LD_SWITCH_SYSTEM, we cannot do that in exactly the same way. | |
6650 | ## Compare with the gnu-linux case below, which added to the end | |
6651 | ## of LD_SWITCH_SYSTEM, and so can instead go at the front of | |
6652 | ## LD_SWITCH_SYSTEM_TEMACS. | |
6653 | case "$opsys" in | |
6654 | netbsd|openbsd) | |
6655 | ## _AUX_RPATH is like _AUX, but uses -rpath instead of -R. | |
6656 | LD_SWITCH_SYSTEM="\$(LD_SWITCH_X_SITE_AUX_RPATH) $LD_SWITCH_SYSTEM" ;; | |
6657 | esac | |
6658 | ||
6659 | ||
6660 | C_SWITCH_MACHINE= | |
6661 | if test "$machine" = "alpha"; then | |
6662 | ac_fn_c_check_decl "$LINENO" "__ELF__" "ac_cv_have_decl___ELF__" "$ac_includes_default" | |
d6974efa | 6663 | if test "x$ac_cv_have_decl___ELF__" = xyes; then : |
067d23c9 KY |
6664 | |
6665 | fi | |
6666 | ||
6667 | if test "$ac_cv_have_decl___ELF__" = "yes"; then | |
6668 | ## With ELF, make sure that all common symbols get allocated to in the | |
6669 | ## data section. Otherwise, the dump of temacs may miss variables in | |
6670 | ## the shared library that have been initialized. For example, with | |
6671 | ## GNU libc, __malloc_initialized would normally be resolved to the | |
6672 | ## shared library's .bss section, which is fatal. | |
6673 | if test "x$GCC" = "xyes"; then | |
6674 | C_SWITCH_MACHINE="-fno-common" | |
6675 | else | |
2018939f | 6676 | as_fn_error $? "What gives? Fix me if DEC Unix supports ELF now." "$LINENO" 5 |
067d23c9 KY |
6677 | fi |
6678 | else | |
6679 | UNEXEC_OBJ=unexalpha.o | |
6680 | fi | |
6681 | fi | |
6682 | ||
6683 | ||
6684 | ||
6685 | ||
6686 | C_SWITCH_SYSTEM= | |
6687 | ## Some programs in src produce warnings saying certain subprograms | |
6688 | ## are too complex and need a MAXMEM value greater than 2000 for | |
6689 | ## additional optimization. --nils@exp-math.uni-essen.de | |
6690 | test "$opsys" = "aix4.2" && test "x$GCC" != "xyes" && \ | |
6691 | C_SWITCH_SYSTEM="-ma -qmaxmem=4000" | |
6692 | ## gnu-linux might need -D_BSD_SOURCE on old libc5 systems. | |
6693 | ## It is redundant in glibc2, since we define _GNU_SOURCE. | |
6694 | ||
6695 | ||
6696 | ||
6697 | LIBS_SYSTEM= | |
6698 | case "$opsys" in | |
6699 | ## IBM's X11R5 uses -lIM and -liconv in AIX 3.2.2. | |
6700 | aix4-2) LIBS_SYSTEM="-lrts -lIM -liconv" ;; | |
6701 | ||
6702 | freebsd) LIBS_SYSTEM="-lutil" ;; | |
6703 | ||
6704 | hpux*) LIBS_SYSTEM="-l:libdld.sl" ;; | |
6705 | ||
6706 | sol2*) LIBS_SYSTEM="-lsocket -lnsl -lkstat" ;; | |
6707 | ||
6708 | ## Motif needs -lgen. | |
6709 | unixware) LIBS_SYSTEM="-lsocket -lnsl -lelf -lgen" ;; | |
6710 | esac | |
6711 | ||
6712 | ||
6713 | ||
6714 | ### Make sure subsequent tests use flags consistent with the build flags. | |
6715 | ||
6716 | if test x"${OVERRIDE_CPPFLAGS}" != x; then | |
6717 | CPPFLAGS="${OVERRIDE_CPPFLAGS}" | |
6718 | else | |
6719 | CPPFLAGS="$C_SWITCH_SYSTEM $C_SWITCH_MACHINE $CPPFLAGS" | |
6720 | fi | |
6721 | ||
6722 | ||
6723 | ||
6724 | # Check whether --enable-largefile was given. | |
6725 | if test "${enable_largefile+set}" = set; then : | |
6726 | enableval=$enable_largefile; | |
6727 | fi | |
6728 | ||
6729 | if test "$enable_largefile" != no; then | |
6730 | ||
6731 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 | |
6732 | $as_echo_n "checking for special C compiler options needed for large files... " >&6; } | |
d6974efa | 6733 | if ${ac_cv_sys_largefile_CC+:} false; then : |
067d23c9 KY |
6734 | $as_echo_n "(cached) " >&6 |
6735 | else | |
6736 | ac_cv_sys_largefile_CC=no | |
6737 | if test "$GCC" != yes; then | |
6738 | ac_save_CC=$CC | |
6739 | while :; do | |
6740 | # IRIX 6.2 and later do not support large files by default, | |
6741 | # so use the C compiler's -n32 option if that helps. | |
6742 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6743 | /* end confdefs.h. */ | |
6744 | #include <sys/types.h> | |
6745 | /* Check that off_t can represent 2**63 - 1 correctly. | |
6746 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
6747 | since some C++ compilers masquerading as C compilers | |
6748 | incorrectly reject 9223372036854775807. */ | |
6749 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
6750 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
6751 | && LARGE_OFF_T % 2147483647 == 1) | |
6752 | ? 1 : -1]; | |
6753 | int | |
6754 | main () | |
6755 | { | |
6756 | ||
6757 | ; | |
6758 | return 0; | |
6759 | } | |
6760 | _ACEOF | |
6761 | if ac_fn_c_try_compile "$LINENO"; then : | |
6762 | break | |
6763 | fi | |
6764 | rm -f core conftest.err conftest.$ac_objext | |
6765 | CC="$CC -n32" | |
6766 | if ac_fn_c_try_compile "$LINENO"; then : | |
6767 | ac_cv_sys_largefile_CC=' -n32'; break | |
6768 | fi | |
6769 | rm -f core conftest.err conftest.$ac_objext | |
6770 | break | |
6771 | done | |
6772 | CC=$ac_save_CC | |
6773 | rm -f conftest.$ac_ext | |
6774 | fi | |
6775 | fi | |
6776 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 | |
6777 | $as_echo "$ac_cv_sys_largefile_CC" >&6; } | |
6778 | if test "$ac_cv_sys_largefile_CC" != no; then | |
6779 | CC=$CC$ac_cv_sys_largefile_CC | |
6780 | fi | |
6781 | ||
6782 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 | |
6783 | $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } | |
d6974efa | 6784 | if ${ac_cv_sys_file_offset_bits+:} false; then : |
067d23c9 KY |
6785 | $as_echo_n "(cached) " >&6 |
6786 | else | |
6787 | while :; do | |
6788 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6789 | /* end confdefs.h. */ | |
6790 | #include <sys/types.h> | |
6791 | /* Check that off_t can represent 2**63 - 1 correctly. | |
6792 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
6793 | since some C++ compilers masquerading as C compilers | |
6794 | incorrectly reject 9223372036854775807. */ | |
6795 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
6796 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
6797 | && LARGE_OFF_T % 2147483647 == 1) | |
6798 | ? 1 : -1]; | |
6799 | int | |
6800 | main () | |
6801 | { | |
6802 | ||
6803 | ; | |
6804 | return 0; | |
6805 | } | |
6806 | _ACEOF | |
6807 | if ac_fn_c_try_compile "$LINENO"; then : | |
6808 | ac_cv_sys_file_offset_bits=no; break | |
6809 | fi | |
6810 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
6811 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6812 | /* end confdefs.h. */ | |
6813 | #define _FILE_OFFSET_BITS 64 | |
6814 | #include <sys/types.h> | |
6815 | /* Check that off_t can represent 2**63 - 1 correctly. | |
6816 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
6817 | since some C++ compilers masquerading as C compilers | |
6818 | incorrectly reject 9223372036854775807. */ | |
6819 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
6820 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
6821 | && LARGE_OFF_T % 2147483647 == 1) | |
6822 | ? 1 : -1]; | |
6823 | int | |
6824 | main () | |
6825 | { | |
6826 | ||
6827 | ; | |
6828 | return 0; | |
6829 | } | |
6830 | _ACEOF | |
6831 | if ac_fn_c_try_compile "$LINENO"; then : | |
6832 | ac_cv_sys_file_offset_bits=64; break | |
6833 | fi | |
6834 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
6835 | ac_cv_sys_file_offset_bits=unknown | |
6836 | break | |
6837 | done | |
6838 | fi | |
6839 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 | |
6840 | $as_echo "$ac_cv_sys_file_offset_bits" >&6; } | |
6841 | case $ac_cv_sys_file_offset_bits in #( | |
6842 | no | unknown) ;; | |
6843 | *) | |
6844 | cat >>confdefs.h <<_ACEOF | |
6845 | #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits | |
6846 | _ACEOF | |
6847 | ;; | |
6848 | esac | |
6849 | rm -rf conftest* | |
6850 | if test $ac_cv_sys_file_offset_bits = unknown; then | |
6851 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 | |
6852 | $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } | |
d6974efa | 6853 | if ${ac_cv_sys_large_files+:} false; then : |
067d23c9 KY |
6854 | $as_echo_n "(cached) " >&6 |
6855 | else | |
6856 | while :; do | |
6857 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6858 | /* end confdefs.h. */ | |
6859 | #include <sys/types.h> | |
6860 | /* Check that off_t can represent 2**63 - 1 correctly. | |
6861 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
6862 | since some C++ compilers masquerading as C compilers | |
6863 | incorrectly reject 9223372036854775807. */ | |
6864 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
6865 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
6866 | && LARGE_OFF_T % 2147483647 == 1) | |
6867 | ? 1 : -1]; | |
6868 | int | |
6869 | main () | |
6870 | { | |
6871 | ||
6872 | ; | |
6873 | return 0; | |
6874 | } | |
6875 | _ACEOF | |
6876 | if ac_fn_c_try_compile "$LINENO"; then : | |
6877 | ac_cv_sys_large_files=no; break | |
6878 | fi | |
6879 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
6880 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6881 | /* end confdefs.h. */ | |
6882 | #define _LARGE_FILES 1 | |
6883 | #include <sys/types.h> | |
6884 | /* Check that off_t can represent 2**63 - 1 correctly. | |
6885 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
6886 | since some C++ compilers masquerading as C compilers | |
6887 | incorrectly reject 9223372036854775807. */ | |
6888 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
6889 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
6890 | && LARGE_OFF_T % 2147483647 == 1) | |
6891 | ? 1 : -1]; | |
6892 | int | |
6893 | main () | |
6894 | { | |
6895 | ||
6896 | ; | |
6897 | return 0; | |
6898 | } | |
6899 | _ACEOF | |
6900 | if ac_fn_c_try_compile "$LINENO"; then : | |
6901 | ac_cv_sys_large_files=1; break | |
6902 | fi | |
6903 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
6904 | ac_cv_sys_large_files=unknown | |
6905 | break | |
6906 | done | |
6907 | fi | |
6908 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 | |
6909 | $as_echo "$ac_cv_sys_large_files" >&6; } | |
6910 | case $ac_cv_sys_large_files in #( | |
6911 | no | unknown) ;; | |
6912 | *) | |
6913 | cat >>confdefs.h <<_ACEOF | |
6914 | #define _LARGE_FILES $ac_cv_sys_large_files | |
6915 | _ACEOF | |
6916 | ;; | |
6917 | esac | |
6918 | rm -rf conftest* | |
6919 | fi | |
6920 | fi | |
6921 | ||
6922 | ||
6923 | ||
6924 | ## If user specified a crt-dir, use that unconditionally. | |
6925 | if test "X$CRT_DIR" = "X"; then | |
6926 | ||
6927 | case "$canonical" in | |
6928 | x86_64-*-linux-gnu* | s390x-*-linux-gnu*) | |
6929 | ## On x86-64 and s390x GNU/Linux distributions, the standard library | |
6930 | ## can be in a variety of places. We only try /usr/lib64 and /usr/lib. | |
6931 | ## For anything else (eg /usr/lib32), it is up the user to specify | |
6932 | ## the location (bug#5655). | |
6933 | ## Test for crtn.o, not just the directory, because sometimes the | |
6934 | ## directory exists but does not have the relevant files (bug#1287). | |
6935 | ## FIXME better to test for binary compatibility somehow. | |
6936 | test -e /usr/lib64/crtn.o && CRT_DIR=/usr/lib64 | |
6937 | ;; | |
6938 | ||
6939 | powerpc64-*-linux-gnu* | sparc64-*-linux-gnu*) CRT_DIR=/usr/lib64 ;; | |
6940 | esac | |
6941 | ||
6942 | case "$opsys" in | |
6943 | hpux10-20) CRT_DIR=/lib ;; | |
6944 | esac | |
6945 | ||
6946 | ## Default is /usr/lib. | |
6947 | test "X$CRT_DIR" = "X" && CRT_DIR=/usr/lib | |
6948 | ||
6949 | else | |
6950 | ||
6951 | ## Some platforms don't use any of these files, so it is not | |
6952 | ## appropriate to put this test outside the if block. | |
6953 | test -e $CRT_DIR/crtn.o || test -e $CRT_DIR/crt0.o || \ | |
2018939f | 6954 | as_fn_error $? "crt*.o not found in specified location." "$LINENO" 5 |
067d23c9 KY |
6955 | |
6956 | fi | |
6957 | ||
6958 | ||
6959 | ||
6960 | LIB_MATH=-lm | |
6961 | LIB_STANDARD= | |
6962 | START_FILES= | |
6963 | ||
6964 | case $opsys in | |
6965 | cygwin ) | |
6966 | LIB_MATH= | |
6967 | START_FILES='pre-crt0.o' | |
6968 | ;; | |
6969 | darwin ) | |
6970 | ## Adding -lm confuses the dynamic linker, so omit it. | |
6971 | LIB_MATH= | |
6972 | START_FILES='pre-crt0.o' | |
6973 | ;; | |
6974 | freebsd ) | |
6975 | LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o $(CRT_DIR)/crtn.o' | |
6976 | START_FILES='pre-crt0.o $(CRT_DIR)/crt1.o $(CRT_DIR)/crti.o $(CRT_DIR)/crtbegin.o' | |
6977 | ;; | |
6978 | gnu-linux | gnu-kfreebsd ) | |
6979 | LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtn.o' | |
6980 | START_FILES='pre-crt0.o $(CRT_DIR)/crt1.o $(CRT_DIR)/crti.o' | |
6981 | ;; | |
6982 | hpux10-20 | hpux11 ) | |
6983 | LIB_STANDARD=-lc | |
6984 | START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o' | |
6985 | ;; | |
6986 | netbsd | openbsd ) | |
6987 | if test -f $CRT_DIR/crti.o; then | |
6988 | LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o $(CRT_DIR)/crtn.o' | |
6989 | START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o $(CRT_DIR)/crti.o $(CRT_DIR)/crtbegin.o' | |
6990 | else | |
6991 | LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o' | |
6992 | START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o $(CRT_DIR)/crtbegin.o' | |
6993 | fi | |
6994 | ;; | |
6995 | esac | |
6996 | ||
6997 | ||
6998 | ||
6999 | ||
7000 | ||
7001 | ||
7002 | ||
7003 | if test "${with_sound}" != "no"; then | |
7004 | # Sound support for GNU/Linux and the free BSDs. | |
7005 | for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h | |
7006 | do : | |
7007 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
7008 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
2018939f | 7009 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : |
067d23c9 KY |
7010 | cat >>confdefs.h <<_ACEOF |
7011 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
7012 | _ACEOF | |
7013 | have_sound_header=yes | |
7014 | fi | |
7015 | ||
7016 | done | |
7017 | ||
7018 | # Emulation library used on NetBSD. | |
7019 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _oss_ioctl in -lossaudio" >&5 | |
7020 | $as_echo_n "checking for _oss_ioctl in -lossaudio... " >&6; } | |
d6974efa | 7021 | if ${ac_cv_lib_ossaudio__oss_ioctl+:} false; then : |
067d23c9 KY |
7022 | $as_echo_n "(cached) " >&6 |
7023 | else | |
7024 | ac_check_lib_save_LIBS=$LIBS | |
7025 | LIBS="-lossaudio $LIBS" | |
7026 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7027 | /* end confdefs.h. */ | |
7028 | ||
7029 | /* Override any GCC internal prototype to avoid an error. | |
7030 | Use char because int might match the return type of a GCC | |
7031 | builtin and then its argument prototype would still apply. */ | |
7032 | #ifdef __cplusplus | |
7033 | extern "C" | |
7034 | #endif | |
7035 | char _oss_ioctl (); | |
7036 | int | |
7037 | main () | |
7038 | { | |
7039 | return _oss_ioctl (); | |
7040 | ; | |
7041 | return 0; | |
7042 | } | |
7043 | _ACEOF | |
7044 | if ac_fn_c_try_link "$LINENO"; then : | |
7045 | ac_cv_lib_ossaudio__oss_ioctl=yes | |
7046 | else | |
7047 | ac_cv_lib_ossaudio__oss_ioctl=no | |
7048 | fi | |
7049 | rm -f core conftest.err conftest.$ac_objext \ | |
7050 | conftest$ac_exeext conftest.$ac_ext | |
7051 | LIBS=$ac_check_lib_save_LIBS | |
7052 | fi | |
7053 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5 | |
7054 | $as_echo "$ac_cv_lib_ossaudio__oss_ioctl" >&6; } | |
d6974efa | 7055 | if test "x$ac_cv_lib_ossaudio__oss_ioctl" = xyes; then : |
067d23c9 KY |
7056 | LIBSOUND=-lossaudio |
7057 | else | |
7058 | LIBSOUND= | |
7059 | fi | |
7060 | ||
7061 | ||
7062 | ||
7063 | ALSA_REQUIRED=1.0.0 | |
7064 | ALSA_MODULES="alsa >= $ALSA_REQUIRED" | |
7065 | ||
7066 | succeeded=no | |
7067 | ||
7068 | # Extract the first word of "pkg-config", so it can be a program name with args. | |
7069 | set dummy pkg-config; ac_word=$2 | |
7070 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
7071 | $as_echo_n "checking for $ac_word... " >&6; } | |
d6974efa | 7072 | if ${ac_cv_path_PKG_CONFIG+:} false; then : |
067d23c9 KY |
7073 | $as_echo_n "(cached) " >&6 |
7074 | else | |
7075 | case $PKG_CONFIG in | |
7076 | [\\/]* | ?:[\\/]*) | |
7077 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
7078 | ;; | |
7079 | *) | |
7080 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7081 | for as_dir in $PATH | |
7082 | do | |
7083 | IFS=$as_save_IFS | |
7084 | test -z "$as_dir" && as_dir=. | |
7085 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7086 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
7087 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
7088 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7089 | break 2 | |
7090 | fi | |
7091 | done | |
7092 | done | |
7093 | IFS=$as_save_IFS | |
7094 | ||
7095 | test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" | |
7096 | ;; | |
7097 | esac | |
7098 | fi | |
7099 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG | |
7100 | if test -n "$PKG_CONFIG"; then | |
7101 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
7102 | $as_echo "$PKG_CONFIG" >&6; } | |
7103 | else | |
7104 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
7105 | $as_echo "no" >&6; } | |
7106 | fi | |
7107 | ||
7108 | ||
7109 | ||
7110 | if test "$PKG_CONFIG" = "no" ; then | |
7111 | HAVE_ALSA=no | |
7112 | else | |
7113 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
7114 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
7115 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ALSA_MODULES" >&5 | |
7116 | $as_echo_n "checking for $ALSA_MODULES... " >&6; } | |
7117 | ||
7118 | if $PKG_CONFIG --exists "$ALSA_MODULES" 2>&5; then | |
7119 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
7120 | $as_echo "yes" >&6; } | |
7121 | succeeded=yes | |
7122 | ||
7123 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking ALSA_CFLAGS" >&5 | |
7124 | $as_echo_n "checking ALSA_CFLAGS... " >&6; } | |
7125 | ALSA_CFLAGS=`$PKG_CONFIG --cflags "$ALSA_MODULES"|sed -e 's,///*,/,g'` | |
7126 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ALSA_CFLAGS" >&5 | |
7127 | $as_echo "$ALSA_CFLAGS" >&6; } | |
7128 | ||
7129 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking ALSA_LIBS" >&5 | |
7130 | $as_echo_n "checking ALSA_LIBS... " >&6; } | |
7131 | ALSA_LIBS=`$PKG_CONFIG --libs "$ALSA_MODULES"|sed -e 's,///*,/,g'` | |
7132 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ALSA_LIBS" >&5 | |
7133 | $as_echo "$ALSA_LIBS" >&6; } | |
7134 | else | |
7135 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
7136 | $as_echo "no" >&6; } | |
7137 | ALSA_CFLAGS="" | |
7138 | ALSA_LIBS="" | |
7139 | ## If we have a custom action on failure, don't print errors, but | |
7140 | ## do set a variable so people can do so. | |
7141 | ALSA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$ALSA_MODULES"` | |
7142 | ||
7143 | fi | |
7144 | ||
7145 | ||
7146 | ||
7147 | else | |
7148 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
7149 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
7150 | fi | |
7151 | fi | |
7152 | ||
7153 | if test $succeeded = yes; then | |
7154 | HAVE_ALSA=yes | |
7155 | else | |
7156 | HAVE_ALSA=no | |
7157 | fi | |
7158 | ||
7159 | if test $HAVE_ALSA = yes; then | |
7160 | SAVE_CFLAGS="$CFLAGS" | |
7161 | SAVE_LDFLAGS="$LDFLAGS" | |
7162 | CFLAGS="$ALSA_CFLAGS $CFLAGS" | |
7163 | LDFLAGS="$ALSA_LIBS $LDFLAGS" | |
7164 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7165 | /* end confdefs.h. */ | |
7166 | #include <asoundlib.h> | |
7167 | int | |
7168 | main () | |
7169 | { | |
7170 | snd_lib_error_set_handler (0); | |
7171 | ; | |
7172 | return 0; | |
7173 | } | |
7174 | _ACEOF | |
7175 | if ac_fn_c_try_compile "$LINENO"; then : | |
7176 | emacs_alsa_normal=yes | |
7177 | else | |
7178 | emacs_alsa_normal=no | |
7179 | fi | |
7180 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7181 | if test "$emacs_alsa_normal" != yes; then | |
7182 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7183 | /* end confdefs.h. */ | |
7184 | #include <alsa/asoundlib.h> | |
7185 | int | |
7186 | main () | |
7187 | { | |
7188 | snd_lib_error_set_handler (0); | |
7189 | ; | |
7190 | return 0; | |
7191 | } | |
7192 | _ACEOF | |
7193 | if ac_fn_c_try_compile "$LINENO"; then : | |
7194 | emacs_alsa_subdir=yes | |
7195 | else | |
7196 | emacs_alsa_subdir=no | |
7197 | fi | |
7198 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7199 | if test "$emacs_alsa_subdir" != yes; then | |
2018939f | 7200 | as_fn_error $? "pkg-config found alsa, but it does not compile. See config.log for error messages." "$LINENO" 5 |
067d23c9 KY |
7201 | fi |
7202 | ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE" | |
7203 | fi | |
7204 | ||
7205 | CFLAGS="$SAVE_CFLAGS" | |
7206 | LDFLAGS="$SAVE_LDFLAGS" | |
7207 | LIBSOUND="$LIBSOUND $ALSA_LIBS" | |
7208 | CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS" | |
7209 | ||
7210 | $as_echo "#define HAVE_ALSA 1" >>confdefs.h | |
7211 | ||
7212 | fi | |
7213 | ||
7214 | if test x$have_sound_header = xyes || test $HAVE_ALSA = yes; then | |
7215 | case "$opsys" in | |
7216 | gnu-linux|freebsd|netbsd) | |
7217 | ||
7218 | $as_echo "#define HAVE_SOUND 1" >>confdefs.h | |
7219 | ||
7220 | ;; | |
7221 | esac | |
7222 | fi | |
7223 | ||
7224 | ||
7225 | fi | |
7226 | ||
7227 | for ac_header in sys/select.h sys/time.h unistd.h utime.h \ | |
7228 | linux/version.h sys/systeminfo.h limits.h \ | |
7229 | stdio_ext.h fcntl.h coff.h pty.h sys/mman.h \ | |
7230 | sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h \ | |
7231 | sys/utsname.h pwd.h utmp.h dirent.h util.h | |
7232 | do : | |
7233 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
7234 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
2018939f | 7235 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : |
067d23c9 KY |
7236 | cat >>confdefs.h <<_ACEOF |
7237 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
7238 | _ACEOF | |
7239 | ||
7240 | fi | |
7241 | ||
7242 | done | |
7243 | ||
7244 | ||
7245 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if personality LINUX32 can be set" >&5 | |
7246 | $as_echo_n "checking if personality LINUX32 can be set... " >&6; } | |
7247 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7248 | /* end confdefs.h. */ | |
7249 | #include <sys/personality.h> | |
7250 | int | |
7251 | main () | |
7252 | { | |
7253 | personality (PER_LINUX32) | |
7254 | ; | |
7255 | return 0; | |
7256 | } | |
7257 | _ACEOF | |
7258 | if ac_fn_c_try_compile "$LINENO"; then : | |
7259 | emacs_cv_personality_linux32=yes | |
7260 | else | |
7261 | emacs_cv_personality_linux32=no | |
7262 | fi | |
7263 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7264 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_personality_linux32" >&5 | |
7265 | $as_echo "$emacs_cv_personality_linux32" >&6; } | |
7266 | ||
7267 | if test $emacs_cv_personality_linux32 = yes; then | |
7268 | ||
7269 | $as_echo "#define HAVE_PERSONALITY_LINUX32 1" >>confdefs.h | |
7270 | ||
7271 | fi | |
7272 | ||
7273 | for ac_header in term.h | |
7274 | do : | |
7275 | ac_fn_c_check_header_preproc "$LINENO" "term.h" "ac_cv_header_term_h" | |
d6974efa | 7276 | if test "x$ac_cv_header_term_h" = xyes; then : |
067d23c9 KY |
7277 | cat >>confdefs.h <<_ACEOF |
7278 | #define HAVE_TERM_H 1 | |
7279 | _ACEOF | |
7280 | ||
7281 | fi | |
7282 | ||
7283 | done | |
7284 | ||
7285 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 | |
7286 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
d6974efa | 7287 | if ${ac_cv_header_stdc+:} false; then : |
067d23c9 KY |
7288 | $as_echo_n "(cached) " >&6 |
7289 | else | |
7290 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7291 | /* end confdefs.h. */ | |
7292 | #include <stdlib.h> | |
7293 | #include <stdarg.h> | |
7294 | #include <string.h> | |
7295 | #include <float.h> | |
7296 | ||
7297 | int | |
7298 | main () | |
7299 | { | |
7300 | ||
7301 | ; | |
7302 | return 0; | |
7303 | } | |
7304 | _ACEOF | |
7305 | if ac_fn_c_try_compile "$LINENO"; then : | |
7306 | ac_cv_header_stdc=yes | |
7307 | else | |
7308 | ac_cv_header_stdc=no | |
7309 | fi | |
7310 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7311 | ||
7312 | if test $ac_cv_header_stdc = yes; then | |
7313 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
7314 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7315 | /* end confdefs.h. */ | |
7316 | #include <string.h> | |
7317 | ||
7318 | _ACEOF | |
7319 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
7320 | $EGREP "memchr" >/dev/null 2>&1; then : | |
7321 | ||
7322 | else | |
7323 | ac_cv_header_stdc=no | |
7324 | fi | |
7325 | rm -f conftest* | |
7326 | ||
7327 | fi | |
7328 | ||
7329 | if test $ac_cv_header_stdc = yes; then | |
7330 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
7331 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7332 | /* end confdefs.h. */ | |
7333 | #include <stdlib.h> | |
7334 | ||
7335 | _ACEOF | |
7336 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
7337 | $EGREP "free" >/dev/null 2>&1; then : | |
7338 | ||
7339 | else | |
7340 | ac_cv_header_stdc=no | |
7341 | fi | |
7342 | rm -f conftest* | |
7343 | ||
7344 | fi | |
7345 | ||
7346 | if test $ac_cv_header_stdc = yes; then | |
7347 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
7348 | if test "$cross_compiling" = yes; then : | |
7349 | : | |
7350 | else | |
7351 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7352 | /* end confdefs.h. */ | |
7353 | #include <ctype.h> | |
7354 | #include <stdlib.h> | |
7355 | #if ((' ' & 0x0FF) == 0x020) | |
7356 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
7357 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
7358 | #else | |
7359 | # define ISLOWER(c) \ | |
7360 | (('a' <= (c) && (c) <= 'i') \ | |
7361 | || ('j' <= (c) && (c) <= 'r') \ | |
7362 | || ('s' <= (c) && (c) <= 'z')) | |
7363 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
7364 | #endif | |
7365 | ||
7366 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
7367 | int | |
7368 | main () | |
7369 | { | |
7370 | int i; | |
7371 | for (i = 0; i < 256; i++) | |
7372 | if (XOR (islower (i), ISLOWER (i)) | |
7373 | || toupper (i) != TOUPPER (i)) | |
7374 | return 2; | |
7375 | return 0; | |
7376 | } | |
7377 | _ACEOF | |
7378 | if ac_fn_c_try_run "$LINENO"; then : | |
7379 | ||
7380 | else | |
7381 | ac_cv_header_stdc=no | |
7382 | fi | |
7383 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
7384 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
7385 | fi | |
7386 | ||
7387 | fi | |
7388 | fi | |
7389 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 | |
7390 | $as_echo "$ac_cv_header_stdc" >&6; } | |
7391 | if test $ac_cv_header_stdc = yes; then | |
7392 | ||
7393 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h | |
7394 | ||
7395 | fi | |
7396 | ||
7397 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 | |
7398 | $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } | |
d6974efa | 7399 | if ${ac_cv_header_time+:} false; then : |
067d23c9 KY |
7400 | $as_echo_n "(cached) " >&6 |
7401 | else | |
7402 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7403 | /* end confdefs.h. */ | |
7404 | #include <sys/types.h> | |
7405 | #include <sys/time.h> | |
7406 | #include <time.h> | |
7407 | ||
7408 | int | |
7409 | main () | |
7410 | { | |
7411 | if ((struct tm *) 0) | |
7412 | return 0; | |
7413 | ; | |
7414 | return 0; | |
7415 | } | |
7416 | _ACEOF | |
7417 | if ac_fn_c_try_compile "$LINENO"; then : | |
7418 | ac_cv_header_time=yes | |
7419 | else | |
7420 | ac_cv_header_time=no | |
7421 | fi | |
7422 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7423 | fi | |
7424 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 | |
7425 | $as_echo "$ac_cv_header_time" >&6; } | |
7426 | if test $ac_cv_header_time = yes; then | |
7427 | ||
7428 | $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h | |
7429 | ||
7430 | fi | |
7431 | ||
7432 | ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "$ac_includes_default" | |
d6974efa | 7433 | if test "x$ac_cv_have_decl_sys_siglist" = xyes; then : |
067d23c9 KY |
7434 | ac_have_decl=1 |
7435 | else | |
7436 | ac_have_decl=0 | |
7437 | fi | |
7438 | ||
7439 | cat >>confdefs.h <<_ACEOF | |
7440 | #define HAVE_DECL_SYS_SIGLIST $ac_have_decl | |
7441 | _ACEOF | |
7442 | ||
7443 | if test $ac_cv_have_decl_sys_siglist != yes; then | |
7444 | # For Tru64, at least: | |
7445 | ac_fn_c_check_decl "$LINENO" "__sys_siglist" "ac_cv_have_decl___sys_siglist" "$ac_includes_default" | |
d6974efa | 7446 | if test "x$ac_cv_have_decl___sys_siglist" = xyes; then : |
067d23c9 KY |
7447 | ac_have_decl=1 |
7448 | else | |
7449 | ac_have_decl=0 | |
7450 | fi | |
7451 | ||
7452 | cat >>confdefs.h <<_ACEOF | |
7453 | #define HAVE_DECL___SYS_SIGLIST $ac_have_decl | |
7454 | _ACEOF | |
7455 | ||
7456 | if test $ac_cv_have_decl___sys_siglist = yes; then | |
7457 | ||
7458 | $as_echo "#define sys_siglist __sys_siglist" >>confdefs.h | |
7459 | ||
7460 | fi | |
7461 | fi | |
7462 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5 | |
7463 | $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; } | |
d6974efa | 7464 | if ${ac_cv_header_sys_wait_h+:} false; then : |
067d23c9 KY |
7465 | $as_echo_n "(cached) " >&6 |
7466 | else | |
7467 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7468 | /* end confdefs.h. */ | |
7469 | #include <sys/types.h> | |
7470 | #include <sys/wait.h> | |
7471 | #ifndef WEXITSTATUS | |
7472 | # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8) | |
7473 | #endif | |
7474 | #ifndef WIFEXITED | |
7475 | # define WIFEXITED(stat_val) (((stat_val) & 255) == 0) | |
7476 | #endif | |
7477 | ||
7478 | int | |
7479 | main () | |
7480 | { | |
7481 | int s; | |
7482 | wait (&s); | |
7483 | s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; | |
7484 | ; | |
7485 | return 0; | |
7486 | } | |
7487 | _ACEOF | |
7488 | if ac_fn_c_try_compile "$LINENO"; then : | |
7489 | ac_cv_header_sys_wait_h=yes | |
7490 | else | |
7491 | ac_cv_header_sys_wait_h=no | |
7492 | fi | |
7493 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7494 | fi | |
7495 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5 | |
7496 | $as_echo "$ac_cv_header_sys_wait_h" >&6; } | |
7497 | if test $ac_cv_header_sys_wait_h = yes; then | |
7498 | ||
7499 | $as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h | |
7500 | ||
7501 | fi | |
7502 | ||
7503 | ||
7504 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct utimbuf" >&5 | |
7505 | $as_echo_n "checking for struct utimbuf... " >&6; } | |
d6974efa | 7506 | if ${emacs_cv_struct_utimbuf+:} false; then : |
067d23c9 KY |
7507 | $as_echo_n "(cached) " >&6 |
7508 | else | |
7509 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7510 | /* end confdefs.h. */ | |
7511 | #ifdef TIME_WITH_SYS_TIME | |
7512 | #include <sys/time.h> | |
7513 | #include <time.h> | |
7514 | #else | |
7515 | #ifdef HAVE_SYS_TIME_H | |
7516 | #include <sys/time.h> | |
7517 | #else | |
7518 | #include <time.h> | |
7519 | #endif | |
7520 | #endif | |
7521 | #ifdef HAVE_UTIME_H | |
7522 | #include <utime.h> | |
7523 | #endif | |
7524 | int | |
7525 | main () | |
7526 | { | |
7527 | static struct utimbuf x; x.actime = x.modtime; | |
7528 | ; | |
7529 | return 0; | |
7530 | } | |
7531 | _ACEOF | |
7532 | if ac_fn_c_try_compile "$LINENO"; then : | |
7533 | emacs_cv_struct_utimbuf=yes | |
7534 | else | |
7535 | emacs_cv_struct_utimbuf=no | |
7536 | fi | |
7537 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7538 | fi | |
7539 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_struct_utimbuf" >&5 | |
7540 | $as_echo "$emacs_cv_struct_utimbuf" >&6; } | |
7541 | if test $emacs_cv_struct_utimbuf = yes; then | |
7542 | ||
7543 | $as_echo "#define HAVE_STRUCT_UTIMBUF 1" >>confdefs.h | |
7544 | ||
7545 | fi | |
7546 | ||
7547 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 | |
7548 | $as_echo_n "checking return type of signal handlers... " >&6; } | |
d6974efa | 7549 | if ${ac_cv_type_signal+:} false; then : |
067d23c9 KY |
7550 | $as_echo_n "(cached) " >&6 |
7551 | else | |
7552 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7553 | /* end confdefs.h. */ | |
7554 | #include <sys/types.h> | |
7555 | #include <signal.h> | |
7556 | ||
7557 | int | |
7558 | main () | |
7559 | { | |
7560 | return *(signal (0, 0)) (0) == 1; | |
7561 | ; | |
7562 | return 0; | |
7563 | } | |
7564 | _ACEOF | |
7565 | if ac_fn_c_try_compile "$LINENO"; then : | |
7566 | ac_cv_type_signal=int | |
7567 | else | |
7568 | ac_cv_type_signal=void | |
7569 | fi | |
7570 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7571 | fi | |
7572 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5 | |
7573 | $as_echo "$ac_cv_type_signal" >&6; } | |
7574 | ||
7575 | cat >>confdefs.h <<_ACEOF | |
7576 | #define RETSIGTYPE $ac_cv_type_signal | |
7577 | _ACEOF | |
7578 | ||
7579 | ||
7580 | ||
7581 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for speed_t" >&5 | |
7582 | $as_echo_n "checking for speed_t... " >&6; } | |
d6974efa | 7583 | if ${emacs_cv_speed_t+:} false; then : |
067d23c9 KY |
7584 | $as_echo_n "(cached) " >&6 |
7585 | else | |
7586 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7587 | /* end confdefs.h. */ | |
7588 | #include <termios.h> | |
7589 | int | |
7590 | main () | |
7591 | { | |
7592 | speed_t x = 1; | |
7593 | ; | |
7594 | return 0; | |
7595 | } | |
7596 | _ACEOF | |
7597 | if ac_fn_c_try_compile "$LINENO"; then : | |
7598 | emacs_cv_speed_t=yes | |
7599 | else | |
7600 | emacs_cv_speed_t=no | |
7601 | fi | |
7602 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7603 | fi | |
7604 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_speed_t" >&5 | |
7605 | $as_echo "$emacs_cv_speed_t" >&6; } | |
7606 | if test $emacs_cv_speed_t = yes; then | |
7607 | ||
7608 | $as_echo "#define HAVE_SPEED_T 1" >>confdefs.h | |
7609 | ||
7610 | fi | |
7611 | ||
7612 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5 | |
7613 | $as_echo_n "checking for struct timeval... " >&6; } | |
d6974efa | 7614 | if ${emacs_cv_struct_timeval+:} false; then : |
067d23c9 KY |
7615 | $as_echo_n "(cached) " >&6 |
7616 | else | |
7617 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7618 | /* end confdefs.h. */ | |
7619 | #ifdef TIME_WITH_SYS_TIME | |
7620 | #include <sys/time.h> | |
7621 | #include <time.h> | |
7622 | #else | |
7623 | #ifdef HAVE_SYS_TIME_H | |
7624 | #include <sys/time.h> | |
7625 | #else | |
7626 | #include <time.h> | |
7627 | #endif | |
7628 | #endif | |
7629 | int | |
7630 | main () | |
7631 | { | |
7632 | static struct timeval x; x.tv_sec = x.tv_usec; | |
7633 | ; | |
7634 | return 0; | |
7635 | } | |
7636 | _ACEOF | |
7637 | if ac_fn_c_try_compile "$LINENO"; then : | |
7638 | emacs_cv_struct_timeval=yes | |
7639 | else | |
7640 | emacs_cv_struct_timeval=no | |
7641 | fi | |
7642 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7643 | fi | |
7644 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_struct_timeval" >&5 | |
7645 | $as_echo "$emacs_cv_struct_timeval" >&6; } | |
7646 | HAVE_TIMEVAL=$emacs_cv_struct_timeval | |
7647 | if test $emacs_cv_struct_timeval = yes; then | |
7648 | ||
7649 | $as_echo "#define HAVE_TIMEVAL 1" >>confdefs.h | |
7650 | ||
7651 | fi | |
7652 | ||
7653 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct exception" >&5 | |
7654 | $as_echo_n "checking for struct exception... " >&6; } | |
d6974efa | 7655 | if ${emacs_cv_struct_exception+:} false; then : |
067d23c9 KY |
7656 | $as_echo_n "(cached) " >&6 |
7657 | else | |
7658 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7659 | /* end confdefs.h. */ | |
7660 | #include <math.h> | |
7661 | int | |
7662 | main () | |
7663 | { | |
7664 | static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1; | |
7665 | ; | |
7666 | return 0; | |
7667 | } | |
7668 | _ACEOF | |
7669 | if ac_fn_c_try_compile "$LINENO"; then : | |
7670 | emacs_cv_struct_exception=yes | |
7671 | else | |
7672 | emacs_cv_struct_exception=no | |
7673 | fi | |
7674 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7675 | fi | |
7676 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_struct_exception" >&5 | |
7677 | $as_echo "$emacs_cv_struct_exception" >&6; } | |
7678 | HAVE_EXCEPTION=$emacs_cv_struct_exception | |
7679 | if test $emacs_cv_struct_exception != yes; then | |
7680 | ||
7681 | $as_echo "#define NO_MATHERR 1" >>confdefs.h | |
7682 | ||
7683 | fi | |
7684 | ||
7685 | for ac_header in sys/socket.h | |
7686 | do : | |
7687 | ac_fn_c_check_header_mongrel "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default" | |
d6974efa | 7688 | if test "x$ac_cv_header_sys_socket_h" = xyes; then : |
067d23c9 KY |
7689 | cat >>confdefs.h <<_ACEOF |
7690 | #define HAVE_SYS_SOCKET_H 1 | |
7691 | _ACEOF | |
7692 | ||
7693 | fi | |
7694 | ||
7695 | done | |
7696 | ||
7697 | for ac_header in net/if.h | |
7698 | do : | |
7699 | ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default | |
7700 | #if HAVE_SYS_SOCKET_H | |
7701 | #include <sys/socket.h> | |
7702 | #endif | |
7703 | " | |
d6974efa | 7704 | if test "x$ac_cv_header_net_if_h" = xyes; then : |
067d23c9 KY |
7705 | cat >>confdefs.h <<_ACEOF |
7706 | #define HAVE_NET_IF_H 1 | |
7707 | _ACEOF | |
7708 | ||
7709 | fi | |
7710 | ||
7711 | done | |
7712 | ||
7713 | ||
7714 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 | |
7715 | $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; } | |
d6974efa | 7716 | if ${ac_cv_struct_tm+:} false; then : |
067d23c9 KY |
7717 | $as_echo_n "(cached) " >&6 |
7718 | else | |
7719 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7720 | /* end confdefs.h. */ | |
7721 | #include <sys/types.h> | |
7722 | #include <time.h> | |
7723 | ||
7724 | int | |
7725 | main () | |
7726 | { | |
7727 | struct tm tm; | |
7728 | int *p = &tm.tm_sec; | |
7729 | return !p; | |
7730 | ; | |
7731 | return 0; | |
7732 | } | |
7733 | _ACEOF | |
7734 | if ac_fn_c_try_compile "$LINENO"; then : | |
7735 | ac_cv_struct_tm=time.h | |
7736 | else | |
7737 | ac_cv_struct_tm=sys/time.h | |
7738 | fi | |
7739 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7740 | fi | |
7741 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5 | |
7742 | $as_echo "$ac_cv_struct_tm" >&6; } | |
7743 | if test $ac_cv_struct_tm = sys/time.h; then | |
7744 | ||
7745 | $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h | |
7746 | ||
7747 | fi | |
7748 | ||
7749 | ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h> | |
7750 | #include <$ac_cv_struct_tm> | |
7751 | ||
7752 | " | |
d6974efa | 7753 | if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then : |
067d23c9 KY |
7754 | |
7755 | cat >>confdefs.h <<_ACEOF | |
7756 | #define HAVE_STRUCT_TM_TM_ZONE 1 | |
7757 | _ACEOF | |
7758 | ||
7759 | ||
7760 | fi | |
7761 | ||
7762 | if test "$ac_cv_member_struct_tm_tm_zone" = yes; then | |
7763 | ||
7764 | $as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h | |
7765 | ||
7766 | else | |
7767 | ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h> | |
7768 | " | |
d6974efa | 7769 | if test "x$ac_cv_have_decl_tzname" = xyes; then : |
067d23c9 KY |
7770 | ac_have_decl=1 |
7771 | else | |
7772 | ac_have_decl=0 | |
7773 | fi | |
7774 | ||
7775 | cat >>confdefs.h <<_ACEOF | |
7776 | #define HAVE_DECL_TZNAME $ac_have_decl | |
7777 | _ACEOF | |
7778 | ||
7779 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5 | |
7780 | $as_echo_n "checking for tzname... " >&6; } | |
d6974efa | 7781 | if ${ac_cv_var_tzname+:} false; then : |
067d23c9 KY |
7782 | $as_echo_n "(cached) " >&6 |
7783 | else | |
7784 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7785 | /* end confdefs.h. */ | |
7786 | #include <time.h> | |
7787 | #if !HAVE_DECL_TZNAME | |
7788 | extern char *tzname[]; | |
7789 | #endif | |
7790 | ||
7791 | int | |
7792 | main () | |
7793 | { | |
7794 | return tzname[0][0]; | |
7795 | ; | |
7796 | return 0; | |
7797 | } | |
7798 | _ACEOF | |
7799 | if ac_fn_c_try_link "$LINENO"; then : | |
7800 | ac_cv_var_tzname=yes | |
7801 | else | |
7802 | ac_cv_var_tzname=no | |
7803 | fi | |
7804 | rm -f core conftest.err conftest.$ac_objext \ | |
7805 | conftest$ac_exeext conftest.$ac_ext | |
7806 | fi | |
7807 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5 | |
7808 | $as_echo "$ac_cv_var_tzname" >&6; } | |
7809 | if test $ac_cv_var_tzname = yes; then | |
7810 | ||
7811 | $as_echo "#define HAVE_TZNAME 1" >>confdefs.h | |
7812 | ||
7813 | fi | |
7814 | fi | |
7815 | ||
7816 | ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include <time.h> | |
7817 | " | |
d6974efa | 7818 | if test "x$ac_cv_member_struct_tm_tm_gmtoff" = xyes; then : |
067d23c9 KY |
7819 | |
7820 | $as_echo "#define HAVE_TM_GMTOFF 1" >>confdefs.h | |
7821 | ||
7822 | fi | |
7823 | ||
7824 | ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_flags" "ac_cv_member_struct_ifreq_ifr_flags" "$ac_includes_default | |
7825 | #if HAVE_SYS_SOCKET_H | |
7826 | #include <sys/socket.h> | |
7827 | #endif | |
7828 | #if HAVE_NET_IF_H | |
7829 | #include <net/if.h> | |
7830 | #endif | |
7831 | " | |
d6974efa | 7832 | if test "x$ac_cv_member_struct_ifreq_ifr_flags" = xyes; then : |
067d23c9 KY |
7833 | |
7834 | cat >>confdefs.h <<_ACEOF | |
7835 | #define HAVE_STRUCT_IFREQ_IFR_FLAGS 1 | |
7836 | _ACEOF | |
7837 | ||
7838 | ||
7839 | fi | |
7840 | ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_hwaddr" "ac_cv_member_struct_ifreq_ifr_hwaddr" "$ac_includes_default | |
7841 | #if HAVE_SYS_SOCKET_H | |
7842 | #include <sys/socket.h> | |
7843 | #endif | |
7844 | #if HAVE_NET_IF_H | |
7845 | #include <net/if.h> | |
7846 | #endif | |
7847 | " | |
d6974efa | 7848 | if test "x$ac_cv_member_struct_ifreq_ifr_hwaddr" = xyes; then : |
067d23c9 KY |
7849 | |
7850 | cat >>confdefs.h <<_ACEOF | |
7851 | #define HAVE_STRUCT_IFREQ_IFR_HWADDR 1 | |
7852 | _ACEOF | |
7853 | ||
7854 | ||
7855 | fi | |
7856 | ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_netmask" "ac_cv_member_struct_ifreq_ifr_netmask" "$ac_includes_default | |
7857 | #if HAVE_SYS_SOCKET_H | |
7858 | #include <sys/socket.h> | |
7859 | #endif | |
7860 | #if HAVE_NET_IF_H | |
7861 | #include <net/if.h> | |
7862 | #endif | |
7863 | " | |
d6974efa | 7864 | if test "x$ac_cv_member_struct_ifreq_ifr_netmask" = xyes; then : |
067d23c9 KY |
7865 | |
7866 | cat >>confdefs.h <<_ACEOF | |
7867 | #define HAVE_STRUCT_IFREQ_IFR_NETMASK 1 | |
7868 | _ACEOF | |
7869 | ||
7870 | ||
7871 | fi | |
7872 | ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_broadaddr" "ac_cv_member_struct_ifreq_ifr_broadaddr" "$ac_includes_default | |
7873 | #if HAVE_SYS_SOCKET_H | |
7874 | #include <sys/socket.h> | |
7875 | #endif | |
7876 | #if HAVE_NET_IF_H | |
7877 | #include <net/if.h> | |
7878 | #endif | |
7879 | " | |
d6974efa | 7880 | if test "x$ac_cv_member_struct_ifreq_ifr_broadaddr" = xyes; then : |
067d23c9 KY |
7881 | |
7882 | cat >>confdefs.h <<_ACEOF | |
7883 | #define HAVE_STRUCT_IFREQ_IFR_BROADADDR 1 | |
7884 | _ACEOF | |
7885 | ||
7886 | ||
7887 | fi | |
7888 | ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_addr" "ac_cv_member_struct_ifreq_ifr_addr" "$ac_includes_default | |
7889 | #if HAVE_SYS_SOCKET_H | |
7890 | #include <sys/socket.h> | |
7891 | #endif | |
7892 | #if HAVE_NET_IF_H | |
7893 | #include <net/if.h> | |
7894 | #endif | |
7895 | " | |
d6974efa | 7896 | if test "x$ac_cv_member_struct_ifreq_ifr_addr" = xyes; then : |
067d23c9 KY |
7897 | |
7898 | cat >>confdefs.h <<_ACEOF | |
7899 | #define HAVE_STRUCT_IFREQ_IFR_ADDR 1 | |
7900 | _ACEOF | |
7901 | ||
7902 | ||
7903 | fi | |
7904 | ||
7905 | ||
7906 | ||
7907 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for function prototypes" >&5 | |
7908 | $as_echo_n "checking for function prototypes... " >&6; } | |
7909 | if test "$ac_cv_prog_cc_c89" != no; then | |
7910 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
7911 | $as_echo "yes" >&6; } | |
7912 | ||
7913 | $as_echo "#define PROTOTYPES 1" >>confdefs.h | |
7914 | ||
7915 | ||
7916 | $as_echo "#define __PROTOTYPES 1" >>confdefs.h | |
7917 | ||
7918 | else | |
7919 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
7920 | $as_echo "no" >&6; } | |
7921 | fi | |
7922 | ||
7923 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5 | |
7924 | $as_echo_n "checking for working volatile... " >&6; } | |
d6974efa | 7925 | if ${ac_cv_c_volatile+:} false; then : |
067d23c9 KY |
7926 | $as_echo_n "(cached) " >&6 |
7927 | else | |
7928 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7929 | /* end confdefs.h. */ | |
7930 | ||
7931 | int | |
7932 | main () | |
7933 | { | |
7934 | ||
7935 | volatile int x; | |
7936 | int * volatile y = (int *) 0; | |
7937 | return !x && !y; | |
7938 | ; | |
7939 | return 0; | |
7940 | } | |
7941 | _ACEOF | |
7942 | if ac_fn_c_try_compile "$LINENO"; then : | |
7943 | ac_cv_c_volatile=yes | |
7944 | else | |
7945 | ac_cv_c_volatile=no | |
7946 | fi | |
7947 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7948 | fi | |
7949 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5 | |
7950 | $as_echo "$ac_cv_c_volatile" >&6; } | |
7951 | if test $ac_cv_c_volatile = no; then | |
7952 | ||
7953 | $as_echo "#define volatile /**/" >>confdefs.h | |
7954 | ||
7955 | fi | |
7956 | ||
7957 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 | |
7958 | $as_echo_n "checking for an ANSI C-conforming const... " >&6; } | |
d6974efa | 7959 | if ${ac_cv_c_const+:} false; then : |
067d23c9 KY |
7960 | $as_echo_n "(cached) " >&6 |
7961 | else | |
7962 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7963 | /* end confdefs.h. */ | |
7964 | ||
7965 | int | |
7966 | main () | |
7967 | { | |
7968 | /* FIXME: Include the comments suggested by Paul. */ | |
7969 | #ifndef __cplusplus | |
7970 | /* Ultrix mips cc rejects this. */ | |
7971 | typedef int charset[2]; | |
7972 | const charset cs; | |
7973 | /* SunOS 4.1.1 cc rejects this. */ | |
7974 | char const *const *pcpcc; | |
7975 | char **ppc; | |
7976 | /* NEC SVR4.0.2 mips cc rejects this. */ | |
7977 | struct point {int x, y;}; | |
7978 | static struct point const zero = {0,0}; | |
7979 | /* AIX XL C 1.02.0.0 rejects this. | |
7980 | It does not let you subtract one const X* pointer from another in | |
7981 | an arm of an if-expression whose if-part is not a constant | |
7982 | expression */ | |
7983 | const char *g = "string"; | |
7984 | pcpcc = &g + (g ? g-g : 0); | |
7985 | /* HPUX 7.0 cc rejects these. */ | |
7986 | ++pcpcc; | |
7987 | ppc = (char**) pcpcc; | |
7988 | pcpcc = (char const *const *) ppc; | |
7989 | { /* SCO 3.2v4 cc rejects this. */ | |
7990 | char *t; | |
7991 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
7992 | ||
7993 | *t++ = 0; | |
7994 | if (s) return 0; | |
7995 | } | |
7996 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
7997 | int x[] = {25, 17}; | |
7998 | const int *foo = &x[0]; | |
7999 | ++foo; | |
8000 | } | |
8001 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
8002 | typedef const int *iptr; | |
8003 | iptr p = 0; | |
8004 | ++p; | |
8005 | } | |
8006 | { /* AIX XL C 1.02.0.0 rejects this saying | |
8007 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
8008 | struct s { int j; const int *ap[3]; }; | |
8009 | struct s *b; b->j = 5; | |
8010 | } | |
8011 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
8012 | const int foo = 10; | |
8013 | if (!foo) return 0; | |
8014 | } | |
8015 | return !cs[0] && !zero.x; | |
8016 | #endif | |
8017 | ||
8018 | ; | |
8019 | return 0; | |
8020 | } | |
8021 | _ACEOF | |
8022 | if ac_fn_c_try_compile "$LINENO"; then : | |
8023 | ac_cv_c_const=yes | |
8024 | else | |
8025 | ac_cv_c_const=no | |
8026 | fi | |
8027 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8028 | fi | |
8029 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 | |
8030 | $as_echo "$ac_cv_c_const" >&6; } | |
8031 | if test $ac_cv_c_const = no; then | |
8032 | ||
8033 | $as_echo "#define const /**/" >>confdefs.h | |
8034 | ||
8035 | fi | |
8036 | ||
8037 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for void * support" >&5 | |
8038 | $as_echo_n "checking for void * support... " >&6; } | |
d6974efa | 8039 | if ${emacs_cv_void_star+:} false; then : |
067d23c9 KY |
8040 | $as_echo_n "(cached) " >&6 |
8041 | else | |
8042 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8043 | /* end confdefs.h. */ | |
8044 | ||
8045 | int | |
8046 | main () | |
8047 | { | |
8048 | void * foo; | |
8049 | ; | |
8050 | return 0; | |
8051 | } | |
8052 | _ACEOF | |
8053 | if ac_fn_c_try_compile "$LINENO"; then : | |
8054 | emacs_cv_void_star=yes | |
8055 | else | |
8056 | emacs_cv_void_star=no | |
8057 | fi | |
8058 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8059 | fi | |
8060 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_void_star" >&5 | |
8061 | $as_echo "$emacs_cv_void_star" >&6; } | |
8062 | if test $emacs_cv_void_star = yes; then | |
8063 | $as_echo "#define POINTER_TYPE void" >>confdefs.h | |
8064 | ||
8065 | else | |
8066 | $as_echo "#define POINTER_TYPE char" >>confdefs.h | |
8067 | ||
8068 | fi | |
8069 | ||
8070 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 | |
8071 | $as_echo_n "checking whether byte ordering is bigendian... " >&6; } | |
d6974efa | 8072 | if ${ac_cv_c_bigendian+:} false; then : |
067d23c9 KY |
8073 | $as_echo_n "(cached) " >&6 |
8074 | else | |
8075 | ac_cv_c_bigendian=unknown | |
8076 | # See if we're dealing with a universal compiler. | |
8077 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8078 | /* end confdefs.h. */ | |
8079 | #ifndef __APPLE_CC__ | |
8080 | not a universal capable compiler | |
8081 | #endif | |
8082 | typedef int dummy; | |
8083 | ||
8084 | _ACEOF | |
8085 | if ac_fn_c_try_compile "$LINENO"; then : | |
8086 | ||
8087 | # Check for potential -arch flags. It is not universal unless | |
8088 | # there are at least two -arch flags with different values. | |
8089 | ac_arch= | |
8090 | ac_prev= | |
8091 | for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do | |
8092 | if test -n "$ac_prev"; then | |
8093 | case $ac_word in | |
8094 | i?86 | x86_64 | ppc | ppc64) | |
8095 | if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then | |
8096 | ac_arch=$ac_word | |
8097 | else | |
8098 | ac_cv_c_bigendian=universal | |
8099 | break | |
8100 | fi | |
8101 | ;; | |
8102 | esac | |
8103 | ac_prev= | |
8104 | elif test "x$ac_word" = "x-arch"; then | |
8105 | ac_prev=arch | |
8106 | fi | |
8107 | done | |
8108 | fi | |
8109 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8110 | if test $ac_cv_c_bigendian = unknown; then | |
8111 | # See if sys/param.h defines the BYTE_ORDER macro. | |
8112 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8113 | /* end confdefs.h. */ | |
8114 | #include <sys/types.h> | |
8115 | #include <sys/param.h> | |
8116 | ||
8117 | int | |
8118 | main () | |
8119 | { | |
8120 | #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ | |
8121 | && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ | |
8122 | && LITTLE_ENDIAN) | |
8123 | bogus endian macros | |
8124 | #endif | |
8125 | ||
8126 | ; | |
8127 | return 0; | |
8128 | } | |
8129 | _ACEOF | |
8130 | if ac_fn_c_try_compile "$LINENO"; then : | |
8131 | # It does; now see whether it defined to BIG_ENDIAN or not. | |
8132 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8133 | /* end confdefs.h. */ | |
8134 | #include <sys/types.h> | |
8135 | #include <sys/param.h> | |
8136 | ||
8137 | int | |
8138 | main () | |
8139 | { | |
8140 | #if BYTE_ORDER != BIG_ENDIAN | |
8141 | not big endian | |
8142 | #endif | |
8143 | ||
8144 | ; | |
8145 | return 0; | |
8146 | } | |
8147 | _ACEOF | |
8148 | if ac_fn_c_try_compile "$LINENO"; then : | |
8149 | ac_cv_c_bigendian=yes | |
8150 | else | |
8151 | ac_cv_c_bigendian=no | |
8152 | fi | |
8153 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8154 | fi | |
8155 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8156 | fi | |
8157 | if test $ac_cv_c_bigendian = unknown; then | |
8158 | # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). | |
8159 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8160 | /* end confdefs.h. */ | |
8161 | #include <limits.h> | |
8162 | ||
8163 | int | |
8164 | main () | |
8165 | { | |
8166 | #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) | |
8167 | bogus endian macros | |
8168 | #endif | |
8169 | ||
8170 | ; | |
8171 | return 0; | |
8172 | } | |
8173 | _ACEOF | |
8174 | if ac_fn_c_try_compile "$LINENO"; then : | |
8175 | # It does; now see whether it defined to _BIG_ENDIAN or not. | |
8176 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8177 | /* end confdefs.h. */ | |
8178 | #include <limits.h> | |
8179 | ||
8180 | int | |
8181 | main () | |
8182 | { | |
8183 | #ifndef _BIG_ENDIAN | |
8184 | not big endian | |
8185 | #endif | |
8186 | ||
8187 | ; | |
8188 | return 0; | |
8189 | } | |
8190 | _ACEOF | |
8191 | if ac_fn_c_try_compile "$LINENO"; then : | |
8192 | ac_cv_c_bigendian=yes | |
8193 | else | |
8194 | ac_cv_c_bigendian=no | |
8195 | fi | |
8196 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8197 | fi | |
8198 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8199 | fi | |
8200 | if test $ac_cv_c_bigendian = unknown; then | |
8201 | # Compile a test program. | |
8202 | if test "$cross_compiling" = yes; then : | |
8203 | # Try to guess by grepping values from an object file. | |
8204 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8205 | /* end confdefs.h. */ | |
8206 | short int ascii_mm[] = | |
8207 | { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; | |
8208 | short int ascii_ii[] = | |
8209 | { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; | |
8210 | int use_ascii (int i) { | |
8211 | return ascii_mm[i] + ascii_ii[i]; | |
8212 | } | |
8213 | short int ebcdic_ii[] = | |
8214 | { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; | |
8215 | short int ebcdic_mm[] = | |
8216 | { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; | |
8217 | int use_ebcdic (int i) { | |
8218 | return ebcdic_mm[i] + ebcdic_ii[i]; | |
8219 | } | |
8220 | extern int foo; | |
8221 | ||
8222 | int | |
8223 | main () | |
8224 | { | |
8225 | return use_ascii (foo) == use_ebcdic (foo); | |
8226 | ; | |
8227 | return 0; | |
8228 | } | |
8229 | _ACEOF | |
8230 | if ac_fn_c_try_compile "$LINENO"; then : | |
8231 | if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then | |
8232 | ac_cv_c_bigendian=yes | |
8233 | fi | |
8234 | if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then | |
8235 | if test "$ac_cv_c_bigendian" = unknown; then | |
8236 | ac_cv_c_bigendian=no | |
8237 | else | |
8238 | # finding both strings is unlikely to happen, but who knows? | |
8239 | ac_cv_c_bigendian=unknown | |
8240 | fi | |
8241 | fi | |
8242 | fi | |
8243 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8244 | else | |
8245 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8246 | /* end confdefs.h. */ | |
8247 | $ac_includes_default | |
8248 | int | |
8249 | main () | |
8250 | { | |
8251 | ||
8252 | /* Are we little or big endian? From Harbison&Steele. */ | |
8253 | union | |
8254 | { | |
8255 | long int l; | |
8256 | char c[sizeof (long int)]; | |
8257 | } u; | |
8258 | u.l = 1; | |
8259 | return u.c[sizeof (long int) - 1] == 1; | |
8260 | ||
8261 | ; | |
8262 | return 0; | |
8263 | } | |
8264 | _ACEOF | |
8265 | if ac_fn_c_try_run "$LINENO"; then : | |
8266 | ac_cv_c_bigendian=no | |
8267 | else | |
8268 | ac_cv_c_bigendian=yes | |
8269 | fi | |
8270 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
8271 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
8272 | fi | |
8273 | ||
8274 | fi | |
8275 | fi | |
8276 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 | |
8277 | $as_echo "$ac_cv_c_bigendian" >&6; } | |
8278 | case $ac_cv_c_bigendian in #( | |
8279 | yes) | |
8280 | $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h | |
8281 | ;; #( | |
8282 | no) | |
8283 | ;; #( | |
8284 | universal) | |
8285 | ||
8286 | $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h | |
8287 | ||
8288 | ;; #( | |
8289 | *) | |
2018939f | 8290 | as_fn_error $? "unknown endianness |
d6974efa | 8291 | presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; |
067d23c9 KY |
8292 | esac |
8293 | ||
8294 | ||
7cae64b4 PE |
8295 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __attribute__ ((__aligned__ (expr)))" >&5 |
8296 | $as_echo_n "checking for __attribute__ ((__aligned__ (expr)))... " >&6; } | |
d6974efa | 8297 | if ${emacs_cv_attribute_aligned+:} false; then : |
7cae64b4 PE |
8298 | $as_echo_n "(cached) " >&6 |
8299 | else | |
8300 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8301 | /* end confdefs.h. */ | |
8302 | char __attribute__ ((__aligned__ (1 << 3))) c; | |
8303 | int | |
8304 | main () | |
8305 | { | |
8306 | ||
8307 | ; | |
8308 | return 0; | |
8309 | } | |
8310 | _ACEOF | |
8311 | if ac_fn_c_try_compile "$LINENO"; then : | |
8312 | emacs_cv_attribute_aligned=yes | |
8313 | else | |
8314 | emacs_cv_attribute_aligned=no | |
8315 | fi | |
8316 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8317 | fi | |
8318 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_attribute_aligned" >&5 | |
8319 | $as_echo "$emacs_cv_attribute_aligned" >&6; } | |
8320 | if test $emacs_cv_attribute_aligned = yes; then | |
8321 | ||
8322 | $as_echo "#define HAVE_ATTRIBUTE_ALIGNED 1" >>confdefs.h | |
8323 | ||
8324 | fi | |
8325 | ||
067d23c9 KY |
8326 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 |
8327 | $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } | |
8328 | set x ${MAKE-make} | |
8329 | ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` | |
d6974efa | 8330 | if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : |
067d23c9 KY |
8331 | $as_echo_n "(cached) " >&6 |
8332 | else | |
8333 | cat >conftest.make <<\_ACEOF | |
8334 | SHELL = /bin/sh | |
8335 | all: | |
8336 | @echo '@@@%%%=$(MAKE)=@@@%%%' | |
8337 | _ACEOF | |
2018939f | 8338 | # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. |
067d23c9 KY |
8339 | case `${MAKE-make} -f conftest.make 2>/dev/null` in |
8340 | *@@@%%%=?*=@@@%%%*) | |
8341 | eval ac_cv_prog_make_${ac_make}_set=yes;; | |
8342 | *) | |
8343 | eval ac_cv_prog_make_${ac_make}_set=no;; | |
8344 | esac | |
8345 | rm -f conftest.make | |
8346 | fi | |
8347 | if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then | |
8348 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
8349 | $as_echo "yes" >&6; } | |
8350 | SET_MAKE= | |
8351 | else | |
8352 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
8353 | $as_echo "no" >&6; } | |
8354 | SET_MAKE="MAKE=${MAKE-make}" | |
8355 | fi | |
8356 | ||
8357 | ||
8358 | DEPFLAGS= | |
8359 | MKDEPDIR=":" | |
8360 | deps_frag=deps.mk | |
8361 | if test "$GCC" = yes && test "$ac_enable_autodepend" = yes; then | |
8362 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using GNU Make" >&5 | |
8363 | $as_echo_n "checking whether we are using GNU Make... " >&6; } | |
8364 | HAVE_GNU_MAKE=no | |
8365 | testval=`make --version 2>/dev/null | grep 'GNU Make'` | |
8366 | if test "x$testval" != x; then | |
8367 | HAVE_GNU_MAKE=yes | |
8368 | else | |
8369 | ac_enable_autodepend=no | |
8370 | fi | |
8371 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_GNU_MAKE" >&5 | |
8372 | $as_echo "$HAVE_GNU_MAKE" >&6; } | |
8373 | if test $HAVE_GNU_MAKE = yes; then | |
8374 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -MMD -MF" >&5 | |
8375 | $as_echo_n "checking whether gcc understands -MMD -MF... " >&6; } | |
8376 | SAVE_CFLAGS="$CFLAGS" | |
8377 | CFLAGS="$CFLAGS -MMD -MF deps.d" | |
8378 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8379 | /* end confdefs.h. */ | |
8380 | ||
8381 | int | |
8382 | main () | |
8383 | { | |
8384 | ||
8385 | ; | |
8386 | return 0; | |
8387 | } | |
8388 | _ACEOF | |
8389 | if ac_fn_c_try_compile "$LINENO"; then : | |
8390 | ||
8391 | else | |
8392 | ac_enable_autodepend=no | |
8393 | fi | |
8394 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8395 | CFLAGS="$SAVE_CFLAGS" | |
8396 | test -f deps.d || ac_enable_autodepend=no | |
8397 | rm -rf deps.d | |
8398 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_autodepend" >&5 | |
8399 | $as_echo "$ac_enable_autodepend" >&6; } | |
8400 | fi | |
8401 | if test $ac_enable_autodepend = yes; then | |
8402 | DEPFLAGS='-MMD -MF ${DEPDIR}/$*.d' | |
8403 | ## In parallel builds, another make might create depdir between | |
8404 | ## the first test and mkdir, so stick another test on the end. | |
8405 | ## Or use mkinstalldirs? mkdir -p is not portable. | |
8406 | MKDEPDIR='test -d ${DEPDIR} || mkdir ${DEPDIR} || test -d ${DEPDIR}' | |
8407 | deps_frag=autodeps.mk | |
8408 | fi | |
8409 | fi | |
8410 | deps_frag=$srcdir/src/$deps_frag | |
8411 | ||
8412 | ||
8413 | ||
8414 | ||
8415 | ||
8416 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long file names" >&5 | |
8417 | $as_echo_n "checking for long file names... " >&6; } | |
d6974efa | 8418 | if ${ac_cv_sys_long_file_names+:} false; then : |
067d23c9 KY |
8419 | $as_echo_n "(cached) " >&6 |
8420 | else | |
8421 | ac_cv_sys_long_file_names=yes | |
8422 | # Test for long file names in all the places we know might matter: | |
8423 | # . the current directory, where building will happen | |
8424 | # $prefix/lib where we will be installing things | |
8425 | # $exec_prefix/lib likewise | |
8426 | # $TMPDIR if set, where it might want to write temporary files | |
8427 | # /tmp where it might want to write temporary files | |
8428 | # /var/tmp likewise | |
8429 | # /usr/tmp likewise | |
8430 | for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do | |
8431 | # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib | |
8432 | # in the usual case where exec_prefix is '${prefix}'. | |
8433 | case $ac_dir in #( | |
8434 | . | /* | ?:[\\/]*) ;; #( | |
8435 | *) continue;; | |
8436 | esac | |
8437 | test -w "$ac_dir/." || continue # It is less confusing to not echo anything here. | |
8438 | ac_xdir=$ac_dir/cf$$ | |
8439 | (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue | |
8440 | ac_tf1=$ac_xdir/conftest9012345 | |
8441 | ac_tf2=$ac_xdir/conftest9012346 | |
8442 | touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" || | |
8443 | ac_cv_sys_long_file_names=no | |
8444 | rm -f -r "$ac_xdir" 2>/dev/null | |
8445 | test $ac_cv_sys_long_file_names = no && break | |
8446 | done | |
8447 | fi | |
8448 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_long_file_names" >&5 | |
8449 | $as_echo "$ac_cv_sys_long_file_names" >&6; } | |
8450 | if test $ac_cv_sys_long_file_names = yes; then | |
8451 | ||
8452 | $as_echo "#define HAVE_LONG_FILE_NAMES 1" >>confdefs.h | |
8453 | ||
8454 | fi | |
8455 | ||
8456 | ||
8457 | #### Choose a window system. | |
8458 | ||
8459 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5 | |
8460 | $as_echo_n "checking for X... " >&6; } | |
8461 | ||
8462 | ||
8463 | # Check whether --with-x was given. | |
8464 | if test "${with_x+set}" = set; then : | |
8465 | withval=$with_x; | |
8466 | fi | |
8467 | ||
8468 | # $have_x is `yes', `no', `disabled', or empty when we do not yet know. | |
8469 | if test "x$with_x" = xno; then | |
8470 | # The user explicitly disabled X. | |
8471 | have_x=disabled | |
8472 | else | |
8473 | case $x_includes,$x_libraries in #( | |
d6974efa PE |
8474 | *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #( |
8475 | *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then : | |
067d23c9 KY |
8476 | $as_echo_n "(cached) " >&6 |
8477 | else | |
8478 | # One or both of the vars are not set, and there is no cached value. | |
8479 | ac_x_includes=no ac_x_libraries=no | |
8480 | rm -f -r conftest.dir | |
8481 | if mkdir conftest.dir; then | |
8482 | cd conftest.dir | |
8483 | cat >Imakefile <<'_ACEOF' | |
8484 | incroot: | |
8485 | @echo incroot='${INCROOT}' | |
8486 | usrlibdir: | |
8487 | @echo usrlibdir='${USRLIBDIR}' | |
8488 | libdir: | |
8489 | @echo libdir='${LIBDIR}' | |
8490 | _ACEOF | |
8491 | if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then | |
2018939f | 8492 | # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. |
067d23c9 KY |
8493 | for ac_var in incroot usrlibdir libdir; do |
8494 | eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" | |
8495 | done | |
8496 | # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. | |
8497 | for ac_extension in a so sl dylib la dll; do | |
8498 | if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && | |
8499 | test -f "$ac_im_libdir/libX11.$ac_extension"; then | |
8500 | ac_im_usrlibdir=$ac_im_libdir; break | |
8501 | fi | |
8502 | done | |
8503 | # Screen out bogus values from the imake configuration. They are | |
8504 | # bogus both because they are the default anyway, and because | |
8505 | # using them would break gcc on systems where it needs fixed includes. | |
8506 | case $ac_im_incroot in | |
8507 | /usr/include) ac_x_includes= ;; | |
8508 | *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; | |
8509 | esac | |
8510 | case $ac_im_usrlibdir in | |
8511 | /usr/lib | /usr/lib64 | /lib | /lib64) ;; | |
8512 | *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; | |
8513 | esac | |
8514 | fi | |
8515 | cd .. | |
8516 | rm -f -r conftest.dir | |
8517 | fi | |
8518 | ||
8519 | # Standard set of common directories for X headers. | |
8520 | # Check X11 before X11Rn because it is often a symlink to the current release. | |
8521 | ac_x_header_dirs=' | |
8522 | /usr/X11/include | |
8523 | /usr/X11R7/include | |
8524 | /usr/X11R6/include | |
8525 | /usr/X11R5/include | |
8526 | /usr/X11R4/include | |
8527 | ||
8528 | /usr/include/X11 | |
8529 | /usr/include/X11R7 | |
8530 | /usr/include/X11R6 | |
8531 | /usr/include/X11R5 | |
8532 | /usr/include/X11R4 | |
8533 | ||
8534 | /usr/local/X11/include | |
8535 | /usr/local/X11R7/include | |
8536 | /usr/local/X11R6/include | |
8537 | /usr/local/X11R5/include | |
8538 | /usr/local/X11R4/include | |
8539 | ||
8540 | /usr/local/include/X11 | |
8541 | /usr/local/include/X11R7 | |
8542 | /usr/local/include/X11R6 | |
8543 | /usr/local/include/X11R5 | |
8544 | /usr/local/include/X11R4 | |
8545 | ||
8546 | /usr/X386/include | |
8547 | /usr/x386/include | |
8548 | /usr/XFree86/include/X11 | |
8549 | ||
8550 | /usr/include | |
8551 | /usr/local/include | |
8552 | /usr/unsupported/include | |
8553 | /usr/athena/include | |
8554 | /usr/local/x11r5/include | |
8555 | /usr/lpp/Xamples/include | |
8556 | ||
8557 | /usr/openwin/include | |
8558 | /usr/openwin/share/include' | |
8559 | ||
8560 | if test "$ac_x_includes" = no; then | |
8561 | # Guess where to find include files, by looking for Xlib.h. | |
8562 | # First, try using that file with no special directory specified. | |
8563 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8564 | /* end confdefs.h. */ | |
8565 | #include <X11/Xlib.h> | |
8566 | _ACEOF | |
8567 | if ac_fn_c_try_cpp "$LINENO"; then : | |
8568 | # We can compile using X headers with no special include directory. | |
8569 | ac_x_includes= | |
8570 | else | |
8571 | for ac_dir in $ac_x_header_dirs; do | |
8572 | if test -r "$ac_dir/X11/Xlib.h"; then | |
8573 | ac_x_includes=$ac_dir | |
8574 | break | |
8575 | fi | |
8576 | done | |
8577 | fi | |
2018939f | 8578 | rm -f conftest.err conftest.i conftest.$ac_ext |
067d23c9 KY |
8579 | fi # $ac_x_includes = no |
8580 | ||
8581 | if test "$ac_x_libraries" = no; then | |
8582 | # Check for the libraries. | |
8583 | # See if we find them without any special options. | |
8584 | # Don't add to $LIBS permanently. | |
8585 | ac_save_LIBS=$LIBS | |
8586 | LIBS="-lX11 $LIBS" | |
8587 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8588 | /* end confdefs.h. */ | |
8589 | #include <X11/Xlib.h> | |
8590 | int | |
8591 | main () | |
8592 | { | |
8593 | XrmInitialize () | |
8594 | ; | |
8595 | return 0; | |
8596 | } | |
8597 | _ACEOF | |
8598 | if ac_fn_c_try_link "$LINENO"; then : | |
8599 | LIBS=$ac_save_LIBS | |
8600 | # We can link X programs with no special library path. | |
8601 | ac_x_libraries= | |
8602 | else | |
8603 | LIBS=$ac_save_LIBS | |
8604 | for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` | |
8605 | do | |
8606 | # Don't even attempt the hair of trying to link an X program! | |
8607 | for ac_extension in a so sl dylib la dll; do | |
8608 | if test -r "$ac_dir/libX11.$ac_extension"; then | |
8609 | ac_x_libraries=$ac_dir | |
8610 | break 2 | |
8611 | fi | |
8612 | done | |
8613 | done | |
8614 | fi | |
8615 | rm -f core conftest.err conftest.$ac_objext \ | |
8616 | conftest$ac_exeext conftest.$ac_ext | |
8617 | fi # $ac_x_libraries = no | |
8618 | ||
8619 | case $ac_x_includes,$ac_x_libraries in #( | |
8620 | no,* | *,no | *\'*) | |
8621 | # Didn't find X, or a directory has "'" in its name. | |
8622 | ac_cv_have_x="have_x=no";; #( | |
8623 | *) | |
8624 | # Record where we found X for the cache. | |
8625 | ac_cv_have_x="have_x=yes\ | |
8626 | ac_x_includes='$ac_x_includes'\ | |
8627 | ac_x_libraries='$ac_x_libraries'" | |
8628 | esac | |
8629 | fi | |
8630 | ;; #( | |
8631 | *) have_x=yes;; | |
8632 | esac | |
8633 | eval "$ac_cv_have_x" | |
8634 | fi # $with_x != no | |
8635 | ||
8636 | if test "$have_x" != yes; then | |
8637 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5 | |
8638 | $as_echo "$have_x" >&6; } | |
8639 | no_x=yes | |
8640 | else | |
8641 | # If each of the values was on the command line, it overrides each guess. | |
8642 | test "x$x_includes" = xNONE && x_includes=$ac_x_includes | |
8643 | test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries | |
8644 | # Update the cache value to reflect the command line values. | |
8645 | ac_cv_have_x="have_x=yes\ | |
8646 | ac_x_includes='$x_includes'\ | |
8647 | ac_x_libraries='$x_libraries'" | |
8648 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5 | |
8649 | $as_echo "libraries $x_libraries, headers $x_includes" >&6; } | |
8650 | fi | |
8651 | ||
8652 | if test "$no_x" = yes; then | |
8653 | window_system=none | |
8654 | else | |
8655 | window_system=x11 | |
8656 | fi | |
8657 | ||
8658 | ## Workaround for bug in autoconf <= 2.62. | |
8659 | ## http://lists.gnu.org/archive/html/emacs-devel/2008-04/msg01551.html | |
8660 | ## No need to do anything special for these standard directories. | |
8661 | if test -n "${x_libraries}" && test x"${x_libraries}" != xNONE; then | |
8662 | ||
8663 | x_libraries=`echo :${x_libraries}: | sed -e 's|:/usr/lib64:|:|g' -e 's|:/lib64:|:|g' -e 's|^:||' -e 's|:$||'` | |
8664 | ||
8665 | fi | |
8666 | ||
8667 | LD_SWITCH_X_SITE_AUX= | |
8668 | LD_SWITCH_X_SITE_AUX_RPATH= | |
8669 | if test "${x_libraries}" != NONE; then | |
8670 | if test -n "${x_libraries}"; then | |
8671 | LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"` | |
8672 | LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"` | |
8673 | LD_SWITCH_X_SITE_AUX_RPATH=`echo ${LD_SWITCH_X_SITE_AUX} | sed -e 's/-R/-Wl,-rpath,/'` | |
8674 | fi | |
8675 | x_default_search_path="" | |
8676 | x_search_path=${x_libraries} | |
8677 | if test -z "${x_search_path}"; then | |
8678 | x_search_path=/usr/lib | |
8679 | fi | |
8680 | for x_library in `echo ${x_search_path}: | \ | |
8681 | sed -e "s/:/ /g" -e p -e "s:/lib[^ /]* :/share :g"`; do | |
8682 | x_search_path="\ | |
8683 | ${x_library}/X11/%L/%T/%N%C%S:\ | |
8684 | ${x_library}/X11/%l/%T/%N%C%S:\ | |
8685 | ${x_library}/X11/%T/%N%C%S:\ | |
8686 | ${x_library}/X11/%L/%T/%N%S:\ | |
8687 | ${x_library}/X11/%l/%T/%N%S:\ | |
8688 | ${x_library}/X11/%T/%N%S" | |
8689 | if test x"${x_default_search_path}" = x; then | |
8690 | x_default_search_path=${x_search_path} | |
8691 | else | |
8692 | x_default_search_path="${x_search_path}:${x_default_search_path}" | |
8693 | fi | |
8694 | done | |
8695 | fi | |
8696 | ||
8697 | ||
8698 | ||
8699 | if test "${x_includes}" != NONE && test -n "${x_includes}"; then | |
8700 | C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"` | |
8701 | fi | |
8702 | ||
8703 | if test x"${x_includes}" = x; then | |
8704 | bitmapdir=/usr/include/X11/bitmaps | |
8705 | else | |
8706 | # accumulate include directories that have X11 bitmap subdirectories | |
8707 | bmd_acc="dummyval" | |
8708 | for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do | |
8709 | if test -d "${bmd}/X11/bitmaps"; then | |
8710 | bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps" | |
8711 | fi | |
8712 | if test -d "${bmd}/bitmaps"; then | |
8713 | bmd_acc="${bmd_acc}:${bmd}/bitmaps" | |
8714 | fi | |
8715 | done | |
8716 | if test ${bmd_acc} != "dummyval"; then | |
8717 | bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"` | |
8718 | fi | |
8719 | fi | |
8720 | ||
8721 | HAVE_NS=no | |
8722 | NS_IMPL_COCOA=no | |
8723 | NS_IMPL_GNUSTEP=no | |
8724 | tmp_CPPFLAGS="$CPPFLAGS" | |
8725 | tmp_CFLAGS="$CFLAGS" | |
8726 | CPPFLAGS="$CPPFLAGS -x objective-c" | |
8727 | CFLAGS="$CFLAGS -x objective-c" | |
8728 | TEMACS_LDFLAGS2="\${LDFLAGS}" | |
8729 | if test "${with_ns}" != no; then | |
8730 | if test "${opsys}" = darwin; then | |
8731 | NS_IMPL_COCOA=yes | |
8732 | ns_appdir=`pwd`/nextstep/Emacs.app | |
8733 | ns_appbindir=${ns_appdir}/Contents/MacOS/ | |
8734 | ns_appresdir=${ns_appdir}/Contents/Resources | |
8735 | ns_appsrc=${srcdir}/nextstep/Cocoa/Emacs.base | |
8736 | elif test -f $GNUSTEP_CONFIG_FILE; then | |
8737 | NS_IMPL_GNUSTEP=yes | |
8738 | ns_appdir=`pwd`/nextstep/Emacs.app | |
8739 | ns_appbindir=${ns_appdir}/ | |
8740 | ns_appresdir=${ns_appdir}/Resources | |
8741 | ns_appsrc=${srcdir}/nextstep/GNUstep/Emacs.base | |
8742 | GNUSTEP_SYSTEM_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_HEADERS)" | |
8743 | GNUSTEP_SYSTEM_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_LIBRARIES)" | |
8744 | GNUSTEP_LOCAL_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_HEADERS)" | |
8745 | GNUSTEP_LOCAL_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_LIBRARIES)" | |
8746 | test "x${GNUSTEP_LOCAL_HEADERS}" != "x" && \ | |
8747 | GNUSTEP_LOCAL_HEADERS="-I${GNUSTEP_LOCAL_HEADERS}" | |
8748 | test "x${GNUSTEP_LOCAL_LIBRARIES}" != "x" && \ | |
8749 | GNUSTEP_LOCAL_LIBRARIES="-L${GNUSTEP_LOCAL_LIBRARIES}" | |
8750 | CPPFLAGS="$CPPFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}" | |
8751 | CFLAGS="$CFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}" | |
8752 | LDFLAGS="$LDFLAGS -L${GNUSTEP_SYSTEM_LIBRARIES} ${GNUSTEP_LOCAL_LIBRARIES}" | |
8753 | LIB_STANDARD= | |
8754 | START_FILES= | |
8755 | TEMACS_LDFLAGS2= | |
8756 | fi | |
8757 | ac_fn_c_check_header_mongrel "$LINENO" "AppKit/AppKit.h" "ac_cv_header_AppKit_AppKit_h" "$ac_includes_default" | |
d6974efa | 8758 | if test "x$ac_cv_header_AppKit_AppKit_h" = xyes; then : |
067d23c9 KY |
8759 | HAVE_NS=yes |
8760 | else | |
2018939f | 8761 | as_fn_error $? "\`--with-ns' was specified, but the include |
067d23c9 KY |
8762 | files are missing or cannot be compiled." "$LINENO" 5 |
8763 | fi | |
8764 | ||
8765 | ||
8766 | NS_HAVE_NSINTEGER=yes | |
8767 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8768 | /* end confdefs.h. */ | |
8769 | #include <Foundation/NSObjCRuntime.h> | |
8770 | int | |
8771 | main () | |
8772 | { | |
8773 | NSInteger i; | |
8774 | ; | |
8775 | return 0; | |
8776 | } | |
8777 | _ACEOF | |
8778 | if ac_fn_c_try_compile "$LINENO"; then : | |
8779 | ns_have_nsinteger=yes | |
8780 | else | |
8781 | ns_have_nsinteger=no | |
8782 | fi | |
8783 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8784 | if test $ns_have_nsinteger = no; then | |
8785 | NS_HAVE_NSINTEGER=no | |
8786 | fi | |
8787 | fi | |
8788 | ||
8789 | ||
8790 | ns_frag=/dev/null | |
8791 | NS_OBJ= | |
00b3c7ac | 8792 | NS_OBJC_OBJ= |
067d23c9 KY |
8793 | NS_SUPPORT= |
8794 | if test "${HAVE_NS}" = yes; then | |
8795 | window_system=nextstep | |
8796 | with_xft=no | |
8797 | # set up packaging dirs | |
8798 | exec_prefix=${ns_appbindir} | |
8799 | libexecdir=${ns_appbindir}/libexec | |
8800 | if test "${EN_NS_SELF_CONTAINED}" = yes; then | |
8801 | prefix=${ns_appresdir} | |
8802 | fi | |
8803 | ns_frag=$srcdir/src/ns.mk | |
00b3c7ac TT |
8804 | NS_OBJ="fontset.o fringe.o image.o" |
8805 | NS_OBJC_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o" | |
067d23c9 KY |
8806 | NS_SUPPORT="\${lispsource}/emacs-lisp/easymenu.elc \${lispsource}/term/ns-win.elc" |
8807 | fi | |
8808 | CFLAGS="$tmp_CFLAGS" | |
8809 | CPPFLAGS="$tmp_CPPFLAGS" | |
8810 | ||
8811 | ||
8812 | ||
8813 | ||
8814 | ||
00b3c7ac | 8815 | |
067d23c9 KY |
8816 | case "${window_system}" in |
8817 | x11 ) | |
8818 | HAVE_X_WINDOWS=yes | |
8819 | HAVE_X11=yes | |
8820 | case "${with_x_toolkit}" in | |
8821 | athena | lucid ) USE_X_TOOLKIT=LUCID ;; | |
8822 | motif ) USE_X_TOOLKIT=MOTIF ;; | |
8823 | gtk ) with_gtk=yes | |
8824 | USE_X_TOOLKIT=none ;; | |
8825 | gtk3 ) with_gtk3=yes | |
8826 | USE_X_TOOLKIT=none ;; | |
8827 | no ) USE_X_TOOLKIT=none ;; | |
8828 | * ) USE_X_TOOLKIT=maybe ;; | |
8829 | esac | |
8830 | ;; | |
8831 | nextstep | none ) | |
8832 | HAVE_X_WINDOWS=no | |
8833 | HAVE_X11=no | |
8834 | USE_X_TOOLKIT=none | |
8835 | ;; | |
8836 | esac | |
8837 | ||
8838 | if test "$window_system" = none && test "X$with_x" != "Xno"; then | |
8839 | # Extract the first word of "X", so it can be a program name with args. | |
8840 | set dummy X; ac_word=$2 | |
8841 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
8842 | $as_echo_n "checking for $ac_word... " >&6; } | |
d6974efa | 8843 | if ${ac_cv_prog_HAVE_XSERVER+:} false; then : |
067d23c9 KY |
8844 | $as_echo_n "(cached) " >&6 |
8845 | else | |
8846 | if test -n "$HAVE_XSERVER"; then | |
8847 | ac_cv_prog_HAVE_XSERVER="$HAVE_XSERVER" # Let the user override the test. | |
8848 | else | |
8849 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8850 | for as_dir in $PATH | |
8851 | do | |
8852 | IFS=$as_save_IFS | |
8853 | test -z "$as_dir" && as_dir=. | |
8854 | for ac_exec_ext in '' $ac_executable_extensions; do | |
8855 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
8856 | ac_cv_prog_HAVE_XSERVER="true" | |
8857 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
8858 | break 2 | |
8859 | fi | |
8860 | done | |
8861 | done | |
8862 | IFS=$as_save_IFS | |
8863 | ||
8864 | test -z "$ac_cv_prog_HAVE_XSERVER" && ac_cv_prog_HAVE_XSERVER="false" | |
8865 | fi | |
8866 | fi | |
8867 | HAVE_XSERVER=$ac_cv_prog_HAVE_XSERVER | |
8868 | if test -n "$HAVE_XSERVER"; then | |
8869 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_XSERVER" >&5 | |
8870 | $as_echo "$HAVE_XSERVER" >&6; } | |
8871 | else | |
8872 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
8873 | $as_echo "no" >&6; } | |
8874 | fi | |
8875 | ||
8876 | ||
8877 | if test "$HAVE_XSERVER" = true || | |
8878 | test -n "$DISPLAY" || | |
8879 | test "`echo /usr/lib/libX11.*`" != "/usr/lib/libX11.*"; then | |
2018939f | 8880 | as_fn_error $? "You seem to be running X, but no X development libraries |
067d23c9 KY |
8881 | were found. You should install the relevant development files for X |
8882 | and for the toolkit you want, such as Gtk+, Lesstif or Motif. Also make | |
8883 | sure you have development files for image handling, i.e. | |
8884 | tiff, gif, jpeg, png and xpm. | |
8885 | If you are sure you want Emacs compiled without X window support, pass | |
8886 | --without-x | |
8887 | to configure." "$LINENO" 5 | |
8888 | fi | |
8889 | fi | |
8890 | ||
8891 | ### If we're using X11, we should use the X menu package. | |
8892 | HAVE_MENUS=no | |
8893 | case ${HAVE_X11} in | |
8894 | yes ) HAVE_MENUS=yes ;; | |
8895 | esac | |
8896 | ||
8897 | # Do the opsystem or machine files prohibit the use of the GNU malloc? | |
8898 | # Assume not, until told otherwise. | |
8899 | GNU_MALLOC=yes | |
8900 | doug_lea_malloc=yes | |
8901 | ac_fn_c_check_func "$LINENO" "malloc_get_state" "ac_cv_func_malloc_get_state" | |
d6974efa | 8902 | if test "x$ac_cv_func_malloc_get_state" = xyes; then : |
067d23c9 KY |
8903 | |
8904 | else | |
8905 | doug_lea_malloc=no | |
8906 | fi | |
8907 | ||
8908 | ac_fn_c_check_func "$LINENO" "malloc_set_state" "ac_cv_func_malloc_set_state" | |
d6974efa | 8909 | if test "x$ac_cv_func_malloc_set_state" = xyes; then : |
067d23c9 KY |
8910 | |
8911 | else | |
8912 | doug_lea_malloc=no | |
8913 | fi | |
8914 | ||
8915 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __after_morecore_hook exists" >&5 | |
8916 | $as_echo_n "checking whether __after_morecore_hook exists... " >&6; } | |
d6974efa | 8917 | if ${emacs_cv_var___after_morecore_hook+:} false; then : |
067d23c9 KY |
8918 | $as_echo_n "(cached) " >&6 |
8919 | else | |
8920 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8921 | /* end confdefs.h. */ | |
8922 | extern void (* __after_morecore_hook)(); | |
8923 | int | |
8924 | main () | |
8925 | { | |
8926 | __after_morecore_hook = 0 | |
8927 | ; | |
8928 | return 0; | |
8929 | } | |
8930 | _ACEOF | |
8931 | if ac_fn_c_try_link "$LINENO"; then : | |
8932 | emacs_cv_var___after_morecore_hook=yes | |
8933 | else | |
8934 | emacs_cv_var___after_morecore_hook=no | |
8935 | fi | |
8936 | rm -f core conftest.err conftest.$ac_objext \ | |
8937 | conftest$ac_exeext conftest.$ac_ext | |
8938 | fi | |
8939 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_var___after_morecore_hook" >&5 | |
8940 | $as_echo "$emacs_cv_var___after_morecore_hook" >&6; } | |
8941 | if test $emacs_cv_var___after_morecore_hook = no; then | |
8942 | doug_lea_malloc=no | |
8943 | fi | |
8944 | ||
8945 | ||
8946 | system_malloc=no | |
8947 | case "$opsys" in | |
8948 | ## darwin ld insists on the use of malloc routines in the System framework. | |
8949 | darwin|sol2-10) system_malloc=yes ;; | |
8950 | esac | |
8951 | ||
8952 | if test "${system_malloc}" = "yes"; then | |
8953 | ||
8954 | $as_echo "#define SYSTEM_MALLOC 1" >>confdefs.h | |
8955 | ||
8956 | GNU_MALLOC=no | |
8957 | GNU_MALLOC_reason=" | |
8958 | (The GNU allocators don't work with this system configuration.)" | |
8959 | GMALLOC_OBJ= | |
8960 | VMLIMIT_OBJ= | |
8961 | else | |
8962 | test "$doug_lea_malloc" != "yes" && GMALLOC_OBJ=gmalloc.o | |
8963 | VMLIMIT_OBJ=vm-limit.o | |
8964 | fi | |
8965 | ||
8966 | ||
8967 | ||
8968 | if test "$doug_lea_malloc" = "yes" ; then | |
8969 | if test "$GNU_MALLOC" = yes ; then | |
8970 | GNU_MALLOC_reason=" | |
8971 | (Using Doug Lea's new malloc from the GNU C Library.)" | |
8972 | fi | |
8973 | ||
8974 | $as_echo "#define DOUG_LEA_MALLOC 1" >>confdefs.h | |
8975 | ||
8976 | ||
8977 | ## Use mmap directly for allocating larger buffers. | |
8978 | ## FIXME this comes from src/s/{gnu,gnu-linux}.h: | |
8979 | ## #ifdef DOUG_LEA_MALLOC; #undef REL_ALLOC; #endif | |
8980 | ## Does the AC_FUNC_MMAP test below make this check unecessary? | |
8981 | case "$opsys" in | |
8982 | gnu*) REL_ALLOC=no ;; | |
8983 | esac | |
8984 | fi | |
8985 | ||
8986 | if test x"${REL_ALLOC}" = x; then | |
8987 | REL_ALLOC=${GNU_MALLOC} | |
8988 | fi | |
8989 | ||
8990 | use_mmap_for_buffers=no | |
8991 | case "$opsys" in | |
8992 | freebsd|irix6-5) use_mmap_for_buffers=yes ;; | |
8993 | esac | |
8994 | ||
8995 | ||
8996 | ||
8997 | ||
8998 | for ac_header in $ac_header_list | |
8999 | do : | |
9000 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
9001 | ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default | |
9002 | " | |
2018939f | 9003 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : |
067d23c9 KY |
9004 | cat >>confdefs.h <<_ACEOF |
9005 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
9006 | _ACEOF | |
9007 | ||
9008 | fi | |
9009 | ||
9010 | done | |
9011 | ||
9012 | ||
9013 | ||
9014 | ||
9015 | ||
9016 | ||
9017 | ||
9018 | ||
9019 | for ac_func in getpagesize | |
9020 | do : | |
9021 | ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" | |
d6974efa | 9022 | if test "x$ac_cv_func_getpagesize" = xyes; then : |
067d23c9 KY |
9023 | cat >>confdefs.h <<_ACEOF |
9024 | #define HAVE_GETPAGESIZE 1 | |
9025 | _ACEOF | |
9026 | ||
9027 | fi | |
9028 | done | |
9029 | ||
9030 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 | |
9031 | $as_echo_n "checking for working mmap... " >&6; } | |
d6974efa | 9032 | if ${ac_cv_func_mmap_fixed_mapped+:} false; then : |
067d23c9 KY |
9033 | $as_echo_n "(cached) " >&6 |
9034 | else | |
9035 | if test "$cross_compiling" = yes; then : | |
9036 | ac_cv_func_mmap_fixed_mapped=no | |
9037 | else | |
9038 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9039 | /* end confdefs.h. */ | |
9040 | $ac_includes_default | |
9041 | /* malloc might have been renamed as rpl_malloc. */ | |
9042 | #undef malloc | |
9043 | ||
9044 | /* Thanks to Mike Haertel and Jim Avera for this test. | |
9045 | Here is a matrix of mmap possibilities: | |
9046 | mmap private not fixed | |
9047 | mmap private fixed at somewhere currently unmapped | |
9048 | mmap private fixed at somewhere already mapped | |
9049 | mmap shared not fixed | |
9050 | mmap shared fixed at somewhere currently unmapped | |
9051 | mmap shared fixed at somewhere already mapped | |
9052 | For private mappings, we should verify that changes cannot be read() | |
9053 | back from the file, nor mmap's back from the file at a different | |
9054 | address. (There have been systems where private was not correctly | |
9055 | implemented like the infamous i386 svr4.0, and systems where the | |
9056 | VM page cache was not coherent with the file system buffer cache | |
9057 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
9058 | For shared mappings, we should conversely verify that changes get | |
9059 | propagated back to all the places they're supposed to be. | |
9060 | ||
9061 | Grep wants private fixed already mapped. | |
9062 | The main things grep needs to know about mmap are: | |
9063 | * does it exist and is it safe to write into the mmap'd area | |
9064 | * how to use it (BSD variants) */ | |
9065 | ||
9066 | #include <fcntl.h> | |
9067 | #include <sys/mman.h> | |
9068 | ||
9069 | #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H | |
9070 | char *malloc (); | |
9071 | #endif | |
9072 | ||
9073 | /* This mess was copied from the GNU getpagesize.h. */ | |
9074 | #ifndef HAVE_GETPAGESIZE | |
9075 | # ifdef _SC_PAGESIZE | |
9076 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
9077 | # else /* no _SC_PAGESIZE */ | |
9078 | # ifdef HAVE_SYS_PARAM_H | |
9079 | # include <sys/param.h> | |
9080 | # ifdef EXEC_PAGESIZE | |
9081 | # define getpagesize() EXEC_PAGESIZE | |
9082 | # else /* no EXEC_PAGESIZE */ | |
9083 | # ifdef NBPG | |
9084 | # define getpagesize() NBPG * CLSIZE | |
9085 | # ifndef CLSIZE | |
9086 | # define CLSIZE 1 | |
9087 | # endif /* no CLSIZE */ | |
9088 | # else /* no NBPG */ | |
9089 | # ifdef NBPC | |
9090 | # define getpagesize() NBPC | |
9091 | # else /* no NBPC */ | |
9092 | # ifdef PAGESIZE | |
9093 | # define getpagesize() PAGESIZE | |
9094 | # endif /* PAGESIZE */ | |
9095 | # endif /* no NBPC */ | |
9096 | # endif /* no NBPG */ | |
9097 | # endif /* no EXEC_PAGESIZE */ | |
9098 | # else /* no HAVE_SYS_PARAM_H */ | |
9099 | # define getpagesize() 8192 /* punt totally */ | |
9100 | # endif /* no HAVE_SYS_PARAM_H */ | |
9101 | # endif /* no _SC_PAGESIZE */ | |
9102 | ||
9103 | #endif /* no HAVE_GETPAGESIZE */ | |
9104 | ||
9105 | int | |
9106 | main () | |
9107 | { | |
9108 | char *data, *data2, *data3; | |
2018939f | 9109 | const char *cdata2; |
067d23c9 KY |
9110 | int i, pagesize; |
9111 | int fd, fd2; | |
9112 | ||
9113 | pagesize = getpagesize (); | |
9114 | ||
9115 | /* First, make a file with some known garbage in it. */ | |
9116 | data = (char *) malloc (pagesize); | |
9117 | if (!data) | |
9118 | return 1; | |
9119 | for (i = 0; i < pagesize; ++i) | |
9120 | *(data + i) = rand (); | |
9121 | umask (0); | |
9122 | fd = creat ("conftest.mmap", 0600); | |
9123 | if (fd < 0) | |
9124 | return 2; | |
9125 | if (write (fd, data, pagesize) != pagesize) | |
9126 | return 3; | |
9127 | close (fd); | |
9128 | ||
9129 | /* Next, check that the tail of a page is zero-filled. File must have | |
9130 | non-zero length, otherwise we risk SIGBUS for entire page. */ | |
9131 | fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600); | |
9132 | if (fd2 < 0) | |
9133 | return 4; | |
2018939f AS |
9134 | cdata2 = ""; |
9135 | if (write (fd2, cdata2, 1) != 1) | |
067d23c9 | 9136 | return 5; |
2018939f | 9137 | data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L); |
067d23c9 KY |
9138 | if (data2 == MAP_FAILED) |
9139 | return 6; | |
9140 | for (i = 0; i < pagesize; ++i) | |
9141 | if (*(data2 + i)) | |
9142 | return 7; | |
9143 | close (fd2); | |
9144 | if (munmap (data2, pagesize)) | |
9145 | return 8; | |
9146 | ||
9147 | /* Next, try to mmap the file at a fixed address which already has | |
9148 | something else allocated at it. If we can, also make sure that | |
9149 | we see the same garbage. */ | |
9150 | fd = open ("conftest.mmap", O_RDWR); | |
9151 | if (fd < 0) | |
9152 | return 9; | |
9153 | if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, | |
9154 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
9155 | return 10; | |
9156 | for (i = 0; i < pagesize; ++i) | |
9157 | if (*(data + i) != *(data2 + i)) | |
9158 | return 11; | |
9159 | ||
9160 | /* Finally, make sure that changes to the mapped area do not | |
9161 | percolate back to the file as seen by read(). (This is a bug on | |
9162 | some variants of i386 svr4.0.) */ | |
9163 | for (i = 0; i < pagesize; ++i) | |
9164 | *(data2 + i) = *(data2 + i) + 1; | |
9165 | data3 = (char *) malloc (pagesize); | |
9166 | if (!data3) | |
9167 | return 12; | |
9168 | if (read (fd, data3, pagesize) != pagesize) | |
9169 | return 13; | |
9170 | for (i = 0; i < pagesize; ++i) | |
9171 | if (*(data + i) != *(data3 + i)) | |
9172 | return 14; | |
9173 | close (fd); | |
9174 | return 0; | |
9175 | } | |
9176 | _ACEOF | |
9177 | if ac_fn_c_try_run "$LINENO"; then : | |
9178 | ac_cv_func_mmap_fixed_mapped=yes | |
9179 | else | |
9180 | ac_cv_func_mmap_fixed_mapped=no | |
9181 | fi | |
9182 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
9183 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
9184 | fi | |
9185 | ||
9186 | fi | |
9187 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5 | |
9188 | $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; } | |
9189 | if test $ac_cv_func_mmap_fixed_mapped = yes; then | |
9190 | ||
9191 | $as_echo "#define HAVE_MMAP 1" >>confdefs.h | |
9192 | ||
9193 | fi | |
9194 | rm -f conftest.mmap conftest.txt | |
9195 | ||
9196 | if test $use_mmap_for_buffers = yes; then | |
9197 | ||
9198 | $as_echo "#define USE_MMAP_FOR_BUFFERS 1" >>confdefs.h | |
9199 | ||
9200 | REL_ALLOC=no | |
9201 | fi | |
9202 | ||
9203 | LIBS="$LIBS_SYSTEM $LIBS" | |
9204 | ||
9205 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5 | |
9206 | $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; } | |
d6974efa | 9207 | if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then : |
067d23c9 KY |
9208 | $as_echo_n "(cached) " >&6 |
9209 | else | |
9210 | ac_check_lib_save_LIBS=$LIBS | |
9211 | LIBS="-ldnet $LIBS" | |
9212 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9213 | /* end confdefs.h. */ | |
9214 | ||
9215 | /* Override any GCC internal prototype to avoid an error. | |
9216 | Use char because int might match the return type of a GCC | |
9217 | builtin and then its argument prototype would still apply. */ | |
9218 | #ifdef __cplusplus | |
9219 | extern "C" | |
9220 | #endif | |
9221 | char dnet_ntoa (); | |
9222 | int | |
9223 | main () | |
9224 | { | |
9225 | return dnet_ntoa (); | |
9226 | ; | |
9227 | return 0; | |
9228 | } | |
9229 | _ACEOF | |
9230 | if ac_fn_c_try_link "$LINENO"; then : | |
9231 | ac_cv_lib_dnet_dnet_ntoa=yes | |
9232 | else | |
9233 | ac_cv_lib_dnet_dnet_ntoa=no | |
9234 | fi | |
9235 | rm -f core conftest.err conftest.$ac_objext \ | |
9236 | conftest$ac_exeext conftest.$ac_ext | |
9237 | LIBS=$ac_check_lib_save_LIBS | |
9238 | fi | |
9239 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 | |
9240 | $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; } | |
d6974efa | 9241 | if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then : |
067d23c9 KY |
9242 | cat >>confdefs.h <<_ACEOF |
9243 | #define HAVE_LIBDNET 1 | |
9244 | _ACEOF | |
9245 | ||
9246 | LIBS="-ldnet $LIBS" | |
9247 | ||
9248 | fi | |
9249 | ||
9250 | ||
9251 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lXbsd" >&5 | |
9252 | $as_echo_n "checking for main in -lXbsd... " >&6; } | |
d6974efa | 9253 | if ${ac_cv_lib_Xbsd_main+:} false; then : |
067d23c9 KY |
9254 | $as_echo_n "(cached) " >&6 |
9255 | else | |
9256 | ac_check_lib_save_LIBS=$LIBS | |
9257 | LIBS="-lXbsd $LIBS" | |
9258 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9259 | /* end confdefs.h. */ | |
9260 | ||
9261 | ||
9262 | int | |
9263 | main () | |
9264 | { | |
9265 | return main (); | |
9266 | ; | |
9267 | return 0; | |
9268 | } | |
9269 | _ACEOF | |
9270 | if ac_fn_c_try_link "$LINENO"; then : | |
9271 | ac_cv_lib_Xbsd_main=yes | |
9272 | else | |
9273 | ac_cv_lib_Xbsd_main=no | |
9274 | fi | |
9275 | rm -f core conftest.err conftest.$ac_objext \ | |
9276 | conftest$ac_exeext conftest.$ac_ext | |
9277 | LIBS=$ac_check_lib_save_LIBS | |
9278 | fi | |
9279 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xbsd_main" >&5 | |
9280 | $as_echo "$ac_cv_lib_Xbsd_main" >&6; } | |
d6974efa | 9281 | if test "x$ac_cv_lib_Xbsd_main" = xyes; then : |
067d23c9 KY |
9282 | LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd" |
9283 | fi | |
9284 | ||
9285 | ||
9286 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cma_open in -lpthreads" >&5 | |
9287 | $as_echo_n "checking for cma_open in -lpthreads... " >&6; } | |
d6974efa | 9288 | if ${ac_cv_lib_pthreads_cma_open+:} false; then : |
067d23c9 KY |
9289 | $as_echo_n "(cached) " >&6 |
9290 | else | |
9291 | ac_check_lib_save_LIBS=$LIBS | |
9292 | LIBS="-lpthreads $LIBS" | |
9293 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9294 | /* end confdefs.h. */ | |
9295 | ||
9296 | /* Override any GCC internal prototype to avoid an error. | |
9297 | Use char because int might match the return type of a GCC | |
9298 | builtin and then its argument prototype would still apply. */ | |
9299 | #ifdef __cplusplus | |
9300 | extern "C" | |
9301 | #endif | |
9302 | char cma_open (); | |
9303 | int | |
9304 | main () | |
9305 | { | |
9306 | return cma_open (); | |
9307 | ; | |
9308 | return 0; | |
9309 | } | |
9310 | _ACEOF | |
9311 | if ac_fn_c_try_link "$LINENO"; then : | |
9312 | ac_cv_lib_pthreads_cma_open=yes | |
9313 | else | |
9314 | ac_cv_lib_pthreads_cma_open=no | |
9315 | fi | |
9316 | rm -f core conftest.err conftest.$ac_objext \ | |
9317 | conftest$ac_exeext conftest.$ac_ext | |
9318 | LIBS=$ac_check_lib_save_LIBS | |
9319 | fi | |
9320 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_cma_open" >&5 | |
9321 | $as_echo "$ac_cv_lib_pthreads_cma_open" >&6; } | |
d6974efa | 9322 | if test "x$ac_cv_lib_pthreads_cma_open" = xyes; then : |
067d23c9 KY |
9323 | cat >>confdefs.h <<_ACEOF |
9324 | #define HAVE_LIBPTHREADS 1 | |
9325 | _ACEOF | |
9326 | ||
9327 | LIBS="-lpthreads $LIBS" | |
9328 | ||
9329 | fi | |
9330 | ||
9331 | ||
9332 | ## Note: when using cpp in s/aix4.2.h, this definition depended on | |
9333 | ## HAVE_LIBPTHREADS. That was not defined earlier in configure when | |
9334 | ## the system file was sourced. Hence the value of LIBS_SYSTEM | |
9335 | ## added to LIBS in configure would never contain the pthreads part, | |
9336 | ## but the value used in Makefiles might. FIXME? | |
9337 | ## | |
9338 | ## -lpthreads seems to be necessary for Xlib in X11R6, and should | |
9339 | ## be harmless on older versions of X where it happens to exist. | |
9340 | test "$opsys" = "aix4-2" && \ | |
9341 | test $ac_cv_lib_pthreads_cma_open = yes && \ | |
9342 | LIBS_SYSTEM="$LIBS_SYSTEM -lpthreads" | |
9343 | ||
9344 | ||
9345 | case ${host_os} in | |
9346 | aix*) | |
9347 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5 | |
9348 | $as_echo_n "checking for -bbigtoc option... " >&6; } | |
d6974efa | 9349 | if ${gdb_cv_bigtoc+:} false; then : |
067d23c9 KY |
9350 | $as_echo_n "(cached) " >&6 |
9351 | else | |
9352 | ||
9353 | case $GCC in | |
9354 | yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;; | |
9355 | *) gdb_cv_bigtoc=-bbigtoc ;; | |
9356 | esac | |
9357 | ||
9358 | LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc | |
9359 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9360 | /* end confdefs.h. */ | |
9361 | ||
9362 | int | |
9363 | main () | |
9364 | { | |
9365 | int i; | |
9366 | ; | |
9367 | return 0; | |
9368 | } | |
9369 | _ACEOF | |
9370 | if ac_fn_c_try_link "$LINENO"; then : | |
9371 | ||
9372 | else | |
9373 | gdb_cv_bigtoc= | |
9374 | fi | |
9375 | rm -f core conftest.err conftest.$ac_objext \ | |
9376 | conftest$ac_exeext conftest.$ac_ext | |
9377 | ||
9378 | fi | |
9379 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5 | |
9380 | $as_echo "$gdb_cv_bigtoc" >&6; } | |
9381 | ;; | |
9382 | esac | |
9383 | ||
9384 | # Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets | |
9385 | # used for the tests that follow. We set them back to REAL_CFLAGS and | |
9386 | # REAL_CPPFLAGS later on. | |
9387 | ||
9388 | REAL_CFLAGS="$CFLAGS" | |
9389 | REAL_CPPFLAGS="$CPPFLAGS" | |
9390 | ||
9391 | if test "${HAVE_X11}" = "yes"; then | |
9392 | DEFS="$C_SWITCH_X_SITE $DEFS" | |
9393 | LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE" | |
9394 | LIBS="-lX11 $LIBS" | |
9395 | CFLAGS="$C_SWITCH_X_SITE $CFLAGS" | |
9396 | CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS" | |
9397 | ||
9398 | # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests. | |
9399 | # This is handled by LD_SWITCH_X_SITE_AUX during the real build, | |
9400 | # but it's more convenient here to set LD_RUN_PATH | |
9401 | # since this also works on hosts that don't understand LD_SWITCH_X_SITE_AUX. | |
9402 | if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then | |
9403 | LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH | |
9404 | export LD_RUN_PATH | |
9405 | fi | |
9406 | ||
9407 | if test "${opsys}" = "gnu-linux"; then | |
9408 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether X on GNU/Linux needs -b to link" >&5 | |
9409 | $as_echo_n "checking whether X on GNU/Linux needs -b to link... " >&6; } | |
9410 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9411 | /* end confdefs.h. */ | |
9412 | ||
9413 | int | |
9414 | main () | |
9415 | { | |
9416 | XOpenDisplay ("foo"); | |
9417 | ; | |
9418 | return 0; | |
9419 | } | |
9420 | _ACEOF | |
9421 | if ac_fn_c_try_link "$LINENO"; then : | |
9422 | xlinux_first_failure=no | |
9423 | else | |
9424 | xlinux_first_failure=yes | |
9425 | fi | |
9426 | rm -f core conftest.err conftest.$ac_objext \ | |
9427 | conftest$ac_exeext conftest.$ac_ext | |
9428 | if test "${xlinux_first_failure}" = "yes"; then | |
9429 | OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE" | |
9430 | OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE" | |
9431 | OLD_CPPFLAGS="$CPPFLAGS" | |
9432 | OLD_LIBS="$LIBS" | |
9433 | LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout" | |
9434 | C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout" | |
9435 | CPPFLAGS="$CPPFLAGS -b i486-linuxaout" | |
9436 | LIBS="$LIBS -b i486-linuxaout" | |
9437 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9438 | /* end confdefs.h. */ | |
9439 | ||
9440 | int | |
9441 | main () | |
9442 | { | |
9443 | XOpenDisplay ("foo"); | |
9444 | ; | |
9445 | return 0; | |
9446 | } | |
9447 | _ACEOF | |
9448 | if ac_fn_c_try_link "$LINENO"; then : | |
9449 | xlinux_second_failure=no | |
9450 | else | |
9451 | xlinux_second_failure=yes | |
9452 | fi | |
9453 | rm -f core conftest.err conftest.$ac_objext \ | |
9454 | conftest$ac_exeext conftest.$ac_ext | |
9455 | if test "${xlinux_second_failure}" = "yes"; then | |
9456 | # If we get the same failure with -b, there is no use adding -b. | |
9457 | # So take it out. This plays safe. | |
9458 | LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE" | |
9459 | C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE" | |
9460 | CPPFLAGS="$OLD_CPPFLAGS" | |
9461 | LIBS="$OLD_LIBS" | |
9462 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
9463 | $as_echo "no" >&6; } | |
9464 | else | |
9465 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
9466 | $as_echo "yes" >&6; } | |
9467 | fi | |
9468 | else | |
9469 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
9470 | $as_echo "no" >&6; } | |
9471 | fi | |
9472 | fi | |
9473 | ||
9474 | # Reportedly, some broken Solaris systems have XKBlib.h but are missing | |
9475 | # header files included from there. | |
9476 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Xkb" >&5 | |
9477 | $as_echo_n "checking for Xkb... " >&6; } | |
9478 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9479 | /* end confdefs.h. */ | |
9480 | #include <X11/Xlib.h> | |
9481 | #include <X11/XKBlib.h> | |
9482 | int | |
9483 | main () | |
9484 | { | |
9485 | XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd); | |
9486 | ; | |
9487 | return 0; | |
9488 | } | |
9489 | _ACEOF | |
9490 | if ac_fn_c_try_link "$LINENO"; then : | |
9491 | emacs_xkb=yes | |
9492 | else | |
9493 | emacs_xkb=no | |
9494 | fi | |
9495 | rm -f core conftest.err conftest.$ac_objext \ | |
9496 | conftest$ac_exeext conftest.$ac_ext | |
9497 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_xkb" >&5 | |
9498 | $as_echo "$emacs_xkb" >&6; } | |
9499 | if test $emacs_xkb = yes; then | |
9500 | ||
9501 | $as_echo "#define HAVE_XKBGETKEYBOARD 1" >>confdefs.h | |
9502 | ||
9503 | fi | |
9504 | ||
9505 | for ac_func in XrmSetDatabase XScreenResourceString \ | |
9506 | XScreenNumberOfScreen XSetWMProtocols | |
9507 | do : | |
9508 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
9509 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
2018939f | 9510 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : |
067d23c9 KY |
9511 | cat >>confdefs.h <<_ACEOF |
9512 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
9513 | _ACEOF | |
9514 | ||
9515 | fi | |
9516 | done | |
9517 | ||
9518 | fi | |
9519 | ||
9520 | if test "${window_system}" = "x11"; then | |
9521 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 version 6" >&5 | |
9522 | $as_echo_n "checking X11 version 6... " >&6; } | |
d6974efa | 9523 | if ${emacs_cv_x11_version_6+:} false; then : |
067d23c9 KY |
9524 | $as_echo_n "(cached) " >&6 |
9525 | else | |
9526 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9527 | /* end confdefs.h. */ | |
9528 | #include <X11/Xlib.h> | |
9529 | int | |
9530 | main () | |
9531 | { | |
9532 | #if XlibSpecificationRelease < 6 | |
9533 | fail; | |
9534 | #endif | |
9535 | ||
9536 | ; | |
9537 | return 0; | |
9538 | } | |
9539 | _ACEOF | |
9540 | if ac_fn_c_try_link "$LINENO"; then : | |
9541 | emacs_cv_x11_version_6=yes | |
9542 | else | |
9543 | emacs_cv_x11_version_6=no | |
9544 | fi | |
9545 | rm -f core conftest.err conftest.$ac_objext \ | |
9546 | conftest$ac_exeext conftest.$ac_ext | |
9547 | fi | |
9548 | ||
9549 | if test $emacs_cv_x11_version_6 = yes; then | |
9550 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5 | |
9551 | $as_echo "6 or newer" >&6; } | |
9552 | ||
9553 | $as_echo "#define HAVE_X11R6 1" >>confdefs.h | |
9554 | ||
9555 | ||
9556 | $as_echo "#define HAVE_X_I18N 1" >>confdefs.h | |
9557 | ||
9558 | ## inoue@ainet.or.jp says Solaris has a bug related to X11R6-style | |
9559 | ## XIM support. | |
9560 | case "$opsys" in | |
9561 | sol2-*) : ;; | |
9562 | *) | |
9563 | $as_echo "#define HAVE_X11R6_XIM 1" >>confdefs.h | |
9564 | ||
9565 | ;; | |
9566 | esac | |
9567 | else | |
9568 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5 | |
9569 | $as_echo "before 6" >&6; } | |
9570 | fi | |
9571 | fi | |
9572 | ||
9573 | ||
9574 | ### Use -lrsvg-2 if available, unless `--with-rsvg=no' is specified. | |
9575 | HAVE_RSVG=no | |
9576 | if test "${HAVE_X11}" = "yes" || test "${NS_IMPL_GNUSTEP}" = "yes"; then | |
9577 | if test "${with_rsvg}" != "no"; then | |
9578 | RSVG_REQUIRED=2.11.0 | |
9579 | RSVG_MODULE="librsvg-2.0 >= $RSVG_REQUIRED" | |
9580 | ||
9581 | ||
9582 | succeeded=no | |
9583 | ||
9584 | # Extract the first word of "pkg-config", so it can be a program name with args. | |
9585 | set dummy pkg-config; ac_word=$2 | |
9586 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
9587 | $as_echo_n "checking for $ac_word... " >&6; } | |
d6974efa | 9588 | if ${ac_cv_path_PKG_CONFIG+:} false; then : |
067d23c9 KY |
9589 | $as_echo_n "(cached) " >&6 |
9590 | else | |
9591 | case $PKG_CONFIG in | |
9592 | [\\/]* | ?:[\\/]*) | |
9593 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
9594 | ;; | |
9595 | *) | |
9596 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
9597 | for as_dir in $PATH | |
9598 | do | |
9599 | IFS=$as_save_IFS | |
9600 | test -z "$as_dir" && as_dir=. | |
9601 | for ac_exec_ext in '' $ac_executable_extensions; do | |
9602 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
9603 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
9604 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
9605 | break 2 | |
9606 | fi | |
9607 | done | |
9608 | done | |
9609 | IFS=$as_save_IFS | |
9610 | ||
9611 | test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" | |
9612 | ;; | |
9613 | esac | |
9614 | fi | |
9615 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG | |
9616 | if test -n "$PKG_CONFIG"; then | |
9617 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
9618 | $as_echo "$PKG_CONFIG" >&6; } | |
9619 | else | |
9620 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
9621 | $as_echo "no" >&6; } | |
9622 | fi | |
9623 | ||
9624 | ||
9625 | ||
9626 | if test "$PKG_CONFIG" = "no" ; then | |
9627 | : | |
9628 | else | |
9629 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
9630 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
9631 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $RSVG_MODULE" >&5 | |
9632 | $as_echo_n "checking for $RSVG_MODULE... " >&6; } | |
9633 | ||
9634 | if $PKG_CONFIG --exists "$RSVG_MODULE" 2>&5; then | |
9635 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
9636 | $as_echo "yes" >&6; } | |
9637 | succeeded=yes | |
9638 | ||
9639 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking RSVG_CFLAGS" >&5 | |
9640 | $as_echo_n "checking RSVG_CFLAGS... " >&6; } | |
9641 | RSVG_CFLAGS=`$PKG_CONFIG --cflags "$RSVG_MODULE"|sed -e 's,///*,/,g'` | |
9642 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RSVG_CFLAGS" >&5 | |
9643 | $as_echo "$RSVG_CFLAGS" >&6; } | |
9644 | ||
9645 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking RSVG_LIBS" >&5 | |
9646 | $as_echo_n "checking RSVG_LIBS... " >&6; } | |
9647 | RSVG_LIBS=`$PKG_CONFIG --libs "$RSVG_MODULE"|sed -e 's,///*,/,g'` | |
9648 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RSVG_LIBS" >&5 | |
9649 | $as_echo "$RSVG_LIBS" >&6; } | |
9650 | else | |
9651 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
9652 | $as_echo "no" >&6; } | |
9653 | RSVG_CFLAGS="" | |
9654 | RSVG_LIBS="" | |
9655 | ## If we have a custom action on failure, don't print errors, but | |
9656 | ## do set a variable so people can do so. | |
9657 | RSVG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$RSVG_MODULE"` | |
9658 | ||
9659 | fi | |
9660 | ||
9661 | ||
9662 | ||
9663 | else | |
9664 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
9665 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
9666 | fi | |
9667 | fi | |
9668 | ||
9669 | if test $succeeded = yes; then | |
9670 | HAVE_RSVG=yes | |
9671 | else | |
9672 | : | |
9673 | fi | |
9674 | ||
9675 | ||
9676 | ||
9677 | ||
9678 | if test $HAVE_RSVG = yes; then | |
9679 | ||
9680 | $as_echo "#define HAVE_RSVG 1" >>confdefs.h | |
9681 | ||
9682 | CFLAGS="$CFLAGS $RSVG_CFLAGS" | |
9683 | LIBS="$RSVG_LIBS $LIBS" | |
9684 | fi | |
9685 | fi | |
9686 | fi | |
9687 | ||
9688 | HAVE_IMAGEMAGICK=no | |
9689 | if test "${HAVE_X11}" = "yes"; then | |
9690 | if test "${with_imagemagick}" != "no"; then | |
9691 | IMAGEMAGICK_MODULE="Wand" | |
9692 | ||
9693 | succeeded=no | |
9694 | ||
9695 | # Extract the first word of "pkg-config", so it can be a program name with args. | |
9696 | set dummy pkg-config; ac_word=$2 | |
9697 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
9698 | $as_echo_n "checking for $ac_word... " >&6; } | |
d6974efa | 9699 | if ${ac_cv_path_PKG_CONFIG+:} false; then : |
067d23c9 KY |
9700 | $as_echo_n "(cached) " >&6 |
9701 | else | |
9702 | case $PKG_CONFIG in | |
9703 | [\\/]* | ?:[\\/]*) | |
9704 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
9705 | ;; | |
9706 | *) | |
9707 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
9708 | for as_dir in $PATH | |
9709 | do | |
9710 | IFS=$as_save_IFS | |
9711 | test -z "$as_dir" && as_dir=. | |
9712 | for ac_exec_ext in '' $ac_executable_extensions; do | |
9713 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
9714 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
9715 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
9716 | break 2 | |
9717 | fi | |
9718 | done | |
9719 | done | |
9720 | IFS=$as_save_IFS | |
9721 | ||
9722 | test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" | |
9723 | ;; | |
9724 | esac | |
9725 | fi | |
9726 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG | |
9727 | if test -n "$PKG_CONFIG"; then | |
9728 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
9729 | $as_echo "$PKG_CONFIG" >&6; } | |
9730 | else | |
9731 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
9732 | $as_echo "no" >&6; } | |
9733 | fi | |
9734 | ||
9735 | ||
9736 | ||
9737 | if test "$PKG_CONFIG" = "no" ; then | |
9738 | : | |
9739 | else | |
9740 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
9741 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
9742 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $IMAGEMAGICK_MODULE" >&5 | |
9743 | $as_echo_n "checking for $IMAGEMAGICK_MODULE... " >&6; } | |
9744 | ||
9745 | if $PKG_CONFIG --exists "$IMAGEMAGICK_MODULE" 2>&5; then | |
9746 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
9747 | $as_echo "yes" >&6; } | |
9748 | succeeded=yes | |
9749 | ||
9750 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking IMAGEMAGICK_CFLAGS" >&5 | |
9751 | $as_echo_n "checking IMAGEMAGICK_CFLAGS... " >&6; } | |
9752 | IMAGEMAGICK_CFLAGS=`$PKG_CONFIG --cflags "$IMAGEMAGICK_MODULE"|sed -e 's,///*,/,g'` | |
9753 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $IMAGEMAGICK_CFLAGS" >&5 | |
9754 | $as_echo "$IMAGEMAGICK_CFLAGS" >&6; } | |
9755 | ||
9756 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking IMAGEMAGICK_LIBS" >&5 | |
9757 | $as_echo_n "checking IMAGEMAGICK_LIBS... " >&6; } | |
9758 | IMAGEMAGICK_LIBS=`$PKG_CONFIG --libs "$IMAGEMAGICK_MODULE"|sed -e 's,///*,/,g'` | |
9759 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $IMAGEMAGICK_LIBS" >&5 | |
9760 | $as_echo "$IMAGEMAGICK_LIBS" >&6; } | |
9761 | else | |
9762 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
9763 | $as_echo "no" >&6; } | |
9764 | IMAGEMAGICK_CFLAGS="" | |
9765 | IMAGEMAGICK_LIBS="" | |
9766 | ## If we have a custom action on failure, don't print errors, but | |
9767 | ## do set a variable so people can do so. | |
9768 | IMAGEMAGICK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$IMAGEMAGICK_MODULE"` | |
9769 | ||
9770 | fi | |
9771 | ||
9772 | ||
9773 | ||
9774 | else | |
9775 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
9776 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
9777 | fi | |
9778 | fi | |
9779 | ||
9780 | if test $succeeded = yes; then | |
9781 | HAVE_IMAGEMAGICK=yes | |
9782 | else | |
9783 | : | |
9784 | fi | |
9785 | ||
9786 | ||
9787 | ||
9788 | ||
9789 | if test $HAVE_IMAGEMAGICK = yes; then | |
9790 | ||
9791 | $as_echo "#define HAVE_IMAGEMAGICK 1" >>confdefs.h | |
9792 | ||
9793 | CFLAGS="$CFLAGS $IMAGEMAGICK_CFLAGS" | |
9794 | LIBS="$IMAGEMAGICK_LIBS $LIBS" | |
9795 | for ac_func in MagickExportImagePixels | |
9796 | do : | |
9797 | ac_fn_c_check_func "$LINENO" "MagickExportImagePixels" "ac_cv_func_MagickExportImagePixels" | |
d6974efa | 9798 | if test "x$ac_cv_func_MagickExportImagePixels" = xyes; then : |
067d23c9 KY |
9799 | cat >>confdefs.h <<_ACEOF |
9800 | #define HAVE_MAGICKEXPORTIMAGEPIXELS 1 | |
9801 | _ACEOF | |
9802 | ||
9803 | fi | |
9804 | done | |
9805 | ||
9806 | fi | |
9807 | fi | |
9808 | fi | |
9809 | ||
9810 | ||
9811 | HAVE_GTK=no | |
9812 | if test "${with_gtk3}" = "yes"; then | |
9813 | GLIB_REQUIRED=2.6 | |
9814 | GTK_REQUIRED=2.90 | |
9815 | GTK_MODULES="gtk+-3.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED" | |
9816 | ||
9817 | ||
9818 | succeeded=no | |
9819 | ||
9820 | # Extract the first word of "pkg-config", so it can be a program name with args. | |
9821 | set dummy pkg-config; ac_word=$2 | |
9822 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
9823 | $as_echo_n "checking for $ac_word... " >&6; } | |
d6974efa | 9824 | if ${ac_cv_path_PKG_CONFIG+:} false; then : |
067d23c9 KY |
9825 | $as_echo_n "(cached) " >&6 |
9826 | else | |
9827 | case $PKG_CONFIG in | |
9828 | [\\/]* | ?:[\\/]*) | |
9829 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
9830 | ;; | |
9831 | *) | |
9832 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
9833 | for as_dir in $PATH | |
9834 | do | |
9835 | IFS=$as_save_IFS | |
9836 | test -z "$as_dir" && as_dir=. | |
9837 | for ac_exec_ext in '' $ac_executable_extensions; do | |
9838 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
9839 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
9840 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
9841 | break 2 | |
9842 | fi | |
9843 | done | |
9844 | done | |
9845 | IFS=$as_save_IFS | |
9846 | ||
9847 | test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" | |
9848 | ;; | |
9849 | esac | |
9850 | fi | |
9851 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG | |
9852 | if test -n "$PKG_CONFIG"; then | |
9853 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
9854 | $as_echo "$PKG_CONFIG" >&6; } | |
9855 | else | |
9856 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
9857 | $as_echo "no" >&6; } | |
9858 | fi | |
9859 | ||
9860 | ||
9861 | ||
9862 | if test "$PKG_CONFIG" = "no" ; then | |
9863 | pkg_check_gtk=no | |
9864 | else | |
9865 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
9866 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
9867 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTK_MODULES" >&5 | |
9868 | $as_echo_n "checking for $GTK_MODULES... " >&6; } | |
9869 | ||
9870 | if $PKG_CONFIG --exists "$GTK_MODULES" 2>&5; then | |
9871 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
9872 | $as_echo "yes" >&6; } | |
9873 | succeeded=yes | |
9874 | ||
9875 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking GTK_CFLAGS" >&5 | |
9876 | $as_echo_n "checking GTK_CFLAGS... " >&6; } | |
9877 | GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES"|sed -e 's,///*,/,g'` | |
9878 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_CFLAGS" >&5 | |
9879 | $as_echo "$GTK_CFLAGS" >&6; } | |
9880 | ||
9881 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking GTK_LIBS" >&5 | |
9882 | $as_echo_n "checking GTK_LIBS... " >&6; } | |
9883 | GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES"|sed -e 's,///*,/,g'` | |
9884 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_LIBS" >&5 | |
9885 | $as_echo "$GTK_LIBS" >&6; } | |
9886 | else | |
9887 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
9888 | $as_echo "no" >&6; } | |
9889 | GTK_CFLAGS="" | |
9890 | GTK_LIBS="" | |
9891 | ## If we have a custom action on failure, don't print errors, but | |
9892 | ## do set a variable so people can do so. | |
9893 | GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"` | |
9894 | ||
9895 | fi | |
9896 | ||
9897 | ||
9898 | ||
9899 | else | |
9900 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
9901 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
9902 | fi | |
9903 | fi | |
9904 | ||
9905 | if test $succeeded = yes; then | |
9906 | pkg_check_gtk=yes | |
9907 | else | |
9908 | pkg_check_gtk=no | |
9909 | fi | |
9910 | ||
9911 | if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then | |
2018939f | 9912 | as_fn_error $? "$GTK_PKG_ERRORS" "$LINENO" 5 |
067d23c9 KY |
9913 | fi |
9914 | fi | |
9915 | ||
9916 | if test "$pkg_check_gtk" != "yes"; then | |
9917 | HAVE_GTK=no | |
9918 | if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "maybe"; then | |
9919 | GLIB_REQUIRED=2.6 | |
9920 | GTK_REQUIRED=2.6 | |
9921 | GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED" | |
9922 | ||
9923 | ||
9924 | succeeded=no | |
9925 | ||
9926 | # Extract the first word of "pkg-config", so it can be a program name with args. | |
9927 | set dummy pkg-config; ac_word=$2 | |
9928 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
9929 | $as_echo_n "checking for $ac_word... " >&6; } | |
d6974efa | 9930 | if ${ac_cv_path_PKG_CONFIG+:} false; then : |
067d23c9 KY |
9931 | $as_echo_n "(cached) " >&6 |
9932 | else | |
9933 | case $PKG_CONFIG in | |
9934 | [\\/]* | ?:[\\/]*) | |
9935 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
9936 | ;; | |
9937 | *) | |
9938 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
9939 | for as_dir in $PATH | |
9940 | do | |
9941 | IFS=$as_save_IFS | |
9942 | test -z "$as_dir" && as_dir=. | |
9943 | for ac_exec_ext in '' $ac_executable_extensions; do | |
9944 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
9945 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
9946 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
9947 | break 2 | |
9948 | fi | |
9949 | done | |
9950 | done | |
9951 | IFS=$as_save_IFS | |
9952 | ||
9953 | test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" | |
9954 | ;; | |
9955 | esac | |
9956 | fi | |
9957 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG | |
9958 | if test -n "$PKG_CONFIG"; then | |
9959 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
9960 | $as_echo "$PKG_CONFIG" >&6; } | |
9961 | else | |
9962 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
9963 | $as_echo "no" >&6; } | |
9964 | fi | |
9965 | ||
9966 | ||
9967 | ||
9968 | if test "$PKG_CONFIG" = "no" ; then | |
9969 | pkg_check_gtk=no | |
9970 | else | |
9971 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
9972 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
9973 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTK_MODULES" >&5 | |
9974 | $as_echo_n "checking for $GTK_MODULES... " >&6; } | |
9975 | ||
9976 | if $PKG_CONFIG --exists "$GTK_MODULES" 2>&5; then | |
9977 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
9978 | $as_echo "yes" >&6; } | |
9979 | succeeded=yes | |
9980 | ||
9981 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking GTK_CFLAGS" >&5 | |
9982 | $as_echo_n "checking GTK_CFLAGS... " >&6; } | |
9983 | GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES"|sed -e 's,///*,/,g'` | |
9984 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_CFLAGS" >&5 | |
9985 | $as_echo "$GTK_CFLAGS" >&6; } | |
9986 | ||
9987 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking GTK_LIBS" >&5 | |
9988 | $as_echo_n "checking GTK_LIBS... " >&6; } | |
9989 | GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES"|sed -e 's,///*,/,g'` | |
9990 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_LIBS" >&5 | |
9991 | $as_echo "$GTK_LIBS" >&6; } | |
9992 | else | |
9993 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
9994 | $as_echo "no" >&6; } | |
9995 | GTK_CFLAGS="" | |
9996 | GTK_LIBS="" | |
9997 | ## If we have a custom action on failure, don't print errors, but | |
9998 | ## do set a variable so people can do so. | |
9999 | GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"` | |
10000 | ||
10001 | fi | |
10002 | ||
10003 | ||
10004 | ||
10005 | else | |
10006 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
10007 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
10008 | fi | |
10009 | fi | |
10010 | ||
10011 | if test $succeeded = yes; then | |
10012 | pkg_check_gtk=yes | |
10013 | else | |
10014 | pkg_check_gtk=no | |
10015 | fi | |
10016 | ||
10017 | if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then | |
2018939f | 10018 | as_fn_error $? "$GTK_PKG_ERRORS" "$LINENO" 5 |
067d23c9 KY |
10019 | fi |
10020 | fi | |
10021 | fi | |
10022 | ||
10023 | GTK_OBJ= | |
10024 | if test x"$pkg_check_gtk" = xyes; then | |
10025 | ||
10026 | ||
10027 | ||
10028 | C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS" | |
10029 | CFLAGS="$CFLAGS $GTK_CFLAGS" | |
10030 | LIBS="$GTK_LIBS $LIBS" | |
10031 | GTK_COMPILES=no | |
10032 | for ac_func in gtk_main | |
10033 | do : | |
10034 | ac_fn_c_check_func "$LINENO" "gtk_main" "ac_cv_func_gtk_main" | |
d6974efa | 10035 | if test "x$ac_cv_func_gtk_main" = xyes; then : |
067d23c9 KY |
10036 | cat >>confdefs.h <<_ACEOF |
10037 | #define HAVE_GTK_MAIN 1 | |
10038 | _ACEOF | |
10039 | GTK_COMPILES=yes | |
10040 | fi | |
10041 | done | |
10042 | ||
10043 | if test "${GTK_COMPILES}" != "yes"; then | |
10044 | if test "$USE_X_TOOLKIT" != "maybe"; then | |
d6974efa | 10045 | as_fn_error $? "Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" "$LINENO" 5; |
067d23c9 KY |
10046 | fi |
10047 | else | |
10048 | HAVE_GTK=yes | |
10049 | ||
10050 | $as_echo "#define USE_GTK 1" >>confdefs.h | |
10051 | ||
10052 | GTK_OBJ=gtkutil.o | |
10053 | USE_X_TOOLKIT=none | |
10054 | if $PKG_CONFIG --atleast-version=2.10 gtk+-2.0; then | |
10055 | : | |
10056 | else | |
10057 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your version of Gtk+ will have problems with | |
10058 | closing open displays. This is no problem if you just use | |
10059 | one display, but if you use more than one and close one of them | |
10060 | Emacs may crash." >&5 | |
10061 | $as_echo "$as_me: WARNING: Your version of Gtk+ will have problems with | |
10062 | closing open displays. This is no problem if you just use | |
10063 | one display, but if you use more than one and close one of them | |
10064 | Emacs may crash." >&2;} | |
10065 | sleep 3 | |
10066 | fi | |
10067 | fi | |
10068 | ||
10069 | fi | |
10070 | ||
10071 | ||
10072 | ||
10073 | if test "${HAVE_GTK}" = "yes"; then | |
10074 | ||
10075 | if test "$with_toolkit_scroll_bars" != no; then | |
10076 | with_toolkit_scroll_bars=yes | |
10077 | fi | |
10078 | ||
10079 | HAVE_GTK_FILE_SELECTION=no | |
10080 | ac_fn_c_check_decl "$LINENO" "GTK_TYPE_FILE_SELECTION" "ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" "$ac_includes_default | |
10081 | #include <gtk/gtk.h> | |
10082 | " | |
d6974efa | 10083 | if test "x$ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" = xyes; then : |
067d23c9 KY |
10084 | HAVE_GTK_FILE_SELECTION=yes |
10085 | else | |
10086 | HAVE_GTK_FILE_SELECTION=no | |
10087 | fi | |
10088 | ||
10089 | if test "$HAVE_GTK_FILE_SELECTION" = yes; then | |
10090 | for ac_func in gtk_file_selection_new | |
10091 | do : | |
10092 | ac_fn_c_check_func "$LINENO" "gtk_file_selection_new" "ac_cv_func_gtk_file_selection_new" | |
d6974efa | 10093 | if test "x$ac_cv_func_gtk_file_selection_new" = xyes; then : |
067d23c9 KY |
10094 | cat >>confdefs.h <<_ACEOF |
10095 | #define HAVE_GTK_FILE_SELECTION_NEW 1 | |
10096 | _ACEOF | |
10097 | ||
10098 | fi | |
10099 | done | |
10100 | ||
10101 | fi | |
10102 | ||
10103 | HAVE_GTK_AND_PTHREAD=no | |
10104 | for ac_header in pthread.h | |
10105 | do : | |
10106 | ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default" | |
d6974efa | 10107 | if test "x$ac_cv_header_pthread_h" = xyes; then : |
067d23c9 KY |
10108 | cat >>confdefs.h <<_ACEOF |
10109 | #define HAVE_PTHREAD_H 1 | |
10110 | _ACEOF | |
10111 | ||
10112 | fi | |
10113 | ||
10114 | done | |
10115 | ||
10116 | if test "$ac_cv_header_pthread_h"; then | |
10117 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_self in -lpthread" >&5 | |
10118 | $as_echo_n "checking for pthread_self in -lpthread... " >&6; } | |
d6974efa | 10119 | if ${ac_cv_lib_pthread_pthread_self+:} false; then : |
067d23c9 KY |
10120 | $as_echo_n "(cached) " >&6 |
10121 | else | |
10122 | ac_check_lib_save_LIBS=$LIBS | |
10123 | LIBS="-lpthread $LIBS" | |
10124 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10125 | /* end confdefs.h. */ | |
10126 | ||
10127 | /* Override any GCC internal prototype to avoid an error. | |
10128 | Use char because int might match the return type of a GCC | |
10129 | builtin and then its argument prototype would still apply. */ | |
10130 | #ifdef __cplusplus | |
10131 | extern "C" | |
10132 | #endif | |
10133 | char pthread_self (); | |
10134 | int | |
10135 | main () | |
10136 | { | |
10137 | return pthread_self (); | |
10138 | ; | |
10139 | return 0; | |
10140 | } | |
10141 | _ACEOF | |
10142 | if ac_fn_c_try_link "$LINENO"; then : | |
10143 | ac_cv_lib_pthread_pthread_self=yes | |
10144 | else | |
10145 | ac_cv_lib_pthread_pthread_self=no | |
10146 | fi | |
10147 | rm -f core conftest.err conftest.$ac_objext \ | |
10148 | conftest$ac_exeext conftest.$ac_ext | |
10149 | LIBS=$ac_check_lib_save_LIBS | |
10150 | fi | |
10151 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_self" >&5 | |
10152 | $as_echo "$ac_cv_lib_pthread_pthread_self" >&6; } | |
d6974efa | 10153 | if test "x$ac_cv_lib_pthread_pthread_self" = xyes; then : |
067d23c9 KY |
10154 | HAVE_GTK_AND_PTHREAD=yes |
10155 | fi | |
10156 | ||
10157 | fi | |
10158 | if test "$HAVE_GTK_AND_PTHREAD" = yes; then | |
10159 | case "${canonical}" in | |
10160 | *-hpux*) ;; | |
10161 | *) GTK_LIBS="$GTK_LIBS -lpthread" ;; | |
10162 | esac | |
10163 | ||
10164 | $as_echo "#define HAVE_GTK_AND_PTHREAD 1" >>confdefs.h | |
10165 | ||
10166 | fi | |
10167 | ||
10168 | for ac_func in gtk_widget_get_window gtk_widget_set_has_window \ | |
10169 | gtk_dialog_get_action_area gtk_widget_get_sensitive \ | |
10170 | gtk_widget_get_mapped gtk_adjustment_get_page_size \ | |
10171 | gtk_orientable_set_orientation | |
10172 | do : | |
10173 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
10174 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
2018939f | 10175 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : |
067d23c9 KY |
10176 | cat >>confdefs.h <<_ACEOF |
10177 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
10178 | _ACEOF | |
10179 | ||
10180 | fi | |
10181 | done | |
10182 | ||
10183 | ||
10184 | fi | |
10185 | ||
10186 | HAVE_DBUS=no | |
10187 | DBUS_OBJ= | |
10188 | if test "${with_dbus}" = "yes"; then | |
10189 | ||
10190 | succeeded=no | |
10191 | ||
10192 | # Extract the first word of "pkg-config", so it can be a program name with args. | |
10193 | set dummy pkg-config; ac_word=$2 | |
10194 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
10195 | $as_echo_n "checking for $ac_word... " >&6; } | |
d6974efa | 10196 | if ${ac_cv_path_PKG_CONFIG+:} false; then : |
067d23c9 KY |
10197 | $as_echo_n "(cached) " >&6 |
10198 | else | |
10199 | case $PKG_CONFIG in | |
10200 | [\\/]* | ?:[\\/]*) | |
10201 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
10202 | ;; | |
10203 | *) | |
10204 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
10205 | for as_dir in $PATH | |
10206 | do | |
10207 | IFS=$as_save_IFS | |
10208 | test -z "$as_dir" && as_dir=. | |
10209 | for ac_exec_ext in '' $ac_executable_extensions; do | |
10210 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
10211 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
10212 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
10213 | break 2 | |
10214 | fi | |
10215 | done | |
10216 | done | |
10217 | IFS=$as_save_IFS | |
10218 | ||
10219 | test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" | |
10220 | ;; | |
10221 | esac | |
10222 | fi | |
10223 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG | |
10224 | if test -n "$PKG_CONFIG"; then | |
10225 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
10226 | $as_echo "$PKG_CONFIG" >&6; } | |
10227 | else | |
10228 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
10229 | $as_echo "no" >&6; } | |
10230 | fi | |
10231 | ||
10232 | ||
10233 | ||
10234 | if test "$PKG_CONFIG" = "no" ; then | |
10235 | HAVE_DBUS=no | |
10236 | else | |
10237 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
10238 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
10239 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbus-1 >= 1.0" >&5 | |
10240 | $as_echo_n "checking for dbus-1 >= 1.0... " >&6; } | |
10241 | ||
10242 | if $PKG_CONFIG --exists "dbus-1 >= 1.0" 2>&5; then | |
10243 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
10244 | $as_echo "yes" >&6; } | |
10245 | succeeded=yes | |
10246 | ||
10247 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking DBUS_CFLAGS" >&5 | |
10248 | $as_echo_n "checking DBUS_CFLAGS... " >&6; } | |
10249 | DBUS_CFLAGS=`$PKG_CONFIG --cflags "dbus-1 >= 1.0"|sed -e 's,///*,/,g'` | |
10250 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBUS_CFLAGS" >&5 | |
10251 | $as_echo "$DBUS_CFLAGS" >&6; } | |
10252 | ||
10253 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking DBUS_LIBS" >&5 | |
10254 | $as_echo_n "checking DBUS_LIBS... " >&6; } | |
10255 | DBUS_LIBS=`$PKG_CONFIG --libs "dbus-1 >= 1.0"|sed -e 's,///*,/,g'` | |
10256 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBUS_LIBS" >&5 | |
10257 | $as_echo "$DBUS_LIBS" >&6; } | |
10258 | else | |
10259 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
10260 | $as_echo "no" >&6; } | |
10261 | DBUS_CFLAGS="" | |
10262 | DBUS_LIBS="" | |
10263 | ## If we have a custom action on failure, don't print errors, but | |
10264 | ## do set a variable so people can do so. | |
10265 | DBUS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "dbus-1 >= 1.0"` | |
10266 | ||
10267 | fi | |
10268 | ||
10269 | ||
10270 | ||
10271 | else | |
10272 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
10273 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
10274 | fi | |
10275 | fi | |
10276 | ||
10277 | if test $succeeded = yes; then | |
10278 | HAVE_DBUS=yes | |
10279 | else | |
10280 | HAVE_DBUS=no | |
10281 | fi | |
10282 | ||
10283 | if test "$HAVE_DBUS" = yes; then | |
10284 | LIBS="$LIBS $DBUS_LIBS" | |
10285 | ||
10286 | $as_echo "#define HAVE_DBUS 1" >>confdefs.h | |
10287 | ||
10288 | for ac_func in dbus_watch_get_unix_fd | |
10289 | do : | |
10290 | ac_fn_c_check_func "$LINENO" "dbus_watch_get_unix_fd" "ac_cv_func_dbus_watch_get_unix_fd" | |
d6974efa | 10291 | if test "x$ac_cv_func_dbus_watch_get_unix_fd" = xyes; then : |
067d23c9 KY |
10292 | cat >>confdefs.h <<_ACEOF |
10293 | #define HAVE_DBUS_WATCH_GET_UNIX_FD 1 | |
10294 | _ACEOF | |
10295 | ||
10296 | fi | |
10297 | done | |
10298 | ||
10299 | DBUS_OBJ=dbusbind.o | |
10300 | fi | |
10301 | fi | |
10302 | ||
10303 | ||
10304 | HAVE_GCONF=no | |
10305 | if test "${HAVE_X11}" = "yes" && test "${with_gconf}" = "yes"; then | |
10306 | ||
10307 | succeeded=no | |
10308 | ||
10309 | # Extract the first word of "pkg-config", so it can be a program name with args. | |
10310 | set dummy pkg-config; ac_word=$2 | |
10311 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
10312 | $as_echo_n "checking for $ac_word... " >&6; } | |
d6974efa | 10313 | if ${ac_cv_path_PKG_CONFIG+:} false; then : |
067d23c9 KY |
10314 | $as_echo_n "(cached) " >&6 |
10315 | else | |
10316 | case $PKG_CONFIG in | |
10317 | [\\/]* | ?:[\\/]*) | |
10318 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
10319 | ;; | |
10320 | *) | |
10321 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
10322 | for as_dir in $PATH | |
10323 | do | |
10324 | IFS=$as_save_IFS | |
10325 | test -z "$as_dir" && as_dir=. | |
10326 | for ac_exec_ext in '' $ac_executable_extensions; do | |
10327 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
10328 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
10329 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
10330 | break 2 | |
10331 | fi | |
10332 | done | |
10333 | done | |
10334 | IFS=$as_save_IFS | |
10335 | ||
10336 | test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" | |
10337 | ;; | |
10338 | esac | |
10339 | fi | |
10340 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG | |
10341 | if test -n "$PKG_CONFIG"; then | |
10342 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
10343 | $as_echo "$PKG_CONFIG" >&6; } | |
10344 | else | |
10345 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
10346 | $as_echo "no" >&6; } | |
10347 | fi | |
10348 | ||
10349 | ||
10350 | ||
10351 | if test "$PKG_CONFIG" = "no" ; then | |
10352 | HAVE_GCONF=no | |
10353 | else | |
10354 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
10355 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
10356 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gconf-2.0 >= 2.13" >&5 | |
10357 | $as_echo_n "checking for gconf-2.0 >= 2.13... " >&6; } | |
10358 | ||
10359 | if $PKG_CONFIG --exists "gconf-2.0 >= 2.13" 2>&5; then | |
10360 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
10361 | $as_echo "yes" >&6; } | |
10362 | succeeded=yes | |
10363 | ||
10364 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking GCONF_CFLAGS" >&5 | |
10365 | $as_echo_n "checking GCONF_CFLAGS... " >&6; } | |
10366 | GCONF_CFLAGS=`$PKG_CONFIG --cflags "gconf-2.0 >= 2.13"|sed -e 's,///*,/,g'` | |
10367 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCONF_CFLAGS" >&5 | |
10368 | $as_echo "$GCONF_CFLAGS" >&6; } | |
10369 | ||
10370 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking GCONF_LIBS" >&5 | |
10371 | $as_echo_n "checking GCONF_LIBS... " >&6; } | |
10372 | GCONF_LIBS=`$PKG_CONFIG --libs "gconf-2.0 >= 2.13"|sed -e 's,///*,/,g'` | |
10373 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCONF_LIBS" >&5 | |
10374 | $as_echo "$GCONF_LIBS" >&6; } | |
10375 | else | |
10376 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
10377 | $as_echo "no" >&6; } | |
10378 | GCONF_CFLAGS="" | |
10379 | GCONF_LIBS="" | |
10380 | ## If we have a custom action on failure, don't print errors, but | |
10381 | ## do set a variable so people can do so. | |
10382 | GCONF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gconf-2.0 >= 2.13"` | |
10383 | ||
10384 | fi | |
10385 | ||
10386 | ||
10387 | ||
10388 | else | |
10389 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
10390 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
10391 | fi | |
10392 | fi | |
10393 | ||
10394 | if test $succeeded = yes; then | |
10395 | HAVE_GCONF=yes | |
10396 | else | |
10397 | HAVE_GCONF=no | |
10398 | fi | |
10399 | ||
10400 | if test "$HAVE_GCONF" = yes; then | |
10401 | ||
10402 | $as_echo "#define HAVE_GCONF 1" >>confdefs.h | |
10403 | ||
10404 | for ac_func in g_type_init | |
10405 | do : | |
10406 | ac_fn_c_check_func "$LINENO" "g_type_init" "ac_cv_func_g_type_init" | |
d6974efa | 10407 | if test "x$ac_cv_func_g_type_init" = xyes; then : |
067d23c9 KY |
10408 | cat >>confdefs.h <<_ACEOF |
10409 | #define HAVE_G_TYPE_INIT 1 | |
10410 | _ACEOF | |
10411 | ||
10412 | fi | |
10413 | done | |
10414 | ||
10415 | fi | |
10416 | fi | |
10417 | ||
10418 | HAVE_LIBSELINUX=no | |
10419 | LIBSELINUX_LIBS= | |
10420 | if test "${with_selinux}" = "yes"; then | |
10421 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lgetfilecon in -lselinux" >&5 | |
10422 | $as_echo_n "checking for lgetfilecon in -lselinux... " >&6; } | |
d6974efa | 10423 | if ${ac_cv_lib_selinux_lgetfilecon+:} false; then : |
067d23c9 KY |
10424 | $as_echo_n "(cached) " >&6 |
10425 | else | |
10426 | ac_check_lib_save_LIBS=$LIBS | |
10427 | LIBS="-lselinux $LIBS" | |
10428 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10429 | /* end confdefs.h. */ | |
10430 | ||
10431 | /* Override any GCC internal prototype to avoid an error. | |
10432 | Use char because int might match the return type of a GCC | |
10433 | builtin and then its argument prototype would still apply. */ | |
10434 | #ifdef __cplusplus | |
10435 | extern "C" | |
10436 | #endif | |
10437 | char lgetfilecon (); | |
10438 | int | |
10439 | main () | |
10440 | { | |
10441 | return lgetfilecon (); | |
10442 | ; | |
10443 | return 0; | |
10444 | } | |
10445 | _ACEOF | |
10446 | if ac_fn_c_try_link "$LINENO"; then : | |
10447 | ac_cv_lib_selinux_lgetfilecon=yes | |
10448 | else | |
10449 | ac_cv_lib_selinux_lgetfilecon=no | |
10450 | fi | |
10451 | rm -f core conftest.err conftest.$ac_objext \ | |
10452 | conftest$ac_exeext conftest.$ac_ext | |
10453 | LIBS=$ac_check_lib_save_LIBS | |
10454 | fi | |
10455 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_lgetfilecon" >&5 | |
10456 | $as_echo "$ac_cv_lib_selinux_lgetfilecon" >&6; } | |
d6974efa | 10457 | if test "x$ac_cv_lib_selinux_lgetfilecon" = xyes; then : |
067d23c9 KY |
10458 | HAVE_LIBSELINUX=yes |
10459 | else | |
10460 | HAVE_LIBSELINUX=no | |
10461 | fi | |
10462 | ||
10463 | if test "$HAVE_LIBSELINUX" = yes; then | |
10464 | ||
10465 | $as_echo "#define HAVE_LIBSELINUX 1" >>confdefs.h | |
10466 | ||
10467 | LIBSELINUX_LIBS=-lselinux | |
10468 | fi | |
10469 | fi | |
10470 | ||
10471 | ||
10472 | HAVE_GNUTLS=no | |
10473 | if test "${with_gnutls}" = "yes" ; then | |
10474 | ||
10475 | succeeded=no | |
10476 | ||
10477 | # Extract the first word of "pkg-config", so it can be a program name with args. | |
10478 | set dummy pkg-config; ac_word=$2 | |
10479 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
10480 | $as_echo_n "checking for $ac_word... " >&6; } | |
d6974efa | 10481 | if ${ac_cv_path_PKG_CONFIG+:} false; then : |
067d23c9 KY |
10482 | $as_echo_n "(cached) " >&6 |
10483 | else | |
10484 | case $PKG_CONFIG in | |
10485 | [\\/]* | ?:[\\/]*) | |
10486 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
10487 | ;; | |
10488 | *) | |
10489 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
10490 | for as_dir in $PATH | |
10491 | do | |
10492 | IFS=$as_save_IFS | |
10493 | test -z "$as_dir" && as_dir=. | |
10494 | for ac_exec_ext in '' $ac_executable_extensions; do | |
10495 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
10496 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
10497 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
10498 | break 2 | |
10499 | fi | |
10500 | done | |
10501 | done | |
10502 | IFS=$as_save_IFS | |
10503 | ||
10504 | test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" | |
10505 | ;; | |
10506 | esac | |
10507 | fi | |
10508 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG | |
10509 | if test -n "$PKG_CONFIG"; then | |
10510 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
10511 | $as_echo "$PKG_CONFIG" >&6; } | |
10512 | else | |
10513 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
10514 | $as_echo "no" >&6; } | |
10515 | fi | |
10516 | ||
10517 | ||
10518 | ||
10519 | if test "$PKG_CONFIG" = "no" ; then | |
10520 | HAVE_GNUTLS=no | |
10521 | else | |
10522 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
10523 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
10524 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gnutls >= 2.2.4" >&5 | |
10525 | $as_echo_n "checking for gnutls >= 2.2.4... " >&6; } | |
10526 | ||
10527 | if $PKG_CONFIG --exists "gnutls >= 2.2.4" 2>&5; then | |
10528 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
10529 | $as_echo "yes" >&6; } | |
10530 | succeeded=yes | |
10531 | ||
10532 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBGNUTLS_CFLAGS" >&5 | |
10533 | $as_echo_n "checking LIBGNUTLS_CFLAGS... " >&6; } | |
10534 | LIBGNUTLS_CFLAGS=`$PKG_CONFIG --cflags "gnutls >= 2.2.4"|sed -e 's,///*,/,g'` | |
10535 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBGNUTLS_CFLAGS" >&5 | |
10536 | $as_echo "$LIBGNUTLS_CFLAGS" >&6; } | |
10537 | ||
10538 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBGNUTLS_LIBS" >&5 | |
10539 | $as_echo_n "checking LIBGNUTLS_LIBS... " >&6; } | |
10540 | LIBGNUTLS_LIBS=`$PKG_CONFIG --libs "gnutls >= 2.2.4"|sed -e 's,///*,/,g'` | |
10541 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBGNUTLS_LIBS" >&5 | |
10542 | $as_echo "$LIBGNUTLS_LIBS" >&6; } | |
10543 | else | |
10544 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
10545 | $as_echo "no" >&6; } | |
10546 | LIBGNUTLS_CFLAGS="" | |
10547 | LIBGNUTLS_LIBS="" | |
10548 | ## If we have a custom action on failure, don't print errors, but | |
10549 | ## do set a variable so people can do so. | |
10550 | LIBGNUTLS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gnutls >= 2.2.4"` | |
10551 | ||
10552 | fi | |
10553 | ||
10554 | ||
10555 | ||
10556 | else | |
10557 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
10558 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
10559 | fi | |
10560 | fi | |
10561 | ||
10562 | if test $succeeded = yes; then | |
10563 | HAVE_GNUTLS=yes | |
10564 | else | |
10565 | HAVE_GNUTLS=no | |
10566 | fi | |
10567 | ||
10568 | if test "${HAVE_GNUTLS}" = "yes"; then | |
10569 | ||
10570 | $as_echo "#define HAVE_GNUTLS 1" >>confdefs.h | |
10571 | ||
10572 | fi | |
10573 | fi | |
10574 | ||
10575 | ||
10576 | ||
10577 | HAVE_XAW3D=no | |
10578 | LUCID_LIBW= | |
10579 | if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then | |
10580 | if test "$with_xaw3d" != no; then | |
10581 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xaw3d" >&5 | |
10582 | $as_echo_n "checking for xaw3d... " >&6; } | |
d6974efa | 10583 | if ${emacs_cv_xaw3d+:} false; then : |
067d23c9 KY |
10584 | $as_echo_n "(cached) " >&6 |
10585 | else | |
10586 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10587 | /* end confdefs.h. */ | |
10588 | ||
10589 | #include <X11/Intrinsic.h> | |
10590 | #include <X11/Xaw3d/Simple.h> | |
10591 | int | |
10592 | main () | |
10593 | { | |
10594 | ||
10595 | ; | |
10596 | return 0; | |
10597 | } | |
10598 | _ACEOF | |
10599 | if ac_fn_c_try_link "$LINENO"; then : | |
14beddf4 CY |
10600 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XawScrollbarSetThumb in -lXaw3d" >&5 |
10601 | $as_echo_n "checking for XawScrollbarSetThumb in -lXaw3d... " >&6; } | |
67342916 | 10602 | if ${ac_cv_lib_Xaw3d_XawScrollbarSetThumb+:} false; then : |
ae1362a3 AS |
10603 | $as_echo_n "(cached) " >&6 |
10604 | else | |
10605 | ac_check_lib_save_LIBS=$LIBS | |
14beddf4 | 10606 | LIBS="-lXaw3d $LIBS" |
ae1362a3 AS |
10607 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
10608 | /* end confdefs.h. */ | |
bf89cb4d | 10609 | |
ae1362a3 AS |
10610 | /* Override any GCC internal prototype to avoid an error. |
10611 | Use char because int might match the return type of a GCC | |
10612 | builtin and then its argument prototype would still apply. */ | |
10613 | #ifdef __cplusplus | |
10614 | extern "C" | |
10615 | #endif | |
14beddf4 | 10616 | char XawScrollbarSetThumb (); |
ae1362a3 AS |
10617 | int |
10618 | main () | |
10619 | { | |
14beddf4 | 10620 | return XawScrollbarSetThumb (); |
ae1362a3 AS |
10621 | ; |
10622 | return 0; | |
10623 | } | |
10624 | _ACEOF | |
10625 | if ac_fn_c_try_link "$LINENO"; then : | |
14beddf4 | 10626 | ac_cv_lib_Xaw3d_XawScrollbarSetThumb=yes |
ae1362a3 | 10627 | else |
14beddf4 | 10628 | ac_cv_lib_Xaw3d_XawScrollbarSetThumb=no |
ae1362a3 AS |
10629 | fi |
10630 | rm -f core conftest.err conftest.$ac_objext \ | |
10631 | conftest$ac_exeext conftest.$ac_ext | |
10632 | LIBS=$ac_check_lib_save_LIBS | |
10633 | fi | |
14beddf4 CY |
10634 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&5 |
10635 | $as_echo "$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&6; } | |
67342916 | 10636 | if test "x$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" = xyes; then : |
067d23c9 KY |
10637 | emacs_cv_xaw3d=yes |
10638 | else | |
10639 | emacs_cv_xaw3d=no | |
10640 | fi | |
14beddf4 CY |
10641 | |
10642 | else | |
10643 | emacs_cv_xaw3d=no | |
10644 | fi | |
067d23c9 KY |
10645 | rm -f core conftest.err conftest.$ac_objext \ |
10646 | conftest$ac_exeext conftest.$ac_ext | |
10647 | fi | |
10648 | ||
10649 | else | |
10650 | emacs_cv_xaw3d=no | |
10651 | fi | |
10652 | if test $emacs_cv_xaw3d = yes; then | |
10653 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5 | |
10654 | $as_echo "yes; using Lucid toolkit" >&6; } | |
10655 | USE_X_TOOLKIT=LUCID | |
10656 | HAVE_XAW3D=yes | |
10657 | LUCID_LIBW=-lXaw3d | |
10658 | ||
10659 | $as_echo "#define HAVE_XAW3D 1" >>confdefs.h | |
10660 | ||
10661 | else | |
10662 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
10663 | $as_echo "no" >&6; } | |
10664 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libXaw" >&5 | |
10665 | $as_echo_n "checking for libXaw... " >&6; } | |
d6974efa | 10666 | if ${emacs_cv_xaw+:} false; then : |
067d23c9 KY |
10667 | $as_echo_n "(cached) " >&6 |
10668 | else | |
10669 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10670 | /* end confdefs.h. */ | |
10671 | ||
10672 | #include <X11/Intrinsic.h> | |
10673 | #include <X11/Xaw/Simple.h> | |
10674 | int | |
10675 | main () | |
10676 | { | |
10677 | ||
10678 | ; | |
10679 | return 0; | |
10680 | } | |
10681 | _ACEOF | |
10682 | if ac_fn_c_try_link "$LINENO"; then : | |
10683 | emacs_cv_xaw=yes | |
10684 | else | |
10685 | emacs_cv_xaw=no | |
10686 | fi | |
10687 | rm -f core conftest.err conftest.$ac_objext \ | |
10688 | conftest$ac_exeext conftest.$ac_ext | |
10689 | fi | |
10690 | ||
10691 | if test $emacs_cv_xaw = yes; then | |
10692 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5 | |
10693 | $as_echo "yes; using Lucid toolkit" >&6; } | |
10694 | USE_X_TOOLKIT=LUCID | |
10695 | LUCID_LIBW=-lXaw | |
10696 | elif test x"${USE_X_TOOLKIT}" = xLUCID; then | |
2018939f | 10697 | as_fn_error $? "Lucid toolkit requires X11/Xaw include files" "$LINENO" 5 |
067d23c9 KY |
10698 | else |
10699 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no; do not use toolkit by default" >&5 | |
10700 | $as_echo "no; do not use toolkit by default" >&6; } | |
10701 | USE_X_TOOLKIT=none | |
10702 | fi | |
10703 | fi | |
10704 | fi | |
10705 | ||
10706 | X_TOOLKIT_TYPE=$USE_X_TOOLKIT | |
10707 | ||
10708 | LIBXTR6= | |
10709 | if test "${USE_X_TOOLKIT}" != "none"; then | |
10710 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 toolkit version" >&5 | |
10711 | $as_echo_n "checking X11 toolkit version... " >&6; } | |
d6974efa | 10712 | if ${emacs_cv_x11_toolkit_version_6+:} false; then : |
067d23c9 KY |
10713 | $as_echo_n "(cached) " >&6 |
10714 | else | |
10715 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10716 | /* end confdefs.h. */ | |
10717 | #include <X11/Intrinsic.h> | |
10718 | int | |
10719 | main () | |
10720 | { | |
10721 | #if XtSpecificationRelease < 6 | |
10722 | fail; | |
10723 | #endif | |
10724 | ||
10725 | ; | |
10726 | return 0; | |
10727 | } | |
10728 | _ACEOF | |
10729 | if ac_fn_c_try_link "$LINENO"; then : | |
10730 | emacs_cv_x11_toolkit_version_6=yes | |
10731 | else | |
10732 | emacs_cv_x11_toolkit_version_6=no | |
10733 | fi | |
10734 | rm -f core conftest.err conftest.$ac_objext \ | |
10735 | conftest$ac_exeext conftest.$ac_ext | |
10736 | fi | |
10737 | ||
10738 | HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6 | |
10739 | if test $emacs_cv_x11_toolkit_version_6 = yes; then | |
10740 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5 | |
10741 | $as_echo "6 or newer" >&6; } | |
10742 | ||
10743 | $as_echo "#define HAVE_X11XTR6 1" >>confdefs.h | |
10744 | ||
10745 | LIBXTR6="-lSM -lICE" | |
10746 | case "$opsys" in | |
10747 | ## Use libw.a along with X11R6 Xt. | |
10748 | unixware) LIBXTR6="$LIBXTR6 -lw" ;; | |
10749 | esac | |
10750 | else | |
10751 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5 | |
10752 | $as_echo "before 6" >&6; } | |
10753 | fi | |
10754 | ||
10755 | OLDLIBS="$LIBS" | |
10756 | if test x$HAVE_X11XTR6 = xyes; then | |
10757 | LIBS="-lXt -lSM -lICE $LIBS" | |
10758 | else | |
10759 | LIBS="-lXt $LIBS" | |
10760 | fi | |
10761 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XmuConvertStandardSelection in -lXmu" >&5 | |
10762 | $as_echo_n "checking for XmuConvertStandardSelection in -lXmu... " >&6; } | |
d6974efa | 10763 | if ${ac_cv_lib_Xmu_XmuConvertStandardSelection+:} false; then : |
067d23c9 KY |
10764 | $as_echo_n "(cached) " >&6 |
10765 | else | |
10766 | ac_check_lib_save_LIBS=$LIBS | |
10767 | LIBS="-lXmu $LIBS" | |
10768 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10769 | /* end confdefs.h. */ | |
10770 | ||
10771 | /* Override any GCC internal prototype to avoid an error. | |
10772 | Use char because int might match the return type of a GCC | |
10773 | builtin and then its argument prototype would still apply. */ | |
10774 | #ifdef __cplusplus | |
10775 | extern "C" | |
10776 | #endif | |
10777 | char XmuConvertStandardSelection (); | |
10778 | int | |
10779 | main () | |
10780 | { | |
10781 | return XmuConvertStandardSelection (); | |
10782 | ; | |
10783 | return 0; | |
10784 | } | |
10785 | _ACEOF | |
10786 | if ac_fn_c_try_link "$LINENO"; then : | |
10787 | ac_cv_lib_Xmu_XmuConvertStandardSelection=yes | |
10788 | else | |
10789 | ac_cv_lib_Xmu_XmuConvertStandardSelection=no | |
10790 | fi | |
10791 | rm -f core conftest.err conftest.$ac_objext \ | |
10792 | conftest$ac_exeext conftest.$ac_ext | |
10793 | LIBS=$ac_check_lib_save_LIBS | |
10794 | fi | |
10795 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5 | |
10796 | $as_echo "$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6; } | |
d6974efa | 10797 | if test "x$ac_cv_lib_Xmu_XmuConvertStandardSelection" = xyes; then : |
067d23c9 KY |
10798 | cat >>confdefs.h <<_ACEOF |
10799 | #define HAVE_LIBXMU 1 | |
10800 | _ACEOF | |
10801 | ||
10802 | LIBS="-lXmu $LIBS" | |
10803 | ||
10804 | fi | |
10805 | ||
10806 | test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS" | |
10807 | fi | |
10808 | ||
10809 | ||
10810 | LIBXMU=-lXmu | |
d6a003a8 AS |
10811 | case $opsys in |
10812 | ## These systems don't supply Xmu. | |
067d23c9 KY |
10813 | hpux* | aix4-2 ) |
10814 | test "X$ac_cv_lib_Xmu_XmuConvertStandardSelection" != "Xyes" && LIBXMU= | |
10815 | ;; | |
10816 | esac | |
10817 | ||
10818 | ||
10819 | # On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D. | |
10820 | if test "${HAVE_X11}" = "yes"; then | |
10821 | if test "${USE_X_TOOLKIT}" != "none"; then | |
10822 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XShapeQueryExtension in -lXext" >&5 | |
10823 | $as_echo_n "checking for XShapeQueryExtension in -lXext... " >&6; } | |
d6974efa | 10824 | if ${ac_cv_lib_Xext_XShapeQueryExtension+:} false; then : |
067d23c9 KY |
10825 | $as_echo_n "(cached) " >&6 |
10826 | else | |
10827 | ac_check_lib_save_LIBS=$LIBS | |
10828 | LIBS="-lXext $LIBS" | |
10829 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10830 | /* end confdefs.h. */ | |
10831 | ||
10832 | /* Override any GCC internal prototype to avoid an error. | |
10833 | Use char because int might match the return type of a GCC | |
10834 | builtin and then its argument prototype would still apply. */ | |
10835 | #ifdef __cplusplus | |
10836 | extern "C" | |
10837 | #endif | |
10838 | char XShapeQueryExtension (); | |
10839 | int | |
10840 | main () | |
10841 | { | |
10842 | return XShapeQueryExtension (); | |
10843 | ; | |
10844 | return 0; | |
10845 | } | |
10846 | _ACEOF | |
10847 | if ac_fn_c_try_link "$LINENO"; then : | |
10848 | ac_cv_lib_Xext_XShapeQueryExtension=yes | |
10849 | else | |
10850 | ac_cv_lib_Xext_XShapeQueryExtension=no | |
10851 | fi | |
10852 | rm -f core conftest.err conftest.$ac_objext \ | |
10853 | conftest$ac_exeext conftest.$ac_ext | |
10854 | LIBS=$ac_check_lib_save_LIBS | |
10855 | fi | |
10856 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5 | |
10857 | $as_echo "$ac_cv_lib_Xext_XShapeQueryExtension" >&6; } | |
d6974efa | 10858 | if test "x$ac_cv_lib_Xext_XShapeQueryExtension" = xyes; then : |
067d23c9 KY |
10859 | cat >>confdefs.h <<_ACEOF |
10860 | #define HAVE_LIBXEXT 1 | |
10861 | _ACEOF | |
10862 | ||
10863 | LIBS="-lXext $LIBS" | |
10864 | ||
10865 | fi | |
10866 | ||
10867 | fi | |
10868 | fi | |
10869 | ||
10870 | LIBXP= | |
10871 | if test "${USE_X_TOOLKIT}" = "MOTIF"; then | |
10872 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Motif version 2.1" >&5 | |
10873 | $as_echo_n "checking for Motif version 2.1... " >&6; } | |
d6974efa | 10874 | if ${emacs_cv_motif_version_2_1+:} false; then : |
067d23c9 KY |
10875 | $as_echo_n "(cached) " >&6 |
10876 | else | |
10877 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10878 | /* end confdefs.h. */ | |
10879 | #include <Xm/Xm.h> | |
10880 | int | |
10881 | main () | |
10882 | { | |
10883 | #if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1) | |
10884 | int x = 5; | |
10885 | #else | |
10886 | Motif version prior to 2.1. | |
10887 | #endif | |
10888 | ; | |
10889 | return 0; | |
10890 | } | |
10891 | _ACEOF | |
10892 | if ac_fn_c_try_compile "$LINENO"; then : | |
10893 | emacs_cv_motif_version_2_1=yes | |
10894 | else | |
10895 | emacs_cv_motif_version_2_1=no | |
10896 | fi | |
10897 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
10898 | fi | |
10899 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_motif_version_2_1" >&5 | |
10900 | $as_echo "$emacs_cv_motif_version_2_1" >&6; } | |
10901 | if test $emacs_cv_motif_version_2_1 = yes; then | |
10902 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpCreateContext in -lXp" >&5 | |
10903 | $as_echo_n "checking for XpCreateContext in -lXp... " >&6; } | |
d6974efa | 10904 | if ${ac_cv_lib_Xp_XpCreateContext+:} false; then : |
067d23c9 KY |
10905 | $as_echo_n "(cached) " >&6 |
10906 | else | |
10907 | ac_check_lib_save_LIBS=$LIBS | |
10908 | LIBS="-lXp $LIBS" | |
10909 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10910 | /* end confdefs.h. */ | |
10911 | ||
10912 | /* Override any GCC internal prototype to avoid an error. | |
10913 | Use char because int might match the return type of a GCC | |
10914 | builtin and then its argument prototype would still apply. */ | |
10915 | #ifdef __cplusplus | |
10916 | extern "C" | |
10917 | #endif | |
10918 | char XpCreateContext (); | |
10919 | int | |
10920 | main () | |
10921 | { | |
10922 | return XpCreateContext (); | |
10923 | ; | |
10924 | return 0; | |
10925 | } | |
10926 | _ACEOF | |
10927 | if ac_fn_c_try_link "$LINENO"; then : | |
10928 | ac_cv_lib_Xp_XpCreateContext=yes | |
10929 | else | |
10930 | ac_cv_lib_Xp_XpCreateContext=no | |
10931 | fi | |
10932 | rm -f core conftest.err conftest.$ac_objext \ | |
10933 | conftest$ac_exeext conftest.$ac_ext | |
10934 | LIBS=$ac_check_lib_save_LIBS | |
10935 | fi | |
10936 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xp_XpCreateContext" >&5 | |
10937 | $as_echo "$ac_cv_lib_Xp_XpCreateContext" >&6; } | |
d6974efa | 10938 | if test "x$ac_cv_lib_Xp_XpCreateContext" = xyes; then : |
067d23c9 KY |
10939 | LIBXP=-lXp |
10940 | fi | |
10941 | ||
10942 | else | |
10943 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LessTif where some systems put it" >&5 | |
10944 | $as_echo_n "checking for LessTif where some systems put it... " >&6; } | |
d6974efa | 10945 | if ${emacs_cv_lesstif+:} false; then : |
067d23c9 KY |
10946 | $as_echo_n "(cached) " >&6 |
10947 | else | |
10948 | # We put this in CFLAGS temporarily to precede other -I options | |
10949 | # that might be in CFLAGS temporarily. | |
10950 | # We put this in CPPFLAGS where it precedes the other -I options. | |
10951 | OLD_CPPFLAGS=$CPPFLAGS | |
10952 | OLD_CFLAGS=$CFLAGS | |
10953 | CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS" | |
10954 | CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS" | |
10955 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10956 | /* end confdefs.h. */ | |
10957 | #include </usr/X11R6/LessTif/Motif1.2/include/Xm/Xm.h> | |
10958 | int | |
10959 | main () | |
10960 | { | |
10961 | int x = 5; | |
10962 | ; | |
10963 | return 0; | |
10964 | } | |
10965 | _ACEOF | |
10966 | if ac_fn_c_try_compile "$LINENO"; then : | |
10967 | emacs_cv_lesstif=yes | |
10968 | else | |
10969 | emacs_cv_lesstif=no | |
10970 | fi | |
10971 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
10972 | fi | |
10973 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_lesstif" >&5 | |
10974 | $as_echo "$emacs_cv_lesstif" >&6; } | |
10975 | if test $emacs_cv_lesstif = yes; then | |
10976 | # Make sure this -I option remains in CPPFLAGS after it is set | |
10977 | # back to REAL_CPPFLAGS. | |
10978 | # There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not | |
10979 | # have those other -I options anyway. Ultimately, having this | |
10980 | # directory ultimately in CPPFLAGS will be enough. | |
10981 | REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS" | |
10982 | LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS" | |
10983 | else | |
10984 | CFLAGS=$OLD_CFLAGS | |
10985 | CPPFLAGS=$OLD_CPPFLAGS | |
10986 | fi | |
10987 | fi | |
10988 | fi | |
10989 | ||
10990 | ||
10991 | USE_TOOLKIT_SCROLL_BARS=no | |
10992 | if test "${with_toolkit_scroll_bars}" != "no"; then | |
10993 | if test "${USE_X_TOOLKIT}" != "none"; then | |
10994 | if test "${USE_X_TOOLKIT}" = "MOTIF"; then | |
10995 | $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h | |
10996 | ||
10997 | HAVE_XAW3D=no | |
10998 | USE_TOOLKIT_SCROLL_BARS=yes | |
10999 | elif test "${HAVE_XAW3D}" = "yes"; then | |
11000 | $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h | |
11001 | ||
11002 | USE_TOOLKIT_SCROLL_BARS=yes | |
11003 | fi | |
11004 | elif test "${HAVE_GTK}" = "yes"; then | |
11005 | $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h | |
11006 | ||
11007 | USE_TOOLKIT_SCROLL_BARS=yes | |
11008 | elif test "${HAVE_NS}" = "yes"; then | |
11009 | $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h | |
11010 | ||
11011 | USE_TOOLKIT_SCROLL_BARS=yes | |
11012 | fi | |
11013 | fi | |
11014 | ||
11015 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11016 | /* end confdefs.h. */ | |
11017 | ||
11018 | #include <X11/Xlib.h> | |
11019 | #include <X11/Xresource.h> | |
11020 | int | |
11021 | main () | |
11022 | { | |
11023 | XIMProc callback; | |
11024 | ; | |
11025 | return 0; | |
11026 | } | |
11027 | _ACEOF | |
11028 | if ac_fn_c_try_compile "$LINENO"; then : | |
11029 | HAVE_XIM=yes | |
11030 | ||
11031 | $as_echo "#define HAVE_XIM 1" >>confdefs.h | |
11032 | ||
11033 | else | |
11034 | HAVE_XIM=no | |
11035 | fi | |
11036 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
11037 | ||
11038 | ||
11039 | if test "${with_xim}" != "no"; then | |
11040 | ||
11041 | $as_echo "#define USE_XIM 1" >>confdefs.h | |
11042 | ||
11043 | fi | |
11044 | ||
11045 | ||
11046 | if test "${HAVE_XIM}" != "no"; then | |
11047 | late_CFLAGS=$CFLAGS | |
11048 | if test "$GCC" = yes; then | |
11049 | CFLAGS="$CFLAGS --pedantic-errors" | |
11050 | fi | |
11051 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11052 | /* end confdefs.h. */ | |
11053 | ||
11054 | #include <X11/Xlib.h> | |
11055 | #include <X11/Xresource.h> | |
11056 | int | |
11057 | main () | |
11058 | { | |
11059 | Display *display; | |
11060 | XrmDatabase db; | |
11061 | char *res_name; | |
11062 | char *res_class; | |
11063 | XIMProc callback; | |
11064 | XPointer *client_data; | |
11065 | #ifndef __GNUC__ | |
11066 | /* If we're not using GCC, it's probably not XFree86, and this is | |
11067 | probably right, but we can't use something like --pedantic-errors. */ | |
11068 | extern Bool XRegisterIMInstantiateCallback(Display*, XrmDatabase, char*, | |
11069 | char*, XIMProc, XPointer*); | |
11070 | #endif | |
11071 | (void)XRegisterIMInstantiateCallback(display, db, res_name, res_class, callback, | |
11072 | client_data); | |
11073 | ; | |
11074 | return 0; | |
11075 | } | |
11076 | _ACEOF | |
11077 | if ac_fn_c_try_compile "$LINENO"; then : | |
11078 | emacs_cv_arg6_star=yes | |
11079 | fi | |
11080 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
11081 | if test "$emacs_cv_arg6_star" = yes; then | |
11082 | $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer*" >>confdefs.h | |
11083 | ||
11084 | else | |
11085 | $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer" >>confdefs.h | |
11086 | ||
11087 | fi | |
11088 | CFLAGS=$late_CFLAGS | |
11089 | fi | |
11090 | ||
11091 | ### Start of font-backend (under any platform) section. | |
11092 | # (nothing here yet -- this is a placeholder) | |
11093 | ### End of font-backend (under any platform) section. | |
11094 | ||
11095 | ### Start of font-backend (under X11) section. | |
11096 | if test "${HAVE_X11}" = "yes"; then | |
11097 | ||
11098 | succeeded=no | |
11099 | ||
11100 | # Extract the first word of "pkg-config", so it can be a program name with args. | |
11101 | set dummy pkg-config; ac_word=$2 | |
11102 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
11103 | $as_echo_n "checking for $ac_word... " >&6; } | |
d6974efa | 11104 | if ${ac_cv_path_PKG_CONFIG+:} false; then : |
067d23c9 KY |
11105 | $as_echo_n "(cached) " >&6 |
11106 | else | |
11107 | case $PKG_CONFIG in | |
11108 | [\\/]* | ?:[\\/]*) | |
11109 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
11110 | ;; | |
11111 | *) | |
11112 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
11113 | for as_dir in $PATH | |
11114 | do | |
11115 | IFS=$as_save_IFS | |
11116 | test -z "$as_dir" && as_dir=. | |
11117 | for ac_exec_ext in '' $ac_executable_extensions; do | |
11118 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
11119 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
11120 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
11121 | break 2 | |
11122 | fi | |
11123 | done | |
11124 | done | |
11125 | IFS=$as_save_IFS | |
11126 | ||
11127 | test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" | |
11128 | ;; | |
11129 | esac | |
11130 | fi | |
11131 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG | |
11132 | if test -n "$PKG_CONFIG"; then | |
11133 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
11134 | $as_echo "$PKG_CONFIG" >&6; } | |
11135 | else | |
11136 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
11137 | $as_echo "no" >&6; } | |
11138 | fi | |
11139 | ||
11140 | ||
11141 | ||
11142 | if test "$PKG_CONFIG" = "no" ; then | |
11143 | HAVE_FC=no | |
11144 | else | |
11145 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
11146 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
11147 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fontconfig >= 2.2.0" >&5 | |
11148 | $as_echo_n "checking for fontconfig >= 2.2.0... " >&6; } | |
11149 | ||
11150 | if $PKG_CONFIG --exists "fontconfig >= 2.2.0" 2>&5; then | |
11151 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
11152 | $as_echo "yes" >&6; } | |
11153 | succeeded=yes | |
11154 | ||
11155 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking FONTCONFIG_CFLAGS" >&5 | |
11156 | $as_echo_n "checking FONTCONFIG_CFLAGS... " >&6; } | |
11157 | FONTCONFIG_CFLAGS=`$PKG_CONFIG --cflags "fontconfig >= 2.2.0"|sed -e 's,///*,/,g'` | |
11158 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FONTCONFIG_CFLAGS" >&5 | |
11159 | $as_echo "$FONTCONFIG_CFLAGS" >&6; } | |
11160 | ||
11161 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking FONTCONFIG_LIBS" >&5 | |
11162 | $as_echo_n "checking FONTCONFIG_LIBS... " >&6; } | |
11163 | FONTCONFIG_LIBS=`$PKG_CONFIG --libs "fontconfig >= 2.2.0"|sed -e 's,///*,/,g'` | |
11164 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FONTCONFIG_LIBS" >&5 | |
11165 | $as_echo "$FONTCONFIG_LIBS" >&6; } | |
11166 | else | |
11167 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
11168 | $as_echo "no" >&6; } | |
11169 | FONTCONFIG_CFLAGS="" | |
11170 | FONTCONFIG_LIBS="" | |
11171 | ## If we have a custom action on failure, don't print errors, but | |
11172 | ## do set a variable so people can do so. | |
11173 | FONTCONFIG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "fontconfig >= 2.2.0"` | |
11174 | ||
11175 | fi | |
11176 | ||
11177 | ||
11178 | ||
11179 | else | |
11180 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
11181 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
11182 | fi | |
11183 | fi | |
11184 | ||
11185 | if test $succeeded = yes; then | |
11186 | HAVE_FC=yes | |
11187 | else | |
11188 | HAVE_FC=no | |
11189 | fi | |
11190 | ||
11191 | ||
11192 | ## Use -lXft if available, unless `--with-xft=no'. | |
11193 | HAVE_XFT=maybe | |
11194 | if test "${HAVE_FC}" = "no" || test "x${with_x}" = "xno"; then | |
11195 | with_xft="no"; | |
11196 | fi | |
11197 | if test "x${with_xft}" != "xno"; then | |
11198 | ||
11199 | ||
11200 | succeeded=no | |
11201 | ||
11202 | # Extract the first word of "pkg-config", so it can be a program name with args. | |
11203 | set dummy pkg-config; ac_word=$2 | |
11204 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
11205 | $as_echo_n "checking for $ac_word... " >&6; } | |
d6974efa | 11206 | if ${ac_cv_path_PKG_CONFIG+:} false; then : |
067d23c9 KY |
11207 | $as_echo_n "(cached) " >&6 |
11208 | else | |
11209 | case $PKG_CONFIG in | |
11210 | [\\/]* | ?:[\\/]*) | |
11211 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
11212 | ;; | |
11213 | *) | |
11214 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
11215 | for as_dir in $PATH | |
11216 | do | |
11217 | IFS=$as_save_IFS | |
11218 | test -z "$as_dir" && as_dir=. | |
11219 | for ac_exec_ext in '' $ac_executable_extensions; do | |
11220 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
11221 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
11222 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
11223 | break 2 | |
11224 | fi | |
11225 | done | |
11226 | done | |
11227 | IFS=$as_save_IFS | |
11228 | ||
11229 | test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" | |
11230 | ;; | |
11231 | esac | |
11232 | fi | |
11233 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG | |
11234 | if test -n "$PKG_CONFIG"; then | |
11235 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
11236 | $as_echo "$PKG_CONFIG" >&6; } | |
11237 | else | |
11238 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
11239 | $as_echo "no" >&6; } | |
11240 | fi | |
11241 | ||
11242 | ||
11243 | ||
11244 | if test "$PKG_CONFIG" = "no" ; then | |
11245 | HAVE_XFT=no | |
11246 | else | |
11247 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
11248 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
11249 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xft >= 0.13.0" >&5 | |
11250 | $as_echo_n "checking for xft >= 0.13.0... " >&6; } | |
11251 | ||
11252 | if $PKG_CONFIG --exists "xft >= 0.13.0" 2>&5; then | |
11253 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
11254 | $as_echo "yes" >&6; } | |
11255 | succeeded=yes | |
11256 | ||
11257 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking XFT_CFLAGS" >&5 | |
11258 | $as_echo_n "checking XFT_CFLAGS... " >&6; } | |
11259 | XFT_CFLAGS=`$PKG_CONFIG --cflags "xft >= 0.13.0"|sed -e 's,///*,/,g'` | |
11260 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XFT_CFLAGS" >&5 | |
11261 | $as_echo "$XFT_CFLAGS" >&6; } | |
11262 | ||
11263 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking XFT_LIBS" >&5 | |
11264 | $as_echo_n "checking XFT_LIBS... " >&6; } | |
11265 | XFT_LIBS=`$PKG_CONFIG --libs "xft >= 0.13.0"|sed -e 's,///*,/,g'` | |
11266 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XFT_LIBS" >&5 | |
11267 | $as_echo "$XFT_LIBS" >&6; } | |
11268 | else | |
11269 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
11270 | $as_echo "no" >&6; } | |
11271 | XFT_CFLAGS="" | |
11272 | XFT_LIBS="" | |
11273 | ## If we have a custom action on failure, don't print errors, but | |
11274 | ## do set a variable so people can do so. | |
11275 | XFT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xft >= 0.13.0"` | |
11276 | ||
11277 | fi | |
11278 | ||
11279 | ||
11280 | ||
11281 | else | |
11282 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
11283 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
11284 | fi | |
11285 | fi | |
11286 | ||
11287 | if test $succeeded = yes; then | |
11288 | : | |
11289 | else | |
11290 | HAVE_XFT=no | |
11291 | fi | |
11292 | ||
11293 | ## Because xftfont.c uses XRenderQueryExtension, we also | |
11294 | ## need to link to -lXrender. | |
11295 | HAVE_XRENDER=no | |
11296 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRenderQueryExtension in -lXrender" >&5 | |
11297 | $as_echo_n "checking for XRenderQueryExtension in -lXrender... " >&6; } | |
d6974efa | 11298 | if ${ac_cv_lib_Xrender_XRenderQueryExtension+:} false; then : |
067d23c9 KY |
11299 | $as_echo_n "(cached) " >&6 |
11300 | else | |
11301 | ac_check_lib_save_LIBS=$LIBS | |
11302 | LIBS="-lXrender $LIBS" | |
11303 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11304 | /* end confdefs.h. */ | |
11305 | ||
11306 | /* Override any GCC internal prototype to avoid an error. | |
11307 | Use char because int might match the return type of a GCC | |
11308 | builtin and then its argument prototype would still apply. */ | |
11309 | #ifdef __cplusplus | |
11310 | extern "C" | |
11311 | #endif | |
11312 | char XRenderQueryExtension (); | |
11313 | int | |
11314 | main () | |
11315 | { | |
11316 | return XRenderQueryExtension (); | |
11317 | ; | |
11318 | return 0; | |
11319 | } | |
11320 | _ACEOF | |
11321 | if ac_fn_c_try_link "$LINENO"; then : | |
11322 | ac_cv_lib_Xrender_XRenderQueryExtension=yes | |
11323 | else | |
11324 | ac_cv_lib_Xrender_XRenderQueryExtension=no | |
11325 | fi | |
11326 | rm -f core conftest.err conftest.$ac_objext \ | |
11327 | conftest$ac_exeext conftest.$ac_ext | |
11328 | LIBS=$ac_check_lib_save_LIBS | |
11329 | fi | |
11330 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrender_XRenderQueryExtension" >&5 | |
11331 | $as_echo "$ac_cv_lib_Xrender_XRenderQueryExtension" >&6; } | |
d6974efa | 11332 | if test "x$ac_cv_lib_Xrender_XRenderQueryExtension" = xyes; then : |
067d23c9 KY |
11333 | HAVE_XRENDER=yes |
11334 | fi | |
11335 | ||
11336 | if test "$HAVE_XFT" != no && test "$HAVE_XRENDER" != no; then | |
11337 | OLD_CPPFLAGS="$CPPFLAGS" | |
11338 | OLD_CFLAGS="$CFLAGS" | |
11339 | OLD_LIBS="$LIBS" | |
11340 | CPPFLAGS="$CPPFLAGS $XFT_CFLAGS" | |
11341 | CFLAGS="$CFLAGS $XFT_CFLAGS" | |
11342 | XFT_LIBS="-lXrender $XFT_LIBS" | |
11343 | LIBS="$XFT_LIBS $LIBS" | |
11344 | ac_fn_c_check_header_mongrel "$LINENO" "X11/Xft/Xft.h" "ac_cv_header_X11_Xft_Xft_h" "$ac_includes_default" | |
d6974efa | 11345 | if test "x$ac_cv_header_X11_Xft_Xft_h" = xyes; then : |
067d23c9 KY |
11346 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XftFontOpen in -lXft" >&5 |
11347 | $as_echo_n "checking for XftFontOpen in -lXft... " >&6; } | |
d6974efa | 11348 | if ${ac_cv_lib_Xft_XftFontOpen+:} false; then : |
067d23c9 KY |
11349 | $as_echo_n "(cached) " >&6 |
11350 | else | |
11351 | ac_check_lib_save_LIBS=$LIBS | |
11352 | LIBS="-lXft $XFT_LIBS $LIBS" | |
11353 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11354 | /* end confdefs.h. */ | |
11355 | ||
11356 | /* Override any GCC internal prototype to avoid an error. | |
11357 | Use char because int might match the return type of a GCC | |
11358 | builtin and then its argument prototype would still apply. */ | |
11359 | #ifdef __cplusplus | |
11360 | extern "C" | |
11361 | #endif | |
11362 | char XftFontOpen (); | |
11363 | int | |
11364 | main () | |
11365 | { | |
11366 | return XftFontOpen (); | |
11367 | ; | |
11368 | return 0; | |
11369 | } | |
11370 | _ACEOF | |
11371 | if ac_fn_c_try_link "$LINENO"; then : | |
11372 | ac_cv_lib_Xft_XftFontOpen=yes | |
11373 | else | |
11374 | ac_cv_lib_Xft_XftFontOpen=no | |
11375 | fi | |
11376 | rm -f core conftest.err conftest.$ac_objext \ | |
11377 | conftest$ac_exeext conftest.$ac_ext | |
11378 | LIBS=$ac_check_lib_save_LIBS | |
11379 | fi | |
11380 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xft_XftFontOpen" >&5 | |
11381 | $as_echo "$ac_cv_lib_Xft_XftFontOpen" >&6; } | |
d6974efa | 11382 | if test "x$ac_cv_lib_Xft_XftFontOpen" = xyes; then : |
067d23c9 KY |
11383 | HAVE_XFT=yes |
11384 | fi | |
11385 | ||
11386 | fi | |
11387 | ||
11388 | ||
11389 | ||
11390 | if test "${HAVE_XFT}" = "yes"; then | |
11391 | ||
11392 | $as_echo "#define HAVE_XFT 1" >>confdefs.h | |
11393 | ||
11394 | ||
11395 | C_SWITCH_X_SITE="$C_SWITCH_X_SITE $XFT_CFLAGS" | |
11396 | else | |
11397 | CPPFLAGS="$OLD_CPPFLAGS" | |
11398 | CFLAGS="$OLD_CFLAGS" | |
11399 | LIBS="$OLD_LIBS" | |
11400 | fi # "${HAVE_XFT}" = "yes" | |
11401 | fi # "$HAVE_XFT" != no | |
11402 | fi # "x${with_xft}" != "xno" | |
11403 | ||
11404 | if test "$HAVE_XFT" != "yes"; then | |
11405 | HAVE_XFT=no | |
11406 | fi | |
11407 | ||
067d23c9 KY |
11408 | ## We used to allow building with FreeType and without Xft. |
11409 | ## However, the ftx font backend driver is not in good shape. | |
9ba41eb9 | 11410 | HAVE_FREETYPE=$HAVE_XFT |
067d23c9 KY |
11411 | |
11412 | HAVE_LIBOTF=no | |
11413 | if test "${HAVE_FREETYPE}" = "yes"; then | |
11414 | ||
11415 | $as_echo "#define HAVE_FREETYPE 1" >>confdefs.h | |
11416 | ||
11417 | if test "${with_libotf}" != "no"; then | |
11418 | ||
11419 | succeeded=no | |
11420 | ||
11421 | # Extract the first word of "pkg-config", so it can be a program name with args. | |
11422 | set dummy pkg-config; ac_word=$2 | |
11423 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
11424 | $as_echo_n "checking for $ac_word... " >&6; } | |
d6974efa | 11425 | if ${ac_cv_path_PKG_CONFIG+:} false; then : |
067d23c9 KY |
11426 | $as_echo_n "(cached) " >&6 |
11427 | else | |
11428 | case $PKG_CONFIG in | |
11429 | [\\/]* | ?:[\\/]*) | |
11430 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
11431 | ;; | |
11432 | *) | |
11433 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
11434 | for as_dir in $PATH | |
11435 | do | |
11436 | IFS=$as_save_IFS | |
11437 | test -z "$as_dir" && as_dir=. | |
11438 | for ac_exec_ext in '' $ac_executable_extensions; do | |
11439 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
11440 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
11441 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
11442 | break 2 | |
11443 | fi | |
11444 | done | |
11445 | done | |
11446 | IFS=$as_save_IFS | |
11447 | ||
11448 | test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" | |
11449 | ;; | |
11450 | esac | |
11451 | fi | |
11452 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG | |
11453 | if test -n "$PKG_CONFIG"; then | |
11454 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
11455 | $as_echo "$PKG_CONFIG" >&6; } | |
11456 | else | |
11457 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
11458 | $as_echo "no" >&6; } | |
11459 | fi | |
11460 | ||
11461 | ||
11462 | ||
11463 | if test "$PKG_CONFIG" = "no" ; then | |
11464 | HAVE_LIBOTF=no | |
11465 | else | |
11466 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
11467 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
11468 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libotf" >&5 | |
11469 | $as_echo_n "checking for libotf... " >&6; } | |
11470 | ||
11471 | if $PKG_CONFIG --exists "libotf" 2>&5; then | |
11472 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
11473 | $as_echo "yes" >&6; } | |
11474 | succeeded=yes | |
11475 | ||
11476 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBOTF_CFLAGS" >&5 | |
11477 | $as_echo_n "checking LIBOTF_CFLAGS... " >&6; } | |
11478 | LIBOTF_CFLAGS=`$PKG_CONFIG --cflags "libotf"|sed -e 's,///*,/,g'` | |
11479 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBOTF_CFLAGS" >&5 | |
11480 | $as_echo "$LIBOTF_CFLAGS" >&6; } | |
11481 | ||
11482 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBOTF_LIBS" >&5 | |
11483 | $as_echo_n "checking LIBOTF_LIBS... " >&6; } | |
11484 | LIBOTF_LIBS=`$PKG_CONFIG --libs "libotf"|sed -e 's,///*,/,g'` | |
11485 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBOTF_LIBS" >&5 | |
11486 | $as_echo "$LIBOTF_LIBS" >&6; } | |
11487 | else | |
11488 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
11489 | $as_echo "no" >&6; } | |
11490 | LIBOTF_CFLAGS="" | |
11491 | LIBOTF_LIBS="" | |
11492 | ## If we have a custom action on failure, don't print errors, but | |
11493 | ## do set a variable so people can do so. | |
11494 | LIBOTF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libotf"` | |
11495 | ||
11496 | fi | |
11497 | ||
11498 | ||
11499 | ||
11500 | else | |
11501 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
11502 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
11503 | fi | |
11504 | fi | |
11505 | ||
11506 | if test $succeeded = yes; then | |
11507 | HAVE_LIBOTF=yes | |
11508 | else | |
11509 | HAVE_LIBOTF=no | |
11510 | fi | |
11511 | ||
11512 | if test "$HAVE_LIBOTF" = "yes"; then | |
11513 | ||
11514 | $as_echo "#define HAVE_LIBOTF 1" >>confdefs.h | |
11515 | ||
11516 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTF_get_variation_glyphs in -lotf" >&5 | |
11517 | $as_echo_n "checking for OTF_get_variation_glyphs in -lotf... " >&6; } | |
d6974efa | 11518 | if ${ac_cv_lib_otf_OTF_get_variation_glyphs+:} false; then : |
067d23c9 KY |
11519 | $as_echo_n "(cached) " >&6 |
11520 | else | |
11521 | ac_check_lib_save_LIBS=$LIBS | |
11522 | LIBS="-lotf $LIBS" | |
11523 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11524 | /* end confdefs.h. */ | |
11525 | ||
11526 | /* Override any GCC internal prototype to avoid an error. | |
11527 | Use char because int might match the return type of a GCC | |
11528 | builtin and then its argument prototype would still apply. */ | |
11529 | #ifdef __cplusplus | |
11530 | extern "C" | |
11531 | #endif | |
11532 | char OTF_get_variation_glyphs (); | |
11533 | int | |
11534 | main () | |
11535 | { | |
11536 | return OTF_get_variation_glyphs (); | |
11537 | ; | |
11538 | return 0; | |
11539 | } | |
11540 | _ACEOF | |
11541 | if ac_fn_c_try_link "$LINENO"; then : | |
11542 | ac_cv_lib_otf_OTF_get_variation_glyphs=yes | |
11543 | else | |
11544 | ac_cv_lib_otf_OTF_get_variation_glyphs=no | |
11545 | fi | |
11546 | rm -f core conftest.err conftest.$ac_objext \ | |
11547 | conftest$ac_exeext conftest.$ac_ext | |
11548 | LIBS=$ac_check_lib_save_LIBS | |
11549 | fi | |
11550 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_otf_OTF_get_variation_glyphs" >&5 | |
11551 | $as_echo "$ac_cv_lib_otf_OTF_get_variation_glyphs" >&6; } | |
d6974efa | 11552 | if test "x$ac_cv_lib_otf_OTF_get_variation_glyphs" = xyes; then : |
067d23c9 KY |
11553 | HAVE_OTF_GET_VARIATION_GLYPHS=yes |
11554 | else | |
11555 | HAVE_OTF_GET_VARIATION_GLYPHS=no | |
11556 | fi | |
11557 | ||
11558 | if test "${HAVE_OTF_GET_VARIATION_GLYPHS}" = "yes"; then | |
11559 | ||
11560 | $as_echo "#define HAVE_OTF_GET_VARIATION_GLYPHS 1" >>confdefs.h | |
11561 | ||
11562 | fi | |
11563 | fi | |
11564 | fi | |
11565 | fi | |
11566 | ||
11567 | HAVE_M17N_FLT=no | |
11568 | if test "${HAVE_LIBOTF}" = yes; then | |
11569 | if test "${with_m17n_flt}" != "no"; then | |
11570 | ||
11571 | succeeded=no | |
11572 | ||
11573 | # Extract the first word of "pkg-config", so it can be a program name with args. | |
11574 | set dummy pkg-config; ac_word=$2 | |
11575 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
11576 | $as_echo_n "checking for $ac_word... " >&6; } | |
d6974efa | 11577 | if ${ac_cv_path_PKG_CONFIG+:} false; then : |
067d23c9 KY |
11578 | $as_echo_n "(cached) " >&6 |
11579 | else | |
11580 | case $PKG_CONFIG in | |
11581 | [\\/]* | ?:[\\/]*) | |
11582 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
11583 | ;; | |
11584 | *) | |
11585 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
11586 | for as_dir in $PATH | |
11587 | do | |
11588 | IFS=$as_save_IFS | |
11589 | test -z "$as_dir" && as_dir=. | |
11590 | for ac_exec_ext in '' $ac_executable_extensions; do | |
11591 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
11592 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
11593 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
11594 | break 2 | |
11595 | fi | |
11596 | done | |
11597 | done | |
11598 | IFS=$as_save_IFS | |
11599 | ||
11600 | test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" | |
11601 | ;; | |
11602 | esac | |
11603 | fi | |
11604 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG | |
11605 | if test -n "$PKG_CONFIG"; then | |
11606 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
11607 | $as_echo "$PKG_CONFIG" >&6; } | |
11608 | else | |
11609 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
11610 | $as_echo "no" >&6; } | |
11611 | fi | |
11612 | ||
11613 | ||
11614 | ||
11615 | if test "$PKG_CONFIG" = "no" ; then | |
11616 | HAVE_M17N_FLT=no | |
11617 | else | |
11618 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
11619 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
11620 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for m17n-flt" >&5 | |
11621 | $as_echo_n "checking for m17n-flt... " >&6; } | |
11622 | ||
11623 | if $PKG_CONFIG --exists "m17n-flt" 2>&5; then | |
11624 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
11625 | $as_echo "yes" >&6; } | |
11626 | succeeded=yes | |
11627 | ||
11628 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking M17N_FLT_CFLAGS" >&5 | |
11629 | $as_echo_n "checking M17N_FLT_CFLAGS... " >&6; } | |
11630 | M17N_FLT_CFLAGS=`$PKG_CONFIG --cflags "m17n-flt"|sed -e 's,///*,/,g'` | |
11631 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $M17N_FLT_CFLAGS" >&5 | |
11632 | $as_echo "$M17N_FLT_CFLAGS" >&6; } | |
11633 | ||
11634 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking M17N_FLT_LIBS" >&5 | |
11635 | $as_echo_n "checking M17N_FLT_LIBS... " >&6; } | |
11636 | M17N_FLT_LIBS=`$PKG_CONFIG --libs "m17n-flt"|sed -e 's,///*,/,g'` | |
11637 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $M17N_FLT_LIBS" >&5 | |
11638 | $as_echo "$M17N_FLT_LIBS" >&6; } | |
11639 | else | |
11640 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
11641 | $as_echo "no" >&6; } | |
11642 | M17N_FLT_CFLAGS="" | |
11643 | M17N_FLT_LIBS="" | |
11644 | ## If we have a custom action on failure, don't print errors, but | |
11645 | ## do set a variable so people can do so. | |
11646 | M17N_FLT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "m17n-flt"` | |
11647 | ||
11648 | fi | |
11649 | ||
11650 | ||
11651 | ||
11652 | else | |
11653 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
11654 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
11655 | fi | |
11656 | fi | |
11657 | ||
11658 | if test $succeeded = yes; then | |
11659 | HAVE_M17N_FLT=yes | |
11660 | else | |
11661 | HAVE_M17N_FLT=no | |
11662 | fi | |
11663 | ||
11664 | if test "$HAVE_M17N_FLT" = "yes"; then | |
11665 | ||
11666 | $as_echo "#define HAVE_M17N_FLT 1" >>confdefs.h | |
11667 | ||
11668 | fi | |
11669 | fi | |
11670 | fi | |
11671 | else | |
11672 | HAVE_XFT=no | |
11673 | HAVE_FREETYPE=no | |
11674 | HAVE_LIBOTF=no | |
11675 | HAVE_M17N_FLT=no | |
11676 | fi | |
11677 | ||
11678 | ### End of font-backend (under X11) section. | |
11679 | ||
11680 | ||
11681 | ||
11682 | ||
11683 | ||
11684 | ||
11685 | ||
11686 | ||
11687 | ||
11688 | ||
11689 | ### Use -lXpm if available, unless `--with-xpm=no'. | |
11690 | HAVE_XPM=no | |
11691 | LIBXPM= | |
11692 | if test "${HAVE_X11}" = "yes"; then | |
11693 | if test "${with_xpm}" != "no"; then | |
11694 | ac_fn_c_check_header_mongrel "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "$ac_includes_default" | |
d6974efa | 11695 | if test "x$ac_cv_header_X11_xpm_h" = xyes; then : |
067d23c9 KY |
11696 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReadFileToPixmap in -lXpm" >&5 |
11697 | $as_echo_n "checking for XpmReadFileToPixmap in -lXpm... " >&6; } | |
d6974efa | 11698 | if ${ac_cv_lib_Xpm_XpmReadFileToPixmap+:} false; then : |
067d23c9 KY |
11699 | $as_echo_n "(cached) " >&6 |
11700 | else | |
11701 | ac_check_lib_save_LIBS=$LIBS | |
11702 | LIBS="-lXpm -lX11 $LIBS" | |
11703 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11704 | /* end confdefs.h. */ | |
11705 | ||
11706 | /* Override any GCC internal prototype to avoid an error. | |
11707 | Use char because int might match the return type of a GCC | |
11708 | builtin and then its argument prototype would still apply. */ | |
11709 | #ifdef __cplusplus | |
11710 | extern "C" | |
11711 | #endif | |
11712 | char XpmReadFileToPixmap (); | |
11713 | int | |
11714 | main () | |
11715 | { | |
11716 | return XpmReadFileToPixmap (); | |
11717 | ; | |
11718 | return 0; | |
11719 | } | |
11720 | _ACEOF | |
11721 | if ac_fn_c_try_link "$LINENO"; then : | |
11722 | ac_cv_lib_Xpm_XpmReadFileToPixmap=yes | |
11723 | else | |
11724 | ac_cv_lib_Xpm_XpmReadFileToPixmap=no | |
11725 | fi | |
11726 | rm -f core conftest.err conftest.$ac_objext \ | |
11727 | conftest$ac_exeext conftest.$ac_ext | |
11728 | LIBS=$ac_check_lib_save_LIBS | |
11729 | fi | |
11730 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5 | |
11731 | $as_echo "$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6; } | |
d6974efa | 11732 | if test "x$ac_cv_lib_Xpm_XpmReadFileToPixmap" = xyes; then : |
067d23c9 KY |
11733 | HAVE_XPM=yes |
11734 | fi | |
11735 | ||
11736 | fi | |
11737 | ||
11738 | ||
11739 | if test "${HAVE_XPM}" = "yes"; then | |
11740 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReturnAllocPixels preprocessor define" >&5 | |
11741 | $as_echo_n "checking for XpmReturnAllocPixels preprocessor define... " >&6; } | |
11742 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11743 | /* end confdefs.h. */ | |
11744 | #include "X11/xpm.h" | |
11745 | #ifndef XpmReturnAllocPixels | |
11746 | no_return_alloc_pixels | |
11747 | #endif | |
11748 | ||
11749 | _ACEOF | |
11750 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
11751 | $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then : | |
11752 | HAVE_XPM=no | |
11753 | else | |
11754 | HAVE_XPM=yes | |
11755 | fi | |
11756 | rm -f conftest* | |
11757 | ||
11758 | ||
11759 | if test "${HAVE_XPM}" = "yes"; then | |
11760 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
11761 | $as_echo "yes" >&6; } | |
11762 | else | |
11763 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
11764 | $as_echo "no" >&6; } | |
11765 | fi | |
11766 | fi | |
11767 | fi | |
11768 | ||
11769 | if test "${HAVE_XPM}" = "yes"; then | |
11770 | ||
11771 | $as_echo "#define HAVE_XPM 1" >>confdefs.h | |
11772 | ||
11773 | LIBXPM=-lXpm | |
11774 | fi | |
11775 | fi | |
11776 | ||
11777 | ||
11778 | ### Use -ljpeg if available, unless `--with-jpeg=no'. | |
11779 | HAVE_JPEG=no | |
11780 | LIBJPEG= | |
11781 | if test "${HAVE_X11}" = "yes"; then | |
11782 | if test "${with_jpeg}" != "no"; then | |
11783 | ac_fn_c_check_header_mongrel "$LINENO" "jerror.h" "ac_cv_header_jerror_h" "$ac_includes_default" | |
d6974efa | 11784 | if test "x$ac_cv_header_jerror_h" = xyes; then : |
067d23c9 KY |
11785 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_destroy_compress in -ljpeg" >&5 |
11786 | $as_echo_n "checking for jpeg_destroy_compress in -ljpeg... " >&6; } | |
d6974efa | 11787 | if ${ac_cv_lib_jpeg_jpeg_destroy_compress+:} false; then : |
067d23c9 KY |
11788 | $as_echo_n "(cached) " >&6 |
11789 | else | |
11790 | ac_check_lib_save_LIBS=$LIBS | |
11791 | LIBS="-ljpeg $LIBS" | |
11792 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11793 | /* end confdefs.h. */ | |
11794 | ||
11795 | /* Override any GCC internal prototype to avoid an error. | |
11796 | Use char because int might match the return type of a GCC | |
11797 | builtin and then its argument prototype would still apply. */ | |
11798 | #ifdef __cplusplus | |
11799 | extern "C" | |
11800 | #endif | |
11801 | char jpeg_destroy_compress (); | |
11802 | int | |
11803 | main () | |
11804 | { | |
11805 | return jpeg_destroy_compress (); | |
11806 | ; | |
11807 | return 0; | |
11808 | } | |
11809 | _ACEOF | |
11810 | if ac_fn_c_try_link "$LINENO"; then : | |
11811 | ac_cv_lib_jpeg_jpeg_destroy_compress=yes | |
11812 | else | |
11813 | ac_cv_lib_jpeg_jpeg_destroy_compress=no | |
11814 | fi | |
11815 | rm -f core conftest.err conftest.$ac_objext \ | |
11816 | conftest$ac_exeext conftest.$ac_ext | |
11817 | LIBS=$ac_check_lib_save_LIBS | |
11818 | fi | |
11819 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5 | |
11820 | $as_echo "$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6; } | |
d6974efa | 11821 | if test "x$ac_cv_lib_jpeg_jpeg_destroy_compress" = xyes; then : |
067d23c9 KY |
11822 | HAVE_JPEG=yes |
11823 | fi | |
11824 | ||
11825 | fi | |
11826 | ||
11827 | ||
11828 | fi | |
11829 | ||
11830 | if test "${HAVE_JPEG}" = "yes"; then | |
11831 | $as_echo "#define HAVE_JPEG 1" >>confdefs.h | |
11832 | ||
11833 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11834 | /* end confdefs.h. */ | |
11835 | #include <jpeglib.h> | |
11836 | version=JPEG_LIB_VERSION | |
11837 | ||
11838 | _ACEOF | |
11839 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
11840 | $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then : | |
11841 | $as_echo "#define HAVE_JPEG 1" >>confdefs.h | |
11842 | ||
11843 | else | |
11844 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libjpeg found, but not version 6b or later" >&5 | |
11845 | $as_echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;} | |
11846 | HAVE_JPEG=no | |
11847 | fi | |
11848 | rm -f conftest* | |
11849 | ||
11850 | fi | |
11851 | if test "${HAVE_JPEG}" = "yes"; then | |
11852 | LIBJPEG=-ljpeg | |
11853 | fi | |
11854 | fi | |
11855 | ||
11856 | ||
11857 | ### Use -lpng if available, unless `--with-png=no'. | |
11858 | HAVE_PNG=no | |
11859 | LIBPNG= | |
11860 | if test "${HAVE_X11}" = "yes"; then | |
11861 | if test "${with_png}" != "no"; then | |
11862 | # Debian unstable as of July 2003 has multiple libpngs, and puts png.h | |
11863 | # in /usr/include/libpng. | |
11864 | for ac_header in png.h libpng/png.h | |
11865 | do : | |
11866 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
11867 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
2018939f | 11868 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : |
067d23c9 KY |
11869 | cat >>confdefs.h <<_ACEOF |
11870 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
11871 | _ACEOF | |
11872 | ||
11873 | fi | |
11874 | ||
11875 | done | |
11876 | ||
11877 | if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then | |
11878 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_get_channels in -lpng" >&5 | |
11879 | $as_echo_n "checking for png_get_channels in -lpng... " >&6; } | |
d6974efa | 11880 | if ${ac_cv_lib_png_png_get_channels+:} false; then : |
067d23c9 KY |
11881 | $as_echo_n "(cached) " >&6 |
11882 | else | |
11883 | ac_check_lib_save_LIBS=$LIBS | |
11884 | LIBS="-lpng -lz -lm $LIBS" | |
11885 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11886 | /* end confdefs.h. */ | |
11887 | ||
11888 | /* Override any GCC internal prototype to avoid an error. | |
11889 | Use char because int might match the return type of a GCC | |
11890 | builtin and then its argument prototype would still apply. */ | |
11891 | #ifdef __cplusplus | |
11892 | extern "C" | |
11893 | #endif | |
11894 | char png_get_channels (); | |
11895 | int | |
11896 | main () | |
11897 | { | |
11898 | return png_get_channels (); | |
11899 | ; | |
11900 | return 0; | |
11901 | } | |
11902 | _ACEOF | |
11903 | if ac_fn_c_try_link "$LINENO"; then : | |
11904 | ac_cv_lib_png_png_get_channels=yes | |
11905 | else | |
11906 | ac_cv_lib_png_png_get_channels=no | |
11907 | fi | |
11908 | rm -f core conftest.err conftest.$ac_objext \ | |
11909 | conftest$ac_exeext conftest.$ac_ext | |
11910 | LIBS=$ac_check_lib_save_LIBS | |
11911 | fi | |
11912 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_png_png_get_channels" >&5 | |
11913 | $as_echo "$ac_cv_lib_png_png_get_channels" >&6; } | |
d6974efa | 11914 | if test "x$ac_cv_lib_png_png_get_channels" = xyes; then : |
067d23c9 KY |
11915 | HAVE_PNG=yes |
11916 | fi | |
11917 | ||
11918 | fi | |
11919 | fi | |
11920 | ||
11921 | if test "${HAVE_PNG}" = "yes"; then | |
11922 | ||
11923 | $as_echo "#define HAVE_PNG 1" >>confdefs.h | |
11924 | ||
11925 | LIBPNG="-lpng -lz -lm" | |
11926 | fi | |
11927 | fi | |
11928 | ||
11929 | ||
11930 | ### Use -ltiff if available, unless `--with-tiff=no'. | |
11931 | HAVE_TIFF=no | |
11932 | LIBTIFF= | |
11933 | if test "${HAVE_X11}" = "yes"; then | |
11934 | if test "${with_tiff}" != "no"; then | |
11935 | ac_fn_c_check_header_mongrel "$LINENO" "tiffio.h" "ac_cv_header_tiffio_h" "$ac_includes_default" | |
d6974efa | 11936 | if test "x$ac_cv_header_tiffio_h" = xyes; then : |
067d23c9 KY |
11937 | tifflibs="-lz -lm" |
11938 | # At least one tiff package requires the jpeg library. | |
11939 | if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi | |
11940 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIFFGetVersion in -ltiff" >&5 | |
11941 | $as_echo_n "checking for TIFFGetVersion in -ltiff... " >&6; } | |
d6974efa | 11942 | if ${ac_cv_lib_tiff_TIFFGetVersion+:} false; then : |
067d23c9 KY |
11943 | $as_echo_n "(cached) " >&6 |
11944 | else | |
11945 | ac_check_lib_save_LIBS=$LIBS | |
11946 | LIBS="-ltiff $tifflibs $LIBS" | |
11947 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11948 | /* end confdefs.h. */ | |
11949 | ||
11950 | /* Override any GCC internal prototype to avoid an error. | |
11951 | Use char because int might match the return type of a GCC | |
11952 | builtin and then its argument prototype would still apply. */ | |
11953 | #ifdef __cplusplus | |
11954 | extern "C" | |
11955 | #endif | |
11956 | char TIFFGetVersion (); | |
11957 | int | |
11958 | main () | |
11959 | { | |
11960 | return TIFFGetVersion (); | |
11961 | ; | |
11962 | return 0; | |
11963 | } | |
11964 | _ACEOF | |
11965 | if ac_fn_c_try_link "$LINENO"; then : | |
11966 | ac_cv_lib_tiff_TIFFGetVersion=yes | |
11967 | else | |
11968 | ac_cv_lib_tiff_TIFFGetVersion=no | |
11969 | fi | |
11970 | rm -f core conftest.err conftest.$ac_objext \ | |
11971 | conftest$ac_exeext conftest.$ac_ext | |
11972 | LIBS=$ac_check_lib_save_LIBS | |
11973 | fi | |
11974 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5 | |
11975 | $as_echo "$ac_cv_lib_tiff_TIFFGetVersion" >&6; } | |
d6974efa | 11976 | if test "x$ac_cv_lib_tiff_TIFFGetVersion" = xyes; then : |
067d23c9 KY |
11977 | HAVE_TIFF=yes |
11978 | fi | |
11979 | ||
11980 | fi | |
11981 | ||
11982 | ||
11983 | fi | |
11984 | ||
11985 | if test "${HAVE_TIFF}" = "yes"; then | |
11986 | ||
11987 | $as_echo "#define HAVE_TIFF 1" >>confdefs.h | |
11988 | ||
11989 | LIBTIFF=-ltiff | |
11990 | fi | |
11991 | fi | |
11992 | ||
11993 | ||
11994 | ### Use -lgif or -lungif if available, unless `--with-gif=no'. | |
11995 | HAVE_GIF=no | |
11996 | LIBGIF= | |
11997 | if test "${HAVE_X11}" = "yes" && test "${with_gif}" != "no"; then | |
11998 | ac_fn_c_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default" | |
d6974efa | 11999 | if test "x$ac_cv_header_gif_lib_h" = xyes; then : |
067d23c9 KY |
12000 | # EGifPutExtensionLast only exists from version libungif-4.1.0b1. |
12001 | # Earlier versions can crash Emacs. | |
12002 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lgif" >&5 | |
12003 | $as_echo_n "checking for EGifPutExtensionLast in -lgif... " >&6; } | |
d6974efa | 12004 | if ${ac_cv_lib_gif_EGifPutExtensionLast+:} false; then : |
067d23c9 KY |
12005 | $as_echo_n "(cached) " >&6 |
12006 | else | |
12007 | ac_check_lib_save_LIBS=$LIBS | |
12008 | LIBS="-lgif $LIBS" | |
12009 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12010 | /* end confdefs.h. */ | |
12011 | ||
12012 | /* Override any GCC internal prototype to avoid an error. | |
12013 | Use char because int might match the return type of a GCC | |
12014 | builtin and then its argument prototype would still apply. */ | |
12015 | #ifdef __cplusplus | |
12016 | extern "C" | |
12017 | #endif | |
12018 | char EGifPutExtensionLast (); | |
12019 | int | |
12020 | main () | |
12021 | { | |
12022 | return EGifPutExtensionLast (); | |
12023 | ; | |
12024 | return 0; | |
12025 | } | |
12026 | _ACEOF | |
12027 | if ac_fn_c_try_link "$LINENO"; then : | |
12028 | ac_cv_lib_gif_EGifPutExtensionLast=yes | |
12029 | else | |
12030 | ac_cv_lib_gif_EGifPutExtensionLast=no | |
12031 | fi | |
12032 | rm -f core conftest.err conftest.$ac_objext \ | |
12033 | conftest$ac_exeext conftest.$ac_ext | |
12034 | LIBS=$ac_check_lib_save_LIBS | |
12035 | fi | |
12036 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_EGifPutExtensionLast" >&5 | |
12037 | $as_echo "$ac_cv_lib_gif_EGifPutExtensionLast" >&6; } | |
d6974efa | 12038 | if test "x$ac_cv_lib_gif_EGifPutExtensionLast" = xyes; then : |
067d23c9 KY |
12039 | HAVE_GIF=yes |
12040 | else | |
12041 | HAVE_GIF=maybe | |
12042 | fi | |
12043 | ||
12044 | fi | |
12045 | ||
12046 | ||
12047 | ||
12048 | if test "$HAVE_GIF" = yes; then | |
12049 | LIBGIF=-lgif | |
12050 | elif test "$HAVE_GIF" = maybe; then | |
12051 | # If gif_lib.h but no libgif, try libungif. | |
12052 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lungif" >&5 | |
12053 | $as_echo_n "checking for EGifPutExtensionLast in -lungif... " >&6; } | |
d6974efa | 12054 | if ${ac_cv_lib_ungif_EGifPutExtensionLast+:} false; then : |
067d23c9 KY |
12055 | $as_echo_n "(cached) " >&6 |
12056 | else | |
12057 | ac_check_lib_save_LIBS=$LIBS | |
12058 | LIBS="-lungif $LIBS" | |
12059 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12060 | /* end confdefs.h. */ | |
12061 | ||
12062 | /* Override any GCC internal prototype to avoid an error. | |
12063 | Use char because int might match the return type of a GCC | |
12064 | builtin and then its argument prototype would still apply. */ | |
12065 | #ifdef __cplusplus | |
12066 | extern "C" | |
12067 | #endif | |
12068 | char EGifPutExtensionLast (); | |
12069 | int | |
12070 | main () | |
12071 | { | |
12072 | return EGifPutExtensionLast (); | |
12073 | ; | |
12074 | return 0; | |
12075 | } | |
12076 | _ACEOF | |
12077 | if ac_fn_c_try_link "$LINENO"; then : | |
12078 | ac_cv_lib_ungif_EGifPutExtensionLast=yes | |
12079 | else | |
12080 | ac_cv_lib_ungif_EGifPutExtensionLast=no | |
12081 | fi | |
12082 | rm -f core conftest.err conftest.$ac_objext \ | |
12083 | conftest$ac_exeext conftest.$ac_ext | |
12084 | LIBS=$ac_check_lib_save_LIBS | |
12085 | fi | |
12086 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5 | |
12087 | $as_echo "$ac_cv_lib_ungif_EGifPutExtensionLast" >&6; } | |
d6974efa | 12088 | if test "x$ac_cv_lib_ungif_EGifPutExtensionLast" = xyes; then : |
067d23c9 KY |
12089 | HAVE_GIF=yes |
12090 | else | |
12091 | HAVE_GIF=no | |
12092 | fi | |
12093 | ||
12094 | test "$HAVE_GIF" = yes && LIBGIF=-lungif | |
12095 | fi | |
12096 | ||
12097 | if test "${HAVE_GIF}" = "yes"; then | |
12098 | ||
12099 | $as_echo "#define HAVE_GIF 1" >>confdefs.h | |
12100 | ||
12101 | fi | |
12102 | fi | |
12103 | ||
12104 | ||
12105 | if test "${HAVE_X11}" = "yes"; then | |
12106 | MISSING="" | |
12107 | WITH_NO="" | |
12108 | test "${with_xpm}" != "no" && test "${HAVE_XPM}" != "yes" && | |
12109 | MISSING="libXpm" && WITH_NO="--with-xpm=no" | |
12110 | test "${with_jpeg}" != "no" && test "${HAVE_JPEG}" != "yes" && | |
12111 | MISSING="$MISSING libjpeg" && WITH_NO="$WITH_NO --with-jpeg=no" | |
12112 | test "${with_png}" != "no" && test "${HAVE_PNG}" != "yes" && | |
12113 | MISSING="$MISSING libpng" && WITH_NO="$WITH_NO --with-png=no" | |
12114 | test "${with_gif}" != "no" && test "${HAVE_GIF}" != "yes" && | |
12115 | MISSING="$MISSING libgif/libungif" && WITH_NO="$WITH_NO --with-gif=no" | |
12116 | test "${with_tiff}" != "no" && test "${HAVE_TIFF}" != "yes" && | |
12117 | MISSING="$MISSING libtiff" && WITH_NO="$WITH_NO --with-tiff=no" | |
12118 | ||
12119 | if test "X${MISSING}" != X; then | |
2018939f | 12120 | as_fn_error $? "The following required libraries were not found: |
067d23c9 KY |
12121 | $MISSING |
12122 | Maybe some development libraries/packages are missing? | |
12123 | If you don't want to link with them give | |
12124 | $WITH_NO | |
12125 | as options to configure" "$LINENO" 5 | |
12126 | fi | |
12127 | fi | |
12128 | ||
12129 | ### Use -lgpm if available, unless `--with-gpm=no'. | |
12130 | HAVE_GPM=no | |
12131 | LIBGPM= | |
12132 | MOUSE_SUPPORT= | |
12133 | if test "${with_gpm}" != "no"; then | |
12134 | ac_fn_c_check_header_mongrel "$LINENO" "gpm.h" "ac_cv_header_gpm_h" "$ac_includes_default" | |
d6974efa | 12135 | if test "x$ac_cv_header_gpm_h" = xyes; then : |
067d23c9 KY |
12136 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Gpm_Open in -lgpm" >&5 |
12137 | $as_echo_n "checking for Gpm_Open in -lgpm... " >&6; } | |
d6974efa | 12138 | if ${ac_cv_lib_gpm_Gpm_Open+:} false; then : |
067d23c9 KY |
12139 | $as_echo_n "(cached) " >&6 |
12140 | else | |
12141 | ac_check_lib_save_LIBS=$LIBS | |
12142 | LIBS="-lgpm $LIBS" | |
12143 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12144 | /* end confdefs.h. */ | |
12145 | ||
12146 | /* Override any GCC internal prototype to avoid an error. | |
12147 | Use char because int might match the return type of a GCC | |
12148 | builtin and then its argument prototype would still apply. */ | |
12149 | #ifdef __cplusplus | |
12150 | extern "C" | |
12151 | #endif | |
12152 | char Gpm_Open (); | |
12153 | int | |
12154 | main () | |
12155 | { | |
12156 | return Gpm_Open (); | |
12157 | ; | |
12158 | return 0; | |
12159 | } | |
12160 | _ACEOF | |
12161 | if ac_fn_c_try_link "$LINENO"; then : | |
12162 | ac_cv_lib_gpm_Gpm_Open=yes | |
12163 | else | |
12164 | ac_cv_lib_gpm_Gpm_Open=no | |
12165 | fi | |
12166 | rm -f core conftest.err conftest.$ac_objext \ | |
12167 | conftest$ac_exeext conftest.$ac_ext | |
12168 | LIBS=$ac_check_lib_save_LIBS | |
12169 | fi | |
12170 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gpm_Gpm_Open" >&5 | |
12171 | $as_echo "$ac_cv_lib_gpm_Gpm_Open" >&6; } | |
d6974efa | 12172 | if test "x$ac_cv_lib_gpm_Gpm_Open" = xyes; then : |
067d23c9 KY |
12173 | HAVE_GPM=yes |
12174 | fi | |
12175 | ||
12176 | fi | |
12177 | ||
12178 | ||
12179 | ||
12180 | if test "${HAVE_GPM}" = "yes"; then | |
12181 | ||
12182 | $as_echo "#define HAVE_GPM 1" >>confdefs.h | |
12183 | ||
12184 | LIBGPM=-lgpm | |
12185 | ## May be reset below. | |
12186 | MOUSE_SUPPORT="\$(GPM_MOUSE_SUPPORT)" | |
12187 | fi | |
12188 | fi | |
12189 | ||
12190 | ||
12191 | ac_fn_c_check_header_mongrel "$LINENO" "malloc/malloc.h" "ac_cv_header_malloc_malloc_h" "$ac_includes_default" | |
d6974efa | 12192 | if test "x$ac_cv_header_malloc_malloc_h" = xyes; then : |
067d23c9 KY |
12193 | |
12194 | $as_echo "#define HAVE_MALLOC_MALLOC_H 1" >>confdefs.h | |
12195 | ||
12196 | fi | |
12197 | ||
12198 | ||
12199 | ||
12200 | C_SWITCH_X_SYSTEM= | |
12201 | ### Use NeXTstep API to implement GUI. | |
12202 | if test "${HAVE_NS}" = "yes"; then | |
12203 | ||
12204 | $as_echo "#define HAVE_NS 1" >>confdefs.h | |
12205 | ||
12206 | if test "${NS_IMPL_COCOA}" = "yes"; then | |
12207 | ||
12208 | $as_echo "#define NS_IMPL_COCOA 1" >>confdefs.h | |
12209 | ||
12210 | GNU_OBJC_CFLAGS= | |
12211 | fi | |
12212 | if test "${NS_IMPL_GNUSTEP}" = "yes"; then | |
12213 | ||
12214 | $as_echo "#define NS_IMPL_GNUSTEP 1" >>confdefs.h | |
12215 | ||
12216 | # See also .m.o rule in Makefile.in */ | |
12217 | # FIXME: are all these flags really needed? Document here why. */ | |
12218 | C_SWITCH_X_SYSTEM="-D_REENTRANT -fPIC -fno-strict-aliasing" | |
12219 | GNU_OBJC_CFLAGS="-fgnu-runtime -Wno-import -fconstant-string-class=NSConstantString -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGSWARN -DGSDIAGNOSE" | |
12220 | fi | |
12221 | if test "${NS_HAVE_NSINTEGER}" = "yes"; then | |
12222 | ||
12223 | $as_echo "#define NS_HAVE_NSINTEGER 1" >>confdefs.h | |
12224 | ||
12225 | fi | |
12226 | # We also have mouse menus. | |
12227 | HAVE_MENUS=yes | |
12228 | OTHER_FILES=ns-app | |
12229 | fi | |
12230 | ||
12231 | ||
12232 | ### Use session management (-lSM -lICE) if available | |
12233 | HAVE_X_SM=no | |
12234 | LIBXSM= | |
12235 | if test "${HAVE_X11}" = "yes"; then | |
12236 | ac_fn_c_check_header_mongrel "$LINENO" "X11/SM/SMlib.h" "ac_cv_header_X11_SM_SMlib_h" "$ac_includes_default" | |
d6974efa | 12237 | if test "x$ac_cv_header_X11_SM_SMlib_h" = xyes; then : |
067d23c9 KY |
12238 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SmcOpenConnection in -lSM" >&5 |
12239 | $as_echo_n "checking for SmcOpenConnection in -lSM... " >&6; } | |
d6974efa | 12240 | if ${ac_cv_lib_SM_SmcOpenConnection+:} false; then : |
067d23c9 KY |
12241 | $as_echo_n "(cached) " >&6 |
12242 | else | |
12243 | ac_check_lib_save_LIBS=$LIBS | |
12244 | LIBS="-lSM -lICE $LIBS" | |
12245 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12246 | /* end confdefs.h. */ | |
12247 | ||
12248 | /* Override any GCC internal prototype to avoid an error. | |
12249 | Use char because int might match the return type of a GCC | |
12250 | builtin and then its argument prototype would still apply. */ | |
12251 | #ifdef __cplusplus | |
12252 | extern "C" | |
12253 | #endif | |
12254 | char SmcOpenConnection (); | |
12255 | int | |
12256 | main () | |
12257 | { | |
12258 | return SmcOpenConnection (); | |
12259 | ; | |
12260 | return 0; | |
12261 | } | |
12262 | _ACEOF | |
12263 | if ac_fn_c_try_link "$LINENO"; then : | |
12264 | ac_cv_lib_SM_SmcOpenConnection=yes | |
12265 | else | |
12266 | ac_cv_lib_SM_SmcOpenConnection=no | |
12267 | fi | |
12268 | rm -f core conftest.err conftest.$ac_objext \ | |
12269 | conftest$ac_exeext conftest.$ac_ext | |
12270 | LIBS=$ac_check_lib_save_LIBS | |
12271 | fi | |
12272 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_SM_SmcOpenConnection" >&5 | |
12273 | $as_echo "$ac_cv_lib_SM_SmcOpenConnection" >&6; } | |
d6974efa | 12274 | if test "x$ac_cv_lib_SM_SmcOpenConnection" = xyes; then : |
067d23c9 KY |
12275 | HAVE_X_SM=yes |
12276 | fi | |
12277 | ||
12278 | fi | |
12279 | ||
12280 | ||
12281 | ||
12282 | if test "${HAVE_X_SM}" = "yes"; then | |
12283 | ||
12284 | $as_echo "#define HAVE_X_SM 1" >>confdefs.h | |
12285 | ||
12286 | LIBXSM="-lSM -lICE" | |
12287 | case "$LIBS" in | |
12288 | *-lSM*) ;; | |
12289 | *) LIBS="$LIBXSM $LIBS" ;; | |
12290 | esac | |
12291 | fi | |
12292 | fi | |
12293 | ||
12294 | ||
12295 | ### Use libxml (-lxml2) if available | |
12296 | if test "${with_xml2}" != "no"; then | |
12297 | ### I'm not sure what the version number should be, so I just guessed. | |
12298 | ||
12299 | succeeded=no | |
12300 | ||
12301 | # Extract the first word of "pkg-config", so it can be a program name with args. | |
12302 | set dummy pkg-config; ac_word=$2 | |
12303 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
12304 | $as_echo_n "checking for $ac_word... " >&6; } | |
d6974efa | 12305 | if ${ac_cv_path_PKG_CONFIG+:} false; then : |
067d23c9 KY |
12306 | $as_echo_n "(cached) " >&6 |
12307 | else | |
12308 | case $PKG_CONFIG in | |
12309 | [\\/]* | ?:[\\/]*) | |
12310 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
12311 | ;; | |
12312 | *) | |
12313 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
12314 | for as_dir in $PATH | |
12315 | do | |
12316 | IFS=$as_save_IFS | |
12317 | test -z "$as_dir" && as_dir=. | |
12318 | for ac_exec_ext in '' $ac_executable_extensions; do | |
12319 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
12320 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
12321 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
12322 | break 2 | |
12323 | fi | |
12324 | done | |
12325 | done | |
12326 | IFS=$as_save_IFS | |
12327 | ||
12328 | test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" | |
12329 | ;; | |
12330 | esac | |
12331 | fi | |
12332 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG | |
12333 | if test -n "$PKG_CONFIG"; then | |
12334 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
12335 | $as_echo "$PKG_CONFIG" >&6; } | |
12336 | else | |
12337 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
12338 | $as_echo "no" >&6; } | |
12339 | fi | |
12340 | ||
12341 | ||
12342 | ||
12343 | if test "$PKG_CONFIG" = "no" ; then | |
12344 | HAVE_LIBXML2=no | |
12345 | else | |
12346 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
12347 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
dab73760 CY |
12348 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxml-2.0 > 2.6.17" >&5 |
12349 | $as_echo_n "checking for libxml-2.0 > 2.6.17... " >&6; } | |
067d23c9 | 12350 | |
dab73760 | 12351 | if $PKG_CONFIG --exists "libxml-2.0 > 2.6.17" 2>&5; then |
067d23c9 KY |
12352 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
12353 | $as_echo "yes" >&6; } | |
12354 | succeeded=yes | |
12355 | ||
12356 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBXML2_CFLAGS" >&5 | |
12357 | $as_echo_n "checking LIBXML2_CFLAGS... " >&6; } | |
dab73760 | 12358 | LIBXML2_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0 > 2.6.17"|sed -e 's,///*,/,g'` |
067d23c9 KY |
12359 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBXML2_CFLAGS" >&5 |
12360 | $as_echo "$LIBXML2_CFLAGS" >&6; } | |
12361 | ||
12362 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBXML2_LIBS" >&5 | |
12363 | $as_echo_n "checking LIBXML2_LIBS... " >&6; } | |
dab73760 | 12364 | LIBXML2_LIBS=`$PKG_CONFIG --libs "libxml-2.0 > 2.6.17"|sed -e 's,///*,/,g'` |
067d23c9 KY |
12365 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBXML2_LIBS" >&5 |
12366 | $as_echo "$LIBXML2_LIBS" >&6; } | |
12367 | else | |
12368 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
12369 | $as_echo "no" >&6; } | |
12370 | LIBXML2_CFLAGS="" | |
12371 | LIBXML2_LIBS="" | |
12372 | ## If we have a custom action on failure, don't print errors, but | |
12373 | ## do set a variable so people can do so. | |
dab73760 | 12374 | LIBXML2_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libxml-2.0 > 2.6.17"` |
067d23c9 KY |
12375 | |
12376 | fi | |
12377 | ||
12378 | ||
12379 | ||
12380 | else | |
12381 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
12382 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
12383 | fi | |
12384 | fi | |
12385 | ||
12386 | if test $succeeded = yes; then | |
12387 | HAVE_LIBXML2=yes | |
12388 | else | |
12389 | HAVE_LIBXML2=no | |
12390 | fi | |
12391 | ||
12392 | if test "${HAVE_LIBXML2}" = "yes"; then | |
12393 | LIBS="$LIBXML2_LIBS $LIBS" | |
12394 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for htmlReadMemory in -lxml2" >&5 | |
12395 | $as_echo_n "checking for htmlReadMemory in -lxml2... " >&6; } | |
d6974efa | 12396 | if ${ac_cv_lib_xml2_htmlReadMemory+:} false; then : |
067d23c9 KY |
12397 | $as_echo_n "(cached) " >&6 |
12398 | else | |
12399 | ac_check_lib_save_LIBS=$LIBS | |
12400 | LIBS="-lxml2 $LIBS" | |
12401 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12402 | /* end confdefs.h. */ | |
12403 | ||
12404 | /* Override any GCC internal prototype to avoid an error. | |
12405 | Use char because int might match the return type of a GCC | |
12406 | builtin and then its argument prototype would still apply. */ | |
12407 | #ifdef __cplusplus | |
12408 | extern "C" | |
12409 | #endif | |
12410 | char htmlReadMemory (); | |
12411 | int | |
12412 | main () | |
12413 | { | |
12414 | return htmlReadMemory (); | |
12415 | ; | |
12416 | return 0; | |
12417 | } | |
12418 | _ACEOF | |
12419 | if ac_fn_c_try_link "$LINENO"; then : | |
12420 | ac_cv_lib_xml2_htmlReadMemory=yes | |
12421 | else | |
12422 | ac_cv_lib_xml2_htmlReadMemory=no | |
12423 | fi | |
12424 | rm -f core conftest.err conftest.$ac_objext \ | |
12425 | conftest$ac_exeext conftest.$ac_ext | |
12426 | LIBS=$ac_check_lib_save_LIBS | |
12427 | fi | |
12428 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_htmlReadMemory" >&5 | |
12429 | $as_echo "$ac_cv_lib_xml2_htmlReadMemory" >&6; } | |
d6974efa | 12430 | if test "x$ac_cv_lib_xml2_htmlReadMemory" = xyes; then : |
067d23c9 KY |
12431 | HAVE_LIBXML2=yes |
12432 | else | |
12433 | HAVE_LIBXML2=no | |
12434 | fi | |
12435 | ||
12436 | if test "${HAVE_LIBXML2}" = "yes"; then | |
12437 | ||
12438 | $as_echo "#define HAVE_LIBXML2 1" >>confdefs.h | |
12439 | ||
12440 | else | |
12441 | LIBXML2_LIBS="" | |
12442 | LIBXML2_CFLAGS="" | |
12443 | fi | |
12444 | fi | |
12445 | fi | |
12446 | ||
12447 | ||
12448 | ||
12449 | # If netdb.h doesn't declare h_errno, we must declare it by hand. | |
12450 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether netdb declares h_errno" >&5 | |
12451 | $as_echo_n "checking whether netdb declares h_errno... " >&6; } | |
d6974efa | 12452 | if ${emacs_cv_netdb_declares_h_errno+:} false; then : |
067d23c9 KY |
12453 | $as_echo_n "(cached) " >&6 |
12454 | else | |
12455 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12456 | /* end confdefs.h. */ | |
12457 | #include <netdb.h> | |
12458 | int | |
12459 | main () | |
12460 | { | |
12461 | return h_errno; | |
12462 | ; | |
12463 | return 0; | |
12464 | } | |
12465 | _ACEOF | |
12466 | if ac_fn_c_try_link "$LINENO"; then : | |
12467 | emacs_cv_netdb_declares_h_errno=yes | |
12468 | else | |
12469 | emacs_cv_netdb_declares_h_errno=no | |
12470 | fi | |
12471 | rm -f core conftest.err conftest.$ac_objext \ | |
12472 | conftest$ac_exeext conftest.$ac_ext | |
12473 | fi | |
12474 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_netdb_declares_h_errno" >&5 | |
12475 | $as_echo "$emacs_cv_netdb_declares_h_errno" >&6; } | |
12476 | if test $emacs_cv_netdb_declares_h_errno = yes; then | |
12477 | ||
12478 | $as_echo "#define HAVE_H_ERRNO 1" >>confdefs.h | |
12479 | ||
12480 | fi | |
12481 | ||
d6974efa PE |
12482 | ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" |
12483 | if test "x$ac_cv_type_size_t" = xyes; then : | |
12484 | ||
12485 | else | |
12486 | ||
12487 | cat >>confdefs.h <<_ACEOF | |
12488 | #define size_t unsigned int | |
12489 | _ACEOF | |
12490 | ||
12491 | fi | |
12492 | ||
067d23c9 KY |
12493 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works |
12494 | # for constant arguments. Useless! | |
12495 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 | |
12496 | $as_echo_n "checking for working alloca.h... " >&6; } | |
d6974efa | 12497 | if ${ac_cv_working_alloca_h+:} false; then : |
067d23c9 KY |
12498 | $as_echo_n "(cached) " >&6 |
12499 | else | |
12500 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12501 | /* end confdefs.h. */ | |
12502 | #include <alloca.h> | |
12503 | int | |
12504 | main () | |
12505 | { | |
12506 | char *p = (char *) alloca (2 * sizeof (int)); | |
12507 | if (p) return 0; | |
12508 | ; | |
12509 | return 0; | |
12510 | } | |
12511 | _ACEOF | |
12512 | if ac_fn_c_try_link "$LINENO"; then : | |
12513 | ac_cv_working_alloca_h=yes | |
12514 | else | |
12515 | ac_cv_working_alloca_h=no | |
12516 | fi | |
12517 | rm -f core conftest.err conftest.$ac_objext \ | |
12518 | conftest$ac_exeext conftest.$ac_ext | |
12519 | fi | |
12520 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 | |
12521 | $as_echo "$ac_cv_working_alloca_h" >&6; } | |
12522 | if test $ac_cv_working_alloca_h = yes; then | |
12523 | ||
12524 | $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h | |
12525 | ||
12526 | fi | |
12527 | ||
12528 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 | |
12529 | $as_echo_n "checking for alloca... " >&6; } | |
d6974efa | 12530 | if ${ac_cv_func_alloca_works+:} false; then : |
067d23c9 KY |
12531 | $as_echo_n "(cached) " >&6 |
12532 | else | |
12533 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12534 | /* end confdefs.h. */ | |
12535 | #ifdef __GNUC__ | |
12536 | # define alloca __builtin_alloca | |
12537 | #else | |
12538 | # ifdef _MSC_VER | |
12539 | # include <malloc.h> | |
12540 | # define alloca _alloca | |
12541 | # else | |
12542 | # ifdef HAVE_ALLOCA_H | |
12543 | # include <alloca.h> | |
12544 | # else | |
12545 | # ifdef _AIX | |
12546 | #pragma alloca | |
12547 | # else | |
12548 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
d6974efa | 12549 | void *alloca (size_t); |
067d23c9 KY |
12550 | # endif |
12551 | # endif | |
12552 | # endif | |
12553 | # endif | |
12554 | #endif | |
12555 | ||
12556 | int | |
12557 | main () | |
12558 | { | |
12559 | char *p = (char *) alloca (1); | |
12560 | if (p) return 0; | |
12561 | ; | |
12562 | return 0; | |
12563 | } | |
12564 | _ACEOF | |
12565 | if ac_fn_c_try_link "$LINENO"; then : | |
12566 | ac_cv_func_alloca_works=yes | |
12567 | else | |
12568 | ac_cv_func_alloca_works=no | |
12569 | fi | |
12570 | rm -f core conftest.err conftest.$ac_objext \ | |
12571 | conftest$ac_exeext conftest.$ac_ext | |
12572 | fi | |
12573 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 | |
12574 | $as_echo "$ac_cv_func_alloca_works" >&6; } | |
12575 | ||
12576 | if test $ac_cv_func_alloca_works = yes; then | |
12577 | ||
12578 | $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h | |
12579 | ||
12580 | else | |
12581 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
12582 | # that cause trouble. Some versions do not even contain alloca or | |
12583 | # contain a buggy version. If you still want to use their alloca, | |
12584 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
12585 | ||
12586 | ALLOCA=\${LIBOBJDIR}alloca.$ac_objext | |
12587 | ||
12588 | $as_echo "#define C_ALLOCA 1" >>confdefs.h | |
12589 | ||
12590 | ||
12591 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 | |
12592 | $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } | |
d6974efa | 12593 | if ${ac_cv_os_cray+:} false; then : |
067d23c9 KY |
12594 | $as_echo_n "(cached) " >&6 |
12595 | else | |
12596 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12597 | /* end confdefs.h. */ | |
12598 | #if defined CRAY && ! defined CRAY2 | |
12599 | webecray | |
12600 | #else | |
12601 | wenotbecray | |
12602 | #endif | |
12603 | ||
12604 | _ACEOF | |
12605 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
12606 | $EGREP "webecray" >/dev/null 2>&1; then : | |
12607 | ac_cv_os_cray=yes | |
12608 | else | |
12609 | ac_cv_os_cray=no | |
12610 | fi | |
12611 | rm -f conftest* | |
12612 | ||
12613 | fi | |
12614 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 | |
12615 | $as_echo "$ac_cv_os_cray" >&6; } | |
12616 | if test $ac_cv_os_cray = yes; then | |
12617 | for ac_func in _getb67 GETB67 getb67; do | |
12618 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
12619 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
2018939f | 12620 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : |
067d23c9 KY |
12621 | |
12622 | cat >>confdefs.h <<_ACEOF | |
12623 | #define CRAY_STACKSEG_END $ac_func | |
12624 | _ACEOF | |
12625 | ||
12626 | break | |
12627 | fi | |
12628 | ||
12629 | done | |
12630 | fi | |
12631 | ||
12632 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 | |
12633 | $as_echo_n "checking stack direction for C alloca... " >&6; } | |
d6974efa | 12634 | if ${ac_cv_c_stack_direction+:} false; then : |
067d23c9 KY |
12635 | $as_echo_n "(cached) " >&6 |
12636 | else | |
12637 | if test "$cross_compiling" = yes; then : | |
12638 | ac_cv_c_stack_direction=0 | |
12639 | else | |
12640 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12641 | /* end confdefs.h. */ | |
12642 | $ac_includes_default | |
12643 | int | |
12644 | find_stack_direction () | |
12645 | { | |
12646 | static char *addr = 0; | |
12647 | auto char dummy; | |
12648 | if (addr == 0) | |
12649 | { | |
12650 | addr = &dummy; | |
12651 | return find_stack_direction (); | |
12652 | } | |
12653 | else | |
12654 | return (&dummy > addr) ? 1 : -1; | |
12655 | } | |
12656 | ||
12657 | int | |
12658 | main () | |
12659 | { | |
12660 | return find_stack_direction () < 0; | |
12661 | } | |
12662 | _ACEOF | |
12663 | if ac_fn_c_try_run "$LINENO"; then : | |
12664 | ac_cv_c_stack_direction=1 | |
12665 | else | |
12666 | ac_cv_c_stack_direction=-1 | |
12667 | fi | |
12668 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
12669 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
12670 | fi | |
12671 | ||
12672 | fi | |
12673 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 | |
12674 | $as_echo "$ac_cv_c_stack_direction" >&6; } | |
12675 | cat >>confdefs.h <<_ACEOF | |
12676 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
12677 | _ACEOF | |
12678 | ||
12679 | ||
12680 | fi | |
12681 | ||
12682 | ||
12683 | if test x"$ac_cv_func_alloca_works" != xyes; then | |
2018939f | 12684 | as_fn_error $? "a system implementation of alloca is required " "$LINENO" 5 |
067d23c9 KY |
12685 | fi |
12686 | ||
12687 | # fmod, logb, and frexp are found in -lm on most systems. | |
12688 | # On HPUX 9.01, -lm does not contain logb, so check for sqrt. | |
12689 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5 | |
12690 | $as_echo_n "checking for sqrt in -lm... " >&6; } | |
d6974efa | 12691 | if ${ac_cv_lib_m_sqrt+:} false; then : |
067d23c9 KY |
12692 | $as_echo_n "(cached) " >&6 |
12693 | else | |
12694 | ac_check_lib_save_LIBS=$LIBS | |
12695 | LIBS="-lm $LIBS" | |
12696 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12697 | /* end confdefs.h. */ | |
12698 | ||
12699 | /* Override any GCC internal prototype to avoid an error. | |
12700 | Use char because int might match the return type of a GCC | |
12701 | builtin and then its argument prototype would still apply. */ | |
12702 | #ifdef __cplusplus | |
12703 | extern "C" | |
12704 | #endif | |
12705 | char sqrt (); | |
12706 | int | |
12707 | main () | |
12708 | { | |
12709 | return sqrt (); | |
12710 | ; | |
12711 | return 0; | |
12712 | } | |
12713 | _ACEOF | |
12714 | if ac_fn_c_try_link "$LINENO"; then : | |
12715 | ac_cv_lib_m_sqrt=yes | |
12716 | else | |
12717 | ac_cv_lib_m_sqrt=no | |
12718 | fi | |
12719 | rm -f core conftest.err conftest.$ac_objext \ | |
12720 | conftest$ac_exeext conftest.$ac_ext | |
12721 | LIBS=$ac_check_lib_save_LIBS | |
12722 | fi | |
12723 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sqrt" >&5 | |
12724 | $as_echo "$ac_cv_lib_m_sqrt" >&6; } | |
d6974efa | 12725 | if test "x$ac_cv_lib_m_sqrt" = xyes; then : |
067d23c9 KY |
12726 | cat >>confdefs.h <<_ACEOF |
12727 | #define HAVE_LIBM 1 | |
12728 | _ACEOF | |
12729 | ||
12730 | LIBS="-lm $LIBS" | |
12731 | ||
12732 | fi | |
12733 | ||
12734 | ||
12735 | # Check for mail-locking functions in a "mail" library. Probably this should | |
12736 | # have the same check as for liblockfile below. | |
12737 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -lmail" >&5 | |
12738 | $as_echo_n "checking for maillock in -lmail... " >&6; } | |
d6974efa | 12739 | if ${ac_cv_lib_mail_maillock+:} false; then : |
067d23c9 KY |
12740 | $as_echo_n "(cached) " >&6 |
12741 | else | |
12742 | ac_check_lib_save_LIBS=$LIBS | |
12743 | LIBS="-lmail $LIBS" | |
12744 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12745 | /* end confdefs.h. */ | |
12746 | ||
12747 | /* Override any GCC internal prototype to avoid an error. | |
12748 | Use char because int might match the return type of a GCC | |
12749 | builtin and then its argument prototype would still apply. */ | |
12750 | #ifdef __cplusplus | |
12751 | extern "C" | |
12752 | #endif | |
12753 | char maillock (); | |
12754 | int | |
12755 | main () | |
12756 | { | |
12757 | return maillock (); | |
12758 | ; | |
12759 | return 0; | |
12760 | } | |
12761 | _ACEOF | |
12762 | if ac_fn_c_try_link "$LINENO"; then : | |
12763 | ac_cv_lib_mail_maillock=yes | |
12764 | else | |
12765 | ac_cv_lib_mail_maillock=no | |
12766 | fi | |
12767 | rm -f core conftest.err conftest.$ac_objext \ | |
12768 | conftest$ac_exeext conftest.$ac_ext | |
12769 | LIBS=$ac_check_lib_save_LIBS | |
12770 | fi | |
12771 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mail_maillock" >&5 | |
12772 | $as_echo "$ac_cv_lib_mail_maillock" >&6; } | |
d6974efa | 12773 | if test "x$ac_cv_lib_mail_maillock" = xyes; then : |
067d23c9 KY |
12774 | have_mail=yes |
12775 | else | |
12776 | have_mail=no | |
12777 | fi | |
12778 | ||
12779 | if test $have_mail = yes; then | |
12780 | LIBS_MAIL=-lmail | |
12781 | LIBS="$LIBS_MAIL $LIBS" | |
12782 | ||
12783 | $as_echo "#define HAVE_LIBMAIL 1" >>confdefs.h | |
12784 | ||
12785 | else | |
12786 | LIBS_MAIL= | |
12787 | fi | |
12788 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -llockfile" >&5 | |
12789 | $as_echo_n "checking for maillock in -llockfile... " >&6; } | |
d6974efa | 12790 | if ${ac_cv_lib_lockfile_maillock+:} false; then : |
067d23c9 KY |
12791 | $as_echo_n "(cached) " >&6 |
12792 | else | |
12793 | ac_check_lib_save_LIBS=$LIBS | |
12794 | LIBS="-llockfile $LIBS" | |
12795 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12796 | /* end confdefs.h. */ | |
12797 | ||
12798 | /* Override any GCC internal prototype to avoid an error. | |
12799 | Use char because int might match the return type of a GCC | |
12800 | builtin and then its argument prototype would still apply. */ | |
12801 | #ifdef __cplusplus | |
12802 | extern "C" | |
12803 | #endif | |
12804 | char maillock (); | |
12805 | int | |
12806 | main () | |
12807 | { | |
12808 | return maillock (); | |
12809 | ; | |
12810 | return 0; | |
12811 | } | |
12812 | _ACEOF | |
12813 | if ac_fn_c_try_link "$LINENO"; then : | |
12814 | ac_cv_lib_lockfile_maillock=yes | |
12815 | else | |
12816 | ac_cv_lib_lockfile_maillock=no | |
12817 | fi | |
12818 | rm -f core conftest.err conftest.$ac_objext \ | |
12819 | conftest$ac_exeext conftest.$ac_ext | |
12820 | LIBS=$ac_check_lib_save_LIBS | |
12821 | fi | |
12822 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lockfile_maillock" >&5 | |
12823 | $as_echo "$ac_cv_lib_lockfile_maillock" >&6; } | |
d6974efa | 12824 | if test "x$ac_cv_lib_lockfile_maillock" = xyes; then : |
067d23c9 KY |
12825 | have_lockfile=yes |
12826 | else | |
12827 | have_lockfile=no | |
12828 | fi | |
12829 | ||
12830 | if test $have_lockfile = yes; then | |
12831 | LIBS_MAIL=-llockfile | |
12832 | LIBS="$LIBS_MAIL $LIBS" | |
12833 | ||
12834 | $as_echo "#define HAVE_LIBLOCKFILE 1" >>confdefs.h | |
12835 | ||
12836 | else | |
12837 | # If we have the shared liblockfile, assume we must use it for mail | |
12838 | # locking (e.g. Debian). If we couldn't link against liblockfile | |
12839 | # (no liblockfile.a installed), ensure that we don't need to. | |
12840 | # Extract the first word of "liblockfile.so", so it can be a program name with args. | |
12841 | set dummy liblockfile.so; ac_word=$2 | |
12842 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
12843 | $as_echo_n "checking for $ac_word... " >&6; } | |
d6974efa | 12844 | if ${ac_cv_prog_liblockfile+:} false; then : |
067d23c9 KY |
12845 | $as_echo_n "(cached) " >&6 |
12846 | else | |
12847 | if test -n "$liblockfile"; then | |
12848 | ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test. | |
12849 | else | |
12850 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
12851 | as_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH" | |
12852 | for as_dir in $as_dummy | |
12853 | do | |
12854 | IFS=$as_save_IFS | |
12855 | test -z "$as_dir" && as_dir=. | |
12856 | for ac_exec_ext in '' $ac_executable_extensions; do | |
12857 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
12858 | ac_cv_prog_liblockfile="yes" | |
12859 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
12860 | break 2 | |
12861 | fi | |
12862 | done | |
12863 | done | |
12864 | IFS=$as_save_IFS | |
12865 | ||
12866 | test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no" | |
12867 | fi | |
12868 | fi | |
12869 | liblockfile=$ac_cv_prog_liblockfile | |
12870 | if test -n "$liblockfile"; then | |
12871 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $liblockfile" >&5 | |
12872 | $as_echo "$liblockfile" >&6; } | |
12873 | else | |
12874 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
12875 | $as_echo "no" >&6; } | |
12876 | fi | |
12877 | ||
12878 | ||
12879 | if test $ac_cv_prog_liblockfile = yes; then | |
2018939f | 12880 | as_fn_error $? "Shared liblockfile found but can't link against it. |
067d23c9 KY |
12881 | This probably means that movemail could lose mail. |
12882 | There may be a \`development' package to install containing liblockfile." "$LINENO" 5 | |
12883 | fi | |
12884 | fi | |
12885 | for ac_func in touchlock | |
12886 | do : | |
12887 | ac_fn_c_check_func "$LINENO" "touchlock" "ac_cv_func_touchlock" | |
d6974efa | 12888 | if test "x$ac_cv_func_touchlock" = xyes; then : |
067d23c9 KY |
12889 | cat >>confdefs.h <<_ACEOF |
12890 | #define HAVE_TOUCHLOCK 1 | |
12891 | _ACEOF | |
12892 | ||
12893 | fi | |
12894 | done | |
12895 | ||
12896 | for ac_header in maillock.h | |
12897 | do : | |
12898 | ac_fn_c_check_header_mongrel "$LINENO" "maillock.h" "ac_cv_header_maillock_h" "$ac_includes_default" | |
d6974efa | 12899 | if test "x$ac_cv_header_maillock_h" = xyes; then : |
067d23c9 KY |
12900 | cat >>confdefs.h <<_ACEOF |
12901 | #define HAVE_MAILLOCK_H 1 | |
12902 | _ACEOF | |
12903 | ||
12904 | fi | |
12905 | ||
12906 | done | |
12907 | ||
12908 | ||
12909 | ||
12910 | ## Define MAIL_USE_FLOCK (or LOCKF) if the mailer uses flock (or lockf) to | |
12911 | ## interlock access to the mail spool. The alternative is a lock file named | |
12912 | ## /usr/spool/mail/$USER.lock. | |
12913 | mail_lock=no | |
12914 | case "$opsys" in | |
12915 | aix4-2) mail_lock="lockf" ;; | |
12916 | ||
12917 | gnu|freebsd|netbsd|openbsd|darwin|irix6-5) mail_lock="flock" ;; | |
12918 | ||
12919 | ## On GNU/Linux systems, both methods are used by various mail programs. | |
12920 | ## I assume most people are using newer mailers that have heard of flock. | |
12921 | ## Change this if you need to. | |
12922 | ## Debian contains a patch which says: ``On Debian/GNU/Linux systems, | |
12923 | ## configure gets the right answers, and that means *NOT* using flock. | |
12924 | ## Using flock is guaranteed to be the wrong thing. See Debian Policy | |
12925 | ## for details.'' and then uses `#ifdef DEBIAN'. Unfortunately the | |
12926 | ## Debian maintainer hasn't provided a clean fix for Emacs. | |
12927 | ## movemail.c will use `maillock' when MAILDIR, HAVE_LIBMAIL and | |
12928 | ## HAVE_MAILLOCK_H are defined, so the following appears to be the | |
12929 | ## correct logic. -- fx | |
12930 | ## We must check for HAVE_LIBLOCKFILE too, as movemail does. | |
12931 | ## liblockfile is a Free Software replacement for libmail, used on | |
12932 | ## Debian systems and elsewhere. -rfr. | |
12933 | gnu-*) | |
12934 | mail_lock="flock" | |
12935 | if test $have_mail = yes || test $have_lockfile = yes; then | |
12936 | test $ac_cv_header_maillock_h = yes && mail_lock=no | |
12937 | fi | |
12938 | ;; | |
12939 | esac | |
12940 | ||
12941 | BLESSMAIL_TARGET= | |
12942 | case "$mail_lock" in | |
12943 | flock) | |
12944 | $as_echo "#define MAIL_USE_FLOCK 1" >>confdefs.h | |
12945 | ;; | |
12946 | ||
12947 | lockf) | |
12948 | $as_echo "#define MAIL_USE_LOCKF 1" >>confdefs.h | |
12949 | ;; | |
12950 | ||
12951 | *) BLESSMAIL_TARGET="need-blessmail" ;; | |
12952 | esac | |
12953 | ||
12954 | ||
12955 | ||
12956 | for ac_func in gethostname getdomainname dup2 \ | |
12957 | rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \ | |
12958 | random lrand48 logb frexp fmod rint cbrt ftime setsid \ | |
1fd182f0 | 12959 | strerror fpathconf select euidaccess getpagesize tzset setlocale \ |
067d23c9 KY |
12960 | utimes getrlimit setrlimit setpgid getcwd getwd shutdown getaddrinfo \ |
12961 | __fpending mblen mbrlen mbsinit strsignal setitimer ualarm strchr strrchr \ | |
12962 | sendto recvfrom getsockopt setsockopt getsockname getpeername \ | |
12963 | gai_strerror mkstemp getline getdelim mremap memmove fsync sync \ | |
12964 | memset memcmp difftime memcpy mempcpy mblen mbrlen posix_memalign \ | |
12965 | cfmakeraw cfsetspeed isnan copysign __executable_start | |
12966 | do : | |
12967 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
12968 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
2018939f | 12969 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : |
067d23c9 KY |
12970 | cat >>confdefs.h <<_ACEOF |
12971 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
12972 | _ACEOF | |
12973 | ||
12974 | fi | |
12975 | done | |
12976 | ||
12977 | ||
2018939f AS |
12978 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unwind_init" >&5 |
12979 | $as_echo_n "checking for __builtin_unwind_init... " >&6; } | |
d6974efa | 12980 | if ${emacs_cv_func___builtin_unwind_init+:} false; then : |
2018939f AS |
12981 | $as_echo_n "(cached) " >&6 |
12982 | else | |
12983 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12984 | /* end confdefs.h. */ | |
12985 | ||
12986 | int | |
12987 | main () | |
12988 | { | |
12989 | __builtin_unwind_init (); | |
12990 | ; | |
12991 | return 0; | |
12992 | } | |
12993 | _ACEOF | |
12994 | if ac_fn_c_try_link "$LINENO"; then : | |
12995 | emacs_cv_func___builtin_unwind_init=yes | |
12996 | else | |
12997 | emacs_cv_func___builtin_unwind_init=no | |
12998 | fi | |
12999 | rm -f core conftest.err conftest.$ac_objext \ | |
13000 | conftest$ac_exeext conftest.$ac_ext | |
13001 | fi | |
13002 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_func___builtin_unwind_init" >&5 | |
13003 | $as_echo "$emacs_cv_func___builtin_unwind_init" >&6; } | |
13004 | if test $emacs_cv_func___builtin_unwind_init = yes; then | |
13005 | ||
13006 | $as_echo "#define HAVE___BUILTIN_UNWIND_INIT 1" >>confdefs.h | |
13007 | ||
13008 | fi | |
13009 | ||
067d23c9 KY |
13010 | for ac_header in sys/un.h |
13011 | do : | |
13012 | ac_fn_c_check_header_mongrel "$LINENO" "sys/un.h" "ac_cv_header_sys_un_h" "$ac_includes_default" | |
d6974efa | 13013 | if test "x$ac_cv_header_sys_un_h" = xyes; then : |
067d23c9 KY |
13014 | cat >>confdefs.h <<_ACEOF |
13015 | #define HAVE_SYS_UN_H 1 | |
13016 | _ACEOF | |
13017 | ||
13018 | fi | |
13019 | ||
13020 | done | |
13021 | ||
13022 | ||
1fd182f0 | 13023 | ac_have_func=no # yes means we've found a way to get the load average. |
067d23c9 KY |
13024 | |
13025 | # Make sure getloadavg.c is where it belongs, at configure-time. | |
13026 | test -f "$srcdir/$ac_config_libobj_dir/getloadavg.c" || | |
2018939f | 13027 | as_fn_error $? "$srcdir/$ac_config_libobj_dir/getloadavg.c is missing" "$LINENO" 5 |
067d23c9 KY |
13028 | |
13029 | ac_save_LIBS=$LIBS | |
13030 | ||
13031 | # Check for getloadavg, but be sure not to touch the cache variable. | |
13032 | (ac_fn_c_check_func "$LINENO" "getloadavg" "ac_cv_func_getloadavg" | |
d6974efa | 13033 | if test "x$ac_cv_func_getloadavg" = xyes; then : |
067d23c9 KY |
13034 | exit 0 |
13035 | else | |
13036 | exit 1 | |
13037 | fi | |
13038 | ) && ac_have_func=yes | |
13039 | ||
13040 | # On HPUX9, an unprivileged user can get load averages through this function. | |
13041 | for ac_func in pstat_getdynamic | |
13042 | do : | |
13043 | ac_fn_c_check_func "$LINENO" "pstat_getdynamic" "ac_cv_func_pstat_getdynamic" | |
d6974efa | 13044 | if test "x$ac_cv_func_pstat_getdynamic" = xyes; then : |
067d23c9 KY |
13045 | cat >>confdefs.h <<_ACEOF |
13046 | #define HAVE_PSTAT_GETDYNAMIC 1 | |
13047 | _ACEOF | |
13048 | ||
13049 | fi | |
13050 | done | |
13051 | ||
13052 | ||
13053 | # Solaris has libkstat which does not require root. | |
13054 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kstat_open in -lkstat" >&5 | |
13055 | $as_echo_n "checking for kstat_open in -lkstat... " >&6; } | |
d6974efa | 13056 | if ${ac_cv_lib_kstat_kstat_open+:} false; then : |
067d23c9 KY |
13057 | $as_echo_n "(cached) " >&6 |
13058 | else | |
13059 | ac_check_lib_save_LIBS=$LIBS | |
13060 | LIBS="-lkstat $LIBS" | |
13061 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13062 | /* end confdefs.h. */ | |
13063 | ||
13064 | /* Override any GCC internal prototype to avoid an error. | |
13065 | Use char because int might match the return type of a GCC | |
13066 | builtin and then its argument prototype would still apply. */ | |
13067 | #ifdef __cplusplus | |
13068 | extern "C" | |
13069 | #endif | |
13070 | char kstat_open (); | |
13071 | int | |
13072 | main () | |
13073 | { | |
13074 | return kstat_open (); | |
13075 | ; | |
13076 | return 0; | |
13077 | } | |
13078 | _ACEOF | |
13079 | if ac_fn_c_try_link "$LINENO"; then : | |
13080 | ac_cv_lib_kstat_kstat_open=yes | |
13081 | else | |
13082 | ac_cv_lib_kstat_kstat_open=no | |
13083 | fi | |
13084 | rm -f core conftest.err conftest.$ac_objext \ | |
13085 | conftest$ac_exeext conftest.$ac_ext | |
13086 | LIBS=$ac_check_lib_save_LIBS | |
13087 | fi | |
13088 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kstat_kstat_open" >&5 | |
13089 | $as_echo "$ac_cv_lib_kstat_kstat_open" >&6; } | |
d6974efa | 13090 | if test "x$ac_cv_lib_kstat_kstat_open" = xyes; then : |
067d23c9 KY |
13091 | cat >>confdefs.h <<_ACEOF |
13092 | #define HAVE_LIBKSTAT 1 | |
13093 | _ACEOF | |
13094 | ||
13095 | LIBS="-lkstat $LIBS" | |
13096 | ||
13097 | fi | |
13098 | ||
13099 | test $ac_cv_lib_kstat_kstat_open = yes && ac_have_func=yes | |
13100 | ||
13101 | # Some systems with -lutil have (and need) -lkvm as well, some do not. | |
13102 | # On Solaris, -lkvm requires nlist from -lelf, so check that first | |
13103 | # to get the right answer into the cache. | |
13104 | # For kstat on solaris, we need libelf to force the definition of SVR4 below. | |
13105 | if test $ac_have_func = no; then | |
13106 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_begin in -lelf" >&5 | |
13107 | $as_echo_n "checking for elf_begin in -lelf... " >&6; } | |
d6974efa | 13108 | if ${ac_cv_lib_elf_elf_begin+:} false; then : |
067d23c9 KY |
13109 | $as_echo_n "(cached) " >&6 |
13110 | else | |
13111 | ac_check_lib_save_LIBS=$LIBS | |
13112 | LIBS="-lelf $LIBS" | |
13113 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13114 | /* end confdefs.h. */ | |
13115 | ||
13116 | /* Override any GCC internal prototype to avoid an error. | |
13117 | Use char because int might match the return type of a GCC | |
13118 | builtin and then its argument prototype would still apply. */ | |
13119 | #ifdef __cplusplus | |
13120 | extern "C" | |
13121 | #endif | |
13122 | char elf_begin (); | |
13123 | int | |
13124 | main () | |
13125 | { | |
13126 | return elf_begin (); | |
13127 | ; | |
13128 | return 0; | |
13129 | } | |
13130 | _ACEOF | |
13131 | if ac_fn_c_try_link "$LINENO"; then : | |
13132 | ac_cv_lib_elf_elf_begin=yes | |
13133 | else | |
13134 | ac_cv_lib_elf_elf_begin=no | |
13135 | fi | |
13136 | rm -f core conftest.err conftest.$ac_objext \ | |
13137 | conftest$ac_exeext conftest.$ac_ext | |
13138 | LIBS=$ac_check_lib_save_LIBS | |
13139 | fi | |
13140 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_elf_elf_begin" >&5 | |
13141 | $as_echo "$ac_cv_lib_elf_elf_begin" >&6; } | |
d6974efa | 13142 | if test "x$ac_cv_lib_elf_elf_begin" = xyes; then : |
067d23c9 KY |
13143 | LIBS="-lelf $LIBS" |
13144 | fi | |
13145 | ||
13146 | fi | |
13147 | if test $ac_have_func = no; then | |
13148 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kvm_open in -lkvm" >&5 | |
13149 | $as_echo_n "checking for kvm_open in -lkvm... " >&6; } | |
d6974efa | 13150 | if ${ac_cv_lib_kvm_kvm_open+:} false; then : |
067d23c9 KY |
13151 | $as_echo_n "(cached) " >&6 |
13152 | else | |
13153 | ac_check_lib_save_LIBS=$LIBS | |
13154 | LIBS="-lkvm $LIBS" | |
13155 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13156 | /* end confdefs.h. */ | |
13157 | ||
13158 | /* Override any GCC internal prototype to avoid an error. | |
13159 | Use char because int might match the return type of a GCC | |
13160 | builtin and then its argument prototype would still apply. */ | |
13161 | #ifdef __cplusplus | |
13162 | extern "C" | |
13163 | #endif | |
13164 | char kvm_open (); | |
13165 | int | |
13166 | main () | |
13167 | { | |
13168 | return kvm_open (); | |
13169 | ; | |
13170 | return 0; | |
13171 | } | |
13172 | _ACEOF | |
13173 | if ac_fn_c_try_link "$LINENO"; then : | |
13174 | ac_cv_lib_kvm_kvm_open=yes | |
13175 | else | |
13176 | ac_cv_lib_kvm_kvm_open=no | |
13177 | fi | |
13178 | rm -f core conftest.err conftest.$ac_objext \ | |
13179 | conftest$ac_exeext conftest.$ac_ext | |
13180 | LIBS=$ac_check_lib_save_LIBS | |
13181 | fi | |
13182 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kvm_kvm_open" >&5 | |
13183 | $as_echo "$ac_cv_lib_kvm_kvm_open" >&6; } | |
d6974efa | 13184 | if test "x$ac_cv_lib_kvm_kvm_open" = xyes; then : |
067d23c9 KY |
13185 | LIBS="-lkvm $LIBS" |
13186 | fi | |
13187 | ||
13188 | # Check for the 4.4BSD definition of getloadavg. | |
13189 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lutil" >&5 | |
13190 | $as_echo_n "checking for getloadavg in -lutil... " >&6; } | |
d6974efa | 13191 | if ${ac_cv_lib_util_getloadavg+:} false; then : |
067d23c9 KY |
13192 | $as_echo_n "(cached) " >&6 |
13193 | else | |
13194 | ac_check_lib_save_LIBS=$LIBS | |
13195 | LIBS="-lutil $LIBS" | |
13196 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13197 | /* end confdefs.h. */ | |
13198 | ||
13199 | /* Override any GCC internal prototype to avoid an error. | |
13200 | Use char because int might match the return type of a GCC | |
13201 | builtin and then its argument prototype would still apply. */ | |
13202 | #ifdef __cplusplus | |
13203 | extern "C" | |
13204 | #endif | |
13205 | char getloadavg (); | |
13206 | int | |
13207 | main () | |
13208 | { | |
13209 | return getloadavg (); | |
13210 | ; | |
13211 | return 0; | |
13212 | } | |
13213 | _ACEOF | |
13214 | if ac_fn_c_try_link "$LINENO"; then : | |
13215 | ac_cv_lib_util_getloadavg=yes | |
13216 | else | |
13217 | ac_cv_lib_util_getloadavg=no | |
13218 | fi | |
13219 | rm -f core conftest.err conftest.$ac_objext \ | |
13220 | conftest$ac_exeext conftest.$ac_ext | |
13221 | LIBS=$ac_check_lib_save_LIBS | |
13222 | fi | |
13223 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_getloadavg" >&5 | |
13224 | $as_echo "$ac_cv_lib_util_getloadavg" >&6; } | |
d6974efa | 13225 | if test "x$ac_cv_lib_util_getloadavg" = xyes; then : |
067d23c9 KY |
13226 | LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes |
13227 | fi | |
13228 | ||
13229 | fi | |
13230 | ||
13231 | if test $ac_have_func = no; then | |
13232 | # There is a commonly available library for RS/6000 AIX. | |
13233 | # Since it is not a standard part of AIX, it might be installed locally. | |
13234 | ac_getloadavg_LIBS=$LIBS | |
13235 | LIBS="-L/usr/local/lib $LIBS" | |
13236 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lgetloadavg" >&5 | |
13237 | $as_echo_n "checking for getloadavg in -lgetloadavg... " >&6; } | |
d6974efa | 13238 | if ${ac_cv_lib_getloadavg_getloadavg+:} false; then : |
067d23c9 KY |
13239 | $as_echo_n "(cached) " >&6 |
13240 | else | |
13241 | ac_check_lib_save_LIBS=$LIBS | |
13242 | LIBS="-lgetloadavg $LIBS" | |
13243 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13244 | /* end confdefs.h. */ | |
13245 | ||
13246 | /* Override any GCC internal prototype to avoid an error. | |
13247 | Use char because int might match the return type of a GCC | |
13248 | builtin and then its argument prototype would still apply. */ | |
13249 | #ifdef __cplusplus | |
13250 | extern "C" | |
13251 | #endif | |
13252 | char getloadavg (); | |
13253 | int | |
13254 | main () | |
13255 | { | |
13256 | return getloadavg (); | |
13257 | ; | |
13258 | return 0; | |
13259 | } | |
13260 | _ACEOF | |
13261 | if ac_fn_c_try_link "$LINENO"; then : | |
13262 | ac_cv_lib_getloadavg_getloadavg=yes | |
13263 | else | |
13264 | ac_cv_lib_getloadavg_getloadavg=no | |
13265 | fi | |
13266 | rm -f core conftest.err conftest.$ac_objext \ | |
13267 | conftest$ac_exeext conftest.$ac_ext | |
13268 | LIBS=$ac_check_lib_save_LIBS | |
13269 | fi | |
13270 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_getloadavg_getloadavg" >&5 | |
13271 | $as_echo "$ac_cv_lib_getloadavg_getloadavg" >&6; } | |
d6974efa | 13272 | if test "x$ac_cv_lib_getloadavg_getloadavg" = xyes; then : |
067d23c9 KY |
13273 | LIBS="-lgetloadavg $LIBS" |
13274 | else | |
13275 | LIBS=$ac_getloadavg_LIBS | |
13276 | fi | |
13277 | ||
13278 | fi | |
13279 | ||
13280 | # Make sure it is really in the library, if we think we found it, | |
13281 | # otherwise set up the replacement function. | |
13282 | for ac_func in getloadavg | |
13283 | do : | |
13284 | ac_fn_c_check_func "$LINENO" "getloadavg" "ac_cv_func_getloadavg" | |
d6974efa | 13285 | if test "x$ac_cv_func_getloadavg" = xyes; then : |
067d23c9 KY |
13286 | cat >>confdefs.h <<_ACEOF |
13287 | #define HAVE_GETLOADAVG 1 | |
13288 | _ACEOF | |
13289 | ||
13290 | else | |
13291 | case " $LIBOBJS " in | |
13292 | *" getloadavg.$ac_objext "* ) ;; | |
13293 | *) LIBOBJS="$LIBOBJS getloadavg.$ac_objext" | |
13294 | ;; | |
13295 | esac | |
13296 | ||
13297 | ||
13298 | $as_echo "#define C_GETLOADAVG 1" >>confdefs.h | |
13299 | ||
13300 | # Figure out what our getloadavg.c needs. | |
13301 | ac_have_func=no | |
13302 | ac_fn_c_check_header_mongrel "$LINENO" "sys/dg_sys_info.h" "ac_cv_header_sys_dg_sys_info_h" "$ac_includes_default" | |
d6974efa | 13303 | if test "x$ac_cv_header_sys_dg_sys_info_h" = xyes; then : |
067d23c9 KY |
13304 | ac_have_func=yes |
13305 | ||
13306 | $as_echo "#define DGUX 1" >>confdefs.h | |
13307 | ||
13308 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dg_sys_info in -ldgc" >&5 | |
13309 | $as_echo_n "checking for dg_sys_info in -ldgc... " >&6; } | |
d6974efa | 13310 | if ${ac_cv_lib_dgc_dg_sys_info+:} false; then : |
067d23c9 KY |
13311 | $as_echo_n "(cached) " >&6 |
13312 | else | |
13313 | ac_check_lib_save_LIBS=$LIBS | |
13314 | LIBS="-ldgc $LIBS" | |
13315 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13316 | /* end confdefs.h. */ | |
13317 | ||
13318 | /* Override any GCC internal prototype to avoid an error. | |
13319 | Use char because int might match the return type of a GCC | |
13320 | builtin and then its argument prototype would still apply. */ | |
13321 | #ifdef __cplusplus | |
13322 | extern "C" | |
13323 | #endif | |
13324 | char dg_sys_info (); | |
13325 | int | |
13326 | main () | |
13327 | { | |
13328 | return dg_sys_info (); | |
13329 | ; | |
13330 | return 0; | |
13331 | } | |
13332 | _ACEOF | |
13333 | if ac_fn_c_try_link "$LINENO"; then : | |
13334 | ac_cv_lib_dgc_dg_sys_info=yes | |
13335 | else | |
13336 | ac_cv_lib_dgc_dg_sys_info=no | |
13337 | fi | |
13338 | rm -f core conftest.err conftest.$ac_objext \ | |
13339 | conftest$ac_exeext conftest.$ac_ext | |
13340 | LIBS=$ac_check_lib_save_LIBS | |
13341 | fi | |
13342 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dgc_dg_sys_info" >&5 | |
13343 | $as_echo "$ac_cv_lib_dgc_dg_sys_info" >&6; } | |
d6974efa | 13344 | if test "x$ac_cv_lib_dgc_dg_sys_info" = xyes; then : |
067d23c9 KY |
13345 | cat >>confdefs.h <<_ACEOF |
13346 | #define HAVE_LIBDGC 1 | |
13347 | _ACEOF | |
13348 | ||
13349 | LIBS="-ldgc $LIBS" | |
13350 | ||
13351 | fi | |
13352 | ||
13353 | fi | |
13354 | ||
13355 | ||
13356 | ||
13357 | ac_fn_c_check_header_mongrel "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default" | |
d6974efa | 13358 | if test "x$ac_cv_header_locale_h" = xyes; then : |
067d23c9 KY |
13359 | |
13360 | fi | |
13361 | ||
13362 | ||
13363 | for ac_func in setlocale | |
13364 | do : | |
13365 | ac_fn_c_check_func "$LINENO" "setlocale" "ac_cv_func_setlocale" | |
d6974efa | 13366 | if test "x$ac_cv_func_setlocale" = xyes; then : |
067d23c9 KY |
13367 | cat >>confdefs.h <<_ACEOF |
13368 | #define HAVE_SETLOCALE 1 | |
13369 | _ACEOF | |
13370 | ||
13371 | fi | |
13372 | done | |
13373 | ||
13374 | ||
13375 | # We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it | |
13376 | # uses stabs), but it is still SVR4. We cannot check for <elf.h> because | |
13377 | # Irix 4.0.5F has the header but not the library. | |
d6974efa PE |
13378 | if test $ac_have_func = no && test "$ac_cv_lib_elf_elf_begin" = yes \ |
13379 | && test "$ac_cv_lib_kvm_kvm_open" = yes; then | |
067d23c9 KY |
13380 | ac_have_func=yes |
13381 | ||
13382 | $as_echo "#define SVR4 1" >>confdefs.h | |
13383 | ||
13384 | fi | |
13385 | ||
13386 | if test $ac_have_func = no; then | |
13387 | ac_fn_c_check_header_mongrel "$LINENO" "inq_stats/cpustats.h" "ac_cv_header_inq_stats_cpustats_h" "$ac_includes_default" | |
d6974efa | 13388 | if test "x$ac_cv_header_inq_stats_cpustats_h" = xyes; then : |
067d23c9 KY |
13389 | ac_have_func=yes |
13390 | ||
13391 | $as_echo "#define UMAX 1" >>confdefs.h | |
13392 | ||
13393 | ||
13394 | $as_echo "#define UMAX4_3 1" >>confdefs.h | |
13395 | ||
13396 | fi | |
13397 | ||
13398 | ||
13399 | fi | |
13400 | ||
13401 | if test $ac_have_func = no; then | |
13402 | ac_fn_c_check_header_mongrel "$LINENO" "sys/cpustats.h" "ac_cv_header_sys_cpustats_h" "$ac_includes_default" | |
d6974efa | 13403 | if test "x$ac_cv_header_sys_cpustats_h" = xyes; then : |
067d23c9 KY |
13404 | ac_have_func=yes; $as_echo "#define UMAX 1" >>confdefs.h |
13405 | ||
13406 | fi | |
13407 | ||
13408 | ||
13409 | fi | |
13410 | ||
13411 | if test $ac_have_func = no; then | |
13412 | for ac_header in mach/mach.h | |
13413 | do : | |
13414 | ac_fn_c_check_header_mongrel "$LINENO" "mach/mach.h" "ac_cv_header_mach_mach_h" "$ac_includes_default" | |
d6974efa | 13415 | if test "x$ac_cv_header_mach_mach_h" = xyes; then : |
067d23c9 KY |
13416 | cat >>confdefs.h <<_ACEOF |
13417 | #define HAVE_MACH_MACH_H 1 | |
13418 | _ACEOF | |
13419 | ||
13420 | fi | |
13421 | ||
13422 | done | |
13423 | ||
13424 | fi | |
13425 | ||
13426 | for ac_header in nlist.h | |
13427 | do : | |
13428 | ac_fn_c_check_header_mongrel "$LINENO" "nlist.h" "ac_cv_header_nlist_h" "$ac_includes_default" | |
d6974efa | 13429 | if test "x$ac_cv_header_nlist_h" = xyes; then : |
067d23c9 KY |
13430 | cat >>confdefs.h <<_ACEOF |
13431 | #define HAVE_NLIST_H 1 | |
13432 | _ACEOF | |
13433 | ac_fn_c_check_member "$LINENO" "struct nlist" "n_un.n_name" "ac_cv_member_struct_nlist_n_un_n_name" "#include <nlist.h> | |
13434 | " | |
d6974efa | 13435 | if test "x$ac_cv_member_struct_nlist_n_un_n_name" = xyes; then : |
067d23c9 KY |
13436 | |
13437 | cat >>confdefs.h <<_ACEOF | |
13438 | #define HAVE_STRUCT_NLIST_N_UN_N_NAME 1 | |
13439 | _ACEOF | |
13440 | ||
13441 | ||
13442 | $as_echo "#define NLIST_NAME_UNION 1" >>confdefs.h | |
13443 | ||
13444 | fi | |
13445 | ||
13446 | ||
13447 | fi | |
13448 | ||
13449 | done | |
13450 | ||
13451 | fi | |
13452 | done | |
13453 | ||
13454 | ||
13455 | # Some definitions of getloadavg require that the program be installed setgid. | |
13456 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getloadavg requires setgid" >&5 | |
13457 | $as_echo_n "checking whether getloadavg requires setgid... " >&6; } | |
d6974efa | 13458 | if ${ac_cv_func_getloadavg_setgid+:} false; then : |
067d23c9 KY |
13459 | $as_echo_n "(cached) " >&6 |
13460 | else | |
13461 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13462 | /* end confdefs.h. */ | |
13463 | #include "$srcdir/$ac_config_libobj_dir/getloadavg.c" | |
13464 | #ifdef LDAV_PRIVILEGED | |
13465 | Yowza Am I SETGID yet | |
13466 | #endif | |
13467 | _ACEOF | |
13468 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
13469 | $EGREP "Yowza Am I SETGID yet" >/dev/null 2>&1; then : | |
13470 | ac_cv_func_getloadavg_setgid=yes | |
13471 | else | |
13472 | ac_cv_func_getloadavg_setgid=no | |
13473 | fi | |
13474 | rm -f conftest* | |
13475 | ||
13476 | fi | |
13477 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getloadavg_setgid" >&5 | |
13478 | $as_echo "$ac_cv_func_getloadavg_setgid" >&6; } | |
13479 | if test $ac_cv_func_getloadavg_setgid = yes; then | |
13480 | NEED_SETGID=true | |
13481 | ||
13482 | $as_echo "#define GETLOADAVG_PRIVILEGED 1" >>confdefs.h | |
13483 | ||
13484 | else | |
13485 | NEED_SETGID=false | |
13486 | fi | |
13487 | ||
13488 | if test $ac_cv_func_getloadavg_setgid = yes; then | |
13489 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking group of /dev/kmem" >&5 | |
13490 | $as_echo_n "checking group of /dev/kmem... " >&6; } | |
d6974efa | 13491 | if ${ac_cv_group_kmem+:} false; then : |
067d23c9 KY |
13492 | $as_echo_n "(cached) " >&6 |
13493 | else | |
13494 | # On Solaris, /dev/kmem is a symlink. Get info on the real file. | |
13495 | ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null` | |
13496 | # If we got an error (system does not support symlinks), try without -L. | |
13497 | test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem` | |
13498 | ac_cv_group_kmem=`$as_echo "$ac_ls_output" \ | |
13499 | | sed -ne 's/[ ][ ]*/ /g; | |
13500 | s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/; | |
13501 | / /s/.* //;p;'` | |
13502 | ||
13503 | fi | |
13504 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_group_kmem" >&5 | |
13505 | $as_echo "$ac_cv_group_kmem" >&6; } | |
13506 | KMEM_GROUP=$ac_cv_group_kmem | |
13507 | fi | |
13508 | if test "x$ac_save_LIBS" = x; then | |
13509 | GETLOADAVG_LIBS=$LIBS | |
13510 | else | |
13511 | GETLOADAVG_LIBS=`$as_echo "$LIBS" | sed "s|$ac_save_LIBS||"` | |
13512 | fi | |
13513 | LIBS=$ac_save_LIBS | |
13514 | ||
13515 | ||
13516 | ||
13517 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5 | |
13518 | $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; } | |
d6974efa | 13519 | if ${ac_cv_sys_largefile_source+:} false; then : |
067d23c9 KY |
13520 | $as_echo_n "(cached) " >&6 |
13521 | else | |
13522 | while :; do | |
13523 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13524 | /* end confdefs.h. */ | |
13525 | #include <sys/types.h> /* for off_t */ | |
13526 | #include <stdio.h> | |
13527 | int | |
13528 | main () | |
13529 | { | |
13530 | int (*fp) (FILE *, off_t, int) = fseeko; | |
13531 | return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); | |
13532 | ; | |
13533 | return 0; | |
13534 | } | |
13535 | _ACEOF | |
13536 | if ac_fn_c_try_link "$LINENO"; then : | |
13537 | ac_cv_sys_largefile_source=no; break | |
13538 | fi | |
13539 | rm -f core conftest.err conftest.$ac_objext \ | |
13540 | conftest$ac_exeext conftest.$ac_ext | |
13541 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13542 | /* end confdefs.h. */ | |
13543 | #define _LARGEFILE_SOURCE 1 | |
13544 | #include <sys/types.h> /* for off_t */ | |
13545 | #include <stdio.h> | |
13546 | int | |
13547 | main () | |
13548 | { | |
13549 | int (*fp) (FILE *, off_t, int) = fseeko; | |
13550 | return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); | |
13551 | ; | |
13552 | return 0; | |
13553 | } | |
13554 | _ACEOF | |
13555 | if ac_fn_c_try_link "$LINENO"; then : | |
13556 | ac_cv_sys_largefile_source=1; break | |
13557 | fi | |
1fd182f0 PE |
13558 | rm -f core conftest.err conftest.$ac_objext \ |
13559 | conftest$ac_exeext conftest.$ac_ext | |
13560 | ac_cv_sys_largefile_source=unknown | |
13561 | break | |
13562 | done | |
13563 | fi | |
13564 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5 | |
13565 | $as_echo "$ac_cv_sys_largefile_source" >&6; } | |
13566 | case $ac_cv_sys_largefile_source in #( | |
13567 | no | unknown) ;; | |
13568 | *) | |
13569 | cat >>confdefs.h <<_ACEOF | |
13570 | #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source | |
13571 | _ACEOF | |
13572 | ;; | |
13573 | esac | |
13574 | rm -rf conftest* | |
13575 | ||
13576 | # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug | |
13577 | # in glibc 2.1.3, but that breaks too many other things. | |
13578 | # If you want fseeko and ftello with glibc, upgrade to a fixed glibc. | |
13579 | if test $ac_cv_sys_largefile_source != unknown; then | |
13580 | ||
13581 | $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h | |
13582 | ||
13583 | fi | |
13584 | ||
13585 | ||
1fd182f0 PE |
13586 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getpgrp requires zero arguments" >&5 |
13587 | $as_echo_n "checking whether getpgrp requires zero arguments... " >&6; } | |
d6974efa | 13588 | if ${ac_cv_func_getpgrp_void+:} false; then : |
1fd182f0 PE |
13589 | $as_echo_n "(cached) " >&6 |
13590 | else | |
13591 | # Use it with a single arg. | |
13592 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13593 | /* end confdefs.h. */ | |
13594 | $ac_includes_default | |
13595 | int | |
13596 | main () | |
13597 | { | |
13598 | getpgrp (0); | |
13599 | ; | |
13600 | return 0; | |
13601 | } | |
13602 | _ACEOF | |
13603 | if ac_fn_c_try_compile "$LINENO"; then : | |
13604 | ac_cv_func_getpgrp_void=no | |
13605 | else | |
13606 | ac_cv_func_getpgrp_void=yes | |
13607 | fi | |
13608 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
13609 | ||
13610 | fi | |
13611 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getpgrp_void" >&5 | |
13612 | $as_echo "$ac_cv_func_getpgrp_void" >&6; } | |
13613 | if test $ac_cv_func_getpgrp_void = yes; then | |
13614 | ||
13615 | $as_echo "#define GETPGRP_VOID 1" >>confdefs.h | |
13616 | ||
13617 | fi | |
13618 | ||
13619 | ||
13620 | # Configure gnulib. | |
13621 | ||
13622 | ||
13623 | ||
13624 | ||
b06b1098 PE |
13625 | |
13626 | ||
13627 | ||
d6974efa PE |
13628 | |
13629 | ||
13630 | ||
1fd182f0 PE |
13631 | LIBC_FATAL_STDERR_=1 |
13632 | export LIBC_FATAL_STDERR_ | |
13633 | ||
13634 | ||
13635 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtold conforms to C99" >&5 | |
13636 | $as_echo_n "checking whether strtold conforms to C99... " >&6; } | |
d6974efa | 13637 | if ${gl_cv_func_c99_strtold+:} false; then : |
1fd182f0 PE |
13638 | $as_echo_n "(cached) " >&6 |
13639 | else | |
13640 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13641 | /* end confdefs.h. */ | |
13642 | /* On HP-UX before 11.23, strtold returns a struct instead of | |
13643 | long double. Reject implementations like that, by requiring | |
13644 | compatibility with the C99 prototype. */ | |
13645 | #include <stdlib.h> | |
13646 | static long double (*p) (char const *, char **) = strtold; | |
13647 | static long double | |
13648 | test (char const *nptr, char **endptr) | |
13649 | { | |
13650 | long double r; | |
13651 | r = strtold (nptr, endptr); | |
13652 | return r; | |
13653 | } | |
13654 | int | |
13655 | main () | |
13656 | { | |
13657 | return test ("1.0", NULL) != 1 || p ("1.0", NULL) != 1; | |
13658 | ; | |
13659 | return 0; | |
13660 | } | |
13661 | _ACEOF | |
13662 | if ac_fn_c_try_link "$LINENO"; then : | |
13663 | gl_cv_func_c99_strtold=yes | |
13664 | else | |
13665 | gl_cv_func_c99_strtold=no | |
13666 | fi | |
13667 | rm -f core conftest.err conftest.$ac_objext \ | |
13668 | conftest$ac_exeext conftest.$ac_ext | |
13669 | fi | |
13670 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_c99_strtold" >&5 | |
13671 | $as_echo "$gl_cv_func_c99_strtold" >&6; } | |
13672 | if test $gl_cv_func_c99_strtold = yes; then | |
13673 | ||
13674 | $as_echo "#define HAVE_C99_STRTOLD 1" >>confdefs.h | |
13675 | ||
13676 | fi | |
13677 | ||
13678 | ||
e275c824 PE |
13679 | GNULIB_CHOWN=0; |
13680 | GNULIB_CLOSE=0; | |
13681 | GNULIB_DUP2=0; | |
13682 | GNULIB_DUP3=0; | |
13683 | GNULIB_ENVIRON=0; | |
13684 | GNULIB_EUIDACCESS=0; | |
13685 | GNULIB_FACCESSAT=0; | |
13686 | GNULIB_FCHDIR=0; | |
13687 | GNULIB_FCHOWNAT=0; | |
13688 | GNULIB_FSYNC=0; | |
13689 | GNULIB_FTRUNCATE=0; | |
13690 | GNULIB_GETCWD=0; | |
13691 | GNULIB_GETDOMAINNAME=0; | |
13692 | GNULIB_GETDTABLESIZE=0; | |
13693 | GNULIB_GETGROUPS=0; | |
13694 | GNULIB_GETHOSTNAME=0; | |
13695 | GNULIB_GETLOGIN=0; | |
13696 | GNULIB_GETLOGIN_R=0; | |
13697 | GNULIB_GETPAGESIZE=0; | |
13698 | GNULIB_GETUSERSHELL=0; | |
13699 | GNULIB_LCHOWN=0; | |
13700 | GNULIB_LINK=0; | |
13701 | GNULIB_LINKAT=0; | |
13702 | GNULIB_LSEEK=0; | |
13703 | GNULIB_PIPE=0; | |
13704 | GNULIB_PIPE2=0; | |
13705 | GNULIB_PREAD=0; | |
13706 | GNULIB_PWRITE=0; | |
13707 | GNULIB_READLINK=0; | |
13708 | GNULIB_READLINKAT=0; | |
13709 | GNULIB_RMDIR=0; | |
13710 | GNULIB_SLEEP=0; | |
13711 | GNULIB_SYMLINK=0; | |
13712 | GNULIB_SYMLINKAT=0; | |
13713 | GNULIB_TTYNAME_R=0; | |
13714 | GNULIB_UNISTD_H_GETOPT=0; | |
13715 | GNULIB_UNISTD_H_SIGPIPE=0; | |
13716 | GNULIB_UNLINK=0; | |
13717 | GNULIB_UNLINKAT=0; | |
13718 | GNULIB_USLEEP=0; | |
13719 | GNULIB_WRITE=0; | |
13720 | HAVE_CHOWN=1; | |
13721 | HAVE_DUP2=1; | |
13722 | HAVE_DUP3=1; | |
13723 | HAVE_EUIDACCESS=1; | |
13724 | HAVE_FACCESSAT=1; | |
13725 | HAVE_FCHDIR=1; | |
13726 | HAVE_FCHOWNAT=1; | |
13727 | HAVE_FSYNC=1; | |
13728 | HAVE_FTRUNCATE=1; | |
13729 | HAVE_GETDTABLESIZE=1; | |
13730 | HAVE_GETGROUPS=1; | |
13731 | HAVE_GETHOSTNAME=1; | |
13732 | HAVE_GETLOGIN=1; | |
13733 | HAVE_GETPAGESIZE=1; | |
13734 | HAVE_LCHOWN=1; | |
13735 | HAVE_LINK=1; | |
13736 | HAVE_LINKAT=1; | |
13737 | HAVE_PIPE=1; | |
13738 | HAVE_PIPE2=1; | |
13739 | HAVE_PREAD=1; | |
13740 | HAVE_PWRITE=1; | |
13741 | HAVE_READLINK=1; | |
13742 | HAVE_READLINKAT=1; | |
13743 | HAVE_SLEEP=1; | |
13744 | HAVE_SYMLINK=1; | |
13745 | HAVE_SYMLINKAT=1; | |
13746 | HAVE_UNLINKAT=1; | |
13747 | HAVE_USLEEP=1; | |
13748 | HAVE_DECL_ENVIRON=1; | |
13749 | HAVE_DECL_FCHDIR=1; | |
13750 | HAVE_DECL_GETDOMAINNAME=1; | |
13751 | HAVE_DECL_GETLOGIN_R=1; | |
13752 | HAVE_DECL_GETPAGESIZE=1; | |
13753 | HAVE_DECL_GETUSERSHELL=1; | |
13754 | HAVE_DECL_TTYNAME_R=1; | |
13755 | HAVE_OS_H=0; | |
13756 | HAVE_SYS_PARAM_H=0; | |
13757 | REPLACE_CHOWN=0; | |
13758 | REPLACE_CLOSE=0; | |
13759 | REPLACE_DUP=0; | |
13760 | REPLACE_DUP2=0; | |
13761 | REPLACE_FCHOWNAT=0; | |
13762 | REPLACE_GETCWD=0; | |
13763 | REPLACE_GETDOMAINNAME=0; | |
13764 | REPLACE_GETLOGIN_R=0; | |
13765 | REPLACE_GETGROUPS=0; | |
13766 | REPLACE_GETPAGESIZE=0; | |
13767 | REPLACE_LCHOWN=0; | |
13768 | REPLACE_LINK=0; | |
13769 | REPLACE_LINKAT=0; | |
13770 | REPLACE_LSEEK=0; | |
13771 | REPLACE_PREAD=0; | |
13772 | REPLACE_PWRITE=0; | |
13773 | REPLACE_READLINK=0; | |
13774 | REPLACE_RMDIR=0; | |
13775 | REPLACE_SLEEP=0; | |
13776 | REPLACE_SYMLINK=0; | |
13777 | REPLACE_TTYNAME_R=0; | |
13778 | REPLACE_UNLINK=0; | |
13779 | REPLACE_UNLINKAT=0; | |
13780 | REPLACE_USLEEP=0; | |
13781 | REPLACE_WRITE=0; | |
13782 | UNISTD_H_HAVE_WINSOCK2_H=0; | |
13783 | UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0; | |
1fd182f0 PE |
13784 | |
13785 | ||
13786 | ||
13787 | ||
e275c824 PE |
13788 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5 |
13789 | $as_echo_n "checking whether the preprocessor supports include_next... " >&6; } | |
d6974efa | 13790 | if ${gl_cv_have_include_next+:} false; then : |
e275c824 PE |
13791 | $as_echo_n "(cached) " >&6 |
13792 | else | |
13793 | rm -rf conftestd1a conftestd1b conftestd2 | |
13794 | mkdir conftestd1a conftestd1b conftestd2 | |
13795 | cat <<EOF > conftestd1a/conftest.h | |
13796 | #define DEFINED_IN_CONFTESTD1 | |
13797 | #include_next <conftest.h> | |
13798 | #ifdef DEFINED_IN_CONFTESTD2 | |
13799 | int foo; | |
13800 | #else | |
13801 | #error "include_next doesn't work" | |
13802 | #endif | |
13803 | EOF | |
13804 | cat <<EOF > conftestd1b/conftest.h | |
13805 | #define DEFINED_IN_CONFTESTD1 | |
13806 | #include <stdio.h> | |
13807 | #include_next <conftest.h> | |
13808 | #ifdef DEFINED_IN_CONFTESTD2 | |
13809 | int foo; | |
13810 | #else | |
13811 | #error "include_next doesn't work" | |
13812 | #endif | |
13813 | EOF | |
13814 | cat <<EOF > conftestd2/conftest.h | |
13815 | #ifndef DEFINED_IN_CONFTESTD1 | |
13816 | #error "include_next test doesn't work" | |
13817 | #endif | |
13818 | #define DEFINED_IN_CONFTESTD2 | |
13819 | EOF | |
13820 | gl_save_CPPFLAGS="$CPPFLAGS" | |
13821 | CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2" | |
13822 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13823 | /* end confdefs.h. */ | |
13824 | #include <conftest.h> | |
1fd182f0 | 13825 | _ACEOF |
e275c824 PE |
13826 | if ac_fn_c_try_compile "$LINENO"; then : |
13827 | gl_cv_have_include_next=yes | |
13828 | else | |
13829 | CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2" | |
13830 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1fd182f0 | 13831 | /* end confdefs.h. */ |
e275c824 | 13832 | #include <conftest.h> |
1fd182f0 PE |
13833 | _ACEOF |
13834 | if ac_fn_c_try_compile "$LINENO"; then : | |
e275c824 PE |
13835 | gl_cv_have_include_next=buggy |
13836 | else | |
13837 | gl_cv_have_include_next=no | |
1fd182f0 PE |
13838 | fi |
13839 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1fd182f0 | 13840 | |
e275c824 PE |
13841 | fi |
13842 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
13843 | CPPFLAGS="$gl_save_CPPFLAGS" | |
13844 | rm -rf conftestd1a conftestd1b conftestd2 | |
1fd182f0 | 13845 | |
e275c824 PE |
13846 | fi |
13847 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5 | |
13848 | $as_echo "$gl_cv_have_include_next" >&6; } | |
13849 | PRAGMA_SYSTEM_HEADER= | |
13850 | if test $gl_cv_have_include_next = yes; then | |
13851 | INCLUDE_NEXT=include_next | |
13852 | INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next | |
13853 | if test -n "$GCC"; then | |
13854 | PRAGMA_SYSTEM_HEADER='#pragma GCC system_header' | |
13855 | fi | |
1fd182f0 | 13856 | else |
e275c824 PE |
13857 | if test $gl_cv_have_include_next = buggy; then |
13858 | INCLUDE_NEXT=include | |
13859 | INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next | |
13860 | else | |
13861 | INCLUDE_NEXT=include | |
13862 | INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include | |
13863 | fi | |
1fd182f0 PE |
13864 | fi |
13865 | ||
13866 | ||
e275c824 PE |
13867 | |
13868 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5 | |
13869 | $as_echo_n "checking whether system header files limit the line length... " >&6; } | |
d6974efa | 13870 | if ${gl_cv_pragma_columns+:} false; then : |
1fd182f0 PE |
13871 | $as_echo_n "(cached) " >&6 |
13872 | else | |
e275c824 | 13873 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
1fd182f0 | 13874 | /* end confdefs.h. */ |
1fd182f0 | 13875 | |
e275c824 PE |
13876 | #ifdef __TANDEM |
13877 | choke me | |
13878 | #endif | |
13879 | ||
13880 | _ACEOF | |
13881 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
13882 | $EGREP "choke me" >/dev/null 2>&1; then : | |
13883 | gl_cv_pragma_columns=yes | |
13884 | else | |
13885 | gl_cv_pragma_columns=no | |
13886 | fi | |
13887 | rm -f conftest* | |
13888 | ||
13889 | ||
13890 | fi | |
13891 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5 | |
13892 | $as_echo "$gl_cv_pragma_columns" >&6; } | |
13893 | if test $gl_cv_pragma_columns = yes; then | |
13894 | PRAGMA_COLUMNS="#pragma COLUMNS 10000" | |
13895 | else | |
13896 | PRAGMA_COLUMNS= | |
13897 | fi | |
13898 | ||
13899 | ||
13900 | ||
13901 | ||
13902 | ||
13903 | ||
13904 | ||
13905 | ||
13906 | ||
13907 | ||
13908 | ||
13909 | ||
13910 | ||
13911 | ||
b06b1098 PE |
13912 | |
13913 | ||
13914 | ||
e275c824 PE |
13915 | if test $gl_cv_have_include_next = yes; then |
13916 | gl_cv_next_getopt_h='<'getopt.h'>' | |
13917 | else | |
13918 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <getopt.h>" >&5 | |
13919 | $as_echo_n "checking absolute name of <getopt.h>... " >&6; } | |
d6974efa | 13920 | if ${gl_cv_next_getopt_h+:} false; then : |
e275c824 PE |
13921 | $as_echo_n "(cached) " >&6 |
13922 | else | |
13923 | ||
b06b1098 PE |
13924 | if test $ac_cv_header_getopt_h = yes; then |
13925 | ||
13926 | ||
13927 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
e275c824 PE |
13928 | /* end confdefs.h. */ |
13929 | #include <getopt.h> | |
13930 | ||
13931 | _ACEOF | |
b06b1098 PE |
13932 | case "$host_os" in |
13933 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
13934 | *) gl_absname_cpp="$ac_cpp" ;; | |
13935 | esac | |
13936 | gl_cv_next_getopt_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
13937 | sed -n '\#/getopt.h#{ | |
13938 | s#.*"\(.*/getopt.h\)".*#\1# | |
13939 | s#^/[^/]#//&# | |
13940 | p | |
13941 | q | |
13942 | }'`'"' | |
e275c824 | 13943 | else |
b06b1098 PE |
13944 | gl_cv_next_getopt_h='<'getopt.h'>' |
13945 | fi | |
13946 | ||
e275c824 PE |
13947 | |
13948 | fi | |
13949 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5 | |
13950 | $as_echo "$gl_cv_next_getopt_h" >&6; } | |
13951 | fi | |
13952 | NEXT_GETOPT_H=$gl_cv_next_getopt_h | |
13953 | ||
13954 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then | |
13955 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
13956 | gl_next_as_first_directive='<'getopt.h'>' | |
13957 | else | |
13958 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
13959 | gl_next_as_first_directive=$gl_cv_next_getopt_h | |
13960 | fi | |
13961 | NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive | |
13962 | ||
13963 | ||
13964 | ||
13965 | ||
13966 | if test $ac_cv_header_getopt_h = yes; then | |
13967 | HAVE_GETOPT_H=1 | |
13968 | else | |
13969 | HAVE_GETOPT_H=0 | |
13970 | fi | |
13971 | ||
13972 | ||
13973 | gl_replace_getopt= | |
13974 | ||
13975 | if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then | |
13976 | for ac_header in getopt.h | |
13977 | do : | |
13978 | ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default" | |
d6974efa | 13979 | if test "x$ac_cv_header_getopt_h" = xyes; then : |
e275c824 PE |
13980 | cat >>confdefs.h <<_ACEOF |
13981 | #define HAVE_GETOPT_H 1 | |
13982 | _ACEOF | |
13983 | ||
13984 | else | |
13985 | gl_replace_getopt=yes | |
13986 | fi | |
13987 | ||
13988 | done | |
13989 | ||
13990 | fi | |
13991 | ||
13992 | if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then | |
13993 | for ac_func in getopt_long_only | |
13994 | do : | |
13995 | ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only" | |
d6974efa | 13996 | if test "x$ac_cv_func_getopt_long_only" = xyes; then : |
e275c824 PE |
13997 | cat >>confdefs.h <<_ACEOF |
13998 | #define HAVE_GETOPT_LONG_ONLY 1 | |
13999 | _ACEOF | |
14000 | ||
14001 | else | |
14002 | gl_replace_getopt=yes | |
14003 | fi | |
14004 | done | |
14005 | ||
14006 | fi | |
14007 | ||
d6974efa PE |
14008 | if test -z "$gl_replace_getopt"; then |
14009 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5 | |
14010 | $as_echo_n "checking whether getopt is POSIX compatible... " >&6; } | |
14011 | if ${gl_cv_func_getopt_posix+:} false; then : | |
14012 | $as_echo_n "(cached) " >&6 | |
e275c824 | 14013 | else |
e275c824 | 14014 | |
d6974efa PE |
14015 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
14016 | /* end confdefs.h. */ | |
14017 | #include <unistd.h> | |
14018 | int | |
14019 | main () | |
14020 | { | |
14021 | int *p = &optreset; return optreset; | |
14022 | ; | |
14023 | return 0; | |
14024 | } | |
e275c824 | 14025 | _ACEOF |
d6974efa PE |
14026 | if ac_fn_c_try_compile "$LINENO"; then : |
14027 | gl_optind_min=1 | |
e275c824 | 14028 | else |
d6974efa PE |
14029 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
14030 | /* end confdefs.h. */ | |
14031 | #include <getopt.h> | |
14032 | int | |
14033 | main () | |
14034 | { | |
14035 | return !getopt_clip; | |
14036 | ; | |
14037 | return 0; | |
14038 | } | |
14039 | _ACEOF | |
14040 | if ac_fn_c_try_compile "$LINENO"; then : | |
14041 | gl_optind_min=1 | |
e275c824 | 14042 | else |
d6974efa | 14043 | gl_optind_min=0 |
e275c824 | 14044 | fi |
d6974efa | 14045 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
e275c824 | 14046 | fi |
d6974efa | 14047 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
e275c824 | 14048 | |
d6974efa PE |
14049 | gl_save_CPPFLAGS=$CPPFLAGS |
14050 | CPPFLAGS="$CPPFLAGS -DOPTIND_MIN=$gl_optind_min" | |
14051 | if test "$cross_compiling" = yes; then : | |
e275c824 PE |
14052 | case "$host_os" in |
14053 | mingw*) gl_cv_func_getopt_posix="guessing no";; | |
14054 | darwin* | aix*) gl_cv_func_getopt_posix="guessing no";; | |
14055 | *) gl_cv_func_getopt_posix="guessing yes";; | |
14056 | esac | |
14057 | ||
14058 | else | |
14059 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14060 | /* end confdefs.h. */ | |
14061 | ||
14062 | #include <unistd.h> | |
14063 | #include <stdlib.h> | |
14064 | #include <string.h> | |
14065 | ||
e275c824 PE |
14066 | int |
14067 | main () | |
14068 | { | |
14069 | { | |
14070 | int argc = 0; | |
14071 | char *argv[10]; | |
14072 | int c; | |
14073 | ||
14074 | argv[argc++] = "program"; | |
14075 | argv[argc++] = "-a"; | |
14076 | argv[argc++] = "foo"; | |
14077 | argv[argc++] = "bar"; | |
14078 | argv[argc] = NULL; | |
14079 | optind = OPTIND_MIN; | |
14080 | opterr = 0; | |
14081 | ||
14082 | c = getopt (argc, argv, "ab"); | |
14083 | if (!(c == 'a')) | |
14084 | return 1; | |
14085 | c = getopt (argc, argv, "ab"); | |
14086 | if (!(c == -1)) | |
14087 | return 2; | |
14088 | if (!(optind == 2)) | |
14089 | return 3; | |
14090 | } | |
14091 | /* Some internal state exists at this point. */ | |
14092 | { | |
14093 | int argc = 0; | |
14094 | char *argv[10]; | |
14095 | int c; | |
14096 | ||
14097 | argv[argc++] = "program"; | |
14098 | argv[argc++] = "donald"; | |
14099 | argv[argc++] = "-p"; | |
14100 | argv[argc++] = "billy"; | |
14101 | argv[argc++] = "duck"; | |
14102 | argv[argc++] = "-a"; | |
14103 | argv[argc++] = "bar"; | |
14104 | argv[argc] = NULL; | |
14105 | optind = OPTIND_MIN; | |
14106 | opterr = 0; | |
14107 | ||
14108 | c = getopt (argc, argv, "+abp:q:"); | |
14109 | if (!(c == -1)) | |
14110 | return 4; | |
14111 | if (!(strcmp (argv[0], "program") == 0)) | |
14112 | return 5; | |
14113 | if (!(strcmp (argv[1], "donald") == 0)) | |
14114 | return 6; | |
14115 | if (!(strcmp (argv[2], "-p") == 0)) | |
14116 | return 7; | |
14117 | if (!(strcmp (argv[3], "billy") == 0)) | |
14118 | return 8; | |
14119 | if (!(strcmp (argv[4], "duck") == 0)) | |
14120 | return 9; | |
14121 | if (!(strcmp (argv[5], "-a") == 0)) | |
14122 | return 10; | |
14123 | if (!(strcmp (argv[6], "bar") == 0)) | |
14124 | return 11; | |
14125 | if (!(optind == 1)) | |
14126 | return 12; | |
14127 | } | |
14128 | /* Detect MacOS 10.5, AIX 7.1 bug. */ | |
14129 | { | |
14130 | char *argv[3] = { "program", "-ab", NULL }; | |
14131 | optind = OPTIND_MIN; | |
14132 | opterr = 0; | |
14133 | if (getopt (2, argv, "ab:") != 'a') | |
14134 | return 13; | |
14135 | if (getopt (2, argv, "ab:") != '?') | |
14136 | return 14; | |
14137 | if (optopt != 'b') | |
14138 | return 15; | |
14139 | if (optind != 2) | |
14140 | return 16; | |
14141 | } | |
14142 | ||
14143 | return 0; | |
14144 | } | |
14145 | ||
14146 | _ACEOF | |
14147 | if ac_fn_c_try_run "$LINENO"; then : | |
14148 | gl_cv_func_getopt_posix=yes | |
14149 | else | |
14150 | gl_cv_func_getopt_posix=no | |
14151 | fi | |
14152 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
14153 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
14154 | fi | |
14155 | ||
d6974efa | 14156 | CPPFLAGS=$gl_save_CPPFLAGS |
e275c824 PE |
14157 | |
14158 | fi | |
14159 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5 | |
14160 | $as_echo "$gl_cv_func_getopt_posix" >&6; } | |
14161 | case "$gl_cv_func_getopt_posix" in | |
14162 | *no) gl_replace_getopt=yes ;; | |
14163 | esac | |
14164 | fi | |
14165 | ||
14166 | if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then | |
14167 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5 | |
14168 | $as_echo_n "checking for working GNU getopt function... " >&6; } | |
d6974efa | 14169 | if ${gl_cv_func_getopt_gnu+:} false; then : |
e275c824 PE |
14170 | $as_echo_n "(cached) " >&6 |
14171 | else | |
14172 | # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the | |
14173 | # optstring is necessary for programs like m4 that have POSIX-mandated | |
14174 | # semantics for supporting options interspersed with files. | |
14175 | # Also, since getopt_long is a GNU extension, we require optind=0. | |
14176 | # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT; | |
14177 | # so take care to revert to the correct (non-)export state. | |
14178 | gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }' | |
14179 | case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" </dev/null` in | |
14180 | xx) gl_had_POSIXLY_CORRECT=exported ;; | |
14181 | x) gl_had_POSIXLY_CORRECT=yes ;; | |
14182 | *) gl_had_POSIXLY_CORRECT= ;; | |
14183 | esac | |
14184 | POSIXLY_CORRECT=1 | |
14185 | export POSIXLY_CORRECT | |
14186 | if test "$cross_compiling" = yes; then : | |
14187 | case $host_os:$ac_cv_have_decl_optreset in | |
14188 | *-gnu*:* | mingw*:*) gl_cv_func_getopt_gnu=no;; | |
14189 | *:yes) gl_cv_func_getopt_gnu=no;; | |
14190 | *) gl_cv_func_getopt_gnu=yes;; | |
14191 | esac | |
14192 | ||
14193 | else | |
14194 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14195 | /* end confdefs.h. */ | |
14196 | #include <getopt.h> | |
14197 | #include <stddef.h> | |
14198 | #include <string.h> | |
14199 | ||
14200 | int | |
14201 | main () | |
14202 | { | |
14203 | ||
14204 | int result = 0; | |
14205 | /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw, | |
14206 | and fails on MacOS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5, | |
14207 | OSF/1 5.1, Solaris 10. */ | |
14208 | { | |
14209 | char *myargv[3]; | |
14210 | myargv[0] = "conftest"; | |
14211 | myargv[1] = "-+"; | |
14212 | myargv[2] = 0; | |
14213 | opterr = 0; | |
14214 | if (getopt (2, myargv, "+a") != '?') | |
14215 | result |= 1; | |
14216 | } | |
14217 | /* This code succeeds on glibc 2.8, mingw, | |
14218 | and fails on MacOS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11, | |
14219 | IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */ | |
14220 | { | |
14221 | char *argv[] = { "program", "-p", "foo", "bar", NULL }; | |
14222 | ||
14223 | optind = 1; | |
14224 | if (getopt (4, argv, "p::") != 'p') | |
14225 | result |= 2; | |
14226 | else if (optarg != NULL) | |
14227 | result |= 4; | |
14228 | else if (getopt (4, argv, "p::") != -1) | |
14229 | result |= 6; | |
14230 | else if (optind != 2) | |
14231 | result |= 8; | |
14232 | } | |
14233 | /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */ | |
14234 | { | |
14235 | char *argv[] = { "program", "foo", "-p", NULL }; | |
14236 | optind = 0; | |
14237 | if (getopt (3, argv, "-p") != 1) | |
14238 | result |= 16; | |
14239 | else if (getopt (3, argv, "-p") != 'p') | |
14240 | result |= 32; | |
14241 | } | |
14242 | /* This code fails on glibc 2.11. */ | |
14243 | { | |
14244 | char *argv[] = { "program", "-b", "-a", NULL }; | |
14245 | optind = opterr = 0; | |
14246 | if (getopt (3, argv, "+:a:b") != 'b') | |
14247 | result |= 64; | |
14248 | else if (getopt (3, argv, "+:a:b") != ':') | |
14249 | result |= 64; | |
14250 | } | |
14251 | return result; | |
14252 | ||
14253 | ; | |
14254 | return 0; | |
14255 | } | |
14256 | _ACEOF | |
14257 | if ac_fn_c_try_run "$LINENO"; then : | |
14258 | gl_cv_func_getopt_gnu=yes | |
14259 | else | |
14260 | gl_cv_func_getopt_gnu=no | |
14261 | fi | |
14262 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
14263 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
14264 | fi | |
14265 | ||
14266 | case $gl_had_POSIXLY_CORRECT in | |
14267 | exported) ;; | |
14268 | yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;; | |
14269 | *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;; | |
14270 | esac | |
14271 | ||
14272 | fi | |
14273 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5 | |
14274 | $as_echo "$gl_cv_func_getopt_gnu" >&6; } | |
14275 | if test "$gl_cv_func_getopt_gnu" = "no"; then | |
14276 | gl_replace_getopt=yes | |
14277 | fi | |
14278 | fi | |
14279 | ||
14280 | ac_fn_c_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default" | |
d6974efa | 14281 | if test "x$ac_cv_have_decl_getenv" = xyes; then : |
e275c824 PE |
14282 | ac_have_decl=1 |
14283 | else | |
14284 | ac_have_decl=0 | |
14285 | fi | |
14286 | ||
14287 | cat >>confdefs.h <<_ACEOF | |
14288 | #define HAVE_DECL_GETENV $ac_have_decl | |
14289 | _ACEOF | |
14290 | ||
14291 | ||
14292 | ||
14293 | ||
14294 | ||
14295 | ||
14296 | if test -n "$gl_replace_getopt"; then : | |
14297 | ||
14298 | ||
14299 | ||
14300 | GETOPT_H=getopt.h | |
14301 | ||
14302 | $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h | |
14303 | ||
14304 | ||
14305 | ||
14306 | GNULIB_UNISTD_H_GETOPT=1 | |
14307 | ||
14308 | ||
14309 | ||
14310 | ||
14311 | ||
14312 | ||
14313 | ||
14314 | ||
14315 | gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext" | |
14316 | ||
14317 | ||
14318 | ||
14319 | ||
14320 | ||
14321 | ||
14322 | ||
14323 | ||
14324 | ||
14325 | gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext" | |
14326 | ||
14327 | ||
14328 | ||
14329 | ||
14330 | ||
14331 | ||
14332 | fi | |
14333 | ||
14334 | ||
67342916 PE |
14335 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 |
14336 | $as_echo_n "checking for inline... " >&6; } | |
14337 | if ${ac_cv_c_inline+:} false; then : | |
14338 | $as_echo_n "(cached) " >&6 | |
14339 | else | |
14340 | ac_cv_c_inline=no | |
14341 | for ac_kw in inline __inline__ __inline; do | |
14342 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14343 | /* end confdefs.h. */ | |
14344 | #ifndef __cplusplus | |
14345 | typedef int foo_t; | |
14346 | static $ac_kw foo_t static_foo () {return 0; } | |
14347 | $ac_kw foo_t foo () {return 0; } | |
14348 | #endif | |
14349 | ||
14350 | _ACEOF | |
14351 | if ac_fn_c_try_compile "$LINENO"; then : | |
14352 | ac_cv_c_inline=$ac_kw | |
14353 | fi | |
14354 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
14355 | test "$ac_cv_c_inline" != no && break | |
14356 | done | |
14357 | ||
14358 | fi | |
14359 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 | |
14360 | $as_echo "$ac_cv_c_inline" >&6; } | |
14361 | ||
14362 | case $ac_cv_c_inline in | |
14363 | inline | yes) ;; | |
14364 | *) | |
14365 | case $ac_cv_c_inline in | |
14366 | no) ac_val=;; | |
14367 | *) ac_val=$ac_cv_c_inline;; | |
14368 | esac | |
14369 | cat >>confdefs.h <<_ACEOF | |
14370 | #ifndef __cplusplus | |
14371 | #define inline $ac_val | |
14372 | #endif | |
14373 | _ACEOF | |
14374 | ;; | |
14375 | esac | |
14376 | ||
e275c824 PE |
14377 | |
14378 | GNULIB_MKTIME=0; | |
14379 | GNULIB_NANOSLEEP=0; | |
14380 | GNULIB_STRPTIME=0; | |
14381 | GNULIB_TIMEGM=0; | |
14382 | GNULIB_TIME_R=0; | |
14383 | HAVE_DECL_LOCALTIME_R=1; | |
14384 | HAVE_NANOSLEEP=1; | |
14385 | HAVE_STRPTIME=1; | |
14386 | HAVE_TIMEGM=1; | |
14387 | REPLACE_LOCALTIME_R=GNULIB_PORTCHECK; | |
14388 | REPLACE_MKTIME=GNULIB_PORTCHECK; | |
14389 | REPLACE_NANOSLEEP=GNULIB_PORTCHECK; | |
14390 | REPLACE_TIMEGM=GNULIB_PORTCHECK; | |
14391 | ||
14392 | ||
14393 | ||
14394 | ||
14395 | for ac_func in $ac_func_list | |
14396 | do : | |
14397 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
14398 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
14399 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : | |
14400 | cat >>confdefs.h <<_ACEOF | |
14401 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
14402 | _ACEOF | |
14403 | ||
14404 | fi | |
14405 | done | |
14406 | ||
14407 | ||
14408 | ||
14409 | ||
14410 | gl_cv_c_multiarch=no | |
14411 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14412 | /* end confdefs.h. */ | |
14413 | #ifndef __APPLE_CC__ | |
14414 | not a universal capable compiler | |
14415 | #endif | |
14416 | typedef int dummy; | |
14417 | ||
14418 | _ACEOF | |
14419 | if ac_fn_c_try_compile "$LINENO"; then : | |
14420 | ||
14421 | arch= | |
14422 | prev= | |
14423 | for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do | |
14424 | if test -n "$prev"; then | |
14425 | case $word in | |
14426 | i?86 | x86_64 | ppc | ppc64) | |
14427 | if test -z "$arch" || test "$arch" = "$word"; then | |
14428 | arch="$word" | |
14429 | else | |
14430 | gl_cv_c_multiarch=yes | |
14431 | fi | |
14432 | ;; | |
14433 | esac | |
14434 | prev= | |
14435 | else | |
14436 | if test "x$word" = "x-arch"; then | |
14437 | prev=arch | |
14438 | fi | |
14439 | fi | |
14440 | done | |
14441 | ||
14442 | fi | |
14443 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
14444 | if test $gl_cv_c_multiarch = yes; then | |
e275c824 PE |
14445 | APPLE_UNIVERSAL_BUILD=1 |
14446 | else | |
14447 | APPLE_UNIVERSAL_BUILD=0 | |
14448 | fi | |
14449 | ||
14450 | ||
16c3e636 PE |
14451 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5 |
14452 | $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; } | |
14453 | if ${ac_cv_header_stdbool_h+:} false; then : | |
14454 | $as_echo_n "(cached) " >&6 | |
14455 | else | |
14456 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14457 | /* end confdefs.h. */ | |
14458 | ||
14459 | #include <stdbool.h> | |
14460 | #ifndef bool | |
14461 | "error: bool is not defined" | |
14462 | #endif | |
14463 | #ifndef false | |
14464 | "error: false is not defined" | |
14465 | #endif | |
14466 | #if false | |
14467 | "error: false is not 0" | |
14468 | #endif | |
14469 | #ifndef true | |
14470 | "error: true is not defined" | |
14471 | #endif | |
14472 | #if true != 1 | |
14473 | "error: true is not 1" | |
14474 | #endif | |
14475 | #ifndef __bool_true_false_are_defined | |
14476 | "error: __bool_true_false_are_defined is not defined" | |
14477 | #endif | |
14478 | ||
14479 | struct s { _Bool s: 1; _Bool t; } s; | |
14480 | ||
14481 | char a[true == 1 ? 1 : -1]; | |
14482 | char b[false == 0 ? 1 : -1]; | |
14483 | char c[__bool_true_false_are_defined == 1 ? 1 : -1]; | |
14484 | char d[(bool) 0.5 == true ? 1 : -1]; | |
14485 | /* See body of main program for 'e'. */ | |
14486 | char f[(_Bool) 0.0 == false ? 1 : -1]; | |
14487 | char g[true]; | |
14488 | char h[sizeof (_Bool)]; | |
14489 | char i[sizeof s.t]; | |
14490 | enum { j = false, k = true, l = false * true, m = true * 256 }; | |
14491 | /* The following fails for | |
14492 | HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */ | |
14493 | _Bool n[m]; | |
14494 | char o[sizeof n == m * sizeof n[0] ? 1 : -1]; | |
14495 | char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; | |
14496 | /* Catch a bug in an HP-UX C compiler. See | |
14497 | http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html | |
14498 | http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html | |
14499 | */ | |
14500 | _Bool q = true; | |
14501 | _Bool *pq = &q; | |
14502 | ||
14503 | int | |
14504 | main () | |
14505 | { | |
14506 | ||
14507 | bool e = &s; | |
14508 | *pq |= q; | |
14509 | *pq |= ! q; | |
14510 | /* Refer to every declared value, to avoid compiler optimizations. */ | |
14511 | return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l | |
14512 | + !m + !n + !o + !p + !q + !pq); | |
14513 | ||
14514 | ; | |
14515 | return 0; | |
14516 | } | |
14517 | _ACEOF | |
14518 | if ac_fn_c_try_compile "$LINENO"; then : | |
14519 | ac_cv_header_stdbool_h=yes | |
14520 | else | |
14521 | ac_cv_header_stdbool_h=no | |
14522 | fi | |
14523 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
14524 | fi | |
14525 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5 | |
14526 | $as_echo "$ac_cv_header_stdbool_h" >&6; } | |
14527 | ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default" | |
14528 | if test "x$ac_cv_type__Bool" = xyes; then : | |
14529 | ||
14530 | cat >>confdefs.h <<_ACEOF | |
14531 | #define HAVE__BOOL 1 | |
14532 | _ACEOF | |
14533 | ||
14534 | ||
14535 | fi | |
14536 | ||
16c3e636 | 14537 | |
1fd182f0 PE |
14538 | |
14539 | REPLACE_NULL=0; | |
14540 | HAVE_WCHAR_T=1; | |
14541 | STDDEF_H=''; | |
14542 | ||
14543 | ||
14544 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5 | |
14545 | $as_echo_n "checking for wchar_t... " >&6; } | |
d6974efa | 14546 | if ${gt_cv_c_wchar_t+:} false; then : |
1fd182f0 PE |
14547 | $as_echo_n "(cached) " >&6 |
14548 | else | |
14549 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14550 | /* end confdefs.h. */ | |
14551 | #include <stddef.h> | |
14552 | wchar_t foo = (wchar_t)'\0'; | |
14553 | int | |
14554 | main () | |
14555 | { | |
14556 | ||
14557 | ; | |
14558 | return 0; | |
14559 | } | |
14560 | _ACEOF | |
14561 | if ac_fn_c_try_compile "$LINENO"; then : | |
14562 | gt_cv_c_wchar_t=yes | |
14563 | else | |
14564 | gt_cv_c_wchar_t=no | |
14565 | fi | |
14566 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
14567 | fi | |
14568 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5 | |
14569 | $as_echo "$gt_cv_c_wchar_t" >&6; } | |
14570 | if test $gt_cv_c_wchar_t = yes; then | |
14571 | ||
14572 | $as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h | |
14573 | ||
14574 | fi | |
14575 | ||
16c3e636 PE |
14576 | |
14577 | ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include <time.h> | |
14578 | " | |
14579 | if test "x$ac_cv_member_struct_tm_tm_gmtoff" = xyes; then : | |
14580 | ||
14581 | $as_echo "#define HAVE_TM_GMTOFF 1" >>confdefs.h | |
14582 | ||
14583 | fi | |
14584 | ||
14585 | ||
14586 | ||
14587 | ||
1fd182f0 PE |
14588 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5 |
14589 | $as_echo_n "checking for C/C++ restrict keyword... " >&6; } | |
d6974efa | 14590 | if ${ac_cv_c_restrict+:} false; then : |
1fd182f0 PE |
14591 | $as_echo_n "(cached) " >&6 |
14592 | else | |
14593 | ac_cv_c_restrict=no | |
14594 | # The order here caters to the fact that C++ does not require restrict. | |
14595 | for ac_kw in __restrict __restrict__ _Restrict restrict; do | |
14596 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14597 | /* end confdefs.h. */ | |
14598 | typedef int * int_ptr; | |
14599 | int foo (int_ptr $ac_kw ip) { | |
14600 | return ip[0]; | |
14601 | } | |
14602 | int | |
14603 | main () | |
14604 | { | |
14605 | int s[1]; | |
14606 | int * $ac_kw t = s; | |
14607 | t[0] = 0; | |
14608 | return foo(t) | |
14609 | ; | |
14610 | return 0; | |
14611 | } | |
14612 | _ACEOF | |
14613 | if ac_fn_c_try_compile "$LINENO"; then : | |
14614 | ac_cv_c_restrict=$ac_kw | |
14615 | fi | |
14616 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
14617 | test "$ac_cv_c_restrict" != no && break | |
14618 | done | |
14619 | ||
14620 | fi | |
14621 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5 | |
14622 | $as_echo "$ac_cv_c_restrict" >&6; } | |
14623 | ||
14624 | case $ac_cv_c_restrict in | |
14625 | restrict) ;; | |
14626 | no) $as_echo "#define restrict /**/" >>confdefs.h | |
14627 | ;; | |
14628 | *) cat >>confdefs.h <<_ACEOF | |
14629 | #define restrict $ac_cv_c_restrict | |
14630 | _ACEOF | |
14631 | ;; | |
14632 | esac | |
14633 | ||
14634 | ||
14635 | ||
14636 | ||
14637 | ||
1fd182f0 PE |
14638 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5 |
14639 | $as_echo_n "checking for struct timespec in <time.h>... " >&6; } | |
d6974efa | 14640 | if ${gl_cv_sys_struct_timespec_in_time_h+:} false; then : |
1fd182f0 PE |
14641 | $as_echo_n "(cached) " >&6 |
14642 | else | |
14643 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14644 | /* end confdefs.h. */ | |
14645 | #include <time.h> | |
14646 | ||
14647 | int | |
14648 | main () | |
14649 | { | |
14650 | static struct timespec x; x.tv_sec = x.tv_nsec; | |
14651 | ; | |
14652 | return 0; | |
14653 | } | |
14654 | _ACEOF | |
14655 | if ac_fn_c_try_compile "$LINENO"; then : | |
14656 | gl_cv_sys_struct_timespec_in_time_h=yes | |
14657 | else | |
14658 | gl_cv_sys_struct_timespec_in_time_h=no | |
14659 | fi | |
14660 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
14661 | fi | |
14662 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5 | |
14663 | $as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; } | |
14664 | ||
14665 | TIME_H_DEFINES_STRUCT_TIMESPEC=0 | |
14666 | SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0 | |
14667 | PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0 | |
14668 | if test $gl_cv_sys_struct_timespec_in_time_h = yes; then | |
14669 | TIME_H_DEFINES_STRUCT_TIMESPEC=1 | |
14670 | else | |
14671 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5 | |
14672 | $as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; } | |
d6974efa | 14673 | if ${gl_cv_sys_struct_timespec_in_sys_time_h+:} false; then : |
1fd182f0 PE |
14674 | $as_echo_n "(cached) " >&6 |
14675 | else | |
14676 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14677 | /* end confdefs.h. */ | |
14678 | #include <sys/time.h> | |
14679 | ||
14680 | int | |
14681 | main () | |
14682 | { | |
14683 | static struct timespec x; x.tv_sec = x.tv_nsec; | |
14684 | ; | |
14685 | return 0; | |
14686 | } | |
14687 | _ACEOF | |
14688 | if ac_fn_c_try_compile "$LINENO"; then : | |
14689 | gl_cv_sys_struct_timespec_in_sys_time_h=yes | |
14690 | else | |
14691 | gl_cv_sys_struct_timespec_in_sys_time_h=no | |
14692 | fi | |
14693 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
14694 | fi | |
14695 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5 | |
14696 | $as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; } | |
14697 | if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then | |
14698 | SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1 | |
14699 | else | |
14700 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5 | |
14701 | $as_echo_n "checking for struct timespec in <pthread.h>... " >&6; } | |
d6974efa | 14702 | if ${gl_cv_sys_struct_timespec_in_pthread_h+:} false; then : |
1fd182f0 PE |
14703 | $as_echo_n "(cached) " >&6 |
14704 | else | |
14705 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14706 | /* end confdefs.h. */ | |
14707 | #include <pthread.h> | |
14708 | ||
14709 | int | |
14710 | main () | |
14711 | { | |
14712 | static struct timespec x; x.tv_sec = x.tv_nsec; | |
14713 | ; | |
14714 | return 0; | |
14715 | } | |
14716 | _ACEOF | |
14717 | if ac_fn_c_try_compile "$LINENO"; then : | |
14718 | gl_cv_sys_struct_timespec_in_pthread_h=yes | |
14719 | else | |
14720 | gl_cv_sys_struct_timespec_in_pthread_h=no | |
14721 | fi | |
14722 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
14723 | fi | |
14724 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5 | |
14725 | $as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; } | |
14726 | if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then | |
14727 | PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1 | |
14728 | fi | |
14729 | fi | |
14730 | fi | |
14731 | ||
14732 | ||
14733 | ||
14734 | ||
14735 | ||
14736 | ||
14737 | ||
14738 | ||
14739 | ||
14740 | ||
14741 | ||
14742 | ||
14743 | ||
b06b1098 PE |
14744 | |
14745 | ||
1fd182f0 PE |
14746 | if test $gl_cv_have_include_next = yes; then |
14747 | gl_cv_next_time_h='<'time.h'>' | |
14748 | else | |
14749 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5 | |
14750 | $as_echo_n "checking absolute name of <time.h>... " >&6; } | |
d6974efa | 14751 | if ${gl_cv_next_time_h+:} false; then : |
1fd182f0 PE |
14752 | $as_echo_n "(cached) " >&6 |
14753 | else | |
14754 | ||
b06b1098 | 14755 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
1fd182f0 PE |
14756 | /* end confdefs.h. */ |
14757 | #include <time.h> | |
14758 | ||
14759 | _ACEOF | |
b06b1098 PE |
14760 | case "$host_os" in |
14761 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
14762 | *) gl_absname_cpp="$ac_cpp" ;; | |
14763 | esac | |
14764 | gl_cv_next_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
14765 | sed -n '\#/time.h#{ | |
14766 | s#.*"\(.*/time.h\)".*#\1# | |
14767 | s#^/[^/]#//&# | |
14768 | p | |
14769 | q | |
14770 | }'`'"' | |
14771 | ||
1fd182f0 PE |
14772 | |
14773 | fi | |
14774 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5 | |
14775 | $as_echo "$gl_cv_next_time_h" >&6; } | |
14776 | fi | |
14777 | NEXT_TIME_H=$gl_cv_next_time_h | |
14778 | ||
14779 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then | |
14780 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
14781 | gl_next_as_first_directive='<'time.h'>' | |
14782 | else | |
14783 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
14784 | gl_next_as_first_directive=$gl_cv_next_time_h | |
14785 | fi | |
14786 | NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive | |
14787 | ||
14788 | ||
14789 | ||
14790 | ||
14791 | ||
b06b1098 | 14792 | |
1fd182f0 | 14793 | ac_fn_c_check_decl "$LINENO" "localtime_r" "ac_cv_have_decl_localtime_r" "$ac_includes_default" |
d6974efa | 14794 | if test "x$ac_cv_have_decl_localtime_r" = xyes; then : |
1fd182f0 PE |
14795 | ac_have_decl=1 |
14796 | else | |
14797 | ac_have_decl=0 | |
14798 | fi | |
14799 | ||
14800 | cat >>confdefs.h <<_ACEOF | |
14801 | #define HAVE_DECL_LOCALTIME_R $ac_have_decl | |
14802 | _ACEOF | |
14803 | ||
14804 | ||
14805 | ||
14806 | ||
14807 | if false; then | |
14808 | GL_COND_LIBTOOL_TRUE= | |
14809 | GL_COND_LIBTOOL_FALSE='#' | |
14810 | else | |
14811 | GL_COND_LIBTOOL_TRUE='#' | |
14812 | GL_COND_LIBTOOL_FALSE= | |
14813 | fi | |
14814 | ||
14815 | gl_cond_libtool=false | |
14816 | gl_libdeps= | |
14817 | gl_ltlibdeps= | |
14818 | gl_m4_base='m4' | |
14819 | ||
14820 | ||
14821 | ||
14822 | ||
14823 | ||
14824 | ||
14825 | ||
14826 | ||
14827 | ||
14828 | gl_source_base='lib' | |
14829 | # Code from module arg-nonnull: | |
14830 | # Code from module c++defs: | |
f737437b | 14831 | # Code from module dtoastr: |
1fd182f0 | 14832 | |
f737437b | 14833 | # Code from module extensions: |
e275c824 PE |
14834 | # Code from module getopt-gnu: |
14835 | ||
14836 | ||
14837 | ||
14838 | ||
14839 | ||
14840 | ||
e275c824 PE |
14841 | # Code from module getopt-posix: |
14842 | ||
14843 | ||
14844 | ||
14845 | ||
14846 | ||
14847 | if test -n "$gl_replace_getopt"; then : | |
14848 | ||
14849 | ||
14850 | ||
14851 | GETOPT_H=getopt.h | |
14852 | ||
14853 | $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h | |
14854 | ||
14855 | ||
14856 | ||
14857 | GNULIB_UNISTD_H_GETOPT=1 | |
14858 | ||
14859 | ||
14860 | ||
14861 | ||
14862 | ||
14863 | ||
14864 | ||
14865 | ||
14866 | gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext" | |
14867 | ||
14868 | ||
14869 | ||
14870 | ||
14871 | ||
14872 | ||
14873 | ||
14874 | ||
14875 | ||
14876 | gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext" | |
14877 | ||
14878 | ||
14879 | ||
14880 | ||
14881 | ||
14882 | ||
14883 | fi | |
14884 | ||
14885 | ||
14886 | # Code from module gettext-h: | |
14887 | ||
14888 | ||
67342916 PE |
14889 | # Code from module ignore-value: |
14890 | ||
1fd182f0 PE |
14891 | # Code from module include_next: |
14892 | # Code from module intprops: | |
14893 | # Code from module mktime: | |
14894 | ||
14895 | ||
14896 | ||
14897 | ||
14898 | ||
14899 | if test $APPLE_UNIVERSAL_BUILD = 1; then | |
14900 | # A universal build on Apple MacOS X platforms. | |
14901 | # The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode. | |
14902 | # But we need a configuration result that is valid in both modes. | |
14903 | ac_cv_func_working_mktime=no | |
14904 | fi | |
14905 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5 | |
14906 | $as_echo_n "checking for working mktime... " >&6; } | |
d6974efa | 14907 | if ${ac_cv_func_working_mktime+:} false; then : |
1fd182f0 PE |
14908 | $as_echo_n "(cached) " >&6 |
14909 | else | |
14910 | if test "$cross_compiling" = yes; then : | |
14911 | ac_cv_func_working_mktime=no | |
14912 | else | |
14913 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14914 | /* end confdefs.h. */ | |
14915 | /* Test program from Paul Eggert and Tony Leneis. */ | |
14916 | #include <limits.h> | |
14917 | #include <stdlib.h> | |
14918 | #include <time.h> | |
14919 | ||
14920 | #ifdef HAVE_UNISTD_H | |
14921 | # include <unistd.h> | |
14922 | #endif | |
14923 | ||
14924 | #ifndef HAVE_ALARM | |
14925 | # define alarm(X) /* empty */ | |
14926 | #endif | |
14927 | ||
14928 | /* Work around redefinition to rpl_putenv by other config tests. */ | |
14929 | #undef putenv | |
14930 | ||
14931 | static time_t time_t_max; | |
14932 | static time_t time_t_min; | |
14933 | ||
14934 | /* Values we'll use to set the TZ environment variable. */ | |
14935 | static char *tz_strings[] = { | |
14936 | (char *) 0, "TZ=GMT0", "TZ=JST-9", | |
14937 | "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00" | |
14938 | }; | |
14939 | #define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0])) | |
14940 | ||
14941 | /* Return 0 if mktime fails to convert a date in the spring-forward gap. | |
14942 | Based on a problem report from Andreas Jaeger. */ | |
14943 | static int | |
14944 | spring_forward_gap () | |
14945 | { | |
14946 | /* glibc (up to about 1998-10-07) failed this test. */ | |
14947 | struct tm tm; | |
14948 | ||
14949 | /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0" | |
14950 | instead of "TZ=America/Vancouver" in order to detect the bug even | |
14951 | on systems that don't support the Olson extension, or don't have the | |
14952 | full zoneinfo tables installed. */ | |
14953 | putenv ("TZ=PST8PDT,M4.1.0,M10.5.0"); | |
14954 | ||
14955 | tm.tm_year = 98; | |
14956 | tm.tm_mon = 3; | |
14957 | tm.tm_mday = 5; | |
14958 | tm.tm_hour = 2; | |
14959 | tm.tm_min = 0; | |
14960 | tm.tm_sec = 0; | |
14961 | tm.tm_isdst = -1; | |
14962 | return mktime (&tm) != (time_t) -1; | |
14963 | } | |
14964 | ||
14965 | static int | |
14966 | mktime_test1 (time_t now) | |
14967 | { | |
14968 | struct tm *lt; | |
14969 | return ! (lt = localtime (&now)) || mktime (lt) == now; | |
14970 | } | |
14971 | ||
14972 | static int | |
14973 | mktime_test (time_t now) | |
14974 | { | |
14975 | return (mktime_test1 (now) | |
14976 | && mktime_test1 ((time_t) (time_t_max - now)) | |
14977 | && mktime_test1 ((time_t) (time_t_min + now))); | |
14978 | } | |
14979 | ||
14980 | static int | |
14981 | irix_6_4_bug () | |
14982 | { | |
14983 | /* Based on code from Ariel Faigon. */ | |
14984 | struct tm tm; | |
14985 | tm.tm_year = 96; | |
14986 | tm.tm_mon = 3; | |
14987 | tm.tm_mday = 0; | |
14988 | tm.tm_hour = 0; | |
14989 | tm.tm_min = 0; | |
14990 | tm.tm_sec = 0; | |
14991 | tm.tm_isdst = -1; | |
14992 | mktime (&tm); | |
14993 | return tm.tm_mon == 2 && tm.tm_mday == 31; | |
14994 | } | |
14995 | ||
14996 | static int | |
14997 | bigtime_test (int j) | |
14998 | { | |
14999 | struct tm tm; | |
15000 | time_t now; | |
15001 | tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j; | |
15002 | now = mktime (&tm); | |
15003 | if (now != (time_t) -1) | |
15004 | { | |
15005 | struct tm *lt = localtime (&now); | |
15006 | if (! (lt | |
15007 | && lt->tm_year == tm.tm_year | |
15008 | && lt->tm_mon == tm.tm_mon | |
15009 | && lt->tm_mday == tm.tm_mday | |
15010 | && lt->tm_hour == tm.tm_hour | |
15011 | && lt->tm_min == tm.tm_min | |
15012 | && lt->tm_sec == tm.tm_sec | |
15013 | && lt->tm_yday == tm.tm_yday | |
15014 | && lt->tm_wday == tm.tm_wday | |
15015 | && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst) | |
15016 | == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst)))) | |
15017 | return 0; | |
15018 | } | |
15019 | return 1; | |
15020 | } | |
15021 | ||
15022 | static int | |
15023 | year_2050_test () | |
15024 | { | |
15025 | /* The correct answer for 2050-02-01 00:00:00 in Pacific time, | |
15026 | ignoring leap seconds. */ | |
15027 | unsigned long int answer = 2527315200UL; | |
15028 | ||
15029 | struct tm tm; | |
15030 | time_t t; | |
15031 | tm.tm_year = 2050 - 1900; | |
15032 | tm.tm_mon = 2 - 1; | |
15033 | tm.tm_mday = 1; | |
15034 | tm.tm_hour = tm.tm_min = tm.tm_sec = 0; | |
15035 | tm.tm_isdst = -1; | |
15036 | ||
15037 | /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0" | |
15038 | instead of "TZ=America/Vancouver" in order to detect the bug even | |
15039 | on systems that don't support the Olson extension, or don't have the | |
15040 | full zoneinfo tables installed. */ | |
15041 | putenv ("TZ=PST8PDT,M4.1.0,M10.5.0"); | |
15042 | ||
15043 | t = mktime (&tm); | |
15044 | ||
15045 | /* Check that the result is either a failure, or close enough | |
15046 | to the correct answer that we can assume the discrepancy is | |
15047 | due to leap seconds. */ | |
15048 | return (t == (time_t) -1 | |
15049 | || (0 < t && answer - 120 <= t && t <= answer + 120)); | |
15050 | } | |
15051 | ||
15052 | int | |
15053 | main () | |
15054 | { | |
15055 | int result = 0; | |
15056 | time_t t, delta; | |
15057 | int i, j; | |
3de84ad9 PE |
15058 | int time_t_signed_magnitude = (time_t) ~ (time_t) 0 < (time_t) -1; |
15059 | int time_t_signed = ! ((time_t) 0 < (time_t) -1); | |
1fd182f0 PE |
15060 | |
15061 | /* This test makes some buggy mktime implementations loop. | |
15062 | Give up after 60 seconds; a mktime slower than that | |
15063 | isn't worth using anyway. */ | |
15064 | alarm (60); | |
15065 | ||
3de84ad9 PE |
15066 | time_t_max = (! time_t_signed |
15067 | ? (time_t) -1 | |
15068 | : ((((time_t) 1 << (sizeof (time_t) * CHAR_BIT - 2)) - 1) | |
15069 | * 2 + 1)); | |
15070 | time_t_min = (! time_t_signed | |
15071 | ? (time_t) 0 | |
15072 | : time_t_signed_magnitude | |
15073 | ? ~ (time_t) 0 | |
15074 | : ~ time_t_max); | |
1fd182f0 PE |
15075 | |
15076 | delta = time_t_max / 997; /* a suitable prime number */ | |
15077 | for (i = 0; i < N_STRINGS; i++) | |
15078 | { | |
15079 | if (tz_strings[i]) | |
15080 | putenv (tz_strings[i]); | |
15081 | ||
15082 | for (t = 0; t <= time_t_max - delta; t += delta) | |
15083 | if (! mktime_test (t)) | |
15084 | result |= 1; | |
15085 | if (! (mktime_test ((time_t) 1) | |
15086 | && mktime_test ((time_t) (60 * 60)) | |
15087 | && mktime_test ((time_t) (60 * 60 * 24)))) | |
15088 | result |= 2; | |
15089 | ||
15090 | for (j = 1; ; j <<= 1) | |
15091 | if (! bigtime_test (j)) | |
15092 | result |= 4; | |
15093 | else if (INT_MAX / 2 < j) | |
15094 | break; | |
15095 | if (! bigtime_test (INT_MAX)) | |
15096 | result |= 8; | |
15097 | } | |
15098 | if (! irix_6_4_bug ()) | |
15099 | result |= 16; | |
15100 | if (! spring_forward_gap ()) | |
15101 | result |= 32; | |
15102 | if (! year_2050_test ()) | |
15103 | result |= 64; | |
15104 | return result; | |
15105 | } | |
15106 | _ACEOF | |
15107 | if ac_fn_c_try_run "$LINENO"; then : | |
15108 | ac_cv_func_working_mktime=yes | |
15109 | else | |
15110 | ac_cv_func_working_mktime=no | |
15111 | fi | |
15112 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
15113 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
067d23c9 | 15114 | fi |
067d23c9 | 15115 | |
1fd182f0 PE |
15116 | fi |
15117 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_working_mktime" >&5 | |
15118 | $as_echo "$ac_cv_func_working_mktime" >&6; } | |
15119 | if test $ac_cv_func_working_mktime = no; then | |
067d23c9 | 15120 | |
067d23c9 | 15121 | |
067d23c9 KY |
15122 | |
15123 | ||
067d23c9 | 15124 | |
067d23c9 KY |
15125 | |
15126 | ||
15127 | ||
1fd182f0 | 15128 | gl_LIBOBJS="$gl_LIBOBJS mktime.$ac_objext" |
067d23c9 | 15129 | |
1fd182f0 | 15130 | fi |
067d23c9 | 15131 | |
1fd182f0 PE |
15132 | if test $ac_cv_func_working_mktime = no; then |
15133 | REPLACE_MKTIME=1 | |
067d23c9 KY |
15134 | |
15135 | ||
15136 | ||
1fd182f0 PE |
15137 | else |
15138 | REPLACE_MKTIME=0 | |
15139 | fi | |
067d23c9 KY |
15140 | |
15141 | ||
15142 | ||
067d23c9 | 15143 | |
1fd182f0 | 15144 | GNULIB_MKTIME=1 |
067d23c9 KY |
15145 | |
15146 | ||
15147 | ||
1fd182f0 | 15148 | # Code from module multiarch: |
067d23c9 | 15149 | |
16c3e636 PE |
15150 | # Code from module stdbool: |
15151 | ||
15152 | ||
15153 | ||
15154 | # Define two additional variables used in the Makefile substitution. | |
15155 | ||
15156 | if test "$ac_cv_header_stdbool_h" = yes; then | |
15157 | STDBOOL_H='' | |
15158 | else | |
15159 | STDBOOL_H='stdbool.h' | |
15160 | fi | |
15161 | ||
15162 | ||
15163 | if test "$ac_cv_type__Bool" = yes; then | |
15164 | HAVE__BOOL=1 | |
15165 | else | |
15166 | HAVE__BOOL=0 | |
15167 | fi | |
15168 | ||
15169 | ||
1fd182f0 | 15170 | # Code from module stddef: |
067d23c9 | 15171 | |
067d23c9 | 15172 | |
067d23c9 | 15173 | |
1fd182f0 PE |
15174 | if test $gt_cv_c_wchar_t = no; then |
15175 | HAVE_WCHAR_T=0 | |
15176 | STDDEF_H=stddef.h | |
067d23c9 | 15177 | fi |
1fd182f0 PE |
15178 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5 |
15179 | $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; } | |
d6974efa | 15180 | if ${gl_cv_decl_null_works+:} false; then : |
067d23c9 | 15181 | $as_echo_n "(cached) " >&6 |
067d23c9 KY |
15182 | else |
15183 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15184 | /* end confdefs.h. */ | |
1fd182f0 PE |
15185 | #include <stddef.h> |
15186 | int test[2 * (sizeof NULL == sizeof (void *)) -1]; | |
15187 | ||
067d23c9 KY |
15188 | int |
15189 | main () | |
15190 | { | |
15191 | ||
067d23c9 KY |
15192 | ; |
15193 | return 0; | |
15194 | } | |
15195 | _ACEOF | |
1fd182f0 PE |
15196 | if ac_fn_c_try_compile "$LINENO"; then : |
15197 | gl_cv_decl_null_works=yes | |
067d23c9 | 15198 | else |
1fd182f0 | 15199 | gl_cv_decl_null_works=no |
067d23c9 | 15200 | fi |
1fd182f0 | 15201 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
067d23c9 | 15202 | fi |
1fd182f0 PE |
15203 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5 |
15204 | $as_echo "$gl_cv_decl_null_works" >&6; } | |
15205 | if test $gl_cv_decl_null_works = no; then | |
15206 | REPLACE_NULL=1 | |
15207 | STDDEF_H=stddef.h | |
15208 | fi | |
15209 | if test -n "$STDDEF_H"; then | |
15210 | ||
15211 | ||
15212 | ||
15213 | ||
15214 | ||
15215 | ||
b06b1098 PE |
15216 | |
15217 | ||
1fd182f0 PE |
15218 | if test $gl_cv_have_include_next = yes; then |
15219 | gl_cv_next_stddef_h='<'stddef.h'>' | |
15220 | else | |
15221 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5 | |
15222 | $as_echo_n "checking absolute name of <stddef.h>... " >&6; } | |
d6974efa | 15223 | if ${gl_cv_next_stddef_h+:} false; then : |
1fd182f0 PE |
15224 | $as_echo_n "(cached) " >&6 |
15225 | else | |
15226 | ||
b06b1098 | 15227 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
1fd182f0 PE |
15228 | /* end confdefs.h. */ |
15229 | #include <stddef.h> | |
15230 | ||
15231 | _ACEOF | |
b06b1098 PE |
15232 | case "$host_os" in |
15233 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
15234 | *) gl_absname_cpp="$ac_cpp" ;; | |
15235 | esac | |
15236 | gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
15237 | sed -n '\#/stddef.h#{ | |
15238 | s#.*"\(.*/stddef.h\)".*#\1# | |
15239 | s#^/[^/]#//&# | |
15240 | p | |
15241 | q | |
15242 | }'`'"' | |
15243 | ||
067d23c9 KY |
15244 | |
15245 | fi | |
1fd182f0 PE |
15246 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5 |
15247 | $as_echo "$gl_cv_next_stddef_h" >&6; } | |
15248 | fi | |
15249 | NEXT_STDDEF_H=$gl_cv_next_stddef_h | |
15250 | ||
15251 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then | |
15252 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
15253 | gl_next_as_first_directive='<'stddef.h'>' | |
15254 | else | |
15255 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
15256 | gl_next_as_first_directive=$gl_cv_next_stddef_h | |
15257 | fi | |
15258 | NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive | |
15259 | ||
15260 | ||
15261 | ||
b06b1098 | 15262 | |
067d23c9 KY |
15263 | fi |
15264 | ||
16c3e636 PE |
15265 | # Code from module strftime: |
15266 | ||
15267 | ||
15268 | ||
15269 | ||
15270 | ||
15271 | ||
15272 | ||
15273 | ||
15274 | ||
15275 | ||
15276 | gl_LIBOBJS="$gl_LIBOBJS strftime.$ac_objext" | |
15277 | ||
15278 | ||
15279 | # This defines (or not) HAVE_TZNAME and HAVE_TM_ZONE. | |
15280 | ||
15281 | ||
15282 | ||
15283 | ||
15284 | ||
15285 | ||
15286 | ||
15287 | $as_echo "#define my_strftime nstrftime" >>confdefs.h | |
15288 | ||
15289 | ||
15290 | ||
1fd182f0 | 15291 | # Code from module time: |
067d23c9 KY |
15292 | |
15293 | ||
067d23c9 | 15294 | |
1fd182f0 | 15295 | # Code from module time_r: |
067d23c9 | 15296 | |
067d23c9 | 15297 | |
067d23c9 KY |
15298 | |
15299 | ||
15300 | ||
067d23c9 | 15301 | |
067d23c9 | 15302 | |
1fd182f0 PE |
15303 | if test $ac_cv_have_decl_localtime_r = no; then |
15304 | HAVE_DECL_LOCALTIME_R=0 | |
15305 | fi | |
067d23c9 KY |
15306 | |
15307 | ||
1fd182f0 PE |
15308 | if test $ac_cv_func_localtime_r = yes; then |
15309 | HAVE_LOCALTIME_R=1 | |
15310 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime_r is compatible with its POSIX signature" >&5 | |
15311 | $as_echo_n "checking whether localtime_r is compatible with its POSIX signature... " >&6; } | |
d6974efa | 15312 | if ${gl_cv_time_r_posix+:} false; then : |
067d23c9 KY |
15313 | $as_echo_n "(cached) " >&6 |
15314 | else | |
1fd182f0 | 15315 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
067d23c9 | 15316 | /* end confdefs.h. */ |
1fd182f0 | 15317 | #include <time.h> |
067d23c9 KY |
15318 | int |
15319 | main () | |
15320 | { | |
1fd182f0 PE |
15321 | /* We don't need to append 'restrict's to the argument types, |
15322 | even though the POSIX signature has the 'restrict's, | |
15323 | since C99 says they can't affect type compatibility. */ | |
15324 | struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r; | |
15325 | if (ptr) return 0; | |
15326 | /* Check the return type is a pointer. | |
15327 | On HP-UX 10 it is 'int'. */ | |
15328 | *localtime_r (0, 0); | |
067d23c9 KY |
15329 | ; |
15330 | return 0; | |
15331 | } | |
1fd182f0 | 15332 | |
067d23c9 KY |
15333 | _ACEOF |
15334 | if ac_fn_c_try_compile "$LINENO"; then : | |
1fd182f0 | 15335 | gl_cv_time_r_posix=yes |
067d23c9 | 15336 | else |
1fd182f0 | 15337 | gl_cv_time_r_posix=no |
067d23c9 KY |
15338 | fi |
15339 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
15340 | ||
15341 | fi | |
1fd182f0 PE |
15342 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_r_posix" >&5 |
15343 | $as_echo "$gl_cv_time_r_posix" >&6; } | |
15344 | if test $gl_cv_time_r_posix = yes; then | |
15345 | REPLACE_LOCALTIME_R=0 | |
15346 | else | |
15347 | REPLACE_LOCALTIME_R=1 | |
15348 | fi | |
15349 | else | |
15350 | HAVE_LOCALTIME_R=0 | |
15351 | fi | |
15352 | if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then | |
067d23c9 | 15353 | |
067d23c9 KY |
15354 | |
15355 | ||
743c80a7 | 15356 | |
a451f14b PE |
15357 | |
15358 | ||
15359 | ||
a451f14b | 15360 | |
1fd182f0 | 15361 | gl_LIBOBJS="$gl_LIBOBJS time_r.$ac_objext" |
a451f14b | 15362 | |
a451f14b | 15363 | |
1fd182f0 | 15364 | : |
a451f14b PE |
15365 | |
15366 | fi | |
15367 | ||
15368 | ||
743c80a7 PE |
15369 | |
15370 | ||
1fd182f0 | 15371 | GNULIB_TIME_R=1 |
743c80a7 PE |
15372 | |
15373 | ||
15374 | ||
b06b1098 | 15375 | # Code from module unistd: |
a451f14b PE |
15376 | |
15377 | ||
15378 | ||
e275c824 PE |
15379 | |
15380 | ||
15381 | ||
15382 | ||
15383 | ||
15384 | ||
15385 | ||
15386 | ||
15387 | ||
15388 | ||
15389 | if test $gl_cv_have_include_next = yes; then | |
15390 | gl_cv_next_unistd_h='<'unistd.h'>' | |
15391 | else | |
15392 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5 | |
15393 | $as_echo_n "checking absolute name of <unistd.h>... " >&6; } | |
d6974efa | 15394 | if ${gl_cv_next_unistd_h+:} false; then : |
e275c824 PE |
15395 | $as_echo_n "(cached) " >&6 |
15396 | else | |
15397 | ||
b06b1098 PE |
15398 | if test $ac_cv_header_unistd_h = yes; then |
15399 | ||
15400 | ||
15401 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
e275c824 PE |
15402 | /* end confdefs.h. */ |
15403 | #include <unistd.h> | |
15404 | ||
15405 | _ACEOF | |
b06b1098 PE |
15406 | case "$host_os" in |
15407 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
15408 | *) gl_absname_cpp="$ac_cpp" ;; | |
15409 | esac | |
15410 | gl_cv_next_unistd_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
15411 | sed -n '\#/unistd.h#{ | |
15412 | s#.*"\(.*/unistd.h\)".*#\1# | |
15413 | s#^/[^/]#//&# | |
15414 | p | |
15415 | q | |
15416 | }'`'"' | |
e275c824 | 15417 | else |
b06b1098 PE |
15418 | gl_cv_next_unistd_h='<'unistd.h'>' |
15419 | fi | |
15420 | ||
e275c824 PE |
15421 | |
15422 | fi | |
15423 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5 | |
15424 | $as_echo "$gl_cv_next_unistd_h" >&6; } | |
15425 | fi | |
15426 | NEXT_UNISTD_H=$gl_cv_next_unistd_h | |
15427 | ||
15428 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then | |
15429 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
15430 | gl_next_as_first_directive='<'unistd.h'>' | |
15431 | else | |
15432 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
15433 | gl_next_as_first_directive=$gl_cv_next_unistd_h | |
15434 | fi | |
15435 | NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive | |
15436 | ||
15437 | ||
15438 | ||
15439 | ||
e275c824 PE |
15440 | if test $ac_cv_header_unistd_h = yes; then |
15441 | HAVE_UNISTD_H=1 | |
15442 | else | |
15443 | HAVE_UNISTD_H=0 | |
15444 | fi | |
15445 | ||
15446 | ||
15447 | ||
e275c824 | 15448 | |
1fd182f0 PE |
15449 | # Code from module warn-on-use: |
15450 | # End of code from modules | |
a451f14b | 15451 | |
a451f14b | 15452 | |
743c80a7 PE |
15453 | |
15454 | ||
15455 | ||
15456 | ||
15457 | ||
15458 | ||
15459 | ||
15460 | gltests_libdeps= | |
15461 | gltests_ltlibdeps= | |
15462 | ||
15463 | ||
15464 | ||
15465 | ||
15466 | ||
a451f14b PE |
15467 | |
15468 | ||
15469 | ||
15470 | ||
743c80a7 PE |
15471 | gl_source_base='tests' |
15472 | gltests_WITNESS=IN_`echo "${PACKAGE-$PACKAGE_TARNAME}" | LC_ALL=C tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ | LC_ALL=C sed -e 's/[^A-Z0-9_]/_/g'`_GNULIB_TESTS | |
15473 | ||
15474 | gl_module_indicator_condition=$gltests_WITNESS | |
15475 | ||
15476 | ||
15477 | ||
15478 | ||
15479 | ||
15480 | ||
15481 | ||
15482 | ||
15483 | ||
15484 | LIBGNU_LIBDEPS="$gl_libdeps" | |
15485 | ||
15486 | LIBGNU_LTLIBDEPS="$gl_ltlibdeps" | |
15487 | ||
15488 | ||
15489 | ||
067d23c9 KY |
15490 | # UNIX98 PTYs. |
15491 | for ac_func in grantpt | |
15492 | do : | |
15493 | ac_fn_c_check_func "$LINENO" "grantpt" "ac_cv_func_grantpt" | |
d6974efa | 15494 | if test "x$ac_cv_func_grantpt" = xyes; then : |
067d23c9 KY |
15495 | cat >>confdefs.h <<_ACEOF |
15496 | #define HAVE_GRANTPT 1 | |
15497 | _ACEOF | |
15498 | ||
15499 | fi | |
15500 | done | |
15501 | ||
15502 | ||
15503 | # PTY-related GNU extensions. | |
15504 | for ac_func in getpt | |
15505 | do : | |
15506 | ac_fn_c_check_func "$LINENO" "getpt" "ac_cv_func_getpt" | |
d6974efa | 15507 | if test "x$ac_cv_func_getpt" = xyes; then : |
067d23c9 KY |
15508 | cat >>confdefs.h <<_ACEOF |
15509 | #define HAVE_GETPT 1 | |
15510 | _ACEOF | |
15511 | ||
15512 | fi | |
15513 | done | |
15514 | ||
15515 | ||
15516 | # Check this now, so that we will NOT find the above functions in ncurses. | |
15517 | # That is because we have not set up to link ncurses in lib-src. | |
15518 | # It's better to believe a function is not available | |
15519 | # than to expect to find it in ncurses. | |
15520 | # Also we need tputs and friends to be able to build at all. | |
15521 | have_tputs_et_al=true | |
15522 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tputs" >&5 | |
15523 | $as_echo_n "checking for library containing tputs... " >&6; } | |
d6974efa | 15524 | if ${ac_cv_search_tputs+:} false; then : |
067d23c9 KY |
15525 | $as_echo_n "(cached) " >&6 |
15526 | else | |
15527 | ac_func_search_save_LIBS=$LIBS | |
15528 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15529 | /* end confdefs.h. */ | |
15530 | ||
15531 | /* Override any GCC internal prototype to avoid an error. | |
15532 | Use char because int might match the return type of a GCC | |
15533 | builtin and then its argument prototype would still apply. */ | |
15534 | #ifdef __cplusplus | |
15535 | extern "C" | |
15536 | #endif | |
15537 | char tputs (); | |
15538 | int | |
15539 | main () | |
15540 | { | |
15541 | return tputs (); | |
15542 | ; | |
15543 | return 0; | |
15544 | } | |
15545 | _ACEOF | |
15546 | for ac_lib in '' ncurses terminfo termcap; do | |
15547 | if test -z "$ac_lib"; then | |
15548 | ac_res="none required" | |
15549 | else | |
15550 | ac_res=-l$ac_lib | |
15551 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
15552 | fi | |
15553 | if ac_fn_c_try_link "$LINENO"; then : | |
15554 | ac_cv_search_tputs=$ac_res | |
15555 | fi | |
15556 | rm -f core conftest.err conftest.$ac_objext \ | |
15557 | conftest$ac_exeext | |
d6974efa | 15558 | if ${ac_cv_search_tputs+:} false; then : |
067d23c9 KY |
15559 | break |
15560 | fi | |
15561 | done | |
d6974efa | 15562 | if ${ac_cv_search_tputs+:} false; then : |
067d23c9 KY |
15563 | |
15564 | else | |
15565 | ac_cv_search_tputs=no | |
15566 | fi | |
15567 | rm conftest.$ac_ext | |
15568 | LIBS=$ac_func_search_save_LIBS | |
15569 | fi | |
15570 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tputs" >&5 | |
15571 | $as_echo "$ac_cv_search_tputs" >&6; } | |
15572 | ac_res=$ac_cv_search_tputs | |
15573 | if test "$ac_res" != no; then : | |
15574 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
15575 | ||
15576 | else | |
15577 | have_tputs_et_al=false | |
15578 | fi | |
15579 | ||
15580 | if test "$have_tputs_et_al" != true; then | |
2018939f | 15581 | as_fn_error $? "I couldn't find termcap functions (tputs and friends). |
067d23c9 KY |
15582 | Maybe some development libraries/packages are missing? Try installing |
15583 | libncurses-dev(el), libterminfo-dev(el) or similar." "$LINENO" 5 | |
15584 | fi | |
15585 | # Must define this when any termcap library is found. | |
15586 | ||
15587 | $as_echo "#define HAVE_LIBNCURSES 1" >>confdefs.h | |
15588 | ||
15589 | ## FIXME This was the cpp logic, but I am not sure it is right. | |
15590 | ## The above test has not necessarily found libncurses. | |
15591 | HAVE_LIBNCURSES=yes | |
15592 | ||
15593 | ## Use terminfo instead of termcap? | |
15594 | ## Note only system files NOT using terminfo are: | |
15595 | ## freebsd < 40000, ms-w32, msdos, netbsd < 599002500, and | |
15596 | ## darwin|gnu without ncurses. | |
15597 | TERMINFO=no | |
15598 | LIBS_TERMCAP= | |
15599 | case "$opsys" in | |
15600 | ## cygwin: Fewer environment variables to go wrong, more terminal types. | |
15601 | ## hpux10-20: Use the system provided termcap(3) library. | |
15602 | ## openbsd: David Mazieres <dm@reeducation-labor.lcs.mit.edu> says this | |
15603 | ## is necessary. Otherwise Emacs dumps core when run -nw. | |
15604 | aix4-2|cygwin|hpux*|irix6-5|openbsd|sol2*|unixware) TERMINFO=yes ;; | |
15605 | ||
15606 | ## darwin: Prevents crashes when running Emacs in Terminal.app under 10.2. | |
15607 | ## The ncurses library has been moved out of the System framework in | |
15608 | ## Mac OS X 10.2. So if configure detects it, set the command-line | |
15609 | ## option to use it. | |
15610 | darwin|gnu*) | |
15611 | ## (HAVE_LIBNCURSES was not always true, but is since 2010-03-18.) | |
15612 | if test "x$HAVE_LIBNCURSES" = "xyes"; then | |
15613 | TERMINFO=yes | |
15614 | LIBS_TERMCAP="-lncurses" | |
15615 | fi | |
15616 | ;; | |
15617 | ||
15618 | freebsd) | |
15619 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether FreeBSD is new enough to use terminfo" >&5 | |
15620 | $as_echo_n "checking whether FreeBSD is new enough to use terminfo... " >&6; } | |
d6974efa | 15621 | if ${emacs_cv_freebsd_terminfo+:} false; then : |
067d23c9 KY |
15622 | $as_echo_n "(cached) " >&6 |
15623 | else | |
15624 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15625 | /* end confdefs.h. */ | |
15626 | #include <osreldate.h> | |
15627 | int | |
15628 | main () | |
15629 | { | |
15630 | #if __FreeBSD_version < 400000 | |
15631 | fail; | |
15632 | #endif | |
15633 | ||
15634 | ; | |
15635 | return 0; | |
15636 | } | |
15637 | _ACEOF | |
15638 | if ac_fn_c_try_link "$LINENO"; then : | |
15639 | emacs_cv_freebsd_terminfo=yes | |
15640 | else | |
15641 | emacs_cv_freebsd_terminfo=no | |
15642 | fi | |
15643 | rm -f core conftest.err conftest.$ac_objext \ | |
15644 | conftest$ac_exeext conftest.$ac_ext | |
15645 | fi | |
15646 | ||
15647 | ||
15648 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_freebsd_terminfo" >&5 | |
15649 | $as_echo "$emacs_cv_freebsd_terminfo" >&6; } | |
15650 | ||
15651 | if test $emacs_cv_freebsd_terminfo = yes; then | |
15652 | TERMINFO=yes | |
15653 | LIBS_TERMCAP="-lncurses" | |
15654 | else | |
15655 | LIBS_TERMCAP="-ltermcap" | |
15656 | fi | |
15657 | ;; | |
15658 | ||
15659 | netbsd) | |
15660 | if test $ac_cv_search_tputs = -lterminfo; then | |
15661 | TERMINFO=yes | |
15662 | LIBS_TERMCAP="-lterminfo" | |
15663 | else | |
15664 | LIBS_TERMCAP="-ltermcap" | |
15665 | fi | |
15666 | ;; | |
15667 | ||
15668 | esac | |
15669 | ||
15670 | case "$opsys" in | |
15671 | ## hpux: Make sure we get select from libc rather than from libcurses | |
15672 | ## because libcurses on HPUX 10.10 has a broken version of select. | |
15673 | ## We used to use -lc -lcurses, but this may be cleaner. | |
15674 | hpux*) LIBS_TERMCAP="-ltermcap" ;; | |
15675 | ||
15676 | openbsd) LIBS_TERMCAP="-lncurses" ;; | |
15677 | ||
15678 | ## Must use system termcap, if we use any termcap. It does special things. | |
15679 | sol2*) test "$TERMINFO" != yes && LIBS_TERMCAP="-ltermcap" ;; | |
15680 | esac | |
15681 | ||
15682 | TERMCAP_OBJ=tparam.o | |
15683 | if test $TERMINFO = yes; then | |
15684 | ||
15685 | $as_echo "#define TERMINFO 1" >>confdefs.h | |
15686 | ||
15687 | ||
15688 | ## Default used to be -ltermcap. Add a case above if need something else. | |
15689 | test "x$LIBS_TERMCAP" = "x" && LIBS_TERMCAP="-lcurses" | |
15690 | ||
15691 | TERMCAP_OBJ=terminfo.o | |
15692 | fi | |
15693 | ||
15694 | ||
15695 | ||
15696 | ||
15697 | # Do we have res_init, for detecting changes in /etc/resolv.conf? | |
15698 | resolv=no | |
15699 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15700 | /* end confdefs.h. */ | |
15701 | #include <netinet/in.h> | |
15702 | #include <arpa/nameser.h> | |
15703 | #include <resolv.h> | |
15704 | int | |
15705 | main () | |
15706 | { | |
15707 | return res_init(); | |
15708 | ; | |
15709 | return 0; | |
15710 | } | |
15711 | _ACEOF | |
15712 | if ac_fn_c_try_link "$LINENO"; then : | |
15713 | have_res_init=yes | |
15714 | else | |
15715 | have_res_init=no | |
15716 | fi | |
15717 | rm -f core conftest.err conftest.$ac_objext \ | |
15718 | conftest$ac_exeext conftest.$ac_ext | |
15719 | if test "$have_res_init" = no; then | |
15720 | OLIBS="$LIBS" | |
15721 | LIBS="$LIBS -lresolv" | |
15722 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_init with -lresolv" >&5 | |
15723 | $as_echo_n "checking for res_init with -lresolv... " >&6; } | |
15724 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15725 | /* end confdefs.h. */ | |
15726 | #include <netinet/in.h> | |
15727 | #include <arpa/nameser.h> | |
15728 | #include <resolv.h> | |
15729 | int | |
15730 | main () | |
15731 | { | |
15732 | return res_init(); | |
15733 | ; | |
15734 | return 0; | |
15735 | } | |
15736 | _ACEOF | |
15737 | if ac_fn_c_try_link "$LINENO"; then : | |
15738 | have_res_init=yes | |
15739 | else | |
15740 | have_res_init=no | |
15741 | fi | |
15742 | rm -f core conftest.err conftest.$ac_objext \ | |
15743 | conftest$ac_exeext conftest.$ac_ext | |
15744 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_res_init" >&5 | |
15745 | $as_echo "$have_res_init" >&6; } | |
15746 | if test "$have_res_init" = yes ; then | |
15747 | resolv=yes | |
15748 | fi | |
15749 | LIBS="$OLIBS" | |
15750 | fi | |
15751 | ||
15752 | if test "$have_res_init" = yes; then | |
15753 | ||
15754 | $as_echo "#define HAVE_RES_INIT 1" >>confdefs.h | |
15755 | ||
15756 | fi | |
15757 | ||
15758 | # Do we need the Hesiod library to provide the support routines? | |
15759 | LIBHESIOD= | |
15760 | if test "$with_hesiod" != no ; then | |
15761 | # Don't set $LIBS here -- see comments above. FIXME which comments? | |
15762 | ac_fn_c_check_func "$LINENO" "res_send" "ac_cv_func_res_send" | |
d6974efa | 15763 | if test "x$ac_cv_func_res_send" = xyes; then : |
067d23c9 KY |
15764 | |
15765 | else | |
15766 | ac_fn_c_check_func "$LINENO" "__res_send" "ac_cv_func___res_send" | |
d6974efa | 15767 | if test "x$ac_cv_func___res_send" = xyes; then : |
067d23c9 KY |
15768 | |
15769 | else | |
15770 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_send in -lresolv" >&5 | |
15771 | $as_echo_n "checking for res_send in -lresolv... " >&6; } | |
d6974efa | 15772 | if ${ac_cv_lib_resolv_res_send+:} false; then : |
067d23c9 KY |
15773 | $as_echo_n "(cached) " >&6 |
15774 | else | |
15775 | ac_check_lib_save_LIBS=$LIBS | |
15776 | LIBS="-lresolv $LIBS" | |
15777 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15778 | /* end confdefs.h. */ | |
15779 | ||
15780 | /* Override any GCC internal prototype to avoid an error. | |
15781 | Use char because int might match the return type of a GCC | |
15782 | builtin and then its argument prototype would still apply. */ | |
15783 | #ifdef __cplusplus | |
15784 | extern "C" | |
15785 | #endif | |
15786 | char res_send (); | |
15787 | int | |
15788 | main () | |
15789 | { | |
15790 | return res_send (); | |
15791 | ; | |
15792 | return 0; | |
15793 | } | |
15794 | _ACEOF | |
15795 | if ac_fn_c_try_link "$LINENO"; then : | |
15796 | ac_cv_lib_resolv_res_send=yes | |
15797 | else | |
15798 | ac_cv_lib_resolv_res_send=no | |
15799 | fi | |
15800 | rm -f core conftest.err conftest.$ac_objext \ | |
15801 | conftest$ac_exeext conftest.$ac_ext | |
15802 | LIBS=$ac_check_lib_save_LIBS | |
15803 | fi | |
15804 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_send" >&5 | |
15805 | $as_echo "$ac_cv_lib_resolv_res_send" >&6; } | |
d6974efa | 15806 | if test "x$ac_cv_lib_resolv_res_send" = xyes; then : |
067d23c9 KY |
15807 | resolv=yes |
15808 | else | |
15809 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __res_send in -lresolv" >&5 | |
15810 | $as_echo_n "checking for __res_send in -lresolv... " >&6; } | |
d6974efa | 15811 | if ${ac_cv_lib_resolv___res_send+:} false; then : |
067d23c9 KY |
15812 | $as_echo_n "(cached) " >&6 |
15813 | else | |
15814 | ac_check_lib_save_LIBS=$LIBS | |
15815 | LIBS="-lresolv $LIBS" | |
15816 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15817 | /* end confdefs.h. */ | |
15818 | ||
15819 | /* Override any GCC internal prototype to avoid an error. | |
15820 | Use char because int might match the return type of a GCC | |
15821 | builtin and then its argument prototype would still apply. */ | |
15822 | #ifdef __cplusplus | |
15823 | extern "C" | |
15824 | #endif | |
15825 | char __res_send (); | |
15826 | int | |
15827 | main () | |
15828 | { | |
15829 | return __res_send (); | |
15830 | ; | |
15831 | return 0; | |
15832 | } | |
15833 | _ACEOF | |
15834 | if ac_fn_c_try_link "$LINENO"; then : | |
15835 | ac_cv_lib_resolv___res_send=yes | |
15836 | else | |
15837 | ac_cv_lib_resolv___res_send=no | |
15838 | fi | |
15839 | rm -f core conftest.err conftest.$ac_objext \ | |
15840 | conftest$ac_exeext conftest.$ac_ext | |
15841 | LIBS=$ac_check_lib_save_LIBS | |
15842 | fi | |
15843 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv___res_send" >&5 | |
15844 | $as_echo "$ac_cv_lib_resolv___res_send" >&6; } | |
d6974efa | 15845 | if test "x$ac_cv_lib_resolv___res_send" = xyes; then : |
067d23c9 KY |
15846 | resolv=yes |
15847 | fi | |
15848 | ||
15849 | fi | |
15850 | ||
15851 | fi | |
15852 | ||
15853 | fi | |
15854 | ||
15855 | if test "$resolv" = yes ; then | |
15856 | RESOLVLIB=-lresolv | |
15857 | else | |
15858 | RESOLVLIB= | |
15859 | fi | |
15860 | ac_fn_c_check_func "$LINENO" "hes_getmailhost" "ac_cv_func_hes_getmailhost" | |
d6974efa | 15861 | if test "x$ac_cv_func_hes_getmailhost" = xyes; then : |
067d23c9 KY |
15862 | |
15863 | else | |
15864 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hes_getmailhost in -lhesiod" >&5 | |
15865 | $as_echo_n "checking for hes_getmailhost in -lhesiod... " >&6; } | |
d6974efa | 15866 | if ${ac_cv_lib_hesiod_hes_getmailhost+:} false; then : |
067d23c9 KY |
15867 | $as_echo_n "(cached) " >&6 |
15868 | else | |
15869 | ac_check_lib_save_LIBS=$LIBS | |
15870 | LIBS="-lhesiod $RESOLVLIB $LIBS" | |
15871 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15872 | /* end confdefs.h. */ | |
15873 | ||
15874 | /* Override any GCC internal prototype to avoid an error. | |
15875 | Use char because int might match the return type of a GCC | |
15876 | builtin and then its argument prototype would still apply. */ | |
15877 | #ifdef __cplusplus | |
15878 | extern "C" | |
15879 | #endif | |
15880 | char hes_getmailhost (); | |
15881 | int | |
15882 | main () | |
15883 | { | |
15884 | return hes_getmailhost (); | |
15885 | ; | |
15886 | return 0; | |
15887 | } | |
15888 | _ACEOF | |
15889 | if ac_fn_c_try_link "$LINENO"; then : | |
15890 | ac_cv_lib_hesiod_hes_getmailhost=yes | |
15891 | else | |
15892 | ac_cv_lib_hesiod_hes_getmailhost=no | |
15893 | fi | |
15894 | rm -f core conftest.err conftest.$ac_objext \ | |
15895 | conftest$ac_exeext conftest.$ac_ext | |
15896 | LIBS=$ac_check_lib_save_LIBS | |
15897 | fi | |
15898 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5 | |
15899 | $as_echo "$ac_cv_lib_hesiod_hes_getmailhost" >&6; } | |
d6974efa | 15900 | if test "x$ac_cv_lib_hesiod_hes_getmailhost" = xyes; then : |
067d23c9 KY |
15901 | hesiod=yes |
15902 | else | |
15903 | : | |
15904 | fi | |
15905 | ||
15906 | fi | |
15907 | ||
15908 | ||
15909 | if test x"$hesiod" = xyes; then | |
15910 | ||
15911 | $as_echo "#define HAVE_LIBHESIOD 1" >>confdefs.h | |
15912 | ||
15913 | LIBHESIOD=-lhesiod | |
15914 | fi | |
15915 | fi | |
15916 | ||
15917 | ||
15918 | # Do we need libresolv (due to res_init or Hesiod)? | |
15919 | if test "$resolv" = yes ; then | |
15920 | ||
15921 | $as_echo "#define HAVE_LIBRESOLV 1" >>confdefs.h | |
15922 | ||
15923 | LIBRESOLV=-lresolv | |
15924 | else | |
15925 | LIBRESOLV= | |
15926 | fi | |
15927 | ||
15928 | ||
15929 | # These tell us which Kerberos-related libraries to use. | |
15930 | COM_ERRLIB= | |
15931 | CRYPTOLIB= | |
15932 | KRB5LIB= | |
15933 | DESLIB= | |
15934 | KRB4LIB= | |
15935 | ||
15936 | if test "${with_kerberos}" != no; then | |
15937 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for com_err in -lcom_err" >&5 | |
15938 | $as_echo_n "checking for com_err in -lcom_err... " >&6; } | |
d6974efa | 15939 | if ${ac_cv_lib_com_err_com_err+:} false; then : |
067d23c9 KY |
15940 | $as_echo_n "(cached) " >&6 |
15941 | else | |
15942 | ac_check_lib_save_LIBS=$LIBS | |
15943 | LIBS="-lcom_err $LIBS" | |
15944 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15945 | /* end confdefs.h. */ | |
15946 | ||
15947 | /* Override any GCC internal prototype to avoid an error. | |
15948 | Use char because int might match the return type of a GCC | |
15949 | builtin and then its argument prototype would still apply. */ | |
15950 | #ifdef __cplusplus | |
15951 | extern "C" | |
15952 | #endif | |
15953 | char com_err (); | |
15954 | int | |
15955 | main () | |
15956 | { | |
15957 | return com_err (); | |
15958 | ; | |
15959 | return 0; | |
15960 | } | |
15961 | _ACEOF | |
15962 | if ac_fn_c_try_link "$LINENO"; then : | |
15963 | ac_cv_lib_com_err_com_err=yes | |
15964 | else | |
15965 | ac_cv_lib_com_err_com_err=no | |
15966 | fi | |
15967 | rm -f core conftest.err conftest.$ac_objext \ | |
15968 | conftest$ac_exeext conftest.$ac_ext | |
15969 | LIBS=$ac_check_lib_save_LIBS | |
15970 | fi | |
15971 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_com_err_com_err" >&5 | |
15972 | $as_echo "$ac_cv_lib_com_err_com_err" >&6; } | |
d6974efa | 15973 | if test "x$ac_cv_lib_com_err_com_err" = xyes; then : |
067d23c9 KY |
15974 | have_com_err=yes |
15975 | else | |
15976 | have_com_err=no | |
15977 | fi | |
15978 | ||
15979 | if test $have_com_err = yes; then | |
15980 | COM_ERRLIB=-lcom_err | |
15981 | LIBS="$COM_ERRLIB $LIBS" | |
15982 | ||
15983 | $as_echo "#define HAVE_LIBCOM_ERR 1" >>confdefs.h | |
15984 | ||
15985 | fi | |
15986 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lcrypto" >&5 | |
15987 | $as_echo_n "checking for mit_des_cbc_encrypt in -lcrypto... " >&6; } | |
d6974efa | 15988 | if ${ac_cv_lib_crypto_mit_des_cbc_encrypt+:} false; then : |
067d23c9 KY |
15989 | $as_echo_n "(cached) " >&6 |
15990 | else | |
15991 | ac_check_lib_save_LIBS=$LIBS | |
15992 | LIBS="-lcrypto $LIBS" | |
15993 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15994 | /* end confdefs.h. */ | |
15995 | ||
15996 | /* Override any GCC internal prototype to avoid an error. | |
15997 | Use char because int might match the return type of a GCC | |
15998 | builtin and then its argument prototype would still apply. */ | |
15999 | #ifdef __cplusplus | |
16000 | extern "C" | |
16001 | #endif | |
16002 | char mit_des_cbc_encrypt (); | |
16003 | int | |
16004 | main () | |
16005 | { | |
16006 | return mit_des_cbc_encrypt (); | |
16007 | ; | |
16008 | return 0; | |
16009 | } | |
16010 | _ACEOF | |
16011 | if ac_fn_c_try_link "$LINENO"; then : | |
16012 | ac_cv_lib_crypto_mit_des_cbc_encrypt=yes | |
16013 | else | |
16014 | ac_cv_lib_crypto_mit_des_cbc_encrypt=no | |
16015 | fi | |
16016 | rm -f core conftest.err conftest.$ac_objext \ | |
16017 | conftest$ac_exeext conftest.$ac_ext | |
16018 | LIBS=$ac_check_lib_save_LIBS | |
16019 | fi | |
16020 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5 | |
16021 | $as_echo "$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6; } | |
d6974efa | 16022 | if test "x$ac_cv_lib_crypto_mit_des_cbc_encrypt" = xyes; then : |
067d23c9 KY |
16023 | have_crypto=yes |
16024 | else | |
16025 | have_crypto=no | |
16026 | fi | |
16027 | ||
16028 | if test $have_crypto = yes; then | |
16029 | CRYPTOLIB=-lcrypto | |
16030 | LIBS="$CRYPTOLIB $LIBS" | |
16031 | ||
16032 | $as_echo "#define HAVE_LIBCRYPTO 1" >>confdefs.h | |
16033 | ||
16034 | fi | |
16035 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lk5crypto" >&5 | |
16036 | $as_echo_n "checking for mit_des_cbc_encrypt in -lk5crypto... " >&6; } | |
d6974efa | 16037 | if ${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+:} false; then : |
067d23c9 KY |
16038 | $as_echo_n "(cached) " >&6 |
16039 | else | |
16040 | ac_check_lib_save_LIBS=$LIBS | |
16041 | LIBS="-lk5crypto $LIBS" | |
16042 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16043 | /* end confdefs.h. */ | |
16044 | ||
16045 | /* Override any GCC internal prototype to avoid an error. | |
16046 | Use char because int might match the return type of a GCC | |
16047 | builtin and then its argument prototype would still apply. */ | |
16048 | #ifdef __cplusplus | |
16049 | extern "C" | |
16050 | #endif | |
16051 | char mit_des_cbc_encrypt (); | |
16052 | int | |
16053 | main () | |
16054 | { | |
16055 | return mit_des_cbc_encrypt (); | |
16056 | ; | |
16057 | return 0; | |
16058 | } | |
16059 | _ACEOF | |
16060 | if ac_fn_c_try_link "$LINENO"; then : | |
16061 | ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes | |
16062 | else | |
16063 | ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no | |
16064 | fi | |
16065 | rm -f core conftest.err conftest.$ac_objext \ | |
16066 | conftest$ac_exeext conftest.$ac_ext | |
16067 | LIBS=$ac_check_lib_save_LIBS | |
16068 | fi | |
16069 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5 | |
16070 | $as_echo "$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6; } | |
d6974efa | 16071 | if test "x$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" = xyes; then : |
067d23c9 KY |
16072 | have_k5crypto=yes |
16073 | else | |
16074 | have_k5crypto=no | |
16075 | fi | |
16076 | ||
16077 | if test $have_k5crypto = yes; then | |
16078 | CRYPTOLIB=-lk5crypto | |
16079 | LIBS="$CRYPTOLIB $LIBS" | |
16080 | ||
16081 | $as_echo "#define HAVE_LIBK5CRYPTO 1" >>confdefs.h | |
16082 | ||
16083 | fi | |
16084 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5_init_context in -lkrb5" >&5 | |
16085 | $as_echo_n "checking for krb5_init_context in -lkrb5... " >&6; } | |
d6974efa | 16086 | if ${ac_cv_lib_krb5_krb5_init_context+:} false; then : |
067d23c9 KY |
16087 | $as_echo_n "(cached) " >&6 |
16088 | else | |
16089 | ac_check_lib_save_LIBS=$LIBS | |
16090 | LIBS="-lkrb5 $LIBS" | |
16091 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16092 | /* end confdefs.h. */ | |
16093 | ||
16094 | /* Override any GCC internal prototype to avoid an error. | |
16095 | Use char because int might match the return type of a GCC | |
16096 | builtin and then its argument prototype would still apply. */ | |
16097 | #ifdef __cplusplus | |
16098 | extern "C" | |
16099 | #endif | |
16100 | char krb5_init_context (); | |
16101 | int | |
16102 | main () | |
16103 | { | |
16104 | return krb5_init_context (); | |
16105 | ; | |
16106 | return 0; | |
16107 | } | |
16108 | _ACEOF | |
16109 | if ac_fn_c_try_link "$LINENO"; then : | |
16110 | ac_cv_lib_krb5_krb5_init_context=yes | |
16111 | else | |
16112 | ac_cv_lib_krb5_krb5_init_context=no | |
16113 | fi | |
16114 | rm -f core conftest.err conftest.$ac_objext \ | |
16115 | conftest$ac_exeext conftest.$ac_ext | |
16116 | LIBS=$ac_check_lib_save_LIBS | |
16117 | fi | |
16118 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb5_krb5_init_context" >&5 | |
16119 | $as_echo "$ac_cv_lib_krb5_krb5_init_context" >&6; } | |
d6974efa | 16120 | if test "x$ac_cv_lib_krb5_krb5_init_context" = xyes; then : |
067d23c9 KY |
16121 | have_krb5=yes |
16122 | else | |
16123 | have_krb5=no | |
16124 | fi | |
16125 | ||
16126 | if test $have_krb5=yes; then | |
16127 | KRB5LIB=-lkrb5 | |
16128 | LIBS="$KRB5LIB $LIBS" | |
16129 | ||
16130 | $as_echo "#define HAVE_LIBKRB5 1" >>confdefs.h | |
16131 | ||
16132 | fi | |
16133 | if test "${with_kerberos5}" = no; then | |
16134 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes425" >&5 | |
16135 | $as_echo_n "checking for des_cbc_encrypt in -ldes425... " >&6; } | |
d6974efa | 16136 | if ${ac_cv_lib_des425_des_cbc_encrypt+:} false; then : |
067d23c9 KY |
16137 | $as_echo_n "(cached) " >&6 |
16138 | else | |
16139 | ac_check_lib_save_LIBS=$LIBS | |
16140 | LIBS="-ldes425 $LIBS" | |
16141 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16142 | /* end confdefs.h. */ | |
16143 | ||
16144 | /* Override any GCC internal prototype to avoid an error. | |
16145 | Use char because int might match the return type of a GCC | |
16146 | builtin and then its argument prototype would still apply. */ | |
16147 | #ifdef __cplusplus | |
16148 | extern "C" | |
16149 | #endif | |
16150 | char des_cbc_encrypt (); | |
16151 | int | |
16152 | main () | |
16153 | { | |
16154 | return des_cbc_encrypt (); | |
16155 | ; | |
16156 | return 0; | |
16157 | } | |
16158 | _ACEOF | |
16159 | if ac_fn_c_try_link "$LINENO"; then : | |
16160 | ac_cv_lib_des425_des_cbc_encrypt=yes | |
16161 | else | |
16162 | ac_cv_lib_des425_des_cbc_encrypt=no | |
16163 | fi | |
16164 | rm -f core conftest.err conftest.$ac_objext \ | |
16165 | conftest$ac_exeext conftest.$ac_ext | |
16166 | LIBS=$ac_check_lib_save_LIBS | |
16167 | fi | |
16168 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5 | |
16169 | $as_echo "$ac_cv_lib_des425_des_cbc_encrypt" >&6; } | |
d6974efa | 16170 | if test "x$ac_cv_lib_des425_des_cbc_encrypt" = xyes; then : |
067d23c9 KY |
16171 | have_des425=yes |
16172 | else | |
16173 | have_des425=no | |
16174 | fi | |
16175 | ||
16176 | if test $have_des425 = yes; then | |
16177 | DESLIB=-ldes425 | |
16178 | LIBS="$DESLIB $LIBS" | |
16179 | ||
16180 | $as_echo "#define HAVE_LIBDES425 1" >>confdefs.h | |
16181 | ||
16182 | else | |
16183 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes" >&5 | |
16184 | $as_echo_n "checking for des_cbc_encrypt in -ldes... " >&6; } | |
d6974efa | 16185 | if ${ac_cv_lib_des_des_cbc_encrypt+:} false; then : |
067d23c9 KY |
16186 | $as_echo_n "(cached) " >&6 |
16187 | else | |
16188 | ac_check_lib_save_LIBS=$LIBS | |
16189 | LIBS="-ldes $LIBS" | |
16190 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16191 | /* end confdefs.h. */ | |
16192 | ||
16193 | /* Override any GCC internal prototype to avoid an error. | |
16194 | Use char because int might match the return type of a GCC | |
16195 | builtin and then its argument prototype would still apply. */ | |
16196 | #ifdef __cplusplus | |
16197 | extern "C" | |
16198 | #endif | |
16199 | char des_cbc_encrypt (); | |
16200 | int | |
16201 | main () | |
16202 | { | |
16203 | return des_cbc_encrypt (); | |
16204 | ; | |
16205 | return 0; | |
16206 | } | |
16207 | _ACEOF | |
16208 | if ac_fn_c_try_link "$LINENO"; then : | |
16209 | ac_cv_lib_des_des_cbc_encrypt=yes | |
16210 | else | |
16211 | ac_cv_lib_des_des_cbc_encrypt=no | |
16212 | fi | |
16213 | rm -f core conftest.err conftest.$ac_objext \ | |
16214 | conftest$ac_exeext conftest.$ac_ext | |
16215 | LIBS=$ac_check_lib_save_LIBS | |
16216 | fi | |
16217 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des_des_cbc_encrypt" >&5 | |
16218 | $as_echo "$ac_cv_lib_des_des_cbc_encrypt" >&6; } | |
d6974efa | 16219 | if test "x$ac_cv_lib_des_des_cbc_encrypt" = xyes; then : |
067d23c9 KY |
16220 | have_des=yes |
16221 | else | |
16222 | have_des=no | |
16223 | fi | |
16224 | ||
16225 | if test $have_des = yes; then | |
16226 | DESLIB=-ldes | |
16227 | LIBS="$DESLIB $LIBS" | |
16228 | ||
16229 | $as_echo "#define HAVE_LIBDES 1" >>confdefs.h | |
16230 | ||
16231 | fi | |
16232 | fi | |
16233 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb4" >&5 | |
16234 | $as_echo_n "checking for krb_get_cred in -lkrb4... " >&6; } | |
d6974efa | 16235 | if ${ac_cv_lib_krb4_krb_get_cred+:} false; then : |
067d23c9 KY |
16236 | $as_echo_n "(cached) " >&6 |
16237 | else | |
16238 | ac_check_lib_save_LIBS=$LIBS | |
16239 | LIBS="-lkrb4 $LIBS" | |
16240 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16241 | /* end confdefs.h. */ | |
16242 | ||
16243 | /* Override any GCC internal prototype to avoid an error. | |
16244 | Use char because int might match the return type of a GCC | |
16245 | builtin and then its argument prototype would still apply. */ | |
16246 | #ifdef __cplusplus | |
16247 | extern "C" | |
16248 | #endif | |
16249 | char krb_get_cred (); | |
16250 | int | |
16251 | main () | |
16252 | { | |
16253 | return krb_get_cred (); | |
16254 | ; | |
16255 | return 0; | |
16256 | } | |
16257 | _ACEOF | |
16258 | if ac_fn_c_try_link "$LINENO"; then : | |
16259 | ac_cv_lib_krb4_krb_get_cred=yes | |
16260 | else | |
16261 | ac_cv_lib_krb4_krb_get_cred=no | |
16262 | fi | |
16263 | rm -f core conftest.err conftest.$ac_objext \ | |
16264 | conftest$ac_exeext conftest.$ac_ext | |
16265 | LIBS=$ac_check_lib_save_LIBS | |
16266 | fi | |
16267 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb4_krb_get_cred" >&5 | |
16268 | $as_echo "$ac_cv_lib_krb4_krb_get_cred" >&6; } | |
d6974efa | 16269 | if test "x$ac_cv_lib_krb4_krb_get_cred" = xyes; then : |
067d23c9 KY |
16270 | have_krb4=yes |
16271 | else | |
16272 | have_krb4=no | |
16273 | fi | |
16274 | ||
16275 | if test $have_krb4 = yes; then | |
16276 | KRB4LIB=-lkrb4 | |
16277 | LIBS="$KRB4LIB $LIBS" | |
16278 | ||
16279 | $as_echo "#define HAVE_LIBKRB4 1" >>confdefs.h | |
16280 | ||
16281 | else | |
16282 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb" >&5 | |
16283 | $as_echo_n "checking for krb_get_cred in -lkrb... " >&6; } | |
d6974efa | 16284 | if ${ac_cv_lib_krb_krb_get_cred+:} false; then : |
067d23c9 KY |
16285 | $as_echo_n "(cached) " >&6 |
16286 | else | |
16287 | ac_check_lib_save_LIBS=$LIBS | |
16288 | LIBS="-lkrb $LIBS" | |
16289 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16290 | /* end confdefs.h. */ | |
16291 | ||
16292 | /* Override any GCC internal prototype to avoid an error. | |
16293 | Use char because int might match the return type of a GCC | |
16294 | builtin and then its argument prototype would still apply. */ | |
16295 | #ifdef __cplusplus | |
16296 | extern "C" | |
16297 | #endif | |
16298 | char krb_get_cred (); | |
16299 | int | |
16300 | main () | |
16301 | { | |
16302 | return krb_get_cred (); | |
16303 | ; | |
16304 | return 0; | |
16305 | } | |
16306 | _ACEOF | |
16307 | if ac_fn_c_try_link "$LINENO"; then : | |
16308 | ac_cv_lib_krb_krb_get_cred=yes | |
16309 | else | |
16310 | ac_cv_lib_krb_krb_get_cred=no | |
16311 | fi | |
16312 | rm -f core conftest.err conftest.$ac_objext \ | |
16313 | conftest$ac_exeext conftest.$ac_ext | |
16314 | LIBS=$ac_check_lib_save_LIBS | |
16315 | fi | |
16316 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb_krb_get_cred" >&5 | |
16317 | $as_echo "$ac_cv_lib_krb_krb_get_cred" >&6; } | |
d6974efa | 16318 | if test "x$ac_cv_lib_krb_krb_get_cred" = xyes; then : |
067d23c9 KY |
16319 | have_krb=yes |
16320 | else | |
16321 | have_krb=no | |
16322 | fi | |
16323 | ||
16324 | if test $have_krb = yes; then | |
16325 | KRB4LIB=-lkrb | |
16326 | LIBS="$KRB4LIB $LIBS" | |
16327 | ||
16328 | $as_echo "#define HAVE_LIBKRB 1" >>confdefs.h | |
16329 | ||
16330 | fi | |
16331 | fi | |
16332 | fi | |
16333 | ||
16334 | if test "${with_kerberos5}" != no; then | |
16335 | for ac_header in krb5.h | |
16336 | do : | |
16337 | ac_fn_c_check_header_mongrel "$LINENO" "krb5.h" "ac_cv_header_krb5_h" "$ac_includes_default" | |
d6974efa | 16338 | if test "x$ac_cv_header_krb5_h" = xyes; then : |
067d23c9 KY |
16339 | cat >>confdefs.h <<_ACEOF |
16340 | #define HAVE_KRB5_H 1 | |
16341 | _ACEOF | |
16342 | ac_fn_c_check_member "$LINENO" "krb5_error" "text" "ac_cv_member_krb5_error_text" "#include <krb5.h> | |
16343 | " | |
d6974efa | 16344 | if test "x$ac_cv_member_krb5_error_text" = xyes; then : |
067d23c9 KY |
16345 | |
16346 | cat >>confdefs.h <<_ACEOF | |
16347 | #define HAVE_KRB5_ERROR_TEXT 1 | |
16348 | _ACEOF | |
16349 | ||
16350 | ||
16351 | fi | |
16352 | ac_fn_c_check_member "$LINENO" "krb5_error" "e_text" "ac_cv_member_krb5_error_e_text" "#include <krb5.h> | |
16353 | " | |
d6974efa | 16354 | if test "x$ac_cv_member_krb5_error_e_text" = xyes; then : |
067d23c9 KY |
16355 | |
16356 | cat >>confdefs.h <<_ACEOF | |
16357 | #define HAVE_KRB5_ERROR_E_TEXT 1 | |
16358 | _ACEOF | |
16359 | ||
16360 | ||
16361 | fi | |
16362 | ||
16363 | fi | |
16364 | ||
16365 | done | |
16366 | ||
16367 | else | |
16368 | for ac_header in des.h | |
16369 | do : | |
16370 | ac_fn_c_check_header_mongrel "$LINENO" "des.h" "ac_cv_header_des_h" "$ac_includes_default" | |
d6974efa | 16371 | if test "x$ac_cv_header_des_h" = xyes; then : |
067d23c9 KY |
16372 | cat >>confdefs.h <<_ACEOF |
16373 | #define HAVE_DES_H 1 | |
16374 | _ACEOF | |
16375 | ||
16376 | else | |
16377 | for ac_header in kerberosIV/des.h | |
16378 | do : | |
16379 | ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/des.h" "ac_cv_header_kerberosIV_des_h" "$ac_includes_default" | |
d6974efa | 16380 | if test "x$ac_cv_header_kerberosIV_des_h" = xyes; then : |
067d23c9 KY |
16381 | cat >>confdefs.h <<_ACEOF |
16382 | #define HAVE_KERBEROSIV_DES_H 1 | |
16383 | _ACEOF | |
16384 | ||
16385 | else | |
16386 | for ac_header in kerberos/des.h | |
16387 | do : | |
16388 | ac_fn_c_check_header_mongrel "$LINENO" "kerberos/des.h" "ac_cv_header_kerberos_des_h" "$ac_includes_default" | |
d6974efa | 16389 | if test "x$ac_cv_header_kerberos_des_h" = xyes; then : |
067d23c9 KY |
16390 | cat >>confdefs.h <<_ACEOF |
16391 | #define HAVE_KERBEROS_DES_H 1 | |
16392 | _ACEOF | |
16393 | ||
16394 | fi | |
16395 | ||
16396 | done | |
16397 | ||
16398 | fi | |
16399 | ||
16400 | done | |
16401 | ||
16402 | fi | |
16403 | ||
16404 | done | |
16405 | ||
16406 | for ac_header in krb.h | |
16407 | do : | |
16408 | ac_fn_c_check_header_mongrel "$LINENO" "krb.h" "ac_cv_header_krb_h" "$ac_includes_default" | |
d6974efa | 16409 | if test "x$ac_cv_header_krb_h" = xyes; then : |
067d23c9 KY |
16410 | cat >>confdefs.h <<_ACEOF |
16411 | #define HAVE_KRB_H 1 | |
16412 | _ACEOF | |
16413 | ||
16414 | else | |
16415 | for ac_header in kerberosIV/krb.h | |
16416 | do : | |
16417 | ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/krb.h" "ac_cv_header_kerberosIV_krb_h" "$ac_includes_default" | |
d6974efa | 16418 | if test "x$ac_cv_header_kerberosIV_krb_h" = xyes; then : |
067d23c9 KY |
16419 | cat >>confdefs.h <<_ACEOF |
16420 | #define HAVE_KERBEROSIV_KRB_H 1 | |
16421 | _ACEOF | |
16422 | ||
16423 | else | |
16424 | for ac_header in kerberos/krb.h | |
16425 | do : | |
16426 | ac_fn_c_check_header_mongrel "$LINENO" "kerberos/krb.h" "ac_cv_header_kerberos_krb_h" "$ac_includes_default" | |
d6974efa | 16427 | if test "x$ac_cv_header_kerberos_krb_h" = xyes; then : |
067d23c9 KY |
16428 | cat >>confdefs.h <<_ACEOF |
16429 | #define HAVE_KERBEROS_KRB_H 1 | |
16430 | _ACEOF | |
16431 | ||
16432 | fi | |
16433 | ||
16434 | done | |
16435 | ||
16436 | fi | |
16437 | ||
16438 | done | |
16439 | ||
16440 | fi | |
16441 | ||
16442 | done | |
16443 | ||
16444 | fi | |
16445 | for ac_header in com_err.h | |
16446 | do : | |
16447 | ac_fn_c_check_header_mongrel "$LINENO" "com_err.h" "ac_cv_header_com_err_h" "$ac_includes_default" | |
d6974efa | 16448 | if test "x$ac_cv_header_com_err_h" = xyes; then : |
067d23c9 KY |
16449 | cat >>confdefs.h <<_ACEOF |
16450 | #define HAVE_COM_ERR_H 1 | |
16451 | _ACEOF | |
16452 | ||
16453 | fi | |
16454 | ||
16455 | done | |
16456 | ||
16457 | fi | |
16458 | ||
16459 | ||
16460 | ||
16461 | ||
16462 | ||
16463 | ||
16464 | ||
16465 | # Solaris requires -lintl if you want strerror (which calls dgettext) | |
16466 | # to return localized messages. | |
16467 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dgettext in -lintl" >&5 | |
16468 | $as_echo_n "checking for dgettext in -lintl... " >&6; } | |
d6974efa | 16469 | if ${ac_cv_lib_intl_dgettext+:} false; then : |
067d23c9 KY |
16470 | $as_echo_n "(cached) " >&6 |
16471 | else | |
16472 | ac_check_lib_save_LIBS=$LIBS | |
16473 | LIBS="-lintl $LIBS" | |
16474 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16475 | /* end confdefs.h. */ | |
16476 | ||
16477 | /* Override any GCC internal prototype to avoid an error. | |
16478 | Use char because int might match the return type of a GCC | |
16479 | builtin and then its argument prototype would still apply. */ | |
16480 | #ifdef __cplusplus | |
16481 | extern "C" | |
16482 | #endif | |
16483 | char dgettext (); | |
16484 | int | |
16485 | main () | |
16486 | { | |
16487 | return dgettext (); | |
16488 | ; | |
16489 | return 0; | |
16490 | } | |
16491 | _ACEOF | |
16492 | if ac_fn_c_try_link "$LINENO"; then : | |
16493 | ac_cv_lib_intl_dgettext=yes | |
16494 | else | |
16495 | ac_cv_lib_intl_dgettext=no | |
16496 | fi | |
16497 | rm -f core conftest.err conftest.$ac_objext \ | |
16498 | conftest$ac_exeext conftest.$ac_ext | |
16499 | LIBS=$ac_check_lib_save_LIBS | |
16500 | fi | |
16501 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_dgettext" >&5 | |
16502 | $as_echo "$ac_cv_lib_intl_dgettext" >&6; } | |
d6974efa | 16503 | if test "x$ac_cv_lib_intl_dgettext" = xyes; then : |
067d23c9 KY |
16504 | cat >>confdefs.h <<_ACEOF |
16505 | #define HAVE_LIBINTL 1 | |
16506 | _ACEOF | |
16507 | ||
16508 | LIBS="-lintl $LIBS" | |
16509 | ||
16510 | fi | |
16511 | ||
16512 | ||
16513 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime caches TZ" >&5 | |
16514 | $as_echo_n "checking whether localtime caches TZ... " >&6; } | |
d6974efa | 16515 | if ${emacs_cv_localtime_cache+:} false; then : |
067d23c9 KY |
16516 | $as_echo_n "(cached) " >&6 |
16517 | else | |
16518 | if test x$ac_cv_func_tzset = xyes; then | |
16519 | if test "$cross_compiling" = yes; then : | |
16520 | # If we have tzset, assume the worst when cross-compiling. | |
16521 | emacs_cv_localtime_cache=yes | |
16522 | else | |
16523 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16524 | /* end confdefs.h. */ | |
16525 | #include <time.h> | |
16526 | char TZ_GMT0[] = "TZ=GMT0"; | |
16527 | char TZ_PST8[] = "TZ=PST8"; | |
16528 | main() | |
16529 | { | |
16530 | time_t now = time ((time_t *) 0); | |
16531 | int hour_GMT0, hour_unset; | |
16532 | if (putenv (TZ_GMT0) != 0) | |
16533 | exit (1); | |
16534 | hour_GMT0 = localtime (&now)->tm_hour; | |
16535 | unsetenv("TZ"); | |
16536 | hour_unset = localtime (&now)->tm_hour; | |
16537 | if (putenv (TZ_PST8) != 0) | |
16538 | exit (1); | |
16539 | if (localtime (&now)->tm_hour == hour_GMT0) | |
16540 | exit (1); | |
16541 | unsetenv("TZ"); | |
16542 | if (localtime (&now)->tm_hour != hour_unset) | |
16543 | exit (1); | |
16544 | exit (0); | |
16545 | } | |
16546 | _ACEOF | |
16547 | if ac_fn_c_try_run "$LINENO"; then : | |
16548 | emacs_cv_localtime_cache=no | |
16549 | else | |
16550 | emacs_cv_localtime_cache=yes | |
16551 | fi | |
16552 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
16553 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
16554 | fi | |
16555 | ||
16556 | else | |
16557 | # If we lack tzset, report that localtime does not cache TZ, | |
16558 | # since we can't invalidate the cache if we don't have tzset. | |
16559 | emacs_cv_localtime_cache=no | |
16560 | fi | |
16561 | fi | |
16562 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_localtime_cache" >&5 | |
16563 | $as_echo "$emacs_cv_localtime_cache" >&6; } | |
16564 | if test $emacs_cv_localtime_cache = yes; then | |
16565 | ||
16566 | $as_echo "#define LOCALTIME_CACHE 1" >>confdefs.h | |
16567 | ||
16568 | fi | |
16569 | ||
16570 | if test "x$HAVE_TIMEVAL" = xyes; then | |
16571 | for ac_func in gettimeofday | |
16572 | do : | |
16573 | ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday" | |
d6974efa | 16574 | if test "x$ac_cv_func_gettimeofday" = xyes; then : |
067d23c9 KY |
16575 | cat >>confdefs.h <<_ACEOF |
16576 | #define HAVE_GETTIMEOFDAY 1 | |
16577 | _ACEOF | |
16578 | ||
16579 | fi | |
16580 | done | |
16581 | ||
16582 | if test $ac_cv_func_gettimeofday = yes; then | |
16583 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday can accept two arguments" >&5 | |
16584 | $as_echo_n "checking whether gettimeofday can accept two arguments... " >&6; } | |
d6974efa | 16585 | if ${emacs_cv_gettimeofday_two_arguments+:} false; then : |
067d23c9 KY |
16586 | $as_echo_n "(cached) " >&6 |
16587 | else | |
16588 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16589 | /* end confdefs.h. */ | |
16590 | ||
16591 | #ifdef TIME_WITH_SYS_TIME | |
16592 | #include <sys/time.h> | |
16593 | #include <time.h> | |
16594 | #else | |
16595 | #ifdef HAVE_SYS_TIME_H | |
16596 | #include <sys/time.h> | |
16597 | #else | |
16598 | #include <time.h> | |
16599 | #endif | |
16600 | #endif | |
16601 | int | |
16602 | main () | |
16603 | { | |
16604 | struct timeval time; | |
16605 | gettimeofday (&time, 0); | |
16606 | ; | |
16607 | return 0; | |
16608 | } | |
16609 | _ACEOF | |
16610 | if ac_fn_c_try_compile "$LINENO"; then : | |
16611 | emacs_cv_gettimeofday_two_arguments=yes | |
16612 | else | |
16613 | emacs_cv_gettimeofday_two_arguments=no | |
16614 | fi | |
16615 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
16616 | fi | |
16617 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_gettimeofday_two_arguments" >&5 | |
16618 | $as_echo "$emacs_cv_gettimeofday_two_arguments" >&6; } | |
16619 | if test $emacs_cv_gettimeofday_two_arguments = no; then | |
16620 | ||
16621 | $as_echo "#define GETTIMEOFDAY_ONE_ARGUMENT 1" >>confdefs.h | |
16622 | ||
16623 | fi | |
16624 | fi | |
16625 | fi | |
16626 | ||
16627 | ok_so_far=yes | |
16628 | ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket" | |
d6974efa | 16629 | if test "x$ac_cv_func_socket" = xyes; then : |
067d23c9 KY |
16630 | |
16631 | else | |
16632 | ok_so_far=no | |
16633 | fi | |
16634 | ||
16635 | if test $ok_so_far = yes; then | |
16636 | ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default" | |
d6974efa | 16637 | if test "x$ac_cv_header_netinet_in_h" = xyes; then : |
067d23c9 KY |
16638 | |
16639 | else | |
16640 | ok_so_far=no | |
16641 | fi | |
16642 | ||
16643 | ||
16644 | fi | |
16645 | if test $ok_so_far = yes; then | |
16646 | ac_fn_c_check_header_mongrel "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$ac_includes_default" | |
d6974efa | 16647 | if test "x$ac_cv_header_arpa_inet_h" = xyes; then : |
067d23c9 KY |
16648 | |
16649 | else | |
16650 | ok_so_far=no | |
16651 | fi | |
16652 | ||
16653 | ||
16654 | fi | |
16655 | if test $ok_so_far = yes; then | |
16656 | ||
16657 | $as_echo "#define HAVE_INET_SOCKETS 1" >>confdefs.h | |
16658 | ||
16659 | fi | |
16660 | ||
16661 | if test -f /usr/lpp/X11/bin/smt.exp; then | |
16662 | ||
16663 | $as_echo "#define HAVE_AIX_SMT_EXP 1" >>confdefs.h | |
16664 | ||
16665 | fi | |
16666 | ||
16667 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system supports dynamic ptys" >&5 | |
16668 | $as_echo_n "checking whether system supports dynamic ptys... " >&6; } | |
16669 | if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then | |
16670 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
16671 | $as_echo "yes" >&6; } | |
16672 | ||
16673 | $as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h | |
16674 | ||
16675 | else | |
16676 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
16677 | $as_echo "no" >&6; } | |
16678 | fi | |
16679 | ||
16680 | ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" | |
d6974efa | 16681 | if test "x$ac_cv_type_pid_t" = xyes; then : |
067d23c9 KY |
16682 | |
16683 | else | |
16684 | ||
16685 | cat >>confdefs.h <<_ACEOF | |
16686 | #define pid_t int | |
16687 | _ACEOF | |
16688 | ||
16689 | fi | |
16690 | ||
16691 | for ac_header in vfork.h | |
16692 | do : | |
16693 | ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default" | |
d6974efa | 16694 | if test "x$ac_cv_header_vfork_h" = xyes; then : |
067d23c9 KY |
16695 | cat >>confdefs.h <<_ACEOF |
16696 | #define HAVE_VFORK_H 1 | |
16697 | _ACEOF | |
16698 | ||
16699 | fi | |
16700 | ||
16701 | done | |
16702 | ||
16703 | for ac_func in fork vfork | |
16704 | do : | |
16705 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
16706 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
2018939f | 16707 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : |
067d23c9 KY |
16708 | cat >>confdefs.h <<_ACEOF |
16709 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
16710 | _ACEOF | |
16711 | ||
16712 | fi | |
16713 | done | |
16714 | ||
16715 | if test "x$ac_cv_func_fork" = xyes; then | |
16716 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 | |
16717 | $as_echo_n "checking for working fork... " >&6; } | |
d6974efa | 16718 | if ${ac_cv_func_fork_works+:} false; then : |
067d23c9 KY |
16719 | $as_echo_n "(cached) " >&6 |
16720 | else | |
16721 | if test "$cross_compiling" = yes; then : | |
16722 | ac_cv_func_fork_works=cross | |
16723 | else | |
16724 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16725 | /* end confdefs.h. */ | |
16726 | $ac_includes_default | |
16727 | int | |
16728 | main () | |
16729 | { | |
16730 | ||
16731 | /* By Ruediger Kuhlmann. */ | |
16732 | return fork () < 0; | |
16733 | ||
16734 | ; | |
16735 | return 0; | |
16736 | } | |
16737 | _ACEOF | |
16738 | if ac_fn_c_try_run "$LINENO"; then : | |
16739 | ac_cv_func_fork_works=yes | |
16740 | else | |
16741 | ac_cv_func_fork_works=no | |
16742 | fi | |
16743 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
16744 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
16745 | fi | |
16746 | ||
16747 | fi | |
16748 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5 | |
16749 | $as_echo "$ac_cv_func_fork_works" >&6; } | |
16750 | ||
16751 | else | |
16752 | ac_cv_func_fork_works=$ac_cv_func_fork | |
16753 | fi | |
16754 | if test "x$ac_cv_func_fork_works" = xcross; then | |
16755 | case $host in | |
16756 | *-*-amigaos* | *-*-msdosdjgpp*) | |
16757 | # Override, as these systems have only a dummy fork() stub | |
16758 | ac_cv_func_fork_works=no | |
16759 | ;; | |
16760 | *) | |
16761 | ac_cv_func_fork_works=yes | |
16762 | ;; | |
16763 | esac | |
16764 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 | |
16765 | $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} | |
16766 | fi | |
16767 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
16768 | if test "x$ac_cv_func_vfork" = xyes; then | |
16769 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 | |
16770 | $as_echo_n "checking for working vfork... " >&6; } | |
d6974efa | 16771 | if ${ac_cv_func_vfork_works+:} false; then : |
067d23c9 KY |
16772 | $as_echo_n "(cached) " >&6 |
16773 | else | |
16774 | if test "$cross_compiling" = yes; then : | |
16775 | ac_cv_func_vfork_works=cross | |
16776 | else | |
16777 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16778 | /* end confdefs.h. */ | |
16779 | /* Thanks to Paul Eggert for this test. */ | |
16780 | $ac_includes_default | |
16781 | #include <sys/wait.h> | |
16782 | #ifdef HAVE_VFORK_H | |
16783 | # include <vfork.h> | |
16784 | #endif | |
16785 | /* On some sparc systems, changes by the child to local and incoming | |
16786 | argument registers are propagated back to the parent. The compiler | |
16787 | is told about this with #include <vfork.h>, but some compilers | |
16788 | (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a | |
16789 | static variable whose address is put into a register that is | |
16790 | clobbered by the vfork. */ | |
16791 | static void | |
16792 | #ifdef __cplusplus | |
16793 | sparc_address_test (int arg) | |
16794 | # else | |
16795 | sparc_address_test (arg) int arg; | |
16796 | #endif | |
16797 | { | |
16798 | static pid_t child; | |
16799 | if (!child) { | |
16800 | child = vfork (); | |
16801 | if (child < 0) { | |
16802 | perror ("vfork"); | |
16803 | _exit(2); | |
16804 | } | |
16805 | if (!child) { | |
16806 | arg = getpid(); | |
16807 | write(-1, "", 0); | |
16808 | _exit (arg); | |
16809 | } | |
16810 | } | |
16811 | } | |
16812 | ||
16813 | int | |
16814 | main () | |
16815 | { | |
16816 | pid_t parent = getpid (); | |
16817 | pid_t child; | |
16818 | ||
16819 | sparc_address_test (0); | |
16820 | ||
16821 | child = vfork (); | |
16822 | ||
16823 | if (child == 0) { | |
16824 | /* Here is another test for sparc vfork register problems. This | |
16825 | test uses lots of local variables, at least as many local | |
16826 | variables as main has allocated so far including compiler | |
16827 | temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris | |
16828 | 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should | |
16829 | reuse the register of parent for one of the local variables, | |
16830 | since it will think that parent can't possibly be used any more | |
16831 | in this routine. Assigning to the local variable will thus | |
16832 | munge parent in the parent process. */ | |
16833 | pid_t | |
16834 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
16835 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
16836 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
16837 | use the same hardware register for all 8 local variables. */ | |
16838 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
16839 | || p != p5 || p != p6 || p != p7) | |
16840 | _exit(1); | |
16841 | ||
16842 | /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent | |
16843 | from child file descriptors. If the child closes a descriptor | |
16844 | before it execs or exits, this munges the parent's descriptor | |
16845 | as well. Test for this by closing stdout in the child. */ | |
16846 | _exit(close(fileno(stdout)) != 0); | |
16847 | } else { | |
16848 | int status; | |
16849 | struct stat st; | |
16850 | ||
16851 | while (wait(&status) != child) | |
16852 | ; | |
16853 | return ( | |
16854 | /* Was there some problem with vforking? */ | |
16855 | child < 0 | |
16856 | ||
16857 | /* Did the child fail? (This shouldn't happen.) */ | |
16858 | || status | |
16859 | ||
16860 | /* Did the vfork/compiler bug occur? */ | |
16861 | || parent != getpid() | |
16862 | ||
16863 | /* Did the file descriptor bug occur? */ | |
16864 | || fstat(fileno(stdout), &st) != 0 | |
16865 | ); | |
16866 | } | |
16867 | } | |
16868 | _ACEOF | |
16869 | if ac_fn_c_try_run "$LINENO"; then : | |
16870 | ac_cv_func_vfork_works=yes | |
16871 | else | |
16872 | ac_cv_func_vfork_works=no | |
16873 | fi | |
16874 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
16875 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
16876 | fi | |
16877 | ||
16878 | fi | |
16879 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 | |
16880 | $as_echo "$ac_cv_func_vfork_works" >&6; } | |
16881 | ||
16882 | fi; | |
16883 | if test "x$ac_cv_func_fork_works" = xcross; then | |
16884 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
16885 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 | |
16886 | $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} | |
16887 | fi | |
16888 | ||
16889 | if test "x$ac_cv_func_vfork_works" = xyes; then | |
16890 | ||
16891 | $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h | |
16892 | ||
16893 | else | |
16894 | ||
16895 | $as_echo "#define vfork fork" >>confdefs.h | |
16896 | ||
16897 | fi | |
16898 | if test "x$ac_cv_func_fork_works" = xyes; then | |
16899 | ||
16900 | $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h | |
16901 | ||
16902 | fi | |
16903 | ||
16904 | ||
16905 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 | |
16906 | $as_echo_n "checking for nl_langinfo and CODESET... " >&6; } | |
d6974efa | 16907 | if ${emacs_cv_langinfo_codeset+:} false; then : |
067d23c9 KY |
16908 | $as_echo_n "(cached) " >&6 |
16909 | else | |
16910 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16911 | /* end confdefs.h. */ | |
16912 | #include <langinfo.h> | |
16913 | int | |
16914 | main () | |
16915 | { | |
16916 | char* cs = nl_langinfo(CODESET); | |
16917 | ; | |
16918 | return 0; | |
16919 | } | |
16920 | _ACEOF | |
16921 | if ac_fn_c_try_link "$LINENO"; then : | |
16922 | emacs_cv_langinfo_codeset=yes | |
16923 | else | |
16924 | emacs_cv_langinfo_codeset=no | |
16925 | fi | |
16926 | rm -f core conftest.err conftest.$ac_objext \ | |
16927 | conftest$ac_exeext conftest.$ac_ext | |
16928 | ||
16929 | fi | |
16930 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_langinfo_codeset" >&5 | |
16931 | $as_echo "$emacs_cv_langinfo_codeset" >&6; } | |
16932 | if test $emacs_cv_langinfo_codeset = yes; then | |
16933 | ||
16934 | $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h | |
16935 | ||
16936 | fi | |
16937 | ||
16938 | ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" | |
d6974efa | 16939 | if test "x$ac_cv_type_size_t" = xyes; then : |
067d23c9 KY |
16940 | |
16941 | cat >>confdefs.h <<_ACEOF | |
16942 | #define HAVE_SIZE_T 1 | |
16943 | _ACEOF | |
16944 | ||
16945 | ||
16946 | fi | |
16947 | ||
16948 | ||
16949 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5 | |
16950 | $as_echo_n "checking for mbstate_t... " >&6; } | |
d6974efa | 16951 | if ${ac_cv_type_mbstate_t+:} false; then : |
067d23c9 KY |
16952 | $as_echo_n "(cached) " >&6 |
16953 | else | |
16954 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16955 | /* end confdefs.h. */ | |
16956 | $ac_includes_default | |
16957 | # include <wchar.h> | |
16958 | int | |
16959 | main () | |
16960 | { | |
16961 | mbstate_t x; return sizeof x; | |
16962 | ; | |
16963 | return 0; | |
16964 | } | |
16965 | _ACEOF | |
16966 | if ac_fn_c_try_compile "$LINENO"; then : | |
16967 | ac_cv_type_mbstate_t=yes | |
16968 | else | |
16969 | ac_cv_type_mbstate_t=no | |
16970 | fi | |
16971 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
16972 | fi | |
16973 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5 | |
16974 | $as_echo "$ac_cv_type_mbstate_t" >&6; } | |
16975 | if test $ac_cv_type_mbstate_t = yes; then | |
16976 | ||
16977 | $as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h | |
16978 | ||
16979 | else | |
16980 | ||
16981 | $as_echo "#define mbstate_t int" >>confdefs.h | |
16982 | ||
16983 | fi | |
16984 | ||
067d23c9 KY |
16985 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C restricted array declarations" >&5 |
16986 | $as_echo_n "checking for C restricted array declarations... " >&6; } | |
d6974efa | 16987 | if ${emacs_cv_c_restrict_arr+:} false; then : |
067d23c9 KY |
16988 | $as_echo_n "(cached) " >&6 |
16989 | else | |
16990 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16991 | /* end confdefs.h. */ | |
16992 | void fred (int x[__restrict]); | |
16993 | int | |
16994 | main () | |
16995 | { | |
16996 | ||
16997 | ; | |
16998 | return 0; | |
16999 | } | |
17000 | _ACEOF | |
17001 | if ac_fn_c_try_compile "$LINENO"; then : | |
17002 | emacs_cv_c_restrict_arr=yes | |
17003 | else | |
17004 | emacs_cv_c_restrict_arr=no | |
17005 | fi | |
17006 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
17007 | fi | |
17008 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_c_restrict_arr" >&5 | |
17009 | $as_echo "$emacs_cv_c_restrict_arr" >&6; } | |
17010 | if test "$emacs_cv_c_restrict_arr" = yes; then | |
17011 | ||
17012 | $as_echo "#define __restrict_arr __restrict" >>confdefs.h | |
17013 | ||
17014 | fi | |
17015 | ||
17016 | ||
17017 | ||
17018 | # Set up the CFLAGS for real compilation, so we can substitute it. | |
17019 | CFLAGS="$REAL_CFLAGS" | |
17020 | CPPFLAGS="$REAL_CPPFLAGS" | |
17021 | ||
17022 | ## Hack to detect a buggy GCC version. | |
17023 | if test "x$GCC" = xyes \ | |
17024 | && test x"`$CC --version 2> /dev/null | grep 'gcc.* 4.5.0'`" != x \ | |
17025 | && test x"`echo $CFLAGS | grep '\-O[23]'`" != x \ | |
17026 | && test x"`echo $CFLAGS | grep '\-fno-optimize-sibling-calls'`" = x; then | |
2018939f | 17027 | as_fn_error $? "GCC 4.5.0 has problems compiling Emacs; see etc/PROBLEMS'." "$LINENO" 5 |
067d23c9 KY |
17028 | fi |
17029 | ||
16fab143 | 17030 | version=$PACKAGE_VERSION |
067d23c9 KY |
17031 | |
17032 | ### Specify what sort of things we'll be editing into Makefile and config.h. | |
17033 | ### Use configuration here uncanonicalized to avoid exceeding size limits. | |
17034 | ||
17035 | ||
17036 | ## Unused? | |
17037 | ||
17038 | ||
17039 | ||
17040 | ||
17041 | ||
17042 | ||
17043 | ||
17044 | ||
17045 | ||
17046 | ||
17047 | ||
17048 | ||
17049 | ||
17050 | ||
17051 | ||
17052 | ||
17053 | ||
17054 | ||
17055 | ||
17056 | ||
17057 | ## FIXME? Nothing uses @LD_SWITCH_X_SITE@. | |
17058 | ## src/Makefile.in did add LD_SWITCH_X_SITE (as a cpp define) to the | |
17059 | ## end of LIBX_BASE, but nothing ever set it. | |
17060 | ||
17061 | ||
17062 | ||
17063 | ||
17064 | ## Used in lwlib/Makefile.in. | |
17065 | ||
d6a003a8 AS |
17066 | if test -n "${machfile}"; then |
17067 | M_FILE="\$(srcdir)/${machfile}" | |
17068 | else | |
17069 | M_FILE= | |
17070 | fi | |
17071 | S_FILE="\$(srcdir)/${opsysfile}" | |
067d23c9 KY |
17072 | |
17073 | ||
17074 | ||
17075 | ||
17076 | ||
17077 | ||
17078 | ||
17079 | ||
17080 | ||
17081 | ||
17082 | ||
17083 | cat >>confdefs.h <<_ACEOF | |
17084 | #define EMACS_CONFIGURATION "${canonical}" | |
17085 | _ACEOF | |
17086 | ||
17087 | ||
17088 | cat >>confdefs.h <<_ACEOF | |
17089 | #define EMACS_CONFIG_OPTIONS "${ac_configure_args}" | |
17090 | _ACEOF | |
17091 | ||
d6a003a8 | 17092 | if test -n "$machfile"; then |
067d23c9 KY |
17093 | |
17094 | cat >>confdefs.h <<_ACEOF | |
17095 | #define config_machfile "${machfile}" | |
17096 | _ACEOF | |
17097 | ||
d6a003a8 | 17098 | fi |
067d23c9 KY |
17099 | |
17100 | cat >>confdefs.h <<_ACEOF | |
17101 | #define config_opsysfile "${opsysfile}" | |
17102 | _ACEOF | |
17103 | ||
17104 | ||
17105 | XMENU_OBJ= | |
17106 | XOBJ= | |
17107 | FONT_OBJ= | |
17108 | if test "${HAVE_X_WINDOWS}" = "yes" ; then | |
17109 | ||
17110 | $as_echo "#define HAVE_X_WINDOWS 1" >>confdefs.h | |
17111 | ||
17112 | XMENU_OBJ=xmenu.o | |
17113 | XOBJ="xterm.o xfns.o xselect.o xrdb.o fontset.o xsmfns.o fringe.o image.o xsettings.o xgselect.o" | |
17114 | FONT_OBJ=xfont.o | |
17115 | if test "$HAVE_XFT" = "yes"; then | |
17116 | FONT_OBJ="$FONT_OBJ ftfont.o xftfont.o ftxfont.o" | |
17117 | elif test "$HAVE_FREETYPE" = "yes"; then | |
17118 | FONT_OBJ="$FONT_OBJ ftfont.o ftxfont.o" | |
17119 | fi | |
17120 | ||
17121 | fi | |
17122 | ||
17123 | ||
17124 | ||
17125 | ||
17126 | WIDGET_OBJ= | |
17127 | MOTIF_LIBW= | |
17128 | if test "${USE_X_TOOLKIT}" != "none" ; then | |
17129 | WIDGET_OBJ=widget.o | |
17130 | ||
17131 | $as_echo "#define USE_X_TOOLKIT 1" >>confdefs.h | |
17132 | ||
17133 | if test "${USE_X_TOOLKIT}" = "LUCID"; then | |
17134 | ||
17135 | $as_echo "#define USE_LUCID 1" >>confdefs.h | |
17136 | ||
17137 | elif test "${USE_X_TOOLKIT}" = "MOTIF"; then | |
17138 | ||
17139 | $as_echo "#define USE_MOTIF 1" >>confdefs.h | |
17140 | ||
17141 | MOTIF_LIBW=-lXm | |
17142 | case "$opsys" in | |
17143 | gnu-linux) | |
17144 | ## Paul Abrahams <abrahams at equinox.shaysnet.com> says this is needed. | |
17145 | MOTIF_LIBW="$MOTIF_LIBW -lXpm" | |
17146 | ;; | |
17147 | ||
17148 | unixware) | |
17149 | ## Richard Anthony Ryan <ryanr at ellingtn.ftc.nrcs.usda.gov> | |
17150 | ## says -lXimp is needed in UNIX_SV ... 4.2 1.1.2. | |
17151 | MOTIF_LIBW="MOTIF_LIBW -lXimp" | |
17152 | ;; | |
17153 | ||
17154 | aix4-2) | |
17155 | ## olson@mcs.anl.gov says -li18n is needed by -lXm. | |
17156 | MOTIF_LIBW="$MOTIF_LIBW -li18n" | |
17157 | ;; | |
17158 | esac | |
17159 | MOTIF_LIBW="$MOTIF_LIBW $LIBXP" | |
17160 | fi | |
17161 | fi | |
17162 | ||
17163 | ||
17164 | TOOLKIT_LIBW= | |
17165 | case "$USE_X_TOOLKIT" in | |
17166 | MOTIF) TOOLKIT_LIBW="$MOTIF_LIBW" ;; | |
17167 | LUCID) TOOLKIT_LIBW="$LUCID_LIBW" ;; | |
17168 | none) test "x$HAVE_GTK" = "xyes" && TOOLKIT_LIBW="$GTK_LIBS" ;; | |
17169 | esac | |
17170 | ||
17171 | ||
17172 | if test "$USE_X_TOOLKIT" = "none"; then | |
17173 | LIBXT_OTHER="\$(LIBXSM)" | |
17174 | OLDXMENU_TARGET="really-oldXMenu" | |
17175 | else | |
17176 | LIBXT_OTHER="\$(LIBXMU) -lXt \$(LIBXTR6) -lXext" | |
17177 | OLDXMENU_TARGET="really-lwlib" | |
17178 | fi | |
17179 | ||
17180 | ||
17181 | ## The X Menu stuff is present in the X10 distribution, but missing | |
17182 | ## from X11. If we have X10, just use the installed library; | |
17183 | ## otherwise, use our own copy. | |
17184 | if test "${HAVE_X11}" = "yes" ; then | |
17185 | ||
17186 | $as_echo "#define HAVE_X11 1" >>confdefs.h | |
17187 | ||
17188 | ||
17189 | if test "$USE_X_TOOLKIT" = "none"; then | |
17190 | OLDXMENU="\${oldXMenudir}/libXMenu11.a" | |
17191 | else | |
17192 | OLDXMENU="\${lwlibdir}/liblw.a" | |
17193 | fi | |
17194 | LIBXMENU="\$(OLDXMENU)" | |
17195 | LIBX_OTHER="\$(LIBXT) \$(LIBX_EXTRA)" | |
17196 | OLDXMENU_DEPS="\${OLDXMENU} ../src/\${OLDXMENU}" | |
17197 | else | |
17198 | ## For a syntactically valid Makefile; not actually used for anything. | |
17199 | ## See comments in src/Makefile.in. | |
17200 | OLDXMENU=nothing | |
17201 | ## FIXME This case (!HAVE_X11 && HAVE_X_WINDOWS) is no longer possible(?). | |
17202 | if test "${HAVE_X_WINDOWS}" = "yes"; then | |
17203 | LIBXMENU="-lXMenu" | |
17204 | else | |
17205 | LIBXMENU= | |
17206 | fi | |
17207 | LIBX_OTHER= | |
17208 | OLDXMENU_DEPS= | |
17209 | fi | |
17210 | ||
17211 | if test "$HAVE_GTK" = "yes" || test "$HAVE_MENUS" != "yes"; then | |
17212 | OLDXMENU_TARGET= | |
17213 | OLDXMENU=nothing | |
17214 | LIBXMENU= | |
17215 | OLDXMENU_DEPS= | |
17216 | fi | |
17217 | ||
17218 | ||
17219 | ||
17220 | ||
17221 | ||
17222 | ||
17223 | ||
17224 | if test "${HAVE_MENUS}" = "yes" ; then | |
17225 | ||
17226 | $as_echo "#define HAVE_MENUS 1" >>confdefs.h | |
17227 | ||
17228 | fi | |
17229 | ||
17230 | if test "${GNU_MALLOC}" = "yes" ; then | |
17231 | ||
17232 | $as_echo "#define GNU_MALLOC 1" >>confdefs.h | |
17233 | ||
17234 | fi | |
17235 | ||
17236 | RALLOC_OBJ= | |
17237 | if test "${REL_ALLOC}" = "yes" ; then | |
17238 | ||
17239 | $as_echo "#define REL_ALLOC 1" >>confdefs.h | |
17240 | ||
17241 | ||
17242 | test "$system_malloc" != "yes" && RALLOC_OBJ=ralloc.o | |
17243 | fi | |
17244 | ||
17245 | ||
17246 | if test "$opsys" = "cygwin"; then | |
17247 | CYGWIN_OBJ="sheap.o" | |
17248 | ## Cygwin differs because of its unexec(). | |
17249 | PRE_ALLOC_OBJ= | |
17250 | POST_ALLOC_OBJ=lastfile.o | |
17251 | else | |
17252 | CYGWIN_OBJ= | |
17253 | PRE_ALLOC_OBJ=lastfile.o | |
17254 | POST_ALLOC_OBJ= | |
17255 | fi | |
17256 | ||
17257 | ||
17258 | ||
17259 | ||
17260 | ||
17261 | case "$opsys" in | |
17262 | aix4-2) LD_SWITCH_SYSTEM_TEMACS="-Wl,-bnodelcsect" ;; | |
17263 | ||
17264 | darwin) | |
17265 | ## The -headerpad option tells ld (see man page) to leave room at the | |
17266 | ## end of the header for adding load commands. Needed for dumping. | |
17267 | ## 0x690 is the total size of 30 segment load commands (at 56 | |
17268 | ## each); under Cocoa 31 commands are required. | |
17269 | if test "$HAVE_NS" = "yes"; then | |
17270 | libs_nsgui="-framework AppKit" | |
17271 | headerpad_extra=6C8 | |
17272 | else | |
17273 | libs_nsgui= | |
17274 | headerpad_extra=690 | |
17275 | fi | |
17276 | LD_SWITCH_SYSTEM_TEMACS="-prebind $libs_nsgui -Xlinker -headerpad -Xlinker $headerpad_extra" | |
17277 | ||
17278 | ## This is here because src/Makefile.in did some extra fiddling around | |
17279 | ## with LD_SWITCH_SYSTEM. The cpp logic was: | |
17280 | ## #ifndef LD_SWITCH_SYSTEM | |
17281 | ## #if !defined (__GNUC__) && ((defined (BSD_SYSTEM) && !defined (COFF))) | |
17282 | ## Since all the *bsds define LD_SWITCH_SYSTEM, this simplifies to: | |
17283 | ## not using gcc, darwin system not on an alpha (ie darwin, since | |
17284 | ## darwin + alpha does not occur). | |
17285 | ## Because this was done in src/Makefile.in, the resulting part of | |
17286 | ## LD_SWITCH_SYSTEM was not used in configure (ie, in ac_link). | |
17287 | ## It therefore seems cleaner to put this in LD_SWITCH_SYSTEM_TEMACS, | |
17288 | ## rather than LD_SWITCH_SYSTEM. | |
17289 | test "x$LD_SWITCH_SYSTEM" = "x" && test "x$GCC" != "xyes" && \ | |
17290 | LD_SWITCH_SYSTEM_TEMACS="-X $LD_SWITCH_SYSTEM_TEMACS" | |
17291 | ;; | |
17292 | ||
17293 | ## LD_SWITCH_X_SITE_AUX is a -R option saying where to find X at run-time. | |
17294 | ## When handled by cpp, this was in LD_SWITCH_SYSTEM. However, at | |
17295 | ## the point where configure sourced the s/*.h file, LD_SWITCH_X_SITE_AUX | |
17296 | ## had not yet been defined and was expanded to null. Hence LD_SWITCH_SYSTEM | |
17297 | ## had different values in configure (in ac_link) and src/Makefile.in. | |
17298 | ## It seems clearer therefore to put this piece in LD_SWITCH_SYSTEM_TEMACS. | |
17299 | gnu-linux) LD_SWITCH_SYSTEM_TEMACS="\$(LD_SWITCH_X_SITE_AUX)" ;; | |
17300 | ||
17301 | *) LD_SWITCH_SYSTEM_TEMACS= ;; | |
17302 | esac | |
17303 | ||
17304 | if test "$NS_IMPL_GNUSTEP" = "yes"; then | |
17305 | LD_SWITCH_SYSTEM_TEMACS="${LD_SWITCH_SYSTEM_TEMACS} -L${GNUSTEP_SYSTEM_LIBRARIES} ${GNUSTEP_LOCAL_LIBRARIES} -lgnustep-gui -lgnustep-base -lobjc -lpthread" | |
17306 | fi | |
17307 | ||
17308 | ||
17309 | ||
17310 | ||
17311 | LD_FIRSTFLAG= | |
17312 | ORDINARY_LINK= | |
17313 | case "$opsys" in | |
17314 | ## gnu: GNU needs its own crt0. | |
17315 | aix4-2|cygwin|darwin|gnu|hpux*|irix6-5|sol2*|unixware) ORDINARY_LINK=yes ;; | |
17316 | ||
17317 | ## On post 1.3 releases of NetBSD, gcc -nostdlib also clears the | |
17318 | ## library search parth, i.e. it won't search /usr/lib for libc and | |
17319 | ## friends. Using -nostartfiles instead avoids this problem, and | |
17320 | ## will also work on earlier NetBSD releases. | |
17321 | netbsd|openbsd) LD_FIRSTFLAG="-nostartfiles" ;; | |
17322 | ||
17323 | ## macpcc: NAKAJI Hiroyuki <nakaji@tutrp.tut.ac.jp> says | |
17324 | ## MkLinux/LinuxPPC needs this. | |
17325 | ## ibms390x only supports opsys = gnu-linux so it can be added here. | |
17326 | gnu-*) | |
17327 | case "$machine" in | |
17328 | macppc|ibms390x) LD_FIRSTFLAG="-nostdlib" ;; | |
17329 | esac | |
17330 | ;; | |
17331 | esac | |
17332 | ||
17333 | ||
17334 | if test "x$ORDINARY_LINK" = "xyes"; then | |
17335 | ||
17336 | LD_FIRSTFLAG="" | |
17337 | ||
17338 | $as_echo "#define ORDINARY_LINK 1" >>confdefs.h | |
17339 | ||
17340 | ||
17341 | ## The system files defining neither ORDINARY_LINK nor LD_FIRSTFLAG are: | |
17342 | ## freebsd, gnu-* not on macppc|ibms390x. | |
17343 | elif test "x$GCC" = "xyes" && test "x$LD_FIRSTFLAG" = "x"; then | |
17344 | ||
17345 | ## Versions of GCC >= 2.0 put their library, libgcc.a, in obscure | |
17346 | ## places that are difficult to figure out at make time. Fortunately, | |
17347 | ## these same versions allow you to pass arbitrary flags on to the | |
17348 | ## linker, so there is no reason not to use it as a linker. | |
17349 | ## | |
17350 | ## Well, it is not quite perfect. The "-nostdlib" keeps GCC from | |
17351 | ## searching for libraries in its internal directories, so we have to | |
17352 | ## ask GCC explicitly where to find libgcc.a (LIB_GCC below). | |
17353 | LD_FIRSTFLAG="-nostdlib" | |
17354 | fi | |
17355 | ||
17356 | ## FIXME? What setting of EDIT_LDFLAGS should this have? | |
17357 | test "$NS_IMPL_GNUSTEP" = "yes" && LD_FIRSTFLAG="-rdynamic" | |
17358 | ||
17359 | ||
17360 | ||
17361 | ||
17362 | ## FIXME? The logic here is not precisely the same as that above. | |
17363 | ## There is no check here for a pre-defined LD_FIRSTFLAG. | |
17364 | ## Should we only be setting LIB_GCC if LD ~ -nostdlib? | |
17365 | LIB_GCC= | |
17366 | if test "x$GCC" = "xyes" && test "x$ORDINARY_LINK" != "xyes"; then | |
17367 | ||
17368 | case "$opsys" in | |
17369 | freebsd|netbsd|openbsd) LIB_GCC= ;; | |
17370 | ||
17371 | gnu-*) | |
17372 | ## armin76@gentoo.org reported that the lgcc_s flag is necessary to | |
17373 | ## build on ARM EABI under GNU/Linux. (Bug#5518) | |
d6a003a8 AS |
17374 | case $host_cpu in |
17375 | arm*) | |
067d23c9 | 17376 | LIB_GCC="-lgcc_s" |
d6a003a8 AS |
17377 | ;; |
17378 | *) | |
067d23c9 KY |
17379 | ## FIXME? s/gnu-linux.h used to define LIB_GCC as below, then |
17380 | ## immediately undefine it again and redefine it to empty. | |
17381 | ## Was the C_SWITCH_X_SITE part really necessary? | |
17382 | ## LIB_GCC=`$CC $C_SWITCH_X_SITE -print-libgcc-file-name` | |
17383 | LIB_GCC= | |
d6a003a8 AS |
17384 | ;; |
17385 | esac | |
067d23c9 KY |
17386 | ;; |
17387 | ||
17388 | ## Ask GCC where to find libgcc.a. | |
17389 | *) LIB_GCC=`$CC -print-libgcc-file-name 2> /dev/null` ;; | |
17390 | esac | |
17391 | fi | |
17392 | ||
17393 | ||
17394 | TOOLTIP_SUPPORT= | |
17395 | WINDOW_SUPPORT= | |
17396 | ## If we're using X11/GNUstep, define some consequences. | |
17397 | if test "$HAVE_X_WINDOWS" = "yes" || test "$HAVE_NS" = "yes"; then | |
17398 | ||
17399 | $as_echo "#define HAVE_WINDOW_SYSTEM 1" >>confdefs.h | |
17400 | ||
17401 | ||
17402 | $as_echo "#define HAVE_MOUSE 1" >>confdefs.h | |
17403 | ||
17404 | MOUSE_SUPPORT="\$(REAL_MOUSE_SUPPORT)" | |
17405 | TOOLTIP_SUPPORT="\${lispsource}/mouse.elc" | |
17406 | ||
17407 | WINDOW_SUPPORT="\$(BASE_WINDOW_SUPPORT)" | |
17408 | test "$HAVE_X_WINDOWS" = "yes" && \ | |
17409 | WINDOW_SUPPORT="$WINDOW_SUPPORT \$(X_WINDOW_SUPPORT)" | |
17410 | ||
17411 | fi | |
17412 | ||
17413 | ||
17414 | ||
17415 | ||
17416 | ||
17417 | ||
17418 | ||
17419 | #### Report on what we decided to do. | |
17420 | #### Report GTK as a toolkit, even if it doesn't use Xt. | |
17421 | #### It makes printing result more understandable as using GTK sets | |
17422 | #### toolkit_scroll_bars to yes by default. | |
17423 | if test "${HAVE_GTK}" = "yes"; then | |
17424 | USE_X_TOOLKIT=GTK | |
17425 | fi | |
17426 | ||
2b7f50d8 AS |
17427 | and_machfile= |
17428 | if test -n "$machfile"; then | |
17429 | and_machfile=" and \`${machfile}'" | |
17430 | fi | |
17431 | ||
067d23c9 KY |
17432 | echo " |
17433 | Configured for \`${canonical}'. | |
17434 | ||
17435 | Where should the build process find the source code? ${srcdir} | |
17436 | What operating system and machine description files should Emacs use? | |
2b7f50d8 | 17437 | \`${opsysfile}'${and_machfile} |
067d23c9 KY |
17438 | What compiler should emacs be built with? ${CC} ${CFLAGS} |
17439 | Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason} | |
17440 | Should Emacs use a relocating allocator for buffers? ${REL_ALLOC} | |
17441 | Should Emacs use mmap(2) for buffer allocation? $use_mmap_for_buffers | |
17442 | What window system should Emacs use? ${window_system} | |
17443 | What toolkit should Emacs use? ${USE_X_TOOLKIT}" | |
17444 | ||
17445 | if test -n "${x_includes}"; then | |
17446 | echo " Where do we find X Windows header files? ${x_includes}" | |
17447 | else | |
17448 | echo " Where do we find X Windows header files? Standard dirs" | |
17449 | fi | |
17450 | if test -n "${x_libraries}"; then | |
17451 | echo " Where do we find X Windows libraries? ${x_libraries}" | |
17452 | else | |
17453 | echo " Where do we find X Windows libraries? Standard dirs" | |
17454 | fi | |
17455 | ||
17456 | echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}" | |
17457 | echo " Does Emacs use -lXpm? ${HAVE_XPM}" | |
17458 | echo " Does Emacs use -ljpeg? ${HAVE_JPEG}" | |
17459 | echo " Does Emacs use -ltiff? ${HAVE_TIFF}" | |
17460 | echo " Does Emacs use a gif library? ${HAVE_GIF} $LIBGIF" | |
17461 | echo " Does Emacs use -lpng? ${HAVE_PNG}" | |
17462 | echo " Does Emacs use -lrsvg-2? ${HAVE_RSVG}" | |
17463 | echo " Does Emacs use imagemagick? ${HAVE_IMAGEMAGICK}" | |
17464 | ||
17465 | echo " Does Emacs use -lgpm? ${HAVE_GPM}" | |
17466 | echo " Does Emacs use -ldbus? ${HAVE_DBUS}" | |
17467 | echo " Does Emacs use -lgconf? ${HAVE_GCONF}" | |
17468 | echo " Does Emacs use -lselinux? ${HAVE_LIBSELINUX}" | |
17469 | echo " Does Emacs use -lgnutls? ${HAVE_GNUTLS}" | |
17470 | echo " Does Emacs use -lxml2? ${HAVE_LIBXML2}" | |
17471 | ||
17472 | echo " Does Emacs use -lfreetype? ${HAVE_FREETYPE}" | |
17473 | echo " Does Emacs use -lm17n-flt? ${HAVE_M17N_FLT}" | |
17474 | echo " Does Emacs use -lotf? ${HAVE_LIBOTF}" | |
17475 | echo " Does Emacs use -lxft? ${HAVE_XFT}" | |
17476 | ||
17477 | echo " Does Emacs use toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}" | |
17478 | echo | |
17479 | ||
17480 | if test $USE_XASSERTS = yes; then | |
17481 | echo " Compiling with asserts turned on." | |
17482 | CPPFLAGS="$CPPFLAGS -DXASSERTS=1" | |
17483 | fi | |
17484 | ||
17485 | echo | |
17486 | ||
17487 | if test "$HAVE_NS" = "yes"; then | |
17488 | echo | |
17489 | echo "You must run \"make install\" in order to test the built application. | |
17490 | The installed application will go to nextstep/Emacs.app and can be | |
17491 | run or moved from there." | |
17492 | if test "$EN_NS_SELF_CONTAINED" = "yes"; then | |
17493 | echo "The application will be fully self-contained." | |
17494 | else | |
17495 | echo "The lisp resources for the application will be installed under ${prefix}. | |
17496 | You may need to run \"make install\" with sudo. The application will fail | |
17497 | to run if these resources are not installed." | |
17498 | fi | |
17499 | echo | |
17500 | fi | |
17501 | ||
17502 | ||
17503 | # Remove any trailing slashes in these variables. | |
17504 | test "${prefix}" != NONE && | |
17505 | prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'` | |
17506 | test "${exec_prefix}" != NONE && | |
17507 | exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'` | |
17508 | ||
193770ee | 17509 | ac_config_files="$ac_config_files Makefile lib/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 test/automated/Makefile" |
067d23c9 KY |
17510 | |
17511 | ac_config_commands="$ac_config_commands default" | |
17512 | ||
17513 | cat >confcache <<\_ACEOF | |
17514 | # This file is a shell script that caches the results of configure | |
17515 | # tests run on this system so they can be shared between configure | |
17516 | # scripts and configure runs, see configure's option --config-cache. | |
17517 | # It is not useful on other systems. If it contains results you don't | |
17518 | # want to keep, you may remove or edit it. | |
17519 | # | |
17520 | # config.status only pays attention to the cache file if you give it | |
17521 | # the --recheck option to rerun configure. | |
17522 | # | |
17523 | # `ac_cv_env_foo' variables (set or unset) will be overridden when | |
17524 | # loading this file, other *unset* `ac_cv_foo' will be assigned the | |
17525 | # following values. | |
17526 | ||
17527 | _ACEOF | |
17528 | ||
17529 | # The following way of writing the cache mishandles newlines in values, | |
17530 | # but we know of no workaround that is simple, portable, and efficient. | |
17531 | # So, we kill variables containing newlines. | |
17532 | # Ultrix sh set writes to stderr and can't be redirected directly, | |
17533 | # and sets the high bit in the cache file unless we assign to the vars. | |
17534 | ( | |
17535 | for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do | |
17536 | eval ac_val=\$$ac_var | |
17537 | case $ac_val in #( | |
17538 | *${as_nl}*) | |
17539 | case $ac_var in #( | |
17540 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
17541 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
17542 | esac | |
17543 | case $ac_var in #( | |
17544 | _ | IFS | as_nl) ;; #( | |
17545 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
17546 | *) { eval $ac_var=; unset $ac_var;} ;; | |
17547 | esac ;; | |
17548 | esac | |
17549 | done | |
17550 | ||
17551 | (set) 2>&1 | | |
17552 | case $as_nl`(ac_space=' '; set) 2>&1` in #( | |
17553 | *${as_nl}ac_space=\ *) | |
17554 | # `set' does not quote correctly, so add quotes: double-quote | |
17555 | # substitution turns \\\\ into \\, and sed turns \\ into \. | |
17556 | sed -n \ | |
17557 | "s/'/'\\\\''/g; | |
17558 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" | |
17559 | ;; #( | |
17560 | *) | |
17561 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
17562 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" | |
17563 | ;; | |
17564 | esac | | |
17565 | sort | |
17566 | ) | | |
17567 | sed ' | |
17568 | /^ac_cv_env_/b end | |
17569 | t clear | |
17570 | :clear | |
17571 | s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ | |
17572 | t end | |
17573 | s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ | |
17574 | :end' >>confcache | |
17575 | if diff "$cache_file" confcache >/dev/null 2>&1; then :; else | |
17576 | if test -w "$cache_file"; then | |
d6974efa | 17577 | if test "x$cache_file" != "x/dev/null"; then |
067d23c9 KY |
17578 | { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 |
17579 | $as_echo "$as_me: updating cache $cache_file" >&6;} | |
d6974efa PE |
17580 | if test ! -f "$cache_file" || test -h "$cache_file"; then |
17581 | cat confcache >"$cache_file" | |
17582 | else | |
17583 | case $cache_file in #( | |
17584 | */* | ?:*) | |
17585 | mv -f confcache "$cache_file"$$ && | |
17586 | mv -f "$cache_file"$$ "$cache_file" ;; #( | |
17587 | *) | |
17588 | mv -f confcache "$cache_file" ;; | |
17589 | esac | |
17590 | fi | |
17591 | fi | |
067d23c9 KY |
17592 | else |
17593 | { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 | |
17594 | $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} | |
17595 | fi | |
17596 | fi | |
17597 | rm -f confcache | |
17598 | ||
17599 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
17600 | # Let make expand exec_prefix. | |
17601 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
17602 | ||
17603 | DEFS=-DHAVE_CONFIG_H | |
17604 | ||
17605 | ac_libobjs= | |
17606 | ac_ltlibobjs= | |
2018939f | 17607 | U= |
067d23c9 KY |
17608 | for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue |
17609 | # 1. Remove the extension, and $U if already installed. | |
17610 | ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' | |
17611 | ac_i=`$as_echo "$ac_i" | sed "$ac_script"` | |
17612 | # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR | |
17613 | # will be set to the directory where LIBOBJS objects are built. | |
17614 | as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" | |
17615 | as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' | |
17616 | done | |
17617 | LIBOBJS=$ac_libobjs | |
17618 | ||
17619 | LTLIBOBJS=$ac_ltlibobjs | |
17620 | ||
17621 | ||
743c80a7 PE |
17622 | if test -n "$EXEEXT"; then |
17623 | am__EXEEXT_TRUE= | |
17624 | am__EXEEXT_FALSE='#' | |
17625 | else | |
17626 | am__EXEEXT_TRUE='#' | |
17627 | am__EXEEXT_FALSE= | |
17628 | fi | |
17629 | ||
17630 | if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then | |
17631 | as_fn_error $? "conditional \"AMDEP\" was never defined. | |
17632 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
17633 | fi | |
17634 | if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then | |
17635 | as_fn_error $? "conditional \"am__fastdepCC\" was never defined. | |
17636 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
17637 | fi | |
17638 | ||
17639 | if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then | |
17640 | as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined. | |
17641 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
17642 | fi | |
17643 | ||
17644 | gl_libobjs= | |
17645 | gl_ltlibobjs= | |
17646 | if test -n "$gl_LIBOBJS"; then | |
17647 | # Remove the extension. | |
17648 | sed_drop_objext='s/\.o$//;s/\.obj$//' | |
17649 | for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do | |
17650 | gl_libobjs="$gl_libobjs $i.$ac_objext" | |
17651 | gl_ltlibobjs="$gl_ltlibobjs $i.lo" | |
17652 | done | |
17653 | fi | |
17654 | gl_LIBOBJS=$gl_libobjs | |
17655 | ||
17656 | gl_LTLIBOBJS=$gl_ltlibobjs | |
17657 | ||
17658 | ||
17659 | ||
17660 | gltests_libobjs= | |
17661 | gltests_ltlibobjs= | |
17662 | if test -n "$gltests_LIBOBJS"; then | |
17663 | # Remove the extension. | |
17664 | sed_drop_objext='s/\.o$//;s/\.obj$//' | |
17665 | for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do | |
17666 | gltests_libobjs="$gltests_libobjs $i.$ac_objext" | |
17667 | gltests_ltlibobjs="$gltests_ltlibobjs $i.lo" | |
17668 | done | |
17669 | fi | |
17670 | gltests_LIBOBJS=$gltests_libobjs | |
17671 | ||
17672 | gltests_LTLIBOBJS=$gltests_ltlibobjs | |
17673 | ||
067d23c9 KY |
17674 | |
17675 | ||
d6974efa | 17676 | : "${CONFIG_STATUS=./config.status}" |
067d23c9 KY |
17677 | ac_write_fail=0 |
17678 | ac_clean_files_save=$ac_clean_files | |
17679 | ac_clean_files="$ac_clean_files $CONFIG_STATUS" | |
17680 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 | |
17681 | $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} | |
17682 | as_write_fail=0 | |
17683 | cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 | |
17684 | #! $SHELL | |
17685 | # Generated by $as_me. | |
17686 | # Run this file to recreate the current configuration. | |
17687 | # Compiler output produced by configure, useful for debugging | |
17688 | # configure, is in config.log if it exists. | |
17689 | ||
17690 | debug=false | |
17691 | ac_cs_recheck=false | |
17692 | ac_cs_silent=false | |
17693 | ||
17694 | SHELL=\${CONFIG_SHELL-$SHELL} | |
17695 | export SHELL | |
17696 | _ASEOF | |
17697 | cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 | |
17698 | ## -------------------- ## | |
17699 | ## M4sh Initialization. ## | |
17700 | ## -------------------- ## | |
17701 | ||
17702 | # Be more Bourne compatible | |
17703 | DUALCASE=1; export DUALCASE # for MKS sh | |
17704 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : | |
17705 | emulate sh | |
17706 | NULLCMD=: | |
17707 | # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which | |
17708 | # is contrary to our usage. Disable this feature. | |
17709 | alias -g '${1+"$@"}'='"$@"' | |
17710 | setopt NO_GLOB_SUBST | |
17711 | else | |
17712 | case `(set -o) 2>/dev/null` in #( | |
17713 | *posix*) : | |
17714 | set -o posix ;; #( | |
17715 | *) : | |
17716 | ;; | |
17717 | esac | |
17718 | fi | |
17719 | ||
17720 | ||
17721 | as_nl=' | |
17722 | ' | |
17723 | export as_nl | |
17724 | # Printing a long string crashes Solaris 7 /usr/bin/printf. | |
17725 | as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' | |
17726 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo | |
17727 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo | |
17728 | # Prefer a ksh shell builtin over an external printf program on Solaris, | |
17729 | # but without wasting forks for bash or zsh. | |
17730 | if test -z "$BASH_VERSION$ZSH_VERSION" \ | |
17731 | && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then | |
17732 | as_echo='print -r --' | |
17733 | as_echo_n='print -rn --' | |
17734 | elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then | |
17735 | as_echo='printf %s\n' | |
17736 | as_echo_n='printf %s' | |
17737 | else | |
17738 | if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then | |
17739 | as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' | |
17740 | as_echo_n='/usr/ucb/echo -n' | |
17741 | else | |
17742 | as_echo_body='eval expr "X$1" : "X\\(.*\\)"' | |
17743 | as_echo_n_body='eval | |
17744 | arg=$1; | |
17745 | case $arg in #( | |
17746 | *"$as_nl"*) | |
17747 | expr "X$arg" : "X\\(.*\\)$as_nl"; | |
17748 | arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; | |
17749 | esac; | |
17750 | expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" | |
17751 | ' | |
17752 | export as_echo_n_body | |
17753 | as_echo_n='sh -c $as_echo_n_body as_echo' | |
17754 | fi | |
17755 | export as_echo_body | |
17756 | as_echo='sh -c $as_echo_body as_echo' | |
17757 | fi | |
17758 | ||
17759 | # The user is always right. | |
17760 | if test "${PATH_SEPARATOR+set}" != set; then | |
17761 | PATH_SEPARATOR=: | |
17762 | (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { | |
17763 | (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || | |
17764 | PATH_SEPARATOR=';' | |
17765 | } | |
17766 | fi | |
17767 | ||
17768 | ||
17769 | # IFS | |
17770 | # We need space, tab and new line, in precisely that order. Quoting is | |
17771 | # there to prevent editors from complaining about space-tab. | |
17772 | # (If _AS_PATH_WALK were called with IFS unset, it would disable word | |
17773 | # splitting by setting IFS to empty value.) | |
17774 | IFS=" "" $as_nl" | |
17775 | ||
17776 | # Find who we are. Look in the path if we contain no directory separator. | |
d6974efa | 17777 | as_myself= |
067d23c9 KY |
17778 | case $0 in #(( |
17779 | *[\\/]* ) as_myself=$0 ;; | |
17780 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
17781 | for as_dir in $PATH | |
17782 | do | |
17783 | IFS=$as_save_IFS | |
17784 | test -z "$as_dir" && as_dir=. | |
17785 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | |
17786 | done | |
17787 | IFS=$as_save_IFS | |
17788 | ||
17789 | ;; | |
17790 | esac | |
17791 | # We did not find ourselves, most probably we were run as `sh COMMAND' | |
17792 | # in which case we are not to be found in the path. | |
17793 | if test "x$as_myself" = x; then | |
17794 | as_myself=$0 | |
17795 | fi | |
17796 | if test ! -f "$as_myself"; then | |
17797 | $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 | |
17798 | exit 1 | |
17799 | fi | |
17800 | ||
17801 | # Unset variables that we do not need and which cause bugs (e.g. in | |
17802 | # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" | |
17803 | # suppresses any "Segmentation fault" message there. '((' could | |
17804 | # trigger a bug in pdksh 5.2.14. | |
17805 | for as_var in BASH_ENV ENV MAIL MAILPATH | |
17806 | do eval test x\${$as_var+set} = xset \ | |
17807 | && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : | |
17808 | done | |
17809 | PS1='$ ' | |
17810 | PS2='> ' | |
17811 | PS4='+ ' | |
17812 | ||
17813 | # NLS nuisances. | |
17814 | LC_ALL=C | |
17815 | export LC_ALL | |
17816 | LANGUAGE=C | |
17817 | export LANGUAGE | |
17818 | ||
17819 | # CDPATH. | |
17820 | (unset CDPATH) >/dev/null 2>&1 && unset CDPATH | |
17821 | ||
17822 | ||
2018939f AS |
17823 | # as_fn_error STATUS ERROR [LINENO LOG_FD] |
17824 | # ---------------------------------------- | |
067d23c9 KY |
17825 | # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are |
17826 | # provided, also output the error to LOG_FD, referencing LINENO. Then exit the | |
2018939f | 17827 | # script with STATUS, using 1 if that was 0. |
067d23c9 KY |
17828 | as_fn_error () |
17829 | { | |
2018939f AS |
17830 | as_status=$1; test $as_status -eq 0 && as_status=1 |
17831 | if test "$4"; then | |
17832 | as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
17833 | $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 | |
067d23c9 | 17834 | fi |
2018939f | 17835 | $as_echo "$as_me: error: $2" >&2 |
067d23c9 KY |
17836 | as_fn_exit $as_status |
17837 | } # as_fn_error | |
17838 | ||
17839 | ||
17840 | # as_fn_set_status STATUS | |
17841 | # ----------------------- | |
17842 | # Set $? to STATUS, without forking. | |
17843 | as_fn_set_status () | |
17844 | { | |
17845 | return $1 | |
17846 | } # as_fn_set_status | |
17847 | ||
17848 | # as_fn_exit STATUS | |
17849 | # ----------------- | |
17850 | # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. | |
17851 | as_fn_exit () | |
17852 | { | |
17853 | set +e | |
17854 | as_fn_set_status $1 | |
17855 | exit $1 | |
17856 | } # as_fn_exit | |
17857 | ||
17858 | # as_fn_unset VAR | |
17859 | # --------------- | |
17860 | # Portably unset VAR. | |
17861 | as_fn_unset () | |
17862 | { | |
17863 | { eval $1=; unset $1;} | |
17864 | } | |
17865 | as_unset=as_fn_unset | |
17866 | # as_fn_append VAR VALUE | |
17867 | # ---------------------- | |
17868 | # Append the text in VALUE to the end of the definition contained in VAR. Take | |
17869 | # advantage of any shell optimizations that allow amortized linear growth over | |
17870 | # repeated appends, instead of the typical quadratic growth present in naive | |
17871 | # implementations. | |
17872 | if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : | |
17873 | eval 'as_fn_append () | |
17874 | { | |
17875 | eval $1+=\$2 | |
17876 | }' | |
17877 | else | |
17878 | as_fn_append () | |
17879 | { | |
17880 | eval $1=\$$1\$2 | |
17881 | } | |
17882 | fi # as_fn_append | |
17883 | ||
17884 | # as_fn_arith ARG... | |
17885 | # ------------------ | |
17886 | # Perform arithmetic evaluation on the ARGs, and store the result in the | |
17887 | # global $as_val. Take advantage of shells that can avoid forks. The arguments | |
17888 | # must be portable across $(()) and expr. | |
17889 | if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : | |
17890 | eval 'as_fn_arith () | |
17891 | { | |
17892 | as_val=$(( $* )) | |
17893 | }' | |
17894 | else | |
17895 | as_fn_arith () | |
17896 | { | |
17897 | as_val=`expr "$@" || test $? -eq 1` | |
17898 | } | |
17899 | fi # as_fn_arith | |
17900 | ||
17901 | ||
17902 | if expr a : '\(a\)' >/dev/null 2>&1 && | |
17903 | test "X`expr 00001 : '.*\(...\)'`" = X001; then | |
17904 | as_expr=expr | |
17905 | else | |
17906 | as_expr=false | |
17907 | fi | |
17908 | ||
17909 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then | |
17910 | as_basename=basename | |
17911 | else | |
17912 | as_basename=false | |
17913 | fi | |
17914 | ||
17915 | if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then | |
17916 | as_dirname=dirname | |
17917 | else | |
17918 | as_dirname=false | |
17919 | fi | |
17920 | ||
17921 | as_me=`$as_basename -- "$0" || | |
17922 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ | |
17923 | X"$0" : 'X\(//\)$' \| \ | |
17924 | X"$0" : 'X\(/\)' \| . 2>/dev/null || | |
17925 | $as_echo X/"$0" | | |
17926 | sed '/^.*\/\([^/][^/]*\)\/*$/{ | |
17927 | s//\1/ | |
17928 | q | |
17929 | } | |
17930 | /^X\/\(\/\/\)$/{ | |
17931 | s//\1/ | |
17932 | q | |
17933 | } | |
17934 | /^X\/\(\/\).*/{ | |
17935 | s//\1/ | |
17936 | q | |
17937 | } | |
17938 | s/.*/./; q'` | |
17939 | ||
17940 | # Avoid depending upon Character Ranges. | |
17941 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
17942 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
17943 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
17944 | as_cr_digits='0123456789' | |
17945 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
17946 | ||
17947 | ECHO_C= ECHO_N= ECHO_T= | |
17948 | case `echo -n x` in #((((( | |
17949 | -n*) | |
17950 | case `echo 'xy\c'` in | |
17951 | *c*) ECHO_T=' ';; # ECHO_T is single tab character. | |
17952 | xy) ECHO_C='\c';; | |
17953 | *) echo `echo ksh88 bug on AIX 6.1` > /dev/null | |
17954 | ECHO_T=' ';; | |
17955 | esac;; | |
17956 | *) | |
17957 | ECHO_N='-n';; | |
17958 | esac | |
17959 | ||
17960 | rm -f conf$$ conf$$.exe conf$$.file | |
17961 | if test -d conf$$.dir; then | |
17962 | rm -f conf$$.dir/conf$$.file | |
17963 | else | |
17964 | rm -f conf$$.dir | |
17965 | mkdir conf$$.dir 2>/dev/null | |
17966 | fi | |
17967 | if (echo >conf$$.file) 2>/dev/null; then | |
17968 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
17969 | as_ln_s='ln -s' | |
17970 | # ... but there are two gotchas: | |
17971 | # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. | |
17972 | # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. | |
17973 | # In both cases, we have to default to `cp -p'. | |
17974 | ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || | |
17975 | as_ln_s='cp -p' | |
17976 | elif ln conf$$.file conf$$ 2>/dev/null; then | |
17977 | as_ln_s=ln | |
17978 | else | |
17979 | as_ln_s='cp -p' | |
17980 | fi | |
17981 | else | |
17982 | as_ln_s='cp -p' | |
17983 | fi | |
17984 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file | |
17985 | rmdir conf$$.dir 2>/dev/null | |
17986 | ||
17987 | ||
17988 | # as_fn_mkdir_p | |
17989 | # ------------- | |
17990 | # Create "$as_dir" as a directory, including parents if necessary. | |
17991 | as_fn_mkdir_p () | |
17992 | { | |
17993 | ||
17994 | case $as_dir in #( | |
17995 | -*) as_dir=./$as_dir;; | |
17996 | esac | |
17997 | test -d "$as_dir" || eval $as_mkdir_p || { | |
17998 | as_dirs= | |
17999 | while :; do | |
18000 | case $as_dir in #( | |
18001 | *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( | |
18002 | *) as_qdir=$as_dir;; | |
18003 | esac | |
18004 | as_dirs="'$as_qdir' $as_dirs" | |
18005 | as_dir=`$as_dirname -- "$as_dir" || | |
18006 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
18007 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
18008 | X"$as_dir" : 'X\(//\)$' \| \ | |
18009 | X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || | |
18010 | $as_echo X"$as_dir" | | |
18011 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
18012 | s//\1/ | |
18013 | q | |
18014 | } | |
18015 | /^X\(\/\/\)[^/].*/{ | |
18016 | s//\1/ | |
18017 | q | |
18018 | } | |
18019 | /^X\(\/\/\)$/{ | |
18020 | s//\1/ | |
18021 | q | |
18022 | } | |
18023 | /^X\(\/\).*/{ | |
18024 | s//\1/ | |
18025 | q | |
18026 | } | |
18027 | s/.*/./; q'` | |
18028 | test -d "$as_dir" && break | |
18029 | done | |
18030 | test -z "$as_dirs" || eval "mkdir $as_dirs" | |
2018939f | 18031 | } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" |
067d23c9 KY |
18032 | |
18033 | ||
18034 | } # as_fn_mkdir_p | |
18035 | if mkdir -p . 2>/dev/null; then | |
18036 | as_mkdir_p='mkdir -p "$as_dir"' | |
18037 | else | |
18038 | test -d ./-p && rmdir ./-p | |
18039 | as_mkdir_p=false | |
18040 | fi | |
18041 | ||
18042 | if test -x / >/dev/null 2>&1; then | |
18043 | as_test_x='test -x' | |
18044 | else | |
18045 | if ls -dL / >/dev/null 2>&1; then | |
18046 | as_ls_L_option=L | |
18047 | else | |
18048 | as_ls_L_option= | |
18049 | fi | |
18050 | as_test_x=' | |
18051 | eval sh -c '\'' | |
18052 | if test -d "$1"; then | |
18053 | test -d "$1/."; | |
18054 | else | |
18055 | case $1 in #( | |
18056 | -*)set "./$1";; | |
18057 | esac; | |
18058 | case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( | |
18059 | ???[sx]*):;;*)false;;esac;fi | |
18060 | '\'' sh | |
18061 | ' | |
18062 | fi | |
18063 | as_executable_p=$as_test_x | |
18064 | ||
18065 | # Sed expression to map a string onto a valid CPP name. | |
18066 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" | |
18067 | ||
18068 | # Sed expression to map a string onto a valid variable name. | |
18069 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" | |
18070 | ||
18071 | ||
18072 | exec 6>&1 | |
18073 | ## ----------------------------------- ## | |
18074 | ## Main body of $CONFIG_STATUS script. ## | |
18075 | ## ----------------------------------- ## | |
18076 | _ASEOF | |
18077 | test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 | |
18078 | ||
18079 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
18080 | # Save the log message, to keep $0 and so on meaningful, and to | |
18081 | # report actual input values of CONFIG_FILES etc. instead of their | |
18082 | # values after options handling. | |
18083 | ac_log=" | |
18084 | This file was extended by emacs $as_me 24.0.50, which was | |
d6974efa | 18085 | generated by GNU Autoconf 2.68. Invocation command line was |
067d23c9 KY |
18086 | |
18087 | CONFIG_FILES = $CONFIG_FILES | |
18088 | CONFIG_HEADERS = $CONFIG_HEADERS | |
18089 | CONFIG_LINKS = $CONFIG_LINKS | |
18090 | CONFIG_COMMANDS = $CONFIG_COMMANDS | |
18091 | $ $0 $@ | |
18092 | ||
18093 | on `(hostname || uname -n) 2>/dev/null | sed 1q` | |
18094 | " | |
18095 | ||
18096 | _ACEOF | |
18097 | ||
18098 | case $ac_config_files in *" | |
18099 | "*) set x $ac_config_files; shift; ac_config_files=$*;; | |
18100 | esac | |
18101 | ||
18102 | case $ac_config_headers in *" | |
18103 | "*) set x $ac_config_headers; shift; ac_config_headers=$*;; | |
18104 | esac | |
18105 | ||
18106 | ||
18107 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
18108 | # Files that config.status was made for. | |
18109 | config_files="$ac_config_files" | |
18110 | config_headers="$ac_config_headers" | |
18111 | config_commands="$ac_config_commands" | |
18112 | ||
18113 | _ACEOF | |
18114 | ||
18115 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
18116 | ac_cs_usage="\ | |
18117 | \`$as_me' instantiates files and other configuration actions | |
18118 | from templates according to the current configuration. Unless the files | |
18119 | and actions are specified as TAGs, all are instantiated by default. | |
18120 | ||
18121 | Usage: $0 [OPTION]... [TAG]... | |
18122 | ||
18123 | -h, --help print this help, then exit | |
18124 | -V, --version print version number and configuration settings, then exit | |
18125 | --config print configuration, then exit | |
18126 | -q, --quiet, --silent | |
18127 | do not print progress messages | |
18128 | -d, --debug don't remove temporary files | |
18129 | --recheck update $as_me by reconfiguring in the same conditions | |
18130 | --file=FILE[:TEMPLATE] | |
18131 | instantiate the configuration file FILE | |
18132 | --header=FILE[:TEMPLATE] | |
18133 | instantiate the configuration header FILE | |
18134 | ||
18135 | Configuration files: | |
18136 | $config_files | |
18137 | ||
18138 | Configuration headers: | |
18139 | $config_headers | |
18140 | ||
18141 | Configuration commands: | |
18142 | $config_commands | |
18143 | ||
18144 | Report bugs to the package provider." | |
18145 | ||
18146 | _ACEOF | |
18147 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
18148 | ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" | |
18149 | ac_cs_version="\\ | |
18150 | emacs config.status 24.0.50 | |
d6974efa | 18151 | configured by $0, generated by GNU Autoconf 2.68, |
067d23c9 KY |
18152 | with options \\"\$ac_cs_config\\" |
18153 | ||
2018939f | 18154 | Copyright (C) 2010 Free Software Foundation, Inc. |
067d23c9 KY |
18155 | This config.status script is free software; the Free Software Foundation |
18156 | gives unlimited permission to copy, distribute and modify it." | |
18157 | ||
18158 | ac_pwd='$ac_pwd' | |
18159 | srcdir='$srcdir' | |
18160 | INSTALL='$INSTALL' | |
743c80a7 PE |
18161 | MKDIR_P='$MKDIR_P' |
18162 | AWK='$AWK' | |
067d23c9 KY |
18163 | test -n "\$AWK" || AWK=awk |
18164 | _ACEOF | |
18165 | ||
18166 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
18167 | # The default lists apply if the user does not specify any file. | |
18168 | ac_need_defaults=: | |
18169 | while test $# != 0 | |
18170 | do | |
18171 | case $1 in | |
2018939f | 18172 | --*=?*) |
067d23c9 KY |
18173 | ac_option=`expr "X$1" : 'X\([^=]*\)='` |
18174 | ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` | |
18175 | ac_shift=: | |
18176 | ;; | |
2018939f AS |
18177 | --*=) |
18178 | ac_option=`expr "X$1" : 'X\([^=]*\)='` | |
18179 | ac_optarg= | |
18180 | ac_shift=: | |
18181 | ;; | |
067d23c9 KY |
18182 | *) |
18183 | ac_option=$1 | |
18184 | ac_optarg=$2 | |
18185 | ac_shift=shift | |
18186 | ;; | |
18187 | esac | |
18188 | ||
18189 | case $ac_option in | |
18190 | # Handling of the options. | |
18191 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) | |
18192 | ac_cs_recheck=: ;; | |
18193 | --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) | |
18194 | $as_echo "$ac_cs_version"; exit ;; | |
18195 | --config | --confi | --conf | --con | --co | --c ) | |
18196 | $as_echo "$ac_cs_config"; exit ;; | |
18197 | --debug | --debu | --deb | --de | --d | -d ) | |
18198 | debug=: ;; | |
18199 | --file | --fil | --fi | --f ) | |
18200 | $ac_shift | |
18201 | case $ac_optarg in | |
18202 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
2018939f | 18203 | '') as_fn_error $? "missing file argument" ;; |
067d23c9 KY |
18204 | esac |
18205 | as_fn_append CONFIG_FILES " '$ac_optarg'" | |
18206 | ac_need_defaults=false;; | |
18207 | --header | --heade | --head | --hea ) | |
18208 | $ac_shift | |
18209 | case $ac_optarg in | |
18210 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
18211 | esac | |
18212 | as_fn_append CONFIG_HEADERS " '$ac_optarg'" | |
18213 | ac_need_defaults=false;; | |
18214 | --he | --h) | |
18215 | # Conflict between --help and --header | |
2018939f | 18216 | as_fn_error $? "ambiguous option: \`$1' |
067d23c9 KY |
18217 | Try \`$0 --help' for more information.";; |
18218 | --help | --hel | -h ) | |
18219 | $as_echo "$ac_cs_usage"; exit ;; | |
18220 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
18221 | | -silent | --silent | --silen | --sile | --sil | --si | --s) | |
18222 | ac_cs_silent=: ;; | |
18223 | ||
18224 | # This is an error. | |
2018939f | 18225 | -*) as_fn_error $? "unrecognized option: \`$1' |
067d23c9 KY |
18226 | Try \`$0 --help' for more information." ;; |
18227 | ||
18228 | *) as_fn_append ac_config_targets " $1" | |
18229 | ac_need_defaults=false ;; | |
18230 | ||
18231 | esac | |
18232 | shift | |
18233 | done | |
18234 | ||
18235 | ac_configure_extra_args= | |
18236 | ||
18237 | if $ac_cs_silent; then | |
18238 | exec 6>/dev/null | |
18239 | ac_configure_extra_args="$ac_configure_extra_args --silent" | |
18240 | fi | |
18241 | ||
18242 | _ACEOF | |
18243 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
18244 | if \$ac_cs_recheck; then | |
18245 | set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion | |
18246 | shift | |
18247 | \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 | |
18248 | CONFIG_SHELL='$SHELL' | |
18249 | export CONFIG_SHELL | |
18250 | exec "\$@" | |
18251 | fi | |
18252 | ||
18253 | _ACEOF | |
18254 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
18255 | exec 5>>config.log | |
18256 | { | |
18257 | echo | |
18258 | sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX | |
18259 | ## Running $as_me. ## | |
18260 | _ASBOX | |
18261 | $as_echo "$ac_log" | |
18262 | } >&5 | |
18263 | ||
18264 | _ACEOF | |
18265 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
18266 | # | |
18267 | # INIT-COMMANDS | |
18268 | # | |
743c80a7 | 18269 | AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" |
067d23c9 KY |
18270 | GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPPFLAGS="$CPPFLAGS" |
18271 | ||
18272 | _ACEOF | |
18273 | ||
18274 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
18275 | ||
18276 | # Handling of arguments. | |
18277 | for ac_config_target in $ac_config_targets | |
18278 | do | |
18279 | case $ac_config_target in | |
18280 | "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:src/config.in" ;; | |
743c80a7 | 18281 | "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; |
067d23c9 | 18282 | "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; |
743c80a7 | 18283 | "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;; |
067d23c9 KY |
18284 | "lib-src/Makefile") CONFIG_FILES="$CONFIG_FILES lib-src/Makefile" ;; |
18285 | "oldXMenu/Makefile") CONFIG_FILES="$CONFIG_FILES oldXMenu/Makefile" ;; | |
18286 | "doc/emacs/Makefile") CONFIG_FILES="$CONFIG_FILES doc/emacs/Makefile" ;; | |
18287 | "doc/misc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/misc/Makefile" ;; | |
18288 | "doc/lispintro/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispintro/Makefile" ;; | |
18289 | "doc/lispref/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispref/Makefile" ;; | |
18290 | "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; | |
18291 | "lwlib/Makefile") CONFIG_FILES="$CONFIG_FILES lwlib/Makefile" ;; | |
18292 | "lisp/Makefile") CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;; | |
18293 | "leim/Makefile") CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;; | |
ea062854 | 18294 | "test/automated/Makefile") CONFIG_FILES="$CONFIG_FILES test/automated/Makefile" ;; |
067d23c9 KY |
18295 | "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; |
18296 | ||
d6974efa | 18297 | *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; |
067d23c9 KY |
18298 | esac |
18299 | done | |
18300 | ||
18301 | ||
18302 | # If the user did not use the arguments to specify the items to instantiate, | |
18303 | # then the envvar interface is used. Set only those that are not. | |
18304 | # We use the long form for the default assignment because of an extremely | |
18305 | # bizarre bug on SunOS 4.1.3. | |
18306 | if $ac_need_defaults; then | |
18307 | test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files | |
18308 | test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers | |
18309 | test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands | |
18310 | fi | |
18311 | ||
18312 | # Have a temporary directory for convenience. Make it in the build tree | |
18313 | # simply because there is no reason against having it here, and in addition, | |
18314 | # creating and moving files from /tmp can sometimes cause problems. | |
18315 | # Hook for its removal unless debugging. | |
18316 | # Note that there is a small window in which the directory will not be cleaned: | |
18317 | # after its creation but before its name has been assigned to `$tmp'. | |
18318 | $debug || | |
18319 | { | |
d6974efa | 18320 | tmp= ac_tmp= |
067d23c9 | 18321 | trap 'exit_status=$? |
d6974efa PE |
18322 | : "${ac_tmp:=$tmp}" |
18323 | { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status | |
067d23c9 KY |
18324 | ' 0 |
18325 | trap 'as_fn_exit 1' 1 2 13 15 | |
18326 | } | |
18327 | # Create a (secure) tmp directory for tmp files. | |
18328 | ||
18329 | { | |
18330 | tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && | |
d6974efa | 18331 | test -d "$tmp" |
067d23c9 KY |
18332 | } || |
18333 | { | |
18334 | tmp=./conf$$-$RANDOM | |
18335 | (umask 077 && mkdir "$tmp") | |
2018939f | 18336 | } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 |
d6974efa | 18337 | ac_tmp=$tmp |
067d23c9 KY |
18338 | |
18339 | # Set up the scripts for CONFIG_FILES section. | |
18340 | # No need to generate them if there are no CONFIG_FILES. | |
18341 | # This happens for instance with `./config.status config.h'. | |
18342 | if test -n "$CONFIG_FILES"; then | |
18343 | ||
18344 | if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then | |
18345 | ac_cs_awk_getline=: | |
18346 | ac_cs_awk_pipe_init= | |
18347 | ac_cs_awk_read_file=' | |
18348 | while ((getline aline < (F[key])) > 0) | |
18349 | print(aline) | |
18350 | close(F[key])' | |
18351 | ac_cs_awk_pipe_fini= | |
18352 | else | |
18353 | ac_cs_awk_getline=false | |
18354 | ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\"" | |
18355 | ac_cs_awk_read_file=' | |
18356 | print "|#_!!_#|" | |
18357 | print "cat " F[key] " &&" | |
18358 | '$ac_cs_awk_pipe_init | |
18359 | # The final `:' finishes the AND list. | |
18360 | ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }' | |
18361 | fi | |
18362 | ac_cr=`echo X | tr X '\015'` | |
18363 | # On cygwin, bash can eat \r inside `` if the user requested igncr. | |
18364 | # But we know of no other shell where ac_cr would be empty at this | |
18365 | # point, so we can use a bashism as a fallback. | |
18366 | if test "x$ac_cr" = x; then | |
18367 | eval ac_cr=\$\'\\r\' | |
18368 | fi | |
18369 | ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` | |
18370 | if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then | |
2018939f | 18371 | ac_cs_awk_cr='\\r' |
067d23c9 KY |
18372 | else |
18373 | ac_cs_awk_cr=$ac_cr | |
18374 | fi | |
18375 | ||
d6974efa | 18376 | echo 'BEGIN {' >"$ac_tmp/subs1.awk" && |
067d23c9 KY |
18377 | _ACEOF |
18378 | ||
18379 | # Create commands to substitute file output variables. | |
18380 | { | |
18381 | echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" && | |
d6974efa | 18382 | echo 'cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&' && |
067d23c9 KY |
18383 | echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' && |
18384 | echo "_ACAWK" && | |
18385 | echo "_ACEOF" | |
18386 | } >conf$$files.sh && | |
18387 | . ./conf$$files.sh || | |
2018939f | 18388 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 |
067d23c9 KY |
18389 | rm -f conf$$files.sh |
18390 | ||
18391 | { | |
18392 | echo "cat >conf$$subs.awk <<_ACEOF" && | |
18393 | echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && | |
18394 | echo "_ACEOF" | |
18395 | } >conf$$subs.sh || | |
2018939f AS |
18396 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 |
18397 | ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` | |
067d23c9 KY |
18398 | ac_delim='%!_!# ' |
18399 | for ac_last_try in false false false false false :; do | |
18400 | . ./conf$$subs.sh || | |
2018939f | 18401 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 |
067d23c9 KY |
18402 | |
18403 | ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` | |
18404 | if test $ac_delim_n = $ac_delim_num; then | |
18405 | break | |
18406 | elif $ac_last_try; then | |
2018939f | 18407 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 |
067d23c9 KY |
18408 | else |
18409 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
18410 | fi | |
18411 | done | |
18412 | rm -f conf$$subs.sh | |
18413 | ||
18414 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
d6974efa | 18415 | cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && |
067d23c9 KY |
18416 | _ACEOF |
18417 | sed -n ' | |
18418 | h | |
18419 | s/^/S["/; s/!.*/"]=/ | |
18420 | p | |
18421 | g | |
18422 | s/^[^!]*!// | |
18423 | :repl | |
18424 | t repl | |
18425 | s/'"$ac_delim"'$// | |
18426 | t delim | |
18427 | :nl | |
18428 | h | |
18429 | s/\(.\{148\}\)..*/\1/ | |
18430 | t more1 | |
18431 | s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ | |
18432 | p | |
18433 | n | |
18434 | b repl | |
18435 | :more1 | |
18436 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
18437 | p | |
18438 | g | |
18439 | s/.\{148\}// | |
18440 | t nl | |
18441 | :delim | |
18442 | h | |
18443 | s/\(.\{148\}\)..*/\1/ | |
18444 | t more2 | |
18445 | s/["\\]/\\&/g; s/^/"/; s/$/"/ | |
18446 | p | |
18447 | b | |
18448 | :more2 | |
18449 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
18450 | p | |
18451 | g | |
18452 | s/.\{148\}// | |
18453 | t delim | |
18454 | ' <conf$$subs.awk | sed ' | |
18455 | /^[^""]/{ | |
18456 | N | |
18457 | s/\n// | |
18458 | } | |
18459 | ' >>$CONFIG_STATUS || ac_write_fail=1 | |
18460 | rm -f conf$$subs.awk | |
18461 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
18462 | _ACAWK | |
d6974efa | 18463 | cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && |
067d23c9 KY |
18464 | for (key in S) S_is_set[key] = 1 |
18465 | FS = "\a" | |
18466 | \$ac_cs_awk_pipe_init | |
18467 | } | |
18468 | { | |
18469 | line = $ 0 | |
18470 | nfields = split(line, field, "@") | |
18471 | substed = 0 | |
18472 | len = length(field[1]) | |
18473 | for (i = 2; i < nfields; i++) { | |
18474 | key = field[i] | |
18475 | keylen = length(key) | |
18476 | if (S_is_set[key]) { | |
18477 | value = S[key] | |
18478 | line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) | |
18479 | len += length(value) + length(field[++i]) | |
18480 | substed = 1 | |
18481 | } else | |
18482 | len += 1 + keylen | |
18483 | } | |
18484 | if (nfields == 3 && !substed) { | |
18485 | key = field[2] | |
18486 | if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) { | |
18487 | \$ac_cs_awk_read_file | |
18488 | next | |
18489 | } | |
18490 | } | |
18491 | print line | |
18492 | } | |
18493 | \$ac_cs_awk_pipe_fini | |
18494 | _ACAWK | |
18495 | _ACEOF | |
18496 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
18497 | if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then | |
18498 | sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" | |
18499 | else | |
18500 | cat | |
d6974efa | 18501 | fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ |
2018939f | 18502 | || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 |
067d23c9 KY |
18503 | _ACEOF |
18504 | ||
2018939f AS |
18505 | # VPATH may cause trouble with some makes, so we remove sole $(srcdir), |
18506 | # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and | |
067d23c9 KY |
18507 | # trailing colons and then remove the whole line if VPATH becomes empty |
18508 | # (actually we leave an empty line to preserve line numbers). | |
18509 | if test "x$srcdir" = x.; then | |
2018939f AS |
18510 | ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ |
18511 | h | |
18512 | s/// | |
18513 | s/^/:/ | |
18514 | s/[ ]*$/:/ | |
18515 | s/:\$(srcdir):/:/g | |
18516 | s/:\${srcdir}:/:/g | |
18517 | s/:@srcdir@:/:/g | |
18518 | s/^:*// | |
067d23c9 | 18519 | s/:*$// |
2018939f AS |
18520 | x |
18521 | s/\(=[ ]*\).*/\1/ | |
18522 | G | |
18523 | s/\n// | |
067d23c9 KY |
18524 | s/^[^=]*=[ ]*$// |
18525 | }' | |
18526 | fi | |
18527 | ||
18528 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
18529 | fi # test -n "$CONFIG_FILES" | |
18530 | ||
18531 | # Set up the scripts for CONFIG_HEADERS section. | |
18532 | # No need to generate them if there are no CONFIG_HEADERS. | |
18533 | # This happens for instance with `./config.status Makefile'. | |
18534 | if test -n "$CONFIG_HEADERS"; then | |
d6974efa | 18535 | cat >"$ac_tmp/defines.awk" <<\_ACAWK || |
067d23c9 KY |
18536 | BEGIN { |
18537 | _ACEOF | |
18538 | ||
18539 | # Transform confdefs.h into an awk script `defines.awk', embedded as | |
18540 | # here-document in config.status, that substitutes the proper values into | |
18541 | # config.h.in to produce config.h. | |
18542 | ||
18543 | # Create a delimiter string that does not exist in confdefs.h, to ease | |
18544 | # handling of long lines. | |
18545 | ac_delim='%!_!# ' | |
18546 | for ac_last_try in false false :; do | |
d6974efa PE |
18547 | ac_tt=`sed -n "/$ac_delim/p" confdefs.h` |
18548 | if test -z "$ac_tt"; then | |
067d23c9 KY |
18549 | break |
18550 | elif $ac_last_try; then | |
2018939f | 18551 | as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 |
067d23c9 KY |
18552 | else |
18553 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
18554 | fi | |
18555 | done | |
18556 | ||
18557 | # For the awk script, D is an array of macro values keyed by name, | |
18558 | # likewise P contains macro parameters if any. Preserve backslash | |
18559 | # newline sequences. | |
18560 | ||
18561 | ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* | |
18562 | sed -n ' | |
18563 | s/.\{148\}/&'"$ac_delim"'/g | |
18564 | t rset | |
18565 | :rset | |
18566 | s/^[ ]*#[ ]*define[ ][ ]*/ / | |
18567 | t def | |
18568 | d | |
18569 | :def | |
18570 | s/\\$// | |
18571 | t bsnl | |
18572 | s/["\\]/\\&/g | |
18573 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
18574 | D["\1"]=" \3"/p | |
18575 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p | |
18576 | d | |
18577 | :bsnl | |
18578 | s/["\\]/\\&/g | |
18579 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
18580 | D["\1"]=" \3\\\\\\n"\\/p | |
18581 | t cont | |
18582 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p | |
18583 | t cont | |
18584 | d | |
18585 | :cont | |
18586 | n | |
18587 | s/.\{148\}/&'"$ac_delim"'/g | |
18588 | t clear | |
18589 | :clear | |
18590 | s/\\$// | |
18591 | t bsnlc | |
18592 | s/["\\]/\\&/g; s/^/"/; s/$/"/p | |
18593 | d | |
18594 | :bsnlc | |
18595 | s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p | |
18596 | b cont | |
18597 | ' <confdefs.h | sed ' | |
18598 | s/'"$ac_delim"'/"\\\ | |
18599 | "/g' >>$CONFIG_STATUS || ac_write_fail=1 | |
18600 | ||
18601 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
18602 | for (key in D) D_is_set[key] = 1 | |
18603 | FS = "\a" | |
18604 | } | |
18605 | /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { | |
18606 | line = \$ 0 | |
18607 | split(line, arg, " ") | |
18608 | if (arg[1] == "#") { | |
18609 | defundef = arg[2] | |
18610 | mac1 = arg[3] | |
18611 | } else { | |
18612 | defundef = substr(arg[1], 2) | |
18613 | mac1 = arg[2] | |
18614 | } | |
18615 | split(mac1, mac2, "(") #) | |
18616 | macro = mac2[1] | |
18617 | prefix = substr(line, 1, index(line, defundef) - 1) | |
18618 | if (D_is_set[macro]) { | |
18619 | # Preserve the white space surrounding the "#". | |
18620 | print prefix "define", macro P[macro] D[macro] | |
18621 | next | |
18622 | } else { | |
18623 | # Replace #undef with comments. This is necessary, for example, | |
18624 | # in the case of _POSIX_SOURCE, which is predefined and required | |
18625 | # on some systems where configure will not decide to define it. | |
18626 | if (defundef == "undef") { | |
18627 | print "/*", prefix defundef, macro, "*/" | |
18628 | next | |
18629 | } | |
18630 | } | |
18631 | } | |
18632 | { print } | |
18633 | _ACAWK | |
18634 | _ACEOF | |
18635 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
2018939f | 18636 | as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 |
067d23c9 KY |
18637 | fi # test -n "$CONFIG_HEADERS" |
18638 | ||
18639 | ||
18640 | eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" | |
18641 | shift | |
18642 | for ac_tag | |
18643 | do | |
18644 | case $ac_tag in | |
18645 | :[FHLC]) ac_mode=$ac_tag; continue;; | |
18646 | esac | |
18647 | case $ac_mode$ac_tag in | |
18648 | :[FHL]*:*);; | |
d6974efa | 18649 | :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; |
067d23c9 KY |
18650 | :[FH]-) ac_tag=-:-;; |
18651 | :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; | |
18652 | esac | |
18653 | ac_save_IFS=$IFS | |
18654 | IFS=: | |
18655 | set x $ac_tag | |
18656 | IFS=$ac_save_IFS | |
18657 | shift | |
18658 | ac_file=$1 | |
18659 | shift | |
18660 | ||
18661 | case $ac_mode in | |
18662 | :L) ac_source=$1;; | |
18663 | :[FH]) | |
18664 | ac_file_inputs= | |
18665 | for ac_f | |
18666 | do | |
18667 | case $ac_f in | |
d6974efa | 18668 | -) ac_f="$ac_tmp/stdin";; |
067d23c9 KY |
18669 | *) # Look for the file first in the build tree, then in the source tree |
18670 | # (if the path is not absolute). The absolute path cannot be DOS-style, | |
18671 | # because $ac_f cannot contain `:'. | |
18672 | test -f "$ac_f" || | |
18673 | case $ac_f in | |
18674 | [\\/$]*) false;; | |
18675 | *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; | |
18676 | esac || | |
d6974efa | 18677 | as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; |
067d23c9 KY |
18678 | esac |
18679 | case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac | |
18680 | as_fn_append ac_file_inputs " '$ac_f'" | |
18681 | done | |
18682 | ||
18683 | # Let's still pretend it is `configure' which instantiates (i.e., don't | |
18684 | # use $as_me), people would be surprised to read: | |
18685 | # /* config.h. Generated by config.status. */ | |
18686 | configure_input='Generated from '` | |
18687 | $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' | |
18688 | `' by configure.' | |
18689 | if test x"$ac_file" != x-; then | |
18690 | configure_input="$ac_file. $configure_input" | |
18691 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 | |
18692 | $as_echo "$as_me: creating $ac_file" >&6;} | |
18693 | fi | |
18694 | # Neutralize special characters interpreted by sed in replacement strings. | |
18695 | case $configure_input in #( | |
18696 | *\&* | *\|* | *\\* ) | |
18697 | ac_sed_conf_input=`$as_echo "$configure_input" | | |
18698 | sed 's/[\\\\&|]/\\\\&/g'`;; #( | |
18699 | *) ac_sed_conf_input=$configure_input;; | |
18700 | esac | |
18701 | ||
18702 | case $ac_tag in | |
d6974efa PE |
18703 | *:-:* | *:-) cat >"$ac_tmp/stdin" \ |
18704 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; | |
067d23c9 KY |
18705 | esac |
18706 | ;; | |
18707 | esac | |
18708 | ||
18709 | ac_dir=`$as_dirname -- "$ac_file" || | |
18710 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
18711 | X"$ac_file" : 'X\(//\)[^/]' \| \ | |
18712 | X"$ac_file" : 'X\(//\)$' \| \ | |
18713 | X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || | |
18714 | $as_echo X"$ac_file" | | |
18715 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
18716 | s//\1/ | |
18717 | q | |
18718 | } | |
18719 | /^X\(\/\/\)[^/].*/{ | |
18720 | s//\1/ | |
18721 | q | |
18722 | } | |
18723 | /^X\(\/\/\)$/{ | |
18724 | s//\1/ | |
18725 | q | |
18726 | } | |
18727 | /^X\(\/\).*/{ | |
18728 | s//\1/ | |
18729 | q | |
18730 | } | |
18731 | s/.*/./; q'` | |
18732 | as_dir="$ac_dir"; as_fn_mkdir_p | |
18733 | ac_builddir=. | |
18734 | ||
18735 | case "$ac_dir" in | |
18736 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
18737 | *) | |
18738 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
18739 | # A ".." for each directory in $ac_dir_suffix. | |
18740 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
18741 | case $ac_top_builddir_sub in | |
18742 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
18743 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
18744 | esac ;; | |
18745 | esac | |
18746 | ac_abs_top_builddir=$ac_pwd | |
18747 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
18748 | # for backward compatibility: | |
18749 | ac_top_builddir=$ac_top_build_prefix | |
18750 | ||
18751 | case $srcdir in | |
18752 | .) # We are building in place. | |
18753 | ac_srcdir=. | |
18754 | ac_top_srcdir=$ac_top_builddir_sub | |
18755 | ac_abs_top_srcdir=$ac_pwd ;; | |
18756 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
18757 | ac_srcdir=$srcdir$ac_dir_suffix; | |
18758 | ac_top_srcdir=$srcdir | |
18759 | ac_abs_top_srcdir=$srcdir ;; | |
18760 | *) # Relative name. | |
18761 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
18762 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
18763 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
18764 | esac | |
18765 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix | |
18766 | ||
18767 | ||
18768 | case $ac_mode in | |
18769 | :F) | |
18770 | # | |
18771 | # CONFIG_FILE | |
18772 | # | |
18773 | ||
18774 | case $INSTALL in | |
18775 | [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; | |
18776 | *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; | |
18777 | esac | |
743c80a7 PE |
18778 | ac_MKDIR_P=$MKDIR_P |
18779 | case $MKDIR_P in | |
18780 | [\\/$]* | ?:[\\/]* ) ;; | |
18781 | */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; | |
18782 | esac | |
067d23c9 KY |
18783 | _ACEOF |
18784 | ||
18785 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
18786 | # If the template does not know about datarootdir, expand it. | |
18787 | # FIXME: This hack should be removed a few years after 2.60. | |
18788 | ac_datarootdir_hack=; ac_datarootdir_seen= | |
18789 | ac_sed_dataroot=' | |
18790 | /datarootdir/ { | |
18791 | p | |
18792 | q | |
18793 | } | |
18794 | /@datadir@/p | |
18795 | /@docdir@/p | |
18796 | /@infodir@/p | |
18797 | /@localedir@/p | |
18798 | /@mandir@/p' | |
18799 | case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in | |
18800 | *datarootdir*) ac_datarootdir_seen=yes;; | |
18801 | *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) | |
18802 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 | |
18803 | $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} | |
18804 | _ACEOF | |
18805 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
18806 | ac_datarootdir_hack=' | |
18807 | s&@datadir@&$datadir&g | |
18808 | s&@docdir@&$docdir&g | |
18809 | s&@infodir@&$infodir&g | |
18810 | s&@localedir@&$localedir&g | |
18811 | s&@mandir@&$mandir&g | |
18812 | s&\\\${datarootdir}&$datarootdir&g' ;; | |
18813 | esac | |
18814 | _ACEOF | |
18815 | ||
18816 | # Neutralize VPATH when `$srcdir' = `.'. | |
18817 | # Shell code in configure.ac might set extrasub. | |
18818 | # FIXME: do we really want to maintain this feature? | |
18819 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
18820 | ac_sed_extra="$ac_vpsub | |
18821 | $extrasub | |
18822 | _ACEOF | |
18823 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
18824 | :t | |
18825 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b | |
18826 | s|@configure_input@|$ac_sed_conf_input|;t t | |
18827 | s&@top_builddir@&$ac_top_builddir_sub&;t t | |
18828 | s&@top_build_prefix@&$ac_top_build_prefix&;t t | |
18829 | s&@srcdir@&$ac_srcdir&;t t | |
18830 | s&@abs_srcdir@&$ac_abs_srcdir&;t t | |
18831 | s&@top_srcdir@&$ac_top_srcdir&;t t | |
18832 | s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t | |
18833 | s&@builddir@&$ac_builddir&;t t | |
18834 | s&@abs_builddir@&$ac_abs_builddir&;t t | |
18835 | s&@abs_top_builddir@&$ac_abs_top_builddir&;t t | |
18836 | s&@INSTALL@&$ac_INSTALL&;t t | |
743c80a7 | 18837 | s&@MKDIR_P@&$ac_MKDIR_P&;t t |
067d23c9 KY |
18838 | $ac_datarootdir_hack |
18839 | " | |
18840 | eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | | |
18841 | if $ac_cs_awk_getline; then | |
d6974efa | 18842 | $AWK -f "$ac_tmp/subs.awk" |
067d23c9 | 18843 | else |
d6974efa PE |
18844 | $AWK -f "$ac_tmp/subs.awk" | $SHELL |
18845 | fi \ | |
18846 | >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 | |
067d23c9 KY |
18847 | |
18848 | test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && | |
d6974efa PE |
18849 | { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && |
18850 | { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ | |
18851 | "$ac_tmp/out"`; test -z "$ac_out"; } && | |
067d23c9 | 18852 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' |
2018939f | 18853 | which seems to be undefined. Please make sure it is defined" >&5 |
067d23c9 | 18854 | $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' |
2018939f | 18855 | which seems to be undefined. Please make sure it is defined" >&2;} |
067d23c9 | 18856 | |
d6974efa | 18857 | rm -f "$ac_tmp/stdin" |
067d23c9 | 18858 | case $ac_file in |
d6974efa PE |
18859 | -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; |
18860 | *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; | |
067d23c9 | 18861 | esac \ |
2018939f | 18862 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 |
067d23c9 KY |
18863 | ;; |
18864 | :H) | |
18865 | # | |
18866 | # CONFIG_HEADER | |
18867 | # | |
18868 | if test x"$ac_file" != x-; then | |
18869 | { | |
18870 | $as_echo "/* $configure_input */" \ | |
d6974efa PE |
18871 | && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" |
18872 | } >"$ac_tmp/config.h" \ | |
2018939f | 18873 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 |
d6974efa | 18874 | if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then |
067d23c9 KY |
18875 | { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 |
18876 | $as_echo "$as_me: $ac_file is unchanged" >&6;} | |
18877 | else | |
18878 | rm -f "$ac_file" | |
d6974efa | 18879 | mv "$ac_tmp/config.h" "$ac_file" \ |
2018939f | 18880 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 |
067d23c9 KY |
18881 | fi |
18882 | else | |
18883 | $as_echo "/* $configure_input */" \ | |
d6974efa | 18884 | && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ |
2018939f | 18885 | || as_fn_error $? "could not create -" "$LINENO" 5 |
067d23c9 | 18886 | fi |
743c80a7 PE |
18887 | # Compute "$ac_file"'s index in $config_headers. |
18888 | _am_arg="$ac_file" | |
18889 | _am_stamp_count=1 | |
18890 | for _am_header in $config_headers :; do | |
18891 | case $_am_header in | |
18892 | $_am_arg | $_am_arg:* ) | |
18893 | break ;; | |
18894 | * ) | |
18895 | _am_stamp_count=`expr $_am_stamp_count + 1` ;; | |
18896 | esac | |
18897 | done | |
18898 | echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || | |
18899 | $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
18900 | X"$_am_arg" : 'X\(//\)[^/]' \| \ | |
18901 | X"$_am_arg" : 'X\(//\)$' \| \ | |
18902 | X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || | |
18903 | $as_echo X"$_am_arg" | | |
18904 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
18905 | s//\1/ | |
18906 | q | |
18907 | } | |
18908 | /^X\(\/\/\)[^/].*/{ | |
18909 | s//\1/ | |
18910 | q | |
18911 | } | |
18912 | /^X\(\/\/\)$/{ | |
18913 | s//\1/ | |
18914 | q | |
18915 | } | |
18916 | /^X\(\/\).*/{ | |
18917 | s//\1/ | |
18918 | q | |
18919 | } | |
18920 | s/.*/./; q'`/stamp-h$_am_stamp_count | |
067d23c9 KY |
18921 | ;; |
18922 | ||
18923 | :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 | |
18924 | $as_echo "$as_me: executing $ac_file commands" >&6;} | |
18925 | ;; | |
18926 | esac | |
18927 | ||
18928 | ||
18929 | case $ac_file$ac_mode in | |
743c80a7 PE |
18930 | "depfiles":C) test x"$AMDEP_TRUE" != x"" || { |
18931 | # Autoconf 2.62 quotes --file arguments for eval, but not when files | |
18932 | # are listed without --file. Let's play safe and only enable the eval | |
18933 | # if we detect the quoting. | |
18934 | case $CONFIG_FILES in | |
18935 | *\'*) eval set x "$CONFIG_FILES" ;; | |
18936 | *) set x $CONFIG_FILES ;; | |
18937 | esac | |
18938 | shift | |
18939 | for mf | |
18940 | do | |
18941 | # Strip MF so we end up with the name of the file. | |
18942 | mf=`echo "$mf" | sed -e 's/:.*$//'` | |
18943 | # Check whether this is an Automake generated Makefile or not. | |
18944 | # We used to match only the files named `Makefile.in', but | |
18945 | # some people rename them; so instead we look at the file content. | |
18946 | # Grep'ing the first line is not enough: some people post-process | |
18947 | # each Makefile.in and add a new line on top of each file to say so. | |
18948 | # Grep'ing the whole file is not good either: AIX grep has a line | |
18949 | # limit of 2048, but all sed's we know have understand at least 4000. | |
18950 | if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then | |
18951 | dirpart=`$as_dirname -- "$mf" || | |
18952 | $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
18953 | X"$mf" : 'X\(//\)[^/]' \| \ | |
18954 | X"$mf" : 'X\(//\)$' \| \ | |
18955 | X"$mf" : 'X\(/\)' \| . 2>/dev/null || | |
18956 | $as_echo X"$mf" | | |
18957 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
18958 | s//\1/ | |
18959 | q | |
18960 | } | |
18961 | /^X\(\/\/\)[^/].*/{ | |
18962 | s//\1/ | |
18963 | q | |
18964 | } | |
18965 | /^X\(\/\/\)$/{ | |
18966 | s//\1/ | |
18967 | q | |
18968 | } | |
18969 | /^X\(\/\).*/{ | |
18970 | s//\1/ | |
18971 | q | |
18972 | } | |
18973 | s/.*/./; q'` | |
18974 | else | |
18975 | continue | |
18976 | fi | |
18977 | # Extract the definition of DEPDIR, am__include, and am__quote | |
18978 | # from the Makefile without running `make'. | |
18979 | DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` | |
18980 | test -z "$DEPDIR" && continue | |
18981 | am__include=`sed -n 's/^am__include = //p' < "$mf"` | |
18982 | test -z "am__include" && continue | |
18983 | am__quote=`sed -n 's/^am__quote = //p' < "$mf"` | |
18984 | # When using ansi2knr, U may be empty or an underscore; expand it | |
18985 | U=`sed -n 's/^U = //p' < "$mf"` | |
18986 | # Find all dependency output files, they are included files with | |
18987 | # $(DEPDIR) in their names. We invoke sed twice because it is the | |
18988 | # simplest approach to changing $(DEPDIR) to its actual value in the | |
18989 | # expansion. | |
18990 | for file in `sed -n " | |
18991 | s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ | |
18992 | sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do | |
18993 | # Make sure the directory exists. | |
18994 | test -f "$dirpart/$file" && continue | |
18995 | fdir=`$as_dirname -- "$file" || | |
18996 | $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
18997 | X"$file" : 'X\(//\)[^/]' \| \ | |
18998 | X"$file" : 'X\(//\)$' \| \ | |
18999 | X"$file" : 'X\(/\)' \| . 2>/dev/null || | |
19000 | $as_echo X"$file" | | |
19001 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
19002 | s//\1/ | |
19003 | q | |
19004 | } | |
19005 | /^X\(\/\/\)[^/].*/{ | |
19006 | s//\1/ | |
19007 | q | |
19008 | } | |
19009 | /^X\(\/\/\)$/{ | |
19010 | s//\1/ | |
19011 | q | |
19012 | } | |
19013 | /^X\(\/\).*/{ | |
19014 | s//\1/ | |
19015 | q | |
19016 | } | |
19017 | s/.*/./; q'` | |
19018 | as_dir=$dirpart/$fdir; as_fn_mkdir_p | |
19019 | # echo "creating $dirpart/$file" | |
19020 | echo '# dummy' > "$dirpart/$file" | |
19021 | done | |
19022 | done | |
19023 | } | |
19024 | ;; | |
067d23c9 KY |
19025 | "default":C) |
19026 | ||
19027 | ### Make the necessary directories, if they don't exist. | |
19028 | for dir in etc lisp ; do | |
19029 | test -d ${dir} || mkdir ${dir} | |
19030 | done | |
19031 | ||
19032 | echo creating src/epaths.h | |
19033 | ${MAKE-make} epaths-force | |
19034 | ||
19035 | if test ! -f src/.gdbinit && test -f $srcdir/src/.gdbinit; then | |
19036 | echo creating src/.gdbinit | |
19037 | echo source $srcdir/src/.gdbinit > src/.gdbinit | |
19038 | fi | |
19039 | ||
19040 | ;; | |
19041 | ||
19042 | esac | |
19043 | done # for ac_tag | |
19044 | ||
19045 | ||
19046 | as_fn_exit 0 | |
19047 | _ACEOF | |
19048 | ac_clean_files=$ac_clean_files_save | |
19049 | ||
19050 | test $ac_write_fail = 0 || | |
2018939f | 19051 | as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 |
067d23c9 KY |
19052 | |
19053 | ||
19054 | # configure is writing to config.log, and then calls config.status. | |
19055 | # config.status does its own redirection, appending to config.log. | |
19056 | # Unfortunately, on DOS this fails, as config.log is still kept open | |
19057 | # by configure, so config.status won't be able to write to it; its | |
19058 | # output is simply discarded. So we exec the FD to /dev/null, | |
19059 | # effectively closing config.log, so it can be properly (re)opened and | |
19060 | # appended to by config.status. When coming back to configure, we | |
19061 | # need to make the FD available again. | |
19062 | if test "$no_create" != yes; then | |
19063 | ac_cs_success=: | |
19064 | ac_config_status_args= | |
19065 | test "$silent" = yes && | |
19066 | ac_config_status_args="$ac_config_status_args --quiet" | |
19067 | exec 5>/dev/null | |
19068 | $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false | |
19069 | exec 5>>config.log | |
19070 | # Use ||, not &&, to avoid exiting from the if with $? = 1, which | |
19071 | # would make configure fail if this is the last instruction. | |
2018939f | 19072 | $ac_cs_success || as_fn_exit 1 |
067d23c9 KY |
19073 | fi |
19074 | if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then | |
19075 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 | |
19076 | $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} | |
19077 | fi | |
19078 |