Commit | Line | Data |
---|---|---|
067d23c9 KY |
1 | #! /bin/sh |
2 | # Guess values for system-dependent variables and create Makefiles. | |
5f64f7bd | 3 | # Generated by GNU Autoconf 2.65 for emacs 24.0.50. |
067d23c9 KY |
4 | # |
5 | # | |
6 | # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, | |
5f64f7bd GM |
7 | # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, |
8 | # 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. | |
92 | case $0 in #(( | |
93 | *[\\/]* ) as_myself=$0 ;; | |
94 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
95 | for as_dir in $PATH | |
96 | do | |
97 | IFS=$as_save_IFS | |
98 | test -z "$as_dir" && as_dir=. | |
99 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | |
100 | done | |
101 | IFS=$as_save_IFS | |
102 | ||
103 | ;; | |
104 | esac | |
105 | # We did not find ourselves, most probably we were run as `sh COMMAND' | |
106 | # in which case we are not to be found in the path. | |
107 | if test "x$as_myself" = x; then | |
108 | as_myself=$0 | |
109 | fi | |
110 | if test ! -f "$as_myself"; then | |
111 | $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 | |
112 | exit 1 | |
113 | fi | |
114 | ||
115 | # Unset variables that we do not need and which cause bugs (e.g. in | |
116 | # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" | |
117 | # suppresses any "Segmentation fault" message there. '((' could | |
118 | # trigger a bug in pdksh 5.2.14. | |
119 | for as_var in BASH_ENV ENV MAIL MAILPATH | |
120 | do eval test x\${$as_var+set} = xset \ | |
121 | && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : | |
122 | done | |
123 | PS1='$ ' | |
124 | PS2='> ' | |
125 | PS4='+ ' | |
126 | ||
127 | # NLS nuisances. | |
128 | LC_ALL=C | |
129 | export LC_ALL | |
130 | LANGUAGE=C | |
131 | export LANGUAGE | |
132 | ||
133 | # CDPATH. | |
134 | (unset CDPATH) >/dev/null 2>&1 && unset CDPATH | |
135 | ||
136 | if test "x$CONFIG_SHELL" = x; then | |
137 | as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : | |
138 | emulate sh | |
139 | NULLCMD=: | |
140 | # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which | |
141 | # is contrary to our usage. Disable this feature. | |
142 | alias -g '\${1+\"\$@\"}'='\"\$@\"' | |
143 | setopt NO_GLOB_SUBST | |
144 | else | |
145 | case \`(set -o) 2>/dev/null\` in #( | |
146 | *posix*) : | |
147 | set -o posix ;; #( | |
148 | *) : | |
149 | ;; | |
150 | esac | |
151 | fi | |
152 | " | |
153 | as_required="as_fn_return () { (exit \$1); } | |
154 | as_fn_success () { as_fn_return 0; } | |
155 | as_fn_failure () { as_fn_return 1; } | |
156 | as_fn_ret_success () { return 0; } | |
157 | as_fn_ret_failure () { return 1; } | |
158 | ||
159 | exitcode=0 | |
160 | as_fn_success || { exitcode=1; echo as_fn_success failed.; } | |
161 | as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } | |
162 | as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } | |
163 | as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } | |
164 | if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : | |
165 | ||
166 | else | |
167 | exitcode=1; echo positional parameters were not saved. | |
168 | fi | |
169 | test x\$exitcode = x0 || exit 1" | |
170 | as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO | |
171 | as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO | |
172 | eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && | |
173 | test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 | |
174 | test \$(( 1 + 1 )) = 2 || exit 1" | |
175 | if (eval "$as_required") 2>/dev/null; then : | |
176 | as_have_required=yes | |
177 | else | |
178 | as_have_required=no | |
179 | fi | |
180 | if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : | |
181 | ||
182 | else | |
183 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
184 | as_found=false | |
185 | for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH | |
186 | do | |
187 | IFS=$as_save_IFS | |
188 | test -z "$as_dir" && as_dir=. | |
189 | as_found=: | |
190 | case $as_dir in #( | |
191 | /*) | |
192 | for as_base in sh bash ksh sh5; do | |
193 | # Try only shells that exist, to save several forks. | |
194 | as_shell=$as_dir/$as_base | |
195 | if { test -f "$as_shell" || test -f "$as_shell.exe"; } && | |
196 | { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : | |
197 | CONFIG_SHELL=$as_shell as_have_required=yes | |
198 | if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : | |
199 | break 2 | |
200 | fi | |
201 | fi | |
202 | done;; | |
203 | esac | |
204 | as_found=false | |
205 | done | |
206 | $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && | |
207 | { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : | |
208 | CONFIG_SHELL=$SHELL as_have_required=yes | |
209 | fi; } | |
210 | IFS=$as_save_IFS | |
211 | ||
212 | ||
213 | if test "x$CONFIG_SHELL" != x; then : | |
214 | # We cannot yet assume a decent shell, so we have to provide a | |
215 | # neutralization value for shells without unset; and this also | |
216 | # works around shells that cannot unset nonexistent variables. | |
217 | BASH_ENV=/dev/null | |
218 | ENV=/dev/null | |
219 | (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV | |
220 | export CONFIG_SHELL | |
5f64f7bd | 221 | exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} |
067d23c9 KY |
222 | fi |
223 | ||
224 | if test x$as_have_required = xno; then : | |
225 | $as_echo "$0: This script requires a shell more modern than all" | |
226 | $as_echo "$0: the shells that I found on your system." | |
227 | if test x${ZSH_VERSION+set} = xset ; then | |
228 | $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" | |
229 | $as_echo "$0: be upgraded to zsh 4.3.4 or later." | |
230 | else | |
231 | $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, | |
232 | $0: including any error possibly output before this | |
233 | $0: message. Then install a modern shell, or manually run | |
234 | $0: the script under such a shell if you do have one." | |
235 | fi | |
236 | exit 1 | |
237 | fi | |
238 | fi | |
239 | fi | |
240 | SHELL=${CONFIG_SHELL-/bin/sh} | |
241 | export SHELL | |
242 | # Unset more variables known to interfere with behavior of common tools. | |
243 | CLICOLOR_FORCE= GREP_OPTIONS= | |
244 | unset CLICOLOR_FORCE GREP_OPTIONS | |
245 | ||
246 | ## --------------------- ## | |
247 | ## M4sh Shell Functions. ## | |
248 | ## --------------------- ## | |
249 | # as_fn_unset VAR | |
250 | # --------------- | |
251 | # Portably unset VAR. | |
252 | as_fn_unset () | |
253 | { | |
254 | { eval $1=; unset $1;} | |
255 | } | |
256 | as_unset=as_fn_unset | |
257 | ||
258 | # as_fn_set_status STATUS | |
259 | # ----------------------- | |
260 | # Set $? to STATUS, without forking. | |
261 | as_fn_set_status () | |
262 | { | |
263 | return $1 | |
264 | } # as_fn_set_status | |
265 | ||
266 | # as_fn_exit STATUS | |
267 | # ----------------- | |
268 | # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. | |
269 | as_fn_exit () | |
270 | { | |
271 | set +e | |
272 | as_fn_set_status $1 | |
273 | exit $1 | |
274 | } # as_fn_exit | |
275 | ||
276 | # as_fn_mkdir_p | |
277 | # ------------- | |
278 | # Create "$as_dir" as a directory, including parents if necessary. | |
279 | as_fn_mkdir_p () | |
280 | { | |
281 | ||
282 | case $as_dir in #( | |
283 | -*) as_dir=./$as_dir;; | |
284 | esac | |
285 | test -d "$as_dir" || eval $as_mkdir_p || { | |
286 | as_dirs= | |
287 | while :; do | |
288 | case $as_dir in #( | |
289 | *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( | |
290 | *) as_qdir=$as_dir;; | |
291 | esac | |
292 | as_dirs="'$as_qdir' $as_dirs" | |
293 | as_dir=`$as_dirname -- "$as_dir" || | |
294 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
295 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
296 | X"$as_dir" : 'X\(//\)$' \| \ | |
297 | X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || | |
298 | $as_echo X"$as_dir" | | |
299 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
300 | s//\1/ | |
301 | q | |
302 | } | |
303 | /^X\(\/\/\)[^/].*/{ | |
304 | s//\1/ | |
305 | q | |
306 | } | |
307 | /^X\(\/\/\)$/{ | |
308 | s//\1/ | |
309 | q | |
310 | } | |
311 | /^X\(\/\).*/{ | |
312 | s//\1/ | |
313 | q | |
314 | } | |
315 | s/.*/./; q'` | |
316 | test -d "$as_dir" && break | |
317 | done | |
318 | test -z "$as_dirs" || eval "mkdir $as_dirs" | |
5f64f7bd | 319 | } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" |
067d23c9 KY |
320 | |
321 | ||
322 | } # as_fn_mkdir_p | |
323 | # as_fn_append VAR VALUE | |
324 | # ---------------------- | |
325 | # Append the text in VALUE to the end of the definition contained in VAR. Take | |
326 | # advantage of any shell optimizations that allow amortized linear growth over | |
327 | # repeated appends, instead of the typical quadratic growth present in naive | |
328 | # implementations. | |
329 | if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : | |
330 | eval 'as_fn_append () | |
331 | { | |
332 | eval $1+=\$2 | |
333 | }' | |
334 | else | |
335 | as_fn_append () | |
336 | { | |
337 | eval $1=\$$1\$2 | |
338 | } | |
339 | fi # as_fn_append | |
340 | ||
341 | # as_fn_arith ARG... | |
342 | # ------------------ | |
343 | # Perform arithmetic evaluation on the ARGs, and store the result in the | |
344 | # global $as_val. Take advantage of shells that can avoid forks. The arguments | |
345 | # must be portable across $(()) and expr. | |
346 | if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : | |
347 | eval 'as_fn_arith () | |
348 | { | |
349 | as_val=$(( $* )) | |
350 | }' | |
351 | else | |
352 | as_fn_arith () | |
353 | { | |
354 | as_val=`expr "$@" || test $? -eq 1` | |
355 | } | |
356 | fi # as_fn_arith | |
357 | ||
358 | ||
5f64f7bd GM |
359 | # as_fn_error ERROR [LINENO LOG_FD] |
360 | # --------------------------------- | |
067d23c9 KY |
361 | # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are |
362 | # provided, also output the error to LOG_FD, referencing LINENO. Then exit the | |
5f64f7bd | 363 | # script with status $?, using 1 if that was 0. |
067d23c9 KY |
364 | as_fn_error () |
365 | { | |
5f64f7bd GM |
366 | as_status=$?; test $as_status -eq 0 && as_status=1 |
367 | if test "$3"; then | |
368 | as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
369 | $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 | |
067d23c9 | 370 | fi |
5f64f7bd | 371 | $as_echo "$as_me: error: $1" >&2 |
067d23c9 KY |
372 | as_fn_exit $as_status |
373 | } # as_fn_error | |
374 | ||
375 | if expr a : '\(a\)' >/dev/null 2>&1 && | |
376 | test "X`expr 00001 : '.*\(...\)'`" = X001; then | |
377 | as_expr=expr | |
378 | else | |
379 | as_expr=false | |
380 | fi | |
381 | ||
382 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then | |
383 | as_basename=basename | |
384 | else | |
385 | as_basename=false | |
386 | fi | |
387 | ||
388 | if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then | |
389 | as_dirname=dirname | |
390 | else | |
391 | as_dirname=false | |
392 | fi | |
393 | ||
394 | as_me=`$as_basename -- "$0" || | |
395 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ | |
396 | X"$0" : 'X\(//\)$' \| \ | |
397 | X"$0" : 'X\(/\)' \| . 2>/dev/null || | |
398 | $as_echo X/"$0" | | |
399 | sed '/^.*\/\([^/][^/]*\)\/*$/{ | |
400 | s//\1/ | |
401 | q | |
402 | } | |
403 | /^X\/\(\/\/\)$/{ | |
404 | s//\1/ | |
405 | q | |
406 | } | |
407 | /^X\/\(\/\).*/{ | |
408 | s//\1/ | |
409 | q | |
410 | } | |
411 | s/.*/./; q'` | |
412 | ||
413 | # Avoid depending upon Character Ranges. | |
414 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
415 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
416 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
417 | as_cr_digits='0123456789' | |
418 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
419 | ||
420 | ||
421 | as_lineno_1=$LINENO as_lineno_1a=$LINENO | |
422 | as_lineno_2=$LINENO as_lineno_2a=$LINENO | |
423 | eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && | |
424 | test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { | |
425 | # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) | |
426 | sed -n ' | |
427 | p | |
428 | /[$]LINENO/= | |
429 | ' <$as_myself | | |
430 | sed ' | |
431 | s/[$]LINENO.*/&-/ | |
432 | t lineno | |
433 | b | |
434 | :lineno | |
435 | N | |
436 | :loop | |
437 | s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ | |
438 | t loop | |
439 | s/-\n.*// | |
440 | ' >$as_me.lineno && | |
441 | chmod +x "$as_me.lineno" || | |
442 | { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } | |
443 | ||
444 | # Don't try to exec as it changes $[0], causing all sort of problems | |
445 | # (the dirname of $[0] is not the place where we might find the | |
446 | # original and so on. Autoconf is especially sensitive to this). | |
447 | . "./$as_me.lineno" | |
448 | # Exit status is that of the last command. | |
449 | exit | |
450 | } | |
451 | ||
452 | ECHO_C= ECHO_N= ECHO_T= | |
453 | case `echo -n x` in #((((( | |
454 | -n*) | |
455 | case `echo 'xy\c'` in | |
456 | *c*) ECHO_T=' ';; # ECHO_T is single tab character. | |
457 | xy) ECHO_C='\c';; | |
458 | *) echo `echo ksh88 bug on AIX 6.1` > /dev/null | |
459 | ECHO_T=' ';; | |
460 | esac;; | |
461 | *) | |
462 | ECHO_N='-n';; | |
463 | esac | |
464 | ||
465 | rm -f conf$$ conf$$.exe conf$$.file | |
466 | if test -d conf$$.dir; then | |
467 | rm -f conf$$.dir/conf$$.file | |
468 | else | |
469 | rm -f conf$$.dir | |
470 | mkdir conf$$.dir 2>/dev/null | |
471 | fi | |
472 | if (echo >conf$$.file) 2>/dev/null; then | |
473 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
474 | as_ln_s='ln -s' | |
475 | # ... but there are two gotchas: | |
476 | # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. | |
477 | # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. | |
478 | # In both cases, we have to default to `cp -p'. | |
479 | ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || | |
480 | as_ln_s='cp -p' | |
481 | elif ln conf$$.file conf$$ 2>/dev/null; then | |
482 | as_ln_s=ln | |
483 | else | |
484 | as_ln_s='cp -p' | |
485 | fi | |
486 | else | |
487 | as_ln_s='cp -p' | |
488 | fi | |
489 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file | |
490 | rmdir conf$$.dir 2>/dev/null | |
491 | ||
492 | if mkdir -p . 2>/dev/null; then | |
493 | as_mkdir_p='mkdir -p "$as_dir"' | |
494 | else | |
495 | test -d ./-p && rmdir ./-p | |
496 | as_mkdir_p=false | |
497 | fi | |
498 | ||
499 | if test -x / >/dev/null 2>&1; then | |
500 | as_test_x='test -x' | |
501 | else | |
502 | if ls -dL / >/dev/null 2>&1; then | |
503 | as_ls_L_option=L | |
504 | else | |
505 | as_ls_L_option= | |
506 | fi | |
507 | as_test_x=' | |
508 | eval sh -c '\'' | |
509 | if test -d "$1"; then | |
510 | test -d "$1/."; | |
511 | else | |
512 | case $1 in #( | |
513 | -*)set "./$1";; | |
514 | esac; | |
515 | case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( | |
516 | ???[sx]*):;;*)false;;esac;fi | |
517 | '\'' sh | |
518 | ' | |
519 | fi | |
520 | as_executable_p=$as_test_x | |
521 | ||
522 | # Sed expression to map a string onto a valid CPP name. | |
523 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" | |
524 | ||
525 | # Sed expression to map a string onto a valid variable name. | |
526 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" | |
527 | ||
528 | ||
529 | test -n "$DJDIR" || exec 7<&0 </dev/null | |
530 | exec 6>&1 | |
531 | ||
532 | # Name of the host. | |
5f64f7bd | 533 | # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, |
067d23c9 KY |
534 | # so uname gets run too. |
535 | ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` | |
536 | ||
537 | # | |
538 | # Initializations. | |
539 | # | |
540 | ac_default_prefix=/usr/local | |
541 | ac_clean_files= | |
542 | ac_config_libobj_dir=. | |
543 | LIBOBJS= | |
544 | cross_compiling=no | |
545 | subdirs= | |
546 | MFLAGS= | |
547 | MAKEFLAGS= | |
548 | ||
549 | # Identity of this package. | |
550 | PACKAGE_NAME='emacs' | |
551 | PACKAGE_TARNAME='emacs' | |
552 | PACKAGE_VERSION='24.0.50' | |
553 | PACKAGE_STRING='emacs 24.0.50' | |
554 | PACKAGE_BUGREPORT='' | |
555 | PACKAGE_URL='' | |
556 | ||
557 | ac_unique_file="src/lisp.h" | |
558 | # Factoring default headers for most tests. | |
559 | ac_includes_default="\ | |
560 | #include <stdio.h> | |
561 | #ifdef HAVE_SYS_TYPES_H | |
562 | # include <sys/types.h> | |
563 | #endif | |
564 | #ifdef HAVE_SYS_STAT_H | |
565 | # include <sys/stat.h> | |
566 | #endif | |
567 | #ifdef STDC_HEADERS | |
568 | # include <stdlib.h> | |
569 | # include <stddef.h> | |
570 | #else | |
571 | # ifdef HAVE_STDLIB_H | |
572 | # include <stdlib.h> | |
573 | # endif | |
574 | #endif | |
575 | #ifdef HAVE_STRING_H | |
576 | # if !defined STDC_HEADERS && defined HAVE_MEMORY_H | |
577 | # include <memory.h> | |
578 | # endif | |
579 | # include <string.h> | |
580 | #endif | |
581 | #ifdef HAVE_STRINGS_H | |
582 | # include <strings.h> | |
583 | #endif | |
584 | #ifdef HAVE_INTTYPES_H | |
585 | # include <inttypes.h> | |
586 | #endif | |
587 | #ifdef HAVE_STDINT_H | |
588 | # include <stdint.h> | |
589 | #endif | |
590 | #ifdef HAVE_UNISTD_H | |
591 | # include <unistd.h> | |
592 | #endif" | |
593 | ||
067d23c9 | 594 | ac_header_list= |
6c051bab | 595 | ac_func_list= |
e275c824 PE |
596 | gl_getopt_required=POSIX |
597 | gl_getopt_required=POSIX | |
743c80a7 PE |
598 | ac_subst_vars='gltests_LTLIBOBJS |
599 | gltests_LIBOBJS | |
600 | gl_LTLIBOBJS | |
601 | gl_LIBOBJS | |
602 | am__EXEEXT_FALSE | |
603 | am__EXEEXT_TRUE | |
604 | LTLIBOBJS | |
1f5d53eb | 605 | LIBOBJS |
73b78882 | 606 | SUBDIR_MAKEFILES_IN |
067d23c9 KY |
607 | LIB_GCC |
608 | LD_FIRSTFLAG | |
609 | LD_SWITCH_SYSTEM_TEMACS | |
743c80a7 PE |
610 | LIBGNU_LTLIBDEPS |
611 | LIBGNU_LIBDEPS | |
612 | gltests_WITNESS | |
6d153f56 GM |
613 | gl_GNULIB_ENABLED_verify_FALSE |
614 | gl_GNULIB_ENABLED_verify_TRUE | |
615 | gl_GNULIB_ENABLED_strtoull_FALSE | |
616 | gl_GNULIB_ENABLED_strtoull_TRUE | |
3e0be4ab GM |
617 | gl_GNULIB_ENABLED_strtoll_FALSE |
618 | gl_GNULIB_ENABLED_strtoll_TRUE | |
6d153f56 GM |
619 | gl_GNULIB_ENABLED_stat_FALSE |
620 | gl_GNULIB_ENABLED_stat_TRUE | |
3e0be4ab GM |
621 | gl_GNULIB_ENABLED_sigprocmask_FALSE |
622 | gl_GNULIB_ENABLED_sigprocmask_TRUE | |
6d153f56 GM |
623 | gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE |
624 | gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE | |
625 | gl_GNULIB_ENABLED_dosname_FALSE | |
626 | gl_GNULIB_ENABLED_dosname_TRUE | |
627 | LTLIBINTL | |
628 | LIBINTL | |
e275c824 PE |
629 | HAVE_UNISTD_H |
630 | NEXT_AS_FIRST_DIRECTIVE_UNISTD_H | |
631 | NEXT_UNISTD_H | |
1fd182f0 PE |
632 | PTHREAD_H_DEFINES_STRUCT_TIMESPEC |
633 | SYS_TIME_H_DEFINES_STRUCT_TIMESPEC | |
634 | TIME_H_DEFINES_STRUCT_TIMESPEC | |
635 | NEXT_AS_FIRST_DIRECTIVE_TIME_H | |
636 | NEXT_TIME_H | |
5fa4ac76 PE |
637 | NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H |
638 | NEXT_SYS_STAT_H | |
1f5d53eb PE |
639 | NEXT_AS_FIRST_DIRECTIVE_STDLIB_H |
640 | NEXT_STDLIB_H | |
6ad6792b GM |
641 | NEXT_AS_FIRST_DIRECTIVE_STDIO_H |
642 | NEXT_STDIO_H | |
643 | REPLACE_VSPRINTF | |
644 | REPLACE_VSNPRINTF | |
645 | REPLACE_VPRINTF | |
646 | REPLACE_VFPRINTF | |
647 | REPLACE_VDPRINTF | |
648 | REPLACE_VASPRINTF | |
649 | REPLACE_TMPFILE | |
650 | REPLACE_STDIO_WRITE_FUNCS | |
ca36e0ff | 651 | REPLACE_STDIO_READ_FUNCS |
6ad6792b GM |
652 | REPLACE_SPRINTF |
653 | REPLACE_SNPRINTF | |
654 | REPLACE_RENAMEAT | |
655 | REPLACE_RENAME | |
656 | REPLACE_REMOVE | |
657 | REPLACE_PRINTF | |
658 | REPLACE_POPEN | |
659 | REPLACE_PERROR | |
660 | REPLACE_OBSTACK_PRINTF | |
661 | REPLACE_GETLINE | |
662 | REPLACE_GETDELIM | |
663 | REPLACE_FTELLO | |
664 | REPLACE_FTELL | |
665 | REPLACE_FSEEKO | |
666 | REPLACE_FSEEK | |
667 | REPLACE_FREOPEN | |
668 | REPLACE_FPURGE | |
669 | REPLACE_FPRINTF | |
670 | REPLACE_FOPEN | |
671 | REPLACE_FFLUSH | |
672 | REPLACE_FCLOSE | |
673 | REPLACE_DPRINTF | |
674 | HAVE_VDPRINTF | |
675 | HAVE_VASPRINTF | |
676 | HAVE_RENAMEAT | |
677 | HAVE_FTELLO | |
678 | HAVE_FSEEKO | |
679 | HAVE_DPRINTF | |
680 | HAVE_DECL_VSNPRINTF | |
681 | HAVE_DECL_SNPRINTF | |
682 | HAVE_DECL_OBSTACK_PRINTF | |
683 | HAVE_DECL_GETLINE | |
684 | HAVE_DECL_GETDELIM | |
685 | HAVE_DECL_FTELLO | |
686 | HAVE_DECL_FSEEKO | |
687 | HAVE_DECL_FPURGE | |
688 | GNULIB_VSPRINTF_POSIX | |
689 | GNULIB_VSNPRINTF | |
690 | GNULIB_VPRINTF_POSIX | |
691 | GNULIB_VPRINTF | |
692 | GNULIB_VFPRINTF_POSIX | |
693 | GNULIB_VFPRINTF | |
694 | GNULIB_VDPRINTF | |
ca36e0ff GM |
695 | GNULIB_VSCANF |
696 | GNULIB_VFSCANF | |
6ad6792b GM |
697 | GNULIB_VASPRINTF |
698 | GNULIB_TMPFILE | |
699 | GNULIB_STDIO_H_SIGPIPE | |
ca36e0ff | 700 | GNULIB_STDIO_H_NONBLOCKING |
6ad6792b GM |
701 | GNULIB_SPRINTF_POSIX |
702 | GNULIB_SNPRINTF | |
ca36e0ff | 703 | GNULIB_SCANF |
6ad6792b GM |
704 | GNULIB_RENAMEAT |
705 | GNULIB_RENAME | |
706 | GNULIB_REMOVE | |
707 | GNULIB_PUTS | |
708 | GNULIB_PUTCHAR | |
709 | GNULIB_PUTC | |
710 | GNULIB_PRINTF_POSIX | |
711 | GNULIB_PRINTF | |
712 | GNULIB_POPEN | |
713 | GNULIB_PERROR | |
714 | GNULIB_OBSTACK_PRINTF_POSIX | |
715 | GNULIB_OBSTACK_PRINTF | |
ca36e0ff | 716 | GNULIB_GETS |
6ad6792b GM |
717 | GNULIB_GETLINE |
718 | GNULIB_GETDELIM | |
ca36e0ff GM |
719 | GNULIB_GETCHAR |
720 | GNULIB_GETC | |
6ad6792b GM |
721 | GNULIB_FWRITE |
722 | GNULIB_FTELLO | |
723 | GNULIB_FTELL | |
724 | GNULIB_FSEEKO | |
725 | GNULIB_FSEEK | |
ca36e0ff | 726 | GNULIB_FSCANF |
6ad6792b | 727 | GNULIB_FREOPEN |
ca36e0ff | 728 | GNULIB_FREAD |
6ad6792b GM |
729 | GNULIB_FPUTS |
730 | GNULIB_FPUTC | |
731 | GNULIB_FPURGE | |
732 | GNULIB_FPRINTF_POSIX | |
733 | GNULIB_FPRINTF | |
734 | GNULIB_FOPEN | |
ca36e0ff GM |
735 | GNULIB_FGETS |
736 | GNULIB_FGETC | |
6ad6792b GM |
737 | GNULIB_FFLUSH |
738 | GNULIB_FCLOSE | |
739 | GNULIB_DPRINTF | |
1fd182f0 PE |
740 | NEXT_AS_FIRST_DIRECTIVE_STDDEF_H |
741 | NEXT_STDDEF_H | |
6c051bab GM |
742 | GL_GENERATE_STDDEF_H_FALSE |
743 | GL_GENERATE_STDDEF_H_TRUE | |
1fd182f0 PE |
744 | STDDEF_H |
745 | HAVE_WCHAR_T | |
746 | REPLACE_NULL | |
16c3e636 | 747 | HAVE__BOOL |
6c051bab GM |
748 | GL_GENERATE_STDBOOL_H_FALSE |
749 | GL_GENERATE_STDBOOL_H_TRUE | |
16c3e636 | 750 | STDBOOL_H |
6d153f56 GM |
751 | GL_GENERATE_STDARG_H_FALSE |
752 | GL_GENERATE_STDARG_H_TRUE | |
753 | STDARG_H | |
754 | NEXT_AS_FIRST_DIRECTIVE_STDARG_H | |
755 | NEXT_STDARG_H | |
3e0be4ab GM |
756 | NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H |
757 | NEXT_SIGNAL_H | |
758 | REPLACE_PTHREAD_SIGMASK | |
759 | HAVE_SIGHANDLER_T | |
760 | HAVE_TYPE_VOLATILE_SIG_ATOMIC_T | |
761 | HAVE_STRUCT_SIGACTION_SA_SIGACTION | |
762 | HAVE_SIGACTION | |
763 | HAVE_SIGINFO_T | |
764 | HAVE_SIGSET_T | |
765 | HAVE_PTHREAD_SIGMASK | |
766 | HAVE_POSIX_SIGNALBLOCKING | |
767 | GNULIB_SIGACTION | |
768 | GNULIB_SIGPROCMASK | |
769 | GNULIB_SIGNAL_H_SIGPIPE | |
770 | GNULIB_PTHREAD_SIGMASK | |
771 | LIB_PTHREAD_SIGMASK | |
1fd182f0 PE |
772 | REPLACE_TIMEGM |
773 | REPLACE_NANOSLEEP | |
774 | REPLACE_MKTIME | |
775 | REPLACE_LOCALTIME_R | |
776 | HAVE_TIMEGM | |
777 | HAVE_STRPTIME | |
778 | HAVE_NANOSLEEP | |
779 | HAVE_DECL_LOCALTIME_R | |
780 | GNULIB_TIME_R | |
781 | GNULIB_TIMEGM | |
782 | GNULIB_STRPTIME | |
783 | GNULIB_NANOSLEEP | |
784 | GNULIB_MKTIME | |
ae0d7250 PE |
785 | REPLACE_UTIMENSAT |
786 | REPLACE_STAT | |
787 | REPLACE_MKNOD | |
788 | REPLACE_MKFIFO | |
789 | REPLACE_MKDIR | |
790 | REPLACE_LSTAT | |
791 | REPLACE_FUTIMENS | |
792 | REPLACE_FSTATAT | |
793 | REPLACE_FSTAT | |
794 | HAVE_UTIMENSAT | |
795 | HAVE_MKNODAT | |
796 | HAVE_MKNOD | |
797 | HAVE_MKFIFOAT | |
798 | HAVE_MKFIFO | |
799 | HAVE_MKDIRAT | |
800 | HAVE_LSTAT | |
801 | HAVE_LCHMOD | |
802 | HAVE_FUTIMENS | |
803 | HAVE_FSTATAT | |
804 | HAVE_FCHMODAT | |
805 | GNULIB_UTIMENSAT | |
806 | GNULIB_STAT | |
807 | GNULIB_MKNODAT | |
808 | GNULIB_MKNOD | |
809 | GNULIB_MKFIFOAT | |
810 | GNULIB_MKFIFO | |
811 | GNULIB_MKDIRAT | |
812 | GNULIB_LSTAT | |
813 | GNULIB_LCHMOD | |
814 | GNULIB_FUTIMENS | |
815 | GNULIB_FSTATAT | |
816 | GNULIB_FCHMODAT | |
4fda9c95 GM |
817 | NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H |
818 | NEXT_INTTYPES_H | |
819 | UINT64_MAX_EQ_ULONG_MAX | |
820 | UINT32_MAX_LT_UINTMAX_MAX | |
821 | PRIPTR_PREFIX | |
822 | PRI_MACROS_BROKEN | |
823 | INT64_MAX_EQ_LONG_MAX | |
824 | INT32_MAX_LT_INTMAX_MAX | |
825 | HAVE_DECL_STRTOUMAX | |
826 | HAVE_DECL_STRTOIMAX | |
827 | HAVE_DECL_IMAXDIV | |
828 | HAVE_DECL_IMAXABS | |
829 | GNULIB_STRTOUMAX | |
830 | GNULIB_STRTOIMAX | |
831 | GNULIB_IMAXDIV | |
832 | GNULIB_IMAXABS | |
833 | GL_GENERATE_STDINT_H_FALSE | |
834 | GL_GENERATE_STDINT_H_TRUE | |
835 | STDINT_H | |
836 | WINT_T_SUFFIX | |
837 | WCHAR_T_SUFFIX | |
838 | SIG_ATOMIC_T_SUFFIX | |
839 | SIZE_T_SUFFIX | |
840 | PTRDIFF_T_SUFFIX | |
841 | HAVE_SIGNED_WINT_T | |
842 | HAVE_SIGNED_WCHAR_T | |
843 | HAVE_SIGNED_SIG_ATOMIC_T | |
844 | BITSIZEOF_WINT_T | |
845 | BITSIZEOF_WCHAR_T | |
846 | BITSIZEOF_SIG_ATOMIC_T | |
847 | BITSIZEOF_SIZE_T | |
848 | BITSIZEOF_PTRDIFF_T | |
849 | APPLE_UNIVERSAL_BUILD | |
850 | HAVE_SYS_BITYPES_H | |
851 | HAVE_SYS_INTTYPES_H | |
852 | HAVE_STDINT_H | |
853 | NEXT_AS_FIRST_DIRECTIVE_STDINT_H | |
854 | NEXT_STDINT_H | |
855 | HAVE_SYS_TYPES_H | |
856 | HAVE_INTTYPES_H | |
857 | HAVE_WCHAR_H | |
858 | HAVE_UNSIGNED_LONG_LONG_INT | |
859 | HAVE_LONG_LONG_INT | |
e275c824 PE |
860 | GETOPT_H |
861 | HAVE_GETOPT_H | |
862 | NEXT_AS_FIRST_DIRECTIVE_GETOPT_H | |
863 | NEXT_GETOPT_H | |
864 | PRAGMA_COLUMNS | |
865 | PRAGMA_SYSTEM_HEADER | |
866 | INCLUDE_NEXT_AS_FIRST_DIRECTIVE | |
867 | INCLUDE_NEXT | |
7d2a1c5e GM |
868 | GETLOADAVG_LIBS |
869 | REPLACE_WCTOMB | |
870 | REPLACE_UNSETENV | |
871 | REPLACE_STRTOD | |
872 | REPLACE_SETENV | |
873 | REPLACE_REALPATH | |
874 | REPLACE_REALLOC | |
875 | REPLACE_PUTENV | |
876 | REPLACE_MKSTEMP | |
877 | REPLACE_MBTOWC | |
878 | REPLACE_MALLOC | |
879 | REPLACE_CANONICALIZE_FILE_NAME | |
880 | REPLACE_CALLOC | |
881 | HAVE_DECL_UNSETENV | |
882 | HAVE_UNLOCKPT | |
883 | HAVE_SYS_LOADAVG_H | |
884 | HAVE_STRUCT_RANDOM_DATA | |
885 | HAVE_STRTOULL | |
886 | HAVE_STRTOLL | |
887 | HAVE_STRTOD | |
888 | HAVE_DECL_SETENV | |
889 | HAVE_SETENV | |
890 | HAVE_RPMATCH | |
891 | HAVE_REALPATH | |
892 | HAVE_RANDOM_R | |
893 | HAVE_RANDOM_H | |
894 | HAVE_PTSNAME | |
895 | HAVE_MKSTEMPS | |
896 | HAVE_MKSTEMP | |
897 | HAVE_MKOSTEMPS | |
898 | HAVE_MKOSTEMP | |
899 | HAVE_MKDTEMP | |
900 | HAVE_GRANTPT | |
901 | HAVE_GETSUBOPT | |
902 | HAVE_DECL_GETLOADAVG | |
903 | HAVE_CANONICALIZE_FILE_NAME | |
904 | HAVE_ATOLL | |
905 | HAVE__EXIT | |
906 | GNULIB_WCTOMB | |
907 | GNULIB_UNSETENV | |
908 | GNULIB_UNLOCKPT | |
909 | GNULIB_SYSTEM_POSIX | |
910 | GNULIB_STRTOULL | |
911 | GNULIB_STRTOLL | |
912 | GNULIB_STRTOD | |
913 | GNULIB_SETENV | |
914 | GNULIB_RPMATCH | |
915 | GNULIB_REALPATH | |
916 | GNULIB_REALLOC_POSIX | |
917 | GNULIB_RANDOM_R | |
918 | GNULIB_PUTENV | |
919 | GNULIB_PTSNAME | |
920 | GNULIB_MKSTEMPS | |
921 | GNULIB_MKSTEMP | |
922 | GNULIB_MKOSTEMPS | |
923 | GNULIB_MKOSTEMP | |
924 | GNULIB_MKDTEMP | |
925 | GNULIB_MBTOWC | |
926 | GNULIB_MALLOC_POSIX | |
927 | GNULIB_GRANTPT | |
928 | GNULIB_GETSUBOPT | |
929 | GNULIB_GETLOADAVG | |
930 | GNULIB_CANONICALIZE_FILE_NAME | |
931 | GNULIB_CALLOC_POSIX | |
932 | GNULIB_ATOLL | |
933 | GNULIB__EXIT | |
e275c824 PE |
934 | UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS |
935 | UNISTD_H_HAVE_WINSOCK2_H | |
936 | REPLACE_WRITE | |
937 | REPLACE_USLEEP | |
938 | REPLACE_UNLINKAT | |
939 | REPLACE_UNLINK | |
940 | REPLACE_TTYNAME_R | |
941 | REPLACE_SYMLINK | |
942 | REPLACE_SLEEP | |
943 | REPLACE_RMDIR | |
944 | REPLACE_READLINK | |
ca36e0ff | 945 | REPLACE_READ |
e275c824 PE |
946 | REPLACE_PWRITE |
947 | REPLACE_PREAD | |
948 | REPLACE_LSEEK | |
949 | REPLACE_LINKAT | |
950 | REPLACE_LINK | |
951 | REPLACE_LCHOWN | |
952 | REPLACE_GETPAGESIZE | |
953 | REPLACE_GETGROUPS | |
954 | REPLACE_GETLOGIN_R | |
955 | REPLACE_GETDOMAINNAME | |
956 | REPLACE_GETCWD | |
957 | REPLACE_FCHOWNAT | |
958 | REPLACE_DUP2 | |
959 | REPLACE_DUP | |
960 | REPLACE_CLOSE | |
961 | REPLACE_CHOWN | |
962 | HAVE_SYS_PARAM_H | |
963 | HAVE_OS_H | |
964 | HAVE_DECL_TTYNAME_R | |
965 | HAVE_DECL_GETUSERSHELL | |
966 | HAVE_DECL_GETPAGESIZE | |
967 | HAVE_DECL_GETLOGIN_R | |
968 | HAVE_DECL_GETDOMAINNAME | |
969 | HAVE_DECL_FCHDIR | |
970 | HAVE_DECL_ENVIRON | |
971 | HAVE_USLEEP | |
972 | HAVE_UNLINKAT | |
973 | HAVE_SYMLINKAT | |
974 | HAVE_SYMLINK | |
975 | HAVE_SLEEP | |
976 | HAVE_READLINKAT | |
977 | HAVE_READLINK | |
978 | HAVE_PWRITE | |
979 | HAVE_PREAD | |
980 | HAVE_PIPE2 | |
981 | HAVE_PIPE | |
982 | HAVE_LINKAT | |
983 | HAVE_LINK | |
984 | HAVE_LCHOWN | |
da6c8463 | 985 | HAVE_GROUP_MEMBER |
e275c824 PE |
986 | HAVE_GETPAGESIZE |
987 | HAVE_GETLOGIN | |
988 | HAVE_GETHOSTNAME | |
989 | HAVE_GETGROUPS | |
990 | HAVE_GETDTABLESIZE | |
991 | HAVE_FTRUNCATE | |
992 | HAVE_FSYNC | |
993 | HAVE_FCHOWNAT | |
994 | HAVE_FCHDIR | |
995 | HAVE_FACCESSAT | |
996 | HAVE_EUIDACCESS | |
997 | HAVE_DUP3 | |
998 | HAVE_DUP2 | |
999 | HAVE_CHOWN | |
1000 | GNULIB_WRITE | |
1001 | GNULIB_USLEEP | |
1002 | GNULIB_UNLINKAT | |
1003 | GNULIB_UNLINK | |
1004 | GNULIB_UNISTD_H_SIGPIPE | |
ca36e0ff | 1005 | GNULIB_UNISTD_H_NONBLOCKING |
e275c824 PE |
1006 | GNULIB_UNISTD_H_GETOPT |
1007 | GNULIB_TTYNAME_R | |
1008 | GNULIB_SYMLINKAT | |
1009 | GNULIB_SYMLINK | |
1010 | GNULIB_SLEEP | |
1011 | GNULIB_RMDIR | |
1012 | GNULIB_READLINKAT | |
1013 | GNULIB_READLINK | |
ca36e0ff | 1014 | GNULIB_READ |
e275c824 PE |
1015 | GNULIB_PWRITE |
1016 | GNULIB_PREAD | |
1017 | GNULIB_PIPE2 | |
1018 | GNULIB_PIPE | |
1019 | GNULIB_LSEEK | |
1020 | GNULIB_LINKAT | |
1021 | GNULIB_LINK | |
1022 | GNULIB_LCHOWN | |
da6c8463 | 1023 | GNULIB_GROUP_MEMBER |
e275c824 PE |
1024 | GNULIB_GETUSERSHELL |
1025 | GNULIB_GETPAGESIZE | |
1026 | GNULIB_GETLOGIN_R | |
1027 | GNULIB_GETLOGIN | |
1028 | GNULIB_GETHOSTNAME | |
1029 | GNULIB_GETGROUPS | |
1030 | GNULIB_GETDTABLESIZE | |
1031 | GNULIB_GETDOMAINNAME | |
1032 | GNULIB_GETCWD | |
1033 | GNULIB_FTRUNCATE | |
1034 | GNULIB_FSYNC | |
1035 | GNULIB_FCHOWNAT | |
1036 | GNULIB_FCHDIR | |
1037 | GNULIB_FACCESSAT | |
1038 | GNULIB_EUIDACCESS | |
1039 | GNULIB_ENVIRON | |
1040 | GNULIB_DUP3 | |
1041 | GNULIB_DUP2 | |
1042 | GNULIB_CLOSE | |
1043 | GNULIB_CHOWN | |
4fc2b746 GM |
1044 | GL_GENERATE_ALLOCA_H_FALSE |
1045 | GL_GENERATE_ALLOCA_H_TRUE | |
1046 | ALLOCA_H | |
1047 | ALLOCA | |
743c80a7 PE |
1048 | GL_COND_LIBTOOL_FALSE |
1049 | GL_COND_LIBTOOL_TRUE | |
3e0be4ab GM |
1050 | POST_ALLOC_OBJ |
1051 | PRE_ALLOC_OBJ | |
1052 | CYGWIN_OBJ | |
1053 | RALLOC_OBJ | |
1054 | OLDXMENU_DEPS | |
1055 | LIBX_OTHER | |
1056 | LIBXMENU | |
1057 | OLDXMENU | |
1058 | OLDXMENU_TARGET | |
1059 | LIBXT_OTHER | |
1060 | TOOLKIT_LIBW | |
1061 | WIDGET_OBJ | |
1062 | XOBJ | |
1063 | XMENU_OBJ | |
1064 | FONT_OBJ | |
1065 | OTHER_FILES | |
1066 | GNU_OBJC_CFLAGS | |
1067 | ns_appsrc | |
1068 | ns_appresdir | |
1069 | ns_appbindir | |
1070 | ns_appdir | |
1071 | S_FILE | |
1072 | M_FILE | |
1073 | X_TOOLKIT_TYPE | |
1074 | C_SWITCH_X_SYSTEM | |
1075 | C_SWITCH_X_SITE | |
1076 | LD_SWITCH_X_SITE | |
1077 | gameuser | |
1078 | gamedir | |
1079 | bitmapdir | |
1080 | archlibdir | |
1081 | etcdir | |
1082 | x_default_search_path | |
1083 | lisppath | |
1084 | locallisppath | |
1085 | lispdir | |
1086 | srcdir | |
1087 | canonical | |
1088 | configuration | |
1089 | version | |
1090 | KRB4LIB | |
1091 | DESLIB | |
1092 | KRB5LIB | |
1093 | CRYPTOLIB | |
1094 | COM_ERRLIB | |
1095 | LIBRESOLV | |
1096 | LIBHESIOD | |
1097 | TERMCAP_OBJ | |
1098 | LIBS_TERMCAP | |
067d23c9 KY |
1099 | BLESSMAIL_TARGET |
1100 | LIBS_MAIL | |
1101 | liblockfile | |
067d23c9 KY |
1102 | LIBXML2_LIBS |
1103 | LIBXML2_CFLAGS | |
1104 | LIBXSM | |
1105 | LIBGPM | |
1106 | LIBGIF | |
1107 | LIBTIFF | |
1108 | LIBPNG | |
1109 | LIBJPEG | |
1110 | LIBXPM | |
067d23c9 KY |
1111 | M17N_FLT_LIBS |
1112 | M17N_FLT_CFLAGS | |
1113 | LIBOTF_LIBS | |
1114 | LIBOTF_CFLAGS | |
7834125e GM |
1115 | FREETYPE_LIBS |
1116 | FREETYPE_CFLAGS | |
067d23c9 KY |
1117 | XFT_LIBS |
1118 | XFT_CFLAGS | |
1119 | FONTCONFIG_LIBS | |
1120 | FONTCONFIG_CFLAGS | |
1121 | LIBXMU | |
1122 | LIBXTR6 | |
1123 | LIBGNUTLS_LIBS | |
1124 | LIBGNUTLS_CFLAGS | |
1125 | LIBSELINUX_LIBS | |
f527bd02 GM |
1126 | SETTINGS_LIBS |
1127 | SETTINGS_CFLAGS | |
067d23c9 KY |
1128 | GCONF_LIBS |
1129 | GCONF_CFLAGS | |
f527bd02 GM |
1130 | GSETTINGS_LIBS |
1131 | GSETTINGS_CFLAGS | |
067d23c9 KY |
1132 | DBUS_OBJ |
1133 | DBUS_LIBS | |
1134 | DBUS_CFLAGS | |
1135 | GTK_OBJ | |
1136 | GTK_LIBS | |
1137 | GTK_CFLAGS | |
1138 | IMAGEMAGICK_LIBS | |
1139 | IMAGEMAGICK_CFLAGS | |
1140 | RSVG_LIBS | |
1141 | RSVG_CFLAGS | |
1142 | VMLIMIT_OBJ | |
1143 | GMALLOC_OBJ | |
1144 | HAVE_XSERVER | |
1145 | LIB_STANDARD | |
00b3c7ac | 1146 | NS_OBJC_OBJ |
067d23c9 KY |
1147 | NS_OBJ |
1148 | TEMACS_LDFLAGS2 | |
1149 | LD_SWITCH_X_SITE_AUX_RPATH | |
1150 | LD_SWITCH_X_SITE_AUX | |
1151 | XMKMF | |
1152 | DEPFLAGS | |
1153 | MKDEPDIR | |
067d23c9 KY |
1154 | CFLAGS_SOUND |
1155 | ALSA_LIBS | |
1156 | ALSA_CFLAGS | |
1157 | PKG_CONFIG | |
1158 | LIBSOUND | |
130f1dac | 1159 | CRT_DIR |
067d23c9 KY |
1160 | START_FILES |
1161 | LIB_MATH | |
067d23c9 KY |
1162 | LIBS_SYSTEM |
1163 | C_SWITCH_SYSTEM | |
1164 | UNEXEC_OBJ | |
1165 | C_SWITCH_MACHINE | |
1166 | LD_SWITCH_SYSTEM | |
1167 | CANNOT_DUMP | |
96f129d5 | 1168 | HAVE_MAKEINFO |
067d23c9 KY |
1169 | GZIP_PROG |
1170 | INSTALL_INFO | |
067d23c9 KY |
1171 | C_WARNINGS_SWITCH |
1172 | EGREP | |
1173 | GREP | |
1174 | CPP | |
743c80a7 PE |
1175 | RANLIB |
1176 | am__fastdepCC_FALSE | |
1177 | am__fastdepCC_TRUE | |
1178 | CCDEPMODE | |
1179 | AMDEPBACKSLASH | |
1180 | AMDEP_FALSE | |
1181 | AMDEP_TRUE | |
1182 | am__quote | |
1183 | am__include | |
1184 | DEPDIR | |
067d23c9 KY |
1185 | OBJEXT |
1186 | EXEEXT | |
1187 | ac_ct_CC | |
1188 | CPPFLAGS | |
1189 | LDFLAGS | |
1190 | CFLAGS | |
1191 | CC | |
1192 | host_os | |
1193 | host_vendor | |
1194 | host_cpu | |
1195 | host | |
1196 | build_os | |
1197 | build_vendor | |
1198 | build_cpu | |
1199 | build | |
1200 | PROFILING_CFLAGS | |
1201 | MAINT | |
1202 | GZIP_INFO | |
743c80a7 PE |
1203 | am__untar |
1204 | am__tar | |
1205 | AMTAR | |
1206 | am__leading_dot | |
1207 | SET_MAKE | |
1208 | AWK | |
1209 | mkdir_p | |
1210 | MKDIR_P | |
1211 | INSTALL_STRIP_PROGRAM | |
1212 | STRIP | |
1213 | install_sh | |
1214 | MAKEINFO | |
1215 | AUTOHEADER | |
1216 | AUTOMAKE | |
1217 | AUTOCONF | |
1218 | ACLOCAL | |
1219 | VERSION | |
1220 | PACKAGE | |
1221 | CYGPATH_W | |
1222 | am__isrc | |
1223 | INSTALL_DATA | |
1224 | INSTALL_SCRIPT | |
1225 | INSTALL_PROGRAM | |
067d23c9 KY |
1226 | target_alias |
1227 | host_alias | |
1228 | build_alias | |
1229 | LIBS | |
1230 | ECHO_T | |
1231 | ECHO_N | |
1232 | ECHO_C | |
1233 | DEFS | |
1234 | mandir | |
1235 | localedir | |
1236 | libdir | |
1237 | psdir | |
1238 | pdfdir | |
1239 | dvidir | |
1240 | htmldir | |
1241 | infodir | |
1242 | docdir | |
1243 | oldincludedir | |
1244 | includedir | |
1245 | localstatedir | |
1246 | sharedstatedir | |
1247 | sysconfdir | |
1248 | datadir | |
1249 | datarootdir | |
1250 | libexecdir | |
1251 | sbindir | |
1252 | bindir | |
1253 | program_transform_name | |
1254 | prefix | |
1255 | exec_prefix | |
1256 | PACKAGE_URL | |
1257 | PACKAGE_BUGREPORT | |
1258 | PACKAGE_STRING | |
1259 | PACKAGE_VERSION | |
1260 | PACKAGE_TARNAME | |
1261 | PACKAGE_NAME | |
1262 | PATH_SEPARATOR | |
1263 | SHELL' | |
1264 | ac_subst_files='deps_frag | |
4d4b75e8 | 1265 | lisp_frag |
067d23c9 KY |
1266 | ns_frag' |
1267 | ac_user_opts=' | |
1268 | enable_option_checking | |
1269 | with_pop | |
1270 | with_kerberos | |
1271 | with_kerberos5 | |
1272 | with_hesiod | |
1273 | with_mmdf | |
1274 | with_mail_unlink | |
1275 | with_mailhost | |
1276 | with_sound | |
1277 | with_sync_input | |
1278 | with_x_toolkit | |
0442dc7f | 1279 | with_wide_int |
067d23c9 KY |
1280 | with_xpm |
1281 | with_jpeg | |
1282 | with_tiff | |
1283 | with_gif | |
1284 | with_png | |
1285 | with_rsvg | |
1286 | with_xml2 | |
1287 | with_imagemagick | |
1288 | with_xft | |
1289 | with_libotf | |
1290 | with_m17n_flt | |
1291 | with_toolkit_scroll_bars | |
1292 | with_xaw3d | |
1293 | with_xim | |
1294 | with_ns | |
1295 | with_gpm | |
1296 | with_dbus | |
1297 | with_gconf | |
f527bd02 | 1298 | with_gsettings |
067d23c9 KY |
1299 | with_selinux |
1300 | with_gnutls | |
1301 | with_makeinfo | |
1302 | with_compress_info | |
1303 | with_pkg_config_prog | |
1304 | with_crt_dir | |
4fc5868a | 1305 | with_gameuser |
067d23c9 KY |
1306 | with_gnustep_conf |
1307 | enable_ns_self_contained | |
1308 | enable_asserts | |
1309 | enable_maintainer_mode | |
1310 | enable_locallisppath | |
1311 | enable_checking | |
1312 | enable_use_lisp_union_type | |
1313 | enable_profiling | |
1314 | enable_autodepend | |
743c80a7 | 1315 | enable_dependency_tracking |
067d23c9 KY |
1316 | enable_largefile |
1317 | with_x | |
1318 | ' | |
1319 | ac_precious_vars='build_alias | |
1320 | host_alias | |
1321 | target_alias | |
1322 | CC | |
1323 | CFLAGS | |
1324 | LDFLAGS | |
1325 | LIBS | |
1326 | CPPFLAGS | |
1327 | CPP | |
1328 | XMKMF' | |
1329 | ||
1330 | ||
1331 | # Initialize some variables set by options. | |
1332 | ac_init_help= | |
1333 | ac_init_version=false | |
1334 | ac_unrecognized_opts= | |
1335 | ac_unrecognized_sep= | |
1336 | # The variables have the same names as the options, with | |
1337 | # dashes changed to underlines. | |
1338 | cache_file=/dev/null | |
1339 | exec_prefix=NONE | |
1340 | no_create= | |
1341 | no_recursion= | |
1342 | prefix=NONE | |
1343 | program_prefix=NONE | |
1344 | program_suffix=NONE | |
1345 | program_transform_name=s,x,x, | |
1346 | silent= | |
1347 | site= | |
1348 | srcdir= | |
1349 | verbose= | |
1350 | x_includes=NONE | |
1351 | x_libraries=NONE | |
1352 | ||
1353 | # Installation directory options. | |
1354 | # These are left unexpanded so users can "make install exec_prefix=/foo" | |
1355 | # and all the variables that are supposed to be based on exec_prefix | |
1356 | # by default will actually change. | |
1357 | # Use braces instead of parens because sh, perl, etc. also accept them. | |
1358 | # (The list follows the same order as the GNU Coding Standards.) | |
1359 | bindir='${exec_prefix}/bin' | |
1360 | sbindir='${exec_prefix}/sbin' | |
1361 | libexecdir='${exec_prefix}/libexec' | |
1362 | datarootdir='${prefix}/share' | |
1363 | datadir='${datarootdir}' | |
1364 | sysconfdir='${prefix}/etc' | |
1365 | sharedstatedir='${prefix}/com' | |
1366 | localstatedir='${prefix}/var' | |
1367 | includedir='${prefix}/include' | |
1368 | oldincludedir='/usr/include' | |
1369 | docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' | |
1370 | infodir='${datarootdir}/info' | |
1371 | htmldir='${docdir}' | |
1372 | dvidir='${docdir}' | |
1373 | pdfdir='${docdir}' | |
1374 | psdir='${docdir}' | |
1375 | libdir='${exec_prefix}/lib' | |
1376 | localedir='${datarootdir}/locale' | |
1377 | mandir='${datarootdir}/man' | |
1378 | ||
1379 | ac_prev= | |
1380 | ac_dashdash= | |
1381 | for ac_option | |
1382 | do | |
1383 | # If the previous option needs an argument, assign it. | |
1384 | if test -n "$ac_prev"; then | |
1385 | eval $ac_prev=\$ac_option | |
1386 | ac_prev= | |
1387 | continue | |
1388 | fi | |
1389 | ||
1390 | case $ac_option in | |
5f64f7bd GM |
1391 | *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; |
1392 | *) ac_optarg=yes ;; | |
067d23c9 KY |
1393 | esac |
1394 | ||
1395 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
1396 | ||
1397 | case $ac_dashdash$ac_option in | |
1398 | --) | |
1399 | ac_dashdash=yes ;; | |
1400 | ||
1401 | -bindir | --bindir | --bindi | --bind | --bin | --bi) | |
1402 | ac_prev=bindir ;; | |
1403 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
1404 | bindir=$ac_optarg ;; | |
1405 | ||
1406 | -build | --build | --buil | --bui | --bu) | |
1407 | ac_prev=build_alias ;; | |
1408 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) | |
1409 | build_alias=$ac_optarg ;; | |
1410 | ||
1411 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
1412 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
1413 | ac_prev=cache_file ;; | |
1414 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
1415 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
1416 | cache_file=$ac_optarg ;; | |
1417 | ||
1418 | --config-cache | -C) | |
1419 | cache_file=config.cache ;; | |
1420 | ||
1421 | -datadir | --datadir | --datadi | --datad) | |
1422 | ac_prev=datadir ;; | |
1423 | -datadir=* | --datadir=* | --datadi=* | --datad=*) | |
1424 | datadir=$ac_optarg ;; | |
1425 | ||
1426 | -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | |
1427 | | --dataroo | --dataro | --datar) | |
1428 | ac_prev=datarootdir ;; | |
1429 | -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | |
1430 | | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) | |
1431 | datarootdir=$ac_optarg ;; | |
1432 | ||
1433 | -disable-* | --disable-*) | |
1434 | ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` | |
1435 | # Reject names that are not valid shell variable names. | |
1436 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && | |
5f64f7bd | 1437 | as_fn_error "invalid feature name: $ac_useropt" |
067d23c9 KY |
1438 | ac_useropt_orig=$ac_useropt |
1439 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1440 | case $ac_user_opts in | |
1441 | *" | |
1442 | "enable_$ac_useropt" | |
1443 | "*) ;; | |
1444 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" | |
1445 | ac_unrecognized_sep=', ';; | |
1446 | esac | |
1447 | eval enable_$ac_useropt=no ;; | |
1448 | ||
1449 | -docdir | --docdir | --docdi | --doc | --do) | |
1450 | ac_prev=docdir ;; | |
1451 | -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) | |
1452 | docdir=$ac_optarg ;; | |
1453 | ||
1454 | -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) | |
1455 | ac_prev=dvidir ;; | |
1456 | -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) | |
1457 | dvidir=$ac_optarg ;; | |
1458 | ||
1459 | -enable-* | --enable-*) | |
1460 | ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` | |
1461 | # Reject names that are not valid shell variable names. | |
1462 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && | |
5f64f7bd | 1463 | as_fn_error "invalid feature name: $ac_useropt" |
067d23c9 KY |
1464 | ac_useropt_orig=$ac_useropt |
1465 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1466 | case $ac_user_opts in | |
1467 | *" | |
1468 | "enable_$ac_useropt" | |
1469 | "*) ;; | |
1470 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" | |
1471 | ac_unrecognized_sep=', ';; | |
1472 | esac | |
1473 | eval enable_$ac_useropt=\$ac_optarg ;; | |
1474 | ||
1475 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
1476 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
1477 | | --exec | --exe | --ex) | |
1478 | ac_prev=exec_prefix ;; | |
1479 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
1480 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
1481 | | --exec=* | --exe=* | --ex=*) | |
1482 | exec_prefix=$ac_optarg ;; | |
1483 | ||
1484 | -gas | --gas | --ga | --g) | |
1485 | # Obsolete; use --with-gas. | |
1486 | with_gas=yes ;; | |
1487 | ||
1488 | -help | --help | --hel | --he | -h) | |
1489 | ac_init_help=long ;; | |
1490 | -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) | |
1491 | ac_init_help=recursive ;; | |
1492 | -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) | |
1493 | ac_init_help=short ;; | |
1494 | ||
1495 | -host | --host | --hos | --ho) | |
1496 | ac_prev=host_alias ;; | |
1497 | -host=* | --host=* | --hos=* | --ho=*) | |
1498 | host_alias=$ac_optarg ;; | |
1499 | ||
1500 | -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) | |
1501 | ac_prev=htmldir ;; | |
1502 | -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | |
1503 | | --ht=*) | |
1504 | htmldir=$ac_optarg ;; | |
1505 | ||
1506 | -includedir | --includedir | --includedi | --included | --include \ | |
1507 | | --includ | --inclu | --incl | --inc) | |
1508 | ac_prev=includedir ;; | |
1509 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
1510 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
1511 | includedir=$ac_optarg ;; | |
1512 | ||
1513 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
1514 | ac_prev=infodir ;; | |
1515 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
1516 | infodir=$ac_optarg ;; | |
1517 | ||
1518 | -libdir | --libdir | --libdi | --libd) | |
1519 | ac_prev=libdir ;; | |
1520 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
1521 | libdir=$ac_optarg ;; | |
1522 | ||
1523 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
1524 | | --libexe | --libex | --libe) | |
1525 | ac_prev=libexecdir ;; | |
1526 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
1527 | | --libexe=* | --libex=* | --libe=*) | |
1528 | libexecdir=$ac_optarg ;; | |
1529 | ||
1530 | -localedir | --localedir | --localedi | --localed | --locale) | |
1531 | ac_prev=localedir ;; | |
1532 | -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) | |
1533 | localedir=$ac_optarg ;; | |
1534 | ||
1535 | -localstatedir | --localstatedir | --localstatedi | --localstated \ | |
1536 | | --localstate | --localstat | --localsta | --localst | --locals) | |
1537 | ac_prev=localstatedir ;; | |
1538 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
1539 | | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) | |
1540 | localstatedir=$ac_optarg ;; | |
1541 | ||
1542 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
1543 | ac_prev=mandir ;; | |
1544 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
1545 | mandir=$ac_optarg ;; | |
1546 | ||
1547 | -nfp | --nfp | --nf) | |
1548 | # Obsolete; use --without-fp. | |
1549 | with_fp=no ;; | |
1550 | ||
1551 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
1552 | | --no-cr | --no-c | -n) | |
1553 | no_create=yes ;; | |
1554 | ||
1555 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
1556 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
1557 | no_recursion=yes ;; | |
1558 | ||
1559 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | |
1560 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
1561 | | --oldin | --oldi | --old | --ol | --o) | |
1562 | ac_prev=oldincludedir ;; | |
1563 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
1564 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
1565 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
1566 | oldincludedir=$ac_optarg ;; | |
1567 | ||
1568 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
1569 | ac_prev=prefix ;; | |
1570 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
1571 | prefix=$ac_optarg ;; | |
1572 | ||
1573 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
1574 | | --program-pre | --program-pr | --program-p) | |
1575 | ac_prev=program_prefix ;; | |
1576 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
1577 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
1578 | program_prefix=$ac_optarg ;; | |
1579 | ||
1580 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
1581 | | --program-suf | --program-su | --program-s) | |
1582 | ac_prev=program_suffix ;; | |
1583 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
1584 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
1585 | program_suffix=$ac_optarg ;; | |
1586 | ||
1587 | -program-transform-name | --program-transform-name \ | |
1588 | | --program-transform-nam | --program-transform-na \ | |
1589 | | --program-transform-n | --program-transform- \ | |
1590 | | --program-transform | --program-transfor \ | |
1591 | | --program-transfo | --program-transf \ | |
1592 | | --program-trans | --program-tran \ | |
1593 | | --progr-tra | --program-tr | --program-t) | |
1594 | ac_prev=program_transform_name ;; | |
1595 | -program-transform-name=* | --program-transform-name=* \ | |
1596 | | --program-transform-nam=* | --program-transform-na=* \ | |
1597 | | --program-transform-n=* | --program-transform-=* \ | |
1598 | | --program-transform=* | --program-transfor=* \ | |
1599 | | --program-transfo=* | --program-transf=* \ | |
1600 | | --program-trans=* | --program-tran=* \ | |
1601 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
1602 | program_transform_name=$ac_optarg ;; | |
1603 | ||
1604 | -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) | |
1605 | ac_prev=pdfdir ;; | |
1606 | -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) | |
1607 | pdfdir=$ac_optarg ;; | |
1608 | ||
1609 | -psdir | --psdir | --psdi | --psd | --ps) | |
1610 | ac_prev=psdir ;; | |
1611 | -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) | |
1612 | psdir=$ac_optarg ;; | |
1613 | ||
1614 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
1615 | | -silent | --silent | --silen | --sile | --sil) | |
1616 | silent=yes ;; | |
1617 | ||
1618 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | |
1619 | ac_prev=sbindir ;; | |
1620 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
1621 | | --sbi=* | --sb=*) | |
1622 | sbindir=$ac_optarg ;; | |
1623 | ||
1624 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
1625 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
1626 | | --sharedst | --shareds | --shared | --share | --shar \ | |
1627 | | --sha | --sh) | |
1628 | ac_prev=sharedstatedir ;; | |
1629 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
1630 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
1631 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
1632 | | --sha=* | --sh=*) | |
1633 | sharedstatedir=$ac_optarg ;; | |
1634 | ||
1635 | -site | --site | --sit) | |
1636 | ac_prev=site ;; | |
1637 | -site=* | --site=* | --sit=*) | |
1638 | site=$ac_optarg ;; | |
1639 | ||
1640 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
1641 | ac_prev=srcdir ;; | |
1642 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
1643 | srcdir=$ac_optarg ;; | |
1644 | ||
1645 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | |
1646 | | --syscon | --sysco | --sysc | --sys | --sy) | |
1647 | ac_prev=sysconfdir ;; | |
1648 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
1649 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
1650 | sysconfdir=$ac_optarg ;; | |
1651 | ||
1652 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
1653 | ac_prev=target_alias ;; | |
1654 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) | |
1655 | target_alias=$ac_optarg ;; | |
1656 | ||
1657 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
1658 | verbose=yes ;; | |
1659 | ||
1660 | -version | --version | --versio | --versi | --vers | -V) | |
1661 | ac_init_version=: ;; | |
1662 | ||
1663 | -with-* | --with-*) | |
1664 | ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` | |
1665 | # Reject names that are not valid shell variable names. | |
1666 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && | |
5f64f7bd | 1667 | as_fn_error "invalid package name: $ac_useropt" |
067d23c9 KY |
1668 | ac_useropt_orig=$ac_useropt |
1669 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1670 | case $ac_user_opts in | |
1671 | *" | |
1672 | "with_$ac_useropt" | |
1673 | "*) ;; | |
1674 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" | |
1675 | ac_unrecognized_sep=', ';; | |
1676 | esac | |
1677 | eval with_$ac_useropt=\$ac_optarg ;; | |
1678 | ||
1679 | -without-* | --without-*) | |
1680 | ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` | |
1681 | # Reject names that are not valid shell variable names. | |
1682 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && | |
5f64f7bd | 1683 | as_fn_error "invalid package name: $ac_useropt" |
067d23c9 KY |
1684 | ac_useropt_orig=$ac_useropt |
1685 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1686 | case $ac_user_opts in | |
1687 | *" | |
1688 | "with_$ac_useropt" | |
1689 | "*) ;; | |
1690 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" | |
1691 | ac_unrecognized_sep=', ';; | |
1692 | esac | |
1693 | eval with_$ac_useropt=no ;; | |
1694 | ||
1695 | --x) | |
1696 | # Obsolete; use --with-x. | |
1697 | with_x=yes ;; | |
1698 | ||
1699 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
1700 | | --x-incl | --x-inc | --x-in | --x-i) | |
1701 | ac_prev=x_includes ;; | |
1702 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
1703 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
1704 | x_includes=$ac_optarg ;; | |
1705 | ||
1706 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
1707 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
1708 | ac_prev=x_libraries ;; | |
1709 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
1710 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
1711 | x_libraries=$ac_optarg ;; | |
1712 | ||
5f64f7bd GM |
1713 | -*) as_fn_error "unrecognized option: \`$ac_option' |
1714 | Try \`$0 --help' for more information." | |
067d23c9 KY |
1715 | ;; |
1716 | ||
1717 | *=*) | |
1718 | ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` | |
1719 | # Reject names that are not valid shell variable names. | |
1720 | case $ac_envvar in #( | |
1721 | '' | [0-9]* | *[!_$as_cr_alnum]* ) | |
5f64f7bd | 1722 | as_fn_error "invalid variable name: \`$ac_envvar'" ;; |
067d23c9 KY |
1723 | esac |
1724 | eval $ac_envvar=\$ac_optarg | |
1725 | export $ac_envvar ;; | |
1726 | ||
1727 | *) | |
1728 | # FIXME: should be removed in autoconf 3.0. | |
1729 | $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 | |
1730 | expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && | |
1731 | $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 | |
5f64f7bd | 1732 | : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} |
067d23c9 KY |
1733 | ;; |
1734 | ||
1735 | esac | |
1736 | done | |
1737 | ||
1738 | if test -n "$ac_prev"; then | |
1739 | ac_option=--`echo $ac_prev | sed 's/_/-/g'` | |
5f64f7bd | 1740 | as_fn_error "missing argument to $ac_option" |
067d23c9 KY |
1741 | fi |
1742 | ||
1743 | if test -n "$ac_unrecognized_opts"; then | |
1744 | case $enable_option_checking in | |
1745 | no) ;; | |
5f64f7bd | 1746 | fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; |
067d23c9 KY |
1747 | *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; |
1748 | esac | |
1749 | fi | |
1750 | ||
1751 | # Check all directory arguments for consistency. | |
1752 | for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ | |
1753 | datadir sysconfdir sharedstatedir localstatedir includedir \ | |
1754 | oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ | |
1755 | libdir localedir mandir | |
1756 | do | |
1757 | eval ac_val=\$$ac_var | |
1758 | # Remove trailing slashes. | |
1759 | case $ac_val in | |
1760 | */ ) | |
1761 | ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` | |
1762 | eval $ac_var=\$ac_val;; | |
1763 | esac | |
1764 | # Be sure to have absolute directory names. | |
1765 | case $ac_val in | |
1766 | [\\/$]* | ?:[\\/]* ) continue;; | |
1767 | NONE | '' ) case $ac_var in *prefix ) continue;; esac;; | |
1768 | esac | |
5f64f7bd | 1769 | as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" |
067d23c9 KY |
1770 | done |
1771 | ||
1772 | # There might be people who depend on the old broken behavior: `$host' | |
1773 | # used to hold the argument of --host etc. | |
1774 | # FIXME: To remove some day. | |
1775 | build=$build_alias | |
1776 | host=$host_alias | |
1777 | target=$target_alias | |
1778 | ||
1779 | # FIXME: To remove some day. | |
1780 | if test "x$host_alias" != x; then | |
1781 | if test "x$build_alias" = x; then | |
1782 | cross_compiling=maybe | |
5f64f7bd GM |
1783 | $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. |
1784 | If a cross compiler is detected then cross compile mode will be used." >&2 | |
067d23c9 KY |
1785 | elif test "x$build_alias" != "x$host_alias"; then |
1786 | cross_compiling=yes | |
1787 | fi | |
1788 | fi | |
1789 | ||
1790 | ac_tool_prefix= | |
1791 | test -n "$host_alias" && ac_tool_prefix=$host_alias- | |
1792 | ||
1793 | test "$silent" = yes && exec 6>/dev/null | |
1794 | ||
1795 | ||
1796 | ac_pwd=`pwd` && test -n "$ac_pwd" && | |
1797 | ac_ls_di=`ls -di .` && | |
1798 | ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || | |
5f64f7bd | 1799 | as_fn_error "working directory cannot be determined" |
067d23c9 | 1800 | test "X$ac_ls_di" = "X$ac_pwd_ls_di" || |
5f64f7bd | 1801 | as_fn_error "pwd does not report name of working directory" |
067d23c9 KY |
1802 | |
1803 | ||
1804 | # Find the source files, if location was not specified. | |
1805 | if test -z "$srcdir"; then | |
1806 | ac_srcdir_defaulted=yes | |
1807 | # Try the directory containing this script, then the parent directory. | |
1808 | ac_confdir=`$as_dirname -- "$as_myself" || | |
1809 | $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
1810 | X"$as_myself" : 'X\(//\)[^/]' \| \ | |
1811 | X"$as_myself" : 'X\(//\)$' \| \ | |
1812 | X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || | |
1813 | $as_echo X"$as_myself" | | |
1814 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
1815 | s//\1/ | |
1816 | q | |
1817 | } | |
1818 | /^X\(\/\/\)[^/].*/{ | |
1819 | s//\1/ | |
1820 | q | |
1821 | } | |
1822 | /^X\(\/\/\)$/{ | |
1823 | s//\1/ | |
1824 | q | |
1825 | } | |
1826 | /^X\(\/\).*/{ | |
1827 | s//\1/ | |
1828 | q | |
1829 | } | |
1830 | s/.*/./; q'` | |
1831 | srcdir=$ac_confdir | |
1832 | if test ! -r "$srcdir/$ac_unique_file"; then | |
1833 | srcdir=.. | |
1834 | fi | |
1835 | else | |
1836 | ac_srcdir_defaulted=no | |
1837 | fi | |
1838 | if test ! -r "$srcdir/$ac_unique_file"; then | |
1839 | test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." | |
5f64f7bd | 1840 | as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" |
067d23c9 KY |
1841 | fi |
1842 | ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" | |
1843 | ac_abs_confdir=`( | |
5f64f7bd | 1844 | cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" |
067d23c9 KY |
1845 | pwd)` |
1846 | # When building in place, set srcdir=. | |
1847 | if test "$ac_abs_confdir" = "$ac_pwd"; then | |
1848 | srcdir=. | |
1849 | fi | |
1850 | # Remove unnecessary trailing slashes from srcdir. | |
1851 | # Double slashes in file names in object file debugging info | |
1852 | # mess up M-x gdb in Emacs. | |
1853 | case $srcdir in | |
1854 | */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; | |
1855 | esac | |
1856 | for ac_var in $ac_precious_vars; do | |
1857 | eval ac_env_${ac_var}_set=\${${ac_var}+set} | |
1858 | eval ac_env_${ac_var}_value=\$${ac_var} | |
1859 | eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} | |
1860 | eval ac_cv_env_${ac_var}_value=\$${ac_var} | |
1861 | done | |
1862 | ||
1863 | # | |
1864 | # Report the --help message. | |
1865 | # | |
1866 | if test "$ac_init_help" = "long"; then | |
1867 | # Omit some internal or obsolete options to make the list less imposing. | |
1868 | # This message is too long to be a string in the A/UX 3.1 sh. | |
1869 | cat <<_ACEOF | |
1870 | \`configure' configures emacs 24.0.50 to adapt to many kinds of systems. | |
1871 | ||
1872 | Usage: $0 [OPTION]... [VAR=VALUE]... | |
1873 | ||
1874 | To assign environment variables (e.g., CC, CFLAGS...), specify them as | |
1875 | VAR=VALUE. See below for descriptions of some of the useful variables. | |
1876 | ||
1877 | Defaults for the options are specified in brackets. | |
1878 | ||
1879 | Configuration: | |
1880 | -h, --help display this help and exit | |
1881 | --help=short display options specific to this package | |
1882 | --help=recursive display the short help of all the included packages | |
1883 | -V, --version display version information and exit | |
5f64f7bd | 1884 | -q, --quiet, --silent do not print \`checking...' messages |
067d23c9 KY |
1885 | --cache-file=FILE cache test results in FILE [disabled] |
1886 | -C, --config-cache alias for \`--cache-file=config.cache' | |
1887 | -n, --no-create do not create output files | |
1888 | --srcdir=DIR find the sources in DIR [configure dir or \`..'] | |
1889 | ||
1890 | Installation directories: | |
1891 | --prefix=PREFIX install architecture-independent files in PREFIX | |
1892 | [$ac_default_prefix] | |
1893 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX | |
1894 | [PREFIX] | |
1895 | ||
1896 | By default, \`make install' will install all the files in | |
1897 | \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify | |
1898 | an installation prefix other than \`$ac_default_prefix' using \`--prefix', | |
1899 | for instance \`--prefix=\$HOME'. | |
1900 | ||
1901 | For better control, use the options below. | |
1902 | ||
1903 | Fine tuning of the installation directories: | |
1904 | --bindir=DIR user executables [EPREFIX/bin] | |
1905 | --sbindir=DIR system admin executables [EPREFIX/sbin] | |
1906 | --libexecdir=DIR program executables [EPREFIX/libexec] | |
1907 | --sysconfdir=DIR read-only single-machine data [PREFIX/etc] | |
1908 | --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] | |
1909 | --localstatedir=DIR modifiable single-machine data [PREFIX/var] | |
1910 | --libdir=DIR object code libraries [EPREFIX/lib] | |
1911 | --includedir=DIR C header files [PREFIX/include] | |
1912 | --oldincludedir=DIR C header files for non-gcc [/usr/include] | |
1913 | --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] | |
1914 | --datadir=DIR read-only architecture-independent data [DATAROOTDIR] | |
1915 | --infodir=DIR info documentation [DATAROOTDIR/info] | |
1916 | --localedir=DIR locale-dependent data [DATAROOTDIR/locale] | |
1917 | --mandir=DIR man documentation [DATAROOTDIR/man] | |
1918 | --docdir=DIR documentation root [DATAROOTDIR/doc/emacs] | |
1919 | --htmldir=DIR html documentation [DOCDIR] | |
1920 | --dvidir=DIR dvi documentation [DOCDIR] | |
1921 | --pdfdir=DIR pdf documentation [DOCDIR] | |
1922 | --psdir=DIR ps documentation [DOCDIR] | |
1923 | _ACEOF | |
1924 | ||
1925 | cat <<\_ACEOF | |
1926 | ||
1927 | Program names: | |
1928 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
1929 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
1930 | --program-transform-name=PROGRAM run sed PROGRAM on installed program names | |
1931 | ||
1932 | X features: | |
1933 | --x-includes=DIR X include files are in DIR | |
1934 | --x-libraries=DIR X library files are in DIR | |
1935 | ||
1936 | System types: | |
1937 | --build=BUILD configure for building on BUILD [guessed] | |
1938 | --host=HOST cross-compile to build programs to run on HOST [BUILD] | |
1939 | _ACEOF | |
1940 | fi | |
1941 | ||
1942 | if test -n "$ac_init_help"; then | |
1943 | case $ac_init_help in | |
1944 | short | recursive ) echo "Configuration of emacs 24.0.50:";; | |
1945 | esac | |
1946 | cat <<\_ACEOF | |
1947 | ||
1948 | Optional Features: | |
1949 | --disable-option-checking ignore unrecognized --enable/--with options | |
1950 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) | |
1951 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
1952 | --disable-ns-self-contained | |
1953 | disable self contained build under NeXTstep | |
1954 | --enable-asserts compile code with asserts enabled | |
2b7f7d99 GM |
1955 | --disable-maintainer-mode |
1956 | disable make rules and dependencies not useful (and | |
067d23c9 KY |
1957 | sometimes confusing) to the casual installer |
1958 | --enable-locallisppath=PATH | |
1959 | directories Emacs should search for lisp files | |
1960 | specific to this site | |
1961 | --enable-checking[=LIST] | |
1962 | enable expensive run-time checks. With LIST, enable | |
1963 | only specific categories of checks. Categories are: | |
1964 | all,yes,no. Flags are: stringbytes, stringoverrun, | |
1965 | stringfreelist, xmallocoverrun, conslist | |
1966 | --enable-use-lisp-union-type | |
1967 | use a union for the Lisp_Object data type. This is | |
1968 | only useful for development for catching certain | |
1969 | types of bugs. | |
1970 | --enable-profiling build emacs with profiling support. This might not | |
1971 | work on all platforms | |
1972 | --enable-autodepend automatically generate dependencies to .h-files. | |
1973 | Requires GNU Make and Gcc. Enabled if GNU Make and | |
1974 | Gcc is found | |
743c80a7 PE |
1975 | --disable-dependency-tracking speeds up one-time build |
1976 | --enable-dependency-tracking do not reject slow dependency extractors | |
067d23c9 KY |
1977 | --disable-largefile omit support for large files |
1978 | ||
1979 | Optional Packages: | |
1980 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
1981 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
1982 | --without-pop don't support POP mail retrieval with movemail | |
1983 | --with-kerberos support Kerberos-authenticated POP | |
1984 | --with-kerberos5 support Kerberos version 5 authenticated POP | |
1985 | --with-hesiod support Hesiod to get the POP server host | |
1986 | --with-mmdf support MMDF mailboxes | |
1987 | --with-mail-unlink unlink, rather than empty, mail spool after reading | |
1988 | --with-mailhost=HOSTNAME | |
1989 | string giving default POP mail host | |
1990 | --without-sound don't compile with sound support | |
1991 | --without-sync-input process async input synchronously | |
1992 | --with-x-toolkit=KIT use an X toolkit (KIT one of: yes or gtk, gtk3, | |
1993 | lucid or athena, motif, no) | |
0442dc7f | 1994 | --with-wide-int prefer wide Emacs integers (typically 62-bit) |
067d23c9 KY |
1995 | --without-xpm don't compile with XPM image support |
1996 | --without-jpeg don't compile with JPEG image support | |
1997 | --without-tiff don't compile with TIFF image support | |
1998 | --without-gif don't compile with GIF image support | |
1999 | --without-png don't compile with PNG image support | |
2000 | --without-rsvg don't compile with SVG image support | |
2001 | --without-xml2 don't compile with XML parsing support | |
2002 | --without-imagemagick don't compile with ImageMagick image support | |
2003 | --without-xft don't use XFT for anti aliased fonts | |
2004 | --without-libotf don't use libotf for OpenType font support | |
2005 | --without-m17n-flt don't use m17n-flt for text shaping | |
2006 | --without-toolkit-scroll-bars | |
2007 | don't use Motif or Xaw3d scroll bars | |
2008 | --without-xaw3d don't use Xaw3d | |
2009 | --without-xim don't use X11 XIM | |
7834125e | 2010 | --with-ns use NeXTstep (Cocoa or GNUstep) windowing system |
067d23c9 KY |
2011 | --without-gpm don't use -lgpm for mouse support on a GNU/Linux |
2012 | console | |
2013 | --without-dbus don't compile with D-Bus support | |
2014 | --without-gconf don't compile with GConf support | |
f527bd02 | 2015 | --without-gsettings don't compile with GSettings support |
067d23c9 KY |
2016 | --without-selinux don't compile with SELinux support |
2017 | --without-gnutls don't use -lgnutls for SSL/TLS support | |
2018 | --without-makeinfo don't require makeinfo for building manuals | |
2019 | --without-compress-info don't compress the installed Info pages | |
2020 | --with-pkg-config-prog=PATH | |
2021 | path to pkg-config for finding GTK and librsvg | |
2022 | --with-crt-dir=DIR directory containing crtn.o etc. The default is | |
2023 | /usr/lib, or /usr/lib64 on some platforms. | |
4fc5868a | 2024 | --with-gameuser=USER user for shared game score files |
067d23c9 KY |
2025 | --with-gnustep-conf=PATH |
2026 | path to GNUstep.conf; default $GNUSTEP_CONFIG_FILE, | |
2027 | or /etc/GNUstep/GNUstep.conf | |
2028 | --with-x use the X Window System | |
2029 | ||
2030 | Some influential environment variables: | |
2031 | CC C compiler command | |
2032 | CFLAGS C compiler flags | |
2033 | LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a | |
2034 | nonstandard directory <lib dir> | |
2035 | LIBS libraries to pass to the linker, e.g. -l<library> | |
2036 | CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if | |
2037 | you have headers in a nonstandard directory <include dir> | |
2038 | CPP C preprocessor | |
2039 | XMKMF Path to xmkmf, Makefile generator for X Window System | |
2040 | ||
2041 | Use these variables to override the choices made by `configure' or to help | |
2042 | it to find libraries and programs with nonstandard names/locations. | |
2043 | ||
2044 | Report bugs to the package provider. | |
2045 | _ACEOF | |
2046 | ac_status=$? | |
2047 | fi | |
2048 | ||
2049 | if test "$ac_init_help" = "recursive"; then | |
2050 | # If there are subdirs, report their specific --help. | |
2051 | for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue | |
2052 | test -d "$ac_dir" || | |
2053 | { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || | |
2054 | continue | |
2055 | ac_builddir=. | |
2056 | ||
2057 | case "$ac_dir" in | |
2058 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
2059 | *) | |
2060 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
2061 | # A ".." for each directory in $ac_dir_suffix. | |
2062 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
2063 | case $ac_top_builddir_sub in | |
2064 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
2065 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
2066 | esac ;; | |
2067 | esac | |
2068 | ac_abs_top_builddir=$ac_pwd | |
2069 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
2070 | # for backward compatibility: | |
2071 | ac_top_builddir=$ac_top_build_prefix | |
2072 | ||
2073 | case $srcdir in | |
2074 | .) # We are building in place. | |
2075 | ac_srcdir=. | |
2076 | ac_top_srcdir=$ac_top_builddir_sub | |
2077 | ac_abs_top_srcdir=$ac_pwd ;; | |
2078 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
2079 | ac_srcdir=$srcdir$ac_dir_suffix; | |
2080 | ac_top_srcdir=$srcdir | |
2081 | ac_abs_top_srcdir=$srcdir ;; | |
2082 | *) # Relative name. | |
2083 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
2084 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
2085 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
2086 | esac | |
2087 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix | |
2088 | ||
2089 | cd "$ac_dir" || { ac_status=$?; continue; } | |
2090 | # Check for guested configure. | |
2091 | if test -f "$ac_srcdir/configure.gnu"; then | |
2092 | echo && | |
2093 | $SHELL "$ac_srcdir/configure.gnu" --help=recursive | |
2094 | elif test -f "$ac_srcdir/configure"; then | |
2095 | echo && | |
2096 | $SHELL "$ac_srcdir/configure" --help=recursive | |
2097 | else | |
2098 | $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 | |
2099 | fi || ac_status=$? | |
2100 | cd "$ac_pwd" || { ac_status=$?; break; } | |
2101 | done | |
2102 | fi | |
2103 | ||
2104 | test -n "$ac_init_help" && exit $ac_status | |
2105 | if $ac_init_version; then | |
2106 | cat <<\_ACEOF | |
2107 | emacs configure 24.0.50 | |
5f64f7bd | 2108 | generated by GNU Autoconf 2.65 |
067d23c9 | 2109 | |
5f64f7bd | 2110 | Copyright (C) 2009 Free Software Foundation, Inc. |
067d23c9 KY |
2111 | This configure script is free software; the Free Software Foundation |
2112 | gives unlimited permission to copy, distribute and modify it. | |
2113 | _ACEOF | |
2114 | exit | |
2115 | fi | |
2116 | ||
2117 | ## ------------------------ ## | |
2118 | ## Autoconf initialization. ## | |
2119 | ## ------------------------ ## | |
2120 | ||
2121 | # ac_fn_c_try_compile LINENO | |
2122 | # -------------------------- | |
2123 | # Try to compile conftest.$ac_ext, and return whether this succeeded. | |
2124 | ac_fn_c_try_compile () | |
2125 | { | |
2126 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2127 | rm -f conftest.$ac_objext | |
2128 | if { { ac_try="$ac_compile" | |
2129 | case "(($ac_try" in | |
2130 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2131 | *) ac_try_echo=$ac_try;; | |
2132 | esac | |
2133 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
2134 | $as_echo "$ac_try_echo"; } >&5 | |
2135 | (eval "$ac_compile") 2>conftest.err | |
2136 | ac_status=$? | |
2137 | if test -s conftest.err; then | |
2138 | grep -v '^ *+' conftest.err >conftest.er1 | |
2139 | cat conftest.er1 >&5 | |
2140 | mv -f conftest.er1 conftest.err | |
2141 | fi | |
2142 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
2143 | test $ac_status = 0; } && { | |
2144 | test -z "$ac_c_werror_flag" || | |
2145 | test ! -s conftest.err | |
2146 | } && test -s conftest.$ac_objext; then : | |
2147 | ac_retval=0 | |
2148 | else | |
2149 | $as_echo "$as_me: failed program was:" >&5 | |
2150 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2151 | ||
2152 | ac_retval=1 | |
2153 | fi | |
5f64f7bd | 2154 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} |
067d23c9 KY |
2155 | as_fn_set_status $ac_retval |
2156 | ||
2157 | } # ac_fn_c_try_compile | |
2158 | ||
067d23c9 KY |
2159 | # ac_fn_c_try_cpp LINENO |
2160 | # ---------------------- | |
2161 | # Try to preprocess conftest.$ac_ext, and return whether this succeeded. | |
2162 | ac_fn_c_try_cpp () | |
2163 | { | |
2164 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2165 | if { { ac_try="$ac_cpp conftest.$ac_ext" | |
2166 | case "(($ac_try" in | |
2167 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2168 | *) ac_try_echo=$ac_try;; | |
2169 | esac | |
2170 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
2171 | $as_echo "$ac_try_echo"; } >&5 | |
2172 | (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err | |
2173 | ac_status=$? | |
2174 | if test -s conftest.err; then | |
2175 | grep -v '^ *+' conftest.err >conftest.er1 | |
2176 | cat conftest.er1 >&5 | |
2177 | mv -f conftest.er1 conftest.err | |
2178 | fi | |
2179 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
5f64f7bd | 2180 | test $ac_status = 0; } >/dev/null && { |
067d23c9 KY |
2181 | test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || |
2182 | test ! -s conftest.err | |
2183 | }; then : | |
2184 | ac_retval=0 | |
2185 | else | |
2186 | $as_echo "$as_me: failed program was:" >&5 | |
2187 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2188 | ||
2189 | ac_retval=1 | |
2190 | fi | |
5f64f7bd | 2191 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} |
067d23c9 KY |
2192 | as_fn_set_status $ac_retval |
2193 | ||
2194 | } # ac_fn_c_try_cpp | |
2195 | ||
2196 | # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES | |
2197 | # ------------------------------------------------------- | |
2198 | # Tests whether HEADER exists, giving a warning if it cannot be compiled using | |
2199 | # the include files in INCLUDES and setting the cache variable VAR | |
2200 | # accordingly. | |
2201 | ac_fn_c_check_header_mongrel () | |
2202 | { | |
2203 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
5f64f7bd | 2204 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : |
067d23c9 KY |
2205 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 |
2206 | $as_echo_n "checking for $2... " >&6; } | |
5f64f7bd | 2207 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : |
067d23c9 KY |
2208 | $as_echo_n "(cached) " >&6 |
2209 | fi | |
2210 | eval ac_res=\$$3 | |
2211 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2212 | $as_echo "$ac_res" >&6; } | |
2213 | else | |
2214 | # Is the header compilable? | |
2215 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 | |
2216 | $as_echo_n "checking $2 usability... " >&6; } | |
2217 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2218 | /* end confdefs.h. */ | |
2219 | $4 | |
2220 | #include <$2> | |
2221 | _ACEOF | |
2222 | if ac_fn_c_try_compile "$LINENO"; then : | |
2223 | ac_header_compiler=yes | |
2224 | else | |
2225 | ac_header_compiler=no | |
2226 | fi | |
2227 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2228 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 | |
2229 | $as_echo "$ac_header_compiler" >&6; } | |
2230 | ||
2231 | # Is the header present? | |
2232 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 | |
2233 | $as_echo_n "checking $2 presence... " >&6; } | |
2234 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2235 | /* end confdefs.h. */ | |
2236 | #include <$2> | |
2237 | _ACEOF | |
2238 | if ac_fn_c_try_cpp "$LINENO"; then : | |
2239 | ac_header_preproc=yes | |
2240 | else | |
2241 | ac_header_preproc=no | |
2242 | fi | |
5f64f7bd | 2243 | rm -f conftest.err conftest.$ac_ext |
067d23c9 KY |
2244 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 |
2245 | $as_echo "$ac_header_preproc" >&6; } | |
2246 | ||
2247 | # So? What about this header? | |
2248 | case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( | |
2249 | yes:no: ) | |
2250 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 | |
2251 | $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} | |
2252 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
2253 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
2254 | ;; | |
2255 | no:yes:* ) | |
2256 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 | |
2257 | $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} | |
2258 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 | |
2259 | $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} | |
2260 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 | |
2261 | $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} | |
2262 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 | |
2263 | $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} | |
2264 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
2265 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
2266 | ;; | |
2267 | esac | |
2268 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2269 | $as_echo_n "checking for $2... " >&6; } | |
5f64f7bd | 2270 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : |
067d23c9 KY |
2271 | $as_echo_n "(cached) " >&6 |
2272 | else | |
2273 | eval "$3=\$ac_header_compiler" | |
2274 | fi | |
2275 | eval ac_res=\$$3 | |
2276 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2277 | $as_echo "$ac_res" >&6; } | |
2278 | fi | |
5f64f7bd | 2279 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} |
067d23c9 KY |
2280 | |
2281 | } # ac_fn_c_check_header_mongrel | |
2282 | ||
2283 | # ac_fn_c_try_run LINENO | |
2284 | # ---------------------- | |
2285 | # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes | |
2286 | # that executables *can* be run. | |
2287 | ac_fn_c_try_run () | |
2288 | { | |
2289 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2290 | if { { ac_try="$ac_link" | |
2291 | case "(($ac_try" in | |
2292 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2293 | *) ac_try_echo=$ac_try;; | |
2294 | esac | |
2295 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
2296 | $as_echo "$ac_try_echo"; } >&5 | |
2297 | (eval "$ac_link") 2>&5 | |
2298 | ac_status=$? | |
2299 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
2300 | test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' | |
2301 | { { case "(($ac_try" in | |
2302 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2303 | *) ac_try_echo=$ac_try;; | |
2304 | esac | |
2305 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
2306 | $as_echo "$ac_try_echo"; } >&5 | |
2307 | (eval "$ac_try") 2>&5 | |
2308 | ac_status=$? | |
2309 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
2310 | test $ac_status = 0; }; }; then : | |
2311 | ac_retval=0 | |
2312 | else | |
2313 | $as_echo "$as_me: program exited with status $ac_status" >&5 | |
2314 | $as_echo "$as_me: failed program was:" >&5 | |
2315 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2316 | ||
2317 | ac_retval=$ac_status | |
2318 | fi | |
2319 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
5f64f7bd | 2320 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} |
067d23c9 KY |
2321 | as_fn_set_status $ac_retval |
2322 | ||
2323 | } # ac_fn_c_try_run | |
2324 | ||
2325 | # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES | |
2326 | # ------------------------------------------------------- | |
2327 | # Tests whether HEADER exists and can be compiled using the include files in | |
2328 | # INCLUDES, setting the cache variable VAR accordingly. | |
2329 | ac_fn_c_check_header_compile () | |
2330 | { | |
2331 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2332 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2333 | $as_echo_n "checking for $2... " >&6; } | |
5f64f7bd | 2334 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : |
067d23c9 KY |
2335 | $as_echo_n "(cached) " >&6 |
2336 | else | |
2337 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2338 | /* end confdefs.h. */ | |
2339 | $4 | |
2340 | #include <$2> | |
2341 | _ACEOF | |
2342 | if ac_fn_c_try_compile "$LINENO"; then : | |
2343 | eval "$3=yes" | |
2344 | else | |
2345 | eval "$3=no" | |
2346 | fi | |
2347 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2348 | fi | |
2349 | eval ac_res=\$$3 | |
2350 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2351 | $as_echo "$ac_res" >&6; } | |
5f64f7bd | 2352 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} |
067d23c9 KY |
2353 | |
2354 | } # ac_fn_c_check_header_compile | |
2355 | ||
1fd182f0 PE |
2356 | # ac_fn_c_try_link LINENO |
2357 | # ----------------------- | |
2358 | # Try to link conftest.$ac_ext, and return whether this succeeded. | |
2359 | ac_fn_c_try_link () | |
2360 | { | |
2361 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2362 | rm -f conftest.$ac_objext conftest$ac_exeext | |
2363 | if { { ac_try="$ac_link" | |
2364 | case "(($ac_try" in | |
2365 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2366 | *) ac_try_echo=$ac_try;; | |
2367 | esac | |
2368 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
2369 | $as_echo "$ac_try_echo"; } >&5 | |
2370 | (eval "$ac_link") 2>conftest.err | |
2371 | ac_status=$? | |
2372 | if test -s conftest.err; then | |
2373 | grep -v '^ *+' conftest.err >conftest.er1 | |
2374 | cat conftest.er1 >&5 | |
2375 | mv -f conftest.er1 conftest.err | |
2376 | fi | |
2377 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
2378 | test $ac_status = 0; } && { | |
2379 | test -z "$ac_c_werror_flag" || | |
2380 | test ! -s conftest.err | |
2381 | } && test -s conftest$ac_exeext && { | |
2382 | test "$cross_compiling" = yes || | |
2383 | $as_test_x conftest$ac_exeext | |
2384 | }; then : | |
2385 | ac_retval=0 | |
2386 | else | |
2387 | $as_echo "$as_me: failed program was:" >&5 | |
2388 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2389 | ||
2390 | ac_retval=1 | |
2391 | fi | |
2392 | # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information | |
2393 | # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would | |
2394 | # interfere with the next link command; also delete a directory that is | |
2395 | # left behind by Apple's compiler. We do this before executing the actions. | |
2396 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
5f64f7bd | 2397 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} |
1fd182f0 PE |
2398 | as_fn_set_status $ac_retval |
2399 | ||
2400 | } # ac_fn_c_try_link | |
2401 | ||
5f64f7bd GM |
2402 | # ac_fn_c_check_decl LINENO SYMBOL VAR |
2403 | # ------------------------------------ | |
2404 | # Tests whether SYMBOL is declared, setting cache variable VAR accordingly. | |
067d23c9 KY |
2405 | ac_fn_c_check_decl () |
2406 | { | |
2407 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
5f64f7bd GM |
2408 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5 |
2409 | $as_echo_n "checking whether $2 is declared... " >&6; } | |
2410 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
067d23c9 KY |
2411 | $as_echo_n "(cached) " >&6 |
2412 | else | |
2413 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2414 | /* end confdefs.h. */ | |
2415 | $4 | |
2416 | int | |
2417 | main () | |
2418 | { | |
5f64f7bd GM |
2419 | #ifndef $2 |
2420 | (void) $2; | |
067d23c9 KY |
2421 | #endif |
2422 | ||
2423 | ; | |
2424 | return 0; | |
2425 | } | |
2426 | _ACEOF | |
2427 | if ac_fn_c_try_compile "$LINENO"; then : | |
2428 | eval "$3=yes" | |
2429 | else | |
2430 | eval "$3=no" | |
2431 | fi | |
2432 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2433 | fi | |
2434 | eval ac_res=\$$3 | |
2435 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2436 | $as_echo "$ac_res" >&6; } | |
5f64f7bd | 2437 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} |
067d23c9 KY |
2438 | |
2439 | } # ac_fn_c_check_decl | |
2440 | ||
2441 | # ac_fn_c_check_header_preproc LINENO HEADER VAR | |
2442 | # ---------------------------------------------- | |
2443 | # Tests whether HEADER is present, setting the cache variable VAR accordingly. | |
2444 | ac_fn_c_check_header_preproc () | |
2445 | { | |
2446 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2447 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2448 | $as_echo_n "checking for $2... " >&6; } | |
5f64f7bd | 2449 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : |
067d23c9 KY |
2450 | $as_echo_n "(cached) " >&6 |
2451 | else | |
2452 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2453 | /* end confdefs.h. */ | |
2454 | #include <$2> | |
2455 | _ACEOF | |
2456 | if ac_fn_c_try_cpp "$LINENO"; then : | |
2457 | eval "$3=yes" | |
2458 | else | |
2459 | eval "$3=no" | |
2460 | fi | |
5f64f7bd | 2461 | rm -f conftest.err conftest.$ac_ext |
067d23c9 KY |
2462 | fi |
2463 | eval ac_res=\$$3 | |
2464 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2465 | $as_echo "$ac_res" >&6; } | |
5f64f7bd | 2466 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} |
067d23c9 KY |
2467 | |
2468 | } # ac_fn_c_check_header_preproc | |
2469 | ||
2470 | # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES | |
2471 | # ---------------------------------------------------- | |
2472 | # Tries to find if the field MEMBER exists in type AGGR, after including | |
2473 | # INCLUDES, setting cache variable VAR accordingly. | |
2474 | ac_fn_c_check_member () | |
2475 | { | |
2476 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2477 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 | |
2478 | $as_echo_n "checking for $2.$3... " >&6; } | |
5f64f7bd | 2479 | if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then : |
067d23c9 KY |
2480 | $as_echo_n "(cached) " >&6 |
2481 | else | |
2482 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2483 | /* end confdefs.h. */ | |
2484 | $5 | |
2485 | int | |
2486 | main () | |
2487 | { | |
2488 | static $2 ac_aggr; | |
2489 | if (ac_aggr.$3) | |
2490 | return 0; | |
2491 | ; | |
2492 | return 0; | |
2493 | } | |
2494 | _ACEOF | |
2495 | if ac_fn_c_try_compile "$LINENO"; then : | |
2496 | eval "$4=yes" | |
2497 | else | |
2498 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2499 | /* end confdefs.h. */ | |
2500 | $5 | |
2501 | int | |
2502 | main () | |
2503 | { | |
2504 | static $2 ac_aggr; | |
2505 | if (sizeof ac_aggr.$3) | |
2506 | return 0; | |
2507 | ; | |
2508 | return 0; | |
2509 | } | |
2510 | _ACEOF | |
2511 | if ac_fn_c_try_compile "$LINENO"; then : | |
2512 | eval "$4=yes" | |
2513 | else | |
2514 | eval "$4=no" | |
2515 | fi | |
2516 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2517 | fi | |
2518 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2519 | fi | |
2520 | eval ac_res=\$$4 | |
2521 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2522 | $as_echo "$ac_res" >&6; } | |
5f64f7bd | 2523 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} |
067d23c9 KY |
2524 | |
2525 | } # ac_fn_c_check_member | |
2526 | ||
2527 | # ac_fn_c_check_func LINENO FUNC VAR | |
2528 | # ---------------------------------- | |
2529 | # Tests whether FUNC exists, setting the cache variable VAR accordingly | |
2530 | ac_fn_c_check_func () | |
2531 | { | |
2532 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2533 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2534 | $as_echo_n "checking for $2... " >&6; } | |
5f64f7bd | 2535 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : |
067d23c9 KY |
2536 | $as_echo_n "(cached) " >&6 |
2537 | else | |
2538 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2539 | /* end confdefs.h. */ | |
2540 | /* Define $2 to an innocuous variant, in case <limits.h> declares $2. | |
2541 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
2542 | #define $2 innocuous_$2 | |
2543 | ||
2544 | /* System header to define __stub macros and hopefully few prototypes, | |
2545 | which can conflict with char $2 (); below. | |
2546 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
2547 | <limits.h> exists even on freestanding compilers. */ | |
2548 | ||
2549 | #ifdef __STDC__ | |
2550 | # include <limits.h> | |
2551 | #else | |
2552 | # include <assert.h> | |
2553 | #endif | |
2554 | ||
2555 | #undef $2 | |
2556 | ||
2557 | /* Override any GCC internal prototype to avoid an error. | |
2558 | Use char because int might match the return type of a GCC | |
2559 | builtin and then its argument prototype would still apply. */ | |
2560 | #ifdef __cplusplus | |
2561 | extern "C" | |
2562 | #endif | |
2563 | char $2 (); | |
2564 | /* The GNU C library defines this for functions which it implements | |
2565 | to always fail with ENOSYS. Some functions are actually named | |
2566 | something starting with __ and the normal name is an alias. */ | |
2567 | #if defined __stub_$2 || defined __stub___$2 | |
2568 | choke me | |
2569 | #endif | |
2570 | ||
2571 | int | |
2572 | main () | |
2573 | { | |
2574 | return $2 (); | |
2575 | ; | |
2576 | return 0; | |
2577 | } | |
2578 | _ACEOF | |
2579 | if ac_fn_c_try_link "$LINENO"; then : | |
2580 | eval "$3=yes" | |
2581 | else | |
2582 | eval "$3=no" | |
2583 | fi | |
2584 | rm -f core conftest.err conftest.$ac_objext \ | |
2585 | conftest$ac_exeext conftest.$ac_ext | |
2586 | fi | |
2587 | eval ac_res=\$$3 | |
2588 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2589 | $as_echo "$ac_res" >&6; } | |
5f64f7bd | 2590 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} |
067d23c9 KY |
2591 | |
2592 | } # ac_fn_c_check_func | |
2593 | ||
3e0be4ab GM |
2594 | # ac_fn_c_check_type LINENO TYPE VAR INCLUDES |
2595 | # ------------------------------------------- | |
2596 | # Tests whether TYPE exists after having included INCLUDES, setting cache | |
2597 | # variable VAR accordingly. | |
2598 | ac_fn_c_check_type () | |
2599 | { | |
2600 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2601 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2602 | $as_echo_n "checking for $2... " >&6; } | |
2603 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
2604 | $as_echo_n "(cached) " >&6 | |
2605 | else | |
2606 | eval "$3=no" | |
2607 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2608 | /* end confdefs.h. */ | |
2609 | $4 | |
2610 | int | |
2611 | main () | |
2612 | { | |
2613 | if (sizeof ($2)) | |
2614 | return 0; | |
2615 | ; | |
2616 | return 0; | |
2617 | } | |
2618 | _ACEOF | |
2619 | if ac_fn_c_try_compile "$LINENO"; then : | |
2620 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2621 | /* end confdefs.h. */ | |
2622 | $4 | |
2623 | int | |
2624 | main () | |
2625 | { | |
2626 | if (sizeof (($2))) | |
2627 | return 0; | |
2628 | ; | |
2629 | return 0; | |
2630 | } | |
2631 | _ACEOF | |
2632 | if ac_fn_c_try_compile "$LINENO"; then : | |
2633 | ||
2634 | else | |
2635 | eval "$3=yes" | |
2636 | fi | |
2637 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2638 | fi | |
2639 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2640 | fi | |
2641 | eval ac_res=\$$3 | |
2642 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2643 | $as_echo "$ac_res" >&6; } | |
2644 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2645 | ||
2646 | } # ac_fn_c_check_type | |
2647 | ||
5f90be1b PE |
2648 | # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES |
2649 | # -------------------------------------------- | |
2650 | # Tries to find the compile-time value of EXPR in a program that includes | |
2651 | # INCLUDES, setting VAR accordingly. Returns whether the value could be | |
2652 | # computed | |
2653 | ac_fn_c_compute_int () | |
2654 | { | |
2655 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2656 | if test "$cross_compiling" = yes; then | |
2657 | # Depending upon the size, compute the lo and hi bounds. | |
2658 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2659 | /* end confdefs.h. */ | |
2660 | $4 | |
2661 | int | |
2662 | main () | |
2663 | { | |
2664 | static int test_array [1 - 2 * !(($2) >= 0)]; | |
2665 | test_array [0] = 0 | |
2666 | ||
2667 | ; | |
2668 | return 0; | |
2669 | } | |
2670 | _ACEOF | |
2671 | if ac_fn_c_try_compile "$LINENO"; then : | |
2672 | ac_lo=0 ac_mid=0 | |
2673 | while :; do | |
2674 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2675 | /* end confdefs.h. */ | |
2676 | $4 | |
2677 | int | |
2678 | main () | |
2679 | { | |
2680 | static int test_array [1 - 2 * !(($2) <= $ac_mid)]; | |
2681 | test_array [0] = 0 | |
2682 | ||
2683 | ; | |
2684 | return 0; | |
2685 | } | |
2686 | _ACEOF | |
2687 | if ac_fn_c_try_compile "$LINENO"; then : | |
2688 | ac_hi=$ac_mid; break | |
2689 | else | |
2690 | as_fn_arith $ac_mid + 1 && ac_lo=$as_val | |
2691 | if test $ac_lo -le $ac_mid; then | |
2692 | ac_lo= ac_hi= | |
2693 | break | |
2694 | fi | |
2695 | as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val | |
2696 | fi | |
2697 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2698 | done | |
2699 | else | |
2700 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2701 | /* end confdefs.h. */ | |
2702 | $4 | |
2703 | int | |
2704 | main () | |
2705 | { | |
2706 | static int test_array [1 - 2 * !(($2) < 0)]; | |
2707 | test_array [0] = 0 | |
2708 | ||
2709 | ; | |
2710 | return 0; | |
2711 | } | |
2712 | _ACEOF | |
2713 | if ac_fn_c_try_compile "$LINENO"; then : | |
2714 | ac_hi=-1 ac_mid=-1 | |
2715 | while :; do | |
2716 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2717 | /* end confdefs.h. */ | |
2718 | $4 | |
2719 | int | |
2720 | main () | |
2721 | { | |
2722 | static int test_array [1 - 2 * !(($2) >= $ac_mid)]; | |
2723 | test_array [0] = 0 | |
2724 | ||
2725 | ; | |
2726 | return 0; | |
2727 | } | |
2728 | _ACEOF | |
2729 | if ac_fn_c_try_compile "$LINENO"; then : | |
2730 | ac_lo=$ac_mid; break | |
2731 | else | |
2732 | as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val | |
2733 | if test $ac_mid -le $ac_hi; then | |
2734 | ac_lo= ac_hi= | |
2735 | break | |
2736 | fi | |
2737 | as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val | |
2738 | fi | |
2739 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2740 | done | |
2741 | else | |
2742 | ac_lo= ac_hi= | |
2743 | fi | |
2744 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2745 | fi | |
2746 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2747 | # Binary search between lo and hi bounds. | |
2748 | while test "x$ac_lo" != "x$ac_hi"; do | |
2749 | as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val | |
2750 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2751 | /* end confdefs.h. */ | |
2752 | $4 | |
2753 | int | |
2754 | main () | |
2755 | { | |
2756 | static int test_array [1 - 2 * !(($2) <= $ac_mid)]; | |
2757 | test_array [0] = 0 | |
2758 | ||
2759 | ; | |
2760 | return 0; | |
2761 | } | |
2762 | _ACEOF | |
2763 | if ac_fn_c_try_compile "$LINENO"; then : | |
2764 | ac_hi=$ac_mid | |
2765 | else | |
2766 | as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val | |
2767 | fi | |
2768 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2769 | done | |
2770 | case $ac_lo in #(( | |
2771 | ?*) eval "$3=\$ac_lo"; ac_retval=0 ;; | |
2772 | '') ac_retval=1 ;; | |
2773 | esac | |
2774 | else | |
2775 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2776 | /* end confdefs.h. */ | |
2777 | $4 | |
2778 | static long int longval () { return $2; } | |
2779 | static unsigned long int ulongval () { return $2; } | |
2780 | #include <stdio.h> | |
2781 | #include <stdlib.h> | |
2782 | int | |
2783 | main () | |
2784 | { | |
2785 | ||
2786 | FILE *f = fopen ("conftest.val", "w"); | |
2787 | if (! f) | |
2788 | return 1; | |
2789 | if (($2) < 0) | |
2790 | { | |
2791 | long int i = longval (); | |
2792 | if (i != ($2)) | |
2793 | return 1; | |
2794 | fprintf (f, "%ld", i); | |
2795 | } | |
2796 | else | |
2797 | { | |
2798 | unsigned long int i = ulongval (); | |
2799 | if (i != ($2)) | |
2800 | return 1; | |
2801 | fprintf (f, "%lu", i); | |
2802 | } | |
2803 | /* Do not output a trailing newline, as this causes \r\n confusion | |
2804 | on some platforms. */ | |
2805 | return ferror (f) || fclose (f) != 0; | |
2806 | ||
2807 | ; | |
2808 | return 0; | |
2809 | } | |
2810 | _ACEOF | |
2811 | if ac_fn_c_try_run "$LINENO"; then : | |
2812 | echo >>conftest.val; read $3 <conftest.val; ac_retval=0 | |
2813 | else | |
2814 | ac_retval=1 | |
2815 | fi | |
2816 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
2817 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
2818 | rm -f conftest.val | |
2819 | ||
2820 | fi | |
5f64f7bd | 2821 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} |
5f90be1b PE |
2822 | as_fn_set_status $ac_retval |
2823 | ||
2824 | } # ac_fn_c_compute_int | |
067d23c9 KY |
2825 | cat >config.log <<_ACEOF |
2826 | This file contains any messages produced by compilers while | |
2827 | running configure, to aid debugging if configure makes a mistake. | |
2828 | ||
2829 | It was created by emacs $as_me 24.0.50, which was | |
5f64f7bd | 2830 | generated by GNU Autoconf 2.65. Invocation command line was |
067d23c9 KY |
2831 | |
2832 | $ $0 $@ | |
2833 | ||
2834 | _ACEOF | |
2835 | exec 5>>config.log | |
2836 | { | |
2837 | cat <<_ASUNAME | |
2838 | ## --------- ## | |
2839 | ## Platform. ## | |
2840 | ## --------- ## | |
2841 | ||
2842 | hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` | |
2843 | uname -m = `(uname -m) 2>/dev/null || echo unknown` | |
2844 | uname -r = `(uname -r) 2>/dev/null || echo unknown` | |
2845 | uname -s = `(uname -s) 2>/dev/null || echo unknown` | |
2846 | uname -v = `(uname -v) 2>/dev/null || echo unknown` | |
2847 | ||
2848 | /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` | |
2849 | /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` | |
2850 | ||
2851 | /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` | |
2852 | /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` | |
2853 | /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` | |
2854 | /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` | |
2855 | /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` | |
2856 | /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` | |
2857 | /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` | |
2858 | ||
2859 | _ASUNAME | |
2860 | ||
2861 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2862 | for as_dir in $PATH | |
2863 | do | |
2864 | IFS=$as_save_IFS | |
2865 | test -z "$as_dir" && as_dir=. | |
2866 | $as_echo "PATH: $as_dir" | |
2867 | done | |
2868 | IFS=$as_save_IFS | |
2869 | ||
2870 | } >&5 | |
2871 | ||
2872 | cat >&5 <<_ACEOF | |
2873 | ||
2874 | ||
2875 | ## ----------- ## | |
2876 | ## Core tests. ## | |
2877 | ## ----------- ## | |
2878 | ||
2879 | _ACEOF | |
2880 | ||
2881 | ||
2882 | # Keep a trace of the command line. | |
2883 | # Strip out --no-create and --no-recursion so they do not pile up. | |
2884 | # Strip out --silent because we don't want to record it for future runs. | |
2885 | # Also quote any args containing shell meta-characters. | |
2886 | # Make two passes to allow for proper duplicate-argument suppression. | |
2887 | ac_configure_args= | |
2888 | ac_configure_args0= | |
2889 | ac_configure_args1= | |
2890 | ac_must_keep_next=false | |
2891 | for ac_pass in 1 2 | |
2892 | do | |
2893 | for ac_arg | |
2894 | do | |
2895 | case $ac_arg in | |
2896 | -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; | |
2897 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
2898 | | -silent | --silent | --silen | --sile | --sil) | |
2899 | continue ;; | |
2900 | *\'*) | |
2901 | ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
2902 | esac | |
2903 | case $ac_pass in | |
2904 | 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; | |
2905 | 2) | |
2906 | as_fn_append ac_configure_args1 " '$ac_arg'" | |
2907 | if test $ac_must_keep_next = true; then | |
2908 | ac_must_keep_next=false # Got value, back to normal. | |
2909 | else | |
2910 | case $ac_arg in | |
2911 | *=* | --config-cache | -C | -disable-* | --disable-* \ | |
2912 | | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | |
2913 | | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | |
2914 | | -with-* | --with-* | -without-* | --without-* | --x) | |
2915 | case "$ac_configure_args0 " in | |
2916 | "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; | |
2917 | esac | |
2918 | ;; | |
2919 | -* ) ac_must_keep_next=true ;; | |
2920 | esac | |
2921 | fi | |
2922 | as_fn_append ac_configure_args " '$ac_arg'" | |
2923 | ;; | |
2924 | esac | |
2925 | done | |
2926 | done | |
2927 | { ac_configure_args0=; unset ac_configure_args0;} | |
2928 | { ac_configure_args1=; unset ac_configure_args1;} | |
2929 | ||
2930 | # When interrupted or exit'd, cleanup temporary files, and complete | |
2931 | # config.log. We remove comments because anyway the quotes in there | |
2932 | # would cause problems or look ugly. | |
2933 | # WARNING: Use '\'' to represent an apostrophe within the trap. | |
2934 | # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. | |
2935 | trap 'exit_status=$? | |
2936 | # Save into config.log some information that might help in debugging. | |
2937 | { | |
2938 | echo | |
2939 | ||
5f64f7bd GM |
2940 | cat <<\_ASBOX |
2941 | ## ---------------- ## | |
067d23c9 | 2942 | ## Cache variables. ## |
5f64f7bd GM |
2943 | ## ---------------- ## |
2944 | _ASBOX | |
067d23c9 KY |
2945 | echo |
2946 | # The following way of writing the cache mishandles newlines in values, | |
2947 | ( | |
2948 | for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do | |
2949 | eval ac_val=\$$ac_var | |
2950 | case $ac_val in #( | |
2951 | *${as_nl}*) | |
2952 | case $ac_var in #( | |
2953 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
2954 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
2955 | esac | |
2956 | case $ac_var in #( | |
2957 | _ | IFS | as_nl) ;; #( | |
2958 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
2959 | *) { eval $ac_var=; unset $ac_var;} ;; | |
2960 | esac ;; | |
2961 | esac | |
2962 | done | |
2963 | (set) 2>&1 | | |
2964 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( | |
2965 | *${as_nl}ac_space=\ *) | |
2966 | sed -n \ | |
2967 | "s/'\''/'\''\\\\'\'''\''/g; | |
2968 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" | |
2969 | ;; #( | |
2970 | *) | |
2971 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" | |
2972 | ;; | |
2973 | esac | | |
2974 | sort | |
2975 | ) | |
2976 | echo | |
2977 | ||
5f64f7bd GM |
2978 | cat <<\_ASBOX |
2979 | ## ----------------- ## | |
067d23c9 | 2980 | ## Output variables. ## |
5f64f7bd GM |
2981 | ## ----------------- ## |
2982 | _ASBOX | |
067d23c9 KY |
2983 | echo |
2984 | for ac_var in $ac_subst_vars | |
2985 | do | |
2986 | eval ac_val=\$$ac_var | |
2987 | case $ac_val in | |
2988 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
2989 | esac | |
2990 | $as_echo "$ac_var='\''$ac_val'\''" | |
2991 | done | sort | |
2992 | echo | |
2993 | ||
2994 | if test -n "$ac_subst_files"; then | |
5f64f7bd GM |
2995 | cat <<\_ASBOX |
2996 | ## ------------------- ## | |
067d23c9 | 2997 | ## File substitutions. ## |
5f64f7bd GM |
2998 | ## ------------------- ## |
2999 | _ASBOX | |
067d23c9 KY |
3000 | echo |
3001 | for ac_var in $ac_subst_files | |
3002 | do | |
3003 | eval ac_val=\$$ac_var | |
3004 | case $ac_val in | |
3005 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
3006 | esac | |
3007 | $as_echo "$ac_var='\''$ac_val'\''" | |
3008 | done | sort | |
3009 | echo | |
3010 | fi | |
3011 | ||
3012 | if test -s confdefs.h; then | |
5f64f7bd GM |
3013 | cat <<\_ASBOX |
3014 | ## ----------- ## | |
067d23c9 | 3015 | ## confdefs.h. ## |
5f64f7bd GM |
3016 | ## ----------- ## |
3017 | _ASBOX | |
067d23c9 KY |
3018 | echo |
3019 | cat confdefs.h | |
3020 | echo | |
3021 | fi | |
3022 | test "$ac_signal" != 0 && | |
3023 | $as_echo "$as_me: caught signal $ac_signal" | |
3024 | $as_echo "$as_me: exit $exit_status" | |
3025 | } >&5 | |
3026 | rm -f core *.core core.conftest.* && | |
3027 | rm -f -r conftest* confdefs* conf$$* $ac_clean_files && | |
3028 | exit $exit_status | |
3029 | ' 0 | |
3030 | for ac_signal in 1 2 13 15; do | |
3031 | trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal | |
3032 | done | |
3033 | ac_signal=0 | |
3034 | ||
3035 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
3036 | rm -f -r conftest* confdefs.h | |
3037 | ||
3038 | $as_echo "/* confdefs.h */" > confdefs.h | |
3039 | ||
3040 | # Predefined preprocessor variables. | |
3041 | ||
3042 | cat >>confdefs.h <<_ACEOF | |
3043 | #define PACKAGE_NAME "$PACKAGE_NAME" | |
3044 | _ACEOF | |
3045 | ||
3046 | cat >>confdefs.h <<_ACEOF | |
3047 | #define PACKAGE_TARNAME "$PACKAGE_TARNAME" | |
3048 | _ACEOF | |
3049 | ||
3050 | cat >>confdefs.h <<_ACEOF | |
3051 | #define PACKAGE_VERSION "$PACKAGE_VERSION" | |
3052 | _ACEOF | |
3053 | ||
3054 | cat >>confdefs.h <<_ACEOF | |
3055 | #define PACKAGE_STRING "$PACKAGE_STRING" | |
3056 | _ACEOF | |
3057 | ||
3058 | cat >>confdefs.h <<_ACEOF | |
3059 | #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" | |
3060 | _ACEOF | |
3061 | ||
3062 | cat >>confdefs.h <<_ACEOF | |
3063 | #define PACKAGE_URL "$PACKAGE_URL" | |
3064 | _ACEOF | |
3065 | ||
3066 | ||
3067 | # Let the site file select an alternate cache file if it wants to. | |
3068 | # Prefer an explicitly selected file to automatically selected ones. | |
3069 | ac_site_file1=NONE | |
3070 | ac_site_file2=NONE | |
3071 | if test -n "$CONFIG_SITE"; then | |
5f64f7bd | 3072 | ac_site_file1=$CONFIG_SITE |
067d23c9 KY |
3073 | elif test "x$prefix" != xNONE; then |
3074 | ac_site_file1=$prefix/share/config.site | |
3075 | ac_site_file2=$prefix/etc/config.site | |
3076 | else | |
3077 | ac_site_file1=$ac_default_prefix/share/config.site | |
3078 | ac_site_file2=$ac_default_prefix/etc/config.site | |
3079 | fi | |
3080 | for ac_site_file in "$ac_site_file1" "$ac_site_file2" | |
3081 | do | |
3082 | test "x$ac_site_file" = xNONE && continue | |
3083 | if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then | |
3084 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 | |
3085 | $as_echo "$as_me: loading site script $ac_site_file" >&6;} | |
3086 | sed 's/^/| /' "$ac_site_file" >&5 | |
5f64f7bd | 3087 | . "$ac_site_file" |
067d23c9 KY |
3088 | fi |
3089 | done | |
3090 | ||
3091 | if test -r "$cache_file"; then | |
3092 | # Some versions of bash will fail to source /dev/null (special files | |
3093 | # actually), so we avoid doing that. DJGPP emulates it as a regular file. | |
3094 | if test /dev/null != "$cache_file" && test -f "$cache_file"; then | |
3095 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 | |
3096 | $as_echo "$as_me: loading cache $cache_file" >&6;} | |
3097 | case $cache_file in | |
3098 | [\\/]* | ?:[\\/]* ) . "$cache_file";; | |
3099 | *) . "./$cache_file";; | |
3100 | esac | |
3101 | fi | |
3102 | else | |
3103 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 | |
3104 | $as_echo "$as_me: creating cache $cache_file" >&6;} | |
3105 | >$cache_file | |
3106 | fi | |
3107 | ||
3108 | as_fn_append ac_header_list " stdlib.h" | |
3109 | as_fn_append ac_header_list " unistd.h" | |
3110 | as_fn_append ac_header_list " sys/param.h" | |
6c051bab | 3111 | as_fn_append ac_func_list " readlinkat" |
7d2a1c5e | 3112 | as_fn_append ac_func_list " dup2" |
e275c824 PE |
3113 | gl_getopt_required=GNU |
3114 | as_fn_append ac_header_list " getopt.h" | |
4fda9c95 GM |
3115 | as_fn_append ac_header_list " wchar.h" |
3116 | as_fn_append ac_header_list " stdint.h" | |
3117 | as_fn_append ac_header_list " inttypes.h" | |
ae0d7250 | 3118 | as_fn_append ac_func_list " lstat" |
067d23c9 | 3119 | as_fn_append ac_func_list " alarm" |
3e0be4ab | 3120 | as_fn_append ac_func_list " pthread_sigmask" |
ae0d7250 | 3121 | as_fn_append ac_func_list " readlink" |
6ad6792b | 3122 | as_fn_append ac_header_list " sys/socket.h" |
16c3e636 | 3123 | as_fn_append ac_func_list " tzset" |
ae0d7250 | 3124 | as_fn_append ac_func_list " symlink" |
5fa4ac76 | 3125 | as_fn_append ac_header_list " sys/stat.h" |
1fd182f0 PE |
3126 | as_fn_append ac_header_list " sys/time.h" |
3127 | as_fn_append ac_func_list " localtime_r" | |
067d23c9 KY |
3128 | # Check that the precious variables saved in the cache have kept the same |
3129 | # value. | |
3130 | ac_cache_corrupted=false | |
3131 | for ac_var in $ac_precious_vars; do | |
3132 | eval ac_old_set=\$ac_cv_env_${ac_var}_set | |
3133 | eval ac_new_set=\$ac_env_${ac_var}_set | |
3134 | eval ac_old_val=\$ac_cv_env_${ac_var}_value | |
3135 | eval ac_new_val=\$ac_env_${ac_var}_value | |
3136 | case $ac_old_set,$ac_new_set in | |
3137 | set,) | |
3138 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 | |
3139 | $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} | |
3140 | ac_cache_corrupted=: ;; | |
3141 | ,set) | |
3142 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 | |
3143 | $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} | |
3144 | ac_cache_corrupted=: ;; | |
3145 | ,);; | |
3146 | *) | |
3147 | if test "x$ac_old_val" != "x$ac_new_val"; then | |
3148 | # differences in whitespace do not lead to failure. | |
3149 | ac_old_val_w=`echo x $ac_old_val` | |
3150 | ac_new_val_w=`echo x $ac_new_val` | |
3151 | if test "$ac_old_val_w" != "$ac_new_val_w"; then | |
3152 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 | |
3153 | $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} | |
3154 | ac_cache_corrupted=: | |
3155 | else | |
3156 | { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 | |
3157 | $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} | |
3158 | eval $ac_var=\$ac_old_val | |
3159 | fi | |
3160 | { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 | |
3161 | $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} | |
3162 | { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 | |
3163 | $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} | |
3164 | fi;; | |
3165 | esac | |
3166 | # Pass precious variables to config.status. | |
3167 | if test "$ac_new_set" = set; then | |
3168 | case $ac_new_val in | |
3169 | *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; | |
3170 | *) ac_arg=$ac_var=$ac_new_val ;; | |
3171 | esac | |
3172 | case " $ac_configure_args " in | |
3173 | *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. | |
3174 | *) as_fn_append ac_configure_args " '$ac_arg'" ;; | |
3175 | esac | |
3176 | fi | |
3177 | done | |
3178 | if $ac_cache_corrupted; then | |
3179 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
3180 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3181 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 | |
3182 | $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} | |
5f64f7bd | 3183 | as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 |
067d23c9 KY |
3184 | fi |
3185 | ## -------------------- ## | |
3186 | ## Main body of script. ## | |
3187 | ## -------------------- ## | |
3188 | ||
3189 | ac_ext=c | |
3190 | ac_cpp='$CPP $CPPFLAGS' | |
3191 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3192 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3193 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
3194 | ||
3195 | ||
3196 | ac_config_headers="$ac_config_headers src/config.h:src/config.in" | |
3197 | ||
3198 | ||
743c80a7 | 3199 | am__api_version='1.11' |
067d23c9 | 3200 | |
743c80a7 PE |
3201 | ac_aux_dir= |
3202 | for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do | |
5f64f7bd GM |
3203 | for ac_t in install-sh install.sh shtool; do |
3204 | if test -f "$ac_dir/$ac_t"; then | |
3205 | ac_aux_dir=$ac_dir | |
3206 | ac_install_sh="$ac_aux_dir/$ac_t -c" | |
3207 | break 2 | |
3208 | fi | |
3209 | done | |
743c80a7 PE |
3210 | done |
3211 | if test -z "$ac_aux_dir"; then | |
5f64f7bd | 3212 | as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 |
743c80a7 | 3213 | fi |
067d23c9 | 3214 | |
743c80a7 PE |
3215 | # These three variables are undocumented and unsupported, |
3216 | # and are intended to be withdrawn in a future Autoconf release. | |
3217 | # They can cause serious problems if a builder's source tree is in a directory | |
3218 | # whose full name contains unusual characters. | |
3219 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. | |
3220 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. | |
3221 | ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. | |
067d23c9 | 3222 | |
067d23c9 | 3223 | |
743c80a7 PE |
3224 | # Find a good install program. We prefer a C program (faster), |
3225 | # so one script is as good as another. But avoid the broken or | |
3226 | # incompatible versions: | |
3227 | # SysV /etc/install, /usr/sbin/install | |
3228 | # SunOS /usr/etc/install | |
3229 | # IRIX /sbin/install | |
3230 | # AIX /bin/install | |
3231 | # AmigaOS /C/install, which installs bootblocks on floppy discs | |
3232 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag | |
3233 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
3234 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
3235 | # OS/2's system install, which has a completely different semantic | |
3236 | # ./install, which can be erroneously created by make from ./install.sh. | |
3237 | # Reject install programs that cannot install multiple files. | |
3238 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 | |
3239 | $as_echo_n "checking for a BSD-compatible install... " >&6; } | |
3240 | if test -z "$INSTALL"; then | |
5f64f7bd | 3241 | if test "${ac_cv_path_install+set}" = set; then : |
743c80a7 PE |
3242 | $as_echo_n "(cached) " >&6 |
3243 | else | |
3244 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3245 | for as_dir in $PATH | |
3246 | do | |
3247 | IFS=$as_save_IFS | |
3248 | test -z "$as_dir" && as_dir=. | |
3249 | # Account for people who put trailing slashes in PATH elements. | |
3250 | case $as_dir/ in #(( | |
3251 | ./ | .// | /[cC]/* | \ | |
3252 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ | |
3253 | ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ | |
3254 | /usr/ucb/* ) ;; | |
3255 | *) | |
3256 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
3257 | # Don't use installbsd from OSF since it installs stuff as root | |
3258 | # by default. | |
3259 | for ac_prog in ginstall scoinst install; do | |
3260 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3261 | if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then | |
3262 | if test $ac_prog = install && | |
3263 | grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
3264 | # AIX install. It has an incompatible calling convention. | |
3265 | : | |
3266 | elif test $ac_prog = install && | |
3267 | grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
3268 | # program-specific install script used by HP pwplus--don't use. | |
3269 | : | |
3270 | else | |
3271 | rm -rf conftest.one conftest.two conftest.dir | |
3272 | echo one > conftest.one | |
3273 | echo two > conftest.two | |
3274 | mkdir conftest.dir | |
3275 | if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && | |
3276 | test -s conftest.one && test -s conftest.two && | |
3277 | test -s conftest.dir/conftest.one && | |
3278 | test -s conftest.dir/conftest.two | |
3279 | then | |
3280 | ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" | |
3281 | break 3 | |
3282 | fi | |
3283 | fi | |
3284 | fi | |
3285 | done | |
3286 | done | |
3287 | ;; | |
3288 | esac | |
067d23c9 | 3289 | |
743c80a7 PE |
3290 | done |
3291 | IFS=$as_save_IFS | |
067d23c9 | 3292 | |
743c80a7 | 3293 | rm -rf conftest.one conftest.two conftest.dir |
067d23c9 | 3294 | |
067d23c9 | 3295 | fi |
743c80a7 PE |
3296 | if test "${ac_cv_path_install+set}" = set; then |
3297 | INSTALL=$ac_cv_path_install | |
3298 | else | |
3299 | # As a last resort, use the slow shell script. Don't cache a | |
3300 | # value for INSTALL within a source directory, because that will | |
3301 | # break other packages using the cache if that directory is | |
3302 | # removed, or if the value is a relative name. | |
3303 | INSTALL=$ac_install_sh | |
3304 | fi | |
067d23c9 | 3305 | fi |
743c80a7 PE |
3306 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 |
3307 | $as_echo "$INSTALL" >&6; } | |
067d23c9 | 3308 | |
743c80a7 PE |
3309 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. |
3310 | # It thinks the first close brace ends the variable substitution. | |
3311 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
067d23c9 | 3312 | |
743c80a7 | 3313 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' |
067d23c9 | 3314 | |
743c80a7 | 3315 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' |
067d23c9 | 3316 | |
743c80a7 PE |
3317 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 |
3318 | $as_echo_n "checking whether build environment is sane... " >&6; } | |
3319 | # Just in case | |
3320 | sleep 1 | |
3321 | echo timestamp > conftest.file | |
3322 | # Reject unsafe characters in $srcdir or the absolute working directory | |
3323 | # name. Accept space and tab only in the latter. | |
3324 | am_lf=' | |
3325 | ' | |
3326 | case `pwd` in | |
3327 | *[\\\"\#\$\&\'\`$am_lf]*) | |
5f64f7bd | 3328 | as_fn_error "unsafe absolute working directory name" "$LINENO" 5;; |
743c80a7 PE |
3329 | esac |
3330 | case $srcdir in | |
3331 | *[\\\"\#\$\&\'\`$am_lf\ \ ]*) | |
5f64f7bd | 3332 | as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; |
743c80a7 | 3333 | esac |
067d23c9 | 3334 | |
743c80a7 PE |
3335 | # Do `set' in a subshell so we don't clobber the current shell's |
3336 | # arguments. Must try -L first in case configure is actually a | |
3337 | # symlink; some systems play weird games with the mod time of symlinks | |
3338 | # (eg FreeBSD returns the mod time of the symlink's containing | |
3339 | # directory). | |
3340 | if ( | |
3341 | set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` | |
3342 | if test "$*" = "X"; then | |
3343 | # -L didn't work. | |
3344 | set X `ls -t "$srcdir/configure" conftest.file` | |
3345 | fi | |
3346 | rm -f conftest.file | |
3347 | if test "$*" != "X $srcdir/configure conftest.file" \ | |
3348 | && test "$*" != "X conftest.file $srcdir/configure"; then | |
3349 | ||
3350 | # If neither matched, then we have a broken ls. This can happen | |
3351 | # if, for instance, CONFIG_SHELL is bash and it inherits a | |
3352 | # broken ls alias from the environment. This has actually | |
3353 | # happened. Such a system could not be considered "sane". | |
5f64f7bd | 3354 | as_fn_error "ls -t appears to fail. Make sure there is not a broken |
743c80a7 PE |
3355 | alias in your environment" "$LINENO" 5 |
3356 | fi | |
067d23c9 | 3357 | |
743c80a7 PE |
3358 | test "$2" = conftest.file |
3359 | ) | |
3360 | then | |
3361 | # Ok. | |
3362 | : | |
067d23c9 | 3363 | else |
5f64f7bd | 3364 | as_fn_error "newly created file is older than distributed files! |
743c80a7 | 3365 | Check your system clock" "$LINENO" 5 |
067d23c9 | 3366 | fi |
743c80a7 PE |
3367 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
3368 | $as_echo "yes" >&6; } | |
3369 | test "$program_prefix" != NONE && | |
3370 | program_transform_name="s&^&$program_prefix&;$program_transform_name" | |
3371 | # Use a double $ so make ignores it. | |
3372 | test "$program_suffix" != NONE && | |
3373 | program_transform_name="s&\$&$program_suffix&;$program_transform_name" | |
3374 | # Double any \ or $. | |
3375 | # By default was `s,x,x', remove it if useless. | |
3376 | ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' | |
3377 | program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` | |
067d23c9 | 3378 | |
743c80a7 PE |
3379 | # expand $ac_aux_dir to an absolute path |
3380 | am_aux_dir=`cd $ac_aux_dir && pwd` | |
067d23c9 | 3381 | |
743c80a7 PE |
3382 | if test x"${MISSING+set}" != xset; then |
3383 | case $am_aux_dir in | |
3384 | *\ * | *\ *) | |
3385 | MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; | |
3386 | *) | |
3387 | MISSING="\${SHELL} $am_aux_dir/missing" ;; | |
3388 | esac | |
067d23c9 | 3389 | fi |
743c80a7 PE |
3390 | # Use eval to expand $SHELL |
3391 | if eval "$MISSING --run true"; then | |
3392 | am_missing_run="$MISSING --run " | |
067d23c9 | 3393 | else |
743c80a7 PE |
3394 | am_missing_run= |
3395 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 | |
3396 | $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} | |
067d23c9 KY |
3397 | fi |
3398 | ||
743c80a7 PE |
3399 | if test x"${install_sh}" != xset; then |
3400 | case $am_aux_dir in | |
3401 | *\ * | *\ *) | |
3402 | install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; | |
3403 | *) | |
3404 | install_sh="\${SHELL} $am_aux_dir/install-sh" | |
3405 | esac | |
067d23c9 KY |
3406 | fi |
3407 | ||
743c80a7 PE |
3408 | # Installed binaries are usually stripped using `strip' when the user |
3409 | # run `make install-strip'. However `strip' might not be the right | |
3410 | # tool to use in cross-compilation environments, therefore Automake | |
3411 | # will honor the `STRIP' environment variable to overrule this program. | |
3412 | if test "$cross_compiling" != no; then | |
3413 | if test -n "$ac_tool_prefix"; then | |
3414 | # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. | |
3415 | set dummy ${ac_tool_prefix}strip; ac_word=$2 | |
3416 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3417 | $as_echo_n "checking for $ac_word... " >&6; } | |
5f64f7bd | 3418 | if test "${ac_cv_prog_STRIP+set}" = set; then : |
743c80a7 | 3419 | $as_echo_n "(cached) " >&6 |
067d23c9 | 3420 | else |
743c80a7 PE |
3421 | if test -n "$STRIP"; then |
3422 | ac_cv_prog_STRIP="$STRIP" # Let the user override the test. | |
3423 | else | |
3424 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3425 | for as_dir in $PATH | |
3426 | do | |
3427 | IFS=$as_save_IFS | |
3428 | test -z "$as_dir" && as_dir=. | |
3429 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3430 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
3431 | ac_cv_prog_STRIP="${ac_tool_prefix}strip" | |
3432 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3433 | break 2 | |
3434 | fi | |
3435 | done | |
3436 | done | |
3437 | IFS=$as_save_IFS | |
067d23c9 KY |
3438 | |
3439 | fi | |
067d23c9 | 3440 | fi |
743c80a7 PE |
3441 | STRIP=$ac_cv_prog_STRIP |
3442 | if test -n "$STRIP"; then | |
3443 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 | |
3444 | $as_echo "$STRIP" >&6; } | |
3445 | else | |
3446 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3447 | $as_echo "no" >&6; } | |
067d23c9 KY |
3448 | fi |
3449 | ||
3450 | ||
067d23c9 | 3451 | fi |
743c80a7 PE |
3452 | if test -z "$ac_cv_prog_STRIP"; then |
3453 | ac_ct_STRIP=$STRIP | |
3454 | # Extract the first word of "strip", so it can be a program name with args. | |
3455 | set dummy strip; ac_word=$2 | |
3456 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3457 | $as_echo_n "checking for $ac_word... " >&6; } | |
5f64f7bd | 3458 | if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : |
743c80a7 PE |
3459 | $as_echo_n "(cached) " >&6 |
3460 | else | |
3461 | if test -n "$ac_ct_STRIP"; then | |
3462 | ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. | |
3463 | else | |
3464 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3465 | for as_dir in $PATH | |
3466 | do | |
3467 | IFS=$as_save_IFS | |
3468 | test -z "$as_dir" && as_dir=. | |
3469 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3470 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
3471 | ac_cv_prog_ac_ct_STRIP="strip" | |
3472 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3473 | break 2 | |
3474 | fi | |
3475 | done | |
3476 | done | |
3477 | IFS=$as_save_IFS | |
3478 | ||
3479 | fi | |
3480 | fi | |
3481 | ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP | |
3482 | if test -n "$ac_ct_STRIP"; then | |
3483 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 | |
3484 | $as_echo "$ac_ct_STRIP" >&6; } | |
3485 | else | |
3486 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3487 | $as_echo "no" >&6; } | |
3488 | fi | |
3489 | ||
3490 | if test "x$ac_ct_STRIP" = x; then | |
3491 | STRIP=":" | |
3492 | else | |
3493 | case $cross_compiling:$ac_tool_warned in | |
3494 | yes:) | |
3495 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
3496 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
3497 | ac_tool_warned=yes ;; | |
3498 | esac | |
3499 | STRIP=$ac_ct_STRIP | |
3500 | fi | |
3501 | else | |
3502 | STRIP="$ac_cv_prog_STRIP" | |
3503 | fi | |
3504 | ||
3505 | fi | |
3506 | INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" | |
3507 | ||
3508 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 | |
3509 | $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } | |
3510 | if test -z "$MKDIR_P"; then | |
5f64f7bd | 3511 | if test "${ac_cv_path_mkdir+set}" = set; then : |
743c80a7 PE |
3512 | $as_echo_n "(cached) " >&6 |
3513 | else | |
3514 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3515 | for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin | |
3516 | do | |
3517 | IFS=$as_save_IFS | |
3518 | test -z "$as_dir" && as_dir=. | |
3519 | for ac_prog in mkdir gmkdir; do | |
3520 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3521 | { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue | |
3522 | case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( | |
3523 | 'mkdir (GNU coreutils) '* | \ | |
3524 | 'mkdir (coreutils) '* | \ | |
3525 | 'mkdir (fileutils) '4.1*) | |
3526 | ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext | |
3527 | break 3;; | |
3528 | esac | |
3529 | done | |
3530 | done | |
3531 | done | |
3532 | IFS=$as_save_IFS | |
3533 | ||
3534 | fi | |
3535 | ||
3536 | test -d ./--version && rmdir ./--version | |
3537 | if test "${ac_cv_path_mkdir+set}" = set; then | |
3538 | MKDIR_P="$ac_cv_path_mkdir -p" | |
3539 | else | |
3540 | # As a last resort, use the slow shell script. Don't cache a | |
3541 | # value for MKDIR_P within a source directory, because that will | |
3542 | # break other packages using the cache if that directory is | |
3543 | # removed, or if the value is a relative name. | |
3544 | MKDIR_P="$ac_install_sh -d" | |
3545 | fi | |
3546 | fi | |
3547 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 | |
3548 | $as_echo "$MKDIR_P" >&6; } | |
3549 | ||
a451f14b | 3550 | |
743c80a7 PE |
3551 | mkdir_p="$MKDIR_P" |
3552 | case $mkdir_p in | |
3553 | [\\/$]* | ?:[\\/]*) ;; | |
3554 | */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; | |
3555 | esac | |
3556 | ||
3557 | for ac_prog in gawk mawk nawk awk | |
3558 | do | |
3559 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
3560 | set dummy $ac_prog; ac_word=$2 | |
3561 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3562 | $as_echo_n "checking for $ac_word... " >&6; } | |
5f64f7bd | 3563 | if test "${ac_cv_prog_AWK+set}" = set; then : |
743c80a7 PE |
3564 | $as_echo_n "(cached) " >&6 |
3565 | else | |
3566 | if test -n "$AWK"; then | |
3567 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
3568 | else | |
3569 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3570 | for as_dir in $PATH | |
3571 | do | |
3572 | IFS=$as_save_IFS | |
3573 | test -z "$as_dir" && as_dir=. | |
3574 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3575 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
3576 | ac_cv_prog_AWK="$ac_prog" | |
3577 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3578 | break 2 | |
3579 | fi | |
3580 | done | |
3581 | done | |
3582 | IFS=$as_save_IFS | |
3583 | ||
3584 | fi | |
3585 | fi | |
3586 | AWK=$ac_cv_prog_AWK | |
3587 | if test -n "$AWK"; then | |
3588 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 | |
3589 | $as_echo "$AWK" >&6; } | |
3590 | else | |
3591 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3592 | $as_echo "no" >&6; } | |
3593 | fi | |
3594 | ||
3595 | ||
3596 | test -n "$AWK" && break | |
3597 | done | |
3598 | ||
3599 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 | |
3600 | $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } | |
3601 | set x ${MAKE-make} | |
3602 | ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` | |
5f64f7bd | 3603 | if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : |
743c80a7 PE |
3604 | $as_echo_n "(cached) " >&6 |
3605 | else | |
3606 | cat >conftest.make <<\_ACEOF | |
3607 | SHELL = /bin/sh | |
3608 | all: | |
3609 | @echo '@@@%%%=$(MAKE)=@@@%%%' | |
3610 | _ACEOF | |
5f64f7bd | 3611 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. |
743c80a7 PE |
3612 | case `${MAKE-make} -f conftest.make 2>/dev/null` in |
3613 | *@@@%%%=?*=@@@%%%*) | |
3614 | eval ac_cv_prog_make_${ac_make}_set=yes;; | |
3615 | *) | |
3616 | eval ac_cv_prog_make_${ac_make}_set=no;; | |
3617 | esac | |
3618 | rm -f conftest.make | |
3619 | fi | |
3620 | if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then | |
3621 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
3622 | $as_echo "yes" >&6; } | |
3623 | SET_MAKE= | |
3624 | else | |
3625 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3626 | $as_echo "no" >&6; } | |
3627 | SET_MAKE="MAKE=${MAKE-make}" | |
3628 | fi | |
3629 | ||
3630 | rm -rf .tst 2>/dev/null | |
3631 | mkdir .tst 2>/dev/null | |
3632 | if test -d .tst; then | |
3633 | am__leading_dot=. | |
3634 | else | |
3635 | am__leading_dot=_ | |
3636 | fi | |
3637 | rmdir .tst 2>/dev/null | |
3638 | ||
3639 | if test "`cd $srcdir && pwd`" != "`pwd`"; then | |
3640 | # Use -I$(srcdir) only when $(srcdir) != ., so that make's output | |
3641 | # is not polluted with repeated "-I." | |
3642 | am__isrc=' -I$(srcdir)' | |
3643 | # test to see if srcdir already configured | |
3644 | if test -f $srcdir/config.status; then | |
5f64f7bd | 3645 | as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 |
743c80a7 PE |
3646 | fi |
3647 | fi | |
3648 | ||
3649 | # test whether we have cygpath | |
3650 | if test -z "$CYGPATH_W"; then | |
3651 | if (cygpath --version) >/dev/null 2>/dev/null; then | |
3652 | CYGPATH_W='cygpath -w' | |
3653 | else | |
3654 | CYGPATH_W=echo | |
3655 | fi | |
3656 | fi | |
3657 | ||
3658 | ||
3659 | # Define the identity of the package. | |
3660 | PACKAGE='emacs' | |
3661 | VERSION='24.0.50' | |
3662 | ||
3663 | ||
3664 | cat >>confdefs.h <<_ACEOF | |
3665 | #define PACKAGE "$PACKAGE" | |
3666 | _ACEOF | |
3667 | ||
3668 | ||
3669 | cat >>confdefs.h <<_ACEOF | |
3670 | #define VERSION "$VERSION" | |
3671 | _ACEOF | |
3672 | ||
3673 | # Some tools Automake needs. | |
3674 | ||
3675 | ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} | |
3676 | ||
3677 | ||
3678 | AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} | |
3679 | ||
3680 | ||
3681 | AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} | |
3682 | ||
3683 | ||
3684 | AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} | |
3685 | ||
3686 | ||
3687 | MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} | |
3688 | ||
3689 | # We need awk for the "check" target. The system "awk" is bad on | |
3690 | # some platforms. | |
3691 | # Always define AMTAR for backward compatibility. | |
3692 | ||
3693 | AMTAR=${AMTAR-"${am_missing_run}tar"} | |
3694 | ||
3695 | am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' | |
3696 | ||
3697 | ||
3698 | ||
3699 | ||
3700 | ||
3701 | ||
3702 | ||
3703 | ||
3704 | lispdir='${datadir}/emacs/${version}/lisp' | |
3705 | locallisppath='${datadir}/emacs/${version}/site-lisp:'\ | |
3706 | '${datadir}/emacs/site-lisp' | |
3707 | lisppath='${locallisppath}:${lispdir}:${datadir}/emacs/${version}/leim' | |
3708 | etcdir='${datadir}/emacs/${version}/etc' | |
3709 | archlibdir='${libexecdir}/emacs/${version}/${configuration}' | |
3710 | docdir='${datadir}/emacs/${version}/etc' | |
3711 | gamedir='${localstatedir}/games/emacs' | |
3712 | ||
3713 | ||
3714 | ||
3715 | ||
3716 | # Check whether --with-pop was given. | |
3717 | if test "${with_pop+set}" = set; then : | |
3718 | withval=$with_pop; | |
3719 | else | |
3720 | with_pop=yes | |
3721 | fi | |
3722 | ||
3723 | if test "$with_pop" = yes; then | |
3724 | $as_echo "#define MAIL_USE_POP 1" >>confdefs.h | |
3725 | ||
3726 | fi | |
3727 | ||
3728 | ||
3729 | # Check whether --with-kerberos was given. | |
3730 | if test "${with_kerberos+set}" = set; then : | |
3731 | withval=$with_kerberos; | |
3732 | else | |
3733 | with_kerberos=no | |
3734 | fi | |
3735 | ||
3736 | if test "$with_kerberos" != no; then | |
3737 | $as_echo "#define KERBEROS 1" >>confdefs.h | |
3738 | ||
3739 | fi | |
3740 | ||
3741 | ||
3742 | # Check whether --with-kerberos5 was given. | |
3743 | if test "${with_kerberos5+set}" = set; then : | |
3744 | withval=$with_kerberos5; | |
3745 | else | |
3746 | with_kerberos5=no | |
3747 | fi | |
3748 | ||
3749 | if test "${with_kerberos5}" != no; then | |
3750 | if test "${with_kerberos}" = no; then | |
3751 | with_kerberos=yes | |
3752 | $as_echo "#define KERBEROS 1" >>confdefs.h | |
3753 | ||
3754 | fi | |
3755 | ||
3756 | $as_echo "#define KERBEROS5 1" >>confdefs.h | |
3757 | ||
3758 | fi | |
3759 | ||
3760 | ||
3761 | # Check whether --with-hesiod was given. | |
3762 | if test "${with_hesiod+set}" = set; then : | |
3763 | withval=$with_hesiod; | |
3764 | else | |
3765 | with_hesiod=no | |
3766 | fi | |
3767 | ||
3768 | if test "$with_hesiod" != no; then | |
3769 | ||
3770 | $as_echo "#define HESIOD 1" >>confdefs.h | |
3771 | ||
3772 | fi | |
3773 | ||
3774 | ||
3775 | # Check whether --with-mmdf was given. | |
3776 | if test "${with_mmdf+set}" = set; then : | |
3777 | withval=$with_mmdf; | |
3778 | else | |
3779 | with_mmdf=no | |
3780 | fi | |
3781 | ||
3782 | if test "$with_mmdf" != no; then | |
3783 | ||
3784 | $as_echo "#define MAIL_USE_MMDF 1" >>confdefs.h | |
3785 | ||
3786 | fi | |
3787 | ||
3788 | ||
3789 | # Check whether --with-mail-unlink was given. | |
3790 | if test "${with_mail_unlink+set}" = set; then : | |
3791 | withval=$with_mail_unlink; | |
3792 | else | |
3793 | with_mail_unlink=no | |
3794 | fi | |
3795 | ||
3796 | if test "$with_mail_unlink" != no; then | |
3797 | ||
3798 | $as_echo "#define MAIL_UNLINK_SPOOL 1" >>confdefs.h | |
3799 | ||
3800 | fi | |
3801 | ||
3802 | ||
3803 | # Check whether --with-mailhost was given. | |
3804 | if test "${with_mailhost+set}" = set; then : | |
3805 | withval=$with_mailhost; | |
3806 | cat >>confdefs.h <<_ACEOF | |
3807 | #define MAILHOST "$withval" | |
3808 | _ACEOF | |
3809 | ||
3810 | fi | |
3811 | ||
3812 | ||
3813 | ||
067d23c9 KY |
3814 | # Check whether --with-sound was given. |
3815 | if test "${with_sound+set}" = set; then : | |
3816 | withval=$with_sound; | |
3817 | else | |
3818 | with_sound=yes | |
3819 | fi | |
3820 | ||
3821 | ||
3822 | ||
3823 | # Check whether --with-sync-input was given. | |
3824 | if test "${with_sync_input+set}" = set; then : | |
3825 | withval=$with_sync_input; | |
3826 | else | |
3827 | with_sync_input=yes | |
3828 | fi | |
3829 | ||
3830 | if test "$with_sync_input" = yes; then | |
3831 | ||
3832 | $as_echo "#define SYNC_INPUT 1" >>confdefs.h | |
3833 | ||
3834 | fi | |
3835 | ||
3836 | ||
3837 | # Check whether --with-x-toolkit was given. | |
3838 | if test "${with_x_toolkit+set}" = set; then : | |
3839 | withval=$with_x_toolkit; case "${withval}" in | |
3840 | y | ye | yes ) val=gtk ;; | |
3841 | n | no ) val=no ;; | |
3842 | l | lu | luc | luci | lucid ) val=lucid ;; | |
3843 | a | at | ath | athe | athen | athena ) val=athena ;; | |
3844 | m | mo | mot | moti | motif ) val=motif ;; | |
3845 | g | gt | gtk ) val=gtk ;; | |
3846 | gtk3 ) val=gtk3 ;; | |
3847 | * ) | |
5f64f7bd | 3848 | as_fn_error "\`--with-x-toolkit=$withval' is invalid; |
067d23c9 KY |
3849 | this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif', \`gtk' or |
3850 | \`gtk3'. \`yes' and \`gtk' are synonyms. \`athena' and \`lucid' are synonyms." "$LINENO" 5 | |
3851 | ;; | |
3852 | esac | |
3853 | with_x_toolkit=$val | |
3854 | ||
3855 | fi | |
3856 | ||
3857 | ||
3858 | ||
0442dc7f GM |
3859 | # Check whether --with-wide-int was given. |
3860 | if test "${with_wide_int+set}" = set; then : | |
3861 | withval=$with_wide_int; | |
3862 | else | |
3863 | with_wide_int=no | |
3864 | fi | |
3865 | ||
3866 | if test "$with_wide_int" = yes; then | |
3867 | ||
3868 | $as_echo "#define WIDE_EMACS_INT 1" >>confdefs.h | |
3869 | ||
3870 | fi | |
3871 | ||
3872 | ||
067d23c9 KY |
3873 | # Check whether --with-xpm was given. |
3874 | if test "${with_xpm+set}" = set; then : | |
3875 | withval=$with_xpm; | |
3876 | else | |
3877 | with_xpm=yes | |
3878 | fi | |
3879 | ||
3880 | ||
3881 | # Check whether --with-jpeg was given. | |
3882 | if test "${with_jpeg+set}" = set; then : | |
3883 | withval=$with_jpeg; | |
3884 | else | |
3885 | with_jpeg=yes | |
3886 | fi | |
3887 | ||
3888 | ||
3889 | # Check whether --with-tiff was given. | |
3890 | if test "${with_tiff+set}" = set; then : | |
3891 | withval=$with_tiff; | |
3892 | else | |
3893 | with_tiff=yes | |
3894 | fi | |
3895 | ||
3896 | ||
3897 | # Check whether --with-gif was given. | |
3898 | if test "${with_gif+set}" = set; then : | |
3899 | withval=$with_gif; | |
3900 | else | |
3901 | with_gif=yes | |
3902 | fi | |
3903 | ||
3904 | ||
3905 | # Check whether --with-png was given. | |
3906 | if test "${with_png+set}" = set; then : | |
3907 | withval=$with_png; | |
3908 | else | |
3909 | with_png=yes | |
3910 | fi | |
3911 | ||
3912 | ||
3913 | # Check whether --with-rsvg was given. | |
3914 | if test "${with_rsvg+set}" = set; then : | |
3915 | withval=$with_rsvg; | |
3916 | else | |
3917 | with_rsvg=yes | |
3918 | fi | |
3919 | ||
3920 | ||
3921 | # Check whether --with-xml2 was given. | |
3922 | if test "${with_xml2+set}" = set; then : | |
3923 | withval=$with_xml2; | |
3924 | else | |
3925 | with_xml2=yes | |
3926 | fi | |
3927 | ||
3928 | ||
3929 | # Check whether --with-imagemagick was given. | |
3930 | if test "${with_imagemagick+set}" = set; then : | |
3931 | withval=$with_imagemagick; | |
3932 | else | |
3933 | with_imagemagick=yes | |
3934 | fi | |
3935 | ||
3936 | ||
3937 | ||
3938 | # Check whether --with-xft was given. | |
3939 | if test "${with_xft+set}" = set; then : | |
3940 | withval=$with_xft; | |
3941 | else | |
3942 | with_xft=yes | |
3943 | fi | |
3944 | ||
3945 | ||
3946 | # Check whether --with-libotf was given. | |
3947 | if test "${with_libotf+set}" = set; then : | |
3948 | withval=$with_libotf; | |
3949 | else | |
3950 | with_libotf=yes | |
3951 | fi | |
3952 | ||
3953 | ||
3954 | # Check whether --with-m17n-flt was given. | |
3955 | if test "${with_m17n_flt+set}" = set; then : | |
3956 | withval=$with_m17n_flt; | |
3957 | else | |
3958 | with_m17n_flt=yes | |
3959 | fi | |
3960 | ||
3961 | ||
3962 | ||
3963 | # Check whether --with-toolkit-scroll-bars was given. | |
3964 | if test "${with_toolkit_scroll_bars+set}" = set; then : | |
3965 | withval=$with_toolkit_scroll_bars; | |
3966 | else | |
3967 | with_toolkit_scroll_bars=yes | |
3968 | fi | |
3969 | ||
3970 | ||
3971 | # Check whether --with-xaw3d was given. | |
3972 | if test "${with_xaw3d+set}" = set; then : | |
3973 | withval=$with_xaw3d; | |
3974 | else | |
3975 | with_xaw3d=yes | |
3976 | fi | |
3977 | ||
3978 | ||
3979 | # Check whether --with-xim was given. | |
3980 | if test "${with_xim+set}" = set; then : | |
3981 | withval=$with_xim; | |
3982 | else | |
3983 | with_xim=yes | |
3984 | fi | |
3985 | ||
3986 | ||
3987 | # Check whether --with-ns was given. | |
3988 | if test "${with_ns+set}" = set; then : | |
3989 | withval=$with_ns; | |
3990 | else | |
3991 | with_ns=no | |
3992 | fi | |
3993 | ||
3994 | ||
3995 | ||
3996 | # Check whether --with-gpm was given. | |
3997 | if test "${with_gpm+set}" = set; then : | |
3998 | withval=$with_gpm; | |
3999 | else | |
4000 | with_gpm=yes | |
4001 | fi | |
4002 | ||
4003 | ||
4004 | # Check whether --with-dbus was given. | |
4005 | if test "${with_dbus+set}" = set; then : | |
4006 | withval=$with_dbus; | |
4007 | else | |
4008 | with_dbus=yes | |
4009 | fi | |
4010 | ||
4011 | ||
4012 | # Check whether --with-gconf was given. | |
4013 | if test "${with_gconf+set}" = set; then : | |
4014 | withval=$with_gconf; | |
4015 | else | |
4016 | with_gconf=yes | |
4017 | fi | |
4018 | ||
4019 | ||
f527bd02 GM |
4020 | # Check whether --with-gsettings was given. |
4021 | if test "${with_gsettings+set}" = set; then : | |
4022 | withval=$with_gsettings; | |
4023 | else | |
4024 | with_gsettings=yes | |
4025 | fi | |
4026 | ||
4027 | ||
067d23c9 KY |
4028 | # Check whether --with-selinux was given. |
4029 | if test "${with_selinux+set}" = set; then : | |
4030 | withval=$with_selinux; | |
4031 | else | |
4032 | with_selinux=yes | |
4033 | fi | |
4034 | ||
4035 | ||
4036 | # Check whether --with-gnutls was given. | |
4037 | if test "${with_gnutls+set}" = set; then : | |
4038 | withval=$with_gnutls; | |
4039 | else | |
4040 | with_gnutls=yes | |
4041 | fi | |
4042 | ||
4043 | ||
4044 | ## For the times when you want to build Emacs but don't have | |
4045 | ## a suitable makeinfo, and can live without the manuals. | |
4046 | ||
4047 | # Check whether --with-makeinfo was given. | |
4048 | if test "${with_makeinfo+set}" = set; then : | |
4049 | withval=$with_makeinfo; | |
4050 | else | |
4051 | with_makeinfo=yes | |
4052 | fi | |
4053 | ||
4054 | ||
4055 | ## This is an option because I do not know if all info/man support | |
4056 | ## compressed files, nor how to test if they do so. | |
4057 | ||
4058 | # Check whether --with-compress-info was given. | |
4059 | if test "${with_compress_info+set}" = set; then : | |
4060 | withval=$with_compress_info; | |
4061 | else | |
4062 | with_compress_info=yes | |
4063 | fi | |
4064 | ||
4065 | if test $with_compress_info = yes; then | |
4066 | GZIP_INFO=yes | |
4067 | else | |
4068 | GZIP_INFO= | |
4069 | fi | |
4070 | ||
4071 | ||
4072 | ||
4073 | # Check whether --with-pkg-config-prog was given. | |
4074 | if test "${with_pkg_config_prog+set}" = set; then : | |
4075 | withval=$with_pkg_config_prog; | |
4076 | fi | |
4077 | ||
4078 | if test "X${with_pkg_config_prog}" != X; then | |
4079 | if test "${with_pkg_config_prog}" != yes; then | |
4080 | PKG_CONFIG="${with_pkg_config_prog}" | |
4081 | fi | |
4082 | fi | |
4083 | ||
4084 | CRT_DIR= | |
4085 | ||
4086 | # Check whether --with-crt-dir was given. | |
4087 | if test "${with_crt_dir+set}" = set; then : | |
4088 | withval=$with_crt_dir; | |
4089 | fi | |
4090 | ||
4091 | CRT_DIR="${with_crt_dir}" | |
4092 | ||
4093 | ||
4fc5868a UM |
4094 | # Check whether --with-gameuser was given. |
4095 | if test "${with_gameuser+set}" = set; then : | |
4096 | withval=$with_gameuser; | |
4097 | fi | |
4098 | ||
4099 | test "X${with_gameuser}" != X && test "${with_gameuser}" != yes \ | |
4100 | && gameuser="${with_gameuser}" | |
4101 | test "X$gameuser" = X && gameuser=games | |
4102 | ||
4103 | ||
067d23c9 KY |
4104 | # Check whether --with-gnustep-conf was given. |
4105 | if test "${with_gnustep_conf+set}" = set; then : | |
4106 | withval=$with_gnustep_conf; | |
4107 | fi | |
4108 | ||
4109 | test "X${with_gnustep_conf}" != X && test "${with_gnustep_conf}" != yes && \ | |
4110 | GNUSTEP_CONFIG_FILE="${with_gnustep_conf}" | |
4111 | test "X$GNUSTEP_CONFIG_FILE" = "X" && \ | |
4112 | GNUSTEP_CONFIG_FILE=/etc/GNUstep/GNUstep.conf | |
4113 | ||
4114 | # Check whether --enable-ns-self-contained was given. | |
4115 | if test "${enable_ns_self_contained+set}" = set; then : | |
4116 | enableval=$enable_ns_self_contained; EN_NS_SELF_CONTAINED=$enableval | |
4117 | else | |
4118 | EN_NS_SELF_CONTAINED=yes | |
4119 | fi | |
4120 | ||
4121 | ||
4122 | # Check whether --enable-asserts was given. | |
4123 | if test "${enable_asserts+set}" = set; then : | |
4124 | enableval=$enable_asserts; USE_XASSERTS=$enableval | |
4125 | else | |
4126 | USE_XASSERTS=no | |
4127 | fi | |
4128 | ||
4129 | ||
4130 | # Check whether --enable-maintainer-mode was given. | |
4131 | if test "${enable_maintainer_mode+set}" = set; then : | |
4132 | enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval | |
4133 | else | |
dccef361 | 4134 | USE_MAINTAINER_MODE=yes |
067d23c9 KY |
4135 | fi |
4136 | ||
4137 | if test $USE_MAINTAINER_MODE = yes; then | |
4138 | MAINT= | |
4139 | else | |
4140 | MAINT=# | |
4141 | fi | |
4142 | ||
4143 | ||
4144 | # Check whether --enable-locallisppath was given. | |
4145 | if test "${enable_locallisppath+set}" = set; then : | |
4146 | enableval=$enable_locallisppath; if test "${enableval}" = "no"; then | |
4147 | locallisppath= | |
4148 | elif test "${enableval}" != "yes"; then | |
4149 | locallisppath=${enableval} | |
4150 | fi | |
4151 | fi | |
4152 | ||
4153 | ||
4154 | # Check whether --enable-checking was given. | |
4155 | if test "${enable_checking+set}" = set; then : | |
4156 | enableval=$enable_checking; ac_checking_flags="${enableval}" | |
4157 | fi | |
4158 | ||
4159 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS," | |
4160 | for check in $ac_checking_flags | |
4161 | do | |
4162 | case $check in | |
4163 | # these set all the flags to specific states | |
4164 | yes) ac_enable_checking=1 ;; | |
4165 | no) ac_enable_checking= ; | |
4166 | ac_gc_check_stringbytes= ; | |
4167 | ac_gc_check_string_overrun= ; | |
4168 | ac_gc_check_string_free_list= ; | |
4169 | ac_xmalloc_overrun= ; | |
4170 | ac_gc_check_cons_list= ;; | |
4171 | all) ac_enable_checking=1 ; | |
4172 | ac_gc_check_stringbytes=1 ; | |
4173 | ac_gc_check_string_overrun=1 ; | |
4174 | ac_gc_check_string_free_list=1 ; | |
4175 | ac_xmalloc_overrun=1 ; | |
4176 | ac_gc_check_cons_list=1 ;; | |
4177 | # these enable particular checks | |
4178 | stringbytes) ac_gc_check_stringbytes=1 ;; | |
4179 | stringoverrun) ac_gc_check_string_overrun=1 ;; | |
4180 | stringfreelist) ac_gc_check_string_free_list=1 ;; | |
4181 | xmallocoverrun) ac_xmalloc_overrun=1 ;; | |
4182 | conslist) ac_gc_check_cons_list=1 ;; | |
5f64f7bd | 4183 | *) as_fn_error "unknown check category $check" "$LINENO" 5 ;; |
067d23c9 KY |
4184 | esac |
4185 | done | |
4186 | IFS="$ac_save_IFS" | |
4187 | ||
4188 | if test x$ac_enable_checking != x ; then | |
4189 | ||
4190 | $as_echo "#define ENABLE_CHECKING 1" >>confdefs.h | |
4191 | ||
4192 | fi | |
4193 | if test x$ac_gc_check_stringbytes != x ; then | |
4194 | ||
4195 | $as_echo "#define GC_CHECK_STRING_BYTES 1" >>confdefs.h | |
4196 | ||
4197 | fi | |
4fda9c95 | 4198 | if test x$ac_gc_check_string_overrun != x ; then |
067d23c9 KY |
4199 | |
4200 | $as_echo "#define GC_CHECK_STRING_OVERRUN 1" >>confdefs.h | |
4201 | ||
4202 | fi | |
4203 | if test x$ac_gc_check_string_free_list != x ; then | |
4204 | ||
4205 | $as_echo "#define GC_CHECK_STRING_FREE_LIST 1" >>confdefs.h | |
4206 | ||
4207 | fi | |
4208 | if test x$ac_xmalloc_overrun != x ; then | |
4209 | ||
4210 | $as_echo "#define XMALLOC_OVERRUN_CHECK 1" >>confdefs.h | |
4211 | ||
4212 | fi | |
4213 | if test x$ac_gc_check_cons_list != x ; then | |
4214 | ||
4215 | $as_echo "#define GC_CHECK_CONS_LIST 1" >>confdefs.h | |
4216 | ||
4217 | fi | |
4218 | ||
4219 | # Check whether --enable-use-lisp-union-type was given. | |
4220 | if test "${enable_use_lisp_union_type+set}" = set; then : | |
4221 | enableval=$enable_use_lisp_union_type; if test "${enableval}" != "no"; then | |
4222 | ||
4223 | $as_echo "#define USE_LISP_UNION_TYPE 1" >>confdefs.h | |
4224 | ||
4225 | fi | |
4226 | fi | |
4227 | ||
4228 | ||
4229 | ||
4230 | # Check whether --enable-profiling was given. | |
4231 | if test "${enable_profiling+set}" = set; then : | |
4232 | enableval=$enable_profiling; ac_enable_profiling="${enableval}" | |
4233 | fi | |
4234 | ||
4235 | if test x$ac_enable_profiling != x ; then | |
4236 | PROFILING_CFLAGS="-DPROFILING=1 -pg" | |
4237 | else | |
4238 | PROFILING_CFLAGS= | |
4239 | fi | |
4240 | ||
4241 | ||
4242 | # Check whether --enable-autodepend was given. | |
4243 | if test "${enable_autodepend+set}" = set; then : | |
4244 | enableval=$enable_autodepend; ac_enable_autodepend="${enableval}" | |
4245 | else | |
4246 | ac_enable_autodepend=yes | |
4247 | fi | |
4248 | ||
4249 | ||
4250 | #### Make srcdir absolute, if it isn't already. It's important to | |
4251 | #### avoid running the path through pwd unnecessarily, since pwd can | |
4252 | #### give you automounter prefixes, which can go away. We do all this | |
4253 | #### so Emacs can find its files when run uninstalled. | |
4254 | ## Make sure CDPATH doesn't affect cd (in case PWD is relative). | |
4255 | unset CDPATH | |
4256 | case "${srcdir}" in | |
4257 | /* ) ;; | |
4258 | . ) | |
4259 | ## We may be able to use the $PWD environment variable to make this | |
4260 | ## absolute. But sometimes PWD is inaccurate. | |
4261 | ## Note: we used to use ${PWD} at the end instead of `pwd`, | |
4262 | ## but that tested only for a well-formed and valid PWD, | |
4263 | ## it did not object when PWD was well-formed and valid but just wrong. | |
4264 | if test ".${PWD}" != "." && test ".`(cd ${PWD} ; sh -c pwd)`" = ".`pwd`" ; | |
4265 | then | |
4266 | srcdir="$PWD" | |
4267 | else | |
4268 | srcdir="`(cd ${srcdir}; pwd)`" | |
4269 | fi | |
4270 | ;; | |
4271 | * ) srcdir="`(cd ${srcdir}; pwd)`" ;; | |
4272 | esac | |
4273 | ||
067d23c9 KY |
4274 | #### Given the configuration name, set machfile and opsysfile to the |
4275 | #### names of the m/*.h and s/*.h files we should use. | |
4276 | ||
4277 | ### Canonicalize the configuration name. | |
4278 | ||
067d23c9 KY |
4279 | # Make sure we can run config.sub. |
4280 | $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || | |
5f64f7bd | 4281 | as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 |
067d23c9 KY |
4282 | |
4283 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 | |
4284 | $as_echo_n "checking build system type... " >&6; } | |
5f64f7bd | 4285 | if test "${ac_cv_build+set}" = set; then : |
067d23c9 KY |
4286 | $as_echo_n "(cached) " >&6 |
4287 | else | |
4288 | ac_build_alias=$build_alias | |
4289 | test "x$ac_build_alias" = x && | |
4290 | ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` | |
4291 | test "x$ac_build_alias" = x && | |
5f64f7bd | 4292 | as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 |
067d23c9 | 4293 | ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || |
5f64f7bd | 4294 | as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 |
067d23c9 KY |
4295 | |
4296 | fi | |
4297 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 | |
4298 | $as_echo "$ac_cv_build" >&6; } | |
4299 | case $ac_cv_build in | |
4300 | *-*-*) ;; | |
5f64f7bd | 4301 | *) as_fn_error "invalid value of canonical build" "$LINENO" 5;; |
067d23c9 KY |
4302 | esac |
4303 | build=$ac_cv_build | |
4304 | ac_save_IFS=$IFS; IFS='-' | |
4305 | set x $ac_cv_build | |
4306 | shift | |
4307 | build_cpu=$1 | |
4308 | build_vendor=$2 | |
4309 | shift; shift | |
4310 | # Remember, the first character of IFS is used to create $*, | |
4311 | # except with old shells: | |
4312 | build_os=$* | |
4313 | IFS=$ac_save_IFS | |
4314 | case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac | |
4315 | ||
4316 | ||
4317 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 | |
4318 | $as_echo_n "checking host system type... " >&6; } | |
5f64f7bd | 4319 | if test "${ac_cv_host+set}" = set; then : |
067d23c9 KY |
4320 | $as_echo_n "(cached) " >&6 |
4321 | else | |
4322 | if test "x$host_alias" = x; then | |
4323 | ac_cv_host=$ac_cv_build | |
4324 | else | |
4325 | ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || | |
5f64f7bd | 4326 | as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 |
067d23c9 KY |
4327 | fi |
4328 | ||
4329 | fi | |
4330 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 | |
4331 | $as_echo "$ac_cv_host" >&6; } | |
4332 | case $ac_cv_host in | |
4333 | *-*-*) ;; | |
5f64f7bd | 4334 | *) as_fn_error "invalid value of canonical host" "$LINENO" 5;; |
067d23c9 KY |
4335 | esac |
4336 | host=$ac_cv_host | |
4337 | ac_save_IFS=$IFS; IFS='-' | |
4338 | set x $ac_cv_host | |
4339 | shift | |
4340 | host_cpu=$1 | |
4341 | host_vendor=$2 | |
4342 | shift; shift | |
4343 | # Remember, the first character of IFS is used to create $*, | |
4344 | # except with old shells: | |
4345 | host_os=$* | |
4346 | IFS=$ac_save_IFS | |
4347 | case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac | |
4348 | ||
4349 | ||
4350 | canonical=$host | |
4351 | configuration=${host_alias-${build_alias-$host}} | |
4352 | ||
4353 | ||
4354 | ||
4355 | ### If you add support for a new configuration, add code to this | |
4356 | ### switch statement to recognize your configuration name and select | |
4357 | ### the appropriate operating system and machine description files. | |
4358 | ||
4359 | ### You would hope that you could choose an m/*.h file pretty much | |
4360 | ### based on the machine portion of the configuration name, and an s/*.h | |
4361 | ### file based on the operating system portion. However, it turns out | |
4362 | ### that each m/*.h file is pretty manufacturer-specific - for | |
4363 | ### example mips.h is MIPS | |
4364 | ### So we basically have to have a special case for each | |
4365 | ### configuration name. | |
4366 | ### | |
4367 | ### As far as handling version numbers on operating systems is | |
4368 | ### concerned, make sure things will fail in a fixable way. If | |
4369 | ### /etc/MACHINES doesn't say anything about version numbers, be | |
4370 | ### prepared to handle anything reasonably. If version numbers | |
4371 | ### matter, be sure /etc/MACHINES says something about it. | |
4372 | ||
4373 | machine='' opsys='' unported=no | |
4374 | case "${canonical}" in | |
4375 | ||
d6a003a8 AS |
4376 | ## GNU/Linux ports |
4377 | *-*-linux-gnu*) | |
4378 | opsys=gnu-linux | |
4379 | case ${canonical} in | |
4380 | alpha*) machine=alpha ;; | |
4381 | s390-*) machine=ibms390 ;; | |
4382 | s390x-*) machine=ibms390x ;; | |
4383 | powerpc*) machine=macppc ;; | |
4384 | sparc*) machine=sparc ;; | |
4385 | ia64*) machine=ia64 ;; | |
4386 | m68k*) machine=m68k ;; | |
4387 | x86_64*) machine=amdx86-64 ;; | |
4388 | esac | |
4389 | ;; | |
4390 | ||
067d23c9 KY |
4391 | ## FreeBSD ports |
4392 | *-*-freebsd* ) | |
4393 | opsys=freebsd | |
4394 | case "${canonical}" in | |
4395 | alpha*) machine=alpha ;; | |
4396 | amd64-*|x86_64-*) machine=amdx86-64 ;; | |
067d23c9 KY |
4397 | ia64-*) machine=ia64 ;; |
4398 | i[3456]86-*) machine=intel386 ;; | |
4399 | powerpc-*) machine=macppc ;; | |
4400 | sparc-*) machine=sparc ;; | |
4401 | sparc64-*) machine=sparc ;; | |
4402 | esac | |
4403 | ;; | |
4404 | ||
4405 | ## FreeBSD kernel + glibc based userland | |
4406 | *-*-kfreebsd*gnu* ) | |
4407 | opsys=gnu-kfreebsd | |
4408 | case "${canonical}" in | |
4409 | alpha*) machine=alpha ;; | |
4410 | amd64-*|x86_64-*) machine=amdx86-64 ;; | |
4411 | ia64-*) machine=ia64 ;; | |
4412 | i[3456]86-*) machine=intel386 ;; | |
4413 | powerpc-*) machine=macppc ;; | |
4414 | sparc-*) machine=sparc ;; | |
4415 | sparc64-*) machine=sparc ;; | |
4416 | esac | |
4417 | ;; | |
4418 | ||
4419 | ## NetBSD ports | |
4420 | *-*-netbsd* ) | |
4421 | opsys=netbsd | |
4422 | case "${canonical}" in | |
4423 | alpha*) machine=alpha ;; | |
4424 | x86_64-*) machine=amdx86-64 ;; | |
067d23c9 KY |
4425 | i[3456]86-*) machine=intel386 ;; |
4426 | m68k-*) machine=m68k ;; | |
4427 | powerpc-*) machine=macppc ;; | |
067d23c9 KY |
4428 | sparc*-) machine=sparc ;; |
4429 | vax-*) machine=vax ;; | |
4430 | esac | |
4431 | ;; | |
4432 | ||
4433 | ## OpenBSD ports | |
4434 | *-*-openbsd* ) | |
4435 | opsys=openbsd | |
4436 | case "${canonical}" in | |
4437 | alpha*) machine=alpha ;; | |
4438 | x86_64-*) machine=amdx86-64 ;; | |
067d23c9 KY |
4439 | i386-*) machine=intel386 ;; |
4440 | powerpc-*) machine=macppc ;; | |
4441 | sparc*) machine=sparc ;; | |
4442 | vax-*) machine=vax ;; | |
4443 | esac | |
4444 | ;; | |
4445 | ||
067d23c9 KY |
4446 | ## Apple Darwin / Mac OS X |
4447 | *-apple-darwin* ) | |
4448 | case "${canonical}" in | |
4449 | i[3456]86-* ) machine=intel386 ;; | |
4450 | powerpc-* ) machine=macppc ;; | |
4451 | x86_64-* ) machine=amdx86-64 ;; | |
4452 | * ) unported=yes ;; | |
4453 | esac | |
4454 | opsys=darwin | |
4455 | # Define CPP as follows to make autoconf work correctly. | |
4456 | CPP="${CC-cc} -E -no-cpp-precomp" | |
4457 | # Use fink packages if available. | |
4458 | if test -d /sw/include && test -d /sw/lib; then | |
4459 | GCC_TEST_OPTIONS="-I/sw/include -L/sw/lib" | |
4460 | CPP="${CPP} ${GCC_TEST_OPTIONS}" | |
4461 | NON_GCC_TEST_OPTIONS=${GCC_TEST_OPTIONS} | |
4462 | fi | |
4463 | ;; | |
4464 | ||
4465 | ## HP 9000 series 700 and 800, running HP/UX | |
4466 | hppa*-hp-hpux10.2* ) | |
d6a003a8 | 4467 | opsys=hpux10-20 |
067d23c9 KY |
4468 | ;; |
4469 | hppa*-hp-hpux1[1-9]* ) | |
d6a003a8 | 4470 | opsys=hpux11 |
067d23c9 KY |
4471 | CFLAGS="-D_INCLUDE__STDC_A1_SOURCE $CFLAGS" |
4472 | ;; | |
4473 | ||
125c3718 PE |
4474 | ia64*-hp-hpux1[1-9]* ) |
4475 | machine=hp800 opsys=hpux11 | |
4476 | ## FIXME. Peter O'Gorman reports that dumping using unexelf.o doesn't | |
4477 | ## work either: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=6811 | |
4478 | CANNOT_DUMP=yes | |
4479 | ;; | |
4480 | ||
4481 | hppa*-*-linux-gnu* ) | |
4482 | machine=hp800 opsys=gnu-linux | |
4483 | ;; | |
4484 | ||
067d23c9 | 4485 | ## IBM machines |
067d23c9 KY |
4486 | rs6000-ibm-aix4.[23]* ) |
4487 | machine=ibmrs6000 opsys=aix4-2 | |
4488 | ;; | |
4489 | powerpc-ibm-aix4.[23]* ) | |
4490 | machine=ibmrs6000 opsys=aix4-2 | |
4491 | ;; | |
4492 | rs6000-ibm-aix[56]* ) | |
4493 | machine=ibmrs6000 opsys=aix4-2 | |
4494 | ;; | |
4495 | powerpc-ibm-aix[56]* ) | |
4496 | machine=ibmrs6000 opsys=aix4-2 | |
4497 | ;; | |
4498 | ||
067d23c9 KY |
4499 | ## Silicon Graphics machines |
4500 | ## Iris 4D | |
4501 | mips-sgi-irix6.5 ) | |
fd44db7f | 4502 | opsys=irix6-5 |
067d23c9 KY |
4503 | # Without defining _LANGUAGE_C, things get masked out in the headers |
4504 | # so that, for instance, grepping for `free' in stdlib.h fails and | |
4505 | # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m). | |
4506 | NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C" | |
4507 | NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C" | |
4508 | ;; | |
4509 | ||
4510 | ## Suns | |
067d23c9 KY |
4511 | *-sun-solaris* \ |
4512 | | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* \ | |
4513 | | x86_64-*-solaris2* | x86_64-*-sunos5*) | |
4514 | case "${canonical}" in | |
4515 | i[3456]86-*-* ) machine=intel386 ;; | |
4516 | amd64-*-*|x86_64-*-*) machine=amdx86-64 ;; | |
4517 | sparc* ) machine=sparc ;; | |
4518 | * ) unported=yes ;; | |
4519 | esac | |
4520 | case "${canonical}" in | |
4521 | *-sunos5.6* | *-solaris2.6* ) | |
4522 | opsys=sol2-6 | |
4523 | NON_GNU_CPP=/usr/ccs/lib/cpp | |
4524 | RANLIB="ar -ts" | |
4525 | ;; | |
4526 | *-sunos5.[7-9]* | *-solaris2.[7-9]* ) | |
4527 | opsys=sol2-6 | |
4528 | emacs_check_sunpro_c=yes | |
4529 | NON_GNU_CPP=/usr/ccs/lib/cpp | |
4530 | ;; | |
4531 | *-sunos5* | *-solaris* ) | |
4532 | opsys=sol2-10 | |
4533 | emacs_check_sunpro_c=yes | |
4534 | NON_GNU_CPP=/usr/ccs/lib/cpp | |
4535 | ;; | |
4536 | esac | |
4537 | ## Watch out for a compiler that we know will not work. | |
4538 | case "${canonical}" in | |
4539 | *-solaris* | *-sunos5* ) | |
4540 | if [ "x$CC" = x/usr/ucb/cc ]; then | |
4541 | ## /usr/ucb/cc doesn't work; | |
4542 | ## we should find some other compiler that does work. | |
4543 | unset CC | |
4544 | fi | |
4545 | ;; | |
4546 | *) ;; | |
4547 | esac | |
4548 | ;; | |
4549 | ||
067d23c9 KY |
4550 | ## Intel 386 machines where we don't care about the manufacturer. |
4551 | i[3456]86-*-* ) | |
4552 | machine=intel386 | |
4553 | case "${canonical}" in | |
4554 | *-cygwin ) opsys=cygwin ;; | |
4555 | *-darwin* ) opsys=darwin | |
4556 | CPP="${CC-cc} -E -no-cpp-precomp" | |
4557 | ;; | |
067d23c9 KY |
4558 | *-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;; |
4559 | *-sysv5uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;; | |
4560 | *-sysv5OpenUNIX* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;; | |
4561 | ## Otherwise, we'll fall through to the generic opsys code at the bottom. | |
4562 | esac | |
4563 | ;; | |
4564 | ||
067d23c9 KY |
4565 | * ) |
4566 | unported=yes | |
4567 | ;; | |
4568 | esac | |
4569 | ||
4570 | ### If the code above didn't choose an operating system, just choose | |
4571 | ### an operating system based on the configuration name. You really | |
4572 | ### only want to use this when you have no idea what the right | |
4573 | ### operating system is; if you know what operating systems a machine | |
4574 | ### runs, it's cleaner to make it explicit in the case statement | |
4575 | ### above. | |
4576 | if test x"${opsys}" = x; then | |
4577 | case "${canonical}" in | |
4578 | *-gnu* ) opsys=gnu ;; | |
4579 | * ) | |
4580 | unported=yes | |
4581 | ;; | |
4582 | esac | |
4583 | fi | |
4584 | ||
4585 | ||
4586 | ||
4587 | if test $unported = yes; then | |
5f64f7bd | 4588 | as_fn_error "Emacs hasn't been ported to \`${canonical}' systems. |
067d23c9 KY |
4589 | Check \`etc/MACHINES' for recognized configuration names." "$LINENO" 5 |
4590 | fi | |
4591 | ||
d6a003a8 AS |
4592 | if test -n "$machine"; then |
4593 | machfile="m/${machine}.h" | |
4594 | else | |
4595 | machfile= | |
4596 | fi | |
067d23c9 KY |
4597 | opsysfile="s/${opsys}.h" |
4598 | ||
4599 | ||
4600 | #### Choose a compiler. | |
4601 | test -n "$CC" && cc_specified=yes | |
4602 | ||
4603 | # Save the value of CFLAGS that the user specified. | |
4604 | SPECIFIED_CFLAGS="$CFLAGS" | |
4605 | ||
4606 | ac_ext=c | |
4607 | ac_cpp='$CPP $CPPFLAGS' | |
4608 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
4609 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
4610 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
4611 | if test -n "$ac_tool_prefix"; then | |
4612 | # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. | |
4613 | set dummy ${ac_tool_prefix}gcc; ac_word=$2 | |
4614 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4615 | $as_echo_n "checking for $ac_word... " >&6; } | |
5f64f7bd | 4616 | if test "${ac_cv_prog_CC+set}" = set; then : |
067d23c9 KY |
4617 | $as_echo_n "(cached) " >&6 |
4618 | else | |
4619 | if test -n "$CC"; then | |
4620 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
4621 | else | |
4622 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4623 | for as_dir in $PATH | |
4624 | do | |
4625 | IFS=$as_save_IFS | |
4626 | test -z "$as_dir" && as_dir=. | |
4627 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4628 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
4629 | ac_cv_prog_CC="${ac_tool_prefix}gcc" | |
4630 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4631 | break 2 | |
4632 | fi | |
4633 | done | |
4634 | done | |
4635 | IFS=$as_save_IFS | |
4636 | ||
4637 | fi | |
4638 | fi | |
4639 | CC=$ac_cv_prog_CC | |
4640 | if test -n "$CC"; then | |
4641 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
4642 | $as_echo "$CC" >&6; } | |
4643 | else | |
4644 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4645 | $as_echo "no" >&6; } | |
4646 | fi | |
4647 | ||
4648 | ||
4649 | fi | |
4650 | if test -z "$ac_cv_prog_CC"; then | |
4651 | ac_ct_CC=$CC | |
4652 | # Extract the first word of "gcc", so it can be a program name with args. | |
4653 | set dummy gcc; ac_word=$2 | |
4654 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4655 | $as_echo_n "checking for $ac_word... " >&6; } | |
5f64f7bd | 4656 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : |
067d23c9 KY |
4657 | $as_echo_n "(cached) " >&6 |
4658 | else | |
4659 | if test -n "$ac_ct_CC"; then | |
4660 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
4661 | else | |
4662 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4663 | for as_dir in $PATH | |
4664 | do | |
4665 | IFS=$as_save_IFS | |
4666 | test -z "$as_dir" && as_dir=. | |
4667 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4668 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
4669 | ac_cv_prog_ac_ct_CC="gcc" | |
4670 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4671 | break 2 | |
4672 | fi | |
4673 | done | |
4674 | done | |
4675 | IFS=$as_save_IFS | |
4676 | ||
4677 | fi | |
4678 | fi | |
4679 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
4680 | if test -n "$ac_ct_CC"; then | |
4681 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 | |
4682 | $as_echo "$ac_ct_CC" >&6; } | |
4683 | else | |
4684 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4685 | $as_echo "no" >&6; } | |
4686 | fi | |
4687 | ||
4688 | if test "x$ac_ct_CC" = x; then | |
4689 | CC="" | |
4690 | else | |
4691 | case $cross_compiling:$ac_tool_warned in | |
4692 | yes:) | |
4693 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
4694 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
4695 | ac_tool_warned=yes ;; | |
4696 | esac | |
4697 | CC=$ac_ct_CC | |
4698 | fi | |
4699 | else | |
4700 | CC="$ac_cv_prog_CC" | |
4701 | fi | |
4702 | ||
4703 | if test -z "$CC"; then | |
4704 | if test -n "$ac_tool_prefix"; then | |
4705 | # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. | |
4706 | set dummy ${ac_tool_prefix}cc; ac_word=$2 | |
4707 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4708 | $as_echo_n "checking for $ac_word... " >&6; } | |
5f64f7bd | 4709 | if test "${ac_cv_prog_CC+set}" = set; then : |
067d23c9 KY |
4710 | $as_echo_n "(cached) " >&6 |
4711 | else | |
4712 | if test -n "$CC"; then | |
4713 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
4714 | else | |
4715 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4716 | for as_dir in $PATH | |
4717 | do | |
4718 | IFS=$as_save_IFS | |
4719 | test -z "$as_dir" && as_dir=. | |
4720 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4721 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
4722 | ac_cv_prog_CC="${ac_tool_prefix}cc" | |
4723 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4724 | break 2 | |
4725 | fi | |
4726 | done | |
4727 | done | |
4728 | IFS=$as_save_IFS | |
4729 | ||
4730 | fi | |
4731 | fi | |
4732 | CC=$ac_cv_prog_CC | |
4733 | if test -n "$CC"; then | |
4734 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
4735 | $as_echo "$CC" >&6; } | |
4736 | else | |
4737 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4738 | $as_echo "no" >&6; } | |
4739 | fi | |
4740 | ||
4741 | ||
4742 | fi | |
4743 | fi | |
4744 | if test -z "$CC"; then | |
4745 | # Extract the first word of "cc", so it can be a program name with args. | |
4746 | set dummy cc; ac_word=$2 | |
4747 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4748 | $as_echo_n "checking for $ac_word... " >&6; } | |
5f64f7bd | 4749 | if test "${ac_cv_prog_CC+set}" = set; then : |
067d23c9 KY |
4750 | $as_echo_n "(cached) " >&6 |
4751 | else | |
4752 | if test -n "$CC"; then | |
4753 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
4754 | else | |
4755 | ac_prog_rejected=no | |
4756 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4757 | for as_dir in $PATH | |
4758 | do | |
4759 | IFS=$as_save_IFS | |
4760 | test -z "$as_dir" && as_dir=. | |
4761 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4762 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
4763 | if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then | |
4764 | ac_prog_rejected=yes | |
4765 | continue | |
4766 | fi | |
4767 | ac_cv_prog_CC="cc" | |
4768 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4769 | break 2 | |
4770 | fi | |
4771 | done | |
4772 | done | |
4773 | IFS=$as_save_IFS | |
4774 | ||
4775 | if test $ac_prog_rejected = yes; then | |
4776 | # We found a bogon in the path, so make sure we never use it. | |
4777 | set dummy $ac_cv_prog_CC | |
4778 | shift | |
4779 | if test $# != 0; then | |
4780 | # We chose a different compiler from the bogus one. | |
4781 | # However, it has the same basename, so the bogon will be chosen | |
4782 | # first if we set CC to just the basename; use the full file name. | |
4783 | shift | |
4784 | ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" | |
4785 | fi | |
4786 | fi | |
4787 | fi | |
4788 | fi | |
4789 | CC=$ac_cv_prog_CC | |
4790 | if test -n "$CC"; then | |
4791 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
4792 | $as_echo "$CC" >&6; } | |
4793 | else | |
4794 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4795 | $as_echo "no" >&6; } | |
4796 | fi | |
4797 | ||
4798 | ||
4799 | fi | |
4800 | if test -z "$CC"; then | |
4801 | if test -n "$ac_tool_prefix"; then | |
4802 | for ac_prog in cl.exe | |
4803 | do | |
4804 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | |
4805 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | |
4806 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4807 | $as_echo_n "checking for $ac_word... " >&6; } | |
5f64f7bd | 4808 | if test "${ac_cv_prog_CC+set}" = set; then : |
067d23c9 KY |
4809 | $as_echo_n "(cached) " >&6 |
4810 | else | |
4811 | if test -n "$CC"; then | |
4812 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
4813 | else | |
4814 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4815 | for as_dir in $PATH | |
4816 | do | |
4817 | IFS=$as_save_IFS | |
4818 | test -z "$as_dir" && as_dir=. | |
4819 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4820 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
4821 | ac_cv_prog_CC="$ac_tool_prefix$ac_prog" | |
4822 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4823 | break 2 | |
4824 | fi | |
4825 | done | |
4826 | done | |
4827 | IFS=$as_save_IFS | |
4828 | ||
4829 | fi | |
4830 | fi | |
4831 | CC=$ac_cv_prog_CC | |
4832 | if test -n "$CC"; then | |
4833 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
4834 | $as_echo "$CC" >&6; } | |
4835 | else | |
4836 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4837 | $as_echo "no" >&6; } | |
4838 | fi | |
4839 | ||
4840 | ||
4841 | test -n "$CC" && break | |
4842 | done | |
4843 | fi | |
4844 | if test -z "$CC"; then | |
4845 | ac_ct_CC=$CC | |
4846 | for ac_prog in cl.exe | |
4847 | do | |
4848 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
4849 | set dummy $ac_prog; ac_word=$2 | |
4850 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4851 | $as_echo_n "checking for $ac_word... " >&6; } | |
5f64f7bd | 4852 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : |
067d23c9 KY |
4853 | $as_echo_n "(cached) " >&6 |
4854 | else | |
4855 | if test -n "$ac_ct_CC"; then | |
4856 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
4857 | else | |
4858 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4859 | for as_dir in $PATH | |
4860 | do | |
4861 | IFS=$as_save_IFS | |
4862 | test -z "$as_dir" && as_dir=. | |
4863 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4864 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
4865 | ac_cv_prog_ac_ct_CC="$ac_prog" | |
4866 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4867 | break 2 | |
4868 | fi | |
4869 | done | |
4870 | done | |
4871 | IFS=$as_save_IFS | |
4872 | ||
4873 | fi | |
4874 | fi | |
4875 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
4876 | if test -n "$ac_ct_CC"; then | |
4877 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 | |
4878 | $as_echo "$ac_ct_CC" >&6; } | |
4879 | else | |
4880 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4881 | $as_echo "no" >&6; } | |
4882 | fi | |
4883 | ||
4884 | ||
4885 | test -n "$ac_ct_CC" && break | |
4886 | done | |
4887 | ||
4888 | if test "x$ac_ct_CC" = x; then | |
4889 | CC="" | |
4890 | else | |
4891 | case $cross_compiling:$ac_tool_warned in | |
4892 | yes:) | |
4893 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
4894 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
4895 | ac_tool_warned=yes ;; | |
4896 | esac | |
4897 | CC=$ac_ct_CC | |
4898 | fi | |
4899 | fi | |
4900 | ||
4901 | fi | |
4902 | ||
4903 | ||
4904 | test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
4905 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
5f64f7bd GM |
4906 | as_fn_error "no acceptable C compiler found in \$PATH |
4907 | See \`config.log' for more details." "$LINENO" 5; } | |
067d23c9 KY |
4908 | |
4909 | # Provide some information about the compiler. | |
4910 | $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 | |
4911 | set X $ac_compile | |
4912 | ac_compiler=$2 | |
4913 | for ac_option in --version -v -V -qversion; do | |
4914 | { { ac_try="$ac_compiler $ac_option >&5" | |
4915 | case "(($ac_try" in | |
4916 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4917 | *) ac_try_echo=$ac_try;; | |
4918 | esac | |
4919 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
4920 | $as_echo "$ac_try_echo"; } >&5 | |
4921 | (eval "$ac_compiler $ac_option >&5") 2>conftest.err | |
4922 | ac_status=$? | |
4923 | if test -s conftest.err; then | |
4924 | sed '10a\ | |
4925 | ... rest of stderr output deleted ... | |
4926 | 10q' conftest.err >conftest.er1 | |
4927 | cat conftest.er1 >&5 | |
4928 | fi | |
4929 | rm -f conftest.er1 conftest.err | |
4930 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
4931 | test $ac_status = 0; } | |
4932 | done | |
4933 | ||
4934 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4935 | /* end confdefs.h. */ | |
4936 | ||
4937 | int | |
4938 | main () | |
4939 | { | |
4940 | ||
4941 | ; | |
4942 | return 0; | |
4943 | } | |
4944 | _ACEOF | |
4945 | ac_clean_files_save=$ac_clean_files | |
4946 | ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" | |
4947 | # Try to create an executable without -o first, disregard a.out. | |
4948 | # It will help us diagnose broken compilers, and finding out an intuition | |
4949 | # of exeext. | |
4950 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 | |
4951 | $as_echo_n "checking whether the C compiler works... " >&6; } | |
4952 | ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` | |
4953 | ||
4954 | # The possible output files: | |
4955 | ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" | |
4956 | ||
4957 | ac_rmfiles= | |
4958 | for ac_file in $ac_files | |
4959 | do | |
4960 | case $ac_file in | |
4961 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; | |
4962 | * ) ac_rmfiles="$ac_rmfiles $ac_file";; | |
4963 | esac | |
4964 | done | |
4965 | rm -f $ac_rmfiles | |
4966 | ||
4967 | if { { ac_try="$ac_link_default" | |
4968 | case "(($ac_try" in | |
4969 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4970 | *) ac_try_echo=$ac_try;; | |
4971 | esac | |
4972 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
4973 | $as_echo "$ac_try_echo"; } >&5 | |
4974 | (eval "$ac_link_default") 2>&5 | |
4975 | ac_status=$? | |
4976 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
4977 | test $ac_status = 0; }; then : | |
4978 | # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. | |
4979 | # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' | |
4980 | # in a Makefile. We should not override ac_cv_exeext if it was cached, | |
4981 | # so that the user can short-circuit this test for compilers unknown to | |
4982 | # Autoconf. | |
4983 | for ac_file in $ac_files '' | |
4984 | do | |
4985 | test -f "$ac_file" || continue | |
4986 | case $ac_file in | |
4987 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) | |
4988 | ;; | |
4989 | [ab].out ) | |
4990 | # We found the default executable, but exeext='' is most | |
4991 | # certainly right. | |
4992 | break;; | |
4993 | *.* ) | |
4994 | if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; | |
4995 | then :; else | |
4996 | ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` | |
4997 | fi | |
4998 | # We set ac_cv_exeext here because the later test for it is not | |
4999 | # safe: cross compilers may not add the suffix if given an `-o' | |
5000 | # argument, so we may need to know it at that point already. | |
5001 | # Even if this section looks crufty: it has the advantage of | |
5002 | # actually working. | |
5003 | break;; | |
5004 | * ) | |
5005 | break;; | |
5006 | esac | |
5007 | done | |
5008 | test "$ac_cv_exeext" = no && ac_cv_exeext= | |
5009 | ||
5010 | else | |
5011 | ac_file='' | |
5012 | fi | |
5013 | if test -z "$ac_file"; then : | |
5014 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
5015 | $as_echo "no" >&6; } | |
5016 | $as_echo "$as_me: failed program was:" >&5 | |
5017 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5018 | ||
5019 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
5020 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
5f64f7bd GM |
5021 | { as_fn_set_status 77 |
5022 | as_fn_error "C compiler cannot create executables | |
5023 | See \`config.log' for more details." "$LINENO" 5; }; } | |
067d23c9 KY |
5024 | else |
5025 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
5026 | $as_echo "yes" >&6; } | |
5027 | fi | |
5028 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 | |
5029 | $as_echo_n "checking for C compiler default output file name... " >&6; } | |
5030 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 | |
5031 | $as_echo "$ac_file" >&6; } | |
5032 | ac_exeext=$ac_cv_exeext | |
5033 | ||
5034 | rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out | |
5035 | ac_clean_files=$ac_clean_files_save | |
5036 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 | |
5037 | $as_echo_n "checking for suffix of executables... " >&6; } | |
5038 | if { { ac_try="$ac_link" | |
5039 | case "(($ac_try" in | |
5040 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5041 | *) ac_try_echo=$ac_try;; | |
5042 | esac | |
5043 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
5044 | $as_echo "$ac_try_echo"; } >&5 | |
5045 | (eval "$ac_link") 2>&5 | |
5046 | ac_status=$? | |
5047 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
5048 | test $ac_status = 0; }; then : | |
5049 | # If both `conftest.exe' and `conftest' are `present' (well, observable) | |
5050 | # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will | |
5051 | # work properly (i.e., refer to `conftest.exe'), while it won't with | |
5052 | # `rm'. | |
5053 | for ac_file in conftest.exe conftest conftest.*; do | |
5054 | test -f "$ac_file" || continue | |
5055 | case $ac_file in | |
5056 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; | |
5057 | *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` | |
5058 | break;; | |
5059 | * ) break;; | |
5060 | esac | |
5061 | done | |
5062 | else | |
5063 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
5064 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
5f64f7bd GM |
5065 | as_fn_error "cannot compute suffix of executables: cannot compile and link |
5066 | See \`config.log' for more details." "$LINENO" 5; } | |
067d23c9 KY |
5067 | fi |
5068 | rm -f conftest conftest$ac_cv_exeext | |
5069 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 | |
5070 | $as_echo "$ac_cv_exeext" >&6; } | |
5071 | ||
5072 | rm -f conftest.$ac_ext | |
5073 | EXEEXT=$ac_cv_exeext | |
5074 | ac_exeext=$EXEEXT | |
5075 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5076 | /* end confdefs.h. */ | |
5077 | #include <stdio.h> | |
5078 | int | |
5079 | main () | |
5080 | { | |
5081 | FILE *f = fopen ("conftest.out", "w"); | |
5082 | return ferror (f) || fclose (f) != 0; | |
5083 | ||
5084 | ; | |
5085 | return 0; | |
5086 | } | |
5087 | _ACEOF | |
5088 | ac_clean_files="$ac_clean_files conftest.out" | |
5089 | # Check that the compiler produces executables we can run. If not, either | |
5090 | # the compiler is broken, or we cross compile. | |
5091 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 | |
5092 | $as_echo_n "checking whether we are cross compiling... " >&6; } | |
5093 | if test "$cross_compiling" != yes; then | |
5094 | { { ac_try="$ac_link" | |
5095 | case "(($ac_try" in | |
5096 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5097 | *) ac_try_echo=$ac_try;; | |
5098 | esac | |
5099 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
5100 | $as_echo "$ac_try_echo"; } >&5 | |
5101 | (eval "$ac_link") 2>&5 | |
5102 | ac_status=$? | |
5103 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
5104 | test $ac_status = 0; } | |
5105 | if { ac_try='./conftest$ac_cv_exeext' | |
5106 | { { case "(($ac_try" in | |
5107 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5108 | *) ac_try_echo=$ac_try;; | |
5109 | esac | |
5110 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
5111 | $as_echo "$ac_try_echo"; } >&5 | |
5112 | (eval "$ac_try") 2>&5 | |
5113 | ac_status=$? | |
5114 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
5115 | test $ac_status = 0; }; }; then | |
5116 | cross_compiling=no | |
5117 | else | |
5118 | if test "$cross_compiling" = maybe; then | |
5119 | cross_compiling=yes | |
5120 | else | |
5121 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
5122 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
5f64f7bd | 5123 | as_fn_error "cannot run C compiled programs. |
067d23c9 | 5124 | If you meant to cross compile, use \`--host'. |
5f64f7bd | 5125 | See \`config.log' for more details." "$LINENO" 5; } |
067d23c9 KY |
5126 | fi |
5127 | fi | |
5128 | fi | |
5129 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 | |
5130 | $as_echo "$cross_compiling" >&6; } | |
5131 | ||
5132 | rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out | |
5133 | ac_clean_files=$ac_clean_files_save | |
5134 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 | |
5135 | $as_echo_n "checking for suffix of object files... " >&6; } | |
5f64f7bd | 5136 | if test "${ac_cv_objext+set}" = set; then : |
067d23c9 KY |
5137 | $as_echo_n "(cached) " >&6 |
5138 | else | |
5139 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5140 | /* end confdefs.h. */ | |
5141 | ||
5142 | int | |
5143 | main () | |
5144 | { | |
5145 | ||
5146 | ; | |
5147 | return 0; | |
5148 | } | |
5149 | _ACEOF | |
5150 | rm -f conftest.o conftest.obj | |
5151 | if { { ac_try="$ac_compile" | |
5152 | case "(($ac_try" in | |
5153 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5154 | *) ac_try_echo=$ac_try;; | |
5155 | esac | |
5156 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
5157 | $as_echo "$ac_try_echo"; } >&5 | |
5158 | (eval "$ac_compile") 2>&5 | |
5159 | ac_status=$? | |
5160 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
5161 | test $ac_status = 0; }; then : | |
5162 | for ac_file in conftest.o conftest.obj conftest.*; do | |
5163 | test -f "$ac_file" || continue; | |
5164 | case $ac_file in | |
5165 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; | |
5166 | *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` | |
5167 | break;; | |
5168 | esac | |
5169 | done | |
5170 | else | |
5171 | $as_echo "$as_me: failed program was:" >&5 | |
5172 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5173 | ||
5174 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
5175 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
5f64f7bd GM |
5176 | as_fn_error "cannot compute suffix of object files: cannot compile |
5177 | See \`config.log' for more details." "$LINENO" 5; } | |
067d23c9 KY |
5178 | fi |
5179 | rm -f conftest.$ac_cv_objext conftest.$ac_ext | |
5180 | fi | |
5181 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 | |
5182 | $as_echo "$ac_cv_objext" >&6; } | |
5183 | OBJEXT=$ac_cv_objext | |
5184 | ac_objext=$OBJEXT | |
5185 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 | |
5186 | $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } | |
5f64f7bd | 5187 | if test "${ac_cv_c_compiler_gnu+set}" = set; then : |
067d23c9 KY |
5188 | $as_echo_n "(cached) " >&6 |
5189 | else | |
5190 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5191 | /* end confdefs.h. */ | |
5192 | ||
5193 | int | |
5194 | main () | |
5195 | { | |
5196 | #ifndef __GNUC__ | |
5197 | choke me | |
5198 | #endif | |
5199 | ||
5200 | ; | |
5201 | return 0; | |
5202 | } | |
5203 | _ACEOF | |
5204 | if ac_fn_c_try_compile "$LINENO"; then : | |
5205 | ac_compiler_gnu=yes | |
5206 | else | |
5207 | ac_compiler_gnu=no | |
5208 | fi | |
5209 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5210 | ac_cv_c_compiler_gnu=$ac_compiler_gnu | |
5211 | ||
5212 | fi | |
5213 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 | |
5214 | $as_echo "$ac_cv_c_compiler_gnu" >&6; } | |
5215 | if test $ac_compiler_gnu = yes; then | |
5216 | GCC=yes | |
5217 | else | |
5218 | GCC= | |
5219 | fi | |
5220 | ac_test_CFLAGS=${CFLAGS+set} | |
5221 | ac_save_CFLAGS=$CFLAGS | |
5222 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 | |
5223 | $as_echo_n "checking whether $CC accepts -g... " >&6; } | |
5f64f7bd | 5224 | if test "${ac_cv_prog_cc_g+set}" = set; then : |
067d23c9 KY |
5225 | $as_echo_n "(cached) " >&6 |
5226 | else | |
5227 | ac_save_c_werror_flag=$ac_c_werror_flag | |
5228 | ac_c_werror_flag=yes | |
5229 | ac_cv_prog_cc_g=no | |
5230 | CFLAGS="-g" | |
5231 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5232 | /* end confdefs.h. */ | |
5233 | ||
5234 | int | |
5235 | main () | |
5236 | { | |
5237 | ||
5238 | ; | |
5239 | return 0; | |
5240 | } | |
5241 | _ACEOF | |
5242 | if ac_fn_c_try_compile "$LINENO"; then : | |
5243 | ac_cv_prog_cc_g=yes | |
5244 | else | |
5245 | CFLAGS="" | |
5246 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5247 | /* end confdefs.h. */ | |
5248 | ||
5249 | int | |
5250 | main () | |
5251 | { | |
5252 | ||
5253 | ; | |
5254 | return 0; | |
5255 | } | |
5256 | _ACEOF | |
5257 | if ac_fn_c_try_compile "$LINENO"; then : | |
5258 | ||
5259 | else | |
5260 | ac_c_werror_flag=$ac_save_c_werror_flag | |
5261 | CFLAGS="-g" | |
5262 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5263 | /* end confdefs.h. */ | |
5264 | ||
5265 | int | |
5266 | main () | |
5267 | { | |
5268 | ||
5269 | ; | |
5270 | return 0; | |
5271 | } | |
5272 | _ACEOF | |
5273 | if ac_fn_c_try_compile "$LINENO"; then : | |
5274 | ac_cv_prog_cc_g=yes | |
5275 | fi | |
5276 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5277 | fi | |
5278 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5279 | fi | |
5280 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5281 | ac_c_werror_flag=$ac_save_c_werror_flag | |
5282 | fi | |
5283 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 | |
5284 | $as_echo "$ac_cv_prog_cc_g" >&6; } | |
5285 | if test "$ac_test_CFLAGS" = set; then | |
5286 | CFLAGS=$ac_save_CFLAGS | |
5287 | elif test $ac_cv_prog_cc_g = yes; then | |
5288 | if test "$GCC" = yes; then | |
5289 | CFLAGS="-g -O2" | |
5290 | else | |
5291 | CFLAGS="-g" | |
5292 | fi | |
5293 | else | |
5294 | if test "$GCC" = yes; then | |
5295 | CFLAGS="-O2" | |
5296 | else | |
5297 | CFLAGS= | |
5298 | fi | |
5299 | fi | |
5300 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 | |
5301 | $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } | |
5f64f7bd | 5302 | if test "${ac_cv_prog_cc_c89+set}" = set; then : |
067d23c9 KY |
5303 | $as_echo_n "(cached) " >&6 |
5304 | else | |
5305 | ac_cv_prog_cc_c89=no | |
5306 | ac_save_CC=$CC | |
5307 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5308 | /* end confdefs.h. */ | |
5309 | #include <stdarg.h> | |
5310 | #include <stdio.h> | |
5311 | #include <sys/types.h> | |
5312 | #include <sys/stat.h> | |
5313 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
5314 | struct buf { int x; }; | |
5315 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
5316 | static char *e (p, i) | |
5317 | char **p; | |
5318 | int i; | |
5319 | { | |
5320 | return p[i]; | |
5321 | } | |
5322 | static char *f (char * (*g) (char **, int), char **p, ...) | |
5323 | { | |
5324 | char *s; | |
5325 | va_list v; | |
5326 | va_start (v,p); | |
5327 | s = g (p, va_arg (v,int)); | |
5328 | va_end (v); | |
5329 | return s; | |
5330 | } | |
5331 | ||
5332 | /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has | |
5333 | function prototypes and stuff, but not '\xHH' hex character constants. | |
5334 | These don't provoke an error unfortunately, instead are silently treated | |
5335 | as 'x'. The following induces an error, until -std is added to get | |
5336 | proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an | |
5337 | array size at least. It's necessary to write '\x00'==0 to get something | |
5338 | that's true only with -std. */ | |
5339 | int osf4_cc_array ['\x00' == 0 ? 1 : -1]; | |
5340 | ||
5341 | /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters | |
5342 | inside strings and character constants. */ | |
5343 | #define FOO(x) 'x' | |
5344 | int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; | |
5345 | ||
5346 | int test (int i, double x); | |
5347 | struct s1 {int (*f) (int a);}; | |
5348 | struct s2 {int (*f) (double a);}; | |
5349 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
5350 | int argc; | |
5351 | char **argv; | |
5352 | int | |
5353 | main () | |
5354 | { | |
5355 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; | |
5356 | ; | |
5357 | return 0; | |
5358 | } | |
5359 | _ACEOF | |
5360 | for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ | |
5361 | -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
5362 | do | |
5363 | CC="$ac_save_CC $ac_arg" | |
5364 | if ac_fn_c_try_compile "$LINENO"; then : | |
5365 | ac_cv_prog_cc_c89=$ac_arg | |
5366 | fi | |
5367 | rm -f core conftest.err conftest.$ac_objext | |
5368 | test "x$ac_cv_prog_cc_c89" != "xno" && break | |
5369 | done | |
743c80a7 PE |
5370 | rm -f conftest.$ac_ext |
5371 | CC=$ac_save_CC | |
5372 | ||
5373 | fi | |
5374 | # AC_CACHE_VAL | |
5375 | case "x$ac_cv_prog_cc_c89" in | |
5376 | x) | |
5377 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 | |
5378 | $as_echo "none needed" >&6; } ;; | |
5379 | xno) | |
5380 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 | |
5381 | $as_echo "unsupported" >&6; } ;; | |
5382 | *) | |
5383 | CC="$CC $ac_cv_prog_cc_c89" | |
5384 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 | |
5385 | $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; | |
5386 | esac | |
5387 | if test "x$ac_cv_prog_cc_c89" != xno; then : | |
5388 | ||
5389 | fi | |
5390 | ||
5391 | ac_ext=c | |
5392 | ac_cpp='$CPP $CPPFLAGS' | |
5393 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
5394 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
5395 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
5396 | DEPDIR="${am__leading_dot}deps" | |
5397 | ||
5398 | ac_config_commands="$ac_config_commands depfiles" | |
5399 | ||
5400 | ||
5401 | am_make=${MAKE-make} | |
5402 | cat > confinc << 'END' | |
5403 | am__doit: | |
5404 | @echo this is the am__doit target | |
5405 | .PHONY: am__doit | |
5406 | END | |
5407 | # If we don't find an include directive, just comment out the code. | |
5408 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 | |
5409 | $as_echo_n "checking for style of include used by $am_make... " >&6; } | |
5410 | am__include="#" | |
5411 | am__quote= | |
5412 | _am_result=none | |
5413 | # First try GNU make style include. | |
5414 | echo "include confinc" > confmf | |
5415 | # Ignore all kinds of additional output from `make'. | |
5416 | case `$am_make -s -f confmf 2> /dev/null` in #( | |
5417 | *the\ am__doit\ target*) | |
5418 | am__include=include | |
5419 | am__quote= | |
5420 | _am_result=GNU | |
5421 | ;; | |
5422 | esac | |
5423 | # Now try BSD make style include. | |
5424 | if test "$am__include" = "#"; then | |
5425 | echo '.include "confinc"' > confmf | |
5426 | case `$am_make -s -f confmf 2> /dev/null` in #( | |
5427 | *the\ am__doit\ target*) | |
5428 | am__include=.include | |
5429 | am__quote="\"" | |
5430 | _am_result=BSD | |
5431 | ;; | |
5432 | esac | |
5433 | fi | |
5434 | ||
5435 | ||
5436 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 | |
5437 | $as_echo "$_am_result" >&6; } | |
5438 | rm -f confinc confmf | |
5439 | ||
5440 | # Check whether --enable-dependency-tracking was given. | |
5441 | if test "${enable_dependency_tracking+set}" = set; then : | |
5442 | enableval=$enable_dependency_tracking; | |
5443 | fi | |
5444 | ||
5445 | if test "x$enable_dependency_tracking" != xno; then | |
5446 | am_depcomp="$ac_aux_dir/depcomp" | |
5447 | AMDEPBACKSLASH='\' | |
5448 | fi | |
5449 | if test "x$enable_dependency_tracking" != xno; then | |
5450 | AMDEP_TRUE= | |
5451 | AMDEP_FALSE='#' | |
5452 | else | |
5453 | AMDEP_TRUE='#' | |
5454 | AMDEP_FALSE= | |
5455 | fi | |
5456 | ||
5457 | ||
5458 | ||
5459 | depcc="$CC" am_compiler_list= | |
5460 | ||
5461 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 | |
5462 | $as_echo_n "checking dependency style of $depcc... " >&6; } | |
5f64f7bd | 5463 | if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : |
743c80a7 PE |
5464 | $as_echo_n "(cached) " >&6 |
5465 | else | |
5466 | if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then | |
5467 | # We make a subdir and do the tests there. Otherwise we can end up | |
5468 | # making bogus files that we don't know about and never remove. For | |
5469 | # instance it was reported that on HP-UX the gcc test will end up | |
5470 | # making a dummy file named `D' -- because `-MD' means `put the output | |
5471 | # in D'. | |
5472 | mkdir conftest.dir | |
5473 | # Copy depcomp to subdir because otherwise we won't find it if we're | |
5474 | # using a relative directory. | |
5475 | cp "$am_depcomp" conftest.dir | |
5476 | cd conftest.dir | |
5477 | # We will build objects and dependencies in a subdirectory because | |
5478 | # it helps to detect inapplicable dependency modes. For instance | |
5479 | # both Tru64's cc and ICC support -MD to output dependencies as a | |
5480 | # side effect of compilation, but ICC will put the dependencies in | |
5481 | # the current directory while Tru64 will put them in the object | |
5482 | # directory. | |
5483 | mkdir sub | |
5484 | ||
5485 | am_cv_CC_dependencies_compiler_type=none | |
5486 | if test "$am_compiler_list" = ""; then | |
5487 | am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` | |
5488 | fi | |
5489 | am__universal=false | |
5490 | case " $depcc " in #( | |
5491 | *\ -arch\ *\ -arch\ *) am__universal=true ;; | |
5492 | esac | |
5493 | ||
5494 | for depmode in $am_compiler_list; do | |
5495 | # Setup a source with many dependencies, because some compilers | |
5496 | # like to wrap large dependency lists on column 80 (with \), and | |
5497 | # we should not choose a depcomp mode which is confused by this. | |
5498 | # | |
5499 | # We need to recreate these files for each test, as the compiler may | |
5500 | # overwrite some of them when testing with obscure command lines. | |
5501 | # This happens at least with the AIX C compiler. | |
5502 | : > sub/conftest.c | |
5503 | for i in 1 2 3 4 5 6; do | |
5504 | echo '#include "conftst'$i'.h"' >> sub/conftest.c | |
5505 | # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with | |
5506 | # Solaris 8's {/usr,}/bin/sh. | |
5507 | touch sub/conftst$i.h | |
5508 | done | |
5509 | echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf | |
5510 | ||
5511 | # We check with `-c' and `-o' for the sake of the "dashmstdout" | |
5512 | # mode. It turns out that the SunPro C++ compiler does not properly | |
5513 | # handle `-M -o', and we need to detect this. Also, some Intel | |
5514 | # versions had trouble with output in subdirs | |
5515 | am__obj=sub/conftest.${OBJEXT-o} | |
5516 | am__minus_obj="-o $am__obj" | |
5517 | case $depmode in | |
5518 | gcc) | |
5519 | # This depmode causes a compiler race in universal mode. | |
5520 | test "$am__universal" = false || continue | |
5521 | ;; | |
5522 | nosideeffect) | |
5523 | # after this tag, mechanisms are not by side-effect, so they'll | |
5524 | # only be used when explicitly requested | |
5525 | if test "x$enable_dependency_tracking" = xyes; then | |
5526 | continue | |
5527 | else | |
5528 | break | |
5529 | fi | |
5530 | ;; | |
5531 | msvisualcpp | msvcmsys) | |
5532 | # This compiler won't grok `-c -o', but also, the minuso test has | |
5533 | # not run yet. These depmodes are late enough in the game, and | |
5534 | # so weak that their functioning should not be impacted. | |
5535 | am__obj=conftest.${OBJEXT-o} | |
5536 | am__minus_obj= | |
5537 | ;; | |
5538 | none) break ;; | |
5539 | esac | |
5540 | if depmode=$depmode \ | |
5541 | source=sub/conftest.c object=$am__obj \ | |
5542 | depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ | |
5543 | $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ | |
5544 | >/dev/null 2>conftest.err && | |
5545 | grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && | |
5546 | grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && | |
5547 | grep $am__obj sub/conftest.Po > /dev/null 2>&1 && | |
5548 | ${MAKE-make} -s -f confmf > /dev/null 2>&1; then | |
5549 | # icc doesn't choke on unknown options, it will just issue warnings | |
5550 | # or remarks (even with -Werror). So we grep stderr for any message | |
5551 | # that says an option was ignored or not supported. | |
5552 | # When given -MP, icc 7.0 and 7.1 complain thusly: | |
5553 | # icc: Command line warning: ignoring option '-M'; no argument required | |
5554 | # The diagnosis changed in icc 8.0: | |
5555 | # icc: Command line remark: option '-MP' not supported | |
5556 | if (grep 'ignoring option' conftest.err || | |
5557 | grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else | |
5558 | am_cv_CC_dependencies_compiler_type=$depmode | |
5559 | break | |
5560 | fi | |
5561 | fi | |
5562 | done | |
5563 | ||
5564 | cd .. | |
5565 | rm -rf conftest.dir | |
5566 | else | |
5567 | am_cv_CC_dependencies_compiler_type=none | |
5568 | fi | |
5569 | ||
5570 | fi | |
5571 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 | |
5572 | $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } | |
5573 | CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type | |
5574 | ||
5575 | if | |
5576 | test "x$enable_dependency_tracking" != xno \ | |
5577 | && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then | |
5578 | am__fastdepCC_TRUE= | |
5579 | am__fastdepCC_FALSE='#' | |
5580 | else | |
5581 | am__fastdepCC_TRUE='#' | |
5582 | am__fastdepCC_FALSE= | |
5583 | fi | |
5584 | ||
5585 | ||
5586 | if test "x$CC" != xcc; then | |
5587 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5 | |
5588 | $as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; } | |
5589 | else | |
5590 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5 | |
5591 | $as_echo_n "checking whether cc understands -c and -o together... " >&6; } | |
5592 | fi | |
5593 | set dummy $CC; ac_cc=`$as_echo "$2" | | |
5594 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` | |
5f64f7bd | 5595 | if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then : |
743c80a7 PE |
5596 | $as_echo_n "(cached) " >&6 |
5597 | else | |
5598 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5599 | /* end confdefs.h. */ | |
5600 | ||
5601 | int | |
5602 | main () | |
5603 | { | |
5604 | ||
5605 | ; | |
5606 | return 0; | |
5607 | } | |
5608 | _ACEOF | |
5609 | # Make sure it works both with $CC and with simple cc. | |
5610 | # We do the test twice because some compilers refuse to overwrite an | |
5611 | # existing .o file with -o, though they will create one. | |
5612 | ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5' | |
5613 | rm -f conftest2.* | |
5614 | if { { case "(($ac_try" in | |
5615 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5616 | *) ac_try_echo=$ac_try;; | |
5617 | esac | |
5618 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
5619 | $as_echo "$ac_try_echo"; } >&5 | |
5620 | (eval "$ac_try") 2>&5 | |
5621 | ac_status=$? | |
5622 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
5623 | test $ac_status = 0; } && | |
5624 | test -f conftest2.$ac_objext && { { case "(($ac_try" in | |
5625 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5626 | *) ac_try_echo=$ac_try;; | |
5627 | esac | |
5628 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
5629 | $as_echo "$ac_try_echo"; } >&5 | |
5630 | (eval "$ac_try") 2>&5 | |
5631 | ac_status=$? | |
5632 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
5633 | test $ac_status = 0; }; | |
5634 | then | |
5635 | eval ac_cv_prog_cc_${ac_cc}_c_o=yes | |
5636 | if test "x$CC" != xcc; then | |
5637 | # Test first that cc exists at all. | |
5638 | if { ac_try='cc -c conftest.$ac_ext >&5' | |
5639 | { { case "(($ac_try" in | |
5640 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5641 | *) ac_try_echo=$ac_try;; | |
5642 | esac | |
5643 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
5644 | $as_echo "$ac_try_echo"; } >&5 | |
5645 | (eval "$ac_try") 2>&5 | |
5646 | ac_status=$? | |
5647 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
5648 | test $ac_status = 0; }; }; then | |
5649 | ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5' | |
5650 | rm -f conftest2.* | |
5651 | if { { case "(($ac_try" in | |
5652 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5653 | *) ac_try_echo=$ac_try;; | |
5654 | esac | |
5655 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
5656 | $as_echo "$ac_try_echo"; } >&5 | |
5657 | (eval "$ac_try") 2>&5 | |
5658 | ac_status=$? | |
5659 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
5660 | test $ac_status = 0; } && | |
5661 | test -f conftest2.$ac_objext && { { case "(($ac_try" in | |
5662 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5663 | *) ac_try_echo=$ac_try;; | |
5664 | esac | |
5665 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
5666 | $as_echo "$ac_try_echo"; } >&5 | |
5667 | (eval "$ac_try") 2>&5 | |
5668 | ac_status=$? | |
5669 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
5670 | test $ac_status = 0; }; | |
5671 | then | |
5672 | # cc works too. | |
5673 | : | |
5674 | else | |
5675 | # cc exists but doesn't like -o. | |
5676 | eval ac_cv_prog_cc_${ac_cc}_c_o=no | |
5677 | fi | |
5678 | fi | |
5679 | fi | |
5680 | else | |
5681 | eval ac_cv_prog_cc_${ac_cc}_c_o=no | |
5682 | fi | |
5683 | rm -f core conftest* | |
5684 | ||
5685 | fi | |
5686 | if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then | |
5687 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
5688 | $as_echo "yes" >&6; } | |
5689 | else | |
5690 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
5691 | $as_echo "no" >&6; } | |
5692 | ||
5693 | $as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h | |
5694 | ||
5695 | fi | |
5696 | ||
5697 | # FIXME: we rely on the cache variable name because | |
5698 | # there is no other way. | |
5699 | set dummy $CC | |
5700 | am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` | |
5701 | eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o | |
5702 | if test "$am_t" != yes; then | |
5703 | # Losing compiler, so override with the script. | |
5704 | # FIXME: It is wrong to rewrite CC. | |
5705 | # But if we don't then we get into trouble of one sort or another. | |
5706 | # A longer-term fix would be to have automake use am__CC in this case, | |
5707 | # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" | |
5708 | CC="$am_aux_dir/compile $CC" | |
5709 | fi | |
5710 | ||
5711 | ||
5712 | ||
5713 | # Initialize gnulib right after verifying that the C compiler works. | |
5714 | if test -n "$ac_tool_prefix"; then | |
5715 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
5716 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
5717 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
5718 | $as_echo_n "checking for $ac_word... " >&6; } | |
5f64f7bd | 5719 | if test "${ac_cv_prog_RANLIB+set}" = set; then : |
743c80a7 PE |
5720 | $as_echo_n "(cached) " >&6 |
5721 | else | |
5722 | if test -n "$RANLIB"; then | |
5723 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
5724 | else | |
5725 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5726 | for as_dir in $PATH | |
5727 | do | |
5728 | IFS=$as_save_IFS | |
5729 | test -z "$as_dir" && as_dir=. | |
5730 | for ac_exec_ext in '' $ac_executable_extensions; do | |
5731 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
5732 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" | |
5733 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
5734 | break 2 | |
5735 | fi | |
5736 | done | |
5737 | done | |
5738 | IFS=$as_save_IFS | |
5739 | ||
5740 | fi | |
5741 | fi | |
5742 | RANLIB=$ac_cv_prog_RANLIB | |
5743 | if test -n "$RANLIB"; then | |
5744 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 | |
5745 | $as_echo "$RANLIB" >&6; } | |
5746 | else | |
5747 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
5748 | $as_echo "no" >&6; } | |
5749 | fi | |
5750 | ||
5751 | ||
5752 | fi | |
5753 | if test -z "$ac_cv_prog_RANLIB"; then | |
5754 | ac_ct_RANLIB=$RANLIB | |
5755 | # Extract the first word of "ranlib", so it can be a program name with args. | |
5756 | set dummy ranlib; ac_word=$2 | |
5757 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
5758 | $as_echo_n "checking for $ac_word... " >&6; } | |
5f64f7bd | 5759 | if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : |
743c80a7 PE |
5760 | $as_echo_n "(cached) " >&6 |
5761 | else | |
5762 | if test -n "$ac_ct_RANLIB"; then | |
5763 | ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. | |
5764 | else | |
5765 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5766 | for as_dir in $PATH | |
5767 | do | |
5768 | IFS=$as_save_IFS | |
5769 | test -z "$as_dir" && as_dir=. | |
5770 | for ac_exec_ext in '' $ac_executable_extensions; do | |
5771 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
5772 | ac_cv_prog_ac_ct_RANLIB="ranlib" | |
5773 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
5774 | break 2 | |
5775 | fi | |
5776 | done | |
5777 | done | |
5778 | IFS=$as_save_IFS | |
067d23c9 KY |
5779 | |
5780 | fi | |
743c80a7 PE |
5781 | fi |
5782 | ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB | |
5783 | if test -n "$ac_ct_RANLIB"; then | |
5784 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 | |
5785 | $as_echo "$ac_ct_RANLIB" >&6; } | |
5786 | else | |
5787 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
5788 | $as_echo "no" >&6; } | |
5789 | fi | |
067d23c9 | 5790 | |
743c80a7 PE |
5791 | if test "x$ac_ct_RANLIB" = x; then |
5792 | RANLIB=":" | |
5793 | else | |
5794 | case $cross_compiling:$ac_tool_warned in | |
5795 | yes:) | |
5796 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
5797 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
5798 | ac_tool_warned=yes ;; | |
5799 | esac | |
5800 | RANLIB=$ac_ct_RANLIB | |
5801 | fi | |
5802 | else | |
5803 | RANLIB="$ac_cv_prog_RANLIB" | |
067d23c9 KY |
5804 | fi |
5805 | ||
743c80a7 | 5806 | |
067d23c9 KY |
5807 | ac_ext=c |
5808 | ac_cpp='$CPP $CPPFLAGS' | |
5809 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
5810 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
5811 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
5812 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 | |
5813 | $as_echo_n "checking how to run the C preprocessor... " >&6; } | |
5814 | # On Suns, sometimes $CPP names a directory. | |
5815 | if test -n "$CPP" && test -d "$CPP"; then | |
5816 | CPP= | |
5817 | fi | |
5818 | if test -z "$CPP"; then | |
5f64f7bd | 5819 | if test "${ac_cv_prog_CPP+set}" = set; then : |
067d23c9 KY |
5820 | $as_echo_n "(cached) " >&6 |
5821 | else | |
5822 | # Double quotes because CPP needs to be expanded | |
5823 | for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" | |
5824 | do | |
5825 | ac_preproc_ok=false | |
5826 | for ac_c_preproc_warn_flag in '' yes | |
5827 | do | |
5828 | # Use a header file that comes with gcc, so configuring glibc | |
5829 | # with a fresh cross-compiler works. | |
5830 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
5831 | # <limits.h> exists even on freestanding compilers. | |
5832 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
5833 | # not just through cpp. "Syntax error" is here to catch this case. | |
5834 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5835 | /* end confdefs.h. */ | |
5836 | #ifdef __STDC__ | |
5837 | # include <limits.h> | |
5838 | #else | |
5839 | # include <assert.h> | |
5840 | #endif | |
5841 | Syntax error | |
5842 | _ACEOF | |
5843 | if ac_fn_c_try_cpp "$LINENO"; then : | |
5844 | ||
5845 | else | |
5846 | # Broken: fails on valid input. | |
5847 | continue | |
5848 | fi | |
5f64f7bd | 5849 | rm -f conftest.err conftest.$ac_ext |
067d23c9 KY |
5850 | |
5851 | # OK, works on sane cases. Now check whether nonexistent headers | |
5852 | # can be detected and how. | |
5853 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5854 | /* end confdefs.h. */ | |
5855 | #include <ac_nonexistent.h> | |
5856 | _ACEOF | |
5857 | if ac_fn_c_try_cpp "$LINENO"; then : | |
5858 | # Broken: success on invalid input. | |
5859 | continue | |
5860 | else | |
5861 | # Passes both tests. | |
5862 | ac_preproc_ok=: | |
5863 | break | |
5864 | fi | |
5f64f7bd | 5865 | rm -f conftest.err conftest.$ac_ext |
067d23c9 KY |
5866 | |
5867 | done | |
5868 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
5f64f7bd | 5869 | rm -f conftest.err conftest.$ac_ext |
067d23c9 KY |
5870 | if $ac_preproc_ok; then : |
5871 | break | |
5872 | fi | |
5873 | ||
5874 | done | |
5875 | ac_cv_prog_CPP=$CPP | |
5876 | ||
5877 | fi | |
5878 | CPP=$ac_cv_prog_CPP | |
5879 | else | |
5880 | ac_cv_prog_CPP=$CPP | |
5881 | fi | |
5882 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 | |
5883 | $as_echo "$CPP" >&6; } | |
5884 | ac_preproc_ok=false | |
5885 | for ac_c_preproc_warn_flag in '' yes | |
5886 | do | |
5887 | # Use a header file that comes with gcc, so configuring glibc | |
5888 | # with a fresh cross-compiler works. | |
5889 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
5890 | # <limits.h> exists even on freestanding compilers. | |
5891 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
5892 | # not just through cpp. "Syntax error" is here to catch this case. | |
5893 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5894 | /* end confdefs.h. */ | |
5895 | #ifdef __STDC__ | |
5896 | # include <limits.h> | |
5897 | #else | |
5898 | # include <assert.h> | |
5899 | #endif | |
5900 | Syntax error | |
5901 | _ACEOF | |
5902 | if ac_fn_c_try_cpp "$LINENO"; then : | |
5903 | ||
5904 | else | |
5905 | # Broken: fails on valid input. | |
5906 | continue | |
5907 | fi | |
5f64f7bd | 5908 | rm -f conftest.err conftest.$ac_ext |
067d23c9 KY |
5909 | |
5910 | # OK, works on sane cases. Now check whether nonexistent headers | |
5911 | # can be detected and how. | |
5912 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5913 | /* end confdefs.h. */ | |
5914 | #include <ac_nonexistent.h> | |
5915 | _ACEOF | |
5916 | if ac_fn_c_try_cpp "$LINENO"; then : | |
5917 | # Broken: success on invalid input. | |
5918 | continue | |
5919 | else | |
5920 | # Passes both tests. | |
5921 | ac_preproc_ok=: | |
5922 | break | |
5923 | fi | |
5f64f7bd | 5924 | rm -f conftest.err conftest.$ac_ext |
067d23c9 KY |
5925 | |
5926 | done | |
5927 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
5f64f7bd | 5928 | rm -f conftest.err conftest.$ac_ext |
067d23c9 KY |
5929 | if $ac_preproc_ok; then : |
5930 | ||
5931 | else | |
5932 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
5933 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
5f64f7bd GM |
5934 | as_fn_error "C preprocessor \"$CPP\" fails sanity check |
5935 | See \`config.log' for more details." "$LINENO" 5; } | |
067d23c9 KY |
5936 | fi |
5937 | ||
5938 | ac_ext=c | |
5939 | ac_cpp='$CPP $CPPFLAGS' | |
5940 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
5941 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
5942 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
5943 | ||
5944 | ||
5945 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 | |
5946 | $as_echo_n "checking for grep that handles long lines and -e... " >&6; } | |
5f64f7bd | 5947 | if test "${ac_cv_path_GREP+set}" = set; then : |
067d23c9 KY |
5948 | $as_echo_n "(cached) " >&6 |
5949 | else | |
5950 | if test -z "$GREP"; then | |
5951 | ac_path_GREP_found=false | |
5952 | # Loop through the user's path and test for each of PROGNAME-LIST | |
5953 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5954 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
5955 | do | |
5956 | IFS=$as_save_IFS | |
5957 | test -z "$as_dir" && as_dir=. | |
5958 | for ac_prog in grep ggrep; do | |
5959 | for ac_exec_ext in '' $ac_executable_extensions; do | |
5960 | ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" | |
5961 | { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue | |
5962 | # Check for GNU ac_path_GREP and select it if it is found. | |
5963 | # Check for GNU $ac_path_GREP | |
5964 | case `"$ac_path_GREP" --version 2>&1` in | |
5965 | *GNU*) | |
5966 | ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; | |
5967 | *) | |
5968 | ac_count=0 | |
5969 | $as_echo_n 0123456789 >"conftest.in" | |
5970 | while : | |
5971 | do | |
5972 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
5973 | mv "conftest.tmp" "conftest.in" | |
5974 | cp "conftest.in" "conftest.nl" | |
5975 | $as_echo 'GREP' >> "conftest.nl" | |
5976 | "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
5977 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
5978 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
5979 | if test $ac_count -gt ${ac_path_GREP_max-0}; then | |
5980 | # Best one so far, save it but keep looking for a better one | |
5981 | ac_cv_path_GREP="$ac_path_GREP" | |
5982 | ac_path_GREP_max=$ac_count | |
5983 | fi | |
5984 | # 10*(2^10) chars as input seems more than enough | |
5985 | test $ac_count -gt 10 && break | |
5986 | done | |
5987 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
5988 | esac | |
5989 | ||
5990 | $ac_path_GREP_found && break 3 | |
5991 | done | |
5992 | done | |
5993 | done | |
5994 | IFS=$as_save_IFS | |
5995 | if test -z "$ac_cv_path_GREP"; then | |
5f64f7bd | 5996 | as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 |
067d23c9 KY |
5997 | fi |
5998 | else | |
5999 | ac_cv_path_GREP=$GREP | |
6000 | fi | |
6001 | ||
6002 | fi | |
6003 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 | |
6004 | $as_echo "$ac_cv_path_GREP" >&6; } | |
6005 | GREP="$ac_cv_path_GREP" | |
6006 | ||
6007 | ||
6008 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 | |
6009 | $as_echo_n "checking for egrep... " >&6; } | |
5f64f7bd | 6010 | if test "${ac_cv_path_EGREP+set}" = set; then : |
067d23c9 KY |
6011 | $as_echo_n "(cached) " >&6 |
6012 | else | |
6013 | if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 | |
6014 | then ac_cv_path_EGREP="$GREP -E" | |
6015 | else | |
6016 | if test -z "$EGREP"; then | |
6017 | ac_path_EGREP_found=false | |
6018 | # Loop through the user's path and test for each of PROGNAME-LIST | |
6019 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6020 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
6021 | do | |
6022 | IFS=$as_save_IFS | |
6023 | test -z "$as_dir" && as_dir=. | |
6024 | for ac_prog in egrep; do | |
6025 | for ac_exec_ext in '' $ac_executable_extensions; do | |
6026 | ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" | |
6027 | { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue | |
6028 | # Check for GNU ac_path_EGREP and select it if it is found. | |
6029 | # Check for GNU $ac_path_EGREP | |
6030 | case `"$ac_path_EGREP" --version 2>&1` in | |
6031 | *GNU*) | |
6032 | ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; | |
6033 | *) | |
6034 | ac_count=0 | |
6035 | $as_echo_n 0123456789 >"conftest.in" | |
6036 | while : | |
6037 | do | |
6038 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
6039 | mv "conftest.tmp" "conftest.in" | |
6040 | cp "conftest.in" "conftest.nl" | |
6041 | $as_echo 'EGREP' >> "conftest.nl" | |
6042 | "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
6043 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
6044 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
6045 | if test $ac_count -gt ${ac_path_EGREP_max-0}; then | |
6046 | # Best one so far, save it but keep looking for a better one | |
6047 | ac_cv_path_EGREP="$ac_path_EGREP" | |
6048 | ac_path_EGREP_max=$ac_count | |
6049 | fi | |
6050 | # 10*(2^10) chars as input seems more than enough | |
6051 | test $ac_count -gt 10 && break | |
6052 | done | |
6053 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
6054 | esac | |
6055 | ||
6056 | $ac_path_EGREP_found && break 3 | |
6057 | done | |
6058 | done | |
6059 | done | |
6060 | IFS=$as_save_IFS | |
6061 | if test -z "$ac_cv_path_EGREP"; then | |
5f64f7bd | 6062 | as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 |
067d23c9 KY |
6063 | fi |
6064 | else | |
6065 | ac_cv_path_EGREP=$EGREP | |
6066 | fi | |
6067 | ||
6068 | fi | |
6069 | fi | |
6070 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 | |
6071 | $as_echo "$ac_cv_path_EGREP" >&6; } | |
6072 | EGREP="$ac_cv_path_EGREP" | |
6073 | ||
6074 | ||
6075 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 | |
6076 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
5f64f7bd | 6077 | if test "${ac_cv_header_stdc+set}" = set; then : |
067d23c9 KY |
6078 | $as_echo_n "(cached) " >&6 |
6079 | else | |
6080 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6081 | /* end confdefs.h. */ | |
6082 | #include <stdlib.h> | |
6083 | #include <stdarg.h> | |
6084 | #include <string.h> | |
6085 | #include <float.h> | |
6086 | ||
6087 | int | |
6088 | main () | |
6089 | { | |
6090 | ||
6091 | ; | |
6092 | return 0; | |
6093 | } | |
6094 | _ACEOF | |
6095 | if ac_fn_c_try_compile "$LINENO"; then : | |
6096 | ac_cv_header_stdc=yes | |
6097 | else | |
6098 | ac_cv_header_stdc=no | |
6099 | fi | |
6100 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
6101 | ||
6102 | if test $ac_cv_header_stdc = yes; then | |
6103 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
6104 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6105 | /* end confdefs.h. */ | |
6106 | #include <string.h> | |
6107 | ||
6108 | _ACEOF | |
6109 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
6110 | $EGREP "memchr" >/dev/null 2>&1; then : | |
6111 | ||
6112 | else | |
6113 | ac_cv_header_stdc=no | |
6114 | fi | |
6115 | rm -f conftest* | |
6116 | ||
6117 | fi | |
6118 | ||
6119 | if test $ac_cv_header_stdc = yes; then | |
6120 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
6121 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6122 | /* end confdefs.h. */ | |
6123 | #include <stdlib.h> | |
6124 | ||
6125 | _ACEOF | |
6126 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
6127 | $EGREP "free" >/dev/null 2>&1; then : | |
6128 | ||
6129 | else | |
6130 | ac_cv_header_stdc=no | |
6131 | fi | |
6132 | rm -f conftest* | |
6133 | ||
6134 | fi | |
6135 | ||
6136 | if test $ac_cv_header_stdc = yes; then | |
6137 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
6138 | if test "$cross_compiling" = yes; then : | |
6139 | : | |
6140 | else | |
6141 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6142 | /* end confdefs.h. */ | |
6143 | #include <ctype.h> | |
6144 | #include <stdlib.h> | |
6145 | #if ((' ' & 0x0FF) == 0x020) | |
6146 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
6147 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
6148 | #else | |
6149 | # define ISLOWER(c) \ | |
6150 | (('a' <= (c) && (c) <= 'i') \ | |
6151 | || ('j' <= (c) && (c) <= 'r') \ | |
6152 | || ('s' <= (c) && (c) <= 'z')) | |
6153 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
6154 | #endif | |
6155 | ||
6156 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
6157 | int | |
6158 | main () | |
6159 | { | |
6160 | int i; | |
6161 | for (i = 0; i < 256; i++) | |
6162 | if (XOR (islower (i), ISLOWER (i)) | |
6163 | || toupper (i) != TOUPPER (i)) | |
6164 | return 2; | |
6165 | return 0; | |
6166 | } | |
6167 | _ACEOF | |
6168 | if ac_fn_c_try_run "$LINENO"; then : | |
6169 | ||
6170 | else | |
6171 | ac_cv_header_stdc=no | |
6172 | fi | |
6173 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
6174 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
6175 | fi | |
6176 | ||
6177 | fi | |
6178 | fi | |
6179 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 | |
6180 | $as_echo "$ac_cv_header_stdc" >&6; } | |
6181 | if test $ac_cv_header_stdc = yes; then | |
6182 | ||
6183 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h | |
6184 | ||
6185 | fi | |
6186 | ||
6187 | # On IRIX 5.3, sys/types and inttypes.h are conflicting. | |
6188 | for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ | |
6189 | inttypes.h stdint.h unistd.h | |
6190 | do : | |
6191 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
6192 | ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default | |
6193 | " | |
5f64f7bd GM |
6194 | eval as_val=\$$as_ac_Header |
6195 | if test "x$as_val" = x""yes; then : | |
067d23c9 KY |
6196 | cat >>confdefs.h <<_ACEOF |
6197 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
6198 | _ACEOF | |
6199 | ||
6200 | fi | |
6201 | ||
6202 | done | |
6203 | ||
6204 | ||
6205 | ||
1fd182f0 PE |
6206 | |
6207 | ||
067d23c9 | 6208 | ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" |
5f64f7bd | 6209 | if test "x$ac_cv_header_minix_config_h" = x""yes; then : |
067d23c9 KY |
6210 | MINIX=yes |
6211 | else | |
6212 | MINIX= | |
6213 | fi | |
6214 | ||
6215 | ||
6216 | if test "$MINIX" = yes; then | |
6217 | ||
6218 | $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h | |
6219 | ||
6220 | ||
6221 | $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h | |
6222 | ||
6223 | ||
6224 | $as_echo "#define _MINIX 1" >>confdefs.h | |
6225 | ||
6226 | fi | |
6227 | ||
1fd182f0 PE |
6228 | case "$host_os" in |
6229 | hpux*) | |
6230 | ||
6231 | $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h | |
6232 | ||
6233 | ;; | |
6234 | esac | |
6235 | ||
067d23c9 KY |
6236 | |
6237 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 | |
6238 | $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } | |
5f64f7bd | 6239 | if test "${ac_cv_safe_to_define___extensions__+set}" = set; then : |
067d23c9 KY |
6240 | $as_echo_n "(cached) " >&6 |
6241 | else | |
6242 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6243 | /* end confdefs.h. */ | |
6244 | ||
1fd182f0 PE |
6245 | # define __EXTENSIONS__ 1 |
6246 | $ac_includes_default | |
067d23c9 KY |
6247 | int |
6248 | main () | |
6249 | { | |
6250 | ||
6251 | ; | |
6252 | return 0; | |
6253 | } | |
6254 | _ACEOF | |
6255 | if ac_fn_c_try_compile "$LINENO"; then : | |
6256 | ac_cv_safe_to_define___extensions__=yes | |
6257 | else | |
6258 | ac_cv_safe_to_define___extensions__=no | |
6259 | fi | |
6260 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
6261 | fi | |
6262 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 | |
6263 | $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } | |
6264 | test $ac_cv_safe_to_define___extensions__ = yes && | |
6265 | $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h | |
6266 | ||
6267 | $as_echo "#define _ALL_SOURCE 1" >>confdefs.h | |
6268 | ||
6269 | $as_echo "#define _GNU_SOURCE 1" >>confdefs.h | |
6270 | ||
6271 | $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h | |
6272 | ||
6273 | $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h | |
6274 | ||
6275 | ||
6276 | ||
1fd182f0 PE |
6277 | |
6278 | ||
6279 | ||
6280 | ||
6281 | ||
6d153f56 GM |
6282 | case $ac_cv_prog_cc_stdc in #( |
6283 | no) : | |
6284 | ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; #( | |
6285 | *) : | |
6286 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5 | |
6287 | $as_echo_n "checking for $CC option to accept ISO C99... " >&6; } | |
6288 | if test "${ac_cv_prog_cc_c99+set}" = set; then : | |
6289 | $as_echo_n "(cached) " >&6 | |
6290 | else | |
6291 | ac_cv_prog_cc_c99=no | |
6292 | ac_save_CC=$CC | |
6293 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6294 | /* end confdefs.h. */ | |
6295 | #include <stdarg.h> | |
6296 | #include <stdbool.h> | |
6297 | #include <stdlib.h> | |
6298 | #include <wchar.h> | |
6299 | #include <stdio.h> | |
6300 | ||
6301 | // Check varargs macros. These examples are taken from C99 6.10.3.5. | |
6302 | #define debug(...) fprintf (stderr, __VA_ARGS__) | |
6303 | #define showlist(...) puts (#__VA_ARGS__) | |
6304 | #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) | |
6305 | static void | |
6306 | test_varargs_macros (void) | |
6307 | { | |
6308 | int x = 1234; | |
6309 | int y = 5678; | |
6310 | debug ("Flag"); | |
6311 | debug ("X = %d\n", x); | |
6312 | showlist (The first, second, and third items.); | |
6313 | report (x>y, "x is %d but y is %d", x, y); | |
6314 | } | |
6315 | ||
6316 | // Check long long types. | |
6317 | #define BIG64 18446744073709551615ull | |
6318 | #define BIG32 4294967295ul | |
6319 | #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) | |
6320 | #if !BIG_OK | |
6321 | your preprocessor is broken; | |
6322 | #endif | |
6323 | #if BIG_OK | |
6324 | #else | |
6325 | your preprocessor is broken; | |
6326 | #endif | |
6327 | static long long int bignum = -9223372036854775807LL; | |
6328 | static unsigned long long int ubignum = BIG64; | |
6329 | ||
6330 | struct incomplete_array | |
6331 | { | |
6332 | int datasize; | |
6333 | double data[]; | |
6334 | }; | |
6335 | ||
6336 | struct named_init { | |
6337 | int number; | |
6338 | const wchar_t *name; | |
6339 | double average; | |
6340 | }; | |
6341 | ||
6342 | typedef const char *ccp; | |
6343 | ||
6344 | static inline int | |
6345 | test_restrict (ccp restrict text) | |
6346 | { | |
6347 | // See if C++-style comments work. | |
6348 | // Iterate through items via the restricted pointer. | |
6349 | // Also check for declarations in for loops. | |
6350 | for (unsigned int i = 0; *(text+i) != '\0'; ++i) | |
6351 | continue; | |
6352 | return 0; | |
6353 | } | |
6354 | ||
6355 | // Check varargs and va_copy. | |
6356 | static void | |
6357 | test_varargs (const char *format, ...) | |
6358 | { | |
6359 | va_list args; | |
6360 | va_start (args, format); | |
6361 | va_list args_copy; | |
6362 | va_copy (args_copy, args); | |
6363 | ||
6364 | const char *str; | |
6365 | int number; | |
6366 | float fnumber; | |
6367 | ||
6368 | while (*format) | |
6369 | { | |
6370 | switch (*format++) | |
6371 | { | |
6372 | case 's': // string | |
6373 | str = va_arg (args_copy, const char *); | |
6374 | break; | |
6375 | case 'd': // int | |
6376 | number = va_arg (args_copy, int); | |
6377 | break; | |
6378 | case 'f': // float | |
6379 | fnumber = va_arg (args_copy, double); | |
6380 | break; | |
6381 | default: | |
6382 | break; | |
6383 | } | |
6384 | } | |
6385 | va_end (args_copy); | |
6386 | va_end (args); | |
6387 | } | |
6388 | ||
6389 | int | |
6390 | main () | |
6391 | { | |
6392 | ||
6393 | // Check bool. | |
6394 | _Bool success = false; | |
6395 | ||
6396 | // Check restrict. | |
6397 | if (test_restrict ("String literal") == 0) | |
6398 | success = true; | |
6399 | char *restrict newvar = "Another string"; | |
6400 | ||
6401 | // Check varargs. | |
6402 | test_varargs ("s, d' f .", "string", 65, 34.234); | |
6403 | test_varargs_macros (); | |
6404 | ||
6405 | // Check flexible array members. | |
6406 | struct incomplete_array *ia = | |
6407 | malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); | |
6408 | ia->datasize = 10; | |
6409 | for (int i = 0; i < ia->datasize; ++i) | |
6410 | ia->data[i] = i * 1.234; | |
6411 | ||
6412 | // Check named initializers. | |
6413 | struct named_init ni = { | |
6414 | .number = 34, | |
6415 | .name = L"Test wide string", | |
6416 | .average = 543.34343, | |
6417 | }; | |
6418 | ||
6419 | ni.number = 58; | |
6420 | ||
6421 | int dynamic_array[ni.number]; | |
6422 | dynamic_array[ni.number - 1] = 543; | |
6423 | ||
6424 | // work around unused variable warnings | |
6425 | return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x' | |
6426 | || dynamic_array[ni.number - 1] != 543); | |
6427 | ||
6428 | ; | |
6429 | return 0; | |
6430 | } | |
6431 | _ACEOF | |
6432 | for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99 | |
6433 | do | |
6434 | CC="$ac_save_CC $ac_arg" | |
6435 | if ac_fn_c_try_compile "$LINENO"; then : | |
6436 | ac_cv_prog_cc_c99=$ac_arg | |
6437 | fi | |
6438 | rm -f core conftest.err conftest.$ac_objext | |
6439 | test "x$ac_cv_prog_cc_c99" != "xno" && break | |
6440 | done | |
6441 | rm -f conftest.$ac_ext | |
6442 | CC=$ac_save_CC | |
6443 | ||
6444 | fi | |
6445 | # AC_CACHE_VAL | |
6446 | case "x$ac_cv_prog_cc_c99" in | |
6447 | x) | |
6448 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 | |
6449 | $as_echo "none needed" >&6; } ;; | |
6450 | xno) | |
6451 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 | |
6452 | $as_echo "unsupported" >&6; } ;; | |
6453 | *) | |
6454 | CC="$CC $ac_cv_prog_cc_c99" | |
6455 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 | |
6456 | $as_echo "$ac_cv_prog_cc_c99" >&6; } ;; | |
6457 | esac | |
6458 | if test "x$ac_cv_prog_cc_c99" != xno; then : | |
6459 | ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 | |
6460 | else | |
6461 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 | |
6462 | $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } | |
6463 | if test "${ac_cv_prog_cc_c89+set}" = set; then : | |
6464 | $as_echo_n "(cached) " >&6 | |
6465 | else | |
6466 | ac_cv_prog_cc_c89=no | |
6467 | ac_save_CC=$CC | |
6468 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6469 | /* end confdefs.h. */ | |
6470 | #include <stdarg.h> | |
6471 | #include <stdio.h> | |
6472 | #include <sys/types.h> | |
6473 | #include <sys/stat.h> | |
6474 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
6475 | struct buf { int x; }; | |
6476 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
6477 | static char *e (p, i) | |
6478 | char **p; | |
6479 | int i; | |
6480 | { | |
6481 | return p[i]; | |
6482 | } | |
6483 | static char *f (char * (*g) (char **, int), char **p, ...) | |
6484 | { | |
6485 | char *s; | |
6486 | va_list v; | |
6487 | va_start (v,p); | |
6488 | s = g (p, va_arg (v,int)); | |
6489 | va_end (v); | |
6490 | return s; | |
6491 | } | |
6492 | ||
6493 | /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has | |
6494 | function prototypes and stuff, but not '\xHH' hex character constants. | |
6495 | These don't provoke an error unfortunately, instead are silently treated | |
6496 | as 'x'. The following induces an error, until -std is added to get | |
6497 | proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an | |
6498 | array size at least. It's necessary to write '\x00'==0 to get something | |
6499 | that's true only with -std. */ | |
6500 | int osf4_cc_array ['\x00' == 0 ? 1 : -1]; | |
6501 | ||
6502 | /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters | |
6503 | inside strings and character constants. */ | |
6504 | #define FOO(x) 'x' | |
6505 | int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; | |
6506 | ||
6507 | int test (int i, double x); | |
6508 | struct s1 {int (*f) (int a);}; | |
6509 | struct s2 {int (*f) (double a);}; | |
6510 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
6511 | int argc; | |
6512 | char **argv; | |
6513 | int | |
6514 | main () | |
6515 | { | |
6516 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; | |
6517 | ; | |
6518 | return 0; | |
6519 | } | |
6520 | _ACEOF | |
6521 | for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ | |
6522 | -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
6523 | do | |
6524 | CC="$ac_save_CC $ac_arg" | |
6525 | if ac_fn_c_try_compile "$LINENO"; then : | |
6526 | ac_cv_prog_cc_c89=$ac_arg | |
6527 | fi | |
6528 | rm -f core conftest.err conftest.$ac_objext | |
6529 | test "x$ac_cv_prog_cc_c89" != "xno" && break | |
6530 | done | |
6531 | rm -f conftest.$ac_ext | |
6532 | CC=$ac_save_CC | |
6533 | ||
6534 | fi | |
6535 | # AC_CACHE_VAL | |
6536 | case "x$ac_cv_prog_cc_c89" in | |
6537 | x) | |
6538 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 | |
6539 | $as_echo "none needed" >&6; } ;; | |
6540 | xno) | |
6541 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 | |
6542 | $as_echo "unsupported" >&6; } ;; | |
6543 | *) | |
6544 | CC="$CC $ac_cv_prog_cc_c89" | |
6545 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 | |
6546 | $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; | |
6547 | esac | |
6548 | if test "x$ac_cv_prog_cc_c89" != xno; then : | |
6549 | ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 | |
6550 | else | |
6551 | ac_cv_prog_cc_stdc=no | |
6552 | fi | |
6553 | ||
6554 | fi | |
6555 | ;; | |
6556 | esac | |
6557 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5 | |
6558 | $as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; } | |
6559 | if test "${ac_cv_prog_cc_stdc+set}" = set; then : | |
6560 | $as_echo_n "(cached) " >&6 | |
6561 | fi | |
6562 | ||
6563 | case $ac_cv_prog_cc_stdc in #( | |
6564 | no) : | |
6565 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 | |
6566 | $as_echo "unsupported" >&6; } ;; #( | |
6567 | '') : | |
6568 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 | |
6569 | $as_echo "none needed" >&6; } ;; #( | |
6570 | *) : | |
6571 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_stdc" >&5 | |
6572 | $as_echo "$ac_cv_prog_cc_stdc" >&6; } ;; | |
6573 | esac | |
6574 | ||
1fd182f0 PE |
6575 | |
6576 | ||
4fc2b746 | 6577 | # Code from module alloca-opt: |
8d8af66d | 6578 | # Code from module allocator: |
1fd182f0 PE |
6579 | # Code from module arg-nonnull: |
6580 | # Code from module c++defs: | |
6c051bab | 6581 | # Code from module careadlinkat: |
942f733f | 6582 | # Code from module crypto/md5: |
40e27e7f | 6583 | # Code from module crypto/sha1: |
d87ffdb7 GM |
6584 | # Code from module crypto/sha256: |
6585 | # Code from module crypto/sha512: | |
36f13e16 | 6586 | # Code from module dosname: |
f737437b | 6587 | # Code from module dtoastr: |
7d2a1c5e | 6588 | # Code from module dup2: |
1fd182f0 PE |
6589 | # Code from module extensions: |
6590 | ||
5fa4ac76 | 6591 | # Code from module filemode: |
1f5d53eb | 6592 | # Code from module getloadavg: |
e275c824 PE |
6593 | # Code from module getopt-gnu: |
6594 | # Code from module getopt-posix: | |
6595 | # Code from module gettext-h: | |
67342916 | 6596 | # Code from module ignore-value: |
1fd182f0 PE |
6597 | # Code from module include_next: |
6598 | # Code from module intprops: | |
4fda9c95 | 6599 | # Code from module inttypes-incomplete: |
ae0d7250 | 6600 | # Code from module lstat: |
1fd182f0 PE |
6601 | # Code from module mktime: |
6602 | # Code from module multiarch: | |
3e0be4ab | 6603 | # Code from module pthread_sigmask: |
ae0d7250 | 6604 | # Code from module readlink: |
3e0be4ab GM |
6605 | # Code from module signal: |
6606 | # Code from module sigprocmask: | |
6ad6792b | 6607 | # Code from module socklen: |
6c051bab | 6608 | # Code from module ssize_t: |
ae0d7250 | 6609 | # Code from module stat: |
6d153f56 GM |
6610 | # Code from module stdarg: |
6611 | ||
16c3e636 | 6612 | # Code from module stdbool: |
1fd182f0 | 6613 | # Code from module stddef: |
5f90be1b | 6614 | # Code from module stdint: |
6ad6792b | 6615 | # Code from module stdio: |
1f5d53eb | 6616 | # Code from module stdlib: |
16c3e636 | 6617 | # Code from module strftime: |
3e0be4ab GM |
6618 | # Code from module strtoimax: |
6619 | # Code from module strtoll: | |
4fda9c95 GM |
6620 | # Code from module strtoull: |
6621 | # Code from module strtoumax: | |
ae0d7250 | 6622 | # Code from module symlink: |
5fa4ac76 | 6623 | # Code from module sys_stat: |
1fd182f0 PE |
6624 | # Code from module time: |
6625 | # Code from module time_r: | |
d87ffdb7 | 6626 | # Code from module u64: |
e275c824 | 6627 | # Code from module unistd: |
4fda9c95 | 6628 | # Code from module verify: |
1fd182f0 PE |
6629 | # Code from module warn-on-use: |
6630 | ||
6631 | ||
6632 | # On Suns, sometimes $CPP names a directory. | |
6633 | if test -n "$CPP" && test -d "$CPP"; then | |
6634 | CPP= | |
6635 | fi | |
6636 | ||
6637 | ## If not using gcc, and on Solaris, and no CPP specified, see if | |
6638 | ## using a Sun compiler, which needs -Xs to prevent whitespace. | |
6639 | if test x"$GCC" != xyes && test x"$emacs_check_sunpro_c" = xyes && \ | |
6640 | test x"$CPP" = x; then | |
6641 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using a Sun C compiler" >&5 | |
6642 | $as_echo_n "checking whether we are using a Sun C compiler... " >&6; } | |
5f64f7bd | 6643 | if test "${emacs_cv_sunpro_c+set}" = set; then : |
1fd182f0 PE |
6644 | $as_echo_n "(cached) " >&6 |
6645 | else | |
6646 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6647 | /* end confdefs.h. */ | |
6648 | ||
6649 | int | |
6650 | main () | |
6651 | { | |
6652 | #ifndef __SUNPRO_C | |
6653 | fail; | |
6654 | #endif | |
6655 | ||
6656 | ; | |
6657 | return 0; | |
6658 | } | |
6659 | _ACEOF | |
6660 | if ac_fn_c_try_link "$LINENO"; then : | |
6661 | emacs_cv_sunpro_c=yes | |
6662 | else | |
6663 | emacs_cv_sunpro_c=no | |
6664 | fi | |
6665 | rm -f core conftest.err conftest.$ac_objext \ | |
6666 | conftest$ac_exeext conftest.$ac_ext | |
6667 | fi | |
6668 | ||
6669 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_sunpro_c" >&5 | |
6670 | $as_echo "$emacs_cv_sunpro_c" >&6; } | |
6671 | ||
6672 | if test x"$emacs_cv_sunpro_c" = xyes; then | |
6673 | NON_GNU_CPP="$CC -E -Xs" | |
6674 | fi | |
6675 | fi | |
6676 | ||
6677 | #### Some systems specify a CPP to use unless we are using GCC. | |
6678 | #### Now that we know whether we are using GCC, we can decide whether | |
6679 | #### to use that one. | |
6680 | if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x | |
6681 | then | |
6682 | CPP="$NON_GNU_CPP" | |
6683 | fi | |
6684 | ||
6685 | #### Some systems specify a CC to use unless we are using GCC. | |
6686 | #### Now that we know whether we are using GCC, we can decide whether | |
6687 | #### to use that one. | |
6688 | if test "x$NON_GNU_CC" != x && test x$GCC != xyes && | |
6689 | test x$cc_specified != xyes | |
6690 | then | |
6691 | CC="$NON_GNU_CC" | |
6692 | fi | |
6693 | ||
6694 | if test x$GCC = xyes; then | |
6695 | test "x$GCC_TEST_OPTIONS" != x && CC="$CC $GCC_TEST_OPTIONS" | |
6696 | else | |
6697 | test "x$NON_GCC_TEST_OPTIONS" != x && CC="$CC $NON_GCC_TEST_OPTIONS" | |
6698 | fi | |
6699 | ||
067d23c9 KY |
6700 | ### Use -Wdeclaration-after-statement if the compiler supports it |
6701 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -Wdeclaration-after-statement" >&5 | |
6702 | $as_echo_n "checking whether gcc understands -Wdeclaration-after-statement... " >&6; } | |
6703 | SAVE_CFLAGS="$CFLAGS" | |
6704 | CFLAGS="$CFLAGS -Wdeclaration-after-statement" | |
6705 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6706 | /* end confdefs.h. */ | |
6707 | ||
6708 | int | |
6709 | main () | |
6710 | { | |
6711 | ||
6712 | ; | |
6713 | return 0; | |
6714 | } | |
6715 | _ACEOF | |
6716 | if ac_fn_c_try_compile "$LINENO"; then : | |
6717 | has_option=yes | |
6718 | else | |
6719 | has_option=no | |
6720 | fi | |
6721 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
6722 | if test $has_option = yes; then | |
6723 | C_WARNINGS_SWITCH="-Wdeclaration-after-statement $C_WARNINGS_SWITCH" | |
6724 | fi | |
6725 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_option" >&5 | |
6726 | $as_echo "$has_option" >&6; } | |
6727 | CFLAGS="$SAVE_CFLAGS" | |
6728 | unset has_option | |
6729 | unset SAVE_CFLAGS | |
6730 | ||
6731 | ### Use -Wold-style-definition if the compiler supports it | |
6732 | # This can be removed when conversion to standard C is finished. | |
6733 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -Wold-style-definition" >&5 | |
6734 | $as_echo_n "checking whether gcc understands -Wold-style-definition... " >&6; } | |
6735 | SAVE_CFLAGS="$CFLAGS" | |
6736 | CFLAGS="$CFLAGS -Wold-style-definition" | |
6737 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6738 | /* end confdefs.h. */ | |
6739 | ||
6740 | int | |
6741 | main () | |
6742 | { | |
6743 | ||
6744 | ; | |
6745 | return 0; | |
6746 | } | |
6747 | _ACEOF | |
6748 | if ac_fn_c_try_compile "$LINENO"; then : | |
6749 | has_option=yes | |
6750 | else | |
6751 | has_option=no | |
6752 | fi | |
6753 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
6754 | if test $has_option = yes; then | |
6755 | C_WARNINGS_SWITCH="-Wold-style-definition $C_WARNINGS_SWITCH" | |
6756 | fi | |
6757 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_option" >&5 | |
6758 | $as_echo "$has_option" >&6; } | |
6759 | CFLAGS="$SAVE_CFLAGS" | |
6760 | unset has_option | |
6761 | unset SAVE_CFLAGS | |
6762 | ||
6763 | ### Use -Wimplicit-function-declaration if the compiler supports it | |
6764 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -Wimplicit-function-declaration" >&5 | |
6765 | $as_echo_n "checking whether gcc understands -Wimplicit-function-declaration... " >&6; } | |
6766 | SAVE_CFLAGS="$CFLAGS" | |
6767 | CFLAGS="$CFLAGS -Wimplicit-function-declaration" | |
6768 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6769 | /* end confdefs.h. */ | |
6770 | ||
6771 | int | |
6772 | main () | |
6773 | { | |
6774 | ||
6775 | ; | |
6776 | return 0; | |
6777 | } | |
6778 | _ACEOF | |
6779 | if ac_fn_c_try_compile "$LINENO"; then : | |
6780 | has_option=yes | |
6781 | else | |
6782 | has_option=no | |
6783 | fi | |
6784 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
6785 | if test $has_option = yes; then | |
6786 | C_WARNINGS_SWITCH="-Wimplicit-function-declaration $C_WARNINGS_SWITCH" | |
6787 | fi | |
6788 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_option" >&5 | |
6789 | $as_echo "$has_option" >&6; } | |
6790 | CFLAGS="$SAVE_CFLAGS" | |
6791 | unset has_option | |
6792 | unset SAVE_CFLAGS | |
6793 | ||
6794 | ||
6795 | ||
6796 | ||
6797 | #### Some other nice autoconf tests. | |
6798 | ||
6799 | ac_ext=c | |
6800 | ac_cpp='$CPP $CPPFLAGS' | |
6801 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
6802 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
6803 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
6804 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 | |
6805 | $as_echo_n "checking how to run the C preprocessor... " >&6; } | |
6806 | # On Suns, sometimes $CPP names a directory. | |
6807 | if test -n "$CPP" && test -d "$CPP"; then | |
6808 | CPP= | |
6809 | fi | |
6810 | if test -z "$CPP"; then | |
5f64f7bd | 6811 | if test "${ac_cv_prog_CPP+set}" = set; then : |
067d23c9 KY |
6812 | $as_echo_n "(cached) " >&6 |
6813 | else | |
6814 | # Double quotes because CPP needs to be expanded | |
6815 | for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" | |
6816 | do | |
6817 | ac_preproc_ok=false | |
6818 | for ac_c_preproc_warn_flag in '' yes | |
6819 | do | |
6820 | # Use a header file that comes with gcc, so configuring glibc | |
6821 | # with a fresh cross-compiler works. | |
6822 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
6823 | # <limits.h> exists even on freestanding compilers. | |
6824 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
6825 | # not just through cpp. "Syntax error" is here to catch this case. | |
6826 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6827 | /* end confdefs.h. */ | |
6828 | #ifdef __STDC__ | |
6829 | # include <limits.h> | |
6830 | #else | |
6831 | # include <assert.h> | |
6832 | #endif | |
6833 | Syntax error | |
6834 | _ACEOF | |
6835 | if ac_fn_c_try_cpp "$LINENO"; then : | |
6836 | ||
6837 | else | |
6838 | # Broken: fails on valid input. | |
6839 | continue | |
6840 | fi | |
5f64f7bd | 6841 | rm -f conftest.err conftest.$ac_ext |
067d23c9 KY |
6842 | |
6843 | # OK, works on sane cases. Now check whether nonexistent headers | |
6844 | # can be detected and how. | |
6845 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6846 | /* end confdefs.h. */ | |
6847 | #include <ac_nonexistent.h> | |
6848 | _ACEOF | |
6849 | if ac_fn_c_try_cpp "$LINENO"; then : | |
6850 | # Broken: success on invalid input. | |
6851 | continue | |
6852 | else | |
6853 | # Passes both tests. | |
6854 | ac_preproc_ok=: | |
6855 | break | |
6856 | fi | |
5f64f7bd | 6857 | rm -f conftest.err conftest.$ac_ext |
067d23c9 KY |
6858 | |
6859 | done | |
6860 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
5f64f7bd | 6861 | rm -f conftest.err conftest.$ac_ext |
067d23c9 KY |
6862 | if $ac_preproc_ok; then : |
6863 | break | |
6864 | fi | |
6865 | ||
6866 | done | |
6867 | ac_cv_prog_CPP=$CPP | |
6868 | ||
6869 | fi | |
6870 | CPP=$ac_cv_prog_CPP | |
6871 | else | |
6872 | ac_cv_prog_CPP=$CPP | |
6873 | fi | |
6874 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 | |
6875 | $as_echo "$CPP" >&6; } | |
6876 | ac_preproc_ok=false | |
6877 | for ac_c_preproc_warn_flag in '' yes | |
6878 | do | |
6879 | # Use a header file that comes with gcc, so configuring glibc | |
6880 | # with a fresh cross-compiler works. | |
6881 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
6882 | # <limits.h> exists even on freestanding compilers. | |
6883 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
6884 | # not just through cpp. "Syntax error" is here to catch this case. | |
6885 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6886 | /* end confdefs.h. */ | |
6887 | #ifdef __STDC__ | |
6888 | # include <limits.h> | |
6889 | #else | |
6890 | # include <assert.h> | |
6891 | #endif | |
6892 | Syntax error | |
6893 | _ACEOF | |
6894 | if ac_fn_c_try_cpp "$LINENO"; then : | |
6895 | ||
6896 | else | |
6897 | # Broken: fails on valid input. | |
6898 | continue | |
6899 | fi | |
5f64f7bd | 6900 | rm -f conftest.err conftest.$ac_ext |
067d23c9 KY |
6901 | |
6902 | # OK, works on sane cases. Now check whether nonexistent headers | |
6903 | # can be detected and how. | |
6904 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6905 | /* end confdefs.h. */ | |
6906 | #include <ac_nonexistent.h> | |
6907 | _ACEOF | |
6908 | if ac_fn_c_try_cpp "$LINENO"; then : | |
6909 | # Broken: success on invalid input. | |
6910 | continue | |
6911 | else | |
6912 | # Passes both tests. | |
6913 | ac_preproc_ok=: | |
6914 | break | |
6915 | fi | |
5f64f7bd | 6916 | rm -f conftest.err conftest.$ac_ext |
067d23c9 KY |
6917 | |
6918 | done | |
6919 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
5f64f7bd | 6920 | rm -f conftest.err conftest.$ac_ext |
067d23c9 KY |
6921 | if $ac_preproc_ok; then : |
6922 | ||
6923 | else | |
6924 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
6925 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
5f64f7bd GM |
6926 | as_fn_error "C preprocessor \"$CPP\" fails sanity check |
6927 | See \`config.log' for more details." "$LINENO" 5; } | |
067d23c9 KY |
6928 | fi |
6929 | ||
6930 | ac_ext=c | |
6931 | ac_cpp='$CPP $CPPFLAGS' | |
6932 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
6933 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
6934 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
6935 | ||
067d23c9 KY |
6936 | |
6937 | if test "x$RANLIB" = x; then | |
6938 | if test -n "$ac_tool_prefix"; then | |
6939 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
6940 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
6941 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
6942 | $as_echo_n "checking for $ac_word... " >&6; } | |
5f64f7bd | 6943 | if test "${ac_cv_prog_RANLIB+set}" = set; then : |
067d23c9 KY |
6944 | $as_echo_n "(cached) " >&6 |
6945 | else | |
6946 | if test -n "$RANLIB"; then | |
6947 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
6948 | else | |
6949 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6950 | for as_dir in $PATH | |
6951 | do | |
6952 | IFS=$as_save_IFS | |
6953 | test -z "$as_dir" && as_dir=. | |
6954 | for ac_exec_ext in '' $ac_executable_extensions; do | |
6955 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
6956 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" | |
6957 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
6958 | break 2 | |
6959 | fi | |
6960 | done | |
6961 | done | |
6962 | IFS=$as_save_IFS | |
6963 | ||
6964 | fi | |
6965 | fi | |
6966 | RANLIB=$ac_cv_prog_RANLIB | |
6967 | if test -n "$RANLIB"; then | |
6968 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 | |
6969 | $as_echo "$RANLIB" >&6; } | |
6970 | else | |
6971 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
6972 | $as_echo "no" >&6; } | |
6973 | fi | |
6974 | ||
6975 | ||
6976 | fi | |
6977 | if test -z "$ac_cv_prog_RANLIB"; then | |
6978 | ac_ct_RANLIB=$RANLIB | |
6979 | # Extract the first word of "ranlib", so it can be a program name with args. | |
6980 | set dummy ranlib; ac_word=$2 | |
6981 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
6982 | $as_echo_n "checking for $ac_word... " >&6; } | |
5f64f7bd | 6983 | if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : |
067d23c9 KY |
6984 | $as_echo_n "(cached) " >&6 |
6985 | else | |
6986 | if test -n "$ac_ct_RANLIB"; then | |
6987 | ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. | |
6988 | else | |
6989 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6990 | for as_dir in $PATH | |
6991 | do | |
6992 | IFS=$as_save_IFS | |
6993 | test -z "$as_dir" && as_dir=. | |
6994 | for ac_exec_ext in '' $ac_executable_extensions; do | |
6995 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
6996 | ac_cv_prog_ac_ct_RANLIB="ranlib" | |
6997 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
6998 | break 2 | |
6999 | fi | |
7000 | done | |
7001 | done | |
7002 | IFS=$as_save_IFS | |
7003 | ||
7004 | fi | |
7005 | fi | |
7006 | ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB | |
7007 | if test -n "$ac_ct_RANLIB"; then | |
7008 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 | |
7009 | $as_echo "$ac_ct_RANLIB" >&6; } | |
7010 | else | |
7011 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
7012 | $as_echo "no" >&6; } | |
7013 | fi | |
7014 | ||
7015 | if test "x$ac_ct_RANLIB" = x; then | |
7016 | RANLIB=":" | |
7017 | else | |
7018 | case $cross_compiling:$ac_tool_warned in | |
7019 | yes:) | |
7020 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
7021 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
7022 | ac_tool_warned=yes ;; | |
7023 | esac | |
7024 | RANLIB=$ac_ct_RANLIB | |
7025 | fi | |
7026 | else | |
7027 | RANLIB="$ac_cv_prog_RANLIB" | |
7028 | fi | |
7029 | ||
7030 | fi | |
7031 | ||
7032 | ## Although we're running on an amd64 kernel, we're actually compiling for | |
7033 | ## the x86 architecture. The user should probably have provided an | |
7034 | ## explicit --build to `configure', but if everything else than the kernel | |
7035 | ## is running in i386 mode, we can help them out. | |
7036 | if test "$machine" = "amdx86-64"; then | |
7037 | ac_fn_c_check_decl "$LINENO" "i386" "ac_cv_have_decl_i386" "$ac_includes_default" | |
5f64f7bd | 7038 | if test "x$ac_cv_have_decl_i386" = x""yes; then : |
067d23c9 KY |
7039 | |
7040 | fi | |
7041 | ||
7042 | if test "$ac_cv_have_decl_i386" = "yes"; then | |
7043 | canonical=`echo "$canonical" | sed -e 's/^amd64/i386/' -e 's/^x86_64/i386/'` | |
7044 | machine=intel386 | |
7045 | machfile="m/${machine}.h" | |
7046 | fi | |
7047 | fi | |
7048 | ||
7049 | # Extract the first word of "install-info", so it can be a program name with args. | |
7050 | set dummy install-info; ac_word=$2 | |
7051 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
7052 | $as_echo_n "checking for $ac_word... " >&6; } | |
5f64f7bd | 7053 | if test "${ac_cv_path_INSTALL_INFO+set}" = set; then : |
067d23c9 KY |
7054 | $as_echo_n "(cached) " >&6 |
7055 | else | |
7056 | case $INSTALL_INFO in | |
7057 | [\\/]* | ?:[\\/]*) | |
7058 | ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path. | |
7059 | ;; | |
7060 | *) | |
7061 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7062 | for as_dir in $PATH | |
7063 | do | |
7064 | IFS=$as_save_IFS | |
7065 | test -z "$as_dir" && as_dir=. | |
7066 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7067 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
7068 | ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext" | |
7069 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7070 | break 2 | |
7071 | fi | |
7072 | done | |
7073 | done | |
7074 | IFS=$as_save_IFS | |
7075 | ||
7076 | ;; | |
7077 | esac | |
7078 | fi | |
7079 | INSTALL_INFO=$ac_cv_path_INSTALL_INFO | |
7080 | if test -n "$INSTALL_INFO"; then | |
7081 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_INFO" >&5 | |
7082 | $as_echo "$INSTALL_INFO" >&6; } | |
7083 | else | |
7084 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
7085 | $as_echo "no" >&6; } | |
7086 | fi | |
7087 | ||
7088 | ||
7089 | # Extract the first word of "install-info", so it can be a program name with args. | |
7090 | set dummy install-info; ac_word=$2 | |
7091 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
7092 | $as_echo_n "checking for $ac_word... " >&6; } | |
5f64f7bd | 7093 | if test "${ac_cv_path_INSTALL_INFO+set}" = set; then : |
067d23c9 KY |
7094 | $as_echo_n "(cached) " >&6 |
7095 | else | |
7096 | case $INSTALL_INFO in | |
7097 | [\\/]* | ?:[\\/]*) | |
7098 | ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path. | |
7099 | ;; | |
7100 | *) | |
7101 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7102 | for as_dir in /usr/sbin | |
7103 | do | |
7104 | IFS=$as_save_IFS | |
7105 | test -z "$as_dir" && as_dir=. | |
7106 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7107 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
7108 | ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext" | |
7109 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7110 | break 2 | |
7111 | fi | |
7112 | done | |
7113 | done | |
7114 | IFS=$as_save_IFS | |
7115 | ||
7116 | ;; | |
7117 | esac | |
7118 | fi | |
7119 | INSTALL_INFO=$ac_cv_path_INSTALL_INFO | |
7120 | if test -n "$INSTALL_INFO"; then | |
7121 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_INFO" >&5 | |
7122 | $as_echo "$INSTALL_INFO" >&6; } | |
7123 | else | |
7124 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
7125 | $as_echo "no" >&6; } | |
7126 | fi | |
7127 | ||
7128 | ||
7129 | # Extract the first word of "install-info", so it can be a program name with args. | |
7130 | set dummy install-info; ac_word=$2 | |
7131 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
7132 | $as_echo_n "checking for $ac_word... " >&6; } | |
5f64f7bd | 7133 | if test "${ac_cv_path_INSTALL_INFO+set}" = set; then : |
067d23c9 KY |
7134 | $as_echo_n "(cached) " >&6 |
7135 | else | |
7136 | case $INSTALL_INFO in | |
7137 | [\\/]* | ?:[\\/]*) | |
7138 | ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path. | |
7139 | ;; | |
7140 | *) | |
7141 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7142 | for as_dir in /sbin | |
7143 | do | |
7144 | IFS=$as_save_IFS | |
7145 | test -z "$as_dir" && as_dir=. | |
7146 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7147 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
7148 | ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext" | |
7149 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7150 | break 2 | |
7151 | fi | |
7152 | done | |
7153 | done | |
7154 | IFS=$as_save_IFS | |
7155 | ||
7156 | test -z "$ac_cv_path_INSTALL_INFO" && ac_cv_path_INSTALL_INFO=":" | |
7157 | ;; | |
7158 | esac | |
7159 | fi | |
7160 | INSTALL_INFO=$ac_cv_path_INSTALL_INFO | |
7161 | if test -n "$INSTALL_INFO"; then | |
7162 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_INFO" >&5 | |
7163 | $as_echo "$INSTALL_INFO" >&6; } | |
7164 | else | |
7165 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
7166 | $as_echo "no" >&6; } | |
7167 | fi | |
7168 | ||
7169 | ||
7170 | # Extract the first word of "gzip", so it can be a program name with args. | |
7171 | set dummy gzip; ac_word=$2 | |
7172 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
7173 | $as_echo_n "checking for $ac_word... " >&6; } | |
5f64f7bd | 7174 | if test "${ac_cv_path_GZIP_PROG+set}" = set; then : |
067d23c9 KY |
7175 | $as_echo_n "(cached) " >&6 |
7176 | else | |
7177 | case $GZIP_PROG in | |
7178 | [\\/]* | ?:[\\/]*) | |
7179 | ac_cv_path_GZIP_PROG="$GZIP_PROG" # Let the user override the test with a path. | |
7180 | ;; | |
7181 | *) | |
7182 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7183 | for as_dir in $PATH | |
7184 | do | |
7185 | IFS=$as_save_IFS | |
7186 | test -z "$as_dir" && as_dir=. | |
7187 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7188 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
7189 | ac_cv_path_GZIP_PROG="$as_dir/$ac_word$ac_exec_ext" | |
7190 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7191 | break 2 | |
7192 | fi | |
7193 | done | |
7194 | done | |
7195 | IFS=$as_save_IFS | |
7196 | ||
7197 | ;; | |
7198 | esac | |
7199 | fi | |
7200 | GZIP_PROG=$ac_cv_path_GZIP_PROG | |
7201 | if test -n "$GZIP_PROG"; then | |
7202 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP_PROG" >&5 | |
7203 | $as_echo "$GZIP_PROG" >&6; } | |
7204 | else | |
7205 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
7206 | $as_echo "no" >&6; } | |
7207 | fi | |
7208 | ||
7209 | ||
7210 | ||
7211 | ||
7212 | ## Need makeinfo >= 4.6 (?) to build the manuals. | |
7213 | # Extract the first word of "makeinfo", so it can be a program name with args. | |
7214 | set dummy makeinfo; ac_word=$2 | |
7215 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
7216 | $as_echo_n "checking for $ac_word... " >&6; } | |
5f64f7bd | 7217 | if test "${ac_cv_path_MAKEINFO+set}" = set; then : |
067d23c9 KY |
7218 | $as_echo_n "(cached) " >&6 |
7219 | else | |
7220 | case $MAKEINFO in | |
7221 | [\\/]* | ?:[\\/]*) | |
7222 | ac_cv_path_MAKEINFO="$MAKEINFO" # Let the user override the test with a path. | |
7223 | ;; | |
7224 | *) | |
7225 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7226 | for as_dir in $PATH | |
7227 | do | |
7228 | IFS=$as_save_IFS | |
7229 | test -z "$as_dir" && as_dir=. | |
7230 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7231 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
7232 | ac_cv_path_MAKEINFO="$as_dir/$ac_word$ac_exec_ext" | |
7233 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7234 | break 2 | |
7235 | fi | |
7236 | done | |
7237 | done | |
7238 | IFS=$as_save_IFS | |
7239 | ||
7240 | test -z "$ac_cv_path_MAKEINFO" && ac_cv_path_MAKEINFO="no" | |
7241 | ;; | |
7242 | esac | |
7243 | fi | |
7244 | MAKEINFO=$ac_cv_path_MAKEINFO | |
7245 | if test -n "$MAKEINFO"; then | |
7246 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKEINFO" >&5 | |
7247 | $as_echo "$MAKEINFO" >&6; } | |
7248 | else | |
7249 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
7250 | $as_echo "no" >&6; } | |
7251 | fi | |
7252 | ||
7253 | ||
7254 | if test "$MAKEINFO" != "no" && \ | |
7255 | 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 | |
7256 | MAKEINFO=no | |
7257 | fi | |
7258 | ||
7259 | ## Makeinfo is unusual. For a released Emacs, the manuals are | |
7260 | ## pre-built, and not deleted by the normal clean rules. makeinfo is | |
7261 | ## therefore in the category of "special tools" not normally required, which | |
7262 | ## configure does not have to check for (eg autoconf itself). | |
7263 | ## In a Bazaar checkout on the other hand, the manuals are not included. | |
7264 | ## So makeinfo is a requirement to build from Bazaar, and configure | |
7265 | ## should test for it as it does for any other build requirement. | |
7266 | ## We use the presence of $srcdir/info/emacs to distinguish a release, | |
7267 | ## with pre-built manuals, from a Bazaar checkout. | |
96f129d5 GM |
7268 | HAVE_MAKEINFO=yes |
7269 | ||
067d23c9 | 7270 | if test "$MAKEINFO" = "no"; then |
96f129d5 | 7271 | MAKEINFO=makeinfo |
067d23c9 | 7272 | if test "x${with_makeinfo}" = "xno"; then |
96f129d5 | 7273 | HAVE_MAKEINFO=no |
067d23c9 | 7274 | elif test ! -e $srcdir/info/emacs; then |
5f64f7bd | 7275 | as_fn_error "You do not seem to have makeinfo >= 4.6, and your |
067d23c9 KY |
7276 | source tree does not seem to have pre-built manuals in the \`info' directory. |
7277 | Either install a suitable version of makeinfo, or re-run configure | |
7278 | with the \`--without-makeinfo' option to build without the manuals. " "$LINENO" 5 | |
7279 | fi | |
7280 | fi | |
7281 | ||
7282 | ||
96f129d5 | 7283 | |
067d23c9 KY |
7284 | if test x$GCC = xyes; then |
7285 | test "x$GCC_LINK_TEST_OPTIONS" != x && \ | |
7286 | ac_link="$ac_link $GCC_LINK_TEST_OPTIONS" | |
7287 | else | |
7288 | test "x$NON_GCC_LINK_TEST_OPTIONS" != x && \ | |
7289 | ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS" | |
7290 | fi | |
7291 | ||
7292 | ||
7293 | late_LDFLAGS=$LDFLAGS | |
7294 | if test x$GCC = xyes; then | |
7295 | LDFLAGS="$LDFLAGS -Wl,-znocombreloc" | |
7296 | else | |
7297 | LDFLAGS="$LDFLAGS -znocombreloc" | |
7298 | fi | |
7299 | ||
7300 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -znocombreloc" >&5 | |
7301 | $as_echo_n "checking for -znocombreloc... " >&6; } | |
7302 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7303 | /* end confdefs.h. */ | |
7304 | ||
7305 | int | |
7306 | main () | |
7307 | { | |
7308 | ||
7309 | ; | |
7310 | return 0; | |
7311 | } | |
7312 | _ACEOF | |
7313 | if ac_fn_c_try_link "$LINENO"; then : | |
7314 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
7315 | $as_echo "yes" >&6; } | |
7316 | else | |
7317 | LDFLAGS=$late_LDFLAGS | |
7318 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
7319 | $as_echo "no" >&6; } | |
7320 | fi | |
7321 | rm -f core conftest.err conftest.$ac_objext \ | |
7322 | conftest$ac_exeext conftest.$ac_ext | |
7323 | ||
7324 | ||
7325 | # The value of CPP is a quoted variable reference, so we need to do this | |
7326 | # to get its actual value... | |
7327 | CPP=`eval "echo $CPP"` | |
7328 | ||
7329 | ||
125c3718 | 7330 | test "x$CANNOT_DUMP" = "x" && CANNOT_DUMP=no |
067d23c9 | 7331 | case "$opsys" in |
125c3718 PE |
7332 | your-opsys-here) CANNOT_DUMP=yes ;; |
7333 | esac | |
7334 | ||
7335 | test "$CANNOT_DUMP" = "yes" && \ | |
067d23c9 KY |
7336 | |
7337 | $as_echo "#define CANNOT_DUMP 1" >>confdefs.h | |
7338 | ||
125c3718 | 7339 | |
067d23c9 KY |
7340 | |
7341 | ||
7342 | ||
7343 | UNEXEC_OBJ=unexelf.o | |
7344 | case "$opsys" in | |
7345 | # MSDOS uses unexcoff.o | |
7346 | # MSWindows uses unexw32.o | |
7347 | aix4-2) | |
7348 | UNEXEC_OBJ=unexaix.o | |
7349 | ;; | |
7350 | cygwin) | |
7351 | UNEXEC_OBJ=unexcw.o | |
7352 | ;; | |
7353 | darwin) | |
7354 | UNEXEC_OBJ=unexmacosx.o | |
7355 | ;; | |
7356 | hpux10-20 | hpux11) | |
7357 | UNEXEC_OBJ=unexhp9k800.o | |
7358 | ;; | |
7359 | sol2-10) | |
7360 | # Use the Solaris dldump() function, called from unexsol.c, to dump | |
7361 | # emacs, instead of the generic ELF dump code found in unexelf.c. | |
7362 | # The resulting binary has a complete symbol table, and is better | |
7363 | # for debugging and other observability tools (debuggers, pstack, etc). | |
7364 | # | |
7365 | # If you encounter a problem using dldump(), please consider sending | |
7366 | # a message to the OpenSolaris tools-linking mailing list: | |
7367 | # http://mail.opensolaris.org/mailman/listinfo/tools-linking | |
7368 | # | |
7369 | # It is likely that dldump() works with older Solaris too, but this has | |
7370 | # not been tested, so for now this change is for Solaris 10 or newer. | |
7371 | UNEXEC_OBJ=unexsol.o | |
7372 | ;; | |
7373 | esac | |
7374 | ||
7375 | LD_SWITCH_SYSTEM= | |
7376 | case "$opsys" in | |
7377 | freebsd) | |
7378 | ## Let `ld' find image libs and similar things in /usr/local/lib. | |
7379 | ## The system compiler, GCC, has apparently been modified to not | |
7380 | ## look there, contrary to what a stock GCC would do. | |
7381 | LD_SWITCH_SYSTEM=-L/usr/local/lib | |
7382 | ;; | |
7383 | ||
7384 | gnu-linux) | |
7385 | ## cpp test was "ifdef __mips__", but presumably this is equivalent... | |
d6a003a8 | 7386 | case $host_cpu in mips*) LD_SWITCH_SYSTEM="-G 0";; esac |
067d23c9 KY |
7387 | ;; |
7388 | ||
7389 | netbsd) | |
7390 | LD_SWITCH_SYSTEM="-Wl,-rpath,/usr/pkg/lib -L/usr/pkg/lib -Wl,-rpath,/usr/local/lib -L/usr/local/lib" | |
7391 | ;; | |
7392 | ||
7393 | openbsd) | |
7394 | ## Han Boetes <han@mijncomputer.nl> says this is necessary, | |
7395 | ## otherwise Emacs dumps core on elf systems. | |
7396 | LD_SWITCH_SYSTEM="-Z" | |
7397 | ;; | |
7398 | esac | |
7399 | ||
7400 | ||
7401 | ac_link="$ac_link $LD_SWITCH_SYSTEM" | |
7402 | ||
7403 | ## This setting of LD_SWITCH_SYSTEM references LD_SWITCH_X_SITE_AUX, | |
7404 | ## which has not been defined yet. When this was handled with cpp, | |
7405 | ## it was expanded to null when configure sourced the s/*.h file. | |
7406 | ## Thus LD_SWITCH_SYSTEM had different values in configure and the Makefiles. | |
7407 | ## FIXME it would be cleaner to put this in LD_SWITCH_SYSTEM_TEMACS | |
7408 | ## (or somesuch), but because it is supposed to go at the _front_ | |
7409 | ## of LD_SWITCH_SYSTEM, we cannot do that in exactly the same way. | |
7410 | ## Compare with the gnu-linux case below, which added to the end | |
7411 | ## of LD_SWITCH_SYSTEM, and so can instead go at the front of | |
7412 | ## LD_SWITCH_SYSTEM_TEMACS. | |
7413 | case "$opsys" in | |
7414 | netbsd|openbsd) | |
7415 | ## _AUX_RPATH is like _AUX, but uses -rpath instead of -R. | |
7416 | LD_SWITCH_SYSTEM="\$(LD_SWITCH_X_SITE_AUX_RPATH) $LD_SWITCH_SYSTEM" ;; | |
7417 | esac | |
7418 | ||
7419 | ||
7420 | C_SWITCH_MACHINE= | |
7421 | if test "$machine" = "alpha"; then | |
7422 | ac_fn_c_check_decl "$LINENO" "__ELF__" "ac_cv_have_decl___ELF__" "$ac_includes_default" | |
5f64f7bd | 7423 | if test "x$ac_cv_have_decl___ELF__" = x""yes; then : |
067d23c9 KY |
7424 | |
7425 | fi | |
7426 | ||
7427 | if test "$ac_cv_have_decl___ELF__" = "yes"; then | |
7428 | ## With ELF, make sure that all common symbols get allocated to in the | |
7429 | ## data section. Otherwise, the dump of temacs may miss variables in | |
7430 | ## the shared library that have been initialized. For example, with | |
7431 | ## GNU libc, __malloc_initialized would normally be resolved to the | |
7432 | ## shared library's .bss section, which is fatal. | |
7433 | if test "x$GCC" = "xyes"; then | |
7434 | C_SWITCH_MACHINE="-fno-common" | |
7435 | else | |
5f64f7bd | 7436 | as_fn_error "What gives? Fix me if DEC Unix supports ELF now." "$LINENO" 5 |
067d23c9 KY |
7437 | fi |
7438 | else | |
7439 | UNEXEC_OBJ=unexalpha.o | |
7440 | fi | |
7441 | fi | |
7442 | ||
7443 | ||
7444 | ||
7445 | ||
7446 | C_SWITCH_SYSTEM= | |
7447 | ## Some programs in src produce warnings saying certain subprograms | |
7448 | ## are too complex and need a MAXMEM value greater than 2000 for | |
7449 | ## additional optimization. --nils@exp-math.uni-essen.de | |
7450 | test "$opsys" = "aix4.2" && test "x$GCC" != "xyes" && \ | |
7451 | C_SWITCH_SYSTEM="-ma -qmaxmem=4000" | |
7452 | ## gnu-linux might need -D_BSD_SOURCE on old libc5 systems. | |
7453 | ## It is redundant in glibc2, since we define _GNU_SOURCE. | |
7454 | ||
7455 | ||
7456 | ||
7457 | LIBS_SYSTEM= | |
7458 | case "$opsys" in | |
7459 | ## IBM's X11R5 uses -lIM and -liconv in AIX 3.2.2. | |
7460 | aix4-2) LIBS_SYSTEM="-lrts -lIM -liconv" ;; | |
7461 | ||
7462 | freebsd) LIBS_SYSTEM="-lutil" ;; | |
7463 | ||
7464 | hpux*) LIBS_SYSTEM="-l:libdld.sl" ;; | |
7465 | ||
1f5d53eb | 7466 | sol2*) LIBS_SYSTEM="-lsocket -lnsl" ;; |
067d23c9 KY |
7467 | |
7468 | ## Motif needs -lgen. | |
7469 | unixware) LIBS_SYSTEM="-lsocket -lnsl -lelf -lgen" ;; | |
7470 | esac | |
7471 | ||
7472 | ||
7473 | ||
7474 | ### Make sure subsequent tests use flags consistent with the build flags. | |
7475 | ||
7476 | if test x"${OVERRIDE_CPPFLAGS}" != x; then | |
7477 | CPPFLAGS="${OVERRIDE_CPPFLAGS}" | |
7478 | else | |
7479 | CPPFLAGS="$C_SWITCH_SYSTEM $C_SWITCH_MACHINE $CPPFLAGS" | |
7480 | fi | |
7481 | ||
4fda9c95 GM |
7482 | # Suppress obsolescent Autoconf test for size_t; Emacs assumes C89 or better. |
7483 | ||
3e0be4ab GM |
7484 | # Likewise for obsolescent test for uid_t, gid_t; Emacs assumes them. |
7485 | ||
4fda9c95 | 7486 | |
067d23c9 KY |
7487 | # Check whether --enable-largefile was given. |
7488 | if test "${enable_largefile+set}" = set; then : | |
7489 | enableval=$enable_largefile; | |
7490 | fi | |
7491 | ||
7492 | if test "$enable_largefile" != no; then | |
7493 | ||
7494 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 | |
7495 | $as_echo_n "checking for special C compiler options needed for large files... " >&6; } | |
5f64f7bd | 7496 | if test "${ac_cv_sys_largefile_CC+set}" = set; then : |
067d23c9 KY |
7497 | $as_echo_n "(cached) " >&6 |
7498 | else | |
7499 | ac_cv_sys_largefile_CC=no | |
7500 | if test "$GCC" != yes; then | |
7501 | ac_save_CC=$CC | |
7502 | while :; do | |
7503 | # IRIX 6.2 and later do not support large files by default, | |
7504 | # so use the C compiler's -n32 option if that helps. | |
7505 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7506 | /* end confdefs.h. */ | |
7507 | #include <sys/types.h> | |
7508 | /* Check that off_t can represent 2**63 - 1 correctly. | |
7509 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
7510 | since some C++ compilers masquerading as C compilers | |
7511 | incorrectly reject 9223372036854775807. */ | |
7512 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
7513 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
7514 | && LARGE_OFF_T % 2147483647 == 1) | |
7515 | ? 1 : -1]; | |
7516 | int | |
7517 | main () | |
7518 | { | |
7519 | ||
7520 | ; | |
7521 | return 0; | |
7522 | } | |
7523 | _ACEOF | |
7524 | if ac_fn_c_try_compile "$LINENO"; then : | |
7525 | break | |
7526 | fi | |
7527 | rm -f core conftest.err conftest.$ac_objext | |
7528 | CC="$CC -n32" | |
7529 | if ac_fn_c_try_compile "$LINENO"; then : | |
7530 | ac_cv_sys_largefile_CC=' -n32'; break | |
7531 | fi | |
7532 | rm -f core conftest.err conftest.$ac_objext | |
7533 | break | |
7534 | done | |
7535 | CC=$ac_save_CC | |
7536 | rm -f conftest.$ac_ext | |
7537 | fi | |
7538 | fi | |
7539 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 | |
7540 | $as_echo "$ac_cv_sys_largefile_CC" >&6; } | |
7541 | if test "$ac_cv_sys_largefile_CC" != no; then | |
7542 | CC=$CC$ac_cv_sys_largefile_CC | |
7543 | fi | |
7544 | ||
7545 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 | |
7546 | $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } | |
5f64f7bd | 7547 | if test "${ac_cv_sys_file_offset_bits+set}" = set; then : |
067d23c9 KY |
7548 | $as_echo_n "(cached) " >&6 |
7549 | else | |
7550 | while :; do | |
7551 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7552 | /* end confdefs.h. */ | |
7553 | #include <sys/types.h> | |
7554 | /* Check that off_t can represent 2**63 - 1 correctly. | |
7555 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
7556 | since some C++ compilers masquerading as C compilers | |
7557 | incorrectly reject 9223372036854775807. */ | |
7558 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
7559 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
7560 | && LARGE_OFF_T % 2147483647 == 1) | |
7561 | ? 1 : -1]; | |
7562 | int | |
7563 | main () | |
7564 | { | |
7565 | ||
7566 | ; | |
7567 | return 0; | |
7568 | } | |
7569 | _ACEOF | |
7570 | if ac_fn_c_try_compile "$LINENO"; then : | |
7571 | ac_cv_sys_file_offset_bits=no; break | |
7572 | fi | |
7573 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7574 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7575 | /* end confdefs.h. */ | |
7576 | #define _FILE_OFFSET_BITS 64 | |
7577 | #include <sys/types.h> | |
7578 | /* Check that off_t can represent 2**63 - 1 correctly. | |
7579 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
7580 | since some C++ compilers masquerading as C compilers | |
7581 | incorrectly reject 9223372036854775807. */ | |
7582 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
7583 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
7584 | && LARGE_OFF_T % 2147483647 == 1) | |
7585 | ? 1 : -1]; | |
7586 | int | |
7587 | main () | |
7588 | { | |
7589 | ||
7590 | ; | |
7591 | return 0; | |
7592 | } | |
7593 | _ACEOF | |
7594 | if ac_fn_c_try_compile "$LINENO"; then : | |
7595 | ac_cv_sys_file_offset_bits=64; break | |
7596 | fi | |
7597 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7598 | ac_cv_sys_file_offset_bits=unknown | |
7599 | break | |
7600 | done | |
7601 | fi | |
7602 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 | |
7603 | $as_echo "$ac_cv_sys_file_offset_bits" >&6; } | |
7604 | case $ac_cv_sys_file_offset_bits in #( | |
7605 | no | unknown) ;; | |
7606 | *) | |
7607 | cat >>confdefs.h <<_ACEOF | |
7608 | #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits | |
7609 | _ACEOF | |
7610 | ;; | |
7611 | esac | |
7612 | rm -rf conftest* | |
7613 | if test $ac_cv_sys_file_offset_bits = unknown; then | |
7614 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 | |
7615 | $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } | |
5f64f7bd | 7616 | if test "${ac_cv_sys_large_files+set}" = set; then : |
067d23c9 KY |
7617 | $as_echo_n "(cached) " >&6 |
7618 | else | |
7619 | while :; do | |
7620 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7621 | /* end confdefs.h. */ | |
7622 | #include <sys/types.h> | |
7623 | /* Check that off_t can represent 2**63 - 1 correctly. | |
7624 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
7625 | since some C++ compilers masquerading as C compilers | |
7626 | incorrectly reject 9223372036854775807. */ | |
7627 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
7628 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
7629 | && LARGE_OFF_T % 2147483647 == 1) | |
7630 | ? 1 : -1]; | |
7631 | int | |
7632 | main () | |
7633 | { | |
7634 | ||
7635 | ; | |
7636 | return 0; | |
7637 | } | |
7638 | _ACEOF | |
7639 | if ac_fn_c_try_compile "$LINENO"; then : | |
7640 | ac_cv_sys_large_files=no; break | |
7641 | fi | |
7642 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7643 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7644 | /* end confdefs.h. */ | |
7645 | #define _LARGE_FILES 1 | |
7646 | #include <sys/types.h> | |
7647 | /* Check that off_t can represent 2**63 - 1 correctly. | |
7648 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
7649 | since some C++ compilers masquerading as C compilers | |
7650 | incorrectly reject 9223372036854775807. */ | |
7651 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
7652 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
7653 | && LARGE_OFF_T % 2147483647 == 1) | |
7654 | ? 1 : -1]; | |
7655 | int | |
7656 | main () | |
7657 | { | |
7658 | ||
7659 | ; | |
7660 | return 0; | |
7661 | } | |
7662 | _ACEOF | |
7663 | if ac_fn_c_try_compile "$LINENO"; then : | |
7664 | ac_cv_sys_large_files=1; break | |
7665 | fi | |
7666 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7667 | ac_cv_sys_large_files=unknown | |
7668 | break | |
7669 | done | |
7670 | fi | |
7671 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 | |
7672 | $as_echo "$ac_cv_sys_large_files" >&6; } | |
7673 | case $ac_cv_sys_large_files in #( | |
7674 | no | unknown) ;; | |
7675 | *) | |
7676 | cat >>confdefs.h <<_ACEOF | |
7677 | #define _LARGE_FILES $ac_cv_sys_large_files | |
7678 | _ACEOF | |
7679 | ;; | |
7680 | esac | |
7681 | rm -rf conftest* | |
7682 | fi | |
7683 | fi | |
7684 | ||
7685 | ||
7686 | ||
067d23c9 KY |
7687 | LIB_MATH=-lm |
7688 | LIB_STANDARD= | |
7689 | START_FILES= | |
7690 | ||
7691 | case $opsys in | |
7692 | cygwin ) | |
7693 | LIB_MATH= | |
7694 | START_FILES='pre-crt0.o' | |
7695 | ;; | |
7696 | darwin ) | |
7697 | ## Adding -lm confuses the dynamic linker, so omit it. | |
7698 | LIB_MATH= | |
7699 | START_FILES='pre-crt0.o' | |
7700 | ;; | |
7701 | freebsd ) | |
7702 | LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o $(CRT_DIR)/crtn.o' | |
7703 | START_FILES='pre-crt0.o $(CRT_DIR)/crt1.o $(CRT_DIR)/crti.o $(CRT_DIR)/crtbegin.o' | |
7704 | ;; | |
7705 | gnu-linux | gnu-kfreebsd ) | |
7706 | LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtn.o' | |
7707 | START_FILES='pre-crt0.o $(CRT_DIR)/crt1.o $(CRT_DIR)/crti.o' | |
7708 | ;; | |
7709 | hpux10-20 | hpux11 ) | |
7710 | LIB_STANDARD=-lc | |
7711 | START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o' | |
7712 | ;; | |
7713 | netbsd | openbsd ) | |
7714 | if test -f $CRT_DIR/crti.o; then | |
7715 | LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o $(CRT_DIR)/crtn.o' | |
7716 | START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o $(CRT_DIR)/crti.o $(CRT_DIR)/crtbegin.o' | |
7717 | else | |
7718 | LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o' | |
7719 | START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o $(CRT_DIR)/crtbegin.o' | |
7720 | fi | |
7721 | ;; | |
7722 | esac | |
7723 | ||
7724 | ||
7725 | ||
7726 | ||
130f1dac GM |
7727 | crt_files= |
7728 | ||
7729 | for file in x $LIB_STANDARD $START_FILES; do | |
7730 | case "$file" in | |
7731 | *CRT_DIR*) crt_files="$crt_files `echo $file | sed -e 's|.*/||'`" ;; | |
7732 | esac | |
7733 | done | |
7734 | ||
7735 | if test "x$crt_files" != x; then | |
7736 | ||
7737 | ## If user specified a crt-dir, use that unconditionally. | |
7738 | crt_gcc=no | |
7739 | ||
7740 | if test "X$CRT_DIR" = "X"; then | |
7741 | ||
7742 | CRT_DIR=/usr/lib # default | |
7743 | ||
7744 | case "$canonical" in | |
7745 | x86_64-*-linux-gnu* | s390x-*-linux-gnu*) | |
7746 | ## On x86-64 and s390x GNU/Linux distributions, the standard library | |
7747 | ## can be in a variety of places. We only try /usr/lib64 and /usr/lib. | |
7748 | ## For anything else (eg /usr/lib32), it is up the user to specify | |
7749 | ## the location (bug#5655). | |
7750 | ## Test for crtn.o, not just the directory, because sometimes the | |
7751 | ## directory exists but does not have the relevant files (bug#1287). | |
7752 | ## FIXME better to test for binary compatibility somehow. | |
7753 | test -e /usr/lib64/crtn.o && CRT_DIR=/usr/lib64 | |
7754 | ;; | |
7755 | ||
7756 | powerpc64-*-linux-gnu* | sparc64-*-linux-gnu*) CRT_DIR=/usr/lib64 ;; | |
7757 | esac | |
7758 | ||
7759 | case "$opsys" in | |
7760 | hpux10-20) CRT_DIR=/lib ;; | |
7761 | esac | |
7762 | ||
7763 | test "x${GCC}" = xyes && crt_gcc=yes | |
7764 | ||
7765 | fi # CRT_DIR = "" | |
7766 | ||
7767 | crt_missing= | |
7768 | ||
7769 | for file in $crt_files; do | |
7770 | ||
7771 | ## If we're using gcc, try to determine it automatically by asking | |
7772 | ## gcc. [If this doesn't work, CRT_DIR will remain at the | |
7773 | ## system-dependent default from above.] | |
7774 | if test $crt_gcc = yes && test ! -e $CRT_DIR/$file; then | |
7775 | ||
7776 | crt_file=`$CC --print-file-name=$file 2>/dev/null` | |
7777 | case "$crt_file" in | |
7778 | */*) | |
7779 | CRT_DIR=`$as_dirname -- "$crt_file" || | |
7780 | $as_expr X"$crt_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
7781 | X"$crt_file" : 'X\(//\)[^/]' \| \ | |
7782 | X"$crt_file" : 'X\(//\)$' \| \ | |
7783 | X"$crt_file" : 'X\(/\)' \| . 2>/dev/null || | |
7784 | $as_echo X"$crt_file" | | |
7785 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
7786 | s//\1/ | |
7787 | q | |
7788 | } | |
7789 | /^X\(\/\/\)[^/].*/{ | |
7790 | s//\1/ | |
7791 | q | |
7792 | } | |
7793 | /^X\(\/\/\)$/{ | |
7794 | s//\1/ | |
7795 | q | |
7796 | } | |
7797 | /^X\(\/\).*/{ | |
7798 | s//\1/ | |
7799 | q | |
7800 | } | |
7801 | s/.*/./; q'` | |
7802 | ;; | |
7803 | esac | |
7804 | fi | |
7805 | ||
7806 | crt_gcc=no | |
7807 | ||
7808 | test -e $CRT_DIR/$file || crt_missing="$crt_missing $file" | |
7809 | done # $crt_files | |
7810 | ||
7811 | test "x$crt_missing" = x || \ | |
7812 | as_fn_error "Required file(s) not found:$crt_missing | |
7813 | Try using the --with-crt-dir option." "$LINENO" 5 | |
7814 | ||
7815 | fi # crt_files != "" | |
7816 | ||
7817 | ||
7818 | ||
7819 | ||
067d23c9 KY |
7820 | |
7821 | ||
7822 | ||
7823 | if test "${with_sound}" != "no"; then | |
7824 | # Sound support for GNU/Linux and the free BSDs. | |
7825 | for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h | |
7826 | do : | |
7827 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
7828 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
5f64f7bd GM |
7829 | eval as_val=\$$as_ac_Header |
7830 | if test "x$as_val" = x""yes; then : | |
067d23c9 KY |
7831 | cat >>confdefs.h <<_ACEOF |
7832 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
7833 | _ACEOF | |
7834 | have_sound_header=yes | |
7835 | fi | |
7836 | ||
7837 | done | |
7838 | ||
7839 | # Emulation library used on NetBSD. | |
7840 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _oss_ioctl in -lossaudio" >&5 | |
7841 | $as_echo_n "checking for _oss_ioctl in -lossaudio... " >&6; } | |
5f64f7bd | 7842 | if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then : |
067d23c9 KY |
7843 | $as_echo_n "(cached) " >&6 |
7844 | else | |
7845 | ac_check_lib_save_LIBS=$LIBS | |
7846 | LIBS="-lossaudio $LIBS" | |
7847 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7848 | /* end confdefs.h. */ | |
7849 | ||
7850 | /* Override any GCC internal prototype to avoid an error. | |
7851 | Use char because int might match the return type of a GCC | |
7852 | builtin and then its argument prototype would still apply. */ | |
7853 | #ifdef __cplusplus | |
7854 | extern "C" | |
7855 | #endif | |
7856 | char _oss_ioctl (); | |
7857 | int | |
7858 | main () | |
7859 | { | |
7860 | return _oss_ioctl (); | |
7861 | ; | |
7862 | return 0; | |
7863 | } | |
7864 | _ACEOF | |
7865 | if ac_fn_c_try_link "$LINENO"; then : | |
7866 | ac_cv_lib_ossaudio__oss_ioctl=yes | |
7867 | else | |
7868 | ac_cv_lib_ossaudio__oss_ioctl=no | |
7869 | fi | |
7870 | rm -f core conftest.err conftest.$ac_objext \ | |
7871 | conftest$ac_exeext conftest.$ac_ext | |
7872 | LIBS=$ac_check_lib_save_LIBS | |
7873 | fi | |
7874 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5 | |
7875 | $as_echo "$ac_cv_lib_ossaudio__oss_ioctl" >&6; } | |
5f64f7bd | 7876 | if test "x$ac_cv_lib_ossaudio__oss_ioctl" = x""yes; then : |
067d23c9 KY |
7877 | LIBSOUND=-lossaudio |
7878 | else | |
7879 | LIBSOUND= | |
7880 | fi | |
7881 | ||
7882 | ||
7883 | ||
7884 | ALSA_REQUIRED=1.0.0 | |
7885 | ALSA_MODULES="alsa >= $ALSA_REQUIRED" | |
7886 | ||
7887 | succeeded=no | |
7888 | ||
7889 | # Extract the first word of "pkg-config", so it can be a program name with args. | |
7890 | set dummy pkg-config; ac_word=$2 | |
7891 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
7892 | $as_echo_n "checking for $ac_word... " >&6; } | |
5f64f7bd | 7893 | if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : |
067d23c9 KY |
7894 | $as_echo_n "(cached) " >&6 |
7895 | else | |
7896 | case $PKG_CONFIG in | |
7897 | [\\/]* | ?:[\\/]*) | |
7898 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
7899 | ;; | |
7900 | *) | |
7901 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7902 | for as_dir in $PATH | |
7903 | do | |
7904 | IFS=$as_save_IFS | |
7905 | test -z "$as_dir" && as_dir=. | |
7906 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7907 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
7908 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
7909 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7910 | break 2 | |
7911 | fi | |
7912 | done | |
7913 | done | |
7914 | IFS=$as_save_IFS | |
7915 | ||
7916 | test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" | |
7917 | ;; | |
7918 | esac | |
7919 | fi | |
7920 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG | |
7921 | if test -n "$PKG_CONFIG"; then | |
7922 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
7923 | $as_echo "$PKG_CONFIG" >&6; } | |
7924 | else | |
7925 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
7926 | $as_echo "no" >&6; } | |
7927 | fi | |
7928 | ||
7929 | ||
7930 | ||
7931 | if test "$PKG_CONFIG" = "no" ; then | |
7932 | HAVE_ALSA=no | |
7933 | else | |
7934 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
7935 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
7936 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ALSA_MODULES" >&5 | |
7937 | $as_echo_n "checking for $ALSA_MODULES... " >&6; } | |
7938 | ||
7939 | if $PKG_CONFIG --exists "$ALSA_MODULES" 2>&5; then | |
7940 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
7941 | $as_echo "yes" >&6; } | |
7942 | succeeded=yes | |
7943 | ||
7944 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking ALSA_CFLAGS" >&5 | |
7945 | $as_echo_n "checking ALSA_CFLAGS... " >&6; } | |
7946 | ALSA_CFLAGS=`$PKG_CONFIG --cflags "$ALSA_MODULES"|sed -e 's,///*,/,g'` | |
7947 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ALSA_CFLAGS" >&5 | |
7948 | $as_echo "$ALSA_CFLAGS" >&6; } | |
7949 | ||
7950 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking ALSA_LIBS" >&5 | |
7951 | $as_echo_n "checking ALSA_LIBS... " >&6; } | |
7952 | ALSA_LIBS=`$PKG_CONFIG --libs "$ALSA_MODULES"|sed -e 's,///*,/,g'` | |
7953 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ALSA_LIBS" >&5 | |
7954 | $as_echo "$ALSA_LIBS" >&6; } | |
7955 | else | |
7956 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
7957 | $as_echo "no" >&6; } | |
7958 | ALSA_CFLAGS="" | |
7959 | ALSA_LIBS="" | |
7960 | ## If we have a custom action on failure, don't print errors, but | |
7961 | ## do set a variable so people can do so. | |
7962 | ALSA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$ALSA_MODULES"` | |
7963 | ||
7964 | fi | |
7965 | ||
7966 | ||
7967 | ||
7968 | else | |
7969 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
7970 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
7971 | fi | |
7972 | fi | |
7973 | ||
7974 | if test $succeeded = yes; then | |
7975 | HAVE_ALSA=yes | |
7976 | else | |
7977 | HAVE_ALSA=no | |
7978 | fi | |
7979 | ||
7980 | if test $HAVE_ALSA = yes; then | |
7981 | SAVE_CFLAGS="$CFLAGS" | |
7982 | SAVE_LDFLAGS="$LDFLAGS" | |
7983 | CFLAGS="$ALSA_CFLAGS $CFLAGS" | |
7984 | LDFLAGS="$ALSA_LIBS $LDFLAGS" | |
7985 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7986 | /* end confdefs.h. */ | |
7987 | #include <asoundlib.h> | |
7988 | int | |
7989 | main () | |
7990 | { | |
7991 | snd_lib_error_set_handler (0); | |
7992 | ; | |
7993 | return 0; | |
7994 | } | |
7995 | _ACEOF | |
7996 | if ac_fn_c_try_compile "$LINENO"; then : | |
7997 | emacs_alsa_normal=yes | |
7998 | else | |
7999 | emacs_alsa_normal=no | |
8000 | fi | |
8001 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8002 | if test "$emacs_alsa_normal" != yes; then | |
8003 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8004 | /* end confdefs.h. */ | |
8005 | #include <alsa/asoundlib.h> | |
8006 | int | |
8007 | main () | |
8008 | { | |
8009 | snd_lib_error_set_handler (0); | |
8010 | ; | |
8011 | return 0; | |
8012 | } | |
8013 | _ACEOF | |
8014 | if ac_fn_c_try_compile "$LINENO"; then : | |
8015 | emacs_alsa_subdir=yes | |
8016 | else | |
8017 | emacs_alsa_subdir=no | |
8018 | fi | |
8019 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8020 | if test "$emacs_alsa_subdir" != yes; then | |
5f64f7bd | 8021 | as_fn_error "pkg-config found alsa, but it does not compile. See config.log for error messages." "$LINENO" 5 |
067d23c9 KY |
8022 | fi |
8023 | ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE" | |
8024 | fi | |
8025 | ||
8026 | CFLAGS="$SAVE_CFLAGS" | |
8027 | LDFLAGS="$SAVE_LDFLAGS" | |
8028 | LIBSOUND="$LIBSOUND $ALSA_LIBS" | |
8029 | CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS" | |
8030 | ||
8031 | $as_echo "#define HAVE_ALSA 1" >>confdefs.h | |
8032 | ||
8033 | fi | |
8034 | ||
8035 | if test x$have_sound_header = xyes || test $HAVE_ALSA = yes; then | |
8036 | case "$opsys" in | |
8037 | gnu-linux|freebsd|netbsd) | |
8038 | ||
8039 | $as_echo "#define HAVE_SOUND 1" >>confdefs.h | |
8040 | ||
8041 | ;; | |
8042 | esac | |
8043 | fi | |
8044 | ||
8045 | ||
8046 | fi | |
8047 | ||
8048 | for ac_header in sys/select.h sys/time.h unistd.h utime.h \ | |
8049 | linux/version.h sys/systeminfo.h limits.h \ | |
8050 | stdio_ext.h fcntl.h coff.h pty.h sys/mman.h \ | |
8051 | sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h \ | |
8052 | sys/utsname.h pwd.h utmp.h dirent.h util.h | |
8053 | do : | |
8054 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
8055 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
5f64f7bd GM |
8056 | eval as_val=\$$as_ac_Header |
8057 | if test "x$as_val" = x""yes; then : | |
067d23c9 KY |
8058 | cat >>confdefs.h <<_ACEOF |
8059 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
8060 | _ACEOF | |
8061 | ||
8062 | fi | |
8063 | ||
8064 | done | |
8065 | ||
8066 | ||
8067 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if personality LINUX32 can be set" >&5 | |
8068 | $as_echo_n "checking if personality LINUX32 can be set... " >&6; } | |
8069 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8070 | /* end confdefs.h. */ | |
8071 | #include <sys/personality.h> | |
8072 | int | |
8073 | main () | |
8074 | { | |
8075 | personality (PER_LINUX32) | |
8076 | ; | |
8077 | return 0; | |
8078 | } | |
8079 | _ACEOF | |
8080 | if ac_fn_c_try_compile "$LINENO"; then : | |
8081 | emacs_cv_personality_linux32=yes | |
8082 | else | |
8083 | emacs_cv_personality_linux32=no | |
8084 | fi | |
8085 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8086 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_personality_linux32" >&5 | |
8087 | $as_echo "$emacs_cv_personality_linux32" >&6; } | |
8088 | ||
8089 | if test $emacs_cv_personality_linux32 = yes; then | |
8090 | ||
8091 | $as_echo "#define HAVE_PERSONALITY_LINUX32 1" >>confdefs.h | |
8092 | ||
8093 | fi | |
8094 | ||
8095 | for ac_header in term.h | |
8096 | do : | |
8097 | ac_fn_c_check_header_preproc "$LINENO" "term.h" "ac_cv_header_term_h" | |
5f64f7bd | 8098 | if test "x$ac_cv_header_term_h" = x""yes; then : |
067d23c9 KY |
8099 | cat >>confdefs.h <<_ACEOF |
8100 | #define HAVE_TERM_H 1 | |
8101 | _ACEOF | |
8102 | ||
8103 | fi | |
8104 | ||
8105 | done | |
8106 | ||
8107 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 | |
8108 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
5f64f7bd | 8109 | if test "${ac_cv_header_stdc+set}" = set; then : |
067d23c9 KY |
8110 | $as_echo_n "(cached) " >&6 |
8111 | else | |
8112 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8113 | /* end confdefs.h. */ | |
8114 | #include <stdlib.h> | |
8115 | #include <stdarg.h> | |
8116 | #include <string.h> | |
8117 | #include <float.h> | |
8118 | ||
8119 | int | |
8120 | main () | |
8121 | { | |
8122 | ||
8123 | ; | |
8124 | return 0; | |
8125 | } | |
8126 | _ACEOF | |
8127 | if ac_fn_c_try_compile "$LINENO"; then : | |
8128 | ac_cv_header_stdc=yes | |
8129 | else | |
8130 | ac_cv_header_stdc=no | |
8131 | fi | |
8132 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8133 | ||
8134 | if test $ac_cv_header_stdc = yes; then | |
8135 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
8136 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8137 | /* end confdefs.h. */ | |
8138 | #include <string.h> | |
8139 | ||
8140 | _ACEOF | |
8141 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
8142 | $EGREP "memchr" >/dev/null 2>&1; then : | |
8143 | ||
8144 | else | |
8145 | ac_cv_header_stdc=no | |
8146 | fi | |
8147 | rm -f conftest* | |
8148 | ||
8149 | fi | |
8150 | ||
8151 | if test $ac_cv_header_stdc = yes; then | |
8152 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
8153 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8154 | /* end confdefs.h. */ | |
8155 | #include <stdlib.h> | |
8156 | ||
8157 | _ACEOF | |
8158 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
8159 | $EGREP "free" >/dev/null 2>&1; then : | |
8160 | ||
8161 | else | |
8162 | ac_cv_header_stdc=no | |
8163 | fi | |
8164 | rm -f conftest* | |
8165 | ||
8166 | fi | |
8167 | ||
8168 | if test $ac_cv_header_stdc = yes; then | |
8169 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
8170 | if test "$cross_compiling" = yes; then : | |
8171 | : | |
8172 | else | |
8173 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8174 | /* end confdefs.h. */ | |
8175 | #include <ctype.h> | |
8176 | #include <stdlib.h> | |
8177 | #if ((' ' & 0x0FF) == 0x020) | |
8178 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
8179 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
8180 | #else | |
8181 | # define ISLOWER(c) \ | |
8182 | (('a' <= (c) && (c) <= 'i') \ | |
8183 | || ('j' <= (c) && (c) <= 'r') \ | |
8184 | || ('s' <= (c) && (c) <= 'z')) | |
8185 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
8186 | #endif | |
8187 | ||
8188 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
8189 | int | |
8190 | main () | |
8191 | { | |
8192 | int i; | |
8193 | for (i = 0; i < 256; i++) | |
8194 | if (XOR (islower (i), ISLOWER (i)) | |
8195 | || toupper (i) != TOUPPER (i)) | |
8196 | return 2; | |
8197 | return 0; | |
8198 | } | |
8199 | _ACEOF | |
8200 | if ac_fn_c_try_run "$LINENO"; then : | |
8201 | ||
8202 | else | |
8203 | ac_cv_header_stdc=no | |
8204 | fi | |
8205 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
8206 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
8207 | fi | |
8208 | ||
8209 | fi | |
8210 | fi | |
8211 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 | |
8212 | $as_echo "$ac_cv_header_stdc" >&6; } | |
8213 | if test $ac_cv_header_stdc = yes; then | |
8214 | ||
8215 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h | |
8216 | ||
8217 | fi | |
8218 | ||
8219 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 | |
8220 | $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } | |
5f64f7bd | 8221 | if test "${ac_cv_header_time+set}" = set; then : |
067d23c9 KY |
8222 | $as_echo_n "(cached) " >&6 |
8223 | else | |
8224 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8225 | /* end confdefs.h. */ | |
8226 | #include <sys/types.h> | |
8227 | #include <sys/time.h> | |
8228 | #include <time.h> | |
8229 | ||
8230 | int | |
8231 | main () | |
8232 | { | |
8233 | if ((struct tm *) 0) | |
8234 | return 0; | |
8235 | ; | |
8236 | return 0; | |
8237 | } | |
8238 | _ACEOF | |
8239 | if ac_fn_c_try_compile "$LINENO"; then : | |
8240 | ac_cv_header_time=yes | |
8241 | else | |
8242 | ac_cv_header_time=no | |
8243 | fi | |
8244 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8245 | fi | |
8246 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 | |
8247 | $as_echo "$ac_cv_header_time" >&6; } | |
8248 | if test $ac_cv_header_time = yes; then | |
8249 | ||
8250 | $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h | |
8251 | ||
8252 | fi | |
8253 | ||
8254 | ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "$ac_includes_default" | |
5f64f7bd | 8255 | if test "x$ac_cv_have_decl_sys_siglist" = x""yes; then : |
067d23c9 KY |
8256 | ac_have_decl=1 |
8257 | else | |
8258 | ac_have_decl=0 | |
8259 | fi | |
8260 | ||
8261 | cat >>confdefs.h <<_ACEOF | |
8262 | #define HAVE_DECL_SYS_SIGLIST $ac_have_decl | |
8263 | _ACEOF | |
8264 | ||
8265 | if test $ac_cv_have_decl_sys_siglist != yes; then | |
8266 | # For Tru64, at least: | |
8267 | ac_fn_c_check_decl "$LINENO" "__sys_siglist" "ac_cv_have_decl___sys_siglist" "$ac_includes_default" | |
5f64f7bd | 8268 | if test "x$ac_cv_have_decl___sys_siglist" = x""yes; then : |
067d23c9 KY |
8269 | ac_have_decl=1 |
8270 | else | |
8271 | ac_have_decl=0 | |
8272 | fi | |
8273 | ||
8274 | cat >>confdefs.h <<_ACEOF | |
8275 | #define HAVE_DECL___SYS_SIGLIST $ac_have_decl | |
8276 | _ACEOF | |
8277 | ||
8278 | if test $ac_cv_have_decl___sys_siglist = yes; then | |
8279 | ||
8280 | $as_echo "#define sys_siglist __sys_siglist" >>confdefs.h | |
8281 | ||
8282 | fi | |
8283 | fi | |
8284 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5 | |
8285 | $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; } | |
5f64f7bd | 8286 | if test "${ac_cv_header_sys_wait_h+set}" = set; then : |
067d23c9 KY |
8287 | $as_echo_n "(cached) " >&6 |
8288 | else | |
8289 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8290 | /* end confdefs.h. */ | |
8291 | #include <sys/types.h> | |
8292 | #include <sys/wait.h> | |
8293 | #ifndef WEXITSTATUS | |
8294 | # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8) | |
8295 | #endif | |
8296 | #ifndef WIFEXITED | |
8297 | # define WIFEXITED(stat_val) (((stat_val) & 255) == 0) | |
8298 | #endif | |
8299 | ||
8300 | int | |
8301 | main () | |
8302 | { | |
8303 | int s; | |
8304 | wait (&s); | |
8305 | s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; | |
8306 | ; | |
8307 | return 0; | |
8308 | } | |
8309 | _ACEOF | |
8310 | if ac_fn_c_try_compile "$LINENO"; then : | |
8311 | ac_cv_header_sys_wait_h=yes | |
8312 | else | |
8313 | ac_cv_header_sys_wait_h=no | |
8314 | fi | |
8315 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8316 | fi | |
8317 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5 | |
8318 | $as_echo "$ac_cv_header_sys_wait_h" >&6; } | |
8319 | if test $ac_cv_header_sys_wait_h = yes; then | |
8320 | ||
8321 | $as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h | |
8322 | ||
8323 | fi | |
8324 | ||
8325 | ||
8326 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct utimbuf" >&5 | |
8327 | $as_echo_n "checking for struct utimbuf... " >&6; } | |
5f64f7bd | 8328 | if test "${emacs_cv_struct_utimbuf+set}" = set; then : |
067d23c9 KY |
8329 | $as_echo_n "(cached) " >&6 |
8330 | else | |
8331 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8332 | /* end confdefs.h. */ | |
8333 | #ifdef TIME_WITH_SYS_TIME | |
8334 | #include <sys/time.h> | |
8335 | #include <time.h> | |
8336 | #else | |
8337 | #ifdef HAVE_SYS_TIME_H | |
8338 | #include <sys/time.h> | |
8339 | #else | |
8340 | #include <time.h> | |
8341 | #endif | |
8342 | #endif | |
8343 | #ifdef HAVE_UTIME_H | |
8344 | #include <utime.h> | |
8345 | #endif | |
8346 | int | |
8347 | main () | |
8348 | { | |
8349 | static struct utimbuf x; x.actime = x.modtime; | |
8350 | ; | |
8351 | return 0; | |
8352 | } | |
8353 | _ACEOF | |
8354 | if ac_fn_c_try_compile "$LINENO"; then : | |
8355 | emacs_cv_struct_utimbuf=yes | |
8356 | else | |
8357 | emacs_cv_struct_utimbuf=no | |
8358 | fi | |
8359 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8360 | fi | |
8361 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_struct_utimbuf" >&5 | |
8362 | $as_echo "$emacs_cv_struct_utimbuf" >&6; } | |
8363 | if test $emacs_cv_struct_utimbuf = yes; then | |
8364 | ||
8365 | $as_echo "#define HAVE_STRUCT_UTIMBUF 1" >>confdefs.h | |
8366 | ||
8367 | fi | |
8368 | ||
067d23c9 KY |
8369 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for speed_t" >&5 |
8370 | $as_echo_n "checking for speed_t... " >&6; } | |
5f64f7bd | 8371 | if test "${emacs_cv_speed_t+set}" = set; then : |
067d23c9 KY |
8372 | $as_echo_n "(cached) " >&6 |
8373 | else | |
8374 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8375 | /* end confdefs.h. */ | |
8376 | #include <termios.h> | |
8377 | int | |
8378 | main () | |
8379 | { | |
8380 | speed_t x = 1; | |
8381 | ; | |
8382 | return 0; | |
8383 | } | |
8384 | _ACEOF | |
8385 | if ac_fn_c_try_compile "$LINENO"; then : | |
8386 | emacs_cv_speed_t=yes | |
8387 | else | |
8388 | emacs_cv_speed_t=no | |
8389 | fi | |
8390 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8391 | fi | |
8392 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_speed_t" >&5 | |
8393 | $as_echo "$emacs_cv_speed_t" >&6; } | |
8394 | if test $emacs_cv_speed_t = yes; then | |
8395 | ||
8396 | $as_echo "#define HAVE_SPEED_T 1" >>confdefs.h | |
8397 | ||
8398 | fi | |
8399 | ||
8400 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5 | |
8401 | $as_echo_n "checking for struct timeval... " >&6; } | |
5f64f7bd | 8402 | if test "${emacs_cv_struct_timeval+set}" = set; then : |
067d23c9 KY |
8403 | $as_echo_n "(cached) " >&6 |
8404 | else | |
8405 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8406 | /* end confdefs.h. */ | |
8407 | #ifdef TIME_WITH_SYS_TIME | |
8408 | #include <sys/time.h> | |
8409 | #include <time.h> | |
8410 | #else | |
8411 | #ifdef HAVE_SYS_TIME_H | |
8412 | #include <sys/time.h> | |
8413 | #else | |
8414 | #include <time.h> | |
8415 | #endif | |
8416 | #endif | |
8417 | int | |
8418 | main () | |
8419 | { | |
8420 | static struct timeval x; x.tv_sec = x.tv_usec; | |
8421 | ; | |
8422 | return 0; | |
8423 | } | |
8424 | _ACEOF | |
8425 | if ac_fn_c_try_compile "$LINENO"; then : | |
8426 | emacs_cv_struct_timeval=yes | |
8427 | else | |
8428 | emacs_cv_struct_timeval=no | |
8429 | fi | |
8430 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8431 | fi | |
8432 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_struct_timeval" >&5 | |
8433 | $as_echo "$emacs_cv_struct_timeval" >&6; } | |
8434 | HAVE_TIMEVAL=$emacs_cv_struct_timeval | |
8435 | if test $emacs_cv_struct_timeval = yes; then | |
8436 | ||
8437 | $as_echo "#define HAVE_TIMEVAL 1" >>confdefs.h | |
8438 | ||
8439 | fi | |
8440 | ||
8441 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct exception" >&5 | |
8442 | $as_echo_n "checking for struct exception... " >&6; } | |
5f64f7bd | 8443 | if test "${emacs_cv_struct_exception+set}" = set; then : |
067d23c9 KY |
8444 | $as_echo_n "(cached) " >&6 |
8445 | else | |
8446 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8447 | /* end confdefs.h. */ | |
8448 | #include <math.h> | |
8449 | int | |
8450 | main () | |
8451 | { | |
8452 | static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1; | |
8453 | ; | |
8454 | return 0; | |
8455 | } | |
8456 | _ACEOF | |
8457 | if ac_fn_c_try_compile "$LINENO"; then : | |
8458 | emacs_cv_struct_exception=yes | |
8459 | else | |
8460 | emacs_cv_struct_exception=no | |
8461 | fi | |
8462 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8463 | fi | |
8464 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_struct_exception" >&5 | |
8465 | $as_echo "$emacs_cv_struct_exception" >&6; } | |
8466 | HAVE_EXCEPTION=$emacs_cv_struct_exception | |
8467 | if test $emacs_cv_struct_exception != yes; then | |
8468 | ||
8469 | $as_echo "#define NO_MATHERR 1" >>confdefs.h | |
8470 | ||
8471 | fi | |
8472 | ||
067d23c9 KY |
8473 | for ac_header in net/if.h |
8474 | do : | |
8475 | ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default | |
8476 | #if HAVE_SYS_SOCKET_H | |
8477 | #include <sys/socket.h> | |
8478 | #endif | |
8479 | " | |
5f64f7bd | 8480 | if test "x$ac_cv_header_net_if_h" = x""yes; then : |
067d23c9 KY |
8481 | cat >>confdefs.h <<_ACEOF |
8482 | #define HAVE_NET_IF_H 1 | |
8483 | _ACEOF | |
8484 | ||
8485 | fi | |
8486 | ||
8487 | done | |
8488 | ||
8489 | ||
8490 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 | |
8491 | $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; } | |
5f64f7bd | 8492 | if test "${ac_cv_struct_tm+set}" = set; then : |
067d23c9 KY |
8493 | $as_echo_n "(cached) " >&6 |
8494 | else | |
8495 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8496 | /* end confdefs.h. */ | |
8497 | #include <sys/types.h> | |
8498 | #include <time.h> | |
8499 | ||
8500 | int | |
8501 | main () | |
8502 | { | |
8503 | struct tm tm; | |
8504 | int *p = &tm.tm_sec; | |
8505 | return !p; | |
8506 | ; | |
8507 | return 0; | |
8508 | } | |
8509 | _ACEOF | |
8510 | if ac_fn_c_try_compile "$LINENO"; then : | |
8511 | ac_cv_struct_tm=time.h | |
8512 | else | |
8513 | ac_cv_struct_tm=sys/time.h | |
8514 | fi | |
8515 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8516 | fi | |
8517 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5 | |
8518 | $as_echo "$ac_cv_struct_tm" >&6; } | |
8519 | if test $ac_cv_struct_tm = sys/time.h; then | |
8520 | ||
8521 | $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h | |
8522 | ||
8523 | fi | |
8524 | ||
8525 | ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h> | |
8526 | #include <$ac_cv_struct_tm> | |
8527 | ||
8528 | " | |
5f64f7bd | 8529 | if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then : |
067d23c9 KY |
8530 | |
8531 | cat >>confdefs.h <<_ACEOF | |
8532 | #define HAVE_STRUCT_TM_TM_ZONE 1 | |
8533 | _ACEOF | |
8534 | ||
8535 | ||
8536 | fi | |
8537 | ||
8538 | if test "$ac_cv_member_struct_tm_tm_zone" = yes; then | |
8539 | ||
8540 | $as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h | |
8541 | ||
8542 | else | |
8543 | ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h> | |
8544 | " | |
5f64f7bd | 8545 | if test "x$ac_cv_have_decl_tzname" = x""yes; then : |
067d23c9 KY |
8546 | ac_have_decl=1 |
8547 | else | |
8548 | ac_have_decl=0 | |
8549 | fi | |
8550 | ||
8551 | cat >>confdefs.h <<_ACEOF | |
8552 | #define HAVE_DECL_TZNAME $ac_have_decl | |
8553 | _ACEOF | |
8554 | ||
8555 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5 | |
8556 | $as_echo_n "checking for tzname... " >&6; } | |
5f64f7bd | 8557 | if test "${ac_cv_var_tzname+set}" = set; then : |
067d23c9 KY |
8558 | $as_echo_n "(cached) " >&6 |
8559 | else | |
8560 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8561 | /* end confdefs.h. */ | |
8562 | #include <time.h> | |
8563 | #if !HAVE_DECL_TZNAME | |
8564 | extern char *tzname[]; | |
8565 | #endif | |
8566 | ||
8567 | int | |
8568 | main () | |
8569 | { | |
8570 | return tzname[0][0]; | |
8571 | ; | |
8572 | return 0; | |
8573 | } | |
8574 | _ACEOF | |
8575 | if ac_fn_c_try_link "$LINENO"; then : | |
8576 | ac_cv_var_tzname=yes | |
8577 | else | |
8578 | ac_cv_var_tzname=no | |
8579 | fi | |
8580 | rm -f core conftest.err conftest.$ac_objext \ | |
8581 | conftest$ac_exeext conftest.$ac_ext | |
8582 | fi | |
8583 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5 | |
8584 | $as_echo "$ac_cv_var_tzname" >&6; } | |
8585 | if test $ac_cv_var_tzname = yes; then | |
8586 | ||
8587 | $as_echo "#define HAVE_TZNAME 1" >>confdefs.h | |
8588 | ||
8589 | fi | |
8590 | fi | |
8591 | ||
8592 | ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include <time.h> | |
8593 | " | |
5f64f7bd | 8594 | if test "x$ac_cv_member_struct_tm_tm_gmtoff" = x""yes; then : |
067d23c9 KY |
8595 | |
8596 | $as_echo "#define HAVE_TM_GMTOFF 1" >>confdefs.h | |
8597 | ||
8598 | fi | |
8599 | ||
8600 | ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_flags" "ac_cv_member_struct_ifreq_ifr_flags" "$ac_includes_default | |
8601 | #if HAVE_SYS_SOCKET_H | |
8602 | #include <sys/socket.h> | |
8603 | #endif | |
8604 | #if HAVE_NET_IF_H | |
8605 | #include <net/if.h> | |
8606 | #endif | |
8607 | " | |
5f64f7bd | 8608 | if test "x$ac_cv_member_struct_ifreq_ifr_flags" = x""yes; then : |
067d23c9 KY |
8609 | |
8610 | cat >>confdefs.h <<_ACEOF | |
8611 | #define HAVE_STRUCT_IFREQ_IFR_FLAGS 1 | |
8612 | _ACEOF | |
8613 | ||
8614 | ||
8615 | fi | |
8616 | ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_hwaddr" "ac_cv_member_struct_ifreq_ifr_hwaddr" "$ac_includes_default | |
8617 | #if HAVE_SYS_SOCKET_H | |
8618 | #include <sys/socket.h> | |
8619 | #endif | |
8620 | #if HAVE_NET_IF_H | |
8621 | #include <net/if.h> | |
8622 | #endif | |
8623 | " | |
5f64f7bd | 8624 | if test "x$ac_cv_member_struct_ifreq_ifr_hwaddr" = x""yes; then : |
067d23c9 KY |
8625 | |
8626 | cat >>confdefs.h <<_ACEOF | |
8627 | #define HAVE_STRUCT_IFREQ_IFR_HWADDR 1 | |
8628 | _ACEOF | |
8629 | ||
8630 | ||
8631 | fi | |
8632 | ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_netmask" "ac_cv_member_struct_ifreq_ifr_netmask" "$ac_includes_default | |
8633 | #if HAVE_SYS_SOCKET_H | |
8634 | #include <sys/socket.h> | |
8635 | #endif | |
8636 | #if HAVE_NET_IF_H | |
8637 | #include <net/if.h> | |
8638 | #endif | |
8639 | " | |
5f64f7bd | 8640 | if test "x$ac_cv_member_struct_ifreq_ifr_netmask" = x""yes; then : |
067d23c9 KY |
8641 | |
8642 | cat >>confdefs.h <<_ACEOF | |
8643 | #define HAVE_STRUCT_IFREQ_IFR_NETMASK 1 | |
8644 | _ACEOF | |
8645 | ||
8646 | ||
8647 | fi | |
8648 | ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_broadaddr" "ac_cv_member_struct_ifreq_ifr_broadaddr" "$ac_includes_default | |
8649 | #if HAVE_SYS_SOCKET_H | |
8650 | #include <sys/socket.h> | |
8651 | #endif | |
8652 | #if HAVE_NET_IF_H | |
8653 | #include <net/if.h> | |
8654 | #endif | |
8655 | " | |
5f64f7bd | 8656 | if test "x$ac_cv_member_struct_ifreq_ifr_broadaddr" = x""yes; then : |
067d23c9 KY |
8657 | |
8658 | cat >>confdefs.h <<_ACEOF | |
8659 | #define HAVE_STRUCT_IFREQ_IFR_BROADADDR 1 | |
8660 | _ACEOF | |
8661 | ||
8662 | ||
8663 | fi | |
8664 | ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_addr" "ac_cv_member_struct_ifreq_ifr_addr" "$ac_includes_default | |
8665 | #if HAVE_SYS_SOCKET_H | |
8666 | #include <sys/socket.h> | |
8667 | #endif | |
8668 | #if HAVE_NET_IF_H | |
8669 | #include <net/if.h> | |
8670 | #endif | |
8671 | " | |
5f64f7bd | 8672 | if test "x$ac_cv_member_struct_ifreq_ifr_addr" = x""yes; then : |
067d23c9 KY |
8673 | |
8674 | cat >>confdefs.h <<_ACEOF | |
8675 | #define HAVE_STRUCT_IFREQ_IFR_ADDR 1 | |
8676 | _ACEOF | |
8677 | ||
8678 | ||
8679 | fi | |
8680 | ||
8681 | ||
8682 | ||
8683 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for function prototypes" >&5 | |
8684 | $as_echo_n "checking for function prototypes... " >&6; } | |
8685 | if test "$ac_cv_prog_cc_c89" != no; then | |
8686 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
8687 | $as_echo "yes" >&6; } | |
8688 | ||
8689 | $as_echo "#define PROTOTYPES 1" >>confdefs.h | |
8690 | ||
8691 | ||
8692 | $as_echo "#define __PROTOTYPES 1" >>confdefs.h | |
8693 | ||
8694 | else | |
8695 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
8696 | $as_echo "no" >&6; } | |
8697 | fi | |
8698 | ||
8699 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5 | |
8700 | $as_echo_n "checking for working volatile... " >&6; } | |
5f64f7bd | 8701 | if test "${ac_cv_c_volatile+set}" = set; then : |
067d23c9 KY |
8702 | $as_echo_n "(cached) " >&6 |
8703 | else | |
8704 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8705 | /* end confdefs.h. */ | |
8706 | ||
8707 | int | |
8708 | main () | |
8709 | { | |
8710 | ||
8711 | volatile int x; | |
8712 | int * volatile y = (int *) 0; | |
8713 | return !x && !y; | |
8714 | ; | |
8715 | return 0; | |
8716 | } | |
8717 | _ACEOF | |
8718 | if ac_fn_c_try_compile "$LINENO"; then : | |
8719 | ac_cv_c_volatile=yes | |
8720 | else | |
8721 | ac_cv_c_volatile=no | |
8722 | fi | |
8723 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8724 | fi | |
8725 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5 | |
8726 | $as_echo "$ac_cv_c_volatile" >&6; } | |
8727 | if test $ac_cv_c_volatile = no; then | |
8728 | ||
8729 | $as_echo "#define volatile /**/" >>confdefs.h | |
8730 | ||
8731 | fi | |
8732 | ||
8733 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 | |
8734 | $as_echo_n "checking for an ANSI C-conforming const... " >&6; } | |
5f64f7bd | 8735 | if test "${ac_cv_c_const+set}" = set; then : |
067d23c9 KY |
8736 | $as_echo_n "(cached) " >&6 |
8737 | else | |
8738 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8739 | /* end confdefs.h. */ | |
8740 | ||
8741 | int | |
8742 | main () | |
8743 | { | |
8744 | /* FIXME: Include the comments suggested by Paul. */ | |
8745 | #ifndef __cplusplus | |
8746 | /* Ultrix mips cc rejects this. */ | |
8747 | typedef int charset[2]; | |
8748 | const charset cs; | |
8749 | /* SunOS 4.1.1 cc rejects this. */ | |
8750 | char const *const *pcpcc; | |
8751 | char **ppc; | |
8752 | /* NEC SVR4.0.2 mips cc rejects this. */ | |
8753 | struct point {int x, y;}; | |
8754 | static struct point const zero = {0,0}; | |
8755 | /* AIX XL C 1.02.0.0 rejects this. | |
8756 | It does not let you subtract one const X* pointer from another in | |
8757 | an arm of an if-expression whose if-part is not a constant | |
8758 | expression */ | |
8759 | const char *g = "string"; | |
8760 | pcpcc = &g + (g ? g-g : 0); | |
8761 | /* HPUX 7.0 cc rejects these. */ | |
8762 | ++pcpcc; | |
8763 | ppc = (char**) pcpcc; | |
8764 | pcpcc = (char const *const *) ppc; | |
8765 | { /* SCO 3.2v4 cc rejects this. */ | |
8766 | char *t; | |
8767 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
8768 | ||
8769 | *t++ = 0; | |
8770 | if (s) return 0; | |
8771 | } | |
8772 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
8773 | int x[] = {25, 17}; | |
8774 | const int *foo = &x[0]; | |
8775 | ++foo; | |
8776 | } | |
8777 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
8778 | typedef const int *iptr; | |
8779 | iptr p = 0; | |
8780 | ++p; | |
8781 | } | |
8782 | { /* AIX XL C 1.02.0.0 rejects this saying | |
8783 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
8784 | struct s { int j; const int *ap[3]; }; | |
8785 | struct s *b; b->j = 5; | |
8786 | } | |
8787 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
8788 | const int foo = 10; | |
8789 | if (!foo) return 0; | |
8790 | } | |
8791 | return !cs[0] && !zero.x; | |
8792 | #endif | |
8793 | ||
8794 | ; | |
8795 | return 0; | |
8796 | } | |
8797 | _ACEOF | |
8798 | if ac_fn_c_try_compile "$LINENO"; then : | |
8799 | ac_cv_c_const=yes | |
8800 | else | |
8801 | ac_cv_c_const=no | |
8802 | fi | |
8803 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8804 | fi | |
8805 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 | |
8806 | $as_echo "$ac_cv_c_const" >&6; } | |
8807 | if test $ac_cv_c_const = no; then | |
8808 | ||
8809 | $as_echo "#define const /**/" >>confdefs.h | |
8810 | ||
8811 | fi | |
8812 | ||
8813 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for void * support" >&5 | |
8814 | $as_echo_n "checking for void * support... " >&6; } | |
5f64f7bd | 8815 | if test "${emacs_cv_void_star+set}" = set; then : |
067d23c9 KY |
8816 | $as_echo_n "(cached) " >&6 |
8817 | else | |
8818 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8819 | /* end confdefs.h. */ | |
8820 | ||
8821 | int | |
8822 | main () | |
8823 | { | |
8824 | void * foo; | |
8825 | ; | |
8826 | return 0; | |
8827 | } | |
8828 | _ACEOF | |
8829 | if ac_fn_c_try_compile "$LINENO"; then : | |
8830 | emacs_cv_void_star=yes | |
8831 | else | |
8832 | emacs_cv_void_star=no | |
8833 | fi | |
8834 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8835 | fi | |
8836 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_void_star" >&5 | |
8837 | $as_echo "$emacs_cv_void_star" >&6; } | |
8838 | if test $emacs_cv_void_star = yes; then | |
8839 | $as_echo "#define POINTER_TYPE void" >>confdefs.h | |
8840 | ||
8841 | else | |
8842 | $as_echo "#define POINTER_TYPE char" >>confdefs.h | |
8843 | ||
8844 | fi | |
8845 | ||
8846 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 | |
8847 | $as_echo_n "checking whether byte ordering is bigendian... " >&6; } | |
5f64f7bd | 8848 | if test "${ac_cv_c_bigendian+set}" = set; then : |
067d23c9 KY |
8849 | $as_echo_n "(cached) " >&6 |
8850 | else | |
8851 | ac_cv_c_bigendian=unknown | |
8852 | # See if we're dealing with a universal compiler. | |
8853 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8854 | /* end confdefs.h. */ | |
8855 | #ifndef __APPLE_CC__ | |
8856 | not a universal capable compiler | |
8857 | #endif | |
8858 | typedef int dummy; | |
8859 | ||
8860 | _ACEOF | |
8861 | if ac_fn_c_try_compile "$LINENO"; then : | |
8862 | ||
8863 | # Check for potential -arch flags. It is not universal unless | |
8864 | # there are at least two -arch flags with different values. | |
8865 | ac_arch= | |
8866 | ac_prev= | |
8867 | for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do | |
8868 | if test -n "$ac_prev"; then | |
8869 | case $ac_word in | |
8870 | i?86 | x86_64 | ppc | ppc64) | |
8871 | if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then | |
8872 | ac_arch=$ac_word | |
8873 | else | |
8874 | ac_cv_c_bigendian=universal | |
8875 | break | |
8876 | fi | |
8877 | ;; | |
8878 | esac | |
8879 | ac_prev= | |
8880 | elif test "x$ac_word" = "x-arch"; then | |
8881 | ac_prev=arch | |
8882 | fi | |
8883 | done | |
8884 | fi | |
8885 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8886 | if test $ac_cv_c_bigendian = unknown; then | |
8887 | # See if sys/param.h defines the BYTE_ORDER macro. | |
8888 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8889 | /* end confdefs.h. */ | |
8890 | #include <sys/types.h> | |
8891 | #include <sys/param.h> | |
8892 | ||
8893 | int | |
8894 | main () | |
8895 | { | |
8896 | #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ | |
8897 | && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ | |
8898 | && LITTLE_ENDIAN) | |
8899 | bogus endian macros | |
8900 | #endif | |
8901 | ||
8902 | ; | |
8903 | return 0; | |
8904 | } | |
8905 | _ACEOF | |
8906 | if ac_fn_c_try_compile "$LINENO"; then : | |
8907 | # It does; now see whether it defined to BIG_ENDIAN or not. | |
8908 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8909 | /* end confdefs.h. */ | |
8910 | #include <sys/types.h> | |
8911 | #include <sys/param.h> | |
8912 | ||
8913 | int | |
8914 | main () | |
8915 | { | |
8916 | #if BYTE_ORDER != BIG_ENDIAN | |
8917 | not big endian | |
8918 | #endif | |
8919 | ||
8920 | ; | |
8921 | return 0; | |
8922 | } | |
8923 | _ACEOF | |
8924 | if ac_fn_c_try_compile "$LINENO"; then : | |
8925 | ac_cv_c_bigendian=yes | |
8926 | else | |
8927 | ac_cv_c_bigendian=no | |
8928 | fi | |
8929 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8930 | fi | |
8931 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8932 | fi | |
8933 | if test $ac_cv_c_bigendian = unknown; then | |
8934 | # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). | |
8935 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8936 | /* end confdefs.h. */ | |
8937 | #include <limits.h> | |
8938 | ||
8939 | int | |
8940 | main () | |
8941 | { | |
8942 | #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) | |
8943 | bogus endian macros | |
8944 | #endif | |
8945 | ||
8946 | ; | |
8947 | return 0; | |
8948 | } | |
8949 | _ACEOF | |
8950 | if ac_fn_c_try_compile "$LINENO"; then : | |
8951 | # It does; now see whether it defined to _BIG_ENDIAN or not. | |
8952 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8953 | /* end confdefs.h. */ | |
8954 | #include <limits.h> | |
8955 | ||
8956 | int | |
8957 | main () | |
8958 | { | |
8959 | #ifndef _BIG_ENDIAN | |
8960 | not big endian | |
8961 | #endif | |
8962 | ||
8963 | ; | |
8964 | return 0; | |
8965 | } | |
8966 | _ACEOF | |
8967 | if ac_fn_c_try_compile "$LINENO"; then : | |
8968 | ac_cv_c_bigendian=yes | |
8969 | else | |
8970 | ac_cv_c_bigendian=no | |
8971 | fi | |
8972 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8973 | fi | |
8974 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8975 | fi | |
8976 | if test $ac_cv_c_bigendian = unknown; then | |
8977 | # Compile a test program. | |
8978 | if test "$cross_compiling" = yes; then : | |
8979 | # Try to guess by grepping values from an object file. | |
8980 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8981 | /* end confdefs.h. */ | |
8982 | short int ascii_mm[] = | |
8983 | { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; | |
8984 | short int ascii_ii[] = | |
8985 | { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; | |
8986 | int use_ascii (int i) { | |
8987 | return ascii_mm[i] + ascii_ii[i]; | |
8988 | } | |
8989 | short int ebcdic_ii[] = | |
8990 | { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; | |
8991 | short int ebcdic_mm[] = | |
8992 | { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; | |
8993 | int use_ebcdic (int i) { | |
8994 | return ebcdic_mm[i] + ebcdic_ii[i]; | |
8995 | } | |
8996 | extern int foo; | |
8997 | ||
8998 | int | |
8999 | main () | |
9000 | { | |
9001 | return use_ascii (foo) == use_ebcdic (foo); | |
9002 | ; | |
9003 | return 0; | |
9004 | } | |
9005 | _ACEOF | |
9006 | if ac_fn_c_try_compile "$LINENO"; then : | |
9007 | if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then | |
9008 | ac_cv_c_bigendian=yes | |
9009 | fi | |
9010 | if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then | |
9011 | if test "$ac_cv_c_bigendian" = unknown; then | |
9012 | ac_cv_c_bigendian=no | |
9013 | else | |
9014 | # finding both strings is unlikely to happen, but who knows? | |
9015 | ac_cv_c_bigendian=unknown | |
9016 | fi | |
9017 | fi | |
9018 | fi | |
9019 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
9020 | else | |
9021 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9022 | /* end confdefs.h. */ | |
9023 | $ac_includes_default | |
9024 | int | |
9025 | main () | |
9026 | { | |
9027 | ||
9028 | /* Are we little or big endian? From Harbison&Steele. */ | |
9029 | union | |
9030 | { | |
9031 | long int l; | |
9032 | char c[sizeof (long int)]; | |
9033 | } u; | |
9034 | u.l = 1; | |
9035 | return u.c[sizeof (long int) - 1] == 1; | |
9036 | ||
9037 | ; | |
9038 | return 0; | |
9039 | } | |
9040 | _ACEOF | |
9041 | if ac_fn_c_try_run "$LINENO"; then : | |
9042 | ac_cv_c_bigendian=no | |
9043 | else | |
9044 | ac_cv_c_bigendian=yes | |
9045 | fi | |
9046 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
9047 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
9048 | fi | |
9049 | ||
9050 | fi | |
9051 | fi | |
9052 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 | |
9053 | $as_echo "$ac_cv_c_bigendian" >&6; } | |
9054 | case $ac_cv_c_bigendian in #( | |
9055 | yes) | |
9056 | $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h | |
9057 | ;; #( | |
9058 | no) | |
9059 | ;; #( | |
9060 | universal) | |
9061 | ||
9062 | $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h | |
9063 | ||
9064 | ;; #( | |
9065 | *) | |
5f64f7bd | 9066 | as_fn_error "unknown endianness |
0afb4571 | 9067 | presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; |
067d23c9 KY |
9068 | esac |
9069 | ||
9070 | ||
7cae64b4 PE |
9071 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __attribute__ ((__aligned__ (expr)))" >&5 |
9072 | $as_echo_n "checking for __attribute__ ((__aligned__ (expr)))... " >&6; } | |
5f64f7bd | 9073 | if test "${emacs_cv_attribute_aligned+set}" = set; then : |
7cae64b4 PE |
9074 | $as_echo_n "(cached) " >&6 |
9075 | else | |
9076 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9077 | /* end confdefs.h. */ | |
9078 | char __attribute__ ((__aligned__ (1 << 3))) c; | |
9079 | int | |
9080 | main () | |
9081 | { | |
9082 | ||
9083 | ; | |
9084 | return 0; | |
9085 | } | |
9086 | _ACEOF | |
9087 | if ac_fn_c_try_compile "$LINENO"; then : | |
9088 | emacs_cv_attribute_aligned=yes | |
9089 | else | |
9090 | emacs_cv_attribute_aligned=no | |
9091 | fi | |
9092 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
9093 | fi | |
9094 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_attribute_aligned" >&5 | |
9095 | $as_echo "$emacs_cv_attribute_aligned" >&6; } | |
9096 | if test $emacs_cv_attribute_aligned = yes; then | |
9097 | ||
9098 | $as_echo "#define HAVE_ATTRIBUTE_ALIGNED 1" >>confdefs.h | |
9099 | ||
9100 | fi | |
9101 | ||
067d23c9 KY |
9102 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 |
9103 | $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } | |
9104 | set x ${MAKE-make} | |
9105 | ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` | |
5f64f7bd | 9106 | if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : |
067d23c9 KY |
9107 | $as_echo_n "(cached) " >&6 |
9108 | else | |
9109 | cat >conftest.make <<\_ACEOF | |
9110 | SHELL = /bin/sh | |
9111 | all: | |
9112 | @echo '@@@%%%=$(MAKE)=@@@%%%' | |
9113 | _ACEOF | |
5f64f7bd | 9114 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. |
067d23c9 KY |
9115 | case `${MAKE-make} -f conftest.make 2>/dev/null` in |
9116 | *@@@%%%=?*=@@@%%%*) | |
9117 | eval ac_cv_prog_make_${ac_make}_set=yes;; | |
9118 | *) | |
9119 | eval ac_cv_prog_make_${ac_make}_set=no;; | |
9120 | esac | |
9121 | rm -f conftest.make | |
9122 | fi | |
9123 | if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then | |
9124 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
9125 | $as_echo "yes" >&6; } | |
9126 | SET_MAKE= | |
9127 | else | |
9128 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
9129 | $as_echo "no" >&6; } | |
9130 | SET_MAKE="MAKE=${MAKE-make}" | |
9131 | fi | |
9132 | ||
9133 | ||
9134 | DEPFLAGS= | |
9135 | MKDEPDIR=":" | |
9136 | deps_frag=deps.mk | |
9137 | if test "$GCC" = yes && test "$ac_enable_autodepend" = yes; then | |
9138 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using GNU Make" >&5 | |
9139 | $as_echo_n "checking whether we are using GNU Make... " >&6; } | |
9140 | HAVE_GNU_MAKE=no | |
9141 | testval=`make --version 2>/dev/null | grep 'GNU Make'` | |
9142 | if test "x$testval" != x; then | |
9143 | HAVE_GNU_MAKE=yes | |
9144 | else | |
9145 | ac_enable_autodepend=no | |
9146 | fi | |
9147 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_GNU_MAKE" >&5 | |
9148 | $as_echo "$HAVE_GNU_MAKE" >&6; } | |
9149 | if test $HAVE_GNU_MAKE = yes; then | |
9150 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -MMD -MF" >&5 | |
9151 | $as_echo_n "checking whether gcc understands -MMD -MF... " >&6; } | |
9152 | SAVE_CFLAGS="$CFLAGS" | |
9153 | CFLAGS="$CFLAGS -MMD -MF deps.d" | |
9154 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9155 | /* end confdefs.h. */ | |
9156 | ||
9157 | int | |
9158 | main () | |
9159 | { | |
9160 | ||
9161 | ; | |
9162 | return 0; | |
9163 | } | |
9164 | _ACEOF | |
9165 | if ac_fn_c_try_compile "$LINENO"; then : | |
9166 | ||
9167 | else | |
9168 | ac_enable_autodepend=no | |
9169 | fi | |
9170 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
9171 | CFLAGS="$SAVE_CFLAGS" | |
9172 | test -f deps.d || ac_enable_autodepend=no | |
9173 | rm -rf deps.d | |
9174 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_autodepend" >&5 | |
9175 | $as_echo "$ac_enable_autodepend" >&6; } | |
9176 | fi | |
9177 | if test $ac_enable_autodepend = yes; then | |
9178 | DEPFLAGS='-MMD -MF ${DEPDIR}/$*.d' | |
9179 | ## In parallel builds, another make might create depdir between | |
9180 | ## the first test and mkdir, so stick another test on the end. | |
6ad6792b | 9181 | ## Or use install-sh -d? mkdir -p is not portable. |
067d23c9 KY |
9182 | MKDEPDIR='test -d ${DEPDIR} || mkdir ${DEPDIR} || test -d ${DEPDIR}' |
9183 | deps_frag=autodeps.mk | |
9184 | fi | |
9185 | fi | |
9186 | deps_frag=$srcdir/src/$deps_frag | |
9187 | ||
9188 | ||
9189 | ||
9190 | ||
9191 | ||
4d4b75e8 GM |
9192 | lisp_frag=$srcdir/src/lisp.mk |
9193 | ||
9194 | ||
9195 | ||
067d23c9 KY |
9196 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long file names" >&5 |
9197 | $as_echo_n "checking for long file names... " >&6; } | |
5f64f7bd | 9198 | if test "${ac_cv_sys_long_file_names+set}" = set; then : |
067d23c9 KY |
9199 | $as_echo_n "(cached) " >&6 |
9200 | else | |
9201 | ac_cv_sys_long_file_names=yes | |
9202 | # Test for long file names in all the places we know might matter: | |
9203 | # . the current directory, where building will happen | |
9204 | # $prefix/lib where we will be installing things | |
9205 | # $exec_prefix/lib likewise | |
9206 | # $TMPDIR if set, where it might want to write temporary files | |
9207 | # /tmp where it might want to write temporary files | |
9208 | # /var/tmp likewise | |
9209 | # /usr/tmp likewise | |
9210 | for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do | |
9211 | # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib | |
9212 | # in the usual case where exec_prefix is '${prefix}'. | |
9213 | case $ac_dir in #( | |
9214 | . | /* | ?:[\\/]*) ;; #( | |
9215 | *) continue;; | |
9216 | esac | |
9217 | test -w "$ac_dir/." || continue # It is less confusing to not echo anything here. | |
9218 | ac_xdir=$ac_dir/cf$$ | |
9219 | (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue | |
9220 | ac_tf1=$ac_xdir/conftest9012345 | |
9221 | ac_tf2=$ac_xdir/conftest9012346 | |
9222 | touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" || | |
9223 | ac_cv_sys_long_file_names=no | |
9224 | rm -f -r "$ac_xdir" 2>/dev/null | |
9225 | test $ac_cv_sys_long_file_names = no && break | |
9226 | done | |
9227 | fi | |
9228 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_long_file_names" >&5 | |
9229 | $as_echo "$ac_cv_sys_long_file_names" >&6; } | |
9230 | if test $ac_cv_sys_long_file_names = yes; then | |
9231 | ||
9232 | $as_echo "#define HAVE_LONG_FILE_NAMES 1" >>confdefs.h | |
9233 | ||
9234 | fi | |
9235 | ||
9236 | ||
9237 | #### Choose a window system. | |
9238 | ||
9239 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5 | |
9240 | $as_echo_n "checking for X... " >&6; } | |
9241 | ||
9242 | ||
9243 | # Check whether --with-x was given. | |
9244 | if test "${with_x+set}" = set; then : | |
9245 | withval=$with_x; | |
9246 | fi | |
9247 | ||
9248 | # $have_x is `yes', `no', `disabled', or empty when we do not yet know. | |
9249 | if test "x$with_x" = xno; then | |
9250 | # The user explicitly disabled X. | |
9251 | have_x=disabled | |
9252 | else | |
9253 | case $x_includes,$x_libraries in #( | |
5f64f7bd GM |
9254 | *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #( |
9255 | *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then : | |
067d23c9 KY |
9256 | $as_echo_n "(cached) " >&6 |
9257 | else | |
9258 | # One or both of the vars are not set, and there is no cached value. | |
9259 | ac_x_includes=no ac_x_libraries=no | |
9260 | rm -f -r conftest.dir | |
9261 | if mkdir conftest.dir; then | |
9262 | cd conftest.dir | |
9263 | cat >Imakefile <<'_ACEOF' | |
9264 | incroot: | |
9265 | @echo incroot='${INCROOT}' | |
9266 | usrlibdir: | |
9267 | @echo usrlibdir='${USRLIBDIR}' | |
9268 | libdir: | |
9269 | @echo libdir='${LIBDIR}' | |
9270 | _ACEOF | |
9271 | if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then | |
5f64f7bd | 9272 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. |
067d23c9 KY |
9273 | for ac_var in incroot usrlibdir libdir; do |
9274 | eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" | |
9275 | done | |
9276 | # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. | |
9277 | for ac_extension in a so sl dylib la dll; do | |
9278 | if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && | |
9279 | test -f "$ac_im_libdir/libX11.$ac_extension"; then | |
9280 | ac_im_usrlibdir=$ac_im_libdir; break | |
9281 | fi | |
9282 | done | |
9283 | # Screen out bogus values from the imake configuration. They are | |
9284 | # bogus both because they are the default anyway, and because | |
9285 | # using them would break gcc on systems where it needs fixed includes. | |
9286 | case $ac_im_incroot in | |
9287 | /usr/include) ac_x_includes= ;; | |
9288 | *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; | |
9289 | esac | |
9290 | case $ac_im_usrlibdir in | |
9291 | /usr/lib | /usr/lib64 | /lib | /lib64) ;; | |
9292 | *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; | |
9293 | esac | |
9294 | fi | |
9295 | cd .. | |
9296 | rm -f -r conftest.dir | |
9297 | fi | |
9298 | ||
9299 | # Standard set of common directories for X headers. | |
9300 | # Check X11 before X11Rn because it is often a symlink to the current release. | |
9301 | ac_x_header_dirs=' | |
9302 | /usr/X11/include | |
9303 | /usr/X11R7/include | |
9304 | /usr/X11R6/include | |
9305 | /usr/X11R5/include | |
9306 | /usr/X11R4/include | |
9307 | ||
9308 | /usr/include/X11 | |
9309 | /usr/include/X11R7 | |
9310 | /usr/include/X11R6 | |
9311 | /usr/include/X11R5 | |
9312 | /usr/include/X11R4 | |
9313 | ||
9314 | /usr/local/X11/include | |
9315 | /usr/local/X11R7/include | |
9316 | /usr/local/X11R6/include | |
9317 | /usr/local/X11R5/include | |
9318 | /usr/local/X11R4/include | |
9319 | ||
9320 | /usr/local/include/X11 | |
9321 | /usr/local/include/X11R7 | |
9322 | /usr/local/include/X11R6 | |
9323 | /usr/local/include/X11R5 | |
9324 | /usr/local/include/X11R4 | |
9325 | ||
9326 | /usr/X386/include | |
9327 | /usr/x386/include | |
9328 | /usr/XFree86/include/X11 | |
9329 | ||
9330 | /usr/include | |
9331 | /usr/local/include | |
9332 | /usr/unsupported/include | |
9333 | /usr/athena/include | |
9334 | /usr/local/x11r5/include | |
9335 | /usr/lpp/Xamples/include | |
9336 | ||
9337 | /usr/openwin/include | |
9338 | /usr/openwin/share/include' | |
9339 | ||
9340 | if test "$ac_x_includes" = no; then | |
9341 | # Guess where to find include files, by looking for Xlib.h. | |
9342 | # First, try using that file with no special directory specified. | |
9343 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9344 | /* end confdefs.h. */ | |
9345 | #include <X11/Xlib.h> | |
9346 | _ACEOF | |
9347 | if ac_fn_c_try_cpp "$LINENO"; then : | |
9348 | # We can compile using X headers with no special include directory. | |
9349 | ac_x_includes= | |
9350 | else | |
9351 | for ac_dir in $ac_x_header_dirs; do | |
9352 | if test -r "$ac_dir/X11/Xlib.h"; then | |
9353 | ac_x_includes=$ac_dir | |
9354 | break | |
9355 | fi | |
9356 | done | |
9357 | fi | |
5f64f7bd | 9358 | rm -f conftest.err conftest.$ac_ext |
067d23c9 KY |
9359 | fi # $ac_x_includes = no |
9360 | ||
9361 | if test "$ac_x_libraries" = no; then | |
9362 | # Check for the libraries. | |
9363 | # See if we find them without any special options. | |
9364 | # Don't add to $LIBS permanently. | |
9365 | ac_save_LIBS=$LIBS | |
9366 | LIBS="-lX11 $LIBS" | |
9367 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9368 | /* end confdefs.h. */ | |
9369 | #include <X11/Xlib.h> | |
9370 | int | |
9371 | main () | |
9372 | { | |
9373 | XrmInitialize () | |
9374 | ; | |
9375 | return 0; | |
9376 | } | |
9377 | _ACEOF | |
9378 | if ac_fn_c_try_link "$LINENO"; then : | |
9379 | LIBS=$ac_save_LIBS | |
9380 | # We can link X programs with no special library path. | |
9381 | ac_x_libraries= | |
9382 | else | |
9383 | LIBS=$ac_save_LIBS | |
9384 | for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` | |
9385 | do | |
9386 | # Don't even attempt the hair of trying to link an X program! | |
9387 | for ac_extension in a so sl dylib la dll; do | |
9388 | if test -r "$ac_dir/libX11.$ac_extension"; then | |
9389 | ac_x_libraries=$ac_dir | |
9390 | break 2 | |
9391 | fi | |
9392 | done | |
9393 | done | |
9394 | fi | |
9395 | rm -f core conftest.err conftest.$ac_objext \ | |
9396 | conftest$ac_exeext conftest.$ac_ext | |
9397 | fi # $ac_x_libraries = no | |
9398 | ||
9399 | case $ac_x_includes,$ac_x_libraries in #( | |
9400 | no,* | *,no | *\'*) | |
9401 | # Didn't find X, or a directory has "'" in its name. | |
9402 | ac_cv_have_x="have_x=no";; #( | |
9403 | *) | |
9404 | # Record where we found X for the cache. | |
9405 | ac_cv_have_x="have_x=yes\ | |
9406 | ac_x_includes='$ac_x_includes'\ | |
9407 | ac_x_libraries='$ac_x_libraries'" | |
9408 | esac | |
9409 | fi | |
9410 | ;; #( | |
9411 | *) have_x=yes;; | |
9412 | esac | |
9413 | eval "$ac_cv_have_x" | |
9414 | fi # $with_x != no | |
9415 | ||
9416 | if test "$have_x" != yes; then | |
9417 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5 | |
9418 | $as_echo "$have_x" >&6; } | |
9419 | no_x=yes | |
9420 | else | |
9421 | # If each of the values was on the command line, it overrides each guess. | |
9422 | test "x$x_includes" = xNONE && x_includes=$ac_x_includes | |
9423 | test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries | |
9424 | # Update the cache value to reflect the command line values. | |
9425 | ac_cv_have_x="have_x=yes\ | |
9426 | ac_x_includes='$x_includes'\ | |
9427 | ac_x_libraries='$x_libraries'" | |
9428 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5 | |
9429 | $as_echo "libraries $x_libraries, headers $x_includes" >&6; } | |
9430 | fi | |
9431 | ||
9432 | if test "$no_x" = yes; then | |
9433 | window_system=none | |
9434 | else | |
9435 | window_system=x11 | |
9436 | fi | |
9437 | ||
9438 | ## Workaround for bug in autoconf <= 2.62. | |
9439 | ## http://lists.gnu.org/archive/html/emacs-devel/2008-04/msg01551.html | |
9440 | ## No need to do anything special for these standard directories. | |
9441 | if test -n "${x_libraries}" && test x"${x_libraries}" != xNONE; then | |
9442 | ||
9443 | x_libraries=`echo :${x_libraries}: | sed -e 's|:/usr/lib64:|:|g' -e 's|:/lib64:|:|g' -e 's|^:||' -e 's|:$||'` | |
9444 | ||
9445 | fi | |
9446 | ||
9447 | LD_SWITCH_X_SITE_AUX= | |
9448 | LD_SWITCH_X_SITE_AUX_RPATH= | |
9449 | if test "${x_libraries}" != NONE; then | |
9450 | if test -n "${x_libraries}"; then | |
9451 | LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"` | |
9452 | LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"` | |
9453 | LD_SWITCH_X_SITE_AUX_RPATH=`echo ${LD_SWITCH_X_SITE_AUX} | sed -e 's/-R/-Wl,-rpath,/'` | |
9454 | fi | |
9455 | x_default_search_path="" | |
9456 | x_search_path=${x_libraries} | |
9457 | if test -z "${x_search_path}"; then | |
9458 | x_search_path=/usr/lib | |
9459 | fi | |
9460 | for x_library in `echo ${x_search_path}: | \ | |
9461 | sed -e "s/:/ /g" -e p -e "s:/lib[^ /]* :/share :g"`; do | |
9462 | x_search_path="\ | |
9463 | ${x_library}/X11/%L/%T/%N%C%S:\ | |
9464 | ${x_library}/X11/%l/%T/%N%C%S:\ | |
9465 | ${x_library}/X11/%T/%N%C%S:\ | |
9466 | ${x_library}/X11/%L/%T/%N%S:\ | |
9467 | ${x_library}/X11/%l/%T/%N%S:\ | |
9468 | ${x_library}/X11/%T/%N%S" | |
9469 | if test x"${x_default_search_path}" = x; then | |
9470 | x_default_search_path=${x_search_path} | |
9471 | else | |
9472 | x_default_search_path="${x_search_path}:${x_default_search_path}" | |
9473 | fi | |
9474 | done | |
9475 | fi | |
9476 | ||
9477 | ||
9478 | ||
9479 | if test "${x_includes}" != NONE && test -n "${x_includes}"; then | |
9480 | C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"` | |
9481 | fi | |
9482 | ||
9483 | if test x"${x_includes}" = x; then | |
9484 | bitmapdir=/usr/include/X11/bitmaps | |
9485 | else | |
9486 | # accumulate include directories that have X11 bitmap subdirectories | |
9487 | bmd_acc="dummyval" | |
9488 | for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do | |
9489 | if test -d "${bmd}/X11/bitmaps"; then | |
9490 | bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps" | |
9491 | fi | |
9492 | if test -d "${bmd}/bitmaps"; then | |
9493 | bmd_acc="${bmd_acc}:${bmd}/bitmaps" | |
9494 | fi | |
9495 | done | |
9496 | if test ${bmd_acc} != "dummyval"; then | |
9497 | bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"` | |
9498 | fi | |
9499 | fi | |
9500 | ||
9501 | HAVE_NS=no | |
9502 | NS_IMPL_COCOA=no | |
9503 | NS_IMPL_GNUSTEP=no | |
9504 | tmp_CPPFLAGS="$CPPFLAGS" | |
9505 | tmp_CFLAGS="$CFLAGS" | |
9506 | CPPFLAGS="$CPPFLAGS -x objective-c" | |
9507 | CFLAGS="$CFLAGS -x objective-c" | |
9508 | TEMACS_LDFLAGS2="\${LDFLAGS}" | |
9509 | if test "${with_ns}" != no; then | |
9510 | if test "${opsys}" = darwin; then | |
9511 | NS_IMPL_COCOA=yes | |
9512 | ns_appdir=`pwd`/nextstep/Emacs.app | |
9513 | ns_appbindir=${ns_appdir}/Contents/MacOS/ | |
9514 | ns_appresdir=${ns_appdir}/Contents/Resources | |
9515 | ns_appsrc=${srcdir}/nextstep/Cocoa/Emacs.base | |
9516 | elif test -f $GNUSTEP_CONFIG_FILE; then | |
9517 | NS_IMPL_GNUSTEP=yes | |
9518 | ns_appdir=`pwd`/nextstep/Emacs.app | |
9519 | ns_appbindir=${ns_appdir}/ | |
9520 | ns_appresdir=${ns_appdir}/Resources | |
9521 | ns_appsrc=${srcdir}/nextstep/GNUstep/Emacs.base | |
9522 | GNUSTEP_SYSTEM_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_HEADERS)" | |
9523 | GNUSTEP_SYSTEM_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_LIBRARIES)" | |
9524 | GNUSTEP_LOCAL_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_HEADERS)" | |
9525 | GNUSTEP_LOCAL_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_LIBRARIES)" | |
9526 | test "x${GNUSTEP_LOCAL_HEADERS}" != "x" && \ | |
9527 | GNUSTEP_LOCAL_HEADERS="-I${GNUSTEP_LOCAL_HEADERS}" | |
9528 | test "x${GNUSTEP_LOCAL_LIBRARIES}" != "x" && \ | |
9529 | GNUSTEP_LOCAL_LIBRARIES="-L${GNUSTEP_LOCAL_LIBRARIES}" | |
9530 | CPPFLAGS="$CPPFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}" | |
9531 | CFLAGS="$CFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}" | |
9532 | LDFLAGS="$LDFLAGS -L${GNUSTEP_SYSTEM_LIBRARIES} ${GNUSTEP_LOCAL_LIBRARIES}" | |
9533 | LIB_STANDARD= | |
9534 | START_FILES= | |
9535 | TEMACS_LDFLAGS2= | |
9536 | fi | |
9537 | ac_fn_c_check_header_mongrel "$LINENO" "AppKit/AppKit.h" "ac_cv_header_AppKit_AppKit_h" "$ac_includes_default" | |
5f64f7bd | 9538 | if test "x$ac_cv_header_AppKit_AppKit_h" = x""yes; then : |
067d23c9 KY |
9539 | HAVE_NS=yes |
9540 | else | |
5f64f7bd | 9541 | as_fn_error "\`--with-ns' was specified, but the include |
067d23c9 KY |
9542 | files are missing or cannot be compiled." "$LINENO" 5 |
9543 | fi | |
9544 | ||
9545 | ||
9546 | NS_HAVE_NSINTEGER=yes | |
9547 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9548 | /* end confdefs.h. */ | |
9549 | #include <Foundation/NSObjCRuntime.h> | |
9550 | int | |
9551 | main () | |
9552 | { | |
9553 | NSInteger i; | |
9554 | ; | |
9555 | return 0; | |
9556 | } | |
9557 | _ACEOF | |
9558 | if ac_fn_c_try_compile "$LINENO"; then : | |
9559 | ns_have_nsinteger=yes | |
9560 | else | |
9561 | ns_have_nsinteger=no | |
9562 | fi | |
9563 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
9564 | if test $ns_have_nsinteger = no; then | |
9565 | NS_HAVE_NSINTEGER=no | |
9566 | fi | |
9567 | fi | |
9568 | ||
9569 | ||
9570 | ns_frag=/dev/null | |
9571 | NS_OBJ= | |
00b3c7ac | 9572 | NS_OBJC_OBJ= |
067d23c9 KY |
9573 | if test "${HAVE_NS}" = yes; then |
9574 | window_system=nextstep | |
9575 | with_xft=no | |
9576 | # set up packaging dirs | |
9577 | exec_prefix=${ns_appbindir} | |
9578 | libexecdir=${ns_appbindir}/libexec | |
9579 | if test "${EN_NS_SELF_CONTAINED}" = yes; then | |
9580 | prefix=${ns_appresdir} | |
9581 | fi | |
9582 | ns_frag=$srcdir/src/ns.mk | |
00b3c7ac TT |
9583 | NS_OBJ="fontset.o fringe.o image.o" |
9584 | NS_OBJC_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o" | |
067d23c9 KY |
9585 | fi |
9586 | CFLAGS="$tmp_CFLAGS" | |
9587 | CPPFLAGS="$tmp_CPPFLAGS" | |
9588 | ||
9589 | ||
9590 | ||
9591 | ||
9592 | ||
9593 | case "${window_system}" in | |
9594 | x11 ) | |
9595 | HAVE_X_WINDOWS=yes | |
9596 | HAVE_X11=yes | |
9597 | case "${with_x_toolkit}" in | |
9598 | athena | lucid ) USE_X_TOOLKIT=LUCID ;; | |
9599 | motif ) USE_X_TOOLKIT=MOTIF ;; | |
9600 | gtk ) with_gtk=yes | |
9601 | USE_X_TOOLKIT=none ;; | |
9602 | gtk3 ) with_gtk3=yes | |
9603 | USE_X_TOOLKIT=none ;; | |
9604 | no ) USE_X_TOOLKIT=none ;; | |
9605 | * ) USE_X_TOOLKIT=maybe ;; | |
9606 | esac | |
9607 | ;; | |
9608 | nextstep | none ) | |
9609 | HAVE_X_WINDOWS=no | |
9610 | HAVE_X11=no | |
9611 | USE_X_TOOLKIT=none | |
9612 | ;; | |
9613 | esac | |
9614 | ||
9615 | if test "$window_system" = none && test "X$with_x" != "Xno"; then | |
9616 | # Extract the first word of "X", so it can be a program name with args. | |
9617 | set dummy X; ac_word=$2 | |
9618 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
9619 | $as_echo_n "checking for $ac_word... " >&6; } | |
5f64f7bd | 9620 | if test "${ac_cv_prog_HAVE_XSERVER+set}" = set; then : |
067d23c9 KY |
9621 | $as_echo_n "(cached) " >&6 |
9622 | else | |
9623 | if test -n "$HAVE_XSERVER"; then | |
9624 | ac_cv_prog_HAVE_XSERVER="$HAVE_XSERVER" # Let the user override the test. | |
9625 | else | |
9626 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
9627 | for as_dir in $PATH | |
9628 | do | |
9629 | IFS=$as_save_IFS | |
9630 | test -z "$as_dir" && as_dir=. | |
9631 | for ac_exec_ext in '' $ac_executable_extensions; do | |
9632 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
9633 | ac_cv_prog_HAVE_XSERVER="true" | |
9634 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
9635 | break 2 | |
9636 | fi | |
9637 | done | |
9638 | done | |
9639 | IFS=$as_save_IFS | |
9640 | ||
9641 | test -z "$ac_cv_prog_HAVE_XSERVER" && ac_cv_prog_HAVE_XSERVER="false" | |
9642 | fi | |
9643 | fi | |
9644 | HAVE_XSERVER=$ac_cv_prog_HAVE_XSERVER | |
9645 | if test -n "$HAVE_XSERVER"; then | |
9646 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_XSERVER" >&5 | |
9647 | $as_echo "$HAVE_XSERVER" >&6; } | |
9648 | else | |
9649 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
9650 | $as_echo "no" >&6; } | |
9651 | fi | |
9652 | ||
9653 | ||
9654 | if test "$HAVE_XSERVER" = true || | |
9655 | test -n "$DISPLAY" || | |
9656 | test "`echo /usr/lib/libX11.*`" != "/usr/lib/libX11.*"; then | |
5f64f7bd | 9657 | as_fn_error "You seem to be running X, but no X development libraries |
067d23c9 KY |
9658 | were found. You should install the relevant development files for X |
9659 | and for the toolkit you want, such as Gtk+, Lesstif or Motif. Also make | |
9660 | sure you have development files for image handling, i.e. | |
9661 | tiff, gif, jpeg, png and xpm. | |
9662 | If you are sure you want Emacs compiled without X window support, pass | |
9663 | --without-x | |
9664 | to configure." "$LINENO" 5 | |
9665 | fi | |
9666 | fi | |
9667 | ||
9668 | ### If we're using X11, we should use the X menu package. | |
9669 | HAVE_MENUS=no | |
9670 | case ${HAVE_X11} in | |
9671 | yes ) HAVE_MENUS=yes ;; | |
9672 | esac | |
9673 | ||
9674 | # Do the opsystem or machine files prohibit the use of the GNU malloc? | |
9675 | # Assume not, until told otherwise. | |
9676 | GNU_MALLOC=yes | |
9677 | doug_lea_malloc=yes | |
9678 | ac_fn_c_check_func "$LINENO" "malloc_get_state" "ac_cv_func_malloc_get_state" | |
5f64f7bd | 9679 | if test "x$ac_cv_func_malloc_get_state" = x""yes; then : |
067d23c9 KY |
9680 | |
9681 | else | |
9682 | doug_lea_malloc=no | |
9683 | fi | |
9684 | ||
9685 | ac_fn_c_check_func "$LINENO" "malloc_set_state" "ac_cv_func_malloc_set_state" | |
5f64f7bd | 9686 | if test "x$ac_cv_func_malloc_set_state" = x""yes; then : |
067d23c9 KY |
9687 | |
9688 | else | |
9689 | doug_lea_malloc=no | |
9690 | fi | |
9691 | ||
9692 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __after_morecore_hook exists" >&5 | |
9693 | $as_echo_n "checking whether __after_morecore_hook exists... " >&6; } | |
5f64f7bd | 9694 | if test "${emacs_cv_var___after_morecore_hook+set}" = set; then : |
067d23c9 KY |
9695 | $as_echo_n "(cached) " >&6 |
9696 | else | |
9697 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9698 | /* end confdefs.h. */ | |
9699 | extern void (* __after_morecore_hook)(); | |
9700 | int | |
9701 | main () | |
9702 | { | |
9703 | __after_morecore_hook = 0 | |
9704 | ; | |
9705 | return 0; | |
9706 | } | |
9707 | _ACEOF | |
9708 | if ac_fn_c_try_link "$LINENO"; then : | |
9709 | emacs_cv_var___after_morecore_hook=yes | |
9710 | else | |
9711 | emacs_cv_var___after_morecore_hook=no | |
9712 | fi | |
9713 | rm -f core conftest.err conftest.$ac_objext \ | |
9714 | conftest$ac_exeext conftest.$ac_ext | |
9715 | fi | |
9716 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_var___after_morecore_hook" >&5 | |
9717 | $as_echo "$emacs_cv_var___after_morecore_hook" >&6; } | |
9718 | if test $emacs_cv_var___after_morecore_hook = no; then | |
9719 | doug_lea_malloc=no | |
9720 | fi | |
9721 | ||
9722 | ||
9723 | system_malloc=no | |
9724 | case "$opsys" in | |
9725 | ## darwin ld insists on the use of malloc routines in the System framework. | |
9726 | darwin|sol2-10) system_malloc=yes ;; | |
9727 | esac | |
9728 | ||
9729 | if test "${system_malloc}" = "yes"; then | |
9730 | ||
9731 | $as_echo "#define SYSTEM_MALLOC 1" >>confdefs.h | |
9732 | ||
9733 | GNU_MALLOC=no | |
9734 | GNU_MALLOC_reason=" | |
9735 | (The GNU allocators don't work with this system configuration.)" | |
9736 | GMALLOC_OBJ= | |
9737 | VMLIMIT_OBJ= | |
9738 | else | |
9739 | test "$doug_lea_malloc" != "yes" && GMALLOC_OBJ=gmalloc.o | |
9740 | VMLIMIT_OBJ=vm-limit.o | |
9741 | fi | |
9742 | ||
9743 | ||
9744 | ||
9745 | if test "$doug_lea_malloc" = "yes" ; then | |
9746 | if test "$GNU_MALLOC" = yes ; then | |
9747 | GNU_MALLOC_reason=" | |
9748 | (Using Doug Lea's new malloc from the GNU C Library.)" | |
9749 | fi | |
9750 | ||
9751 | $as_echo "#define DOUG_LEA_MALLOC 1" >>confdefs.h | |
9752 | ||
9753 | ||
9754 | ## Use mmap directly for allocating larger buffers. | |
9755 | ## FIXME this comes from src/s/{gnu,gnu-linux}.h: | |
9756 | ## #ifdef DOUG_LEA_MALLOC; #undef REL_ALLOC; #endif | |
9757 | ## Does the AC_FUNC_MMAP test below make this check unecessary? | |
9758 | case "$opsys" in | |
9759 | gnu*) REL_ALLOC=no ;; | |
9760 | esac | |
9761 | fi | |
9762 | ||
9763 | if test x"${REL_ALLOC}" = x; then | |
9764 | REL_ALLOC=${GNU_MALLOC} | |
9765 | fi | |
9766 | ||
9767 | use_mmap_for_buffers=no | |
9768 | case "$opsys" in | |
e7dcef2a | 9769 | cygwin|freebsd|irix6-5) use_mmap_for_buffers=yes ;; |
067d23c9 KY |
9770 | esac |
9771 | ||
9772 | ||
9773 | ||
9774 | ||
9775 | for ac_header in $ac_header_list | |
9776 | do : | |
9777 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
9778 | ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default | |
9779 | " | |
5f64f7bd GM |
9780 | eval as_val=\$$as_ac_Header |
9781 | if test "x$as_val" = x""yes; then : | |
067d23c9 KY |
9782 | cat >>confdefs.h <<_ACEOF |
9783 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
9784 | _ACEOF | |
9785 | ||
9786 | fi | |
9787 | ||
9788 | done | |
9789 | ||
9790 | ||
9791 | ||
9792 | ||
9793 | ||
9794 | ||
9795 | ||
9796 | ||
9797 | for ac_func in getpagesize | |
9798 | do : | |
9799 | ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" | |
5f64f7bd | 9800 | if test "x$ac_cv_func_getpagesize" = x""yes; then : |
067d23c9 KY |
9801 | cat >>confdefs.h <<_ACEOF |
9802 | #define HAVE_GETPAGESIZE 1 | |
9803 | _ACEOF | |
9804 | ||
9805 | fi | |
9806 | done | |
9807 | ||
9808 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 | |
9809 | $as_echo_n "checking for working mmap... " >&6; } | |
5f64f7bd | 9810 | if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then : |
067d23c9 KY |
9811 | $as_echo_n "(cached) " >&6 |
9812 | else | |
9813 | if test "$cross_compiling" = yes; then : | |
9814 | ac_cv_func_mmap_fixed_mapped=no | |
9815 | else | |
9816 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9817 | /* end confdefs.h. */ | |
9818 | $ac_includes_default | |
9819 | /* malloc might have been renamed as rpl_malloc. */ | |
9820 | #undef malloc | |
9821 | ||
9822 | /* Thanks to Mike Haertel and Jim Avera for this test. | |
9823 | Here is a matrix of mmap possibilities: | |
9824 | mmap private not fixed | |
9825 | mmap private fixed at somewhere currently unmapped | |
9826 | mmap private fixed at somewhere already mapped | |
9827 | mmap shared not fixed | |
9828 | mmap shared fixed at somewhere currently unmapped | |
9829 | mmap shared fixed at somewhere already mapped | |
9830 | For private mappings, we should verify that changes cannot be read() | |
9831 | back from the file, nor mmap's back from the file at a different | |
9832 | address. (There have been systems where private was not correctly | |
9833 | implemented like the infamous i386 svr4.0, and systems where the | |
9834 | VM page cache was not coherent with the file system buffer cache | |
9835 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
9836 | For shared mappings, we should conversely verify that changes get | |
9837 | propagated back to all the places they're supposed to be. | |
9838 | ||
9839 | Grep wants private fixed already mapped. | |
9840 | The main things grep needs to know about mmap are: | |
9841 | * does it exist and is it safe to write into the mmap'd area | |
9842 | * how to use it (BSD variants) */ | |
9843 | ||
9844 | #include <fcntl.h> | |
9845 | #include <sys/mman.h> | |
9846 | ||
9847 | #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H | |
9848 | char *malloc (); | |
9849 | #endif | |
9850 | ||
9851 | /* This mess was copied from the GNU getpagesize.h. */ | |
9852 | #ifndef HAVE_GETPAGESIZE | |
9853 | # ifdef _SC_PAGESIZE | |
9854 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
9855 | # else /* no _SC_PAGESIZE */ | |
9856 | # ifdef HAVE_SYS_PARAM_H | |
9857 | # include <sys/param.h> | |
9858 | # ifdef EXEC_PAGESIZE | |
9859 | # define getpagesize() EXEC_PAGESIZE | |
9860 | # else /* no EXEC_PAGESIZE */ | |
9861 | # ifdef NBPG | |
9862 | # define getpagesize() NBPG * CLSIZE | |
9863 | # ifndef CLSIZE | |
9864 | # define CLSIZE 1 | |
9865 | # endif /* no CLSIZE */ | |
9866 | # else /* no NBPG */ | |
9867 | # ifdef NBPC | |
9868 | # define getpagesize() NBPC | |
9869 | # else /* no NBPC */ | |
9870 | # ifdef PAGESIZE | |
9871 | # define getpagesize() PAGESIZE | |
9872 | # endif /* PAGESIZE */ | |
9873 | # endif /* no NBPC */ | |
9874 | # endif /* no NBPG */ | |
9875 | # endif /* no EXEC_PAGESIZE */ | |
9876 | # else /* no HAVE_SYS_PARAM_H */ | |
9877 | # define getpagesize() 8192 /* punt totally */ | |
9878 | # endif /* no HAVE_SYS_PARAM_H */ | |
9879 | # endif /* no _SC_PAGESIZE */ | |
9880 | ||
9881 | #endif /* no HAVE_GETPAGESIZE */ | |
9882 | ||
9883 | int | |
9884 | main () | |
9885 | { | |
9886 | char *data, *data2, *data3; | |
1ef6de05 | 9887 | const char *cdata2; |
067d23c9 KY |
9888 | int i, pagesize; |
9889 | int fd, fd2; | |
9890 | ||
9891 | pagesize = getpagesize (); | |
9892 | ||
9893 | /* First, make a file with some known garbage in it. */ | |
9894 | data = (char *) malloc (pagesize); | |
9895 | if (!data) | |
9896 | return 1; | |
9897 | for (i = 0; i < pagesize; ++i) | |
9898 | *(data + i) = rand (); | |
9899 | umask (0); | |
9900 | fd = creat ("conftest.mmap", 0600); | |
9901 | if (fd < 0) | |
9902 | return 2; | |
9903 | if (write (fd, data, pagesize) != pagesize) | |
9904 | return 3; | |
9905 | close (fd); | |
9906 | ||
9907 | /* Next, check that the tail of a page is zero-filled. File must have | |
9908 | non-zero length, otherwise we risk SIGBUS for entire page. */ | |
9909 | fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600); | |
9910 | if (fd2 < 0) | |
9911 | return 4; | |
1ef6de05 PE |
9912 | cdata2 = ""; |
9913 | if (write (fd2, cdata2, 1) != 1) | |
067d23c9 | 9914 | return 5; |
1ef6de05 | 9915 | data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L); |
067d23c9 KY |
9916 | if (data2 == MAP_FAILED) |
9917 | return 6; | |
9918 | for (i = 0; i < pagesize; ++i) | |
9919 | if (*(data2 + i)) | |
9920 | return 7; | |
9921 | close (fd2); | |
9922 | if (munmap (data2, pagesize)) | |
9923 | return 8; | |
9924 | ||
9925 | /* Next, try to mmap the file at a fixed address which already has | |
9926 | something else allocated at it. If we can, also make sure that | |
9927 | we see the same garbage. */ | |
9928 | fd = open ("conftest.mmap", O_RDWR); | |
9929 | if (fd < 0) | |
9930 | return 9; | |
9931 | if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, | |
9932 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
9933 | return 10; | |
9934 | for (i = 0; i < pagesize; ++i) | |
9935 | if (*(data + i) != *(data2 + i)) | |
9936 | return 11; | |
9937 | ||
9938 | /* Finally, make sure that changes to the mapped area do not | |
9939 | percolate back to the file as seen by read(). (This is a bug on | |
9940 | some variants of i386 svr4.0.) */ | |
9941 | for (i = 0; i < pagesize; ++i) | |
9942 | *(data2 + i) = *(data2 + i) + 1; | |
9943 | data3 = (char *) malloc (pagesize); | |
9944 | if (!data3) | |
9945 | return 12; | |
9946 | if (read (fd, data3, pagesize) != pagesize) | |
9947 | return 13; | |
9948 | for (i = 0; i < pagesize; ++i) | |
9949 | if (*(data + i) != *(data3 + i)) | |
9950 | return 14; | |
9951 | close (fd); | |
9952 | return 0; | |
9953 | } | |
9954 | _ACEOF | |
9955 | if ac_fn_c_try_run "$LINENO"; then : | |
9956 | ac_cv_func_mmap_fixed_mapped=yes | |
9957 | else | |
9958 | ac_cv_func_mmap_fixed_mapped=no | |
9959 | fi | |
9960 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
9961 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
9962 | fi | |
9963 | ||
9964 | fi | |
9965 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5 | |
9966 | $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; } | |
9967 | if test $ac_cv_func_mmap_fixed_mapped = yes; then | |
9968 | ||
9969 | $as_echo "#define HAVE_MMAP 1" >>confdefs.h | |
9970 | ||
9971 | fi | |
9972 | rm -f conftest.mmap conftest.txt | |
9973 | ||
9974 | if test $use_mmap_for_buffers = yes; then | |
9975 | ||
9976 | $as_echo "#define USE_MMAP_FOR_BUFFERS 1" >>confdefs.h | |
9977 | ||
9978 | REL_ALLOC=no | |
9979 | fi | |
9980 | ||
9981 | LIBS="$LIBS_SYSTEM $LIBS" | |
9982 | ||
9983 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5 | |
9984 | $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; } | |
5f64f7bd | 9985 | if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then : |
067d23c9 KY |
9986 | $as_echo_n "(cached) " >&6 |
9987 | else | |
9988 | ac_check_lib_save_LIBS=$LIBS | |
9989 | LIBS="-ldnet $LIBS" | |
9990 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9991 | /* end confdefs.h. */ | |
9992 | ||
9993 | /* Override any GCC internal prototype to avoid an error. | |
9994 | Use char because int might match the return type of a GCC | |
9995 | builtin and then its argument prototype would still apply. */ | |
9996 | #ifdef __cplusplus | |
9997 | extern "C" | |
9998 | #endif | |
9999 | char dnet_ntoa (); | |
10000 | int | |
10001 | main () | |
10002 | { | |
10003 | return dnet_ntoa (); | |
10004 | ; | |
10005 | return 0; | |
10006 | } | |
10007 | _ACEOF | |
10008 | if ac_fn_c_try_link "$LINENO"; then : | |
10009 | ac_cv_lib_dnet_dnet_ntoa=yes | |
10010 | else | |
10011 | ac_cv_lib_dnet_dnet_ntoa=no | |
10012 | fi | |
10013 | rm -f core conftest.err conftest.$ac_objext \ | |
10014 | conftest$ac_exeext conftest.$ac_ext | |
10015 | LIBS=$ac_check_lib_save_LIBS | |
10016 | fi | |
10017 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 | |
10018 | $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; } | |
5f64f7bd | 10019 | if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then : |
067d23c9 KY |
10020 | cat >>confdefs.h <<_ACEOF |
10021 | #define HAVE_LIBDNET 1 | |
10022 | _ACEOF | |
10023 | ||
10024 | LIBS="-ldnet $LIBS" | |
10025 | ||
10026 | fi | |
10027 | ||
10028 | ||
10029 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lXbsd" >&5 | |
10030 | $as_echo_n "checking for main in -lXbsd... " >&6; } | |
5f64f7bd | 10031 | if test "${ac_cv_lib_Xbsd_main+set}" = set; then : |
067d23c9 KY |
10032 | $as_echo_n "(cached) " >&6 |
10033 | else | |
10034 | ac_check_lib_save_LIBS=$LIBS | |
10035 | LIBS="-lXbsd $LIBS" | |
10036 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10037 | /* end confdefs.h. */ | |
10038 | ||
10039 | ||
10040 | int | |
10041 | main () | |
10042 | { | |
10043 | return main (); | |
10044 | ; | |
10045 | return 0; | |
10046 | } | |
10047 | _ACEOF | |
10048 | if ac_fn_c_try_link "$LINENO"; then : | |
10049 | ac_cv_lib_Xbsd_main=yes | |
10050 | else | |
10051 | ac_cv_lib_Xbsd_main=no | |
10052 | fi | |
10053 | rm -f core conftest.err conftest.$ac_objext \ | |
10054 | conftest$ac_exeext conftest.$ac_ext | |
10055 | LIBS=$ac_check_lib_save_LIBS | |
10056 | fi | |
10057 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xbsd_main" >&5 | |
10058 | $as_echo "$ac_cv_lib_Xbsd_main" >&6; } | |
5f64f7bd | 10059 | if test "x$ac_cv_lib_Xbsd_main" = x""yes; then : |
067d23c9 KY |
10060 | LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd" |
10061 | fi | |
10062 | ||
10063 | ||
10064 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cma_open in -lpthreads" >&5 | |
10065 | $as_echo_n "checking for cma_open in -lpthreads... " >&6; } | |
5f64f7bd | 10066 | if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then : |
067d23c9 KY |
10067 | $as_echo_n "(cached) " >&6 |
10068 | else | |
10069 | ac_check_lib_save_LIBS=$LIBS | |
10070 | LIBS="-lpthreads $LIBS" | |
10071 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10072 | /* end confdefs.h. */ | |
10073 | ||
10074 | /* Override any GCC internal prototype to avoid an error. | |
10075 | Use char because int might match the return type of a GCC | |
10076 | builtin and then its argument prototype would still apply. */ | |
10077 | #ifdef __cplusplus | |
10078 | extern "C" | |
10079 | #endif | |
10080 | char cma_open (); | |
10081 | int | |
10082 | main () | |
10083 | { | |
10084 | return cma_open (); | |
10085 | ; | |
10086 | return 0; | |
10087 | } | |
10088 | _ACEOF | |
10089 | if ac_fn_c_try_link "$LINENO"; then : | |
10090 | ac_cv_lib_pthreads_cma_open=yes | |
10091 | else | |
10092 | ac_cv_lib_pthreads_cma_open=no | |
10093 | fi | |
10094 | rm -f core conftest.err conftest.$ac_objext \ | |
10095 | conftest$ac_exeext conftest.$ac_ext | |
10096 | LIBS=$ac_check_lib_save_LIBS | |
10097 | fi | |
10098 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_cma_open" >&5 | |
10099 | $as_echo "$ac_cv_lib_pthreads_cma_open" >&6; } | |
5f64f7bd | 10100 | if test "x$ac_cv_lib_pthreads_cma_open" = x""yes; then : |
067d23c9 KY |
10101 | cat >>confdefs.h <<_ACEOF |
10102 | #define HAVE_LIBPTHREADS 1 | |
10103 | _ACEOF | |
10104 | ||
10105 | LIBS="-lpthreads $LIBS" | |
10106 | ||
10107 | fi | |
10108 | ||
10109 | ||
10110 | ## Note: when using cpp in s/aix4.2.h, this definition depended on | |
10111 | ## HAVE_LIBPTHREADS. That was not defined earlier in configure when | |
10112 | ## the system file was sourced. Hence the value of LIBS_SYSTEM | |
10113 | ## added to LIBS in configure would never contain the pthreads part, | |
10114 | ## but the value used in Makefiles might. FIXME? | |
10115 | ## | |
10116 | ## -lpthreads seems to be necessary for Xlib in X11R6, and should | |
10117 | ## be harmless on older versions of X where it happens to exist. | |
10118 | test "$opsys" = "aix4-2" && \ | |
10119 | test $ac_cv_lib_pthreads_cma_open = yes && \ | |
10120 | LIBS_SYSTEM="$LIBS_SYSTEM -lpthreads" | |
10121 | ||
10122 | ||
10123 | case ${host_os} in | |
10124 | aix*) | |
10125 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5 | |
10126 | $as_echo_n "checking for -bbigtoc option... " >&6; } | |
5f64f7bd | 10127 | if test "${gdb_cv_bigtoc+set}" = set; then : |
067d23c9 KY |
10128 | $as_echo_n "(cached) " >&6 |
10129 | else | |
10130 | ||
10131 | case $GCC in | |
10132 | yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;; | |
10133 | *) gdb_cv_bigtoc=-bbigtoc ;; | |
10134 | esac | |
10135 | ||
10136 | LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc | |
10137 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10138 | /* end confdefs.h. */ | |
10139 | ||
10140 | int | |
10141 | main () | |
10142 | { | |
10143 | int i; | |
10144 | ; | |
10145 | return 0; | |
10146 | } | |
10147 | _ACEOF | |
10148 | if ac_fn_c_try_link "$LINENO"; then : | |
10149 | ||
10150 | else | |
10151 | gdb_cv_bigtoc= | |
10152 | fi | |
10153 | rm -f core conftest.err conftest.$ac_objext \ | |
10154 | conftest$ac_exeext conftest.$ac_ext | |
10155 | ||
10156 | fi | |
10157 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5 | |
10158 | $as_echo "$gdb_cv_bigtoc" >&6; } | |
10159 | ;; | |
10160 | esac | |
10161 | ||
10162 | # Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets | |
10163 | # used for the tests that follow. We set them back to REAL_CFLAGS and | |
10164 | # REAL_CPPFLAGS later on. | |
10165 | ||
10166 | REAL_CFLAGS="$CFLAGS" | |
10167 | REAL_CPPFLAGS="$CPPFLAGS" | |
10168 | ||
10169 | if test "${HAVE_X11}" = "yes"; then | |
10170 | DEFS="$C_SWITCH_X_SITE $DEFS" | |
10171 | LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE" | |
10172 | LIBS="-lX11 $LIBS" | |
10173 | CFLAGS="$C_SWITCH_X_SITE $CFLAGS" | |
10174 | CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS" | |
10175 | ||
10176 | # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests. | |
10177 | # This is handled by LD_SWITCH_X_SITE_AUX during the real build, | |
10178 | # but it's more convenient here to set LD_RUN_PATH | |
10179 | # since this also works on hosts that don't understand LD_SWITCH_X_SITE_AUX. | |
10180 | if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then | |
10181 | LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH | |
10182 | export LD_RUN_PATH | |
10183 | fi | |
10184 | ||
10185 | if test "${opsys}" = "gnu-linux"; then | |
10186 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether X on GNU/Linux needs -b to link" >&5 | |
10187 | $as_echo_n "checking whether X on GNU/Linux needs -b to link... " >&6; } | |
10188 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10189 | /* end confdefs.h. */ | |
10190 | ||
10191 | int | |
10192 | main () | |
10193 | { | |
10194 | XOpenDisplay ("foo"); | |
10195 | ; | |
10196 | return 0; | |
10197 | } | |
10198 | _ACEOF | |
10199 | if ac_fn_c_try_link "$LINENO"; then : | |
10200 | xlinux_first_failure=no | |
10201 | else | |
10202 | xlinux_first_failure=yes | |
10203 | fi | |
10204 | rm -f core conftest.err conftest.$ac_objext \ | |
10205 | conftest$ac_exeext conftest.$ac_ext | |
10206 | if test "${xlinux_first_failure}" = "yes"; then | |
10207 | OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE" | |
10208 | OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE" | |
10209 | OLD_CPPFLAGS="$CPPFLAGS" | |
10210 | OLD_LIBS="$LIBS" | |
10211 | LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout" | |
10212 | C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout" | |
10213 | CPPFLAGS="$CPPFLAGS -b i486-linuxaout" | |
10214 | LIBS="$LIBS -b i486-linuxaout" | |
10215 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10216 | /* end confdefs.h. */ | |
10217 | ||
10218 | int | |
10219 | main () | |
10220 | { | |
10221 | XOpenDisplay ("foo"); | |
10222 | ; | |
10223 | return 0; | |
10224 | } | |
10225 | _ACEOF | |
10226 | if ac_fn_c_try_link "$LINENO"; then : | |
10227 | xlinux_second_failure=no | |
10228 | else | |
10229 | xlinux_second_failure=yes | |
10230 | fi | |
10231 | rm -f core conftest.err conftest.$ac_objext \ | |
10232 | conftest$ac_exeext conftest.$ac_ext | |
10233 | if test "${xlinux_second_failure}" = "yes"; then | |
10234 | # If we get the same failure with -b, there is no use adding -b. | |
10235 | # So take it out. This plays safe. | |
10236 | LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE" | |
10237 | C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE" | |
10238 | CPPFLAGS="$OLD_CPPFLAGS" | |
10239 | LIBS="$OLD_LIBS" | |
10240 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
10241 | $as_echo "no" >&6; } | |
10242 | else | |
10243 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
10244 | $as_echo "yes" >&6; } | |
10245 | fi | |
10246 | else | |
10247 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
10248 | $as_echo "no" >&6; } | |
10249 | fi | |
10250 | fi | |
10251 | ||
10252 | # Reportedly, some broken Solaris systems have XKBlib.h but are missing | |
10253 | # header files included from there. | |
10254 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Xkb" >&5 | |
10255 | $as_echo_n "checking for Xkb... " >&6; } | |
10256 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10257 | /* end confdefs.h. */ | |
10258 | #include <X11/Xlib.h> | |
10259 | #include <X11/XKBlib.h> | |
10260 | int | |
10261 | main () | |
10262 | { | |
10263 | XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd); | |
10264 | ; | |
10265 | return 0; | |
10266 | } | |
10267 | _ACEOF | |
10268 | if ac_fn_c_try_link "$LINENO"; then : | |
10269 | emacs_xkb=yes | |
10270 | else | |
10271 | emacs_xkb=no | |
10272 | fi | |
10273 | rm -f core conftest.err conftest.$ac_objext \ | |
10274 | conftest$ac_exeext conftest.$ac_ext | |
10275 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_xkb" >&5 | |
10276 | $as_echo "$emacs_xkb" >&6; } | |
10277 | if test $emacs_xkb = yes; then | |
10278 | ||
10279 | $as_echo "#define HAVE_XKBGETKEYBOARD 1" >>confdefs.h | |
10280 | ||
10281 | fi | |
10282 | ||
10283 | for ac_func in XrmSetDatabase XScreenResourceString \ | |
10284 | XScreenNumberOfScreen XSetWMProtocols | |
10285 | do : | |
10286 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
10287 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
5f64f7bd GM |
10288 | eval as_val=\$$as_ac_var |
10289 | if test "x$as_val" = x""yes; then : | |
067d23c9 KY |
10290 | cat >>confdefs.h <<_ACEOF |
10291 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
10292 | _ACEOF | |
10293 | ||
10294 | fi | |
10295 | done | |
10296 | ||
10297 | fi | |
10298 | ||
10299 | if test "${window_system}" = "x11"; then | |
10300 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 version 6" >&5 | |
10301 | $as_echo_n "checking X11 version 6... " >&6; } | |
5f64f7bd | 10302 | if test "${emacs_cv_x11_version_6+set}" = set; then : |
067d23c9 KY |
10303 | $as_echo_n "(cached) " >&6 |
10304 | else | |
10305 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10306 | /* end confdefs.h. */ | |
10307 | #include <X11/Xlib.h> | |
10308 | int | |
10309 | main () | |
10310 | { | |
10311 | #if XlibSpecificationRelease < 6 | |
10312 | fail; | |
10313 | #endif | |
10314 | ||
10315 | ; | |
10316 | return 0; | |
10317 | } | |
10318 | _ACEOF | |
10319 | if ac_fn_c_try_link "$LINENO"; then : | |
10320 | emacs_cv_x11_version_6=yes | |
10321 | else | |
10322 | emacs_cv_x11_version_6=no | |
10323 | fi | |
10324 | rm -f core conftest.err conftest.$ac_objext \ | |
10325 | conftest$ac_exeext conftest.$ac_ext | |
10326 | fi | |
10327 | ||
10328 | if test $emacs_cv_x11_version_6 = yes; then | |
10329 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5 | |
10330 | $as_echo "6 or newer" >&6; } | |
10331 | ||
10332 | $as_echo "#define HAVE_X11R6 1" >>confdefs.h | |
10333 | ||
10334 | ||
10335 | $as_echo "#define HAVE_X_I18N 1" >>confdefs.h | |
10336 | ||
10337 | ## inoue@ainet.or.jp says Solaris has a bug related to X11R6-style | |
10338 | ## XIM support. | |
10339 | case "$opsys" in | |
10340 | sol2-*) : ;; | |
10341 | *) | |
10342 | $as_echo "#define HAVE_X11R6_XIM 1" >>confdefs.h | |
10343 | ||
10344 | ;; | |
10345 | esac | |
10346 | else | |
10347 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5 | |
10348 | $as_echo "before 6" >&6; } | |
10349 | fi | |
10350 | fi | |
10351 | ||
10352 | ||
10353 | ### Use -lrsvg-2 if available, unless `--with-rsvg=no' is specified. | |
10354 | HAVE_RSVG=no | |
10355 | if test "${HAVE_X11}" = "yes" || test "${NS_IMPL_GNUSTEP}" = "yes"; then | |
10356 | if test "${with_rsvg}" != "no"; then | |
10357 | RSVG_REQUIRED=2.11.0 | |
10358 | RSVG_MODULE="librsvg-2.0 >= $RSVG_REQUIRED" | |
10359 | ||
10360 | ||
10361 | succeeded=no | |
10362 | ||
10363 | # Extract the first word of "pkg-config", so it can be a program name with args. | |
10364 | set dummy pkg-config; ac_word=$2 | |
10365 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
10366 | $as_echo_n "checking for $ac_word... " >&6; } | |
5f64f7bd | 10367 | if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : |
067d23c9 KY |
10368 | $as_echo_n "(cached) " >&6 |
10369 | else | |
10370 | case $PKG_CONFIG in | |
10371 | [\\/]* | ?:[\\/]*) | |
10372 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
10373 | ;; | |
10374 | *) | |
10375 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
10376 | for as_dir in $PATH | |
10377 | do | |
10378 | IFS=$as_save_IFS | |
10379 | test -z "$as_dir" && as_dir=. | |
10380 | for ac_exec_ext in '' $ac_executable_extensions; do | |
10381 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
10382 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
10383 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
10384 | break 2 | |
10385 | fi | |
10386 | done | |
10387 | done | |
10388 | IFS=$as_save_IFS | |
10389 | ||
10390 | test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" | |
10391 | ;; | |
10392 | esac | |
10393 | fi | |
10394 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG | |
10395 | if test -n "$PKG_CONFIG"; then | |
10396 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
10397 | $as_echo "$PKG_CONFIG" >&6; } | |
10398 | else | |
10399 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
10400 | $as_echo "no" >&6; } | |
10401 | fi | |
10402 | ||
10403 | ||
10404 | ||
10405 | if test "$PKG_CONFIG" = "no" ; then | |
10406 | : | |
10407 | else | |
10408 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
10409 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
10410 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $RSVG_MODULE" >&5 | |
10411 | $as_echo_n "checking for $RSVG_MODULE... " >&6; } | |
10412 | ||
10413 | if $PKG_CONFIG --exists "$RSVG_MODULE" 2>&5; then | |
10414 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
10415 | $as_echo "yes" >&6; } | |
10416 | succeeded=yes | |
10417 | ||
10418 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking RSVG_CFLAGS" >&5 | |
10419 | $as_echo_n "checking RSVG_CFLAGS... " >&6; } | |
10420 | RSVG_CFLAGS=`$PKG_CONFIG --cflags "$RSVG_MODULE"|sed -e 's,///*,/,g'` | |
10421 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RSVG_CFLAGS" >&5 | |
10422 | $as_echo "$RSVG_CFLAGS" >&6; } | |
10423 | ||
10424 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking RSVG_LIBS" >&5 | |
10425 | $as_echo_n "checking RSVG_LIBS... " >&6; } | |
10426 | RSVG_LIBS=`$PKG_CONFIG --libs "$RSVG_MODULE"|sed -e 's,///*,/,g'` | |
10427 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RSVG_LIBS" >&5 | |
10428 | $as_echo "$RSVG_LIBS" >&6; } | |
10429 | else | |
10430 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
10431 | $as_echo "no" >&6; } | |
10432 | RSVG_CFLAGS="" | |
10433 | RSVG_LIBS="" | |
10434 | ## If we have a custom action on failure, don't print errors, but | |
10435 | ## do set a variable so people can do so. | |
10436 | RSVG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$RSVG_MODULE"` | |
10437 | ||
10438 | fi | |
10439 | ||
10440 | ||
10441 | ||
10442 | else | |
10443 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
10444 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
10445 | fi | |
10446 | fi | |
10447 | ||
10448 | if test $succeeded = yes; then | |
10449 | HAVE_RSVG=yes | |
10450 | else | |
10451 | : | |
10452 | fi | |
10453 | ||
10454 | ||
10455 | ||
10456 | ||
10457 | if test $HAVE_RSVG = yes; then | |
10458 | ||
10459 | $as_echo "#define HAVE_RSVG 1" >>confdefs.h | |
10460 | ||
10461 | CFLAGS="$CFLAGS $RSVG_CFLAGS" | |
10462 | LIBS="$RSVG_LIBS $LIBS" | |
10463 | fi | |
10464 | fi | |
10465 | fi | |
10466 | ||
10467 | HAVE_IMAGEMAGICK=no | |
10468 | if test "${HAVE_X11}" = "yes"; then | |
10469 | if test "${with_imagemagick}" != "no"; then | |
718ad21a GM |
10470 | ## 6.2.8 is the earliest version known to work, but earlier versions |
10471 | ## might work - let us know if you find one. | |
10472 | ## 6.0.7 does not work. See bug#7955. | |
10473 | IMAGEMAGICK_MODULE="Wand >= 6.2.8" | |
067d23c9 KY |
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; } | |
5f64f7bd | 10481 | if test "${ac_cv_path_PKG_CONFIG+set}" = set; 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 | : | |
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 $IMAGEMAGICK_MODULE" >&5 | |
10525 | $as_echo_n "checking for $IMAGEMAGICK_MODULE... " >&6; } | |
10526 | ||
10527 | if $PKG_CONFIG --exists "$IMAGEMAGICK_MODULE" 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 IMAGEMAGICK_CFLAGS" >&5 | |
10533 | $as_echo_n "checking IMAGEMAGICK_CFLAGS... " >&6; } | |
10534 | IMAGEMAGICK_CFLAGS=`$PKG_CONFIG --cflags "$IMAGEMAGICK_MODULE"|sed -e 's,///*,/,g'` | |
10535 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $IMAGEMAGICK_CFLAGS" >&5 | |
10536 | $as_echo "$IMAGEMAGICK_CFLAGS" >&6; } | |
10537 | ||
10538 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking IMAGEMAGICK_LIBS" >&5 | |
10539 | $as_echo_n "checking IMAGEMAGICK_LIBS... " >&6; } | |
10540 | IMAGEMAGICK_LIBS=`$PKG_CONFIG --libs "$IMAGEMAGICK_MODULE"|sed -e 's,///*,/,g'` | |
10541 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $IMAGEMAGICK_LIBS" >&5 | |
10542 | $as_echo "$IMAGEMAGICK_LIBS" >&6; } | |
10543 | else | |
10544 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
10545 | $as_echo "no" >&6; } | |
10546 | IMAGEMAGICK_CFLAGS="" | |
10547 | IMAGEMAGICK_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 | IMAGEMAGICK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$IMAGEMAGICK_MODULE"` | |
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_IMAGEMAGICK=yes | |
10564 | else | |
10565 | : | |
10566 | fi | |
10567 | ||
10568 | ||
10569 | ||
10570 | ||
10571 | if test $HAVE_IMAGEMAGICK = yes; then | |
10572 | ||
10573 | $as_echo "#define HAVE_IMAGEMAGICK 1" >>confdefs.h | |
10574 | ||
10575 | CFLAGS="$CFLAGS $IMAGEMAGICK_CFLAGS" | |
10576 | LIBS="$IMAGEMAGICK_LIBS $LIBS" | |
10577 | for ac_func in MagickExportImagePixels | |
10578 | do : | |
10579 | ac_fn_c_check_func "$LINENO" "MagickExportImagePixels" "ac_cv_func_MagickExportImagePixels" | |
5f64f7bd | 10580 | if test "x$ac_cv_func_MagickExportImagePixels" = x""yes; then : |
067d23c9 KY |
10581 | cat >>confdefs.h <<_ACEOF |
10582 | #define HAVE_MAGICKEXPORTIMAGEPIXELS 1 | |
10583 | _ACEOF | |
10584 | ||
10585 | fi | |
10586 | done | |
10587 | ||
10588 | fi | |
10589 | fi | |
10590 | fi | |
10591 | ||
10592 | ||
10593 | HAVE_GTK=no | |
571e1872 | 10594 | GTK_OBJ= |
067d23c9 | 10595 | if test "${with_gtk3}" = "yes"; then |
0afb4571 J |
10596 | GLIB_REQUIRED=2.28 |
10597 | GTK_REQUIRED=3.0 | |
067d23c9 KY |
10598 | GTK_MODULES="gtk+-3.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED" |
10599 | ||
10600 | ||
10601 | succeeded=no | |
10602 | ||
10603 | # Extract the first word of "pkg-config", so it can be a program name with args. | |
10604 | set dummy pkg-config; ac_word=$2 | |
10605 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
10606 | $as_echo_n "checking for $ac_word... " >&6; } | |
5f64f7bd | 10607 | if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : |
067d23c9 KY |
10608 | $as_echo_n "(cached) " >&6 |
10609 | else | |
10610 | case $PKG_CONFIG in | |
10611 | [\\/]* | ?:[\\/]*) | |
10612 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
10613 | ;; | |
10614 | *) | |
10615 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
10616 | for as_dir in $PATH | |
10617 | do | |
10618 | IFS=$as_save_IFS | |
10619 | test -z "$as_dir" && as_dir=. | |
10620 | for ac_exec_ext in '' $ac_executable_extensions; do | |
10621 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
10622 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
10623 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
10624 | break 2 | |
10625 | fi | |
10626 | done | |
10627 | done | |
10628 | IFS=$as_save_IFS | |
10629 | ||
10630 | test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" | |
10631 | ;; | |
10632 | esac | |
10633 | fi | |
10634 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG | |
10635 | if test -n "$PKG_CONFIG"; then | |
10636 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
10637 | $as_echo "$PKG_CONFIG" >&6; } | |
10638 | else | |
10639 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
10640 | $as_echo "no" >&6; } | |
10641 | fi | |
10642 | ||
10643 | ||
10644 | ||
10645 | if test "$PKG_CONFIG" = "no" ; then | |
10646 | pkg_check_gtk=no | |
10647 | else | |
10648 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
10649 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
10650 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTK_MODULES" >&5 | |
10651 | $as_echo_n "checking for $GTK_MODULES... " >&6; } | |
10652 | ||
10653 | if $PKG_CONFIG --exists "$GTK_MODULES" 2>&5; then | |
10654 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
10655 | $as_echo "yes" >&6; } | |
10656 | succeeded=yes | |
10657 | ||
10658 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking GTK_CFLAGS" >&5 | |
10659 | $as_echo_n "checking GTK_CFLAGS... " >&6; } | |
10660 | GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES"|sed -e 's,///*,/,g'` | |
10661 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_CFLAGS" >&5 | |
10662 | $as_echo "$GTK_CFLAGS" >&6; } | |
10663 | ||
10664 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking GTK_LIBS" >&5 | |
10665 | $as_echo_n "checking GTK_LIBS... " >&6; } | |
10666 | GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES"|sed -e 's,///*,/,g'` | |
10667 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_LIBS" >&5 | |
10668 | $as_echo "$GTK_LIBS" >&6; } | |
10669 | else | |
10670 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
10671 | $as_echo "no" >&6; } | |
10672 | GTK_CFLAGS="" | |
10673 | GTK_LIBS="" | |
10674 | ## If we have a custom action on failure, don't print errors, but | |
10675 | ## do set a variable so people can do so. | |
10676 | GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"` | |
10677 | ||
10678 | fi | |
10679 | ||
10680 | ||
10681 | ||
10682 | else | |
10683 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
10684 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
10685 | fi | |
10686 | fi | |
10687 | ||
10688 | if test $succeeded = yes; then | |
10689 | pkg_check_gtk=yes | |
10690 | else | |
10691 | pkg_check_gtk=no | |
10692 | fi | |
10693 | ||
10694 | if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then | |
5f64f7bd | 10695 | as_fn_error "$GTK_PKG_ERRORS" "$LINENO" 5 |
067d23c9 | 10696 | fi |
0afb4571 J |
10697 | |
10698 | $as_echo "#define HAVE_GTK3 1" >>confdefs.h | |
10699 | ||
571e1872 | 10700 | GTK_OBJ=emacsgtkfixed.o |
067d23c9 KY |
10701 | fi |
10702 | ||
10703 | if test "$pkg_check_gtk" != "yes"; then | |
10704 | HAVE_GTK=no | |
10705 | if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "maybe"; then | |
10706 | GLIB_REQUIRED=2.6 | |
10707 | GTK_REQUIRED=2.6 | |
10708 | GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED" | |
10709 | ||
10710 | ||
10711 | succeeded=no | |
10712 | ||
10713 | # Extract the first word of "pkg-config", so it can be a program name with args. | |
10714 | set dummy pkg-config; ac_word=$2 | |
10715 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
10716 | $as_echo_n "checking for $ac_word... " >&6; } | |
5f64f7bd | 10717 | if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : |
067d23c9 KY |
10718 | $as_echo_n "(cached) " >&6 |
10719 | else | |
10720 | case $PKG_CONFIG in | |
10721 | [\\/]* | ?:[\\/]*) | |
10722 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
10723 | ;; | |
10724 | *) | |
10725 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
10726 | for as_dir in $PATH | |
10727 | do | |
10728 | IFS=$as_save_IFS | |
10729 | test -z "$as_dir" && as_dir=. | |
10730 | for ac_exec_ext in '' $ac_executable_extensions; do | |
10731 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
10732 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
10733 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
10734 | break 2 | |
10735 | fi | |
10736 | done | |
10737 | done | |
10738 | IFS=$as_save_IFS | |
10739 | ||
10740 | test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" | |
10741 | ;; | |
10742 | esac | |
10743 | fi | |
10744 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG | |
10745 | if test -n "$PKG_CONFIG"; then | |
10746 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
10747 | $as_echo "$PKG_CONFIG" >&6; } | |
10748 | else | |
10749 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
10750 | $as_echo "no" >&6; } | |
10751 | fi | |
10752 | ||
10753 | ||
10754 | ||
10755 | if test "$PKG_CONFIG" = "no" ; then | |
10756 | pkg_check_gtk=no | |
10757 | else | |
10758 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
10759 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
10760 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTK_MODULES" >&5 | |
10761 | $as_echo_n "checking for $GTK_MODULES... " >&6; } | |
10762 | ||
10763 | if $PKG_CONFIG --exists "$GTK_MODULES" 2>&5; then | |
10764 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
10765 | $as_echo "yes" >&6; } | |
10766 | succeeded=yes | |
10767 | ||
10768 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking GTK_CFLAGS" >&5 | |
10769 | $as_echo_n "checking GTK_CFLAGS... " >&6; } | |
10770 | GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES"|sed -e 's,///*,/,g'` | |
10771 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_CFLAGS" >&5 | |
10772 | $as_echo "$GTK_CFLAGS" >&6; } | |
10773 | ||
10774 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking GTK_LIBS" >&5 | |
10775 | $as_echo_n "checking GTK_LIBS... " >&6; } | |
10776 | GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES"|sed -e 's,///*,/,g'` | |
10777 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_LIBS" >&5 | |
10778 | $as_echo "$GTK_LIBS" >&6; } | |
10779 | else | |
10780 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
10781 | $as_echo "no" >&6; } | |
10782 | GTK_CFLAGS="" | |
10783 | GTK_LIBS="" | |
10784 | ## If we have a custom action on failure, don't print errors, but | |
10785 | ## do set a variable so people can do so. | |
10786 | GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"` | |
10787 | ||
10788 | fi | |
10789 | ||
10790 | ||
10791 | ||
10792 | else | |
10793 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
10794 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
10795 | fi | |
10796 | fi | |
10797 | ||
10798 | if test $succeeded = yes; then | |
10799 | pkg_check_gtk=yes | |
10800 | else | |
10801 | pkg_check_gtk=no | |
10802 | fi | |
10803 | ||
10804 | if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then | |
5f64f7bd | 10805 | as_fn_error "$GTK_PKG_ERRORS" "$LINENO" 5 |
067d23c9 KY |
10806 | fi |
10807 | fi | |
10808 | fi | |
10809 | ||
067d23c9 KY |
10810 | if test x"$pkg_check_gtk" = xyes; then |
10811 | ||
10812 | ||
10813 | ||
10814 | C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS" | |
10815 | CFLAGS="$CFLAGS $GTK_CFLAGS" | |
10816 | LIBS="$GTK_LIBS $LIBS" | |
10817 | GTK_COMPILES=no | |
10818 | for ac_func in gtk_main | |
10819 | do : | |
10820 | ac_fn_c_check_func "$LINENO" "gtk_main" "ac_cv_func_gtk_main" | |
5f64f7bd | 10821 | if test "x$ac_cv_func_gtk_main" = x""yes; then : |
067d23c9 KY |
10822 | cat >>confdefs.h <<_ACEOF |
10823 | #define HAVE_GTK_MAIN 1 | |
10824 | _ACEOF | |
10825 | GTK_COMPILES=yes | |
10826 | fi | |
10827 | done | |
10828 | ||
10829 | if test "${GTK_COMPILES}" != "yes"; then | |
10830 | if test "$USE_X_TOOLKIT" != "maybe"; then | |
5f64f7bd | 10831 | as_fn_error "Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" "$LINENO" 5; |
067d23c9 KY |
10832 | fi |
10833 | else | |
10834 | HAVE_GTK=yes | |
10835 | ||
10836 | $as_echo "#define USE_GTK 1" >>confdefs.h | |
10837 | ||
571e1872 | 10838 | GTK_OBJ="gtkutil.o $GTK_OBJ" |
067d23c9 KY |
10839 | USE_X_TOOLKIT=none |
10840 | if $PKG_CONFIG --atleast-version=2.10 gtk+-2.0; then | |
10841 | : | |
10842 | else | |
10843 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your version of Gtk+ will have problems with | |
10844 | closing open displays. This is no problem if you just use | |
10845 | one display, but if you use more than one and close one of them | |
10846 | Emacs may crash." >&5 | |
10847 | $as_echo "$as_me: WARNING: Your version of Gtk+ will have problems with | |
10848 | closing open displays. This is no problem if you just use | |
10849 | one display, but if you use more than one and close one of them | |
10850 | Emacs may crash." >&2;} | |
10851 | sleep 3 | |
10852 | fi | |
10853 | fi | |
10854 | ||
10855 | fi | |
10856 | ||
10857 | ||
10858 | ||
10859 | if test "${HAVE_GTK}" = "yes"; then | |
10860 | ||
10861 | if test "$with_toolkit_scroll_bars" != no; then | |
10862 | with_toolkit_scroll_bars=yes | |
10863 | fi | |
10864 | ||
10865 | HAVE_GTK_FILE_SELECTION=no | |
10866 | ac_fn_c_check_decl "$LINENO" "GTK_TYPE_FILE_SELECTION" "ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" "$ac_includes_default | |
10867 | #include <gtk/gtk.h> | |
10868 | " | |
5f64f7bd | 10869 | if test "x$ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" = x""yes; then : |
067d23c9 KY |
10870 | HAVE_GTK_FILE_SELECTION=yes |
10871 | else | |
10872 | HAVE_GTK_FILE_SELECTION=no | |
10873 | fi | |
10874 | ||
10875 | if test "$HAVE_GTK_FILE_SELECTION" = yes; then | |
10876 | for ac_func in gtk_file_selection_new | |
10877 | do : | |
10878 | ac_fn_c_check_func "$LINENO" "gtk_file_selection_new" "ac_cv_func_gtk_file_selection_new" | |
5f64f7bd | 10879 | if test "x$ac_cv_func_gtk_file_selection_new" = x""yes; then : |
067d23c9 KY |
10880 | cat >>confdefs.h <<_ACEOF |
10881 | #define HAVE_GTK_FILE_SELECTION_NEW 1 | |
10882 | _ACEOF | |
10883 | ||
10884 | fi | |
10885 | done | |
10886 | ||
10887 | fi | |
10888 | ||
10889 | HAVE_GTK_AND_PTHREAD=no | |
10890 | for ac_header in pthread.h | |
10891 | do : | |
10892 | ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default" | |
5f64f7bd | 10893 | if test "x$ac_cv_header_pthread_h" = x""yes; then : |
067d23c9 KY |
10894 | cat >>confdefs.h <<_ACEOF |
10895 | #define HAVE_PTHREAD_H 1 | |
10896 | _ACEOF | |
10897 | ||
10898 | fi | |
10899 | ||
10900 | done | |
10901 | ||
10902 | if test "$ac_cv_header_pthread_h"; then | |
10903 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_self in -lpthread" >&5 | |
10904 | $as_echo_n "checking for pthread_self in -lpthread... " >&6; } | |
5f64f7bd | 10905 | if test "${ac_cv_lib_pthread_pthread_self+set}" = set; then : |
067d23c9 KY |
10906 | $as_echo_n "(cached) " >&6 |
10907 | else | |
10908 | ac_check_lib_save_LIBS=$LIBS | |
10909 | LIBS="-lpthread $LIBS" | |
10910 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10911 | /* end confdefs.h. */ | |
10912 | ||
10913 | /* Override any GCC internal prototype to avoid an error. | |
10914 | Use char because int might match the return type of a GCC | |
10915 | builtin and then its argument prototype would still apply. */ | |
10916 | #ifdef __cplusplus | |
10917 | extern "C" | |
10918 | #endif | |
10919 | char pthread_self (); | |
10920 | int | |
10921 | main () | |
10922 | { | |
10923 | return pthread_self (); | |
10924 | ; | |
10925 | return 0; | |
10926 | } | |
10927 | _ACEOF | |
10928 | if ac_fn_c_try_link "$LINENO"; then : | |
10929 | ac_cv_lib_pthread_pthread_self=yes | |
10930 | else | |
10931 | ac_cv_lib_pthread_pthread_self=no | |
10932 | fi | |
10933 | rm -f core conftest.err conftest.$ac_objext \ | |
10934 | conftest$ac_exeext conftest.$ac_ext | |
10935 | LIBS=$ac_check_lib_save_LIBS | |
10936 | fi | |
10937 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_self" >&5 | |
10938 | $as_echo "$ac_cv_lib_pthread_pthread_self" >&6; } | |
5f64f7bd | 10939 | if test "x$ac_cv_lib_pthread_pthread_self" = x""yes; then : |
067d23c9 KY |
10940 | HAVE_GTK_AND_PTHREAD=yes |
10941 | fi | |
10942 | ||
10943 | fi | |
10944 | if test "$HAVE_GTK_AND_PTHREAD" = yes; then | |
10945 | case "${canonical}" in | |
10946 | *-hpux*) ;; | |
10947 | *) GTK_LIBS="$GTK_LIBS -lpthread" ;; | |
10948 | esac | |
10949 | ||
10950 | $as_echo "#define HAVE_GTK_AND_PTHREAD 1" >>confdefs.h | |
10951 | ||
10952 | fi | |
10953 | ||
10954 | for ac_func in gtk_widget_get_window gtk_widget_set_has_window \ | |
10955 | gtk_dialog_get_action_area gtk_widget_get_sensitive \ | |
10956 | gtk_widget_get_mapped gtk_adjustment_get_page_size \ | |
10957 | gtk_orientable_set_orientation | |
10958 | do : | |
10959 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
10960 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
5f64f7bd GM |
10961 | eval as_val=\$$as_ac_var |
10962 | if test "x$as_val" = x""yes; then : | |
067d23c9 KY |
10963 | cat >>confdefs.h <<_ACEOF |
10964 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
10965 | _ACEOF | |
10966 | ||
10967 | fi | |
10968 | done | |
10969 | ||
10970 | ||
10971 | fi | |
10972 | ||
10973 | HAVE_DBUS=no | |
10974 | DBUS_OBJ= | |
10975 | if test "${with_dbus}" = "yes"; then | |
10976 | ||
10977 | succeeded=no | |
10978 | ||
10979 | # Extract the first word of "pkg-config", so it can be a program name with args. | |
10980 | set dummy pkg-config; ac_word=$2 | |
10981 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
10982 | $as_echo_n "checking for $ac_word... " >&6; } | |
5f64f7bd | 10983 | if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : |
067d23c9 KY |
10984 | $as_echo_n "(cached) " >&6 |
10985 | else | |
10986 | case $PKG_CONFIG in | |
10987 | [\\/]* | ?:[\\/]*) | |
10988 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
10989 | ;; | |
10990 | *) | |
10991 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
10992 | for as_dir in $PATH | |
10993 | do | |
10994 | IFS=$as_save_IFS | |
10995 | test -z "$as_dir" && as_dir=. | |
10996 | for ac_exec_ext in '' $ac_executable_extensions; do | |
10997 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
10998 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
10999 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
11000 | break 2 | |
11001 | fi | |
11002 | done | |
11003 | done | |
11004 | IFS=$as_save_IFS | |
11005 | ||
11006 | test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" | |
11007 | ;; | |
11008 | esac | |
11009 | fi | |
11010 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG | |
11011 | if test -n "$PKG_CONFIG"; then | |
11012 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
11013 | $as_echo "$PKG_CONFIG" >&6; } | |
11014 | else | |
11015 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
11016 | $as_echo "no" >&6; } | |
11017 | fi | |
11018 | ||
11019 | ||
11020 | ||
11021 | if test "$PKG_CONFIG" = "no" ; then | |
11022 | HAVE_DBUS=no | |
11023 | else | |
11024 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
11025 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
11026 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbus-1 >= 1.0" >&5 | |
11027 | $as_echo_n "checking for dbus-1 >= 1.0... " >&6; } | |
11028 | ||
11029 | if $PKG_CONFIG --exists "dbus-1 >= 1.0" 2>&5; then | |
11030 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
11031 | $as_echo "yes" >&6; } | |
11032 | succeeded=yes | |
11033 | ||
11034 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking DBUS_CFLAGS" >&5 | |
11035 | $as_echo_n "checking DBUS_CFLAGS... " >&6; } | |
11036 | DBUS_CFLAGS=`$PKG_CONFIG --cflags "dbus-1 >= 1.0"|sed -e 's,///*,/,g'` | |
11037 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBUS_CFLAGS" >&5 | |
11038 | $as_echo "$DBUS_CFLAGS" >&6; } | |
11039 | ||
11040 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking DBUS_LIBS" >&5 | |
11041 | $as_echo_n "checking DBUS_LIBS... " >&6; } | |
11042 | DBUS_LIBS=`$PKG_CONFIG --libs "dbus-1 >= 1.0"|sed -e 's,///*,/,g'` | |
11043 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBUS_LIBS" >&5 | |
11044 | $as_echo "$DBUS_LIBS" >&6; } | |
11045 | else | |
11046 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
11047 | $as_echo "no" >&6; } | |
11048 | DBUS_CFLAGS="" | |
11049 | DBUS_LIBS="" | |
11050 | ## If we have a custom action on failure, don't print errors, but | |
11051 | ## do set a variable so people can do so. | |
11052 | DBUS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "dbus-1 >= 1.0"` | |
11053 | ||
11054 | fi | |
11055 | ||
11056 | ||
11057 | ||
11058 | else | |
11059 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
11060 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
11061 | fi | |
11062 | fi | |
11063 | ||
11064 | if test $succeeded = yes; then | |
11065 | HAVE_DBUS=yes | |
11066 | else | |
11067 | HAVE_DBUS=no | |
11068 | fi | |
11069 | ||
11070 | if test "$HAVE_DBUS" = yes; then | |
11071 | LIBS="$LIBS $DBUS_LIBS" | |
11072 | ||
11073 | $as_echo "#define HAVE_DBUS 1" >>confdefs.h | |
11074 | ||
11075 | for ac_func in dbus_watch_get_unix_fd | |
11076 | do : | |
11077 | ac_fn_c_check_func "$LINENO" "dbus_watch_get_unix_fd" "ac_cv_func_dbus_watch_get_unix_fd" | |
5f64f7bd | 11078 | if test "x$ac_cv_func_dbus_watch_get_unix_fd" = x""yes; then : |
067d23c9 KY |
11079 | cat >>confdefs.h <<_ACEOF |
11080 | #define HAVE_DBUS_WATCH_GET_UNIX_FD 1 | |
11081 | _ACEOF | |
11082 | ||
11083 | fi | |
11084 | done | |
11085 | ||
11086 | DBUS_OBJ=dbusbind.o | |
11087 | fi | |
11088 | fi | |
11089 | ||
11090 | ||
f527bd02 GM |
11091 | HAVE_GSETTINGS=no |
11092 | if test "${HAVE_X11}" = "yes" && test "${with_gsettings}" = "yes"; then | |
11093 | ||
11094 | succeeded=no | |
11095 | ||
11096 | # Extract the first word of "pkg-config", so it can be a program name with args. | |
11097 | set dummy pkg-config; ac_word=$2 | |
11098 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
11099 | $as_echo_n "checking for $ac_word... " >&6; } | |
11100 | if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : | |
11101 | $as_echo_n "(cached) " >&6 | |
11102 | else | |
11103 | case $PKG_CONFIG in | |
11104 | [\\/]* | ?:[\\/]*) | |
11105 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
11106 | ;; | |
11107 | *) | |
11108 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
11109 | for as_dir in $PATH | |
11110 | do | |
11111 | IFS=$as_save_IFS | |
11112 | test -z "$as_dir" && as_dir=. | |
11113 | for ac_exec_ext in '' $ac_executable_extensions; do | |
11114 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
11115 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
11116 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
11117 | break 2 | |
11118 | fi | |
11119 | done | |
11120 | done | |
11121 | IFS=$as_save_IFS | |
11122 | ||
11123 | test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" | |
11124 | ;; | |
11125 | esac | |
11126 | fi | |
11127 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG | |
11128 | if test -n "$PKG_CONFIG"; then | |
11129 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
11130 | $as_echo "$PKG_CONFIG" >&6; } | |
11131 | else | |
11132 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
11133 | $as_echo "no" >&6; } | |
11134 | fi | |
11135 | ||
11136 | ||
11137 | ||
11138 | if test "$PKG_CONFIG" = "no" ; then | |
11139 | HAVE_GSETTINGS=no | |
11140 | else | |
11141 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
11142 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
11143 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for glib-2.0 >= 2.26" >&5 | |
11144 | $as_echo_n "checking for glib-2.0 >= 2.26... " >&6; } | |
11145 | ||
11146 | if $PKG_CONFIG --exists "glib-2.0 >= 2.26" 2>&5; then | |
11147 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
11148 | $as_echo "yes" >&6; } | |
11149 | succeeded=yes | |
11150 | ||
11151 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking GSETTINGS_CFLAGS" >&5 | |
11152 | $as_echo_n "checking GSETTINGS_CFLAGS... " >&6; } | |
11153 | GSETTINGS_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= 2.26"|sed -e 's,///*,/,g'` | |
11154 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GSETTINGS_CFLAGS" >&5 | |
11155 | $as_echo "$GSETTINGS_CFLAGS" >&6; } | |
11156 | ||
11157 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking GSETTINGS_LIBS" >&5 | |
11158 | $as_echo_n "checking GSETTINGS_LIBS... " >&6; } | |
11159 | GSETTINGS_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= 2.26"|sed -e 's,///*,/,g'` | |
11160 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GSETTINGS_LIBS" >&5 | |
11161 | $as_echo "$GSETTINGS_LIBS" >&6; } | |
11162 | else | |
11163 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
11164 | $as_echo "no" >&6; } | |
11165 | GSETTINGS_CFLAGS="" | |
11166 | GSETTINGS_LIBS="" | |
11167 | ## If we have a custom action on failure, don't print errors, but | |
11168 | ## do set a variable so people can do so. | |
11169 | GSETTINGS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "glib-2.0 >= 2.26"` | |
11170 | ||
11171 | fi | |
11172 | ||
11173 | ||
11174 | ||
11175 | else | |
11176 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
11177 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
11178 | fi | |
11179 | fi | |
11180 | ||
11181 | if test $succeeded = yes; then | |
11182 | HAVE_GSETTINGS=yes | |
11183 | else | |
11184 | HAVE_GSETTINGS=no | |
11185 | fi | |
11186 | ||
11187 | if test "$HAVE_GSETTINGS" = "yes"; then | |
11188 | ||
11189 | $as_echo "#define HAVE_GSETTINGS 1" >>confdefs.h | |
11190 | ||
11191 | SETTINGS_CFLAGS="$GSETTINGS_CFLAGS" | |
11192 | SETTINGS_LIBS="$GSETTINGS_LIBS" | |
11193 | fi | |
11194 | fi | |
11195 | ||
067d23c9 | 11196 | HAVE_GCONF=no |
17410582 | 11197 | if test "${HAVE_X11}" = "yes" && test "${with_gconf}" = "yes"; then |
067d23c9 KY |
11198 | |
11199 | succeeded=no | |
11200 | ||
11201 | # Extract the first word of "pkg-config", so it can be a program name with args. | |
11202 | set dummy pkg-config; ac_word=$2 | |
11203 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
11204 | $as_echo_n "checking for $ac_word... " >&6; } | |
5f64f7bd | 11205 | if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : |
067d23c9 KY |
11206 | $as_echo_n "(cached) " >&6 |
11207 | else | |
11208 | case $PKG_CONFIG in | |
11209 | [\\/]* | ?:[\\/]*) | |
11210 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
11211 | ;; | |
11212 | *) | |
11213 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
11214 | for as_dir in $PATH | |
11215 | do | |
11216 | IFS=$as_save_IFS | |
11217 | test -z "$as_dir" && as_dir=. | |
11218 | for ac_exec_ext in '' $ac_executable_extensions; do | |
11219 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
11220 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
11221 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
11222 | break 2 | |
11223 | fi | |
11224 | done | |
11225 | done | |
11226 | IFS=$as_save_IFS | |
11227 | ||
11228 | test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" | |
11229 | ;; | |
11230 | esac | |
11231 | fi | |
11232 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG | |
11233 | if test -n "$PKG_CONFIG"; then | |
11234 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
11235 | $as_echo "$PKG_CONFIG" >&6; } | |
11236 | else | |
11237 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
11238 | $as_echo "no" >&6; } | |
11239 | fi | |
11240 | ||
11241 | ||
11242 | ||
11243 | if test "$PKG_CONFIG" = "no" ; then | |
11244 | HAVE_GCONF=no | |
11245 | else | |
11246 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
11247 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
11248 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gconf-2.0 >= 2.13" >&5 | |
11249 | $as_echo_n "checking for gconf-2.0 >= 2.13... " >&6; } | |
11250 | ||
11251 | if $PKG_CONFIG --exists "gconf-2.0 >= 2.13" 2>&5; then | |
11252 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
11253 | $as_echo "yes" >&6; } | |
11254 | succeeded=yes | |
11255 | ||
11256 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking GCONF_CFLAGS" >&5 | |
11257 | $as_echo_n "checking GCONF_CFLAGS... " >&6; } | |
11258 | GCONF_CFLAGS=`$PKG_CONFIG --cflags "gconf-2.0 >= 2.13"|sed -e 's,///*,/,g'` | |
11259 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCONF_CFLAGS" >&5 | |
11260 | $as_echo "$GCONF_CFLAGS" >&6; } | |
11261 | ||
11262 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking GCONF_LIBS" >&5 | |
11263 | $as_echo_n "checking GCONF_LIBS... " >&6; } | |
11264 | GCONF_LIBS=`$PKG_CONFIG --libs "gconf-2.0 >= 2.13"|sed -e 's,///*,/,g'` | |
11265 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCONF_LIBS" >&5 | |
11266 | $as_echo "$GCONF_LIBS" >&6; } | |
11267 | else | |
11268 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
11269 | $as_echo "no" >&6; } | |
11270 | GCONF_CFLAGS="" | |
11271 | GCONF_LIBS="" | |
11272 | ## If we have a custom action on failure, don't print errors, but | |
11273 | ## do set a variable so people can do so. | |
11274 | GCONF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gconf-2.0 >= 2.13"` | |
11275 | ||
11276 | fi | |
11277 | ||
11278 | ||
11279 | ||
11280 | else | |
11281 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
11282 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
11283 | fi | |
11284 | fi | |
11285 | ||
11286 | if test $succeeded = yes; then | |
11287 | HAVE_GCONF=yes | |
11288 | else | |
11289 | HAVE_GCONF=no | |
11290 | fi | |
11291 | ||
11292 | if test "$HAVE_GCONF" = yes; then | |
11293 | ||
11294 | $as_echo "#define HAVE_GCONF 1" >>confdefs.h | |
11295 | ||
17410582 GM |
11296 | SETTINGS_CFLAGS="$SETTINGS_CFLAGS $GCONF_CFLAGS" |
11297 | SETTINGS_LIBS="$SETTINGS_LIBS $GCONF_LIBS" | |
f527bd02 GM |
11298 | fi |
11299 | fi | |
11300 | ||
11301 | if test "$HAVE_GSETTINGS" = "yes" || test "$HAVE_GCONF" = "yes"; then | |
11302 | SAVE_CFLAGS="$CFLAGS" | |
11303 | SAVE_LDFLAGS="$LDFLAGS" | |
11304 | CFLAGS="$SETTINGS_CFLAGS $CFLAGS" | |
11305 | LDFLAGS="$SETTINGS_LIBS $LDFLAGS" | |
11306 | for ac_func in g_type_init | |
067d23c9 KY |
11307 | do : |
11308 | ac_fn_c_check_func "$LINENO" "g_type_init" "ac_cv_func_g_type_init" | |
5f64f7bd | 11309 | if test "x$ac_cv_func_g_type_init" = x""yes; then : |
067d23c9 KY |
11310 | cat >>confdefs.h <<_ACEOF |
11311 | #define HAVE_G_TYPE_INIT 1 | |
11312 | _ACEOF | |
11313 | ||
11314 | fi | |
11315 | done | |
11316 | ||
f527bd02 GM |
11317 | CFLAGS="$SAVE_CFLAGS" |
11318 | LDFLAGS="$SAVE_LDFLAGS" | |
067d23c9 KY |
11319 | fi |
11320 | ||
f527bd02 GM |
11321 | |
11322 | ||
11323 | ||
067d23c9 KY |
11324 | HAVE_LIBSELINUX=no |
11325 | LIBSELINUX_LIBS= | |
11326 | if test "${with_selinux}" = "yes"; then | |
11327 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lgetfilecon in -lselinux" >&5 | |
11328 | $as_echo_n "checking for lgetfilecon in -lselinux... " >&6; } | |
5f64f7bd | 11329 | if test "${ac_cv_lib_selinux_lgetfilecon+set}" = set; then : |
067d23c9 KY |
11330 | $as_echo_n "(cached) " >&6 |
11331 | else | |
11332 | ac_check_lib_save_LIBS=$LIBS | |
11333 | LIBS="-lselinux $LIBS" | |
11334 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11335 | /* end confdefs.h. */ | |
11336 | ||
11337 | /* Override any GCC internal prototype to avoid an error. | |
11338 | Use char because int might match the return type of a GCC | |
11339 | builtin and then its argument prototype would still apply. */ | |
11340 | #ifdef __cplusplus | |
11341 | extern "C" | |
11342 | #endif | |
11343 | char lgetfilecon (); | |
11344 | int | |
11345 | main () | |
11346 | { | |
11347 | return lgetfilecon (); | |
11348 | ; | |
11349 | return 0; | |
11350 | } | |
11351 | _ACEOF | |
11352 | if ac_fn_c_try_link "$LINENO"; then : | |
11353 | ac_cv_lib_selinux_lgetfilecon=yes | |
11354 | else | |
11355 | ac_cv_lib_selinux_lgetfilecon=no | |
11356 | fi | |
11357 | rm -f core conftest.err conftest.$ac_objext \ | |
11358 | conftest$ac_exeext conftest.$ac_ext | |
11359 | LIBS=$ac_check_lib_save_LIBS | |
11360 | fi | |
11361 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_lgetfilecon" >&5 | |
11362 | $as_echo "$ac_cv_lib_selinux_lgetfilecon" >&6; } | |
5f64f7bd | 11363 | if test "x$ac_cv_lib_selinux_lgetfilecon" = x""yes; then : |
067d23c9 KY |
11364 | HAVE_LIBSELINUX=yes |
11365 | else | |
11366 | HAVE_LIBSELINUX=no | |
11367 | fi | |
11368 | ||
11369 | if test "$HAVE_LIBSELINUX" = yes; then | |
11370 | ||
11371 | $as_echo "#define HAVE_LIBSELINUX 1" >>confdefs.h | |
11372 | ||
11373 | LIBSELINUX_LIBS=-lselinux | |
11374 | fi | |
11375 | fi | |
11376 | ||
11377 | ||
11378 | HAVE_GNUTLS=no | |
e7d4e61f | 11379 | HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY=no |
067d23c9 KY |
11380 | if test "${with_gnutls}" = "yes" ; then |
11381 | ||
11382 | succeeded=no | |
11383 | ||
11384 | # Extract the first word of "pkg-config", so it can be a program name with args. | |
11385 | set dummy pkg-config; ac_word=$2 | |
11386 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
11387 | $as_echo_n "checking for $ac_word... " >&6; } | |
5f64f7bd | 11388 | if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : |
067d23c9 KY |
11389 | $as_echo_n "(cached) " >&6 |
11390 | else | |
11391 | case $PKG_CONFIG in | |
11392 | [\\/]* | ?:[\\/]*) | |
11393 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
11394 | ;; | |
11395 | *) | |
11396 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
11397 | for as_dir in $PATH | |
11398 | do | |
11399 | IFS=$as_save_IFS | |
11400 | test -z "$as_dir" && as_dir=. | |
11401 | for ac_exec_ext in '' $ac_executable_extensions; do | |
11402 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
11403 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
11404 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
11405 | break 2 | |
11406 | fi | |
11407 | done | |
11408 | done | |
11409 | IFS=$as_save_IFS | |
11410 | ||
11411 | test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" | |
11412 | ;; | |
11413 | esac | |
11414 | fi | |
11415 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG | |
11416 | if test -n "$PKG_CONFIG"; then | |
11417 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
11418 | $as_echo "$PKG_CONFIG" >&6; } | |
11419 | else | |
11420 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
11421 | $as_echo "no" >&6; } | |
11422 | fi | |
11423 | ||
11424 | ||
11425 | ||
11426 | if test "$PKG_CONFIG" = "no" ; then | |
11427 | HAVE_GNUTLS=no | |
11428 | else | |
11429 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
11430 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
b8bd6c8d GM |
11431 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gnutls >= 2.6.0" >&5 |
11432 | $as_echo_n "checking for gnutls >= 2.6.0... " >&6; } | |
067d23c9 | 11433 | |
b8bd6c8d | 11434 | if $PKG_CONFIG --exists "gnutls >= 2.6.0" 2>&5; then |
067d23c9 KY |
11435 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
11436 | $as_echo "yes" >&6; } | |
11437 | succeeded=yes | |
11438 | ||
11439 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBGNUTLS_CFLAGS" >&5 | |
11440 | $as_echo_n "checking LIBGNUTLS_CFLAGS... " >&6; } | |
b8bd6c8d | 11441 | LIBGNUTLS_CFLAGS=`$PKG_CONFIG --cflags "gnutls >= 2.6.0"|sed -e 's,///*,/,g'` |
067d23c9 KY |
11442 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBGNUTLS_CFLAGS" >&5 |
11443 | $as_echo "$LIBGNUTLS_CFLAGS" >&6; } | |
11444 | ||
11445 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBGNUTLS_LIBS" >&5 | |
11446 | $as_echo_n "checking LIBGNUTLS_LIBS... " >&6; } | |
b8bd6c8d | 11447 | LIBGNUTLS_LIBS=`$PKG_CONFIG --libs "gnutls >= 2.6.0"|sed -e 's,///*,/,g'` |
067d23c9 KY |
11448 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBGNUTLS_LIBS" >&5 |
11449 | $as_echo "$LIBGNUTLS_LIBS" >&6; } | |
11450 | else | |
11451 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
11452 | $as_echo "no" >&6; } | |
11453 | LIBGNUTLS_CFLAGS="" | |
11454 | LIBGNUTLS_LIBS="" | |
11455 | ## If we have a custom action on failure, don't print errors, but | |
11456 | ## do set a variable so people can do so. | |
b8bd6c8d | 11457 | LIBGNUTLS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gnutls >= 2.6.0"` |
067d23c9 KY |
11458 | |
11459 | fi | |
11460 | ||
11461 | ||
11462 | ||
11463 | else | |
11464 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
11465 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
11466 | fi | |
11467 | fi | |
11468 | ||
11469 | if test $succeeded = yes; then | |
11470 | HAVE_GNUTLS=yes | |
11471 | else | |
11472 | HAVE_GNUTLS=no | |
11473 | fi | |
11474 | ||
11475 | if test "${HAVE_GNUTLS}" = "yes"; then | |
11476 | ||
11477 | $as_echo "#define HAVE_GNUTLS 1" >>confdefs.h | |
11478 | ||
11479 | fi | |
e7d4e61f GM |
11480 | |
11481 | CFLAGS="$CFLAGS $LIBGNUTLS_CFLAGS" | |
11482 | LIBS="$LIBGNUTLS_LIBS $LIBS" | |
11483 | for ac_func in gnutls_certificate_set_verify_function | |
11484 | do : | |
11485 | ac_fn_c_check_func "$LINENO" "gnutls_certificate_set_verify_function" "ac_cv_func_gnutls_certificate_set_verify_function" | |
11486 | if test "x$ac_cv_func_gnutls_certificate_set_verify_function" = x""yes; then : | |
11487 | cat >>confdefs.h <<_ACEOF | |
11488 | #define HAVE_GNUTLS_CERTIFICATE_SET_VERIFY_FUNCTION 1 | |
11489 | _ACEOF | |
11490 | HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY=yes | |
11491 | fi | |
11492 | done | |
11493 | ||
11494 | ||
11495 | if test "${HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY}" = "yes"; then | |
11496 | ||
11497 | $as_echo "#define HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY 1" >>confdefs.h | |
11498 | ||
11499 | fi | |
067d23c9 KY |
11500 | fi |
11501 | ||
11502 | ||
11503 | ||
e7d4e61f | 11504 | |
067d23c9 KY |
11505 | HAVE_XAW3D=no |
11506 | LUCID_LIBW= | |
11507 | if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then | |
11508 | if test "$with_xaw3d" != no; then | |
11509 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xaw3d" >&5 | |
11510 | $as_echo_n "checking for xaw3d... " >&6; } | |
5f64f7bd | 11511 | if test "${emacs_cv_xaw3d+set}" = set; then : |
067d23c9 KY |
11512 | $as_echo_n "(cached) " >&6 |
11513 | else | |
11514 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11515 | /* end confdefs.h. */ | |
11516 | ||
11517 | #include <X11/Intrinsic.h> | |
11518 | #include <X11/Xaw3d/Simple.h> | |
11519 | int | |
11520 | main () | |
11521 | { | |
11522 | ||
11523 | ; | |
11524 | return 0; | |
11525 | } | |
11526 | _ACEOF | |
11527 | if ac_fn_c_try_link "$LINENO"; then : | |
14beddf4 CY |
11528 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XawScrollbarSetThumb in -lXaw3d" >&5 |
11529 | $as_echo_n "checking for XawScrollbarSetThumb in -lXaw3d... " >&6; } | |
5f64f7bd | 11530 | if test "${ac_cv_lib_Xaw3d_XawScrollbarSetThumb+set}" = set; then : |
ae1362a3 AS |
11531 | $as_echo_n "(cached) " >&6 |
11532 | else | |
11533 | ac_check_lib_save_LIBS=$LIBS | |
14beddf4 | 11534 | LIBS="-lXaw3d $LIBS" |
ae1362a3 AS |
11535 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
11536 | /* end confdefs.h. */ | |
bf89cb4d | 11537 | |
ae1362a3 AS |
11538 | /* Override any GCC internal prototype to avoid an error. |
11539 | Use char because int might match the return type of a GCC | |
11540 | builtin and then its argument prototype would still apply. */ | |
11541 | #ifdef __cplusplus | |
11542 | extern "C" | |
11543 | #endif | |
14beddf4 | 11544 | char XawScrollbarSetThumb (); |
ae1362a3 AS |
11545 | int |
11546 | main () | |
11547 | { | |
14beddf4 | 11548 | return XawScrollbarSetThumb (); |
ae1362a3 AS |
11549 | ; |
11550 | return 0; | |
11551 | } | |
11552 | _ACEOF | |
11553 | if ac_fn_c_try_link "$LINENO"; then : | |
14beddf4 | 11554 | ac_cv_lib_Xaw3d_XawScrollbarSetThumb=yes |
ae1362a3 | 11555 | else |
14beddf4 | 11556 | ac_cv_lib_Xaw3d_XawScrollbarSetThumb=no |
ae1362a3 AS |
11557 | fi |
11558 | rm -f core conftest.err conftest.$ac_objext \ | |
11559 | conftest$ac_exeext conftest.$ac_ext | |
11560 | LIBS=$ac_check_lib_save_LIBS | |
11561 | fi | |
14beddf4 CY |
11562 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&5 |
11563 | $as_echo "$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&6; } | |
5f64f7bd | 11564 | if test "x$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" = x""yes; then : |
067d23c9 KY |
11565 | emacs_cv_xaw3d=yes |
11566 | else | |
11567 | emacs_cv_xaw3d=no | |
11568 | fi | |
14beddf4 CY |
11569 | |
11570 | else | |
11571 | emacs_cv_xaw3d=no | |
11572 | fi | |
067d23c9 KY |
11573 | rm -f core conftest.err conftest.$ac_objext \ |
11574 | conftest$ac_exeext conftest.$ac_ext | |
11575 | fi | |
11576 | ||
11577 | else | |
11578 | emacs_cv_xaw3d=no | |
11579 | fi | |
11580 | if test $emacs_cv_xaw3d = yes; then | |
11581 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5 | |
11582 | $as_echo "yes; using Lucid toolkit" >&6; } | |
11583 | USE_X_TOOLKIT=LUCID | |
11584 | HAVE_XAW3D=yes | |
11585 | LUCID_LIBW=-lXaw3d | |
11586 | ||
11587 | $as_echo "#define HAVE_XAW3D 1" >>confdefs.h | |
11588 | ||
11589 | else | |
11590 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
11591 | $as_echo "no" >&6; } | |
11592 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libXaw" >&5 | |
11593 | $as_echo_n "checking for libXaw... " >&6; } | |
5f64f7bd | 11594 | if test "${emacs_cv_xaw+set}" = set; then : |
067d23c9 KY |
11595 | $as_echo_n "(cached) " >&6 |
11596 | else | |
11597 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11598 | /* end confdefs.h. */ | |
11599 | ||
11600 | #include <X11/Intrinsic.h> | |
11601 | #include <X11/Xaw/Simple.h> | |
11602 | int | |
11603 | main () | |
11604 | { | |
11605 | ||
11606 | ; | |
11607 | return 0; | |
11608 | } | |
11609 | _ACEOF | |
11610 | if ac_fn_c_try_link "$LINENO"; then : | |
11611 | emacs_cv_xaw=yes | |
11612 | else | |
11613 | emacs_cv_xaw=no | |
11614 | fi | |
11615 | rm -f core conftest.err conftest.$ac_objext \ | |
11616 | conftest$ac_exeext conftest.$ac_ext | |
11617 | fi | |
11618 | ||
11619 | if test $emacs_cv_xaw = yes; then | |
11620 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5 | |
11621 | $as_echo "yes; using Lucid toolkit" >&6; } | |
11622 | USE_X_TOOLKIT=LUCID | |
11623 | LUCID_LIBW=-lXaw | |
11624 | elif test x"${USE_X_TOOLKIT}" = xLUCID; then | |
5f64f7bd | 11625 | as_fn_error "Lucid toolkit requires X11/Xaw include files" "$LINENO" 5 |
067d23c9 | 11626 | else |
cf6f3ed8 GM |
11627 | as_fn_error "No X toolkit could be found. |
11628 | If you are sure you want Emacs compiled without an X toolkit, pass | |
11629 | --with-x-toolkit=no | |
11630 | to configure. Otherwise, install the development libraries for the toolkit | |
11631 | that you want to use (e.g. Gtk+) and re-run configure." "$LINENO" 5 | |
067d23c9 KY |
11632 | fi |
11633 | fi | |
11634 | fi | |
11635 | ||
11636 | X_TOOLKIT_TYPE=$USE_X_TOOLKIT | |
11637 | ||
11638 | LIBXTR6= | |
11639 | if test "${USE_X_TOOLKIT}" != "none"; then | |
11640 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 toolkit version" >&5 | |
11641 | $as_echo_n "checking X11 toolkit version... " >&6; } | |
5f64f7bd | 11642 | if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then : |
067d23c9 KY |
11643 | $as_echo_n "(cached) " >&6 |
11644 | else | |
11645 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11646 | /* end confdefs.h. */ | |
11647 | #include <X11/Intrinsic.h> | |
11648 | int | |
11649 | main () | |
11650 | { | |
11651 | #if XtSpecificationRelease < 6 | |
11652 | fail; | |
11653 | #endif | |
11654 | ||
11655 | ; | |
11656 | return 0; | |
11657 | } | |
11658 | _ACEOF | |
11659 | if ac_fn_c_try_link "$LINENO"; then : | |
11660 | emacs_cv_x11_toolkit_version_6=yes | |
11661 | else | |
11662 | emacs_cv_x11_toolkit_version_6=no | |
11663 | fi | |
11664 | rm -f core conftest.err conftest.$ac_objext \ | |
11665 | conftest$ac_exeext conftest.$ac_ext | |
11666 | fi | |
11667 | ||
11668 | HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6 | |
11669 | if test $emacs_cv_x11_toolkit_version_6 = yes; then | |
11670 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5 | |
11671 | $as_echo "6 or newer" >&6; } | |
11672 | ||
11673 | $as_echo "#define HAVE_X11XTR6 1" >>confdefs.h | |
11674 | ||
11675 | LIBXTR6="-lSM -lICE" | |
11676 | case "$opsys" in | |
11677 | ## Use libw.a along with X11R6 Xt. | |
11678 | unixware) LIBXTR6="$LIBXTR6 -lw" ;; | |
11679 | esac | |
11680 | else | |
11681 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5 | |
11682 | $as_echo "before 6" >&6; } | |
11683 | fi | |
11684 | ||
11685 | OLDLIBS="$LIBS" | |
11686 | if test x$HAVE_X11XTR6 = xyes; then | |
11687 | LIBS="-lXt -lSM -lICE $LIBS" | |
11688 | else | |
11689 | LIBS="-lXt $LIBS" | |
11690 | fi | |
11691 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XmuConvertStandardSelection in -lXmu" >&5 | |
11692 | $as_echo_n "checking for XmuConvertStandardSelection in -lXmu... " >&6; } | |
5f64f7bd | 11693 | if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then : |
067d23c9 KY |
11694 | $as_echo_n "(cached) " >&6 |
11695 | else | |
11696 | ac_check_lib_save_LIBS=$LIBS | |
11697 | LIBS="-lXmu $LIBS" | |
11698 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11699 | /* end confdefs.h. */ | |
11700 | ||
11701 | /* Override any GCC internal prototype to avoid an error. | |
11702 | Use char because int might match the return type of a GCC | |
11703 | builtin and then its argument prototype would still apply. */ | |
11704 | #ifdef __cplusplus | |
11705 | extern "C" | |
11706 | #endif | |
11707 | char XmuConvertStandardSelection (); | |
11708 | int | |
11709 | main () | |
11710 | { | |
11711 | return XmuConvertStandardSelection (); | |
11712 | ; | |
11713 | return 0; | |
11714 | } | |
11715 | _ACEOF | |
11716 | if ac_fn_c_try_link "$LINENO"; then : | |
11717 | ac_cv_lib_Xmu_XmuConvertStandardSelection=yes | |
11718 | else | |
11719 | ac_cv_lib_Xmu_XmuConvertStandardSelection=no | |
11720 | fi | |
11721 | rm -f core conftest.err conftest.$ac_objext \ | |
11722 | conftest$ac_exeext conftest.$ac_ext | |
11723 | LIBS=$ac_check_lib_save_LIBS | |
11724 | fi | |
11725 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5 | |
11726 | $as_echo "$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6; } | |
5f64f7bd | 11727 | if test "x$ac_cv_lib_Xmu_XmuConvertStandardSelection" = x""yes; then : |
067d23c9 KY |
11728 | cat >>confdefs.h <<_ACEOF |
11729 | #define HAVE_LIBXMU 1 | |
11730 | _ACEOF | |
11731 | ||
11732 | LIBS="-lXmu $LIBS" | |
11733 | ||
11734 | fi | |
11735 | ||
11736 | test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS" | |
11737 | fi | |
11738 | ||
11739 | ||
11740 | LIBXMU=-lXmu | |
d6a003a8 AS |
11741 | case $opsys in |
11742 | ## These systems don't supply Xmu. | |
067d23c9 KY |
11743 | hpux* | aix4-2 ) |
11744 | test "X$ac_cv_lib_Xmu_XmuConvertStandardSelection" != "Xyes" && LIBXMU= | |
11745 | ;; | |
11746 | esac | |
11747 | ||
11748 | ||
11749 | # On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D. | |
11750 | if test "${HAVE_X11}" = "yes"; then | |
11751 | if test "${USE_X_TOOLKIT}" != "none"; then | |
11752 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XShapeQueryExtension in -lXext" >&5 | |
11753 | $as_echo_n "checking for XShapeQueryExtension in -lXext... " >&6; } | |
5f64f7bd | 11754 | if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then : |
067d23c9 KY |
11755 | $as_echo_n "(cached) " >&6 |
11756 | else | |
11757 | ac_check_lib_save_LIBS=$LIBS | |
11758 | LIBS="-lXext $LIBS" | |
11759 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11760 | /* end confdefs.h. */ | |
11761 | ||
11762 | /* Override any GCC internal prototype to avoid an error. | |
11763 | Use char because int might match the return type of a GCC | |
11764 | builtin and then its argument prototype would still apply. */ | |
11765 | #ifdef __cplusplus | |
11766 | extern "C" | |
11767 | #endif | |
11768 | char XShapeQueryExtension (); | |
11769 | int | |
11770 | main () | |
11771 | { | |
11772 | return XShapeQueryExtension (); | |
11773 | ; | |
11774 | return 0; | |
11775 | } | |
11776 | _ACEOF | |
11777 | if ac_fn_c_try_link "$LINENO"; then : | |
11778 | ac_cv_lib_Xext_XShapeQueryExtension=yes | |
11779 | else | |
11780 | ac_cv_lib_Xext_XShapeQueryExtension=no | |
11781 | fi | |
11782 | rm -f core conftest.err conftest.$ac_objext \ | |
11783 | conftest$ac_exeext conftest.$ac_ext | |
11784 | LIBS=$ac_check_lib_save_LIBS | |
11785 | fi | |
11786 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5 | |
11787 | $as_echo "$ac_cv_lib_Xext_XShapeQueryExtension" >&6; } | |
5f64f7bd | 11788 | if test "x$ac_cv_lib_Xext_XShapeQueryExtension" = x""yes; then : |
067d23c9 KY |
11789 | cat >>confdefs.h <<_ACEOF |
11790 | #define HAVE_LIBXEXT 1 | |
11791 | _ACEOF | |
11792 | ||
11793 | LIBS="-lXext $LIBS" | |
11794 | ||
11795 | fi | |
11796 | ||
11797 | fi | |
11798 | fi | |
11799 | ||
11800 | LIBXP= | |
11801 | if test "${USE_X_TOOLKIT}" = "MOTIF"; then | |
11802 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Motif version 2.1" >&5 | |
11803 | $as_echo_n "checking for Motif version 2.1... " >&6; } | |
5f64f7bd | 11804 | if test "${emacs_cv_motif_version_2_1+set}" = set; then : |
067d23c9 KY |
11805 | $as_echo_n "(cached) " >&6 |
11806 | else | |
11807 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11808 | /* end confdefs.h. */ | |
11809 | #include <Xm/Xm.h> | |
11810 | int | |
11811 | main () | |
11812 | { | |
11813 | #if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1) | |
11814 | int x = 5; | |
11815 | #else | |
11816 | Motif version prior to 2.1. | |
11817 | #endif | |
11818 | ; | |
11819 | return 0; | |
11820 | } | |
11821 | _ACEOF | |
11822 | if ac_fn_c_try_compile "$LINENO"; then : | |
11823 | emacs_cv_motif_version_2_1=yes | |
11824 | else | |
11825 | emacs_cv_motif_version_2_1=no | |
11826 | fi | |
11827 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
11828 | fi | |
11829 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_motif_version_2_1" >&5 | |
11830 | $as_echo "$emacs_cv_motif_version_2_1" >&6; } | |
11831 | if test $emacs_cv_motif_version_2_1 = yes; then | |
11832 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpCreateContext in -lXp" >&5 | |
11833 | $as_echo_n "checking for XpCreateContext in -lXp... " >&6; } | |
5f64f7bd | 11834 | if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then : |
067d23c9 KY |
11835 | $as_echo_n "(cached) " >&6 |
11836 | else | |
11837 | ac_check_lib_save_LIBS=$LIBS | |
11838 | LIBS="-lXp $LIBS" | |
11839 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11840 | /* end confdefs.h. */ | |
11841 | ||
11842 | /* Override any GCC internal prototype to avoid an error. | |
11843 | Use char because int might match the return type of a GCC | |
11844 | builtin and then its argument prototype would still apply. */ | |
11845 | #ifdef __cplusplus | |
11846 | extern "C" | |
11847 | #endif | |
11848 | char XpCreateContext (); | |
11849 | int | |
11850 | main () | |
11851 | { | |
11852 | return XpCreateContext (); | |
11853 | ; | |
11854 | return 0; | |
11855 | } | |
11856 | _ACEOF | |
11857 | if ac_fn_c_try_link "$LINENO"; then : | |
11858 | ac_cv_lib_Xp_XpCreateContext=yes | |
11859 | else | |
11860 | ac_cv_lib_Xp_XpCreateContext=no | |
11861 | fi | |
11862 | rm -f core conftest.err conftest.$ac_objext \ | |
11863 | conftest$ac_exeext conftest.$ac_ext | |
11864 | LIBS=$ac_check_lib_save_LIBS | |
11865 | fi | |
11866 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xp_XpCreateContext" >&5 | |
11867 | $as_echo "$ac_cv_lib_Xp_XpCreateContext" >&6; } | |
5f64f7bd | 11868 | if test "x$ac_cv_lib_Xp_XpCreateContext" = x""yes; then : |
067d23c9 KY |
11869 | LIBXP=-lXp |
11870 | fi | |
11871 | ||
11872 | else | |
11873 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LessTif where some systems put it" >&5 | |
11874 | $as_echo_n "checking for LessTif where some systems put it... " >&6; } | |
5f64f7bd | 11875 | if test "${emacs_cv_lesstif+set}" = set; then : |
067d23c9 KY |
11876 | $as_echo_n "(cached) " >&6 |
11877 | else | |
11878 | # We put this in CFLAGS temporarily to precede other -I options | |
11879 | # that might be in CFLAGS temporarily. | |
11880 | # We put this in CPPFLAGS where it precedes the other -I options. | |
11881 | OLD_CPPFLAGS=$CPPFLAGS | |
11882 | OLD_CFLAGS=$CFLAGS | |
11883 | CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS" | |
11884 | CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS" | |
11885 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11886 | /* end confdefs.h. */ | |
11887 | #include </usr/X11R6/LessTif/Motif1.2/include/Xm/Xm.h> | |
11888 | int | |
11889 | main () | |
11890 | { | |
11891 | int x = 5; | |
11892 | ; | |
11893 | return 0; | |
11894 | } | |
11895 | _ACEOF | |
11896 | if ac_fn_c_try_compile "$LINENO"; then : | |
11897 | emacs_cv_lesstif=yes | |
11898 | else | |
11899 | emacs_cv_lesstif=no | |
11900 | fi | |
11901 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
11902 | fi | |
11903 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_lesstif" >&5 | |
11904 | $as_echo "$emacs_cv_lesstif" >&6; } | |
11905 | if test $emacs_cv_lesstif = yes; then | |
11906 | # Make sure this -I option remains in CPPFLAGS after it is set | |
11907 | # back to REAL_CPPFLAGS. | |
11908 | # There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not | |
11909 | # have those other -I options anyway. Ultimately, having this | |
11910 | # directory ultimately in CPPFLAGS will be enough. | |
11911 | REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS" | |
11912 | LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS" | |
11913 | else | |
11914 | CFLAGS=$OLD_CFLAGS | |
11915 | CPPFLAGS=$OLD_CPPFLAGS | |
11916 | fi | |
11917 | fi | |
11918 | fi | |
11919 | ||
11920 | ||
11921 | USE_TOOLKIT_SCROLL_BARS=no | |
11922 | if test "${with_toolkit_scroll_bars}" != "no"; then | |
11923 | if test "${USE_X_TOOLKIT}" != "none"; then | |
11924 | if test "${USE_X_TOOLKIT}" = "MOTIF"; then | |
11925 | $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h | |
11926 | ||
11927 | HAVE_XAW3D=no | |
11928 | USE_TOOLKIT_SCROLL_BARS=yes | |
11929 | elif test "${HAVE_XAW3D}" = "yes"; then | |
11930 | $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h | |
11931 | ||
11932 | USE_TOOLKIT_SCROLL_BARS=yes | |
11933 | fi | |
11934 | elif test "${HAVE_GTK}" = "yes"; then | |
11935 | $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h | |
11936 | ||
11937 | USE_TOOLKIT_SCROLL_BARS=yes | |
11938 | elif test "${HAVE_NS}" = "yes"; then | |
11939 | $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h | |
11940 | ||
11941 | USE_TOOLKIT_SCROLL_BARS=yes | |
11942 | fi | |
11943 | fi | |
11944 | ||
11945 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11946 | /* end confdefs.h. */ | |
11947 | ||
11948 | #include <X11/Xlib.h> | |
11949 | #include <X11/Xresource.h> | |
11950 | int | |
11951 | main () | |
11952 | { | |
11953 | XIMProc callback; | |
11954 | ; | |
11955 | return 0; | |
11956 | } | |
11957 | _ACEOF | |
11958 | if ac_fn_c_try_compile "$LINENO"; then : | |
11959 | HAVE_XIM=yes | |
11960 | ||
11961 | $as_echo "#define HAVE_XIM 1" >>confdefs.h | |
11962 | ||
11963 | else | |
11964 | HAVE_XIM=no | |
11965 | fi | |
11966 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
11967 | ||
11968 | ||
11969 | if test "${with_xim}" != "no"; then | |
11970 | ||
11971 | $as_echo "#define USE_XIM 1" >>confdefs.h | |
11972 | ||
11973 | fi | |
11974 | ||
11975 | ||
11976 | if test "${HAVE_XIM}" != "no"; then | |
11977 | late_CFLAGS=$CFLAGS | |
11978 | if test "$GCC" = yes; then | |
11979 | CFLAGS="$CFLAGS --pedantic-errors" | |
11980 | fi | |
11981 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11982 | /* end confdefs.h. */ | |
11983 | ||
11984 | #include <X11/Xlib.h> | |
11985 | #include <X11/Xresource.h> | |
11986 | int | |
11987 | main () | |
11988 | { | |
11989 | Display *display; | |
11990 | XrmDatabase db; | |
11991 | char *res_name; | |
11992 | char *res_class; | |
11993 | XIMProc callback; | |
11994 | XPointer *client_data; | |
11995 | #ifndef __GNUC__ | |
11996 | /* If we're not using GCC, it's probably not XFree86, and this is | |
11997 | probably right, but we can't use something like --pedantic-errors. */ | |
11998 | extern Bool XRegisterIMInstantiateCallback(Display*, XrmDatabase, char*, | |
11999 | char*, XIMProc, XPointer*); | |
12000 | #endif | |
12001 | (void)XRegisterIMInstantiateCallback(display, db, res_name, res_class, callback, | |
12002 | client_data); | |
12003 | ; | |
12004 | return 0; | |
12005 | } | |
12006 | _ACEOF | |
12007 | if ac_fn_c_try_compile "$LINENO"; then : | |
12008 | emacs_cv_arg6_star=yes | |
12009 | fi | |
12010 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
12011 | if test "$emacs_cv_arg6_star" = yes; then | |
12012 | $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer*" >>confdefs.h | |
12013 | ||
12014 | else | |
12015 | $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer" >>confdefs.h | |
12016 | ||
12017 | fi | |
12018 | CFLAGS=$late_CFLAGS | |
12019 | fi | |
12020 | ||
12021 | ### Start of font-backend (under any platform) section. | |
12022 | # (nothing here yet -- this is a placeholder) | |
12023 | ### End of font-backend (under any platform) section. | |
12024 | ||
12025 | ### Start of font-backend (under X11) section. | |
12026 | if test "${HAVE_X11}" = "yes"; then | |
12027 | ||
12028 | succeeded=no | |
12029 | ||
12030 | # Extract the first word of "pkg-config", so it can be a program name with args. | |
12031 | set dummy pkg-config; ac_word=$2 | |
12032 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
12033 | $as_echo_n "checking for $ac_word... " >&6; } | |
5f64f7bd | 12034 | if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : |
067d23c9 KY |
12035 | $as_echo_n "(cached) " >&6 |
12036 | else | |
12037 | case $PKG_CONFIG in | |
12038 | [\\/]* | ?:[\\/]*) | |
12039 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
12040 | ;; | |
12041 | *) | |
12042 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
12043 | for as_dir in $PATH | |
12044 | do | |
12045 | IFS=$as_save_IFS | |
12046 | test -z "$as_dir" && as_dir=. | |
12047 | for ac_exec_ext in '' $ac_executable_extensions; do | |
12048 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
12049 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
12050 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
12051 | break 2 | |
12052 | fi | |
12053 | done | |
12054 | done | |
12055 | IFS=$as_save_IFS | |
12056 | ||
12057 | test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" | |
12058 | ;; | |
12059 | esac | |
12060 | fi | |
12061 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG | |
12062 | if test -n "$PKG_CONFIG"; then | |
12063 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
12064 | $as_echo "$PKG_CONFIG" >&6; } | |
12065 | else | |
12066 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
12067 | $as_echo "no" >&6; } | |
12068 | fi | |
12069 | ||
12070 | ||
12071 | ||
12072 | if test "$PKG_CONFIG" = "no" ; then | |
12073 | HAVE_FC=no | |
12074 | else | |
12075 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
12076 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
12077 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fontconfig >= 2.2.0" >&5 | |
12078 | $as_echo_n "checking for fontconfig >= 2.2.0... " >&6; } | |
12079 | ||
12080 | if $PKG_CONFIG --exists "fontconfig >= 2.2.0" 2>&5; then | |
12081 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
12082 | $as_echo "yes" >&6; } | |
12083 | succeeded=yes | |
12084 | ||
12085 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking FONTCONFIG_CFLAGS" >&5 | |
12086 | $as_echo_n "checking FONTCONFIG_CFLAGS... " >&6; } | |
12087 | FONTCONFIG_CFLAGS=`$PKG_CONFIG --cflags "fontconfig >= 2.2.0"|sed -e 's,///*,/,g'` | |
12088 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FONTCONFIG_CFLAGS" >&5 | |
12089 | $as_echo "$FONTCONFIG_CFLAGS" >&6; } | |
12090 | ||
12091 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking FONTCONFIG_LIBS" >&5 | |
12092 | $as_echo_n "checking FONTCONFIG_LIBS... " >&6; } | |
12093 | FONTCONFIG_LIBS=`$PKG_CONFIG --libs "fontconfig >= 2.2.0"|sed -e 's,///*,/,g'` | |
12094 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FONTCONFIG_LIBS" >&5 | |
12095 | $as_echo "$FONTCONFIG_LIBS" >&6; } | |
12096 | else | |
12097 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
12098 | $as_echo "no" >&6; } | |
12099 | FONTCONFIG_CFLAGS="" | |
12100 | FONTCONFIG_LIBS="" | |
12101 | ## If we have a custom action on failure, don't print errors, but | |
12102 | ## do set a variable so people can do so. | |
12103 | FONTCONFIG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "fontconfig >= 2.2.0"` | |
12104 | ||
12105 | fi | |
12106 | ||
12107 | ||
12108 | ||
12109 | else | |
12110 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
12111 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
12112 | fi | |
12113 | fi | |
12114 | ||
12115 | if test $succeeded = yes; then | |
12116 | HAVE_FC=yes | |
12117 | else | |
12118 | HAVE_FC=no | |
12119 | fi | |
12120 | ||
12121 | ||
12122 | ## Use -lXft if available, unless `--with-xft=no'. | |
12123 | HAVE_XFT=maybe | |
12124 | if test "${HAVE_FC}" = "no" || test "x${with_x}" = "xno"; then | |
12125 | with_xft="no"; | |
12126 | fi | |
12127 | if test "x${with_xft}" != "xno"; then | |
12128 | ||
12129 | ||
12130 | succeeded=no | |
12131 | ||
12132 | # Extract the first word of "pkg-config", so it can be a program name with args. | |
12133 | set dummy pkg-config; ac_word=$2 | |
12134 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
12135 | $as_echo_n "checking for $ac_word... " >&6; } | |
5f64f7bd | 12136 | if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : |
067d23c9 KY |
12137 | $as_echo_n "(cached) " >&6 |
12138 | else | |
12139 | case $PKG_CONFIG in | |
12140 | [\\/]* | ?:[\\/]*) | |
12141 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
12142 | ;; | |
12143 | *) | |
12144 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
12145 | for as_dir in $PATH | |
12146 | do | |
12147 | IFS=$as_save_IFS | |
12148 | test -z "$as_dir" && as_dir=. | |
12149 | for ac_exec_ext in '' $ac_executable_extensions; do | |
12150 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
12151 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
12152 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
12153 | break 2 | |
12154 | fi | |
12155 | done | |
12156 | done | |
12157 | IFS=$as_save_IFS | |
12158 | ||
12159 | test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" | |
12160 | ;; | |
12161 | esac | |
12162 | fi | |
12163 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG | |
12164 | if test -n "$PKG_CONFIG"; then | |
12165 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
12166 | $as_echo "$PKG_CONFIG" >&6; } | |
12167 | else | |
12168 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
12169 | $as_echo "no" >&6; } | |
12170 | fi | |
12171 | ||
12172 | ||
12173 | ||
12174 | if test "$PKG_CONFIG" = "no" ; then | |
12175 | HAVE_XFT=no | |
12176 | else | |
12177 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
12178 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
12179 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xft >= 0.13.0" >&5 | |
12180 | $as_echo_n "checking for xft >= 0.13.0... " >&6; } | |
12181 | ||
12182 | if $PKG_CONFIG --exists "xft >= 0.13.0" 2>&5; then | |
12183 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
12184 | $as_echo "yes" >&6; } | |
12185 | succeeded=yes | |
12186 | ||
12187 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking XFT_CFLAGS" >&5 | |
12188 | $as_echo_n "checking XFT_CFLAGS... " >&6; } | |
12189 | XFT_CFLAGS=`$PKG_CONFIG --cflags "xft >= 0.13.0"|sed -e 's,///*,/,g'` | |
12190 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XFT_CFLAGS" >&5 | |
12191 | $as_echo "$XFT_CFLAGS" >&6; } | |
12192 | ||
12193 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking XFT_LIBS" >&5 | |
12194 | $as_echo_n "checking XFT_LIBS... " >&6; } | |
12195 | XFT_LIBS=`$PKG_CONFIG --libs "xft >= 0.13.0"|sed -e 's,///*,/,g'` | |
12196 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XFT_LIBS" >&5 | |
12197 | $as_echo "$XFT_LIBS" >&6; } | |
12198 | else | |
12199 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
12200 | $as_echo "no" >&6; } | |
12201 | XFT_CFLAGS="" | |
12202 | XFT_LIBS="" | |
12203 | ## If we have a custom action on failure, don't print errors, but | |
12204 | ## do set a variable so people can do so. | |
12205 | XFT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xft >= 0.13.0"` | |
12206 | ||
12207 | fi | |
12208 | ||
12209 | ||
12210 | ||
12211 | else | |
12212 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
12213 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
12214 | fi | |
12215 | fi | |
12216 | ||
12217 | if test $succeeded = yes; then | |
12218 | : | |
12219 | else | |
12220 | HAVE_XFT=no | |
12221 | fi | |
12222 | ||
12223 | ## Because xftfont.c uses XRenderQueryExtension, we also | |
12224 | ## need to link to -lXrender. | |
12225 | HAVE_XRENDER=no | |
12226 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRenderQueryExtension in -lXrender" >&5 | |
12227 | $as_echo_n "checking for XRenderQueryExtension in -lXrender... " >&6; } | |
5f64f7bd | 12228 | if test "${ac_cv_lib_Xrender_XRenderQueryExtension+set}" = set; then : |
067d23c9 KY |
12229 | $as_echo_n "(cached) " >&6 |
12230 | else | |
12231 | ac_check_lib_save_LIBS=$LIBS | |
12232 | LIBS="-lXrender $LIBS" | |
12233 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12234 | /* end confdefs.h. */ | |
12235 | ||
12236 | /* Override any GCC internal prototype to avoid an error. | |
12237 | Use char because int might match the return type of a GCC | |
12238 | builtin and then its argument prototype would still apply. */ | |
12239 | #ifdef __cplusplus | |
12240 | extern "C" | |
12241 | #endif | |
12242 | char XRenderQueryExtension (); | |
12243 | int | |
12244 | main () | |
12245 | { | |
12246 | return XRenderQueryExtension (); | |
12247 | ; | |
12248 | return 0; | |
12249 | } | |
12250 | _ACEOF | |
12251 | if ac_fn_c_try_link "$LINENO"; then : | |
12252 | ac_cv_lib_Xrender_XRenderQueryExtension=yes | |
12253 | else | |
12254 | ac_cv_lib_Xrender_XRenderQueryExtension=no | |
12255 | fi | |
12256 | rm -f core conftest.err conftest.$ac_objext \ | |
12257 | conftest$ac_exeext conftest.$ac_ext | |
12258 | LIBS=$ac_check_lib_save_LIBS | |
12259 | fi | |
12260 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrender_XRenderQueryExtension" >&5 | |
12261 | $as_echo "$ac_cv_lib_Xrender_XRenderQueryExtension" >&6; } | |
5f64f7bd | 12262 | if test "x$ac_cv_lib_Xrender_XRenderQueryExtension" = x""yes; then : |
067d23c9 KY |
12263 | HAVE_XRENDER=yes |
12264 | fi | |
12265 | ||
12266 | if test "$HAVE_XFT" != no && test "$HAVE_XRENDER" != no; then | |
12267 | OLD_CPPFLAGS="$CPPFLAGS" | |
12268 | OLD_CFLAGS="$CFLAGS" | |
12269 | OLD_LIBS="$LIBS" | |
12270 | CPPFLAGS="$CPPFLAGS $XFT_CFLAGS" | |
12271 | CFLAGS="$CFLAGS $XFT_CFLAGS" | |
12272 | XFT_LIBS="-lXrender $XFT_LIBS" | |
12273 | LIBS="$XFT_LIBS $LIBS" | |
12274 | ac_fn_c_check_header_mongrel "$LINENO" "X11/Xft/Xft.h" "ac_cv_header_X11_Xft_Xft_h" "$ac_includes_default" | |
5f64f7bd | 12275 | if test "x$ac_cv_header_X11_Xft_Xft_h" = x""yes; then : |
067d23c9 KY |
12276 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XftFontOpen in -lXft" >&5 |
12277 | $as_echo_n "checking for XftFontOpen in -lXft... " >&6; } | |
5f64f7bd | 12278 | if test "${ac_cv_lib_Xft_XftFontOpen+set}" = set; then : |
067d23c9 KY |
12279 | $as_echo_n "(cached) " >&6 |
12280 | else | |
12281 | ac_check_lib_save_LIBS=$LIBS | |
12282 | LIBS="-lXft $XFT_LIBS $LIBS" | |
12283 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12284 | /* end confdefs.h. */ | |
12285 | ||
12286 | /* Override any GCC internal prototype to avoid an error. | |
12287 | Use char because int might match the return type of a GCC | |
12288 | builtin and then its argument prototype would still apply. */ | |
12289 | #ifdef __cplusplus | |
12290 | extern "C" | |
12291 | #endif | |
12292 | char XftFontOpen (); | |
12293 | int | |
12294 | main () | |
12295 | { | |
12296 | return XftFontOpen (); | |
12297 | ; | |
12298 | return 0; | |
12299 | } | |
12300 | _ACEOF | |
12301 | if ac_fn_c_try_link "$LINENO"; then : | |
12302 | ac_cv_lib_Xft_XftFontOpen=yes | |
12303 | else | |
12304 | ac_cv_lib_Xft_XftFontOpen=no | |
12305 | fi | |
12306 | rm -f core conftest.err conftest.$ac_objext \ | |
12307 | conftest$ac_exeext conftest.$ac_ext | |
12308 | LIBS=$ac_check_lib_save_LIBS | |
12309 | fi | |
12310 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xft_XftFontOpen" >&5 | |
12311 | $as_echo "$ac_cv_lib_Xft_XftFontOpen" >&6; } | |
5f64f7bd | 12312 | if test "x$ac_cv_lib_Xft_XftFontOpen" = x""yes; then : |
067d23c9 KY |
12313 | HAVE_XFT=yes |
12314 | fi | |
12315 | ||
12316 | fi | |
12317 | ||
12318 | ||
12319 | ||
12320 | if test "${HAVE_XFT}" = "yes"; then | |
12321 | ||
12322 | $as_echo "#define HAVE_XFT 1" >>confdefs.h | |
12323 | ||
12324 | ||
12325 | C_SWITCH_X_SITE="$C_SWITCH_X_SITE $XFT_CFLAGS" | |
12326 | else | |
12327 | CPPFLAGS="$OLD_CPPFLAGS" | |
12328 | CFLAGS="$OLD_CFLAGS" | |
12329 | LIBS="$OLD_LIBS" | |
12330 | fi # "${HAVE_XFT}" = "yes" | |
12331 | fi # "$HAVE_XFT" != no | |
12332 | fi # "x${with_xft}" != "xno" | |
12333 | ||
067d23c9 KY |
12334 | ## We used to allow building with FreeType and without Xft. |
12335 | ## However, the ftx font backend driver is not in good shape. | |
7834125e GM |
12336 | if test "$HAVE_XFT" != "yes"; then |
12337 | HAVE_XFT=no | |
12338 | HAVE_FREETYPE=no | |
12339 | else | |
12340 | ||
12341 | succeeded=no | |
12342 | ||
12343 | # Extract the first word of "pkg-config", so it can be a program name with args. | |
12344 | set dummy pkg-config; ac_word=$2 | |
12345 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
12346 | $as_echo_n "checking for $ac_word... " >&6; } | |
5f64f7bd | 12347 | if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : |
7834125e GM |
12348 | $as_echo_n "(cached) " >&6 |
12349 | else | |
12350 | case $PKG_CONFIG in | |
12351 | [\\/]* | ?:[\\/]*) | |
12352 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
12353 | ;; | |
12354 | *) | |
12355 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
12356 | for as_dir in $PATH | |
12357 | do | |
12358 | IFS=$as_save_IFS | |
12359 | test -z "$as_dir" && as_dir=. | |
12360 | for ac_exec_ext in '' $ac_executable_extensions; do | |
12361 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
12362 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
12363 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
12364 | break 2 | |
12365 | fi | |
12366 | done | |
12367 | done | |
12368 | IFS=$as_save_IFS | |
12369 | ||
12370 | test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" | |
12371 | ;; | |
12372 | esac | |
12373 | fi | |
12374 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG | |
12375 | if test -n "$PKG_CONFIG"; then | |
12376 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
12377 | $as_echo "$PKG_CONFIG" >&6; } | |
12378 | else | |
12379 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
12380 | $as_echo "no" >&6; } | |
12381 | fi | |
12382 | ||
12383 | ||
12384 | ||
12385 | if test "$PKG_CONFIG" = "no" ; then | |
12386 | HAVE_FREETYPE=no | |
12387 | else | |
12388 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
12389 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
12390 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype2" >&5 | |
12391 | $as_echo_n "checking for freetype2... " >&6; } | |
12392 | ||
12393 | if $PKG_CONFIG --exists "freetype2" 2>&5; then | |
12394 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
12395 | $as_echo "yes" >&6; } | |
12396 | succeeded=yes | |
12397 | ||
12398 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking FREETYPE_CFLAGS" >&5 | |
12399 | $as_echo_n "checking FREETYPE_CFLAGS... " >&6; } | |
12400 | FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2"|sed -e 's,///*,/,g'` | |
12401 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_CFLAGS" >&5 | |
12402 | $as_echo "$FREETYPE_CFLAGS" >&6; } | |
12403 | ||
12404 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking FREETYPE_LIBS" >&5 | |
12405 | $as_echo_n "checking FREETYPE_LIBS... " >&6; } | |
12406 | FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2"|sed -e 's,///*,/,g'` | |
12407 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIBS" >&5 | |
12408 | $as_echo "$FREETYPE_LIBS" >&6; } | |
12409 | else | |
12410 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
12411 | $as_echo "no" >&6; } | |
12412 | FREETYPE_CFLAGS="" | |
12413 | FREETYPE_LIBS="" | |
12414 | ## If we have a custom action on failure, don't print errors, but | |
12415 | ## do set a variable so people can do so. | |
12416 | FREETYPE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "freetype2"` | |
12417 | ||
12418 | fi | |
12419 | ||
12420 | ||
12421 | ||
12422 | else | |
12423 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
12424 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
12425 | fi | |
12426 | fi | |
12427 | ||
12428 | if test $succeeded = yes; then | |
12429 | HAVE_FREETYPE=yes | |
12430 | else | |
12431 | HAVE_FREETYPE=no | |
12432 | fi | |
12433 | ||
12434 | ||
5f64f7bd | 12435 | test "$HAVE_FREETYPE" = "no" && as_fn_error "libxft requires libfreetype" "$LINENO" 5 |
7834125e | 12436 | fi |
067d23c9 KY |
12437 | |
12438 | HAVE_LIBOTF=no | |
12439 | if test "${HAVE_FREETYPE}" = "yes"; then | |
12440 | ||
12441 | $as_echo "#define HAVE_FREETYPE 1" >>confdefs.h | |
12442 | ||
12443 | if test "${with_libotf}" != "no"; then | |
12444 | ||
12445 | succeeded=no | |
12446 | ||
12447 | # Extract the first word of "pkg-config", so it can be a program name with args. | |
12448 | set dummy pkg-config; ac_word=$2 | |
12449 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
12450 | $as_echo_n "checking for $ac_word... " >&6; } | |
5f64f7bd | 12451 | if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : |
067d23c9 KY |
12452 | $as_echo_n "(cached) " >&6 |
12453 | else | |
12454 | case $PKG_CONFIG in | |
12455 | [\\/]* | ?:[\\/]*) | |
12456 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
12457 | ;; | |
12458 | *) | |
12459 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
12460 | for as_dir in $PATH | |
12461 | do | |
12462 | IFS=$as_save_IFS | |
12463 | test -z "$as_dir" && as_dir=. | |
12464 | for ac_exec_ext in '' $ac_executable_extensions; do | |
12465 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
12466 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
12467 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
12468 | break 2 | |
12469 | fi | |
12470 | done | |
12471 | done | |
12472 | IFS=$as_save_IFS | |
12473 | ||
12474 | test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" | |
12475 | ;; | |
12476 | esac | |
12477 | fi | |
12478 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG | |
12479 | if test -n "$PKG_CONFIG"; then | |
12480 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
12481 | $as_echo "$PKG_CONFIG" >&6; } | |
12482 | else | |
12483 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
12484 | $as_echo "no" >&6; } | |
12485 | fi | |
12486 | ||
12487 | ||
12488 | ||
12489 | if test "$PKG_CONFIG" = "no" ; then | |
12490 | HAVE_LIBOTF=no | |
12491 | else | |
12492 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
12493 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
12494 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libotf" >&5 | |
12495 | $as_echo_n "checking for libotf... " >&6; } | |
12496 | ||
12497 | if $PKG_CONFIG --exists "libotf" 2>&5; then | |
12498 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
12499 | $as_echo "yes" >&6; } | |
12500 | succeeded=yes | |
12501 | ||
12502 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBOTF_CFLAGS" >&5 | |
12503 | $as_echo_n "checking LIBOTF_CFLAGS... " >&6; } | |
12504 | LIBOTF_CFLAGS=`$PKG_CONFIG --cflags "libotf"|sed -e 's,///*,/,g'` | |
12505 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBOTF_CFLAGS" >&5 | |
12506 | $as_echo "$LIBOTF_CFLAGS" >&6; } | |
12507 | ||
12508 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBOTF_LIBS" >&5 | |
12509 | $as_echo_n "checking LIBOTF_LIBS... " >&6; } | |
12510 | LIBOTF_LIBS=`$PKG_CONFIG --libs "libotf"|sed -e 's,///*,/,g'` | |
12511 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBOTF_LIBS" >&5 | |
12512 | $as_echo "$LIBOTF_LIBS" >&6; } | |
12513 | else | |
12514 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
12515 | $as_echo "no" >&6; } | |
12516 | LIBOTF_CFLAGS="" | |
12517 | LIBOTF_LIBS="" | |
12518 | ## If we have a custom action on failure, don't print errors, but | |
12519 | ## do set a variable so people can do so. | |
12520 | LIBOTF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libotf"` | |
12521 | ||
12522 | fi | |
12523 | ||
12524 | ||
12525 | ||
12526 | else | |
12527 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
12528 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
12529 | fi | |
12530 | fi | |
12531 | ||
12532 | if test $succeeded = yes; then | |
12533 | HAVE_LIBOTF=yes | |
12534 | else | |
12535 | HAVE_LIBOTF=no | |
12536 | fi | |
12537 | ||
12538 | if test "$HAVE_LIBOTF" = "yes"; then | |
12539 | ||
12540 | $as_echo "#define HAVE_LIBOTF 1" >>confdefs.h | |
12541 | ||
12542 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTF_get_variation_glyphs in -lotf" >&5 | |
12543 | $as_echo_n "checking for OTF_get_variation_glyphs in -lotf... " >&6; } | |
5f64f7bd | 12544 | if test "${ac_cv_lib_otf_OTF_get_variation_glyphs+set}" = set; then : |
067d23c9 KY |
12545 | $as_echo_n "(cached) " >&6 |
12546 | else | |
12547 | ac_check_lib_save_LIBS=$LIBS | |
12548 | LIBS="-lotf $LIBS" | |
12549 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12550 | /* end confdefs.h. */ | |
12551 | ||
12552 | /* Override any GCC internal prototype to avoid an error. | |
12553 | Use char because int might match the return type of a GCC | |
12554 | builtin and then its argument prototype would still apply. */ | |
12555 | #ifdef __cplusplus | |
12556 | extern "C" | |
12557 | #endif | |
12558 | char OTF_get_variation_glyphs (); | |
12559 | int | |
12560 | main () | |
12561 | { | |
12562 | return OTF_get_variation_glyphs (); | |
12563 | ; | |
12564 | return 0; | |
12565 | } | |
12566 | _ACEOF | |
12567 | if ac_fn_c_try_link "$LINENO"; then : | |
12568 | ac_cv_lib_otf_OTF_get_variation_glyphs=yes | |
12569 | else | |
12570 | ac_cv_lib_otf_OTF_get_variation_glyphs=no | |
12571 | fi | |
12572 | rm -f core conftest.err conftest.$ac_objext \ | |
12573 | conftest$ac_exeext conftest.$ac_ext | |
12574 | LIBS=$ac_check_lib_save_LIBS | |
12575 | fi | |
12576 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_otf_OTF_get_variation_glyphs" >&5 | |
12577 | $as_echo "$ac_cv_lib_otf_OTF_get_variation_glyphs" >&6; } | |
5f64f7bd | 12578 | if test "x$ac_cv_lib_otf_OTF_get_variation_glyphs" = x""yes; then : |
067d23c9 KY |
12579 | HAVE_OTF_GET_VARIATION_GLYPHS=yes |
12580 | else | |
12581 | HAVE_OTF_GET_VARIATION_GLYPHS=no | |
12582 | fi | |
12583 | ||
12584 | if test "${HAVE_OTF_GET_VARIATION_GLYPHS}" = "yes"; then | |
12585 | ||
12586 | $as_echo "#define HAVE_OTF_GET_VARIATION_GLYPHS 1" >>confdefs.h | |
12587 | ||
12588 | fi | |
12589 | fi | |
12590 | fi | |
12591 | fi | |
12592 | ||
12593 | HAVE_M17N_FLT=no | |
12594 | if test "${HAVE_LIBOTF}" = yes; then | |
12595 | if test "${with_m17n_flt}" != "no"; then | |
12596 | ||
12597 | succeeded=no | |
12598 | ||
12599 | # Extract the first word of "pkg-config", so it can be a program name with args. | |
12600 | set dummy pkg-config; ac_word=$2 | |
12601 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
12602 | $as_echo_n "checking for $ac_word... " >&6; } | |
5f64f7bd | 12603 | if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : |
067d23c9 KY |
12604 | $as_echo_n "(cached) " >&6 |
12605 | else | |
12606 | case $PKG_CONFIG in | |
12607 | [\\/]* | ?:[\\/]*) | |
12608 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
12609 | ;; | |
12610 | *) | |
12611 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
12612 | for as_dir in $PATH | |
12613 | do | |
12614 | IFS=$as_save_IFS | |
12615 | test -z "$as_dir" && as_dir=. | |
12616 | for ac_exec_ext in '' $ac_executable_extensions; do | |
12617 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
12618 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
12619 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
12620 | break 2 | |
12621 | fi | |
12622 | done | |
12623 | done | |
12624 | IFS=$as_save_IFS | |
12625 | ||
12626 | test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" | |
12627 | ;; | |
12628 | esac | |
12629 | fi | |
12630 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG | |
12631 | if test -n "$PKG_CONFIG"; then | |
12632 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
12633 | $as_echo "$PKG_CONFIG" >&6; } | |
12634 | else | |
12635 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
12636 | $as_echo "no" >&6; } | |
12637 | fi | |
12638 | ||
12639 | ||
12640 | ||
12641 | if test "$PKG_CONFIG" = "no" ; then | |
12642 | HAVE_M17N_FLT=no | |
12643 | else | |
12644 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
12645 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
12646 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for m17n-flt" >&5 | |
12647 | $as_echo_n "checking for m17n-flt... " >&6; } | |
12648 | ||
12649 | if $PKG_CONFIG --exists "m17n-flt" 2>&5; then | |
12650 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
12651 | $as_echo "yes" >&6; } | |
12652 | succeeded=yes | |
12653 | ||
12654 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking M17N_FLT_CFLAGS" >&5 | |
12655 | $as_echo_n "checking M17N_FLT_CFLAGS... " >&6; } | |
12656 | M17N_FLT_CFLAGS=`$PKG_CONFIG --cflags "m17n-flt"|sed -e 's,///*,/,g'` | |
12657 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $M17N_FLT_CFLAGS" >&5 | |
12658 | $as_echo "$M17N_FLT_CFLAGS" >&6; } | |
12659 | ||
12660 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking M17N_FLT_LIBS" >&5 | |
12661 | $as_echo_n "checking M17N_FLT_LIBS... " >&6; } | |
12662 | M17N_FLT_LIBS=`$PKG_CONFIG --libs "m17n-flt"|sed -e 's,///*,/,g'` | |
12663 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $M17N_FLT_LIBS" >&5 | |
12664 | $as_echo "$M17N_FLT_LIBS" >&6; } | |
12665 | else | |
12666 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
12667 | $as_echo "no" >&6; } | |
12668 | M17N_FLT_CFLAGS="" | |
12669 | M17N_FLT_LIBS="" | |
12670 | ## If we have a custom action on failure, don't print errors, but | |
12671 | ## do set a variable so people can do so. | |
12672 | M17N_FLT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "m17n-flt"` | |
12673 | ||
12674 | fi | |
12675 | ||
12676 | ||
12677 | ||
12678 | else | |
12679 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
12680 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
12681 | fi | |
12682 | fi | |
12683 | ||
12684 | if test $succeeded = yes; then | |
12685 | HAVE_M17N_FLT=yes | |
12686 | else | |
12687 | HAVE_M17N_FLT=no | |
12688 | fi | |
12689 | ||
12690 | if test "$HAVE_M17N_FLT" = "yes"; then | |
12691 | ||
12692 | $as_echo "#define HAVE_M17N_FLT 1" >>confdefs.h | |
12693 | ||
12694 | fi | |
12695 | fi | |
12696 | fi | |
12697 | else | |
12698 | HAVE_XFT=no | |
12699 | HAVE_FREETYPE=no | |
12700 | HAVE_LIBOTF=no | |
12701 | HAVE_M17N_FLT=no | |
12702 | fi | |
12703 | ||
12704 | ### End of font-backend (under X11) section. | |
12705 | ||
12706 | ||
12707 | ||
12708 | ||
12709 | ||
12710 | ||
12711 | ||
12712 | ||
12713 | ||
12714 | ||
12715 | ### Use -lXpm if available, unless `--with-xpm=no'. | |
12716 | HAVE_XPM=no | |
12717 | LIBXPM= | |
12718 | if test "${HAVE_X11}" = "yes"; then | |
12719 | if test "${with_xpm}" != "no"; then | |
12720 | ac_fn_c_check_header_mongrel "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "$ac_includes_default" | |
5f64f7bd | 12721 | if test "x$ac_cv_header_X11_xpm_h" = x""yes; then : |
067d23c9 KY |
12722 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReadFileToPixmap in -lXpm" >&5 |
12723 | $as_echo_n "checking for XpmReadFileToPixmap in -lXpm... " >&6; } | |
5f64f7bd | 12724 | if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then : |
067d23c9 KY |
12725 | $as_echo_n "(cached) " >&6 |
12726 | else | |
12727 | ac_check_lib_save_LIBS=$LIBS | |
12728 | LIBS="-lXpm -lX11 $LIBS" | |
12729 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12730 | /* end confdefs.h. */ | |
12731 | ||
12732 | /* Override any GCC internal prototype to avoid an error. | |
12733 | Use char because int might match the return type of a GCC | |
12734 | builtin and then its argument prototype would still apply. */ | |
12735 | #ifdef __cplusplus | |
12736 | extern "C" | |
12737 | #endif | |
12738 | char XpmReadFileToPixmap (); | |
12739 | int | |
12740 | main () | |
12741 | { | |
12742 | return XpmReadFileToPixmap (); | |
12743 | ; | |
12744 | return 0; | |
12745 | } | |
12746 | _ACEOF | |
12747 | if ac_fn_c_try_link "$LINENO"; then : | |
12748 | ac_cv_lib_Xpm_XpmReadFileToPixmap=yes | |
12749 | else | |
12750 | ac_cv_lib_Xpm_XpmReadFileToPixmap=no | |
12751 | fi | |
12752 | rm -f core conftest.err conftest.$ac_objext \ | |
12753 | conftest$ac_exeext conftest.$ac_ext | |
12754 | LIBS=$ac_check_lib_save_LIBS | |
12755 | fi | |
12756 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5 | |
12757 | $as_echo "$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6; } | |
5f64f7bd | 12758 | if test "x$ac_cv_lib_Xpm_XpmReadFileToPixmap" = x""yes; then : |
067d23c9 KY |
12759 | HAVE_XPM=yes |
12760 | fi | |
12761 | ||
12762 | fi | |
12763 | ||
12764 | ||
12765 | if test "${HAVE_XPM}" = "yes"; then | |
12766 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReturnAllocPixels preprocessor define" >&5 | |
12767 | $as_echo_n "checking for XpmReturnAllocPixels preprocessor define... " >&6; } | |
12768 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12769 | /* end confdefs.h. */ | |
12770 | #include "X11/xpm.h" | |
12771 | #ifndef XpmReturnAllocPixels | |
12772 | no_return_alloc_pixels | |
12773 | #endif | |
12774 | ||
12775 | _ACEOF | |
12776 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
12777 | $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then : | |
12778 | HAVE_XPM=no | |
12779 | else | |
12780 | HAVE_XPM=yes | |
12781 | fi | |
12782 | rm -f conftest* | |
12783 | ||
12784 | ||
12785 | if test "${HAVE_XPM}" = "yes"; then | |
12786 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
12787 | $as_echo "yes" >&6; } | |
12788 | else | |
12789 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
12790 | $as_echo "no" >&6; } | |
12791 | fi | |
12792 | fi | |
12793 | fi | |
12794 | ||
12795 | if test "${HAVE_XPM}" = "yes"; then | |
12796 | ||
12797 | $as_echo "#define HAVE_XPM 1" >>confdefs.h | |
12798 | ||
12799 | LIBXPM=-lXpm | |
12800 | fi | |
12801 | fi | |
12802 | ||
12803 | ||
12804 | ### Use -ljpeg if available, unless `--with-jpeg=no'. | |
12805 | HAVE_JPEG=no | |
12806 | LIBJPEG= | |
12807 | if test "${HAVE_X11}" = "yes"; then | |
12808 | if test "${with_jpeg}" != "no"; then | |
12809 | ac_fn_c_check_header_mongrel "$LINENO" "jerror.h" "ac_cv_header_jerror_h" "$ac_includes_default" | |
5f64f7bd | 12810 | if test "x$ac_cv_header_jerror_h" = x""yes; then : |
067d23c9 KY |
12811 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_destroy_compress in -ljpeg" >&5 |
12812 | $as_echo_n "checking for jpeg_destroy_compress in -ljpeg... " >&6; } | |
5f64f7bd | 12813 | if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then : |
067d23c9 KY |
12814 | $as_echo_n "(cached) " >&6 |
12815 | else | |
12816 | ac_check_lib_save_LIBS=$LIBS | |
12817 | LIBS="-ljpeg $LIBS" | |
12818 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12819 | /* end confdefs.h. */ | |
12820 | ||
12821 | /* Override any GCC internal prototype to avoid an error. | |
12822 | Use char because int might match the return type of a GCC | |
12823 | builtin and then its argument prototype would still apply. */ | |
12824 | #ifdef __cplusplus | |
12825 | extern "C" | |
12826 | #endif | |
12827 | char jpeg_destroy_compress (); | |
12828 | int | |
12829 | main () | |
12830 | { | |
12831 | return jpeg_destroy_compress (); | |
12832 | ; | |
12833 | return 0; | |
12834 | } | |
12835 | _ACEOF | |
12836 | if ac_fn_c_try_link "$LINENO"; then : | |
12837 | ac_cv_lib_jpeg_jpeg_destroy_compress=yes | |
12838 | else | |
12839 | ac_cv_lib_jpeg_jpeg_destroy_compress=no | |
12840 | fi | |
12841 | rm -f core conftest.err conftest.$ac_objext \ | |
12842 | conftest$ac_exeext conftest.$ac_ext | |
12843 | LIBS=$ac_check_lib_save_LIBS | |
12844 | fi | |
12845 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5 | |
12846 | $as_echo "$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6; } | |
5f64f7bd | 12847 | if test "x$ac_cv_lib_jpeg_jpeg_destroy_compress" = x""yes; then : |
067d23c9 KY |
12848 | HAVE_JPEG=yes |
12849 | fi | |
12850 | ||
12851 | fi | |
12852 | ||
12853 | ||
12854 | fi | |
12855 | ||
12856 | if test "${HAVE_JPEG}" = "yes"; then | |
12857 | $as_echo "#define HAVE_JPEG 1" >>confdefs.h | |
12858 | ||
12859 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12860 | /* end confdefs.h. */ | |
12861 | #include <jpeglib.h> | |
12862 | version=JPEG_LIB_VERSION | |
12863 | ||
12864 | _ACEOF | |
12865 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
12866 | $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then : | |
12867 | $as_echo "#define HAVE_JPEG 1" >>confdefs.h | |
12868 | ||
12869 | else | |
12870 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libjpeg found, but not version 6b or later" >&5 | |
12871 | $as_echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;} | |
12872 | HAVE_JPEG=no | |
12873 | fi | |
12874 | rm -f conftest* | |
12875 | ||
12876 | fi | |
12877 | if test "${HAVE_JPEG}" = "yes"; then | |
12878 | LIBJPEG=-ljpeg | |
12879 | fi | |
12880 | fi | |
12881 | ||
12882 | ||
12883 | ### Use -lpng if available, unless `--with-png=no'. | |
12884 | HAVE_PNG=no | |
12885 | LIBPNG= | |
12886 | if test "${HAVE_X11}" = "yes"; then | |
12887 | if test "${with_png}" != "no"; then | |
12888 | # Debian unstable as of July 2003 has multiple libpngs, and puts png.h | |
12889 | # in /usr/include/libpng. | |
12890 | for ac_header in png.h libpng/png.h | |
12891 | do : | |
12892 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
12893 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
5f64f7bd GM |
12894 | eval as_val=\$$as_ac_Header |
12895 | if test "x$as_val" = x""yes; then : | |
067d23c9 KY |
12896 | cat >>confdefs.h <<_ACEOF |
12897 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
12898 | _ACEOF | |
12899 | ||
12900 | fi | |
12901 | ||
12902 | done | |
12903 | ||
12904 | if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then | |
12905 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_get_channels in -lpng" >&5 | |
12906 | $as_echo_n "checking for png_get_channels in -lpng... " >&6; } | |
5f64f7bd | 12907 | if test "${ac_cv_lib_png_png_get_channels+set}" = set; then : |
067d23c9 KY |
12908 | $as_echo_n "(cached) " >&6 |
12909 | else | |
12910 | ac_check_lib_save_LIBS=$LIBS | |
12911 | LIBS="-lpng -lz -lm $LIBS" | |
12912 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12913 | /* end confdefs.h. */ | |
12914 | ||
12915 | /* Override any GCC internal prototype to avoid an error. | |
12916 | Use char because int might match the return type of a GCC | |
12917 | builtin and then its argument prototype would still apply. */ | |
12918 | #ifdef __cplusplus | |
12919 | extern "C" | |
12920 | #endif | |
12921 | char png_get_channels (); | |
12922 | int | |
12923 | main () | |
12924 | { | |
12925 | return png_get_channels (); | |
12926 | ; | |
12927 | return 0; | |
12928 | } | |
12929 | _ACEOF | |
12930 | if ac_fn_c_try_link "$LINENO"; then : | |
12931 | ac_cv_lib_png_png_get_channels=yes | |
12932 | else | |
12933 | ac_cv_lib_png_png_get_channels=no | |
12934 | fi | |
12935 | rm -f core conftest.err conftest.$ac_objext \ | |
12936 | conftest$ac_exeext conftest.$ac_ext | |
12937 | LIBS=$ac_check_lib_save_LIBS | |
12938 | fi | |
12939 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_png_png_get_channels" >&5 | |
12940 | $as_echo "$ac_cv_lib_png_png_get_channels" >&6; } | |
5f64f7bd | 12941 | if test "x$ac_cv_lib_png_png_get_channels" = x""yes; then : |
067d23c9 KY |
12942 | HAVE_PNG=yes |
12943 | fi | |
12944 | ||
12945 | fi | |
12946 | fi | |
12947 | ||
12948 | if test "${HAVE_PNG}" = "yes"; then | |
12949 | ||
12950 | $as_echo "#define HAVE_PNG 1" >>confdefs.h | |
12951 | ||
12952 | LIBPNG="-lpng -lz -lm" | |
12953 | fi | |
12954 | fi | |
12955 | ||
12956 | ||
12957 | ### Use -ltiff if available, unless `--with-tiff=no'. | |
12958 | HAVE_TIFF=no | |
12959 | LIBTIFF= | |
12960 | if test "${HAVE_X11}" = "yes"; then | |
12961 | if test "${with_tiff}" != "no"; then | |
12962 | ac_fn_c_check_header_mongrel "$LINENO" "tiffio.h" "ac_cv_header_tiffio_h" "$ac_includes_default" | |
5f64f7bd | 12963 | if test "x$ac_cv_header_tiffio_h" = x""yes; then : |
067d23c9 KY |
12964 | tifflibs="-lz -lm" |
12965 | # At least one tiff package requires the jpeg library. | |
12966 | if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi | |
12967 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIFFGetVersion in -ltiff" >&5 | |
12968 | $as_echo_n "checking for TIFFGetVersion in -ltiff... " >&6; } | |
5f64f7bd | 12969 | if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then : |
067d23c9 KY |
12970 | $as_echo_n "(cached) " >&6 |
12971 | else | |
12972 | ac_check_lib_save_LIBS=$LIBS | |
12973 | LIBS="-ltiff $tifflibs $LIBS" | |
12974 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12975 | /* end confdefs.h. */ | |
12976 | ||
12977 | /* Override any GCC internal prototype to avoid an error. | |
12978 | Use char because int might match the return type of a GCC | |
12979 | builtin and then its argument prototype would still apply. */ | |
12980 | #ifdef __cplusplus | |
12981 | extern "C" | |
12982 | #endif | |
12983 | char TIFFGetVersion (); | |
12984 | int | |
12985 | main () | |
12986 | { | |
12987 | return TIFFGetVersion (); | |
12988 | ; | |
12989 | return 0; | |
12990 | } | |
12991 | _ACEOF | |
12992 | if ac_fn_c_try_link "$LINENO"; then : | |
12993 | ac_cv_lib_tiff_TIFFGetVersion=yes | |
12994 | else | |
12995 | ac_cv_lib_tiff_TIFFGetVersion=no | |
12996 | fi | |
12997 | rm -f core conftest.err conftest.$ac_objext \ | |
12998 | conftest$ac_exeext conftest.$ac_ext | |
12999 | LIBS=$ac_check_lib_save_LIBS | |
13000 | fi | |
13001 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5 | |
13002 | $as_echo "$ac_cv_lib_tiff_TIFFGetVersion" >&6; } | |
5f64f7bd | 13003 | if test "x$ac_cv_lib_tiff_TIFFGetVersion" = x""yes; then : |
067d23c9 KY |
13004 | HAVE_TIFF=yes |
13005 | fi | |
13006 | ||
13007 | fi | |
13008 | ||
13009 | ||
13010 | fi | |
13011 | ||
13012 | if test "${HAVE_TIFF}" = "yes"; then | |
13013 | ||
13014 | $as_echo "#define HAVE_TIFF 1" >>confdefs.h | |
13015 | ||
13016 | LIBTIFF=-ltiff | |
13017 | fi | |
13018 | fi | |
13019 | ||
13020 | ||
13021 | ### Use -lgif or -lungif if available, unless `--with-gif=no'. | |
13022 | HAVE_GIF=no | |
13023 | LIBGIF= | |
13024 | if test "${HAVE_X11}" = "yes" && test "${with_gif}" != "no"; then | |
13025 | ac_fn_c_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default" | |
5f64f7bd | 13026 | if test "x$ac_cv_header_gif_lib_h" = x""yes; then : |
067d23c9 KY |
13027 | # EGifPutExtensionLast only exists from version libungif-4.1.0b1. |
13028 | # Earlier versions can crash Emacs. | |
13029 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lgif" >&5 | |
13030 | $as_echo_n "checking for EGifPutExtensionLast in -lgif... " >&6; } | |
5f64f7bd | 13031 | if test "${ac_cv_lib_gif_EGifPutExtensionLast+set}" = set; then : |
067d23c9 KY |
13032 | $as_echo_n "(cached) " >&6 |
13033 | else | |
13034 | ac_check_lib_save_LIBS=$LIBS | |
13035 | LIBS="-lgif $LIBS" | |
13036 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13037 | /* end confdefs.h. */ | |
13038 | ||
13039 | /* Override any GCC internal prototype to avoid an error. | |
13040 | Use char because int might match the return type of a GCC | |
13041 | builtin and then its argument prototype would still apply. */ | |
13042 | #ifdef __cplusplus | |
13043 | extern "C" | |
13044 | #endif | |
13045 | char EGifPutExtensionLast (); | |
13046 | int | |
13047 | main () | |
13048 | { | |
13049 | return EGifPutExtensionLast (); | |
13050 | ; | |
13051 | return 0; | |
13052 | } | |
13053 | _ACEOF | |
13054 | if ac_fn_c_try_link "$LINENO"; then : | |
13055 | ac_cv_lib_gif_EGifPutExtensionLast=yes | |
13056 | else | |
13057 | ac_cv_lib_gif_EGifPutExtensionLast=no | |
13058 | fi | |
13059 | rm -f core conftest.err conftest.$ac_objext \ | |
13060 | conftest$ac_exeext conftest.$ac_ext | |
13061 | LIBS=$ac_check_lib_save_LIBS | |
13062 | fi | |
13063 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_EGifPutExtensionLast" >&5 | |
13064 | $as_echo "$ac_cv_lib_gif_EGifPutExtensionLast" >&6; } | |
5f64f7bd | 13065 | if test "x$ac_cv_lib_gif_EGifPutExtensionLast" = x""yes; then : |
067d23c9 KY |
13066 | HAVE_GIF=yes |
13067 | else | |
13068 | HAVE_GIF=maybe | |
13069 | fi | |
13070 | ||
13071 | fi | |
13072 | ||
13073 | ||
13074 | ||
13075 | if test "$HAVE_GIF" = yes; then | |
13076 | LIBGIF=-lgif | |
13077 | elif test "$HAVE_GIF" = maybe; then | |
13078 | # If gif_lib.h but no libgif, try libungif. | |
13079 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lungif" >&5 | |
13080 | $as_echo_n "checking for EGifPutExtensionLast in -lungif... " >&6; } | |
5f64f7bd | 13081 | if test "${ac_cv_lib_ungif_EGifPutExtensionLast+set}" = set; then : |
067d23c9 KY |
13082 | $as_echo_n "(cached) " >&6 |
13083 | else | |
13084 | ac_check_lib_save_LIBS=$LIBS | |
13085 | LIBS="-lungif $LIBS" | |
13086 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13087 | /* end confdefs.h. */ | |
13088 | ||
13089 | /* Override any GCC internal prototype to avoid an error. | |
13090 | Use char because int might match the return type of a GCC | |
13091 | builtin and then its argument prototype would still apply. */ | |
13092 | #ifdef __cplusplus | |
13093 | extern "C" | |
13094 | #endif | |
13095 | char EGifPutExtensionLast (); | |
13096 | int | |
13097 | main () | |
13098 | { | |
13099 | return EGifPutExtensionLast (); | |
13100 | ; | |
13101 | return 0; | |
13102 | } | |
13103 | _ACEOF | |
13104 | if ac_fn_c_try_link "$LINENO"; then : | |
13105 | ac_cv_lib_ungif_EGifPutExtensionLast=yes | |
13106 | else | |
13107 | ac_cv_lib_ungif_EGifPutExtensionLast=no | |
13108 | fi | |
13109 | rm -f core conftest.err conftest.$ac_objext \ | |
13110 | conftest$ac_exeext conftest.$ac_ext | |
13111 | LIBS=$ac_check_lib_save_LIBS | |
13112 | fi | |
13113 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5 | |
13114 | $as_echo "$ac_cv_lib_ungif_EGifPutExtensionLast" >&6; } | |
5f64f7bd | 13115 | if test "x$ac_cv_lib_ungif_EGifPutExtensionLast" = x""yes; then : |
067d23c9 KY |
13116 | HAVE_GIF=yes |
13117 | else | |
13118 | HAVE_GIF=no | |
13119 | fi | |
13120 | ||
13121 | test "$HAVE_GIF" = yes && LIBGIF=-lungif | |
13122 | fi | |
13123 | ||
13124 | if test "${HAVE_GIF}" = "yes"; then | |
13125 | ||
13126 | $as_echo "#define HAVE_GIF 1" >>confdefs.h | |
13127 | ||
13128 | fi | |
13129 | fi | |
13130 | ||
13131 | ||
13132 | if test "${HAVE_X11}" = "yes"; then | |
13133 | MISSING="" | |
13134 | WITH_NO="" | |
13135 | test "${with_xpm}" != "no" && test "${HAVE_XPM}" != "yes" && | |
13136 | MISSING="libXpm" && WITH_NO="--with-xpm=no" | |
13137 | test "${with_jpeg}" != "no" && test "${HAVE_JPEG}" != "yes" && | |
13138 | MISSING="$MISSING libjpeg" && WITH_NO="$WITH_NO --with-jpeg=no" | |
13139 | test "${with_png}" != "no" && test "${HAVE_PNG}" != "yes" && | |
13140 | MISSING="$MISSING libpng" && WITH_NO="$WITH_NO --with-png=no" | |
13141 | test "${with_gif}" != "no" && test "${HAVE_GIF}" != "yes" && | |
13142 | MISSING="$MISSING libgif/libungif" && WITH_NO="$WITH_NO --with-gif=no" | |
13143 | test "${with_tiff}" != "no" && test "${HAVE_TIFF}" != "yes" && | |
13144 | MISSING="$MISSING libtiff" && WITH_NO="$WITH_NO --with-tiff=no" | |
13145 | ||
13146 | if test "X${MISSING}" != X; then | |
5f64f7bd | 13147 | as_fn_error "The following required libraries were not found: |
067d23c9 KY |
13148 | $MISSING |
13149 | Maybe some development libraries/packages are missing? | |
13150 | If you don't want to link with them give | |
13151 | $WITH_NO | |
13152 | as options to configure" "$LINENO" 5 | |
13153 | fi | |
13154 | fi | |
13155 | ||
13156 | ### Use -lgpm if available, unless `--with-gpm=no'. | |
13157 | HAVE_GPM=no | |
13158 | LIBGPM= | |
067d23c9 KY |
13159 | if test "${with_gpm}" != "no"; then |
13160 | ac_fn_c_check_header_mongrel "$LINENO" "gpm.h" "ac_cv_header_gpm_h" "$ac_includes_default" | |
5f64f7bd | 13161 | if test "x$ac_cv_header_gpm_h" = x""yes; then : |
067d23c9 KY |
13162 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Gpm_Open in -lgpm" >&5 |
13163 | $as_echo_n "checking for Gpm_Open in -lgpm... " >&6; } | |
5f64f7bd | 13164 | if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then : |
067d23c9 KY |
13165 | $as_echo_n "(cached) " >&6 |
13166 | else | |
13167 | ac_check_lib_save_LIBS=$LIBS | |
13168 | LIBS="-lgpm $LIBS" | |
13169 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13170 | /* end confdefs.h. */ | |
13171 | ||
13172 | /* Override any GCC internal prototype to avoid an error. | |
13173 | Use char because int might match the return type of a GCC | |
13174 | builtin and then its argument prototype would still apply. */ | |
13175 | #ifdef __cplusplus | |
13176 | extern "C" | |
13177 | #endif | |
13178 | char Gpm_Open (); | |
13179 | int | |
13180 | main () | |
13181 | { | |
13182 | return Gpm_Open (); | |
13183 | ; | |
13184 | return 0; | |
13185 | } | |
13186 | _ACEOF | |
13187 | if ac_fn_c_try_link "$LINENO"; then : | |
13188 | ac_cv_lib_gpm_Gpm_Open=yes | |
13189 | else | |
13190 | ac_cv_lib_gpm_Gpm_Open=no | |
13191 | fi | |
13192 | rm -f core conftest.err conftest.$ac_objext \ | |
13193 | conftest$ac_exeext conftest.$ac_ext | |
13194 | LIBS=$ac_check_lib_save_LIBS | |
13195 | fi | |
13196 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gpm_Gpm_Open" >&5 | |
13197 | $as_echo "$ac_cv_lib_gpm_Gpm_Open" >&6; } | |
5f64f7bd | 13198 | if test "x$ac_cv_lib_gpm_Gpm_Open" = x""yes; then : |
067d23c9 KY |
13199 | HAVE_GPM=yes |
13200 | fi | |
13201 | ||
13202 | fi | |
13203 | ||
13204 | ||
13205 | ||
13206 | if test "${HAVE_GPM}" = "yes"; then | |
13207 | ||
13208 | $as_echo "#define HAVE_GPM 1" >>confdefs.h | |
13209 | ||
13210 | LIBGPM=-lgpm | |
067d23c9 KY |
13211 | fi |
13212 | fi | |
13213 | ||
13214 | ||
13215 | ac_fn_c_check_header_mongrel "$LINENO" "malloc/malloc.h" "ac_cv_header_malloc_malloc_h" "$ac_includes_default" | |
5f64f7bd | 13216 | if test "x$ac_cv_header_malloc_malloc_h" = x""yes; then : |
067d23c9 KY |
13217 | |
13218 | $as_echo "#define HAVE_MALLOC_MALLOC_H 1" >>confdefs.h | |
13219 | ||
13220 | fi | |
13221 | ||
13222 | ||
13223 | ||
13224 | C_SWITCH_X_SYSTEM= | |
13225 | ### Use NeXTstep API to implement GUI. | |
13226 | if test "${HAVE_NS}" = "yes"; then | |
13227 | ||
13228 | $as_echo "#define HAVE_NS 1" >>confdefs.h | |
13229 | ||
13230 | if test "${NS_IMPL_COCOA}" = "yes"; then | |
13231 | ||
13232 | $as_echo "#define NS_IMPL_COCOA 1" >>confdefs.h | |
13233 | ||
13234 | GNU_OBJC_CFLAGS= | |
13235 | fi | |
13236 | if test "${NS_IMPL_GNUSTEP}" = "yes"; then | |
13237 | ||
13238 | $as_echo "#define NS_IMPL_GNUSTEP 1" >>confdefs.h | |
13239 | ||
13240 | # See also .m.o rule in Makefile.in */ | |
13241 | # FIXME: are all these flags really needed? Document here why. */ | |
13242 | C_SWITCH_X_SYSTEM="-D_REENTRANT -fPIC -fno-strict-aliasing" | |
13243 | GNU_OBJC_CFLAGS="-fgnu-runtime -Wno-import -fconstant-string-class=NSConstantString -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGSWARN -DGSDIAGNOSE" | |
13244 | fi | |
13245 | if test "${NS_HAVE_NSINTEGER}" = "yes"; then | |
13246 | ||
13247 | $as_echo "#define NS_HAVE_NSINTEGER 1" >>confdefs.h | |
13248 | ||
13249 | fi | |
13250 | # We also have mouse menus. | |
13251 | HAVE_MENUS=yes | |
13252 | OTHER_FILES=ns-app | |
13253 | fi | |
13254 | ||
13255 | ||
13256 | ### Use session management (-lSM -lICE) if available | |
13257 | HAVE_X_SM=no | |
13258 | LIBXSM= | |
13259 | if test "${HAVE_X11}" = "yes"; then | |
13260 | ac_fn_c_check_header_mongrel "$LINENO" "X11/SM/SMlib.h" "ac_cv_header_X11_SM_SMlib_h" "$ac_includes_default" | |
5f64f7bd | 13261 | if test "x$ac_cv_header_X11_SM_SMlib_h" = x""yes; then : |
067d23c9 KY |
13262 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SmcOpenConnection in -lSM" >&5 |
13263 | $as_echo_n "checking for SmcOpenConnection in -lSM... " >&6; } | |
5f64f7bd | 13264 | if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then : |
067d23c9 KY |
13265 | $as_echo_n "(cached) " >&6 |
13266 | else | |
13267 | ac_check_lib_save_LIBS=$LIBS | |
13268 | LIBS="-lSM -lICE $LIBS" | |
13269 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13270 | /* end confdefs.h. */ | |
13271 | ||
13272 | /* Override any GCC internal prototype to avoid an error. | |
13273 | Use char because int might match the return type of a GCC | |
13274 | builtin and then its argument prototype would still apply. */ | |
13275 | #ifdef __cplusplus | |
13276 | extern "C" | |
13277 | #endif | |
13278 | char SmcOpenConnection (); | |
13279 | int | |
13280 | main () | |
13281 | { | |
13282 | return SmcOpenConnection (); | |
13283 | ; | |
13284 | return 0; | |
13285 | } | |
13286 | _ACEOF | |
13287 | if ac_fn_c_try_link "$LINENO"; then : | |
13288 | ac_cv_lib_SM_SmcOpenConnection=yes | |
13289 | else | |
13290 | ac_cv_lib_SM_SmcOpenConnection=no | |
13291 | fi | |
13292 | rm -f core conftest.err conftest.$ac_objext \ | |
13293 | conftest$ac_exeext conftest.$ac_ext | |
13294 | LIBS=$ac_check_lib_save_LIBS | |
13295 | fi | |
13296 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_SM_SmcOpenConnection" >&5 | |
13297 | $as_echo "$ac_cv_lib_SM_SmcOpenConnection" >&6; } | |
5f64f7bd | 13298 | if test "x$ac_cv_lib_SM_SmcOpenConnection" = x""yes; then : |
067d23c9 KY |
13299 | HAVE_X_SM=yes |
13300 | fi | |
13301 | ||
13302 | fi | |
13303 | ||
13304 | ||
13305 | ||
13306 | if test "${HAVE_X_SM}" = "yes"; then | |
13307 | ||
13308 | $as_echo "#define HAVE_X_SM 1" >>confdefs.h | |
13309 | ||
13310 | LIBXSM="-lSM -lICE" | |
13311 | case "$LIBS" in | |
13312 | *-lSM*) ;; | |
13313 | *) LIBS="$LIBXSM $LIBS" ;; | |
13314 | esac | |
13315 | fi | |
13316 | fi | |
13317 | ||
13318 | ||
13319 | ### Use libxml (-lxml2) if available | |
13320 | if test "${with_xml2}" != "no"; then | |
13321 | ### I'm not sure what the version number should be, so I just guessed. | |
13322 | ||
13323 | succeeded=no | |
13324 | ||
13325 | # Extract the first word of "pkg-config", so it can be a program name with args. | |
13326 | set dummy pkg-config; ac_word=$2 | |
13327 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
13328 | $as_echo_n "checking for $ac_word... " >&6; } | |
5f64f7bd | 13329 | if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : |
067d23c9 KY |
13330 | $as_echo_n "(cached) " >&6 |
13331 | else | |
13332 | case $PKG_CONFIG in | |
13333 | [\\/]* | ?:[\\/]*) | |
13334 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
13335 | ;; | |
13336 | *) | |
13337 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
13338 | for as_dir in $PATH | |
13339 | do | |
13340 | IFS=$as_save_IFS | |
13341 | test -z "$as_dir" && as_dir=. | |
13342 | for ac_exec_ext in '' $ac_executable_extensions; do | |
13343 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
13344 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
13345 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
13346 | break 2 | |
13347 | fi | |
13348 | done | |
13349 | done | |
13350 | IFS=$as_save_IFS | |
13351 | ||
13352 | test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" | |
13353 | ;; | |
13354 | esac | |
13355 | fi | |
13356 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG | |
13357 | if test -n "$PKG_CONFIG"; then | |
13358 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
13359 | $as_echo "$PKG_CONFIG" >&6; } | |
13360 | else | |
13361 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
13362 | $as_echo "no" >&6; } | |
13363 | fi | |
13364 | ||
13365 | ||
13366 | ||
13367 | if test "$PKG_CONFIG" = "no" ; then | |
13368 | HAVE_LIBXML2=no | |
13369 | else | |
13370 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
13371 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
dab73760 CY |
13372 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxml-2.0 > 2.6.17" >&5 |
13373 | $as_echo_n "checking for libxml-2.0 > 2.6.17... " >&6; } | |
067d23c9 | 13374 | |
dab73760 | 13375 | if $PKG_CONFIG --exists "libxml-2.0 > 2.6.17" 2>&5; then |
067d23c9 KY |
13376 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
13377 | $as_echo "yes" >&6; } | |
13378 | succeeded=yes | |
13379 | ||
13380 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBXML2_CFLAGS" >&5 | |
13381 | $as_echo_n "checking LIBXML2_CFLAGS... " >&6; } | |
dab73760 | 13382 | LIBXML2_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0 > 2.6.17"|sed -e 's,///*,/,g'` |
067d23c9 KY |
13383 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBXML2_CFLAGS" >&5 |
13384 | $as_echo "$LIBXML2_CFLAGS" >&6; } | |
13385 | ||
13386 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBXML2_LIBS" >&5 | |
13387 | $as_echo_n "checking LIBXML2_LIBS... " >&6; } | |
dab73760 | 13388 | LIBXML2_LIBS=`$PKG_CONFIG --libs "libxml-2.0 > 2.6.17"|sed -e 's,///*,/,g'` |
067d23c9 KY |
13389 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBXML2_LIBS" >&5 |
13390 | $as_echo "$LIBXML2_LIBS" >&6; } | |
13391 | else | |
13392 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
13393 | $as_echo "no" >&6; } | |
13394 | LIBXML2_CFLAGS="" | |
13395 | LIBXML2_LIBS="" | |
13396 | ## If we have a custom action on failure, don't print errors, but | |
13397 | ## do set a variable so people can do so. | |
dab73760 | 13398 | LIBXML2_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libxml-2.0 > 2.6.17"` |
067d23c9 KY |
13399 | |
13400 | fi | |
13401 | ||
13402 | ||
13403 | ||
13404 | else | |
13405 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
13406 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
13407 | fi | |
13408 | fi | |
13409 | ||
13410 | if test $succeeded = yes; then | |
13411 | HAVE_LIBXML2=yes | |
13412 | else | |
13413 | HAVE_LIBXML2=no | |
13414 | fi | |
13415 | ||
13416 | if test "${HAVE_LIBXML2}" = "yes"; then | |
13417 | LIBS="$LIBXML2_LIBS $LIBS" | |
13418 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for htmlReadMemory in -lxml2" >&5 | |
13419 | $as_echo_n "checking for htmlReadMemory in -lxml2... " >&6; } | |
5f64f7bd | 13420 | if test "${ac_cv_lib_xml2_htmlReadMemory+set}" = set; then : |
067d23c9 KY |
13421 | $as_echo_n "(cached) " >&6 |
13422 | else | |
13423 | ac_check_lib_save_LIBS=$LIBS | |
13424 | LIBS="-lxml2 $LIBS" | |
13425 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13426 | /* end confdefs.h. */ | |
13427 | ||
13428 | /* Override any GCC internal prototype to avoid an error. | |
13429 | Use char because int might match the return type of a GCC | |
13430 | builtin and then its argument prototype would still apply. */ | |
13431 | #ifdef __cplusplus | |
13432 | extern "C" | |
13433 | #endif | |
13434 | char htmlReadMemory (); | |
13435 | int | |
13436 | main () | |
13437 | { | |
13438 | return htmlReadMemory (); | |
13439 | ; | |
13440 | return 0; | |
13441 | } | |
13442 | _ACEOF | |
13443 | if ac_fn_c_try_link "$LINENO"; then : | |
13444 | ac_cv_lib_xml2_htmlReadMemory=yes | |
13445 | else | |
13446 | ac_cv_lib_xml2_htmlReadMemory=no | |
13447 | fi | |
13448 | rm -f core conftest.err conftest.$ac_objext \ | |
13449 | conftest$ac_exeext conftest.$ac_ext | |
13450 | LIBS=$ac_check_lib_save_LIBS | |
13451 | fi | |
13452 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_htmlReadMemory" >&5 | |
13453 | $as_echo "$ac_cv_lib_xml2_htmlReadMemory" >&6; } | |
5f64f7bd | 13454 | if test "x$ac_cv_lib_xml2_htmlReadMemory" = x""yes; then : |
067d23c9 KY |
13455 | HAVE_LIBXML2=yes |
13456 | else | |
13457 | HAVE_LIBXML2=no | |
13458 | fi | |
13459 | ||
13460 | if test "${HAVE_LIBXML2}" = "yes"; then | |
13461 | ||
13462 | $as_echo "#define HAVE_LIBXML2 1" >>confdefs.h | |
13463 | ||
13464 | else | |
13465 | LIBXML2_LIBS="" | |
13466 | LIBXML2_CFLAGS="" | |
13467 | fi | |
13468 | fi | |
13469 | fi | |
13470 | ||
13471 | ||
13472 | ||
13473 | # If netdb.h doesn't declare h_errno, we must declare it by hand. | |
13474 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether netdb declares h_errno" >&5 | |
13475 | $as_echo_n "checking whether netdb declares h_errno... " >&6; } | |
5f64f7bd | 13476 | if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then : |
067d23c9 KY |
13477 | $as_echo_n "(cached) " >&6 |
13478 | else | |
13479 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13480 | /* end confdefs.h. */ | |
13481 | #include <netdb.h> | |
13482 | int | |
13483 | main () | |
13484 | { | |
13485 | return h_errno; | |
13486 | ; | |
13487 | return 0; | |
13488 | } | |
13489 | _ACEOF | |
13490 | if ac_fn_c_try_link "$LINENO"; then : | |
13491 | emacs_cv_netdb_declares_h_errno=yes | |
13492 | else | |
13493 | emacs_cv_netdb_declares_h_errno=no | |
13494 | fi | |
13495 | rm -f core conftest.err conftest.$ac_objext \ | |
13496 | conftest$ac_exeext conftest.$ac_ext | |
13497 | fi | |
13498 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_netdb_declares_h_errno" >&5 | |
13499 | $as_echo "$emacs_cv_netdb_declares_h_errno" >&6; } | |
13500 | if test $emacs_cv_netdb_declares_h_errno = yes; then | |
13501 | ||
13502 | $as_echo "#define HAVE_H_ERRNO 1" >>confdefs.h | |
13503 | ||
13504 | fi | |
13505 | ||
067d23c9 KY |
13506 | # fmod, logb, and frexp are found in -lm on most systems. |
13507 | # On HPUX 9.01, -lm does not contain logb, so check for sqrt. | |
13508 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5 | |
13509 | $as_echo_n "checking for sqrt in -lm... " >&6; } | |
5f64f7bd | 13510 | if test "${ac_cv_lib_m_sqrt+set}" = set; then : |
067d23c9 KY |
13511 | $as_echo_n "(cached) " >&6 |
13512 | else | |
13513 | ac_check_lib_save_LIBS=$LIBS | |
13514 | LIBS="-lm $LIBS" | |
13515 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13516 | /* end confdefs.h. */ | |
13517 | ||
13518 | /* Override any GCC internal prototype to avoid an error. | |
13519 | Use char because int might match the return type of a GCC | |
13520 | builtin and then its argument prototype would still apply. */ | |
13521 | #ifdef __cplusplus | |
13522 | extern "C" | |
13523 | #endif | |
13524 | char sqrt (); | |
13525 | int | |
13526 | main () | |
13527 | { | |
13528 | return sqrt (); | |
13529 | ; | |
13530 | return 0; | |
13531 | } | |
13532 | _ACEOF | |
13533 | if ac_fn_c_try_link "$LINENO"; then : | |
13534 | ac_cv_lib_m_sqrt=yes | |
13535 | else | |
13536 | ac_cv_lib_m_sqrt=no | |
13537 | fi | |
13538 | rm -f core conftest.err conftest.$ac_objext \ | |
13539 | conftest$ac_exeext conftest.$ac_ext | |
13540 | LIBS=$ac_check_lib_save_LIBS | |
13541 | fi | |
13542 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sqrt" >&5 | |
13543 | $as_echo "$ac_cv_lib_m_sqrt" >&6; } | |
5f64f7bd | 13544 | if test "x$ac_cv_lib_m_sqrt" = x""yes; then : |
067d23c9 KY |
13545 | cat >>confdefs.h <<_ACEOF |
13546 | #define HAVE_LIBM 1 | |
13547 | _ACEOF | |
13548 | ||
13549 | LIBS="-lm $LIBS" | |
13550 | ||
13551 | fi | |
13552 | ||
13553 | ||
13554 | # Check for mail-locking functions in a "mail" library. Probably this should | |
13555 | # have the same check as for liblockfile below. | |
13556 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -lmail" >&5 | |
13557 | $as_echo_n "checking for maillock in -lmail... " >&6; } | |
5f64f7bd | 13558 | if test "${ac_cv_lib_mail_maillock+set}" = set; then : |
067d23c9 KY |
13559 | $as_echo_n "(cached) " >&6 |
13560 | else | |
13561 | ac_check_lib_save_LIBS=$LIBS | |
13562 | LIBS="-lmail $LIBS" | |
13563 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13564 | /* end confdefs.h. */ | |
13565 | ||
13566 | /* Override any GCC internal prototype to avoid an error. | |
13567 | Use char because int might match the return type of a GCC | |
13568 | builtin and then its argument prototype would still apply. */ | |
13569 | #ifdef __cplusplus | |
13570 | extern "C" | |
13571 | #endif | |
13572 | char maillock (); | |
13573 | int | |
13574 | main () | |
13575 | { | |
13576 | return maillock (); | |
13577 | ; | |
13578 | return 0; | |
13579 | } | |
13580 | _ACEOF | |
13581 | if ac_fn_c_try_link "$LINENO"; then : | |
13582 | ac_cv_lib_mail_maillock=yes | |
13583 | else | |
13584 | ac_cv_lib_mail_maillock=no | |
13585 | fi | |
13586 | rm -f core conftest.err conftest.$ac_objext \ | |
13587 | conftest$ac_exeext conftest.$ac_ext | |
13588 | LIBS=$ac_check_lib_save_LIBS | |
13589 | fi | |
13590 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mail_maillock" >&5 | |
13591 | $as_echo "$ac_cv_lib_mail_maillock" >&6; } | |
5f64f7bd | 13592 | if test "x$ac_cv_lib_mail_maillock" = x""yes; then : |
067d23c9 KY |
13593 | have_mail=yes |
13594 | else | |
13595 | have_mail=no | |
13596 | fi | |
13597 | ||
13598 | if test $have_mail = yes; then | |
13599 | LIBS_MAIL=-lmail | |
13600 | LIBS="$LIBS_MAIL $LIBS" | |
13601 | ||
13602 | $as_echo "#define HAVE_LIBMAIL 1" >>confdefs.h | |
13603 | ||
13604 | else | |
13605 | LIBS_MAIL= | |
13606 | fi | |
13607 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -llockfile" >&5 | |
13608 | $as_echo_n "checking for maillock in -llockfile... " >&6; } | |
5f64f7bd | 13609 | if test "${ac_cv_lib_lockfile_maillock+set}" = set; then : |
067d23c9 KY |
13610 | $as_echo_n "(cached) " >&6 |
13611 | else | |
13612 | ac_check_lib_save_LIBS=$LIBS | |
13613 | LIBS="-llockfile $LIBS" | |
13614 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13615 | /* end confdefs.h. */ | |
13616 | ||
13617 | /* Override any GCC internal prototype to avoid an error. | |
13618 | Use char because int might match the return type of a GCC | |
13619 | builtin and then its argument prototype would still apply. */ | |
13620 | #ifdef __cplusplus | |
13621 | extern "C" | |
13622 | #endif | |
13623 | char maillock (); | |
13624 | int | |
13625 | main () | |
13626 | { | |
13627 | return maillock (); | |
13628 | ; | |
13629 | return 0; | |
13630 | } | |
13631 | _ACEOF | |
13632 | if ac_fn_c_try_link "$LINENO"; then : | |
13633 | ac_cv_lib_lockfile_maillock=yes | |
13634 | else | |
13635 | ac_cv_lib_lockfile_maillock=no | |
13636 | fi | |
13637 | rm -f core conftest.err conftest.$ac_objext \ | |
13638 | conftest$ac_exeext conftest.$ac_ext | |
13639 | LIBS=$ac_check_lib_save_LIBS | |
13640 | fi | |
13641 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lockfile_maillock" >&5 | |
13642 | $as_echo "$ac_cv_lib_lockfile_maillock" >&6; } | |
5f64f7bd | 13643 | if test "x$ac_cv_lib_lockfile_maillock" = x""yes; then : |
067d23c9 KY |
13644 | have_lockfile=yes |
13645 | else | |
13646 | have_lockfile=no | |
13647 | fi | |
13648 | ||
13649 | if test $have_lockfile = yes; then | |
13650 | LIBS_MAIL=-llockfile | |
13651 | LIBS="$LIBS_MAIL $LIBS" | |
13652 | ||
13653 | $as_echo "#define HAVE_LIBLOCKFILE 1" >>confdefs.h | |
13654 | ||
13655 | else | |
13656 | # If we have the shared liblockfile, assume we must use it for mail | |
13657 | # locking (e.g. Debian). If we couldn't link against liblockfile | |
13658 | # (no liblockfile.a installed), ensure that we don't need to. | |
13659 | # Extract the first word of "liblockfile.so", so it can be a program name with args. | |
13660 | set dummy liblockfile.so; ac_word=$2 | |
13661 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
13662 | $as_echo_n "checking for $ac_word... " >&6; } | |
5f64f7bd | 13663 | if test "${ac_cv_prog_liblockfile+set}" = set; then : |
067d23c9 KY |
13664 | $as_echo_n "(cached) " >&6 |
13665 | else | |
13666 | if test -n "$liblockfile"; then | |
13667 | ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test. | |
13668 | else | |
13669 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
13670 | as_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH" | |
13671 | for as_dir in $as_dummy | |
13672 | do | |
13673 | IFS=$as_save_IFS | |
13674 | test -z "$as_dir" && as_dir=. | |
13675 | for ac_exec_ext in '' $ac_executable_extensions; do | |
13676 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
13677 | ac_cv_prog_liblockfile="yes" | |
13678 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
13679 | break 2 | |
13680 | fi | |
13681 | done | |
13682 | done | |
13683 | IFS=$as_save_IFS | |
13684 | ||
13685 | test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no" | |
13686 | fi | |
13687 | fi | |
13688 | liblockfile=$ac_cv_prog_liblockfile | |
13689 | if test -n "$liblockfile"; then | |
13690 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $liblockfile" >&5 | |
13691 | $as_echo "$liblockfile" >&6; } | |
13692 | else | |
13693 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
13694 | $as_echo "no" >&6; } | |
13695 | fi | |
13696 | ||
13697 | ||
13698 | if test $ac_cv_prog_liblockfile = yes; then | |
5f64f7bd | 13699 | as_fn_error "Shared liblockfile found but can't link against it. |
067d23c9 KY |
13700 | This probably means that movemail could lose mail. |
13701 | There may be a \`development' package to install containing liblockfile." "$LINENO" 5 | |
13702 | fi | |
13703 | fi | |
13704 | for ac_func in touchlock | |
13705 | do : | |
13706 | ac_fn_c_check_func "$LINENO" "touchlock" "ac_cv_func_touchlock" | |
5f64f7bd | 13707 | if test "x$ac_cv_func_touchlock" = x""yes; then : |
067d23c9 KY |
13708 | cat >>confdefs.h <<_ACEOF |
13709 | #define HAVE_TOUCHLOCK 1 | |
13710 | _ACEOF | |
13711 | ||
13712 | fi | |
13713 | done | |
13714 | ||
13715 | for ac_header in maillock.h | |
13716 | do : | |
13717 | ac_fn_c_check_header_mongrel "$LINENO" "maillock.h" "ac_cv_header_maillock_h" "$ac_includes_default" | |
5f64f7bd | 13718 | if test "x$ac_cv_header_maillock_h" = x""yes; then : |
067d23c9 KY |
13719 | cat >>confdefs.h <<_ACEOF |
13720 | #define HAVE_MAILLOCK_H 1 | |
13721 | _ACEOF | |
13722 | ||
13723 | fi | |
13724 | ||
13725 | done | |
13726 | ||
13727 | ||
13728 | ||
13729 | ## Define MAIL_USE_FLOCK (or LOCKF) if the mailer uses flock (or lockf) to | |
13730 | ## interlock access to the mail spool. The alternative is a lock file named | |
13731 | ## /usr/spool/mail/$USER.lock. | |
13732 | mail_lock=no | |
13733 | case "$opsys" in | |
13734 | aix4-2) mail_lock="lockf" ;; | |
13735 | ||
13736 | gnu|freebsd|netbsd|openbsd|darwin|irix6-5) mail_lock="flock" ;; | |
13737 | ||
13738 | ## On GNU/Linux systems, both methods are used by various mail programs. | |
13739 | ## I assume most people are using newer mailers that have heard of flock. | |
13740 | ## Change this if you need to. | |
13741 | ## Debian contains a patch which says: ``On Debian/GNU/Linux systems, | |
13742 | ## configure gets the right answers, and that means *NOT* using flock. | |
13743 | ## Using flock is guaranteed to be the wrong thing. See Debian Policy | |
13744 | ## for details.'' and then uses `#ifdef DEBIAN'. Unfortunately the | |
13745 | ## Debian maintainer hasn't provided a clean fix for Emacs. | |
13746 | ## movemail.c will use `maillock' when MAILDIR, HAVE_LIBMAIL and | |
13747 | ## HAVE_MAILLOCK_H are defined, so the following appears to be the | |
13748 | ## correct logic. -- fx | |
13749 | ## We must check for HAVE_LIBLOCKFILE too, as movemail does. | |
13750 | ## liblockfile is a Free Software replacement for libmail, used on | |
13751 | ## Debian systems and elsewhere. -rfr. | |
13752 | gnu-*) | |
13753 | mail_lock="flock" | |
13754 | if test $have_mail = yes || test $have_lockfile = yes; then | |
13755 | test $ac_cv_header_maillock_h = yes && mail_lock=no | |
13756 | fi | |
13757 | ;; | |
13758 | esac | |
13759 | ||
13760 | BLESSMAIL_TARGET= | |
13761 | case "$mail_lock" in | |
13762 | flock) | |
13763 | $as_echo "#define MAIL_USE_FLOCK 1" >>confdefs.h | |
13764 | ;; | |
13765 | ||
13766 | lockf) | |
13767 | $as_echo "#define MAIL_USE_LOCKF 1" >>confdefs.h | |
13768 | ;; | |
13769 | ||
13770 | *) BLESSMAIL_TARGET="need-blessmail" ;; | |
13771 | esac | |
13772 | ||
13773 | ||
13774 | ||
7d2a1c5e | 13775 | for ac_func in gethostname getdomainname \ |
067d23c9 KY |
13776 | rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \ |
13777 | random lrand48 logb frexp fmod rint cbrt ftime setsid \ | |
1fd182f0 | 13778 | strerror fpathconf select euidaccess getpagesize tzset setlocale \ |
067d23c9 KY |
13779 | utimes getrlimit setrlimit setpgid getcwd getwd shutdown getaddrinfo \ |
13780 | __fpending mblen mbrlen mbsinit strsignal setitimer ualarm strchr strrchr \ | |
13781 | sendto recvfrom getsockopt setsockopt getsockname getpeername \ | |
13782 | gai_strerror mkstemp getline getdelim mremap memmove fsync sync \ | |
13783 | memset memcmp difftime memcpy mempcpy mblen mbrlen posix_memalign \ | |
13784 | cfmakeraw cfsetspeed isnan copysign __executable_start | |
13785 | do : | |
13786 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
13787 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
5f64f7bd GM |
13788 | eval as_val=\$$as_ac_var |
13789 | if test "x$as_val" = x""yes; then : | |
067d23c9 KY |
13790 | cat >>confdefs.h <<_ACEOF |
13791 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
13792 | _ACEOF | |
13793 | ||
13794 | fi | |
13795 | done | |
13796 | ||
13797 | ||
2018939f AS |
13798 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unwind_init" >&5 |
13799 | $as_echo_n "checking for __builtin_unwind_init... " >&6; } | |
5f64f7bd | 13800 | if test "${emacs_cv_func___builtin_unwind_init+set}" = set; then : |
2018939f AS |
13801 | $as_echo_n "(cached) " >&6 |
13802 | else | |
13803 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13804 | /* end confdefs.h. */ | |
13805 | ||
13806 | int | |
13807 | main () | |
13808 | { | |
13809 | __builtin_unwind_init (); | |
13810 | ; | |
13811 | return 0; | |
13812 | } | |
13813 | _ACEOF | |
13814 | if ac_fn_c_try_link "$LINENO"; then : | |
13815 | emacs_cv_func___builtin_unwind_init=yes | |
13816 | else | |
13817 | emacs_cv_func___builtin_unwind_init=no | |
13818 | fi | |
13819 | rm -f core conftest.err conftest.$ac_objext \ | |
13820 | conftest$ac_exeext conftest.$ac_ext | |
13821 | fi | |
13822 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_func___builtin_unwind_init" >&5 | |
13823 | $as_echo "$emacs_cv_func___builtin_unwind_init" >&6; } | |
13824 | if test $emacs_cv_func___builtin_unwind_init = yes; then | |
13825 | ||
13826 | $as_echo "#define HAVE___BUILTIN_UNWIND_INIT 1" >>confdefs.h | |
13827 | ||
13828 | fi | |
13829 | ||
067d23c9 KY |
13830 | for ac_header in sys/un.h |
13831 | do : | |
13832 | ac_fn_c_check_header_mongrel "$LINENO" "sys/un.h" "ac_cv_header_sys_un_h" "$ac_includes_default" | |
5f64f7bd | 13833 | if test "x$ac_cv_header_sys_un_h" = x""yes; then : |
067d23c9 KY |
13834 | cat >>confdefs.h <<_ACEOF |
13835 | #define HAVE_SYS_UN_H 1 | |
13836 | _ACEOF | |
13837 | ||
13838 | fi | |
13839 | ||
13840 | done | |
13841 | ||
13842 | ||
1f5d53eb PE |
13843 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5 |
13844 | $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; } | |
5f64f7bd | 13845 | if test "${ac_cv_sys_largefile_source+set}" = set; then : |
067d23c9 KY |
13846 | $as_echo_n "(cached) " >&6 |
13847 | else | |
1f5d53eb PE |
13848 | while :; do |
13849 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
067d23c9 | 13850 | /* end confdefs.h. */ |
1f5d53eb PE |
13851 | #include <sys/types.h> /* for off_t */ |
13852 | #include <stdio.h> | |
067d23c9 KY |
13853 | int |
13854 | main () | |
13855 | { | |
1f5d53eb PE |
13856 | int (*fp) (FILE *, off_t, int) = fseeko; |
13857 | return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); | |
067d23c9 KY |
13858 | ; |
13859 | return 0; | |
13860 | } | |
13861 | _ACEOF | |
13862 | if ac_fn_c_try_link "$LINENO"; then : | |
1f5d53eb | 13863 | ac_cv_sys_largefile_source=no; break |
067d23c9 KY |
13864 | fi |
13865 | rm -f core conftest.err conftest.$ac_objext \ | |
13866 | conftest$ac_exeext conftest.$ac_ext | |
1f5d53eb | 13867 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
067d23c9 | 13868 | /* end confdefs.h. */ |
1f5d53eb PE |
13869 | #define _LARGEFILE_SOURCE 1 |
13870 | #include <sys/types.h> /* for off_t */ | |
13871 | #include <stdio.h> | |
067d23c9 KY |
13872 | int |
13873 | main () | |
13874 | { | |
1f5d53eb PE |
13875 | int (*fp) (FILE *, off_t, int) = fseeko; |
13876 | return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); | |
067d23c9 KY |
13877 | ; |
13878 | return 0; | |
13879 | } | |
13880 | _ACEOF | |
13881 | if ac_fn_c_try_link "$LINENO"; then : | |
1f5d53eb | 13882 | ac_cv_sys_largefile_source=1; break |
067d23c9 KY |
13883 | fi |
13884 | rm -f core conftest.err conftest.$ac_objext \ | |
13885 | conftest$ac_exeext conftest.$ac_ext | |
1f5d53eb PE |
13886 | ac_cv_sys_largefile_source=unknown |
13887 | break | |
13888 | done | |
067d23c9 | 13889 | fi |
1f5d53eb PE |
13890 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5 |
13891 | $as_echo "$ac_cv_sys_largefile_source" >&6; } | |
13892 | case $ac_cv_sys_largefile_source in #( | |
13893 | no | unknown) ;; | |
13894 | *) | |
13895 | cat >>confdefs.h <<_ACEOF | |
13896 | #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source | |
13897 | _ACEOF | |
13898 | ;; | |
13899 | esac | |
13900 | rm -rf conftest* | |
067d23c9 | 13901 | |
1f5d53eb PE |
13902 | # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug |
13903 | # in glibc 2.1.3, but that breaks too many other things. | |
13904 | # If you want fseeko and ftello with glibc, upgrade to a fixed glibc. | |
13905 | if test $ac_cv_sys_largefile_source != unknown; then | |
13906 | ||
13907 | $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h | |
067d23c9 | 13908 | |
067d23c9 KY |
13909 | fi |
13910 | ||
1f5d53eb PE |
13911 | |
13912 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getpgrp requires zero arguments" >&5 | |
13913 | $as_echo_n "checking whether getpgrp requires zero arguments... " >&6; } | |
5f64f7bd | 13914 | if test "${ac_cv_func_getpgrp_void+set}" = set; then : |
067d23c9 KY |
13915 | $as_echo_n "(cached) " >&6 |
13916 | else | |
1f5d53eb | 13917 | # Use it with a single arg. |
067d23c9 KY |
13918 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
13919 | /* end confdefs.h. */ | |
1f5d53eb | 13920 | $ac_includes_default |
067d23c9 KY |
13921 | int |
13922 | main () | |
13923 | { | |
1f5d53eb | 13924 | getpgrp (0); |
067d23c9 KY |
13925 | ; |
13926 | return 0; | |
13927 | } | |
13928 | _ACEOF | |
1f5d53eb PE |
13929 | if ac_fn_c_try_compile "$LINENO"; then : |
13930 | ac_cv_func_getpgrp_void=no | |
067d23c9 | 13931 | else |
1f5d53eb | 13932 | ac_cv_func_getpgrp_void=yes |
067d23c9 | 13933 | fi |
1f5d53eb PE |
13934 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
13935 | ||
067d23c9 | 13936 | fi |
1f5d53eb PE |
13937 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getpgrp_void" >&5 |
13938 | $as_echo "$ac_cv_func_getpgrp_void" >&6; } | |
13939 | if test $ac_cv_func_getpgrp_void = yes; then | |
13940 | ||
13941 | $as_echo "#define GETPGRP_VOID 1" >>confdefs.h | |
067d23c9 KY |
13942 | |
13943 | fi | |
13944 | ||
1f5d53eb | 13945 | |
3e0be4ab GM |
13946 | # UNIX98 PTYs. |
13947 | for ac_func in grantpt | |
13948 | do : | |
13949 | ac_fn_c_check_func "$LINENO" "grantpt" "ac_cv_func_grantpt" | |
13950 | if test "x$ac_cv_func_grantpt" = x""yes; then : | |
13951 | cat >>confdefs.h <<_ACEOF | |
13952 | #define HAVE_GRANTPT 1 | |
13953 | _ACEOF | |
1f5d53eb | 13954 | |
3e0be4ab GM |
13955 | fi |
13956 | done | |
1f5d53eb PE |
13957 | |
13958 | ||
3e0be4ab GM |
13959 | # PTY-related GNU extensions. |
13960 | for ac_func in getpt | |
13961 | do : | |
13962 | ac_fn_c_check_func "$LINENO" "getpt" "ac_cv_func_getpt" | |
13963 | if test "x$ac_cv_func_getpt" = x""yes; then : | |
13964 | cat >>confdefs.h <<_ACEOF | |
13965 | #define HAVE_GETPT 1 | |
13966 | _ACEOF | |
1f5d53eb | 13967 | |
3e0be4ab GM |
13968 | fi |
13969 | done | |
1f5d53eb | 13970 | |
1f5d53eb | 13971 | |
3e0be4ab GM |
13972 | # Check this now, so that we will NOT find the above functions in ncurses. |
13973 | # That is because we have not set up to link ncurses in lib-src. | |
13974 | # It's better to believe a function is not available | |
13975 | # than to expect to find it in ncurses. | |
13976 | # Also we need tputs and friends to be able to build at all. | |
13977 | have_tputs_et_al=true | |
13978 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tputs" >&5 | |
13979 | $as_echo_n "checking for library containing tputs... " >&6; } | |
13980 | if test "${ac_cv_search_tputs+set}" = set; then : | |
4fc2b746 GM |
13981 | $as_echo_n "(cached) " >&6 |
13982 | else | |
3e0be4ab GM |
13983 | ac_func_search_save_LIBS=$LIBS |
13984 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4fc2b746 | 13985 | /* end confdefs.h. */ |
3e0be4ab GM |
13986 | |
13987 | /* Override any GCC internal prototype to avoid an error. | |
13988 | Use char because int might match the return type of a GCC | |
13989 | builtin and then its argument prototype would still apply. */ | |
13990 | #ifdef __cplusplus | |
13991 | extern "C" | |
13992 | #endif | |
13993 | char tputs (); | |
13994 | int | |
13995 | main () | |
13996 | { | |
13997 | return tputs (); | |
4fc2b746 GM |
13998 | ; |
13999 | return 0; | |
14000 | } | |
14001 | _ACEOF | |
3e0be4ab GM |
14002 | for ac_lib in '' ncurses terminfo termcap; do |
14003 | if test -z "$ac_lib"; then | |
14004 | ac_res="none required" | |
14005 | else | |
14006 | ac_res=-l$ac_lib | |
14007 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
14008 | fi | |
14009 | if ac_fn_c_try_link "$LINENO"; then : | |
14010 | ac_cv_search_tputs=$ac_res | |
4fc2b746 GM |
14011 | fi |
14012 | rm -f core conftest.err conftest.$ac_objext \ | |
3e0be4ab GM |
14013 | conftest$ac_exeext |
14014 | if test "${ac_cv_search_tputs+set}" = set; then : | |
14015 | break | |
4fc2b746 | 14016 | fi |
3e0be4ab GM |
14017 | done |
14018 | if test "${ac_cv_search_tputs+set}" = set; then : | |
4fc2b746 | 14019 | |
3e0be4ab GM |
14020 | else |
14021 | ac_cv_search_tputs=no | |
14022 | fi | |
14023 | rm conftest.$ac_ext | |
14024 | LIBS=$ac_func_search_save_LIBS | |
14025 | fi | |
14026 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tputs" >&5 | |
14027 | $as_echo "$ac_cv_search_tputs" >&6; } | |
14028 | ac_res=$ac_cv_search_tputs | |
14029 | if test "$ac_res" != no; then : | |
14030 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
14031 | ||
14032 | else | |
14033 | have_tputs_et_al=false | |
14034 | fi | |
4fc2b746 | 14035 | |
3e0be4ab GM |
14036 | if test "$have_tputs_et_al" != true; then |
14037 | as_fn_error "I couldn't find termcap functions (tputs and friends). | |
14038 | Maybe some development libraries/packages are missing? Try installing | |
14039 | libncurses-dev(el), libterminfo-dev(el) or similar." "$LINENO" 5 | |
4fc2b746 | 14040 | fi |
3e0be4ab | 14041 | # Must define this when any termcap library is found. |
4fc2b746 | 14042 | |
3e0be4ab GM |
14043 | $as_echo "#define HAVE_LIBNCURSES 1" >>confdefs.h |
14044 | ||
14045 | ## FIXME This was the cpp logic, but I am not sure it is right. | |
14046 | ## The above test has not necessarily found libncurses. | |
14047 | HAVE_LIBNCURSES=yes | |
14048 | ||
14049 | ## Use terminfo instead of termcap? | |
14050 | ## Note only system files NOT using terminfo are: | |
14051 | ## freebsd < 40000, ms-w32, msdos, netbsd < 599002500, and | |
14052 | ## darwin|gnu without ncurses. | |
14053 | TERMINFO=no | |
14054 | LIBS_TERMCAP= | |
14055 | case "$opsys" in | |
14056 | ## cygwin: Fewer environment variables to go wrong, more terminal types. | |
14057 | ## hpux10-20: Use the system provided termcap(3) library. | |
14058 | ## openbsd: David Mazieres <dm@reeducation-labor.lcs.mit.edu> says this | |
14059 | ## is necessary. Otherwise Emacs dumps core when run -nw. | |
14060 | aix4-2|cygwin|hpux*|irix6-5|openbsd|sol2*|unixware) TERMINFO=yes ;; | |
14061 | ||
14062 | ## darwin: Prevents crashes when running Emacs in Terminal.app under 10.2. | |
14063 | ## The ncurses library has been moved out of the System framework in | |
14064 | ## Mac OS X 10.2. So if configure detects it, set the command-line | |
14065 | ## option to use it. | |
14066 | darwin|gnu*) | |
14067 | ## (HAVE_LIBNCURSES was not always true, but is since 2010-03-18.) | |
14068 | if test "x$HAVE_LIBNCURSES" = "xyes"; then | |
14069 | TERMINFO=yes | |
14070 | LIBS_TERMCAP="-lncurses" | |
14071 | fi | |
14072 | ;; | |
14073 | ||
14074 | freebsd) | |
14075 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether FreeBSD is new enough to use terminfo" >&5 | |
14076 | $as_echo_n "checking whether FreeBSD is new enough to use terminfo... " >&6; } | |
14077 | if test "${emacs_cv_freebsd_terminfo+set}" = set; then : | |
4fc2b746 GM |
14078 | $as_echo_n "(cached) " >&6 |
14079 | else | |
14080 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14081 | /* end confdefs.h. */ | |
3e0be4ab | 14082 | #include <osreldate.h> |
4fc2b746 GM |
14083 | int |
14084 | main () | |
14085 | { | |
3e0be4ab GM |
14086 | #if __FreeBSD_version < 400000 |
14087 | fail; | |
14088 | #endif | |
14089 | ||
4fc2b746 GM |
14090 | ; |
14091 | return 0; | |
14092 | } | |
14093 | _ACEOF | |
14094 | if ac_fn_c_try_link "$LINENO"; then : | |
3e0be4ab | 14095 | emacs_cv_freebsd_terminfo=yes |
4fc2b746 | 14096 | else |
3e0be4ab | 14097 | emacs_cv_freebsd_terminfo=no |
4fc2b746 GM |
14098 | fi |
14099 | rm -f core conftest.err conftest.$ac_objext \ | |
14100 | conftest$ac_exeext conftest.$ac_ext | |
14101 | fi | |
4fc2b746 | 14102 | |
4fc2b746 | 14103 | |
3e0be4ab GM |
14104 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_freebsd_terminfo" >&5 |
14105 | $as_echo "$emacs_cv_freebsd_terminfo" >&6; } | |
4fc2b746 | 14106 | |
3e0be4ab GM |
14107 | if test $emacs_cv_freebsd_terminfo = yes; then |
14108 | TERMINFO=yes | |
14109 | LIBS_TERMCAP="-lncurses" | |
14110 | else | |
14111 | LIBS_TERMCAP="-ltermcap" | |
14112 | fi | |
14113 | ;; | |
4fc2b746 | 14114 | |
3e0be4ab GM |
14115 | netbsd) |
14116 | if test $ac_cv_search_tputs = -lterminfo; then | |
14117 | TERMINFO=yes | |
14118 | LIBS_TERMCAP="-lterminfo" | |
14119 | else | |
14120 | LIBS_TERMCAP="-ltermcap" | |
14121 | fi | |
14122 | ;; | |
4fc2b746 | 14123 | |
3e0be4ab | 14124 | esac |
4fc2b746 | 14125 | |
3e0be4ab GM |
14126 | case "$opsys" in |
14127 | ## hpux: Make sure we get select from libc rather than from libcurses | |
14128 | ## because libcurses on HPUX 10.10 has a broken version of select. | |
14129 | ## We used to use -lc -lcurses, but this may be cleaner. | |
14130 | hpux*) LIBS_TERMCAP="-ltermcap" ;; | |
4fc2b746 | 14131 | |
3e0be4ab | 14132 | openbsd) LIBS_TERMCAP="-lncurses" ;; |
4fc2b746 | 14133 | |
3e0be4ab GM |
14134 | ## Must use system termcap, if we use any termcap. It does special things. |
14135 | sol2*) test "$TERMINFO" != yes && LIBS_TERMCAP="-ltermcap" ;; | |
14136 | esac | |
4fc2b746 | 14137 | |
3e0be4ab GM |
14138 | TERMCAP_OBJ=tparam.o |
14139 | if test $TERMINFO = yes; then | |
4fc2b746 | 14140 | |
3e0be4ab | 14141 | $as_echo "#define TERMINFO 1" >>confdefs.h |
4fc2b746 | 14142 | |
4fc2b746 | 14143 | |
3e0be4ab GM |
14144 | ## Default used to be -ltermcap. Add a case above if need something else. |
14145 | test "x$LIBS_TERMCAP" = "x" && LIBS_TERMCAP="-lcurses" | |
4fc2b746 | 14146 | |
3e0be4ab | 14147 | TERMCAP_OBJ=terminfo.o |
4fc2b746 | 14148 | fi |
4fc2b746 | 14149 | |
4fc2b746 | 14150 | |
4fc2b746 | 14151 | |
4fc2b746 | 14152 | |
3e0be4ab GM |
14153 | # Do we have res_init, for detecting changes in /etc/resolv.conf? |
14154 | resolv=no | |
14155 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4fc2b746 | 14156 | /* end confdefs.h. */ |
3e0be4ab GM |
14157 | #include <netinet/in.h> |
14158 | #include <arpa/nameser.h> | |
14159 | #include <resolv.h> | |
4fc2b746 | 14160 | int |
3e0be4ab | 14161 | main () |
4fc2b746 | 14162 | { |
3e0be4ab GM |
14163 | return res_init(); |
14164 | ; | |
14165 | return 0; | |
4fc2b746 GM |
14166 | } |
14167 | _ACEOF | |
3e0be4ab GM |
14168 | if ac_fn_c_try_link "$LINENO"; then : |
14169 | have_res_init=yes | |
4fc2b746 | 14170 | else |
3e0be4ab | 14171 | have_res_init=no |
4fc2b746 | 14172 | fi |
3e0be4ab GM |
14173 | rm -f core conftest.err conftest.$ac_objext \ |
14174 | conftest$ac_exeext conftest.$ac_ext | |
14175 | if test "$have_res_init" = no; then | |
14176 | OLIBS="$LIBS" | |
14177 | LIBS="$LIBS -lresolv" | |
14178 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_init with -lresolv" >&5 | |
14179 | $as_echo_n "checking for res_init with -lresolv... " >&6; } | |
14180 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14181 | /* end confdefs.h. */ | |
14182 | #include <netinet/in.h> | |
14183 | #include <arpa/nameser.h> | |
14184 | #include <resolv.h> | |
14185 | int | |
14186 | main () | |
14187 | { | |
14188 | return res_init(); | |
14189 | ; | |
14190 | return 0; | |
14191 | } | |
14192 | _ACEOF | |
14193 | if ac_fn_c_try_link "$LINENO"; then : | |
14194 | have_res_init=yes | |
14195 | else | |
14196 | have_res_init=no | |
14197 | fi | |
14198 | rm -f core conftest.err conftest.$ac_objext \ | |
14199 | conftest$ac_exeext conftest.$ac_ext | |
14200 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_res_init" >&5 | |
14201 | $as_echo "$have_res_init" >&6; } | |
14202 | if test "$have_res_init" = yes ; then | |
14203 | resolv=yes | |
14204 | fi | |
14205 | LIBS="$OLIBS" | |
4fc2b746 GM |
14206 | fi |
14207 | ||
3e0be4ab | 14208 | if test "$have_res_init" = yes; then |
1f5d53eb | 14209 | |
3e0be4ab | 14210 | $as_echo "#define HAVE_RES_INIT 1" >>confdefs.h |
6c051bab GM |
14211 | |
14212 | fi | |
6c051bab | 14213 | |
3e0be4ab GM |
14214 | # Do we need the Hesiod library to provide the support routines? |
14215 | LIBHESIOD= | |
14216 | if test "$with_hesiod" != no ; then | |
14217 | # Don't set $LIBS here -- see comments above. FIXME which comments? | |
14218 | ac_fn_c_check_func "$LINENO" "res_send" "ac_cv_func_res_send" | |
14219 | if test "x$ac_cv_func_res_send" = x""yes; then : | |
6c051bab | 14220 | |
3e0be4ab GM |
14221 | else |
14222 | ac_fn_c_check_func "$LINENO" "__res_send" "ac_cv_func___res_send" | |
14223 | if test "x$ac_cv_func___res_send" = x""yes; then : | |
6c051bab | 14224 | |
3e0be4ab GM |
14225 | else |
14226 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_send in -lresolv" >&5 | |
14227 | $as_echo_n "checking for res_send in -lresolv... " >&6; } | |
14228 | if test "${ac_cv_lib_resolv_res_send+set}" = set; then : | |
942f733f PE |
14229 | $as_echo_n "(cached) " >&6 |
14230 | else | |
3e0be4ab GM |
14231 | ac_check_lib_save_LIBS=$LIBS |
14232 | LIBS="-lresolv $LIBS" | |
14233 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
942f733f | 14234 | /* end confdefs.h. */ |
942f733f | 14235 | |
3e0be4ab GM |
14236 | /* Override any GCC internal prototype to avoid an error. |
14237 | Use char because int might match the return type of a GCC | |
14238 | builtin and then its argument prototype would still apply. */ | |
14239 | #ifdef __cplusplus | |
14240 | extern "C" | |
14241 | #endif | |
14242 | char res_send (); | |
942f733f PE |
14243 | int |
14244 | main () | |
14245 | { | |
3e0be4ab | 14246 | return res_send (); |
942f733f PE |
14247 | ; |
14248 | return 0; | |
14249 | } | |
14250 | _ACEOF | |
3e0be4ab GM |
14251 | if ac_fn_c_try_link "$LINENO"; then : |
14252 | ac_cv_lib_resolv_res_send=yes | |
14253 | else | |
14254 | ac_cv_lib_resolv_res_send=no | |
14255 | fi | |
14256 | rm -f core conftest.err conftest.$ac_objext \ | |
14257 | conftest$ac_exeext conftest.$ac_ext | |
14258 | LIBS=$ac_check_lib_save_LIBS | |
14259 | fi | |
14260 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_send" >&5 | |
14261 | $as_echo "$ac_cv_lib_resolv_res_send" >&6; } | |
14262 | if test "x$ac_cv_lib_resolv_res_send" = x""yes; then : | |
14263 | resolv=yes | |
14264 | else | |
14265 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __res_send in -lresolv" >&5 | |
14266 | $as_echo_n "checking for __res_send in -lresolv... " >&6; } | |
14267 | if test "${ac_cv_lib_resolv___res_send+set}" = set; then : | |
14268 | $as_echo_n "(cached) " >&6 | |
14269 | else | |
14270 | ac_check_lib_save_LIBS=$LIBS | |
14271 | LIBS="-lresolv $LIBS" | |
14272 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
942f733f | 14273 | /* end confdefs.h. */ |
942f733f | 14274 | |
3e0be4ab GM |
14275 | /* Override any GCC internal prototype to avoid an error. |
14276 | Use char because int might match the return type of a GCC | |
14277 | builtin and then its argument prototype would still apply. */ | |
14278 | #ifdef __cplusplus | |
14279 | extern "C" | |
14280 | #endif | |
14281 | char __res_send (); | |
942f733f PE |
14282 | int |
14283 | main () | |
14284 | { | |
3e0be4ab | 14285 | return __res_send (); |
942f733f PE |
14286 | ; |
14287 | return 0; | |
14288 | } | |
14289 | _ACEOF | |
3e0be4ab GM |
14290 | if ac_fn_c_try_link "$LINENO"; then : |
14291 | ac_cv_lib_resolv___res_send=yes | |
942f733f | 14292 | else |
3e0be4ab | 14293 | ac_cv_lib_resolv___res_send=no |
942f733f | 14294 | fi |
3e0be4ab GM |
14295 | rm -f core conftest.err conftest.$ac_objext \ |
14296 | conftest$ac_exeext conftest.$ac_ext | |
14297 | LIBS=$ac_check_lib_save_LIBS | |
14298 | fi | |
14299 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv___res_send" >&5 | |
14300 | $as_echo "$ac_cv_lib_resolv___res_send" >&6; } | |
14301 | if test "x$ac_cv_lib_resolv___res_send" = x""yes; then : | |
14302 | resolv=yes | |
942f733f | 14303 | fi |
942f733f | 14304 | |
3e0be4ab | 14305 | fi |
942f733f | 14306 | |
3e0be4ab GM |
14307 | fi |
14308 | ||
14309 | fi | |
14310 | ||
14311 | if test "$resolv" = yes ; then | |
14312 | RESOLVLIB=-lresolv | |
14313 | else | |
14314 | RESOLVLIB= | |
14315 | fi | |
14316 | ac_fn_c_check_func "$LINENO" "hes_getmailhost" "ac_cv_func_hes_getmailhost" | |
14317 | if test "x$ac_cv_func_hes_getmailhost" = x""yes; then : | |
14318 | ||
14319 | else | |
14320 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hes_getmailhost in -lhesiod" >&5 | |
14321 | $as_echo_n "checking for hes_getmailhost in -lhesiod... " >&6; } | |
14322 | if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then : | |
14323 | $as_echo_n "(cached) " >&6 | |
14324 | else | |
14325 | ac_check_lib_save_LIBS=$LIBS | |
14326 | LIBS="-lhesiod $RESOLVLIB $LIBS" | |
14327 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
942f733f | 14328 | /* end confdefs.h. */ |
942f733f | 14329 | |
3e0be4ab GM |
14330 | /* Override any GCC internal prototype to avoid an error. |
14331 | Use char because int might match the return type of a GCC | |
14332 | builtin and then its argument prototype would still apply. */ | |
14333 | #ifdef __cplusplus | |
14334 | extern "C" | |
14335 | #endif | |
14336 | char hes_getmailhost (); | |
942f733f PE |
14337 | int |
14338 | main () | |
14339 | { | |
3e0be4ab | 14340 | return hes_getmailhost (); |
942f733f PE |
14341 | ; |
14342 | return 0; | |
14343 | } | |
14344 | _ACEOF | |
3e0be4ab GM |
14345 | if ac_fn_c_try_link "$LINENO"; then : |
14346 | ac_cv_lib_hesiod_hes_getmailhost=yes | |
942f733f | 14347 | else |
3e0be4ab | 14348 | ac_cv_lib_hesiod_hes_getmailhost=no |
942f733f | 14349 | fi |
3e0be4ab GM |
14350 | rm -f core conftest.err conftest.$ac_objext \ |
14351 | conftest$ac_exeext conftest.$ac_ext | |
14352 | LIBS=$ac_check_lib_save_LIBS | |
14353 | fi | |
14354 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5 | |
14355 | $as_echo "$ac_cv_lib_hesiod_hes_getmailhost" >&6; } | |
14356 | if test "x$ac_cv_lib_hesiod_hes_getmailhost" = x""yes; then : | |
14357 | hesiod=yes | |
14358 | else | |
14359 | : | |
942f733f | 14360 | fi |
942f733f | 14361 | |
942f733f | 14362 | fi |
3e0be4ab GM |
14363 | |
14364 | ||
14365 | if test x"$hesiod" = xyes; then | |
14366 | ||
14367 | $as_echo "#define HAVE_LIBHESIOD 1" >>confdefs.h | |
14368 | ||
14369 | LIBHESIOD=-lhesiod | |
14370 | fi | |
14371 | fi | |
14372 | ||
14373 | ||
14374 | # Do we need libresolv (due to res_init or Hesiod)? | |
14375 | if test "$resolv" = yes ; then | |
14376 | ||
14377 | $as_echo "#define HAVE_LIBRESOLV 1" >>confdefs.h | |
14378 | ||
14379 | LIBRESOLV=-lresolv | |
942f733f | 14380 | else |
3e0be4ab GM |
14381 | LIBRESOLV= |
14382 | fi | |
14383 | ||
14384 | ||
14385 | # These tell us which Kerberos-related libraries to use. | |
14386 | COM_ERRLIB= | |
14387 | CRYPTOLIB= | |
14388 | KRB5LIB= | |
14389 | DESLIB= | |
14390 | KRB4LIB= | |
14391 | ||
14392 | if test "${with_kerberos}" != no; then | |
14393 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for com_err in -lcom_err" >&5 | |
14394 | $as_echo_n "checking for com_err in -lcom_err... " >&6; } | |
14395 | if test "${ac_cv_lib_com_err_com_err+set}" = set; then : | |
14396 | $as_echo_n "(cached) " >&6 | |
14397 | else | |
14398 | ac_check_lib_save_LIBS=$LIBS | |
14399 | LIBS="-lcom_err $LIBS" | |
14400 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
942f733f | 14401 | /* end confdefs.h. */ |
3e0be4ab GM |
14402 | |
14403 | /* Override any GCC internal prototype to avoid an error. | |
14404 | Use char because int might match the return type of a GCC | |
14405 | builtin and then its argument prototype would still apply. */ | |
14406 | #ifdef __cplusplus | |
14407 | extern "C" | |
14408 | #endif | |
14409 | char com_err (); | |
942f733f PE |
14410 | int |
14411 | main () | |
14412 | { | |
3e0be4ab | 14413 | return com_err (); |
942f733f PE |
14414 | ; |
14415 | return 0; | |
14416 | } | |
14417 | _ACEOF | |
3e0be4ab GM |
14418 | if ac_fn_c_try_link "$LINENO"; then : |
14419 | ac_cv_lib_com_err_com_err=yes | |
942f733f | 14420 | else |
3e0be4ab | 14421 | ac_cv_lib_com_err_com_err=no |
942f733f | 14422 | fi |
3e0be4ab GM |
14423 | rm -f core conftest.err conftest.$ac_objext \ |
14424 | conftest$ac_exeext conftest.$ac_ext | |
14425 | LIBS=$ac_check_lib_save_LIBS | |
942f733f | 14426 | fi |
3e0be4ab GM |
14427 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_com_err_com_err" >&5 |
14428 | $as_echo "$ac_cv_lib_com_err_com_err" >&6; } | |
14429 | if test "x$ac_cv_lib_com_err_com_err" = x""yes; then : | |
14430 | have_com_err=yes | |
14431 | else | |
14432 | have_com_err=no | |
942f733f | 14433 | fi |
942f733f | 14434 | |
3e0be4ab GM |
14435 | if test $have_com_err = yes; then |
14436 | COM_ERRLIB=-lcom_err | |
14437 | LIBS="$COM_ERRLIB $LIBS" | |
942f733f | 14438 | |
3e0be4ab | 14439 | $as_echo "#define HAVE_LIBCOM_ERR 1" >>confdefs.h |
942f733f | 14440 | |
3e0be4ab GM |
14441 | fi |
14442 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lcrypto" >&5 | |
14443 | $as_echo_n "checking for mit_des_cbc_encrypt in -lcrypto... " >&6; } | |
14444 | if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then : | |
942f733f PE |
14445 | $as_echo_n "(cached) " >&6 |
14446 | else | |
3e0be4ab GM |
14447 | ac_check_lib_save_LIBS=$LIBS |
14448 | LIBS="-lcrypto $LIBS" | |
14449 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
942f733f | 14450 | /* end confdefs.h. */ |
942f733f | 14451 | |
3e0be4ab GM |
14452 | /* Override any GCC internal prototype to avoid an error. |
14453 | Use char because int might match the return type of a GCC | |
14454 | builtin and then its argument prototype would still apply. */ | |
14455 | #ifdef __cplusplus | |
14456 | extern "C" | |
14457 | #endif | |
14458 | char mit_des_cbc_encrypt (); | |
14459 | int | |
14460 | main () | |
14461 | { | |
14462 | return mit_des_cbc_encrypt (); | |
14463 | ; | |
14464 | return 0; | |
14465 | } | |
942f733f | 14466 | _ACEOF |
3e0be4ab GM |
14467 | if ac_fn_c_try_link "$LINENO"; then : |
14468 | ac_cv_lib_crypto_mit_des_cbc_encrypt=yes | |
14469 | else | |
14470 | ac_cv_lib_crypto_mit_des_cbc_encrypt=no | |
942f733f | 14471 | fi |
3e0be4ab GM |
14472 | rm -f core conftest.err conftest.$ac_objext \ |
14473 | conftest$ac_exeext conftest.$ac_ext | |
14474 | LIBS=$ac_check_lib_save_LIBS | |
14475 | fi | |
14476 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5 | |
14477 | $as_echo "$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6; } | |
14478 | if test "x$ac_cv_lib_crypto_mit_des_cbc_encrypt" = x""yes; then : | |
14479 | have_crypto=yes | |
14480 | else | |
14481 | have_crypto=no | |
942f733f | 14482 | fi |
942f733f | 14483 | |
3e0be4ab GM |
14484 | if test $have_crypto = yes; then |
14485 | CRYPTOLIB=-lcrypto | |
14486 | LIBS="$CRYPTOLIB $LIBS" | |
942f733f | 14487 | |
3e0be4ab | 14488 | $as_echo "#define HAVE_LIBCRYPTO 1" >>confdefs.h |
942f733f | 14489 | |
3e0be4ab GM |
14490 | fi |
14491 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lk5crypto" >&5 | |
14492 | $as_echo_n "checking for mit_des_cbc_encrypt in -lk5crypto... " >&6; } | |
14493 | if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then : | |
067d23c9 KY |
14494 | $as_echo_n "(cached) " >&6 |
14495 | else | |
3e0be4ab GM |
14496 | ac_check_lib_save_LIBS=$LIBS |
14497 | LIBS="-lk5crypto $LIBS" | |
14498 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
067d23c9 | 14499 | /* end confdefs.h. */ |
3e0be4ab GM |
14500 | |
14501 | /* Override any GCC internal prototype to avoid an error. | |
14502 | Use char because int might match the return type of a GCC | |
14503 | builtin and then its argument prototype would still apply. */ | |
14504 | #ifdef __cplusplus | |
14505 | extern "C" | |
14506 | #endif | |
14507 | char mit_des_cbc_encrypt (); | |
067d23c9 KY |
14508 | int |
14509 | main () | |
14510 | { | |
3e0be4ab | 14511 | return mit_des_cbc_encrypt (); |
067d23c9 KY |
14512 | ; |
14513 | return 0; | |
14514 | } | |
14515 | _ACEOF | |
14516 | if ac_fn_c_try_link "$LINENO"; then : | |
3e0be4ab | 14517 | ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes |
067d23c9 | 14518 | else |
3e0be4ab | 14519 | ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no |
067d23c9 KY |
14520 | fi |
14521 | rm -f core conftest.err conftest.$ac_objext \ | |
14522 | conftest$ac_exeext conftest.$ac_ext | |
3e0be4ab GM |
14523 | LIBS=$ac_check_lib_save_LIBS |
14524 | fi | |
14525 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5 | |
14526 | $as_echo "$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6; } | |
14527 | if test "x$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" = x""yes; then : | |
14528 | have_k5crypto=yes | |
14529 | else | |
14530 | have_k5crypto=no | |
067d23c9 KY |
14531 | fi |
14532 | ||
3e0be4ab GM |
14533 | if test $have_k5crypto = yes; then |
14534 | CRYPTOLIB=-lk5crypto | |
14535 | LIBS="$CRYPTOLIB $LIBS" | |
067d23c9 | 14536 | |
3e0be4ab | 14537 | $as_echo "#define HAVE_LIBK5CRYPTO 1" >>confdefs.h |
067d23c9 | 14538 | |
3e0be4ab GM |
14539 | fi |
14540 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5_init_context in -lkrb5" >&5 | |
14541 | $as_echo_n "checking for krb5_init_context in -lkrb5... " >&6; } | |
14542 | if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then : | |
14543 | $as_echo_n "(cached) " >&6 | |
14544 | else | |
14545 | ac_check_lib_save_LIBS=$LIBS | |
14546 | LIBS="-lkrb5 $LIBS" | |
14547 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14548 | /* end confdefs.h. */ | |
067d23c9 | 14549 | |
3e0be4ab GM |
14550 | /* Override any GCC internal prototype to avoid an error. |
14551 | Use char because int might match the return type of a GCC | |
14552 | builtin and then its argument prototype would still apply. */ | |
14553 | #ifdef __cplusplus | |
14554 | extern "C" | |
14555 | #endif | |
14556 | char krb5_init_context (); | |
14557 | int | |
14558 | main () | |
14559 | { | |
14560 | return krb5_init_context (); | |
14561 | ; | |
14562 | return 0; | |
14563 | } | |
14564 | _ACEOF | |
14565 | if ac_fn_c_try_link "$LINENO"; then : | |
14566 | ac_cv_lib_krb5_krb5_init_context=yes | |
14567 | else | |
14568 | ac_cv_lib_krb5_krb5_init_context=no | |
14569 | fi | |
14570 | rm -f core conftest.err conftest.$ac_objext \ | |
14571 | conftest$ac_exeext conftest.$ac_ext | |
14572 | LIBS=$ac_check_lib_save_LIBS | |
14573 | fi | |
14574 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb5_krb5_init_context" >&5 | |
14575 | $as_echo "$ac_cv_lib_krb5_krb5_init_context" >&6; } | |
14576 | if test "x$ac_cv_lib_krb5_krb5_init_context" = x""yes; then : | |
14577 | have_krb5=yes | |
14578 | else | |
14579 | have_krb5=no | |
14580 | fi | |
067d23c9 | 14581 | |
3e0be4ab GM |
14582 | if test $have_krb5=yes; then |
14583 | KRB5LIB=-lkrb5 | |
14584 | LIBS="$KRB5LIB $LIBS" | |
1f5d53eb | 14585 | |
3e0be4ab | 14586 | $as_echo "#define HAVE_LIBKRB5 1" >>confdefs.h |
1f5d53eb | 14587 | |
3e0be4ab GM |
14588 | fi |
14589 | if test "${with_kerberos5}" = no; then | |
14590 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes425" >&5 | |
14591 | $as_echo_n "checking for des_cbc_encrypt in -ldes425... " >&6; } | |
14592 | if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then : | |
7d2a1c5e GM |
14593 | $as_echo_n "(cached) " >&6 |
14594 | else | |
3e0be4ab GM |
14595 | ac_check_lib_save_LIBS=$LIBS |
14596 | LIBS="-ldes425 $LIBS" | |
14597 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7d2a1c5e GM |
14598 | /* end confdefs.h. */ |
14599 | ||
3e0be4ab GM |
14600 | /* Override any GCC internal prototype to avoid an error. |
14601 | Use char because int might match the return type of a GCC | |
14602 | builtin and then its argument prototype would still apply. */ | |
14603 | #ifdef __cplusplus | |
14604 | extern "C" | |
14605 | #endif | |
14606 | char des_cbc_encrypt (); | |
7d2a1c5e GM |
14607 | int |
14608 | main () | |
14609 | { | |
3e0be4ab | 14610 | return des_cbc_encrypt (); |
7d2a1c5e GM |
14611 | ; |
14612 | return 0; | |
14613 | } | |
14614 | _ACEOF | |
3e0be4ab GM |
14615 | if ac_fn_c_try_link "$LINENO"; then : |
14616 | ac_cv_lib_des425_des_cbc_encrypt=yes | |
7d2a1c5e | 14617 | else |
3e0be4ab | 14618 | ac_cv_lib_des425_des_cbc_encrypt=no |
7d2a1c5e | 14619 | fi |
3e0be4ab GM |
14620 | rm -f core conftest.err conftest.$ac_objext \ |
14621 | conftest$ac_exeext conftest.$ac_ext | |
14622 | LIBS=$ac_check_lib_save_LIBS | |
14623 | fi | |
14624 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5 | |
14625 | $as_echo "$ac_cv_lib_des425_des_cbc_encrypt" >&6; } | |
14626 | if test "x$ac_cv_lib_des425_des_cbc_encrypt" = x""yes; then : | |
14627 | have_des425=yes | |
14628 | else | |
14629 | have_des425=no | |
7d2a1c5e | 14630 | fi |
7d2a1c5e | 14631 | |
3e0be4ab GM |
14632 | if test $have_des425 = yes; then |
14633 | DESLIB=-ldes425 | |
14634 | LIBS="$DESLIB $LIBS" | |
7d2a1c5e | 14635 | |
3e0be4ab | 14636 | $as_echo "#define HAVE_LIBDES425 1" >>confdefs.h |
7d2a1c5e | 14637 | |
3e0be4ab GM |
14638 | else |
14639 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes" >&5 | |
14640 | $as_echo_n "checking for des_cbc_encrypt in -ldes... " >&6; } | |
14641 | if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then : | |
14642 | $as_echo_n "(cached) " >&6 | |
7d2a1c5e | 14643 | else |
3e0be4ab GM |
14644 | ac_check_lib_save_LIBS=$LIBS |
14645 | LIBS="-ldes $LIBS" | |
14646 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14647 | /* end confdefs.h. */ | |
7d2a1c5e | 14648 | |
3e0be4ab GM |
14649 | /* Override any GCC internal prototype to avoid an error. |
14650 | Use char because int might match the return type of a GCC | |
14651 | builtin and then its argument prototype would still apply. */ | |
14652 | #ifdef __cplusplus | |
14653 | extern "C" | |
14654 | #endif | |
14655 | char des_cbc_encrypt (); | |
14656 | int | |
14657 | main () | |
14658 | { | |
14659 | return des_cbc_encrypt (); | |
14660 | ; | |
14661 | return 0; | |
14662 | } | |
7d2a1c5e | 14663 | _ACEOF |
3e0be4ab GM |
14664 | if ac_fn_c_try_link "$LINENO"; then : |
14665 | ac_cv_lib_des_des_cbc_encrypt=yes | |
14666 | else | |
14667 | ac_cv_lib_des_des_cbc_encrypt=no | |
14668 | fi | |
14669 | rm -f core conftest.err conftest.$ac_objext \ | |
14670 | conftest$ac_exeext conftest.$ac_ext | |
14671 | LIBS=$ac_check_lib_save_LIBS | |
14672 | fi | |
14673 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des_des_cbc_encrypt" >&5 | |
14674 | $as_echo "$ac_cv_lib_des_des_cbc_encrypt" >&6; } | |
14675 | if test "x$ac_cv_lib_des_des_cbc_encrypt" = x""yes; then : | |
14676 | have_des=yes | |
14677 | else | |
14678 | have_des=no | |
14679 | fi | |
7d2a1c5e | 14680 | |
3e0be4ab GM |
14681 | if test $have_des = yes; then |
14682 | DESLIB=-ldes | |
14683 | LIBS="$DESLIB $LIBS" | |
7d2a1c5e | 14684 | |
3e0be4ab | 14685 | $as_echo "#define HAVE_LIBDES 1" >>confdefs.h |
7d2a1c5e | 14686 | |
3e0be4ab GM |
14687 | fi |
14688 | fi | |
14689 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb4" >&5 | |
14690 | $as_echo_n "checking for krb_get_cred in -lkrb4... " >&6; } | |
14691 | if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then : | |
067d23c9 KY |
14692 | $as_echo_n "(cached) " >&6 |
14693 | else | |
3e0be4ab GM |
14694 | ac_check_lib_save_LIBS=$LIBS |
14695 | LIBS="-lkrb4 $LIBS" | |
14696 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1f5d53eb | 14697 | /* end confdefs.h. */ |
3e0be4ab GM |
14698 | |
14699 | /* Override any GCC internal prototype to avoid an error. | |
14700 | Use char because int might match the return type of a GCC | |
14701 | builtin and then its argument prototype would still apply. */ | |
14702 | #ifdef __cplusplus | |
14703 | extern "C" | |
14704 | #endif | |
14705 | char krb_get_cred (); | |
14706 | int | |
14707 | main () | |
14708 | { | |
14709 | return krb_get_cred (); | |
14710 | ; | |
14711 | return 0; | |
14712 | } | |
067d23c9 | 14713 | _ACEOF |
3e0be4ab GM |
14714 | if ac_fn_c_try_link "$LINENO"; then : |
14715 | ac_cv_lib_krb4_krb_get_cred=yes | |
1f5d53eb | 14716 | else |
3e0be4ab | 14717 | ac_cv_lib_krb4_krb_get_cred=no |
067d23c9 | 14718 | fi |
3e0be4ab GM |
14719 | rm -f core conftest.err conftest.$ac_objext \ |
14720 | conftest$ac_exeext conftest.$ac_ext | |
14721 | LIBS=$ac_check_lib_save_LIBS | |
067d23c9 | 14722 | fi |
3e0be4ab GM |
14723 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb4_krb_get_cred" >&5 |
14724 | $as_echo "$ac_cv_lib_krb4_krb_get_cred" >&6; } | |
14725 | if test "x$ac_cv_lib_krb4_krb_get_cred" = x""yes; then : | |
14726 | have_krb4=yes | |
14727 | else | |
14728 | have_krb4=no | |
1f5d53eb | 14729 | fi |
067d23c9 | 14730 | |
3e0be4ab GM |
14731 | if test $have_krb4 = yes; then |
14732 | KRB4LIB=-lkrb4 | |
14733 | LIBS="$KRB4LIB $LIBS" | |
067d23c9 | 14734 | |
3e0be4ab | 14735 | $as_echo "#define HAVE_LIBKRB4 1" >>confdefs.h |
067d23c9 | 14736 | |
3e0be4ab GM |
14737 | else |
14738 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb" >&5 | |
14739 | $as_echo_n "checking for krb_get_cred in -lkrb... " >&6; } | |
14740 | if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then : | |
1f5d53eb PE |
14741 | $as_echo_n "(cached) " >&6 |
14742 | else | |
3e0be4ab GM |
14743 | ac_check_lib_save_LIBS=$LIBS |
14744 | LIBS="-lkrb $LIBS" | |
14745 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1f5d53eb | 14746 | /* end confdefs.h. */ |
067d23c9 | 14747 | |
3e0be4ab GM |
14748 | /* Override any GCC internal prototype to avoid an error. |
14749 | Use char because int might match the return type of a GCC | |
14750 | builtin and then its argument prototype would still apply. */ | |
14751 | #ifdef __cplusplus | |
14752 | extern "C" | |
1f5d53eb | 14753 | #endif |
3e0be4ab GM |
14754 | char krb_get_cred (); |
14755 | int | |
14756 | main () | |
14757 | { | |
14758 | return krb_get_cred (); | |
14759 | ; | |
14760 | return 0; | |
14761 | } | |
067d23c9 | 14762 | _ACEOF |
3e0be4ab GM |
14763 | if ac_fn_c_try_link "$LINENO"; then : |
14764 | ac_cv_lib_krb_krb_get_cred=yes | |
1f5d53eb | 14765 | else |
3e0be4ab | 14766 | ac_cv_lib_krb_krb_get_cred=no |
067d23c9 | 14767 | fi |
3e0be4ab GM |
14768 | rm -f core conftest.err conftest.$ac_objext \ |
14769 | conftest$ac_exeext conftest.$ac_ext | |
14770 | LIBS=$ac_check_lib_save_LIBS | |
14771 | fi | |
14772 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb_krb_get_cred" >&5 | |
14773 | $as_echo "$ac_cv_lib_krb_krb_get_cred" >&6; } | |
14774 | if test "x$ac_cv_lib_krb_krb_get_cred" = x""yes; then : | |
14775 | have_krb=yes | |
14776 | else | |
14777 | have_krb=no | |
067d23c9 | 14778 | fi |
067d23c9 | 14779 | |
3e0be4ab GM |
14780 | if test $have_krb = yes; then |
14781 | KRB4LIB=-lkrb | |
14782 | LIBS="$KRB4LIB $LIBS" | |
067d23c9 | 14783 | |
3e0be4ab | 14784 | $as_echo "#define HAVE_LIBKRB 1" >>confdefs.h |
067d23c9 | 14785 | |
3e0be4ab GM |
14786 | fi |
14787 | fi | |
14788 | fi | |
067d23c9 | 14789 | |
3e0be4ab GM |
14790 | if test "${with_kerberos5}" != no; then |
14791 | for ac_header in krb5.h | |
14792 | do : | |
14793 | ac_fn_c_check_header_mongrel "$LINENO" "krb5.h" "ac_cv_header_krb5_h" "$ac_includes_default" | |
14794 | if test "x$ac_cv_header_krb5_h" = x""yes; then : | |
14795 | cat >>confdefs.h <<_ACEOF | |
14796 | #define HAVE_KRB5_H 1 | |
14797 | _ACEOF | |
14798 | ac_fn_c_check_member "$LINENO" "krb5_error" "text" "ac_cv_member_krb5_error_text" "#include <krb5.h> | |
14799 | " | |
14800 | if test "x$ac_cv_member_krb5_error_text" = x""yes; then : | |
067d23c9 | 14801 | |
3e0be4ab GM |
14802 | cat >>confdefs.h <<_ACEOF |
14803 | #define HAVE_KRB5_ERROR_TEXT 1 | |
14804 | _ACEOF | |
067d23c9 | 14805 | |
067d23c9 | 14806 | |
3e0be4ab GM |
14807 | fi |
14808 | ac_fn_c_check_member "$LINENO" "krb5_error" "e_text" "ac_cv_member_krb5_error_e_text" "#include <krb5.h> | |
14809 | " | |
14810 | if test "x$ac_cv_member_krb5_error_e_text" = x""yes; then : | |
067d23c9 | 14811 | |
3e0be4ab GM |
14812 | cat >>confdefs.h <<_ACEOF |
14813 | #define HAVE_KRB5_ERROR_E_TEXT 1 | |
14814 | _ACEOF | |
067d23c9 | 14815 | |
067d23c9 | 14816 | |
3e0be4ab | 14817 | fi |
067d23c9 | 14818 | |
3e0be4ab | 14819 | fi |
067d23c9 | 14820 | |
3e0be4ab | 14821 | done |
067d23c9 | 14822 | |
3e0be4ab GM |
14823 | else |
14824 | for ac_header in des.h | |
14825 | do : | |
14826 | ac_fn_c_check_header_mongrel "$LINENO" "des.h" "ac_cv_header_des_h" "$ac_includes_default" | |
14827 | if test "x$ac_cv_header_des_h" = x""yes; then : | |
14828 | cat >>confdefs.h <<_ACEOF | |
14829 | #define HAVE_DES_H 1 | |
14830 | _ACEOF | |
067d23c9 | 14831 | |
1f5d53eb | 14832 | else |
3e0be4ab GM |
14833 | for ac_header in kerberosIV/des.h |
14834 | do : | |
14835 | ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/des.h" "ac_cv_header_kerberosIV_des_h" "$ac_includes_default" | |
14836 | if test "x$ac_cv_header_kerberosIV_des_h" = x""yes; then : | |
14837 | cat >>confdefs.h <<_ACEOF | |
14838 | #define HAVE_KERBEROSIV_DES_H 1 | |
1f5d53eb | 14839 | _ACEOF |
067d23c9 | 14840 | |
3e0be4ab GM |
14841 | else |
14842 | for ac_header in kerberos/des.h | |
14843 | do : | |
14844 | ac_fn_c_check_header_mongrel "$LINENO" "kerberos/des.h" "ac_cv_header_kerberos_des_h" "$ac_includes_default" | |
14845 | if test "x$ac_cv_header_kerberos_des_h" = x""yes; then : | |
14846 | cat >>confdefs.h <<_ACEOF | |
14847 | #define HAVE_KERBEROS_DES_H 1 | |
14848 | _ACEOF | |
067d23c9 KY |
14849 | |
14850 | fi | |
067d23c9 | 14851 | |
3e0be4ab | 14852 | done |
067d23c9 | 14853 | |
3e0be4ab | 14854 | fi |
067d23c9 | 14855 | |
3e0be4ab | 14856 | done |
067d23c9 | 14857 | |
3e0be4ab | 14858 | fi |
067d23c9 | 14859 | |
3e0be4ab | 14860 | done |
1f5d53eb | 14861 | |
3e0be4ab GM |
14862 | for ac_header in krb.h |
14863 | do : | |
14864 | ac_fn_c_check_header_mongrel "$LINENO" "krb.h" "ac_cv_header_krb_h" "$ac_includes_default" | |
14865 | if test "x$ac_cv_header_krb_h" = x""yes; then : | |
14866 | cat >>confdefs.h <<_ACEOF | |
14867 | #define HAVE_KRB_H 1 | |
14868 | _ACEOF | |
1f5d53eb | 14869 | |
3e0be4ab GM |
14870 | else |
14871 | for ac_header in kerberosIV/krb.h | |
1f5d53eb | 14872 | do : |
3e0be4ab GM |
14873 | ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/krb.h" "ac_cv_header_kerberosIV_krb_h" "$ac_includes_default" |
14874 | if test "x$ac_cv_header_kerberosIV_krb_h" = x""yes; then : | |
1f5d53eb | 14875 | cat >>confdefs.h <<_ACEOF |
3e0be4ab | 14876 | #define HAVE_KERBEROSIV_KRB_H 1 |
1f5d53eb | 14877 | _ACEOF |
067d23c9 KY |
14878 | |
14879 | else | |
3e0be4ab GM |
14880 | for ac_header in kerberos/krb.h |
14881 | do : | |
14882 | ac_fn_c_check_header_mongrel "$LINENO" "kerberos/krb.h" "ac_cv_header_kerberos_krb_h" "$ac_includes_default" | |
14883 | if test "x$ac_cv_header_kerberos_krb_h" = x""yes; then : | |
14884 | cat >>confdefs.h <<_ACEOF | |
14885 | #define HAVE_KERBEROS_KRB_H 1 | |
14886 | _ACEOF | |
14887 | ||
067d23c9 KY |
14888 | fi |
14889 | ||
1f5d53eb PE |
14890 | done |
14891 | ||
3e0be4ab | 14892 | fi |
1f5d53eb | 14893 | |
3e0be4ab GM |
14894 | done |
14895 | ||
14896 | fi | |
14897 | ||
14898 | done | |
14899 | ||
14900 | fi | |
14901 | for ac_header in com_err.h | |
1f5d53eb | 14902 | do : |
3e0be4ab GM |
14903 | ac_fn_c_check_header_mongrel "$LINENO" "com_err.h" "ac_cv_header_com_err_h" "$ac_includes_default" |
14904 | if test "x$ac_cv_header_com_err_h" = x""yes; then : | |
1f5d53eb | 14905 | cat >>confdefs.h <<_ACEOF |
3e0be4ab | 14906 | #define HAVE_COM_ERR_H 1 |
1f5d53eb | 14907 | _ACEOF |
067d23c9 | 14908 | |
067d23c9 | 14909 | fi |
3e0be4ab | 14910 | |
1f5d53eb | 14911 | done |
067d23c9 | 14912 | |
3e0be4ab | 14913 | fi |
067d23c9 | 14914 | |
3e0be4ab GM |
14915 | |
14916 | ||
14917 | ||
14918 | ||
14919 | ||
14920 | ||
14921 | # Solaris requires -lintl if you want strerror (which calls dgettext) | |
14922 | # to return localized messages. | |
14923 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dgettext in -lintl" >&5 | |
14924 | $as_echo_n "checking for dgettext in -lintl... " >&6; } | |
14925 | if test "${ac_cv_lib_intl_dgettext+set}" = set; then : | |
067d23c9 KY |
14926 | $as_echo_n "(cached) " >&6 |
14927 | else | |
3e0be4ab GM |
14928 | ac_check_lib_save_LIBS=$LIBS |
14929 | LIBS="-lintl $LIBS" | |
14930 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
067d23c9 | 14931 | /* end confdefs.h. */ |
3e0be4ab GM |
14932 | |
14933 | /* Override any GCC internal prototype to avoid an error. | |
14934 | Use char because int might match the return type of a GCC | |
14935 | builtin and then its argument prototype would still apply. */ | |
14936 | #ifdef __cplusplus | |
14937 | extern "C" | |
14938 | #endif | |
14939 | char dgettext (); | |
067d23c9 KY |
14940 | int |
14941 | main () | |
14942 | { | |
3e0be4ab | 14943 | return dgettext (); |
067d23c9 KY |
14944 | ; |
14945 | return 0; | |
14946 | } | |
14947 | _ACEOF | |
2b7f7d99 | 14948 | if ac_fn_c_try_link "$LINENO"; then : |
3e0be4ab GM |
14949 | ac_cv_lib_intl_dgettext=yes |
14950 | else | |
14951 | ac_cv_lib_intl_dgettext=no | |
14952 | fi | |
14953 | rm -f core conftest.err conftest.$ac_objext \ | |
14954 | conftest$ac_exeext conftest.$ac_ext | |
14955 | LIBS=$ac_check_lib_save_LIBS | |
14956 | fi | |
14957 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_dgettext" >&5 | |
14958 | $as_echo "$ac_cv_lib_intl_dgettext" >&6; } | |
14959 | if test "x$ac_cv_lib_intl_dgettext" = x""yes; then : | |
14960 | cat >>confdefs.h <<_ACEOF | |
14961 | #define HAVE_LIBINTL 1 | |
14962 | _ACEOF | |
14963 | ||
14964 | LIBS="-lintl $LIBS" | |
14965 | ||
14966 | fi | |
14967 | ||
14968 | ||
14969 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime caches TZ" >&5 | |
14970 | $as_echo_n "checking whether localtime caches TZ... " >&6; } | |
14971 | if test "${emacs_cv_localtime_cache+set}" = set; then : | |
14972 | $as_echo_n "(cached) " >&6 | |
14973 | else | |
14974 | if test x$ac_cv_func_tzset = xyes; then | |
14975 | if test "$cross_compiling" = yes; then : | |
14976 | # If we have tzset, assume the worst when cross-compiling. | |
14977 | emacs_cv_localtime_cache=yes | |
1fd182f0 | 14978 | else |
1f5d53eb | 14979 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
1fd182f0 | 14980 | /* end confdefs.h. */ |
3e0be4ab GM |
14981 | #include <time.h> |
14982 | char TZ_GMT0[] = "TZ=GMT0"; | |
14983 | char TZ_PST8[] = "TZ=PST8"; | |
14984 | main() | |
1fd182f0 | 14985 | { |
3e0be4ab GM |
14986 | time_t now = time ((time_t *) 0); |
14987 | int hour_GMT0, hour_unset; | |
14988 | if (putenv (TZ_GMT0) != 0) | |
14989 | exit (1); | |
14990 | hour_GMT0 = localtime (&now)->tm_hour; | |
14991 | unsetenv("TZ"); | |
14992 | hour_unset = localtime (&now)->tm_hour; | |
14993 | if (putenv (TZ_PST8) != 0) | |
14994 | exit (1); | |
14995 | if (localtime (&now)->tm_hour == hour_GMT0) | |
14996 | exit (1); | |
14997 | unsetenv("TZ"); | |
14998 | if (localtime (&now)->tm_hour != hour_unset) | |
14999 | exit (1); | |
15000 | exit (0); | |
1fd182f0 PE |
15001 | } |
15002 | _ACEOF | |
3e0be4ab GM |
15003 | if ac_fn_c_try_run "$LINENO"; then : |
15004 | emacs_cv_localtime_cache=no | |
1fd182f0 | 15005 | else |
3e0be4ab | 15006 | emacs_cv_localtime_cache=yes |
1fd182f0 | 15007 | fi |
3e0be4ab GM |
15008 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
15009 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
1fd182f0 | 15010 | fi |
1fd182f0 | 15011 | |
1f5d53eb | 15012 | else |
3e0be4ab GM |
15013 | # If we lack tzset, report that localtime does not cache TZ, |
15014 | # since we can't invalidate the cache if we don't have tzset. | |
15015 | emacs_cv_localtime_cache=no | |
15016 | fi | |
15017 | fi | |
15018 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_localtime_cache" >&5 | |
15019 | $as_echo "$emacs_cv_localtime_cache" >&6; } | |
15020 | if test $emacs_cv_localtime_cache = yes; then | |
1fd182f0 | 15021 | |
3e0be4ab | 15022 | $as_echo "#define LOCALTIME_CACHE 1" >>confdefs.h |
1fd182f0 | 15023 | |
1f5d53eb | 15024 | fi |
d6974efa | 15025 | |
3e0be4ab GM |
15026 | if test "x$HAVE_TIMEVAL" = xyes; then |
15027 | for ac_func in gettimeofday | |
15028 | do : | |
15029 | ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday" | |
15030 | if test "x$ac_cv_func_gettimeofday" = x""yes; then : | |
15031 | cat >>confdefs.h <<_ACEOF | |
15032 | #define HAVE_GETTIMEOFDAY 1 | |
15033 | _ACEOF | |
1fd182f0 | 15034 | |
1f5d53eb | 15035 | fi |
3e0be4ab | 15036 | done |
1fd182f0 | 15037 | |
3e0be4ab GM |
15038 | if test $ac_cv_func_gettimeofday = yes; then |
15039 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday can accept two arguments" >&5 | |
15040 | $as_echo_n "checking whether gettimeofday can accept two arguments... " >&6; } | |
15041 | if test "${emacs_cv_gettimeofday_two_arguments+set}" = set; then : | |
1fd182f0 PE |
15042 | $as_echo_n "(cached) " >&6 |
15043 | else | |
15044 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15045 | /* end confdefs.h. */ | |
1f5d53eb | 15046 | |
3e0be4ab GM |
15047 | #ifdef TIME_WITH_SYS_TIME |
15048 | #include <sys/time.h> | |
15049 | #include <time.h> | |
15050 | #else | |
15051 | #ifdef HAVE_SYS_TIME_H | |
15052 | #include <sys/time.h> | |
15053 | #else | |
15054 | #include <time.h> | |
15055 | #endif | |
15056 | #endif | |
1fd182f0 PE |
15057 | int |
15058 | main () | |
15059 | { | |
3e0be4ab GM |
15060 | struct timeval time; |
15061 | gettimeofday (&time, 0); | |
1fd182f0 PE |
15062 | ; |
15063 | return 0; | |
15064 | } | |
15065 | _ACEOF | |
3e0be4ab GM |
15066 | if ac_fn_c_try_compile "$LINENO"; then : |
15067 | emacs_cv_gettimeofday_two_arguments=yes | |
1fd182f0 | 15068 | else |
3e0be4ab | 15069 | emacs_cv_gettimeofday_two_arguments=no |
1fd182f0 | 15070 | fi |
3e0be4ab | 15071 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
1fd182f0 | 15072 | fi |
3e0be4ab GM |
15073 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_gettimeofday_two_arguments" >&5 |
15074 | $as_echo "$emacs_cv_gettimeofday_two_arguments" >&6; } | |
15075 | if test $emacs_cv_gettimeofday_two_arguments = no; then | |
1fd182f0 | 15076 | |
3e0be4ab | 15077 | $as_echo "#define GETTIMEOFDAY_ONE_ARGUMENT 1" >>confdefs.h |
1fd182f0 | 15078 | |
1f5d53eb | 15079 | fi |
1fd182f0 | 15080 | fi |
3e0be4ab | 15081 | fi |
1fd182f0 | 15082 | |
3e0be4ab GM |
15083 | ok_so_far=yes |
15084 | ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket" | |
15085 | if test "x$ac_cv_func_socket" = x""yes; then : | |
1fd182f0 | 15086 | |
3e0be4ab GM |
15087 | else |
15088 | ok_so_far=no | |
15089 | fi | |
1fd182f0 | 15090 | |
3e0be4ab GM |
15091 | if test $ok_so_far = yes; then |
15092 | ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default" | |
15093 | if test "x$ac_cv_header_netinet_in_h" = x""yes; then : | |
1fd182f0 | 15094 | |
3e0be4ab GM |
15095 | else |
15096 | ok_so_far=no | |
15097 | fi | |
1fd182f0 | 15098 | |
1f5d53eb | 15099 | |
52724a05 | 15100 | fi |
3e0be4ab GM |
15101 | if test $ok_so_far = yes; then |
15102 | ac_fn_c_check_header_mongrel "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$ac_includes_default" | |
15103 | if test "x$ac_cv_header_arpa_inet_h" = x""yes; then : | |
1f5d53eb | 15104 | |
3e0be4ab GM |
15105 | else |
15106 | ok_so_far=no | |
15107 | fi | |
1f5d53eb | 15108 | |
1f5d53eb | 15109 | |
3e0be4ab GM |
15110 | fi |
15111 | if test $ok_so_far = yes; then | |
1f5d53eb | 15112 | |
3e0be4ab | 15113 | $as_echo "#define HAVE_INET_SOCKETS 1" >>confdefs.h |
1f5d53eb | 15114 | |
3e0be4ab | 15115 | fi |
1f5d53eb | 15116 | |
3e0be4ab | 15117 | if test -f /usr/lpp/X11/bin/smt.exp; then |
1f5d53eb | 15118 | |
3e0be4ab | 15119 | $as_echo "#define HAVE_AIX_SMT_EXP 1" >>confdefs.h |
1f5d53eb PE |
15120 | |
15121 | fi | |
15122 | ||
3e0be4ab GM |
15123 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system supports dynamic ptys" >&5 |
15124 | $as_echo_n "checking whether system supports dynamic ptys... " >&6; } | |
15125 | if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then | |
15126 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
15127 | $as_echo "yes" >&6; } | |
1f5d53eb | 15128 | |
3e0be4ab | 15129 | $as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h |
1f5d53eb | 15130 | |
ae0d7250 | 15131 | else |
3e0be4ab GM |
15132 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
15133 | $as_echo "no" >&6; } | |
15134 | fi | |
4fda9c95 | 15135 | |
3e0be4ab GM |
15136 | ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" |
15137 | if test "x$ac_cv_type_pid_t" = x""yes; then : | |
15138 | ||
15139 | else | |
4fda9c95 | 15140 | |
3e0be4ab GM |
15141 | cat >>confdefs.h <<_ACEOF |
15142 | #define pid_t int | |
ae0d7250 | 15143 | _ACEOF |
4fda9c95 | 15144 | |
4fda9c95 | 15145 | fi |
4fda9c95 | 15146 | |
3e0be4ab GM |
15147 | for ac_header in vfork.h |
15148 | do : | |
15149 | ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default" | |
15150 | if test "x$ac_cv_header_vfork_h" = x""yes; then : | |
15151 | cat >>confdefs.h <<_ACEOF | |
15152 | #define HAVE_VFORK_H 1 | |
15153 | _ACEOF | |
4fda9c95 | 15154 | |
3e0be4ab GM |
15155 | fi |
15156 | ||
15157 | done | |
4fda9c95 | 15158 | |
3e0be4ab GM |
15159 | for ac_func in fork vfork |
15160 | do : | |
15161 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
15162 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
15163 | eval as_val=\$$as_ac_var | |
15164 | if test "x$as_val" = x""yes; then : | |
15165 | cat >>confdefs.h <<_ACEOF | |
15166 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
15167 | _ACEOF | |
4fda9c95 | 15168 | |
3e0be4ab GM |
15169 | fi |
15170 | done | |
4fda9c95 | 15171 | |
3e0be4ab GM |
15172 | if test "x$ac_cv_func_fork" = xyes; then |
15173 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 | |
15174 | $as_echo_n "checking for working fork... " >&6; } | |
15175 | if test "${ac_cv_func_fork_works+set}" = set; then : | |
4fda9c95 GM |
15176 | $as_echo_n "(cached) " >&6 |
15177 | else | |
3e0be4ab GM |
15178 | if test "$cross_compiling" = yes; then : |
15179 | ac_cv_func_fork_works=cross | |
4fda9c95 GM |
15180 | else |
15181 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15182 | /* end confdefs.h. */ | |
3e0be4ab | 15183 | $ac_includes_default |
4fda9c95 GM |
15184 | int |
15185 | main () | |
15186 | { | |
3e0be4ab GM |
15187 | |
15188 | /* By Ruediger Kuhlmann. */ | |
15189 | return fork () < 0; | |
15190 | ||
4fda9c95 GM |
15191 | ; |
15192 | return 0; | |
15193 | } | |
15194 | _ACEOF | |
15195 | if ac_fn_c_try_run "$LINENO"; then : | |
3e0be4ab | 15196 | ac_cv_func_fork_works=yes |
4fda9c95 | 15197 | else |
3e0be4ab | 15198 | ac_cv_func_fork_works=no |
4fda9c95 GM |
15199 | fi |
15200 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
15201 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
15202 | fi | |
15203 | ||
4fda9c95 | 15204 | fi |
3e0be4ab GM |
15205 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5 |
15206 | $as_echo "$ac_cv_func_fork_works" >&6; } | |
4fda9c95 | 15207 | |
3e0be4ab GM |
15208 | else |
15209 | ac_cv_func_fork_works=$ac_cv_func_fork | |
15210 | fi | |
15211 | if test "x$ac_cv_func_fork_works" = xcross; then | |
15212 | case $host in | |
15213 | *-*-amigaos* | *-*-msdosdjgpp*) | |
15214 | # Override, as these systems have only a dummy fork() stub | |
15215 | ac_cv_func_fork_works=no | |
15216 | ;; | |
15217 | *) | |
15218 | ac_cv_func_fork_works=yes | |
15219 | ;; | |
15220 | esac | |
15221 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 | |
15222 | $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} | |
15223 | fi | |
15224 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
15225 | if test "x$ac_cv_func_vfork" = xyes; then | |
15226 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 | |
15227 | $as_echo_n "checking for working vfork... " >&6; } | |
15228 | if test "${ac_cv_func_vfork_works+set}" = set; then : | |
15229 | $as_echo_n "(cached) " >&6 | |
15230 | else | |
15231 | if test "$cross_compiling" = yes; then : | |
15232 | ac_cv_func_vfork_works=cross | |
15233 | else | |
15234 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15235 | /* end confdefs.h. */ | |
15236 | /* Thanks to Paul Eggert for this test. */ | |
15237 | $ac_includes_default | |
15238 | #include <sys/wait.h> | |
15239 | #ifdef HAVE_VFORK_H | |
15240 | # include <vfork.h> | |
15241 | #endif | |
15242 | /* On some sparc systems, changes by the child to local and incoming | |
15243 | argument registers are propagated back to the parent. The compiler | |
15244 | is told about this with #include <vfork.h>, but some compilers | |
15245 | (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a | |
15246 | static variable whose address is put into a register that is | |
15247 | clobbered by the vfork. */ | |
15248 | static void | |
15249 | #ifdef __cplusplus | |
15250 | sparc_address_test (int arg) | |
15251 | # else | |
15252 | sparc_address_test (arg) int arg; | |
15253 | #endif | |
15254 | { | |
15255 | static pid_t child; | |
15256 | if (!child) { | |
15257 | child = vfork (); | |
15258 | if (child < 0) { | |
15259 | perror ("vfork"); | |
15260 | _exit(2); | |
15261 | } | |
15262 | if (!child) { | |
15263 | arg = getpid(); | |
15264 | write(-1, "", 0); | |
15265 | _exit (arg); | |
15266 | } | |
15267 | } | |
15268 | } | |
4fda9c95 | 15269 | |
3e0be4ab GM |
15270 | int |
15271 | main () | |
15272 | { | |
15273 | pid_t parent = getpid (); | |
15274 | pid_t child; | |
4fda9c95 | 15275 | |
3e0be4ab | 15276 | sparc_address_test (0); |
4fda9c95 | 15277 | |
3e0be4ab | 15278 | child = vfork (); |
4fda9c95 | 15279 | |
3e0be4ab GM |
15280 | if (child == 0) { |
15281 | /* Here is another test for sparc vfork register problems. This | |
15282 | test uses lots of local variables, at least as many local | |
15283 | variables as main has allocated so far including compiler | |
15284 | temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris | |
15285 | 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should | |
15286 | reuse the register of parent for one of the local variables, | |
15287 | since it will think that parent can't possibly be used any more | |
15288 | in this routine. Assigning to the local variable will thus | |
15289 | munge parent in the parent process. */ | |
15290 | pid_t | |
15291 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
15292 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
15293 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
15294 | use the same hardware register for all 8 local variables. */ | |
15295 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
15296 | || p != p5 || p != p6 || p != p7) | |
15297 | _exit(1); | |
4fda9c95 | 15298 | |
3e0be4ab GM |
15299 | /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent |
15300 | from child file descriptors. If the child closes a descriptor | |
15301 | before it execs or exits, this munges the parent's descriptor | |
15302 | as well. Test for this by closing stdout in the child. */ | |
15303 | _exit(close(fileno(stdout)) != 0); | |
15304 | } else { | |
15305 | int status; | |
15306 | struct stat st; | |
4fda9c95 | 15307 | |
3e0be4ab GM |
15308 | while (wait(&status) != child) |
15309 | ; | |
15310 | return ( | |
15311 | /* Was there some problem with vforking? */ | |
15312 | child < 0 | |
15313 | ||
15314 | /* Did the child fail? (This shouldn't happen.) */ | |
15315 | || status | |
4fda9c95 | 15316 | |
3e0be4ab GM |
15317 | /* Did the vfork/compiler bug occur? */ |
15318 | || parent != getpid() | |
15319 | ||
15320 | /* Did the file descriptor bug occur? */ | |
15321 | || fstat(fileno(stdout), &st) != 0 | |
15322 | ); | |
15323 | } | |
15324 | } | |
4fda9c95 | 15325 | _ACEOF |
3e0be4ab GM |
15326 | if ac_fn_c_try_run "$LINENO"; then : |
15327 | ac_cv_func_vfork_works=yes | |
15328 | else | |
15329 | ac_cv_func_vfork_works=no | |
15330 | fi | |
15331 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
15332 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
15333 | fi | |
4fda9c95 | 15334 | |
3e0be4ab GM |
15335 | fi |
15336 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 | |
15337 | $as_echo "$ac_cv_func_vfork_works" >&6; } | |
4fda9c95 | 15338 | |
3e0be4ab GM |
15339 | fi; |
15340 | if test "x$ac_cv_func_fork_works" = xcross; then | |
15341 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
15342 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 | |
15343 | $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} | |
4fda9c95 | 15344 | fi |
4fda9c95 | 15345 | |
3e0be4ab | 15346 | if test "x$ac_cv_func_vfork_works" = xyes; then |
4fda9c95 | 15347 | |
3e0be4ab | 15348 | $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h |
4fda9c95 | 15349 | |
3e0be4ab | 15350 | else |
4fda9c95 | 15351 | |
3e0be4ab | 15352 | $as_echo "#define vfork fork" >>confdefs.h |
4fda9c95 | 15353 | |
3e0be4ab GM |
15354 | fi |
15355 | if test "x$ac_cv_func_fork_works" = xyes; then | |
4fda9c95 | 15356 | |
3e0be4ab | 15357 | $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h |
4fda9c95 | 15358 | |
3e0be4ab | 15359 | fi |
4fda9c95 GM |
15360 | |
15361 | ||
3e0be4ab GM |
15362 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 |
15363 | $as_echo_n "checking for nl_langinfo and CODESET... " >&6; } | |
15364 | if test "${emacs_cv_langinfo_codeset+set}" = set; then : | |
15365 | $as_echo_n "(cached) " >&6 | |
15366 | else | |
15367 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15368 | /* end confdefs.h. */ | |
15369 | #include <langinfo.h> | |
15370 | int | |
15371 | main () | |
15372 | { | |
15373 | char* cs = nl_langinfo(CODESET); | |
15374 | ; | |
15375 | return 0; | |
15376 | } | |
15377 | _ACEOF | |
15378 | if ac_fn_c_try_link "$LINENO"; then : | |
15379 | emacs_cv_langinfo_codeset=yes | |
15380 | else | |
15381 | emacs_cv_langinfo_codeset=no | |
15382 | fi | |
15383 | rm -f core conftest.err conftest.$ac_objext \ | |
15384 | conftest$ac_exeext conftest.$ac_ext | |
4fda9c95 | 15385 | |
3e0be4ab GM |
15386 | fi |
15387 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_langinfo_codeset" >&5 | |
15388 | $as_echo "$emacs_cv_langinfo_codeset" >&6; } | |
15389 | if test $emacs_cv_langinfo_codeset = yes; then | |
4fda9c95 | 15390 | |
3e0be4ab | 15391 | $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h |
4fda9c95 | 15392 | |
3e0be4ab | 15393 | fi |
4fda9c95 | 15394 | |
3e0be4ab GM |
15395 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5 |
15396 | $as_echo_n "checking for mbstate_t... " >&6; } | |
15397 | if test "${ac_cv_type_mbstate_t+set}" = set; then : | |
15398 | $as_echo_n "(cached) " >&6 | |
15399 | else | |
15400 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15401 | /* end confdefs.h. */ | |
15402 | $ac_includes_default | |
15403 | # include <wchar.h> | |
15404 | int | |
15405 | main () | |
15406 | { | |
15407 | mbstate_t x; return sizeof x; | |
15408 | ; | |
15409 | return 0; | |
15410 | } | |
15411 | _ACEOF | |
15412 | if ac_fn_c_try_compile "$LINENO"; then : | |
15413 | ac_cv_type_mbstate_t=yes | |
15414 | else | |
15415 | ac_cv_type_mbstate_t=no | |
15416 | fi | |
15417 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
15418 | fi | |
15419 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5 | |
15420 | $as_echo "$ac_cv_type_mbstate_t" >&6; } | |
15421 | if test $ac_cv_type_mbstate_t = yes; then | |
4fda9c95 | 15422 | |
3e0be4ab | 15423 | $as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h |
4fda9c95 | 15424 | |
3e0be4ab | 15425 | else |
4fda9c95 | 15426 | |
3e0be4ab | 15427 | $as_echo "#define mbstate_t int" >>confdefs.h |
4fda9c95 | 15428 | |
3e0be4ab | 15429 | fi |
4fda9c95 | 15430 | |
3e0be4ab GM |
15431 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C restricted array declarations" >&5 |
15432 | $as_echo_n "checking for C restricted array declarations... " >&6; } | |
15433 | if test "${emacs_cv_c_restrict_arr+set}" = set; then : | |
15434 | $as_echo_n "(cached) " >&6 | |
15435 | else | |
15436 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15437 | /* end confdefs.h. */ | |
15438 | void fred (int x[__restrict]); | |
15439 | int | |
15440 | main () | |
15441 | { | |
4fda9c95 | 15442 | |
3e0be4ab GM |
15443 | ; |
15444 | return 0; | |
15445 | } | |
15446 | _ACEOF | |
15447 | if ac_fn_c_try_compile "$LINENO"; then : | |
15448 | emacs_cv_c_restrict_arr=yes | |
15449 | else | |
15450 | emacs_cv_c_restrict_arr=no | |
15451 | fi | |
15452 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
15453 | fi | |
15454 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_c_restrict_arr" >&5 | |
15455 | $as_echo "$emacs_cv_c_restrict_arr" >&6; } | |
15456 | if test "$emacs_cv_c_restrict_arr" = yes; then | |
4fda9c95 | 15457 | |
3e0be4ab | 15458 | $as_echo "#define __restrict_arr __restrict" >>confdefs.h |
4fda9c95 | 15459 | |
3e0be4ab | 15460 | fi |
4fda9c95 GM |
15461 | |
15462 | ||
15463 | ||
3e0be4ab GM |
15464 | # Set up the CFLAGS for real compilation, so we can substitute it. |
15465 | CFLAGS="$REAL_CFLAGS" | |
15466 | CPPFLAGS="$REAL_CPPFLAGS" | |
4fda9c95 | 15467 | |
3e0be4ab GM |
15468 | ## Hack to detect a buggy GCC version. |
15469 | if test "x$GCC" = xyes \ | |
15470 | && test x"`$CC --version 2> /dev/null | grep 'gcc.* 4.5.0'`" != x \ | |
15471 | && test x"`echo $CFLAGS | grep '\-O[23]'`" != x \ | |
15472 | && test x"`echo $CFLAGS | grep '\-fno-optimize-sibling-calls'`" = x; then | |
15473 | as_fn_error "GCC 4.5.0 has problems compiling Emacs; see etc/PROBLEMS'." "$LINENO" 5 | |
15474 | fi | |
4fda9c95 | 15475 | |
3e0be4ab | 15476 | version=$PACKAGE_VERSION |
4fda9c95 | 15477 | |
3e0be4ab GM |
15478 | ### Specify what sort of things we'll be editing into Makefile and config.h. |
15479 | ### Use configuration here uncanonicalized to avoid exceeding size limits. | |
4fda9c95 | 15480 | |
4fda9c95 | 15481 | |
3e0be4ab | 15482 | ## Unused? |
4fda9c95 GM |
15483 | |
15484 | ||
4fda9c95 | 15485 | |
4fda9c95 GM |
15486 | |
15487 | ||
15488 | ||
15489 | ||
4fda9c95 GM |
15490 | |
15491 | ||
4fda9c95 GM |
15492 | |
15493 | ||
4fda9c95 GM |
15494 | |
15495 | ||
4fda9c95 GM |
15496 | |
15497 | ||
4fda9c95 | 15498 | |
4fda9c95 | 15499 | |
4fda9c95 | 15500 | |
4fda9c95 | 15501 | |
4fda9c95 | 15502 | |
3e0be4ab GM |
15503 | ## FIXME? Nothing uses @LD_SWITCH_X_SITE@. |
15504 | ## src/Makefile.in did add LD_SWITCH_X_SITE (as a cpp define) to the | |
15505 | ## end of LIBX_BASE, but nothing ever set it. | |
15506 | ||
15507 | ||
15508 | ||
4fda9c95 | 15509 | |
3e0be4ab GM |
15510 | ## Used in lwlib/Makefile.in. |
15511 | ||
15512 | if test -n "${machfile}"; then | |
15513 | M_FILE="\$(srcdir)/${machfile}" | |
4fda9c95 | 15514 | else |
3e0be4ab GM |
15515 | M_FILE= |
15516 | fi | |
15517 | S_FILE="\$(srcdir)/${opsysfile}" | |
4fda9c95 GM |
15518 | |
15519 | ||
4fda9c95 GM |
15520 | |
15521 | ||
4fda9c95 GM |
15522 | |
15523 | ||
4fda9c95 | 15524 | |
4fda9c95 | 15525 | |
4fda9c95 | 15526 | |
3e0be4ab GM |
15527 | |
15528 | cat >>confdefs.h <<_ACEOF | |
15529 | #define EMACS_CONFIGURATION "${canonical}" | |
4fda9c95 | 15530 | _ACEOF |
4fda9c95 GM |
15531 | |
15532 | ||
3e0be4ab GM |
15533 | cat >>confdefs.h <<_ACEOF |
15534 | #define EMACS_CONFIG_OPTIONS "${ac_configure_args}" | |
15535 | _ACEOF | |
15536 | ||
15537 | if test -n "$machfile"; then | |
15538 | ||
15539 | cat >>confdefs.h <<_ACEOF | |
15540 | #define config_machfile "${machfile}" | |
15541 | _ACEOF | |
4fda9c95 GM |
15542 | |
15543 | fi | |
3e0be4ab GM |
15544 | |
15545 | cat >>confdefs.h <<_ACEOF | |
15546 | #define config_opsysfile "${opsysfile}" | |
4fda9c95 GM |
15547 | _ACEOF |
15548 | ||
3e0be4ab GM |
15549 | |
15550 | XMENU_OBJ= | |
15551 | XOBJ= | |
15552 | FONT_OBJ= | |
15553 | if test "${HAVE_X_WINDOWS}" = "yes" ; then | |
15554 | ||
15555 | $as_echo "#define HAVE_X_WINDOWS 1" >>confdefs.h | |
15556 | ||
15557 | XMENU_OBJ=xmenu.o | |
15558 | XOBJ="xterm.o xfns.o xselect.o xrdb.o fontset.o xsmfns.o fringe.o image.o xsettings.o xgselect.o" | |
15559 | FONT_OBJ=xfont.o | |
15560 | if test "$HAVE_XFT" = "yes"; then | |
15561 | FONT_OBJ="$FONT_OBJ ftfont.o xftfont.o ftxfont.o" | |
15562 | elif test "$HAVE_FREETYPE" = "yes"; then | |
15563 | FONT_OBJ="$FONT_OBJ ftfont.o ftxfont.o" | |
15564 | fi | |
15565 | ||
4fda9c95 GM |
15566 | fi |
15567 | ||
4fda9c95 | 15568 | |
4fda9c95 | 15569 | |
4fda9c95 | 15570 | |
3e0be4ab GM |
15571 | WIDGET_OBJ= |
15572 | MOTIF_LIBW= | |
15573 | if test "${USE_X_TOOLKIT}" != "none" ; then | |
15574 | WIDGET_OBJ=widget.o | |
15575 | ||
15576 | $as_echo "#define USE_X_TOOLKIT 1" >>confdefs.h | |
4fda9c95 | 15577 | |
3e0be4ab | 15578 | if test "${USE_X_TOOLKIT}" = "LUCID"; then |
4fda9c95 | 15579 | |
3e0be4ab | 15580 | $as_echo "#define USE_LUCID 1" >>confdefs.h |
4fda9c95 | 15581 | |
3e0be4ab | 15582 | elif test "${USE_X_TOOLKIT}" = "MOTIF"; then |
4fda9c95 | 15583 | |
3e0be4ab | 15584 | $as_echo "#define USE_MOTIF 1" >>confdefs.h |
4fda9c95 | 15585 | |
3e0be4ab GM |
15586 | MOTIF_LIBW=-lXm |
15587 | case "$opsys" in | |
15588 | gnu-linux) | |
15589 | ## Paul Abrahams <abrahams at equinox.shaysnet.com> says this is needed. | |
15590 | MOTIF_LIBW="$MOTIF_LIBW -lXpm" | |
15591 | ;; | |
15592 | ||
15593 | unixware) | |
15594 | ## Richard Anthony Ryan <ryanr at ellingtn.ftc.nrcs.usda.gov> | |
15595 | ## says -lXimp is needed in UNIX_SV ... 4.2 1.1.2. | |
15596 | MOTIF_LIBW="MOTIF_LIBW -lXimp" | |
15597 | ;; | |
15598 | ||
15599 | aix4-2) | |
15600 | ## olson@mcs.anl.gov says -li18n is needed by -lXm. | |
15601 | MOTIF_LIBW="$MOTIF_LIBW -li18n" | |
15602 | ;; | |
15603 | esac | |
15604 | MOTIF_LIBW="$MOTIF_LIBW $LIBXP" | |
15605 | fi | |
15606 | fi | |
15607 | ||
15608 | ||
15609 | TOOLKIT_LIBW= | |
15610 | case "$USE_X_TOOLKIT" in | |
15611 | MOTIF) TOOLKIT_LIBW="$MOTIF_LIBW" ;; | |
15612 | LUCID) TOOLKIT_LIBW="$LUCID_LIBW" ;; | |
15613 | none) test "x$HAVE_GTK" = "xyes" && TOOLKIT_LIBW="$GTK_LIBS" ;; | |
15614 | esac | |
15615 | ||
15616 | ||
15617 | if test "$USE_X_TOOLKIT" = "none"; then | |
15618 | LIBXT_OTHER="\$(LIBXSM)" | |
15619 | OLDXMENU_TARGET="really-oldXMenu" | |
4fda9c95 | 15620 | else |
3e0be4ab GM |
15621 | LIBXT_OTHER="\$(LIBXMU) -lXt \$(LIBXTR6) -lXext" |
15622 | OLDXMENU_TARGET="really-lwlib" | |
15623 | fi | |
4fda9c95 | 15624 | |
4fda9c95 | 15625 | |
3e0be4ab GM |
15626 | ## The X Menu stuff is present in the X10 distribution, but missing |
15627 | ## from X11. If we have X10, just use the installed library; | |
15628 | ## otherwise, use our own copy. | |
15629 | if test "${HAVE_X11}" = "yes" ; then | |
15630 | ||
15631 | $as_echo "#define HAVE_X11 1" >>confdefs.h | |
15632 | ||
15633 | ||
15634 | if test "$USE_X_TOOLKIT" = "none"; then | |
15635 | OLDXMENU="\${oldXMenudir}/libXMenu11.a" | |
15636 | else | |
15637 | OLDXMENU="\${lwlibdir}/liblw.a" | |
15638 | fi | |
15639 | LIBXMENU="\$(OLDXMENU)" | |
15640 | LIBX_OTHER="\$(LIBXT) \$(LIBX_EXTRA)" | |
15641 | OLDXMENU_DEPS="\${OLDXMENU} ../src/\${OLDXMENU}" | |
4fda9c95 | 15642 | else |
3e0be4ab GM |
15643 | ## For a syntactically valid Makefile; not actually used for anything. |
15644 | ## See comments in src/Makefile.in. | |
15645 | OLDXMENU=nothing | |
15646 | ## FIXME This case (!HAVE_X11 && HAVE_X_WINDOWS) is no longer possible(?). | |
15647 | if test "${HAVE_X_WINDOWS}" = "yes"; then | |
15648 | LIBXMENU="-lXMenu" | |
15649 | else | |
15650 | LIBXMENU= | |
15651 | fi | |
15652 | LIBX_OTHER= | |
15653 | OLDXMENU_DEPS= | |
4fda9c95 GM |
15654 | fi |
15655 | ||
3e0be4ab GM |
15656 | if test "$HAVE_GTK" = "yes" || test "$HAVE_MENUS" != "yes"; then |
15657 | OLDXMENU_TARGET= | |
15658 | OLDXMENU=nothing | |
15659 | LIBXMENU= | |
15660 | OLDXMENU_DEPS= | |
15661 | fi | |
15662 | ||
15663 | ||
15664 | ||
15665 | ||
15666 | ||
15667 | ||
15668 | ||
15669 | if test "${HAVE_MENUS}" = "yes" ; then | |
15670 | ||
15671 | $as_echo "#define HAVE_MENUS 1" >>confdefs.h | |
4fda9c95 GM |
15672 | |
15673 | fi | |
4fda9c95 | 15674 | |
3e0be4ab | 15675 | if test "${GNU_MALLOC}" = "yes" ; then |
4fda9c95 | 15676 | |
3e0be4ab | 15677 | $as_echo "#define GNU_MALLOC 1" >>confdefs.h |
4fda9c95 | 15678 | |
3e0be4ab | 15679 | fi |
4fda9c95 | 15680 | |
3e0be4ab GM |
15681 | RALLOC_OBJ= |
15682 | if test "${REL_ALLOC}" = "yes" ; then | |
4fda9c95 | 15683 | |
3e0be4ab | 15684 | $as_echo "#define REL_ALLOC 1" >>confdefs.h |
4fda9c95 | 15685 | |
4fda9c95 | 15686 | |
3e0be4ab | 15687 | test "$system_malloc" != "yes" && RALLOC_OBJ=ralloc.o |
4fda9c95 GM |
15688 | fi |
15689 | ||
4fda9c95 | 15690 | |
3e0be4ab GM |
15691 | if test "$opsys" = "cygwin"; then |
15692 | CYGWIN_OBJ="sheap.o" | |
15693 | ## Cygwin differs because of its unexec(). | |
15694 | PRE_ALLOC_OBJ= | |
15695 | POST_ALLOC_OBJ=lastfile.o | |
15696 | else | |
15697 | CYGWIN_OBJ= | |
15698 | PRE_ALLOC_OBJ=lastfile.o | |
15699 | POST_ALLOC_OBJ= | |
4fda9c95 | 15700 | fi |
4fda9c95 | 15701 | |
4fda9c95 GM |
15702 | |
15703 | ||
15704 | ||
3e0be4ab | 15705 | # Configure gnulib here, now that we know LIBS. |
4fda9c95 | 15706 | |
3e0be4ab GM |
15707 | |
15708 | ||
15709 | ||
15710 | ||
15711 | ||
15712 | ||
15713 | ||
15714 | ||
15715 | ||
15716 | LIBC_FATAL_STDERR_=1 | |
15717 | export LIBC_FATAL_STDERR_ | |
15718 | ||
15719 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works | |
15720 | # for constant arguments. Useless! | |
15721 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 | |
15722 | $as_echo_n "checking for working alloca.h... " >&6; } | |
15723 | if test "${ac_cv_working_alloca_h+set}" = set; then : | |
4fda9c95 GM |
15724 | $as_echo_n "(cached) " >&6 |
15725 | else | |
15726 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15727 | /* end confdefs.h. */ | |
3e0be4ab | 15728 | #include <alloca.h> |
4fda9c95 GM |
15729 | int |
15730 | main () | |
15731 | { | |
3e0be4ab GM |
15732 | char *p = (char *) alloca (2 * sizeof (int)); |
15733 | if (p) return 0; | |
4fda9c95 GM |
15734 | ; |
15735 | return 0; | |
15736 | } | |
15737 | _ACEOF | |
3e0be4ab GM |
15738 | if ac_fn_c_try_link "$LINENO"; then : |
15739 | ac_cv_working_alloca_h=yes | |
4fda9c95 | 15740 | else |
3e0be4ab | 15741 | ac_cv_working_alloca_h=no |
4fda9c95 | 15742 | fi |
3e0be4ab GM |
15743 | rm -f core conftest.err conftest.$ac_objext \ |
15744 | conftest$ac_exeext conftest.$ac_ext | |
4fda9c95 | 15745 | fi |
3e0be4ab GM |
15746 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 |
15747 | $as_echo "$ac_cv_working_alloca_h" >&6; } | |
15748 | if test $ac_cv_working_alloca_h = yes; then | |
4fda9c95 | 15749 | |
3e0be4ab | 15750 | $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h |
4fda9c95 | 15751 | |
3e0be4ab | 15752 | fi |
4fda9c95 | 15753 | |
3e0be4ab GM |
15754 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 |
15755 | $as_echo_n "checking for alloca... " >&6; } | |
15756 | if test "${ac_cv_func_alloca_works+set}" = set; then : | |
4fda9c95 GM |
15757 | $as_echo_n "(cached) " >&6 |
15758 | else | |
3e0be4ab | 15759 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
4fda9c95 | 15760 | /* end confdefs.h. */ |
3e0be4ab GM |
15761 | #ifdef __GNUC__ |
15762 | # define alloca __builtin_alloca | |
15763 | #else | |
15764 | # ifdef _MSC_VER | |
15765 | # include <malloc.h> | |
15766 | # define alloca _alloca | |
15767 | # else | |
15768 | # ifdef HAVE_ALLOCA_H | |
15769 | # include <alloca.h> | |
15770 | # else | |
15771 | # ifdef _AIX | |
15772 | #pragma alloca | |
15773 | # else | |
15774 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
15775 | char *alloca (); | |
15776 | # endif | |
15777 | # endif | |
15778 | # endif | |
15779 | # endif | |
15780 | #endif | |
4fda9c95 | 15781 | |
4fda9c95 GM |
15782 | int |
15783 | main () | |
15784 | { | |
3e0be4ab GM |
15785 | char *p = (char *) alloca (1); |
15786 | if (p) return 0; | |
4fda9c95 GM |
15787 | ; |
15788 | return 0; | |
15789 | } | |
15790 | _ACEOF | |
3e0be4ab GM |
15791 | if ac_fn_c_try_link "$LINENO"; then : |
15792 | ac_cv_func_alloca_works=yes | |
15793 | else | |
15794 | ac_cv_func_alloca_works=no | |
4fda9c95 | 15795 | fi |
3e0be4ab GM |
15796 | rm -f core conftest.err conftest.$ac_objext \ |
15797 | conftest$ac_exeext conftest.$ac_ext | |
4fda9c95 | 15798 | fi |
3e0be4ab GM |
15799 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 |
15800 | $as_echo "$ac_cv_func_alloca_works" >&6; } | |
4fda9c95 | 15801 | |
3e0be4ab | 15802 | if test $ac_cv_func_alloca_works = yes; then |
4fda9c95 | 15803 | |
3e0be4ab | 15804 | $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h |
4fda9c95 | 15805 | |
3e0be4ab GM |
15806 | else |
15807 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
15808 | # that cause trouble. Some versions do not even contain alloca or | |
15809 | # contain a buggy version. If you still want to use their alloca, | |
15810 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
4fda9c95 GM |
15811 | |
15812 | ||
3e0be4ab GM |
15813 | |
15814 | ||
15815 | ||
15816 | ALLOCA=\${LIBOBJDIR}alloca.$ac_objext | |
15817 | ||
15818 | $as_echo "#define C_ALLOCA 1" >>confdefs.h | |
15819 | ||
15820 | ||
15821 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 | |
15822 | $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } | |
15823 | if test "${ac_cv_os_cray+set}" = set; then : | |
4fda9c95 GM |
15824 | $as_echo_n "(cached) " >&6 |
15825 | else | |
3e0be4ab | 15826 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
4fda9c95 | 15827 | /* end confdefs.h. */ |
3e0be4ab GM |
15828 | #if defined CRAY && ! defined CRAY2 |
15829 | webecray | |
15830 | #else | |
15831 | wenotbecray | |
15832 | #endif | |
4fda9c95 | 15833 | |
3e0be4ab GM |
15834 | _ACEOF |
15835 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
15836 | $EGREP "webecray" >/dev/null 2>&1; then : | |
15837 | ac_cv_os_cray=yes | |
15838 | else | |
15839 | ac_cv_os_cray=no | |
15840 | fi | |
15841 | rm -f conftest* | |
4fda9c95 | 15842 | |
3e0be4ab GM |
15843 | fi |
15844 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 | |
15845 | $as_echo "$ac_cv_os_cray" >&6; } | |
15846 | if test $ac_cv_os_cray = yes; then | |
15847 | for ac_func in _getb67 GETB67 getb67; do | |
15848 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
15849 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
15850 | eval as_val=\$$as_ac_var | |
15851 | if test "x$as_val" = x""yes; then : | |
15852 | ||
15853 | cat >>confdefs.h <<_ACEOF | |
15854 | #define CRAY_STACKSEG_END $ac_func | |
15855 | _ACEOF | |
15856 | ||
15857 | break | |
15858 | fi | |
15859 | ||
15860 | done | |
15861 | fi | |
15862 | ||
15863 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 | |
15864 | $as_echo_n "checking stack direction for C alloca... " >&6; } | |
15865 | if test "${ac_cv_c_stack_direction+set}" = set; then : | |
15866 | $as_echo_n "(cached) " >&6 | |
15867 | else | |
15868 | if test "$cross_compiling" = yes; then : | |
15869 | ac_cv_c_stack_direction=0 | |
15870 | else | |
15871 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15872 | /* end confdefs.h. */ | |
15873 | $ac_includes_default | |
4fda9c95 | 15874 | int |
3e0be4ab | 15875 | find_stack_direction (int *addr, int depth) |
4fda9c95 | 15876 | { |
3e0be4ab GM |
15877 | int dir, dummy = 0; |
15878 | if (! addr) | |
15879 | addr = &dummy; | |
15880 | *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1; | |
15881 | dir = depth ? find_stack_direction (addr, depth - 1) : 0; | |
15882 | return dir + dummy; | |
15883 | } | |
4fda9c95 | 15884 | |
3e0be4ab GM |
15885 | int |
15886 | main (int argc, char **argv) | |
15887 | { | |
15888 | return find_stack_direction (0, argc + !argv + 20) < 0; | |
4fda9c95 GM |
15889 | } |
15890 | _ACEOF | |
3e0be4ab GM |
15891 | if ac_fn_c_try_run "$LINENO"; then : |
15892 | ac_cv_c_stack_direction=1 | |
15893 | else | |
15894 | ac_cv_c_stack_direction=-1 | |
4fda9c95 | 15895 | fi |
3e0be4ab GM |
15896 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
15897 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
4fda9c95 | 15898 | fi |
3e0be4ab GM |
15899 | |
15900 | fi | |
15901 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 | |
15902 | $as_echo "$ac_cv_c_stack_direction" >&6; } | |
15903 | cat >>confdefs.h <<_ACEOF | |
15904 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
4fda9c95 GM |
15905 | _ACEOF |
15906 | ||
da6c8463 | 15907 | |
3e0be4ab | 15908 | fi |
da6c8463 GM |
15909 | |
15910 | ||
15911 | ||
15912 | ||
3e0be4ab GM |
15913 | for ac_func in $ac_func_list |
15914 | do : | |
15915 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
15916 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
15917 | eval as_val=\$$as_ac_var | |
15918 | if test "x$as_val" = x""yes; then : | |
15919 | cat >>confdefs.h <<_ACEOF | |
15920 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
15921 | _ACEOF | |
da6c8463 | 15922 | |
3e0be4ab GM |
15923 | fi |
15924 | done | |
da6c8463 GM |
15925 | |
15926 | ||
15927 | ||
15928 | ||
3e0be4ab GM |
15929 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 |
15930 | $as_echo_n "checking whether byte ordering is bigendian... " >&6; } | |
15931 | if test "${ac_cv_c_bigendian+set}" = set; then : | |
da6c8463 GM |
15932 | $as_echo_n "(cached) " >&6 |
15933 | else | |
3e0be4ab GM |
15934 | ac_cv_c_bigendian=unknown |
15935 | # See if we're dealing with a universal compiler. | |
15936 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
da6c8463 | 15937 | /* end confdefs.h. */ |
3e0be4ab GM |
15938 | #ifndef __APPLE_CC__ |
15939 | not a universal capable compiler | |
15940 | #endif | |
15941 | typedef int dummy; | |
da6c8463 GM |
15942 | |
15943 | _ACEOF | |
3e0be4ab | 15944 | if ac_fn_c_try_compile "$LINENO"; then : |
da6c8463 | 15945 | |
3e0be4ab GM |
15946 | # Check for potential -arch flags. It is not universal unless |
15947 | # there are at least two -arch flags with different values. | |
15948 | ac_arch= | |
15949 | ac_prev= | |
15950 | for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do | |
15951 | if test -n "$ac_prev"; then | |
15952 | case $ac_word in | |
15953 | i?86 | x86_64 | ppc | ppc64) | |
15954 | if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then | |
15955 | ac_arch=$ac_word | |
15956 | else | |
15957 | ac_cv_c_bigendian=universal | |
15958 | break | |
15959 | fi | |
15960 | ;; | |
15961 | esac | |
15962 | ac_prev= | |
15963 | elif test "x$ac_word" = "x-arch"; then | |
15964 | ac_prev=arch | |
15965 | fi | |
15966 | done | |
da6c8463 | 15967 | fi |
3e0be4ab GM |
15968 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
15969 | if test $ac_cv_c_bigendian = unknown; then | |
15970 | # See if sys/param.h defines the BYTE_ORDER macro. | |
15971 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15972 | /* end confdefs.h. */ | |
15973 | #include <sys/types.h> | |
15974 | #include <sys/param.h> | |
ce4331ef | 15975 | |
3e0be4ab GM |
15976 | int |
15977 | main () | |
15978 | { | |
15979 | #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ | |
15980 | && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ | |
15981 | && LITTLE_ENDIAN) | |
15982 | bogus endian macros | |
15983 | #endif | |
ce4331ef | 15984 | |
3e0be4ab GM |
15985 | ; |
15986 | return 0; | |
15987 | } | |
15988 | _ACEOF | |
15989 | if ac_fn_c_try_compile "$LINENO"; then : | |
15990 | # It does; now see whether it defined to BIG_ENDIAN or not. | |
15991 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4fda9c95 | 15992 | /* end confdefs.h. */ |
3e0be4ab GM |
15993 | #include <sys/types.h> |
15994 | #include <sys/param.h> | |
15995 | ||
4fda9c95 GM |
15996 | int |
15997 | main () | |
15998 | { | |
3e0be4ab GM |
15999 | #if BYTE_ORDER != BIG_ENDIAN |
16000 | not big endian | |
16001 | #endif | |
ce4331ef | 16002 | |
4fda9c95 GM |
16003 | ; |
16004 | return 0; | |
16005 | } | |
16006 | _ACEOF | |
3e0be4ab GM |
16007 | if ac_fn_c_try_compile "$LINENO"; then : |
16008 | ac_cv_c_bigendian=yes | |
ae0d7250 | 16009 | else |
3e0be4ab | 16010 | ac_cv_c_bigendian=no |
ae0d7250 | 16011 | fi |
3e0be4ab | 16012 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
ae0d7250 | 16013 | fi |
3e0be4ab GM |
16014 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
16015 | fi | |
16016 | if test $ac_cv_c_bigendian = unknown; then | |
16017 | # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). | |
16018 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16019 | /* end confdefs.h. */ | |
16020 | #include <limits.h> | |
ae0d7250 | 16021 | |
3e0be4ab GM |
16022 | int |
16023 | main () | |
16024 | { | |
16025 | #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) | |
16026 | bogus endian macros | |
16027 | #endif | |
ae0d7250 | 16028 | |
3e0be4ab GM |
16029 | ; |
16030 | return 0; | |
16031 | } | |
6ad6792b | 16032 | _ACEOF |
3e0be4ab GM |
16033 | if ac_fn_c_try_compile "$LINENO"; then : |
16034 | # It does; now see whether it defined to _BIG_ENDIAN or not. | |
16035 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1f5d53eb | 16036 | /* end confdefs.h. */ |
3e0be4ab | 16037 | #include <limits.h> |
4fda9c95 | 16038 | |
5f90be1b PE |
16039 | int |
16040 | main () | |
16041 | { | |
3e0be4ab GM |
16042 | #ifndef _BIG_ENDIAN |
16043 | not big endian | |
16044 | #endif | |
4fda9c95 | 16045 | |
5f90be1b PE |
16046 | ; |
16047 | return 0; | |
16048 | } | |
5f90be1b | 16049 | _ACEOF |
4fda9c95 | 16050 | if ac_fn_c_try_compile "$LINENO"; then : |
3e0be4ab | 16051 | ac_cv_c_bigendian=yes |
5f90be1b | 16052 | else |
3e0be4ab | 16053 | ac_cv_c_bigendian=no |
5f90be1b | 16054 | fi |
4fda9c95 | 16055 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5f90be1b | 16056 | fi |
3e0be4ab GM |
16057 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
16058 | fi | |
16059 | if test $ac_cv_c_bigendian = unknown; then | |
16060 | # Compile a test program. | |
16061 | if test "$cross_compiling" = yes; then : | |
16062 | # Try to guess by grepping values from an object file. | |
16063 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16064 | /* end confdefs.h. */ | |
16065 | short int ascii_mm[] = | |
16066 | { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; | |
16067 | short int ascii_ii[] = | |
16068 | { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; | |
16069 | int use_ascii (int i) { | |
16070 | return ascii_mm[i] + ascii_ii[i]; | |
16071 | } | |
16072 | short int ebcdic_ii[] = | |
16073 | { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; | |
16074 | short int ebcdic_mm[] = | |
16075 | { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; | |
16076 | int use_ebcdic (int i) { | |
16077 | return ebcdic_mm[i] + ebcdic_ii[i]; | |
16078 | } | |
16079 | extern int foo; | |
5f90be1b | 16080 | |
3e0be4ab GM |
16081 | int |
16082 | main () | |
16083 | { | |
16084 | return use_ascii (foo) == use_ebcdic (foo); | |
16085 | ; | |
16086 | return 0; | |
16087 | } | |
4fda9c95 | 16088 | _ACEOF |
3e0be4ab GM |
16089 | if ac_fn_c_try_compile "$LINENO"; then : |
16090 | if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then | |
16091 | ac_cv_c_bigendian=yes | |
16092 | fi | |
16093 | if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then | |
16094 | if test "$ac_cv_c_bigendian" = unknown; then | |
16095 | ac_cv_c_bigendian=no | |
16096 | else | |
16097 | # finding both strings is unlikely to happen, but who knows? | |
16098 | ac_cv_c_bigendian=unknown | |
16099 | fi | |
16100 | fi | |
16101 | fi | |
16102 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
16103 | else | |
16104 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16105 | /* end confdefs.h. */ | |
16106 | $ac_includes_default | |
16107 | int | |
16108 | main () | |
16109 | { | |
5f90be1b | 16110 | |
3e0be4ab GM |
16111 | /* Are we little or big endian? From Harbison&Steele. */ |
16112 | union | |
16113 | { | |
16114 | long int l; | |
16115 | char c[sizeof (long int)]; | |
16116 | } u; | |
16117 | u.l = 1; | |
16118 | return u.c[sizeof (long int) - 1] == 1; | |
4fda9c95 | 16119 | |
3e0be4ab GM |
16120 | ; |
16121 | return 0; | |
16122 | } | |
16123 | _ACEOF | |
16124 | if ac_fn_c_try_run "$LINENO"; then : | |
16125 | ac_cv_c_bigendian=no | |
16126 | else | |
16127 | ac_cv_c_bigendian=yes | |
16128 | fi | |
16129 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
16130 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
4fda9c95 | 16131 | fi |
5f90be1b | 16132 | |
3e0be4ab GM |
16133 | fi |
16134 | fi | |
16135 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 | |
16136 | $as_echo "$ac_cv_c_bigendian" >&6; } | |
16137 | case $ac_cv_c_bigendian in #( | |
16138 | yes) | |
16139 | $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h | |
16140 | ;; #( | |
16141 | no) | |
16142 | ;; #( | |
16143 | universal) | |
5f90be1b | 16144 | |
3e0be4ab | 16145 | $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h |
5f90be1b | 16146 | |
3e0be4ab GM |
16147 | ;; #( |
16148 | *) | |
16149 | as_fn_error "unknown endianness | |
16150 | presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; | |
16151 | esac | |
4fda9c95 GM |
16152 | |
16153 | ||
3e0be4ab GM |
16154 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 |
16155 | $as_echo_n "checking for inline... " >&6; } | |
16156 | if test "${ac_cv_c_inline+set}" = set; then : | |
5f90be1b | 16157 | $as_echo_n "(cached) " >&6 |
5f90be1b | 16158 | else |
3e0be4ab GM |
16159 | ac_cv_c_inline=no |
16160 | for ac_kw in inline __inline__ __inline; do | |
5f90be1b PE |
16161 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
16162 | /* end confdefs.h. */ | |
3e0be4ab GM |
16163 | #ifndef __cplusplus |
16164 | typedef int foo_t; | |
16165 | static $ac_kw foo_t static_foo () {return 0; } | |
16166 | $ac_kw foo_t foo () {return 0; } | |
16167 | #endif | |
4fda9c95 | 16168 | |
5f90be1b | 16169 | _ACEOF |
4fda9c95 | 16170 | if ac_fn_c_try_compile "$LINENO"; then : |
3e0be4ab | 16171 | ac_cv_c_inline=$ac_kw |
5f90be1b | 16172 | fi |
4fda9c95 | 16173 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3e0be4ab GM |
16174 | test "$ac_cv_c_inline" != no && break |
16175 | done | |
5f90be1b | 16176 | |
3e0be4ab GM |
16177 | fi |
16178 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 | |
16179 | $as_echo "$ac_cv_c_inline" >&6; } | |
5f90be1b | 16180 | |
3e0be4ab GM |
16181 | case $ac_cv_c_inline in |
16182 | inline | yes) ;; | |
16183 | *) | |
16184 | case $ac_cv_c_inline in | |
16185 | no) ac_val=;; | |
16186 | *) ac_val=$ac_cv_c_inline;; | |
16187 | esac | |
16188 | cat >>confdefs.h <<_ACEOF | |
16189 | #ifndef __cplusplus | |
16190 | #define inline $ac_val | |
16191 | #endif | |
16192 | _ACEOF | |
16193 | ;; | |
16194 | esac | |
5f90be1b PE |
16195 | |
16196 | ||
3e0be4ab GM |
16197 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtold conforms to C99" >&5 |
16198 | $as_echo_n "checking whether strtold conforms to C99... " >&6; } | |
16199 | if test "${gl_cv_func_c99_strtold+set}" = set; then : | |
16200 | $as_echo_n "(cached) " >&6 | |
16201 | else | |
16202 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16203 | /* end confdefs.h. */ | |
16204 | /* On HP-UX before 11.23, strtold returns a struct instead of | |
16205 | long double. Reject implementations like that, by requiring | |
16206 | compatibility with the C99 prototype. */ | |
16207 | #include <stdlib.h> | |
16208 | static long double (*p) (char const *, char **) = strtold; | |
16209 | static long double | |
16210 | test (char const *nptr, char **endptr) | |
16211 | { | |
16212 | long double r; | |
16213 | r = strtold (nptr, endptr); | |
16214 | return r; | |
16215 | } | |
16216 | int | |
16217 | main () | |
16218 | { | |
16219 | return test ("1.0", NULL) != 1 || p ("1.0", NULL) != 1; | |
16220 | ; | |
16221 | return 0; | |
16222 | } | |
16223 | _ACEOF | |
16224 | if ac_fn_c_try_link "$LINENO"; then : | |
16225 | gl_cv_func_c99_strtold=yes | |
16226 | else | |
16227 | gl_cv_func_c99_strtold=no | |
16228 | fi | |
16229 | rm -f core conftest.err conftest.$ac_objext \ | |
16230 | conftest$ac_exeext conftest.$ac_ext | |
16231 | fi | |
16232 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_c99_strtold" >&5 | |
16233 | $as_echo "$gl_cv_func_c99_strtold" >&6; } | |
16234 | if test $gl_cv_func_c99_strtold = yes; then | |
16235 | ||
16236 | $as_echo "#define HAVE_C99_STRTOLD 1" >>confdefs.h | |
16237 | ||
16238 | fi | |
16239 | ||
16240 | ||
16241 | GNULIB_CHOWN=0; | |
16242 | GNULIB_CLOSE=0; | |
16243 | GNULIB_DUP2=0; | |
16244 | GNULIB_DUP3=0; | |
16245 | GNULIB_ENVIRON=0; | |
16246 | GNULIB_EUIDACCESS=0; | |
16247 | GNULIB_FACCESSAT=0; | |
16248 | GNULIB_FCHDIR=0; | |
16249 | GNULIB_FCHOWNAT=0; | |
16250 | GNULIB_FSYNC=0; | |
16251 | GNULIB_FTRUNCATE=0; | |
16252 | GNULIB_GETCWD=0; | |
16253 | GNULIB_GETDOMAINNAME=0; | |
16254 | GNULIB_GETDTABLESIZE=0; | |
16255 | GNULIB_GETGROUPS=0; | |
16256 | GNULIB_GETHOSTNAME=0; | |
16257 | GNULIB_GETLOGIN=0; | |
16258 | GNULIB_GETLOGIN_R=0; | |
16259 | GNULIB_GETPAGESIZE=0; | |
16260 | GNULIB_GETUSERSHELL=0; | |
16261 | GNULIB_GROUP_MEMBER=0; | |
16262 | GNULIB_LCHOWN=0; | |
16263 | GNULIB_LINK=0; | |
16264 | GNULIB_LINKAT=0; | |
16265 | GNULIB_LSEEK=0; | |
16266 | GNULIB_PIPE=0; | |
16267 | GNULIB_PIPE2=0; | |
16268 | GNULIB_PREAD=0; | |
16269 | GNULIB_PWRITE=0; | |
16270 | GNULIB_READ=0; | |
16271 | GNULIB_READLINK=0; | |
16272 | GNULIB_READLINKAT=0; | |
16273 | GNULIB_RMDIR=0; | |
16274 | GNULIB_SLEEP=0; | |
16275 | GNULIB_SYMLINK=0; | |
16276 | GNULIB_SYMLINKAT=0; | |
16277 | GNULIB_TTYNAME_R=0; | |
16278 | GNULIB_UNISTD_H_GETOPT=0; | |
16279 | GNULIB_UNISTD_H_NONBLOCKING=0; | |
16280 | GNULIB_UNISTD_H_SIGPIPE=0; | |
16281 | GNULIB_UNLINK=0; | |
16282 | GNULIB_UNLINKAT=0; | |
16283 | GNULIB_USLEEP=0; | |
16284 | GNULIB_WRITE=0; | |
16285 | HAVE_CHOWN=1; | |
16286 | HAVE_DUP2=1; | |
16287 | HAVE_DUP3=1; | |
16288 | HAVE_EUIDACCESS=1; | |
16289 | HAVE_FACCESSAT=1; | |
16290 | HAVE_FCHDIR=1; | |
16291 | HAVE_FCHOWNAT=1; | |
16292 | HAVE_FSYNC=1; | |
16293 | HAVE_FTRUNCATE=1; | |
16294 | HAVE_GETDTABLESIZE=1; | |
16295 | HAVE_GETGROUPS=1; | |
16296 | HAVE_GETHOSTNAME=1; | |
16297 | HAVE_GETLOGIN=1; | |
16298 | HAVE_GETPAGESIZE=1; | |
16299 | HAVE_GROUP_MEMBER=1; | |
16300 | HAVE_LCHOWN=1; | |
16301 | HAVE_LINK=1; | |
16302 | HAVE_LINKAT=1; | |
16303 | HAVE_PIPE=1; | |
16304 | HAVE_PIPE2=1; | |
16305 | HAVE_PREAD=1; | |
16306 | HAVE_PWRITE=1; | |
16307 | HAVE_READLINK=1; | |
16308 | HAVE_READLINKAT=1; | |
16309 | HAVE_SLEEP=1; | |
16310 | HAVE_SYMLINK=1; | |
16311 | HAVE_SYMLINKAT=1; | |
16312 | HAVE_UNLINKAT=1; | |
16313 | HAVE_USLEEP=1; | |
16314 | HAVE_DECL_ENVIRON=1; | |
16315 | HAVE_DECL_FCHDIR=1; | |
16316 | HAVE_DECL_GETDOMAINNAME=1; | |
16317 | HAVE_DECL_GETLOGIN_R=1; | |
16318 | HAVE_DECL_GETPAGESIZE=1; | |
16319 | HAVE_DECL_GETUSERSHELL=1; | |
16320 | HAVE_DECL_TTYNAME_R=1; | |
16321 | HAVE_OS_H=0; | |
16322 | HAVE_SYS_PARAM_H=0; | |
16323 | REPLACE_CHOWN=0; | |
16324 | REPLACE_CLOSE=0; | |
16325 | REPLACE_DUP=0; | |
16326 | REPLACE_DUP2=0; | |
16327 | REPLACE_FCHOWNAT=0; | |
16328 | REPLACE_GETCWD=0; | |
16329 | REPLACE_GETDOMAINNAME=0; | |
16330 | REPLACE_GETLOGIN_R=0; | |
16331 | REPLACE_GETGROUPS=0; | |
16332 | REPLACE_GETPAGESIZE=0; | |
16333 | REPLACE_LCHOWN=0; | |
16334 | REPLACE_LINK=0; | |
16335 | REPLACE_LINKAT=0; | |
16336 | REPLACE_LSEEK=0; | |
16337 | REPLACE_PREAD=0; | |
16338 | REPLACE_PWRITE=0; | |
16339 | REPLACE_READ=0; | |
16340 | REPLACE_READLINK=0; | |
16341 | REPLACE_RMDIR=0; | |
16342 | REPLACE_SLEEP=0; | |
16343 | REPLACE_SYMLINK=0; | |
16344 | REPLACE_TTYNAME_R=0; | |
16345 | REPLACE_UNLINK=0; | |
16346 | REPLACE_UNLINKAT=0; | |
16347 | REPLACE_USLEEP=0; | |
16348 | REPLACE_WRITE=0; | |
16349 | UNISTD_H_HAVE_WINSOCK2_H=0; | |
16350 | UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0; | |
16351 | ||
16352 | ||
16353 | ||
16354 | ||
16355 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for st_dm_mode in struct stat" >&5 | |
16356 | $as_echo_n "checking for st_dm_mode in struct stat... " >&6; } | |
16357 | if test "${ac_cv_struct_st_dm_mode+set}" = set; then : | |
16358 | $as_echo_n "(cached) " >&6 | |
16359 | else | |
16360 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16361 | /* end confdefs.h. */ | |
16362 | ||
16363 | #include <sys/types.h> | |
16364 | #include <sys/stat.h> | |
16365 | int | |
16366 | main () | |
16367 | { | |
16368 | struct stat s; s.st_dm_mode; | |
16369 | ; | |
16370 | return 0; | |
16371 | } | |
16372 | _ACEOF | |
16373 | if ac_fn_c_try_compile "$LINENO"; then : | |
16374 | ac_cv_struct_st_dm_mode=yes | |
16375 | else | |
16376 | ac_cv_struct_st_dm_mode=no | |
16377 | fi | |
16378 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
16379 | fi | |
16380 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_st_dm_mode" >&5 | |
16381 | $as_echo "$ac_cv_struct_st_dm_mode" >&6; } | |
16382 | ||
16383 | if test $ac_cv_struct_st_dm_mode = yes; then | |
16384 | ||
16385 | $as_echo "#define HAVE_ST_DM_MODE 1" >>confdefs.h | |
16386 | ||
16387 | fi | |
16388 | ||
16389 | ||
16390 | ac_fn_c_check_decl "$LINENO" "strmode" "ac_cv_have_decl_strmode" "$ac_includes_default" | |
16391 | if test "x$ac_cv_have_decl_strmode" = x""yes; then : | |
16392 | ac_have_decl=1 | |
16393 | else | |
16394 | ac_have_decl=0 | |
16395 | fi | |
16396 | ||
16397 | cat >>confdefs.h <<_ACEOF | |
16398 | #define HAVE_DECL_STRMODE $ac_have_decl | |
16399 | _ACEOF | |
16400 | ||
16401 | ||
16402 | GNULIB__EXIT=0; | |
16403 | GNULIB_ATOLL=0; | |
16404 | GNULIB_CALLOC_POSIX=0; | |
16405 | GNULIB_CANONICALIZE_FILE_NAME=0; | |
16406 | GNULIB_GETLOADAVG=0; | |
16407 | GNULIB_GETSUBOPT=0; | |
16408 | GNULIB_GRANTPT=0; | |
16409 | GNULIB_MALLOC_POSIX=0; | |
16410 | GNULIB_MBTOWC=0; | |
16411 | GNULIB_MKDTEMP=0; | |
16412 | GNULIB_MKOSTEMP=0; | |
16413 | GNULIB_MKOSTEMPS=0; | |
16414 | GNULIB_MKSTEMP=0; | |
16415 | GNULIB_MKSTEMPS=0; | |
16416 | GNULIB_PTSNAME=0; | |
16417 | GNULIB_PUTENV=0; | |
16418 | GNULIB_RANDOM_R=0; | |
16419 | GNULIB_REALLOC_POSIX=0; | |
16420 | GNULIB_REALPATH=0; | |
16421 | GNULIB_RPMATCH=0; | |
16422 | GNULIB_SETENV=0; | |
16423 | GNULIB_STRTOD=0; | |
16424 | GNULIB_STRTOLL=0; | |
16425 | GNULIB_STRTOULL=0; | |
16426 | GNULIB_SYSTEM_POSIX=0; | |
16427 | GNULIB_UNLOCKPT=0; | |
16428 | GNULIB_UNSETENV=0; | |
16429 | GNULIB_WCTOMB=0; | |
16430 | HAVE__EXIT=1; | |
16431 | HAVE_ATOLL=1; | |
16432 | HAVE_CANONICALIZE_FILE_NAME=1; | |
16433 | HAVE_DECL_GETLOADAVG=1; | |
16434 | HAVE_GETSUBOPT=1; | |
16435 | HAVE_GRANTPT=1; | |
16436 | HAVE_MKDTEMP=1; | |
16437 | HAVE_MKOSTEMP=1; | |
16438 | HAVE_MKOSTEMPS=1; | |
16439 | HAVE_MKSTEMP=1; | |
16440 | HAVE_MKSTEMPS=1; | |
16441 | HAVE_PTSNAME=1; | |
16442 | HAVE_RANDOM_H=1; | |
16443 | HAVE_RANDOM_R=1; | |
16444 | HAVE_REALPATH=1; | |
16445 | HAVE_RPMATCH=1; | |
16446 | HAVE_SETENV=1; | |
16447 | HAVE_DECL_SETENV=1; | |
16448 | HAVE_STRTOD=1; | |
16449 | HAVE_STRTOLL=1; | |
16450 | HAVE_STRTOULL=1; | |
16451 | HAVE_STRUCT_RANDOM_DATA=1; | |
16452 | HAVE_SYS_LOADAVG_H=0; | |
16453 | HAVE_UNLOCKPT=1; | |
16454 | HAVE_DECL_UNSETENV=1; | |
16455 | REPLACE_CALLOC=0; | |
16456 | REPLACE_CANONICALIZE_FILE_NAME=0; | |
16457 | REPLACE_MALLOC=0; | |
16458 | REPLACE_MBTOWC=0; | |
16459 | REPLACE_MKSTEMP=0; | |
16460 | REPLACE_PUTENV=0; | |
16461 | REPLACE_REALLOC=0; | |
16462 | REPLACE_REALPATH=0; | |
16463 | REPLACE_SETENV=0; | |
16464 | REPLACE_STRTOD=0; | |
16465 | REPLACE_UNSETENV=0; | |
16466 | REPLACE_WCTOMB=0; | |
16467 | ||
16468 | ||
16469 | ||
16470 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5 | |
16471 | $as_echo_n "checking whether the preprocessor supports include_next... " >&6; } | |
16472 | if test "${gl_cv_have_include_next+set}" = set; then : | |
16473 | $as_echo_n "(cached) " >&6 | |
16474 | else | |
16475 | rm -rf conftestd1a conftestd1b conftestd2 | |
16476 | mkdir conftestd1a conftestd1b conftestd2 | |
16477 | cat <<EOF > conftestd1a/conftest.h | |
16478 | #define DEFINED_IN_CONFTESTD1 | |
16479 | #include_next <conftest.h> | |
16480 | #ifdef DEFINED_IN_CONFTESTD2 | |
16481 | int foo; | |
16482 | #else | |
16483 | #error "include_next doesn't work" | |
16484 | #endif | |
16485 | EOF | |
16486 | cat <<EOF > conftestd1b/conftest.h | |
16487 | #define DEFINED_IN_CONFTESTD1 | |
16488 | #include <stdio.h> | |
16489 | #include_next <conftest.h> | |
16490 | #ifdef DEFINED_IN_CONFTESTD2 | |
16491 | int foo; | |
16492 | #else | |
16493 | #error "include_next doesn't work" | |
16494 | #endif | |
16495 | EOF | |
16496 | cat <<EOF > conftestd2/conftest.h | |
16497 | #ifndef DEFINED_IN_CONFTESTD1 | |
16498 | #error "include_next test doesn't work" | |
16499 | #endif | |
16500 | #define DEFINED_IN_CONFTESTD2 | |
16501 | EOF | |
16502 | gl_save_CPPFLAGS="$CPPFLAGS" | |
16503 | CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2" | |
16504 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16505 | /* end confdefs.h. */ | |
16506 | #include <conftest.h> | |
16507 | _ACEOF | |
16508 | if ac_fn_c_try_compile "$LINENO"; then : | |
16509 | gl_cv_have_include_next=yes | |
16510 | else | |
16511 | CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2" | |
16512 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16513 | /* end confdefs.h. */ | |
16514 | #include <conftest.h> | |
16515 | _ACEOF | |
16516 | if ac_fn_c_try_compile "$LINENO"; then : | |
16517 | gl_cv_have_include_next=buggy | |
16518 | else | |
16519 | gl_cv_have_include_next=no | |
16520 | fi | |
16521 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
16522 | ||
16523 | fi | |
16524 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
16525 | CPPFLAGS="$gl_save_CPPFLAGS" | |
16526 | rm -rf conftestd1a conftestd1b conftestd2 | |
16527 | ||
16528 | fi | |
16529 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5 | |
16530 | $as_echo "$gl_cv_have_include_next" >&6; } | |
16531 | PRAGMA_SYSTEM_HEADER= | |
16532 | if test $gl_cv_have_include_next = yes; then | |
16533 | INCLUDE_NEXT=include_next | |
16534 | INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next | |
16535 | if test -n "$GCC"; then | |
16536 | PRAGMA_SYSTEM_HEADER='#pragma GCC system_header' | |
16537 | fi | |
16538 | else | |
16539 | if test $gl_cv_have_include_next = buggy; then | |
16540 | INCLUDE_NEXT=include | |
16541 | INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next | |
16542 | else | |
16543 | INCLUDE_NEXT=include | |
16544 | INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include | |
16545 | fi | |
16546 | fi | |
16547 | ||
16548 | ||
16549 | ||
16550 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5 | |
16551 | $as_echo_n "checking whether system header files limit the line length... " >&6; } | |
16552 | if test "${gl_cv_pragma_columns+set}" = set; then : | |
16553 | $as_echo_n "(cached) " >&6 | |
16554 | else | |
16555 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16556 | /* end confdefs.h. */ | |
16557 | ||
16558 | #ifdef __TANDEM | |
16559 | choke me | |
16560 | #endif | |
16561 | ||
16562 | _ACEOF | |
16563 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
16564 | $EGREP "choke me" >/dev/null 2>&1; then : | |
16565 | gl_cv_pragma_columns=yes | |
16566 | else | |
16567 | gl_cv_pragma_columns=no | |
16568 | fi | |
16569 | rm -f conftest* | |
16570 | ||
16571 | ||
16572 | fi | |
16573 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5 | |
16574 | $as_echo "$gl_cv_pragma_columns" >&6; } | |
16575 | if test $gl_cv_pragma_columns = yes; then | |
16576 | PRAGMA_COLUMNS="#pragma COLUMNS 10000" | |
16577 | else | |
16578 | PRAGMA_COLUMNS= | |
16579 | fi | |
16580 | ||
16581 | ||
16582 | ||
16583 | ||
16584 | ||
16585 | ||
16586 | ||
16587 | ||
16588 | ||
16589 | ||
16590 | ||
16591 | ||
16592 | ||
16593 | ||
16594 | ||
16595 | ||
16596 | ||
16597 | if test $gl_cv_have_include_next = yes; then | |
16598 | gl_cv_next_getopt_h='<'getopt.h'>' | |
16599 | else | |
16600 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <getopt.h>" >&5 | |
16601 | $as_echo_n "checking absolute name of <getopt.h>... " >&6; } | |
16602 | if test "${gl_cv_next_getopt_h+set}" = set; then : | |
16603 | $as_echo_n "(cached) " >&6 | |
16604 | else | |
16605 | ||
16606 | if test $ac_cv_header_getopt_h = yes; then | |
16607 | ||
16608 | ||
16609 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16610 | /* end confdefs.h. */ | |
16611 | #include <getopt.h> | |
16612 | ||
16613 | _ACEOF | |
16614 | case "$host_os" in | |
16615 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
16616 | *) gl_absname_cpp="$ac_cpp" ;; | |
16617 | esac | |
16618 | gl_cv_next_getopt_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
16619 | sed -n '\#/getopt.h#{ | |
16620 | s#.*"\(.*/getopt.h\)".*#\1# | |
16621 | s#^/[^/]#//&# | |
16622 | p | |
16623 | q | |
16624 | }'`'"' | |
16625 | else | |
16626 | gl_cv_next_getopt_h='<'getopt.h'>' | |
16627 | fi | |
16628 | ||
16629 | ||
16630 | fi | |
16631 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5 | |
16632 | $as_echo "$gl_cv_next_getopt_h" >&6; } | |
16633 | fi | |
16634 | NEXT_GETOPT_H=$gl_cv_next_getopt_h | |
16635 | ||
16636 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then | |
16637 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
16638 | gl_next_as_first_directive='<'getopt.h'>' | |
16639 | else | |
16640 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
16641 | gl_next_as_first_directive=$gl_cv_next_getopt_h | |
16642 | fi | |
16643 | NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive | |
16644 | ||
16645 | ||
16646 | ||
16647 | ||
16648 | if test $ac_cv_header_getopt_h = yes; then | |
16649 | HAVE_GETOPT_H=1 | |
16650 | else | |
16651 | HAVE_GETOPT_H=0 | |
16652 | fi | |
16653 | ||
16654 | ||
16655 | gl_replace_getopt= | |
16656 | ||
16657 | if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then | |
16658 | for ac_header in getopt.h | |
16659 | do : | |
16660 | ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default" | |
16661 | if test "x$ac_cv_header_getopt_h" = x""yes; then : | |
16662 | cat >>confdefs.h <<_ACEOF | |
16663 | #define HAVE_GETOPT_H 1 | |
16664 | _ACEOF | |
16665 | ||
16666 | else | |
16667 | gl_replace_getopt=yes | |
16668 | fi | |
16669 | ||
16670 | done | |
16671 | ||
16672 | fi | |
16673 | ||
16674 | if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then | |
16675 | for ac_func in getopt_long_only | |
16676 | do : | |
16677 | ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only" | |
16678 | if test "x$ac_cv_func_getopt_long_only" = x""yes; then : | |
16679 | cat >>confdefs.h <<_ACEOF | |
16680 | #define HAVE_GETOPT_LONG_ONLY 1 | |
16681 | _ACEOF | |
16682 | ||
16683 | else | |
16684 | gl_replace_getopt=yes | |
16685 | fi | |
16686 | done | |
16687 | ||
16688 | fi | |
16689 | ||
16690 | if test -z "$gl_replace_getopt"; then | |
16691 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5 | |
16692 | $as_echo_n "checking whether getopt is POSIX compatible... " >&6; } | |
16693 | if test "${gl_cv_func_getopt_posix+set}" = set; then : | |
16694 | $as_echo_n "(cached) " >&6 | |
16695 | else | |
16696 | ||
16697 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16698 | /* end confdefs.h. */ | |
16699 | #include <unistd.h> | |
16700 | int | |
16701 | main () | |
16702 | { | |
16703 | int *p = &optreset; return optreset; | |
16704 | ; | |
16705 | return 0; | |
16706 | } | |
16707 | _ACEOF | |
16708 | if ac_fn_c_try_link "$LINENO"; then : | |
16709 | gl_optind_min=1 | |
16710 | else | |
16711 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16712 | /* end confdefs.h. */ | |
16713 | #include <getopt.h> | |
16714 | int | |
16715 | main () | |
16716 | { | |
16717 | return !getopt_clip; | |
16718 | ; | |
16719 | return 0; | |
16720 | } | |
16721 | _ACEOF | |
16722 | if ac_fn_c_try_compile "$LINENO"; then : | |
16723 | gl_optind_min=1 | |
16724 | else | |
16725 | gl_optind_min=0 | |
16726 | fi | |
16727 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
16728 | fi | |
16729 | rm -f core conftest.err conftest.$ac_objext \ | |
16730 | conftest$ac_exeext conftest.$ac_ext | |
16731 | ||
16732 | gl_save_CPPFLAGS=$CPPFLAGS | |
16733 | CPPFLAGS="$CPPFLAGS -DOPTIND_MIN=$gl_optind_min" | |
16734 | if test "$cross_compiling" = yes; then : | |
16735 | case "$host_os" in | |
16736 | mingw*) gl_cv_func_getopt_posix="guessing no";; | |
16737 | darwin* | aix*) gl_cv_func_getopt_posix="guessing no";; | |
16738 | *) gl_cv_func_getopt_posix="guessing yes";; | |
16739 | esac | |
16740 | ||
16741 | else | |
16742 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16743 | /* end confdefs.h. */ | |
16744 | ||
16745 | #include <unistd.h> | |
16746 | #include <stdlib.h> | |
16747 | #include <string.h> | |
16748 | ||
16749 | int | |
16750 | main () | |
16751 | { | |
16752 | { | |
16753 | static char program[] = "program"; | |
16754 | static char a[] = "-a"; | |
16755 | static char foo[] = "foo"; | |
16756 | static char bar[] = "bar"; | |
16757 | char *argv[] = { program, a, foo, bar, NULL }; | |
16758 | int c; | |
16759 | ||
16760 | optind = OPTIND_MIN; | |
16761 | opterr = 0; | |
16762 | ||
16763 | c = getopt (4, argv, "ab"); | |
16764 | if (!(c == 'a')) | |
16765 | return 1; | |
16766 | c = getopt (4, argv, "ab"); | |
16767 | if (!(c == -1)) | |
16768 | return 2; | |
16769 | if (!(optind == 2)) | |
16770 | return 3; | |
16771 | } | |
16772 | /* Some internal state exists at this point. */ | |
16773 | { | |
16774 | static char program[] = "program"; | |
16775 | static char donald[] = "donald"; | |
16776 | static char p[] = "-p"; | |
16777 | static char billy[] = "billy"; | |
16778 | static char duck[] = "duck"; | |
16779 | static char a[] = "-a"; | |
16780 | static char bar[] = "bar"; | |
16781 | char *argv[] = { program, donald, p, billy, duck, a, bar, NULL }; | |
16782 | int c; | |
16783 | ||
16784 | optind = OPTIND_MIN; | |
16785 | opterr = 0; | |
16786 | ||
16787 | c = getopt (7, argv, "+abp:q:"); | |
16788 | if (!(c == -1)) | |
16789 | return 4; | |
16790 | if (!(strcmp (argv[0], "program") == 0)) | |
16791 | return 5; | |
16792 | if (!(strcmp (argv[1], "donald") == 0)) | |
16793 | return 6; | |
16794 | if (!(strcmp (argv[2], "-p") == 0)) | |
16795 | return 7; | |
16796 | if (!(strcmp (argv[3], "billy") == 0)) | |
16797 | return 8; | |
16798 | if (!(strcmp (argv[4], "duck") == 0)) | |
16799 | return 9; | |
16800 | if (!(strcmp (argv[5], "-a") == 0)) | |
16801 | return 10; | |
16802 | if (!(strcmp (argv[6], "bar") == 0)) | |
16803 | return 11; | |
16804 | if (!(optind == 1)) | |
16805 | return 12; | |
16806 | } | |
16807 | /* Detect MacOS 10.5, AIX 7.1 bug. */ | |
16808 | { | |
16809 | static char program[] = "program"; | |
16810 | static char ab[] = "-ab"; | |
16811 | char *argv[3] = { program, ab, NULL }; | |
16812 | optind = OPTIND_MIN; | |
16813 | opterr = 0; | |
16814 | if (getopt (2, argv, "ab:") != 'a') | |
16815 | return 13; | |
16816 | if (getopt (2, argv, "ab:") != '?') | |
16817 | return 14; | |
16818 | if (optopt != 'b') | |
16819 | return 15; | |
16820 | if (optind != 2) | |
16821 | return 16; | |
16822 | } | |
16823 | ||
16824 | return 0; | |
16825 | } | |
16826 | ||
16827 | _ACEOF | |
16828 | if ac_fn_c_try_run "$LINENO"; then : | |
16829 | gl_cv_func_getopt_posix=yes | |
16830 | else | |
16831 | gl_cv_func_getopt_posix=no | |
16832 | fi | |
16833 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
16834 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
16835 | fi | |
16836 | ||
16837 | CPPFLAGS=$gl_save_CPPFLAGS | |
16838 | ||
16839 | fi | |
16840 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5 | |
16841 | $as_echo "$gl_cv_func_getopt_posix" >&6; } | |
16842 | case "$gl_cv_func_getopt_posix" in | |
16843 | *no) gl_replace_getopt=yes ;; | |
16844 | esac | |
16845 | fi | |
16846 | ||
16847 | if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then | |
16848 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5 | |
16849 | $as_echo_n "checking for working GNU getopt function... " >&6; } | |
16850 | if test "${gl_cv_func_getopt_gnu+set}" = set; then : | |
16851 | $as_echo_n "(cached) " >&6 | |
16852 | else | |
16853 | # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the | |
16854 | # optstring is necessary for programs like m4 that have POSIX-mandated | |
16855 | # semantics for supporting options interspersed with files. | |
16856 | # Also, since getopt_long is a GNU extension, we require optind=0. | |
16857 | # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT; | |
16858 | # so take care to revert to the correct (non-)export state. | |
16859 | gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }' | |
16860 | case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" </dev/null` in | |
16861 | xx) gl_had_POSIXLY_CORRECT=exported ;; | |
16862 | x) gl_had_POSIXLY_CORRECT=yes ;; | |
16863 | *) gl_had_POSIXLY_CORRECT= ;; | |
16864 | esac | |
16865 | POSIXLY_CORRECT=1 | |
16866 | export POSIXLY_CORRECT | |
16867 | if test "$cross_compiling" = yes; then : | |
16868 | case $host_os:$ac_cv_have_decl_optreset in | |
16869 | *-gnu*:* | mingw*:*) gl_cv_func_getopt_gnu=no;; | |
16870 | *:yes) gl_cv_func_getopt_gnu=no;; | |
16871 | *) gl_cv_func_getopt_gnu=yes;; | |
16872 | esac | |
16873 | ||
16874 | else | |
16875 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16876 | /* end confdefs.h. */ | |
16877 | #include <getopt.h> | |
16878 | #include <stddef.h> | |
16879 | #include <string.h> | |
16880 | ||
16881 | int | |
16882 | main () | |
16883 | { | |
16884 | ||
16885 | int result = 0; | |
16886 | /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw, | |
16887 | and fails on MacOS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5, | |
16888 | OSF/1 5.1, Solaris 10. */ | |
16889 | { | |
16890 | static char conftest[] = "conftest"; | |
16891 | static char plus[] = "-+"; | |
16892 | char *argv[3] = { conftest, plus, NULL }; | |
16893 | opterr = 0; | |
16894 | if (getopt (2, argv, "+a") != '?') | |
16895 | result |= 1; | |
16896 | } | |
16897 | /* This code succeeds on glibc 2.8, mingw, | |
16898 | and fails on MacOS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11, | |
16899 | IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */ | |
16900 | { | |
16901 | static char program[] = "program"; | |
16902 | static char p[] = "-p"; | |
16903 | static char foo[] = "foo"; | |
16904 | static char bar[] = "bar"; | |
16905 | char *argv[] = { program, p, foo, bar, NULL }; | |
6ad6792b | 16906 | |
3e0be4ab GM |
16907 | optind = 1; |
16908 | if (getopt (4, argv, "p::") != 'p') | |
16909 | result |= 2; | |
16910 | else if (optarg != NULL) | |
16911 | result |= 4; | |
16912 | else if (getopt (4, argv, "p::") != -1) | |
16913 | result |= 6; | |
16914 | else if (optind != 2) | |
16915 | result |= 8; | |
16916 | } | |
16917 | /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */ | |
16918 | { | |
16919 | static char program[] = "program"; | |
16920 | static char foo[] = "foo"; | |
16921 | static char p[] = "-p"; | |
16922 | char *argv[] = { program, foo, p, NULL }; | |
16923 | optind = 0; | |
16924 | if (getopt (3, argv, "-p") != 1) | |
16925 | result |= 16; | |
16926 | else if (getopt (3, argv, "-p") != 'p') | |
16927 | result |= 32; | |
16928 | } | |
16929 | /* This code fails on glibc 2.11. */ | |
16930 | { | |
16931 | static char program[] = "program"; | |
16932 | static char b[] = "-b"; | |
16933 | static char a[] = "-a"; | |
16934 | char *argv[] = { program, b, a, NULL }; | |
16935 | optind = opterr = 0; | |
16936 | if (getopt (3, argv, "+:a:b") != 'b') | |
16937 | result |= 64; | |
16938 | else if (getopt (3, argv, "+:a:b") != ':') | |
16939 | result |= 64; | |
16940 | } | |
16941 | /* This code dumps core on glibc 2.14. */ | |
16942 | { | |
16943 | static char program[] = "program"; | |
16944 | static char w[] = "-W"; | |
16945 | static char dummy[] = "dummy"; | |
16946 | char *argv[] = { program, w, dummy, NULL }; | |
16947 | optind = opterr = 1; | |
16948 | if (getopt (3, argv, "W;") != 'W') | |
16949 | result |= 128; | |
16950 | } | |
16951 | return result; | |
6ad6792b | 16952 | |
3e0be4ab GM |
16953 | ; |
16954 | return 0; | |
16955 | } | |
16956 | _ACEOF | |
16957 | if ac_fn_c_try_run "$LINENO"; then : | |
16958 | gl_cv_func_getopt_gnu=yes | |
16959 | else | |
16960 | gl_cv_func_getopt_gnu=no | |
16961 | fi | |
16962 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
16963 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
16964 | fi | |
e275c824 | 16965 | |
3e0be4ab GM |
16966 | case $gl_had_POSIXLY_CORRECT in |
16967 | exported) ;; | |
16968 | yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;; | |
16969 | *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;; | |
16970 | esac | |
e275c824 | 16971 | |
e275c824 | 16972 | fi |
3e0be4ab GM |
16973 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5 |
16974 | $as_echo "$gl_cv_func_getopt_gnu" >&6; } | |
16975 | if test "$gl_cv_func_getopt_gnu" = "no"; then | |
16976 | gl_replace_getopt=yes | |
16977 | fi | |
16978 | fi | |
e275c824 | 16979 | |
e275c824 | 16980 | |
e275c824 | 16981 | |
e275c824 | 16982 | |
4fda9c95 | 16983 | |
3e0be4ab | 16984 | REPLACE_GETOPT=0 |
5fa4ac76 | 16985 | |
5fa4ac76 | 16986 | |
3e0be4ab | 16987 | if test -n "$gl_replace_getopt"; then : |
5fa4ac76 | 16988 | |
3e0be4ab | 16989 | REPLACE_GETOPT=1 |
5fa4ac76 | 16990 | |
3e0be4ab | 16991 | fi |
5fa4ac76 | 16992 | |
5fa4ac76 | 16993 | |
3e0be4ab | 16994 | if test $REPLACE_GETOPT = 1; then |
5fa4ac76 | 16995 | |
3e0be4ab | 16996 | GETOPT_H=getopt.h |
5fa4ac76 | 16997 | |
3e0be4ab | 16998 | $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h |
5fa4ac76 | 16999 | |
5fa4ac76 PE |
17000 | |
17001 | ||
3e0be4ab GM |
17002 | GNULIB_UNISTD_H_GETOPT=1 |
17003 | fi | |
5fa4ac76 | 17004 | |
3e0be4ab GM |
17005 | ac_fn_c_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default" |
17006 | if test "x$ac_cv_have_decl_getenv" = x""yes; then : | |
17007 | ac_have_decl=1 | |
e275c824 | 17008 | else |
3e0be4ab | 17009 | ac_have_decl=0 |
1f5d53eb | 17010 | fi |
1f5d53eb | 17011 | |
3e0be4ab GM |
17012 | cat >>confdefs.h <<_ACEOF |
17013 | #define HAVE_DECL_GETENV $ac_have_decl | |
1f5d53eb | 17014 | _ACEOF |
1f5d53eb PE |
17015 | |
17016 | ||
3e0be4ab GM |
17017 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5 |
17018 | $as_echo_n "checking for unsigned long long int... " >&6; } | |
17019 | if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then : | |
1f5d53eb | 17020 | $as_echo_n "(cached) " >&6 |
e275c824 | 17021 | else |
3e0be4ab GM |
17022 | ac_cv_type_unsigned_long_long_int=yes |
17023 | if test "x${ac_cv_prog_cc_c99-no}" = xno; then | |
17024 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
d6974efa | 17025 | /* end confdefs.h. */ |
1f5d53eb | 17026 | |
3e0be4ab GM |
17027 | /* For now, do not test the preprocessor; as of 2007 there are too many |
17028 | implementations with broken preprocessors. Perhaps this can | |
17029 | be revisited in 2012. In the meantime, code should not expect | |
17030 | #if to work with literals wider than 32 bits. */ | |
17031 | /* Test literals. */ | |
17032 | long long int ll = 9223372036854775807ll; | |
17033 | long long int nll = -9223372036854775807LL; | |
17034 | unsigned long long int ull = 18446744073709551615ULL; | |
17035 | /* Test constant expressions. */ | |
17036 | typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) | |
17037 | ? 1 : -1)]; | |
17038 | typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 | |
17039 | ? 1 : -1)]; | |
17040 | int i = 63; | |
d6974efa PE |
17041 | int |
17042 | main () | |
17043 | { | |
3e0be4ab GM |
17044 | /* Test availability of runtime routines for shift and division. */ |
17045 | long long int llmax = 9223372036854775807ll; | |
17046 | unsigned long long int ullmax = 18446744073709551615ull; | |
17047 | return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) | |
17048 | | (llmax / ll) | (llmax % ll) | |
17049 | | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) | |
17050 | | (ullmax / ull) | (ullmax % ull)); | |
d6974efa PE |
17051 | ; |
17052 | return 0; | |
17053 | } | |
3e0be4ab | 17054 | |
d6974efa | 17055 | _ACEOF |
3e0be4ab GM |
17056 | if ac_fn_c_try_link "$LINENO"; then : |
17057 | ||
e275c824 | 17058 | else |
3e0be4ab | 17059 | ac_cv_type_unsigned_long_long_int=no |
e275c824 | 17060 | fi |
3e0be4ab GM |
17061 | rm -f core conftest.err conftest.$ac_objext \ |
17062 | conftest$ac_exeext conftest.$ac_ext | |
17063 | fi | |
e275c824 | 17064 | fi |
3e0be4ab GM |
17065 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5 |
17066 | $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; } | |
17067 | if test $ac_cv_type_unsigned_long_long_int = yes; then | |
e275c824 | 17068 | |
3e0be4ab | 17069 | $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h |
e275c824 | 17070 | |
3e0be4ab GM |
17071 | fi |
17072 | ||
17073 | ||
17074 | ||
17075 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5 | |
17076 | $as_echo_n "checking for long long int... " >&6; } | |
17077 | if test "${ac_cv_type_long_long_int+set}" = set; then : | |
e275c824 | 17078 | $as_echo_n "(cached) " >&6 |
3e0be4ab GM |
17079 | else |
17080 | ac_cv_type_long_long_int=yes | |
17081 | if test "x${ac_cv_prog_cc_c99-no}" = xno; then | |
17082 | ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int | |
17083 | if test $ac_cv_type_long_long_int = yes; then | |
17084 | if test "$cross_compiling" = yes; then : | |
17085 | : | |
e275c824 PE |
17086 | else |
17087 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
17088 | /* end confdefs.h. */ | |
3e0be4ab GM |
17089 | #include <limits.h> |
17090 | #ifndef LLONG_MAX | |
17091 | # define HALF \ | |
17092 | (1LL << (sizeof (long long int) * CHAR_BIT - 2)) | |
17093 | # define LLONG_MAX (HALF - 1 + HALF) | |
17094 | #endif | |
e275c824 PE |
17095 | int |
17096 | main () | |
17097 | { | |
3e0be4ab GM |
17098 | long long int n = 1; |
17099 | int i; | |
17100 | for (i = 0; ; i++) | |
17101 | { | |
17102 | long long int m = n << i; | |
17103 | if (m >> i != n) | |
17104 | return 1; | |
17105 | if (LLONG_MAX / 2 < m) | |
17106 | break; | |
17107 | } | |
17108 | return 0; | |
e275c824 PE |
17109 | ; |
17110 | return 0; | |
17111 | } | |
17112 | _ACEOF | |
3e0be4ab GM |
17113 | if ac_fn_c_try_run "$LINENO"; then : |
17114 | ||
e275c824 | 17115 | else |
3e0be4ab | 17116 | ac_cv_type_long_long_int=no |
e275c824 | 17117 | fi |
3e0be4ab GM |
17118 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
17119 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
e275c824 | 17120 | fi |
e275c824 | 17121 | |
3e0be4ab GM |
17122 | fi |
17123 | fi | |
17124 | fi | |
17125 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5 | |
17126 | $as_echo "$ac_cv_type_long_long_int" >&6; } | |
17127 | if test $ac_cv_type_long_long_int = yes; then | |
e275c824 | 17128 | |
3e0be4ab | 17129 | $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h |
e275c824 | 17130 | |
3e0be4ab | 17131 | fi |
e275c824 PE |
17132 | |
17133 | ||
17134 | ||
17135 | ||
e275c824 PE |
17136 | |
17137 | ||
3e0be4ab GM |
17138 | gl_cv_c_multiarch=no |
17139 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1f5d53eb | 17140 | /* end confdefs.h. */ |
3e0be4ab GM |
17141 | #ifndef __APPLE_CC__ |
17142 | not a universal capable compiler | |
17143 | #endif | |
17144 | typedef int dummy; | |
e275c824 | 17145 | |
1f5d53eb | 17146 | _ACEOF |
3e0be4ab | 17147 | if ac_fn_c_try_compile "$LINENO"; then : |
e275c824 | 17148 | |
3e0be4ab GM |
17149 | arch= |
17150 | prev= | |
17151 | for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do | |
17152 | if test -n "$prev"; then | |
17153 | case $word in | |
17154 | i?86 | x86_64 | ppc | ppc64) | |
17155 | if test -z "$arch" || test "$arch" = "$word"; then | |
17156 | arch="$word" | |
17157 | else | |
17158 | gl_cv_c_multiarch=yes | |
17159 | fi | |
17160 | ;; | |
17161 | esac | |
17162 | prev= | |
17163 | else | |
17164 | if test "x$word" = "x-arch"; then | |
17165 | prev=arch | |
17166 | fi | |
17167 | fi | |
17168 | done | |
e275c824 | 17169 | |
1f5d53eb | 17170 | fi |
3e0be4ab GM |
17171 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
17172 | if test $gl_cv_c_multiarch = yes; then | |
17173 | APPLE_UNIVERSAL_BUILD=1 | |
17174 | else | |
17175 | APPLE_UNIVERSAL_BUILD=0 | |
17176 | fi | |
e275c824 PE |
17177 | |
17178 | ||
17179 | ||
17180 | ||
e275c824 | 17181 | |
3e0be4ab GM |
17182 | if test $ac_cv_type_long_long_int = yes; then |
17183 | HAVE_LONG_LONG_INT=1 | |
17184 | else | |
17185 | HAVE_LONG_LONG_INT=0 | |
17186 | fi | |
e275c824 PE |
17187 | |
17188 | ||
3e0be4ab GM |
17189 | if test $ac_cv_type_unsigned_long_long_int = yes; then |
17190 | HAVE_UNSIGNED_LONG_LONG_INT=1 | |
17191 | else | |
17192 | HAVE_UNSIGNED_LONG_LONG_INT=0 | |
17193 | fi | |
e275c824 PE |
17194 | |
17195 | ||
17196 | ||
3e0be4ab GM |
17197 | if test $ac_cv_header_wchar_h = yes; then |
17198 | HAVE_WCHAR_H=1 | |
17199 | else | |
17200 | HAVE_WCHAR_H=0 | |
17201 | fi | |
e275c824 PE |
17202 | |
17203 | ||
3e0be4ab GM |
17204 | if test $ac_cv_header_inttypes_h = yes; then |
17205 | HAVE_INTTYPES_H=1 | |
17206 | else | |
17207 | HAVE_INTTYPES_H=0 | |
17208 | fi | |
67342916 | 17209 | |
67342916 | 17210 | |
3e0be4ab GM |
17211 | if test $ac_cv_header_sys_types_h = yes; then |
17212 | HAVE_SYS_TYPES_H=1 | |
17213 | else | |
17214 | HAVE_SYS_TYPES_H=0 | |
17215 | fi | |
67342916 | 17216 | |
e275c824 | 17217 | |
e275c824 PE |
17218 | |
17219 | ||
17220 | ||
17221 | ||
e275c824 | 17222 | |
e275c824 | 17223 | |
6c051bab | 17224 | |
942f733f | 17225 | |
4fc2b746 | 17226 | |
3e0be4ab GM |
17227 | if test $gl_cv_have_include_next = yes; then |
17228 | gl_cv_next_stdint_h='<'stdint.h'>' | |
17229 | else | |
17230 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5 | |
17231 | $as_echo_n "checking absolute name of <stdint.h>... " >&6; } | |
17232 | if test "${gl_cv_next_stdint_h+set}" = set; then : | |
4fc2b746 GM |
17233 | $as_echo_n "(cached) " >&6 |
17234 | else | |
17235 | ||
3e0be4ab | 17236 | if test $ac_cv_header_stdint_h = yes; then |
4fc2b746 GM |
17237 | |
17238 | ||
3e0be4ab GM |
17239 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
17240 | /* end confdefs.h. */ | |
17241 | #include <stdint.h> | |
4fc2b746 | 17242 | |
3e0be4ab GM |
17243 | _ACEOF |
17244 | case "$host_os" in | |
17245 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
17246 | *) gl_absname_cpp="$ac_cpp" ;; | |
17247 | esac | |
17248 | gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
17249 | sed -n '\#/stdint.h#{ | |
17250 | s#.*"\(.*/stdint.h\)".*#\1# | |
17251 | s#^/[^/]#//&# | |
17252 | p | |
17253 | q | |
17254 | }'`'"' | |
17255 | else | |
17256 | gl_cv_next_stdint_h='<'stdint.h'>' | |
17257 | fi | |
4fc2b746 | 17258 | |
4fc2b746 | 17259 | |
4fc2b746 | 17260 | fi |
3e0be4ab GM |
17261 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5 |
17262 | $as_echo "$gl_cv_next_stdint_h" >&6; } | |
17263 | fi | |
17264 | NEXT_STDINT_H=$gl_cv_next_stdint_h | |
4fc2b746 | 17265 | |
3e0be4ab GM |
17266 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then |
17267 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
17268 | gl_next_as_first_directive='<'stdint.h'>' | |
17269 | else | |
17270 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
17271 | gl_next_as_first_directive=$gl_cv_next_stdint_h | |
17272 | fi | |
17273 | NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive | |
4fc2b746 GM |
17274 | |
17275 | ||
17276 | ||
942f733f | 17277 | |
3e0be4ab GM |
17278 | if test $ac_cv_header_stdint_h = yes; then |
17279 | HAVE_STDINT_H=1 | |
17280 | else | |
17281 | HAVE_STDINT_H=0 | |
17282 | fi | |
e275c824 | 17283 | |
5fa4ac76 | 17284 | |
3e0be4ab GM |
17285 | if test $ac_cv_header_stdint_h = yes; then |
17286 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5 | |
17287 | $as_echo_n "checking whether stdint.h conforms to C99... " >&6; } | |
17288 | if test "${gl_cv_header_working_stdint_h+set}" = set; then : | |
17289 | $as_echo_n "(cached) " >&6 | |
17290 | else | |
17291 | gl_cv_header_working_stdint_h=no | |
17292 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
17293 | /* end confdefs.h. */ | |
5fa4ac76 | 17294 | |
40e27e7f | 17295 | |
3e0be4ab GM |
17296 | #define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ |
17297 | #define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */ | |
17298 | #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ | |
17299 | #include <stdint.h> | |
17300 | /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */ | |
17301 | #if !(defined WCHAR_MIN && defined WCHAR_MAX) | |
17302 | #error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>" | |
17303 | #endif | |
40e27e7f GM |
17304 | |
17305 | ||
3e0be4ab GM |
17306 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be |
17307 | included before <wchar.h>. */ | |
17308 | #include <stddef.h> | |
17309 | #include <signal.h> | |
17310 | #if HAVE_WCHAR_H | |
17311 | # include <stdio.h> | |
17312 | # include <time.h> | |
17313 | # include <wchar.h> | |
17314 | #endif | |
40e27e7f GM |
17315 | |
17316 | ||
3e0be4ab GM |
17317 | #ifdef INT8_MAX |
17318 | int8_t a1 = INT8_MAX; | |
17319 | int8_t a1min = INT8_MIN; | |
17320 | #endif | |
17321 | #ifdef INT16_MAX | |
17322 | int16_t a2 = INT16_MAX; | |
17323 | int16_t a2min = INT16_MIN; | |
17324 | #endif | |
17325 | #ifdef INT32_MAX | |
17326 | int32_t a3 = INT32_MAX; | |
17327 | int32_t a3min = INT32_MIN; | |
17328 | #endif | |
17329 | #ifdef INT64_MAX | |
17330 | int64_t a4 = INT64_MAX; | |
17331 | int64_t a4min = INT64_MIN; | |
17332 | #endif | |
17333 | #ifdef UINT8_MAX | |
17334 | uint8_t b1 = UINT8_MAX; | |
17335 | #else | |
17336 | typedef int b1[(unsigned char) -1 != 255 ? 1 : -1]; | |
17337 | #endif | |
17338 | #ifdef UINT16_MAX | |
17339 | uint16_t b2 = UINT16_MAX; | |
17340 | #endif | |
17341 | #ifdef UINT32_MAX | |
17342 | uint32_t b3 = UINT32_MAX; | |
17343 | #endif | |
17344 | #ifdef UINT64_MAX | |
17345 | uint64_t b4 = UINT64_MAX; | |
17346 | #endif | |
17347 | int_least8_t c1 = INT8_C (0x7f); | |
17348 | int_least8_t c1max = INT_LEAST8_MAX; | |
17349 | int_least8_t c1min = INT_LEAST8_MIN; | |
17350 | int_least16_t c2 = INT16_C (0x7fff); | |
17351 | int_least16_t c2max = INT_LEAST16_MAX; | |
17352 | int_least16_t c2min = INT_LEAST16_MIN; | |
17353 | int_least32_t c3 = INT32_C (0x7fffffff); | |
17354 | int_least32_t c3max = INT_LEAST32_MAX; | |
17355 | int_least32_t c3min = INT_LEAST32_MIN; | |
17356 | int_least64_t c4 = INT64_C (0x7fffffffffffffff); | |
17357 | int_least64_t c4max = INT_LEAST64_MAX; | |
17358 | int_least64_t c4min = INT_LEAST64_MIN; | |
17359 | uint_least8_t d1 = UINT8_C (0xff); | |
17360 | uint_least8_t d1max = UINT_LEAST8_MAX; | |
17361 | uint_least16_t d2 = UINT16_C (0xffff); | |
17362 | uint_least16_t d2max = UINT_LEAST16_MAX; | |
17363 | uint_least32_t d3 = UINT32_C (0xffffffff); | |
17364 | uint_least32_t d3max = UINT_LEAST32_MAX; | |
17365 | uint_least64_t d4 = UINT64_C (0xffffffffffffffff); | |
17366 | uint_least64_t d4max = UINT_LEAST64_MAX; | |
17367 | int_fast8_t e1 = INT_FAST8_MAX; | |
17368 | int_fast8_t e1min = INT_FAST8_MIN; | |
17369 | int_fast16_t e2 = INT_FAST16_MAX; | |
17370 | int_fast16_t e2min = INT_FAST16_MIN; | |
17371 | int_fast32_t e3 = INT_FAST32_MAX; | |
17372 | int_fast32_t e3min = INT_FAST32_MIN; | |
17373 | int_fast64_t e4 = INT_FAST64_MAX; | |
17374 | int_fast64_t e4min = INT_FAST64_MIN; | |
17375 | uint_fast8_t f1 = UINT_FAST8_MAX; | |
17376 | uint_fast16_t f2 = UINT_FAST16_MAX; | |
17377 | uint_fast32_t f3 = UINT_FAST32_MAX; | |
17378 | uint_fast64_t f4 = UINT_FAST64_MAX; | |
17379 | #ifdef INTPTR_MAX | |
17380 | intptr_t g = INTPTR_MAX; | |
17381 | intptr_t gmin = INTPTR_MIN; | |
17382 | #endif | |
17383 | #ifdef UINTPTR_MAX | |
17384 | uintptr_t h = UINTPTR_MAX; | |
17385 | #endif | |
17386 | intmax_t i = INTMAX_MAX; | |
17387 | uintmax_t j = UINTMAX_MAX; | |
40e27e7f | 17388 | |
3e0be4ab GM |
17389 | #include <limits.h> /* for CHAR_BIT */ |
17390 | #define TYPE_MINIMUM(t) \ | |
17391 | ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t))) | |
17392 | #define TYPE_MAXIMUM(t) \ | |
17393 | ((t) ((t) 0 < (t) -1 \ | |
17394 | ? (t) -1 \ | |
17395 | : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1))) | |
17396 | struct s { | |
17397 | int check_PTRDIFF: | |
17398 | PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t) | |
17399 | && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t) | |
17400 | ? 1 : -1; | |
17401 | /* Detect bug in FreeBSD 6.0 / ia64. */ | |
17402 | int check_SIG_ATOMIC: | |
17403 | SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t) | |
17404 | && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t) | |
17405 | ? 1 : -1; | |
17406 | int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1; | |
17407 | int check_WCHAR: | |
17408 | WCHAR_MIN == TYPE_MINIMUM (wchar_t) | |
17409 | && WCHAR_MAX == TYPE_MAXIMUM (wchar_t) | |
17410 | ? 1 : -1; | |
17411 | /* Detect bug in mingw. */ | |
17412 | int check_WINT: | |
17413 | WINT_MIN == TYPE_MINIMUM (wint_t) | |
17414 | && WINT_MAX == TYPE_MAXIMUM (wint_t) | |
17415 | ? 1 : -1; | |
40e27e7f | 17416 | |
3e0be4ab GM |
17417 | /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */ |
17418 | int check_UINT8_C: | |
17419 | (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1; | |
17420 | int check_UINT16_C: | |
17421 | (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1; | |
40e27e7f | 17422 | |
3e0be4ab GM |
17423 | /* Detect bugs in OpenBSD 3.9 stdint.h. */ |
17424 | #ifdef UINT8_MAX | |
17425 | int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1; | |
17426 | #endif | |
17427 | #ifdef UINT16_MAX | |
17428 | int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1; | |
17429 | #endif | |
17430 | #ifdef UINT32_MAX | |
17431 | int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1; | |
17432 | #endif | |
17433 | #ifdef UINT64_MAX | |
17434 | int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1; | |
17435 | #endif | |
17436 | int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1; | |
17437 | int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1; | |
17438 | int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1; | |
17439 | int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1; | |
17440 | int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1; | |
17441 | int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1; | |
17442 | int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1; | |
17443 | int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1; | |
17444 | int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1; | |
17445 | int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1; | |
17446 | int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1; | |
17447 | }; | |
d87ffdb7 | 17448 | |
3e0be4ab GM |
17449 | int |
17450 | main () | |
17451 | { | |
d87ffdb7 | 17452 | |
3e0be4ab GM |
17453 | ; |
17454 | return 0; | |
17455 | } | |
17456 | _ACEOF | |
17457 | if ac_fn_c_try_compile "$LINENO"; then : | |
17458 | if test "$cross_compiling" = yes; then : | |
17459 | gl_cv_header_working_stdint_h=yes | |
d87ffdb7 | 17460 | |
3e0be4ab GM |
17461 | else |
17462 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
17463 | /* end confdefs.h. */ | |
d87ffdb7 GM |
17464 | |
17465 | ||
3e0be4ab GM |
17466 | #define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ |
17467 | #define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */ | |
17468 | #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ | |
17469 | #include <stdint.h> | |
d87ffdb7 GM |
17470 | |
17471 | ||
3e0be4ab GM |
17472 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be |
17473 | included before <wchar.h>. */ | |
17474 | #include <stddef.h> | |
17475 | #include <signal.h> | |
17476 | #if HAVE_WCHAR_H | |
17477 | # include <stdio.h> | |
17478 | # include <time.h> | |
17479 | # include <wchar.h> | |
17480 | #endif | |
7d2a1c5e GM |
17481 | |
17482 | ||
3e0be4ab GM |
17483 | #include <stdio.h> |
17484 | #include <string.h> | |
17485 | #define MVAL(macro) MVAL1(macro) | |
17486 | #define MVAL1(expression) #expression | |
17487 | static const char *macro_values[] = | |
17488 | { | |
17489 | #ifdef INT8_MAX | |
17490 | MVAL (INT8_MAX), | |
17491 | #endif | |
17492 | #ifdef INT16_MAX | |
17493 | MVAL (INT16_MAX), | |
17494 | #endif | |
17495 | #ifdef INT32_MAX | |
17496 | MVAL (INT32_MAX), | |
17497 | #endif | |
17498 | #ifdef INT64_MAX | |
17499 | MVAL (INT64_MAX), | |
17500 | #endif | |
17501 | #ifdef UINT8_MAX | |
17502 | MVAL (UINT8_MAX), | |
17503 | #endif | |
17504 | #ifdef UINT16_MAX | |
17505 | MVAL (UINT16_MAX), | |
17506 | #endif | |
17507 | #ifdef UINT32_MAX | |
17508 | MVAL (UINT32_MAX), | |
17509 | #endif | |
17510 | #ifdef UINT64_MAX | |
17511 | MVAL (UINT64_MAX), | |
17512 | #endif | |
17513 | NULL | |
17514 | }; | |
7d2a1c5e | 17515 | |
7d2a1c5e GM |
17516 | int |
17517 | main () | |
17518 | { | |
3e0be4ab GM |
17519 | |
17520 | const char **mv; | |
17521 | for (mv = macro_values; *mv != NULL; mv++) | |
17522 | { | |
17523 | const char *value = *mv; | |
17524 | /* Test whether it looks like a cast expression. */ | |
17525 | if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0 | |
17526 | || strncmp (value, "((unsigned short)"/*)*/, 17) == 0 | |
17527 | || strncmp (value, "((unsigned char)"/*)*/, 16) == 0 | |
17528 | || strncmp (value, "((int)"/*)*/, 6) == 0 | |
17529 | || strncmp (value, "((signed short)"/*)*/, 15) == 0 | |
17530 | || strncmp (value, "((signed char)"/*)*/, 14) == 0) | |
17531 | return mv - macro_values + 1; | |
17532 | } | |
17533 | return 0; | |
7d2a1c5e GM |
17534 | |
17535 | ; | |
17536 | return 0; | |
17537 | } | |
7d2a1c5e GM |
17538 | _ACEOF |
17539 | if ac_fn_c_try_run "$LINENO"; then : | |
3e0be4ab | 17540 | gl_cv_header_working_stdint_h=yes |
7d2a1c5e GM |
17541 | fi |
17542 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
17543 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
17544 | fi | |
17545 | ||
17546 | ||
17547 | fi | |
3e0be4ab | 17548 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
7d2a1c5e | 17549 | |
3e0be4ab GM |
17550 | fi |
17551 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5 | |
17552 | $as_echo "$gl_cv_header_working_stdint_h" >&6; } | |
7d2a1c5e | 17553 | fi |
3e0be4ab GM |
17554 | if test "$gl_cv_header_working_stdint_h" = yes; then |
17555 | STDINT_H= | |
17556 | else | |
17557 | for ac_header in sys/inttypes.h sys/bitypes.h | |
17558 | do : | |
17559 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
17560 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
17561 | eval as_val=\$$as_ac_Header | |
17562 | if test "x$as_val" = x""yes; then : | |
17563 | cat >>confdefs.h <<_ACEOF | |
17564 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
17565 | _ACEOF | |
7d2a1c5e | 17566 | |
3e0be4ab | 17567 | fi |
7d2a1c5e | 17568 | |
3e0be4ab | 17569 | done |
7d2a1c5e | 17570 | |
3e0be4ab GM |
17571 | if test $ac_cv_header_sys_inttypes_h = yes; then |
17572 | HAVE_SYS_INTTYPES_H=1 | |
17573 | else | |
17574 | HAVE_SYS_INTTYPES_H=0 | |
7d2a1c5e | 17575 | fi |
7d2a1c5e | 17576 | |
3e0be4ab GM |
17577 | if test $ac_cv_header_sys_bitypes_h = yes; then |
17578 | HAVE_SYS_BITYPES_H=1 | |
17579 | else | |
17580 | HAVE_SYS_BITYPES_H=0 | |
17581 | fi | |
7d2a1c5e GM |
17582 | |
17583 | ||
17584 | ||
17585 | ||
3e0be4ab | 17586 | if test $APPLE_UNIVERSAL_BUILD = 0; then |
7d2a1c5e GM |
17587 | |
17588 | ||
3e0be4ab GM |
17589 | for gltype in ptrdiff_t size_t ; do |
17590 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5 | |
17591 | $as_echo_n "checking for bit size of $gltype... " >&6; } | |
17592 | if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then : | |
17593 | $as_echo_n "(cached) " >&6 | |
17594 | else | |
17595 | if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" " | |
17596 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
17597 | included before <wchar.h>. */ | |
17598 | #include <stddef.h> | |
17599 | #include <signal.h> | |
17600 | #if HAVE_WCHAR_H | |
17601 | # include <stdio.h> | |
17602 | # include <time.h> | |
17603 | # include <wchar.h> | |
17604 | #endif | |
7d2a1c5e | 17605 | |
3e0be4ab | 17606 | #include <limits.h>"; then : |
7d2a1c5e | 17607 | |
3e0be4ab GM |
17608 | else |
17609 | result=unknown | |
17610 | fi | |
7d2a1c5e | 17611 | |
3e0be4ab | 17612 | eval gl_cv_bitsizeof_${gltype}=\$result |
d87ffdb7 | 17613 | |
3e0be4ab GM |
17614 | fi |
17615 | eval ac_res=\$gl_cv_bitsizeof_${gltype} | |
17616 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
17617 | $as_echo "$ac_res" >&6; } | |
17618 | eval result=\$gl_cv_bitsizeof_${gltype} | |
17619 | if test $result = unknown; then | |
17620 | result=0 | |
17621 | fi | |
17622 | GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` | |
17623 | cat >>confdefs.h <<_ACEOF | |
17624 | #define BITSIZEOF_${GLTYPE} $result | |
17625 | _ACEOF | |
e275c824 | 17626 | |
3e0be4ab GM |
17627 | eval BITSIZEOF_${GLTYPE}=\$result |
17628 | done | |
e275c824 | 17629 | |
e275c824 | 17630 | |
3e0be4ab | 17631 | fi |
e275c824 | 17632 | |
1f5d53eb | 17633 | |
3e0be4ab GM |
17634 | for gltype in sig_atomic_t wchar_t wint_t ; do |
17635 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5 | |
17636 | $as_echo_n "checking for bit size of $gltype... " >&6; } | |
17637 | if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then : | |
16c3e636 PE |
17638 | $as_echo_n "(cached) " >&6 |
17639 | else | |
3e0be4ab GM |
17640 | if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" " |
17641 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
17642 | included before <wchar.h>. */ | |
17643 | #include <stddef.h> | |
17644 | #include <signal.h> | |
17645 | #if HAVE_WCHAR_H | |
17646 | # include <stdio.h> | |
17647 | # include <time.h> | |
17648 | # include <wchar.h> | |
17649 | #endif | |
17650 | ||
17651 | #include <limits.h>"; then : | |
16c3e636 | 17652 | |
1f5d53eb | 17653 | else |
3e0be4ab | 17654 | result=unknown |
1f5d53eb PE |
17655 | fi |
17656 | ||
3e0be4ab | 17657 | eval gl_cv_bitsizeof_${gltype}=\$result |
16c3e636 | 17658 | |
16c3e636 | 17659 | fi |
3e0be4ab GM |
17660 | eval ac_res=\$gl_cv_bitsizeof_${gltype} |
17661 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
17662 | $as_echo "$ac_res" >&6; } | |
17663 | eval result=\$gl_cv_bitsizeof_${gltype} | |
17664 | if test $result = unknown; then | |
17665 | result=0 | |
17666 | fi | |
17667 | GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` | |
17668 | cat >>confdefs.h <<_ACEOF | |
17669 | #define BITSIZEOF_${GLTYPE} $result | |
17670 | _ACEOF | |
16c3e636 | 17671 | |
3e0be4ab GM |
17672 | eval BITSIZEOF_${GLTYPE}=\$result |
17673 | done | |
1f5d53eb | 17674 | |
16c3e636 PE |
17675 | |
17676 | ||
3e0be4ab GM |
17677 | |
17678 | for gltype in sig_atomic_t wchar_t wint_t ; do | |
17679 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5 | |
17680 | $as_echo_n "checking whether $gltype is signed... " >&6; } | |
17681 | if { as_var=gl_cv_type_${gltype}_signed; eval "test \"\${$as_var+set}\" = set"; }; then : | |
1fd182f0 PE |
17682 | $as_echo_n "(cached) " >&6 |
17683 | else | |
3e0be4ab | 17684 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
1fd182f0 | 17685 | /* end confdefs.h. */ |
1f5d53eb | 17686 | |
3e0be4ab GM |
17687 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be |
17688 | included before <wchar.h>. */ | |
17689 | #include <stddef.h> | |
17690 | #include <signal.h> | |
17691 | #if HAVE_WCHAR_H | |
17692 | # include <stdio.h> | |
17693 | # include <time.h> | |
17694 | # include <wchar.h> | |
17695 | #endif | |
17696 | ||
17697 | int verify[2 * (($gltype) -1 < ($gltype) 0) - 1]; | |
1fd182f0 PE |
17698 | int |
17699 | main () | |
17700 | { | |
3e0be4ab | 17701 | |
1fd182f0 PE |
17702 | ; |
17703 | return 0; | |
17704 | } | |
17705 | _ACEOF | |
3e0be4ab GM |
17706 | if ac_fn_c_try_compile "$LINENO"; then : |
17707 | result=yes | |
1f5d53eb | 17708 | else |
3e0be4ab | 17709 | result=no |
1f5d53eb | 17710 | fi |
3e0be4ab GM |
17711 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
17712 | eval gl_cv_type_${gltype}_signed=\$result | |
17713 | ||
1fd182f0 | 17714 | fi |
3e0be4ab GM |
17715 | eval ac_res=\$gl_cv_type_${gltype}_signed |
17716 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
17717 | $as_echo "$ac_res" >&6; } | |
17718 | eval result=\$gl_cv_type_${gltype}_signed | |
17719 | GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` | |
17720 | if test "$result" = yes; then | |
17721 | cat >>confdefs.h <<_ACEOF | |
17722 | #define HAVE_SIGNED_${GLTYPE} 1 | |
17723 | _ACEOF | |
1fd182f0 | 17724 | |
3e0be4ab GM |
17725 | eval HAVE_SIGNED_${GLTYPE}=1 |
17726 | else | |
17727 | eval HAVE_SIGNED_${GLTYPE}=0 | |
17728 | fi | |
17729 | done | |
1fd182f0 | 17730 | |
1f5d53eb | 17731 | |
3e0be4ab GM |
17732 | gl_cv_type_ptrdiff_t_signed=yes |
17733 | gl_cv_type_size_t_signed=no | |
17734 | if test $APPLE_UNIVERSAL_BUILD = 0; then | |
17735 | ||
17736 | ||
17737 | for gltype in ptrdiff_t size_t ; do | |
17738 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5 | |
17739 | $as_echo_n "checking for $gltype integer literal suffix... " >&6; } | |
17740 | if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then : | |
1fd182f0 PE |
17741 | $as_echo_n "(cached) " >&6 |
17742 | else | |
3e0be4ab GM |
17743 | eval gl_cv_type_${gltype}_suffix=no |
17744 | eval result=\$gl_cv_type_${gltype}_signed | |
17745 | if test "$result" = yes; then | |
17746 | glsufu= | |
17747 | else | |
17748 | glsufu=u | |
17749 | fi | |
17750 | for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do | |
17751 | case $glsuf in | |
17752 | '') gltype1='int';; | |
17753 | l) gltype1='long int';; | |
17754 | ll) gltype1='long long int';; | |
17755 | i64) gltype1='__int64';; | |
17756 | u) gltype1='unsigned int';; | |
17757 | ul) gltype1='unsigned long int';; | |
17758 | ull) gltype1='unsigned long long int';; | |
17759 | ui64)gltype1='unsigned __int64';; | |
17760 | esac | |
17761 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1fd182f0 | 17762 | /* end confdefs.h. */ |
1fd182f0 | 17763 | |
3e0be4ab GM |
17764 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be |
17765 | included before <wchar.h>. */ | |
17766 | #include <stddef.h> | |
17767 | #include <signal.h> | |
17768 | #if HAVE_WCHAR_H | |
17769 | # include <stdio.h> | |
17770 | # include <time.h> | |
17771 | # include <wchar.h> | |
17772 | #endif | |
17773 | ||
17774 | extern $gltype foo; | |
17775 | extern $gltype1 foo; | |
1fd182f0 PE |
17776 | int |
17777 | main () | |
17778 | { | |
3e0be4ab | 17779 | |
1fd182f0 PE |
17780 | ; |
17781 | return 0; | |
17782 | } | |
17783 | _ACEOF | |
3e0be4ab GM |
17784 | if ac_fn_c_try_compile "$LINENO"; then : |
17785 | eval gl_cv_type_${gltype}_suffix=\$glsuf | |
1fd182f0 | 17786 | fi |
3e0be4ab GM |
17787 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
17788 | eval result=\$gl_cv_type_${gltype}_suffix | |
17789 | test "$result" != no && break | |
17790 | done | |
1fd182f0 | 17791 | fi |
3e0be4ab GM |
17792 | eval ac_res=\$gl_cv_type_${gltype}_suffix |
17793 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
17794 | $as_echo "$ac_res" >&6; } | |
17795 | GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` | |
17796 | eval result=\$gl_cv_type_${gltype}_suffix | |
17797 | test "$result" = no && result= | |
17798 | eval ${GLTYPE}_SUFFIX=\$result | |
17799 | cat >>confdefs.h <<_ACEOF | |
17800 | #define ${GLTYPE}_SUFFIX $result | |
1f5d53eb | 17801 | _ACEOF |
1fd182f0 | 17802 | |
3e0be4ab | 17803 | done |
1f5d53eb | 17804 | |
1f5d53eb | 17805 | |
3e0be4ab | 17806 | fi |
1f5d53eb | 17807 | |
3e0be4ab GM |
17808 | |
17809 | for gltype in sig_atomic_t wchar_t wint_t ; do | |
17810 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5 | |
17811 | $as_echo_n "checking for $gltype integer literal suffix... " >&6; } | |
17812 | if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then : | |
1fd182f0 PE |
17813 | $as_echo_n "(cached) " >&6 |
17814 | else | |
3e0be4ab GM |
17815 | eval gl_cv_type_${gltype}_suffix=no |
17816 | eval result=\$gl_cv_type_${gltype}_signed | |
17817 | if test "$result" = yes; then | |
17818 | glsufu= | |
17819 | else | |
17820 | glsufu=u | |
17821 | fi | |
17822 | for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do | |
17823 | case $glsuf in | |
17824 | '') gltype1='int';; | |
17825 | l) gltype1='long int';; | |
17826 | ll) gltype1='long long int';; | |
17827 | i64) gltype1='__int64';; | |
17828 | u) gltype1='unsigned int';; | |
17829 | ul) gltype1='unsigned long int';; | |
17830 | ull) gltype1='unsigned long long int';; | |
17831 | ui64)gltype1='unsigned __int64';; | |
17832 | esac | |
17833 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1fd182f0 | 17834 | /* end confdefs.h. */ |
1fd182f0 | 17835 | |
3e0be4ab GM |
17836 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be |
17837 | included before <wchar.h>. */ | |
17838 | #include <stddef.h> | |
17839 | #include <signal.h> | |
17840 | #if HAVE_WCHAR_H | |
17841 | # include <stdio.h> | |
17842 | # include <time.h> | |
17843 | # include <wchar.h> | |
17844 | #endif | |
17845 | ||
17846 | extern $gltype foo; | |
17847 | extern $gltype1 foo; | |
1fd182f0 PE |
17848 | int |
17849 | main () | |
17850 | { | |
3e0be4ab | 17851 | |
1fd182f0 PE |
17852 | ; |
17853 | return 0; | |
17854 | } | |
17855 | _ACEOF | |
3e0be4ab GM |
17856 | if ac_fn_c_try_compile "$LINENO"; then : |
17857 | eval gl_cv_type_${gltype}_suffix=\$glsuf | |
1fd182f0 | 17858 | fi |
3e0be4ab GM |
17859 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
17860 | eval result=\$gl_cv_type_${gltype}_suffix | |
17861 | test "$result" != no && break | |
17862 | done | |
1fd182f0 | 17863 | fi |
3e0be4ab GM |
17864 | eval ac_res=\$gl_cv_type_${gltype}_suffix |
17865 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
17866 | $as_echo "$ac_res" >&6; } | |
17867 | GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` | |
17868 | eval result=\$gl_cv_type_${gltype}_suffix | |
17869 | test "$result" = no && result= | |
17870 | eval ${GLTYPE}_SUFFIX=\$result | |
17871 | cat >>confdefs.h <<_ACEOF | |
17872 | #define ${GLTYPE}_SUFFIX $result | |
1f5d53eb PE |
17873 | _ACEOF |
17874 | ||
3e0be4ab GM |
17875 | done |
17876 | ||
17877 | ||
17878 | ||
17879 | STDINT_H=stdint.h | |
17880 | fi | |
17881 | ||
17882 | if test -n "$STDINT_H"; then | |
17883 | GL_GENERATE_STDINT_H_TRUE= | |
17884 | GL_GENERATE_STDINT_H_FALSE='#' | |
17885 | else | |
17886 | GL_GENERATE_STDINT_H_TRUE='#' | |
17887 | GL_GENERATE_STDINT_H_FALSE= | |
17888 | fi | |
17889 | ||
17890 | ||
17891 | ||
17892 | ||
17893 | ||
17894 | GNULIB_IMAXABS=0; | |
17895 | GNULIB_IMAXDIV=0; | |
17896 | GNULIB_STRTOIMAX=0; | |
17897 | GNULIB_STRTOUMAX=0; | |
17898 | HAVE_DECL_IMAXABS=1; | |
17899 | HAVE_DECL_IMAXDIV=1; | |
17900 | HAVE_DECL_STRTOIMAX=1; | |
17901 | HAVE_DECL_STRTOUMAX=1; | |
17902 | INT32_MAX_LT_INTMAX_MAX=1; | |
17903 | INT64_MAX_EQ_LONG_MAX='defined _LP64'; | |
17904 | PRI_MACROS_BROKEN=0; | |
17905 | PRIPTR_PREFIX=__PRIPTR_PREFIX; | |
17906 | UINT32_MAX_LT_UINTMAX_MAX=1; | |
17907 | UINT64_MAX_EQ_ULONG_MAX='defined _LP64'; | |
17908 | ||
1f5d53eb | 17909 | |
1f5d53eb | 17910 | |
1f5d53eb | 17911 | |
1f5d53eb | 17912 | |
1f5d53eb | 17913 | |
1fd182f0 | 17914 | |
1fd182f0 PE |
17915 | |
17916 | ||
17917 | ||
17918 | ||
17919 | ||
34119902 GM |
17920 | |
17921 | ||
3e0be4ab GM |
17922 | |
17923 | if test $gl_cv_have_include_next = yes; then | |
17924 | gl_cv_next_inttypes_h='<'inttypes.h'>' | |
17925 | else | |
17926 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5 | |
17927 | $as_echo_n "checking absolute name of <inttypes.h>... " >&6; } | |
17928 | if test "${gl_cv_next_inttypes_h+set}" = set; then : | |
17929 | $as_echo_n "(cached) " >&6 | |
34119902 | 17930 | else |
34119902 | 17931 | |
3e0be4ab GM |
17932 | if test $ac_cv_header_inttypes_h = yes; then |
17933 | ||
17934 | ||
17935 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
17936 | /* end confdefs.h. */ | |
17937 | #include <inttypes.h> | |
34119902 | 17938 | |
34119902 | 17939 | _ACEOF |
3e0be4ab GM |
17940 | case "$host_os" in |
17941 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
17942 | *) gl_absname_cpp="$ac_cpp" ;; | |
17943 | esac | |
17944 | gl_cv_next_inttypes_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
17945 | sed -n '\#/inttypes.h#{ | |
17946 | s#.*"\(.*/inttypes.h\)".*#\1# | |
17947 | s#^/[^/]#//&# | |
17948 | p | |
17949 | q | |
17950 | }'`'"' | |
17951 | else | |
17952 | gl_cv_next_inttypes_h='<'inttypes.h'>' | |
17953 | fi | |
17954 | ||
34119902 GM |
17955 | |
17956 | fi | |
3e0be4ab GM |
17957 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5 |
17958 | $as_echo "$gl_cv_next_inttypes_h" >&6; } | |
17959 | fi | |
17960 | NEXT_INTTYPES_H=$gl_cv_next_inttypes_h | |
34119902 | 17961 | |
3e0be4ab GM |
17962 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then |
17963 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
17964 | gl_next_as_first_directive='<'inttypes.h'>' | |
17965 | else | |
17966 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
17967 | gl_next_as_first_directive=$gl_cv_next_inttypes_h | |
17968 | fi | |
17969 | NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive | |
34119902 | 17970 | |
34119902 | 17971 | |
34119902 GM |
17972 | |
17973 | ||
34119902 GM |
17974 | |
17975 | ||
17976 | ||
17977 | ||
3e0be4ab | 17978 | $as_echo "#define GL_TRIGGER_STDC_LIMIT_MACROS 1" >>confdefs.h |
34119902 GM |
17979 | |
17980 | ||
17981 | ||
17982 | ||
34119902 GM |
17983 | |
17984 | ||
3e0be4ab GM |
17985 | GNULIB_FCHMODAT=0; |
17986 | GNULIB_FSTATAT=0; | |
17987 | GNULIB_FUTIMENS=0; | |
17988 | GNULIB_LCHMOD=0; | |
17989 | GNULIB_LSTAT=0; | |
17990 | GNULIB_MKDIRAT=0; | |
17991 | GNULIB_MKFIFO=0; | |
17992 | GNULIB_MKFIFOAT=0; | |
17993 | GNULIB_MKNOD=0; | |
17994 | GNULIB_MKNODAT=0; | |
17995 | GNULIB_STAT=0; | |
17996 | GNULIB_UTIMENSAT=0; | |
17997 | HAVE_FCHMODAT=1; | |
17998 | HAVE_FSTATAT=1; | |
17999 | HAVE_FUTIMENS=1; | |
18000 | HAVE_LCHMOD=1; | |
18001 | HAVE_LSTAT=1; | |
18002 | HAVE_MKDIRAT=1; | |
18003 | HAVE_MKFIFO=1; | |
18004 | HAVE_MKFIFOAT=1; | |
18005 | HAVE_MKNOD=1; | |
18006 | HAVE_MKNODAT=1; | |
18007 | HAVE_UTIMENSAT=1; | |
18008 | REPLACE_FSTAT=0; | |
18009 | REPLACE_FSTATAT=0; | |
18010 | REPLACE_FUTIMENS=0; | |
18011 | REPLACE_LSTAT=0; | |
18012 | REPLACE_MKDIR=0; | |
18013 | REPLACE_MKFIFO=0; | |
18014 | REPLACE_MKNOD=0; | |
18015 | REPLACE_STAT=0; | |
18016 | REPLACE_UTIMENSAT=0; | |
34119902 | 18017 | |
3e0be4ab GM |
18018 | |
18019 | ||
18020 | ||
18021 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5 | |
18022 | $as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; } | |
18023 | if test "${gl_cv_func_lstat_dereferences_slashed_symlink+set}" = set; then : | |
18024 | $as_echo_n "(cached) " >&6 | |
18025 | else | |
18026 | rm -f conftest.sym conftest.file | |
18027 | echo >conftest.file | |
18028 | if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then | |
18029 | if test "$cross_compiling" = yes; then : | |
18030 | # When cross-compiling, be pessimistic so we will end up using the | |
18031 | # replacement version of lstat that checks for trailing slashes and | |
18032 | # calls lstat a second time when necessary. | |
18033 | gl_cv_func_lstat_dereferences_slashed_symlink=no | |
18034 | ||
18035 | else | |
18036 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
18037 | /* end confdefs.h. */ | |
18038 | $ac_includes_default | |
18039 | int | |
18040 | main () | |
18041 | { | |
18042 | struct stat sbuf; | |
18043 | /* Linux will dereference the symlink and fail, as required by | |
18044 | POSIX. That is better in the sense that it means we will not | |
18045 | have to compile and use the lstat wrapper. */ | |
18046 | return lstat ("conftest.sym/", &sbuf) == 0; | |
18047 | ||
18048 | ; | |
18049 | return 0; | |
18050 | } | |
34119902 | 18051 | _ACEOF |
3e0be4ab GM |
18052 | if ac_fn_c_try_run "$LINENO"; then : |
18053 | gl_cv_func_lstat_dereferences_slashed_symlink=yes | |
18054 | else | |
18055 | gl_cv_func_lstat_dereferences_slashed_symlink=no | |
34119902 | 18056 | fi |
3e0be4ab GM |
18057 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
18058 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
18059 | fi | |
18060 | ||
18061 | else | |
18062 | # If the 'ln -s' command failed, then we probably don't even | |
18063 | # have an lstat function. | |
18064 | gl_cv_func_lstat_dereferences_slashed_symlink=no | |
18065 | fi | |
18066 | rm -f conftest.sym conftest.file | |
34119902 | 18067 | |
1f5d53eb | 18068 | fi |
3e0be4ab GM |
18069 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5 |
18070 | $as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; } | |
18071 | test $gl_cv_func_lstat_dereferences_slashed_symlink = yes && | |
18072 | ||
18073 | cat >>confdefs.h <<_ACEOF | |
18074 | #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 | |
18075 | _ACEOF | |
18076 | ||
18077 | ||
18078 | ||
18079 | GNULIB_MKTIME=0; | |
18080 | GNULIB_NANOSLEEP=0; | |
18081 | GNULIB_STRPTIME=0; | |
18082 | GNULIB_TIMEGM=0; | |
18083 | GNULIB_TIME_R=0; | |
18084 | HAVE_DECL_LOCALTIME_R=1; | |
18085 | HAVE_NANOSLEEP=1; | |
18086 | HAVE_STRPTIME=1; | |
18087 | HAVE_TIMEGM=1; | |
18088 | REPLACE_LOCALTIME_R=GNULIB_PORTCHECK; | |
18089 | REPLACE_MKTIME=GNULIB_PORTCHECK; | |
18090 | REPLACE_NANOSLEEP=GNULIB_PORTCHECK; | |
18091 | REPLACE_TIMEGM=GNULIB_PORTCHECK; | |
18092 | ||
18093 | ||
18094 | ||
1fd182f0 PE |
18095 | |
18096 | ||
18097 | ||
3e0be4ab GM |
18098 | GNULIB_PTHREAD_SIGMASK=0; |
18099 | GNULIB_SIGNAL_H_SIGPIPE=0; | |
18100 | GNULIB_SIGPROCMASK=0; | |
18101 | GNULIB_SIGACTION=0; | |
18102 | HAVE_POSIX_SIGNALBLOCKING=1; | |
18103 | HAVE_PTHREAD_SIGMASK=1; | |
18104 | HAVE_SIGSET_T=1; | |
18105 | HAVE_SIGINFO_T=1; | |
18106 | HAVE_SIGACTION=1; | |
18107 | HAVE_STRUCT_SIGACTION_SA_SIGACTION=1; | |
1fd182f0 | 18108 | |
3e0be4ab | 18109 | HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1; |
1fd182f0 | 18110 | |
3e0be4ab GM |
18111 | HAVE_SIGHANDLER_T=1; |
18112 | REPLACE_PTHREAD_SIGMASK=0; | |
1fd182f0 PE |
18113 | |
18114 | ||
18115 | ||
b06b1098 | 18116 | |
3e0be4ab GM |
18117 | ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" " |
18118 | #include <signal.h> | |
18119 | /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */ | |
18120 | #include <sys/types.h> | |
b06b1098 | 18121 | |
3e0be4ab GM |
18122 | " |
18123 | if test "x$ac_cv_type_sigset_t" = x""yes; then : | |
1fd182f0 | 18124 | |
3e0be4ab GM |
18125 | cat >>confdefs.h <<_ACEOF |
18126 | #define HAVE_SIGSET_T 1 | |
18127 | _ACEOF | |
1fd182f0 | 18128 | |
3e0be4ab GM |
18129 | gl_cv_type_sigset_t=yes |
18130 | else | |
18131 | gl_cv_type_sigset_t=no | |
1f5d53eb | 18132 | fi |
b06b1098 | 18133 | |
3e0be4ab GM |
18134 | if test $gl_cv_type_sigset_t != yes; then |
18135 | HAVE_SIGSET_T=0 | |
18136 | fi | |
1fd182f0 | 18137 | |
1fd182f0 | 18138 | |
3e0be4ab GM |
18139 | |
18140 | ||
18141 | ||
18142 | if test $ac_cv_header_sys_socket_h = no; then | |
18143 | for ac_header in ws2tcpip.h | |
1f5d53eb | 18144 | do : |
3e0be4ab GM |
18145 | ac_fn_c_check_header_mongrel "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default" |
18146 | if test "x$ac_cv_header_ws2tcpip_h" = x""yes; then : | |
1f5d53eb | 18147 | cat >>confdefs.h <<_ACEOF |
3e0be4ab | 18148 | #define HAVE_WS2TCPIP_H 1 |
1f5d53eb | 18149 | _ACEOF |
1fd182f0 | 18150 | |
1f5d53eb | 18151 | fi |
1fd182f0 | 18152 | |
1f5d53eb | 18153 | done |
1fd182f0 | 18154 | |
3e0be4ab | 18155 | fi |
1fd182f0 | 18156 | |
3e0be4ab GM |
18157 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5 |
18158 | $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; } | |
18159 | if test "${ac_cv_header_stdbool_h+set}" = set; then : | |
18160 | $as_echo_n "(cached) " >&6 | |
18161 | else | |
18162 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
18163 | /* end confdefs.h. */ | |
18164 | ||
18165 | #include <stdbool.h> | |
18166 | #ifndef bool | |
18167 | "error: bool is not defined" | |
18168 | #endif | |
18169 | #ifndef false | |
18170 | "error: false is not defined" | |
18171 | #endif | |
18172 | #if false | |
18173 | "error: false is not 0" | |
18174 | #endif | |
18175 | #ifndef true | |
18176 | "error: true is not defined" | |
18177 | #endif | |
18178 | #if true != 1 | |
18179 | "error: true is not 1" | |
18180 | #endif | |
18181 | #ifndef __bool_true_false_are_defined | |
18182 | "error: __bool_true_false_are_defined is not defined" | |
18183 | #endif | |
18184 | ||
18185 | struct s { _Bool s: 1; _Bool t; } s; | |
18186 | ||
18187 | char a[true == 1 ? 1 : -1]; | |
18188 | char b[false == 0 ? 1 : -1]; | |
18189 | char c[__bool_true_false_are_defined == 1 ? 1 : -1]; | |
18190 | char d[(bool) 0.5 == true ? 1 : -1]; | |
18191 | /* See body of main program for 'e'. */ | |
18192 | char f[(_Bool) 0.0 == false ? 1 : -1]; | |
18193 | char g[true]; | |
18194 | char h[sizeof (_Bool)]; | |
18195 | char i[sizeof s.t]; | |
18196 | enum { j = false, k = true, l = false * true, m = true * 256 }; | |
18197 | /* The following fails for | |
18198 | HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */ | |
18199 | _Bool n[m]; | |
18200 | char o[sizeof n == m * sizeof n[0] ? 1 : -1]; | |
18201 | char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; | |
18202 | /* Catch a bug in an HP-UX C compiler. See | |
18203 | http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html | |
18204 | http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html | |
18205 | */ | |
18206 | _Bool q = true; | |
18207 | _Bool *pq = &q; | |
18208 | ||
18209 | int | |
18210 | main () | |
18211 | { | |
18212 | ||
18213 | bool e = &s; | |
18214 | *pq |= q; | |
18215 | *pq |= ! q; | |
18216 | /* Refer to every declared value, to avoid compiler optimizations. */ | |
18217 | return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l | |
18218 | + !m + !n + !o + !p + !q + !pq); | |
18219 | ||
18220 | ; | |
18221 | return 0; | |
18222 | } | |
1f5d53eb | 18223 | _ACEOF |
3e0be4ab GM |
18224 | if ac_fn_c_try_compile "$LINENO"; then : |
18225 | ac_cv_header_stdbool_h=yes | |
18226 | else | |
18227 | ac_cv_header_stdbool_h=no | |
18228 | fi | |
18229 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
18230 | fi | |
18231 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5 | |
18232 | $as_echo "$ac_cv_header_stdbool_h" >&6; } | |
18233 | ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default" | |
18234 | if test "x$ac_cv_type__Bool" = x""yes; then : | |
1f5d53eb PE |
18235 | |
18236 | cat >>confdefs.h <<_ACEOF | |
3e0be4ab | 18237 | #define HAVE__BOOL 1 |
1f5d53eb | 18238 | _ACEOF |
1fd182f0 | 18239 | |
b06b1098 | 18240 | |
1fd182f0 PE |
18241 | fi |
18242 | ||
3e0be4ab GM |
18243 | |
18244 | ||
18245 | REPLACE_NULL=0; | |
18246 | HAVE_WCHAR_T=1; | |
18247 | ||
18248 | ||
18249 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5 | |
18250 | $as_echo_n "checking for wchar_t... " >&6; } | |
18251 | if test "${gt_cv_c_wchar_t+set}" = set; then : | |
18252 | $as_echo_n "(cached) " >&6 | |
18253 | else | |
18254 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1f5d53eb | 18255 | /* end confdefs.h. */ |
3e0be4ab GM |
18256 | #include <stddef.h> |
18257 | wchar_t foo = (wchar_t)'\0'; | |
1f5d53eb PE |
18258 | int |
18259 | main () | |
18260 | { | |
3e0be4ab | 18261 | |
1f5d53eb PE |
18262 | ; |
18263 | return 0; | |
18264 | } | |
1fd182f0 | 18265 | _ACEOF |
3e0be4ab GM |
18266 | if ac_fn_c_try_compile "$LINENO"; then : |
18267 | gt_cv_c_wchar_t=yes | |
18268 | else | |
18269 | gt_cv_c_wchar_t=no | |
18270 | fi | |
18271 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
18272 | fi | |
18273 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5 | |
18274 | $as_echo "$gt_cv_c_wchar_t" >&6; } | |
18275 | if test $gt_cv_c_wchar_t = yes; then | |
1f5d53eb | 18276 | |
3e0be4ab GM |
18277 | $as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h |
18278 | ||
18279 | fi | |
18280 | ||
18281 | ||
18282 | GNULIB_DPRINTF=0; | |
18283 | GNULIB_FCLOSE=0; | |
18284 | GNULIB_FFLUSH=0; | |
18285 | GNULIB_FGETC=0; | |
18286 | GNULIB_FGETS=0; | |
18287 | GNULIB_FOPEN=0; | |
18288 | GNULIB_FPRINTF=0; | |
18289 | GNULIB_FPRINTF_POSIX=0; | |
18290 | GNULIB_FPURGE=0; | |
18291 | GNULIB_FPUTC=0; | |
18292 | GNULIB_FPUTS=0; | |
18293 | GNULIB_FREAD=0; | |
18294 | GNULIB_FREOPEN=0; | |
18295 | GNULIB_FSCANF=0; | |
18296 | GNULIB_FSEEK=0; | |
18297 | GNULIB_FSEEKO=0; | |
18298 | GNULIB_FTELL=0; | |
18299 | GNULIB_FTELLO=0; | |
18300 | GNULIB_FWRITE=0; | |
18301 | GNULIB_GETC=0; | |
18302 | GNULIB_GETCHAR=0; | |
18303 | GNULIB_GETDELIM=0; | |
18304 | GNULIB_GETLINE=0; | |
18305 | GNULIB_GETS=0; | |
18306 | GNULIB_OBSTACK_PRINTF=0; | |
18307 | GNULIB_OBSTACK_PRINTF_POSIX=0; | |
18308 | GNULIB_PERROR=0; | |
18309 | GNULIB_POPEN=0; | |
18310 | GNULIB_PRINTF=0; | |
18311 | GNULIB_PRINTF_POSIX=0; | |
18312 | GNULIB_PUTC=0; | |
18313 | GNULIB_PUTCHAR=0; | |
18314 | GNULIB_PUTS=0; | |
18315 | GNULIB_REMOVE=0; | |
18316 | GNULIB_RENAME=0; | |
18317 | GNULIB_RENAMEAT=0; | |
18318 | GNULIB_SCANF=0; | |
18319 | GNULIB_SNPRINTF=0; | |
18320 | GNULIB_SPRINTF_POSIX=0; | |
18321 | GNULIB_STDIO_H_NONBLOCKING=0; | |
18322 | GNULIB_STDIO_H_SIGPIPE=0; | |
18323 | GNULIB_TMPFILE=0; | |
18324 | GNULIB_VASPRINTF=0; | |
18325 | GNULIB_VFSCANF=0; | |
18326 | GNULIB_VSCANF=0; | |
18327 | GNULIB_VDPRINTF=0; | |
18328 | GNULIB_VFPRINTF=0; | |
18329 | GNULIB_VFPRINTF_POSIX=0; | |
18330 | GNULIB_VPRINTF=0; | |
18331 | GNULIB_VPRINTF_POSIX=0; | |
18332 | GNULIB_VSNPRINTF=0; | |
18333 | GNULIB_VSPRINTF_POSIX=0; | |
18334 | HAVE_DECL_FPURGE=1; | |
18335 | HAVE_DECL_FSEEKO=1; | |
18336 | HAVE_DECL_FTELLO=1; | |
18337 | HAVE_DECL_GETDELIM=1; | |
18338 | HAVE_DECL_GETLINE=1; | |
18339 | HAVE_DECL_OBSTACK_PRINTF=1; | |
18340 | HAVE_DECL_SNPRINTF=1; | |
18341 | HAVE_DECL_VSNPRINTF=1; | |
18342 | HAVE_DPRINTF=1; | |
18343 | HAVE_FSEEKO=1; | |
18344 | HAVE_FTELLO=1; | |
18345 | HAVE_RENAMEAT=1; | |
18346 | HAVE_VASPRINTF=1; | |
18347 | HAVE_VDPRINTF=1; | |
18348 | REPLACE_DPRINTF=0; | |
18349 | REPLACE_FCLOSE=0; | |
18350 | REPLACE_FFLUSH=0; | |
18351 | REPLACE_FOPEN=0; | |
18352 | REPLACE_FPRINTF=0; | |
18353 | REPLACE_FPURGE=0; | |
18354 | REPLACE_FREOPEN=0; | |
18355 | REPLACE_FSEEK=0; | |
18356 | REPLACE_FSEEKO=0; | |
18357 | REPLACE_FTELL=0; | |
18358 | REPLACE_FTELLO=0; | |
18359 | REPLACE_GETDELIM=0; | |
18360 | REPLACE_GETLINE=0; | |
18361 | REPLACE_OBSTACK_PRINTF=0; | |
18362 | REPLACE_PERROR=0; | |
18363 | REPLACE_POPEN=0; | |
18364 | REPLACE_PRINTF=0; | |
18365 | REPLACE_REMOVE=0; | |
18366 | REPLACE_RENAME=0; | |
18367 | REPLACE_RENAMEAT=0; | |
18368 | REPLACE_SNPRINTF=0; | |
18369 | REPLACE_SPRINTF=0; | |
18370 | REPLACE_STDIO_READ_FUNCS=0; | |
18371 | REPLACE_STDIO_WRITE_FUNCS=0; | |
18372 | REPLACE_TMPFILE=0; | |
18373 | REPLACE_VASPRINTF=0; | |
18374 | REPLACE_VDPRINTF=0; | |
18375 | REPLACE_VFPRINTF=0; | |
18376 | REPLACE_VPRINTF=0; | |
18377 | REPLACE_VSNPRINTF=0; | |
18378 | REPLACE_VSPRINTF=0; | |
1f5d53eb | 18379 | |
1fd182f0 | 18380 | |
3e0be4ab GM |
18381 | ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include <time.h> |
18382 | " | |
18383 | if test "x$ac_cv_member_struct_tm_tm_gmtoff" = x""yes; then : | |
1fd182f0 | 18384 | |
3e0be4ab | 18385 | $as_echo "#define HAVE_TM_GMTOFF 1" >>confdefs.h |
1fd182f0 | 18386 | |
1f5d53eb | 18387 | fi |
1fd182f0 | 18388 | |
1f5d53eb | 18389 | |
1fd182f0 | 18390 | |
1fd182f0 | 18391 | |
3e0be4ab GM |
18392 | ac_fn_c_check_decl "$LINENO" "strtoimax" "ac_cv_have_decl_strtoimax" "$ac_includes_default" |
18393 | if test "x$ac_cv_have_decl_strtoimax" = x""yes; then : | |
18394 | ac_have_decl=1 | |
18395 | else | |
18396 | ac_have_decl=0 | |
18397 | fi | |
1f5d53eb | 18398 | |
3e0be4ab GM |
18399 | cat >>confdefs.h <<_ACEOF |
18400 | #define HAVE_DECL_STRTOIMAX $ac_have_decl | |
18401 | _ACEOF | |
cc322c06 | 18402 | |
3e0be4ab GM |
18403 | ac_fn_c_check_decl "$LINENO" "strtoumax" "ac_cv_have_decl_strtoumax" "$ac_includes_default" |
18404 | if test "x$ac_cv_have_decl_strtoumax" = x""yes; then : | |
18405 | ac_have_decl=1 | |
18406 | else | |
18407 | ac_have_decl=0 | |
18408 | fi | |
cc322c06 | 18409 | |
3e0be4ab GM |
18410 | cat >>confdefs.h <<_ACEOF |
18411 | #define HAVE_DECL_STRTOUMAX $ac_have_decl | |
18412 | _ACEOF | |
cc322c06 GM |
18413 | |
18414 | ||
1f5d53eb | 18415 | |
3e0be4ab GM |
18416 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5 |
18417 | $as_echo_n "checking whether stat file-mode macros are broken... " >&6; } | |
18418 | if test "${ac_cv_header_stat_broken+set}" = set; then : | |
18419 | $as_echo_n "(cached) " >&6 | |
18420 | else | |
18421 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
18422 | /* end confdefs.h. */ | |
18423 | #include <sys/types.h> | |
18424 | #include <sys/stat.h> | |
1f5d53eb | 18425 | |
3e0be4ab GM |
18426 | #if defined S_ISBLK && defined S_IFDIR |
18427 | extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1]; | |
18428 | #endif | |
1fd182f0 | 18429 | |
3e0be4ab GM |
18430 | #if defined S_ISBLK && defined S_IFCHR |
18431 | extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1]; | |
18432 | #endif | |
e275c824 | 18433 | |
3e0be4ab GM |
18434 | #if defined S_ISLNK && defined S_IFREG |
18435 | extern char c3[S_ISLNK (S_IFREG) ? -1 : 1]; | |
18436 | #endif | |
e275c824 | 18437 | |
3e0be4ab GM |
18438 | #if defined S_ISSOCK && defined S_IFREG |
18439 | extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1]; | |
18440 | #endif | |
e275c824 | 18441 | |
3e0be4ab GM |
18442 | _ACEOF |
18443 | if ac_fn_c_try_compile "$LINENO"; then : | |
18444 | ac_cv_header_stat_broken=no | |
18445 | else | |
18446 | ac_cv_header_stat_broken=yes | |
18447 | fi | |
18448 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
18449 | fi | |
18450 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5 | |
18451 | $as_echo "$ac_cv_header_stat_broken" >&6; } | |
18452 | if test $ac_cv_header_stat_broken = yes; then | |
e275c824 | 18453 | |
3e0be4ab | 18454 | $as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h |
e275c824 | 18455 | |
3e0be4ab | 18456 | fi |
e275c824 | 18457 | |
e275c824 PE |
18458 | |
18459 | ||
3e0be4ab GM |
18460 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5 |
18461 | $as_echo_n "checking for C/C++ restrict keyword... " >&6; } | |
18462 | if test "${ac_cv_c_restrict+set}" = set; then : | |
18463 | $as_echo_n "(cached) " >&6 | |
18464 | else | |
18465 | ac_cv_c_restrict=no | |
18466 | # The order here caters to the fact that C++ does not require restrict. | |
18467 | for ac_kw in __restrict __restrict__ _Restrict restrict; do | |
18468 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
18469 | /* end confdefs.h. */ | |
18470 | typedef int * int_ptr; | |
18471 | int foo (int_ptr $ac_kw ip) { | |
18472 | return ip[0]; | |
18473 | } | |
18474 | int | |
18475 | main () | |
18476 | { | |
18477 | int s[1]; | |
18478 | int * $ac_kw t = s; | |
18479 | t[0] = 0; | |
18480 | return foo(t) | |
18481 | ; | |
18482 | return 0; | |
18483 | } | |
18484 | _ACEOF | |
18485 | if ac_fn_c_try_compile "$LINENO"; then : | |
18486 | ac_cv_c_restrict=$ac_kw | |
18487 | fi | |
18488 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
18489 | test "$ac_cv_c_restrict" != no && break | |
18490 | done | |
e275c824 | 18491 | |
3e0be4ab GM |
18492 | fi |
18493 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5 | |
18494 | $as_echo "$ac_cv_c_restrict" >&6; } | |
e275c824 | 18495 | |
3e0be4ab GM |
18496 | case $ac_cv_c_restrict in |
18497 | restrict) ;; | |
18498 | no) $as_echo "#define restrict /**/" >>confdefs.h | |
18499 | ;; | |
18500 | *) cat >>confdefs.h <<_ACEOF | |
18501 | #define restrict $ac_cv_c_restrict | |
18502 | _ACEOF | |
18503 | ;; | |
18504 | esac | |
e275c824 | 18505 | |
52724a05 | 18506 | |
52724a05 GM |
18507 | |
18508 | ||
18509 | ||
3e0be4ab GM |
18510 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5 |
18511 | $as_echo_n "checking for struct timespec in <time.h>... " >&6; } | |
18512 | if test "${gl_cv_sys_struct_timespec_in_time_h+set}" = set; then : | |
18513 | $as_echo_n "(cached) " >&6 | |
18514 | else | |
18515 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
18516 | /* end confdefs.h. */ | |
18517 | #include <time.h> | |
52724a05 | 18518 | |
3e0be4ab GM |
18519 | int |
18520 | main () | |
18521 | { | |
18522 | static struct timespec x; x.tv_sec = x.tv_nsec; | |
18523 | ; | |
18524 | return 0; | |
18525 | } | |
18526 | _ACEOF | |
18527 | if ac_fn_c_try_compile "$LINENO"; then : | |
18528 | gl_cv_sys_struct_timespec_in_time_h=yes | |
18529 | else | |
18530 | gl_cv_sys_struct_timespec_in_time_h=no | |
52724a05 | 18531 | fi |
3e0be4ab GM |
18532 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
18533 | fi | |
18534 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5 | |
18535 | $as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; } | |
52724a05 | 18536 | |
3e0be4ab GM |
18537 | TIME_H_DEFINES_STRUCT_TIMESPEC=0 |
18538 | SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0 | |
18539 | PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0 | |
18540 | if test $gl_cv_sys_struct_timespec_in_time_h = yes; then | |
18541 | TIME_H_DEFINES_STRUCT_TIMESPEC=1 | |
18542 | else | |
18543 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5 | |
18544 | $as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; } | |
18545 | if test "${gl_cv_sys_struct_timespec_in_sys_time_h+set}" = set; then : | |
18546 | $as_echo_n "(cached) " >&6 | |
18547 | else | |
18548 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
18549 | /* end confdefs.h. */ | |
18550 | #include <sys/time.h> | |
52724a05 | 18551 | |
3e0be4ab GM |
18552 | int |
18553 | main () | |
18554 | { | |
18555 | static struct timespec x; x.tv_sec = x.tv_nsec; | |
18556 | ; | |
18557 | return 0; | |
18558 | } | |
18559 | _ACEOF | |
18560 | if ac_fn_c_try_compile "$LINENO"; then : | |
18561 | gl_cv_sys_struct_timespec_in_sys_time_h=yes | |
18562 | else | |
18563 | gl_cv_sys_struct_timespec_in_sys_time_h=no | |
18564 | fi | |
18565 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
18566 | fi | |
18567 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5 | |
18568 | $as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; } | |
18569 | if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then | |
18570 | SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1 | |
18571 | else | |
18572 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5 | |
18573 | $as_echo_n "checking for struct timespec in <pthread.h>... " >&6; } | |
18574 | if test "${gl_cv_sys_struct_timespec_in_pthread_h+set}" = set; then : | |
18575 | $as_echo_n "(cached) " >&6 | |
18576 | else | |
18577 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
18578 | /* end confdefs.h. */ | |
18579 | #include <pthread.h> | |
52724a05 | 18580 | |
3e0be4ab GM |
18581 | int |
18582 | main () | |
18583 | { | |
18584 | static struct timespec x; x.tv_sec = x.tv_nsec; | |
18585 | ; | |
18586 | return 0; | |
18587 | } | |
18588 | _ACEOF | |
18589 | if ac_fn_c_try_compile "$LINENO"; then : | |
18590 | gl_cv_sys_struct_timespec_in_pthread_h=yes | |
18591 | else | |
18592 | gl_cv_sys_struct_timespec_in_pthread_h=no | |
18593 | fi | |
18594 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
18595 | fi | |
18596 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5 | |
18597 | $as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; } | |
18598 | if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then | |
18599 | PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1 | |
18600 | fi | |
18601 | fi | |
18602 | fi | |
52724a05 GM |
18603 | |
18604 | ||
52724a05 | 18605 | |
e275c824 PE |
18606 | |
18607 | ||
e275c824 | 18608 | |
e275c824 PE |
18609 | |
18610 | ||
18611 | ||
52724a05 | 18612 | |
e275c824 PE |
18613 | |
18614 | ||
18615 | ||
18616 | ||
18617 | ||
3e0be4ab GM |
18618 | if test $gl_cv_have_include_next = yes; then |
18619 | gl_cv_next_time_h='<'time.h'>' | |
18620 | else | |
18621 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5 | |
18622 | $as_echo_n "checking absolute name of <time.h>... " >&6; } | |
18623 | if test "${gl_cv_next_time_h+set}" = set; then : | |
18624 | $as_echo_n "(cached) " >&6 | |
18625 | else | |
e275c824 | 18626 | |
3e0be4ab GM |
18627 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
18628 | /* end confdefs.h. */ | |
18629 | #include <time.h> | |
e275c824 | 18630 | |
3e0be4ab GM |
18631 | _ACEOF |
18632 | case "$host_os" in | |
18633 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
18634 | *) gl_absname_cpp="$ac_cpp" ;; | |
18635 | esac | |
18636 | gl_cv_next_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
18637 | sed -n '\#/time.h#{ | |
18638 | s#.*"\(.*/time.h\)".*#\1# | |
18639 | s#^/[^/]#//&# | |
18640 | p | |
18641 | q | |
18642 | }'`'"' | |
e275c824 | 18643 | |
e275c824 | 18644 | |
3e0be4ab GM |
18645 | fi |
18646 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5 | |
18647 | $as_echo "$gl_cv_next_time_h" >&6; } | |
18648 | fi | |
18649 | NEXT_TIME_H=$gl_cv_next_time_h | |
e275c824 | 18650 | |
3e0be4ab GM |
18651 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then |
18652 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
18653 | gl_next_as_first_directive='<'time.h'>' | |
18654 | else | |
18655 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
18656 | gl_next_as_first_directive=$gl_cv_next_time_h | |
18657 | fi | |
18658 | NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive | |
e275c824 PE |
18659 | |
18660 | ||
18661 | ||
18662 | ||
18663 | ||
18664 | ||
3e0be4ab GM |
18665 | ac_fn_c_check_decl "$LINENO" "localtime_r" "ac_cv_have_decl_localtime_r" "$ac_includes_default" |
18666 | if test "x$ac_cv_have_decl_localtime_r" = x""yes; then : | |
18667 | ac_have_decl=1 | |
18668 | else | |
18669 | ac_have_decl=0 | |
18670 | fi | |
e275c824 | 18671 | |
3e0be4ab GM |
18672 | cat >>confdefs.h <<_ACEOF |
18673 | #define HAVE_DECL_LOCALTIME_R $ac_have_decl | |
18674 | _ACEOF | |
e275c824 PE |
18675 | |
18676 | ||
18677 | ||
18678 | ||
3e0be4ab GM |
18679 | if false; then |
18680 | GL_COND_LIBTOOL_TRUE= | |
18681 | GL_COND_LIBTOOL_FALSE='#' | |
18682 | else | |
18683 | GL_COND_LIBTOOL_TRUE='#' | |
18684 | GL_COND_LIBTOOL_FALSE= | |
e275c824 PE |
18685 | fi |
18686 | ||
3e0be4ab GM |
18687 | gl_cond_libtool=false |
18688 | gl_libdeps= | |
18689 | gl_ltlibdeps= | |
18690 | gl_m4_base='m4' | |
e275c824 | 18691 | |
67342916 | 18692 | |
4fda9c95 GM |
18693 | |
18694 | ||
52724a05 GM |
18695 | |
18696 | ||
18697 | ||
18698 | ||
18699 | ||
3e0be4ab | 18700 | gl_source_base='lib' |
52724a05 GM |
18701 | |
18702 | ||
3e0be4ab GM |
18703 | if test $ac_cv_func_alloca_works = no; then |
18704 | : | |
18705 | fi | |
52724a05 | 18706 | |
3e0be4ab GM |
18707 | # Define an additional variable used in the Makefile substitution. |
18708 | if test $ac_cv_working_alloca_h = yes; then | |
18709 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5 | |
18710 | $as_echo_n "checking for alloca as a compiler built-in... " >&6; } | |
18711 | if test "${gl_cv_rpl_alloca+set}" = set; then : | |
18712 | $as_echo_n "(cached) " >&6 | |
18713 | else | |
52724a05 | 18714 | |
3e0be4ab GM |
18715 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
18716 | /* end confdefs.h. */ | |
52724a05 | 18717 | |
3e0be4ab GM |
18718 | #if defined __GNUC__ || defined _AIX || defined _MSC_VER |
18719 | Need own alloca | |
18720 | #endif | |
52724a05 | 18721 | |
3e0be4ab GM |
18722 | _ACEOF |
18723 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
18724 | $EGREP "Need own alloca" >/dev/null 2>&1; then : | |
18725 | gl_cv_rpl_alloca=yes | |
18726 | else | |
18727 | gl_cv_rpl_alloca=no | |
52724a05 | 18728 | fi |
3e0be4ab | 18729 | rm -f conftest* |
ae0d7250 PE |
18730 | |
18731 | ||
3e0be4ab GM |
18732 | fi |
18733 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5 | |
18734 | $as_echo "$gl_cv_rpl_alloca" >&6; } | |
18735 | if test $gl_cv_rpl_alloca = yes; then | |
ae0d7250 | 18736 | |
3e0be4ab | 18737 | $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h |
cc322c06 | 18738 | |
3e0be4ab GM |
18739 | ALLOCA_H=alloca.h |
18740 | else | |
18741 | ALLOCA_H= | |
18742 | fi | |
18743 | else | |
18744 | ALLOCA_H=alloca.h | |
18745 | fi | |
cc322c06 | 18746 | |
3e0be4ab GM |
18747 | if test -n "$ALLOCA_H"; then |
18748 | GL_GENERATE_ALLOCA_H_TRUE= | |
18749 | GL_GENERATE_ALLOCA_H_FALSE='#' | |
18750 | else | |
18751 | GL_GENERATE_ALLOCA_H_TRUE='#' | |
18752 | GL_GENERATE_ALLOCA_H_FALSE= | |
18753 | fi | |
1fd182f0 PE |
18754 | |
18755 | ||
18756 | ||
18757 | ||
18758 | ||
52724a05 | 18759 | |
3e0be4ab | 18760 | : |
1fd182f0 | 18761 | |
1fd182f0 | 18762 | |
1fd182f0 | 18763 | |
1fd182f0 | 18764 | |
3e0be4ab | 18765 | : |
1fd182f0 | 18766 | |
1fd182f0 | 18767 | |
1fd182f0 | 18768 | |
1fd182f0 | 18769 | |
1fd182f0 | 18770 | |
1fd182f0 | 18771 | |
1fd182f0 | 18772 | |
1fd182f0 | 18773 | |
1fd182f0 | 18774 | |
1fd182f0 | 18775 | |
1fd182f0 | 18776 | |
1fd182f0 | 18777 | |
1fd182f0 | 18778 | |
1fd182f0 | 18779 | |
1fd182f0 | 18780 | |
3e0be4ab | 18781 | $as_echo "#define HAVE_DUP2 1" >>confdefs.h |
1fd182f0 | 18782 | |
1fd182f0 | 18783 | |
3e0be4ab GM |
18784 | if test $HAVE_DUP2 = 1; then |
18785 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5 | |
18786 | $as_echo_n "checking whether dup2 works... " >&6; } | |
18787 | if test "${gl_cv_func_dup2_works+set}" = set; then : | |
18788 | $as_echo_n "(cached) " >&6 | |
18789 | else | |
18790 | if test "$cross_compiling" = yes; then : | |
18791 | case "$host_os" in | |
18792 | mingw*) # on this platform, dup2 always returns 0 for success | |
18793 | gl_cv_func_dup2_works=no;; | |
18794 | cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0 | |
18795 | gl_cv_func_dup2_works=no;; | |
18796 | linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a | |
18797 | # closed fd may yield -EBADF instead of -1 / errno=EBADF. | |
18798 | gl_cv_func_dup2_works=no;; | |
18799 | freebsd*) # on FreeBSD 6.1, dup2(1,1000000) gives EMFILE, not EBADF. | |
18800 | gl_cv_func_dup2_works=no;; | |
18801 | haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC. | |
18802 | gl_cv_func_dup2_works=no;; | |
18803 | *) gl_cv_func_dup2_works=yes;; | |
18804 | esac | |
18805 | else | |
18806 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
18807 | /* end confdefs.h. */ | |
1fd182f0 | 18808 | |
3e0be4ab GM |
18809 | #include <unistd.h> |
18810 | #include <fcntl.h> | |
18811 | #include <errno.h> | |
18812 | int | |
18813 | main () | |
18814 | { | |
18815 | int result = 0; | |
18816 | #ifdef FD_CLOEXEC | |
18817 | if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1) | |
18818 | result |= 1; | |
18819 | #endif | |
18820 | if (dup2 (1, 1) == 0) | |
18821 | result |= 2; | |
18822 | #ifdef FD_CLOEXEC | |
18823 | if (fcntl (1, F_GETFD) != FD_CLOEXEC) | |
18824 | result |= 4; | |
18825 | #endif | |
18826 | close (0); | |
18827 | if (dup2 (0, 0) != -1) | |
18828 | result |= 8; | |
18829 | /* Many gnulib modules require POSIX conformance of EBADF. */ | |
18830 | if (dup2 (2, 1000000) == -1 && errno != EBADF) | |
18831 | result |= 16; | |
18832 | return result; | |
1fd182f0 | 18833 | |
3e0be4ab GM |
18834 | ; |
18835 | return 0; | |
1fd182f0 | 18836 | } |
3e0be4ab | 18837 | |
1fd182f0 PE |
18838 | _ACEOF |
18839 | if ac_fn_c_try_run "$LINENO"; then : | |
3e0be4ab | 18840 | gl_cv_func_dup2_works=yes |
1fd182f0 | 18841 | else |
3e0be4ab | 18842 | gl_cv_func_dup2_works=no |
1fd182f0 PE |
18843 | fi |
18844 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
18845 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
067d23c9 | 18846 | fi |
067d23c9 | 18847 | |
067d23c9 | 18848 | |
1fd182f0 | 18849 | fi |
3e0be4ab GM |
18850 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5 |
18851 | $as_echo "$gl_cv_func_dup2_works" >&6; } | |
18852 | if test "$gl_cv_func_dup2_works" = no; then | |
067d23c9 | 18853 | |
3e0be4ab GM |
18854 | |
18855 | ||
18856 | if test $ac_cv_func_dup2 = yes; then | |
18857 | REPLACE_DUP2=1 | |
1fd182f0 | 18858 | fi |
067d23c9 KY |
18859 | |
18860 | ||
18861 | ||
067d23c9 | 18862 | |
cc322c06 GM |
18863 | |
18864 | ||
cc322c06 GM |
18865 | |
18866 | ||
3e0be4ab | 18867 | gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext" |
067d23c9 KY |
18868 | |
18869 | ||
3e0be4ab GM |
18870 | fi |
18871 | fi | |
067d23c9 | 18872 | |
067d23c9 | 18873 | |
ae0d7250 | 18874 | |
52724a05 | 18875 | |
ae0d7250 PE |
18876 | |
18877 | ||
3e0be4ab | 18878 | GNULIB_DUP2=1 |
ae0d7250 PE |
18879 | |
18880 | ||
18881 | ||
18882 | ||
18883 | ||
18884 | ||
18885 | ||
18886 | ||
ae0d7250 PE |
18887 | |
18888 | ||
ae0d7250 | 18889 | |
3e0be4ab GM |
18890 | # Persuade glibc <stdlib.h> to declare getloadavg(). |
18891 | ||
18892 | ||
18893 | gl_save_LIBS=$LIBS | |
18894 | ||
18895 | # getloadvg is present in libc on glibc >= 2.2, MacOS X, FreeBSD >= 2.0, | |
18896 | # NetBSD >= 0.9, OpenBSD >= 2.0, Solaris >= 7. | |
18897 | HAVE_GETLOADAVG=1 | |
18898 | ac_fn_c_check_func "$LINENO" "getloadavg" "ac_cv_func_getloadavg" | |
18899 | if test "x$ac_cv_func_getloadavg" = x""yes; then : | |
18900 | ||
18901 | else | |
18902 | gl_func_getloadavg_done=no | |
18903 | ||
18904 | # Some systems with -lutil have (and need) -lkvm as well, some do not. | |
18905 | # On Solaris, -lkvm requires nlist from -lelf, so check that first | |
18906 | # to get the right answer into the cache. | |
18907 | # For kstat on solaris, we need to test for libelf and libkvm to force the | |
18908 | # definition of SVR4 below. | |
18909 | if test $gl_func_getloadavg_done = no; then | |
18910 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_begin in -lelf" >&5 | |
18911 | $as_echo_n "checking for elf_begin in -lelf... " >&6; } | |
18912 | if test "${ac_cv_lib_elf_elf_begin+set}" = set; then : | |
ae0d7250 PE |
18913 | $as_echo_n "(cached) " >&6 |
18914 | else | |
3e0be4ab GM |
18915 | ac_check_lib_save_LIBS=$LIBS |
18916 | LIBS="-lelf $LIBS" | |
18917 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
ae0d7250 | 18918 | /* end confdefs.h. */ |
3e0be4ab GM |
18919 | |
18920 | /* Override any GCC internal prototype to avoid an error. | |
18921 | Use char because int might match the return type of a GCC | |
18922 | builtin and then its argument prototype would still apply. */ | |
18923 | #ifdef __cplusplus | |
18924 | extern "C" | |
18925 | #endif | |
18926 | char elf_begin (); | |
ae0d7250 PE |
18927 | int |
18928 | main () | |
18929 | { | |
3e0be4ab GM |
18930 | return elf_begin (); |
18931 | ; | |
18932 | return 0; | |
18933 | } | |
18934 | _ACEOF | |
18935 | if ac_fn_c_try_link "$LINENO"; then : | |
18936 | ac_cv_lib_elf_elf_begin=yes | |
18937 | else | |
18938 | ac_cv_lib_elf_elf_begin=no | |
18939 | fi | |
18940 | rm -f core conftest.err conftest.$ac_objext \ | |
18941 | conftest$ac_exeext conftest.$ac_ext | |
18942 | LIBS=$ac_check_lib_save_LIBS | |
18943 | fi | |
18944 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_elf_elf_begin" >&5 | |
18945 | $as_echo "$ac_cv_lib_elf_elf_begin" >&6; } | |
18946 | if test "x$ac_cv_lib_elf_elf_begin" = x""yes; then : | |
18947 | LIBS="-lelf $LIBS" | |
18948 | fi | |
18949 | ||
18950 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kvm_open in -lkvm" >&5 | |
18951 | $as_echo_n "checking for kvm_open in -lkvm... " >&6; } | |
18952 | if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then : | |
18953 | $as_echo_n "(cached) " >&6 | |
18954 | else | |
18955 | ac_check_lib_save_LIBS=$LIBS | |
18956 | LIBS="-lkvm $LIBS" | |
18957 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
18958 | /* end confdefs.h. */ | |
ae0d7250 | 18959 | |
3e0be4ab GM |
18960 | /* Override any GCC internal prototype to avoid an error. |
18961 | Use char because int might match the return type of a GCC | |
18962 | builtin and then its argument prototype would still apply. */ | |
18963 | #ifdef __cplusplus | |
18964 | extern "C" | |
18965 | #endif | |
18966 | char kvm_open (); | |
18967 | int | |
18968 | main () | |
18969 | { | |
18970 | return kvm_open (); | |
ae0d7250 PE |
18971 | ; |
18972 | return 0; | |
18973 | } | |
18974 | _ACEOF | |
3e0be4ab GM |
18975 | if ac_fn_c_try_link "$LINENO"; then : |
18976 | ac_cv_lib_kvm_kvm_open=yes | |
ae0d7250 | 18977 | else |
3e0be4ab | 18978 | ac_cv_lib_kvm_kvm_open=no |
ae0d7250 | 18979 | fi |
3e0be4ab GM |
18980 | rm -f core conftest.err conftest.$ac_objext \ |
18981 | conftest$ac_exeext conftest.$ac_ext | |
18982 | LIBS=$ac_check_lib_save_LIBS | |
ae0d7250 | 18983 | fi |
3e0be4ab GM |
18984 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kvm_kvm_open" >&5 |
18985 | $as_echo "$ac_cv_lib_kvm_kvm_open" >&6; } | |
18986 | if test "x$ac_cv_lib_kvm_kvm_open" = x""yes; then : | |
18987 | LIBS="-lkvm $LIBS" | |
18988 | fi | |
18989 | ||
18990 | # Check for the 4.4BSD definition of getloadavg. | |
18991 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lutil" >&5 | |
18992 | $as_echo_n "checking for getloadavg in -lutil... " >&6; } | |
18993 | if test "${ac_cv_lib_util_getloadavg+set}" = set; then : | |
ae0d7250 PE |
18994 | $as_echo_n "(cached) " >&6 |
18995 | else | |
3e0be4ab GM |
18996 | ac_check_lib_save_LIBS=$LIBS |
18997 | LIBS="-lutil $LIBS" | |
18998 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
18999 | /* end confdefs.h. */ | |
19000 | ||
19001 | /* Override any GCC internal prototype to avoid an error. | |
19002 | Use char because int might match the return type of a GCC | |
19003 | builtin and then its argument prototype would still apply. */ | |
19004 | #ifdef __cplusplus | |
19005 | extern "C" | |
19006 | #endif | |
19007 | char getloadavg (); | |
19008 | int | |
19009 | main () | |
19010 | { | |
19011 | return getloadavg (); | |
19012 | ; | |
19013 | return 0; | |
19014 | } | |
19015 | _ACEOF | |
19016 | if ac_fn_c_try_link "$LINENO"; then : | |
19017 | ac_cv_lib_util_getloadavg=yes | |
ae0d7250 | 19018 | else |
3e0be4ab GM |
19019 | ac_cv_lib_util_getloadavg=no |
19020 | fi | |
19021 | rm -f core conftest.err conftest.$ac_objext \ | |
19022 | conftest$ac_exeext conftest.$ac_ext | |
19023 | LIBS=$ac_check_lib_save_LIBS | |
19024 | fi | |
19025 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_getloadavg" >&5 | |
19026 | $as_echo "$ac_cv_lib_util_getloadavg" >&6; } | |
19027 | if test "x$ac_cv_lib_util_getloadavg" = x""yes; then : | |
19028 | LIBS="-lutil $LIBS" gl_func_getloadavg_done=yes | |
19029 | fi | |
19030 | ||
19031 | fi | |
19032 | ||
19033 | if test $gl_func_getloadavg_done = no; then | |
19034 | # There is a commonly available library for RS/6000 AIX. | |
19035 | # Since it is not a standard part of AIX, it might be installed locally. | |
19036 | gl_getloadavg_LIBS=$LIBS | |
19037 | LIBS="-L/usr/local/lib $LIBS" | |
19038 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lgetloadavg" >&5 | |
19039 | $as_echo_n "checking for getloadavg in -lgetloadavg... " >&6; } | |
19040 | if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then : | |
19041 | $as_echo_n "(cached) " >&6 | |
19042 | else | |
19043 | ac_check_lib_save_LIBS=$LIBS | |
19044 | LIBS="-lgetloadavg $LIBS" | |
19045 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
ae0d7250 | 19046 | /* end confdefs.h. */ |
ae0d7250 | 19047 | |
3e0be4ab GM |
19048 | /* Override any GCC internal prototype to avoid an error. |
19049 | Use char because int might match the return type of a GCC | |
19050 | builtin and then its argument prototype would still apply. */ | |
19051 | #ifdef __cplusplus | |
19052 | extern "C" | |
19053 | #endif | |
19054 | char getloadavg (); | |
ae0d7250 PE |
19055 | int |
19056 | main () | |
19057 | { | |
3e0be4ab | 19058 | return getloadavg (); |
ae0d7250 PE |
19059 | ; |
19060 | return 0; | |
19061 | } | |
19062 | _ACEOF | |
3e0be4ab GM |
19063 | if ac_fn_c_try_link "$LINENO"; then : |
19064 | ac_cv_lib_getloadavg_getloadavg=yes | |
ae0d7250 | 19065 | else |
3e0be4ab | 19066 | ac_cv_lib_getloadavg_getloadavg=no |
ae0d7250 | 19067 | fi |
3e0be4ab GM |
19068 | rm -f core conftest.err conftest.$ac_objext \ |
19069 | conftest$ac_exeext conftest.$ac_ext | |
19070 | LIBS=$ac_check_lib_save_LIBS | |
ae0d7250 | 19071 | fi |
3e0be4ab GM |
19072 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_getloadavg_getloadavg" >&5 |
19073 | $as_echo "$ac_cv_lib_getloadavg_getloadavg" >&6; } | |
19074 | if test "x$ac_cv_lib_getloadavg_getloadavg" = x""yes; then : | |
19075 | LIBS="-lgetloadavg $LIBS" gl_func_getloadavg_done=yes | |
19076 | else | |
19077 | LIBS=$gl_getloadavg_LIBS | |
52724a05 | 19078 | fi |
ae0d7250 | 19079 | |
3e0be4ab | 19080 | fi |
ae0d7250 | 19081 | |
3e0be4ab GM |
19082 | # Set up the replacement function if necessary. |
19083 | if test $gl_func_getloadavg_done = no; then | |
19084 | HAVE_GETLOADAVG=0 | |
ae0d7250 | 19085 | |
3e0be4ab GM |
19086 | # Solaris has libkstat which does not require root. |
19087 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kstat_open in -lkstat" >&5 | |
19088 | $as_echo_n "checking for kstat_open in -lkstat... " >&6; } | |
19089 | if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then : | |
6ad6792b GM |
19090 | $as_echo_n "(cached) " >&6 |
19091 | else | |
3e0be4ab GM |
19092 | ac_check_lib_save_LIBS=$LIBS |
19093 | LIBS="-lkstat $LIBS" | |
19094 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6ad6792b | 19095 | /* end confdefs.h. */ |
6ad6792b | 19096 | |
3e0be4ab GM |
19097 | /* Override any GCC internal prototype to avoid an error. |
19098 | Use char because int might match the return type of a GCC | |
19099 | builtin and then its argument prototype would still apply. */ | |
19100 | #ifdef __cplusplus | |
19101 | extern "C" | |
19102 | #endif | |
19103 | char kstat_open (); | |
6ad6792b GM |
19104 | int |
19105 | main () | |
19106 | { | |
3e0be4ab | 19107 | return kstat_open (); |
6ad6792b GM |
19108 | ; |
19109 | return 0; | |
19110 | } | |
19111 | _ACEOF | |
3e0be4ab GM |
19112 | if ac_fn_c_try_link "$LINENO"; then : |
19113 | ac_cv_lib_kstat_kstat_open=yes | |
19114 | else | |
19115 | ac_cv_lib_kstat_kstat_open=no | |
6ad6792b | 19116 | fi |
3e0be4ab GM |
19117 | rm -f core conftest.err conftest.$ac_objext \ |
19118 | conftest$ac_exeext conftest.$ac_ext | |
19119 | LIBS=$ac_check_lib_save_LIBS | |
6ad6792b | 19120 | fi |
3e0be4ab GM |
19121 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kstat_kstat_open" >&5 |
19122 | $as_echo "$ac_cv_lib_kstat_kstat_open" >&6; } | |
19123 | if test "x$ac_cv_lib_kstat_kstat_open" = x""yes; then : | |
19124 | cat >>confdefs.h <<_ACEOF | |
19125 | #define HAVE_LIBKSTAT 1 | |
6ad6792b GM |
19126 | _ACEOF |
19127 | ||
3e0be4ab GM |
19128 | LIBS="-lkstat $LIBS" |
19129 | ||
6ad6792b GM |
19130 | fi |
19131 | ||
3e0be4ab | 19132 | test $ac_cv_lib_kstat_kstat_open = yes && gl_func_getloadavg_done=yes |
6c051bab | 19133 | |
3e0be4ab GM |
19134 | # AIX has libperfstat which does not require root |
19135 | if test $gl_func_getloadavg_done = no; then | |
19136 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for perfstat_cpu_total in -lperfstat" >&5 | |
19137 | $as_echo_n "checking for perfstat_cpu_total in -lperfstat... " >&6; } | |
19138 | if test "${ac_cv_lib_perfstat_perfstat_cpu_total+set}" = set; then : | |
6c051bab GM |
19139 | $as_echo_n "(cached) " >&6 |
19140 | else | |
3e0be4ab GM |
19141 | ac_check_lib_save_LIBS=$LIBS |
19142 | LIBS="-lperfstat $LIBS" | |
19143 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6c051bab | 19144 | /* end confdefs.h. */ |
3e0be4ab GM |
19145 | |
19146 | /* Override any GCC internal prototype to avoid an error. | |
19147 | Use char because int might match the return type of a GCC | |
19148 | builtin and then its argument prototype would still apply. */ | |
19149 | #ifdef __cplusplus | |
19150 | extern "C" | |
19151 | #endif | |
19152 | char perfstat_cpu_total (); | |
6c051bab GM |
19153 | int |
19154 | main () | |
19155 | { | |
3e0be4ab | 19156 | return perfstat_cpu_total (); |
6c051bab GM |
19157 | ; |
19158 | return 0; | |
19159 | } | |
19160 | _ACEOF | |
3e0be4ab GM |
19161 | if ac_fn_c_try_link "$LINENO"; then : |
19162 | ac_cv_lib_perfstat_perfstat_cpu_total=yes | |
6c051bab | 19163 | else |
3e0be4ab | 19164 | ac_cv_lib_perfstat_perfstat_cpu_total=no |
6c051bab | 19165 | fi |
3e0be4ab GM |
19166 | rm -f core conftest.err conftest.$ac_objext \ |
19167 | conftest$ac_exeext conftest.$ac_ext | |
19168 | LIBS=$ac_check_lib_save_LIBS | |
6c051bab | 19169 | fi |
3e0be4ab GM |
19170 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_perfstat_perfstat_cpu_total" >&5 |
19171 | $as_echo "$ac_cv_lib_perfstat_perfstat_cpu_total" >&6; } | |
19172 | if test "x$ac_cv_lib_perfstat_perfstat_cpu_total" = x""yes; then : | |
19173 | cat >>confdefs.h <<_ACEOF | |
19174 | #define HAVE_LIBPERFSTAT 1 | |
19175 | _ACEOF | |
6c051bab | 19176 | |
3e0be4ab | 19177 | LIBS="-lperfstat $LIBS" |
6c051bab | 19178 | |
3e0be4ab | 19179 | fi |
6c051bab | 19180 | |
3e0be4ab GM |
19181 | test $ac_cv_lib_perfstat_perfstat_cpu_total = yes && gl_func_getloadavg_done=yes |
19182 | fi | |
ae0d7250 | 19183 | |
3e0be4ab GM |
19184 | if test $gl_func_getloadavg_done = no; then |
19185 | ac_fn_c_check_header_mongrel "$LINENO" "sys/dg_sys_info.h" "ac_cv_header_sys_dg_sys_info_h" "$ac_includes_default" | |
19186 | if test "x$ac_cv_header_sys_dg_sys_info_h" = x""yes; then : | |
19187 | gl_func_getloadavg_done=yes | |
19188 | ||
19189 | $as_echo "#define DGUX 1" >>confdefs.h | |
19190 | ||
19191 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dg_sys_info in -ldgc" >&5 | |
19192 | $as_echo_n "checking for dg_sys_info in -ldgc... " >&6; } | |
19193 | if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then : | |
ae0d7250 PE |
19194 | $as_echo_n "(cached) " >&6 |
19195 | else | |
3e0be4ab GM |
19196 | ac_check_lib_save_LIBS=$LIBS |
19197 | LIBS="-ldgc $LIBS" | |
19198 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6d153f56 | 19199 | /* end confdefs.h. */ |
3e0be4ab GM |
19200 | |
19201 | /* Override any GCC internal prototype to avoid an error. | |
19202 | Use char because int might match the return type of a GCC | |
19203 | builtin and then its argument prototype would still apply. */ | |
19204 | #ifdef __cplusplus | |
19205 | extern "C" | |
19206 | #endif | |
19207 | char dg_sys_info (); | |
ae0d7250 PE |
19208 | int |
19209 | main () | |
19210 | { | |
3e0be4ab | 19211 | return dg_sys_info (); |
ae0d7250 PE |
19212 | ; |
19213 | return 0; | |
19214 | } | |
19215 | _ACEOF | |
3e0be4ab GM |
19216 | if ac_fn_c_try_link "$LINENO"; then : |
19217 | ac_cv_lib_dgc_dg_sys_info=yes | |
ae0d7250 | 19218 | else |
3e0be4ab | 19219 | ac_cv_lib_dgc_dg_sys_info=no |
ae0d7250 | 19220 | fi |
3e0be4ab GM |
19221 | rm -f core conftest.err conftest.$ac_objext \ |
19222 | conftest$ac_exeext conftest.$ac_ext | |
19223 | LIBS=$ac_check_lib_save_LIBS | |
ae0d7250 | 19224 | fi |
3e0be4ab GM |
19225 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dgc_dg_sys_info" >&5 |
19226 | $as_echo "$ac_cv_lib_dgc_dg_sys_info" >&6; } | |
19227 | if test "x$ac_cv_lib_dgc_dg_sys_info" = x""yes; then : | |
19228 | cat >>confdefs.h <<_ACEOF | |
19229 | #define HAVE_LIBDGC 1 | |
19230 | _ACEOF | |
ae0d7250 | 19231 | |
3e0be4ab GM |
19232 | LIBS="-ldgc $LIBS" |
19233 | ||
19234 | fi | |
6d153f56 | 19235 | |
ae0d7250 | 19236 | fi |
6d153f56 | 19237 | |
6d153f56 | 19238 | |
3e0be4ab GM |
19239 | fi |
19240 | fi | |
19241 | fi | |
6d153f56 GM |
19242 | |
19243 | ||
3e0be4ab GM |
19244 | if test "x$gl_save_LIBS" = x; then |
19245 | GETLOADAVG_LIBS=$LIBS | |
19246 | else | |
19247 | GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$gl_save_LIBS!!"` | |
19248 | fi | |
19249 | LIBS=$gl_save_LIBS | |
6d153f56 GM |
19250 | |
19251 | ||
3e0be4ab GM |
19252 | # Test whether the system declares getloadavg. Solaris has the function |
19253 | # but declares it in <sys/loadavg.h>, not <stdlib.h>. | |
19254 | for ac_header in sys/loadavg.h | |
19255 | do : | |
19256 | ac_fn_c_check_header_mongrel "$LINENO" "sys/loadavg.h" "ac_cv_header_sys_loadavg_h" "$ac_includes_default" | |
19257 | if test "x$ac_cv_header_sys_loadavg_h" = x""yes; then : | |
19258 | cat >>confdefs.h <<_ACEOF | |
19259 | #define HAVE_SYS_LOADAVG_H 1 | |
19260 | _ACEOF | |
6d153f56 | 19261 | |
3e0be4ab | 19262 | fi |
6d153f56 | 19263 | |
3e0be4ab | 19264 | done |
6d153f56 | 19265 | |
3e0be4ab GM |
19266 | if test $ac_cv_header_sys_loadavg_h = yes; then |
19267 | HAVE_SYS_LOADAVG_H=1 | |
ae0d7250 | 19268 | else |
3e0be4ab GM |
19269 | HAVE_SYS_LOADAVG_H=0 |
19270 | fi | |
19271 | ac_fn_c_check_decl "$LINENO" "getloadavg" "ac_cv_have_decl_getloadavg" "#if HAVE_SYS_LOADAVG_H | |
19272 | # include <sys/loadavg.h> | |
19273 | #endif | |
19274 | #include <stdlib.h> | |
19275 | " | |
19276 | if test "x$ac_cv_have_decl_getloadavg" = x""yes; then : | |
6d153f56 | 19277 | |
3e0be4ab GM |
19278 | else |
19279 | HAVE_DECL_GETLOADAVG=0 | |
19280 | fi | |
ae0d7250 | 19281 | |
6d153f56 | 19282 | |
3e0be4ab | 19283 | if test $HAVE_GETLOADAVG = 0; then |
6d153f56 | 19284 | |
6d153f56 | 19285 | |
6d153f56 GM |
19286 | |
19287 | ||
19288 | ||
19289 | ||
6d153f56 | 19290 | |
6d153f56 | 19291 | |
3e0be4ab | 19292 | gl_LIBOBJS="$gl_LIBOBJS getloadavg.$ac_objext" |
6d153f56 | 19293 | |
ae0d7250 | 19294 | |
3e0be4ab GM |
19295 | # Figure out what our getloadavg.c needs. |
19296 | ||
19297 | # On HPUX9, an unprivileged user can get load averages this way. | |
19298 | if test $gl_func_getloadavg_done = no; then | |
19299 | for ac_func in pstat_getdynamic | |
19300 | do : | |
19301 | ac_fn_c_check_func "$LINENO" "pstat_getdynamic" "ac_cv_func_pstat_getdynamic" | |
19302 | if test "x$ac_cv_func_pstat_getdynamic" = x""yes; then : | |
19303 | cat >>confdefs.h <<_ACEOF | |
19304 | #define HAVE_PSTAT_GETDYNAMIC 1 | |
ae0d7250 | 19305 | _ACEOF |
3e0be4ab | 19306 | gl_func_getloadavg_done=yes |
ae0d7250 | 19307 | fi |
3e0be4ab GM |
19308 | done |
19309 | ||
ae0d7250 PE |
19310 | fi |
19311 | ||
3e0be4ab GM |
19312 | # We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it |
19313 | # uses stabs), but it is still SVR4. We cannot check for <elf.h> because | |
19314 | # Irix 4.0.5F has the header but not the library. | |
19315 | if test $gl_func_getloadavg_done = no && test "$ac_cv_lib_elf_elf_begin" = yes \ | |
19316 | && test "$ac_cv_lib_kvm_kvm_open" = yes; then | |
19317 | gl_func_getloadavg_done=yes | |
ae0d7250 | 19318 | |
3e0be4ab | 19319 | $as_echo "#define SVR4 1" >>confdefs.h |
ae0d7250 | 19320 | |
3e0be4ab | 19321 | fi |
ae0d7250 | 19322 | |
3e0be4ab GM |
19323 | if test $gl_func_getloadavg_done = no; then |
19324 | ac_fn_c_check_header_mongrel "$LINENO" "inq_stats/cpustats.h" "ac_cv_header_inq_stats_cpustats_h" "$ac_includes_default" | |
19325 | if test "x$ac_cv_header_inq_stats_cpustats_h" = x""yes; then : | |
19326 | gl_func_getloadavg_done=yes | |
ae0d7250 | 19327 | |
3e0be4ab | 19328 | $as_echo "#define UMAX 1" >>confdefs.h |
ae0d7250 PE |
19329 | |
19330 | ||
3e0be4ab | 19331 | $as_echo "#define UMAX4_3 1" >>confdefs.h |
ae0d7250 | 19332 | |
6d153f56 | 19333 | fi |
ae0d7250 PE |
19334 | |
19335 | ||
3e0be4ab | 19336 | fi |
ae0d7250 | 19337 | |
3e0be4ab GM |
19338 | if test $gl_func_getloadavg_done = no; then |
19339 | ac_fn_c_check_header_mongrel "$LINENO" "sys/cpustats.h" "ac_cv_header_sys_cpustats_h" "$ac_includes_default" | |
19340 | if test "x$ac_cv_header_sys_cpustats_h" = x""yes; then : | |
19341 | gl_func_getloadavg_done=yes; $as_echo "#define UMAX 1" >>confdefs.h | |
16c3e636 | 19342 | |
3e0be4ab | 19343 | fi |
16c3e636 PE |
19344 | |
19345 | ||
3e0be4ab | 19346 | fi |
5f90be1b | 19347 | |
3e0be4ab GM |
19348 | if test $gl_func_getloadavg_done = no; then |
19349 | for ac_header in mach/mach.h | |
19350 | do : | |
19351 | ac_fn_c_check_header_mongrel "$LINENO" "mach/mach.h" "ac_cv_header_mach_mach_h" "$ac_includes_default" | |
19352 | if test "x$ac_cv_header_mach_mach_h" = x""yes; then : | |
19353 | cat >>confdefs.h <<_ACEOF | |
19354 | #define HAVE_MACH_MACH_H 1 | |
19355 | _ACEOF | |
da6c8463 | 19356 | |
5f90be1b | 19357 | fi |
5f90be1b | 19358 | |
3e0be4ab | 19359 | done |
5f90be1b | 19360 | |
3e0be4ab | 19361 | fi |
5f90be1b | 19362 | |
3e0be4ab GM |
19363 | for ac_header in nlist.h |
19364 | do : | |
19365 | ac_fn_c_check_header_mongrel "$LINENO" "nlist.h" "ac_cv_header_nlist_h" "$ac_includes_default" | |
19366 | if test "x$ac_cv_header_nlist_h" = x""yes; then : | |
19367 | cat >>confdefs.h <<_ACEOF | |
19368 | #define HAVE_NLIST_H 1 | |
19369 | _ACEOF | |
19370 | ac_fn_c_check_member "$LINENO" "struct nlist" "n_un.n_name" "ac_cv_member_struct_nlist_n_un_n_name" "#include <nlist.h> | |
19371 | " | |
19372 | if test "x$ac_cv_member_struct_nlist_n_un_n_name" = x""yes; then : | |
5f90be1b | 19373 | |
3e0be4ab GM |
19374 | cat >>confdefs.h <<_ACEOF |
19375 | #define HAVE_STRUCT_NLIST_N_UN_N_NAME 1 | |
19376 | _ACEOF | |
5f90be1b PE |
19377 | |
19378 | ||
3e0be4ab | 19379 | fi |
da6c8463 | 19380 | |
3e0be4ab | 19381 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5f90be1b | 19382 | /* end confdefs.h. */ |
3e0be4ab | 19383 | #include <nlist.h> |
5f90be1b PE |
19384 | int |
19385 | main () | |
19386 | { | |
3e0be4ab GM |
19387 | struct nlist x; |
19388 | #ifdef HAVE_STRUCT_NLIST_N_UN_N_NAME | |
19389 | x.n_un.n_name = ""; | |
19390 | #else | |
19391 | x.n_name = ""; | |
19392 | #endif | |
5f90be1b PE |
19393 | ; |
19394 | return 0; | |
19395 | } | |
19396 | _ACEOF | |
3e0be4ab GM |
19397 | if ac_fn_c_try_link "$LINENO"; then : |
19398 | ||
19399 | $as_echo "#define N_NAME_POINTER 1" >>confdefs.h | |
19400 | ||
5f90be1b | 19401 | fi |
3e0be4ab GM |
19402 | rm -f core conftest.err conftest.$ac_objext \ |
19403 | conftest$ac_exeext conftest.$ac_ext | |
19404 | ||
5f90be1b | 19405 | fi |
5f90be1b | 19406 | |
3e0be4ab GM |
19407 | done |
19408 | ||
da6c8463 GM |
19409 | fi |
19410 | ||
5f90be1b PE |
19411 | |
19412 | ||
5f90be1b PE |
19413 | |
19414 | ||
3e0be4ab | 19415 | GNULIB_GETLOADAVG=1 |
da6c8463 GM |
19416 | |
19417 | ||
19418 | ||
19419 | ||
da6c8463 | 19420 | |
5f90be1b | 19421 | |
5f90be1b | 19422 | |
5f90be1b | 19423 | |
5f90be1b | 19424 | |
3e0be4ab GM |
19425 | |
19426 | if test $REPLACE_GETOPT = 1; then | |
19427 | ||
19428 | ||
19429 | ||
19430 | ||
19431 | ||
5f90be1b PE |
19432 | |
19433 | ||
19434 | ||
3e0be4ab GM |
19435 | gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext" |
19436 | ||
19437 | ||
5f90be1b | 19438 | |
6c051bab | 19439 | |
5f90be1b | 19440 | |
6ad6792b GM |
19441 | |
19442 | ||
19443 | ||
19444 | ||
3e0be4ab | 19445 | gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext" |
6ad6792b GM |
19446 | |
19447 | ||
19448 | ||
19449 | ||
3e0be4ab | 19450 | fi |
6ad6792b GM |
19451 | |
19452 | ||
19453 | ||
6ad6792b | 19454 | |
6ad6792b | 19455 | |
3e0be4ab GM |
19456 | REPLACE_GETOPT=0 |
19457 | ||
19458 | ||
19459 | if test -n "$gl_replace_getopt"; then : | |
6ad6792b | 19460 | |
3e0be4ab | 19461 | REPLACE_GETOPT=1 |
6ad6792b GM |
19462 | |
19463 | fi | |
6ad6792b | 19464 | |
6ad6792b | 19465 | |
3e0be4ab | 19466 | if test $REPLACE_GETOPT = 1; then |
6ad6792b | 19467 | |
3e0be4ab | 19468 | GETOPT_H=getopt.h |
6ad6792b | 19469 | |
3e0be4ab | 19470 | $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h |
6ad6792b | 19471 | |
ca36e0ff | 19472 | |
ca36e0ff | 19473 | |
3e0be4ab GM |
19474 | GNULIB_UNISTD_H_GETOPT=1 |
19475 | fi | |
ca36e0ff | 19476 | |
3e0be4ab | 19477 | if test $REPLACE_GETOPT = 1; then |
6ad6792b GM |
19478 | |
19479 | ||
19480 | ||
19481 | ||
ca36e0ff | 19482 | |
1f5d53eb PE |
19483 | |
19484 | ||
19485 | ||
3e0be4ab | 19486 | gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext" |
1f5d53eb PE |
19487 | |
19488 | ||
19489 | ||
19490 | ||
19491 | ||
19492 | ||
19493 | ||
1f5d53eb | 19494 | |
1f5d53eb | 19495 | |
3e0be4ab GM |
19496 | gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext" |
19497 | ||
19498 | ||
1f5d53eb PE |
19499 | |
19500 | ||
19501 | fi | |
1f5d53eb | 19502 | |
1f5d53eb PE |
19503 | |
19504 | ||
19505 | ||
19506 | ||
3e0be4ab | 19507 | if test $ac_cv_func_lstat = yes; then |
1f5d53eb | 19508 | |
3e0be4ab GM |
19509 | if test $gl_cv_func_lstat_dereferences_slashed_symlink = no; then |
19510 | REPLACE_LSTAT=1 | |
19511 | fi | |
19512 | else | |
19513 | HAVE_LSTAT=0 | |
19514 | fi | |
1f5d53eb | 19515 | |
3e0be4ab | 19516 | if test $REPLACE_LSTAT = 1; then |
1f5d53eb | 19517 | |
16c3e636 PE |
19518 | |
19519 | ||
16c3e636 PE |
19520 | |
19521 | ||
19522 | ||
19523 | ||
19524 | ||
3e0be4ab | 19525 | gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext" |
16c3e636 PE |
19526 | |
19527 | ||
16c3e636 | 19528 | |
3e0be4ab | 19529 | : |
16c3e636 | 19530 | |
3e0be4ab | 19531 | fi |
16c3e636 | 19532 | |
4fda9c95 GM |
19533 | |
19534 | ||
19535 | ||
19536 | ||
3e0be4ab | 19537 | GNULIB_LSTAT=1 |
4fda9c95 GM |
19538 | |
19539 | ||
19540 | ||
19541 | ||
19542 | ||
19543 | ||
19544 | ||
19545 | ||
19546 | ||
4fda9c95 | 19547 | |
4fda9c95 | 19548 | |
3e0be4ab GM |
19549 | if test $APPLE_UNIVERSAL_BUILD = 1; then |
19550 | # A universal build on Apple MacOS X platforms. | |
19551 | # The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode. | |
19552 | # But we need a configuration result that is valid in both modes. | |
19553 | gl_cv_func_working_mktime=no | |
19554 | fi | |
19555 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5 | |
19556 | $as_echo_n "checking for working mktime... " >&6; } | |
19557 | if test "${gl_cv_func_working_mktime+set}" = set; then : | |
19558 | $as_echo_n "(cached) " >&6 | |
19559 | else | |
19560 | if test "$cross_compiling" = yes; then : | |
19561 | gl_cv_func_working_mktime=no | |
19562 | else | |
19563 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
19564 | /* end confdefs.h. */ | |
19565 | /* Test program from Paul Eggert and Tony Leneis. */ | |
19566 | #include <limits.h> | |
19567 | #include <stdlib.h> | |
19568 | #include <time.h> | |
4fda9c95 | 19569 | |
3e0be4ab GM |
19570 | #ifdef HAVE_UNISTD_H |
19571 | # include <unistd.h> | |
19572 | #endif | |
4fda9c95 | 19573 | |
3e0be4ab GM |
19574 | #ifndef HAVE_ALARM |
19575 | # define alarm(X) /* empty */ | |
19576 | #endif | |
4fda9c95 | 19577 | |
3e0be4ab GM |
19578 | /* Work around redefinition to rpl_putenv by other config tests. */ |
19579 | #undef putenv | |
4fda9c95 | 19580 | |
3e0be4ab GM |
19581 | static time_t time_t_max; |
19582 | static time_t time_t_min; | |
19583 | ||
19584 | /* Values we'll use to set the TZ environment variable. */ | |
19585 | static char *tz_strings[] = { | |
19586 | (char *) 0, "TZ=GMT0", "TZ=JST-9", | |
19587 | "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00" | |
19588 | }; | |
19589 | #define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0])) | |
4fda9c95 | 19590 | |
3e0be4ab GM |
19591 | /* Return 0 if mktime fails to convert a date in the spring-forward gap. |
19592 | Based on a problem report from Andreas Jaeger. */ | |
19593 | static int | |
19594 | spring_forward_gap () | |
19595 | { | |
19596 | /* glibc (up to about 1998-10-07) failed this test. */ | |
19597 | struct tm tm; | |
4fda9c95 | 19598 | |
3e0be4ab GM |
19599 | /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0" |
19600 | instead of "TZ=America/Vancouver" in order to detect the bug even | |
19601 | on systems that don't support the Olson extension, or don't have the | |
19602 | full zoneinfo tables installed. */ | |
19603 | putenv ("TZ=PST8PDT,M4.1.0,M10.5.0"); | |
4fda9c95 | 19604 | |
3e0be4ab GM |
19605 | tm.tm_year = 98; |
19606 | tm.tm_mon = 3; | |
19607 | tm.tm_mday = 5; | |
19608 | tm.tm_hour = 2; | |
19609 | tm.tm_min = 0; | |
19610 | tm.tm_sec = 0; | |
19611 | tm.tm_isdst = -1; | |
19612 | return mktime (&tm) != (time_t) -1; | |
19613 | } | |
19614 | ||
19615 | static int | |
19616 | mktime_test1 (time_t now) | |
19617 | { | |
19618 | struct tm *lt; | |
19619 | return ! (lt = localtime (&now)) || mktime (lt) == now; | |
19620 | } | |
4fda9c95 | 19621 | |
3e0be4ab GM |
19622 | static int |
19623 | mktime_test (time_t now) | |
19624 | { | |
19625 | return (mktime_test1 (now) | |
19626 | && mktime_test1 ((time_t) (time_t_max - now)) | |
19627 | && mktime_test1 ((time_t) (time_t_min + now))); | |
19628 | } | |
4fda9c95 | 19629 | |
3e0be4ab GM |
19630 | static int |
19631 | irix_6_4_bug () | |
19632 | { | |
19633 | /* Based on code from Ariel Faigon. */ | |
19634 | struct tm tm; | |
19635 | tm.tm_year = 96; | |
19636 | tm.tm_mon = 3; | |
19637 | tm.tm_mday = 0; | |
19638 | tm.tm_hour = 0; | |
19639 | tm.tm_min = 0; | |
19640 | tm.tm_sec = 0; | |
19641 | tm.tm_isdst = -1; | |
19642 | mktime (&tm); | |
19643 | return tm.tm_mon == 2 && tm.tm_mday == 31; | |
19644 | } | |
4fda9c95 | 19645 | |
3e0be4ab GM |
19646 | static int |
19647 | bigtime_test (int j) | |
19648 | { | |
19649 | struct tm tm; | |
19650 | time_t now; | |
19651 | tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j; | |
19652 | now = mktime (&tm); | |
19653 | if (now != (time_t) -1) | |
19654 | { | |
19655 | struct tm *lt = localtime (&now); | |
19656 | if (! (lt | |
19657 | && lt->tm_year == tm.tm_year | |
19658 | && lt->tm_mon == tm.tm_mon | |
19659 | && lt->tm_mday == tm.tm_mday | |
19660 | && lt->tm_hour == tm.tm_hour | |
19661 | && lt->tm_min == tm.tm_min | |
19662 | && lt->tm_sec == tm.tm_sec | |
19663 | && lt->tm_yday == tm.tm_yday | |
19664 | && lt->tm_wday == tm.tm_wday | |
19665 | && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst) | |
19666 | == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst)))) | |
19667 | return 0; | |
19668 | } | |
19669 | return 1; | |
19670 | } | |
cc322c06 | 19671 | |
3e0be4ab GM |
19672 | static int |
19673 | year_2050_test () | |
19674 | { | |
19675 | /* The correct answer for 2050-02-01 00:00:00 in Pacific time, | |
19676 | ignoring leap seconds. */ | |
19677 | unsigned long int answer = 2527315200UL; | |
cc322c06 | 19678 | |
3e0be4ab GM |
19679 | struct tm tm; |
19680 | time_t t; | |
19681 | tm.tm_year = 2050 - 1900; | |
19682 | tm.tm_mon = 2 - 1; | |
19683 | tm.tm_mday = 1; | |
19684 | tm.tm_hour = tm.tm_min = tm.tm_sec = 0; | |
19685 | tm.tm_isdst = -1; | |
cc322c06 | 19686 | |
3e0be4ab GM |
19687 | /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0" |
19688 | instead of "TZ=America/Vancouver" in order to detect the bug even | |
19689 | on systems that don't support the Olson extension, or don't have the | |
19690 | full zoneinfo tables installed. */ | |
19691 | putenv ("TZ=PST8PDT,M4.1.0,M10.5.0"); | |
cc322c06 | 19692 | |
3e0be4ab | 19693 | t = mktime (&tm); |
4fda9c95 | 19694 | |
3e0be4ab GM |
19695 | /* Check that the result is either a failure, or close enough |
19696 | to the correct answer that we can assume the discrepancy is | |
19697 | due to leap seconds. */ | |
19698 | return (t == (time_t) -1 | |
19699 | || (0 < t && answer - 120 <= t && t <= answer + 120)); | |
19700 | } | |
4fda9c95 | 19701 | |
3e0be4ab GM |
19702 | int |
19703 | main () | |
19704 | { | |
19705 | int result = 0; | |
19706 | time_t t, delta; | |
19707 | int i, j; | |
19708 | int time_t_signed_magnitude = (time_t) ~ (time_t) 0 < (time_t) -1; | |
19709 | int time_t_signed = ! ((time_t) 0 < (time_t) -1); | |
ae0d7250 | 19710 | |
3e0be4ab GM |
19711 | /* This test makes some buggy mktime implementations loop. |
19712 | Give up after 60 seconds; a mktime slower than that | |
19713 | isn't worth using anyway. */ | |
19714 | alarm (60); | |
ae0d7250 | 19715 | |
3e0be4ab GM |
19716 | time_t_max = (! time_t_signed |
19717 | ? (time_t) -1 | |
19718 | : ((((time_t) 1 << (sizeof (time_t) * CHAR_BIT - 2)) - 1) | |
19719 | * 2 + 1)); | |
19720 | time_t_min = (! time_t_signed | |
19721 | ? (time_t) 0 | |
19722 | : time_t_signed_magnitude | |
19723 | ? ~ (time_t) 0 | |
19724 | : ~ time_t_max); | |
ae0d7250 | 19725 | |
3e0be4ab GM |
19726 | delta = time_t_max / 997; /* a suitable prime number */ |
19727 | for (i = 0; i < N_STRINGS; i++) | |
19728 | { | |
19729 | if (tz_strings[i]) | |
19730 | putenv (tz_strings[i]); | |
ae0d7250 | 19731 | |
3e0be4ab GM |
19732 | for (t = 0; t <= time_t_max - delta; t += delta) |
19733 | if (! mktime_test (t)) | |
19734 | result |= 1; | |
19735 | if (! (mktime_test ((time_t) 1) | |
19736 | && mktime_test ((time_t) (60 * 60)) | |
19737 | && mktime_test ((time_t) (60 * 60 * 24)))) | |
19738 | result |= 2; | |
ae0d7250 | 19739 | |
3e0be4ab GM |
19740 | for (j = 1; ; j <<= 1) |
19741 | if (! bigtime_test (j)) | |
19742 | result |= 4; | |
19743 | else if (INT_MAX / 2 < j) | |
19744 | break; | |
19745 | if (! bigtime_test (INT_MAX)) | |
19746 | result |= 8; | |
19747 | } | |
19748 | if (! irix_6_4_bug ()) | |
19749 | result |= 16; | |
19750 | if (! spring_forward_gap ()) | |
19751 | result |= 32; | |
19752 | if (! year_2050_test ()) | |
19753 | result |= 64; | |
19754 | return result; | |
ae0d7250 PE |
19755 | } |
19756 | _ACEOF | |
19757 | if ac_fn_c_try_run "$LINENO"; then : | |
3e0be4ab | 19758 | gl_cv_func_working_mktime=yes |
ae0d7250 | 19759 | else |
3e0be4ab | 19760 | gl_cv_func_working_mktime=no |
ae0d7250 PE |
19761 | fi |
19762 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
19763 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
19764 | fi | |
19765 | ||
ae0d7250 | 19766 | |
52724a05 | 19767 | fi |
3e0be4ab GM |
19768 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_mktime" >&5 |
19769 | $as_echo "$gl_cv_func_working_mktime" >&6; } | |
19770 | ||
19771 | if test $gl_cv_func_working_mktime = no; then | |
19772 | REPLACE_MKTIME=1 | |
19773 | else | |
19774 | REPLACE_MKTIME=0 | |
19775 | fi | |
ae0d7250 | 19776 | |
3e0be4ab | 19777 | if test $REPLACE_MKTIME = 1; then |
ae0d7250 PE |
19778 | |
19779 | ||
cc322c06 GM |
19780 | |
19781 | ||
cc322c06 GM |
19782 | |
19783 | ||
ae0d7250 PE |
19784 | |
19785 | ||
3e0be4ab | 19786 | gl_LIBOBJS="$gl_LIBOBJS mktime.$ac_objext" |
ae0d7250 | 19787 | |
5fa4ac76 PE |
19788 | |
19789 | ||
19790 | ||
3e0be4ab | 19791 | fi |
5fa4ac76 PE |
19792 | |
19793 | ||
19794 | ||
19795 | ||
19796 | ||
3e0be4ab | 19797 | GNULIB_MKTIME=1 |
5fa4ac76 PE |
19798 | |
19799 | ||
19800 | ||
19801 | ||
19802 | ||
19803 | ||
19804 | ||
19805 | ||
3e0be4ab GM |
19806 | LIB_PTHREAD_SIGMASK= |
19807 | if test $ac_cv_func_pthread_sigmask != yes; then | |
19808 | gl_save_LIBS=$LIBS | |
19809 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_sigmask" >&5 | |
19810 | $as_echo_n "checking for library containing pthread_sigmask... " >&6; } | |
19811 | if test "${ac_cv_search_pthread_sigmask+set}" = set; then : | |
5fa4ac76 PE |
19812 | $as_echo_n "(cached) " >&6 |
19813 | else | |
3e0be4ab GM |
19814 | ac_func_search_save_LIBS=$LIBS |
19815 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5fa4ac76 | 19816 | /* end confdefs.h. */ |
5fa4ac76 | 19817 | |
3e0be4ab GM |
19818 | /* Override any GCC internal prototype to avoid an error. |
19819 | Use char because int might match the return type of a GCC | |
19820 | builtin and then its argument prototype would still apply. */ | |
19821 | #ifdef __cplusplus | |
19822 | extern "C" | |
19823 | #endif | |
19824 | char pthread_sigmask (); | |
19825 | int | |
19826 | main () | |
19827 | { | |
19828 | return pthread_sigmask (); | |
19829 | ; | |
19830 | return 0; | |
19831 | } | |
5fa4ac76 | 19832 | _ACEOF |
3e0be4ab GM |
19833 | for ac_lib in '' pthread c_r; do |
19834 | if test -z "$ac_lib"; then | |
19835 | ac_res="none required" | |
19836 | else | |
19837 | ac_res=-l$ac_lib | |
19838 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
19839 | fi | |
19840 | if ac_fn_c_try_link "$LINENO"; then : | |
19841 | ac_cv_search_pthread_sigmask=$ac_res | |
5fa4ac76 | 19842 | fi |
3e0be4ab GM |
19843 | rm -f core conftest.err conftest.$ac_objext \ |
19844 | conftest$ac_exeext | |
19845 | if test "${ac_cv_search_pthread_sigmask+set}" = set; then : | |
19846 | break | |
19847 | fi | |
19848 | done | |
19849 | if test "${ac_cv_search_pthread_sigmask+set}" = set; then : | |
5fa4ac76 | 19850 | |
3e0be4ab GM |
19851 | else |
19852 | ac_cv_search_pthread_sigmask=no | |
19853 | fi | |
19854 | rm conftest.$ac_ext | |
19855 | LIBS=$ac_func_search_save_LIBS | |
19856 | fi | |
19857 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_sigmask" >&5 | |
19858 | $as_echo "$ac_cv_search_pthread_sigmask" >&6; } | |
19859 | ac_res=$ac_cv_search_pthread_sigmask | |
19860 | if test "$ac_res" != no; then : | |
19861 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
5fa4ac76 | 19862 | |
3e0be4ab | 19863 | fi |
5fa4ac76 | 19864 | |
3e0be4ab GM |
19865 | LIBS=$gl_save_LIBS |
19866 | if test "$ac_cv_search_pthread_sigmask" = no; then | |
19867 | HAVE_PTHREAD_SIGMASK=0 | |
19868 | elif test "$ac_cv_search_pthread_sigmask" != 'none required'; then | |
19869 | LIB_PTHREAD_SIGMASK=$ac_cv_search_pthread_sigmask | |
19870 | fi | |
19871 | fi | |
5fa4ac76 PE |
19872 | |
19873 | ||
3e0be4ab | 19874 | if test $HAVE_PTHREAD_SIGMASK = 0 || test $REPLACE_PTHREAD_SIGMASK = 1; then |
5fa4ac76 | 19875 | |
5fa4ac76 | 19876 | |
5fa4ac76 | 19877 | |
5fa4ac76 PE |
19878 | |
19879 | ||
19880 | ||
19881 | ||
19882 | ||
3e0be4ab | 19883 | gl_LIBOBJS="$gl_LIBOBJS pthread_sigmask.$ac_objext" |
067d23c9 | 19884 | |
3e0be4ab | 19885 | fi |
067d23c9 | 19886 | |
067d23c9 KY |
19887 | |
19888 | ||
067d23c9 | 19889 | |
067d23c9 | 19890 | |
3e0be4ab | 19891 | GNULIB_PTHREAD_SIGMASK=1 |
067d23c9 KY |
19892 | |
19893 | ||
067d23c9 | 19894 | |
067d23c9 KY |
19895 | |
19896 | ||
19897 | ||
3e0be4ab GM |
19898 | |
19899 | ||
19900 | if test $ac_cv_func_readlink = no; then | |
19901 | HAVE_READLINK=0 | |
19902 | else | |
19903 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5 | |
19904 | $as_echo_n "checking whether readlink signature is correct... " >&6; } | |
19905 | if test "${gl_cv_decl_readlink_works+set}" = set; then : | |
067d23c9 KY |
19906 | $as_echo_n "(cached) " >&6 |
19907 | else | |
1fd182f0 | 19908 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
067d23c9 | 19909 | /* end confdefs.h. */ |
3e0be4ab GM |
19910 | #include <unistd.h> |
19911 | /* Cause compilation failure if original declaration has wrong type. */ | |
19912 | ssize_t readlink (const char *, char *, size_t); | |
067d23c9 KY |
19913 | int |
19914 | main () | |
19915 | { | |
3e0be4ab | 19916 | |
067d23c9 KY |
19917 | ; |
19918 | return 0; | |
19919 | } | |
19920 | _ACEOF | |
19921 | if ac_fn_c_try_compile "$LINENO"; then : | |
3e0be4ab | 19922 | gl_cv_decl_readlink_works=yes |
067d23c9 | 19923 | else |
3e0be4ab | 19924 | gl_cv_decl_readlink_works=no |
067d23c9 KY |
19925 | fi |
19926 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3e0be4ab GM |
19927 | fi |
19928 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5 | |
19929 | $as_echo "$gl_cv_decl_readlink_works" >&6; } | |
19930 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5 | |
19931 | $as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; } | |
19932 | if test "${gl_cv_func_readlink_works+set}" = set; then : | |
19933 | $as_echo_n "(cached) " >&6 | |
19934 | else | |
19935 | # We have readlink, so assume ln -s works. | |
19936 | ln -s conftest.no-such conftest.link | |
19937 | ln -s conftest.link conftest.lnk2 | |
19938 | if test "$cross_compiling" = yes; then : | |
19939 | gl_cv_func_readlink_works="guessing no" | |
19940 | else | |
19941 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
19942 | /* end confdefs.h. */ | |
19943 | #include <unistd.h> | |
067d23c9 | 19944 | |
3e0be4ab GM |
19945 | int |
19946 | main () | |
19947 | { | |
19948 | char buf[20]; | |
19949 | return readlink ("conftest.lnk2/", buf, sizeof buf) != -1; | |
19950 | ; | |
19951 | return 0; | |
19952 | } | |
19953 | _ACEOF | |
19954 | if ac_fn_c_try_run "$LINENO"; then : | |
19955 | gl_cv_func_readlink_works=yes | |
19956 | else | |
19957 | gl_cv_func_readlink_works=no | |
067d23c9 | 19958 | fi |
3e0be4ab GM |
19959 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
19960 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
19961 | fi | |
19962 | ||
19963 | rm -f conftest.link conftest.lnk2 | |
19964 | fi | |
19965 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_works" >&5 | |
19966 | $as_echo "$gl_cv_func_readlink_works" >&6; } | |
19967 | if test "$gl_cv_func_readlink_works" != yes; then | |
19968 | ||
19969 | $as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h | |
19970 | ||
19971 | REPLACE_READLINK=1 | |
19972 | elif test "$gl_cv_decl_readlink_works" != yes; then | |
19973 | REPLACE_READLINK=1 | |
1fd182f0 | 19974 | fi |
1fd182f0 | 19975 | fi |
52724a05 | 19976 | |
3e0be4ab | 19977 | if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then |
067d23c9 | 19978 | |
067d23c9 KY |
19979 | |
19980 | ||
743c80a7 | 19981 | |
a451f14b PE |
19982 | |
19983 | ||
19984 | ||
a451f14b | 19985 | |
3e0be4ab | 19986 | gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext" |
a451f14b | 19987 | |
a451f14b | 19988 | |
1fd182f0 | 19989 | : |
a451f14b | 19990 | |
52724a05 | 19991 | fi |
a451f14b | 19992 | |
743c80a7 PE |
19993 | |
19994 | ||
cc322c06 GM |
19995 | |
19996 | ||
3e0be4ab | 19997 | GNULIB_READLINK=1 |
743c80a7 PE |
19998 | |
19999 | ||
a451f14b PE |
20000 | |
20001 | ||
20002 | ||
e275c824 PE |
20003 | |
20004 | ||
20005 | ||
20006 | ||
20007 | ||
20008 | ||
20009 | ||
20010 | ||
20011 | ||
20012 | ||
d87ffdb7 | 20013 | |
e275c824 | 20014 | if test $gl_cv_have_include_next = yes; then |
3e0be4ab | 20015 | gl_cv_next_signal_h='<'signal.h'>' |
e275c824 | 20016 | else |
3e0be4ab GM |
20017 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5 |
20018 | $as_echo_n "checking absolute name of <signal.h>... " >&6; } | |
20019 | if test "${gl_cv_next_signal_h+set}" = set; then : | |
e275c824 PE |
20020 | $as_echo_n "(cached) " >&6 |
20021 | else | |
20022 | ||
b06b1098 | 20023 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
e275c824 | 20024 | /* end confdefs.h. */ |
3e0be4ab | 20025 | #include <signal.h> |
e275c824 PE |
20026 | |
20027 | _ACEOF | |
b06b1098 PE |
20028 | case "$host_os" in |
20029 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
20030 | *) gl_absname_cpp="$ac_cpp" ;; | |
20031 | esac | |
3e0be4ab GM |
20032 | gl_cv_next_signal_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | |
20033 | sed -n '\#/signal.h#{ | |
20034 | s#.*"\(.*/signal.h\)".*#\1# | |
b06b1098 PE |
20035 | s#^/[^/]#//&# |
20036 | p | |
20037 | q | |
20038 | }'`'"' | |
b06b1098 | 20039 | |
e275c824 PE |
20040 | |
20041 | fi | |
3e0be4ab GM |
20042 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5 |
20043 | $as_echo "$gl_cv_next_signal_h" >&6; } | |
e275c824 | 20044 | fi |
3e0be4ab | 20045 | NEXT_SIGNAL_H=$gl_cv_next_signal_h |
e275c824 PE |
20046 | |
20047 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then | |
20048 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
3e0be4ab | 20049 | gl_next_as_first_directive='<'signal.h'>' |
e275c824 PE |
20050 | else |
20051 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
3e0be4ab | 20052 | gl_next_as_first_directive=$gl_cv_next_signal_h |
e275c824 | 20053 | fi |
3e0be4ab | 20054 | NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive |
e275c824 PE |
20055 | |
20056 | ||
20057 | ||
20058 | ||
e275c824 | 20059 | |
3e0be4ab GM |
20060 | # AIX declares sig_atomic_t to already include volatile, and C89 compilers |
20061 | # then choke on 'volatile sig_atomic_t'. C99 requires that it compile. | |
20062 | ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" " | |
20063 | #include <signal.h> | |
e275c824 | 20064 | |
3e0be4ab GM |
20065 | " |
20066 | if test "x$ac_cv_type_volatile_sig_atomic_t" = x""yes; then : | |
e275c824 | 20067 | |
3e0be4ab GM |
20068 | else |
20069 | HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0 | |
20070 | fi | |
e275c824 | 20071 | |
6d153f56 GM |
20072 | |
20073 | ||
6d153f56 GM |
20074 | |
20075 | ||
3e0be4ab GM |
20076 | ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" " |
20077 | #include <signal.h> | |
6d153f56 | 20078 | |
3e0be4ab GM |
20079 | " |
20080 | if test "x$ac_cv_type_sighandler_t" = x""yes; then : | |
20081 | ||
20082 | else | |
20083 | HAVE_SIGHANDLER_T=0 | |
20084 | fi | |
20085 | ||
20086 | ||
20087 | ||
20088 | ||
20089 | ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" " | |
20090 | /* <sys/types.h> is not needed according to POSIX, but the | |
20091 | <sys/socket.h> in i386-unknown-freebsd4.10 and | |
20092 | powerpc-apple-darwin5.5 required it. */ | |
20093 | #include <sys/types.h> | |
20094 | #if HAVE_SYS_SOCKET_H | |
20095 | # include <sys/socket.h> | |
20096 | #elif HAVE_WS2TCPIP_H | |
20097 | # include <ws2tcpip.h> | |
20098 | #endif | |
20099 | ||
20100 | " | |
20101 | if test "x$ac_cv_type_socklen_t" = x""yes; then : | |
20102 | ||
20103 | else | |
20104 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5 | |
20105 | $as_echo_n "checking for socklen_t equivalent... " >&6; } | |
20106 | if test "${gl_cv_socklen_t_equiv+set}" = set; then : | |
6d153f56 GM |
20107 | $as_echo_n "(cached) " >&6 |
20108 | else | |
3e0be4ab GM |
20109 | # Systems have either "struct sockaddr *" or |
20110 | # "void *" as the second argument to getpeername | |
20111 | gl_cv_socklen_t_equiv= | |
20112 | for arg2 in "struct sockaddr" void; do | |
20113 | for t in int size_t "unsigned int" "long int" "unsigned long int"; do | |
20114 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
20115 | /* end confdefs.h. */ | |
20116 | #include <sys/types.h> | |
20117 | #include <sys/socket.h> | |
20118 | ||
20119 | int getpeername (int, $arg2 *, $t *); | |
20120 | int | |
20121 | main () | |
20122 | { | |
20123 | $t len; | |
20124 | getpeername (0, 0, &len); | |
20125 | ; | |
20126 | return 0; | |
20127 | } | |
20128 | _ACEOF | |
20129 | if ac_fn_c_try_compile "$LINENO"; then : | |
20130 | gl_cv_socklen_t_equiv="$t" | |
20131 | fi | |
20132 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
20133 | test "$gl_cv_socklen_t_equiv" != "" && break | |
20134 | done | |
20135 | test "$gl_cv_socklen_t_equiv" != "" && break | |
20136 | done | |
20137 | ||
20138 | fi | |
20139 | ||
20140 | if test "$gl_cv_socklen_t_equiv" = ""; then | |
20141 | as_fn_error "Cannot find a type to use in place of socklen_t" "$LINENO" 5 | |
20142 | fi | |
20143 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socklen_t_equiv" >&5 | |
20144 | $as_echo "$gl_cv_socklen_t_equiv" >&6; } | |
20145 | ||
20146 | cat >>confdefs.h <<_ACEOF | |
20147 | #define socklen_t $gl_cv_socklen_t_equiv | |
20148 | _ACEOF | |
20149 | ||
20150 | fi | |
20151 | ||
20152 | ||
20153 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5 | |
20154 | $as_echo_n "checking for ssize_t... " >&6; } | |
20155 | if test "${gt_cv_ssize_t+set}" = set; then : | |
20156 | $as_echo_n "(cached) " >&6 | |
6d153f56 GM |
20157 | else |
20158 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
20159 | /* end confdefs.h. */ | |
3e0be4ab | 20160 | #include <sys/types.h> |
6d153f56 GM |
20161 | int |
20162 | main () | |
20163 | { | |
3e0be4ab GM |
20164 | int x = sizeof (ssize_t *) + sizeof (ssize_t); |
20165 | return !x; | |
6d153f56 GM |
20166 | ; |
20167 | return 0; | |
20168 | } | |
20169 | _ACEOF | |
3e0be4ab GM |
20170 | if ac_fn_c_try_compile "$LINENO"; then : |
20171 | gt_cv_ssize_t=yes | |
6d153f56 | 20172 | else |
3e0be4ab | 20173 | gt_cv_ssize_t=no |
6d153f56 | 20174 | fi |
3e0be4ab | 20175 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
6d153f56 | 20176 | fi |
3e0be4ab GM |
20177 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5 |
20178 | $as_echo "$gt_cv_ssize_t" >&6; } | |
20179 | if test $gt_cv_ssize_t = no; then | |
6d153f56 | 20180 | |
3e0be4ab GM |
20181 | $as_echo "#define ssize_t int" >>confdefs.h |
20182 | ||
20183 | fi | |
20184 | ||
20185 | ||
20186 | STDARG_H='' | |
20187 | NEXT_STDARG_H='<stdarg.h>' | |
20188 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5 | |
20189 | $as_echo_n "checking for va_copy... " >&6; } | |
20190 | if test "${gl_cv_func_va_copy+set}" = set; then : | |
6d153f56 GM |
20191 | $as_echo_n "(cached) " >&6 |
20192 | else | |
6d153f56 | 20193 | |
3e0be4ab GM |
20194 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
20195 | /* end confdefs.h. */ | |
20196 | #include <stdarg.h> | |
6d153f56 GM |
20197 | int |
20198 | main () | |
20199 | { | |
3e0be4ab GM |
20200 | |
20201 | #ifndef va_copy | |
20202 | void (*func) (va_list, va_list) = va_copy; | |
6d153f56 | 20203 | #endif |
6d153f56 GM |
20204 | |
20205 | ; | |
20206 | return 0; | |
20207 | } | |
20208 | _ACEOF | |
3e0be4ab GM |
20209 | if ac_fn_c_try_compile "$LINENO"; then : |
20210 | gl_cv_func_va_copy=yes | |
6d153f56 | 20211 | else |
3e0be4ab | 20212 | gl_cv_func_va_copy=no |
6d153f56 | 20213 | fi |
3e0be4ab | 20214 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
6d153f56 | 20215 | fi |
6d153f56 | 20216 | |
3e0be4ab GM |
20217 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_va_copy" >&5 |
20218 | $as_echo "$gl_cv_func_va_copy" >&6; } | |
20219 | if test $gl_cv_func_va_copy = no; then | |
20220 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
20221 | /* end confdefs.h. */ | |
20222 | #if defined _AIX && !defined __GNUC__ | |
20223 | AIX vaccine | |
20224 | #endif | |
6d153f56 | 20225 | |
3e0be4ab GM |
20226 | _ACEOF |
20227 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
20228 | $EGREP "vaccine" >/dev/null 2>&1; then : | |
20229 | gl_aixcc=yes | |
20230 | else | |
20231 | gl_aixcc=no | |
20232 | fi | |
20233 | rm -f conftest* | |
52724a05 | 20234 | |
3e0be4ab GM |
20235 | if test $gl_aixcc = yes; then |
20236 | STDARG_H=stdarg.h | |
6d153f56 GM |
20237 | |
20238 | ||
20239 | ||
20240 | ||
20241 | ||
20242 | ||
20243 | ||
20244 | ||
3e0be4ab GM |
20245 | if test $gl_cv_have_include_next = yes; then |
20246 | gl_cv_next_stdarg_h='<'stdarg.h'>' | |
20247 | else | |
20248 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdarg.h>" >&5 | |
20249 | $as_echo_n "checking absolute name of <stdarg.h>... " >&6; } | |
20250 | if test "${gl_cv_next_stdarg_h+set}" = set; then : | |
20251 | $as_echo_n "(cached) " >&6 | |
20252 | else | |
6d153f56 | 20253 | |
3e0be4ab GM |
20254 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
20255 | /* end confdefs.h. */ | |
20256 | #include <stdarg.h> | |
6d153f56 | 20257 | |
3e0be4ab GM |
20258 | _ACEOF |
20259 | case "$host_os" in | |
20260 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
20261 | *) gl_absname_cpp="$ac_cpp" ;; | |
20262 | esac | |
20263 | gl_cv_next_stdarg_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
20264 | sed -n '\#/stdarg.h#{ | |
20265 | s#.*"\(.*/stdarg.h\)".*#\1# | |
20266 | s#^/[^/]#//&# | |
20267 | p | |
20268 | q | |
20269 | }'`'"' | |
6d153f56 | 20270 | |
52724a05 GM |
20271 | |
20272 | fi | |
3e0be4ab GM |
20273 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdarg_h" >&5 |
20274 | $as_echo "$gl_cv_next_stdarg_h" >&6; } | |
20275 | fi | |
20276 | NEXT_STDARG_H=$gl_cv_next_stdarg_h | |
6d153f56 | 20277 | |
3e0be4ab GM |
20278 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then |
20279 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
20280 | gl_next_as_first_directive='<'stdarg.h'>' | |
20281 | else | |
20282 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
20283 | gl_next_as_first_directive=$gl_cv_next_stdarg_h | |
20284 | fi | |
20285 | NEXT_AS_FIRST_DIRECTIVE_STDARG_H=$gl_next_as_first_directive | |
6d153f56 GM |
20286 | |
20287 | ||
cc322c06 GM |
20288 | |
20289 | ||
3e0be4ab GM |
20290 | if test "$gl_cv_next_stdarg_h" = '""'; then |
20291 | gl_cv_next_stdarg_h='"///usr/include/stdarg.h"' | |
20292 | NEXT_STDARG_H="$gl_cv_next_stdarg_h" | |
4fc2b746 | 20293 | fi |
3e0be4ab GM |
20294 | else |
20295 | ||
20296 | saved_as_echo_n="$as_echo_n" | |
20297 | as_echo_n=':' | |
20298 | if test "${gl_cv_func___va_copy+set}" = set; then : | |
20299 | $as_echo_n "(cached) " >&6 | |
20300 | else | |
6d153f56 | 20301 | |
3e0be4ab GM |
20302 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
20303 | /* end confdefs.h. */ | |
20304 | #include <stdarg.h> | |
20305 | int | |
20306 | main () | |
20307 | { | |
6d153f56 | 20308 | |
3e0be4ab GM |
20309 | #ifndef __va_copy |
20310 | error, bail out | |
20311 | #endif | |
6d153f56 | 20312 | |
3e0be4ab GM |
20313 | ; |
20314 | return 0; | |
20315 | } | |
6d153f56 | 20316 | _ACEOF |
3e0be4ab GM |
20317 | if ac_fn_c_try_compile "$LINENO"; then : |
20318 | gl_cv_func___va_copy=yes | |
20319 | else | |
20320 | gl_cv_func___va_copy=no | |
6d153f56 | 20321 | fi |
3e0be4ab | 20322 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
52724a05 | 20323 | fi |
6d153f56 | 20324 | |
3e0be4ab | 20325 | as_echo_n="$saved_as_echo_n" |
6d153f56 | 20326 | |
3e0be4ab | 20327 | if test $gl_cv_func___va_copy = yes; then |
6d153f56 | 20328 | |
3e0be4ab | 20329 | $as_echo "#define va_copy __va_copy" >>confdefs.h |
cc322c06 | 20330 | |
3e0be4ab | 20331 | else |
6d153f56 GM |
20332 | |
20333 | ||
3e0be4ab | 20334 | $as_echo "#define va_copy gl_va_copy" >>confdefs.h |
6d153f56 | 20335 | |
3e0be4ab | 20336 | fi |
6d153f56 | 20337 | fi |
6d153f56 | 20338 | fi |
6d153f56 | 20339 | |
3e0be4ab GM |
20340 | if test -n "$STDARG_H"; then |
20341 | GL_GENERATE_STDARG_H_TRUE= | |
20342 | GL_GENERATE_STDARG_H_FALSE='#' | |
6d153f56 | 20343 | else |
3e0be4ab GM |
20344 | GL_GENERATE_STDARG_H_TRUE='#' |
20345 | GL_GENERATE_STDARG_H_FALSE= | |
6d153f56 GM |
20346 | fi |
20347 | ||
a451f14b | 20348 | |
a451f14b | 20349 | |
743c80a7 PE |
20350 | |
20351 | ||
20352 | ||
3e0be4ab | 20353 | # Define two additional variables used in the Makefile substitution. |
743c80a7 | 20354 | |
3e0be4ab GM |
20355 | if test "$ac_cv_header_stdbool_h" = yes; then |
20356 | STDBOOL_H='' | |
20357 | else | |
20358 | STDBOOL_H='stdbool.h' | |
20359 | fi | |
743c80a7 | 20360 | |
3e0be4ab GM |
20361 | if test -n "$STDBOOL_H"; then |
20362 | GL_GENERATE_STDBOOL_H_TRUE= | |
20363 | GL_GENERATE_STDBOOL_H_FALSE='#' | |
20364 | else | |
20365 | GL_GENERATE_STDBOOL_H_TRUE='#' | |
20366 | GL_GENERATE_STDBOOL_H_FALSE= | |
20367 | fi | |
743c80a7 PE |
20368 | |
20369 | ||
3e0be4ab GM |
20370 | if test "$ac_cv_type__Bool" = yes; then |
20371 | HAVE__BOOL=1 | |
20372 | else | |
20373 | HAVE__BOOL=0 | |
20374 | fi | |
743c80a7 PE |
20375 | |
20376 | ||
20377 | ||
20378 | ||
20379 | ||
3e0be4ab GM |
20380 | STDDEF_H= |
20381 | if test $gt_cv_c_wchar_t = no; then | |
20382 | HAVE_WCHAR_T=0 | |
20383 | STDDEF_H=stddef.h | |
20384 | fi | |
20385 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5 | |
20386 | $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; } | |
20387 | if test "${gl_cv_decl_null_works+set}" = set; then : | |
20388 | $as_echo_n "(cached) " >&6 | |
20389 | else | |
20390 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
20391 | /* end confdefs.h. */ | |
20392 | #include <stddef.h> | |
20393 | int test[2 * (sizeof NULL == sizeof (void *)) -1]; | |
a451f14b | 20394 | |
3e0be4ab GM |
20395 | int |
20396 | main () | |
20397 | { | |
a451f14b | 20398 | |
3e0be4ab GM |
20399 | ; |
20400 | return 0; | |
20401 | } | |
20402 | _ACEOF | |
20403 | if ac_fn_c_try_compile "$LINENO"; then : | |
20404 | gl_cv_decl_null_works=yes | |
20405 | else | |
20406 | gl_cv_decl_null_works=no | |
20407 | fi | |
20408 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
20409 | fi | |
20410 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5 | |
20411 | $as_echo "$gl_cv_decl_null_works" >&6; } | |
20412 | if test $gl_cv_decl_null_works = no; then | |
20413 | REPLACE_NULL=1 | |
20414 | STDDEF_H=stddef.h | |
20415 | fi | |
a451f14b | 20416 | |
3e0be4ab GM |
20417 | if test -n "$STDDEF_H"; then |
20418 | GL_GENERATE_STDDEF_H_TRUE= | |
20419 | GL_GENERATE_STDDEF_H_FALSE='#' | |
20420 | else | |
20421 | GL_GENERATE_STDDEF_H_TRUE='#' | |
20422 | GL_GENERATE_STDDEF_H_FALSE= | |
20423 | fi | |
a451f14b | 20424 | |
3e0be4ab | 20425 | if test -n "$STDDEF_H"; then |
743c80a7 | 20426 | |
743c80a7 PE |
20427 | |
20428 | ||
20429 | ||
20430 | ||
20431 | ||
20432 | ||
20433 | ||
3e0be4ab GM |
20434 | if test $gl_cv_have_include_next = yes; then |
20435 | gl_cv_next_stddef_h='<'stddef.h'>' | |
20436 | else | |
20437 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5 | |
20438 | $as_echo_n "checking absolute name of <stddef.h>... " >&6; } | |
20439 | if test "${gl_cv_next_stddef_h+set}" = set; then : | |
20440 | $as_echo_n "(cached) " >&6 | |
20441 | else | |
743c80a7 | 20442 | |
3e0be4ab GM |
20443 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
20444 | /* end confdefs.h. */ | |
20445 | #include <stddef.h> | |
743c80a7 | 20446 | |
3e0be4ab GM |
20447 | _ACEOF |
20448 | case "$host_os" in | |
20449 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
20450 | *) gl_absname_cpp="$ac_cpp" ;; | |
20451 | esac | |
20452 | gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
20453 | sed -n '\#/stddef.h#{ | |
20454 | s#.*"\(.*/stddef.h\)".*#\1# | |
20455 | s#^/[^/]#//&# | |
20456 | p | |
20457 | q | |
20458 | }'`'"' | |
6d153f56 | 20459 | |
743c80a7 | 20460 | |
3e0be4ab GM |
20461 | fi |
20462 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5 | |
20463 | $as_echo "$gl_cv_next_stddef_h" >&6; } | |
20464 | fi | |
20465 | NEXT_STDDEF_H=$gl_cv_next_stddef_h | |
743c80a7 | 20466 | |
3e0be4ab GM |
20467 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then |
20468 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
20469 | gl_next_as_first_directive='<'stddef.h'>' | |
20470 | else | |
20471 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
20472 | gl_next_as_first_directive=$gl_cv_next_stddef_h | |
20473 | fi | |
20474 | NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive | |
743c80a7 PE |
20475 | |
20476 | ||
067d23c9 | 20477 | |
067d23c9 | 20478 | |
3e0be4ab | 20479 | fi |
067d23c9 | 20480 | |
067d23c9 | 20481 | |
067d23c9 KY |
20482 | |
20483 | ||
067d23c9 | 20484 | |
067d23c9 | 20485 | |
067d23c9 | 20486 | |
067d23c9 | 20487 | |
067d23c9 | 20488 | |
067d23c9 | 20489 | |
067d23c9 | 20490 | |
067d23c9 | 20491 | |
067d23c9 | 20492 | |
3e0be4ab GM |
20493 | if test $gl_cv_have_include_next = yes; then |
20494 | gl_cv_next_stdio_h='<'stdio.h'>' | |
20495 | else | |
20496 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5 | |
20497 | $as_echo_n "checking absolute name of <stdio.h>... " >&6; } | |
20498 | if test "${gl_cv_next_stdio_h+set}" = set; then : | |
067d23c9 KY |
20499 | $as_echo_n "(cached) " >&6 |
20500 | else | |
3e0be4ab GM |
20501 | |
20502 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
067d23c9 | 20503 | /* end confdefs.h. */ |
3e0be4ab | 20504 | #include <stdio.h> |
067d23c9 | 20505 | |
067d23c9 | 20506 | _ACEOF |
3e0be4ab GM |
20507 | case "$host_os" in |
20508 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
20509 | *) gl_absname_cpp="$ac_cpp" ;; | |
20510 | esac | |
20511 | gl_cv_next_stdio_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
20512 | sed -n '\#/stdio.h#{ | |
20513 | s#.*"\(.*/stdio.h\)".*#\1# | |
20514 | s#^/[^/]#//&# | |
20515 | p | |
20516 | q | |
20517 | }'`'"' | |
20518 | ||
20519 | ||
067d23c9 | 20520 | fi |
3e0be4ab GM |
20521 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5 |
20522 | $as_echo "$gl_cv_next_stdio_h" >&6; } | |
20523 | fi | |
20524 | NEXT_STDIO_H=$gl_cv_next_stdio_h | |
067d23c9 | 20525 | |
3e0be4ab GM |
20526 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then |
20527 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
20528 | gl_next_as_first_directive='<'stdio.h'>' | |
20529 | else | |
20530 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
20531 | gl_next_as_first_directive=$gl_cv_next_stdio_h | |
20532 | fi | |
20533 | NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive | |
067d23c9 | 20534 | |
067d23c9 | 20535 | |
067d23c9 | 20536 | |
067d23c9 | 20537 | |
067d23c9 | 20538 | |
3e0be4ab GM |
20539 | GNULIB_FSCANF=1 |
20540 | GNULIB_SCANF=1 | |
20541 | GNULIB_FGETC=1 | |
20542 | GNULIB_GETC=1 | |
20543 | GNULIB_GETCHAR=1 | |
20544 | GNULIB_FGETS=1 | |
20545 | GNULIB_GETS=1 | |
20546 | GNULIB_FREAD=1 | |
067d23c9 | 20547 | |
067d23c9 | 20548 | |
3e0be4ab GM |
20549 | GNULIB_FPRINTF=1 |
20550 | GNULIB_PRINTF=1 | |
20551 | GNULIB_VFPRINTF=1 | |
20552 | GNULIB_VPRINTF=1 | |
20553 | GNULIB_FPUTC=1 | |
20554 | GNULIB_PUTC=1 | |
20555 | GNULIB_PUTCHAR=1 | |
20556 | GNULIB_FPUTS=1 | |
20557 | GNULIB_PUTS=1 | |
20558 | GNULIB_FWRITE=1 | |
067d23c9 | 20559 | |
067d23c9 | 20560 | |
067d23c9 KY |
20561 | |
20562 | ||
067d23c9 | 20563 | |
067d23c9 KY |
20564 | |
20565 | ||
20566 | ||
20567 | ||
067d23c9 | 20568 | |
067d23c9 | 20569 | |
067d23c9 | 20570 | |
067d23c9 | 20571 | |
067d23c9 | 20572 | |
067d23c9 | 20573 | |
3e0be4ab GM |
20574 | if test $gl_cv_have_include_next = yes; then |
20575 | gl_cv_next_stdlib_h='<'stdlib.h'>' | |
20576 | else | |
20577 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5 | |
20578 | $as_echo_n "checking absolute name of <stdlib.h>... " >&6; } | |
20579 | if test "${gl_cv_next_stdlib_h+set}" = set; then : | |
067d23c9 KY |
20580 | $as_echo_n "(cached) " >&6 |
20581 | else | |
067d23c9 | 20582 | |
3e0be4ab | 20583 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
067d23c9 | 20584 | /* end confdefs.h. */ |
3e0be4ab | 20585 | #include <stdlib.h> |
067d23c9 | 20586 | |
067d23c9 | 20587 | _ACEOF |
3e0be4ab GM |
20588 | case "$host_os" in |
20589 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
20590 | *) gl_absname_cpp="$ac_cpp" ;; | |
20591 | esac | |
20592 | gl_cv_next_stdlib_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
20593 | sed -n '\#/stdlib.h#{ | |
20594 | s#.*"\(.*/stdlib.h\)".*#\1# | |
20595 | s#^/[^/]#//&# | |
20596 | p | |
20597 | q | |
20598 | }'`'"' | |
20599 | ||
20600 | ||
067d23c9 | 20601 | fi |
3e0be4ab GM |
20602 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5 |
20603 | $as_echo "$gl_cv_next_stdlib_h" >&6; } | |
20604 | fi | |
20605 | NEXT_STDLIB_H=$gl_cv_next_stdlib_h | |
20606 | ||
20607 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then | |
20608 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
20609 | gl_next_as_first_directive='<'stdlib.h'>' | |
20610 | else | |
20611 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
20612 | gl_next_as_first_directive=$gl_cv_next_stdlib_h | |
20613 | fi | |
20614 | NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive | |
20615 | ||
20616 | ||
20617 | ||
20618 | ||
20619 | ||
20620 | ||
20621 | ||
20622 | ||
20623 | ||
20624 | # This defines (or not) HAVE_TZNAME and HAVE_TM_ZONE. | |
20625 | ||
20626 | ||
20627 | ||
20628 | ||
067d23c9 | 20629 | |
067d23c9 | 20630 | |
067d23c9 | 20631 | |
3e0be4ab | 20632 | $as_echo "#define my_strftime nstrftime" >>confdefs.h |
067d23c9 | 20633 | |
067d23c9 | 20634 | |
067d23c9 | 20635 | |
067d23c9 | 20636 | |
067d23c9 KY |
20637 | |
20638 | ||
067d23c9 | 20639 | |
3e0be4ab GM |
20640 | if test "$ac_cv_have_decl_strtoimax" != yes; then |
20641 | HAVE_DECL_STRTOIMAX=0 | |
20642 | ||
20643 | for ac_func in strtoimax | |
20644 | do : | |
20645 | ac_fn_c_check_func "$LINENO" "strtoimax" "ac_cv_func_strtoimax" | |
20646 | if test "x$ac_cv_func_strtoimax" = x""yes; then : | |
20647 | cat >>confdefs.h <<_ACEOF | |
20648 | #define HAVE_STRTOIMAX 1 | |
20649 | _ACEOF | |
067d23c9 | 20650 | |
067d23c9 | 20651 | fi |
3e0be4ab | 20652 | done |
067d23c9 | 20653 | |
3e0be4ab | 20654 | fi |
067d23c9 | 20655 | |
3e0be4ab | 20656 | if test "$ac_cv_have_decl_strtoimax" != yes && test $ac_cv_func_strtoimax = no; then |
067d23c9 | 20657 | |
067d23c9 | 20658 | |
067d23c9 KY |
20659 | |
20660 | ||
067d23c9 | 20661 | |
067d23c9 | 20662 | |
067d23c9 | 20663 | |
067d23c9 | 20664 | |
3e0be4ab | 20665 | gl_LIBOBJS="$gl_LIBOBJS strtoimax.$ac_objext" |
067d23c9 | 20666 | |
067d23c9 | 20667 | |
3e0be4ab GM |
20668 | ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default" |
20669 | if test "x$ac_cv_have_decl_strtoll" = x""yes; then : | |
20670 | ac_have_decl=1 | |
067d23c9 | 20671 | else |
3e0be4ab | 20672 | ac_have_decl=0 |
067d23c9 KY |
20673 | fi |
20674 | ||
3e0be4ab GM |
20675 | cat >>confdefs.h <<_ACEOF |
20676 | #define HAVE_DECL_STRTOLL $ac_have_decl | |
20677 | _ACEOF | |
067d23c9 | 20678 | |
067d23c9 | 20679 | |
067d23c9 | 20680 | |
067d23c9 KY |
20681 | fi |
20682 | ||
067d23c9 | 20683 | |
067d23c9 | 20684 | |
067d23c9 | 20685 | |
067d23c9 | 20686 | |
3e0be4ab GM |
20687 | GNULIB_STRTOIMAX=1 |
20688 | ||
20689 | ||
20690 | ||
067d23c9 | 20691 | |
067d23c9 | 20692 | |
067d23c9 | 20693 | |
3e0be4ab GM |
20694 | |
20695 | ||
20696 | if test "$ac_cv_have_decl_strtoumax" != yes; then | |
20697 | HAVE_DECL_STRTOUMAX=0 | |
20698 | ||
20699 | for ac_func in strtoumax | |
20700 | do : | |
20701 | ac_fn_c_check_func "$LINENO" "strtoumax" "ac_cv_func_strtoumax" | |
20702 | if test "x$ac_cv_func_strtoumax" = x""yes; then : | |
20703 | cat >>confdefs.h <<_ACEOF | |
20704 | #define HAVE_STRTOUMAX 1 | |
067d23c9 | 20705 | _ACEOF |
3e0be4ab | 20706 | |
067d23c9 | 20707 | fi |
3e0be4ab | 20708 | done |
067d23c9 | 20709 | |
3e0be4ab | 20710 | fi |
067d23c9 | 20711 | |
3e0be4ab | 20712 | if test "$ac_cv_have_decl_strtoumax" != yes && test $ac_cv_func_strtoumax = no; then |
067d23c9 | 20713 | |
067d23c9 | 20714 | |
067d23c9 | 20715 | |
067d23c9 | 20716 | |
067d23c9 | 20717 | |
067d23c9 | 20718 | |
3e0be4ab GM |
20719 | |
20720 | ||
20721 | gl_LIBOBJS="$gl_LIBOBJS strtoumax.$ac_objext" | |
20722 | ||
20723 | ||
20724 | ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default" | |
20725 | if test "x$ac_cv_have_decl_strtoull" = x""yes; then : | |
20726 | ac_have_decl=1 | |
067d23c9 | 20727 | else |
3e0be4ab | 20728 | ac_have_decl=0 |
067d23c9 | 20729 | fi |
3e0be4ab GM |
20730 | |
20731 | cat >>confdefs.h <<_ACEOF | |
20732 | #define HAVE_DECL_STRTOULL $ac_have_decl | |
20733 | _ACEOF | |
20734 | ||
20735 | ||
20736 | ||
067d23c9 KY |
20737 | fi |
20738 | ||
067d23c9 | 20739 | |
067d23c9 | 20740 | |
3e0be4ab GM |
20741 | |
20742 | ||
20743 | GNULIB_STRTOUMAX=1 | |
20744 | ||
20745 | ||
20746 | ||
20747 | ||
20748 | ||
20749 | ||
20750 | ||
20751 | if test $ac_cv_func_symlink = no; then | |
20752 | HAVE_SYMLINK=0 | |
20753 | else | |
20754 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether symlink handles trailing slash correctly" >&5 | |
20755 | $as_echo_n "checking whether symlink handles trailing slash correctly... " >&6; } | |
20756 | if test "${gl_cv_func_symlink_works+set}" = set; then : | |
067d23c9 KY |
20757 | $as_echo_n "(cached) " >&6 |
20758 | else | |
3e0be4ab GM |
20759 | if test "$cross_compiling" = yes; then : |
20760 | gl_cv_func_symlink_works="guessing no" | |
20761 | else | |
20762 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
067d23c9 | 20763 | /* end confdefs.h. */ |
3e0be4ab | 20764 | #include <unistd.h> |
067d23c9 | 20765 | |
067d23c9 KY |
20766 | int |
20767 | main () | |
20768 | { | |
3e0be4ab GM |
20769 | int result = 0; |
20770 | if (!symlink ("a", "conftest.link/")) | |
20771 | result |= 1; | |
20772 | if (symlink ("conftest.f", "conftest.lnk2")) | |
20773 | result |= 2; | |
20774 | else if (!symlink ("a", "conftest.lnk2/")) | |
20775 | result |= 4; | |
20776 | return result; | |
20777 | ||
067d23c9 KY |
20778 | ; |
20779 | return 0; | |
20780 | } | |
20781 | _ACEOF | |
3e0be4ab GM |
20782 | if ac_fn_c_try_run "$LINENO"; then : |
20783 | gl_cv_func_symlink_works=yes | |
067d23c9 | 20784 | else |
3e0be4ab GM |
20785 | gl_cv_func_symlink_works=no |
20786 | fi | |
20787 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
20788 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
067d23c9 KY |
20789 | fi |
20790 | ||
3e0be4ab | 20791 | rm -f conftest.f conftest.link conftest.lnk2 |
067d23c9 | 20792 | fi |
3e0be4ab GM |
20793 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_symlink_works" >&5 |
20794 | $as_echo "$gl_cv_func_symlink_works" >&6; } | |
20795 | if test "$gl_cv_func_symlink_works" != yes; then | |
20796 | REPLACE_SYMLINK=1 | |
20797 | fi | |
20798 | fi | |
067d23c9 | 20799 | |
3e0be4ab | 20800 | if test $HAVE_SYMLINK = 0 || test $REPLACE_SYMLINK = 1; then |
067d23c9 KY |
20801 | |
20802 | ||
067d23c9 | 20803 | |
067d23c9 | 20804 | |
067d23c9 | 20805 | |
067d23c9 | 20806 | |
067d23c9 | 20807 | |
3e0be4ab GM |
20808 | |
20809 | gl_LIBOBJS="$gl_LIBOBJS symlink.$ac_objext" | |
067d23c9 KY |
20810 | |
20811 | fi | |
20812 | ||
067d23c9 | 20813 | |
067d23c9 | 20814 | |
067d23c9 | 20815 | |
067d23c9 | 20816 | |
3e0be4ab | 20817 | GNULIB_SYMLINK=1 |
067d23c9 | 20818 | |
067d23c9 | 20819 | |
067d23c9 | 20820 | |
067d23c9 | 20821 | |
067d23c9 | 20822 | |
067d23c9 | 20823 | |
067d23c9 | 20824 | |
067d23c9 | 20825 | |
067d23c9 | 20826 | |
067d23c9 | 20827 | |
067d23c9 | 20828 | |
067d23c9 | 20829 | |
067d23c9 | 20830 | |
067d23c9 KY |
20831 | |
20832 | ||
20833 | ||
20834 | ||
20835 | ||
20836 | ||
20837 | ||
3e0be4ab GM |
20838 | |
20839 | if test $gl_cv_have_include_next = yes; then | |
20840 | gl_cv_next_sys_stat_h='<'sys/stat.h'>' | |
20841 | else | |
20842 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5 | |
20843 | $as_echo_n "checking absolute name of <sys/stat.h>... " >&6; } | |
20844 | if test "${gl_cv_next_sys_stat_h+set}" = set; then : | |
067d23c9 KY |
20845 | $as_echo_n "(cached) " >&6 |
20846 | else | |
3e0be4ab GM |
20847 | |
20848 | if test $ac_cv_header_sys_stat_h = yes; then | |
20849 | ||
20850 | ||
20851 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
067d23c9 | 20852 | /* end confdefs.h. */ |
3e0be4ab | 20853 | #include <sys/stat.h> |
067d23c9 | 20854 | |
067d23c9 | 20855 | _ACEOF |
3e0be4ab GM |
20856 | case "$host_os" in |
20857 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
20858 | *) gl_absname_cpp="$ac_cpp" ;; | |
20859 | esac | |
20860 | gl_cv_next_sys_stat_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
20861 | sed -n '\#/sys/stat.h#{ | |
20862 | s#.*"\(.*/sys/stat.h\)".*#\1# | |
20863 | s#^/[^/]#//&# | |
20864 | p | |
20865 | q | |
20866 | }'`'"' | |
20867 | else | |
20868 | gl_cv_next_sys_stat_h='<'sys/stat.h'>' | |
20869 | fi | |
067d23c9 | 20870 | |
067d23c9 KY |
20871 | |
20872 | fi | |
3e0be4ab GM |
20873 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5 |
20874 | $as_echo "$gl_cv_next_sys_stat_h" >&6; } | |
20875 | fi | |
20876 | NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h | |
067d23c9 | 20877 | |
3e0be4ab GM |
20878 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then |
20879 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
20880 | gl_next_as_first_directive='<'sys/stat.h'>' | |
20881 | else | |
20882 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
20883 | gl_next_as_first_directive=$gl_cv_next_sys_stat_h | |
20884 | fi | |
20885 | NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive | |
067d23c9 | 20886 | |
3e0be4ab GM |
20887 | |
20888 | ||
20889 | ||
20890 | ||
20891 | ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h> | |
20892 | #include <sys/stat.h> | |
20893 | " | |
20894 | if test "x$ac_cv_type_nlink_t" = x""yes; then : | |
067d23c9 KY |
20895 | |
20896 | else | |
067d23c9 | 20897 | |
3e0be4ab | 20898 | $as_echo "#define nlink_t int" >>confdefs.h |
067d23c9 KY |
20899 | |
20900 | fi | |
20901 | ||
067d23c9 | 20902 | |
067d23c9 | 20903 | |
3e0be4ab GM |
20904 | |
20905 | ||
20906 | ||
20907 | ||
20908 | ||
20909 | ||
20910 | ||
20911 | ||
20912 | ||
20913 | ||
20914 | ||
20915 | ||
20916 | if test $ac_cv_have_decl_localtime_r = no; then | |
20917 | HAVE_DECL_LOCALTIME_R=0 | |
20918 | fi | |
20919 | ||
20920 | ||
20921 | if test $ac_cv_func_localtime_r = yes; then | |
20922 | HAVE_LOCALTIME_R=1 | |
20923 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime_r is compatible with its POSIX signature" >&5 | |
20924 | $as_echo_n "checking whether localtime_r is compatible with its POSIX signature... " >&6; } | |
20925 | if test "${gl_cv_time_r_posix+set}" = set; then : | |
067d23c9 KY |
20926 | $as_echo_n "(cached) " >&6 |
20927 | else | |
20928 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
20929 | /* end confdefs.h. */ | |
067d23c9 | 20930 | #include <time.h> |
067d23c9 KY |
20931 | int |
20932 | main () | |
20933 | { | |
3e0be4ab GM |
20934 | /* We don't need to append 'restrict's to the argument types, |
20935 | even though the POSIX signature has the 'restrict's, | |
20936 | since C99 says they can't affect type compatibility. */ | |
20937 | struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r; | |
20938 | if (ptr) return 0; | |
20939 | /* Check the return type is a pointer. | |
20940 | On HP-UX 10 it is 'int'. */ | |
20941 | *localtime_r (0, 0); | |
067d23c9 KY |
20942 | ; |
20943 | return 0; | |
20944 | } | |
3e0be4ab | 20945 | |
067d23c9 KY |
20946 | _ACEOF |
20947 | if ac_fn_c_try_compile "$LINENO"; then : | |
3e0be4ab | 20948 | gl_cv_time_r_posix=yes |
067d23c9 | 20949 | else |
3e0be4ab | 20950 | gl_cv_time_r_posix=no |
067d23c9 KY |
20951 | fi |
20952 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
067d23c9 | 20953 | |
3e0be4ab GM |
20954 | fi |
20955 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_r_posix" >&5 | |
20956 | $as_echo "$gl_cv_time_r_posix" >&6; } | |
20957 | if test $gl_cv_time_r_posix = yes; then | |
20958 | REPLACE_LOCALTIME_R=0 | |
20959 | else | |
20960 | REPLACE_LOCALTIME_R=1 | |
067d23c9 | 20961 | fi |
3e0be4ab GM |
20962 | else |
20963 | HAVE_LOCALTIME_R=0 | |
067d23c9 | 20964 | fi |
067d23c9 | 20965 | |
3e0be4ab | 20966 | if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then |
067d23c9 | 20967 | |
067d23c9 | 20968 | |
067d23c9 | 20969 | |
067d23c9 KY |
20970 | |
20971 | ||
067d23c9 | 20972 | |
067d23c9 KY |
20973 | |
20974 | ||
3e0be4ab | 20975 | gl_LIBOBJS="$gl_LIBOBJS time_r.$ac_objext" |
067d23c9 | 20976 | |
3e0be4ab GM |
20977 | |
20978 | : | |
067d23c9 KY |
20979 | |
20980 | fi | |
20981 | ||
067d23c9 | 20982 | |
067d23c9 | 20983 | |
067d23c9 | 20984 | |
067d23c9 | 20985 | |
3e0be4ab | 20986 | GNULIB_TIME_R=1 |
067d23c9 | 20987 | |
067d23c9 | 20988 | |
067d23c9 | 20989 | |
067d23c9 | 20990 | |
067d23c9 | 20991 | |
067d23c9 | 20992 | |
067d23c9 | 20993 | |
067d23c9 | 20994 | |
067d23c9 | 20995 | |
067d23c9 | 20996 | |
067d23c9 | 20997 | |
3e0be4ab GM |
20998 | |
20999 | ||
21000 | ||
21001 | ||
21002 | ||
21003 | ||
21004 | ||
21005 | ||
21006 | if test $gl_cv_have_include_next = yes; then | |
21007 | gl_cv_next_unistd_h='<'unistd.h'>' | |
21008 | else | |
21009 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5 | |
21010 | $as_echo_n "checking absolute name of <unistd.h>... " >&6; } | |
21011 | if test "${gl_cv_next_unistd_h+set}" = set; then : | |
067d23c9 KY |
21012 | $as_echo_n "(cached) " >&6 |
21013 | else | |
067d23c9 | 21014 | |
3e0be4ab GM |
21015 | if test $ac_cv_header_unistd_h = yes; then |
21016 | ||
21017 | ||
21018 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
21019 | /* end confdefs.h. */ | |
21020 | #include <unistd.h> | |
067d23c9 | 21021 | |
067d23c9 | 21022 | _ACEOF |
3e0be4ab GM |
21023 | case "$host_os" in |
21024 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
21025 | *) gl_absname_cpp="$ac_cpp" ;; | |
21026 | esac | |
21027 | gl_cv_next_unistd_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
21028 | sed -n '\#/unistd.h#{ | |
21029 | s#.*"\(.*/unistd.h\)".*#\1# | |
21030 | s#^/[^/]#//&# | |
21031 | p | |
21032 | q | |
21033 | }'`'"' | |
21034 | else | |
21035 | gl_cv_next_unistd_h='<'unistd.h'>' | |
21036 | fi | |
067d23c9 | 21037 | |
067d23c9 | 21038 | |
067d23c9 | 21039 | fi |
3e0be4ab GM |
21040 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5 |
21041 | $as_echo "$gl_cv_next_unistd_h" >&6; } | |
21042 | fi | |
21043 | NEXT_UNISTD_H=$gl_cv_next_unistd_h | |
067d23c9 | 21044 | |
3e0be4ab GM |
21045 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then |
21046 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
21047 | gl_next_as_first_directive='<'unistd.h'>' | |
21048 | else | |
21049 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
21050 | gl_next_as_first_directive=$gl_cv_next_unistd_h | |
21051 | fi | |
21052 | NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive | |
067d23c9 | 21053 | |
067d23c9 | 21054 | |
067d23c9 | 21055 | |
067d23c9 | 21056 | |
3e0be4ab GM |
21057 | if test $ac_cv_header_unistd_h = yes; then |
21058 | HAVE_UNISTD_H=1 | |
21059 | else | |
21060 | HAVE_UNISTD_H=0 | |
21061 | fi | |
067d23c9 | 21062 | |
067d23c9 | 21063 | |
067d23c9 | 21064 | |
067d23c9 | 21065 | |
3e0be4ab GM |
21066 | gl_gnulib_enabled_dosname=false |
21067 | gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=false | |
21068 | gl_gnulib_enabled_sigprocmask=false | |
21069 | gl_gnulib_enabled_stat=false | |
21070 | gl_gnulib_enabled_strtoll=false | |
21071 | gl_gnulib_enabled_strtoull=false | |
21072 | gl_gnulib_enabled_verify=false | |
21073 | func_gl_gnulib_m4code_dosname () | |
21074 | { | |
21075 | if ! $gl_gnulib_enabled_dosname; then | |
21076 | gl_gnulib_enabled_dosname=true | |
21077 | fi | |
067d23c9 | 21078 | } |
3e0be4ab GM |
21079 | func_gl_gnulib_m4code_be453cec5eecf5731a274f2de7f2db36 () |
21080 | { | |
21081 | if ! $gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36; then | |
067d23c9 | 21082 | |
067d23c9 | 21083 | |
3e0be4ab GM |
21084 | gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=true |
21085 | fi | |
21086 | } | |
21087 | func_gl_gnulib_m4code_sigprocmask () | |
21088 | { | |
21089 | if ! $gl_gnulib_enabled_sigprocmask; then | |
21090 | ||
21091 | ||
21092 | ||
21093 | if test $gl_cv_type_sigset_t = yes; then | |
21094 | ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask" | |
21095 | if test "x$ac_cv_func_sigprocmask" = x""yes; then : | |
21096 | gl_cv_func_sigprocmask=1 | |
067d23c9 KY |
21097 | fi |
21098 | ||
3e0be4ab GM |
21099 | fi |
21100 | if test -z "$gl_cv_func_sigprocmask"; then | |
21101 | HAVE_POSIX_SIGNALBLOCKING=0 | |
21102 | fi | |
21103 | ||
21104 | if test $HAVE_POSIX_SIGNALBLOCKING = 0; then | |
21105 | ||
21106 | ||
067d23c9 | 21107 | |
067d23c9 | 21108 | |
067d23c9 | 21109 | |
067d23c9 | 21110 | |
067d23c9 | 21111 | |
067d23c9 | 21112 | |
3e0be4ab GM |
21113 | gl_LIBOBJS="$gl_LIBOBJS sigprocmask.$ac_objext" |
21114 | ||
21115 | : | |
067d23c9 KY |
21116 | fi |
21117 | ||
21118 | ||
3e0be4ab GM |
21119 | |
21120 | ||
21121 | ||
21122 | GNULIB_SIGPROCMASK=1 | |
21123 | ||
21124 | ||
21125 | ||
21126 | ||
21127 | ||
21128 | gl_gnulib_enabled_sigprocmask=true | |
21129 | fi | |
21130 | } | |
21131 | func_gl_gnulib_m4code_stat () | |
21132 | { | |
21133 | if ! $gl_gnulib_enabled_stat; then | |
21134 | ||
21135 | ||
21136 | ||
21137 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5 | |
21138 | $as_echo_n "checking whether stat handles trailing slashes on directories... " >&6; } | |
21139 | if test "${gl_cv_func_stat_dir_slash+set}" = set; then : | |
067d23c9 | 21140 | $as_echo_n "(cached) " >&6 |
3e0be4ab GM |
21141 | else |
21142 | if test "$cross_compiling" = yes; then : | |
21143 | case $host_os in | |
21144 | mingw*) gl_cv_func_stat_dir_slash="guessing no";; | |
21145 | *) gl_cv_func_stat_dir_slash="guessing yes";; | |
21146 | esac | |
067d23c9 KY |
21147 | else |
21148 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
21149 | /* end confdefs.h. */ | |
3e0be4ab GM |
21150 | #include <sys/stat.h> |
21151 | ||
067d23c9 KY |
21152 | int |
21153 | main () | |
21154 | { | |
3e0be4ab | 21155 | struct stat st; return stat (".", &st) != stat ("./", &st); |
067d23c9 KY |
21156 | ; |
21157 | return 0; | |
21158 | } | |
21159 | _ACEOF | |
3e0be4ab GM |
21160 | if ac_fn_c_try_run "$LINENO"; then : |
21161 | gl_cv_func_stat_dir_slash=yes | |
067d23c9 | 21162 | else |
3e0be4ab | 21163 | gl_cv_func_stat_dir_slash=no |
067d23c9 | 21164 | fi |
3e0be4ab GM |
21165 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
21166 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
067d23c9 | 21167 | fi |
067d23c9 KY |
21168 | |
21169 | fi | |
3e0be4ab GM |
21170 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5 |
21171 | $as_echo "$gl_cv_func_stat_dir_slash" >&6; } | |
21172 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5 | |
21173 | $as_echo_n "checking whether stat handles trailing slashes on files... " >&6; } | |
21174 | if test "${gl_cv_func_stat_file_slash+set}" = set; then : | |
067d23c9 | 21175 | $as_echo_n "(cached) " >&6 |
3e0be4ab GM |
21176 | else |
21177 | touch conftest.tmp | |
21178 | # Assume that if we have lstat, we can also check symlinks. | |
21179 | if test $ac_cv_func_lstat = yes; then | |
21180 | ln -s conftest.tmp conftest.lnk | |
21181 | fi | |
21182 | if test "$cross_compiling" = yes; then : | |
21183 | gl_cv_func_stat_file_slash="guessing no" | |
067d23c9 KY |
21184 | else |
21185 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
21186 | /* end confdefs.h. */ | |
3e0be4ab GM |
21187 | #include <sys/stat.h> |
21188 | ||
067d23c9 KY |
21189 | int |
21190 | main () | |
21191 | { | |
3e0be4ab GM |
21192 | int result = 0; |
21193 | struct stat st; | |
21194 | if (!stat ("conftest.tmp/", &st)) | |
21195 | result |= 1; | |
21196 | #if HAVE_LSTAT | |
21197 | if (!stat ("conftest.lnk/", &st)) | |
21198 | result |= 2; | |
21199 | #endif | |
21200 | return result; | |
21201 | ||
067d23c9 KY |
21202 | ; |
21203 | return 0; | |
21204 | } | |
21205 | _ACEOF | |
3e0be4ab GM |
21206 | if ac_fn_c_try_run "$LINENO"; then : |
21207 | gl_cv_func_stat_file_slash=yes | |
067d23c9 | 21208 | else |
3e0be4ab | 21209 | gl_cv_func_stat_file_slash=no |
067d23c9 | 21210 | fi |
3e0be4ab GM |
21211 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
21212 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
067d23c9 | 21213 | fi |
067d23c9 | 21214 | |
3e0be4ab GM |
21215 | rm -f conftest.tmp conftest.lnk |
21216 | fi | |
21217 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5 | |
21218 | $as_echo "$gl_cv_func_stat_file_slash" >&6; } | |
21219 | case $gl_cv_func_stat_dir_slash in | |
21220 | *no) REPLACE_STAT=1 | |
067d23c9 | 21221 | |
3e0be4ab GM |
21222 | $as_echo "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h |
21223 | ;; | |
21224 | esac | |
21225 | case $gl_cv_func_stat_file_slash in | |
21226 | *no) REPLACE_STAT=1 | |
067d23c9 | 21227 | |
3e0be4ab GM |
21228 | $as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h |
21229 | ;; | |
21230 | esac | |
067d23c9 | 21231 | |
3e0be4ab | 21232 | if test $REPLACE_STAT = 1; then |
067d23c9 | 21233 | |
067d23c9 | 21234 | |
067d23c9 | 21235 | |
067d23c9 | 21236 | |
067d23c9 KY |
21237 | |
21238 | ||
21239 | ||
067d23c9 | 21240 | |
3e0be4ab | 21241 | gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext" |
067d23c9 | 21242 | |
067d23c9 | 21243 | |
3e0be4ab GM |
21244 | |
21245 | : | |
21246 | ||
21247 | fi | |
067d23c9 KY |
21248 | |
21249 | ||
067d23c9 KY |
21250 | |
21251 | ||
21252 | ||
3e0be4ab | 21253 | GNULIB_STAT=1 |
067d23c9 KY |
21254 | |
21255 | ||
21256 | ||
21257 | ||
21258 | ||
3e0be4ab GM |
21259 | gl_gnulib_enabled_stat=true |
21260 | if $condition; then | |
21261 | func_gl_gnulib_m4code_dosname | |
21262 | fi | |
21263 | if $condition; then | |
21264 | func_gl_gnulib_m4code_verify | |
21265 | fi | |
21266 | fi | |
21267 | } | |
21268 | func_gl_gnulib_m4code_strtoll () | |
21269 | { | |
21270 | if ! $gl_gnulib_enabled_strtoll; then | |
067d23c9 KY |
21271 | |
21272 | ||
21273 | ||
3e0be4ab GM |
21274 | if test "$ac_cv_type_long_long_int" = yes; then |
21275 | for ac_func in strtoll | |
21276 | do : | |
21277 | ac_fn_c_check_func "$LINENO" "strtoll" "ac_cv_func_strtoll" | |
21278 | if test "x$ac_cv_func_strtoll" = x""yes; then : | |
21279 | cat >>confdefs.h <<_ACEOF | |
21280 | #define HAVE_STRTOLL 1 | |
21281 | _ACEOF | |
067d23c9 | 21282 | |
3e0be4ab GM |
21283 | fi |
21284 | done | |
067d23c9 | 21285 | |
3e0be4ab GM |
21286 | if test $ac_cv_func_strtoll = no; then |
21287 | HAVE_STRTOLL=0 | |
21288 | fi | |
21289 | fi | |
067d23c9 | 21290 | |
3e0be4ab | 21291 | if test $HAVE_STRTOLL = 0; then |
067d23c9 KY |
21292 | |
21293 | ||
21294 | ||
21295 | ||
21296 | ||
21297 | ||
067d23c9 KY |
21298 | |
21299 | ||
3e0be4ab | 21300 | gl_LIBOBJS="$gl_LIBOBJS strtoll.$ac_objext" |
067d23c9 KY |
21301 | |
21302 | ||
3e0be4ab | 21303 | : |
067d23c9 | 21304 | |
d6a003a8 | 21305 | fi |
067d23c9 KY |
21306 | |
21307 | ||
21308 | ||
21309 | ||
21310 | ||
3e0be4ab | 21311 | GNULIB_STRTOLL=1 |
067d23c9 KY |
21312 | |
21313 | ||
21314 | ||
21315 | ||
21316 | ||
3e0be4ab GM |
21317 | gl_gnulib_enabled_strtoll=true |
21318 | fi | |
21319 | } | |
21320 | func_gl_gnulib_m4code_strtoull () | |
21321 | { | |
21322 | if ! $gl_gnulib_enabled_strtoull; then | |
067d23c9 | 21323 | |
067d23c9 KY |
21324 | |
21325 | ||
3e0be4ab GM |
21326 | if test "$ac_cv_type_unsigned_long_long_int" = yes; then |
21327 | for ac_func in strtoull | |
21328 | do : | |
21329 | ac_fn_c_check_func "$LINENO" "strtoull" "ac_cv_func_strtoull" | |
21330 | if test "x$ac_cv_func_strtoull" = x""yes; then : | |
21331 | cat >>confdefs.h <<_ACEOF | |
21332 | #define HAVE_STRTOULL 1 | |
067d23c9 KY |
21333 | _ACEOF |
21334 | ||
d6a003a8 | 21335 | fi |
3e0be4ab | 21336 | done |
067d23c9 | 21337 | |
3e0be4ab GM |
21338 | if test $ac_cv_func_strtoull = no; then |
21339 | HAVE_STRTOULL=0 | |
21340 | fi | |
21341 | fi | |
067d23c9 | 21342 | |
3e0be4ab | 21343 | if test $HAVE_STRTOULL = 0; then |
067d23c9 | 21344 | |
067d23c9 | 21345 | |
067d23c9 | 21346 | |
067d23c9 | 21347 | |
067d23c9 KY |
21348 | |
21349 | ||
21350 | ||
21351 | ||
3e0be4ab | 21352 | gl_LIBOBJS="$gl_LIBOBJS strtoull.$ac_objext" |
067d23c9 | 21353 | |
067d23c9 | 21354 | |
3e0be4ab | 21355 | : |
067d23c9 | 21356 | |
3e0be4ab | 21357 | fi |
067d23c9 | 21358 | |
067d23c9 | 21359 | |
067d23c9 | 21360 | |
067d23c9 | 21361 | |
067d23c9 | 21362 | |
3e0be4ab | 21363 | GNULIB_STRTOULL=1 |
067d23c9 KY |
21364 | |
21365 | ||
067d23c9 KY |
21366 | |
21367 | ||
3e0be4ab GM |
21368 | |
21369 | gl_gnulib_enabled_strtoull=true | |
21370 | fi | |
21371 | } | |
21372 | func_gl_gnulib_m4code_verify () | |
21373 | { | |
21374 | if ! $gl_gnulib_enabled_verify; then | |
21375 | gl_gnulib_enabled_verify=true | |
21376 | fi | |
21377 | } | |
21378 | if test $REPLACE_GETOPT = 1; then | |
21379 | func_gl_gnulib_m4code_be453cec5eecf5731a274f2de7f2db36 | |
21380 | fi | |
21381 | if test $REPLACE_LSTAT = 1; then | |
21382 | func_gl_gnulib_m4code_dosname | |
21383 | fi | |
21384 | if test $REPLACE_LSTAT = 1; then | |
21385 | func_gl_gnulib_m4code_stat | |
21386 | fi | |
21387 | if test $HAVE_PTHREAD_SIGMASK = 0 || test $REPLACE_PTHREAD_SIGMASK = 1; then | |
21388 | func_gl_gnulib_m4code_sigprocmask | |
21389 | fi | |
21390 | if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then | |
21391 | func_gl_gnulib_m4code_stat | |
21392 | fi | |
21393 | if test "$ac_cv_have_decl_strtoimax" != yes && test $ac_cv_func_strtoimax = no; then | |
21394 | func_gl_gnulib_m4code_verify | |
21395 | fi | |
21396 | if test "$ac_cv_have_decl_strtoimax" != yes && test $ac_cv_func_strtoimax = no && test $ac_cv_type_long_long_int = yes; then | |
21397 | func_gl_gnulib_m4code_strtoll | |
21398 | fi | |
21399 | if test "$ac_cv_have_decl_strtoumax" != yes && test $ac_cv_func_strtoumax = no; then | |
21400 | func_gl_gnulib_m4code_verify | |
21401 | fi | |
21402 | if test "$ac_cv_have_decl_strtoumax" != yes && test $ac_cv_func_strtoumax = no && test $ac_cv_type_unsigned_long_long_int = yes; then | |
21403 | func_gl_gnulib_m4code_strtoull | |
21404 | fi | |
21405 | ||
21406 | if $gl_gnulib_enabled_dosname; then | |
21407 | gl_GNULIB_ENABLED_dosname_TRUE= | |
21408 | gl_GNULIB_ENABLED_dosname_FALSE='#' | |
067d23c9 | 21409 | else |
3e0be4ab GM |
21410 | gl_GNULIB_ENABLED_dosname_TRUE='#' |
21411 | gl_GNULIB_ENABLED_dosname_FALSE= | |
067d23c9 KY |
21412 | fi |
21413 | ||
3e0be4ab GM |
21414 | if $gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36; then |
21415 | gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE= | |
21416 | gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE='#' | |
21417 | else | |
21418 | gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE='#' | |
21419 | gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE= | |
21420 | fi | |
067d23c9 | 21421 | |
3e0be4ab GM |
21422 | if $gl_gnulib_enabled_sigprocmask; then |
21423 | gl_GNULIB_ENABLED_sigprocmask_TRUE= | |
21424 | gl_GNULIB_ENABLED_sigprocmask_FALSE='#' | |
21425 | else | |
21426 | gl_GNULIB_ENABLED_sigprocmask_TRUE='#' | |
21427 | gl_GNULIB_ENABLED_sigprocmask_FALSE= | |
21428 | fi | |
067d23c9 | 21429 | |
3e0be4ab GM |
21430 | if $gl_gnulib_enabled_stat; then |
21431 | gl_GNULIB_ENABLED_stat_TRUE= | |
21432 | gl_GNULIB_ENABLED_stat_FALSE='#' | |
21433 | else | |
21434 | gl_GNULIB_ENABLED_stat_TRUE='#' | |
21435 | gl_GNULIB_ENABLED_stat_FALSE= | |
21436 | fi | |
067d23c9 | 21437 | |
3e0be4ab GM |
21438 | if $gl_gnulib_enabled_strtoll; then |
21439 | gl_GNULIB_ENABLED_strtoll_TRUE= | |
21440 | gl_GNULIB_ENABLED_strtoll_FALSE='#' | |
21441 | else | |
21442 | gl_GNULIB_ENABLED_strtoll_TRUE='#' | |
21443 | gl_GNULIB_ENABLED_strtoll_FALSE= | |
21444 | fi | |
067d23c9 | 21445 | |
3e0be4ab GM |
21446 | if $gl_gnulib_enabled_strtoull; then |
21447 | gl_GNULIB_ENABLED_strtoull_TRUE= | |
21448 | gl_GNULIB_ENABLED_strtoull_FALSE='#' | |
067d23c9 | 21449 | else |
3e0be4ab GM |
21450 | gl_GNULIB_ENABLED_strtoull_TRUE='#' |
21451 | gl_GNULIB_ENABLED_strtoull_FALSE= | |
067d23c9 KY |
21452 | fi |
21453 | ||
3e0be4ab GM |
21454 | if $gl_gnulib_enabled_verify; then |
21455 | gl_GNULIB_ENABLED_verify_TRUE= | |
21456 | gl_GNULIB_ENABLED_verify_FALSE='#' | |
21457 | else | |
21458 | gl_GNULIB_ENABLED_verify_TRUE='#' | |
21459 | gl_GNULIB_ENABLED_verify_FALSE= | |
067d23c9 KY |
21460 | fi |
21461 | ||
3e0be4ab | 21462 | # End of code from modules |
067d23c9 KY |
21463 | |
21464 | ||
21465 | ||
21466 | ||
21467 | ||
21468 | ||
067d23c9 | 21469 | |
067d23c9 | 21470 | |
067d23c9 | 21471 | |
3e0be4ab GM |
21472 | gltests_libdeps= |
21473 | gltests_ltlibdeps= | |
067d23c9 | 21474 | |
067d23c9 | 21475 | |
067d23c9 | 21476 | |
067d23c9 | 21477 | |
067d23c9 KY |
21478 | |
21479 | ||
067d23c9 KY |
21480 | |
21481 | ||
3e0be4ab GM |
21482 | |
21483 | gl_source_base='tests' | |
21484 | 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 | |
21485 | ||
21486 | gl_module_indicator_condition=$gltests_WITNESS | |
21487 | ||
21488 | ||
21489 | ||
21490 | ||
21491 | ||
21492 | ||
21493 | ||
067d23c9 KY |
21494 | |
21495 | ||
21496 | ||
3e0be4ab GM |
21497 | LIBGNU_LIBDEPS="$gl_libdeps" |
21498 | ||
21499 | LIBGNU_LTLIBDEPS="$gl_ltlibdeps" | |
21500 | ||
067d23c9 KY |
21501 | |
21502 | ||
21503 | case "$opsys" in | |
21504 | aix4-2) LD_SWITCH_SYSTEM_TEMACS="-Wl,-bnodelcsect" ;; | |
21505 | ||
21506 | darwin) | |
21507 | ## The -headerpad option tells ld (see man page) to leave room at the | |
21508 | ## end of the header for adding load commands. Needed for dumping. | |
21509 | ## 0x690 is the total size of 30 segment load commands (at 56 | |
21510 | ## each); under Cocoa 31 commands are required. | |
21511 | if test "$HAVE_NS" = "yes"; then | |
21512 | libs_nsgui="-framework AppKit" | |
21513 | headerpad_extra=6C8 | |
21514 | else | |
21515 | libs_nsgui= | |
21516 | headerpad_extra=690 | |
21517 | fi | |
85cf5029 | 21518 | LD_SWITCH_SYSTEM_TEMACS="-fno-pie -prebind $libs_nsgui -Xlinker -headerpad -Xlinker $headerpad_extra" |
067d23c9 KY |
21519 | |
21520 | ## This is here because src/Makefile.in did some extra fiddling around | |
21521 | ## with LD_SWITCH_SYSTEM. The cpp logic was: | |
21522 | ## #ifndef LD_SWITCH_SYSTEM | |
21523 | ## #if !defined (__GNUC__) && ((defined (BSD_SYSTEM) && !defined (COFF))) | |
21524 | ## Since all the *bsds define LD_SWITCH_SYSTEM, this simplifies to: | |
21525 | ## not using gcc, darwin system not on an alpha (ie darwin, since | |
21526 | ## darwin + alpha does not occur). | |
21527 | ## Because this was done in src/Makefile.in, the resulting part of | |
21528 | ## LD_SWITCH_SYSTEM was not used in configure (ie, in ac_link). | |
21529 | ## It therefore seems cleaner to put this in LD_SWITCH_SYSTEM_TEMACS, | |
21530 | ## rather than LD_SWITCH_SYSTEM. | |
21531 | test "x$LD_SWITCH_SYSTEM" = "x" && test "x$GCC" != "xyes" && \ | |
21532 | LD_SWITCH_SYSTEM_TEMACS="-X $LD_SWITCH_SYSTEM_TEMACS" | |
21533 | ;; | |
21534 | ||
21535 | ## LD_SWITCH_X_SITE_AUX is a -R option saying where to find X at run-time. | |
21536 | ## When handled by cpp, this was in LD_SWITCH_SYSTEM. However, at | |
21537 | ## the point where configure sourced the s/*.h file, LD_SWITCH_X_SITE_AUX | |
21538 | ## had not yet been defined and was expanded to null. Hence LD_SWITCH_SYSTEM | |
21539 | ## had different values in configure (in ac_link) and src/Makefile.in. | |
21540 | ## It seems clearer therefore to put this piece in LD_SWITCH_SYSTEM_TEMACS. | |
21541 | gnu-linux) LD_SWITCH_SYSTEM_TEMACS="\$(LD_SWITCH_X_SITE_AUX)" ;; | |
21542 | ||
21543 | *) LD_SWITCH_SYSTEM_TEMACS= ;; | |
21544 | esac | |
21545 | ||
21546 | if test "$NS_IMPL_GNUSTEP" = "yes"; then | |
21547 | LD_SWITCH_SYSTEM_TEMACS="${LD_SWITCH_SYSTEM_TEMACS} -L${GNUSTEP_SYSTEM_LIBRARIES} ${GNUSTEP_LOCAL_LIBRARIES} -lgnustep-gui -lgnustep-base -lobjc -lpthread" | |
21548 | fi | |
21549 | ||
21550 | ||
21551 | ||
21552 | ||
21553 | LD_FIRSTFLAG= | |
21554 | ORDINARY_LINK= | |
21555 | case "$opsys" in | |
21556 | ## gnu: GNU needs its own crt0. | |
21557 | aix4-2|cygwin|darwin|gnu|hpux*|irix6-5|sol2*|unixware) ORDINARY_LINK=yes ;; | |
21558 | ||
21559 | ## On post 1.3 releases of NetBSD, gcc -nostdlib also clears the | |
21560 | ## library search parth, i.e. it won't search /usr/lib for libc and | |
21561 | ## friends. Using -nostartfiles instead avoids this problem, and | |
21562 | ## will also work on earlier NetBSD releases. | |
21563 | netbsd|openbsd) LD_FIRSTFLAG="-nostartfiles" ;; | |
21564 | ||
21565 | ## macpcc: NAKAJI Hiroyuki <nakaji@tutrp.tut.ac.jp> says | |
21566 | ## MkLinux/LinuxPPC needs this. | |
21567 | ## ibms390x only supports opsys = gnu-linux so it can be added here. | |
21568 | gnu-*) | |
21569 | case "$machine" in | |
21570 | macppc|ibms390x) LD_FIRSTFLAG="-nostdlib" ;; | |
21571 | esac | |
21572 | ;; | |
21573 | esac | |
21574 | ||
21575 | ||
21576 | if test "x$ORDINARY_LINK" = "xyes"; then | |
21577 | ||
21578 | LD_FIRSTFLAG="" | |
21579 | ||
21580 | $as_echo "#define ORDINARY_LINK 1" >>confdefs.h | |
21581 | ||
21582 | ||
21583 | ## The system files defining neither ORDINARY_LINK nor LD_FIRSTFLAG are: | |
21584 | ## freebsd, gnu-* not on macppc|ibms390x. | |
21585 | elif test "x$GCC" = "xyes" && test "x$LD_FIRSTFLAG" = "x"; then | |
21586 | ||
21587 | ## Versions of GCC >= 2.0 put their library, libgcc.a, in obscure | |
21588 | ## places that are difficult to figure out at make time. Fortunately, | |
21589 | ## these same versions allow you to pass arbitrary flags on to the | |
21590 | ## linker, so there is no reason not to use it as a linker. | |
21591 | ## | |
21592 | ## Well, it is not quite perfect. The "-nostdlib" keeps GCC from | |
21593 | ## searching for libraries in its internal directories, so we have to | |
21594 | ## ask GCC explicitly where to find libgcc.a (LIB_GCC below). | |
21595 | LD_FIRSTFLAG="-nostdlib" | |
21596 | fi | |
21597 | ||
21598 | ## FIXME? What setting of EDIT_LDFLAGS should this have? | |
21599 | test "$NS_IMPL_GNUSTEP" = "yes" && LD_FIRSTFLAG="-rdynamic" | |
21600 | ||
21601 | ||
21602 | ||
21603 | ||
21604 | ## FIXME? The logic here is not precisely the same as that above. | |
21605 | ## There is no check here for a pre-defined LD_FIRSTFLAG. | |
21606 | ## Should we only be setting LIB_GCC if LD ~ -nostdlib? | |
21607 | LIB_GCC= | |
21608 | if test "x$GCC" = "xyes" && test "x$ORDINARY_LINK" != "xyes"; then | |
21609 | ||
21610 | case "$opsys" in | |
21611 | freebsd|netbsd|openbsd) LIB_GCC= ;; | |
21612 | ||
21613 | gnu-*) | |
21614 | ## armin76@gentoo.org reported that the lgcc_s flag is necessary to | |
21615 | ## build on ARM EABI under GNU/Linux. (Bug#5518) | |
d6a003a8 AS |
21616 | case $host_cpu in |
21617 | arm*) | |
067d23c9 | 21618 | LIB_GCC="-lgcc_s" |
d6a003a8 AS |
21619 | ;; |
21620 | *) | |
067d23c9 KY |
21621 | ## FIXME? s/gnu-linux.h used to define LIB_GCC as below, then |
21622 | ## immediately undefine it again and redefine it to empty. | |
21623 | ## Was the C_SWITCH_X_SITE part really necessary? | |
21624 | ## LIB_GCC=`$CC $C_SWITCH_X_SITE -print-libgcc-file-name` | |
21625 | LIB_GCC= | |
d6a003a8 AS |
21626 | ;; |
21627 | esac | |
067d23c9 KY |
21628 | ;; |
21629 | ||
21630 | ## Ask GCC where to find libgcc.a. | |
21631 | *) LIB_GCC=`$CC -print-libgcc-file-name 2> /dev/null` ;; | |
21632 | esac | |
21633 | fi | |
21634 | ||
21635 | ||
067d23c9 KY |
21636 | ## If we're using X11/GNUstep, define some consequences. |
21637 | if test "$HAVE_X_WINDOWS" = "yes" || test "$HAVE_NS" = "yes"; then | |
21638 | ||
21639 | $as_echo "#define HAVE_WINDOW_SYSTEM 1" >>confdefs.h | |
21640 | ||
21641 | ||
21642 | $as_echo "#define HAVE_MOUSE 1" >>confdefs.h | |
21643 | ||
067d23c9 KY |
21644 | fi |
21645 | ||
21646 | ||
21647 | ||
21648 | ||
067d23c9 KY |
21649 | #### Report on what we decided to do. |
21650 | #### Report GTK as a toolkit, even if it doesn't use Xt. | |
21651 | #### It makes printing result more understandable as using GTK sets | |
21652 | #### toolkit_scroll_bars to yes by default. | |
21653 | if test "${HAVE_GTK}" = "yes"; then | |
21654 | USE_X_TOOLKIT=GTK | |
21655 | fi | |
21656 | ||
2b7f50d8 AS |
21657 | and_machfile= |
21658 | if test -n "$machfile"; then | |
21659 | and_machfile=" and \`${machfile}'" | |
21660 | fi | |
21661 | ||
067d23c9 KY |
21662 | echo " |
21663 | Configured for \`${canonical}'. | |
21664 | ||
21665 | Where should the build process find the source code? ${srcdir} | |
21666 | What operating system and machine description files should Emacs use? | |
2b7f50d8 | 21667 | \`${opsysfile}'${and_machfile} |
067d23c9 KY |
21668 | What compiler should emacs be built with? ${CC} ${CFLAGS} |
21669 | Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason} | |
21670 | Should Emacs use a relocating allocator for buffers? ${REL_ALLOC} | |
21671 | Should Emacs use mmap(2) for buffer allocation? $use_mmap_for_buffers | |
21672 | What window system should Emacs use? ${window_system} | |
21673 | What toolkit should Emacs use? ${USE_X_TOOLKIT}" | |
21674 | ||
21675 | if test -n "${x_includes}"; then | |
21676 | echo " Where do we find X Windows header files? ${x_includes}" | |
21677 | else | |
21678 | echo " Where do we find X Windows header files? Standard dirs" | |
21679 | fi | |
21680 | if test -n "${x_libraries}"; then | |
21681 | echo " Where do we find X Windows libraries? ${x_libraries}" | |
21682 | else | |
21683 | echo " Where do we find X Windows libraries? Standard dirs" | |
21684 | fi | |
21685 | ||
21686 | echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}" | |
21687 | echo " Does Emacs use -lXpm? ${HAVE_XPM}" | |
21688 | echo " Does Emacs use -ljpeg? ${HAVE_JPEG}" | |
21689 | echo " Does Emacs use -ltiff? ${HAVE_TIFF}" | |
21690 | echo " Does Emacs use a gif library? ${HAVE_GIF} $LIBGIF" | |
21691 | echo " Does Emacs use -lpng? ${HAVE_PNG}" | |
21692 | echo " Does Emacs use -lrsvg-2? ${HAVE_RSVG}" | |
21693 | echo " Does Emacs use imagemagick? ${HAVE_IMAGEMAGICK}" | |
21694 | ||
21695 | echo " Does Emacs use -lgpm? ${HAVE_GPM}" | |
21696 | echo " Does Emacs use -ldbus? ${HAVE_DBUS}" | |
21697 | echo " Does Emacs use -lgconf? ${HAVE_GCONF}" | |
f527bd02 | 21698 | echo " Does Emacs use GSettings? ${HAVE_GSETTINGS}" |
067d23c9 | 21699 | echo " Does Emacs use -lselinux? ${HAVE_LIBSELINUX}" |
b8bd6c8d | 21700 | echo " Does Emacs use -lgnutls (2.6.x or higher)? ${HAVE_GNUTLS}" |
067d23c9 KY |
21701 | echo " Does Emacs use -lxml2? ${HAVE_LIBXML2}" |
21702 | ||
21703 | echo " Does Emacs use -lfreetype? ${HAVE_FREETYPE}" | |
21704 | echo " Does Emacs use -lm17n-flt? ${HAVE_M17N_FLT}" | |
21705 | echo " Does Emacs use -lotf? ${HAVE_LIBOTF}" | |
21706 | echo " Does Emacs use -lxft? ${HAVE_XFT}" | |
21707 | ||
21708 | echo " Does Emacs use toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}" | |
21709 | echo | |
21710 | ||
21711 | if test $USE_XASSERTS = yes; then | |
21712 | echo " Compiling with asserts turned on." | |
21713 | CPPFLAGS="$CPPFLAGS -DXASSERTS=1" | |
21714 | fi | |
21715 | ||
21716 | echo | |
21717 | ||
21718 | if test "$HAVE_NS" = "yes"; then | |
21719 | echo | |
21720 | echo "You must run \"make install\" in order to test the built application. | |
21721 | The installed application will go to nextstep/Emacs.app and can be | |
21722 | run or moved from there." | |
21723 | if test "$EN_NS_SELF_CONTAINED" = "yes"; then | |
21724 | echo "The application will be fully self-contained." | |
21725 | else | |
21726 | echo "The lisp resources for the application will be installed under ${prefix}. | |
21727 | You may need to run \"make install\" with sudo. The application will fail | |
21728 | to run if these resources are not installed." | |
21729 | fi | |
21730 | echo | |
21731 | fi | |
21732 | ||
21733 | ||
21734 | # Remove any trailing slashes in these variables. | |
21735 | test "${prefix}" != NONE && | |
21736 | prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'` | |
21737 | test "${exec_prefix}" != NONE && | |
21738 | exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'` | |
21739 | ||
56ade35c GM |
21740 | SUBDIR_MAKEFILES="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" |
21741 | ||
21742 | 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" | |
21743 | ||
a877df06 | 21744 | |
73b78882 | 21745 | opt_makefile=test/automated/Makefile |
a877df06 | 21746 | |
56ade35c | 21747 | if test -f $srcdir/${opt_makefile}.in; then |
73b78882 | 21748 | SUBDIR_MAKEFILES="$SUBDIR_MAKEFILES $opt_makefile" |
56ade35c | 21749 | ac_config_files="$ac_config_files test/automated/Makefile" |
a877df06 | 21750 | |
56ade35c | 21751 | fi |
73b78882 | 21752 | |
56ade35c | 21753 | SUBDIR_MAKEFILES_IN=`echo " ${SUBDIR_MAKEFILES}" | sed -e 's| | $(srcdir)/|g' -e 's|Makefile|Makefile.in|g'` |
73b78882 | 21754 | |
067d23c9 | 21755 | |
9411886d PE |
21756 | |
21757 | ac_config_commands="$ac_config_commands mkdirs" | |
21758 | ||
21759 | ||
21760 | ac_config_commands="$ac_config_commands epaths" | |
21761 | ||
21762 | ||
21763 | ac_config_commands="$ac_config_commands gdbinit" | |
21764 | ||
067d23c9 KY |
21765 | |
21766 | cat >confcache <<\_ACEOF | |
21767 | # This file is a shell script that caches the results of configure | |
21768 | # tests run on this system so they can be shared between configure | |
21769 | # scripts and configure runs, see configure's option --config-cache. | |
21770 | # It is not useful on other systems. If it contains results you don't | |
21771 | # want to keep, you may remove or edit it. | |
21772 | # | |
21773 | # config.status only pays attention to the cache file if you give it | |
21774 | # the --recheck option to rerun configure. | |
21775 | # | |
21776 | # `ac_cv_env_foo' variables (set or unset) will be overridden when | |
21777 | # loading this file, other *unset* `ac_cv_foo' will be assigned the | |
21778 | # following values. | |
21779 | ||
21780 | _ACEOF | |
21781 | ||
21782 | # The following way of writing the cache mishandles newlines in values, | |
21783 | # but we know of no workaround that is simple, portable, and efficient. | |
21784 | # So, we kill variables containing newlines. | |
21785 | # Ultrix sh set writes to stderr and can't be redirected directly, | |
21786 | # and sets the high bit in the cache file unless we assign to the vars. | |
21787 | ( | |
21788 | for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do | |
21789 | eval ac_val=\$$ac_var | |
21790 | case $ac_val in #( | |
21791 | *${as_nl}*) | |
21792 | case $ac_var in #( | |
21793 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
21794 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
21795 | esac | |
21796 | case $ac_var in #( | |
21797 | _ | IFS | as_nl) ;; #( | |
21798 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
21799 | *) { eval $ac_var=; unset $ac_var;} ;; | |
21800 | esac ;; | |
21801 | esac | |
21802 | done | |
21803 | ||
21804 | (set) 2>&1 | | |
21805 | case $as_nl`(ac_space=' '; set) 2>&1` in #( | |
21806 | *${as_nl}ac_space=\ *) | |
21807 | # `set' does not quote correctly, so add quotes: double-quote | |
21808 | # substitution turns \\\\ into \\, and sed turns \\ into \. | |
21809 | sed -n \ | |
21810 | "s/'/'\\\\''/g; | |
21811 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" | |
21812 | ;; #( | |
21813 | *) | |
21814 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
21815 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" | |
21816 | ;; | |
21817 | esac | | |
21818 | sort | |
21819 | ) | | |
21820 | sed ' | |
21821 | /^ac_cv_env_/b end | |
21822 | t clear | |
21823 | :clear | |
21824 | s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ | |
21825 | t end | |
21826 | s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ | |
21827 | :end' >>confcache | |
21828 | if diff "$cache_file" confcache >/dev/null 2>&1; then :; else | |
21829 | if test -w "$cache_file"; then | |
5f64f7bd | 21830 | test "x$cache_file" != "x/dev/null" && |
067d23c9 KY |
21831 | { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 |
21832 | $as_echo "$as_me: updating cache $cache_file" >&6;} | |
5f64f7bd | 21833 | cat confcache >$cache_file |
067d23c9 KY |
21834 | else |
21835 | { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 | |
21836 | $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} | |
21837 | fi | |
21838 | fi | |
21839 | rm -f confcache | |
21840 | ||
21841 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
21842 | # Let make expand exec_prefix. | |
21843 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
21844 | ||
21845 | DEFS=-DHAVE_CONFIG_H | |
21846 | ||
21847 | ac_libobjs= | |
21848 | ac_ltlibobjs= | |
21849 | for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue | |
21850 | # 1. Remove the extension, and $U if already installed. | |
21851 | ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' | |
21852 | ac_i=`$as_echo "$ac_i" | sed "$ac_script"` | |
21853 | # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR | |
21854 | # will be set to the directory where LIBOBJS objects are built. | |
21855 | as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" | |
21856 | as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' | |
21857 | done | |
21858 | LIBOBJS=$ac_libobjs | |
21859 | ||
21860 | LTLIBOBJS=$ac_ltlibobjs | |
21861 | ||
21862 | ||
743c80a7 PE |
21863 | if test -n "$EXEEXT"; then |
21864 | am__EXEEXT_TRUE= | |
21865 | am__EXEEXT_FALSE='#' | |
21866 | else | |
21867 | am__EXEEXT_TRUE='#' | |
21868 | am__EXEEXT_FALSE= | |
21869 | fi | |
21870 | ||
21871 | if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then | |
5f64f7bd | 21872 | as_fn_error "conditional \"AMDEP\" was never defined. |
743c80a7 PE |
21873 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
21874 | fi | |
21875 | if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then | |
5f64f7bd | 21876 | as_fn_error "conditional \"am__fastdepCC\" was never defined. |
743c80a7 PE |
21877 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
21878 | fi | |
21879 | ||
21880 | if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then | |
5f64f7bd | 21881 | as_fn_error "conditional \"GL_COND_LIBTOOL\" was never defined. |
743c80a7 PE |
21882 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
21883 | fi | |
4fc2b746 GM |
21884 | if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then |
21885 | as_fn_error "conditional \"GL_GENERATE_ALLOCA_H\" was never defined. | |
21886 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
21887 | fi | |
743c80a7 | 21888 | |
4fda9c95 GM |
21889 | if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then |
21890 | as_fn_error "conditional \"GL_GENERATE_STDINT_H\" was never defined. | |
21891 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
21892 | fi | |
6d153f56 GM |
21893 | if test -z "${GL_GENERATE_STDARG_H_TRUE}" && test -z "${GL_GENERATE_STDARG_H_FALSE}"; then |
21894 | as_fn_error "conditional \"GL_GENERATE_STDARG_H\" was never defined. | |
21895 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
21896 | fi | |
6c051bab | 21897 | if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then |
5f64f7bd | 21898 | as_fn_error "conditional \"GL_GENERATE_STDBOOL_H\" was never defined. |
6c051bab GM |
21899 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
21900 | fi | |
21901 | if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then | |
5f64f7bd | 21902 | as_fn_error "conditional \"GL_GENERATE_STDDEF_H\" was never defined. |
6c051bab GM |
21903 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
21904 | fi | |
6d153f56 GM |
21905 | if test -z "${gl_GNULIB_ENABLED_dosname_TRUE}" && test -z "${gl_GNULIB_ENABLED_dosname_FALSE}"; then |
21906 | as_fn_error "conditional \"gl_GNULIB_ENABLED_dosname\" was never defined. | |
21907 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
21908 | fi | |
21909 | if test -z "${gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE}" && test -z "${gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE}"; then | |
21910 | as_fn_error "conditional \"gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36\" was never defined. | |
21911 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
21912 | fi | |
3e0be4ab GM |
21913 | if test -z "${gl_GNULIB_ENABLED_sigprocmask_TRUE}" && test -z "${gl_GNULIB_ENABLED_sigprocmask_FALSE}"; then |
21914 | as_fn_error "conditional \"gl_GNULIB_ENABLED_sigprocmask\" was never defined. | |
21915 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
21916 | fi | |
6d153f56 GM |
21917 | if test -z "${gl_GNULIB_ENABLED_stat_TRUE}" && test -z "${gl_GNULIB_ENABLED_stat_FALSE}"; then |
21918 | as_fn_error "conditional \"gl_GNULIB_ENABLED_stat\" was never defined. | |
21919 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
21920 | fi | |
3e0be4ab GM |
21921 | if test -z "${gl_GNULIB_ENABLED_strtoll_TRUE}" && test -z "${gl_GNULIB_ENABLED_strtoll_FALSE}"; then |
21922 | as_fn_error "conditional \"gl_GNULIB_ENABLED_strtoll\" was never defined. | |
21923 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
21924 | fi | |
6d153f56 GM |
21925 | if test -z "${gl_GNULIB_ENABLED_strtoull_TRUE}" && test -z "${gl_GNULIB_ENABLED_strtoull_FALSE}"; then |
21926 | as_fn_error "conditional \"gl_GNULIB_ENABLED_strtoull\" was never defined. | |
21927 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
21928 | fi | |
21929 | if test -z "${gl_GNULIB_ENABLED_verify_TRUE}" && test -z "${gl_GNULIB_ENABLED_verify_FALSE}"; then | |
21930 | as_fn_error "conditional \"gl_GNULIB_ENABLED_verify\" was never defined. | |
21931 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
6c051bab | 21932 | fi |
942f733f | 21933 | |
743c80a7 PE |
21934 | gl_libobjs= |
21935 | gl_ltlibobjs= | |
21936 | if test -n "$gl_LIBOBJS"; then | |
21937 | # Remove the extension. | |
21938 | sed_drop_objext='s/\.o$//;s/\.obj$//' | |
21939 | for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do | |
21940 | gl_libobjs="$gl_libobjs $i.$ac_objext" | |
21941 | gl_ltlibobjs="$gl_ltlibobjs $i.lo" | |
21942 | done | |
21943 | fi | |
21944 | gl_LIBOBJS=$gl_libobjs | |
21945 | ||
21946 | gl_LTLIBOBJS=$gl_ltlibobjs | |
21947 | ||
21948 | ||
21949 | ||
21950 | gltests_libobjs= | |
21951 | gltests_ltlibobjs= | |
21952 | if test -n "$gltests_LIBOBJS"; then | |
21953 | # Remove the extension. | |
21954 | sed_drop_objext='s/\.o$//;s/\.obj$//' | |
21955 | for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do | |
21956 | gltests_libobjs="$gltests_libobjs $i.$ac_objext" | |
21957 | gltests_ltlibobjs="$gltests_ltlibobjs $i.lo" | |
21958 | done | |
21959 | fi | |
21960 | gltests_LIBOBJS=$gltests_libobjs | |
21961 | ||
21962 | gltests_LTLIBOBJS=$gltests_ltlibobjs | |
21963 | ||
067d23c9 KY |
21964 | |
21965 | ||
5f64f7bd | 21966 | : ${CONFIG_STATUS=./config.status} |
067d23c9 KY |
21967 | ac_write_fail=0 |
21968 | ac_clean_files_save=$ac_clean_files | |
21969 | ac_clean_files="$ac_clean_files $CONFIG_STATUS" | |
21970 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 | |
21971 | $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} | |
21972 | as_write_fail=0 | |
21973 | cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 | |
21974 | #! $SHELL | |
21975 | # Generated by $as_me. | |
21976 | # Run this file to recreate the current configuration. | |
21977 | # Compiler output produced by configure, useful for debugging | |
21978 | # configure, is in config.log if it exists. | |
21979 | ||
21980 | debug=false | |
21981 | ac_cs_recheck=false | |
21982 | ac_cs_silent=false | |
21983 | ||
21984 | SHELL=\${CONFIG_SHELL-$SHELL} | |
21985 | export SHELL | |
21986 | _ASEOF | |
21987 | cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 | |
21988 | ## -------------------- ## | |
21989 | ## M4sh Initialization. ## | |
21990 | ## -------------------- ## | |
21991 | ||
21992 | # Be more Bourne compatible | |
21993 | DUALCASE=1; export DUALCASE # for MKS sh | |
21994 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : | |
21995 | emulate sh | |
21996 | NULLCMD=: | |
21997 | # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which | |
21998 | # is contrary to our usage. Disable this feature. | |
21999 | alias -g '${1+"$@"}'='"$@"' | |
22000 | setopt NO_GLOB_SUBST | |
22001 | else | |
22002 | case `(set -o) 2>/dev/null` in #( | |
22003 | *posix*) : | |
22004 | set -o posix ;; #( | |
22005 | *) : | |
22006 | ;; | |
22007 | esac | |
22008 | fi | |
22009 | ||
22010 | ||
22011 | as_nl=' | |
22012 | ' | |
22013 | export as_nl | |
22014 | # Printing a long string crashes Solaris 7 /usr/bin/printf. | |
22015 | as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' | |
22016 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo | |
22017 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo | |
22018 | # Prefer a ksh shell builtin over an external printf program on Solaris, | |
22019 | # but without wasting forks for bash or zsh. | |
22020 | if test -z "$BASH_VERSION$ZSH_VERSION" \ | |
22021 | && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then | |
22022 | as_echo='print -r --' | |
22023 | as_echo_n='print -rn --' | |
22024 | elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then | |
22025 | as_echo='printf %s\n' | |
22026 | as_echo_n='printf %s' | |
22027 | else | |
22028 | if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then | |
22029 | as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' | |
22030 | as_echo_n='/usr/ucb/echo -n' | |
22031 | else | |
22032 | as_echo_body='eval expr "X$1" : "X\\(.*\\)"' | |
22033 | as_echo_n_body='eval | |
22034 | arg=$1; | |
22035 | case $arg in #( | |
22036 | *"$as_nl"*) | |
22037 | expr "X$arg" : "X\\(.*\\)$as_nl"; | |
22038 | arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; | |
22039 | esac; | |
22040 | expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" | |
22041 | ' | |
22042 | export as_echo_n_body | |
22043 | as_echo_n='sh -c $as_echo_n_body as_echo' | |
22044 | fi | |
22045 | export as_echo_body | |
22046 | as_echo='sh -c $as_echo_body as_echo' | |
22047 | fi | |
22048 | ||
22049 | # The user is always right. | |
22050 | if test "${PATH_SEPARATOR+set}" != set; then | |
22051 | PATH_SEPARATOR=: | |
22052 | (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { | |
22053 | (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || | |
22054 | PATH_SEPARATOR=';' | |
22055 | } | |
22056 | fi | |
22057 | ||
22058 | ||
22059 | # IFS | |
22060 | # We need space, tab and new line, in precisely that order. Quoting is | |
22061 | # there to prevent editors from complaining about space-tab. | |
22062 | # (If _AS_PATH_WALK were called with IFS unset, it would disable word | |
22063 | # splitting by setting IFS to empty value.) | |
22064 | IFS=" "" $as_nl" | |
22065 | ||
22066 | # Find who we are. Look in the path if we contain no directory separator. | |
22067 | case $0 in #(( | |
22068 | *[\\/]* ) as_myself=$0 ;; | |
22069 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
22070 | for as_dir in $PATH | |
22071 | do | |
22072 | IFS=$as_save_IFS | |
22073 | test -z "$as_dir" && as_dir=. | |
22074 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | |
22075 | done | |
22076 | IFS=$as_save_IFS | |
22077 | ||
22078 | ;; | |
22079 | esac | |
22080 | # We did not find ourselves, most probably we were run as `sh COMMAND' | |
22081 | # in which case we are not to be found in the path. | |
22082 | if test "x$as_myself" = x; then | |
22083 | as_myself=$0 | |
22084 | fi | |
22085 | if test ! -f "$as_myself"; then | |
22086 | $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 | |
22087 | exit 1 | |
22088 | fi | |
22089 | ||
22090 | # Unset variables that we do not need and which cause bugs (e.g. in | |
22091 | # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" | |
22092 | # suppresses any "Segmentation fault" message there. '((' could | |
22093 | # trigger a bug in pdksh 5.2.14. | |
22094 | for as_var in BASH_ENV ENV MAIL MAILPATH | |
22095 | do eval test x\${$as_var+set} = xset \ | |
22096 | && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : | |
22097 | done | |
22098 | PS1='$ ' | |
22099 | PS2='> ' | |
22100 | PS4='+ ' | |
22101 | ||
22102 | # NLS nuisances. | |
22103 | LC_ALL=C | |
22104 | export LC_ALL | |
22105 | LANGUAGE=C | |
22106 | export LANGUAGE | |
22107 | ||
22108 | # CDPATH. | |
22109 | (unset CDPATH) >/dev/null 2>&1 && unset CDPATH | |
22110 | ||
22111 | ||
5f64f7bd GM |
22112 | # as_fn_error ERROR [LINENO LOG_FD] |
22113 | # --------------------------------- | |
067d23c9 KY |
22114 | # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are |
22115 | # provided, also output the error to LOG_FD, referencing LINENO. Then exit the | |
5f64f7bd | 22116 | # script with status $?, using 1 if that was 0. |
067d23c9 KY |
22117 | as_fn_error () |
22118 | { | |
5f64f7bd GM |
22119 | as_status=$?; test $as_status -eq 0 && as_status=1 |
22120 | if test "$3"; then | |
22121 | as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
22122 | $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 | |
067d23c9 | 22123 | fi |
5f64f7bd | 22124 | $as_echo "$as_me: error: $1" >&2 |
067d23c9 KY |
22125 | as_fn_exit $as_status |
22126 | } # as_fn_error | |
22127 | ||
22128 | ||
22129 | # as_fn_set_status STATUS | |
22130 | # ----------------------- | |
22131 | # Set $? to STATUS, without forking. | |
22132 | as_fn_set_status () | |
22133 | { | |
22134 | return $1 | |
22135 | } # as_fn_set_status | |
22136 | ||
22137 | # as_fn_exit STATUS | |
22138 | # ----------------- | |
22139 | # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. | |
22140 | as_fn_exit () | |
22141 | { | |
22142 | set +e | |
22143 | as_fn_set_status $1 | |
22144 | exit $1 | |
22145 | } # as_fn_exit | |
22146 | ||
22147 | # as_fn_unset VAR | |
22148 | # --------------- | |
22149 | # Portably unset VAR. | |
22150 | as_fn_unset () | |
22151 | { | |
22152 | { eval $1=; unset $1;} | |
22153 | } | |
22154 | as_unset=as_fn_unset | |
22155 | # as_fn_append VAR VALUE | |
22156 | # ---------------------- | |
22157 | # Append the text in VALUE to the end of the definition contained in VAR. Take | |
22158 | # advantage of any shell optimizations that allow amortized linear growth over | |
22159 | # repeated appends, instead of the typical quadratic growth present in naive | |
22160 | # implementations. | |
22161 | if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : | |
22162 | eval 'as_fn_append () | |
22163 | { | |
22164 | eval $1+=\$2 | |
22165 | }' | |
22166 | else | |
22167 | as_fn_append () | |
22168 | { | |
22169 | eval $1=\$$1\$2 | |
22170 | } | |
22171 | fi # as_fn_append | |
22172 | ||
22173 | # as_fn_arith ARG... | |
22174 | # ------------------ | |
22175 | # Perform arithmetic evaluation on the ARGs, and store the result in the | |
22176 | # global $as_val. Take advantage of shells that can avoid forks. The arguments | |
22177 | # must be portable across $(()) and expr. | |
22178 | if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : | |
22179 | eval 'as_fn_arith () | |
22180 | { | |
22181 | as_val=$(( $* )) | |
22182 | }' | |
22183 | else | |
22184 | as_fn_arith () | |
22185 | { | |
22186 | as_val=`expr "$@" || test $? -eq 1` | |
22187 | } | |
22188 | fi # as_fn_arith | |
22189 | ||
22190 | ||
22191 | if expr a : '\(a\)' >/dev/null 2>&1 && | |
22192 | test "X`expr 00001 : '.*\(...\)'`" = X001; then | |
22193 | as_expr=expr | |
22194 | else | |
22195 | as_expr=false | |
22196 | fi | |
22197 | ||
22198 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then | |
22199 | as_basename=basename | |
22200 | else | |
22201 | as_basename=false | |
22202 | fi | |
22203 | ||
22204 | if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then | |
22205 | as_dirname=dirname | |
22206 | else | |
22207 | as_dirname=false | |
22208 | fi | |
22209 | ||
22210 | as_me=`$as_basename -- "$0" || | |
22211 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ | |
22212 | X"$0" : 'X\(//\)$' \| \ | |
22213 | X"$0" : 'X\(/\)' \| . 2>/dev/null || | |
22214 | $as_echo X/"$0" | | |
22215 | sed '/^.*\/\([^/][^/]*\)\/*$/{ | |
22216 | s//\1/ | |
22217 | q | |
22218 | } | |
22219 | /^X\/\(\/\/\)$/{ | |
22220 | s//\1/ | |
22221 | q | |
22222 | } | |
22223 | /^X\/\(\/\).*/{ | |
22224 | s//\1/ | |
22225 | q | |
22226 | } | |
22227 | s/.*/./; q'` | |
22228 | ||
22229 | # Avoid depending upon Character Ranges. | |
22230 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
22231 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
22232 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
22233 | as_cr_digits='0123456789' | |
22234 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
22235 | ||
22236 | ECHO_C= ECHO_N= ECHO_T= | |
22237 | case `echo -n x` in #((((( | |
22238 | -n*) | |
22239 | case `echo 'xy\c'` in | |
22240 | *c*) ECHO_T=' ';; # ECHO_T is single tab character. | |
22241 | xy) ECHO_C='\c';; | |
22242 | *) echo `echo ksh88 bug on AIX 6.1` > /dev/null | |
22243 | ECHO_T=' ';; | |
22244 | esac;; | |
22245 | *) | |
22246 | ECHO_N='-n';; | |
22247 | esac | |
22248 | ||
22249 | rm -f conf$$ conf$$.exe conf$$.file | |
22250 | if test -d conf$$.dir; then | |
22251 | rm -f conf$$.dir/conf$$.file | |
22252 | else | |
22253 | rm -f conf$$.dir | |
22254 | mkdir conf$$.dir 2>/dev/null | |
22255 | fi | |
22256 | if (echo >conf$$.file) 2>/dev/null; then | |
22257 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
22258 | as_ln_s='ln -s' | |
22259 | # ... but there are two gotchas: | |
22260 | # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. | |
22261 | # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. | |
22262 | # In both cases, we have to default to `cp -p'. | |
22263 | ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || | |
22264 | as_ln_s='cp -p' | |
22265 | elif ln conf$$.file conf$$ 2>/dev/null; then | |
22266 | as_ln_s=ln | |
22267 | else | |
22268 | as_ln_s='cp -p' | |
22269 | fi | |
22270 | else | |
22271 | as_ln_s='cp -p' | |
22272 | fi | |
22273 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file | |
22274 | rmdir conf$$.dir 2>/dev/null | |
22275 | ||
22276 | ||
22277 | # as_fn_mkdir_p | |
22278 | # ------------- | |
22279 | # Create "$as_dir" as a directory, including parents if necessary. | |
22280 | as_fn_mkdir_p () | |
22281 | { | |
22282 | ||
22283 | case $as_dir in #( | |
22284 | -*) as_dir=./$as_dir;; | |
22285 | esac | |
22286 | test -d "$as_dir" || eval $as_mkdir_p || { | |
22287 | as_dirs= | |
22288 | while :; do | |
22289 | case $as_dir in #( | |
22290 | *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( | |
22291 | *) as_qdir=$as_dir;; | |
22292 | esac | |
22293 | as_dirs="'$as_qdir' $as_dirs" | |
22294 | as_dir=`$as_dirname -- "$as_dir" || | |
22295 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
22296 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
22297 | X"$as_dir" : 'X\(//\)$' \| \ | |
22298 | X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || | |
22299 | $as_echo X"$as_dir" | | |
22300 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
22301 | s//\1/ | |
22302 | q | |
22303 | } | |
22304 | /^X\(\/\/\)[^/].*/{ | |
22305 | s//\1/ | |
22306 | q | |
22307 | } | |
22308 | /^X\(\/\/\)$/{ | |
22309 | s//\1/ | |
22310 | q | |
22311 | } | |
22312 | /^X\(\/\).*/{ | |
22313 | s//\1/ | |
22314 | q | |
22315 | } | |
22316 | s/.*/./; q'` | |
22317 | test -d "$as_dir" && break | |
22318 | done | |
22319 | test -z "$as_dirs" || eval "mkdir $as_dirs" | |
5f64f7bd | 22320 | } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" |
067d23c9 KY |
22321 | |
22322 | ||
22323 | } # as_fn_mkdir_p | |
22324 | if mkdir -p . 2>/dev/null; then | |
22325 | as_mkdir_p='mkdir -p "$as_dir"' | |
22326 | else | |
22327 | test -d ./-p && rmdir ./-p | |
22328 | as_mkdir_p=false | |
22329 | fi | |
22330 | ||
22331 | if test -x / >/dev/null 2>&1; then | |
22332 | as_test_x='test -x' | |
22333 | else | |
22334 | if ls -dL / >/dev/null 2>&1; then | |
22335 | as_ls_L_option=L | |
22336 | else | |
22337 | as_ls_L_option= | |
22338 | fi | |
22339 | as_test_x=' | |
22340 | eval sh -c '\'' | |
22341 | if test -d "$1"; then | |
22342 | test -d "$1/."; | |
22343 | else | |
22344 | case $1 in #( | |
22345 | -*)set "./$1";; | |
22346 | esac; | |
22347 | case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( | |
22348 | ???[sx]*):;;*)false;;esac;fi | |
22349 | '\'' sh | |
22350 | ' | |
22351 | fi | |
22352 | as_executable_p=$as_test_x | |
22353 | ||
22354 | # Sed expression to map a string onto a valid CPP name. | |
22355 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" | |
22356 | ||
22357 | # Sed expression to map a string onto a valid variable name. | |
22358 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" | |
22359 | ||
22360 | ||
22361 | exec 6>&1 | |
22362 | ## ----------------------------------- ## | |
22363 | ## Main body of $CONFIG_STATUS script. ## | |
22364 | ## ----------------------------------- ## | |
22365 | _ASEOF | |
22366 | test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 | |
22367 | ||
22368 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
22369 | # Save the log message, to keep $0 and so on meaningful, and to | |
22370 | # report actual input values of CONFIG_FILES etc. instead of their | |
22371 | # values after options handling. | |
22372 | ac_log=" | |
22373 | This file was extended by emacs $as_me 24.0.50, which was | |
5f64f7bd | 22374 | generated by GNU Autoconf 2.65. Invocation command line was |
067d23c9 KY |
22375 | |
22376 | CONFIG_FILES = $CONFIG_FILES | |
22377 | CONFIG_HEADERS = $CONFIG_HEADERS | |
22378 | CONFIG_LINKS = $CONFIG_LINKS | |
22379 | CONFIG_COMMANDS = $CONFIG_COMMANDS | |
22380 | $ $0 $@ | |
22381 | ||
22382 | on `(hostname || uname -n) 2>/dev/null | sed 1q` | |
22383 | " | |
22384 | ||
22385 | _ACEOF | |
22386 | ||
22387 | case $ac_config_files in *" | |
22388 | "*) set x $ac_config_files; shift; ac_config_files=$*;; | |
22389 | esac | |
22390 | ||
22391 | case $ac_config_headers in *" | |
22392 | "*) set x $ac_config_headers; shift; ac_config_headers=$*;; | |
22393 | esac | |
22394 | ||
22395 | ||
22396 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
22397 | # Files that config.status was made for. | |
22398 | config_files="$ac_config_files" | |
22399 | config_headers="$ac_config_headers" | |
22400 | config_commands="$ac_config_commands" | |
22401 | ||
22402 | _ACEOF | |
22403 | ||
22404 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
22405 | ac_cs_usage="\ | |
22406 | \`$as_me' instantiates files and other configuration actions | |
22407 | from templates according to the current configuration. Unless the files | |
22408 | and actions are specified as TAGs, all are instantiated by default. | |
22409 | ||
22410 | Usage: $0 [OPTION]... [TAG]... | |
22411 | ||
22412 | -h, --help print this help, then exit | |
22413 | -V, --version print version number and configuration settings, then exit | |
22414 | --config print configuration, then exit | |
22415 | -q, --quiet, --silent | |
22416 | do not print progress messages | |
22417 | -d, --debug don't remove temporary files | |
22418 | --recheck update $as_me by reconfiguring in the same conditions | |
22419 | --file=FILE[:TEMPLATE] | |
22420 | instantiate the configuration file FILE | |
22421 | --header=FILE[:TEMPLATE] | |
22422 | instantiate the configuration header FILE | |
22423 | ||
22424 | Configuration files: | |
22425 | $config_files | |
22426 | ||
22427 | Configuration headers: | |
22428 | $config_headers | |
22429 | ||
22430 | Configuration commands: | |
22431 | $config_commands | |
22432 | ||
22433 | Report bugs to the package provider." | |
22434 | ||
22435 | _ACEOF | |
22436 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
22437 | ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" | |
22438 | ac_cs_version="\\ | |
22439 | emacs config.status 24.0.50 | |
5f64f7bd | 22440 | configured by $0, generated by GNU Autoconf 2.65, |
067d23c9 KY |
22441 | with options \\"\$ac_cs_config\\" |
22442 | ||
5f64f7bd | 22443 | Copyright (C) 2009 Free Software Foundation, Inc. |
067d23c9 KY |
22444 | This config.status script is free software; the Free Software Foundation |
22445 | gives unlimited permission to copy, distribute and modify it." | |
22446 | ||
22447 | ac_pwd='$ac_pwd' | |
22448 | srcdir='$srcdir' | |
22449 | INSTALL='$INSTALL' | |
743c80a7 PE |
22450 | MKDIR_P='$MKDIR_P' |
22451 | AWK='$AWK' | |
067d23c9 KY |
22452 | test -n "\$AWK" || AWK=awk |
22453 | _ACEOF | |
22454 | ||
22455 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
22456 | # The default lists apply if the user does not specify any file. | |
22457 | ac_need_defaults=: | |
22458 | while test $# != 0 | |
22459 | do | |
22460 | case $1 in | |
5f64f7bd | 22461 | --*=*) |
067d23c9 KY |
22462 | ac_option=`expr "X$1" : 'X\([^=]*\)='` |
22463 | ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` | |
22464 | ac_shift=: | |
22465 | ;; | |
22466 | *) | |
22467 | ac_option=$1 | |
22468 | ac_optarg=$2 | |
22469 | ac_shift=shift | |
22470 | ;; | |
22471 | esac | |
22472 | ||
22473 | case $ac_option in | |
22474 | # Handling of the options. | |
22475 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) | |
22476 | ac_cs_recheck=: ;; | |
22477 | --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) | |
22478 | $as_echo "$ac_cs_version"; exit ;; | |
22479 | --config | --confi | --conf | --con | --co | --c ) | |
22480 | $as_echo "$ac_cs_config"; exit ;; | |
22481 | --debug | --debu | --deb | --de | --d | -d ) | |
22482 | debug=: ;; | |
22483 | --file | --fil | --fi | --f ) | |
22484 | $ac_shift | |
22485 | case $ac_optarg in | |
22486 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
22487 | esac | |
22488 | as_fn_append CONFIG_FILES " '$ac_optarg'" | |
22489 | ac_need_defaults=false;; | |
22490 | --header | --heade | --head | --hea ) | |
22491 | $ac_shift | |
22492 | case $ac_optarg in | |
22493 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
22494 | esac | |
22495 | as_fn_append CONFIG_HEADERS " '$ac_optarg'" | |
22496 | ac_need_defaults=false;; | |
22497 | --he | --h) | |
22498 | # Conflict between --help and --header | |
5f64f7bd | 22499 | as_fn_error "ambiguous option: \`$1' |
067d23c9 KY |
22500 | Try \`$0 --help' for more information.";; |
22501 | --help | --hel | -h ) | |
22502 | $as_echo "$ac_cs_usage"; exit ;; | |
22503 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
22504 | | -silent | --silent | --silen | --sile | --sil | --si | --s) | |
22505 | ac_cs_silent=: ;; | |
22506 | ||
22507 | # This is an error. | |
5f64f7bd | 22508 | -*) as_fn_error "unrecognized option: \`$1' |
067d23c9 KY |
22509 | Try \`$0 --help' for more information." ;; |
22510 | ||
22511 | *) as_fn_append ac_config_targets " $1" | |
22512 | ac_need_defaults=false ;; | |
22513 | ||
22514 | esac | |
22515 | shift | |
22516 | done | |
22517 | ||
22518 | ac_configure_extra_args= | |
22519 | ||
22520 | if $ac_cs_silent; then | |
22521 | exec 6>/dev/null | |
22522 | ac_configure_extra_args="$ac_configure_extra_args --silent" | |
22523 | fi | |
22524 | ||
22525 | _ACEOF | |
22526 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
22527 | if \$ac_cs_recheck; then | |
22528 | set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion | |
22529 | shift | |
22530 | \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 | |
22531 | CONFIG_SHELL='$SHELL' | |
22532 | export CONFIG_SHELL | |
22533 | exec "\$@" | |
22534 | fi | |
22535 | ||
22536 | _ACEOF | |
22537 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
22538 | exec 5>>config.log | |
22539 | { | |
22540 | echo | |
22541 | sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX | |
22542 | ## Running $as_me. ## | |
22543 | _ASBOX | |
22544 | $as_echo "$ac_log" | |
22545 | } >&5 | |
22546 | ||
22547 | _ACEOF | |
22548 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
22549 | # | |
22550 | # INIT-COMMANDS | |
22551 | # | |
743c80a7 | 22552 | AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" |
067d23c9 KY |
22553 | GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPPFLAGS="$CPPFLAGS" |
22554 | ||
22555 | _ACEOF | |
22556 | ||
22557 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
22558 | ||
22559 | # Handling of arguments. | |
22560 | for ac_config_target in $ac_config_targets | |
22561 | do | |
22562 | case $ac_config_target in | |
22563 | "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:src/config.in" ;; | |
743c80a7 | 22564 | "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; |
067d23c9 | 22565 | "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; |
743c80a7 | 22566 | "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;; |
56ade35c GM |
22567 | "lib-src/Makefile") CONFIG_FILES="$CONFIG_FILES lib-src/Makefile" ;; |
22568 | "oldXMenu/Makefile") CONFIG_FILES="$CONFIG_FILES oldXMenu/Makefile" ;; | |
22569 | "doc/emacs/Makefile") CONFIG_FILES="$CONFIG_FILES doc/emacs/Makefile" ;; | |
22570 | "doc/misc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/misc/Makefile" ;; | |
22571 | "doc/lispintro/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispintro/Makefile" ;; | |
22572 | "doc/lispref/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispref/Makefile" ;; | |
22573 | "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; | |
22574 | "lwlib/Makefile") CONFIG_FILES="$CONFIG_FILES lwlib/Makefile" ;; | |
22575 | "lisp/Makefile") CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;; | |
22576 | "leim/Makefile") CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;; | |
22577 | "test/automated/Makefile") CONFIG_FILES="$CONFIG_FILES test/automated/Makefile" ;; | |
9411886d PE |
22578 | "mkdirs") CONFIG_COMMANDS="$CONFIG_COMMANDS mkdirs" ;; |
22579 | "epaths") CONFIG_COMMANDS="$CONFIG_COMMANDS epaths" ;; | |
22580 | "gdbinit") CONFIG_COMMANDS="$CONFIG_COMMANDS gdbinit" ;; | |
067d23c9 | 22581 | |
5f64f7bd | 22582 | *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; |
067d23c9 KY |
22583 | esac |
22584 | done | |
22585 | ||
22586 | ||
22587 | # If the user did not use the arguments to specify the items to instantiate, | |
22588 | # then the envvar interface is used. Set only those that are not. | |
22589 | # We use the long form for the default assignment because of an extremely | |
22590 | # bizarre bug on SunOS 4.1.3. | |
22591 | if $ac_need_defaults; then | |
22592 | test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files | |
22593 | test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers | |
22594 | test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands | |
22595 | fi | |
22596 | ||
22597 | # Have a temporary directory for convenience. Make it in the build tree | |
22598 | # simply because there is no reason against having it here, and in addition, | |
22599 | # creating and moving files from /tmp can sometimes cause problems. | |
22600 | # Hook for its removal unless debugging. | |
22601 | # Note that there is a small window in which the directory will not be cleaned: | |
22602 | # after its creation but before its name has been assigned to `$tmp'. | |
22603 | $debug || | |
22604 | { | |
5f64f7bd | 22605 | tmp= |
067d23c9 | 22606 | trap 'exit_status=$? |
5f64f7bd | 22607 | { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status |
067d23c9 KY |
22608 | ' 0 |
22609 | trap 'as_fn_exit 1' 1 2 13 15 | |
22610 | } | |
22611 | # Create a (secure) tmp directory for tmp files. | |
22612 | ||
22613 | { | |
22614 | tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && | |
5f64f7bd | 22615 | test -n "$tmp" && test -d "$tmp" |
067d23c9 KY |
22616 | } || |
22617 | { | |
22618 | tmp=./conf$$-$RANDOM | |
22619 | (umask 077 && mkdir "$tmp") | |
5f64f7bd | 22620 | } || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 |
067d23c9 KY |
22621 | |
22622 | # Set up the scripts for CONFIG_FILES section. | |
22623 | # No need to generate them if there are no CONFIG_FILES. | |
22624 | # This happens for instance with `./config.status config.h'. | |
22625 | if test -n "$CONFIG_FILES"; then | |
22626 | ||
22627 | if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then | |
22628 | ac_cs_awk_getline=: | |
22629 | ac_cs_awk_pipe_init= | |
22630 | ac_cs_awk_read_file=' | |
22631 | while ((getline aline < (F[key])) > 0) | |
22632 | print(aline) | |
22633 | close(F[key])' | |
22634 | ac_cs_awk_pipe_fini= | |
22635 | else | |
22636 | ac_cs_awk_getline=false | |
22637 | ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\"" | |
22638 | ac_cs_awk_read_file=' | |
22639 | print "|#_!!_#|" | |
22640 | print "cat " F[key] " &&" | |
22641 | '$ac_cs_awk_pipe_init | |
22642 | # The final `:' finishes the AND list. | |
22643 | ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }' | |
22644 | fi | |
22645 | ac_cr=`echo X | tr X '\015'` | |
22646 | # On cygwin, bash can eat \r inside `` if the user requested igncr. | |
22647 | # But we know of no other shell where ac_cr would be empty at this | |
22648 | # point, so we can use a bashism as a fallback. | |
22649 | if test "x$ac_cr" = x; then | |
22650 | eval ac_cr=\$\'\\r\' | |
22651 | fi | |
22652 | ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` | |
22653 | if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then | |
5f64f7bd | 22654 | ac_cs_awk_cr='\r' |
067d23c9 KY |
22655 | else |
22656 | ac_cs_awk_cr=$ac_cr | |
22657 | fi | |
22658 | ||
5f64f7bd | 22659 | echo 'BEGIN {' >"$tmp/subs1.awk" && |
067d23c9 KY |
22660 | _ACEOF |
22661 | ||
22662 | # Create commands to substitute file output variables. | |
22663 | { | |
22664 | echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" && | |
5f64f7bd | 22665 | echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' && |
067d23c9 KY |
22666 | echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' && |
22667 | echo "_ACAWK" && | |
22668 | echo "_ACEOF" | |
22669 | } >conf$$files.sh && | |
22670 | . ./conf$$files.sh || | |
5f64f7bd | 22671 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 |
067d23c9 KY |
22672 | rm -f conf$$files.sh |
22673 | ||
22674 | { | |
22675 | echo "cat >conf$$subs.awk <<_ACEOF" && | |
22676 | echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && | |
22677 | echo "_ACEOF" | |
22678 | } >conf$$subs.sh || | |
5f64f7bd GM |
22679 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 |
22680 | ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` | |
067d23c9 KY |
22681 | ac_delim='%!_!# ' |
22682 | for ac_last_try in false false false false false :; do | |
22683 | . ./conf$$subs.sh || | |
5f64f7bd | 22684 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 |
067d23c9 KY |
22685 | |
22686 | ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` | |
22687 | if test $ac_delim_n = $ac_delim_num; then | |
22688 | break | |
22689 | elif $ac_last_try; then | |
5f64f7bd | 22690 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 |
067d23c9 KY |
22691 | else |
22692 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
22693 | fi | |
22694 | done | |
22695 | rm -f conf$$subs.sh | |
22696 | ||
22697 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
5f64f7bd | 22698 | cat >>"\$tmp/subs1.awk" <<\\_ACAWK && |
067d23c9 KY |
22699 | _ACEOF |
22700 | sed -n ' | |
22701 | h | |
22702 | s/^/S["/; s/!.*/"]=/ | |
22703 | p | |
22704 | g | |
22705 | s/^[^!]*!// | |
22706 | :repl | |
22707 | t repl | |
22708 | s/'"$ac_delim"'$// | |
22709 | t delim | |
22710 | :nl | |
22711 | h | |
22712 | s/\(.\{148\}\)..*/\1/ | |
22713 | t more1 | |
22714 | s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ | |
22715 | p | |
22716 | n | |
22717 | b repl | |
22718 | :more1 | |
22719 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
22720 | p | |
22721 | g | |
22722 | s/.\{148\}// | |
22723 | t nl | |
22724 | :delim | |
22725 | h | |
22726 | s/\(.\{148\}\)..*/\1/ | |
22727 | t more2 | |
22728 | s/["\\]/\\&/g; s/^/"/; s/$/"/ | |
22729 | p | |
22730 | b | |
22731 | :more2 | |
22732 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
22733 | p | |
22734 | g | |
22735 | s/.\{148\}// | |
22736 | t delim | |
22737 | ' <conf$$subs.awk | sed ' | |
22738 | /^[^""]/{ | |
22739 | N | |
22740 | s/\n// | |
22741 | } | |
22742 | ' >>$CONFIG_STATUS || ac_write_fail=1 | |
22743 | rm -f conf$$subs.awk | |
22744 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
22745 | _ACAWK | |
5f64f7bd | 22746 | cat >>"\$tmp/subs1.awk" <<_ACAWK && |
067d23c9 KY |
22747 | for (key in S) S_is_set[key] = 1 |
22748 | FS = "\a" | |
22749 | \$ac_cs_awk_pipe_init | |
22750 | } | |
22751 | { | |
22752 | line = $ 0 | |
22753 | nfields = split(line, field, "@") | |
22754 | substed = 0 | |
22755 | len = length(field[1]) | |
22756 | for (i = 2; i < nfields; i++) { | |
22757 | key = field[i] | |
22758 | keylen = length(key) | |
22759 | if (S_is_set[key]) { | |
22760 | value = S[key] | |
22761 | line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) | |
22762 | len += length(value) + length(field[++i]) | |
22763 | substed = 1 | |
22764 | } else | |
22765 | len += 1 + keylen | |
22766 | } | |
22767 | if (nfields == 3 && !substed) { | |
22768 | key = field[2] | |
22769 | if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) { | |
22770 | \$ac_cs_awk_read_file | |
22771 | next | |
22772 | } | |
22773 | } | |
22774 | print line | |
22775 | } | |
22776 | \$ac_cs_awk_pipe_fini | |
22777 | _ACAWK | |
22778 | _ACEOF | |
22779 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
22780 | if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then | |
22781 | sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" | |
22782 | else | |
22783 | cat | |
5f64f7bd GM |
22784 | fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ |
22785 | || as_fn_error "could not setup config files machinery" "$LINENO" 5 | |
067d23c9 KY |
22786 | _ACEOF |
22787 | ||
5f64f7bd GM |
22788 | # VPATH may cause trouble with some makes, so we remove $(srcdir), |
22789 | # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and | |
067d23c9 KY |
22790 | # trailing colons and then remove the whole line if VPATH becomes empty |
22791 | # (actually we leave an empty line to preserve line numbers). | |
22792 | if test "x$srcdir" = x.; then | |
5f64f7bd GM |
22793 | ac_vpsub='/^[ ]*VPATH[ ]*=/{ |
22794 | s/:*\$(srcdir):*/:/ | |
22795 | s/:*\${srcdir}:*/:/ | |
22796 | s/:*@srcdir@:*/:/ | |
22797 | s/^\([^=]*=[ ]*\):*/\1/ | |
067d23c9 KY |
22798 | s/:*$// |
22799 | s/^[^=]*=[ ]*$// | |
22800 | }' | |
22801 | fi | |
22802 | ||
22803 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
22804 | fi # test -n "$CONFIG_FILES" | |
22805 | ||
22806 | # Set up the scripts for CONFIG_HEADERS section. | |
22807 | # No need to generate them if there are no CONFIG_HEADERS. | |
22808 | # This happens for instance with `./config.status Makefile'. | |
22809 | if test -n "$CONFIG_HEADERS"; then | |
5f64f7bd | 22810 | cat >"$tmp/defines.awk" <<\_ACAWK || |
067d23c9 KY |
22811 | BEGIN { |
22812 | _ACEOF | |
22813 | ||
22814 | # Transform confdefs.h into an awk script `defines.awk', embedded as | |
22815 | # here-document in config.status, that substitutes the proper values into | |
22816 | # config.h.in to produce config.h. | |
22817 | ||
22818 | # Create a delimiter string that does not exist in confdefs.h, to ease | |
22819 | # handling of long lines. | |
22820 | ac_delim='%!_!# ' | |
22821 | for ac_last_try in false false :; do | |
5f64f7bd GM |
22822 | ac_t=`sed -n "/$ac_delim/p" confdefs.h` |
22823 | if test -z "$ac_t"; then | |
067d23c9 KY |
22824 | break |
22825 | elif $ac_last_try; then | |
5f64f7bd | 22826 | as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5 |
067d23c9 KY |
22827 | else |
22828 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
22829 | fi | |
22830 | done | |
22831 | ||
22832 | # For the awk script, D is an array of macro values keyed by name, | |
22833 | # likewise P contains macro parameters if any. Preserve backslash | |
22834 | # newline sequences. | |
22835 | ||
22836 | ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* | |
22837 | sed -n ' | |
22838 | s/.\{148\}/&'"$ac_delim"'/g | |
22839 | t rset | |
22840 | :rset | |
22841 | s/^[ ]*#[ ]*define[ ][ ]*/ / | |
22842 | t def | |
22843 | d | |
22844 | :def | |
22845 | s/\\$// | |
22846 | t bsnl | |
22847 | s/["\\]/\\&/g | |
22848 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
22849 | D["\1"]=" \3"/p | |
22850 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p | |
22851 | d | |
22852 | :bsnl | |
22853 | s/["\\]/\\&/g | |
22854 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
22855 | D["\1"]=" \3\\\\\\n"\\/p | |
22856 | t cont | |
22857 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p | |
22858 | t cont | |
22859 | d | |
22860 | :cont | |
22861 | n | |
22862 | s/.\{148\}/&'"$ac_delim"'/g | |
22863 | t clear | |
22864 | :clear | |
22865 | s/\\$// | |
22866 | t bsnlc | |
22867 | s/["\\]/\\&/g; s/^/"/; s/$/"/p | |
22868 | d | |
22869 | :bsnlc | |
22870 | s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p | |
22871 | b cont | |
22872 | ' <confdefs.h | sed ' | |
22873 | s/'"$ac_delim"'/"\\\ | |
22874 | "/g' >>$CONFIG_STATUS || ac_write_fail=1 | |
22875 | ||
22876 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
22877 | for (key in D) D_is_set[key] = 1 | |
22878 | FS = "\a" | |
22879 | } | |
22880 | /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { | |
22881 | line = \$ 0 | |
22882 | split(line, arg, " ") | |
22883 | if (arg[1] == "#") { | |
22884 | defundef = arg[2] | |
22885 | mac1 = arg[3] | |
22886 | } else { | |
22887 | defundef = substr(arg[1], 2) | |
22888 | mac1 = arg[2] | |
22889 | } | |
22890 | split(mac1, mac2, "(") #) | |
22891 | macro = mac2[1] | |
22892 | prefix = substr(line, 1, index(line, defundef) - 1) | |
22893 | if (D_is_set[macro]) { | |
22894 | # Preserve the white space surrounding the "#". | |
22895 | print prefix "define", macro P[macro] D[macro] | |
22896 | next | |
22897 | } else { | |
22898 | # Replace #undef with comments. This is necessary, for example, | |
22899 | # in the case of _POSIX_SOURCE, which is predefined and required | |
22900 | # on some systems where configure will not decide to define it. | |
22901 | if (defundef == "undef") { | |
22902 | print "/*", prefix defundef, macro, "*/" | |
22903 | next | |
22904 | } | |
22905 | } | |
22906 | } | |
22907 | { print } | |
22908 | _ACAWK | |
22909 | _ACEOF | |
22910 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
5f64f7bd | 22911 | as_fn_error "could not setup config headers machinery" "$LINENO" 5 |
067d23c9 KY |
22912 | fi # test -n "$CONFIG_HEADERS" |
22913 | ||
22914 | ||
22915 | eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" | |
22916 | shift | |
22917 | for ac_tag | |
22918 | do | |
22919 | case $ac_tag in | |
22920 | :[FHLC]) ac_mode=$ac_tag; continue;; | |
22921 | esac | |
22922 | case $ac_mode$ac_tag in | |
22923 | :[FHL]*:*);; | |
5f64f7bd | 22924 | :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; |
067d23c9 KY |
22925 | :[FH]-) ac_tag=-:-;; |
22926 | :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; | |
22927 | esac | |
22928 | ac_save_IFS=$IFS | |
22929 | IFS=: | |
22930 | set x $ac_tag | |
22931 | IFS=$ac_save_IFS | |
22932 | shift | |
22933 | ac_file=$1 | |
22934 | shift | |
22935 | ||
22936 | case $ac_mode in | |
22937 | :L) ac_source=$1;; | |
22938 | :[FH]) | |
22939 | ac_file_inputs= | |
22940 | for ac_f | |
22941 | do | |
22942 | case $ac_f in | |
5f64f7bd | 22943 | -) ac_f="$tmp/stdin";; |
067d23c9 KY |
22944 | *) # Look for the file first in the build tree, then in the source tree |
22945 | # (if the path is not absolute). The absolute path cannot be DOS-style, | |
22946 | # because $ac_f cannot contain `:'. | |
22947 | test -f "$ac_f" || | |
22948 | case $ac_f in | |
22949 | [\\/$]*) false;; | |
22950 | *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; | |
22951 | esac || | |
5f64f7bd | 22952 | as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; |
067d23c9 KY |
22953 | esac |
22954 | case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac | |
22955 | as_fn_append ac_file_inputs " '$ac_f'" | |
22956 | done | |
22957 | ||
22958 | # Let's still pretend it is `configure' which instantiates (i.e., don't | |
22959 | # use $as_me), people would be surprised to read: | |
22960 | # /* config.h. Generated by config.status. */ | |
22961 | configure_input='Generated from '` | |
22962 | $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' | |
22963 | `' by configure.' | |
22964 | if test x"$ac_file" != x-; then | |
22965 | configure_input="$ac_file. $configure_input" | |
22966 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 | |
22967 | $as_echo "$as_me: creating $ac_file" >&6;} | |
22968 | fi | |
22969 | # Neutralize special characters interpreted by sed in replacement strings. | |
22970 | case $configure_input in #( | |
22971 | *\&* | *\|* | *\\* ) | |
22972 | ac_sed_conf_input=`$as_echo "$configure_input" | | |
22973 | sed 's/[\\\\&|]/\\\\&/g'`;; #( | |
22974 | *) ac_sed_conf_input=$configure_input;; | |
22975 | esac | |
22976 | ||
22977 | case $ac_tag in | |
5f64f7bd GM |
22978 | *:-:* | *:-) cat >"$tmp/stdin" \ |
22979 | || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; | |
067d23c9 KY |
22980 | esac |
22981 | ;; | |
22982 | esac | |
22983 | ||
22984 | ac_dir=`$as_dirname -- "$ac_file" || | |
22985 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
22986 | X"$ac_file" : 'X\(//\)[^/]' \| \ | |
22987 | X"$ac_file" : 'X\(//\)$' \| \ | |
22988 | X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || | |
22989 | $as_echo X"$ac_file" | | |
22990 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
22991 | s//\1/ | |
22992 | q | |
22993 | } | |
22994 | /^X\(\/\/\)[^/].*/{ | |
22995 | s//\1/ | |
22996 | q | |
22997 | } | |
22998 | /^X\(\/\/\)$/{ | |
22999 | s//\1/ | |
23000 | q | |
23001 | } | |
23002 | /^X\(\/\).*/{ | |
23003 | s//\1/ | |
23004 | q | |
23005 | } | |
23006 | s/.*/./; q'` | |
23007 | as_dir="$ac_dir"; as_fn_mkdir_p | |
23008 | ac_builddir=. | |
23009 | ||
23010 | case "$ac_dir" in | |
23011 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
23012 | *) | |
23013 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
23014 | # A ".." for each directory in $ac_dir_suffix. | |
23015 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
23016 | case $ac_top_builddir_sub in | |
23017 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
23018 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
23019 | esac ;; | |
23020 | esac | |
23021 | ac_abs_top_builddir=$ac_pwd | |
23022 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
23023 | # for backward compatibility: | |
23024 | ac_top_builddir=$ac_top_build_prefix | |
23025 | ||
23026 | case $srcdir in | |
23027 | .) # We are building in place. | |
23028 | ac_srcdir=. | |
23029 | ac_top_srcdir=$ac_top_builddir_sub | |
23030 | ac_abs_top_srcdir=$ac_pwd ;; | |
23031 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
23032 | ac_srcdir=$srcdir$ac_dir_suffix; | |
23033 | ac_top_srcdir=$srcdir | |
23034 | ac_abs_top_srcdir=$srcdir ;; | |
23035 | *) # Relative name. | |
23036 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
23037 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
23038 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
23039 | esac | |
23040 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix | |
23041 | ||
23042 | ||
23043 | case $ac_mode in | |
23044 | :F) | |
23045 | # | |
23046 | # CONFIG_FILE | |
23047 | # | |
23048 | ||
23049 | case $INSTALL in | |
23050 | [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; | |
23051 | *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; | |
23052 | esac | |
743c80a7 PE |
23053 | ac_MKDIR_P=$MKDIR_P |
23054 | case $MKDIR_P in | |
23055 | [\\/$]* | ?:[\\/]* ) ;; | |
23056 | */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; | |
23057 | esac | |
067d23c9 KY |
23058 | _ACEOF |
23059 | ||
23060 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
23061 | # If the template does not know about datarootdir, expand it. | |
23062 | # FIXME: This hack should be removed a few years after 2.60. | |
23063 | ac_datarootdir_hack=; ac_datarootdir_seen= | |
23064 | ac_sed_dataroot=' | |
23065 | /datarootdir/ { | |
23066 | p | |
23067 | q | |
23068 | } | |
23069 | /@datadir@/p | |
23070 | /@docdir@/p | |
23071 | /@infodir@/p | |
23072 | /@localedir@/p | |
23073 | /@mandir@/p' | |
23074 | case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in | |
23075 | *datarootdir*) ac_datarootdir_seen=yes;; | |
23076 | *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) | |
23077 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 | |
23078 | $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} | |
23079 | _ACEOF | |
23080 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
23081 | ac_datarootdir_hack=' | |
23082 | s&@datadir@&$datadir&g | |
23083 | s&@docdir@&$docdir&g | |
23084 | s&@infodir@&$infodir&g | |
23085 | s&@localedir@&$localedir&g | |
23086 | s&@mandir@&$mandir&g | |
23087 | s&\\\${datarootdir}&$datarootdir&g' ;; | |
23088 | esac | |
23089 | _ACEOF | |
23090 | ||
23091 | # Neutralize VPATH when `$srcdir' = `.'. | |
23092 | # Shell code in configure.ac might set extrasub. | |
23093 | # FIXME: do we really want to maintain this feature? | |
23094 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
23095 | ac_sed_extra="$ac_vpsub | |
23096 | $extrasub | |
23097 | _ACEOF | |
23098 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
23099 | :t | |
23100 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b | |
23101 | s|@configure_input@|$ac_sed_conf_input|;t t | |
23102 | s&@top_builddir@&$ac_top_builddir_sub&;t t | |
23103 | s&@top_build_prefix@&$ac_top_build_prefix&;t t | |
23104 | s&@srcdir@&$ac_srcdir&;t t | |
23105 | s&@abs_srcdir@&$ac_abs_srcdir&;t t | |
23106 | s&@top_srcdir@&$ac_top_srcdir&;t t | |
23107 | s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t | |
23108 | s&@builddir@&$ac_builddir&;t t | |
23109 | s&@abs_builddir@&$ac_abs_builddir&;t t | |
23110 | s&@abs_top_builddir@&$ac_abs_top_builddir&;t t | |
23111 | s&@INSTALL@&$ac_INSTALL&;t t | |
743c80a7 | 23112 | s&@MKDIR_P@&$ac_MKDIR_P&;t t |
067d23c9 KY |
23113 | $ac_datarootdir_hack |
23114 | " | |
23115 | eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | | |
23116 | if $ac_cs_awk_getline; then | |
5f64f7bd | 23117 | $AWK -f "$tmp/subs.awk" |
067d23c9 | 23118 | else |
5f64f7bd GM |
23119 | $AWK -f "$tmp/subs.awk" | $SHELL |
23120 | fi >$tmp/out \ | |
23121 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
067d23c9 KY |
23122 | |
23123 | test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && | |
5f64f7bd GM |
23124 | { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && |
23125 | { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && | |
067d23c9 | 23126 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' |
5f64f7bd | 23127 | which seems to be undefined. Please make sure it is defined." >&5 |
067d23c9 | 23128 | $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' |
5f64f7bd | 23129 | which seems to be undefined. Please make sure it is defined." >&2;} |
067d23c9 | 23130 | |
5f64f7bd | 23131 | rm -f "$tmp/stdin" |
067d23c9 | 23132 | case $ac_file in |
5f64f7bd GM |
23133 | -) cat "$tmp/out" && rm -f "$tmp/out";; |
23134 | *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; | |
067d23c9 | 23135 | esac \ |
5f64f7bd | 23136 | || as_fn_error "could not create $ac_file" "$LINENO" 5 |
067d23c9 KY |
23137 | ;; |
23138 | :H) | |
23139 | # | |
23140 | # CONFIG_HEADER | |
23141 | # | |
23142 | if test x"$ac_file" != x-; then | |
23143 | { | |
23144 | $as_echo "/* $configure_input */" \ | |
5f64f7bd GM |
23145 | && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" |
23146 | } >"$tmp/config.h" \ | |
23147 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
23148 | if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then | |
067d23c9 KY |
23149 | { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 |
23150 | $as_echo "$as_me: $ac_file is unchanged" >&6;} | |
23151 | else | |
23152 | rm -f "$ac_file" | |
5f64f7bd GM |
23153 | mv "$tmp/config.h" "$ac_file" \ |
23154 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
067d23c9 KY |
23155 | fi |
23156 | else | |
23157 | $as_echo "/* $configure_input */" \ | |
5f64f7bd GM |
23158 | && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ |
23159 | || as_fn_error "could not create -" "$LINENO" 5 | |
067d23c9 | 23160 | fi |
743c80a7 PE |
23161 | # Compute "$ac_file"'s index in $config_headers. |
23162 | _am_arg="$ac_file" | |
23163 | _am_stamp_count=1 | |
23164 | for _am_header in $config_headers :; do | |
23165 | case $_am_header in | |
23166 | $_am_arg | $_am_arg:* ) | |
23167 | break ;; | |
23168 | * ) | |
23169 | _am_stamp_count=`expr $_am_stamp_count + 1` ;; | |
23170 | esac | |
23171 | done | |
23172 | echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || | |
23173 | $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
23174 | X"$_am_arg" : 'X\(//\)[^/]' \| \ | |
23175 | X"$_am_arg" : 'X\(//\)$' \| \ | |
23176 | X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || | |
23177 | $as_echo X"$_am_arg" | | |
23178 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
23179 | s//\1/ | |
23180 | q | |
23181 | } | |
23182 | /^X\(\/\/\)[^/].*/{ | |
23183 | s//\1/ | |
23184 | q | |
23185 | } | |
23186 | /^X\(\/\/\)$/{ | |
23187 | s//\1/ | |
23188 | q | |
23189 | } | |
23190 | /^X\(\/\).*/{ | |
23191 | s//\1/ | |
23192 | q | |
23193 | } | |
23194 | s/.*/./; q'`/stamp-h$_am_stamp_count | |
067d23c9 KY |
23195 | ;; |
23196 | ||
23197 | :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 | |
23198 | $as_echo "$as_me: executing $ac_file commands" >&6;} | |
23199 | ;; | |
23200 | esac | |
23201 | ||
23202 | ||
23203 | case $ac_file$ac_mode in | |
743c80a7 PE |
23204 | "depfiles":C) test x"$AMDEP_TRUE" != x"" || { |
23205 | # Autoconf 2.62 quotes --file arguments for eval, but not when files | |
23206 | # are listed without --file. Let's play safe and only enable the eval | |
23207 | # if we detect the quoting. | |
23208 | case $CONFIG_FILES in | |
23209 | *\'*) eval set x "$CONFIG_FILES" ;; | |
23210 | *) set x $CONFIG_FILES ;; | |
23211 | esac | |
23212 | shift | |
23213 | for mf | |
23214 | do | |
23215 | # Strip MF so we end up with the name of the file. | |
23216 | mf=`echo "$mf" | sed -e 's/:.*$//'` | |
23217 | # Check whether this is an Automake generated Makefile or not. | |
23218 | # We used to match only the files named `Makefile.in', but | |
23219 | # some people rename them; so instead we look at the file content. | |
23220 | # Grep'ing the first line is not enough: some people post-process | |
23221 | # each Makefile.in and add a new line on top of each file to say so. | |
23222 | # Grep'ing the whole file is not good either: AIX grep has a line | |
23223 | # limit of 2048, but all sed's we know have understand at least 4000. | |
23224 | if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then | |
23225 | dirpart=`$as_dirname -- "$mf" || | |
23226 | $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
23227 | X"$mf" : 'X\(//\)[^/]' \| \ | |
23228 | X"$mf" : 'X\(//\)$' \| \ | |
23229 | X"$mf" : 'X\(/\)' \| . 2>/dev/null || | |
23230 | $as_echo X"$mf" | | |
23231 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
23232 | s//\1/ | |
23233 | q | |
23234 | } | |
23235 | /^X\(\/\/\)[^/].*/{ | |
23236 | s//\1/ | |
23237 | q | |
23238 | } | |
23239 | /^X\(\/\/\)$/{ | |
23240 | s//\1/ | |
23241 | q | |
23242 | } | |
23243 | /^X\(\/\).*/{ | |
23244 | s//\1/ | |
23245 | q | |
23246 | } | |
23247 | s/.*/./; q'` | |
23248 | else | |
23249 | continue | |
23250 | fi | |
23251 | # Extract the definition of DEPDIR, am__include, and am__quote | |
23252 | # from the Makefile without running `make'. | |
23253 | DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` | |
23254 | test -z "$DEPDIR" && continue | |
23255 | am__include=`sed -n 's/^am__include = //p' < "$mf"` | |
23256 | test -z "am__include" && continue | |
23257 | am__quote=`sed -n 's/^am__quote = //p' < "$mf"` | |
23258 | # When using ansi2knr, U may be empty or an underscore; expand it | |
23259 | U=`sed -n 's/^U = //p' < "$mf"` | |
23260 | # Find all dependency output files, they are included files with | |
23261 | # $(DEPDIR) in their names. We invoke sed twice because it is the | |
23262 | # simplest approach to changing $(DEPDIR) to its actual value in the | |
23263 | # expansion. | |
23264 | for file in `sed -n " | |
23265 | s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ | |
23266 | sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do | |
23267 | # Make sure the directory exists. | |
23268 | test -f "$dirpart/$file" && continue | |
23269 | fdir=`$as_dirname -- "$file" || | |
23270 | $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
23271 | X"$file" : 'X\(//\)[^/]' \| \ | |
23272 | X"$file" : 'X\(//\)$' \| \ | |
23273 | X"$file" : 'X\(/\)' \| . 2>/dev/null || | |
23274 | $as_echo X"$file" | | |
23275 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
23276 | s//\1/ | |
23277 | q | |
23278 | } | |
23279 | /^X\(\/\/\)[^/].*/{ | |
23280 | s//\1/ | |
23281 | q | |
23282 | } | |
23283 | /^X\(\/\/\)$/{ | |
23284 | s//\1/ | |
23285 | q | |
23286 | } | |
23287 | /^X\(\/\).*/{ | |
23288 | s//\1/ | |
23289 | q | |
23290 | } | |
23291 | s/.*/./; q'` | |
23292 | as_dir=$dirpart/$fdir; as_fn_mkdir_p | |
23293 | # echo "creating $dirpart/$file" | |
23294 | echo '# dummy' > "$dirpart/$file" | |
23295 | done | |
23296 | done | |
23297 | } | |
23298 | ;; | |
9411886d | 23299 | "mkdirs":C) |
067d23c9 KY |
23300 | for dir in etc lisp ; do |
23301 | test -d ${dir} || mkdir ${dir} | |
23302 | done | |
9411886d PE |
23303 | ;; |
23304 | "epaths":C) | |
067d23c9 KY |
23305 | echo creating src/epaths.h |
23306 | ${MAKE-make} epaths-force | |
9411886d PE |
23307 | ;; |
23308 | "gdbinit":C) | |
067d23c9 KY |
23309 | if test ! -f src/.gdbinit && test -f $srcdir/src/.gdbinit; then |
23310 | echo creating src/.gdbinit | |
23311 | echo source $srcdir/src/.gdbinit > src/.gdbinit | |
23312 | fi | |
067d23c9 KY |
23313 | ;; |
23314 | ||
23315 | esac | |
23316 | done # for ac_tag | |
23317 | ||
23318 | ||
23319 | as_fn_exit 0 | |
23320 | _ACEOF | |
23321 | ac_clean_files=$ac_clean_files_save | |
23322 | ||
23323 | test $ac_write_fail = 0 || | |
5f64f7bd | 23324 | as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 |
067d23c9 KY |
23325 | |
23326 | ||
23327 | # configure is writing to config.log, and then calls config.status. | |
23328 | # config.status does its own redirection, appending to config.log. | |
23329 | # Unfortunately, on DOS this fails, as config.log is still kept open | |
23330 | # by configure, so config.status won't be able to write to it; its | |
23331 | # output is simply discarded. So we exec the FD to /dev/null, | |
23332 | # effectively closing config.log, so it can be properly (re)opened and | |
23333 | # appended to by config.status. When coming back to configure, we | |
23334 | # need to make the FD available again. | |
23335 | if test "$no_create" != yes; then | |
23336 | ac_cs_success=: | |
23337 | ac_config_status_args= | |
23338 | test "$silent" = yes && | |
23339 | ac_config_status_args="$ac_config_status_args --quiet" | |
23340 | exec 5>/dev/null | |
23341 | $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false | |
23342 | exec 5>>config.log | |
23343 | # Use ||, not &&, to avoid exiting from the if with $? = 1, which | |
23344 | # would make configure fail if this is the last instruction. | |
5f64f7bd | 23345 | $ac_cs_success || as_fn_exit $? |
067d23c9 KY |
23346 | fi |
23347 | if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then | |
23348 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 | |
23349 | $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} | |
23350 | fi | |
23351 | ||
9411886d | 23352 |