Commit | Line | Data |
---|---|---|
067d23c9 KY |
1 | #! /bin/sh |
2 | # Guess values for system-dependent variables and create Makefiles. | |
250c8ab9 | 3 | # Generated by GNU Autoconf 2.65 for emacs 24.2.50. |
067d23c9 KY |
4 | # |
5 | # | |
6 | # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, | |
a9bec17c 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 | |
a9bec17c | 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" | |
a9bec17c | 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 | ||
a9bec17c 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 | |
a9bec17c | 363 | # script with status $?, using 1 if that was 0. |
067d23c9 KY |
364 | as_fn_error () |
365 | { | |
a9bec17c 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 |
a9bec17c | 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. | |
a9bec17c | 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' | |
250c8ab9 GM |
552 | PACKAGE_VERSION='24.2.50' |
553 | PACKAGE_STRING='emacs 24.2.50' | |
067d23c9 KY |
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 | ||
f199cab1 | 594 | ac_header_list= |
5476a9a4 | 595 | ac_func_list= |
e275c824 | 596 | gl_getopt_required=POSIX |
7e723570 | 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 |
42dcba54 | 607 | WINDOW_SYSTEM_OBJ |
067d23c9 KY |
608 | LIB_GCC |
609 | LD_FIRSTFLAG | |
610 | LD_SWITCH_SYSTEM_TEMACS | |
743c80a7 PE |
611 | LIBGNU_LTLIBDEPS |
612 | LIBGNU_LIBDEPS | |
613 | gltests_WITNESS | |
6d153f56 GM |
614 | gl_GNULIB_ENABLED_verify_FALSE |
615 | gl_GNULIB_ENABLED_verify_TRUE | |
616 | gl_GNULIB_ENABLED_strtoull_FALSE | |
617 | gl_GNULIB_ENABLED_strtoull_TRUE | |
3e0be4ab GM |
618 | gl_GNULIB_ENABLED_strtoll_FALSE |
619 | gl_GNULIB_ENABLED_strtoll_TRUE | |
6d153f56 GM |
620 | gl_GNULIB_ENABLED_stat_FALSE |
621 | gl_GNULIB_ENABLED_stat_TRUE | |
a0a61e58 GM |
622 | gl_GNULIB_ENABLED_pathmax_FALSE |
623 | gl_GNULIB_ENABLED_pathmax_TRUE | |
6d153f56 GM |
624 | gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE |
625 | gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE | |
626 | gl_GNULIB_ENABLED_dosname_FALSE | |
627 | gl_GNULIB_ENABLED_dosname_TRUE | |
628 | LTLIBINTL | |
629 | LIBINTL | |
f199cab1 | 630 | WINDOWS_64_BIT_OFF_T |
e275c824 PE |
631 | HAVE_UNISTD_H |
632 | NEXT_AS_FIRST_DIRECTIVE_UNISTD_H | |
633 | NEXT_UNISTD_H | |
1fd182f0 PE |
634 | PTHREAD_H_DEFINES_STRUCT_TIMESPEC |
635 | SYS_TIME_H_DEFINES_STRUCT_TIMESPEC | |
636 | TIME_H_DEFINES_STRUCT_TIMESPEC | |
637 | NEXT_AS_FIRST_DIRECTIVE_TIME_H | |
638 | NEXT_TIME_H | |
0eb775a3 | 639 | WINDOWS_64_BIT_ST_SIZE |
5fa4ac76 PE |
640 | NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H |
641 | NEXT_SYS_STAT_H | |
1f5d53eb PE |
642 | NEXT_AS_FIRST_DIRECTIVE_STDLIB_H |
643 | NEXT_STDLIB_H | |
6ad6792b GM |
644 | NEXT_AS_FIRST_DIRECTIVE_STDIO_H |
645 | NEXT_STDIO_H | |
646 | REPLACE_VSPRINTF | |
647 | REPLACE_VSNPRINTF | |
648 | REPLACE_VPRINTF | |
649 | REPLACE_VFPRINTF | |
650 | REPLACE_VDPRINTF | |
651 | REPLACE_VASPRINTF | |
652 | REPLACE_TMPFILE | |
653 | REPLACE_STDIO_WRITE_FUNCS | |
ca36e0ff | 654 | REPLACE_STDIO_READ_FUNCS |
6ad6792b GM |
655 | REPLACE_SPRINTF |
656 | REPLACE_SNPRINTF | |
657 | REPLACE_RENAMEAT | |
658 | REPLACE_RENAME | |
659 | REPLACE_REMOVE | |
660 | REPLACE_PRINTF | |
661 | REPLACE_POPEN | |
662 | REPLACE_PERROR | |
663 | REPLACE_OBSTACK_PRINTF | |
664 | REPLACE_GETLINE | |
665 | REPLACE_GETDELIM | |
666 | REPLACE_FTELLO | |
667 | REPLACE_FTELL | |
668 | REPLACE_FSEEKO | |
669 | REPLACE_FSEEK | |
670 | REPLACE_FREOPEN | |
671 | REPLACE_FPURGE | |
672 | REPLACE_FPRINTF | |
673 | REPLACE_FOPEN | |
674 | REPLACE_FFLUSH | |
2b1928b8 | 675 | REPLACE_FDOPEN |
6ad6792b GM |
676 | REPLACE_FCLOSE |
677 | REPLACE_DPRINTF | |
678 | HAVE_VDPRINTF | |
679 | HAVE_VASPRINTF | |
680 | HAVE_RENAMEAT | |
2b1928b8 GM |
681 | HAVE_POPEN |
682 | HAVE_PCLOSE | |
6ad6792b GM |
683 | HAVE_FTELLO |
684 | HAVE_FSEEKO | |
685 | HAVE_DPRINTF | |
686 | HAVE_DECL_VSNPRINTF | |
687 | HAVE_DECL_SNPRINTF | |
688 | HAVE_DECL_OBSTACK_PRINTF | |
689 | HAVE_DECL_GETLINE | |
690 | HAVE_DECL_GETDELIM | |
691 | HAVE_DECL_FTELLO | |
692 | HAVE_DECL_FSEEKO | |
693 | HAVE_DECL_FPURGE | |
694 | GNULIB_VSPRINTF_POSIX | |
695 | GNULIB_VSNPRINTF | |
696 | GNULIB_VPRINTF_POSIX | |
697 | GNULIB_VPRINTF | |
698 | GNULIB_VFPRINTF_POSIX | |
699 | GNULIB_VFPRINTF | |
700 | GNULIB_VDPRINTF | |
ca36e0ff GM |
701 | GNULIB_VSCANF |
702 | GNULIB_VFSCANF | |
6ad6792b GM |
703 | GNULIB_VASPRINTF |
704 | GNULIB_TMPFILE | |
705 | GNULIB_STDIO_H_SIGPIPE | |
ca36e0ff | 706 | GNULIB_STDIO_H_NONBLOCKING |
6ad6792b GM |
707 | GNULIB_SPRINTF_POSIX |
708 | GNULIB_SNPRINTF | |
ca36e0ff | 709 | GNULIB_SCANF |
6ad6792b GM |
710 | GNULIB_RENAMEAT |
711 | GNULIB_RENAME | |
712 | GNULIB_REMOVE | |
713 | GNULIB_PUTS | |
714 | GNULIB_PUTCHAR | |
715 | GNULIB_PUTC | |
716 | GNULIB_PRINTF_POSIX | |
717 | GNULIB_PRINTF | |
718 | GNULIB_POPEN | |
719 | GNULIB_PERROR | |
2b1928b8 | 720 | GNULIB_PCLOSE |
6ad6792b GM |
721 | GNULIB_OBSTACK_PRINTF_POSIX |
722 | GNULIB_OBSTACK_PRINTF | |
723 | GNULIB_GETLINE | |
724 | GNULIB_GETDELIM | |
ca36e0ff GM |
725 | GNULIB_GETCHAR |
726 | GNULIB_GETC | |
6ad6792b GM |
727 | GNULIB_FWRITE |
728 | GNULIB_FTELLO | |
729 | GNULIB_FTELL | |
730 | GNULIB_FSEEKO | |
731 | GNULIB_FSEEK | |
ca36e0ff | 732 | GNULIB_FSCANF |
6ad6792b | 733 | GNULIB_FREOPEN |
ca36e0ff | 734 | GNULIB_FREAD |
6ad6792b GM |
735 | GNULIB_FPUTS |
736 | GNULIB_FPUTC | |
737 | GNULIB_FPURGE | |
738 | GNULIB_FPRINTF_POSIX | |
739 | GNULIB_FPRINTF | |
740 | GNULIB_FOPEN | |
ca36e0ff GM |
741 | GNULIB_FGETS |
742 | GNULIB_FGETC | |
6ad6792b | 743 | GNULIB_FFLUSH |
2b1928b8 | 744 | GNULIB_FDOPEN |
6ad6792b GM |
745 | GNULIB_FCLOSE |
746 | GNULIB_DPRINTF | |
1fd182f0 PE |
747 | NEXT_AS_FIRST_DIRECTIVE_STDDEF_H |
748 | NEXT_STDDEF_H | |
6c051bab GM |
749 | GL_GENERATE_STDDEF_H_FALSE |
750 | GL_GENERATE_STDDEF_H_TRUE | |
1fd182f0 PE |
751 | STDDEF_H |
752 | HAVE_WCHAR_T | |
753 | REPLACE_NULL | |
16c3e636 | 754 | HAVE__BOOL |
6c051bab GM |
755 | GL_GENERATE_STDBOOL_H_FALSE |
756 | GL_GENERATE_STDBOOL_H_TRUE | |
16c3e636 | 757 | STDBOOL_H |
6d153f56 GM |
758 | GL_GENERATE_STDARG_H_FALSE |
759 | GL_GENERATE_STDARG_H_TRUE | |
760 | STDARG_H | |
761 | NEXT_AS_FIRST_DIRECTIVE_STDARG_H | |
762 | NEXT_STDARG_H | |
0eb775a3 GM |
763 | GL_GENERATE_STDALIGN_H_FALSE |
764 | GL_GENERATE_STDALIGN_H_TRUE | |
765 | STDALIGN_H | |
3e0be4ab GM |
766 | NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H |
767 | NEXT_SIGNAL_H | |
0eb775a3 | 768 | LIB_PTHREAD_SIGMASK |
2b1928b8 | 769 | REPLACE_RAISE |
3e0be4ab GM |
770 | REPLACE_PTHREAD_SIGMASK |
771 | HAVE_SIGHANDLER_T | |
772 | HAVE_TYPE_VOLATILE_SIG_ATOMIC_T | |
773 | HAVE_STRUCT_SIGACTION_SA_SIGACTION | |
774 | HAVE_SIGACTION | |
775 | HAVE_SIGINFO_T | |
776 | HAVE_SIGSET_T | |
2b1928b8 | 777 | HAVE_RAISE |
3e0be4ab GM |
778 | HAVE_PTHREAD_SIGMASK |
779 | HAVE_POSIX_SIGNALBLOCKING | |
780 | GNULIB_SIGACTION | |
781 | GNULIB_SIGPROCMASK | |
782 | GNULIB_SIGNAL_H_SIGPIPE | |
2b1928b8 | 783 | GNULIB_RAISE |
3e0be4ab | 784 | GNULIB_PTHREAD_SIGMASK |
f199cab1 GM |
785 | HAVE_SYS_SELECT_H |
786 | NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H | |
787 | NEXT_SYS_SELECT_H | |
788 | REPLACE_SELECT | |
789 | REPLACE_PSELECT | |
790 | HAVE_PSELECT | |
791 | GNULIB_SELECT | |
792 | GNULIB_PSELECT | |
1fd182f0 PE |
793 | REPLACE_TIMEGM |
794 | REPLACE_NANOSLEEP | |
795 | REPLACE_MKTIME | |
796 | REPLACE_LOCALTIME_R | |
797 | HAVE_TIMEGM | |
798 | HAVE_STRPTIME | |
799 | HAVE_NANOSLEEP | |
800 | HAVE_DECL_LOCALTIME_R | |
801 | GNULIB_TIME_R | |
802 | GNULIB_TIMEGM | |
803 | GNULIB_STRPTIME | |
804 | GNULIB_NANOSLEEP | |
805 | GNULIB_MKTIME | |
ae0d7250 PE |
806 | REPLACE_UTIMENSAT |
807 | REPLACE_STAT | |
808 | REPLACE_MKNOD | |
809 | REPLACE_MKFIFO | |
810 | REPLACE_MKDIR | |
811 | REPLACE_LSTAT | |
812 | REPLACE_FUTIMENS | |
813 | REPLACE_FSTATAT | |
814 | REPLACE_FSTAT | |
815 | HAVE_UTIMENSAT | |
816 | HAVE_MKNODAT | |
817 | HAVE_MKNOD | |
818 | HAVE_MKFIFOAT | |
819 | HAVE_MKFIFO | |
820 | HAVE_MKDIRAT | |
821 | HAVE_LSTAT | |
822 | HAVE_LCHMOD | |
823 | HAVE_FUTIMENS | |
824 | HAVE_FSTATAT | |
825 | HAVE_FCHMODAT | |
826 | GNULIB_UTIMENSAT | |
827 | GNULIB_STAT | |
828 | GNULIB_MKNODAT | |
829 | GNULIB_MKNOD | |
830 | GNULIB_MKFIFOAT | |
831 | GNULIB_MKFIFO | |
832 | GNULIB_MKDIRAT | |
833 | GNULIB_LSTAT | |
834 | GNULIB_LCHMOD | |
835 | GNULIB_FUTIMENS | |
836 | GNULIB_FSTATAT | |
2b1928b8 | 837 | GNULIB_FSTAT |
ae0d7250 | 838 | GNULIB_FCHMODAT |
4fda9c95 GM |
839 | NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H |
840 | NEXT_INTTYPES_H | |
841 | UINT64_MAX_EQ_ULONG_MAX | |
842 | UINT32_MAX_LT_UINTMAX_MAX | |
843 | PRIPTR_PREFIX | |
844 | PRI_MACROS_BROKEN | |
845 | INT64_MAX_EQ_LONG_MAX | |
846 | INT32_MAX_LT_INTMAX_MAX | |
0eb775a3 | 847 | REPLACE_STRTOIMAX |
4fda9c95 GM |
848 | HAVE_DECL_STRTOUMAX |
849 | HAVE_DECL_STRTOIMAX | |
850 | HAVE_DECL_IMAXDIV | |
851 | HAVE_DECL_IMAXABS | |
852 | GNULIB_STRTOUMAX | |
853 | GNULIB_STRTOIMAX | |
854 | GNULIB_IMAXDIV | |
855 | GNULIB_IMAXABS | |
856 | GL_GENERATE_STDINT_H_FALSE | |
857 | GL_GENERATE_STDINT_H_TRUE | |
858 | STDINT_H | |
859 | WINT_T_SUFFIX | |
860 | WCHAR_T_SUFFIX | |
861 | SIG_ATOMIC_T_SUFFIX | |
862 | SIZE_T_SUFFIX | |
863 | PTRDIFF_T_SUFFIX | |
864 | HAVE_SIGNED_WINT_T | |
865 | HAVE_SIGNED_WCHAR_T | |
866 | HAVE_SIGNED_SIG_ATOMIC_T | |
867 | BITSIZEOF_WINT_T | |
868 | BITSIZEOF_WCHAR_T | |
869 | BITSIZEOF_SIG_ATOMIC_T | |
870 | BITSIZEOF_SIZE_T | |
871 | BITSIZEOF_PTRDIFF_T | |
872 | APPLE_UNIVERSAL_BUILD | |
873 | HAVE_SYS_BITYPES_H | |
874 | HAVE_SYS_INTTYPES_H | |
875 | HAVE_STDINT_H | |
876 | NEXT_AS_FIRST_DIRECTIVE_STDINT_H | |
877 | NEXT_STDINT_H | |
878 | HAVE_SYS_TYPES_H | |
879 | HAVE_INTTYPES_H | |
880 | HAVE_WCHAR_H | |
881 | HAVE_UNSIGNED_LONG_LONG_INT | |
882 | HAVE_LONG_LONG_INT | |
f199cab1 GM |
883 | HAVE_WINSOCK2_H |
884 | NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H | |
885 | NEXT_SYS_TIME_H | |
886 | REPLACE_STRUCT_TIMEVAL | |
887 | REPLACE_GETTIMEOFDAY | |
888 | HAVE_SYS_TIME_H | |
889 | HAVE_STRUCT_TIMEVAL | |
890 | HAVE_GETTIMEOFDAY | |
891 | GNULIB_GETTIMEOFDAY | |
0eb775a3 | 892 | GNULIB_GL_UNISTD_H_GETOPT |
e275c824 PE |
893 | GETOPT_H |
894 | HAVE_GETOPT_H | |
895 | NEXT_AS_FIRST_DIRECTIVE_GETOPT_H | |
896 | NEXT_GETOPT_H | |
897 | PRAGMA_COLUMNS | |
898 | PRAGMA_SYSTEM_HEADER | |
899 | INCLUDE_NEXT_AS_FIRST_DIRECTIVE | |
900 | INCLUDE_NEXT | |
7d2a1c5e GM |
901 | GETLOADAVG_LIBS |
902 | REPLACE_WCTOMB | |
903 | REPLACE_UNSETENV | |
904 | REPLACE_STRTOD | |
905 | REPLACE_SETENV | |
906 | REPLACE_REALPATH | |
907 | REPLACE_REALLOC | |
0eb775a3 | 908 | REPLACE_RANDOM_R |
7d2a1c5e | 909 | REPLACE_PUTENV |
0eb775a3 | 910 | REPLACE_PTSNAME_R |
7d2a1c5e GM |
911 | REPLACE_MKSTEMP |
912 | REPLACE_MBTOWC | |
913 | REPLACE_MALLOC | |
914 | REPLACE_CANONICALIZE_FILE_NAME | |
915 | REPLACE_CALLOC | |
916 | HAVE_DECL_UNSETENV | |
917 | HAVE_UNLOCKPT | |
918 | HAVE_SYS_LOADAVG_H | |
919 | HAVE_STRUCT_RANDOM_DATA | |
920 | HAVE_STRTOULL | |
921 | HAVE_STRTOLL | |
922 | HAVE_STRTOD | |
923 | HAVE_DECL_SETENV | |
924 | HAVE_SETENV | |
925 | HAVE_RPMATCH | |
926 | HAVE_REALPATH | |
927 | HAVE_RANDOM_R | |
928 | HAVE_RANDOM_H | |
0eb775a3 GM |
929 | HAVE_RANDOM |
930 | HAVE_PTSNAME_R | |
7d2a1c5e | 931 | HAVE_PTSNAME |
0eb775a3 | 932 | HAVE_POSIX_OPENPT |
7d2a1c5e GM |
933 | HAVE_MKSTEMPS |
934 | HAVE_MKSTEMP | |
935 | HAVE_MKOSTEMPS | |
936 | HAVE_MKOSTEMP | |
937 | HAVE_MKDTEMP | |
938 | HAVE_GRANTPT | |
939 | HAVE_GETSUBOPT | |
940 | HAVE_DECL_GETLOADAVG | |
941 | HAVE_CANONICALIZE_FILE_NAME | |
942 | HAVE_ATOLL | |
943 | HAVE__EXIT | |
944 | GNULIB_WCTOMB | |
945 | GNULIB_UNSETENV | |
946 | GNULIB_UNLOCKPT | |
947 | GNULIB_SYSTEM_POSIX | |
948 | GNULIB_STRTOULL | |
949 | GNULIB_STRTOLL | |
950 | GNULIB_STRTOD | |
951 | GNULIB_SETENV | |
952 | GNULIB_RPMATCH | |
953 | GNULIB_REALPATH | |
954 | GNULIB_REALLOC_POSIX | |
955 | GNULIB_RANDOM_R | |
0eb775a3 | 956 | GNULIB_RANDOM |
7d2a1c5e | 957 | GNULIB_PUTENV |
0eb775a3 | 958 | GNULIB_PTSNAME_R |
7d2a1c5e | 959 | GNULIB_PTSNAME |
0eb775a3 | 960 | GNULIB_POSIX_OPENPT |
7d2a1c5e GM |
961 | GNULIB_MKSTEMPS |
962 | GNULIB_MKSTEMP | |
963 | GNULIB_MKOSTEMPS | |
964 | GNULIB_MKOSTEMP | |
965 | GNULIB_MKDTEMP | |
966 | GNULIB_MBTOWC | |
967 | GNULIB_MALLOC_POSIX | |
968 | GNULIB_GRANTPT | |
969 | GNULIB_GETSUBOPT | |
970 | GNULIB_GETLOADAVG | |
971 | GNULIB_CANONICALIZE_FILE_NAME | |
972 | GNULIB_CALLOC_POSIX | |
973 | GNULIB_ATOLL | |
974 | GNULIB__EXIT | |
8966cbff GM |
975 | GL_GENERATE_EXECINFO_H_FALSE |
976 | GL_GENERATE_EXECINFO_H_TRUE | |
977 | LIB_EXECINFO | |
978 | EXECINFO_H | |
e275c824 PE |
979 | UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS |
980 | UNISTD_H_HAVE_WINSOCK2_H | |
981 | REPLACE_WRITE | |
982 | REPLACE_USLEEP | |
983 | REPLACE_UNLINKAT | |
984 | REPLACE_UNLINK | |
985 | REPLACE_TTYNAME_R | |
986 | REPLACE_SYMLINK | |
987 | REPLACE_SLEEP | |
988 | REPLACE_RMDIR | |
989 | REPLACE_READLINK | |
ca36e0ff | 990 | REPLACE_READ |
e275c824 PE |
991 | REPLACE_PWRITE |
992 | REPLACE_PREAD | |
993 | REPLACE_LSEEK | |
994 | REPLACE_LINKAT | |
995 | REPLACE_LINK | |
996 | REPLACE_LCHOWN | |
0eb775a3 | 997 | REPLACE_ISATTY |
e275c824 PE |
998 | REPLACE_GETPAGESIZE |
999 | REPLACE_GETGROUPS | |
1000 | REPLACE_GETLOGIN_R | |
1001 | REPLACE_GETDOMAINNAME | |
1002 | REPLACE_GETCWD | |
0eb775a3 | 1003 | REPLACE_FTRUNCATE |
e275c824 PE |
1004 | REPLACE_FCHOWNAT |
1005 | REPLACE_DUP2 | |
1006 | REPLACE_DUP | |
1007 | REPLACE_CLOSE | |
1008 | REPLACE_CHOWN | |
1009 | HAVE_SYS_PARAM_H | |
1010 | HAVE_OS_H | |
1011 | HAVE_DECL_TTYNAME_R | |
0eb775a3 | 1012 | HAVE_DECL_SETHOSTNAME |
e275c824 PE |
1013 | HAVE_DECL_GETUSERSHELL |
1014 | HAVE_DECL_GETPAGESIZE | |
1015 | HAVE_DECL_GETLOGIN_R | |
1016 | HAVE_DECL_GETDOMAINNAME | |
2b1928b8 | 1017 | HAVE_DECL_FDATASYNC |
e275c824 PE |
1018 | HAVE_DECL_FCHDIR |
1019 | HAVE_DECL_ENVIRON | |
1020 | HAVE_USLEEP | |
1021 | HAVE_UNLINKAT | |
1022 | HAVE_SYMLINKAT | |
1023 | HAVE_SYMLINK | |
1024 | HAVE_SLEEP | |
0eb775a3 | 1025 | HAVE_SETHOSTNAME |
e275c824 PE |
1026 | HAVE_READLINKAT |
1027 | HAVE_READLINK | |
1028 | HAVE_PWRITE | |
1029 | HAVE_PREAD | |
1030 | HAVE_PIPE2 | |
1031 | HAVE_PIPE | |
1032 | HAVE_LINKAT | |
1033 | HAVE_LINK | |
1034 | HAVE_LCHOWN | |
da6c8463 | 1035 | HAVE_GROUP_MEMBER |
e275c824 PE |
1036 | HAVE_GETPAGESIZE |
1037 | HAVE_GETLOGIN | |
1038 | HAVE_GETHOSTNAME | |
1039 | HAVE_GETGROUPS | |
1040 | HAVE_GETDTABLESIZE | |
1041 | HAVE_FTRUNCATE | |
1042 | HAVE_FSYNC | |
2b1928b8 | 1043 | HAVE_FDATASYNC |
e275c824 PE |
1044 | HAVE_FCHOWNAT |
1045 | HAVE_FCHDIR | |
1046 | HAVE_FACCESSAT | |
1047 | HAVE_EUIDACCESS | |
1048 | HAVE_DUP3 | |
1049 | HAVE_DUP2 | |
1050 | HAVE_CHOWN | |
1051 | GNULIB_WRITE | |
1052 | GNULIB_USLEEP | |
1053 | GNULIB_UNLINKAT | |
1054 | GNULIB_UNLINK | |
1055 | GNULIB_UNISTD_H_SIGPIPE | |
ca36e0ff | 1056 | GNULIB_UNISTD_H_NONBLOCKING |
e275c824 PE |
1057 | GNULIB_TTYNAME_R |
1058 | GNULIB_SYMLINKAT | |
1059 | GNULIB_SYMLINK | |
1060 | GNULIB_SLEEP | |
0eb775a3 | 1061 | GNULIB_SETHOSTNAME |
e275c824 PE |
1062 | GNULIB_RMDIR |
1063 | GNULIB_READLINKAT | |
1064 | GNULIB_READLINK | |
ca36e0ff | 1065 | GNULIB_READ |
e275c824 PE |
1066 | GNULIB_PWRITE |
1067 | GNULIB_PREAD | |
1068 | GNULIB_PIPE2 | |
1069 | GNULIB_PIPE | |
1070 | GNULIB_LSEEK | |
1071 | GNULIB_LINKAT | |
1072 | GNULIB_LINK | |
1073 | GNULIB_LCHOWN | |
0eb775a3 | 1074 | GNULIB_ISATTY |
da6c8463 | 1075 | GNULIB_GROUP_MEMBER |
e275c824 PE |
1076 | GNULIB_GETUSERSHELL |
1077 | GNULIB_GETPAGESIZE | |
1078 | GNULIB_GETLOGIN_R | |
1079 | GNULIB_GETLOGIN | |
1080 | GNULIB_GETHOSTNAME | |
1081 | GNULIB_GETGROUPS | |
1082 | GNULIB_GETDTABLESIZE | |
1083 | GNULIB_GETDOMAINNAME | |
1084 | GNULIB_GETCWD | |
1085 | GNULIB_FTRUNCATE | |
1086 | GNULIB_FSYNC | |
2b1928b8 | 1087 | GNULIB_FDATASYNC |
e275c824 PE |
1088 | GNULIB_FCHOWNAT |
1089 | GNULIB_FCHDIR | |
1090 | GNULIB_FACCESSAT | |
1091 | GNULIB_EUIDACCESS | |
1092 | GNULIB_ENVIRON | |
1093 | GNULIB_DUP3 | |
1094 | GNULIB_DUP2 | |
2b1928b8 | 1095 | GNULIB_DUP |
e275c824 PE |
1096 | GNULIB_CLOSE |
1097 | GNULIB_CHOWN | |
2b1928b8 | 1098 | GNULIB_CHDIR |
f199cab1 | 1099 | LIB_CLOCK_GETTIME |
4fc2b746 GM |
1100 | GL_GENERATE_ALLOCA_H_FALSE |
1101 | GL_GENERATE_ALLOCA_H_TRUE | |
1102 | ALLOCA_H | |
1103 | ALLOCA | |
743c80a7 PE |
1104 | GL_COND_LIBTOOL_FALSE |
1105 | GL_COND_LIBTOOL_TRUE | |
5476a9a4 GM |
1106 | POST_ALLOC_OBJ |
1107 | PRE_ALLOC_OBJ | |
1108 | CYGWIN_OBJ | |
1109 | RALLOC_OBJ | |
1110 | OLDXMENU_DEPS | |
1111 | LIBX_OTHER | |
1112 | LIBXMENU | |
1113 | OLDXMENU | |
1114 | OLDXMENU_TARGET | |
1115 | LIBXT_OTHER | |
1116 | TOOLKIT_LIBW | |
1117 | WIDGET_OBJ | |
1118 | XOBJ | |
1119 | XMENU_OBJ | |
1120 | FONT_OBJ | |
1121 | OTHER_FILES | |
1122 | GNU_OBJC_CFLAGS | |
1123 | ns_appsrc | |
1124 | ns_appresdir | |
1125 | ns_appbindir | |
1126 | ns_appdir | |
5476a9a4 GM |
1127 | X_TOOLKIT_TYPE |
1128 | GNUSTEP_CFLAGS | |
1129 | C_SWITCH_X_SITE | |
1130 | LD_SWITCH_X_SITE | |
1131 | gameuser | |
1132 | gamedir | |
1133 | bitmapdir | |
1134 | archlibdir | |
1135 | etcdir | |
1136 | x_default_search_path | |
1137 | lisppath | |
1138 | locallisppath | |
1139 | standardlisppath | |
1140 | leimdir | |
1141 | lispdir | |
1142 | srcdir | |
1143 | canonical | |
1144 | configuration | |
1145 | version | |
1146 | KRB4LIB | |
1147 | DESLIB | |
1148 | KRB5LIB | |
1149 | CRYPTOLIB | |
1150 | COM_ERRLIB | |
1151 | LIBRESOLV | |
1152 | LIBHESIOD | |
1153 | TERMCAP_OBJ | |
1154 | LIBS_TERMCAP | |
1155 | BLESSMAIL_TARGET | |
1156 | LIBS_MAIL | |
1157 | liblockfile | |
1158 | LIBXML2_LIBS | |
1159 | LIBXML2_CFLAGS | |
1160 | LIBXSM | |
1161 | LIBGPM | |
1162 | LIBGIF | |
1163 | LIBTIFF | |
1164 | LIBPNG | |
1165 | LIBJPEG | |
1166 | LIBXPM | |
1167 | M17N_FLT_LIBS | |
1168 | M17N_FLT_CFLAGS | |
1169 | LIBOTF_LIBS | |
1170 | LIBOTF_CFLAGS | |
1171 | FREETYPE_LIBS | |
1172 | FREETYPE_CFLAGS | |
1173 | XFT_LIBS | |
1174 | XFT_CFLAGS | |
1175 | FONTCONFIG_LIBS | |
1176 | FONTCONFIG_CFLAGS | |
1177 | LIBXMU | |
1178 | LIBXTR6 | |
1179 | LIBGNUTLS_LIBS | |
1180 | LIBGNUTLS_CFLAGS | |
1181 | LIBSELINUX_LIBS | |
1182 | SETTINGS_LIBS | |
1183 | SETTINGS_CFLAGS | |
1184 | GCONF_LIBS | |
1185 | GCONF_CFLAGS | |
1186 | GSETTINGS_LIBS | |
1187 | GSETTINGS_CFLAGS | |
1188 | DBUS_OBJ | |
1189 | DBUS_LIBS | |
1190 | DBUS_CFLAGS | |
1191 | GTK_OBJ | |
1192 | GTK_LIBS | |
1193 | GTK_CFLAGS | |
1194 | IMAGEMAGICK_LIBS | |
1195 | IMAGEMAGICK_CFLAGS | |
1196 | RSVG_LIBS | |
1197 | RSVG_CFLAGS | |
1198 | LIB_PTHREAD | |
1199 | VMLIMIT_OBJ | |
1200 | GMALLOC_OBJ | |
1201 | HAVE_XSERVER | |
1202 | LIB_STANDARD | |
1203 | NS_OBJC_OBJ | |
1204 | NS_OBJ | |
1205 | ns_self_contained | |
1206 | INSTALL_ARCH_INDEP_EXTRA | |
1207 | TEMACS_LDFLAGS2 | |
1208 | LD_SWITCH_X_SITE_RPATH | |
1209 | XMKMF | |
1210 | DEPFLAGS | |
1211 | MKDEPDIR | |
1212 | CFLAGS_SOUND | |
1213 | ALSA_LIBS | |
1214 | ALSA_CFLAGS | |
1215 | LIBSOUND | |
1216 | PKG_CONFIG | |
130f1dac | 1217 | CRT_DIR |
067d23c9 KY |
1218 | START_FILES |
1219 | LIB_MATH | |
067d23c9 KY |
1220 | LIBS_SYSTEM |
1221 | C_SWITCH_SYSTEM | |
1222 | UNEXEC_OBJ | |
1223 | C_SWITCH_MACHINE | |
1224 | LD_SWITCH_SYSTEM | |
1225 | CANNOT_DUMP | |
141d074d GM |
1226 | INFO_OPTS |
1227 | INFO_EXT | |
96f129d5 | 1228 | HAVE_MAKEINFO |
9c29597b | 1229 | PAXCTL |
067d23c9 KY |
1230 | GZIP_PROG |
1231 | INSTALL_INFO | |
0e733db9 | 1232 | LN_S |
a6b92a4a | 1233 | GNULIB_WARN_CFLAGS |
0eb775a3 | 1234 | WARN_CFLAGS |
a6b92a4a | 1235 | WERROR_CFLAGS |
369e19fc PE |
1236 | RANLIB |
1237 | ARFLAGS | |
1238 | AR | |
067d23c9 KY |
1239 | EGREP |
1240 | GREP | |
1241 | CPP | |
743c80a7 PE |
1242 | am__fastdepCC_FALSE |
1243 | am__fastdepCC_TRUE | |
1244 | CCDEPMODE | |
1245 | AMDEPBACKSLASH | |
1246 | AMDEP_FALSE | |
1247 | AMDEP_TRUE | |
1248 | am__quote | |
1249 | am__include | |
1250 | DEPDIR | |
067d23c9 KY |
1251 | OBJEXT |
1252 | EXEEXT | |
1253 | ac_ct_CC | |
1254 | CPPFLAGS | |
1255 | LDFLAGS | |
1256 | CFLAGS | |
1257 | CC | |
1258 | host_os | |
1259 | host_vendor | |
1260 | host_cpu | |
1261 | host | |
1262 | build_os | |
1263 | build_vendor | |
1264 | build_cpu | |
1265 | build | |
1266 | PROFILING_CFLAGS | |
067d23c9 | 1267 | GZIP_INFO |
c3a461a5 | 1268 | cache_file |
743c80a7 PE |
1269 | am__untar |
1270 | am__tar | |
1271 | AMTAR | |
1272 | am__leading_dot | |
1273 | SET_MAKE | |
1274 | AWK | |
1275 | mkdir_p | |
1276 | MKDIR_P | |
1277 | INSTALL_STRIP_PROGRAM | |
1278 | STRIP | |
1279 | install_sh | |
1280 | MAKEINFO | |
1281 | AUTOHEADER | |
1282 | AUTOMAKE | |
1283 | AUTOCONF | |
1284 | ACLOCAL | |
1285 | VERSION | |
1286 | PACKAGE | |
1287 | CYGPATH_W | |
1288 | am__isrc | |
1289 | INSTALL_DATA | |
1290 | INSTALL_SCRIPT | |
1291 | INSTALL_PROGRAM | |
067d23c9 KY |
1292 | target_alias |
1293 | host_alias | |
1294 | build_alias | |
1295 | LIBS | |
1296 | ECHO_T | |
1297 | ECHO_N | |
1298 | ECHO_C | |
1299 | DEFS | |
1300 | mandir | |
1301 | localedir | |
1302 | libdir | |
1303 | psdir | |
1304 | pdfdir | |
1305 | dvidir | |
1306 | htmldir | |
1307 | infodir | |
1308 | docdir | |
1309 | oldincludedir | |
1310 | includedir | |
1311 | localstatedir | |
1312 | sharedstatedir | |
1313 | sysconfdir | |
1314 | datadir | |
1315 | datarootdir | |
1316 | libexecdir | |
1317 | sbindir | |
1318 | bindir | |
1319 | program_transform_name | |
1320 | prefix | |
1321 | exec_prefix | |
1322 | PACKAGE_URL | |
1323 | PACKAGE_BUGREPORT | |
1324 | PACKAGE_STRING | |
1325 | PACKAGE_VERSION | |
1326 | PACKAGE_TARNAME | |
1327 | PACKAGE_NAME | |
1328 | PATH_SEPARATOR | |
1329 | SHELL' | |
1330 | ac_subst_files='deps_frag | |
4d4b75e8 | 1331 | lisp_frag |
067d23c9 KY |
1332 | ns_frag' |
1333 | ac_user_opts=' | |
1334 | enable_option_checking | |
ee77919d | 1335 | with_all |
067d23c9 KY |
1336 | with_pop |
1337 | with_kerberos | |
1338 | with_kerberos5 | |
1339 | with_hesiod | |
1340 | with_mmdf | |
1341 | with_mail_unlink | |
1342 | with_mailhost | |
1343 | with_sound | |
1344 | with_sync_input | |
1345 | with_x_toolkit | |
0442dc7f | 1346 | with_wide_int |
067d23c9 KY |
1347 | with_xpm |
1348 | with_jpeg | |
1349 | with_tiff | |
1350 | with_gif | |
1351 | with_png | |
1352 | with_rsvg | |
1353 | with_xml2 | |
1354 | with_imagemagick | |
1355 | with_xft | |
1356 | with_libotf | |
1357 | with_m17n_flt | |
1358 | with_toolkit_scroll_bars | |
1359 | with_xaw3d | |
1360 | with_xim | |
1361 | with_ns | |
1362 | with_gpm | |
1363 | with_dbus | |
1364 | with_gconf | |
f527bd02 | 1365 | with_gsettings |
067d23c9 KY |
1366 | with_selinux |
1367 | with_gnutls | |
1368 | with_makeinfo | |
1369 | with_compress_info | |
1370 | with_pkg_config_prog | |
1371 | with_crt_dir | |
4fc5868a | 1372 | with_gameuser |
067d23c9 KY |
1373 | with_gnustep_conf |
1374 | enable_ns_self_contained | |
067d23c9 KY |
1375 | enable_locallisppath |
1376 | enable_checking | |
afd07e01 | 1377 | enable_check_lisp_object_type |
067d23c9 KY |
1378 | enable_profiling |
1379 | enable_autodepend | |
743c80a7 | 1380 | enable_dependency_tracking |
067d23c9 | 1381 | enable_largefile |
a6b92a4a | 1382 | enable_gcc_warnings |
e4d35030 | 1383 | enable_link_time_optimization |
067d23c9 KY |
1384 | with_x |
1385 | ' | |
1386 | ac_precious_vars='build_alias | |
1387 | host_alias | |
1388 | target_alias | |
1389 | CC | |
1390 | CFLAGS | |
1391 | LDFLAGS | |
1392 | LIBS | |
1393 | CPPFLAGS | |
1394 | CPP | |
1395 | XMKMF' | |
1396 | ||
1397 | ||
1398 | # Initialize some variables set by options. | |
1399 | ac_init_help= | |
1400 | ac_init_version=false | |
1401 | ac_unrecognized_opts= | |
1402 | ac_unrecognized_sep= | |
1403 | # The variables have the same names as the options, with | |
1404 | # dashes changed to underlines. | |
1405 | cache_file=/dev/null | |
1406 | exec_prefix=NONE | |
1407 | no_create= | |
1408 | no_recursion= | |
1409 | prefix=NONE | |
1410 | program_prefix=NONE | |
1411 | program_suffix=NONE | |
1412 | program_transform_name=s,x,x, | |
1413 | silent= | |
1414 | site= | |
1415 | srcdir= | |
1416 | verbose= | |
1417 | x_includes=NONE | |
1418 | x_libraries=NONE | |
1419 | ||
1420 | # Installation directory options. | |
1421 | # These are left unexpanded so users can "make install exec_prefix=/foo" | |
1422 | # and all the variables that are supposed to be based on exec_prefix | |
1423 | # by default will actually change. | |
1424 | # Use braces instead of parens because sh, perl, etc. also accept them. | |
1425 | # (The list follows the same order as the GNU Coding Standards.) | |
1426 | bindir='${exec_prefix}/bin' | |
1427 | sbindir='${exec_prefix}/sbin' | |
1428 | libexecdir='${exec_prefix}/libexec' | |
1429 | datarootdir='${prefix}/share' | |
1430 | datadir='${datarootdir}' | |
1431 | sysconfdir='${prefix}/etc' | |
1432 | sharedstatedir='${prefix}/com' | |
1433 | localstatedir='${prefix}/var' | |
1434 | includedir='${prefix}/include' | |
1435 | oldincludedir='/usr/include' | |
1436 | docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' | |
1437 | infodir='${datarootdir}/info' | |
1438 | htmldir='${docdir}' | |
1439 | dvidir='${docdir}' | |
1440 | pdfdir='${docdir}' | |
1441 | psdir='${docdir}' | |
1442 | libdir='${exec_prefix}/lib' | |
1443 | localedir='${datarootdir}/locale' | |
1444 | mandir='${datarootdir}/man' | |
1445 | ||
1446 | ac_prev= | |
1447 | ac_dashdash= | |
1448 | for ac_option | |
1449 | do | |
1450 | # If the previous option needs an argument, assign it. | |
1451 | if test -n "$ac_prev"; then | |
1452 | eval $ac_prev=\$ac_option | |
1453 | ac_prev= | |
1454 | continue | |
1455 | fi | |
1456 | ||
1457 | case $ac_option in | |
a9bec17c GM |
1458 | *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; |
1459 | *) ac_optarg=yes ;; | |
067d23c9 KY |
1460 | esac |
1461 | ||
1462 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
1463 | ||
1464 | case $ac_dashdash$ac_option in | |
1465 | --) | |
1466 | ac_dashdash=yes ;; | |
1467 | ||
1468 | -bindir | --bindir | --bindi | --bind | --bin | --bi) | |
1469 | ac_prev=bindir ;; | |
1470 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
1471 | bindir=$ac_optarg ;; | |
1472 | ||
1473 | -build | --build | --buil | --bui | --bu) | |
1474 | ac_prev=build_alias ;; | |
1475 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) | |
1476 | build_alias=$ac_optarg ;; | |
1477 | ||
1478 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
1479 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
1480 | ac_prev=cache_file ;; | |
1481 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
1482 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
1483 | cache_file=$ac_optarg ;; | |
1484 | ||
1485 | --config-cache | -C) | |
1486 | cache_file=config.cache ;; | |
1487 | ||
1488 | -datadir | --datadir | --datadi | --datad) | |
1489 | ac_prev=datadir ;; | |
1490 | -datadir=* | --datadir=* | --datadi=* | --datad=*) | |
1491 | datadir=$ac_optarg ;; | |
1492 | ||
1493 | -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | |
1494 | | --dataroo | --dataro | --datar) | |
1495 | ac_prev=datarootdir ;; | |
1496 | -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | |
1497 | | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) | |
1498 | datarootdir=$ac_optarg ;; | |
1499 | ||
1500 | -disable-* | --disable-*) | |
1501 | ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` | |
1502 | # Reject names that are not valid shell variable names. | |
1503 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && | |
a9bec17c | 1504 | as_fn_error "invalid feature name: $ac_useropt" |
067d23c9 KY |
1505 | ac_useropt_orig=$ac_useropt |
1506 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1507 | case $ac_user_opts in | |
1508 | *" | |
1509 | "enable_$ac_useropt" | |
1510 | "*) ;; | |
1511 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" | |
1512 | ac_unrecognized_sep=', ';; | |
1513 | esac | |
1514 | eval enable_$ac_useropt=no ;; | |
1515 | ||
1516 | -docdir | --docdir | --docdi | --doc | --do) | |
1517 | ac_prev=docdir ;; | |
1518 | -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) | |
1519 | docdir=$ac_optarg ;; | |
1520 | ||
1521 | -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) | |
1522 | ac_prev=dvidir ;; | |
1523 | -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) | |
1524 | dvidir=$ac_optarg ;; | |
1525 | ||
1526 | -enable-* | --enable-*) | |
1527 | ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` | |
1528 | # Reject names that are not valid shell variable names. | |
1529 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && | |
a9bec17c | 1530 | as_fn_error "invalid feature name: $ac_useropt" |
067d23c9 KY |
1531 | ac_useropt_orig=$ac_useropt |
1532 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1533 | case $ac_user_opts in | |
1534 | *" | |
1535 | "enable_$ac_useropt" | |
1536 | "*) ;; | |
1537 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" | |
1538 | ac_unrecognized_sep=', ';; | |
1539 | esac | |
1540 | eval enable_$ac_useropt=\$ac_optarg ;; | |
1541 | ||
1542 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
1543 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
1544 | | --exec | --exe | --ex) | |
1545 | ac_prev=exec_prefix ;; | |
1546 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
1547 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
1548 | | --exec=* | --exe=* | --ex=*) | |
1549 | exec_prefix=$ac_optarg ;; | |
1550 | ||
1551 | -gas | --gas | --ga | --g) | |
1552 | # Obsolete; use --with-gas. | |
1553 | with_gas=yes ;; | |
1554 | ||
1555 | -help | --help | --hel | --he | -h) | |
1556 | ac_init_help=long ;; | |
1557 | -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) | |
1558 | ac_init_help=recursive ;; | |
1559 | -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) | |
1560 | ac_init_help=short ;; | |
1561 | ||
1562 | -host | --host | --hos | --ho) | |
1563 | ac_prev=host_alias ;; | |
1564 | -host=* | --host=* | --hos=* | --ho=*) | |
1565 | host_alias=$ac_optarg ;; | |
1566 | ||
1567 | -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) | |
1568 | ac_prev=htmldir ;; | |
1569 | -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | |
1570 | | --ht=*) | |
1571 | htmldir=$ac_optarg ;; | |
1572 | ||
1573 | -includedir | --includedir | --includedi | --included | --include \ | |
1574 | | --includ | --inclu | --incl | --inc) | |
1575 | ac_prev=includedir ;; | |
1576 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
1577 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
1578 | includedir=$ac_optarg ;; | |
1579 | ||
1580 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
1581 | ac_prev=infodir ;; | |
1582 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
1583 | infodir=$ac_optarg ;; | |
1584 | ||
1585 | -libdir | --libdir | --libdi | --libd) | |
1586 | ac_prev=libdir ;; | |
1587 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
1588 | libdir=$ac_optarg ;; | |
1589 | ||
1590 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
1591 | | --libexe | --libex | --libe) | |
1592 | ac_prev=libexecdir ;; | |
1593 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
1594 | | --libexe=* | --libex=* | --libe=*) | |
1595 | libexecdir=$ac_optarg ;; | |
1596 | ||
1597 | -localedir | --localedir | --localedi | --localed | --locale) | |
1598 | ac_prev=localedir ;; | |
1599 | -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) | |
1600 | localedir=$ac_optarg ;; | |
1601 | ||
1602 | -localstatedir | --localstatedir | --localstatedi | --localstated \ | |
1603 | | --localstate | --localstat | --localsta | --localst | --locals) | |
1604 | ac_prev=localstatedir ;; | |
1605 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
1606 | | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) | |
1607 | localstatedir=$ac_optarg ;; | |
1608 | ||
1609 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
1610 | ac_prev=mandir ;; | |
1611 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
1612 | mandir=$ac_optarg ;; | |
1613 | ||
1614 | -nfp | --nfp | --nf) | |
1615 | # Obsolete; use --without-fp. | |
1616 | with_fp=no ;; | |
1617 | ||
1618 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
1619 | | --no-cr | --no-c | -n) | |
1620 | no_create=yes ;; | |
1621 | ||
1622 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
1623 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
1624 | no_recursion=yes ;; | |
1625 | ||
1626 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | |
1627 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
1628 | | --oldin | --oldi | --old | --ol | --o) | |
1629 | ac_prev=oldincludedir ;; | |
1630 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
1631 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
1632 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
1633 | oldincludedir=$ac_optarg ;; | |
1634 | ||
1635 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
1636 | ac_prev=prefix ;; | |
1637 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
1638 | prefix=$ac_optarg ;; | |
1639 | ||
1640 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
1641 | | --program-pre | --program-pr | --program-p) | |
1642 | ac_prev=program_prefix ;; | |
1643 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
1644 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
1645 | program_prefix=$ac_optarg ;; | |
1646 | ||
1647 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
1648 | | --program-suf | --program-su | --program-s) | |
1649 | ac_prev=program_suffix ;; | |
1650 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
1651 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
1652 | program_suffix=$ac_optarg ;; | |
1653 | ||
1654 | -program-transform-name | --program-transform-name \ | |
1655 | | --program-transform-nam | --program-transform-na \ | |
1656 | | --program-transform-n | --program-transform- \ | |
1657 | | --program-transform | --program-transfor \ | |
1658 | | --program-transfo | --program-transf \ | |
1659 | | --program-trans | --program-tran \ | |
1660 | | --progr-tra | --program-tr | --program-t) | |
1661 | ac_prev=program_transform_name ;; | |
1662 | -program-transform-name=* | --program-transform-name=* \ | |
1663 | | --program-transform-nam=* | --program-transform-na=* \ | |
1664 | | --program-transform-n=* | --program-transform-=* \ | |
1665 | | --program-transform=* | --program-transfor=* \ | |
1666 | | --program-transfo=* | --program-transf=* \ | |
1667 | | --program-trans=* | --program-tran=* \ | |
1668 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
1669 | program_transform_name=$ac_optarg ;; | |
1670 | ||
1671 | -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) | |
1672 | ac_prev=pdfdir ;; | |
1673 | -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) | |
1674 | pdfdir=$ac_optarg ;; | |
1675 | ||
1676 | -psdir | --psdir | --psdi | --psd | --ps) | |
1677 | ac_prev=psdir ;; | |
1678 | -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) | |
1679 | psdir=$ac_optarg ;; | |
1680 | ||
1681 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
1682 | | -silent | --silent | --silen | --sile | --sil) | |
1683 | silent=yes ;; | |
1684 | ||
1685 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | |
1686 | ac_prev=sbindir ;; | |
1687 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
1688 | | --sbi=* | --sb=*) | |
1689 | sbindir=$ac_optarg ;; | |
1690 | ||
1691 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
1692 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
1693 | | --sharedst | --shareds | --shared | --share | --shar \ | |
1694 | | --sha | --sh) | |
1695 | ac_prev=sharedstatedir ;; | |
1696 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
1697 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
1698 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
1699 | | --sha=* | --sh=*) | |
1700 | sharedstatedir=$ac_optarg ;; | |
1701 | ||
1702 | -site | --site | --sit) | |
1703 | ac_prev=site ;; | |
1704 | -site=* | --site=* | --sit=*) | |
1705 | site=$ac_optarg ;; | |
1706 | ||
1707 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
1708 | ac_prev=srcdir ;; | |
1709 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
1710 | srcdir=$ac_optarg ;; | |
1711 | ||
1712 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | |
1713 | | --syscon | --sysco | --sysc | --sys | --sy) | |
1714 | ac_prev=sysconfdir ;; | |
1715 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
1716 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
1717 | sysconfdir=$ac_optarg ;; | |
1718 | ||
1719 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
1720 | ac_prev=target_alias ;; | |
1721 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) | |
1722 | target_alias=$ac_optarg ;; | |
1723 | ||
1724 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
1725 | verbose=yes ;; | |
1726 | ||
1727 | -version | --version | --versio | --versi | --vers | -V) | |
1728 | ac_init_version=: ;; | |
1729 | ||
1730 | -with-* | --with-*) | |
1731 | ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` | |
1732 | # Reject names that are not valid shell variable names. | |
1733 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && | |
a9bec17c | 1734 | as_fn_error "invalid package name: $ac_useropt" |
067d23c9 KY |
1735 | ac_useropt_orig=$ac_useropt |
1736 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1737 | case $ac_user_opts in | |
1738 | *" | |
1739 | "with_$ac_useropt" | |
1740 | "*) ;; | |
1741 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" | |
1742 | ac_unrecognized_sep=', ';; | |
1743 | esac | |
1744 | eval with_$ac_useropt=\$ac_optarg ;; | |
1745 | ||
1746 | -without-* | --without-*) | |
1747 | ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` | |
1748 | # Reject names that are not valid shell variable names. | |
1749 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && | |
a9bec17c | 1750 | as_fn_error "invalid package name: $ac_useropt" |
067d23c9 KY |
1751 | ac_useropt_orig=$ac_useropt |
1752 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1753 | case $ac_user_opts in | |
1754 | *" | |
1755 | "with_$ac_useropt" | |
1756 | "*) ;; | |
1757 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" | |
1758 | ac_unrecognized_sep=', ';; | |
1759 | esac | |
1760 | eval with_$ac_useropt=no ;; | |
1761 | ||
1762 | --x) | |
1763 | # Obsolete; use --with-x. | |
1764 | with_x=yes ;; | |
1765 | ||
1766 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
1767 | | --x-incl | --x-inc | --x-in | --x-i) | |
1768 | ac_prev=x_includes ;; | |
1769 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
1770 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
1771 | x_includes=$ac_optarg ;; | |
1772 | ||
1773 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
1774 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
1775 | ac_prev=x_libraries ;; | |
1776 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
1777 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
1778 | x_libraries=$ac_optarg ;; | |
1779 | ||
a9bec17c GM |
1780 | -*) as_fn_error "unrecognized option: \`$ac_option' |
1781 | Try \`$0 --help' for more information." | |
067d23c9 KY |
1782 | ;; |
1783 | ||
1784 | *=*) | |
1785 | ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` | |
1786 | # Reject names that are not valid shell variable names. | |
1787 | case $ac_envvar in #( | |
1788 | '' | [0-9]* | *[!_$as_cr_alnum]* ) | |
a9bec17c | 1789 | as_fn_error "invalid variable name: \`$ac_envvar'" ;; |
067d23c9 KY |
1790 | esac |
1791 | eval $ac_envvar=\$ac_optarg | |
1792 | export $ac_envvar ;; | |
1793 | ||
1794 | *) | |
1795 | # FIXME: should be removed in autoconf 3.0. | |
1796 | $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 | |
1797 | expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && | |
1798 | $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 | |
a9bec17c | 1799 | : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} |
067d23c9 KY |
1800 | ;; |
1801 | ||
1802 | esac | |
1803 | done | |
1804 | ||
1805 | if test -n "$ac_prev"; then | |
1806 | ac_option=--`echo $ac_prev | sed 's/_/-/g'` | |
a9bec17c | 1807 | as_fn_error "missing argument to $ac_option" |
067d23c9 KY |
1808 | fi |
1809 | ||
1810 | if test -n "$ac_unrecognized_opts"; then | |
1811 | case $enable_option_checking in | |
1812 | no) ;; | |
a9bec17c | 1813 | fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; |
067d23c9 KY |
1814 | *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; |
1815 | esac | |
1816 | fi | |
1817 | ||
1818 | # Check all directory arguments for consistency. | |
1819 | for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ | |
1820 | datadir sysconfdir sharedstatedir localstatedir includedir \ | |
1821 | oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ | |
1822 | libdir localedir mandir | |
1823 | do | |
1824 | eval ac_val=\$$ac_var | |
1825 | # Remove trailing slashes. | |
1826 | case $ac_val in | |
1827 | */ ) | |
1828 | ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` | |
1829 | eval $ac_var=\$ac_val;; | |
1830 | esac | |
1831 | # Be sure to have absolute directory names. | |
1832 | case $ac_val in | |
1833 | [\\/$]* | ?:[\\/]* ) continue;; | |
1834 | NONE | '' ) case $ac_var in *prefix ) continue;; esac;; | |
1835 | esac | |
a9bec17c | 1836 | as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" |
067d23c9 KY |
1837 | done |
1838 | ||
1839 | # There might be people who depend on the old broken behavior: `$host' | |
1840 | # used to hold the argument of --host etc. | |
1841 | # FIXME: To remove some day. | |
1842 | build=$build_alias | |
1843 | host=$host_alias | |
1844 | target=$target_alias | |
1845 | ||
1846 | # FIXME: To remove some day. | |
1847 | if test "x$host_alias" != x; then | |
1848 | if test "x$build_alias" = x; then | |
1849 | cross_compiling=maybe | |
a9bec17c GM |
1850 | $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. |
1851 | If a cross compiler is detected then cross compile mode will be used." >&2 | |
067d23c9 KY |
1852 | elif test "x$build_alias" != "x$host_alias"; then |
1853 | cross_compiling=yes | |
1854 | fi | |
1855 | fi | |
1856 | ||
1857 | ac_tool_prefix= | |
1858 | test -n "$host_alias" && ac_tool_prefix=$host_alias- | |
1859 | ||
1860 | test "$silent" = yes && exec 6>/dev/null | |
1861 | ||
1862 | ||
1863 | ac_pwd=`pwd` && test -n "$ac_pwd" && | |
1864 | ac_ls_di=`ls -di .` && | |
1865 | ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || | |
a9bec17c | 1866 | as_fn_error "working directory cannot be determined" |
067d23c9 | 1867 | test "X$ac_ls_di" = "X$ac_pwd_ls_di" || |
a9bec17c | 1868 | as_fn_error "pwd does not report name of working directory" |
067d23c9 KY |
1869 | |
1870 | ||
1871 | # Find the source files, if location was not specified. | |
1872 | if test -z "$srcdir"; then | |
1873 | ac_srcdir_defaulted=yes | |
1874 | # Try the directory containing this script, then the parent directory. | |
1875 | ac_confdir=`$as_dirname -- "$as_myself" || | |
1876 | $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
1877 | X"$as_myself" : 'X\(//\)[^/]' \| \ | |
1878 | X"$as_myself" : 'X\(//\)$' \| \ | |
1879 | X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || | |
1880 | $as_echo X"$as_myself" | | |
1881 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
1882 | s//\1/ | |
1883 | q | |
1884 | } | |
1885 | /^X\(\/\/\)[^/].*/{ | |
1886 | s//\1/ | |
1887 | q | |
1888 | } | |
1889 | /^X\(\/\/\)$/{ | |
1890 | s//\1/ | |
1891 | q | |
1892 | } | |
1893 | /^X\(\/\).*/{ | |
1894 | s//\1/ | |
1895 | q | |
1896 | } | |
1897 | s/.*/./; q'` | |
1898 | srcdir=$ac_confdir | |
1899 | if test ! -r "$srcdir/$ac_unique_file"; then | |
1900 | srcdir=.. | |
1901 | fi | |
1902 | else | |
1903 | ac_srcdir_defaulted=no | |
1904 | fi | |
1905 | if test ! -r "$srcdir/$ac_unique_file"; then | |
1906 | test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." | |
a9bec17c | 1907 | as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" |
067d23c9 KY |
1908 | fi |
1909 | ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" | |
1910 | ac_abs_confdir=`( | |
a9bec17c | 1911 | cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" |
067d23c9 KY |
1912 | pwd)` |
1913 | # When building in place, set srcdir=. | |
1914 | if test "$ac_abs_confdir" = "$ac_pwd"; then | |
1915 | srcdir=. | |
1916 | fi | |
1917 | # Remove unnecessary trailing slashes from srcdir. | |
1918 | # Double slashes in file names in object file debugging info | |
1919 | # mess up M-x gdb in Emacs. | |
1920 | case $srcdir in | |
1921 | */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; | |
1922 | esac | |
1923 | for ac_var in $ac_precious_vars; do | |
1924 | eval ac_env_${ac_var}_set=\${${ac_var}+set} | |
1925 | eval ac_env_${ac_var}_value=\$${ac_var} | |
1926 | eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} | |
1927 | eval ac_cv_env_${ac_var}_value=\$${ac_var} | |
1928 | done | |
1929 | ||
1930 | # | |
1931 | # Report the --help message. | |
1932 | # | |
1933 | if test "$ac_init_help" = "long"; then | |
1934 | # Omit some internal or obsolete options to make the list less imposing. | |
1935 | # This message is too long to be a string in the A/UX 3.1 sh. | |
1936 | cat <<_ACEOF | |
250c8ab9 | 1937 | \`configure' configures emacs 24.2.50 to adapt to many kinds of systems. |
067d23c9 KY |
1938 | |
1939 | Usage: $0 [OPTION]... [VAR=VALUE]... | |
1940 | ||
1941 | To assign environment variables (e.g., CC, CFLAGS...), specify them as | |
1942 | VAR=VALUE. See below for descriptions of some of the useful variables. | |
1943 | ||
1944 | Defaults for the options are specified in brackets. | |
1945 | ||
1946 | Configuration: | |
1947 | -h, --help display this help and exit | |
1948 | --help=short display options specific to this package | |
1949 | --help=recursive display the short help of all the included packages | |
1950 | -V, --version display version information and exit | |
a9bec17c | 1951 | -q, --quiet, --silent do not print \`checking...' messages |
067d23c9 KY |
1952 | --cache-file=FILE cache test results in FILE [disabled] |
1953 | -C, --config-cache alias for \`--cache-file=config.cache' | |
1954 | -n, --no-create do not create output files | |
1955 | --srcdir=DIR find the sources in DIR [configure dir or \`..'] | |
1956 | ||
1957 | Installation directories: | |
1958 | --prefix=PREFIX install architecture-independent files in PREFIX | |
1959 | [$ac_default_prefix] | |
1960 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX | |
1961 | [PREFIX] | |
1962 | ||
1963 | By default, \`make install' will install all the files in | |
1964 | \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify | |
1965 | an installation prefix other than \`$ac_default_prefix' using \`--prefix', | |
1966 | for instance \`--prefix=\$HOME'. | |
1967 | ||
1968 | For better control, use the options below. | |
1969 | ||
1970 | Fine tuning of the installation directories: | |
1971 | --bindir=DIR user executables [EPREFIX/bin] | |
1972 | --sbindir=DIR system admin executables [EPREFIX/sbin] | |
1973 | --libexecdir=DIR program executables [EPREFIX/libexec] | |
1974 | --sysconfdir=DIR read-only single-machine data [PREFIX/etc] | |
1975 | --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] | |
1976 | --localstatedir=DIR modifiable single-machine data [PREFIX/var] | |
1977 | --libdir=DIR object code libraries [EPREFIX/lib] | |
1978 | --includedir=DIR C header files [PREFIX/include] | |
1979 | --oldincludedir=DIR C header files for non-gcc [/usr/include] | |
1980 | --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] | |
1981 | --datadir=DIR read-only architecture-independent data [DATAROOTDIR] | |
1982 | --infodir=DIR info documentation [DATAROOTDIR/info] | |
1983 | --localedir=DIR locale-dependent data [DATAROOTDIR/locale] | |
1984 | --mandir=DIR man documentation [DATAROOTDIR/man] | |
1985 | --docdir=DIR documentation root [DATAROOTDIR/doc/emacs] | |
1986 | --htmldir=DIR html documentation [DOCDIR] | |
1987 | --dvidir=DIR dvi documentation [DOCDIR] | |
1988 | --pdfdir=DIR pdf documentation [DOCDIR] | |
1989 | --psdir=DIR ps documentation [DOCDIR] | |
1990 | _ACEOF | |
1991 | ||
1992 | cat <<\_ACEOF | |
1993 | ||
1994 | Program names: | |
1995 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
1996 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
1997 | --program-transform-name=PROGRAM run sed PROGRAM on installed program names | |
1998 | ||
1999 | X features: | |
2000 | --x-includes=DIR X include files are in DIR | |
2001 | --x-libraries=DIR X library files are in DIR | |
2002 | ||
2003 | System types: | |
2004 | --build=BUILD configure for building on BUILD [guessed] | |
2005 | --host=HOST cross-compile to build programs to run on HOST [BUILD] | |
2006 | _ACEOF | |
2007 | fi | |
2008 | ||
2009 | if test -n "$ac_init_help"; then | |
2010 | case $ac_init_help in | |
250c8ab9 | 2011 | short | recursive ) echo "Configuration of emacs 24.2.50:";; |
067d23c9 KY |
2012 | esac |
2013 | cat <<\_ACEOF | |
2014 | ||
2015 | Optional Features: | |
2016 | --disable-option-checking ignore unrecognized --enable/--with options | |
2017 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) | |
2018 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
2019 | --disable-ns-self-contained | |
2020 | disable self contained build under NeXTstep | |
067d23c9 KY |
2021 | --enable-locallisppath=PATH |
2022 | directories Emacs should search for lisp files | |
2023 | specific to this site | |
2024 | --enable-checking[=LIST] | |
2025 | enable expensive run-time checks. With LIST, enable | |
2026 | only specific categories of checks. Categories are: | |
2027 | all,yes,no. Flags are: stringbytes, stringoverrun, | |
7ee3791f | 2028 | stringfreelist, xmallocoverrun, conslist, glyphs |
afd07e01 GM |
2029 | --enable-check-lisp-object-type |
2030 | enable compile time checks for the Lisp_Object data | |
2031 | type. This is useful for development for catching | |
2032 | certain types of bugs. | |
067d23c9 KY |
2033 | --enable-profiling build emacs with profiling support. This might not |
2034 | work on all platforms | |
2035 | --enable-autodepend automatically generate dependencies to .h-files. | |
2036 | Requires GNU Make and Gcc. Enabled if GNU Make and | |
2037 | Gcc is found | |
743c80a7 PE |
2038 | --disable-dependency-tracking speeds up one-time build |
2039 | --enable-dependency-tracking do not reject slow dependency extractors | |
067d23c9 | 2040 | --disable-largefile omit support for large files |
938a4ef9 GM |
2041 | --enable-gcc-warnings turn on lots of GCC warnings. This is intended for |
2042 | developers, and may generate false alarms when used | |
2043 | with older or non-GNU development tools. | |
e4d35030 GM |
2044 | --enable-link-time-optimization |
2045 | build emacs with link-time optimization. This is | |
2046 | supported only for GCC since 4.5.0. | |
067d23c9 KY |
2047 | |
2048 | Optional Packages: | |
2049 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
2050 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
ee77919d GM |
2051 | --without-all omit almost all features and build small executable |
2052 | with minimal dependencies | |
067d23c9 KY |
2053 | --without-pop don't support POP mail retrieval with movemail |
2054 | --with-kerberos support Kerberos-authenticated POP | |
2055 | --with-kerberos5 support Kerberos version 5 authenticated POP | |
2056 | --with-hesiod support Hesiod to get the POP server host | |
2057 | --with-mmdf support MMDF mailboxes | |
2058 | --with-mail-unlink unlink, rather than empty, mail spool after reading | |
2059 | --with-mailhost=HOSTNAME | |
2060 | string giving default POP mail host | |
2061 | --without-sound don't compile with sound support | |
2062 | --without-sync-input process async input synchronously | |
2063 | --with-x-toolkit=KIT use an X toolkit (KIT one of: yes or gtk, gtk3, | |
2064 | lucid or athena, motif, no) | |
0442dc7f | 2065 | --with-wide-int prefer wide Emacs integers (typically 62-bit) |
067d23c9 KY |
2066 | --without-xpm don't compile with XPM image support |
2067 | --without-jpeg don't compile with JPEG image support | |
2068 | --without-tiff don't compile with TIFF image support | |
2069 | --without-gif don't compile with GIF image support | |
2070 | --without-png don't compile with PNG image support | |
2071 | --without-rsvg don't compile with SVG image support | |
2072 | --without-xml2 don't compile with XML parsing support | |
2073 | --without-imagemagick don't compile with ImageMagick image support | |
2074 | --without-xft don't use XFT for anti aliased fonts | |
2075 | --without-libotf don't use libotf for OpenType font support | |
2076 | --without-m17n-flt don't use m17n-flt for text shaping | |
2077 | --without-toolkit-scroll-bars | |
2078 | don't use Motif or Xaw3d scroll bars | |
2079 | --without-xaw3d don't use Xaw3d | |
2080 | --without-xim don't use X11 XIM | |
7834125e | 2081 | --with-ns use NeXTstep (Cocoa or GNUstep) windowing system |
067d23c9 KY |
2082 | --without-gpm don't use -lgpm for mouse support on a GNU/Linux |
2083 | console | |
2084 | --without-dbus don't compile with D-Bus support | |
2085 | --without-gconf don't compile with GConf support | |
f527bd02 | 2086 | --without-gsettings don't compile with GSettings support |
067d23c9 KY |
2087 | --without-selinux don't compile with SELinux support |
2088 | --without-gnutls don't use -lgnutls for SSL/TLS support | |
2089 | --without-makeinfo don't require makeinfo for building manuals | |
2090 | --without-compress-info don't compress the installed Info pages | |
2091 | --with-pkg-config-prog=PATH | |
2092 | path to pkg-config for finding GTK and librsvg | |
2093 | --with-crt-dir=DIR directory containing crtn.o etc. The default is | |
2094 | /usr/lib, or /usr/lib64 on some platforms. | |
4fc5868a | 2095 | --with-gameuser=USER user for shared game score files |
067d23c9 KY |
2096 | --with-gnustep-conf=PATH |
2097 | path to GNUstep.conf; default $GNUSTEP_CONFIG_FILE, | |
2098 | or /etc/GNUstep/GNUstep.conf | |
2099 | --with-x use the X Window System | |
2100 | ||
2101 | Some influential environment variables: | |
2102 | CC C compiler command | |
2103 | CFLAGS C compiler flags | |
2104 | LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a | |
2105 | nonstandard directory <lib dir> | |
2106 | LIBS libraries to pass to the linker, e.g. -l<library> | |
2107 | CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if | |
2108 | you have headers in a nonstandard directory <include dir> | |
2109 | CPP C preprocessor | |
2110 | XMKMF Path to xmkmf, Makefile generator for X Window System | |
2111 | ||
2112 | Use these variables to override the choices made by `configure' or to help | |
2113 | it to find libraries and programs with nonstandard names/locations. | |
2114 | ||
2115 | Report bugs to the package provider. | |
2116 | _ACEOF | |
2117 | ac_status=$? | |
2118 | fi | |
2119 | ||
2120 | if test "$ac_init_help" = "recursive"; then | |
2121 | # If there are subdirs, report their specific --help. | |
2122 | for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue | |
2123 | test -d "$ac_dir" || | |
2124 | { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || | |
2125 | continue | |
2126 | ac_builddir=. | |
2127 | ||
2128 | case "$ac_dir" in | |
2129 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
2130 | *) | |
2131 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
2132 | # A ".." for each directory in $ac_dir_suffix. | |
2133 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
2134 | case $ac_top_builddir_sub in | |
2135 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
2136 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
2137 | esac ;; | |
2138 | esac | |
2139 | ac_abs_top_builddir=$ac_pwd | |
2140 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
2141 | # for backward compatibility: | |
2142 | ac_top_builddir=$ac_top_build_prefix | |
2143 | ||
2144 | case $srcdir in | |
2145 | .) # We are building in place. | |
2146 | ac_srcdir=. | |
2147 | ac_top_srcdir=$ac_top_builddir_sub | |
2148 | ac_abs_top_srcdir=$ac_pwd ;; | |
2149 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
2150 | ac_srcdir=$srcdir$ac_dir_suffix; | |
2151 | ac_top_srcdir=$srcdir | |
2152 | ac_abs_top_srcdir=$srcdir ;; | |
2153 | *) # Relative name. | |
2154 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
2155 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
2156 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
2157 | esac | |
2158 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix | |
2159 | ||
2160 | cd "$ac_dir" || { ac_status=$?; continue; } | |
2161 | # Check for guested configure. | |
2162 | if test -f "$ac_srcdir/configure.gnu"; then | |
2163 | echo && | |
2164 | $SHELL "$ac_srcdir/configure.gnu" --help=recursive | |
2165 | elif test -f "$ac_srcdir/configure"; then | |
2166 | echo && | |
2167 | $SHELL "$ac_srcdir/configure" --help=recursive | |
2168 | else | |
2169 | $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 | |
2170 | fi || ac_status=$? | |
2171 | cd "$ac_pwd" || { ac_status=$?; break; } | |
2172 | done | |
2173 | fi | |
2174 | ||
2175 | test -n "$ac_init_help" && exit $ac_status | |
2176 | if $ac_init_version; then | |
2177 | cat <<\_ACEOF | |
250c8ab9 | 2178 | emacs configure 24.2.50 |
a9bec17c | 2179 | generated by GNU Autoconf 2.65 |
067d23c9 | 2180 | |
a9bec17c | 2181 | Copyright (C) 2009 Free Software Foundation, Inc. |
067d23c9 KY |
2182 | This configure script is free software; the Free Software Foundation |
2183 | gives unlimited permission to copy, distribute and modify it. | |
2184 | _ACEOF | |
2185 | exit | |
2186 | fi | |
2187 | ||
2188 | ## ------------------------ ## | |
2189 | ## Autoconf initialization. ## | |
2190 | ## ------------------------ ## | |
2191 | ||
2192 | # ac_fn_c_try_compile LINENO | |
2193 | # -------------------------- | |
2194 | # Try to compile conftest.$ac_ext, and return whether this succeeded. | |
2195 | ac_fn_c_try_compile () | |
2196 | { | |
2197 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2198 | rm -f conftest.$ac_objext | |
2199 | if { { ac_try="$ac_compile" | |
2200 | case "(($ac_try" in | |
2201 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2202 | *) ac_try_echo=$ac_try;; | |
2203 | esac | |
2204 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
2205 | $as_echo "$ac_try_echo"; } >&5 | |
2206 | (eval "$ac_compile") 2>conftest.err | |
2207 | ac_status=$? | |
2208 | if test -s conftest.err; then | |
2209 | grep -v '^ *+' conftest.err >conftest.er1 | |
2210 | cat conftest.er1 >&5 | |
2211 | mv -f conftest.er1 conftest.err | |
2212 | fi | |
2213 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
2214 | test $ac_status = 0; } && { | |
2215 | test -z "$ac_c_werror_flag" || | |
2216 | test ! -s conftest.err | |
2217 | } && test -s conftest.$ac_objext; then : | |
2218 | ac_retval=0 | |
2219 | else | |
2220 | $as_echo "$as_me: failed program was:" >&5 | |
2221 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2222 | ||
2223 | ac_retval=1 | |
2224 | fi | |
a9bec17c | 2225 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} |
067d23c9 KY |
2226 | as_fn_set_status $ac_retval |
2227 | ||
2228 | } # ac_fn_c_try_compile | |
2229 | ||
067d23c9 KY |
2230 | # ac_fn_c_try_cpp LINENO |
2231 | # ---------------------- | |
2232 | # Try to preprocess conftest.$ac_ext, and return whether this succeeded. | |
2233 | ac_fn_c_try_cpp () | |
2234 | { | |
2235 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2236 | if { { ac_try="$ac_cpp conftest.$ac_ext" | |
2237 | case "(($ac_try" in | |
2238 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2239 | *) ac_try_echo=$ac_try;; | |
2240 | esac | |
2241 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
2242 | $as_echo "$ac_try_echo"; } >&5 | |
2243 | (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err | |
2244 | ac_status=$? | |
2245 | if test -s conftest.err; then | |
2246 | grep -v '^ *+' conftest.err >conftest.er1 | |
2247 | cat conftest.er1 >&5 | |
2248 | mv -f conftest.er1 conftest.err | |
2249 | fi | |
2250 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
a9bec17c | 2251 | test $ac_status = 0; } >/dev/null && { |
067d23c9 KY |
2252 | test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || |
2253 | test ! -s conftest.err | |
2254 | }; then : | |
2255 | ac_retval=0 | |
2256 | else | |
2257 | $as_echo "$as_me: failed program was:" >&5 | |
2258 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2259 | ||
2260 | ac_retval=1 | |
2261 | fi | |
a9bec17c | 2262 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} |
067d23c9 KY |
2263 | as_fn_set_status $ac_retval |
2264 | ||
2265 | } # ac_fn_c_try_cpp | |
2266 | ||
2267 | # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES | |
2268 | # ------------------------------------------------------- | |
2269 | # Tests whether HEADER exists, giving a warning if it cannot be compiled using | |
2270 | # the include files in INCLUDES and setting the cache variable VAR | |
2271 | # accordingly. | |
2272 | ac_fn_c_check_header_mongrel () | |
2273 | { | |
2274 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
a9bec17c | 2275 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : |
067d23c9 KY |
2276 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 |
2277 | $as_echo_n "checking for $2... " >&6; } | |
a9bec17c | 2278 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : |
067d23c9 KY |
2279 | $as_echo_n "(cached) " >&6 |
2280 | fi | |
2281 | eval ac_res=\$$3 | |
2282 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2283 | $as_echo "$ac_res" >&6; } | |
2284 | else | |
2285 | # Is the header compilable? | |
2286 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 | |
2287 | $as_echo_n "checking $2 usability... " >&6; } | |
2288 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2289 | /* end confdefs.h. */ | |
2290 | $4 | |
2291 | #include <$2> | |
2292 | _ACEOF | |
2293 | if ac_fn_c_try_compile "$LINENO"; then : | |
2294 | ac_header_compiler=yes | |
2295 | else | |
2296 | ac_header_compiler=no | |
2297 | fi | |
2298 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2299 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 | |
2300 | $as_echo "$ac_header_compiler" >&6; } | |
2301 | ||
2302 | # Is the header present? | |
2303 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 | |
2304 | $as_echo_n "checking $2 presence... " >&6; } | |
2305 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2306 | /* end confdefs.h. */ | |
2307 | #include <$2> | |
2308 | _ACEOF | |
2309 | if ac_fn_c_try_cpp "$LINENO"; then : | |
2310 | ac_header_preproc=yes | |
2311 | else | |
2312 | ac_header_preproc=no | |
2313 | fi | |
a9bec17c | 2314 | rm -f conftest.err conftest.$ac_ext |
067d23c9 KY |
2315 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 |
2316 | $as_echo "$ac_header_preproc" >&6; } | |
2317 | ||
2318 | # So? What about this header? | |
2319 | case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( | |
2320 | yes:no: ) | |
2321 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 | |
2322 | $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} | |
2323 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
2324 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
2325 | ;; | |
2326 | no:yes:* ) | |
2327 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 | |
2328 | $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} | |
2329 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 | |
2330 | $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} | |
2331 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 | |
2332 | $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} | |
2333 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 | |
2334 | $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} | |
2335 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
2336 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
2337 | ;; | |
2338 | esac | |
2339 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2340 | $as_echo_n "checking for $2... " >&6; } | |
a9bec17c | 2341 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : |
067d23c9 KY |
2342 | $as_echo_n "(cached) " >&6 |
2343 | else | |
2344 | eval "$3=\$ac_header_compiler" | |
2345 | fi | |
2346 | eval ac_res=\$$3 | |
2347 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2348 | $as_echo "$ac_res" >&6; } | |
2349 | fi | |
a9bec17c | 2350 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} |
067d23c9 KY |
2351 | |
2352 | } # ac_fn_c_check_header_mongrel | |
2353 | ||
2354 | # ac_fn_c_try_run LINENO | |
2355 | # ---------------------- | |
2356 | # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes | |
2357 | # that executables *can* be run. | |
2358 | ac_fn_c_try_run () | |
2359 | { | |
2360 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2361 | if { { ac_try="$ac_link" | |
2362 | case "(($ac_try" in | |
2363 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2364 | *) ac_try_echo=$ac_try;; | |
2365 | esac | |
2366 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
2367 | $as_echo "$ac_try_echo"; } >&5 | |
2368 | (eval "$ac_link") 2>&5 | |
2369 | ac_status=$? | |
2370 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
2371 | test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' | |
2372 | { { case "(($ac_try" in | |
2373 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2374 | *) ac_try_echo=$ac_try;; | |
2375 | esac | |
2376 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
2377 | $as_echo "$ac_try_echo"; } >&5 | |
2378 | (eval "$ac_try") 2>&5 | |
2379 | ac_status=$? | |
2380 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
2381 | test $ac_status = 0; }; }; then : | |
2382 | ac_retval=0 | |
2383 | else | |
2384 | $as_echo "$as_me: program exited with status $ac_status" >&5 | |
2385 | $as_echo "$as_me: failed program was:" >&5 | |
2386 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2387 | ||
2388 | ac_retval=$ac_status | |
2389 | fi | |
2390 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
a9bec17c | 2391 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} |
067d23c9 KY |
2392 | as_fn_set_status $ac_retval |
2393 | ||
2394 | } # ac_fn_c_try_run | |
2395 | ||
2396 | # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES | |
2397 | # ------------------------------------------------------- | |
2398 | # Tests whether HEADER exists and can be compiled using the include files in | |
2399 | # INCLUDES, setting the cache variable VAR accordingly. | |
2400 | ac_fn_c_check_header_compile () | |
2401 | { | |
2402 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2403 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2404 | $as_echo_n "checking for $2... " >&6; } | |
a9bec17c | 2405 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : |
067d23c9 KY |
2406 | $as_echo_n "(cached) " >&6 |
2407 | else | |
2408 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2409 | /* end confdefs.h. */ | |
2410 | $4 | |
2411 | #include <$2> | |
2412 | _ACEOF | |
2413 | if ac_fn_c_try_compile "$LINENO"; then : | |
2414 | eval "$3=yes" | |
2415 | else | |
2416 | eval "$3=no" | |
2417 | fi | |
2418 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2419 | fi | |
2420 | eval ac_res=\$$3 | |
2421 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2422 | $as_echo "$ac_res" >&6; } | |
a9bec17c | 2423 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} |
067d23c9 KY |
2424 | |
2425 | } # ac_fn_c_check_header_compile | |
2426 | ||
1fd182f0 PE |
2427 | # ac_fn_c_try_link LINENO |
2428 | # ----------------------- | |
2429 | # Try to link conftest.$ac_ext, and return whether this succeeded. | |
2430 | ac_fn_c_try_link () | |
2431 | { | |
2432 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2433 | rm -f conftest.$ac_objext conftest$ac_exeext | |
2434 | if { { ac_try="$ac_link" | |
2435 | case "(($ac_try" in | |
2436 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2437 | *) ac_try_echo=$ac_try;; | |
2438 | esac | |
2439 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
2440 | $as_echo "$ac_try_echo"; } >&5 | |
2441 | (eval "$ac_link") 2>conftest.err | |
2442 | ac_status=$? | |
2443 | if test -s conftest.err; then | |
2444 | grep -v '^ *+' conftest.err >conftest.er1 | |
2445 | cat conftest.er1 >&5 | |
2446 | mv -f conftest.er1 conftest.err | |
2447 | fi | |
2448 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
2449 | test $ac_status = 0; } && { | |
2450 | test -z "$ac_c_werror_flag" || | |
2451 | test ! -s conftest.err | |
2452 | } && test -s conftest$ac_exeext && { | |
2453 | test "$cross_compiling" = yes || | |
2454 | $as_test_x conftest$ac_exeext | |
2455 | }; then : | |
2456 | ac_retval=0 | |
2457 | else | |
2458 | $as_echo "$as_me: failed program was:" >&5 | |
2459 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2460 | ||
2461 | ac_retval=1 | |
2462 | fi | |
2463 | # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information | |
2464 | # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would | |
2465 | # interfere with the next link command; also delete a directory that is | |
2466 | # left behind by Apple's compiler. We do this before executing the actions. | |
2467 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
a9bec17c | 2468 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} |
1fd182f0 PE |
2469 | as_fn_set_status $ac_retval |
2470 | ||
2471 | } # ac_fn_c_try_link | |
2472 | ||
42bbbe8b GM |
2473 | # ac_fn_c_check_decl LINENO SYMBOL VAR |
2474 | # ------------------------------------ | |
2475 | # Tests whether SYMBOL is declared, setting cache variable VAR accordingly. | |
2476 | ac_fn_c_check_decl () | |
2477 | { | |
2478 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2479 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5 | |
2480 | $as_echo_n "checking whether $2 is declared... " >&6; } | |
2481 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
2482 | $as_echo_n "(cached) " >&6 | |
2483 | else | |
2484 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2485 | /* end confdefs.h. */ | |
2486 | $4 | |
2487 | int | |
2488 | main () | |
2489 | { | |
2490 | #ifndef $2 | |
2491 | (void) $2; | |
2492 | #endif | |
2493 | ||
2494 | ; | |
2495 | return 0; | |
2496 | } | |
2497 | _ACEOF | |
2498 | if ac_fn_c_try_compile "$LINENO"; then : | |
2499 | eval "$3=yes" | |
2500 | else | |
2501 | eval "$3=no" | |
2502 | fi | |
2503 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2504 | fi | |
2505 | eval ac_res=\$$3 | |
2506 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2507 | $as_echo "$ac_res" >&6; } | |
2508 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2509 | ||
2510 | } # ac_fn_c_check_decl | |
2511 | ||
5476a9a4 GM |
2512 | # ac_fn_c_check_header_preproc LINENO HEADER VAR |
2513 | # ---------------------------------------------- | |
2514 | # Tests whether HEADER is present, setting the cache variable VAR accordingly. | |
2515 | ac_fn_c_check_header_preproc () | |
067d23c9 KY |
2516 | { |
2517 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2518 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2519 | $as_echo_n "checking for $2... " >&6; } | |
a9bec17c | 2520 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : |
067d23c9 KY |
2521 | $as_echo_n "(cached) " >&6 |
2522 | else | |
2523 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2524 | /* end confdefs.h. */ | |
5476a9a4 GM |
2525 | #include <$2> |
2526 | _ACEOF | |
2527 | if ac_fn_c_try_cpp "$LINENO"; then : | |
2528 | eval "$3=yes" | |
2529 | else | |
2530 | eval "$3=no" | |
2531 | fi | |
2532 | rm -f conftest.err conftest.$ac_ext | |
2533 | fi | |
2534 | eval ac_res=\$$3 | |
2535 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2536 | $as_echo "$ac_res" >&6; } | |
2537 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
067d23c9 | 2538 | |
5476a9a4 | 2539 | } # ac_fn_c_check_header_preproc |
067d23c9 | 2540 | |
5476a9a4 GM |
2541 | # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES |
2542 | # ---------------------------------------------------- | |
2543 | # Tries to find if the field MEMBER exists in type AGGR, after including | |
2544 | # INCLUDES, setting cache variable VAR accordingly. | |
2545 | ac_fn_c_check_member () | |
2546 | { | |
2547 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2548 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 | |
2549 | $as_echo_n "checking for $2.$3... " >&6; } | |
2550 | if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then : | |
2551 | $as_echo_n "(cached) " >&6 | |
2552 | else | |
2553 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2554 | /* end confdefs.h. */ | |
2555 | $5 | |
2556 | int | |
2557 | main () | |
2558 | { | |
2559 | static $2 ac_aggr; | |
2560 | if (ac_aggr.$3) | |
2561 | return 0; | |
2562 | ; | |
2563 | return 0; | |
2564 | } | |
2565 | _ACEOF | |
2566 | if ac_fn_c_try_compile "$LINENO"; then : | |
2567 | eval "$4=yes" | |
2568 | else | |
2569 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2570 | /* end confdefs.h. */ | |
2571 | $5 | |
2572 | int | |
2573 | main () | |
2574 | { | |
2575 | static $2 ac_aggr; | |
2576 | if (sizeof ac_aggr.$3) | |
2577 | return 0; | |
2578 | ; | |
2579 | return 0; | |
2580 | } | |
2581 | _ACEOF | |
2582 | if ac_fn_c_try_compile "$LINENO"; then : | |
2583 | eval "$4=yes" | |
2584 | else | |
2585 | eval "$4=no" | |
2586 | fi | |
2587 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2588 | fi | |
2589 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2590 | fi | |
2591 | eval ac_res=\$$4 | |
2592 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2593 | $as_echo "$ac_res" >&6; } | |
2594 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2595 | ||
2596 | } # ac_fn_c_check_member | |
2597 | ||
2598 | # ac_fn_c_check_func LINENO FUNC VAR | |
2599 | # ---------------------------------- | |
2600 | # Tests whether FUNC exists, setting the cache variable VAR accordingly | |
2601 | ac_fn_c_check_func () | |
2602 | { | |
2603 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2604 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2605 | $as_echo_n "checking for $2... " >&6; } | |
2606 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
2607 | $as_echo_n "(cached) " >&6 | |
2608 | else | |
2609 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2610 | /* end confdefs.h. */ | |
2611 | /* Define $2 to an innocuous variant, in case <limits.h> declares $2. | |
2612 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
2613 | #define $2 innocuous_$2 | |
2614 | ||
2615 | /* System header to define __stub macros and hopefully few prototypes, | |
2616 | which can conflict with char $2 (); below. | |
2617 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
2618 | <limits.h> exists even on freestanding compilers. */ | |
2619 | ||
2620 | #ifdef __STDC__ | |
067d23c9 KY |
2621 | # include <limits.h> |
2622 | #else | |
2623 | # include <assert.h> | |
2624 | #endif | |
2625 | ||
2626 | #undef $2 | |
2627 | ||
2628 | /* Override any GCC internal prototype to avoid an error. | |
2629 | Use char because int might match the return type of a GCC | |
2630 | builtin and then its argument prototype would still apply. */ | |
2631 | #ifdef __cplusplus | |
2632 | extern "C" | |
2633 | #endif | |
2634 | char $2 (); | |
2635 | /* The GNU C library defines this for functions which it implements | |
2636 | to always fail with ENOSYS. Some functions are actually named | |
2637 | something starting with __ and the normal name is an alias. */ | |
2638 | #if defined __stub_$2 || defined __stub___$2 | |
2639 | choke me | |
2640 | #endif | |
2641 | ||
2642 | int | |
2643 | main () | |
2644 | { | |
2645 | return $2 (); | |
2646 | ; | |
2647 | return 0; | |
2648 | } | |
2649 | _ACEOF | |
2650 | if ac_fn_c_try_link "$LINENO"; then : | |
2651 | eval "$3=yes" | |
2652 | else | |
2653 | eval "$3=no" | |
2654 | fi | |
2655 | rm -f core conftest.err conftest.$ac_objext \ | |
2656 | conftest$ac_exeext conftest.$ac_ext | |
2657 | fi | |
2658 | eval ac_res=\$$3 | |
2659 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2660 | $as_echo "$ac_res" >&6; } | |
a9bec17c | 2661 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} |
067d23c9 KY |
2662 | |
2663 | } # ac_fn_c_check_func | |
2664 | ||
5476a9a4 GM |
2665 | # ac_fn_c_check_type LINENO TYPE VAR INCLUDES |
2666 | # ------------------------------------------- | |
2667 | # Tests whether TYPE exists after having included INCLUDES, setting cache | |
2668 | # variable VAR accordingly. | |
2669 | ac_fn_c_check_type () | |
3e0be4ab GM |
2670 | { |
2671 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
5476a9a4 GM |
2672 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 |
2673 | $as_echo_n "checking for $2... " >&6; } | |
2674 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
3e0be4ab GM |
2675 | $as_echo_n "(cached) " >&6 |
2676 | else | |
5476a9a4 | 2677 | eval "$3=no" |
3e0be4ab GM |
2678 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
2679 | /* end confdefs.h. */ | |
5476a9a4 | 2680 | $4 |
3e0be4ab GM |
2681 | int |
2682 | main () | |
2683 | { | |
5476a9a4 GM |
2684 | if (sizeof ($2)) |
2685 | return 0; | |
3e0be4ab GM |
2686 | ; |
2687 | return 0; | |
2688 | } | |
2689 | _ACEOF | |
2690 | if ac_fn_c_try_compile "$LINENO"; then : | |
2691 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2692 | /* end confdefs.h. */ | |
5476a9a4 | 2693 | $4 |
3e0be4ab GM |
2694 | int |
2695 | main () | |
2696 | { | |
5476a9a4 GM |
2697 | if (sizeof (($2))) |
2698 | return 0; | |
3e0be4ab GM |
2699 | ; |
2700 | return 0; | |
2701 | } | |
2702 | _ACEOF | |
2703 | if ac_fn_c_try_compile "$LINENO"; then : | |
5476a9a4 | 2704 | |
3e0be4ab | 2705 | else |
5476a9a4 | 2706 | eval "$3=yes" |
3e0be4ab GM |
2707 | fi |
2708 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2709 | fi | |
2710 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2711 | fi | |
5476a9a4 | 2712 | eval ac_res=\$$3 |
3e0be4ab GM |
2713 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 |
2714 | $as_echo "$ac_res" >&6; } | |
a9bec17c | 2715 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} |
3e0be4ab | 2716 | |
5476a9a4 | 2717 | } # ac_fn_c_check_type |
3e0be4ab | 2718 | |
5f90be1b PE |
2719 | # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES |
2720 | # -------------------------------------------- | |
2721 | # Tries to find the compile-time value of EXPR in a program that includes | |
2722 | # INCLUDES, setting VAR accordingly. Returns whether the value could be | |
2723 | # computed | |
2724 | ac_fn_c_compute_int () | |
2725 | { | |
2726 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2727 | if test "$cross_compiling" = yes; then | |
2728 | # Depending upon the size, compute the lo and hi bounds. | |
2729 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2730 | /* end confdefs.h. */ | |
2731 | $4 | |
2732 | int | |
2733 | main () | |
2734 | { | |
2735 | static int test_array [1 - 2 * !(($2) >= 0)]; | |
2736 | test_array [0] = 0 | |
2737 | ||
2738 | ; | |
2739 | return 0; | |
2740 | } | |
2741 | _ACEOF | |
2742 | if ac_fn_c_try_compile "$LINENO"; then : | |
2743 | ac_lo=0 ac_mid=0 | |
2744 | while :; do | |
2745 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2746 | /* end confdefs.h. */ | |
2747 | $4 | |
2748 | int | |
2749 | main () | |
2750 | { | |
2751 | static int test_array [1 - 2 * !(($2) <= $ac_mid)]; | |
2752 | test_array [0] = 0 | |
2753 | ||
2754 | ; | |
2755 | return 0; | |
2756 | } | |
2757 | _ACEOF | |
2758 | if ac_fn_c_try_compile "$LINENO"; then : | |
2759 | ac_hi=$ac_mid; break | |
2760 | else | |
2761 | as_fn_arith $ac_mid + 1 && ac_lo=$as_val | |
2762 | if test $ac_lo -le $ac_mid; then | |
2763 | ac_lo= ac_hi= | |
2764 | break | |
2765 | fi | |
2766 | as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val | |
2767 | fi | |
2768 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2769 | done | |
2770 | else | |
2771 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2772 | /* end confdefs.h. */ | |
2773 | $4 | |
2774 | int | |
2775 | main () | |
2776 | { | |
2777 | static int test_array [1 - 2 * !(($2) < 0)]; | |
2778 | test_array [0] = 0 | |
2779 | ||
2780 | ; | |
2781 | return 0; | |
2782 | } | |
2783 | _ACEOF | |
2784 | if ac_fn_c_try_compile "$LINENO"; then : | |
2785 | ac_hi=-1 ac_mid=-1 | |
2786 | while :; do | |
2787 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2788 | /* end confdefs.h. */ | |
2789 | $4 | |
2790 | int | |
2791 | main () | |
2792 | { | |
2793 | static int test_array [1 - 2 * !(($2) >= $ac_mid)]; | |
2794 | test_array [0] = 0 | |
2795 | ||
2796 | ; | |
2797 | return 0; | |
2798 | } | |
2799 | _ACEOF | |
2800 | if ac_fn_c_try_compile "$LINENO"; then : | |
2801 | ac_lo=$ac_mid; break | |
2802 | else | |
2803 | as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val | |
2804 | if test $ac_mid -le $ac_hi; then | |
2805 | ac_lo= ac_hi= | |
2806 | break | |
2807 | fi | |
2808 | as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val | |
2809 | fi | |
2810 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2811 | done | |
2812 | else | |
2813 | ac_lo= ac_hi= | |
2814 | fi | |
2815 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2816 | fi | |
2817 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2818 | # Binary search between lo and hi bounds. | |
2819 | while test "x$ac_lo" != "x$ac_hi"; do | |
2820 | as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val | |
2821 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2822 | /* end confdefs.h. */ | |
2823 | $4 | |
2824 | int | |
2825 | main () | |
2826 | { | |
2827 | static int test_array [1 - 2 * !(($2) <= $ac_mid)]; | |
2828 | test_array [0] = 0 | |
2829 | ||
2830 | ; | |
2831 | return 0; | |
2832 | } | |
2833 | _ACEOF | |
2834 | if ac_fn_c_try_compile "$LINENO"; then : | |
2835 | ac_hi=$ac_mid | |
2836 | else | |
2837 | as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val | |
2838 | fi | |
2839 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2840 | done | |
2841 | case $ac_lo in #(( | |
2842 | ?*) eval "$3=\$ac_lo"; ac_retval=0 ;; | |
2843 | '') ac_retval=1 ;; | |
2844 | esac | |
2845 | else | |
2846 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2847 | /* end confdefs.h. */ | |
2848 | $4 | |
2849 | static long int longval () { return $2; } | |
2850 | static unsigned long int ulongval () { return $2; } | |
2851 | #include <stdio.h> | |
2852 | #include <stdlib.h> | |
2853 | int | |
2854 | main () | |
2855 | { | |
2856 | ||
2857 | FILE *f = fopen ("conftest.val", "w"); | |
2858 | if (! f) | |
2859 | return 1; | |
2860 | if (($2) < 0) | |
2861 | { | |
2862 | long int i = longval (); | |
2863 | if (i != ($2)) | |
2864 | return 1; | |
2865 | fprintf (f, "%ld", i); | |
2866 | } | |
2867 | else | |
2868 | { | |
2869 | unsigned long int i = ulongval (); | |
2870 | if (i != ($2)) | |
2871 | return 1; | |
2872 | fprintf (f, "%lu", i); | |
2873 | } | |
2874 | /* Do not output a trailing newline, as this causes \r\n confusion | |
2875 | on some platforms. */ | |
2876 | return ferror (f) || fclose (f) != 0; | |
2877 | ||
2878 | ; | |
2879 | return 0; | |
2880 | } | |
2881 | _ACEOF | |
2882 | if ac_fn_c_try_run "$LINENO"; then : | |
2883 | echo >>conftest.val; read $3 <conftest.val; ac_retval=0 | |
2884 | else | |
2885 | ac_retval=1 | |
2886 | fi | |
2887 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
2888 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
2889 | rm -f conftest.val | |
2890 | ||
2891 | fi | |
a9bec17c | 2892 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} |
5f90be1b PE |
2893 | as_fn_set_status $ac_retval |
2894 | ||
2895 | } # ac_fn_c_compute_int | |
067d23c9 KY |
2896 | cat >config.log <<_ACEOF |
2897 | This file contains any messages produced by compilers while | |
2898 | running configure, to aid debugging if configure makes a mistake. | |
2899 | ||
250c8ab9 | 2900 | It was created by emacs $as_me 24.2.50, which was |
a9bec17c | 2901 | generated by GNU Autoconf 2.65. Invocation command line was |
067d23c9 KY |
2902 | |
2903 | $ $0 $@ | |
2904 | ||
2905 | _ACEOF | |
2906 | exec 5>>config.log | |
2907 | { | |
2908 | cat <<_ASUNAME | |
2909 | ## --------- ## | |
2910 | ## Platform. ## | |
2911 | ## --------- ## | |
2912 | ||
2913 | hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` | |
2914 | uname -m = `(uname -m) 2>/dev/null || echo unknown` | |
2915 | uname -r = `(uname -r) 2>/dev/null || echo unknown` | |
2916 | uname -s = `(uname -s) 2>/dev/null || echo unknown` | |
2917 | uname -v = `(uname -v) 2>/dev/null || echo unknown` | |
2918 | ||
2919 | /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` | |
2920 | /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` | |
2921 | ||
2922 | /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` | |
2923 | /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` | |
2924 | /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` | |
2925 | /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` | |
2926 | /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` | |
2927 | /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` | |
2928 | /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` | |
2929 | ||
2930 | _ASUNAME | |
2931 | ||
2932 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2933 | for as_dir in $PATH | |
2934 | do | |
2935 | IFS=$as_save_IFS | |
2936 | test -z "$as_dir" && as_dir=. | |
2937 | $as_echo "PATH: $as_dir" | |
2938 | done | |
2939 | IFS=$as_save_IFS | |
2940 | ||
2941 | } >&5 | |
2942 | ||
2943 | cat >&5 <<_ACEOF | |
2944 | ||
2945 | ||
2946 | ## ----------- ## | |
2947 | ## Core tests. ## | |
2948 | ## ----------- ## | |
2949 | ||
2950 | _ACEOF | |
2951 | ||
2952 | ||
2953 | # Keep a trace of the command line. | |
2954 | # Strip out --no-create and --no-recursion so they do not pile up. | |
2955 | # Strip out --silent because we don't want to record it for future runs. | |
2956 | # Also quote any args containing shell meta-characters. | |
2957 | # Make two passes to allow for proper duplicate-argument suppression. | |
2958 | ac_configure_args= | |
2959 | ac_configure_args0= | |
2960 | ac_configure_args1= | |
2961 | ac_must_keep_next=false | |
2962 | for ac_pass in 1 2 | |
2963 | do | |
2964 | for ac_arg | |
2965 | do | |
2966 | case $ac_arg in | |
2967 | -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; | |
2968 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
2969 | | -silent | --silent | --silen | --sile | --sil) | |
2970 | continue ;; | |
2971 | *\'*) | |
2972 | ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
2973 | esac | |
2974 | case $ac_pass in | |
2975 | 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; | |
2976 | 2) | |
2977 | as_fn_append ac_configure_args1 " '$ac_arg'" | |
2978 | if test $ac_must_keep_next = true; then | |
2979 | ac_must_keep_next=false # Got value, back to normal. | |
2980 | else | |
2981 | case $ac_arg in | |
2982 | *=* | --config-cache | -C | -disable-* | --disable-* \ | |
2983 | | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | |
2984 | | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | |
2985 | | -with-* | --with-* | -without-* | --without-* | --x) | |
2986 | case "$ac_configure_args0 " in | |
2987 | "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; | |
2988 | esac | |
2989 | ;; | |
2990 | -* ) ac_must_keep_next=true ;; | |
2991 | esac | |
2992 | fi | |
2993 | as_fn_append ac_configure_args " '$ac_arg'" | |
2994 | ;; | |
2995 | esac | |
2996 | done | |
2997 | done | |
2998 | { ac_configure_args0=; unset ac_configure_args0;} | |
2999 | { ac_configure_args1=; unset ac_configure_args1;} | |
3000 | ||
3001 | # When interrupted or exit'd, cleanup temporary files, and complete | |
3002 | # config.log. We remove comments because anyway the quotes in there | |
3003 | # would cause problems or look ugly. | |
3004 | # WARNING: Use '\'' to represent an apostrophe within the trap. | |
3005 | # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. | |
3006 | trap 'exit_status=$? | |
3007 | # Save into config.log some information that might help in debugging. | |
3008 | { | |
3009 | echo | |
3010 | ||
a9bec17c GM |
3011 | cat <<\_ASBOX |
3012 | ## ---------------- ## | |
067d23c9 | 3013 | ## Cache variables. ## |
a9bec17c GM |
3014 | ## ---------------- ## |
3015 | _ASBOX | |
067d23c9 KY |
3016 | echo |
3017 | # The following way of writing the cache mishandles newlines in values, | |
3018 | ( | |
3019 | for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do | |
3020 | eval ac_val=\$$ac_var | |
3021 | case $ac_val in #( | |
3022 | *${as_nl}*) | |
3023 | case $ac_var in #( | |
3024 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
3025 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
3026 | esac | |
3027 | case $ac_var in #( | |
3028 | _ | IFS | as_nl) ;; #( | |
3029 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
3030 | *) { eval $ac_var=; unset $ac_var;} ;; | |
3031 | esac ;; | |
3032 | esac | |
3033 | done | |
3034 | (set) 2>&1 | | |
3035 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( | |
3036 | *${as_nl}ac_space=\ *) | |
3037 | sed -n \ | |
3038 | "s/'\''/'\''\\\\'\'''\''/g; | |
3039 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" | |
3040 | ;; #( | |
3041 | *) | |
3042 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" | |
3043 | ;; | |
3044 | esac | | |
3045 | sort | |
3046 | ) | |
3047 | echo | |
3048 | ||
a9bec17c GM |
3049 | cat <<\_ASBOX |
3050 | ## ----------------- ## | |
067d23c9 | 3051 | ## Output variables. ## |
a9bec17c GM |
3052 | ## ----------------- ## |
3053 | _ASBOX | |
067d23c9 KY |
3054 | echo |
3055 | for ac_var in $ac_subst_vars | |
3056 | do | |
3057 | eval ac_val=\$$ac_var | |
3058 | case $ac_val in | |
3059 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
3060 | esac | |
3061 | $as_echo "$ac_var='\''$ac_val'\''" | |
3062 | done | sort | |
3063 | echo | |
3064 | ||
3065 | if test -n "$ac_subst_files"; then | |
a9bec17c GM |
3066 | cat <<\_ASBOX |
3067 | ## ------------------- ## | |
067d23c9 | 3068 | ## File substitutions. ## |
a9bec17c GM |
3069 | ## ------------------- ## |
3070 | _ASBOX | |
067d23c9 KY |
3071 | echo |
3072 | for ac_var in $ac_subst_files | |
3073 | do | |
3074 | eval ac_val=\$$ac_var | |
3075 | case $ac_val in | |
3076 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
3077 | esac | |
3078 | $as_echo "$ac_var='\''$ac_val'\''" | |
3079 | done | sort | |
3080 | echo | |
3081 | fi | |
3082 | ||
3083 | if test -s confdefs.h; then | |
a9bec17c GM |
3084 | cat <<\_ASBOX |
3085 | ## ----------- ## | |
067d23c9 | 3086 | ## confdefs.h. ## |
a9bec17c GM |
3087 | ## ----------- ## |
3088 | _ASBOX | |
067d23c9 KY |
3089 | echo |
3090 | cat confdefs.h | |
3091 | echo | |
3092 | fi | |
3093 | test "$ac_signal" != 0 && | |
3094 | $as_echo "$as_me: caught signal $ac_signal" | |
3095 | $as_echo "$as_me: exit $exit_status" | |
3096 | } >&5 | |
3097 | rm -f core *.core core.conftest.* && | |
3098 | rm -f -r conftest* confdefs* conf$$* $ac_clean_files && | |
3099 | exit $exit_status | |
3100 | ' 0 | |
3101 | for ac_signal in 1 2 13 15; do | |
3102 | trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal | |
3103 | done | |
3104 | ac_signal=0 | |
3105 | ||
3106 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
3107 | rm -f -r conftest* confdefs.h | |
3108 | ||
3109 | $as_echo "/* confdefs.h */" > confdefs.h | |
3110 | ||
3111 | # Predefined preprocessor variables. | |
3112 | ||
3113 | cat >>confdefs.h <<_ACEOF | |
3114 | #define PACKAGE_NAME "$PACKAGE_NAME" | |
3115 | _ACEOF | |
3116 | ||
3117 | cat >>confdefs.h <<_ACEOF | |
3118 | #define PACKAGE_TARNAME "$PACKAGE_TARNAME" | |
3119 | _ACEOF | |
3120 | ||
3121 | cat >>confdefs.h <<_ACEOF | |
3122 | #define PACKAGE_VERSION "$PACKAGE_VERSION" | |
3123 | _ACEOF | |
3124 | ||
3125 | cat >>confdefs.h <<_ACEOF | |
3126 | #define PACKAGE_STRING "$PACKAGE_STRING" | |
3127 | _ACEOF | |
3128 | ||
3129 | cat >>confdefs.h <<_ACEOF | |
3130 | #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" | |
3131 | _ACEOF | |
3132 | ||
3133 | cat >>confdefs.h <<_ACEOF | |
3134 | #define PACKAGE_URL "$PACKAGE_URL" | |
3135 | _ACEOF | |
3136 | ||
3137 | ||
3138 | # Let the site file select an alternate cache file if it wants to. | |
3139 | # Prefer an explicitly selected file to automatically selected ones. | |
3140 | ac_site_file1=NONE | |
3141 | ac_site_file2=NONE | |
3142 | if test -n "$CONFIG_SITE"; then | |
a9bec17c | 3143 | ac_site_file1=$CONFIG_SITE |
067d23c9 KY |
3144 | elif test "x$prefix" != xNONE; then |
3145 | ac_site_file1=$prefix/share/config.site | |
3146 | ac_site_file2=$prefix/etc/config.site | |
3147 | else | |
3148 | ac_site_file1=$ac_default_prefix/share/config.site | |
3149 | ac_site_file2=$ac_default_prefix/etc/config.site | |
3150 | fi | |
3151 | for ac_site_file in "$ac_site_file1" "$ac_site_file2" | |
3152 | do | |
3153 | test "x$ac_site_file" = xNONE && continue | |
3154 | if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then | |
3155 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 | |
3156 | $as_echo "$as_me: loading site script $ac_site_file" >&6;} | |
3157 | sed 's/^/| /' "$ac_site_file" >&5 | |
a9bec17c | 3158 | . "$ac_site_file" |
067d23c9 KY |
3159 | fi |
3160 | done | |
3161 | ||
3162 | if test -r "$cache_file"; then | |
3163 | # Some versions of bash will fail to source /dev/null (special files | |
3164 | # actually), so we avoid doing that. DJGPP emulates it as a regular file. | |
3165 | if test /dev/null != "$cache_file" && test -f "$cache_file"; then | |
3166 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 | |
3167 | $as_echo "$as_me: loading cache $cache_file" >&6;} | |
3168 | case $cache_file in | |
3169 | [\\/]* | ?:[\\/]* ) . "$cache_file";; | |
3170 | *) . "./$cache_file";; | |
3171 | esac | |
3172 | fi | |
3173 | else | |
3174 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 | |
3175 | $as_echo "$as_me: creating cache $cache_file" >&6;} | |
3176 | >$cache_file | |
3177 | fi | |
3178 | ||
5476a9a4 GM |
3179 | as_fn_append ac_header_list " linux/version.h" |
3180 | as_fn_append ac_header_list " sys/systeminfo.h" | |
3181 | as_fn_append ac_header_list " stdio_ext.h" | |
3182 | as_fn_append ac_header_list " fcntl.h" | |
3183 | as_fn_append ac_header_list " coff.h" | |
3184 | as_fn_append ac_header_list " pty.h" | |
3185 | as_fn_append ac_header_list " sys/vlimit.h" | |
3186 | as_fn_append ac_header_list " sys/resource.h" | |
3187 | as_fn_append ac_header_list " sys/utsname.h" | |
3188 | as_fn_append ac_header_list " pwd.h" | |
3189 | as_fn_append ac_header_list " utmp.h" | |
3190 | as_fn_append ac_header_list " dirent.h" | |
3191 | as_fn_append ac_header_list " util.h" | |
3192 | as_fn_append ac_header_list " sys/socket.h" | |
3193 | as_fn_append ac_header_list " stdlib.h" | |
3194 | as_fn_append ac_header_list " unistd.h" | |
7e723570 | 3195 | as_fn_append ac_header_list " sys/param.h" |
5476a9a4 GM |
3196 | as_fn_append ac_header_list " pthread.h" |
3197 | as_fn_append ac_header_list " malloc/malloc.h" | |
3198 | as_fn_append ac_header_list " maillock.h" | |
3199 | as_fn_append ac_header_list " sys/un.h" | |
3200 | as_fn_append ac_func_list " tzset" | |
3201 | as_fn_append ac_func_list " readlinkat" | |
8966cbff | 3202 | as_fn_append ac_header_list " execinfo.h" |
f199cab1 GM |
3203 | gl_getopt_required=GNU |
3204 | as_fn_append ac_header_list " getopt.h" | |
3205 | as_fn_append ac_func_list " gettimeofday" | |
3206 | as_fn_append ac_func_list " nanotime" | |
e700232f | 3207 | as_fn_append ac_header_list " sys/time.h" |
f199cab1 GM |
3208 | as_fn_append ac_header_list " wchar.h" |
3209 | as_fn_append ac_header_list " stdint.h" | |
3210 | as_fn_append ac_header_list " inttypes.h" | |
3211 | as_fn_append ac_func_list " lstat" | |
f199cab1 GM |
3212 | as_fn_append ac_func_list " alarm" |
3213 | as_fn_append ac_header_list " sys/select.h" | |
3214 | as_fn_append ac_func_list " pselect" | |
3215 | as_fn_append ac_func_list " pthread_sigmask" | |
3216 | as_fn_append ac_func_list " readlink" | |
f199cab1 GM |
3217 | as_fn_append ac_func_list " strtoimax" |
3218 | as_fn_append ac_func_list " strtoumax" | |
3219 | as_fn_append ac_func_list " symlink" | |
3220 | as_fn_append ac_header_list " sys/stat.h" | |
3221 | as_fn_append ac_func_list " localtime_r" | |
e700232f | 3222 | as_fn_append ac_header_list " utime.h" |
f199cab1 GM |
3223 | as_fn_append ac_func_list " futimes" |
3224 | as_fn_append ac_func_list " futimesat" | |
3225 | as_fn_append ac_func_list " futimens" | |
3226 | as_fn_append ac_func_list " utimensat" | |
3227 | as_fn_append ac_func_list " lutimes" | |
067d23c9 KY |
3228 | # Check that the precious variables saved in the cache have kept the same |
3229 | # value. | |
3230 | ac_cache_corrupted=false | |
3231 | for ac_var in $ac_precious_vars; do | |
3232 | eval ac_old_set=\$ac_cv_env_${ac_var}_set | |
3233 | eval ac_new_set=\$ac_env_${ac_var}_set | |
3234 | eval ac_old_val=\$ac_cv_env_${ac_var}_value | |
3235 | eval ac_new_val=\$ac_env_${ac_var}_value | |
3236 | case $ac_old_set,$ac_new_set in | |
3237 | set,) | |
3238 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 | |
3239 | $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} | |
3240 | ac_cache_corrupted=: ;; | |
3241 | ,set) | |
3242 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 | |
3243 | $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} | |
3244 | ac_cache_corrupted=: ;; | |
3245 | ,);; | |
3246 | *) | |
3247 | if test "x$ac_old_val" != "x$ac_new_val"; then | |
3248 | # differences in whitespace do not lead to failure. | |
3249 | ac_old_val_w=`echo x $ac_old_val` | |
3250 | ac_new_val_w=`echo x $ac_new_val` | |
3251 | if test "$ac_old_val_w" != "$ac_new_val_w"; then | |
3252 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 | |
3253 | $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} | |
3254 | ac_cache_corrupted=: | |
3255 | else | |
3256 | { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 | |
3257 | $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} | |
3258 | eval $ac_var=\$ac_old_val | |
3259 | fi | |
3260 | { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 | |
3261 | $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} | |
3262 | { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 | |
3263 | $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} | |
3264 | fi;; | |
3265 | esac | |
3266 | # Pass precious variables to config.status. | |
3267 | if test "$ac_new_set" = set; then | |
3268 | case $ac_new_val in | |
3269 | *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; | |
3270 | *) ac_arg=$ac_var=$ac_new_val ;; | |
3271 | esac | |
3272 | case " $ac_configure_args " in | |
3273 | *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. | |
3274 | *) as_fn_append ac_configure_args " '$ac_arg'" ;; | |
3275 | esac | |
3276 | fi | |
3277 | done | |
3278 | if $ac_cache_corrupted; then | |
3279 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
3280 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3281 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 | |
3282 | $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} | |
a9bec17c | 3283 | as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 |
067d23c9 KY |
3284 | fi |
3285 | ## -------------------- ## | |
3286 | ## Main body of script. ## | |
3287 | ## -------------------- ## | |
3288 | ||
3289 | ac_ext=c | |
3290 | ac_cpp='$CPP $CPPFLAGS' | |
3291 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3292 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3293 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
3294 | ||
3295 | ||
3296 | ac_config_headers="$ac_config_headers src/config.h:src/config.in" | |
3297 | ||
3298 | ||
743c80a7 | 3299 | ac_aux_dir= |
369e19fc | 3300 | for ac_dir in build-aux "$srcdir"/build-aux; do |
a9bec17c GM |
3301 | for ac_t in install-sh install.sh shtool; do |
3302 | if test -f "$ac_dir/$ac_t"; then | |
3303 | ac_aux_dir=$ac_dir | |
3304 | ac_install_sh="$ac_aux_dir/$ac_t -c" | |
3305 | break 2 | |
3306 | fi | |
3307 | done | |
743c80a7 PE |
3308 | done |
3309 | if test -z "$ac_aux_dir"; then | |
a9bec17c | 3310 | as_fn_error "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5 |
743c80a7 | 3311 | fi |
067d23c9 | 3312 | |
743c80a7 PE |
3313 | # These three variables are undocumented and unsupported, |
3314 | # and are intended to be withdrawn in a future Autoconf release. | |
3315 | # They can cause serious problems if a builder's source tree is in a directory | |
3316 | # whose full name contains unusual characters. | |
3317 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. | |
3318 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. | |
3319 | ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. | |
067d23c9 | 3320 | |
067d23c9 | 3321 | |
369e19fc PE |
3322 | am__api_version='1.11' |
3323 | ||
743c80a7 PE |
3324 | # Find a good install program. We prefer a C program (faster), |
3325 | # so one script is as good as another. But avoid the broken or | |
3326 | # incompatible versions: | |
3327 | # SysV /etc/install, /usr/sbin/install | |
3328 | # SunOS /usr/etc/install | |
3329 | # IRIX /sbin/install | |
3330 | # AIX /bin/install | |
3331 | # AmigaOS /C/install, which installs bootblocks on floppy discs | |
3332 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag | |
3333 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
3334 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
3335 | # OS/2's system install, which has a completely different semantic | |
3336 | # ./install, which can be erroneously created by make from ./install.sh. | |
3337 | # Reject install programs that cannot install multiple files. | |
3338 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 | |
3339 | $as_echo_n "checking for a BSD-compatible install... " >&6; } | |
3340 | if test -z "$INSTALL"; then | |
a9bec17c | 3341 | if test "${ac_cv_path_install+set}" = set; then : |
743c80a7 PE |
3342 | $as_echo_n "(cached) " >&6 |
3343 | else | |
3344 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3345 | for as_dir in $PATH | |
3346 | do | |
3347 | IFS=$as_save_IFS | |
3348 | test -z "$as_dir" && as_dir=. | |
3349 | # Account for people who put trailing slashes in PATH elements. | |
3350 | case $as_dir/ in #(( | |
3351 | ./ | .// | /[cC]/* | \ | |
3352 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ | |
3353 | ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ | |
3354 | /usr/ucb/* ) ;; | |
3355 | *) | |
3356 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
3357 | # Don't use installbsd from OSF since it installs stuff as root | |
3358 | # by default. | |
3359 | for ac_prog in ginstall scoinst install; do | |
3360 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3361 | if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then | |
3362 | if test $ac_prog = install && | |
3363 | grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
3364 | # AIX install. It has an incompatible calling convention. | |
3365 | : | |
3366 | elif test $ac_prog = install && | |
3367 | grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
3368 | # program-specific install script used by HP pwplus--don't use. | |
3369 | : | |
3370 | else | |
3371 | rm -rf conftest.one conftest.two conftest.dir | |
3372 | echo one > conftest.one | |
3373 | echo two > conftest.two | |
3374 | mkdir conftest.dir | |
3375 | if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && | |
3376 | test -s conftest.one && test -s conftest.two && | |
3377 | test -s conftest.dir/conftest.one && | |
3378 | test -s conftest.dir/conftest.two | |
3379 | then | |
3380 | ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" | |
3381 | break 3 | |
3382 | fi | |
3383 | fi | |
3384 | fi | |
3385 | done | |
3386 | done | |
3387 | ;; | |
3388 | esac | |
067d23c9 | 3389 | |
743c80a7 PE |
3390 | done |
3391 | IFS=$as_save_IFS | |
067d23c9 | 3392 | |
743c80a7 | 3393 | rm -rf conftest.one conftest.two conftest.dir |
067d23c9 | 3394 | |
067d23c9 | 3395 | fi |
743c80a7 PE |
3396 | if test "${ac_cv_path_install+set}" = set; then |
3397 | INSTALL=$ac_cv_path_install | |
3398 | else | |
3399 | # As a last resort, use the slow shell script. Don't cache a | |
3400 | # value for INSTALL within a source directory, because that will | |
3401 | # break other packages using the cache if that directory is | |
3402 | # removed, or if the value is a relative name. | |
3403 | INSTALL=$ac_install_sh | |
3404 | fi | |
067d23c9 | 3405 | fi |
743c80a7 PE |
3406 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 |
3407 | $as_echo "$INSTALL" >&6; } | |
067d23c9 | 3408 | |
743c80a7 PE |
3409 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. |
3410 | # It thinks the first close brace ends the variable substitution. | |
3411 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
067d23c9 | 3412 | |
743c80a7 | 3413 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' |
067d23c9 | 3414 | |
743c80a7 | 3415 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' |
067d23c9 | 3416 | |
743c80a7 PE |
3417 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 |
3418 | $as_echo_n "checking whether build environment is sane... " >&6; } | |
3419 | # Just in case | |
3420 | sleep 1 | |
3421 | echo timestamp > conftest.file | |
3422 | # Reject unsafe characters in $srcdir or the absolute working directory | |
3423 | # name. Accept space and tab only in the latter. | |
3424 | am_lf=' | |
3425 | ' | |
3426 | case `pwd` in | |
3427 | *[\\\"\#\$\&\'\`$am_lf]*) | |
a9bec17c | 3428 | as_fn_error "unsafe absolute working directory name" "$LINENO" 5;; |
743c80a7 PE |
3429 | esac |
3430 | case $srcdir in | |
3431 | *[\\\"\#\$\&\'\`$am_lf\ \ ]*) | |
a9bec17c | 3432 | as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; |
743c80a7 | 3433 | esac |
067d23c9 | 3434 | |
743c80a7 PE |
3435 | # Do `set' in a subshell so we don't clobber the current shell's |
3436 | # arguments. Must try -L first in case configure is actually a | |
3437 | # symlink; some systems play weird games with the mod time of symlinks | |
3438 | # (eg FreeBSD returns the mod time of the symlink's containing | |
3439 | # directory). | |
3440 | if ( | |
3441 | set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` | |
3442 | if test "$*" = "X"; then | |
3443 | # -L didn't work. | |
3444 | set X `ls -t "$srcdir/configure" conftest.file` | |
3445 | fi | |
3446 | rm -f conftest.file | |
3447 | if test "$*" != "X $srcdir/configure conftest.file" \ | |
3448 | && test "$*" != "X conftest.file $srcdir/configure"; then | |
3449 | ||
3450 | # If neither matched, then we have a broken ls. This can happen | |
3451 | # if, for instance, CONFIG_SHELL is bash and it inherits a | |
3452 | # broken ls alias from the environment. This has actually | |
3453 | # happened. Such a system could not be considered "sane". | |
a9bec17c | 3454 | as_fn_error "ls -t appears to fail. Make sure there is not a broken |
743c80a7 PE |
3455 | alias in your environment" "$LINENO" 5 |
3456 | fi | |
067d23c9 | 3457 | |
743c80a7 PE |
3458 | test "$2" = conftest.file |
3459 | ) | |
3460 | then | |
3461 | # Ok. | |
3462 | : | |
067d23c9 | 3463 | else |
a9bec17c | 3464 | as_fn_error "newly created file is older than distributed files! |
743c80a7 | 3465 | Check your system clock" "$LINENO" 5 |
067d23c9 | 3466 | fi |
743c80a7 PE |
3467 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
3468 | $as_echo "yes" >&6; } | |
3469 | test "$program_prefix" != NONE && | |
3470 | program_transform_name="s&^&$program_prefix&;$program_transform_name" | |
3471 | # Use a double $ so make ignores it. | |
3472 | test "$program_suffix" != NONE && | |
3473 | program_transform_name="s&\$&$program_suffix&;$program_transform_name" | |
3474 | # Double any \ or $. | |
3475 | # By default was `s,x,x', remove it if useless. | |
3476 | ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' | |
3477 | program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` | |
067d23c9 | 3478 | |
743c80a7 PE |
3479 | # expand $ac_aux_dir to an absolute path |
3480 | am_aux_dir=`cd $ac_aux_dir && pwd` | |
067d23c9 | 3481 | |
743c80a7 PE |
3482 | if test x"${MISSING+set}" != xset; then |
3483 | case $am_aux_dir in | |
3484 | *\ * | *\ *) | |
3485 | MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; | |
3486 | *) | |
3487 | MISSING="\${SHELL} $am_aux_dir/missing" ;; | |
3488 | esac | |
067d23c9 | 3489 | fi |
743c80a7 PE |
3490 | # Use eval to expand $SHELL |
3491 | if eval "$MISSING --run true"; then | |
3492 | am_missing_run="$MISSING --run " | |
067d23c9 | 3493 | else |
743c80a7 PE |
3494 | am_missing_run= |
3495 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 | |
3496 | $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} | |
067d23c9 KY |
3497 | fi |
3498 | ||
743c80a7 PE |
3499 | if test x"${install_sh}" != xset; then |
3500 | case $am_aux_dir in | |
3501 | *\ * | *\ *) | |
3502 | install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; | |
3503 | *) | |
3504 | install_sh="\${SHELL} $am_aux_dir/install-sh" | |
3505 | esac | |
067d23c9 KY |
3506 | fi |
3507 | ||
743c80a7 PE |
3508 | # Installed binaries are usually stripped using `strip' when the user |
3509 | # run `make install-strip'. However `strip' might not be the right | |
3510 | # tool to use in cross-compilation environments, therefore Automake | |
3511 | # will honor the `STRIP' environment variable to overrule this program. | |
3512 | if test "$cross_compiling" != no; then | |
3513 | if test -n "$ac_tool_prefix"; then | |
3514 | # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. | |
3515 | set dummy ${ac_tool_prefix}strip; ac_word=$2 | |
3516 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3517 | $as_echo_n "checking for $ac_word... " >&6; } | |
a9bec17c | 3518 | if test "${ac_cv_prog_STRIP+set}" = set; then : |
743c80a7 | 3519 | $as_echo_n "(cached) " >&6 |
067d23c9 | 3520 | else |
743c80a7 PE |
3521 | if test -n "$STRIP"; then |
3522 | ac_cv_prog_STRIP="$STRIP" # Let the user override the test. | |
3523 | else | |
3524 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3525 | for as_dir in $PATH | |
3526 | do | |
3527 | IFS=$as_save_IFS | |
3528 | test -z "$as_dir" && as_dir=. | |
3529 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3530 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
3531 | ac_cv_prog_STRIP="${ac_tool_prefix}strip" | |
3532 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3533 | break 2 | |
3534 | fi | |
3535 | done | |
3536 | done | |
3537 | IFS=$as_save_IFS | |
067d23c9 KY |
3538 | |
3539 | fi | |
067d23c9 | 3540 | fi |
743c80a7 PE |
3541 | STRIP=$ac_cv_prog_STRIP |
3542 | if test -n "$STRIP"; then | |
3543 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 | |
3544 | $as_echo "$STRIP" >&6; } | |
3545 | else | |
3546 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3547 | $as_echo "no" >&6; } | |
067d23c9 KY |
3548 | fi |
3549 | ||
3550 | ||
067d23c9 | 3551 | fi |
743c80a7 PE |
3552 | if test -z "$ac_cv_prog_STRIP"; then |
3553 | ac_ct_STRIP=$STRIP | |
3554 | # Extract the first word of "strip", so it can be a program name with args. | |
3555 | set dummy strip; ac_word=$2 | |
3556 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3557 | $as_echo_n "checking for $ac_word... " >&6; } | |
a9bec17c | 3558 | if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : |
743c80a7 PE |
3559 | $as_echo_n "(cached) " >&6 |
3560 | else | |
3561 | if test -n "$ac_ct_STRIP"; then | |
3562 | ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. | |
3563 | else | |
3564 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3565 | for as_dir in $PATH | |
3566 | do | |
3567 | IFS=$as_save_IFS | |
3568 | test -z "$as_dir" && as_dir=. | |
3569 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3570 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
3571 | ac_cv_prog_ac_ct_STRIP="strip" | |
3572 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3573 | break 2 | |
3574 | fi | |
3575 | done | |
3576 | done | |
3577 | IFS=$as_save_IFS | |
3578 | ||
3579 | fi | |
3580 | fi | |
3581 | ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP | |
3582 | if test -n "$ac_ct_STRIP"; then | |
3583 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 | |
3584 | $as_echo "$ac_ct_STRIP" >&6; } | |
3585 | else | |
3586 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3587 | $as_echo "no" >&6; } | |
3588 | fi | |
3589 | ||
3590 | if test "x$ac_ct_STRIP" = x; then | |
3591 | STRIP=":" | |
3592 | else | |
3593 | case $cross_compiling:$ac_tool_warned in | |
3594 | yes:) | |
3595 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
3596 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
3597 | ac_tool_warned=yes ;; | |
3598 | esac | |
3599 | STRIP=$ac_ct_STRIP | |
3600 | fi | |
3601 | else | |
3602 | STRIP="$ac_cv_prog_STRIP" | |
3603 | fi | |
3604 | ||
3605 | fi | |
3606 | INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" | |
3607 | ||
3608 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 | |
3609 | $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } | |
3610 | if test -z "$MKDIR_P"; then | |
a9bec17c | 3611 | if test "${ac_cv_path_mkdir+set}" = set; then : |
743c80a7 PE |
3612 | $as_echo_n "(cached) " >&6 |
3613 | else | |
3614 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3615 | for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin | |
3616 | do | |
3617 | IFS=$as_save_IFS | |
3618 | test -z "$as_dir" && as_dir=. | |
3619 | for ac_prog in mkdir gmkdir; do | |
3620 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3621 | { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue | |
3622 | case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( | |
3623 | 'mkdir (GNU coreutils) '* | \ | |
3624 | 'mkdir (coreutils) '* | \ | |
3625 | 'mkdir (fileutils) '4.1*) | |
3626 | ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext | |
3627 | break 3;; | |
3628 | esac | |
3629 | done | |
3630 | done | |
3631 | done | |
3632 | IFS=$as_save_IFS | |
3633 | ||
3634 | fi | |
3635 | ||
3636 | test -d ./--version && rmdir ./--version | |
3637 | if test "${ac_cv_path_mkdir+set}" = set; then | |
3638 | MKDIR_P="$ac_cv_path_mkdir -p" | |
3639 | else | |
3640 | # As a last resort, use the slow shell script. Don't cache a | |
3641 | # value for MKDIR_P within a source directory, because that will | |
3642 | # break other packages using the cache if that directory is | |
3643 | # removed, or if the value is a relative name. | |
3644 | MKDIR_P="$ac_install_sh -d" | |
3645 | fi | |
3646 | fi | |
3647 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 | |
3648 | $as_echo "$MKDIR_P" >&6; } | |
3649 | ||
a451f14b | 3650 | |
743c80a7 PE |
3651 | mkdir_p="$MKDIR_P" |
3652 | case $mkdir_p in | |
3653 | [\\/$]* | ?:[\\/]*) ;; | |
3654 | */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; | |
3655 | esac | |
3656 | ||
3657 | for ac_prog in gawk mawk nawk awk | |
3658 | do | |
3659 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
3660 | set dummy $ac_prog; ac_word=$2 | |
3661 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3662 | $as_echo_n "checking for $ac_word... " >&6; } | |
a9bec17c | 3663 | if test "${ac_cv_prog_AWK+set}" = set; then : |
743c80a7 PE |
3664 | $as_echo_n "(cached) " >&6 |
3665 | else | |
3666 | if test -n "$AWK"; then | |
3667 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
3668 | else | |
3669 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3670 | for as_dir in $PATH | |
3671 | do | |
3672 | IFS=$as_save_IFS | |
3673 | test -z "$as_dir" && as_dir=. | |
3674 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3675 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
3676 | ac_cv_prog_AWK="$ac_prog" | |
3677 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3678 | break 2 | |
3679 | fi | |
3680 | done | |
3681 | done | |
3682 | IFS=$as_save_IFS | |
3683 | ||
3684 | fi | |
3685 | fi | |
3686 | AWK=$ac_cv_prog_AWK | |
3687 | if test -n "$AWK"; then | |
3688 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 | |
3689 | $as_echo "$AWK" >&6; } | |
3690 | else | |
3691 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3692 | $as_echo "no" >&6; } | |
3693 | fi | |
3694 | ||
3695 | ||
3696 | test -n "$AWK" && break | |
3697 | done | |
3698 | ||
3699 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 | |
3700 | $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } | |
3701 | set x ${MAKE-make} | |
3702 | ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` | |
a9bec17c | 3703 | if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : |
743c80a7 PE |
3704 | $as_echo_n "(cached) " >&6 |
3705 | else | |
3706 | cat >conftest.make <<\_ACEOF | |
3707 | SHELL = /bin/sh | |
3708 | all: | |
3709 | @echo '@@@%%%=$(MAKE)=@@@%%%' | |
3710 | _ACEOF | |
a9bec17c | 3711 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. |
743c80a7 PE |
3712 | case `${MAKE-make} -f conftest.make 2>/dev/null` in |
3713 | *@@@%%%=?*=@@@%%%*) | |
3714 | eval ac_cv_prog_make_${ac_make}_set=yes;; | |
3715 | *) | |
3716 | eval ac_cv_prog_make_${ac_make}_set=no;; | |
3717 | esac | |
3718 | rm -f conftest.make | |
3719 | fi | |
3720 | if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then | |
3721 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
3722 | $as_echo "yes" >&6; } | |
3723 | SET_MAKE= | |
3724 | else | |
3725 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3726 | $as_echo "no" >&6; } | |
3727 | SET_MAKE="MAKE=${MAKE-make}" | |
3728 | fi | |
3729 | ||
3730 | rm -rf .tst 2>/dev/null | |
3731 | mkdir .tst 2>/dev/null | |
3732 | if test -d .tst; then | |
3733 | am__leading_dot=. | |
3734 | else | |
3735 | am__leading_dot=_ | |
3736 | fi | |
3737 | rmdir .tst 2>/dev/null | |
3738 | ||
3739 | if test "`cd $srcdir && pwd`" != "`pwd`"; then | |
3740 | # Use -I$(srcdir) only when $(srcdir) != ., so that make's output | |
3741 | # is not polluted with repeated "-I." | |
3742 | am__isrc=' -I$(srcdir)' | |
3743 | # test to see if srcdir already configured | |
3744 | if test -f $srcdir/config.status; then | |
a9bec17c | 3745 | as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 |
743c80a7 PE |
3746 | fi |
3747 | fi | |
3748 | ||
3749 | # test whether we have cygpath | |
3750 | if test -z "$CYGPATH_W"; then | |
3751 | if (cygpath --version) >/dev/null 2>/dev/null; then | |
3752 | CYGPATH_W='cygpath -w' | |
3753 | else | |
3754 | CYGPATH_W=echo | |
3755 | fi | |
3756 | fi | |
3757 | ||
3758 | ||
3759 | # Define the identity of the package. | |
3760 | PACKAGE='emacs' | |
250c8ab9 | 3761 | VERSION='24.2.50' |
743c80a7 PE |
3762 | |
3763 | ||
3764 | cat >>confdefs.h <<_ACEOF | |
3765 | #define PACKAGE "$PACKAGE" | |
3766 | _ACEOF | |
3767 | ||
3768 | ||
3769 | cat >>confdefs.h <<_ACEOF | |
3770 | #define VERSION "$VERSION" | |
3771 | _ACEOF | |
3772 | ||
3773 | # Some tools Automake needs. | |
3774 | ||
3775 | ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} | |
3776 | ||
3777 | ||
3778 | AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} | |
3779 | ||
3780 | ||
3781 | AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} | |
3782 | ||
3783 | ||
3784 | AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} | |
3785 | ||
3786 | ||
3787 | MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} | |
3788 | ||
3789 | # We need awk for the "check" target. The system "awk" is bad on | |
3790 | # some platforms. | |
3791 | # Always define AMTAR for backward compatibility. | |
3792 | ||
3793 | AMTAR=${AMTAR-"${am_missing_run}tar"} | |
3794 | ||
3795 | am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' | |
3796 | ||
3797 | ||
3798 | ||
3799 | ||
3800 | ||
3801 | ||
3802 | ||
3803 | ||
3804 | lispdir='${datadir}/emacs/${version}/lisp' | |
e1939eb1 | 3805 | leimdir='${datadir}/emacs/${version}/leim' |
397f7161 | 3806 | standardlisppath='${lispdir}:${leimdir}' |
743c80a7 PE |
3807 | locallisppath='${datadir}/emacs/${version}/site-lisp:'\ |
3808 | '${datadir}/emacs/site-lisp' | |
397f7161 | 3809 | lisppath='${locallisppath}:${standardlisppath}' |
743c80a7 PE |
3810 | etcdir='${datadir}/emacs/${version}/etc' |
3811 | archlibdir='${libexecdir}/emacs/${version}/${configuration}' | |
3812 | docdir='${datadir}/emacs/${version}/etc' | |
3813 | gamedir='${localstatedir}/games/emacs' | |
3814 | ||
ee77919d GM |
3815 | |
3816 | # Check whether --with-all was given. | |
3817 | if test "${with_all+set}" = set; then : | |
3818 | withval=$with_all; with_features=$withval | |
c0528ebe | 3819 | else |
ee77919d | 3820 | with_features=yes |
c0528ebe GM |
3821 | fi |
3822 | ||
3823 | ||
743c80a7 PE |
3824 | |
3825 | ||
3826 | ||
3827 | # Check whether --with-pop was given. | |
3828 | if test "${with_pop+set}" = set; then : | |
3829 | withval=$with_pop; | |
3830 | else | |
ee77919d | 3831 | with_pop=$with_features |
743c80a7 PE |
3832 | fi |
3833 | ||
3834 | if test "$with_pop" = yes; then | |
3835 | $as_echo "#define MAIL_USE_POP 1" >>confdefs.h | |
3836 | ||
3837 | fi | |
3838 | ||
3839 | ||
3840 | # Check whether --with-kerberos was given. | |
3841 | if test "${with_kerberos+set}" = set; then : | |
3842 | withval=$with_kerberos; | |
3843 | else | |
3844 | with_kerberos=no | |
3845 | fi | |
3846 | ||
3847 | if test "$with_kerberos" != no; then | |
3848 | $as_echo "#define KERBEROS 1" >>confdefs.h | |
3849 | ||
3850 | fi | |
3851 | ||
3852 | ||
3853 | # Check whether --with-kerberos5 was given. | |
3854 | if test "${with_kerberos5+set}" = set; then : | |
3855 | withval=$with_kerberos5; | |
3856 | else | |
3857 | with_kerberos5=no | |
3858 | fi | |
3859 | ||
3860 | if test "${with_kerberos5}" != no; then | |
3861 | if test "${with_kerberos}" = no; then | |
3862 | with_kerberos=yes | |
3863 | $as_echo "#define KERBEROS 1" >>confdefs.h | |
3864 | ||
3865 | fi | |
3866 | ||
3867 | $as_echo "#define KERBEROS5 1" >>confdefs.h | |
3868 | ||
3869 | fi | |
3870 | ||
3871 | ||
3872 | # Check whether --with-hesiod was given. | |
3873 | if test "${with_hesiod+set}" = set; then : | |
3874 | withval=$with_hesiod; | |
3875 | else | |
3876 | with_hesiod=no | |
3877 | fi | |
3878 | ||
3879 | if test "$with_hesiod" != no; then | |
3880 | ||
3881 | $as_echo "#define HESIOD 1" >>confdefs.h | |
3882 | ||
3883 | fi | |
3884 | ||
3885 | ||
3886 | # Check whether --with-mmdf was given. | |
3887 | if test "${with_mmdf+set}" = set; then : | |
3888 | withval=$with_mmdf; | |
3889 | else | |
3890 | with_mmdf=no | |
3891 | fi | |
3892 | ||
3893 | if test "$with_mmdf" != no; then | |
3894 | ||
3895 | $as_echo "#define MAIL_USE_MMDF 1" >>confdefs.h | |
3896 | ||
3897 | fi | |
3898 | ||
3899 | ||
3900 | # Check whether --with-mail-unlink was given. | |
3901 | if test "${with_mail_unlink+set}" = set; then : | |
3902 | withval=$with_mail_unlink; | |
3903 | else | |
3904 | with_mail_unlink=no | |
3905 | fi | |
3906 | ||
3907 | if test "$with_mail_unlink" != no; then | |
3908 | ||
3909 | $as_echo "#define MAIL_UNLINK_SPOOL 1" >>confdefs.h | |
3910 | ||
3911 | fi | |
3912 | ||
3913 | ||
3914 | # Check whether --with-mailhost was given. | |
3915 | if test "${with_mailhost+set}" = set; then : | |
3916 | withval=$with_mailhost; | |
3917 | cat >>confdefs.h <<_ACEOF | |
3918 | #define MAILHOST "$withval" | |
3919 | _ACEOF | |
3920 | ||
3921 | fi | |
3922 | ||
3923 | ||
3924 | ||
067d23c9 KY |
3925 | # Check whether --with-sound was given. |
3926 | if test "${with_sound+set}" = set; then : | |
3927 | withval=$with_sound; | |
3928 | else | |
ee77919d | 3929 | with_sound=$with_features |
067d23c9 KY |
3930 | fi |
3931 | ||
3932 | ||
3933 | ||
3934 | # Check whether --with-sync-input was given. | |
3935 | if test "${with_sync_input+set}" = set; then : | |
3936 | withval=$with_sync_input; | |
3937 | else | |
ee77919d | 3938 | with_sync_input=$with_features |
067d23c9 KY |
3939 | fi |
3940 | ||
3941 | if test "$with_sync_input" = yes; then | |
3942 | ||
3943 | $as_echo "#define SYNC_INPUT 1" >>confdefs.h | |
3944 | ||
3945 | fi | |
3946 | ||
3947 | ||
3948 | # Check whether --with-x-toolkit was given. | |
3949 | if test "${with_x_toolkit+set}" = set; then : | |
3950 | withval=$with_x_toolkit; case "${withval}" in | |
3951 | y | ye | yes ) val=gtk ;; | |
3952 | n | no ) val=no ;; | |
3953 | l | lu | luc | luci | lucid ) val=lucid ;; | |
3954 | a | at | ath | athe | athen | athena ) val=athena ;; | |
3955 | m | mo | mot | moti | motif ) val=motif ;; | |
3956 | g | gt | gtk ) val=gtk ;; | |
3957 | gtk3 ) val=gtk3 ;; | |
3958 | * ) | |
a9bec17c | 3959 | as_fn_error "\`--with-x-toolkit=$withval' is invalid; |
067d23c9 KY |
3960 | this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif', \`gtk' or |
3961 | \`gtk3'. \`yes' and \`gtk' are synonyms. \`athena' and \`lucid' are synonyms." "$LINENO" 5 | |
3962 | ;; | |
3963 | esac | |
3964 | with_x_toolkit=$val | |
3965 | ||
3966 | fi | |
3967 | ||
3968 | ||
3969 | ||
0442dc7f GM |
3970 | # Check whether --with-wide-int was given. |
3971 | if test "${with_wide_int+set}" = set; then : | |
3972 | withval=$with_wide_int; | |
3973 | else | |
3974 | with_wide_int=no | |
3975 | fi | |
3976 | ||
3977 | if test "$with_wide_int" = yes; then | |
3978 | ||
3979 | $as_echo "#define WIDE_EMACS_INT 1" >>confdefs.h | |
3980 | ||
3981 | fi | |
3982 | ||
3983 | ||
067d23c9 KY |
3984 | # Check whether --with-xpm was given. |
3985 | if test "${with_xpm+set}" = set; then : | |
3986 | withval=$with_xpm; | |
3987 | else | |
ee77919d | 3988 | with_xpm=$with_features |
067d23c9 KY |
3989 | fi |
3990 | ||
3991 | ||
3992 | # Check whether --with-jpeg was given. | |
3993 | if test "${with_jpeg+set}" = set; then : | |
3994 | withval=$with_jpeg; | |
3995 | else | |
ee77919d | 3996 | with_jpeg=$with_features |
067d23c9 KY |
3997 | fi |
3998 | ||
3999 | ||
4000 | # Check whether --with-tiff was given. | |
4001 | if test "${with_tiff+set}" = set; then : | |
4002 | withval=$with_tiff; | |
4003 | else | |
ee77919d | 4004 | with_tiff=$with_features |
067d23c9 KY |
4005 | fi |
4006 | ||
4007 | ||
4008 | # Check whether --with-gif was given. | |
4009 | if test "${with_gif+set}" = set; then : | |
4010 | withval=$with_gif; | |
4011 | else | |
ee77919d | 4012 | with_gif=$with_features |
067d23c9 KY |
4013 | fi |
4014 | ||
4015 | ||
4016 | # Check whether --with-png was given. | |
4017 | if test "${with_png+set}" = set; then : | |
4018 | withval=$with_png; | |
4019 | else | |
ee77919d | 4020 | with_png=$with_features |
067d23c9 KY |
4021 | fi |
4022 | ||
4023 | ||
4024 | # Check whether --with-rsvg was given. | |
4025 | if test "${with_rsvg+set}" = set; then : | |
4026 | withval=$with_rsvg; | |
4027 | else | |
ee77919d | 4028 | with_rsvg=$with_features |
067d23c9 KY |
4029 | fi |
4030 | ||
4031 | ||
4032 | # Check whether --with-xml2 was given. | |
4033 | if test "${with_xml2+set}" = set; then : | |
4034 | withval=$with_xml2; | |
4035 | else | |
ee77919d | 4036 | with_xml2=$with_features |
067d23c9 KY |
4037 | fi |
4038 | ||
4039 | ||
4040 | # Check whether --with-imagemagick was given. | |
4041 | if test "${with_imagemagick+set}" = set; then : | |
4042 | withval=$with_imagemagick; | |
4043 | else | |
ee77919d | 4044 | with_imagemagick=$with_features |
067d23c9 KY |
4045 | fi |
4046 | ||
4047 | ||
4048 | ||
4049 | # Check whether --with-xft was given. | |
4050 | if test "${with_xft+set}" = set; then : | |
4051 | withval=$with_xft; | |
4052 | else | |
ee77919d | 4053 | with_xft=$with_features |
067d23c9 KY |
4054 | fi |
4055 | ||
4056 | ||
4057 | # Check whether --with-libotf was given. | |
4058 | if test "${with_libotf+set}" = set; then : | |
4059 | withval=$with_libotf; | |
4060 | else | |
ee77919d | 4061 | with_libotf=$with_features |
067d23c9 KY |
4062 | fi |
4063 | ||
4064 | ||
4065 | # Check whether --with-m17n-flt was given. | |
4066 | if test "${with_m17n_flt+set}" = set; then : | |
4067 | withval=$with_m17n_flt; | |
4068 | else | |
ee77919d | 4069 | with_m17n_flt=$with_features |
067d23c9 KY |
4070 | fi |
4071 | ||
4072 | ||
4073 | ||
4074 | # Check whether --with-toolkit-scroll-bars was given. | |
4075 | if test "${with_toolkit_scroll_bars+set}" = set; then : | |
4076 | withval=$with_toolkit_scroll_bars; | |
4077 | else | |
ee77919d | 4078 | with_toolkit_scroll_bars=$with_features |
067d23c9 KY |
4079 | fi |
4080 | ||
4081 | ||
4082 | # Check whether --with-xaw3d was given. | |
4083 | if test "${with_xaw3d+set}" = set; then : | |
4084 | withval=$with_xaw3d; | |
4085 | else | |
ee77919d | 4086 | with_xaw3d=$with_features |
067d23c9 KY |
4087 | fi |
4088 | ||
4089 | ||
4090 | # Check whether --with-xim was given. | |
4091 | if test "${with_xim+set}" = set; then : | |
4092 | withval=$with_xim; | |
4093 | else | |
ee77919d | 4094 | with_xim=$with_features |
067d23c9 KY |
4095 | fi |
4096 | ||
4097 | ||
4098 | # Check whether --with-ns was given. | |
4099 | if test "${with_ns+set}" = set; then : | |
4100 | withval=$with_ns; | |
4101 | else | |
4102 | with_ns=no | |
4103 | fi | |
4104 | ||
4105 | ||
4106 | ||
4107 | # Check whether --with-gpm was given. | |
4108 | if test "${with_gpm+set}" = set; then : | |
4109 | withval=$with_gpm; | |
4110 | else | |
ee77919d | 4111 | with_gpm=$with_features |
067d23c9 KY |
4112 | fi |
4113 | ||
4114 | ||
4115 | # Check whether --with-dbus was given. | |
4116 | if test "${with_dbus+set}" = set; then : | |
4117 | withval=$with_dbus; | |
4118 | else | |
ee77919d | 4119 | with_dbus=$with_features |
067d23c9 KY |
4120 | fi |
4121 | ||
4122 | ||
4123 | # Check whether --with-gconf was given. | |
4124 | if test "${with_gconf+set}" = set; then : | |
4125 | withval=$with_gconf; | |
4126 | else | |
ee77919d | 4127 | with_gconf=$with_features |
067d23c9 KY |
4128 | fi |
4129 | ||
4130 | ||
f527bd02 GM |
4131 | # Check whether --with-gsettings was given. |
4132 | if test "${with_gsettings+set}" = set; then : | |
4133 | withval=$with_gsettings; | |
4134 | else | |
ee77919d | 4135 | with_gsettings=$with_features |
f527bd02 GM |
4136 | fi |
4137 | ||
4138 | ||
067d23c9 KY |
4139 | # Check whether --with-selinux was given. |
4140 | if test "${with_selinux+set}" = set; then : | |
4141 | withval=$with_selinux; | |
4142 | else | |
ee77919d | 4143 | with_selinux=$with_features |
067d23c9 KY |
4144 | fi |
4145 | ||
4146 | ||
4147 | # Check whether --with-gnutls was given. | |
4148 | if test "${with_gnutls+set}" = set; then : | |
4149 | withval=$with_gnutls; | |
4150 | else | |
ee77919d | 4151 | with_gnutls=$with_features |
067d23c9 KY |
4152 | fi |
4153 | ||
4154 | ||
4155 | ## For the times when you want to build Emacs but don't have | |
4156 | ## a suitable makeinfo, and can live without the manuals. | |
4157 | ||
4158 | # Check whether --with-makeinfo was given. | |
4159 | if test "${with_makeinfo+set}" = set; then : | |
4160 | withval=$with_makeinfo; | |
4161 | else | |
ee77919d | 4162 | with_makeinfo=$with_features |
067d23c9 KY |
4163 | fi |
4164 | ||
4165 | ||
c3a461a5 GM |
4166 | ## Makefile.in needs the cache file name. |
4167 | ||
4168 | ||
067d23c9 KY |
4169 | ## This is an option because I do not know if all info/man support |
4170 | ## compressed files, nor how to test if they do so. | |
4171 | ||
4172 | # Check whether --with-compress-info was given. | |
4173 | if test "${with_compress_info+set}" = set; then : | |
4174 | withval=$with_compress_info; | |
4175 | else | |
ee77919d | 4176 | with_compress_info=$with_features |
067d23c9 KY |
4177 | fi |
4178 | ||
4179 | if test $with_compress_info = yes; then | |
4180 | GZIP_INFO=yes | |
4181 | else | |
4182 | GZIP_INFO= | |
4183 | fi | |
4184 | ||
4185 | ||
4186 | ||
4187 | # Check whether --with-pkg-config-prog was given. | |
4188 | if test "${with_pkg_config_prog+set}" = set; then : | |
4189 | withval=$with_pkg_config_prog; | |
4190 | fi | |
4191 | ||
4192 | if test "X${with_pkg_config_prog}" != X; then | |
4193 | if test "${with_pkg_config_prog}" != yes; then | |
4194 | PKG_CONFIG="${with_pkg_config_prog}" | |
4195 | fi | |
4196 | fi | |
4197 | ||
4198 | CRT_DIR= | |
4199 | ||
4200 | # Check whether --with-crt-dir was given. | |
4201 | if test "${with_crt_dir+set}" = set; then : | |
4202 | withval=$with_crt_dir; | |
4203 | fi | |
4204 | ||
4205 | CRT_DIR="${with_crt_dir}" | |
4206 | ||
4207 | ||
4fc5868a UM |
4208 | # Check whether --with-gameuser was given. |
4209 | if test "${with_gameuser+set}" = set; then : | |
4210 | withval=$with_gameuser; | |
4211 | fi | |
4212 | ||
4213 | test "X${with_gameuser}" != X && test "${with_gameuser}" != yes \ | |
4214 | && gameuser="${with_gameuser}" | |
4215 | test "X$gameuser" = X && gameuser=games | |
4216 | ||
4217 | ||
067d23c9 KY |
4218 | # Check whether --with-gnustep-conf was given. |
4219 | if test "${with_gnustep_conf+set}" = set; then : | |
4220 | withval=$with_gnustep_conf; | |
4221 | fi | |
4222 | ||
4223 | test "X${with_gnustep_conf}" != X && test "${with_gnustep_conf}" != yes && \ | |
4224 | GNUSTEP_CONFIG_FILE="${with_gnustep_conf}" | |
4225 | test "X$GNUSTEP_CONFIG_FILE" = "X" && \ | |
4226 | GNUSTEP_CONFIG_FILE=/etc/GNUstep/GNUstep.conf | |
4227 | ||
4228 | # Check whether --enable-ns-self-contained was given. | |
4229 | if test "${enable_ns_self_contained+set}" = set; then : | |
4230 | enableval=$enable_ns_self_contained; EN_NS_SELF_CONTAINED=$enableval | |
4231 | else | |
4232 | EN_NS_SELF_CONTAINED=yes | |
4233 | fi | |
4234 | ||
4235 | ||
067d23c9 KY |
4236 | # Check whether --enable-locallisppath was given. |
4237 | if test "${enable_locallisppath+set}" = set; then : | |
4238 | enableval=$enable_locallisppath; if test "${enableval}" = "no"; then | |
4239 | locallisppath= | |
4240 | elif test "${enableval}" != "yes"; then | |
4241 | locallisppath=${enableval} | |
4242 | fi | |
4243 | fi | |
4244 | ||
4245 | ||
4246 | # Check whether --enable-checking was given. | |
4247 | if test "${enable_checking+set}" = set; then : | |
4248 | enableval=$enable_checking; ac_checking_flags="${enableval}" | |
4249 | fi | |
4250 | ||
4251 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS," | |
4252 | for check in $ac_checking_flags | |
4253 | do | |
4254 | case $check in | |
4255 | # these set all the flags to specific states | |
4256 | yes) ac_enable_checking=1 ;; | |
4257 | no) ac_enable_checking= ; | |
4258 | ac_gc_check_stringbytes= ; | |
4259 | ac_gc_check_string_overrun= ; | |
4260 | ac_gc_check_string_free_list= ; | |
4261 | ac_xmalloc_overrun= ; | |
7ee3791f | 4262 | ac_gc_check_cons_list= ; |
e4d35030 | 4263 | ac_glyphs_debug= ;; |
067d23c9 KY |
4264 | all) ac_enable_checking=1 ; |
4265 | ac_gc_check_stringbytes=1 ; | |
4266 | ac_gc_check_string_overrun=1 ; | |
4267 | ac_gc_check_string_free_list=1 ; | |
4268 | ac_xmalloc_overrun=1 ; | |
7ee3791f | 4269 | ac_gc_check_cons_list=1 ; |
e4d35030 | 4270 | ac_glyphs_debug=1 ;; |
067d23c9 KY |
4271 | # these enable particular checks |
4272 | stringbytes) ac_gc_check_stringbytes=1 ;; | |
4273 | stringoverrun) ac_gc_check_string_overrun=1 ;; | |
4274 | stringfreelist) ac_gc_check_string_free_list=1 ;; | |
4275 | xmallocoverrun) ac_xmalloc_overrun=1 ;; | |
4276 | conslist) ac_gc_check_cons_list=1 ;; | |
e4d35030 | 4277 | glyphs) ac_glyphs_debug=1 ;; |
a9bec17c | 4278 | *) as_fn_error "unknown check category $check" "$LINENO" 5 ;; |
067d23c9 KY |
4279 | esac |
4280 | done | |
4281 | IFS="$ac_save_IFS" | |
4282 | ||
4283 | if test x$ac_enable_checking != x ; then | |
4284 | ||
4285 | $as_echo "#define ENABLE_CHECKING 1" >>confdefs.h | |
4286 | ||
4287 | fi | |
4288 | if test x$ac_gc_check_stringbytes != x ; then | |
4289 | ||
4290 | $as_echo "#define GC_CHECK_STRING_BYTES 1" >>confdefs.h | |
4291 | ||
4292 | fi | |
4fda9c95 | 4293 | if test x$ac_gc_check_string_overrun != x ; then |
067d23c9 KY |
4294 | |
4295 | $as_echo "#define GC_CHECK_STRING_OVERRUN 1" >>confdefs.h | |
4296 | ||
4297 | fi | |
4298 | if test x$ac_gc_check_string_free_list != x ; then | |
4299 | ||
4300 | $as_echo "#define GC_CHECK_STRING_FREE_LIST 1" >>confdefs.h | |
4301 | ||
4302 | fi | |
4303 | if test x$ac_xmalloc_overrun != x ; then | |
4304 | ||
4305 | $as_echo "#define XMALLOC_OVERRUN_CHECK 1" >>confdefs.h | |
4306 | ||
4307 | fi | |
4308 | if test x$ac_gc_check_cons_list != x ; then | |
4309 | ||
4310 | $as_echo "#define GC_CHECK_CONS_LIST 1" >>confdefs.h | |
4311 | ||
7ee3791f | 4312 | fi |
e4d35030 | 4313 | if test x$ac_glyphs_debug != x ; then |
7ee3791f GM |
4314 | |
4315 | $as_echo "#define GLYPH_DEBUG 1" >>confdefs.h | |
4316 | ||
067d23c9 KY |
4317 | fi |
4318 | ||
afd07e01 GM |
4319 | # Check whether --enable-check-lisp-object-type was given. |
4320 | if test "${enable_check_lisp_object_type+set}" = set; then : | |
4321 | enableval=$enable_check_lisp_object_type; if test "${enableval}" != "no"; then | |
067d23c9 | 4322 | |
afd07e01 | 4323 | $as_echo "#define CHECK_LISP_OBJECT_TYPE 1" >>confdefs.h |
067d23c9 KY |
4324 | |
4325 | fi | |
4326 | fi | |
4327 | ||
4328 | ||
4329 | ||
4330 | # Check whether --enable-profiling was given. | |
4331 | if test "${enable_profiling+set}" = set; then : | |
4332 | enableval=$enable_profiling; ac_enable_profiling="${enableval}" | |
4333 | fi | |
4334 | ||
4335 | if test x$ac_enable_profiling != x ; then | |
4336 | PROFILING_CFLAGS="-DPROFILING=1 -pg" | |
4337 | else | |
4338 | PROFILING_CFLAGS= | |
4339 | fi | |
4340 | ||
4341 | ||
4342 | # Check whether --enable-autodepend was given. | |
4343 | if test "${enable_autodepend+set}" = set; then : | |
4344 | enableval=$enable_autodepend; ac_enable_autodepend="${enableval}" | |
4345 | else | |
4346 | ac_enable_autodepend=yes | |
4347 | fi | |
4348 | ||
4349 | ||
4350 | #### Make srcdir absolute, if it isn't already. It's important to | |
4351 | #### avoid running the path through pwd unnecessarily, since pwd can | |
4352 | #### give you automounter prefixes, which can go away. We do all this | |
4353 | #### so Emacs can find its files when run uninstalled. | |
4354 | ## Make sure CDPATH doesn't affect cd (in case PWD is relative). | |
4355 | unset CDPATH | |
4356 | case "${srcdir}" in | |
4357 | /* ) ;; | |
4358 | . ) | |
4359 | ## We may be able to use the $PWD environment variable to make this | |
4360 | ## absolute. But sometimes PWD is inaccurate. | |
4361 | ## Note: we used to use ${PWD} at the end instead of `pwd`, | |
4362 | ## but that tested only for a well-formed and valid PWD, | |
4363 | ## it did not object when PWD was well-formed and valid but just wrong. | |
4364 | if test ".${PWD}" != "." && test ".`(cd ${PWD} ; sh -c pwd)`" = ".`pwd`" ; | |
4365 | then | |
4366 | srcdir="$PWD" | |
4367 | else | |
4368 | srcdir="`(cd ${srcdir}; pwd)`" | |
4369 | fi | |
4370 | ;; | |
4371 | * ) srcdir="`(cd ${srcdir}; pwd)`" ;; | |
4372 | esac | |
4373 | ||
067d23c9 KY |
4374 | ### Canonicalize the configuration name. |
4375 | ||
067d23c9 KY |
4376 | # Make sure we can run config.sub. |
4377 | $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || | |
a9bec17c | 4378 | as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 |
067d23c9 KY |
4379 | |
4380 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 | |
4381 | $as_echo_n "checking build system type... " >&6; } | |
a9bec17c | 4382 | if test "${ac_cv_build+set}" = set; then : |
067d23c9 KY |
4383 | $as_echo_n "(cached) " >&6 |
4384 | else | |
4385 | ac_build_alias=$build_alias | |
4386 | test "x$ac_build_alias" = x && | |
4387 | ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` | |
4388 | test "x$ac_build_alias" = x && | |
a9bec17c | 4389 | as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 |
067d23c9 | 4390 | ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || |
a9bec17c | 4391 | as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 |
067d23c9 KY |
4392 | |
4393 | fi | |
4394 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 | |
4395 | $as_echo "$ac_cv_build" >&6; } | |
4396 | case $ac_cv_build in | |
4397 | *-*-*) ;; | |
a9bec17c | 4398 | *) as_fn_error "invalid value of canonical build" "$LINENO" 5;; |
067d23c9 KY |
4399 | esac |
4400 | build=$ac_cv_build | |
4401 | ac_save_IFS=$IFS; IFS='-' | |
4402 | set x $ac_cv_build | |
4403 | shift | |
4404 | build_cpu=$1 | |
4405 | build_vendor=$2 | |
4406 | shift; shift | |
4407 | # Remember, the first character of IFS is used to create $*, | |
4408 | # except with old shells: | |
4409 | build_os=$* | |
4410 | IFS=$ac_save_IFS | |
4411 | case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac | |
4412 | ||
4413 | ||
4414 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 | |
4415 | $as_echo_n "checking host system type... " >&6; } | |
a9bec17c | 4416 | if test "${ac_cv_host+set}" = set; then : |
067d23c9 KY |
4417 | $as_echo_n "(cached) " >&6 |
4418 | else | |
4419 | if test "x$host_alias" = x; then | |
4420 | ac_cv_host=$ac_cv_build | |
4421 | else | |
4422 | ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || | |
a9bec17c | 4423 | as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 |
067d23c9 KY |
4424 | fi |
4425 | ||
4426 | fi | |
4427 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 | |
4428 | $as_echo "$ac_cv_host" >&6; } | |
4429 | case $ac_cv_host in | |
4430 | *-*-*) ;; | |
a9bec17c | 4431 | *) as_fn_error "invalid value of canonical host" "$LINENO" 5;; |
067d23c9 KY |
4432 | esac |
4433 | host=$ac_cv_host | |
4434 | ac_save_IFS=$IFS; IFS='-' | |
4435 | set x $ac_cv_host | |
4436 | shift | |
4437 | host_cpu=$1 | |
4438 | host_vendor=$2 | |
4439 | shift; shift | |
4440 | # Remember, the first character of IFS is used to create $*, | |
4441 | # except with old shells: | |
4442 | host_os=$* | |
4443 | IFS=$ac_save_IFS | |
4444 | case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac | |
4445 | ||
4446 | ||
4447 | canonical=$host | |
4448 | configuration=${host_alias-${build_alias-$host}} | |
4449 | ||
4450 | ||
4451 | ||
4452 | ### If you add support for a new configuration, add code to this | |
4453 | ### switch statement to recognize your configuration name and select | |
42bbbe8b | 4454 | ### the appropriate operating system file. |
067d23c9 | 4455 | |
42bbbe8b | 4456 | ### You would hope that you could choose an s/*.h |
067d23c9 | 4457 | ### file based on the operating system portion. However, it turns out |
42bbbe8b | 4458 | ### that each s/*.h file is pretty manufacturer-specific. |
067d23c9 KY |
4459 | ### So we basically have to have a special case for each |
4460 | ### configuration name. | |
4461 | ### | |
4462 | ### As far as handling version numbers on operating systems is | |
4463 | ### concerned, make sure things will fail in a fixable way. If | |
4464 | ### /etc/MACHINES doesn't say anything about version numbers, be | |
4465 | ### prepared to handle anything reasonably. If version numbers | |
4466 | ### matter, be sure /etc/MACHINES says something about it. | |
4467 | ||
42bbbe8b | 4468 | opsys='' unported=no |
067d23c9 KY |
4469 | case "${canonical}" in |
4470 | ||
9b6e5515 GM |
4471 | ## GNU/Linux and similar ports |
4472 | *-*-linux* ) | |
d6a003a8 | 4473 | opsys=gnu-linux |
d6a003a8 AS |
4474 | ;; |
4475 | ||
067d23c9 KY |
4476 | ## FreeBSD ports |
4477 | *-*-freebsd* ) | |
4478 | opsys=freebsd | |
067d23c9 KY |
4479 | ;; |
4480 | ||
4481 | ## FreeBSD kernel + glibc based userland | |
4482 | *-*-kfreebsd*gnu* ) | |
4483 | opsys=gnu-kfreebsd | |
067d23c9 KY |
4484 | ;; |
4485 | ||
4486 | ## NetBSD ports | |
4487 | *-*-netbsd* ) | |
4488 | opsys=netbsd | |
067d23c9 KY |
4489 | ;; |
4490 | ||
4491 | ## OpenBSD ports | |
4492 | *-*-openbsd* ) | |
4493 | opsys=openbsd | |
067d23c9 KY |
4494 | ;; |
4495 | ||
067d23c9 KY |
4496 | ## Apple Darwin / Mac OS X |
4497 | *-apple-darwin* ) | |
4498 | case "${canonical}" in | |
42bbbe8b GM |
4499 | i[3456]86-* ) ;; |
4500 | powerpc-* ) ;; | |
4501 | x86_64-* ) ;; | |
067d23c9 KY |
4502 | * ) unported=yes ;; |
4503 | esac | |
4504 | opsys=darwin | |
adf4198e GM |
4505 | ## Use fink packages if available. |
4506 | ## FIXME find a better way to do this: http://debbugs.gnu.org/11507 | |
4507 | ## if test -d /sw/include && test -d /sw/lib; then | |
4508 | ## GCC_TEST_OPTIONS="-I/sw/include -L/sw/lib" | |
4509 | ## NON_GCC_TEST_OPTIONS=${GCC_TEST_OPTIONS} | |
4510 | ## fi | |
067d23c9 KY |
4511 | ;; |
4512 | ||
4513 | ## HP 9000 series 700 and 800, running HP/UX | |
4514 | hppa*-hp-hpux10.2* ) | |
d6a003a8 | 4515 | opsys=hpux10-20 |
067d23c9 KY |
4516 | ;; |
4517 | hppa*-hp-hpux1[1-9]* ) | |
d6a003a8 | 4518 | opsys=hpux11 |
067d23c9 KY |
4519 | CFLAGS="-D_INCLUDE__STDC_A1_SOURCE $CFLAGS" |
4520 | ;; | |
4521 | ||
067d23c9 | 4522 | ## IBM machines |
067d23c9 | 4523 | rs6000-ibm-aix4.[23]* ) |
42bbbe8b | 4524 | opsys=aix4-2 |
067d23c9 KY |
4525 | ;; |
4526 | powerpc-ibm-aix4.[23]* ) | |
42bbbe8b | 4527 | opsys=aix4-2 |
067d23c9 KY |
4528 | ;; |
4529 | rs6000-ibm-aix[56]* ) | |
42bbbe8b | 4530 | opsys=aix4-2 |
067d23c9 KY |
4531 | ;; |
4532 | powerpc-ibm-aix[56]* ) | |
42bbbe8b | 4533 | opsys=aix4-2 |
067d23c9 KY |
4534 | ;; |
4535 | ||
067d23c9 KY |
4536 | ## Silicon Graphics machines |
4537 | ## Iris 4D | |
4538 | mips-sgi-irix6.5 ) | |
fd44db7f | 4539 | opsys=irix6-5 |
067d23c9 KY |
4540 | # Without defining _LANGUAGE_C, things get masked out in the headers |
4541 | # so that, for instance, grepping for `free' in stdlib.h fails and | |
4542 | # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m). | |
067d23c9 KY |
4543 | NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C" |
4544 | ;; | |
4545 | ||
4546 | ## Suns | |
067d23c9 KY |
4547 | *-sun-solaris* \ |
4548 | | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* \ | |
4549 | | x86_64-*-solaris2* | x86_64-*-sunos5*) | |
4550 | case "${canonical}" in | |
42bbbe8b GM |
4551 | i[3456]86-*-* ) ;; |
4552 | amd64-*-*|x86_64-*-*) ;; | |
4553 | sparc* ) ;; | |
067d23c9 KY |
4554 | * ) unported=yes ;; |
4555 | esac | |
4556 | case "${canonical}" in | |
4557 | *-sunos5.6* | *-solaris2.6* ) | |
4558 | opsys=sol2-6 | |
067d23c9 KY |
4559 | RANLIB="ar -ts" |
4560 | ;; | |
4561 | *-sunos5.[7-9]* | *-solaris2.[7-9]* ) | |
4562 | opsys=sol2-6 | |
4563 | emacs_check_sunpro_c=yes | |
067d23c9 KY |
4564 | ;; |
4565 | *-sunos5* | *-solaris* ) | |
4566 | opsys=sol2-10 | |
4567 | emacs_check_sunpro_c=yes | |
067d23c9 KY |
4568 | ;; |
4569 | esac | |
4570 | ## Watch out for a compiler that we know will not work. | |
4571 | case "${canonical}" in | |
4572 | *-solaris* | *-sunos5* ) | |
4573 | if [ "x$CC" = x/usr/ucb/cc ]; then | |
4574 | ## /usr/ucb/cc doesn't work; | |
4575 | ## we should find some other compiler that does work. | |
4576 | unset CC | |
4577 | fi | |
4578 | ;; | |
4579 | *) ;; | |
4580 | esac | |
4581 | ;; | |
4582 | ||
067d23c9 KY |
4583 | ## Intel 386 machines where we don't care about the manufacturer. |
4584 | i[3456]86-*-* ) | |
067d23c9 KY |
4585 | case "${canonical}" in |
4586 | *-cygwin ) opsys=cygwin ;; | |
5ec54608 GM |
4587 | *-darwin* ) opsys=darwin ;; |
4588 | *-sysv4.2uw* ) opsys=unixware ;; | |
4589 | *-sysv5uw* ) opsys=unixware ;; | |
4590 | *-sysv5OpenUNIX* ) opsys=unixware ;; | |
067d23c9 KY |
4591 | ## Otherwise, we'll fall through to the generic opsys code at the bottom. |
4592 | esac | |
4593 | ;; | |
4594 | ||
067d23c9 KY |
4595 | * ) |
4596 | unported=yes | |
4597 | ;; | |
4598 | esac | |
4599 | ||
4600 | ### If the code above didn't choose an operating system, just choose | |
4601 | ### an operating system based on the configuration name. You really | |
4602 | ### only want to use this when you have no idea what the right | |
4603 | ### operating system is; if you know what operating systems a machine | |
4604 | ### runs, it's cleaner to make it explicit in the case statement | |
4605 | ### above. | |
4606 | if test x"${opsys}" = x; then | |
4607 | case "${canonical}" in | |
4608 | *-gnu* ) opsys=gnu ;; | |
4609 | * ) | |
4610 | unported=yes | |
4611 | ;; | |
4612 | esac | |
4613 | fi | |
4614 | ||
4615 | ||
4616 | ||
4617 | if test $unported = yes; then | |
a9bec17c | 4618 | as_fn_error "Emacs hasn't been ported to \`${canonical}' systems. |
067d23c9 KY |
4619 | Check \`etc/MACHINES' for recognized configuration names." "$LINENO" 5 |
4620 | fi | |
4621 | ||
067d23c9 KY |
4622 | |
4623 | #### Choose a compiler. | |
067d23c9 KY |
4624 | |
4625 | ac_ext=c | |
4626 | ac_cpp='$CPP $CPPFLAGS' | |
4627 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
4628 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
4629 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
4630 | if test -n "$ac_tool_prefix"; then | |
4631 | # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. | |
4632 | set dummy ${ac_tool_prefix}gcc; ac_word=$2 | |
4633 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4634 | $as_echo_n "checking for $ac_word... " >&6; } | |
a9bec17c | 4635 | if test "${ac_cv_prog_CC+set}" = set; then : |
067d23c9 KY |
4636 | $as_echo_n "(cached) " >&6 |
4637 | else | |
4638 | if test -n "$CC"; then | |
4639 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
4640 | else | |
4641 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4642 | for as_dir in $PATH | |
4643 | do | |
4644 | IFS=$as_save_IFS | |
4645 | test -z "$as_dir" && as_dir=. | |
4646 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4647 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
4648 | ac_cv_prog_CC="${ac_tool_prefix}gcc" | |
4649 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4650 | break 2 | |
4651 | fi | |
4652 | done | |
4653 | done | |
4654 | IFS=$as_save_IFS | |
4655 | ||
4656 | fi | |
4657 | fi | |
4658 | CC=$ac_cv_prog_CC | |
4659 | if test -n "$CC"; then | |
4660 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
4661 | $as_echo "$CC" >&6; } | |
4662 | else | |
4663 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4664 | $as_echo "no" >&6; } | |
4665 | fi | |
4666 | ||
4667 | ||
4668 | fi | |
4669 | if test -z "$ac_cv_prog_CC"; then | |
4670 | ac_ct_CC=$CC | |
4671 | # Extract the first word of "gcc", so it can be a program name with args. | |
4672 | set dummy gcc; ac_word=$2 | |
4673 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4674 | $as_echo_n "checking for $ac_word... " >&6; } | |
a9bec17c | 4675 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : |
067d23c9 KY |
4676 | $as_echo_n "(cached) " >&6 |
4677 | else | |
4678 | if test -n "$ac_ct_CC"; then | |
4679 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
4680 | else | |
4681 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4682 | for as_dir in $PATH | |
4683 | do | |
4684 | IFS=$as_save_IFS | |
4685 | test -z "$as_dir" && as_dir=. | |
4686 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4687 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
4688 | ac_cv_prog_ac_ct_CC="gcc" | |
4689 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4690 | break 2 | |
4691 | fi | |
4692 | done | |
4693 | done | |
4694 | IFS=$as_save_IFS | |
4695 | ||
4696 | fi | |
4697 | fi | |
4698 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
4699 | if test -n "$ac_ct_CC"; then | |
4700 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 | |
4701 | $as_echo "$ac_ct_CC" >&6; } | |
4702 | else | |
4703 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4704 | $as_echo "no" >&6; } | |
4705 | fi | |
4706 | ||
4707 | if test "x$ac_ct_CC" = x; then | |
4708 | CC="" | |
4709 | else | |
4710 | case $cross_compiling:$ac_tool_warned in | |
4711 | yes:) | |
4712 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
4713 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
4714 | ac_tool_warned=yes ;; | |
4715 | esac | |
4716 | CC=$ac_ct_CC | |
4717 | fi | |
4718 | else | |
4719 | CC="$ac_cv_prog_CC" | |
4720 | fi | |
4721 | ||
4722 | if test -z "$CC"; then | |
4723 | if test -n "$ac_tool_prefix"; then | |
4724 | # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. | |
4725 | set dummy ${ac_tool_prefix}cc; ac_word=$2 | |
4726 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4727 | $as_echo_n "checking for $ac_word... " >&6; } | |
a9bec17c | 4728 | if test "${ac_cv_prog_CC+set}" = set; then : |
067d23c9 KY |
4729 | $as_echo_n "(cached) " >&6 |
4730 | else | |
4731 | if test -n "$CC"; then | |
4732 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
4733 | else | |
4734 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4735 | for as_dir in $PATH | |
4736 | do | |
4737 | IFS=$as_save_IFS | |
4738 | test -z "$as_dir" && as_dir=. | |
4739 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4740 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
4741 | ac_cv_prog_CC="${ac_tool_prefix}cc" | |
4742 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4743 | break 2 | |
4744 | fi | |
4745 | done | |
4746 | done | |
4747 | IFS=$as_save_IFS | |
4748 | ||
4749 | fi | |
4750 | fi | |
4751 | CC=$ac_cv_prog_CC | |
4752 | if test -n "$CC"; then | |
4753 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
4754 | $as_echo "$CC" >&6; } | |
4755 | else | |
4756 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4757 | $as_echo "no" >&6; } | |
4758 | fi | |
4759 | ||
4760 | ||
4761 | fi | |
4762 | fi | |
4763 | if test -z "$CC"; then | |
4764 | # Extract the first word of "cc", so it can be a program name with args. | |
4765 | set dummy cc; ac_word=$2 | |
4766 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4767 | $as_echo_n "checking for $ac_word... " >&6; } | |
a9bec17c | 4768 | if test "${ac_cv_prog_CC+set}" = set; then : |
067d23c9 KY |
4769 | $as_echo_n "(cached) " >&6 |
4770 | else | |
4771 | if test -n "$CC"; then | |
4772 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
4773 | else | |
4774 | ac_prog_rejected=no | |
4775 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4776 | for as_dir in $PATH | |
4777 | do | |
4778 | IFS=$as_save_IFS | |
4779 | test -z "$as_dir" && as_dir=. | |
4780 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4781 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
4782 | if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then | |
4783 | ac_prog_rejected=yes | |
4784 | continue | |
4785 | fi | |
4786 | ac_cv_prog_CC="cc" | |
4787 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4788 | break 2 | |
4789 | fi | |
4790 | done | |
4791 | done | |
4792 | IFS=$as_save_IFS | |
4793 | ||
4794 | if test $ac_prog_rejected = yes; then | |
4795 | # We found a bogon in the path, so make sure we never use it. | |
4796 | set dummy $ac_cv_prog_CC | |
4797 | shift | |
4798 | if test $# != 0; then | |
4799 | # We chose a different compiler from the bogus one. | |
4800 | # However, it has the same basename, so the bogon will be chosen | |
4801 | # first if we set CC to just the basename; use the full file name. | |
4802 | shift | |
4803 | ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" | |
4804 | fi | |
4805 | fi | |
4806 | fi | |
4807 | fi | |
4808 | CC=$ac_cv_prog_CC | |
4809 | if test -n "$CC"; then | |
4810 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
4811 | $as_echo "$CC" >&6; } | |
4812 | else | |
4813 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4814 | $as_echo "no" >&6; } | |
4815 | fi | |
4816 | ||
4817 | ||
4818 | fi | |
4819 | if test -z "$CC"; then | |
4820 | if test -n "$ac_tool_prefix"; then | |
4821 | for ac_prog in cl.exe | |
4822 | do | |
4823 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | |
4824 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | |
4825 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4826 | $as_echo_n "checking for $ac_word... " >&6; } | |
a9bec17c | 4827 | if test "${ac_cv_prog_CC+set}" = set; then : |
067d23c9 KY |
4828 | $as_echo_n "(cached) " >&6 |
4829 | else | |
4830 | if test -n "$CC"; then | |
4831 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
4832 | else | |
4833 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4834 | for as_dir in $PATH | |
4835 | do | |
4836 | IFS=$as_save_IFS | |
4837 | test -z "$as_dir" && as_dir=. | |
4838 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4839 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
4840 | ac_cv_prog_CC="$ac_tool_prefix$ac_prog" | |
4841 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4842 | break 2 | |
4843 | fi | |
4844 | done | |
4845 | done | |
4846 | IFS=$as_save_IFS | |
4847 | ||
4848 | fi | |
4849 | fi | |
4850 | CC=$ac_cv_prog_CC | |
4851 | if test -n "$CC"; then | |
4852 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
4853 | $as_echo "$CC" >&6; } | |
4854 | else | |
4855 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4856 | $as_echo "no" >&6; } | |
4857 | fi | |
4858 | ||
4859 | ||
4860 | test -n "$CC" && break | |
4861 | done | |
4862 | fi | |
4863 | if test -z "$CC"; then | |
4864 | ac_ct_CC=$CC | |
4865 | for ac_prog in cl.exe | |
4866 | do | |
4867 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
4868 | set dummy $ac_prog; ac_word=$2 | |
4869 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4870 | $as_echo_n "checking for $ac_word... " >&6; } | |
a9bec17c | 4871 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : |
067d23c9 KY |
4872 | $as_echo_n "(cached) " >&6 |
4873 | else | |
4874 | if test -n "$ac_ct_CC"; then | |
4875 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
4876 | else | |
4877 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4878 | for as_dir in $PATH | |
4879 | do | |
4880 | IFS=$as_save_IFS | |
4881 | test -z "$as_dir" && as_dir=. | |
4882 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4883 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
4884 | ac_cv_prog_ac_ct_CC="$ac_prog" | |
4885 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4886 | break 2 | |
4887 | fi | |
4888 | done | |
4889 | done | |
4890 | IFS=$as_save_IFS | |
4891 | ||
4892 | fi | |
4893 | fi | |
4894 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
4895 | if test -n "$ac_ct_CC"; then | |
4896 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 | |
4897 | $as_echo "$ac_ct_CC" >&6; } | |
4898 | else | |
4899 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4900 | $as_echo "no" >&6; } | |
4901 | fi | |
4902 | ||
4903 | ||
4904 | test -n "$ac_ct_CC" && break | |
4905 | done | |
4906 | ||
4907 | if test "x$ac_ct_CC" = x; then | |
4908 | CC="" | |
4909 | else | |
4910 | case $cross_compiling:$ac_tool_warned in | |
4911 | yes:) | |
4912 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
4913 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
4914 | ac_tool_warned=yes ;; | |
4915 | esac | |
4916 | CC=$ac_ct_CC | |
4917 | fi | |
4918 | fi | |
4919 | ||
4920 | fi | |
4921 | ||
4922 | ||
4923 | test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
4924 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
a9bec17c GM |
4925 | as_fn_error "no acceptable C compiler found in \$PATH |
4926 | See \`config.log' for more details." "$LINENO" 5; } | |
067d23c9 KY |
4927 | |
4928 | # Provide some information about the compiler. | |
4929 | $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 | |
4930 | set X $ac_compile | |
4931 | ac_compiler=$2 | |
4932 | for ac_option in --version -v -V -qversion; do | |
4933 | { { ac_try="$ac_compiler $ac_option >&5" | |
4934 | case "(($ac_try" in | |
4935 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4936 | *) ac_try_echo=$ac_try;; | |
4937 | esac | |
4938 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
4939 | $as_echo "$ac_try_echo"; } >&5 | |
4940 | (eval "$ac_compiler $ac_option >&5") 2>conftest.err | |
4941 | ac_status=$? | |
4942 | if test -s conftest.err; then | |
4943 | sed '10a\ | |
4944 | ... rest of stderr output deleted ... | |
4945 | 10q' conftest.err >conftest.er1 | |
4946 | cat conftest.er1 >&5 | |
4947 | fi | |
4948 | rm -f conftest.er1 conftest.err | |
4949 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
4950 | test $ac_status = 0; } | |
4951 | done | |
4952 | ||
4953 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4954 | /* end confdefs.h. */ | |
4955 | ||
4956 | int | |
4957 | main () | |
4958 | { | |
4959 | ||
4960 | ; | |
4961 | return 0; | |
4962 | } | |
4963 | _ACEOF | |
4964 | ac_clean_files_save=$ac_clean_files | |
4965 | ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" | |
4966 | # Try to create an executable without -o first, disregard a.out. | |
4967 | # It will help us diagnose broken compilers, and finding out an intuition | |
4968 | # of exeext. | |
4969 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 | |
4970 | $as_echo_n "checking whether the C compiler works... " >&6; } | |
4971 | ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` | |
4972 | ||
4973 | # The possible output files: | |
4974 | ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" | |
4975 | ||
4976 | ac_rmfiles= | |
4977 | for ac_file in $ac_files | |
4978 | do | |
4979 | case $ac_file in | |
4980 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; | |
4981 | * ) ac_rmfiles="$ac_rmfiles $ac_file";; | |
4982 | esac | |
4983 | done | |
4984 | rm -f $ac_rmfiles | |
4985 | ||
4986 | if { { ac_try="$ac_link_default" | |
4987 | case "(($ac_try" in | |
4988 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4989 | *) ac_try_echo=$ac_try;; | |
4990 | esac | |
4991 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
4992 | $as_echo "$ac_try_echo"; } >&5 | |
4993 | (eval "$ac_link_default") 2>&5 | |
4994 | ac_status=$? | |
4995 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
4996 | test $ac_status = 0; }; then : | |
4997 | # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. | |
4998 | # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' | |
4999 | # in a Makefile. We should not override ac_cv_exeext if it was cached, | |
5000 | # so that the user can short-circuit this test for compilers unknown to | |
5001 | # Autoconf. | |
5002 | for ac_file in $ac_files '' | |
5003 | do | |
5004 | test -f "$ac_file" || continue | |
5005 | case $ac_file in | |
5006 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) | |
5007 | ;; | |
5008 | [ab].out ) | |
5009 | # We found the default executable, but exeext='' is most | |
5010 | # certainly right. | |
5011 | break;; | |
5012 | *.* ) | |
5013 | if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; | |
5014 | then :; else | |
5015 | ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` | |
5016 | fi | |
5017 | # We set ac_cv_exeext here because the later test for it is not | |
5018 | # safe: cross compilers may not add the suffix if given an `-o' | |
5019 | # argument, so we may need to know it at that point already. | |
5020 | # Even if this section looks crufty: it has the advantage of | |
5021 | # actually working. | |
5022 | break;; | |
5023 | * ) | |
5024 | break;; | |
5025 | esac | |
5026 | done | |
5027 | test "$ac_cv_exeext" = no && ac_cv_exeext= | |
5028 | ||
5029 | else | |
5030 | ac_file='' | |
5031 | fi | |
5032 | if test -z "$ac_file"; then : | |
5033 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
5034 | $as_echo "no" >&6; } | |
5035 | $as_echo "$as_me: failed program was:" >&5 | |
5036 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5037 | ||
5038 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
5039 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
a9bec17c GM |
5040 | { as_fn_set_status 77 |
5041 | as_fn_error "C compiler cannot create executables | |
5042 | See \`config.log' for more details." "$LINENO" 5; }; } | |
067d23c9 KY |
5043 | else |
5044 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
5045 | $as_echo "yes" >&6; } | |
5046 | fi | |
5047 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 | |
5048 | $as_echo_n "checking for C compiler default output file name... " >&6; } | |
5049 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 | |
5050 | $as_echo "$ac_file" >&6; } | |
5051 | ac_exeext=$ac_cv_exeext | |
5052 | ||
5053 | rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out | |
5054 | ac_clean_files=$ac_clean_files_save | |
5055 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 | |
5056 | $as_echo_n "checking for suffix of executables... " >&6; } | |
5057 | if { { ac_try="$ac_link" | |
5058 | case "(($ac_try" in | |
5059 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5060 | *) ac_try_echo=$ac_try;; | |
5061 | esac | |
5062 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
5063 | $as_echo "$ac_try_echo"; } >&5 | |
5064 | (eval "$ac_link") 2>&5 | |
5065 | ac_status=$? | |
5066 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
5067 | test $ac_status = 0; }; then : | |
5068 | # If both `conftest.exe' and `conftest' are `present' (well, observable) | |
5069 | # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will | |
5070 | # work properly (i.e., refer to `conftest.exe'), while it won't with | |
5071 | # `rm'. | |
5072 | for ac_file in conftest.exe conftest conftest.*; do | |
5073 | test -f "$ac_file" || continue | |
5074 | case $ac_file in | |
5075 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; | |
5076 | *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` | |
5077 | break;; | |
5078 | * ) break;; | |
5079 | esac | |
5080 | done | |
5081 | else | |
5082 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
5083 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
a9bec17c GM |
5084 | as_fn_error "cannot compute suffix of executables: cannot compile and link |
5085 | See \`config.log' for more details." "$LINENO" 5; } | |
067d23c9 KY |
5086 | fi |
5087 | rm -f conftest conftest$ac_cv_exeext | |
5088 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 | |
5089 | $as_echo "$ac_cv_exeext" >&6; } | |
5090 | ||
5091 | rm -f conftest.$ac_ext | |
5092 | EXEEXT=$ac_cv_exeext | |
5093 | ac_exeext=$EXEEXT | |
5094 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5095 | /* end confdefs.h. */ | |
5096 | #include <stdio.h> | |
5097 | int | |
5098 | main () | |
5099 | { | |
5100 | FILE *f = fopen ("conftest.out", "w"); | |
5101 | return ferror (f) || fclose (f) != 0; | |
5102 | ||
5103 | ; | |
5104 | return 0; | |
5105 | } | |
5106 | _ACEOF | |
5107 | ac_clean_files="$ac_clean_files conftest.out" | |
5108 | # Check that the compiler produces executables we can run. If not, either | |
5109 | # the compiler is broken, or we cross compile. | |
5110 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 | |
5111 | $as_echo_n "checking whether we are cross compiling... " >&6; } | |
5112 | if test "$cross_compiling" != yes; then | |
5113 | { { ac_try="$ac_link" | |
5114 | case "(($ac_try" in | |
5115 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5116 | *) ac_try_echo=$ac_try;; | |
5117 | esac | |
5118 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
5119 | $as_echo "$ac_try_echo"; } >&5 | |
5120 | (eval "$ac_link") 2>&5 | |
5121 | ac_status=$? | |
5122 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
5123 | test $ac_status = 0; } | |
5124 | if { ac_try='./conftest$ac_cv_exeext' | |
5125 | { { case "(($ac_try" in | |
5126 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5127 | *) ac_try_echo=$ac_try;; | |
5128 | esac | |
5129 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
5130 | $as_echo "$ac_try_echo"; } >&5 | |
5131 | (eval "$ac_try") 2>&5 | |
5132 | ac_status=$? | |
5133 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
5134 | test $ac_status = 0; }; }; then | |
5135 | cross_compiling=no | |
5136 | else | |
5137 | if test "$cross_compiling" = maybe; then | |
5138 | cross_compiling=yes | |
5139 | else | |
5140 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
5141 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
a9bec17c | 5142 | as_fn_error "cannot run C compiled programs. |
067d23c9 | 5143 | If you meant to cross compile, use \`--host'. |
a9bec17c | 5144 | See \`config.log' for more details." "$LINENO" 5; } |
067d23c9 KY |
5145 | fi |
5146 | fi | |
5147 | fi | |
5148 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 | |
5149 | $as_echo "$cross_compiling" >&6; } | |
5150 | ||
5151 | rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out | |
5152 | ac_clean_files=$ac_clean_files_save | |
5153 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 | |
5154 | $as_echo_n "checking for suffix of object files... " >&6; } | |
a9bec17c | 5155 | if test "${ac_cv_objext+set}" = set; then : |
067d23c9 KY |
5156 | $as_echo_n "(cached) " >&6 |
5157 | else | |
5158 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5159 | /* end confdefs.h. */ | |
5160 | ||
5161 | int | |
5162 | main () | |
5163 | { | |
5164 | ||
5165 | ; | |
5166 | return 0; | |
5167 | } | |
5168 | _ACEOF | |
5169 | rm -f conftest.o conftest.obj | |
5170 | if { { ac_try="$ac_compile" | |
5171 | case "(($ac_try" in | |
5172 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5173 | *) ac_try_echo=$ac_try;; | |
5174 | esac | |
5175 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
5176 | $as_echo "$ac_try_echo"; } >&5 | |
5177 | (eval "$ac_compile") 2>&5 | |
5178 | ac_status=$? | |
5179 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
5180 | test $ac_status = 0; }; then : | |
5181 | for ac_file in conftest.o conftest.obj conftest.*; do | |
5182 | test -f "$ac_file" || continue; | |
5183 | case $ac_file in | |
5184 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; | |
5185 | *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` | |
5186 | break;; | |
5187 | esac | |
5188 | done | |
5189 | else | |
5190 | $as_echo "$as_me: failed program was:" >&5 | |
5191 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5192 | ||
5193 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
5194 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
a9bec17c GM |
5195 | as_fn_error "cannot compute suffix of object files: cannot compile |
5196 | See \`config.log' for more details." "$LINENO" 5; } | |
067d23c9 KY |
5197 | fi |
5198 | rm -f conftest.$ac_cv_objext conftest.$ac_ext | |
5199 | fi | |
5200 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 | |
5201 | $as_echo "$ac_cv_objext" >&6; } | |
5202 | OBJEXT=$ac_cv_objext | |
5203 | ac_objext=$OBJEXT | |
5204 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 | |
5205 | $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } | |
a9bec17c | 5206 | if test "${ac_cv_c_compiler_gnu+set}" = set; then : |
067d23c9 KY |
5207 | $as_echo_n "(cached) " >&6 |
5208 | else | |
5209 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5210 | /* end confdefs.h. */ | |
5211 | ||
5212 | int | |
5213 | main () | |
5214 | { | |
5215 | #ifndef __GNUC__ | |
5216 | choke me | |
5217 | #endif | |
5218 | ||
5219 | ; | |
5220 | return 0; | |
5221 | } | |
5222 | _ACEOF | |
5223 | if ac_fn_c_try_compile "$LINENO"; then : | |
5224 | ac_compiler_gnu=yes | |
5225 | else | |
5226 | ac_compiler_gnu=no | |
5227 | fi | |
5228 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5229 | ac_cv_c_compiler_gnu=$ac_compiler_gnu | |
5230 | ||
5231 | fi | |
5232 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 | |
5233 | $as_echo "$ac_cv_c_compiler_gnu" >&6; } | |
5234 | if test $ac_compiler_gnu = yes; then | |
5235 | GCC=yes | |
5236 | else | |
5237 | GCC= | |
5238 | fi | |
5239 | ac_test_CFLAGS=${CFLAGS+set} | |
5240 | ac_save_CFLAGS=$CFLAGS | |
5241 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 | |
5242 | $as_echo_n "checking whether $CC accepts -g... " >&6; } | |
a9bec17c | 5243 | if test "${ac_cv_prog_cc_g+set}" = set; then : |
067d23c9 KY |
5244 | $as_echo_n "(cached) " >&6 |
5245 | else | |
5246 | ac_save_c_werror_flag=$ac_c_werror_flag | |
5247 | ac_c_werror_flag=yes | |
5248 | ac_cv_prog_cc_g=no | |
5249 | CFLAGS="-g" | |
5250 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5251 | /* end confdefs.h. */ | |
5252 | ||
5253 | int | |
5254 | main () | |
5255 | { | |
5256 | ||
5257 | ; | |
5258 | return 0; | |
5259 | } | |
5260 | _ACEOF | |
5261 | if ac_fn_c_try_compile "$LINENO"; then : | |
5262 | ac_cv_prog_cc_g=yes | |
5263 | else | |
5264 | CFLAGS="" | |
5265 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5266 | /* end confdefs.h. */ | |
5267 | ||
5268 | int | |
5269 | main () | |
5270 | { | |
5271 | ||
5272 | ; | |
5273 | return 0; | |
5274 | } | |
5275 | _ACEOF | |
5276 | if ac_fn_c_try_compile "$LINENO"; then : | |
5277 | ||
5278 | else | |
5279 | ac_c_werror_flag=$ac_save_c_werror_flag | |
5280 | CFLAGS="-g" | |
5281 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5282 | /* end confdefs.h. */ | |
5283 | ||
5284 | int | |
5285 | main () | |
5286 | { | |
5287 | ||
5288 | ; | |
5289 | return 0; | |
5290 | } | |
5291 | _ACEOF | |
5292 | if ac_fn_c_try_compile "$LINENO"; then : | |
5293 | ac_cv_prog_cc_g=yes | |
5294 | fi | |
5295 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5296 | fi | |
5297 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5298 | fi | |
5299 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5300 | ac_c_werror_flag=$ac_save_c_werror_flag | |
5301 | fi | |
5302 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 | |
5303 | $as_echo "$ac_cv_prog_cc_g" >&6; } | |
5304 | if test "$ac_test_CFLAGS" = set; then | |
5305 | CFLAGS=$ac_save_CFLAGS | |
5306 | elif test $ac_cv_prog_cc_g = yes; then | |
5307 | if test "$GCC" = yes; then | |
5308 | CFLAGS="-g -O2" | |
5309 | else | |
5310 | CFLAGS="-g" | |
5311 | fi | |
5312 | else | |
5313 | if test "$GCC" = yes; then | |
5314 | CFLAGS="-O2" | |
5315 | else | |
5316 | CFLAGS= | |
5317 | fi | |
5318 | fi | |
5319 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 | |
5320 | $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } | |
a9bec17c | 5321 | if test "${ac_cv_prog_cc_c89+set}" = set; then : |
067d23c9 KY |
5322 | $as_echo_n "(cached) " >&6 |
5323 | else | |
5324 | ac_cv_prog_cc_c89=no | |
5325 | ac_save_CC=$CC | |
5326 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5327 | /* end confdefs.h. */ | |
5328 | #include <stdarg.h> | |
5329 | #include <stdio.h> | |
5330 | #include <sys/types.h> | |
5331 | #include <sys/stat.h> | |
5332 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
5333 | struct buf { int x; }; | |
5334 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
5335 | static char *e (p, i) | |
5336 | char **p; | |
5337 | int i; | |
5338 | { | |
5339 | return p[i]; | |
5340 | } | |
5341 | static char *f (char * (*g) (char **, int), char **p, ...) | |
5342 | { | |
5343 | char *s; | |
5344 | va_list v; | |
5345 | va_start (v,p); | |
5346 | s = g (p, va_arg (v,int)); | |
5347 | va_end (v); | |
5348 | return s; | |
5349 | } | |
5350 | ||
5351 | /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has | |
5352 | function prototypes and stuff, but not '\xHH' hex character constants. | |
5353 | These don't provoke an error unfortunately, instead are silently treated | |
5354 | as 'x'. The following induces an error, until -std is added to get | |
5355 | proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an | |
5356 | array size at least. It's necessary to write '\x00'==0 to get something | |
5357 | that's true only with -std. */ | |
5358 | int osf4_cc_array ['\x00' == 0 ? 1 : -1]; | |
5359 | ||
5360 | /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters | |
5361 | inside strings and character constants. */ | |
5362 | #define FOO(x) 'x' | |
5363 | int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; | |
5364 | ||
5365 | int test (int i, double x); | |
5366 | struct s1 {int (*f) (int a);}; | |
5367 | struct s2 {int (*f) (double a);}; | |
5368 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
5369 | int argc; | |
5370 | char **argv; | |
5371 | int | |
5372 | main () | |
5373 | { | |
5374 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; | |
5375 | ; | |
5376 | return 0; | |
5377 | } | |
5378 | _ACEOF | |
5379 | for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ | |
5380 | -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
5381 | do | |
5382 | CC="$ac_save_CC $ac_arg" | |
5383 | if ac_fn_c_try_compile "$LINENO"; then : | |
5384 | ac_cv_prog_cc_c89=$ac_arg | |
5385 | fi | |
5386 | rm -f core conftest.err conftest.$ac_objext | |
5387 | test "x$ac_cv_prog_cc_c89" != "xno" && break | |
5388 | done | |
743c80a7 PE |
5389 | rm -f conftest.$ac_ext |
5390 | CC=$ac_save_CC | |
5391 | ||
5392 | fi | |
5393 | # AC_CACHE_VAL | |
5394 | case "x$ac_cv_prog_cc_c89" in | |
5395 | x) | |
5396 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 | |
5397 | $as_echo "none needed" >&6; } ;; | |
5398 | xno) | |
5399 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 | |
5400 | $as_echo "unsupported" >&6; } ;; | |
5401 | *) | |
5402 | CC="$CC $ac_cv_prog_cc_c89" | |
5403 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 | |
5404 | $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; | |
5405 | esac | |
5406 | if test "x$ac_cv_prog_cc_c89" != xno; then : | |
5407 | ||
5408 | fi | |
5409 | ||
5410 | ac_ext=c | |
5411 | ac_cpp='$CPP $CPPFLAGS' | |
5412 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
5413 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
5414 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
5415 | DEPDIR="${am__leading_dot}deps" | |
5416 | ||
5417 | ac_config_commands="$ac_config_commands depfiles" | |
5418 | ||
5419 | ||
5420 | am_make=${MAKE-make} | |
5421 | cat > confinc << 'END' | |
5422 | am__doit: | |
5423 | @echo this is the am__doit target | |
5424 | .PHONY: am__doit | |
5425 | END | |
5426 | # If we don't find an include directive, just comment out the code. | |
5427 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 | |
5428 | $as_echo_n "checking for style of include used by $am_make... " >&6; } | |
5429 | am__include="#" | |
5430 | am__quote= | |
5431 | _am_result=none | |
5432 | # First try GNU make style include. | |
5433 | echo "include confinc" > confmf | |
5434 | # Ignore all kinds of additional output from `make'. | |
5435 | case `$am_make -s -f confmf 2> /dev/null` in #( | |
5436 | *the\ am__doit\ target*) | |
5437 | am__include=include | |
5438 | am__quote= | |
5439 | _am_result=GNU | |
5440 | ;; | |
5441 | esac | |
5442 | # Now try BSD make style include. | |
5443 | if test "$am__include" = "#"; then | |
5444 | echo '.include "confinc"' > confmf | |
5445 | case `$am_make -s -f confmf 2> /dev/null` in #( | |
5446 | *the\ am__doit\ target*) | |
5447 | am__include=.include | |
5448 | am__quote="\"" | |
5449 | _am_result=BSD | |
5450 | ;; | |
5451 | esac | |
5452 | fi | |
5453 | ||
5454 | ||
5455 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 | |
5456 | $as_echo "$_am_result" >&6; } | |
5457 | rm -f confinc confmf | |
5458 | ||
5459 | # Check whether --enable-dependency-tracking was given. | |
5460 | if test "${enable_dependency_tracking+set}" = set; then : | |
5461 | enableval=$enable_dependency_tracking; | |
5462 | fi | |
5463 | ||
5464 | if test "x$enable_dependency_tracking" != xno; then | |
5465 | am_depcomp="$ac_aux_dir/depcomp" | |
5466 | AMDEPBACKSLASH='\' | |
5467 | fi | |
5468 | if test "x$enable_dependency_tracking" != xno; then | |
5469 | AMDEP_TRUE= | |
5470 | AMDEP_FALSE='#' | |
5471 | else | |
5472 | AMDEP_TRUE='#' | |
5473 | AMDEP_FALSE= | |
5474 | fi | |
5475 | ||
5476 | ||
5477 | ||
5478 | depcc="$CC" am_compiler_list= | |
5479 | ||
5480 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 | |
5481 | $as_echo_n "checking dependency style of $depcc... " >&6; } | |
a9bec17c | 5482 | if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : |
743c80a7 PE |
5483 | $as_echo_n "(cached) " >&6 |
5484 | else | |
5485 | if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then | |
5486 | # We make a subdir and do the tests there. Otherwise we can end up | |
5487 | # making bogus files that we don't know about and never remove. For | |
5488 | # instance it was reported that on HP-UX the gcc test will end up | |
5489 | # making a dummy file named `D' -- because `-MD' means `put the output | |
5490 | # in D'. | |
5491 | mkdir conftest.dir | |
5492 | # Copy depcomp to subdir because otherwise we won't find it if we're | |
5493 | # using a relative directory. | |
5494 | cp "$am_depcomp" conftest.dir | |
5495 | cd conftest.dir | |
5496 | # We will build objects and dependencies in a subdirectory because | |
5497 | # it helps to detect inapplicable dependency modes. For instance | |
5498 | # both Tru64's cc and ICC support -MD to output dependencies as a | |
5499 | # side effect of compilation, but ICC will put the dependencies in | |
5500 | # the current directory while Tru64 will put them in the object | |
5501 | # directory. | |
5502 | mkdir sub | |
5503 | ||
5504 | am_cv_CC_dependencies_compiler_type=none | |
5505 | if test "$am_compiler_list" = ""; then | |
5506 | am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` | |
5507 | fi | |
5508 | am__universal=false | |
5509 | case " $depcc " in #( | |
5510 | *\ -arch\ *\ -arch\ *) am__universal=true ;; | |
5511 | esac | |
5512 | ||
5513 | for depmode in $am_compiler_list; do | |
5514 | # Setup a source with many dependencies, because some compilers | |
5515 | # like to wrap large dependency lists on column 80 (with \), and | |
5516 | # we should not choose a depcomp mode which is confused by this. | |
5517 | # | |
5518 | # We need to recreate these files for each test, as the compiler may | |
5519 | # overwrite some of them when testing with obscure command lines. | |
5520 | # This happens at least with the AIX C compiler. | |
5521 | : > sub/conftest.c | |
5522 | for i in 1 2 3 4 5 6; do | |
5523 | echo '#include "conftst'$i'.h"' >> sub/conftest.c | |
5524 | # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with | |
5525 | # Solaris 8's {/usr,}/bin/sh. | |
5526 | touch sub/conftst$i.h | |
5527 | done | |
5528 | echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf | |
5529 | ||
5530 | # We check with `-c' and `-o' for the sake of the "dashmstdout" | |
5531 | # mode. It turns out that the SunPro C++ compiler does not properly | |
5532 | # handle `-M -o', and we need to detect this. Also, some Intel | |
5533 | # versions had trouble with output in subdirs | |
5534 | am__obj=sub/conftest.${OBJEXT-o} | |
5535 | am__minus_obj="-o $am__obj" | |
5536 | case $depmode in | |
5537 | gcc) | |
5538 | # This depmode causes a compiler race in universal mode. | |
5539 | test "$am__universal" = false || continue | |
5540 | ;; | |
5541 | nosideeffect) | |
5542 | # after this tag, mechanisms are not by side-effect, so they'll | |
5543 | # only be used when explicitly requested | |
5544 | if test "x$enable_dependency_tracking" = xyes; then | |
5545 | continue | |
5546 | else | |
5547 | break | |
5548 | fi | |
5549 | ;; | |
5550 | msvisualcpp | msvcmsys) | |
5551 | # This compiler won't grok `-c -o', but also, the minuso test has | |
5552 | # not run yet. These depmodes are late enough in the game, and | |
5553 | # so weak that their functioning should not be impacted. | |
5554 | am__obj=conftest.${OBJEXT-o} | |
5555 | am__minus_obj= | |
5556 | ;; | |
5557 | none) break ;; | |
5558 | esac | |
5559 | if depmode=$depmode \ | |
5560 | source=sub/conftest.c object=$am__obj \ | |
5561 | depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ | |
5562 | $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ | |
5563 | >/dev/null 2>conftest.err && | |
5564 | grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && | |
5565 | grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && | |
5566 | grep $am__obj sub/conftest.Po > /dev/null 2>&1 && | |
5567 | ${MAKE-make} -s -f confmf > /dev/null 2>&1; then | |
5568 | # icc doesn't choke on unknown options, it will just issue warnings | |
5569 | # or remarks (even with -Werror). So we grep stderr for any message | |
5570 | # that says an option was ignored or not supported. | |
5571 | # When given -MP, icc 7.0 and 7.1 complain thusly: | |
5572 | # icc: Command line warning: ignoring option '-M'; no argument required | |
5573 | # The diagnosis changed in icc 8.0: | |
5574 | # icc: Command line remark: option '-MP' not supported | |
5575 | if (grep 'ignoring option' conftest.err || | |
5576 | grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else | |
5577 | am_cv_CC_dependencies_compiler_type=$depmode | |
5578 | break | |
5579 | fi | |
5580 | fi | |
5581 | done | |
5582 | ||
5583 | cd .. | |
5584 | rm -rf conftest.dir | |
5585 | else | |
5586 | am_cv_CC_dependencies_compiler_type=none | |
5587 | fi | |
5588 | ||
5589 | fi | |
5590 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 | |
5591 | $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } | |
5592 | CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type | |
5593 | ||
5594 | if | |
5595 | test "x$enable_dependency_tracking" != xno \ | |
5596 | && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then | |
5597 | am__fastdepCC_TRUE= | |
5598 | am__fastdepCC_FALSE='#' | |
5599 | else | |
5600 | am__fastdepCC_TRUE='#' | |
5601 | am__fastdepCC_FALSE= | |
5602 | fi | |
5603 | ||
5604 | ||
5605 | if test "x$CC" != xcc; then | |
5606 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5 | |
5607 | $as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; } | |
5608 | else | |
5609 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5 | |
5610 | $as_echo_n "checking whether cc understands -c and -o together... " >&6; } | |
5611 | fi | |
5612 | set dummy $CC; ac_cc=`$as_echo "$2" | | |
5613 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` | |
a9bec17c | 5614 | if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then : |
743c80a7 PE |
5615 | $as_echo_n "(cached) " >&6 |
5616 | else | |
5617 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5618 | /* end confdefs.h. */ | |
5619 | ||
5620 | int | |
5621 | main () | |
5622 | { | |
5623 | ||
5624 | ; | |
5625 | return 0; | |
5626 | } | |
5627 | _ACEOF | |
5628 | # Make sure it works both with $CC and with simple cc. | |
5629 | # We do the test twice because some compilers refuse to overwrite an | |
5630 | # existing .o file with -o, though they will create one. | |
5631 | ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5' | |
5632 | rm -f conftest2.* | |
5633 | if { { case "(($ac_try" in | |
5634 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5635 | *) ac_try_echo=$ac_try;; | |
5636 | esac | |
5637 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
5638 | $as_echo "$ac_try_echo"; } >&5 | |
5639 | (eval "$ac_try") 2>&5 | |
5640 | ac_status=$? | |
5641 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
5642 | test $ac_status = 0; } && | |
5643 | test -f conftest2.$ac_objext && { { case "(($ac_try" in | |
5644 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5645 | *) ac_try_echo=$ac_try;; | |
5646 | esac | |
5647 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
5648 | $as_echo "$ac_try_echo"; } >&5 | |
5649 | (eval "$ac_try") 2>&5 | |
5650 | ac_status=$? | |
5651 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
5652 | test $ac_status = 0; }; | |
5653 | then | |
5654 | eval ac_cv_prog_cc_${ac_cc}_c_o=yes | |
5655 | if test "x$CC" != xcc; then | |
5656 | # Test first that cc exists at all. | |
5657 | if { ac_try='cc -c conftest.$ac_ext >&5' | |
5658 | { { case "(($ac_try" in | |
5659 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5660 | *) ac_try_echo=$ac_try;; | |
5661 | esac | |
5662 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
5663 | $as_echo "$ac_try_echo"; } >&5 | |
5664 | (eval "$ac_try") 2>&5 | |
5665 | ac_status=$? | |
5666 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
5667 | test $ac_status = 0; }; }; then | |
5668 | ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5' | |
5669 | rm -f conftest2.* | |
5670 | if { { case "(($ac_try" in | |
5671 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5672 | *) ac_try_echo=$ac_try;; | |
5673 | esac | |
5674 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
5675 | $as_echo "$ac_try_echo"; } >&5 | |
5676 | (eval "$ac_try") 2>&5 | |
5677 | ac_status=$? | |
5678 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
5679 | test $ac_status = 0; } && | |
5680 | test -f conftest2.$ac_objext && { { case "(($ac_try" in | |
5681 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5682 | *) ac_try_echo=$ac_try;; | |
5683 | esac | |
5684 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
5685 | $as_echo "$ac_try_echo"; } >&5 | |
5686 | (eval "$ac_try") 2>&5 | |
5687 | ac_status=$? | |
5688 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
5689 | test $ac_status = 0; }; | |
5690 | then | |
5691 | # cc works too. | |
5692 | : | |
5693 | else | |
5694 | # cc exists but doesn't like -o. | |
5695 | eval ac_cv_prog_cc_${ac_cc}_c_o=no | |
5696 | fi | |
5697 | fi | |
5698 | fi | |
5699 | else | |
5700 | eval ac_cv_prog_cc_${ac_cc}_c_o=no | |
5701 | fi | |
5702 | rm -f core conftest* | |
5703 | ||
5704 | fi | |
5705 | if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then | |
5706 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
5707 | $as_echo "yes" >&6; } | |
5708 | else | |
5709 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
5710 | $as_echo "no" >&6; } | |
5711 | ||
5712 | $as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h | |
5713 | ||
5714 | fi | |
5715 | ||
5716 | # FIXME: we rely on the cache variable name because | |
5717 | # there is no other way. | |
5718 | set dummy $CC | |
5719 | am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` | |
5720 | eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o | |
5721 | if test "$am_t" != yes; then | |
5722 | # Losing compiler, so override with the script. | |
5723 | # FIXME: It is wrong to rewrite CC. | |
5724 | # But if we don't then we get into trouble of one sort or another. | |
5725 | # A longer-term fix would be to have automake use am__CC in this case, | |
5726 | # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" | |
5727 | CC="$am_aux_dir/compile $CC" | |
5728 | fi | |
5729 | ||
5730 | ||
5731 | ||
5ec54608 GM |
5732 | if test x$GCC = xyes; then |
5733 | test "x$GCC_TEST_OPTIONS" != x && CC="$CC $GCC_TEST_OPTIONS" | |
5734 | else | |
5735 | test "x$NON_GCC_TEST_OPTIONS" != x && CC="$CC $NON_GCC_TEST_OPTIONS" | |
5736 | fi | |
5737 | ||
5738 | # Initialize gnulib right after choosing the compiler. | |
743c80a7 | 5739 | |
067d23c9 KY |
5740 | ac_ext=c |
5741 | ac_cpp='$CPP $CPPFLAGS' | |
5742 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
5743 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
5744 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
5745 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 | |
5746 | $as_echo_n "checking how to run the C preprocessor... " >&6; } | |
5747 | # On Suns, sometimes $CPP names a directory. | |
5748 | if test -n "$CPP" && test -d "$CPP"; then | |
5749 | CPP= | |
5750 | fi | |
5751 | if test -z "$CPP"; then | |
a9bec17c | 5752 | if test "${ac_cv_prog_CPP+set}" = set; then : |
067d23c9 KY |
5753 | $as_echo_n "(cached) " >&6 |
5754 | else | |
5755 | # Double quotes because CPP needs to be expanded | |
5756 | for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" | |
5757 | do | |
5758 | ac_preproc_ok=false | |
5759 | for ac_c_preproc_warn_flag in '' yes | |
5760 | do | |
5761 | # Use a header file that comes with gcc, so configuring glibc | |
5762 | # with a fresh cross-compiler works. | |
5763 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
5764 | # <limits.h> exists even on freestanding compilers. | |
5765 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
5766 | # not just through cpp. "Syntax error" is here to catch this case. | |
5767 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5768 | /* end confdefs.h. */ | |
5769 | #ifdef __STDC__ | |
5770 | # include <limits.h> | |
5771 | #else | |
5772 | # include <assert.h> | |
5773 | #endif | |
5774 | Syntax error | |
5775 | _ACEOF | |
5776 | if ac_fn_c_try_cpp "$LINENO"; then : | |
5777 | ||
5778 | else | |
5779 | # Broken: fails on valid input. | |
5780 | continue | |
5781 | fi | |
a9bec17c | 5782 | rm -f conftest.err conftest.$ac_ext |
067d23c9 KY |
5783 | |
5784 | # OK, works on sane cases. Now check whether nonexistent headers | |
5785 | # can be detected and how. | |
5786 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5787 | /* end confdefs.h. */ | |
5788 | #include <ac_nonexistent.h> | |
5789 | _ACEOF | |
5790 | if ac_fn_c_try_cpp "$LINENO"; then : | |
5791 | # Broken: success on invalid input. | |
5792 | continue | |
5793 | else | |
5794 | # Passes both tests. | |
5795 | ac_preproc_ok=: | |
5796 | break | |
5797 | fi | |
a9bec17c | 5798 | rm -f conftest.err conftest.$ac_ext |
067d23c9 KY |
5799 | |
5800 | done | |
5801 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
a9bec17c | 5802 | rm -f conftest.err conftest.$ac_ext |
067d23c9 KY |
5803 | if $ac_preproc_ok; then : |
5804 | break | |
5805 | fi | |
5806 | ||
5807 | done | |
5808 | ac_cv_prog_CPP=$CPP | |
5809 | ||
5810 | fi | |
5811 | CPP=$ac_cv_prog_CPP | |
5812 | else | |
5813 | ac_cv_prog_CPP=$CPP | |
5814 | fi | |
5815 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 | |
5816 | $as_echo "$CPP" >&6; } | |
5817 | ac_preproc_ok=false | |
5818 | for ac_c_preproc_warn_flag in '' yes | |
5819 | do | |
5820 | # Use a header file that comes with gcc, so configuring glibc | |
5821 | # with a fresh cross-compiler works. | |
5822 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
5823 | # <limits.h> exists even on freestanding compilers. | |
5824 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
5825 | # not just through cpp. "Syntax error" is here to catch this case. | |
5826 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5827 | /* end confdefs.h. */ | |
5828 | #ifdef __STDC__ | |
5829 | # include <limits.h> | |
5830 | #else | |
5831 | # include <assert.h> | |
5832 | #endif | |
5833 | Syntax error | |
5834 | _ACEOF | |
5835 | if ac_fn_c_try_cpp "$LINENO"; then : | |
5836 | ||
5837 | else | |
5838 | # Broken: fails on valid input. | |
5839 | continue | |
5840 | fi | |
a9bec17c | 5841 | rm -f conftest.err conftest.$ac_ext |
067d23c9 KY |
5842 | |
5843 | # OK, works on sane cases. Now check whether nonexistent headers | |
5844 | # can be detected and how. | |
5845 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5846 | /* end confdefs.h. */ | |
5847 | #include <ac_nonexistent.h> | |
5848 | _ACEOF | |
5849 | if ac_fn_c_try_cpp "$LINENO"; then : | |
5850 | # Broken: success on invalid input. | |
5851 | continue | |
5852 | else | |
5853 | # Passes both tests. | |
5854 | ac_preproc_ok=: | |
5855 | break | |
5856 | fi | |
a9bec17c | 5857 | rm -f conftest.err conftest.$ac_ext |
067d23c9 KY |
5858 | |
5859 | done | |
5860 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
a9bec17c | 5861 | rm -f conftest.err conftest.$ac_ext |
067d23c9 KY |
5862 | if $ac_preproc_ok; then : |
5863 | ||
5864 | else | |
5865 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
5866 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
a9bec17c GM |
5867 | as_fn_error "C preprocessor \"$CPP\" fails sanity check |
5868 | See \`config.log' for more details." "$LINENO" 5; } | |
067d23c9 KY |
5869 | fi |
5870 | ||
5871 | ac_ext=c | |
5872 | ac_cpp='$CPP $CPPFLAGS' | |
5873 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
5874 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
5875 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
5876 | ||
5877 | ||
5878 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 | |
5879 | $as_echo_n "checking for grep that handles long lines and -e... " >&6; } | |
a9bec17c | 5880 | if test "${ac_cv_path_GREP+set}" = set; then : |
067d23c9 KY |
5881 | $as_echo_n "(cached) " >&6 |
5882 | else | |
5883 | if test -z "$GREP"; then | |
5884 | ac_path_GREP_found=false | |
5885 | # Loop through the user's path and test for each of PROGNAME-LIST | |
5886 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5887 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
5888 | do | |
5889 | IFS=$as_save_IFS | |
5890 | test -z "$as_dir" && as_dir=. | |
5891 | for ac_prog in grep ggrep; do | |
5892 | for ac_exec_ext in '' $ac_executable_extensions; do | |
5893 | ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" | |
5894 | { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue | |
5895 | # Check for GNU ac_path_GREP and select it if it is found. | |
5896 | # Check for GNU $ac_path_GREP | |
5897 | case `"$ac_path_GREP" --version 2>&1` in | |
5898 | *GNU*) | |
5899 | ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; | |
5900 | *) | |
5901 | ac_count=0 | |
5902 | $as_echo_n 0123456789 >"conftest.in" | |
5903 | while : | |
5904 | do | |
5905 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
5906 | mv "conftest.tmp" "conftest.in" | |
5907 | cp "conftest.in" "conftest.nl" | |
5908 | $as_echo 'GREP' >> "conftest.nl" | |
5909 | "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
5910 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
5911 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
5912 | if test $ac_count -gt ${ac_path_GREP_max-0}; then | |
5913 | # Best one so far, save it but keep looking for a better one | |
5914 | ac_cv_path_GREP="$ac_path_GREP" | |
5915 | ac_path_GREP_max=$ac_count | |
5916 | fi | |
5917 | # 10*(2^10) chars as input seems more than enough | |
5918 | test $ac_count -gt 10 && break | |
5919 | done | |
5920 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
5921 | esac | |
5922 | ||
5923 | $ac_path_GREP_found && break 3 | |
5924 | done | |
5925 | done | |
5926 | done | |
5927 | IFS=$as_save_IFS | |
5928 | if test -z "$ac_cv_path_GREP"; then | |
a9bec17c | 5929 | as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 |
067d23c9 KY |
5930 | fi |
5931 | else | |
5932 | ac_cv_path_GREP=$GREP | |
5933 | fi | |
5934 | ||
5935 | fi | |
5936 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 | |
5937 | $as_echo "$ac_cv_path_GREP" >&6; } | |
5938 | GREP="$ac_cv_path_GREP" | |
5939 | ||
5940 | ||
5941 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 | |
5942 | $as_echo_n "checking for egrep... " >&6; } | |
a9bec17c | 5943 | if test "${ac_cv_path_EGREP+set}" = set; then : |
067d23c9 KY |
5944 | $as_echo_n "(cached) " >&6 |
5945 | else | |
5946 | if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 | |
5947 | then ac_cv_path_EGREP="$GREP -E" | |
5948 | else | |
5949 | if test -z "$EGREP"; then | |
5950 | ac_path_EGREP_found=false | |
5951 | # Loop through the user's path and test for each of PROGNAME-LIST | |
5952 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5953 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
5954 | do | |
5955 | IFS=$as_save_IFS | |
5956 | test -z "$as_dir" && as_dir=. | |
5957 | for ac_prog in egrep; do | |
5958 | for ac_exec_ext in '' $ac_executable_extensions; do | |
5959 | ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" | |
5960 | { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue | |
5961 | # Check for GNU ac_path_EGREP and select it if it is found. | |
5962 | # Check for GNU $ac_path_EGREP | |
5963 | case `"$ac_path_EGREP" --version 2>&1` in | |
5964 | *GNU*) | |
5965 | ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; | |
5966 | *) | |
5967 | ac_count=0 | |
5968 | $as_echo_n 0123456789 >"conftest.in" | |
5969 | while : | |
5970 | do | |
5971 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
5972 | mv "conftest.tmp" "conftest.in" | |
5973 | cp "conftest.in" "conftest.nl" | |
5974 | $as_echo 'EGREP' >> "conftest.nl" | |
5975 | "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
5976 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
5977 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
5978 | if test $ac_count -gt ${ac_path_EGREP_max-0}; then | |
5979 | # Best one so far, save it but keep looking for a better one | |
5980 | ac_cv_path_EGREP="$ac_path_EGREP" | |
5981 | ac_path_EGREP_max=$ac_count | |
5982 | fi | |
5983 | # 10*(2^10) chars as input seems more than enough | |
5984 | test $ac_count -gt 10 && break | |
5985 | done | |
5986 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
5987 | esac | |
5988 | ||
5989 | $ac_path_EGREP_found && break 3 | |
5990 | done | |
5991 | done | |
5992 | done | |
5993 | IFS=$as_save_IFS | |
5994 | if test -z "$ac_cv_path_EGREP"; then | |
a9bec17c | 5995 | as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 |
067d23c9 KY |
5996 | fi |
5997 | else | |
5998 | ac_cv_path_EGREP=$EGREP | |
5999 | fi | |
6000 | ||
6001 | fi | |
6002 | fi | |
6003 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 | |
6004 | $as_echo "$ac_cv_path_EGREP" >&6; } | |
6005 | EGREP="$ac_cv_path_EGREP" | |
6006 | ||
6007 | ||
369e19fc PE |
6008 | |
6009 | ||
6010 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5 | |
6011 | $as_echo_n "checking for Minix Amsterdam compiler... " >&6; } | |
a9bec17c | 6012 | if test "${gl_cv_c_amsterdam_compiler+set}" = set; then : |
369e19fc PE |
6013 | $as_echo_n "(cached) " >&6 |
6014 | else | |
6015 | ||
6016 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6017 | /* end confdefs.h. */ | |
6018 | ||
6019 | #ifdef __ACK__ | |
6020 | Amsterdam | |
6021 | #endif | |
6022 | ||
6023 | _ACEOF | |
6024 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
6025 | $EGREP "Amsterdam" >/dev/null 2>&1; then : | |
6026 | gl_cv_c_amsterdam_compiler=yes | |
6027 | else | |
6028 | gl_cv_c_amsterdam_compiler=no | |
6029 | fi | |
6030 | rm -f conftest* | |
6031 | ||
6032 | ||
6033 | fi | |
6034 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5 | |
6035 | $as_echo "$gl_cv_c_amsterdam_compiler" >&6; } | |
6036 | if test -z "$AR"; then | |
6037 | if test $gl_cv_c_amsterdam_compiler = yes; then | |
6038 | AR='cc -c.a' | |
6039 | if test -z "$ARFLAGS"; then | |
6040 | ARFLAGS='-o' | |
6041 | fi | |
6042 | else | |
6043 | if test -n "$ac_tool_prefix"; then | |
6044 | # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. | |
6045 | set dummy ${ac_tool_prefix}ar; ac_word=$2 | |
6046 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
6047 | $as_echo_n "checking for $ac_word... " >&6; } | |
a9bec17c | 6048 | if test "${ac_cv_prog_AR+set}" = set; then : |
369e19fc PE |
6049 | $as_echo_n "(cached) " >&6 |
6050 | else | |
6051 | if test -n "$AR"; then | |
6052 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
6053 | else | |
6054 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6055 | for as_dir in $PATH | |
6056 | do | |
6057 | IFS=$as_save_IFS | |
6058 | test -z "$as_dir" && as_dir=. | |
6059 | for ac_exec_ext in '' $ac_executable_extensions; do | |
6060 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
6061 | ac_cv_prog_AR="${ac_tool_prefix}ar" | |
6062 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
6063 | break 2 | |
6064 | fi | |
6065 | done | |
6066 | done | |
6067 | IFS=$as_save_IFS | |
6068 | ||
6069 | fi | |
6070 | fi | |
6071 | AR=$ac_cv_prog_AR | |
6072 | if test -n "$AR"; then | |
6073 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 | |
6074 | $as_echo "$AR" >&6; } | |
6075 | else | |
6076 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
6077 | $as_echo "no" >&6; } | |
6078 | fi | |
6079 | ||
6080 | ||
6081 | fi | |
6082 | if test -z "$ac_cv_prog_AR"; then | |
6083 | ac_ct_AR=$AR | |
6084 | # Extract the first word of "ar", so it can be a program name with args. | |
6085 | set dummy ar; ac_word=$2 | |
6086 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
6087 | $as_echo_n "checking for $ac_word... " >&6; } | |
a9bec17c | 6088 | if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : |
369e19fc PE |
6089 | $as_echo_n "(cached) " >&6 |
6090 | else | |
6091 | if test -n "$ac_ct_AR"; then | |
6092 | ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. | |
6093 | else | |
6094 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6095 | for as_dir in $PATH | |
6096 | do | |
6097 | IFS=$as_save_IFS | |
6098 | test -z "$as_dir" && as_dir=. | |
6099 | for ac_exec_ext in '' $ac_executable_extensions; do | |
6100 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
6101 | ac_cv_prog_ac_ct_AR="ar" | |
6102 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
6103 | break 2 | |
6104 | fi | |
6105 | done | |
6106 | done | |
6107 | IFS=$as_save_IFS | |
6108 | ||
6109 | fi | |
6110 | fi | |
6111 | ac_ct_AR=$ac_cv_prog_ac_ct_AR | |
6112 | if test -n "$ac_ct_AR"; then | |
6113 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 | |
6114 | $as_echo "$ac_ct_AR" >&6; } | |
6115 | else | |
6116 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
6117 | $as_echo "no" >&6; } | |
6118 | fi | |
6119 | ||
6120 | if test "x$ac_ct_AR" = x; then | |
6121 | AR="ar" | |
6122 | else | |
6123 | case $cross_compiling:$ac_tool_warned in | |
6124 | yes:) | |
6125 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
6126 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
6127 | ac_tool_warned=yes ;; | |
6128 | esac | |
6129 | AR=$ac_ct_AR | |
6130 | fi | |
6131 | else | |
6132 | AR="$ac_cv_prog_AR" | |
6133 | fi | |
6134 | ||
6135 | if test -z "$ARFLAGS"; then | |
6136 | ARFLAGS='cru' | |
6137 | fi | |
6138 | fi | |
6139 | else | |
6140 | if test -z "$ARFLAGS"; then | |
6141 | ARFLAGS='cru' | |
6142 | fi | |
6143 | fi | |
6144 | ||
6145 | ||
6146 | if test -z "$RANLIB"; then | |
6147 | if test $gl_cv_c_amsterdam_compiler = yes; then | |
6148 | RANLIB=':' | |
6149 | else | |
6150 | if test -n "$ac_tool_prefix"; then | |
6151 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
6152 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
6153 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
6154 | $as_echo_n "checking for $ac_word... " >&6; } | |
a9bec17c | 6155 | if test "${ac_cv_prog_RANLIB+set}" = set; then : |
369e19fc PE |
6156 | $as_echo_n "(cached) " >&6 |
6157 | else | |
6158 | if test -n "$RANLIB"; then | |
6159 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
6160 | else | |
6161 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6162 | for as_dir in $PATH | |
6163 | do | |
6164 | IFS=$as_save_IFS | |
6165 | test -z "$as_dir" && as_dir=. | |
6166 | for ac_exec_ext in '' $ac_executable_extensions; do | |
6167 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
6168 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" | |
6169 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
6170 | break 2 | |
6171 | fi | |
6172 | done | |
6173 | done | |
6174 | IFS=$as_save_IFS | |
6175 | ||
6176 | fi | |
6177 | fi | |
6178 | RANLIB=$ac_cv_prog_RANLIB | |
6179 | if test -n "$RANLIB"; then | |
6180 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 | |
6181 | $as_echo "$RANLIB" >&6; } | |
6182 | else | |
6183 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
6184 | $as_echo "no" >&6; } | |
6185 | fi | |
6186 | ||
6187 | ||
6188 | fi | |
6189 | if test -z "$ac_cv_prog_RANLIB"; then | |
6190 | ac_ct_RANLIB=$RANLIB | |
6191 | # Extract the first word of "ranlib", so it can be a program name with args. | |
6192 | set dummy ranlib; ac_word=$2 | |
6193 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
6194 | $as_echo_n "checking for $ac_word... " >&6; } | |
a9bec17c | 6195 | if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : |
369e19fc PE |
6196 | $as_echo_n "(cached) " >&6 |
6197 | else | |
6198 | if test -n "$ac_ct_RANLIB"; then | |
6199 | ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. | |
6200 | else | |
6201 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6202 | for as_dir in $PATH | |
6203 | do | |
6204 | IFS=$as_save_IFS | |
6205 | test -z "$as_dir" && as_dir=. | |
6206 | for ac_exec_ext in '' $ac_executable_extensions; do | |
6207 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
6208 | ac_cv_prog_ac_ct_RANLIB="ranlib" | |
6209 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
6210 | break 2 | |
6211 | fi | |
6212 | done | |
6213 | done | |
6214 | IFS=$as_save_IFS | |
6215 | ||
6216 | fi | |
6217 | fi | |
6218 | ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB | |
6219 | if test -n "$ac_ct_RANLIB"; then | |
6220 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 | |
6221 | $as_echo "$ac_ct_RANLIB" >&6; } | |
6222 | else | |
6223 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
6224 | $as_echo "no" >&6; } | |
6225 | fi | |
6226 | ||
6227 | if test "x$ac_ct_RANLIB" = x; then | |
6228 | RANLIB=":" | |
6229 | else | |
6230 | case $cross_compiling:$ac_tool_warned in | |
6231 | yes:) | |
6232 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
6233 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
6234 | ac_tool_warned=yes ;; | |
6235 | esac | |
6236 | RANLIB=$ac_ct_RANLIB | |
6237 | fi | |
6238 | else | |
6239 | RANLIB="$ac_cv_prog_RANLIB" | |
6240 | fi | |
6241 | ||
6242 | fi | |
6243 | fi | |
6244 | ||
6245 | ||
067d23c9 KY |
6246 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 |
6247 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
a9bec17c | 6248 | if test "${ac_cv_header_stdc+set}" = set; then : |
067d23c9 KY |
6249 | $as_echo_n "(cached) " >&6 |
6250 | else | |
6251 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6252 | /* end confdefs.h. */ | |
6253 | #include <stdlib.h> | |
6254 | #include <stdarg.h> | |
6255 | #include <string.h> | |
6256 | #include <float.h> | |
6257 | ||
6258 | int | |
6259 | main () | |
6260 | { | |
6261 | ||
6262 | ; | |
6263 | return 0; | |
6264 | } | |
6265 | _ACEOF | |
6266 | if ac_fn_c_try_compile "$LINENO"; then : | |
6267 | ac_cv_header_stdc=yes | |
6268 | else | |
6269 | ac_cv_header_stdc=no | |
6270 | fi | |
6271 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
6272 | ||
6273 | if test $ac_cv_header_stdc = yes; then | |
6274 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
6275 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6276 | /* end confdefs.h. */ | |
6277 | #include <string.h> | |
6278 | ||
6279 | _ACEOF | |
6280 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
6281 | $EGREP "memchr" >/dev/null 2>&1; then : | |
6282 | ||
6283 | else | |
6284 | ac_cv_header_stdc=no | |
6285 | fi | |
6286 | rm -f conftest* | |
6287 | ||
6288 | fi | |
6289 | ||
6290 | if test $ac_cv_header_stdc = yes; then | |
6291 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
6292 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6293 | /* end confdefs.h. */ | |
6294 | #include <stdlib.h> | |
6295 | ||
6296 | _ACEOF | |
6297 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
6298 | $EGREP "free" >/dev/null 2>&1; then : | |
6299 | ||
6300 | else | |
6301 | ac_cv_header_stdc=no | |
6302 | fi | |
6303 | rm -f conftest* | |
6304 | ||
6305 | fi | |
6306 | ||
6307 | if test $ac_cv_header_stdc = yes; then | |
6308 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
6309 | if test "$cross_compiling" = yes; then : | |
6310 | : | |
6311 | else | |
6312 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6313 | /* end confdefs.h. */ | |
6314 | #include <ctype.h> | |
6315 | #include <stdlib.h> | |
6316 | #if ((' ' & 0x0FF) == 0x020) | |
6317 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
6318 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
6319 | #else | |
6320 | # define ISLOWER(c) \ | |
6321 | (('a' <= (c) && (c) <= 'i') \ | |
6322 | || ('j' <= (c) && (c) <= 'r') \ | |
6323 | || ('s' <= (c) && (c) <= 'z')) | |
6324 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
6325 | #endif | |
6326 | ||
6327 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
6328 | int | |
6329 | main () | |
6330 | { | |
6331 | int i; | |
6332 | for (i = 0; i < 256; i++) | |
6333 | if (XOR (islower (i), ISLOWER (i)) | |
6334 | || toupper (i) != TOUPPER (i)) | |
6335 | return 2; | |
6336 | return 0; | |
6337 | } | |
6338 | _ACEOF | |
6339 | if ac_fn_c_try_run "$LINENO"; then : | |
6340 | ||
6341 | else | |
6342 | ac_cv_header_stdc=no | |
6343 | fi | |
6344 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
6345 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
6346 | fi | |
6347 | ||
6348 | fi | |
6349 | fi | |
6350 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 | |
6351 | $as_echo "$ac_cv_header_stdc" >&6; } | |
6352 | if test $ac_cv_header_stdc = yes; then | |
6353 | ||
6354 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h | |
6355 | ||
6356 | fi | |
6357 | ||
6358 | # On IRIX 5.3, sys/types and inttypes.h are conflicting. | |
6359 | for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ | |
6360 | inttypes.h stdint.h unistd.h | |
6361 | do : | |
6362 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
6363 | ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default | |
6364 | " | |
a9bec17c GM |
6365 | eval as_val=\$$as_ac_Header |
6366 | if test "x$as_val" = x""yes; then : | |
067d23c9 KY |
6367 | cat >>confdefs.h <<_ACEOF |
6368 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
6369 | _ACEOF | |
6370 | ||
6371 | fi | |
6372 | ||
6373 | done | |
6374 | ||
6375 | ||
6376 | ||
1fd182f0 PE |
6377 | |
6378 | ||
067d23c9 | 6379 | ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" |
a9bec17c | 6380 | if test "x$ac_cv_header_minix_config_h" = x""yes; then : |
067d23c9 KY |
6381 | MINIX=yes |
6382 | else | |
6383 | MINIX= | |
6384 | fi | |
6385 | ||
6386 | ||
6387 | if test "$MINIX" = yes; then | |
6388 | ||
6389 | $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h | |
6390 | ||
6391 | ||
6392 | $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h | |
6393 | ||
6394 | ||
6395 | $as_echo "#define _MINIX 1" >>confdefs.h | |
6396 | ||
6397 | fi | |
6398 | ||
1fd182f0 PE |
6399 | case "$host_os" in |
6400 | hpux*) | |
6401 | ||
6402 | $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h | |
6403 | ||
6404 | ;; | |
6405 | esac | |
6406 | ||
067d23c9 KY |
6407 | |
6408 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 | |
6409 | $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } | |
a9bec17c | 6410 | if test "${ac_cv_safe_to_define___extensions__+set}" = set; then : |
067d23c9 KY |
6411 | $as_echo_n "(cached) " >&6 |
6412 | else | |
6413 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6414 | /* end confdefs.h. */ | |
369e19fc PE |
6415 | |
6416 | # define __EXTENSIONS__ 1 | |
6417 | $ac_includes_default | |
6418 | int | |
6419 | main () | |
6420 | { | |
6421 | ||
6422 | ; | |
6423 | return 0; | |
6424 | } | |
6425 | _ACEOF | |
6426 | if ac_fn_c_try_compile "$LINENO"; then : | |
6427 | ac_cv_safe_to_define___extensions__=yes | |
6428 | else | |
6429 | ac_cv_safe_to_define___extensions__=no | |
6430 | fi | |
6431 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
6432 | fi | |
6433 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 | |
6434 | $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } | |
6435 | test $ac_cv_safe_to_define___extensions__ = yes && | |
6436 | $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h | |
6437 | ||
6438 | $as_echo "#define _ALL_SOURCE 1" >>confdefs.h | |
6439 | ||
6440 | $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h | |
6441 | ||
6442 | $as_echo "#define _GNU_SOURCE 1" >>confdefs.h | |
6443 | ||
6444 | $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h | |
6445 | ||
6446 | $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h | |
6447 | ||
6448 | ||
6449 | ||
6450 | ||
6451 | ||
6452 | ||
6453 | ||
6454 | ||
6455 | # Check whether --enable-largefile was given. | |
6456 | if test "${enable_largefile+set}" = set; then : | |
6457 | enableval=$enable_largefile; | |
6458 | fi | |
6459 | ||
6460 | if test "$enable_largefile" != no; then | |
6461 | ||
6462 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 | |
6463 | $as_echo_n "checking for special C compiler options needed for large files... " >&6; } | |
a9bec17c | 6464 | if test "${ac_cv_sys_largefile_CC+set}" = set; then : |
369e19fc PE |
6465 | $as_echo_n "(cached) " >&6 |
6466 | else | |
6467 | ac_cv_sys_largefile_CC=no | |
6468 | if test "$GCC" != yes; then | |
6469 | ac_save_CC=$CC | |
6470 | while :; do | |
6471 | # IRIX 6.2 and later do not support large files by default, | |
6472 | # so use the C compiler's -n32 option if that helps. | |
6473 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6474 | /* end confdefs.h. */ | |
6475 | #include <sys/types.h> | |
6476 | /* Check that off_t can represent 2**63 - 1 correctly. | |
6477 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
6478 | since some C++ compilers masquerading as C compilers | |
6479 | incorrectly reject 9223372036854775807. */ | |
6480 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
6481 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
6482 | && LARGE_OFF_T % 2147483647 == 1) | |
6483 | ? 1 : -1]; | |
6484 | int | |
6485 | main () | |
6486 | { | |
6487 | ||
6488 | ; | |
6489 | return 0; | |
6490 | } | |
6491 | _ACEOF | |
6492 | if ac_fn_c_try_compile "$LINENO"; then : | |
6493 | break | |
6494 | fi | |
6495 | rm -f core conftest.err conftest.$ac_objext | |
6496 | CC="$CC -n32" | |
6497 | if ac_fn_c_try_compile "$LINENO"; then : | |
6498 | ac_cv_sys_largefile_CC=' -n32'; break | |
6499 | fi | |
6500 | rm -f core conftest.err conftest.$ac_objext | |
6501 | break | |
6502 | done | |
6503 | CC=$ac_save_CC | |
6504 | rm -f conftest.$ac_ext | |
6505 | fi | |
6506 | fi | |
6507 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 | |
6508 | $as_echo "$ac_cv_sys_largefile_CC" >&6; } | |
6509 | if test "$ac_cv_sys_largefile_CC" != no; then | |
6510 | CC=$CC$ac_cv_sys_largefile_CC | |
6511 | fi | |
6512 | ||
6513 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 | |
6514 | $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } | |
a9bec17c | 6515 | if test "${ac_cv_sys_file_offset_bits+set}" = set; then : |
369e19fc PE |
6516 | $as_echo_n "(cached) " >&6 |
6517 | else | |
6518 | while :; do | |
6519 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6520 | /* end confdefs.h. */ | |
6521 | #include <sys/types.h> | |
6522 | /* Check that off_t can represent 2**63 - 1 correctly. | |
6523 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
6524 | since some C++ compilers masquerading as C compilers | |
6525 | incorrectly reject 9223372036854775807. */ | |
6526 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
6527 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
6528 | && LARGE_OFF_T % 2147483647 == 1) | |
6529 | ? 1 : -1]; | |
6530 | int | |
6531 | main () | |
6532 | { | |
6533 | ||
6534 | ; | |
6535 | return 0; | |
6536 | } | |
6537 | _ACEOF | |
6538 | if ac_fn_c_try_compile "$LINENO"; then : | |
6539 | ac_cv_sys_file_offset_bits=no; break | |
6540 | fi | |
6541 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
6542 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6543 | /* end confdefs.h. */ | |
6544 | #define _FILE_OFFSET_BITS 64 | |
6545 | #include <sys/types.h> | |
6546 | /* Check that off_t can represent 2**63 - 1 correctly. | |
6547 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
6548 | since some C++ compilers masquerading as C compilers | |
6549 | incorrectly reject 9223372036854775807. */ | |
6550 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
6551 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
6552 | && LARGE_OFF_T % 2147483647 == 1) | |
6553 | ? 1 : -1]; | |
6554 | int | |
6555 | main () | |
6556 | { | |
6557 | ||
6558 | ; | |
6559 | return 0; | |
6560 | } | |
6561 | _ACEOF | |
6562 | if ac_fn_c_try_compile "$LINENO"; then : | |
6563 | ac_cv_sys_file_offset_bits=64; break | |
6564 | fi | |
6565 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
6566 | ac_cv_sys_file_offset_bits=unknown | |
6567 | break | |
6568 | done | |
6569 | fi | |
6570 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 | |
6571 | $as_echo "$ac_cv_sys_file_offset_bits" >&6; } | |
6572 | case $ac_cv_sys_file_offset_bits in #( | |
6573 | no | unknown) ;; | |
6574 | *) | |
6575 | cat >>confdefs.h <<_ACEOF | |
6576 | #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits | |
6577 | _ACEOF | |
6578 | ;; | |
6579 | esac | |
6580 | rm -rf conftest* | |
6581 | if test $ac_cv_sys_file_offset_bits = unknown; then | |
6582 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 | |
6583 | $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } | |
a9bec17c | 6584 | if test "${ac_cv_sys_large_files+set}" = set; then : |
369e19fc PE |
6585 | $as_echo_n "(cached) " >&6 |
6586 | else | |
6587 | while :; do | |
6588 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6589 | /* end confdefs.h. */ | |
6590 | #include <sys/types.h> | |
6591 | /* Check that off_t can represent 2**63 - 1 correctly. | |
6592 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
6593 | since some C++ compilers masquerading as C compilers | |
6594 | incorrectly reject 9223372036854775807. */ | |
6595 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
6596 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
6597 | && LARGE_OFF_T % 2147483647 == 1) | |
6598 | ? 1 : -1]; | |
6599 | int | |
6600 | main () | |
6601 | { | |
6602 | ||
6603 | ; | |
6604 | return 0; | |
6605 | } | |
6606 | _ACEOF | |
6607 | if ac_fn_c_try_compile "$LINENO"; then : | |
6608 | ac_cv_sys_large_files=no; break | |
6609 | fi | |
6610 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
6611 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6612 | /* end confdefs.h. */ | |
6613 | #define _LARGE_FILES 1 | |
6614 | #include <sys/types.h> | |
6615 | /* Check that off_t can represent 2**63 - 1 correctly. | |
6616 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
6617 | since some C++ compilers masquerading as C compilers | |
6618 | incorrectly reject 9223372036854775807. */ | |
6619 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
6620 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
6621 | && LARGE_OFF_T % 2147483647 == 1) | |
6622 | ? 1 : -1]; | |
067d23c9 KY |
6623 | int |
6624 | main () | |
6625 | { | |
6626 | ||
6627 | ; | |
6628 | return 0; | |
6629 | } | |
6630 | _ACEOF | |
6631 | if ac_fn_c_try_compile "$LINENO"; then : | |
369e19fc | 6632 | ac_cv_sys_large_files=1; break |
067d23c9 KY |
6633 | fi |
6634 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
369e19fc PE |
6635 | ac_cv_sys_large_files=unknown |
6636 | break | |
6637 | done | |
067d23c9 | 6638 | fi |
369e19fc PE |
6639 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 |
6640 | $as_echo "$ac_cv_sys_large_files" >&6; } | |
6641 | case $ac_cv_sys_large_files in #( | |
6642 | no | unknown) ;; | |
6643 | *) | |
6644 | cat >>confdefs.h <<_ACEOF | |
6645 | #define _LARGE_FILES $ac_cv_sys_large_files | |
6646 | _ACEOF | |
6647 | ;; | |
6648 | esac | |
6649 | rm -rf conftest* | |
6650 | fi | |
1fd182f0 PE |
6651 | |
6652 | ||
369e19fc | 6653 | fi |
1fd182f0 | 6654 | |
6d153f56 GM |
6655 | case $ac_cv_prog_cc_stdc in #( |
6656 | no) : | |
6657 | ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; #( | |
6658 | *) : | |
6659 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5 | |
6660 | $as_echo_n "checking for $CC option to accept ISO C99... " >&6; } | |
a9bec17c | 6661 | if test "${ac_cv_prog_cc_c99+set}" = set; then : |
6d153f56 GM |
6662 | $as_echo_n "(cached) " >&6 |
6663 | else | |
6664 | ac_cv_prog_cc_c99=no | |
6665 | ac_save_CC=$CC | |
6666 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6667 | /* end confdefs.h. */ | |
6668 | #include <stdarg.h> | |
6669 | #include <stdbool.h> | |
6670 | #include <stdlib.h> | |
6671 | #include <wchar.h> | |
6672 | #include <stdio.h> | |
6673 | ||
6674 | // Check varargs macros. These examples are taken from C99 6.10.3.5. | |
6675 | #define debug(...) fprintf (stderr, __VA_ARGS__) | |
6676 | #define showlist(...) puts (#__VA_ARGS__) | |
6677 | #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) | |
6678 | static void | |
6679 | test_varargs_macros (void) | |
6680 | { | |
6681 | int x = 1234; | |
6682 | int y = 5678; | |
6683 | debug ("Flag"); | |
6684 | debug ("X = %d\n", x); | |
6685 | showlist (The first, second, and third items.); | |
6686 | report (x>y, "x is %d but y is %d", x, y); | |
6687 | } | |
6688 | ||
6689 | // Check long long types. | |
6690 | #define BIG64 18446744073709551615ull | |
6691 | #define BIG32 4294967295ul | |
6692 | #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) | |
6693 | #if !BIG_OK | |
6694 | your preprocessor is broken; | |
6695 | #endif | |
6696 | #if BIG_OK | |
6697 | #else | |
6698 | your preprocessor is broken; | |
6699 | #endif | |
6700 | static long long int bignum = -9223372036854775807LL; | |
6701 | static unsigned long long int ubignum = BIG64; | |
6702 | ||
6703 | struct incomplete_array | |
6704 | { | |
6705 | int datasize; | |
6706 | double data[]; | |
6707 | }; | |
6708 | ||
6709 | struct named_init { | |
6710 | int number; | |
6711 | const wchar_t *name; | |
6712 | double average; | |
6713 | }; | |
6714 | ||
6715 | typedef const char *ccp; | |
6716 | ||
6717 | static inline int | |
6718 | test_restrict (ccp restrict text) | |
6719 | { | |
6720 | // See if C++-style comments work. | |
6721 | // Iterate through items via the restricted pointer. | |
6722 | // Also check for declarations in for loops. | |
6723 | for (unsigned int i = 0; *(text+i) != '\0'; ++i) | |
6724 | continue; | |
6725 | return 0; | |
6726 | } | |
6727 | ||
6728 | // Check varargs and va_copy. | |
6729 | static void | |
6730 | test_varargs (const char *format, ...) | |
6731 | { | |
6732 | va_list args; | |
6733 | va_start (args, format); | |
6734 | va_list args_copy; | |
6735 | va_copy (args_copy, args); | |
6736 | ||
6737 | const char *str; | |
6738 | int number; | |
6739 | float fnumber; | |
6740 | ||
6741 | while (*format) | |
6742 | { | |
6743 | switch (*format++) | |
6744 | { | |
6745 | case 's': // string | |
6746 | str = va_arg (args_copy, const char *); | |
6747 | break; | |
6748 | case 'd': // int | |
6749 | number = va_arg (args_copy, int); | |
6750 | break; | |
6751 | case 'f': // float | |
6752 | fnumber = va_arg (args_copy, double); | |
6753 | break; | |
6754 | default: | |
6755 | break; | |
6756 | } | |
6757 | } | |
6758 | va_end (args_copy); | |
6759 | va_end (args); | |
6760 | } | |
6761 | ||
6762 | int | |
6763 | main () | |
6764 | { | |
6765 | ||
6766 | // Check bool. | |
6767 | _Bool success = false; | |
6768 | ||
6769 | // Check restrict. | |
6770 | if (test_restrict ("String literal") == 0) | |
6771 | success = true; | |
6772 | char *restrict newvar = "Another string"; | |
6773 | ||
6774 | // Check varargs. | |
6775 | test_varargs ("s, d' f .", "string", 65, 34.234); | |
6776 | test_varargs_macros (); | |
6777 | ||
6778 | // Check flexible array members. | |
6779 | struct incomplete_array *ia = | |
6780 | malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); | |
6781 | ia->datasize = 10; | |
6782 | for (int i = 0; i < ia->datasize; ++i) | |
6783 | ia->data[i] = i * 1.234; | |
6784 | ||
6785 | // Check named initializers. | |
6786 | struct named_init ni = { | |
6787 | .number = 34, | |
6788 | .name = L"Test wide string", | |
6789 | .average = 543.34343, | |
6790 | }; | |
6791 | ||
6792 | ni.number = 58; | |
6793 | ||
6794 | int dynamic_array[ni.number]; | |
6795 | dynamic_array[ni.number - 1] = 543; | |
6796 | ||
6797 | // work around unused variable warnings | |
6798 | return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x' | |
6799 | || dynamic_array[ni.number - 1] != 543); | |
6800 | ||
6801 | ; | |
6802 | return 0; | |
6803 | } | |
6804 | _ACEOF | |
6805 | for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99 | |
6806 | do | |
6807 | CC="$ac_save_CC $ac_arg" | |
6808 | if ac_fn_c_try_compile "$LINENO"; then : | |
6809 | ac_cv_prog_cc_c99=$ac_arg | |
6810 | fi | |
6811 | rm -f core conftest.err conftest.$ac_objext | |
6812 | test "x$ac_cv_prog_cc_c99" != "xno" && break | |
6813 | done | |
6814 | rm -f conftest.$ac_ext | |
6815 | CC=$ac_save_CC | |
6816 | ||
6817 | fi | |
6818 | # AC_CACHE_VAL | |
6819 | case "x$ac_cv_prog_cc_c99" in | |
6820 | x) | |
6821 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 | |
6822 | $as_echo "none needed" >&6; } ;; | |
6823 | xno) | |
6824 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 | |
6825 | $as_echo "unsupported" >&6; } ;; | |
6826 | *) | |
6827 | CC="$CC $ac_cv_prog_cc_c99" | |
6828 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 | |
6829 | $as_echo "$ac_cv_prog_cc_c99" >&6; } ;; | |
6830 | esac | |
6831 | if test "x$ac_cv_prog_cc_c99" != xno; then : | |
6832 | ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 | |
6833 | else | |
6834 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 | |
6835 | $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } | |
a9bec17c | 6836 | if test "${ac_cv_prog_cc_c89+set}" = set; then : |
6d153f56 GM |
6837 | $as_echo_n "(cached) " >&6 |
6838 | else | |
6839 | ac_cv_prog_cc_c89=no | |
6840 | ac_save_CC=$CC | |
6841 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6842 | /* end confdefs.h. */ | |
6843 | #include <stdarg.h> | |
6844 | #include <stdio.h> | |
6845 | #include <sys/types.h> | |
6846 | #include <sys/stat.h> | |
6847 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
6848 | struct buf { int x; }; | |
6849 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
6850 | static char *e (p, i) | |
6851 | char **p; | |
6852 | int i; | |
6853 | { | |
6854 | return p[i]; | |
6855 | } | |
6856 | static char *f (char * (*g) (char **, int), char **p, ...) | |
6857 | { | |
6858 | char *s; | |
6859 | va_list v; | |
6860 | va_start (v,p); | |
6861 | s = g (p, va_arg (v,int)); | |
6862 | va_end (v); | |
6863 | return s; | |
6864 | } | |
6865 | ||
6866 | /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has | |
6867 | function prototypes and stuff, but not '\xHH' hex character constants. | |
6868 | These don't provoke an error unfortunately, instead are silently treated | |
6869 | as 'x'. The following induces an error, until -std is added to get | |
6870 | proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an | |
6871 | array size at least. It's necessary to write '\x00'==0 to get something | |
6872 | that's true only with -std. */ | |
6873 | int osf4_cc_array ['\x00' == 0 ? 1 : -1]; | |
6874 | ||
6875 | /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters | |
6876 | inside strings and character constants. */ | |
6877 | #define FOO(x) 'x' | |
6878 | int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; | |
6879 | ||
6880 | int test (int i, double x); | |
6881 | struct s1 {int (*f) (int a);}; | |
6882 | struct s2 {int (*f) (double a);}; | |
6883 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
6884 | int argc; | |
6885 | char **argv; | |
6886 | int | |
6887 | main () | |
6888 | { | |
6889 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; | |
6890 | ; | |
6891 | return 0; | |
6892 | } | |
6893 | _ACEOF | |
6894 | for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ | |
6895 | -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
6896 | do | |
6897 | CC="$ac_save_CC $ac_arg" | |
6898 | if ac_fn_c_try_compile "$LINENO"; then : | |
6899 | ac_cv_prog_cc_c89=$ac_arg | |
6900 | fi | |
6901 | rm -f core conftest.err conftest.$ac_objext | |
6902 | test "x$ac_cv_prog_cc_c89" != "xno" && break | |
6903 | done | |
6904 | rm -f conftest.$ac_ext | |
6905 | CC=$ac_save_CC | |
6906 | ||
6907 | fi | |
6908 | # AC_CACHE_VAL | |
6909 | case "x$ac_cv_prog_cc_c89" in | |
6910 | x) | |
6911 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 | |
6912 | $as_echo "none needed" >&6; } ;; | |
6913 | xno) | |
6914 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 | |
6915 | $as_echo "unsupported" >&6; } ;; | |
6916 | *) | |
6917 | CC="$CC $ac_cv_prog_cc_c89" | |
6918 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 | |
6919 | $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; | |
6920 | esac | |
6921 | if test "x$ac_cv_prog_cc_c89" != xno; then : | |
6922 | ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 | |
6923 | else | |
6924 | ac_cv_prog_cc_stdc=no | |
6925 | fi | |
6926 | ||
6927 | fi | |
6928 | ;; | |
6929 | esac | |
6930 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5 | |
6931 | $as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; } | |
a9bec17c | 6932 | if test "${ac_cv_prog_cc_stdc+set}" = set; then : |
6d153f56 GM |
6933 | $as_echo_n "(cached) " >&6 |
6934 | fi | |
6935 | ||
6936 | case $ac_cv_prog_cc_stdc in #( | |
6937 | no) : | |
6938 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 | |
6939 | $as_echo "unsupported" >&6; } ;; #( | |
6940 | '') : | |
6941 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 | |
6942 | $as_echo "none needed" >&6; } ;; #( | |
6943 | *) : | |
6944 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_stdc" >&5 | |
6945 | $as_echo "$ac_cv_prog_cc_stdc" >&6; } ;; | |
6946 | esac | |
6947 | ||
1fd182f0 PE |
6948 | |
6949 | ||
4fc2b746 | 6950 | # Code from module alloca-opt: |
8d8af66d | 6951 | # Code from module allocator: |
938a4ef9 GM |
6952 | # Code from module c-ctype: |
6953 | # Code from module c-strcase: | |
6c051bab | 6954 | # Code from module careadlinkat: |
f199cab1 | 6955 | # Code from module clock-time: |
942f733f | 6956 | # Code from module crypto/md5: |
40e27e7f | 6957 | # Code from module crypto/sha1: |
d87ffdb7 GM |
6958 | # Code from module crypto/sha256: |
6959 | # Code from module crypto/sha512: | |
36f13e16 | 6960 | # Code from module dosname: |
f737437b | 6961 | # Code from module dtoastr: |
f199cab1 | 6962 | # Code from module dtotimespec: |
7d2a1c5e | 6963 | # Code from module dup2: |
93131e11 | 6964 | # Code from module environ: |
8966cbff | 6965 | # Code from module execinfo: |
1fd182f0 PE |
6966 | # Code from module extensions: |
6967 | ||
7cd2ed2c | 6968 | # Code from module extern-inline: |
5fa4ac76 | 6969 | # Code from module filemode: |
1f5d53eb | 6970 | # Code from module getloadavg: |
e275c824 PE |
6971 | # Code from module getopt-gnu: |
6972 | # Code from module getopt-posix: | |
6973 | # Code from module gettext-h: | |
f199cab1 GM |
6974 | # Code from module gettime: |
6975 | # Code from module gettimeofday: | |
67342916 | 6976 | # Code from module ignore-value: |
1fd182f0 PE |
6977 | # Code from module include_next: |
6978 | # Code from module intprops: | |
4fda9c95 | 6979 | # Code from module inttypes-incomplete: |
369e19fc PE |
6980 | # Code from module largefile: |
6981 | ||
ae0d7250 | 6982 | # Code from module lstat: |
ac1ca7e9 | 6983 | # Code from module manywarnings: |
1fd182f0 PE |
6984 | # Code from module mktime: |
6985 | # Code from module multiarch: | |
369e19fc | 6986 | # Code from module nocrash: |
a0a61e58 | 6987 | # Code from module pathmax: |
f199cab1 | 6988 | # Code from module pselect: |
3e0be4ab | 6989 | # Code from module pthread_sigmask: |
ae0d7250 | 6990 | # Code from module readlink: |
2b1928b8 | 6991 | # Code from module signal-h: |
369e19fc PE |
6992 | # Code from module snippet/_Noreturn: |
6993 | # Code from module snippet/arg-nonnull: | |
6994 | # Code from module snippet/c++defs: | |
6995 | # Code from module snippet/warn-on-use: | |
6ad6792b | 6996 | # Code from module socklen: |
6c051bab | 6997 | # Code from module ssize_t: |
ae0d7250 | 6998 | # Code from module stat: |
f199cab1 | 6999 | # Code from module stat-time: |
0eb775a3 | 7000 | # Code from module stdalign: |
6d153f56 GM |
7001 | # Code from module stdarg: |
7002 | ||
8c069cc7 GM |
7003 | |
7004 | ||
16c3e636 | 7005 | # Code from module stdbool: |
1fd182f0 | 7006 | # Code from module stddef: |
5f90be1b | 7007 | # Code from module stdint: |
6ad6792b | 7008 | # Code from module stdio: |
1f5d53eb | 7009 | # Code from module stdlib: |
16c3e636 | 7010 | # Code from module strftime: |
3e0be4ab GM |
7011 | # Code from module strtoimax: |
7012 | # Code from module strtoll: | |
4fda9c95 GM |
7013 | # Code from module strtoull: |
7014 | # Code from module strtoumax: | |
ae0d7250 | 7015 | # Code from module symlink: |
f199cab1 | 7016 | # Code from module sys_select: |
5fa4ac76 | 7017 | # Code from module sys_stat: |
f199cab1 | 7018 | # Code from module sys_time: |
1fd182f0 PE |
7019 | # Code from module time: |
7020 | # Code from module time_r: | |
f199cab1 GM |
7021 | # Code from module timespec: |
7022 | # Code from module timespec-add: | |
7023 | # Code from module timespec-sub: | |
d87ffdb7 | 7024 | # Code from module u64: |
e275c824 | 7025 | # Code from module unistd: |
f199cab1 | 7026 | # Code from module utimens: |
4fda9c95 | 7027 | # Code from module verify: |
ac1ca7e9 | 7028 | # Code from module warnings: |
1fd182f0 PE |
7029 | |
7030 | ||
6bd1cda5 GM |
7031 | # It's helpful to have C macros available to GDB, so prefer -g3 to -g |
7032 | # if -g3 works and the user does not specify CFLAGS. | |
7033 | # This test must follow gl_EARLY; otherwise AC_LINK_IFELSE complains. | |
7034 | if test "$ac_test_CFLAGS" != set; then | |
7035 | case $CFLAGS in | |
7036 | '-g') | |
7037 | emacs_g3_CFLAGS='-g3';; | |
7038 | '-g -O2') | |
7039 | emacs_g3_CFLAGS='-g3 -O2';; | |
7040 | *) | |
7041 | emacs_g3_CFLAGS='';; | |
7042 | esac | |
7043 | if test -n "$emacs_g3_CFLAGS"; then | |
7044 | emacs_save_CFLAGS=$CFLAGS | |
7045 | CFLAGS=$emacs_g3_CFLAGS | |
7046 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts $emacs_g3_CFLAGS" >&5 | |
7047 | $as_echo_n "checking whether $CC accepts $emacs_g3_CFLAGS... " >&6; } | |
7048 | if test "${emacs_cv_prog_cc_g3+set}" = set; then : | |
7049 | $as_echo_n "(cached) " >&6 | |
7050 | else | |
7051 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7052 | /* end confdefs.h. */ | |
7053 | ||
7054 | int | |
7055 | main () | |
7056 | { | |
7057 | ||
7058 | ; | |
7059 | return 0; | |
7060 | } | |
7061 | _ACEOF | |
7062 | if ac_fn_c_try_link "$LINENO"; then : | |
7063 | emacs_cv_prog_cc_g3=yes | |
7064 | else | |
7065 | emacs_cv_prog_cc_g3=no | |
7066 | fi | |
7067 | rm -f core conftest.err conftest.$ac_objext \ | |
7068 | conftest$ac_exeext conftest.$ac_ext | |
7069 | fi | |
7070 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_prog_cc_g3" >&5 | |
7071 | $as_echo "$emacs_cv_prog_cc_g3" >&6; } | |
7072 | if test $emacs_cv_prog_cc_g3 = yes; then | |
7073 | CFLAGS=$emacs_g3_CFLAGS | |
7074 | else | |
7075 | CFLAGS=$emacs_save_CFLAGS | |
7076 | fi | |
7077 | fi | |
7078 | fi | |
7079 | ||
a6b92a4a GM |
7080 | # Check whether --enable-gcc-warnings was given. |
7081 | if test "${enable_gcc_warnings+set}" = set; then : | |
7082 | enableval=$enable_gcc_warnings; case $enableval in | |
7083 | yes|no) ;; | |
7084 | *) as_fn_error "bad value $enableval for gcc-warnings option" "$LINENO" 5 ;; | |
7085 | esac | |
7086 | gl_gcc_warnings=$enableval | |
7087 | else | |
7088 | gl_gcc_warnings=no | |
7089 | ||
7090 | fi | |
7091 | ||
7092 | ||
e4d35030 GM |
7093 | # Check whether --enable-link-time-optimization was given. |
7094 | if test "${enable_link_time_optimization+set}" = set; then : | |
7095 | enableval=$enable_link_time_optimization; if test "${enableval}" != "no"; then | |
7096 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether link-time optimization is supported" >&5 | |
7097 | $as_echo_n "checking whether link-time optimization is supported... " >&6; } | |
7098 | ac_lto_supported=no | |
7099 | if test x$GCC = xyes; then | |
7100 | CPUS=`getconf _NPROCESSORS_ONLN 2>/dev/null` | |
7101 | if test x$CPUS != x; then | |
7102 | LTO="-flto=$CPUS" | |
7103 | else | |
7104 | LTO="-flto" | |
7105 | fi | |
7106 | old_CFLAGS=$CFLAGS | |
7107 | CFLAGS="$CFLAGS $LTO" | |
7108 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7109 | /* end confdefs.h. */ | |
7110 | ||
7111 | int | |
7112 | main () | |
7113 | { | |
7114 | ||
7115 | ; | |
7116 | return 0; | |
7117 | } | |
7118 | _ACEOF | |
7119 | if ac_fn_c_try_compile "$LINENO"; then : | |
7120 | ac_lto_supported=yes | |
7121 | else | |
7122 | ac_lto_supported=no | |
7123 | fi | |
7124 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7125 | CFLAGS="$old_CFLAGS" | |
7126 | fi | |
7127 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_lto_supported" >&5 | |
7128 | $as_echo "$ac_lto_supported" >&6; } | |
7129 | if test "$ac_lto_supported" = "yes"; then | |
7130 | CFLAGS="$CFLAGS $LTO" | |
7131 | fi | |
7132 | fi | |
7133 | fi | |
7134 | ||
7135 | ||
a6b92a4a GM |
7136 | # gl_GCC_VERSION_IFELSE([major], [minor], [run-if-found], [run-if-not-found]) |
7137 | # ------------------------------------------------ | |
7138 | # If $CPP is gcc-MAJOR.MINOR or newer, then run RUN-IF-FOUND. | |
7139 | # Otherwise, run RUN-IF-NOT-FOUND. | |
7140 | ||
7141 | ||
7142 | # When compiling with GCC, prefer -isystem to -I when including system | |
7143 | # include files, to avoid generating useless diagnostics for the files. | |
7144 | if test "$gl_gcc_warnings" != yes; then | |
7145 | isystem='-I' | |
7146 | else | |
7147 | isystem='-isystem ' | |
7148 | ||
7149 | # This, $nw, is the list of warnings we disable. | |
7150 | nw= | |
7151 | ||
7152 | case $with_x_toolkit in | |
7153 | lucid | athena | motif) | |
7154 | # Old toolkits mishandle 'const'. | |
7155 | nw="$nw -Wwrite-strings" | |
7156 | ;; | |
7157 | *) | |
7158 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror" >&5 | |
7159 | $as_echo_n "checking whether C compiler handles -Werror... " >&6; } | |
7160 | if test "${gl_cv_warn_c__Werror+set}" = set; then : | |
7161 | $as_echo_n "(cached) " >&6 | |
7162 | else | |
7163 | ||
7164 | gl_save_compiler_FLAGS="$CFLAGS" | |
0eb775a3 | 7165 | as_fn_append CFLAGS " -Werror" |
a6b92a4a | 7166 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
067d23c9 KY |
7167 | /* end confdefs.h. */ |
7168 | ||
7169 | int | |
7170 | main () | |
7171 | { | |
7172 | ||
7173 | ; | |
7174 | return 0; | |
7175 | } | |
7176 | _ACEOF | |
7177 | if ac_fn_c_try_compile "$LINENO"; then : | |
a6b92a4a | 7178 | gl_cv_warn_c__Werror=yes |
067d23c9 | 7179 | else |
a6b92a4a | 7180 | gl_cv_warn_c__Werror=no |
067d23c9 KY |
7181 | fi |
7182 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
a6b92a4a GM |
7183 | CFLAGS="$gl_save_compiler_FLAGS" |
7184 | ||
7185 | fi | |
7186 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror" >&5 | |
7187 | $as_echo "$gl_cv_warn_c__Werror" >&6; } | |
7188 | if test "x$gl_cv_warn_c__Werror" = x""yes; then : | |
7189 | as_fn_append WERROR_CFLAGS " -Werror" | |
7190 | fi | |
7191 | ||
0eb775a3 | 7192 | |
a6b92a4a GM |
7193 | ;; |
7194 | esac | |
7195 | ||
7196 | ||
7197 | nw="$nw -Waggregate-return" # anachronistic | |
ca0294bb | 7198 | nw="$nw -Wlong-long" # C90 is anachronistic |
a6b92a4a GM |
7199 | nw="$nw -Wc++-compat" # We don't care about C++ compilers |
7200 | nw="$nw -Wundef" # Warns on '#if GNULIB_FOO' etc in gnulib | |
7201 | nw="$nw -Wtraditional" # Warns on #elif which we use often | |
7202 | nw="$nw -Wcast-qual" # Too many warnings for now | |
7203 | nw="$nw -Wconversion" # Too many warnings for now | |
7204 | nw="$nw -Wsystem-headers" # Don't let system headers trigger warnings | |
7205 | nw="$nw -Wsign-conversion" # Too many warnings for now | |
7206 | nw="$nw -Woverlength-strings" # Not a problem these days | |
7207 | nw="$nw -Wtraditional-conversion" # Too many warnings for now | |
fd9d2a9d | 7208 | nw="$nw -Wunreachable-code" # so buggy that it's now silently ignored |
a6b92a4a | 7209 | nw="$nw -Wpadded" # Our structs are not padded |
fd9d2a9d | 7210 | nw="$nw -Wredundant-decls" # we regularly (re)declare functions |
a6b92a4a | 7211 | nw="$nw -Wlogical-op" # any use of fwrite provokes this |
fd9d2a9d | 7212 | nw="$nw -Wformat-nonliteral" # we do this a lot |
a6b92a4a GM |
7213 | nw="$nw -Wvla" # warnings in gettext.h |
7214 | nw="$nw -Wnested-externs" # use of XARGMATCH/verify_function__ | |
7215 | nw="$nw -Wswitch-enum" # Too many warnings for now | |
7216 | nw="$nw -Wswitch-default" # Too many warnings for now | |
fd9d2a9d GM |
7217 | nw="$nw -Wfloat-equal" # warns about high-quality code |
7218 | nw="$nw -Winline" # OK to ignore 'inline' | |
7219 | nw="$nw -Wsync-nand" # irrelevant here, and provokes ObjC warning | |
7220 | nw="$nw -Wunsafe-loop-optimizations" # OK to suppress unsafe optimizations | |
a6b92a4a GM |
7221 | |
7222 | # Emacs doesn't care about shadowing; see | |
7223 | # <http://lists.gnu.org/archive/html/emacs-diffs/2011-11/msg00265.html>. | |
7224 | nw="$nw -Wshadow" | |
7225 | ||
7226 | # The following lines should be removable at some point. | |
7227 | nw="$nw -Wstack-protector" | |
7228 | nw="$nw -Wstrict-overflow" | |
a6b92a4a GM |
7229 | nw="$nw -Wsuggest-attribute=pure" |
7230 | ||
7231 | ||
7232 | ||
7233 | if test -n "$GCC"; then | |
7234 | ||
7235 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is supported" >&5 | |
7236 | $as_echo_n "checking whether -Wno-missing-field-initializers is supported... " >&6; } | |
7237 | if test "${gl_cv_cc_nomfi_supported+set}" = set; then : | |
7238 | $as_echo_n "(cached) " >&6 | |
7239 | else | |
7240 | ||
7241 | gl_save_CFLAGS="$CFLAGS" | |
7242 | CFLAGS="$CFLAGS -W -Werror -Wno-missing-field-initializers" | |
7243 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
067d23c9 KY |
7244 | /* end confdefs.h. */ |
7245 | ||
7246 | int | |
7247 | main () | |
7248 | { | |
7249 | ||
7250 | ; | |
7251 | return 0; | |
7252 | } | |
7253 | _ACEOF | |
7254 | if ac_fn_c_try_compile "$LINENO"; then : | |
a6b92a4a | 7255 | gl_cv_cc_nomfi_supported=yes |
067d23c9 | 7256 | else |
a6b92a4a | 7257 | gl_cv_cc_nomfi_supported=no |
067d23c9 KY |
7258 | fi |
7259 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
a6b92a4a GM |
7260 | CFLAGS="$gl_save_CFLAGS" |
7261 | fi | |
7262 | ||
7263 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_supported" >&5 | |
7264 | $as_echo "$gl_cv_cc_nomfi_supported" >&6; } | |
7265 | ||
7266 | if test "$gl_cv_cc_nomfi_supported" = yes; then | |
7267 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is needed" >&5 | |
7268 | $as_echo_n "checking whether -Wno-missing-field-initializers is needed... " >&6; } | |
7269 | if test "${gl_cv_cc_nomfi_needed+set}" = set; then : | |
7270 | $as_echo_n "(cached) " >&6 | |
7271 | else | |
7272 | ||
7273 | gl_save_CFLAGS="$CFLAGS" | |
7274 | CFLAGS="$CFLAGS -W -Werror" | |
7275 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7276 | /* end confdefs.h. */ | |
7277 | void f (void) | |
7278 | { | |
7279 | typedef struct { int a; int b; } s_t; | |
7280 | s_t s1 = { 0, }; | |
7281 | } | |
7282 | ||
7283 | int | |
7284 | main () | |
7285 | { | |
7286 | ||
7287 | ; | |
7288 | return 0; | |
7289 | } | |
7290 | _ACEOF | |
7291 | if ac_fn_c_try_compile "$LINENO"; then : | |
7292 | gl_cv_cc_nomfi_needed=no | |
7293 | else | |
7294 | gl_cv_cc_nomfi_needed=yes | |
7295 | fi | |
7296 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7297 | CFLAGS="$gl_save_CFLAGS" | |
7298 | ||
7299 | fi | |
7300 | ||
7301 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_needed" >&5 | |
7302 | $as_echo "$gl_cv_cc_nomfi_needed" >&6; } | |
7303 | fi | |
7304 | fi | |
7305 | ||
7306 | gl_manywarn_set= | |
7307 | for gl_manywarn_item in \ | |
7308 | -Wall \ | |
7309 | -W \ | |
7310 | -Wformat-y2k \ | |
7311 | -Wformat-nonliteral \ | |
7312 | -Wformat-security \ | |
7313 | -Winit-self \ | |
7314 | -Wmissing-include-dirs \ | |
7315 | -Wswitch-default \ | |
7316 | -Wswitch-enum \ | |
7317 | -Wunused \ | |
7318 | -Wunknown-pragmas \ | |
7319 | -Wstrict-aliasing \ | |
7320 | -Wstrict-overflow \ | |
7321 | -Wsystem-headers \ | |
7322 | -Wfloat-equal \ | |
7323 | -Wtraditional \ | |
7324 | -Wtraditional-conversion \ | |
7325 | -Wdeclaration-after-statement \ | |
7326 | -Wundef \ | |
7327 | -Wshadow \ | |
7328 | -Wunsafe-loop-optimizations \ | |
7329 | -Wpointer-arith \ | |
7330 | -Wbad-function-cast \ | |
7331 | -Wc++-compat \ | |
7332 | -Wcast-qual \ | |
7333 | -Wcast-align \ | |
7334 | -Wwrite-strings \ | |
7335 | -Wconversion \ | |
7336 | -Wsign-conversion \ | |
7337 | -Wlogical-op \ | |
7338 | -Waggregate-return \ | |
7339 | -Wstrict-prototypes \ | |
7340 | -Wold-style-definition \ | |
7341 | -Wmissing-prototypes \ | |
7342 | -Wmissing-declarations \ | |
7343 | -Wmissing-noreturn \ | |
7344 | -Wmissing-format-attribute \ | |
7345 | -Wpacked \ | |
7346 | -Wpadded \ | |
7347 | -Wredundant-decls \ | |
7348 | -Wnested-externs \ | |
7349 | -Wunreachable-code \ | |
7350 | -Winline \ | |
7351 | -Winvalid-pch \ | |
7352 | -Wlong-long \ | |
7353 | -Wvla \ | |
7354 | -Wvolatile-register-var \ | |
7355 | -Wdisabled-optimization \ | |
7356 | -Wstack-protector \ | |
7357 | -Woverlength-strings \ | |
7358 | -Wbuiltin-macro-redefined \ | |
7359 | -Wmudflap \ | |
7360 | -Wpacked-bitfield-compat \ | |
7361 | -Wsync-nand \ | |
7362 | ; do | |
7363 | gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item" | |
7364 | done | |
7365 | # The following are not documented in the manual but are included in | |
7366 | # output from gcc --help=warnings. | |
7367 | for gl_manywarn_item in \ | |
7368 | -Wattributes \ | |
7369 | -Wcoverage-mismatch \ | |
a6b92a4a GM |
7370 | -Wunused-macros \ |
7371 | ; do | |
7372 | gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item" | |
7373 | done | |
7374 | # More warnings from gcc 4.6.2 --help=warnings. | |
7375 | for gl_manywarn_item in \ | |
7376 | -Wabi \ | |
7377 | -Wcpp \ | |
7378 | -Wdeprecated \ | |
7379 | -Wdeprecated-declarations \ | |
7380 | -Wdiv-by-zero \ | |
7381 | -Wdouble-promotion \ | |
7382 | -Wendif-labels \ | |
7383 | -Wextra \ | |
7384 | -Wformat-contains-nul \ | |
7385 | -Wformat-extra-args \ | |
7386 | -Wformat-zero-length \ | |
7387 | -Wformat=2 \ | |
7388 | -Wmultichar \ | |
7389 | -Wnormalized=nfc \ | |
7390 | -Woverflow \ | |
7391 | -Wpointer-to-int-cast \ | |
7392 | -Wpragmas \ | |
7393 | -Wsuggest-attribute=const \ | |
7394 | -Wsuggest-attribute=noreturn \ | |
7395 | -Wsuggest-attribute=pure \ | |
7396 | -Wtrampolines \ | |
7397 | ; do | |
7398 | gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item" | |
7399 | done | |
7400 | ||
7401 | # Disable the missing-field-initializers warning if needed | |
7402 | if test "$gl_cv_cc_nomfi_needed" = yes; then | |
7403 | gl_manywarn_set="$gl_manywarn_set -Wno-missing-field-initializers" | |
7404 | fi | |
7405 | ||
7406 | ws=$gl_manywarn_set | |
7407 | ||
7408 | ||
7409 | gl_warn_set= | |
7410 | set x $ws; shift | |
7411 | for gl_warn_item | |
7412 | do | |
7413 | case " $nw " in | |
7414 | *" $gl_warn_item "*) | |
7415 | ;; | |
7416 | *) | |
7417 | gl_warn_set="$gl_warn_set $gl_warn_item" | |
7418 | ;; | |
7419 | esac | |
7420 | done | |
7421 | ws=$gl_warn_set | |
7422 | ||
7423 | for w in $ws; do | |
7424 | as_gl_Warn=`$as_echo "gl_cv_warn_c_$w" | $as_tr_sh` | |
7425 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles $w" >&5 | |
7426 | $as_echo_n "checking whether C compiler handles $w... " >&6; } | |
7427 | if { as_var=$as_gl_Warn; eval "test \"\${$as_var+set}\" = set"; }; then : | |
7428 | $as_echo_n "(cached) " >&6 | |
7429 | else | |
7430 | ||
7431 | gl_save_compiler_FLAGS="$CFLAGS" | |
0eb775a3 | 7432 | as_fn_append CFLAGS " $w" |
a6b92a4a GM |
7433 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
7434 | /* end confdefs.h. */ | |
7435 | ||
7436 | int | |
7437 | main () | |
7438 | { | |
7439 | ||
7440 | ; | |
7441 | return 0; | |
7442 | } | |
7443 | _ACEOF | |
7444 | if ac_fn_c_try_compile "$LINENO"; then : | |
7445 | eval "$as_gl_Warn=yes" | |
7446 | else | |
7447 | eval "$as_gl_Warn=no" | |
7448 | fi | |
7449 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7450 | CFLAGS="$gl_save_compiler_FLAGS" | |
7451 | ||
7452 | fi | |
7453 | eval ac_res=\$$as_gl_Warn | |
7454 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
7455 | $as_echo "$ac_res" >&6; } | |
7456 | eval as_val=\$$as_gl_Warn | |
7457 | if test "x$as_val" = x""yes; then : | |
7458 | as_fn_append WARN_CFLAGS " $w" | |
7459 | fi | |
7460 | ||
0eb775a3 | 7461 | |
a6b92a4a GM |
7462 | done |
7463 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-missing-field-initializers" >&5 | |
7464 | $as_echo_n "checking whether C compiler handles -Wno-missing-field-initializers... " >&6; } | |
7465 | if test "${gl_cv_warn_c__Wno_missing_field_initializers+set}" = set; then : | |
7466 | $as_echo_n "(cached) " >&6 | |
7467 | else | |
7468 | ||
7469 | gl_save_compiler_FLAGS="$CFLAGS" | |
0eb775a3 | 7470 | as_fn_append CFLAGS " -Wno-missing-field-initializers" |
a6b92a4a GM |
7471 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
7472 | /* end confdefs.h. */ | |
7473 | ||
7474 | int | |
7475 | main () | |
7476 | { | |
7477 | ||
7478 | ; | |
7479 | return 0; | |
7480 | } | |
7481 | _ACEOF | |
7482 | if ac_fn_c_try_compile "$LINENO"; then : | |
7483 | gl_cv_warn_c__Wno_missing_field_initializers=yes | |
7484 | else | |
7485 | gl_cv_warn_c__Wno_missing_field_initializers=no | |
7486 | fi | |
7487 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7488 | CFLAGS="$gl_save_compiler_FLAGS" | |
7489 | ||
7490 | fi | |
7491 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_missing_field_initializers" >&5 | |
7492 | $as_echo "$gl_cv_warn_c__Wno_missing_field_initializers" >&6; } | |
7493 | if test "x$gl_cv_warn_c__Wno_missing_field_initializers" = x""yes; then : | |
7494 | as_fn_append WARN_CFLAGS " -Wno-missing-field-initializers" | |
7495 | fi | |
0eb775a3 | 7496 | |
a6b92a4a GM |
7497 | # We need this one |
7498 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-sign-compare" >&5 | |
7499 | $as_echo_n "checking whether C compiler handles -Wno-sign-compare... " >&6; } | |
7500 | if test "${gl_cv_warn_c__Wno_sign_compare+set}" = set; then : | |
7501 | $as_echo_n "(cached) " >&6 | |
7502 | else | |
7503 | ||
7504 | gl_save_compiler_FLAGS="$CFLAGS" | |
0eb775a3 | 7505 | as_fn_append CFLAGS " -Wno-sign-compare" |
a6b92a4a GM |
7506 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
7507 | /* end confdefs.h. */ | |
7508 | ||
7509 | int | |
7510 | main () | |
7511 | { | |
7512 | ||
7513 | ; | |
7514 | return 0; | |
7515 | } | |
7516 | _ACEOF | |
7517 | if ac_fn_c_try_compile "$LINENO"; then : | |
7518 | gl_cv_warn_c__Wno_sign_compare=yes | |
7519 | else | |
7520 | gl_cv_warn_c__Wno_sign_compare=no | |
7521 | fi | |
7522 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7523 | CFLAGS="$gl_save_compiler_FLAGS" | |
7524 | ||
7525 | fi | |
7526 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_sign_compare" >&5 | |
7527 | $as_echo "$gl_cv_warn_c__Wno_sign_compare" >&6; } | |
7528 | if test "x$gl_cv_warn_c__Wno_sign_compare" = x""yes; then : | |
7529 | as_fn_append WARN_CFLAGS " -Wno-sign-compare" | |
7530 | fi | |
0eb775a3 | 7531 | |
a6b92a4a GM |
7532 | # Too many warnings for now |
7533 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-type-limits" >&5 | |
7534 | $as_echo_n "checking whether C compiler handles -Wno-type-limits... " >&6; } | |
7535 | if test "${gl_cv_warn_c__Wno_type_limits+set}" = set; then : | |
7536 | $as_echo_n "(cached) " >&6 | |
7537 | else | |
7538 | ||
7539 | gl_save_compiler_FLAGS="$CFLAGS" | |
0eb775a3 | 7540 | as_fn_append CFLAGS " -Wno-type-limits" |
a6b92a4a GM |
7541 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
7542 | /* end confdefs.h. */ | |
7543 | ||
7544 | int | |
7545 | main () | |
7546 | { | |
7547 | ||
7548 | ; | |
7549 | return 0; | |
7550 | } | |
7551 | _ACEOF | |
7552 | if ac_fn_c_try_compile "$LINENO"; then : | |
7553 | gl_cv_warn_c__Wno_type_limits=yes | |
7554 | else | |
7555 | gl_cv_warn_c__Wno_type_limits=no | |
7556 | fi | |
7557 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7558 | CFLAGS="$gl_save_compiler_FLAGS" | |
7559 | ||
7560 | fi | |
7561 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_type_limits" >&5 | |
7562 | $as_echo "$gl_cv_warn_c__Wno_type_limits" >&6; } | |
7563 | if test "x$gl_cv_warn_c__Wno_type_limits" = x""yes; then : | |
7564 | as_fn_append WARN_CFLAGS " -Wno-type-limits" | |
7565 | fi | |
0eb775a3 | 7566 | |
a6b92a4a GM |
7567 | # Too many warnings for now |
7568 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-switch" >&5 | |
7569 | $as_echo_n "checking whether C compiler handles -Wno-switch... " >&6; } | |
7570 | if test "${gl_cv_warn_c__Wno_switch+set}" = set; then : | |
7571 | $as_echo_n "(cached) " >&6 | |
7572 | else | |
7573 | ||
7574 | gl_save_compiler_FLAGS="$CFLAGS" | |
0eb775a3 | 7575 | as_fn_append CFLAGS " -Wno-switch" |
a6b92a4a GM |
7576 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
7577 | /* end confdefs.h. */ | |
7578 | ||
7579 | int | |
7580 | main () | |
7581 | { | |
7582 | ||
7583 | ; | |
7584 | return 0; | |
7585 | } | |
7586 | _ACEOF | |
7587 | if ac_fn_c_try_compile "$LINENO"; then : | |
7588 | gl_cv_warn_c__Wno_switch=yes | |
7589 | else | |
7590 | gl_cv_warn_c__Wno_switch=no | |
7591 | fi | |
7592 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7593 | CFLAGS="$gl_save_compiler_FLAGS" | |
7594 | ||
7595 | fi | |
7596 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_switch" >&5 | |
7597 | $as_echo "$gl_cv_warn_c__Wno_switch" >&6; } | |
7598 | if test "x$gl_cv_warn_c__Wno_switch" = x""yes; then : | |
7599 | as_fn_append WARN_CFLAGS " -Wno-switch" | |
7600 | fi | |
0eb775a3 | 7601 | |
a6b92a4a GM |
7602 | # Too many warnings for now |
7603 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-parameter" >&5 | |
7604 | $as_echo_n "checking whether C compiler handles -Wno-unused-parameter... " >&6; } | |
7605 | if test "${gl_cv_warn_c__Wno_unused_parameter+set}" = set; then : | |
7606 | $as_echo_n "(cached) " >&6 | |
7607 | else | |
7608 | ||
7609 | gl_save_compiler_FLAGS="$CFLAGS" | |
0eb775a3 | 7610 | as_fn_append CFLAGS " -Wno-unused-parameter" |
a6b92a4a GM |
7611 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
7612 | /* end confdefs.h. */ | |
7613 | ||
7614 | int | |
7615 | main () | |
7616 | { | |
7617 | ||
7618 | ; | |
7619 | return 0; | |
7620 | } | |
7621 | _ACEOF | |
7622 | if ac_fn_c_try_compile "$LINENO"; then : | |
7623 | gl_cv_warn_c__Wno_unused_parameter=yes | |
7624 | else | |
7625 | gl_cv_warn_c__Wno_unused_parameter=no | |
7626 | fi | |
7627 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7628 | CFLAGS="$gl_save_compiler_FLAGS" | |
7629 | ||
7630 | fi | |
7631 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_parameter" >&5 | |
7632 | $as_echo "$gl_cv_warn_c__Wno_unused_parameter" >&6; } | |
7633 | if test "x$gl_cv_warn_c__Wno_unused_parameter" = x""yes; then : | |
7634 | as_fn_append WARN_CFLAGS " -Wno-unused-parameter" | |
7635 | fi | |
0eb775a3 | 7636 | |
a6b92a4a GM |
7637 | # Too many warnings for now |
7638 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-format-nonliteral" >&5 | |
7639 | $as_echo_n "checking whether C compiler handles -Wno-format-nonliteral... " >&6; } | |
7640 | if test "${gl_cv_warn_c__Wno_format_nonliteral+set}" = set; then : | |
7641 | $as_echo_n "(cached) " >&6 | |
7642 | else | |
7643 | ||
7644 | gl_save_compiler_FLAGS="$CFLAGS" | |
0eb775a3 | 7645 | as_fn_append CFLAGS " -Wno-format-nonliteral" |
a6b92a4a GM |
7646 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
7647 | /* end confdefs.h. */ | |
7648 | ||
7649 | int | |
7650 | main () | |
7651 | { | |
7652 | ||
7653 | ; | |
7654 | return 0; | |
7655 | } | |
7656 | _ACEOF | |
7657 | if ac_fn_c_try_compile "$LINENO"; then : | |
7658 | gl_cv_warn_c__Wno_format_nonliteral=yes | |
7659 | else | |
7660 | gl_cv_warn_c__Wno_format_nonliteral=no | |
7661 | fi | |
7662 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7663 | CFLAGS="$gl_save_compiler_FLAGS" | |
7664 | ||
7665 | fi | |
7666 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_format_nonliteral" >&5 | |
7667 | $as_echo "$gl_cv_warn_c__Wno_format_nonliteral" >&6; } | |
7668 | if test "x$gl_cv_warn_c__Wno_format_nonliteral" = x""yes; then : | |
7669 | as_fn_append WARN_CFLAGS " -Wno-format-nonliteral" | |
7670 | fi | |
7671 | ||
7672 | ||
0eb775a3 | 7673 | |
a6b92a4a GM |
7674 | # In spite of excluding -Wlogical-op above, it is enabled, as of |
7675 | # gcc 4.5.0 20090517. | |
7676 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-logical-op" >&5 | |
7677 | $as_echo_n "checking whether C compiler handles -Wno-logical-op... " >&6; } | |
7678 | if test "${gl_cv_warn_c__Wno_logical_op+set}" = set; then : | |
7679 | $as_echo_n "(cached) " >&6 | |
7680 | else | |
7681 | ||
7682 | gl_save_compiler_FLAGS="$CFLAGS" | |
0eb775a3 | 7683 | as_fn_append CFLAGS " -Wno-logical-op" |
a6b92a4a GM |
7684 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
7685 | /* end confdefs.h. */ | |
7686 | ||
7687 | int | |
7688 | main () | |
7689 | { | |
7690 | ||
7691 | ; | |
7692 | return 0; | |
7693 | } | |
7694 | _ACEOF | |
7695 | if ac_fn_c_try_compile "$LINENO"; then : | |
7696 | gl_cv_warn_c__Wno_logical_op=yes | |
7697 | else | |
7698 | gl_cv_warn_c__Wno_logical_op=no | |
7699 | fi | |
7700 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7701 | CFLAGS="$gl_save_compiler_FLAGS" | |
7702 | ||
7703 | fi | |
7704 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_logical_op" >&5 | |
7705 | $as_echo "$gl_cv_warn_c__Wno_logical_op" >&6; } | |
7706 | if test "x$gl_cv_warn_c__Wno_logical_op" = x""yes; then : | |
7707 | as_fn_append WARN_CFLAGS " -Wno-logical-op" | |
7708 | fi | |
7709 | ||
7710 | ||
0eb775a3 | 7711 | |
a6b92a4a GM |
7712 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fdiagnostics-show-option" >&5 |
7713 | $as_echo_n "checking whether C compiler handles -fdiagnostics-show-option... " >&6; } | |
7714 | if test "${gl_cv_warn_c__fdiagnostics_show_option+set}" = set; then : | |
7715 | $as_echo_n "(cached) " >&6 | |
7716 | else | |
7717 | ||
7718 | gl_save_compiler_FLAGS="$CFLAGS" | |
0eb775a3 | 7719 | as_fn_append CFLAGS " -fdiagnostics-show-option" |
a6b92a4a | 7720 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
067d23c9 KY |
7721 | /* end confdefs.h. */ |
7722 | ||
7723 | int | |
7724 | main () | |
7725 | { | |
7726 | ||
7727 | ; | |
7728 | return 0; | |
7729 | } | |
7730 | _ACEOF | |
7731 | if ac_fn_c_try_compile "$LINENO"; then : | |
a6b92a4a | 7732 | gl_cv_warn_c__fdiagnostics_show_option=yes |
067d23c9 | 7733 | else |
a6b92a4a | 7734 | gl_cv_warn_c__fdiagnostics_show_option=no |
067d23c9 KY |
7735 | fi |
7736 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
a6b92a4a GM |
7737 | CFLAGS="$gl_save_compiler_FLAGS" |
7738 | ||
7739 | fi | |
7740 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fdiagnostics_show_option" >&5 | |
7741 | $as_echo "$gl_cv_warn_c__fdiagnostics_show_option" >&6; } | |
7742 | if test "x$gl_cv_warn_c__fdiagnostics_show_option" = x""yes; then : | |
7743 | as_fn_append WARN_CFLAGS " -fdiagnostics-show-option" | |
067d23c9 | 7744 | fi |
067d23c9 | 7745 | |
0eb775a3 | 7746 | |
a6b92a4a GM |
7747 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -funit-at-a-time" >&5 |
7748 | $as_echo_n "checking whether C compiler handles -funit-at-a-time... " >&6; } | |
7749 | if test "${gl_cv_warn_c__funit_at_a_time+set}" = set; then : | |
7750 | $as_echo_n "(cached) " >&6 | |
7751 | else | |
7752 | ||
7753 | gl_save_compiler_FLAGS="$CFLAGS" | |
0eb775a3 | 7754 | as_fn_append CFLAGS " -funit-at-a-time" |
a6b92a4a GM |
7755 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
7756 | /* end confdefs.h. */ | |
7757 | ||
7758 | int | |
7759 | main () | |
7760 | { | |
7761 | ||
7762 | ; | |
7763 | return 0; | |
7764 | } | |
7765 | _ACEOF | |
7766 | if ac_fn_c_try_compile "$LINENO"; then : | |
7767 | gl_cv_warn_c__funit_at_a_time=yes | |
7768 | else | |
7769 | gl_cv_warn_c__funit_at_a_time=no | |
7770 | fi | |
7771 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7772 | CFLAGS="$gl_save_compiler_FLAGS" | |
7773 | ||
7774 | fi | |
7775 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__funit_at_a_time" >&5 | |
7776 | $as_echo "$gl_cv_warn_c__funit_at_a_time" >&6; } | |
7777 | if test "x$gl_cv_warn_c__funit_at_a_time" = x""yes; then : | |
7778 | as_fn_append WARN_CFLAGS " -funit-at-a-time" | |
7779 | fi | |
7780 | ||
7781 | ||
7782 | ||
0eb775a3 | 7783 | |
a6b92a4a GM |
7784 | $as_echo "#define lint 1" >>confdefs.h |
7785 | ||
7786 | ||
7787 | $as_echo "#define _FORTIFY_SOURCE 2" >>confdefs.h | |
7788 | ||
7789 | ||
7790 | $as_echo "#define GNULIB_PORTCHECK 1" >>confdefs.h | |
7791 | ||
7792 | ||
7793 | # We use a slightly smaller set of warning options for lib/. | |
7794 | # Remove the following and save the result in GNULIB_WARN_CFLAGS. | |
7795 | nw= | |
7796 | nw="$nw -Wunused-macros" | |
7797 | ||
7798 | ||
7799 | gl_warn_set= | |
7800 | set x $WARN_CFLAGS; shift | |
7801 | for gl_warn_item | |
7802 | do | |
7803 | case " $nw " in | |
7804 | *" $gl_warn_item "*) | |
7805 | ;; | |
7806 | *) | |
7807 | gl_warn_set="$gl_warn_set $gl_warn_item" | |
7808 | ;; | |
7809 | esac | |
7810 | done | |
7811 | GNULIB_WARN_CFLAGS=$gl_warn_set | |
7812 | ||
7813 | ||
7814 | fi | |
067d23c9 KY |
7815 | |
7816 | ||
7817 | ||
0e733db9 GM |
7818 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 |
7819 | $as_echo_n "checking whether ln -s works... " >&6; } | |
7820 | LN_S=$as_ln_s | |
7821 | if test "$LN_S" = "ln -s"; then | |
7822 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
7823 | $as_echo "yes" >&6; } | |
7824 | else | |
7825 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 | |
7826 | $as_echo "no, using $LN_S" >&6; } | |
7827 | fi | |
7828 | ||
067d23c9 | 7829 | |
067d23c9 KY |
7830 | # Extract the first word of "install-info", so it can be a program name with args. |
7831 | set dummy install-info; ac_word=$2 | |
7832 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
7833 | $as_echo_n "checking for $ac_word... " >&6; } | |
a9bec17c | 7834 | if test "${ac_cv_path_INSTALL_INFO+set}" = set; then : |
067d23c9 KY |
7835 | $as_echo_n "(cached) " >&6 |
7836 | else | |
7837 | case $INSTALL_INFO in | |
7838 | [\\/]* | ?:[\\/]*) | |
7839 | ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path. | |
7840 | ;; | |
7841 | *) | |
7842 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
e700232f | 7843 | for as_dir in $PATH$PATH_SEPARATOR/usr/sbin$PATH_SEPARATOR/sbin |
067d23c9 KY |
7844 | do |
7845 | IFS=$as_save_IFS | |
7846 | test -z "$as_dir" && as_dir=. | |
7847 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7848 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
7849 | ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext" | |
7850 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7851 | break 2 | |
7852 | fi | |
7853 | done | |
7854 | done | |
7855 | IFS=$as_save_IFS | |
7856 | ||
7857 | test -z "$ac_cv_path_INSTALL_INFO" && ac_cv_path_INSTALL_INFO=":" | |
7858 | ;; | |
7859 | esac | |
7860 | fi | |
7861 | INSTALL_INFO=$ac_cv_path_INSTALL_INFO | |
7862 | if test -n "$INSTALL_INFO"; then | |
7863 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_INFO" >&5 | |
7864 | $as_echo "$INSTALL_INFO" >&6; } | |
7865 | else | |
7866 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
7867 | $as_echo "no" >&6; } | |
7868 | fi | |
7869 | ||
7870 | ||
7871 | # Extract the first word of "gzip", so it can be a program name with args. | |
7872 | set dummy gzip; ac_word=$2 | |
7873 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
7874 | $as_echo_n "checking for $ac_word... " >&6; } | |
a9bec17c | 7875 | if test "${ac_cv_path_GZIP_PROG+set}" = set; then : |
067d23c9 KY |
7876 | $as_echo_n "(cached) " >&6 |
7877 | else | |
7878 | case $GZIP_PROG in | |
7879 | [\\/]* | ?:[\\/]*) | |
7880 | ac_cv_path_GZIP_PROG="$GZIP_PROG" # Let the user override the test with a path. | |
7881 | ;; | |
7882 | *) | |
7883 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7884 | for as_dir in $PATH | |
7885 | do | |
7886 | IFS=$as_save_IFS | |
7887 | test -z "$as_dir" && as_dir=. | |
7888 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7889 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
7890 | ac_cv_path_GZIP_PROG="$as_dir/$ac_word$ac_exec_ext" | |
7891 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7892 | break 2 | |
7893 | fi | |
7894 | done | |
7895 | done | |
7896 | IFS=$as_save_IFS | |
7897 | ||
7898 | ;; | |
7899 | esac | |
7900 | fi | |
7901 | GZIP_PROG=$ac_cv_path_GZIP_PROG | |
7902 | if test -n "$GZIP_PROG"; then | |
7903 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP_PROG" >&5 | |
7904 | $as_echo "$GZIP_PROG" >&6; } | |
7905 | else | |
7906 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
7907 | $as_echo "no" >&6; } | |
7908 | fi | |
7909 | ||
7910 | ||
7ee3791f GM |
7911 | |
7912 | if test $opsys = gnu-linux; then | |
7913 | # Extract the first word of "paxctl", so it can be a program name with args. | |
9c29597b GM |
7914 | set dummy paxctl; ac_word=$2 |
7915 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
7916 | $as_echo_n "checking for $ac_word... " >&6; } | |
7917 | if test "${ac_cv_path_PAXCTL+set}" = set; then : | |
7918 | $as_echo_n "(cached) " >&6 | |
7919 | else | |
7920 | case $PAXCTL in | |
7921 | [\\/]* | ?:[\\/]*) | |
7922 | ac_cv_path_PAXCTL="$PAXCTL" # Let the user override the test with a path. | |
7923 | ;; | |
7924 | *) | |
7925 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7926 | for as_dir in $PATH$PATH_SEPARATOR/sbin$PATH_SEPARATOR/usr/sbin | |
7927 | do | |
7928 | IFS=$as_save_IFS | |
7929 | test -z "$as_dir" && as_dir=. | |
7930 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7931 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
7932 | ac_cv_path_PAXCTL="$as_dir/$ac_word$ac_exec_ext" | |
7933 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7934 | break 2 | |
7935 | fi | |
7936 | done | |
7937 | done | |
7938 | IFS=$as_save_IFS | |
7939 | ||
7940 | ;; | |
7941 | esac | |
7942 | fi | |
7943 | PAXCTL=$ac_cv_path_PAXCTL | |
7944 | if test -n "$PAXCTL"; then | |
7945 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PAXCTL" >&5 | |
7946 | $as_echo "$PAXCTL" >&6; } | |
7947 | else | |
7948 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
7949 | $as_echo "no" >&6; } | |
7950 | fi | |
7951 | ||
7952 | ||
685e57ea GM |
7953 | if test "X$PAXCTL" != X; then |
7954 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether binaries have a PT_PAX_FLAGS header" >&5 | |
7955 | $as_echo_n "checking whether binaries have a PT_PAX_FLAGS header... " >&6; } | |
7956 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7957 | /* end confdefs.h. */ | |
7958 | ||
7959 | int | |
7960 | main () | |
7961 | { | |
7962 | ||
7963 | ; | |
7964 | return 0; | |
7965 | } | |
7966 | _ACEOF | |
7967 | if ac_fn_c_try_link "$LINENO"; then : | |
7968 | if $PAXCTL -v conftest$EXEEXT >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
7969 | $as_echo "yes" >&6; } | |
7970 | else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
7971 | $as_echo "no" >&6; }; PAXCTL=""; fi | |
7972 | fi | |
7973 | rm -f core conftest.err conftest.$ac_objext \ | |
7974 | conftest$ac_exeext conftest.$ac_ext | |
7975 | fi | |
7ee3791f | 7976 | fi |
067d23c9 | 7977 | |
9e40dda4 | 7978 | ## Need makeinfo >= 4.7 (?) to build the manuals. |
067d23c9 KY |
7979 | # Extract the first word of "makeinfo", so it can be a program name with args. |
7980 | set dummy makeinfo; ac_word=$2 | |
7981 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
7982 | $as_echo_n "checking for $ac_word... " >&6; } | |
a9bec17c | 7983 | if test "${ac_cv_path_MAKEINFO+set}" = set; then : |
067d23c9 KY |
7984 | $as_echo_n "(cached) " >&6 |
7985 | else | |
7986 | case $MAKEINFO in | |
7987 | [\\/]* | ?:[\\/]*) | |
7988 | ac_cv_path_MAKEINFO="$MAKEINFO" # Let the user override the test with a path. | |
7989 | ;; | |
7990 | *) | |
7991 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7992 | for as_dir in $PATH | |
7993 | do | |
7994 | IFS=$as_save_IFS | |
7995 | test -z "$as_dir" && as_dir=. | |
7996 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7997 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
7998 | ac_cv_path_MAKEINFO="$as_dir/$ac_word$ac_exec_ext" | |
7999 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
8000 | break 2 | |
8001 | fi | |
8002 | done | |
8003 | done | |
8004 | IFS=$as_save_IFS | |
8005 | ||
8006 | test -z "$ac_cv_path_MAKEINFO" && ac_cv_path_MAKEINFO="no" | |
8007 | ;; | |
8008 | esac | |
8009 | fi | |
8010 | MAKEINFO=$ac_cv_path_MAKEINFO | |
8011 | if test -n "$MAKEINFO"; then | |
8012 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKEINFO" >&5 | |
8013 | $as_echo "$MAKEINFO" >&6; } | |
8014 | else | |
8015 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
8016 | $as_echo "no" >&6; } | |
8017 | fi | |
8018 | ||
8019 | ||
8020 | if test "$MAKEINFO" != "no" && \ | |
9e40dda4 | 8021 | test x"`$MAKEINFO --version 2> /dev/null | $EGREP 'texinfo[^0-9]*([1-4][0-9]+|[5-9]|4\.[7-9]|4\.[1-6][0-9]+)'`" = x; then |
067d23c9 KY |
8022 | MAKEINFO=no |
8023 | fi | |
8024 | ||
8025 | ## Makeinfo is unusual. For a released Emacs, the manuals are | |
8026 | ## pre-built, and not deleted by the normal clean rules. makeinfo is | |
8027 | ## therefore in the category of "special tools" not normally required, which | |
8028 | ## configure does not have to check for (eg autoconf itself). | |
8029 | ## In a Bazaar checkout on the other hand, the manuals are not included. | |
8030 | ## So makeinfo is a requirement to build from Bazaar, and configure | |
8031 | ## should test for it as it does for any other build requirement. | |
8032 | ## We use the presence of $srcdir/info/emacs to distinguish a release, | |
8033 | ## with pre-built manuals, from a Bazaar checkout. | |
96f129d5 GM |
8034 | HAVE_MAKEINFO=yes |
8035 | ||
067d23c9 | 8036 | if test "$MAKEINFO" = "no"; then |
96f129d5 | 8037 | MAKEINFO=makeinfo |
067d23c9 | 8038 | if test "x${with_makeinfo}" = "xno"; then |
96f129d5 | 8039 | HAVE_MAKEINFO=no |
067d23c9 | 8040 | elif test ! -e $srcdir/info/emacs; then |
9e40dda4 | 8041 | as_fn_error "You do not seem to have makeinfo >= 4.7, and your |
067d23c9 KY |
8042 | source tree does not seem to have pre-built manuals in the \`info' directory. |
8043 | Either install a suitable version of makeinfo, or re-run configure | |
8044 | with the \`--without-makeinfo' option to build without the manuals. " "$LINENO" 5 | |
8045 | fi | |
8046 | fi | |
8047 | ||
8048 | ||
141d074d GM |
8049 | INFO_EXT=.info |
8050 | INFO_OPTS=--no-split | |
8051 | ||
8052 | ||
8053 | ||
96f129d5 | 8054 | |
067d23c9 KY |
8055 | if test x$GCC = xyes; then |
8056 | test "x$GCC_LINK_TEST_OPTIONS" != x && \ | |
8057 | ac_link="$ac_link $GCC_LINK_TEST_OPTIONS" | |
8058 | else | |
8059 | test "x$NON_GCC_LINK_TEST_OPTIONS" != x && \ | |
8060 | ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS" | |
8061 | fi | |
8062 | ||
8063 | ||
8064 | late_LDFLAGS=$LDFLAGS | |
8065 | if test x$GCC = xyes; then | |
8066 | LDFLAGS="$LDFLAGS -Wl,-znocombreloc" | |
8067 | else | |
8068 | LDFLAGS="$LDFLAGS -znocombreloc" | |
8069 | fi | |
8070 | ||
8071 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -znocombreloc" >&5 | |
8072 | $as_echo_n "checking for -znocombreloc... " >&6; } | |
8073 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8074 | /* end confdefs.h. */ | |
8075 | ||
8076 | int | |
8077 | main () | |
8078 | { | |
8079 | ||
8080 | ; | |
8081 | return 0; | |
8082 | } | |
8083 | _ACEOF | |
8084 | if ac_fn_c_try_link "$LINENO"; then : | |
8085 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
8086 | $as_echo "yes" >&6; } | |
8087 | else | |
8088 | LDFLAGS=$late_LDFLAGS | |
8089 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
8090 | $as_echo "no" >&6; } | |
8091 | fi | |
8092 | rm -f core conftest.err conftest.$ac_objext \ | |
8093 | conftest$ac_exeext conftest.$ac_ext | |
8094 | ||
8095 | ||
125c3718 | 8096 | test "x$CANNOT_DUMP" = "x" && CANNOT_DUMP=no |
067d23c9 | 8097 | case "$opsys" in |
125c3718 PE |
8098 | your-opsys-here) CANNOT_DUMP=yes ;; |
8099 | esac | |
8100 | ||
8101 | test "$CANNOT_DUMP" = "yes" && \ | |
067d23c9 KY |
8102 | |
8103 | $as_echo "#define CANNOT_DUMP 1" >>confdefs.h | |
8104 | ||
125c3718 | 8105 | |
067d23c9 KY |
8106 | |
8107 | ||
8108 | ||
8109 | UNEXEC_OBJ=unexelf.o | |
8110 | case "$opsys" in | |
8111 | # MSDOS uses unexcoff.o | |
8112 | # MSWindows uses unexw32.o | |
8113 | aix4-2) | |
8114 | UNEXEC_OBJ=unexaix.o | |
8115 | ;; | |
8116 | cygwin) | |
8117 | UNEXEC_OBJ=unexcw.o | |
8118 | ;; | |
8119 | darwin) | |
8120 | UNEXEC_OBJ=unexmacosx.o | |
8121 | ;; | |
8122 | hpux10-20 | hpux11) | |
8123 | UNEXEC_OBJ=unexhp9k800.o | |
8124 | ;; | |
8125 | sol2-10) | |
8126 | # Use the Solaris dldump() function, called from unexsol.c, to dump | |
8127 | # emacs, instead of the generic ELF dump code found in unexelf.c. | |
8128 | # The resulting binary has a complete symbol table, and is better | |
8129 | # for debugging and other observability tools (debuggers, pstack, etc). | |
8130 | # | |
8131 | # If you encounter a problem using dldump(), please consider sending | |
8132 | # a message to the OpenSolaris tools-linking mailing list: | |
8133 | # http://mail.opensolaris.org/mailman/listinfo/tools-linking | |
8134 | # | |
8135 | # It is likely that dldump() works with older Solaris too, but this has | |
8136 | # not been tested, so for now this change is for Solaris 10 or newer. | |
8137 | UNEXEC_OBJ=unexsol.o | |
8138 | ;; | |
8139 | esac | |
8140 | ||
8141 | LD_SWITCH_SYSTEM= | |
8142 | case "$opsys" in | |
8143 | freebsd) | |
8144 | ## Let `ld' find image libs and similar things in /usr/local/lib. | |
8145 | ## The system compiler, GCC, has apparently been modified to not | |
8146 | ## look there, contrary to what a stock GCC would do. | |
a7479549 GM |
8147 | ### It's not our place to do this. See bug#10313#17. |
8148 | ### LD_SWITCH_SYSTEM=-L/usr/local/lib | |
8149 | : | |
067d23c9 KY |
8150 | ;; |
8151 | ||
8152 | gnu-linux) | |
8153 | ## cpp test was "ifdef __mips__", but presumably this is equivalent... | |
d6a003a8 | 8154 | case $host_cpu in mips*) LD_SWITCH_SYSTEM="-G 0";; esac |
067d23c9 KY |
8155 | ;; |
8156 | ||
8157 | netbsd) | |
a7479549 GM |
8158 | ### It's not our place to do this. See bug#10313#17. |
8159 | ### LD_SWITCH_SYSTEM="-Wl,-rpath,/usr/pkg/lib -L/usr/pkg/lib -Wl,-rpath,/usr/local/lib -L/usr/local/lib" | |
8160 | : | |
067d23c9 KY |
8161 | ;; |
8162 | ||
8163 | openbsd) | |
8164 | ## Han Boetes <han@mijncomputer.nl> says this is necessary, | |
8165 | ## otherwise Emacs dumps core on elf systems. | |
8166 | LD_SWITCH_SYSTEM="-Z" | |
8167 | ;; | |
8168 | esac | |
8169 | ||
8170 | ||
8171 | ac_link="$ac_link $LD_SWITCH_SYSTEM" | |
8172 | ||
ae629dae | 8173 | ## This setting of LD_SWITCH_SYSTEM references LD_SWITCH_X_SITE_RPATH, |
067d23c9 KY |
8174 | ## which has not been defined yet. When this was handled with cpp, |
8175 | ## it was expanded to null when configure sourced the s/*.h file. | |
8176 | ## Thus LD_SWITCH_SYSTEM had different values in configure and the Makefiles. | |
8177 | ## FIXME it would be cleaner to put this in LD_SWITCH_SYSTEM_TEMACS | |
8178 | ## (or somesuch), but because it is supposed to go at the _front_ | |
8179 | ## of LD_SWITCH_SYSTEM, we cannot do that in exactly the same way. | |
8180 | ## Compare with the gnu-linux case below, which added to the end | |
8181 | ## of LD_SWITCH_SYSTEM, and so can instead go at the front of | |
8182 | ## LD_SWITCH_SYSTEM_TEMACS. | |
8183 | case "$opsys" in | |
8184 | netbsd|openbsd) | |
ae629dae | 8185 | LD_SWITCH_SYSTEM="\$(LD_SWITCH_X_SITE_RPATH) $LD_SWITCH_SYSTEM" ;; |
067d23c9 KY |
8186 | esac |
8187 | ||
8188 | ||
8189 | C_SWITCH_MACHINE= | |
42bbbe8b GM |
8190 | case $canonical in |
8191 | alpha*) | |
067d23c9 | 8192 | ac_fn_c_check_decl "$LINENO" "__ELF__" "ac_cv_have_decl___ELF__" "$ac_includes_default" |
a9bec17c | 8193 | if test "x$ac_cv_have_decl___ELF__" = x""yes; then : |
067d23c9 KY |
8194 | |
8195 | fi | |
8196 | ||
8197 | if test "$ac_cv_have_decl___ELF__" = "yes"; then | |
8198 | ## With ELF, make sure that all common symbols get allocated to in the | |
8199 | ## data section. Otherwise, the dump of temacs may miss variables in | |
8200 | ## the shared library that have been initialized. For example, with | |
8201 | ## GNU libc, __malloc_initialized would normally be resolved to the | |
8202 | ## shared library's .bss section, which is fatal. | |
8203 | if test "x$GCC" = "xyes"; then | |
8204 | C_SWITCH_MACHINE="-fno-common" | |
8205 | else | |
a9bec17c | 8206 | as_fn_error "What gives? Fix me if DEC Unix supports ELF now." "$LINENO" 5 |
067d23c9 KY |
8207 | fi |
8208 | else | |
8209 | UNEXEC_OBJ=unexalpha.o | |
8210 | fi | |
42bbbe8b GM |
8211 | ;; |
8212 | esac | |
067d23c9 KY |
8213 | |
8214 | ||
8215 | ||
8216 | ||
8217 | C_SWITCH_SYSTEM= | |
8218 | ## Some programs in src produce warnings saying certain subprograms | |
8219 | ## are too complex and need a MAXMEM value greater than 2000 for | |
8220 | ## additional optimization. --nils@exp-math.uni-essen.de | |
8221 | test "$opsys" = "aix4.2" && test "x$GCC" != "xyes" && \ | |
8222 | C_SWITCH_SYSTEM="-ma -qmaxmem=4000" | |
8223 | ## gnu-linux might need -D_BSD_SOURCE on old libc5 systems. | |
8224 | ## It is redundant in glibc2, since we define _GNU_SOURCE. | |
8225 | ||
8226 | ||
8227 | ||
8228 | LIBS_SYSTEM= | |
8229 | case "$opsys" in | |
8230 | ## IBM's X11R5 uses -lIM and -liconv in AIX 3.2.2. | |
8231 | aix4-2) LIBS_SYSTEM="-lrts -lIM -liconv" ;; | |
8232 | ||
8233 | freebsd) LIBS_SYSTEM="-lutil" ;; | |
8234 | ||
8235 | hpux*) LIBS_SYSTEM="-l:libdld.sl" ;; | |
8236 | ||
1f5d53eb | 8237 | sol2*) LIBS_SYSTEM="-lsocket -lnsl" ;; |
067d23c9 KY |
8238 | |
8239 | ## Motif needs -lgen. | |
8240 | unixware) LIBS_SYSTEM="-lsocket -lnsl -lelf -lgen" ;; | |
8241 | esac | |
8242 | ||
8243 | ||
8244 | ||
8245 | ### Make sure subsequent tests use flags consistent with the build flags. | |
8246 | ||
8247 | if test x"${OVERRIDE_CPPFLAGS}" != x; then | |
8248 | CPPFLAGS="${OVERRIDE_CPPFLAGS}" | |
8249 | else | |
8250 | CPPFLAGS="$C_SWITCH_SYSTEM $C_SWITCH_MACHINE $CPPFLAGS" | |
8251 | fi | |
8252 | ||
4fda9c95 GM |
8253 | # Suppress obsolescent Autoconf test for size_t; Emacs assumes C89 or better. |
8254 | ||
3e0be4ab GM |
8255 | # Likewise for obsolescent test for uid_t, gid_t; Emacs assumes them. |
8256 | ||
4fda9c95 | 8257 | |
067d23c9 | 8258 | |
067d23c9 KY |
8259 | LIB_MATH=-lm |
8260 | LIB_STANDARD= | |
8261 | START_FILES= | |
4717915f | 8262 | SYSTEM_TYPE=`echo $opsys | sed -e 's/[0-9].*//' -e 's|-|/|'` |
067d23c9 KY |
8263 | |
8264 | case $opsys in | |
8265 | cygwin ) | |
8266 | LIB_MATH= | |
8267 | START_FILES='pre-crt0.o' | |
8268 | ;; | |
8269 | darwin ) | |
8270 | ## Adding -lm confuses the dynamic linker, so omit it. | |
8271 | LIB_MATH= | |
8272 | START_FILES='pre-crt0.o' | |
8273 | ;; | |
8274 | freebsd ) | |
6b10626d GM |
8275 | LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtn.o' |
8276 | START_FILES='pre-crt0.o $(CRT_DIR)/crt1.o $(CRT_DIR)/crti.o' | |
15f79fcd | 8277 | SYSTEM_TYPE=berkeley-unix |
067d23c9 KY |
8278 | ;; |
8279 | gnu-linux | gnu-kfreebsd ) | |
8280 | LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtn.o' | |
8281 | START_FILES='pre-crt0.o $(CRT_DIR)/crt1.o $(CRT_DIR)/crti.o' | |
8282 | ;; | |
8283 | hpux10-20 | hpux11 ) | |
8284 | LIB_STANDARD=-lc | |
8285 | START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o' | |
8286 | ;; | |
bb72ce91 GM |
8287 | netbsd | openbsd ) |
8288 | LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o' | |
8289 | START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o $(CRT_DIR)/crtbegin.o' | |
15f79fcd | 8290 | SYSTEM_TYPE=berkeley-unix |
067d23c9 | 8291 | ;; |
15f79fcd GM |
8292 | |
8293 | sol2* | unixware ) | |
8294 | SYSTEM_TYPE=usg-unix-v | |
8295 | ;; | |
8296 | ||
067d23c9 KY |
8297 | esac |
8298 | ||
8299 | ||
8300 | ||
8301 | ||
15f79fcd GM |
8302 | cat >>confdefs.h <<_ACEOF |
8303 | #define SYSTEM_TYPE "$SYSTEM_TYPE" | |
8304 | _ACEOF | |
8305 | ||
8306 | ||
130f1dac GM |
8307 | crt_files= |
8308 | ||
8309 | for file in x $LIB_STANDARD $START_FILES; do | |
8310 | case "$file" in | |
8311 | *CRT_DIR*) crt_files="$crt_files `echo $file | sed -e 's|.*/||'`" ;; | |
8312 | esac | |
8313 | done | |
8314 | ||
8315 | if test "x$crt_files" != x; then | |
8316 | ||
8317 | ## If user specified a crt-dir, use that unconditionally. | |
8318 | crt_gcc=no | |
8319 | ||
8320 | if test "X$CRT_DIR" = "X"; then | |
8321 | ||
8322 | CRT_DIR=/usr/lib # default | |
8323 | ||
8324 | case "$canonical" in | |
8325 | x86_64-*-linux-gnu* | s390x-*-linux-gnu*) | |
8326 | ## On x86-64 and s390x GNU/Linux distributions, the standard library | |
8327 | ## can be in a variety of places. We only try /usr/lib64 and /usr/lib. | |
8328 | ## For anything else (eg /usr/lib32), it is up the user to specify | |
8329 | ## the location (bug#5655). | |
8330 | ## Test for crtn.o, not just the directory, because sometimes the | |
8331 | ## directory exists but does not have the relevant files (bug#1287). | |
8332 | ## FIXME better to test for binary compatibility somehow. | |
8333 | test -e /usr/lib64/crtn.o && CRT_DIR=/usr/lib64 | |
8334 | ;; | |
8335 | ||
8336 | powerpc64-*-linux-gnu* | sparc64-*-linux-gnu*) CRT_DIR=/usr/lib64 ;; | |
8337 | esac | |
8338 | ||
8339 | case "$opsys" in | |
8340 | hpux10-20) CRT_DIR=/lib ;; | |
8341 | esac | |
8342 | ||
8343 | test "x${GCC}" = xyes && crt_gcc=yes | |
8344 | ||
8345 | fi # CRT_DIR = "" | |
8346 | ||
8347 | crt_missing= | |
8348 | ||
8349 | for file in $crt_files; do | |
8350 | ||
8351 | ## If we're using gcc, try to determine it automatically by asking | |
8352 | ## gcc. [If this doesn't work, CRT_DIR will remain at the | |
8353 | ## system-dependent default from above.] | |
8354 | if test $crt_gcc = yes && test ! -e $CRT_DIR/$file; then | |
8355 | ||
8356 | crt_file=`$CC --print-file-name=$file 2>/dev/null` | |
8357 | case "$crt_file" in | |
8358 | */*) | |
8359 | CRT_DIR=`$as_dirname -- "$crt_file" || | |
8360 | $as_expr X"$crt_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
8361 | X"$crt_file" : 'X\(//\)[^/]' \| \ | |
8362 | X"$crt_file" : 'X\(//\)$' \| \ | |
8363 | X"$crt_file" : 'X\(/\)' \| . 2>/dev/null || | |
8364 | $as_echo X"$crt_file" | | |
8365 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
8366 | s//\1/ | |
8367 | q | |
8368 | } | |
8369 | /^X\(\/\/\)[^/].*/{ | |
8370 | s//\1/ | |
8371 | q | |
8372 | } | |
8373 | /^X\(\/\/\)$/{ | |
8374 | s//\1/ | |
8375 | q | |
8376 | } | |
8377 | /^X\(\/\).*/{ | |
8378 | s//\1/ | |
8379 | q | |
8380 | } | |
8381 | s/.*/./; q'` | |
8382 | ;; | |
8383 | esac | |
8384 | fi | |
8385 | ||
8386 | crt_gcc=no | |
8387 | ||
8388 | test -e $CRT_DIR/$file || crt_missing="$crt_missing $file" | |
8389 | done # $crt_files | |
8390 | ||
8391 | test "x$crt_missing" = x || \ | |
a9bec17c | 8392 | as_fn_error "Required file(s) not found:$crt_missing |
130f1dac GM |
8393 | Try using the --with-crt-dir option." "$LINENO" 5 |
8394 | ||
8395 | fi # crt_files != "" | |
8396 | ||
8397 | ||
8398 | ||
bb72ce91 GM |
8399 | case $opsys in |
8400 | netbsd | openbsd ) | |
8401 | if test -f $CRT_DIR/crti.o; then | |
8402 | ||
8403 | test -f $CRT_DIR/crtn.o || \ | |
8404 | as_fn_error "Required file not found: crtn.o" "$LINENO" 5 | |
8405 | ||
8406 | LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o $(CRT_DIR)/crtn.o' | |
8407 | START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o $(CRT_DIR)/crti.o $(CRT_DIR)/crtbegin.o' | |
8408 | fi | |
8409 | ;; | |
8410 | esac | |
8411 | ||
130f1dac | 8412 | |
5476a9a4 GM |
8413 | pre_PKG_CONFIG_CFLAGS=$CFLAGS |
8414 | pre_PKG_CONFIG_LIBS=$LIBS | |
067d23c9 | 8415 | |
5476a9a4 GM |
8416 | # Extract the first word of "pkg-config", so it can be a program name with args. |
8417 | set dummy pkg-config; ac_word=$2 | |
8418 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
8419 | $as_echo_n "checking for $ac_word... " >&6; } | |
8420 | if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : | |
8421 | $as_echo_n "(cached) " >&6 | |
8422 | else | |
8423 | case $PKG_CONFIG in | |
8424 | [\\/]* | ?:[\\/]*) | |
8425 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
8426 | ;; | |
8427 | *) | |
8428 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8429 | for as_dir in $PATH | |
8430 | do | |
8431 | IFS=$as_save_IFS | |
8432 | test -z "$as_dir" && as_dir=. | |
8433 | for ac_exec_ext in '' $ac_executable_extensions; do | |
8434 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
8435 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
8436 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
8437 | break 2 | |
8438 | fi | |
8439 | done | |
8440 | done | |
8441 | IFS=$as_save_IFS | |
8442 | ||
8443 | test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" | |
8444 | ;; | |
8445 | esac | |
8446 | fi | |
8447 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG | |
8448 | if test -n "$PKG_CONFIG"; then | |
8449 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
8450 | $as_echo "$PKG_CONFIG" >&6; } | |
8451 | else | |
8452 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
8453 | $as_echo "no" >&6; } | |
8454 | fi | |
f199cab1 GM |
8455 | |
8456 | ||
f199cab1 | 8457 | |
5476a9a4 GM |
8458 | |
8459 | ||
8460 | ||
8461 | if test "${with_sound}" != "no"; then | |
8462 | # Sound support for GNU/Linux and the free BSDs. | |
8463 | for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h | |
8464 | do : | |
8465 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
8466 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
8467 | eval as_val=\$$as_ac_Header | |
8468 | if test "x$as_val" = x""yes; then : | |
8469 | cat >>confdefs.h <<_ACEOF | |
8470 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
8471 | _ACEOF | |
8472 | have_sound_header=yes | |
8473 | fi | |
8474 | ||
8475 | done | |
8476 | ||
8477 | # Emulation library used on NetBSD. | |
8478 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _oss_ioctl in -lossaudio" >&5 | |
8479 | $as_echo_n "checking for _oss_ioctl in -lossaudio... " >&6; } | |
8480 | if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then : | |
067d23c9 KY |
8481 | $as_echo_n "(cached) " >&6 |
8482 | else | |
5476a9a4 GM |
8483 | ac_check_lib_save_LIBS=$LIBS |
8484 | LIBS="-lossaudio $LIBS" | |
8485 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
067d23c9 | 8486 | /* end confdefs.h. */ |
5476a9a4 GM |
8487 | |
8488 | /* Override any GCC internal prototype to avoid an error. | |
8489 | Use char because int might match the return type of a GCC | |
8490 | builtin and then its argument prototype would still apply. */ | |
8491 | #ifdef __cplusplus | |
8492 | extern "C" | |
8493 | #endif | |
8494 | char _oss_ioctl (); | |
067d23c9 KY |
8495 | int |
8496 | main () | |
8497 | { | |
5476a9a4 | 8498 | return _oss_ioctl (); |
067d23c9 KY |
8499 | ; |
8500 | return 0; | |
8501 | } | |
8502 | _ACEOF | |
8503 | if ac_fn_c_try_link "$LINENO"; then : | |
5476a9a4 | 8504 | ac_cv_lib_ossaudio__oss_ioctl=yes |
067d23c9 | 8505 | else |
5476a9a4 | 8506 | ac_cv_lib_ossaudio__oss_ioctl=no |
067d23c9 KY |
8507 | fi |
8508 | rm -f core conftest.err conftest.$ac_objext \ | |
8509 | conftest$ac_exeext conftest.$ac_ext | |
5476a9a4 GM |
8510 | LIBS=$ac_check_lib_save_LIBS |
8511 | fi | |
8512 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5 | |
8513 | $as_echo "$ac_cv_lib_ossaudio__oss_ioctl" >&6; } | |
8514 | if test "x$ac_cv_lib_ossaudio__oss_ioctl" = x""yes; then : | |
8515 | LIBSOUND=-lossaudio | |
8516 | else | |
8517 | LIBSOUND= | |
067d23c9 KY |
8518 | fi |
8519 | ||
8520 | ||
8521 | ||
5476a9a4 GM |
8522 | ALSA_REQUIRED=1.0.0 |
8523 | ALSA_MODULES="alsa >= $ALSA_REQUIRED" | |
8524 | ||
8525 | succeeded=no | |
8526 | ||
8527 | if test "$PKG_CONFIG" = "no" ; then | |
8528 | HAVE_ALSA=no | |
8529 | else | |
8530 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
8531 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
8532 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ALSA_MODULES" >&5 | |
8533 | $as_echo_n "checking for $ALSA_MODULES... " >&6; } | |
8534 | ||
8535 | if $PKG_CONFIG --exists "$ALSA_MODULES" 2>&5 && | |
8536 | ALSA_CFLAGS=`$PKG_CONFIG --cflags "$ALSA_MODULES" 2>&5` && | |
8537 | ALSA_LIBS=`$PKG_CONFIG --libs "$ALSA_MODULES" 2>&5`; then | |
8538 | edit_cflags=" | |
8539 | s,///*,/,g | |
8540 | s/^/ / | |
8541 | s/ -I/ $isystem/g | |
8542 | s/^ // | |
8543 | " | |
8544 | ALSA_CFLAGS=`$as_echo "$ALSA_CFLAGS" | sed -e "$edit_cflags"` | |
8545 | ALSA_LIBS=`$as_echo "$ALSA_LIBS" | sed -e 's,///*,/,g'` | |
8546 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$ALSA_CFLAGS' LIBS='$ALSA_LIBS'" >&5 | |
8547 | $as_echo "yes CFLAGS='$ALSA_CFLAGS' LIBS='$ALSA_LIBS'" >&6; } | |
8548 | succeeded=yes | |
8549 | else | |
8550 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
8551 | $as_echo "no" >&6; } | |
8552 | ALSA_CFLAGS="" | |
8553 | ALSA_LIBS="" | |
8554 | ## If we have a custom action on failure, don't print errors, but | |
8555 | ## do set a variable so people can do so. | |
8556 | ALSA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$ALSA_MODULES"` | |
8557 | ||
8558 | fi | |
8559 | ||
8560 | ||
8561 | ||
8562 | else | |
8563 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
8564 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
8565 | fi | |
8566 | fi | |
8567 | ||
8568 | if test $succeeded = yes; then | |
8569 | HAVE_ALSA=yes | |
8570 | else | |
8571 | HAVE_ALSA=no | |
8572 | fi | |
f199cab1 | 8573 | |
5476a9a4 GM |
8574 | if test $HAVE_ALSA = yes; then |
8575 | SAVE_CFLAGS="$CFLAGS" | |
8576 | SAVE_LIBS="$LIBS" | |
8577 | CFLAGS="$ALSA_CFLAGS $CFLAGS" | |
8578 | LIBS="$ALSA_LIBS $LIBS" | |
8579 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8580 | /* end confdefs.h. */ | |
8581 | #include <asoundlib.h> | |
067d23c9 KY |
8582 | int |
8583 | main () | |
8584 | { | |
5476a9a4 | 8585 | snd_lib_error_set_handler (0); |
067d23c9 KY |
8586 | ; |
8587 | return 0; | |
8588 | } | |
8589 | _ACEOF | |
5476a9a4 GM |
8590 | if ac_fn_c_try_compile "$LINENO"; then : |
8591 | emacs_alsa_normal=yes | |
067d23c9 | 8592 | else |
5476a9a4 | 8593 | emacs_alsa_normal=no |
067d23c9 | 8594 | fi |
5476a9a4 GM |
8595 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
8596 | if test "$emacs_alsa_normal" != yes; then | |
8597 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8598 | /* end confdefs.h. */ | |
8599 | #include <alsa/asoundlib.h> | |
8600 | int | |
8601 | main () | |
8602 | { | |
8603 | snd_lib_error_set_handler (0); | |
8604 | ; | |
8605 | return 0; | |
8606 | } | |
8607 | _ACEOF | |
8608 | if ac_fn_c_try_compile "$LINENO"; then : | |
8609 | emacs_alsa_subdir=yes | |
8610 | else | |
8611 | emacs_alsa_subdir=no | |
f199cab1 | 8612 | fi |
5476a9a4 GM |
8613 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
8614 | if test "$emacs_alsa_subdir" != yes; then | |
8615 | as_fn_error "pkg-config found alsa, but it does not compile. See config.log for error messages." "$LINENO" 5 | |
8616 | fi | |
8617 | ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE" | |
8618 | fi | |
067d23c9 | 8619 | |
5476a9a4 GM |
8620 | CFLAGS="$SAVE_CFLAGS" |
8621 | LIBS="$SAVE_LIBS" | |
8622 | LIBSOUND="$LIBSOUND $ALSA_LIBS" | |
8623 | CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS" | |
067d23c9 | 8624 | |
5476a9a4 | 8625 | $as_echo "#define HAVE_ALSA 1" >>confdefs.h |
067d23c9 | 8626 | |
5476a9a4 | 8627 | fi |
067d23c9 | 8628 | |
5476a9a4 GM |
8629 | if test x$have_sound_header = xyes || test $HAVE_ALSA = yes; then |
8630 | case "$opsys" in | |
8631 | gnu-linux|freebsd|netbsd) | |
067d23c9 | 8632 | |
5476a9a4 | 8633 | $as_echo "#define HAVE_SOUND 1" >>confdefs.h |
067d23c9 | 8634 | |
5476a9a4 GM |
8635 | ;; |
8636 | esac | |
8637 | fi | |
067d23c9 KY |
8638 | |
8639 | ||
5476a9a4 | 8640 | fi |
067d23c9 | 8641 | |
e700232f GM |
8642 | |
8643 | ||
8644 | ||
5476a9a4 GM |
8645 | for ac_header in $ac_header_list |
8646 | do : | |
8647 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
8648 | ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default | |
8649 | " | |
8650 | eval as_val=\$$as_ac_Header | |
8651 | if test "x$as_val" = x""yes; then : | |
8652 | cat >>confdefs.h <<_ACEOF | |
8653 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
067d23c9 KY |
8654 | _ACEOF |
8655 | ||
f199cab1 | 8656 | fi |
e700232f | 8657 | |
5476a9a4 GM |
8658 | done |
8659 | ||
8660 | ||
e700232f GM |
8661 | |
8662 | ||
8663 | ||
f199cab1 | 8664 | |
067d23c9 | 8665 | |
067d23c9 | 8666 | |
067d23c9 | 8667 | |
067d23c9 | 8668 | |
f199cab1 GM |
8669 | |
8670 | ||
8671 | ||
067d23c9 | 8672 | |
067d23c9 | 8673 | |
f199cab1 GM |
8674 | |
8675 | ||
8676 | ||
f199cab1 | 8677 | |
f199cab1 | 8678 | |
067d23c9 | 8679 | |
f199cab1 | 8680 | |
067d23c9 | 8681 | |
5476a9a4 GM |
8682 | |
8683 | ||
8684 | ||
8685 | ||
8686 | ||
8687 | ||
8688 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if personality LINUX32 can be set" >&5 | |
8689 | $as_echo_n "checking if personality LINUX32 can be set... " >&6; } | |
8690 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8691 | /* end confdefs.h. */ | |
8692 | #include <sys/personality.h> | |
067d23c9 KY |
8693 | int |
8694 | main () | |
8695 | { | |
5476a9a4 | 8696 | personality (PER_LINUX32) |
067d23c9 KY |
8697 | ; |
8698 | return 0; | |
8699 | } | |
8700 | _ACEOF | |
8701 | if ac_fn_c_try_compile "$LINENO"; then : | |
5476a9a4 | 8702 | emacs_cv_personality_linux32=yes |
067d23c9 | 8703 | else |
5476a9a4 | 8704 | emacs_cv_personality_linux32=no |
067d23c9 | 8705 | fi |
f199cab1 | 8706 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5476a9a4 GM |
8707 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_personality_linux32" >&5 |
8708 | $as_echo "$emacs_cv_personality_linux32" >&6; } | |
f199cab1 | 8709 | |
5476a9a4 | 8710 | if test $emacs_cv_personality_linux32 = yes; then |
f199cab1 | 8711 | |
5476a9a4 GM |
8712 | $as_echo "#define HAVE_PERSONALITY_LINUX32 1" >>confdefs.h |
8713 | ||
8714 | fi | |
8715 | ||
8716 | for ac_header in term.h | |
8717 | do : | |
8718 | ac_fn_c_check_header_preproc "$LINENO" "term.h" "ac_cv_header_term_h" | |
8719 | if test "x$ac_cv_header_term_h" = x""yes; then : | |
8720 | cat >>confdefs.h <<_ACEOF | |
8721 | #define HAVE_TERM_H 1 | |
067d23c9 | 8722 | _ACEOF |
5476a9a4 GM |
8723 | |
8724 | fi | |
8725 | ||
8726 | done | |
8727 | ||
8728 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 | |
8729 | $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } | |
8730 | if test "${ac_cv_header_time+set}" = set; then : | |
8731 | $as_echo_n "(cached) " >&6 | |
8732 | else | |
8733 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
067d23c9 | 8734 | /* end confdefs.h. */ |
5476a9a4 GM |
8735 | #include <sys/types.h> |
8736 | #include <sys/time.h> | |
8737 | #include <time.h> | |
f199cab1 | 8738 | |
067d23c9 KY |
8739 | int |
8740 | main () | |
8741 | { | |
5476a9a4 GM |
8742 | if ((struct tm *) 0) |
8743 | return 0; | |
067d23c9 KY |
8744 | ; |
8745 | return 0; | |
8746 | } | |
8747 | _ACEOF | |
8748 | if ac_fn_c_try_compile "$LINENO"; then : | |
5476a9a4 | 8749 | ac_cv_header_time=yes |
067d23c9 | 8750 | else |
5476a9a4 | 8751 | ac_cv_header_time=no |
067d23c9 KY |
8752 | fi |
8753 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8754 | fi | |
5476a9a4 GM |
8755 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 |
8756 | $as_echo "$ac_cv_header_time" >&6; } | |
8757 | if test $ac_cv_header_time = yes; then | |
f199cab1 | 8758 | |
5476a9a4 GM |
8759 | $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h |
8760 | ||
8761 | fi | |
8762 | ||
8763 | ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "$ac_includes_default" | |
8764 | if test "x$ac_cv_have_decl_sys_siglist" = x""yes; then : | |
8765 | ac_have_decl=1 | |
8766 | else | |
8767 | ac_have_decl=0 | |
8768 | fi | |
8769 | ||
8770 | cat >>confdefs.h <<_ACEOF | |
8771 | #define HAVE_DECL_SYS_SIGLIST $ac_have_decl | |
067d23c9 | 8772 | _ACEOF |
5476a9a4 GM |
8773 | |
8774 | if test $ac_cv_have_decl_sys_siglist != yes; then | |
8775 | # For Tru64, at least: | |
8776 | ac_fn_c_check_decl "$LINENO" "__sys_siglist" "ac_cv_have_decl___sys_siglist" "$ac_includes_default" | |
8777 | if test "x$ac_cv_have_decl___sys_siglist" = x""yes; then : | |
8778 | ac_have_decl=1 | |
8779 | else | |
8780 | ac_have_decl=0 | |
067d23c9 | 8781 | fi |
5476a9a4 GM |
8782 | |
8783 | cat >>confdefs.h <<_ACEOF | |
8784 | #define HAVE_DECL___SYS_SIGLIST $ac_have_decl | |
8785 | _ACEOF | |
8786 | ||
8787 | if test $ac_cv_have_decl___sys_siglist = yes; then | |
8788 | ||
8789 | $as_echo "#define sys_siglist __sys_siglist" >>confdefs.h | |
8790 | ||
8791 | fi | |
8792 | fi | |
8793 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5 | |
8794 | $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; } | |
8795 | if test "${ac_cv_header_sys_wait_h+set}" = set; then : | |
8796 | $as_echo_n "(cached) " >&6 | |
067d23c9 KY |
8797 | else |
8798 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8799 | /* end confdefs.h. */ | |
5476a9a4 GM |
8800 | #include <sys/types.h> |
8801 | #include <sys/wait.h> | |
8802 | #ifndef WEXITSTATUS | |
8803 | # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8) | |
8804 | #endif | |
8805 | #ifndef WIFEXITED | |
8806 | # define WIFEXITED(stat_val) (((stat_val) & 255) == 0) | |
8807 | #endif | |
8808 | ||
067d23c9 KY |
8809 | int |
8810 | main () | |
8811 | { | |
5476a9a4 GM |
8812 | int s; |
8813 | wait (&s); | |
8814 | s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; | |
067d23c9 KY |
8815 | ; |
8816 | return 0; | |
8817 | } | |
8818 | _ACEOF | |
5476a9a4 GM |
8819 | if ac_fn_c_try_compile "$LINENO"; then : |
8820 | ac_cv_header_sys_wait_h=yes | |
067d23c9 | 8821 | else |
5476a9a4 | 8822 | ac_cv_header_sys_wait_h=no |
067d23c9 | 8823 | fi |
5476a9a4 | 8824 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
067d23c9 | 8825 | fi |
5476a9a4 GM |
8826 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5 |
8827 | $as_echo "$ac_cv_header_sys_wait_h" >&6; } | |
8828 | if test $ac_cv_header_sys_wait_h = yes; then | |
067d23c9 | 8829 | |
5476a9a4 | 8830 | $as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h |
7417b37c | 8831 | |
5476a9a4 | 8832 | fi |
7417b37c | 8833 | |
7417b37c | 8834 | |
5476a9a4 GM |
8835 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for speed_t" >&5 |
8836 | $as_echo_n "checking for speed_t... " >&6; } | |
8837 | if test "${emacs_cv_speed_t+set}" = set; then : | |
f199cab1 GM |
8838 | $as_echo_n "(cached) " >&6 |
8839 | else | |
f199cab1 GM |
8840 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
8841 | /* end confdefs.h. */ | |
5476a9a4 GM |
8842 | #include <termios.h> |
8843 | int | |
8844 | main () | |
8845 | { | |
8846 | speed_t x = 1; | |
8847 | ; | |
8848 | return 0; | |
8849 | } | |
7417b37c | 8850 | _ACEOF |
f199cab1 | 8851 | if ac_fn_c_try_compile "$LINENO"; then : |
5476a9a4 GM |
8852 | emacs_cv_speed_t=yes |
8853 | else | |
8854 | emacs_cv_speed_t=no | |
7417b37c | 8855 | fi |
f199cab1 | 8856 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
7417b37c | 8857 | fi |
5476a9a4 GM |
8858 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_speed_t" >&5 |
8859 | $as_echo "$emacs_cv_speed_t" >&6; } | |
8860 | if test $emacs_cv_speed_t = yes; then | |
7417b37c | 8861 | |
5476a9a4 | 8862 | $as_echo "#define HAVE_SPEED_T 1" >>confdefs.h |
067d23c9 | 8863 | |
5476a9a4 | 8864 | fi |
067d23c9 | 8865 | |
5476a9a4 GM |
8866 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct exception" >&5 |
8867 | $as_echo_n "checking for struct exception... " >&6; } | |
8868 | if test "${emacs_cv_struct_exception+set}" = set; then : | |
f199cab1 GM |
8869 | $as_echo_n "(cached) " >&6 |
8870 | else | |
8871 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8872 | /* end confdefs.h. */ | |
5476a9a4 | 8873 | #include <math.h> |
f199cab1 GM |
8874 | int |
8875 | main () | |
8876 | { | |
5476a9a4 | 8877 | static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1; |
f199cab1 GM |
8878 | ; |
8879 | return 0; | |
8880 | } | |
067d23c9 | 8881 | _ACEOF |
5476a9a4 GM |
8882 | if ac_fn_c_try_compile "$LINENO"; then : |
8883 | emacs_cv_struct_exception=yes | |
f199cab1 | 8884 | else |
5476a9a4 | 8885 | emacs_cv_struct_exception=no |
067d23c9 | 8886 | fi |
5476a9a4 | 8887 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
7417b37c | 8888 | fi |
5476a9a4 GM |
8889 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_struct_exception" >&5 |
8890 | $as_echo "$emacs_cv_struct_exception" >&6; } | |
8891 | HAVE_EXCEPTION=$emacs_cv_struct_exception | |
8892 | if test $emacs_cv_struct_exception != yes || test $opsys = darwin; then | |
7417b37c | 8893 | |
5476a9a4 | 8894 | $as_echo "#define NO_MATHERR 1" >>confdefs.h |
7417b37c | 8895 | |
5476a9a4 | 8896 | fi |
7417b37c | 8897 | |
067d23c9 KY |
8898 | |
8899 | ||
e700232f | 8900 | |
5476a9a4 GM |
8901 | for ac_header in net/if.h |
8902 | do : | |
8903 | ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default | |
8904 | #if HAVE_SYS_SOCKET_H | |
8905 | #include <sys/socket.h> | |
8906 | #endif | |
8907 | " | |
8908 | if test "x$ac_cv_header_net_if_h" = x""yes; then : | |
8909 | cat >>confdefs.h <<_ACEOF | |
8910 | #define HAVE_NET_IF_H 1 | |
067d23c9 | 8911 | _ACEOF |
7cae64b4 | 8912 | |
067d23c9 | 8913 | fi |
067d23c9 | 8914 | |
5476a9a4 | 8915 | done |
4d4b75e8 | 8916 | |
5476a9a4 GM |
8917 | for ac_header in ifaddrs.h |
8918 | do : | |
8919 | ac_fn_c_check_header_compile "$LINENO" "ifaddrs.h" "ac_cv_header_ifaddrs_h" "$ac_includes_default | |
8920 | #if HAVE_SYS_SOCKET_H | |
8921 | #include <sys/socket.h> | |
8922 | #endif | |
8923 | " | |
8924 | if test "x$ac_cv_header_ifaddrs_h" = x""yes; then : | |
8925 | cat >>confdefs.h <<_ACEOF | |
8926 | #define HAVE_IFADDRS_H 1 | |
8927 | _ACEOF | |
4d4b75e8 | 8928 | |
5476a9a4 | 8929 | fi |
4d4b75e8 | 8930 | |
5476a9a4 | 8931 | done |
7e723570 | 8932 | |
5476a9a4 | 8933 | for ac_header in net/if_dl.h |
7e723570 | 8934 | do : |
5476a9a4 GM |
8935 | ac_fn_c_check_header_compile "$LINENO" "net/if_dl.h" "ac_cv_header_net_if_dl_h" "$ac_includes_default |
8936 | #if HAVE_SYS_SOCKET_H | |
8937 | #include <sys/socket.h> | |
8938 | #endif | |
7e723570 | 8939 | " |
5476a9a4 | 8940 | if test "x$ac_cv_header_net_if_dl_h" = x""yes; then : |
7e723570 | 8941 | cat >>confdefs.h <<_ACEOF |
5476a9a4 | 8942 | #define HAVE_NET_IF_DL_H 1 |
7e723570 GM |
8943 | _ACEOF |
8944 | ||
8945 | fi | |
8946 | ||
8947 | done | |
8948 | ||
8949 | ||
5476a9a4 GM |
8950 | ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_flags" "ac_cv_member_struct_ifreq_ifr_flags" "$ac_includes_default |
8951 | #if HAVE_SYS_SOCKET_H | |
8952 | #include <sys/socket.h> | |
8953 | #endif | |
8954 | #if HAVE_NET_IF_H | |
8955 | #include <net/if.h> | |
8956 | #endif | |
8957 | " | |
8958 | if test "x$ac_cv_member_struct_ifreq_ifr_flags" = x""yes; then : | |
7e723570 | 8959 | |
5476a9a4 GM |
8960 | cat >>confdefs.h <<_ACEOF |
8961 | #define HAVE_STRUCT_IFREQ_IFR_FLAGS 1 | |
8962 | _ACEOF | |
7e723570 GM |
8963 | |
8964 | ||
5476a9a4 GM |
8965 | fi |
8966 | ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_hwaddr" "ac_cv_member_struct_ifreq_ifr_hwaddr" "$ac_includes_default | |
8967 | #if HAVE_SYS_SOCKET_H | |
8968 | #include <sys/socket.h> | |
f199cab1 | 8969 | #endif |
5476a9a4 GM |
8970 | #if HAVE_NET_IF_H |
8971 | #include <net/if.h> | |
f199cab1 | 8972 | #endif |
5476a9a4 GM |
8973 | " |
8974 | if test "x$ac_cv_member_struct_ifreq_ifr_hwaddr" = x""yes; then : | |
8975 | ||
8976 | cat >>confdefs.h <<_ACEOF | |
8977 | #define HAVE_STRUCT_IFREQ_IFR_HWADDR 1 | |
8978 | _ACEOF | |
8979 | ||
8980 | ||
8981 | fi | |
8982 | ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_netmask" "ac_cv_member_struct_ifreq_ifr_netmask" "$ac_includes_default | |
8983 | #if HAVE_SYS_SOCKET_H | |
8984 | #include <sys/socket.h> | |
f199cab1 | 8985 | #endif |
5476a9a4 GM |
8986 | #if HAVE_NET_IF_H |
8987 | #include <net/if.h> | |
8988 | #endif | |
8989 | " | |
8990 | if test "x$ac_cv_member_struct_ifreq_ifr_netmask" = x""yes; then : | |
8991 | ||
8992 | cat >>confdefs.h <<_ACEOF | |
8993 | #define HAVE_STRUCT_IFREQ_IFR_NETMASK 1 | |
f199cab1 | 8994 | _ACEOF |
5476a9a4 GM |
8995 | |
8996 | ||
8997 | fi | |
8998 | ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_broadaddr" "ac_cv_member_struct_ifreq_ifr_broadaddr" "$ac_includes_default | |
8999 | #if HAVE_SYS_SOCKET_H | |
9000 | #include <sys/socket.h> | |
9001 | #endif | |
9002 | #if HAVE_NET_IF_H | |
9003 | #include <net/if.h> | |
9004 | #endif | |
9005 | " | |
9006 | if test "x$ac_cv_member_struct_ifreq_ifr_broadaddr" = x""yes; then : | |
9007 | ||
9008 | cat >>confdefs.h <<_ACEOF | |
9009 | #define HAVE_STRUCT_IFREQ_IFR_BROADADDR 1 | |
f199cab1 | 9010 | _ACEOF |
5476a9a4 GM |
9011 | |
9012 | ||
067d23c9 | 9013 | fi |
5476a9a4 GM |
9014 | ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_addr" "ac_cv_member_struct_ifreq_ifr_addr" "$ac_includes_default |
9015 | #if HAVE_SYS_SOCKET_H | |
9016 | #include <sys/socket.h> | |
9017 | #endif | |
9018 | #if HAVE_NET_IF_H | |
9019 | #include <net/if.h> | |
9020 | #endif | |
9021 | " | |
9022 | if test "x$ac_cv_member_struct_ifreq_ifr_addr" = x""yes; then : | |
9023 | ||
9024 | cat >>confdefs.h <<_ACEOF | |
9025 | #define HAVE_STRUCT_IFREQ_IFR_ADDR 1 | |
9026 | _ACEOF | |
9027 | ||
067d23c9 | 9028 | |
f199cab1 | 9029 | fi |
5476a9a4 GM |
9030 | ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_addr.sa_len" "ac_cv_member_struct_ifreq_ifr_addr_sa_len" "$ac_includes_default |
9031 | #if HAVE_SYS_SOCKET_H | |
9032 | #include <sys/socket.h> | |
9033 | #endif | |
9034 | #if HAVE_NET_IF_H | |
9035 | #include <net/if.h> | |
9036 | #endif | |
9037 | " | |
9038 | if test "x$ac_cv_member_struct_ifreq_ifr_addr_sa_len" = x""yes; then : | |
9039 | ||
9040 | cat >>confdefs.h <<_ACEOF | |
9041 | #define HAVE_STRUCT_IFREQ_IFR_ADDR_SA_LEN 1 | |
9042 | _ACEOF | |
9043 | ||
067d23c9 KY |
9044 | |
9045 | fi | |
9046 | ||
9047 | ||
067d23c9 | 9048 | |
f199cab1 | 9049 | |
5476a9a4 GM |
9050 | DEPFLAGS= |
9051 | MKDEPDIR=":" | |
9052 | deps_frag=deps.mk | |
9053 | if test "$GCC" = yes && test "$ac_enable_autodepend" = yes; then | |
9054 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using GNU Make" >&5 | |
9055 | $as_echo_n "checking whether we are using GNU Make... " >&6; } | |
9056 | HAVE_GNU_MAKE=no | |
9057 | testval=`${MAKE-make} --version 2>/dev/null | grep 'GNU Make'` | |
9058 | if test "x$testval" != x; then | |
9059 | HAVE_GNU_MAKE=yes | |
9060 | else | |
9061 | ac_enable_autodepend=no | |
9062 | fi | |
9063 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_GNU_MAKE" >&5 | |
9064 | $as_echo "$HAVE_GNU_MAKE" >&6; } | |
9065 | if test $HAVE_GNU_MAKE = yes; then | |
9066 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -MMD -MF" >&5 | |
9067 | $as_echo_n "checking whether gcc understands -MMD -MF... " >&6; } | |
9068 | SAVE_CFLAGS="$CFLAGS" | |
9069 | CFLAGS="$CFLAGS -MMD -MF deps.d -MP" | |
9070 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9071 | /* end confdefs.h. */ | |
f199cab1 | 9072 | |
5476a9a4 GM |
9073 | int |
9074 | main () | |
9075 | { | |
f199cab1 | 9076 | |
5476a9a4 GM |
9077 | ; |
9078 | return 0; | |
9079 | } | |
9080 | _ACEOF | |
9081 | if ac_fn_c_try_compile "$LINENO"; then : | |
f199cab1 | 9082 | |
5476a9a4 GM |
9083 | else |
9084 | ac_enable_autodepend=no | |
9085 | fi | |
9086 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
9087 | CFLAGS="$SAVE_CFLAGS" | |
9088 | test -f deps.d || ac_enable_autodepend=no | |
9089 | rm -rf deps.d | |
9090 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_autodepend" >&5 | |
9091 | $as_echo "$ac_enable_autodepend" >&6; } | |
9092 | fi | |
9093 | if test $ac_enable_autodepend = yes; then | |
9094 | DEPFLAGS='-MMD -MF ${DEPDIR}/$*.d -MP' | |
9095 | ## MKDIR_P is documented (see AC_PROG_MKDIR_P) to be parallel-safe. | |
9096 | MKDEPDIR='${MKDIR_P} ${DEPDIR}' | |
9097 | deps_frag=autodeps.mk | |
9098 | fi | |
9099 | fi | |
9100 | deps_frag=$srcdir/src/$deps_frag | |
f199cab1 GM |
9101 | |
9102 | ||
9103 | ||
9104 | ||
9105 | ||
5476a9a4 | 9106 | lisp_frag=$srcdir/src/lisp.mk |
f199cab1 GM |
9107 | |
9108 | ||
9109 | ||
5476a9a4 GM |
9110 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long file names" >&5 |
9111 | $as_echo_n "checking for long file names... " >&6; } | |
9112 | if test "${ac_cv_sys_long_file_names+set}" = set; then : | |
9113 | $as_echo_n "(cached) " >&6 | |
9114 | else | |
9115 | ac_cv_sys_long_file_names=yes | |
9116 | # Test for long file names in all the places we know might matter: | |
9117 | # . the current directory, where building will happen | |
9118 | # $prefix/lib where we will be installing things | |
9119 | # $exec_prefix/lib likewise | |
9120 | # $TMPDIR if set, where it might want to write temporary files | |
9121 | # /tmp where it might want to write temporary files | |
9122 | # /var/tmp likewise | |
9123 | # /usr/tmp likewise | |
9124 | for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do | |
9125 | # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib | |
9126 | # in the usual case where exec_prefix is '${prefix}'. | |
9127 | case $ac_dir in #( | |
9128 | . | /* | ?:[\\/]*) ;; #( | |
9129 | *) continue;; | |
9130 | esac | |
9131 | test -w "$ac_dir/." || continue # It is less confusing to not echo anything here. | |
9132 | ac_xdir=$ac_dir/cf$$ | |
9133 | (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue | |
9134 | ac_tf1=$ac_xdir/conftest9012345 | |
9135 | ac_tf2=$ac_xdir/conftest9012346 | |
9136 | touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" || | |
9137 | ac_cv_sys_long_file_names=no | |
9138 | rm -f -r "$ac_xdir" 2>/dev/null | |
9139 | test $ac_cv_sys_long_file_names = no && break | |
9140 | done | |
9141 | fi | |
9142 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_long_file_names" >&5 | |
9143 | $as_echo "$ac_cv_sys_long_file_names" >&6; } | |
9144 | if test $ac_cv_sys_long_file_names = yes; then | |
f199cab1 | 9145 | |
5476a9a4 | 9146 | $as_echo "#define HAVE_LONG_FILE_NAMES 1" >>confdefs.h |
f199cab1 | 9147 | |
5476a9a4 | 9148 | fi |
f199cab1 | 9149 | |
f199cab1 | 9150 | |
5476a9a4 | 9151 | #### Choose a window system. |
f199cab1 | 9152 | |
42dcba54 GM |
9153 | ## We leave window_system equal to none if |
9154 | ## we end up building without one. Any new window system should | |
9155 | ## set window_system to an appropriate value and add objects to | |
9156 | ## window-system-specific substs. | |
9157 | ||
9158 | window_system=none | |
5476a9a4 GM |
9159 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5 |
9160 | $as_echo_n "checking for X... " >&6; } | |
f199cab1 | 9161 | |
f199cab1 | 9162 | |
5476a9a4 GM |
9163 | # Check whether --with-x was given. |
9164 | if test "${with_x+set}" = set; then : | |
9165 | withval=$with_x; | |
9166 | fi | |
f199cab1 | 9167 | |
5476a9a4 GM |
9168 | # $have_x is `yes', `no', `disabled', or empty when we do not yet know. |
9169 | if test "x$with_x" = xno; then | |
9170 | # The user explicitly disabled X. | |
9171 | have_x=disabled | |
9172 | else | |
9173 | case $x_includes,$x_libraries in #( | |
9174 | *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #( | |
9175 | *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then : | |
9176 | $as_echo_n "(cached) " >&6 | |
9177 | else | |
9178 | # One or both of the vars are not set, and there is no cached value. | |
9179 | ac_x_includes=no ac_x_libraries=no | |
9180 | rm -f -r conftest.dir | |
9181 | if mkdir conftest.dir; then | |
9182 | cd conftest.dir | |
9183 | cat >Imakefile <<'_ACEOF' | |
9184 | incroot: | |
9185 | @echo incroot='${INCROOT}' | |
9186 | usrlibdir: | |
9187 | @echo usrlibdir='${USRLIBDIR}' | |
9188 | libdir: | |
9189 | @echo libdir='${LIBDIR}' | |
9190 | _ACEOF | |
9191 | if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then | |
9192 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | |
9193 | for ac_var in incroot usrlibdir libdir; do | |
9194 | eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" | |
9195 | done | |
9196 | # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. | |
9197 | for ac_extension in a so sl dylib la dll; do | |
9198 | if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && | |
9199 | test -f "$ac_im_libdir/libX11.$ac_extension"; then | |
9200 | ac_im_usrlibdir=$ac_im_libdir; break | |
9201 | fi | |
9202 | done | |
9203 | # Screen out bogus values from the imake configuration. They are | |
9204 | # bogus both because they are the default anyway, and because | |
9205 | # using them would break gcc on systems where it needs fixed includes. | |
9206 | case $ac_im_incroot in | |
9207 | /usr/include) ac_x_includes= ;; | |
9208 | *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; | |
9209 | esac | |
9210 | case $ac_im_usrlibdir in | |
9211 | /usr/lib | /usr/lib64 | /lib | /lib64) ;; | |
9212 | *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; | |
9213 | esac | |
9214 | fi | |
9215 | cd .. | |
9216 | rm -f -r conftest.dir | |
067d23c9 KY |
9217 | fi |
9218 | ||
5476a9a4 GM |
9219 | # Standard set of common directories for X headers. |
9220 | # Check X11 before X11Rn because it is often a symlink to the current release. | |
9221 | ac_x_header_dirs=' | |
9222 | /usr/X11/include | |
9223 | /usr/X11R7/include | |
9224 | /usr/X11R6/include | |
9225 | /usr/X11R5/include | |
9226 | /usr/X11R4/include | |
067d23c9 | 9227 | |
5476a9a4 GM |
9228 | /usr/include/X11 |
9229 | /usr/include/X11R7 | |
9230 | /usr/include/X11R6 | |
9231 | /usr/include/X11R5 | |
9232 | /usr/include/X11R4 | |
067d23c9 | 9233 | |
5476a9a4 GM |
9234 | /usr/local/X11/include |
9235 | /usr/local/X11R7/include | |
9236 | /usr/local/X11R6/include | |
9237 | /usr/local/X11R5/include | |
9238 | /usr/local/X11R4/include | |
067d23c9 | 9239 | |
5476a9a4 GM |
9240 | /usr/local/include/X11 |
9241 | /usr/local/include/X11R7 | |
9242 | /usr/local/include/X11R6 | |
9243 | /usr/local/include/X11R5 | |
9244 | /usr/local/include/X11R4 | |
067d23c9 | 9245 | |
5476a9a4 GM |
9246 | /usr/X386/include |
9247 | /usr/x386/include | |
9248 | /usr/XFree86/include/X11 | |
067d23c9 | 9249 | |
5476a9a4 GM |
9250 | /usr/include |
9251 | /usr/local/include | |
9252 | /usr/unsupported/include | |
9253 | /usr/athena/include | |
9254 | /usr/local/x11r5/include | |
9255 | /usr/lpp/Xamples/include | |
067d23c9 | 9256 | |
5476a9a4 GM |
9257 | /usr/openwin/include |
9258 | /usr/openwin/share/include' | |
067d23c9 | 9259 | |
5476a9a4 GM |
9260 | if test "$ac_x_includes" = no; then |
9261 | # Guess where to find include files, by looking for Xlib.h. | |
9262 | # First, try using that file with no special directory specified. | |
9263 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9264 | /* end confdefs.h. */ | |
9265 | #include <X11/Xlib.h> | |
067d23c9 | 9266 | _ACEOF |
5476a9a4 GM |
9267 | if ac_fn_c_try_cpp "$LINENO"; then : |
9268 | # We can compile using X headers with no special include directory. | |
9269 | ac_x_includes= | |
067d23c9 | 9270 | else |
5476a9a4 GM |
9271 | for ac_dir in $ac_x_header_dirs; do |
9272 | if test -r "$ac_dir/X11/Xlib.h"; then | |
9273 | ac_x_includes=$ac_dir | |
9274 | break | |
f199cab1 | 9275 | fi |
f199cab1 | 9276 | done |
5476a9a4 GM |
9277 | fi |
9278 | rm -f conftest.err conftest.$ac_ext | |
9279 | fi # $ac_x_includes = no | |
067d23c9 | 9280 | |
5476a9a4 GM |
9281 | if test "$ac_x_libraries" = no; then |
9282 | # Check for the libraries. | |
9283 | # See if we find them without any special options. | |
9284 | # Don't add to $LIBS permanently. | |
9285 | ac_save_LIBS=$LIBS | |
9286 | LIBS="-lX11 $LIBS" | |
7ee3791f | 9287 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
067d23c9 | 9288 | /* end confdefs.h. */ |
5476a9a4 | 9289 | #include <X11/Xlib.h> |
067d23c9 KY |
9290 | int |
9291 | main () | |
9292 | { | |
5476a9a4 GM |
9293 | XrmInitialize () |
9294 | ; | |
067d23c9 KY |
9295 | return 0; |
9296 | } | |
9297 | _ACEOF | |
5476a9a4 GM |
9298 | if ac_fn_c_try_link "$LINENO"; then : |
9299 | LIBS=$ac_save_LIBS | |
9300 | # We can link X programs with no special library path. | |
9301 | ac_x_libraries= | |
7ee3791f | 9302 | else |
5476a9a4 GM |
9303 | LIBS=$ac_save_LIBS |
9304 | for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` | |
9305 | do | |
9306 | # Don't even attempt the hair of trying to link an X program! | |
9307 | for ac_extension in a so sl dylib la dll; do | |
9308 | if test -r "$ac_dir/libX11.$ac_extension"; then | |
9309 | ac_x_libraries=$ac_dir | |
9310 | break 2 | |
9311 | fi | |
9312 | done | |
9313 | done | |
7ee3791f | 9314 | fi |
5476a9a4 GM |
9315 | rm -f core conftest.err conftest.$ac_objext \ |
9316 | conftest$ac_exeext conftest.$ac_ext | |
9317 | fi # $ac_x_libraries = no | |
7ee3791f | 9318 | |
5476a9a4 GM |
9319 | case $ac_x_includes,$ac_x_libraries in #( |
9320 | no,* | *,no | *\'*) | |
9321 | # Didn't find X, or a directory has "'" in its name. | |
9322 | ac_cv_have_x="have_x=no";; #( | |
9323 | *) | |
9324 | # Record where we found X for the cache. | |
9325 | ac_cv_have_x="have_x=yes\ | |
9326 | ac_x_includes='$ac_x_includes'\ | |
9327 | ac_x_libraries='$ac_x_libraries'" | |
9328 | esac | |
9329 | fi | |
9330 | ;; #( | |
9331 | *) have_x=yes;; | |
9332 | esac | |
9333 | eval "$ac_cv_have_x" | |
9334 | fi # $with_x != no | |
9335 | ||
9336 | if test "$have_x" != yes; then | |
9337 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5 | |
9338 | $as_echo "$have_x" >&6; } | |
9339 | no_x=yes | |
9340 | else | |
9341 | # If each of the values was on the command line, it overrides each guess. | |
9342 | test "x$x_includes" = xNONE && x_includes=$ac_x_includes | |
9343 | test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries | |
9344 | # Update the cache value to reflect the command line values. | |
9345 | ac_cv_have_x="have_x=yes\ | |
9346 | ac_x_includes='$x_includes'\ | |
9347 | ac_x_libraries='$x_libraries'" | |
9348 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5 | |
9349 | $as_echo "libraries $x_libraries, headers $x_includes" >&6; } | |
9350 | fi | |
9351 | ||
42dcba54 | 9352 | if test "$no_x" != yes; then |
5476a9a4 GM |
9353 | window_system=x11 |
9354 | fi | |
9355 | ||
9356 | LD_SWITCH_X_SITE_RPATH= | |
9357 | if test "${x_libraries}" != NONE; then | |
9358 | if test -n "${x_libraries}"; then | |
9359 | LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"` | |
9360 | LD_SWITCH_X_SITE_RPATH=-Wl,-rpath,`echo ${x_libraries} | sed -e "s/:/ -Wl,-rpath,/g"` | |
9361 | fi | |
9362 | x_default_search_path="" | |
9363 | x_search_path=${x_libraries} | |
9364 | if test -z "${x_search_path}"; then | |
9365 | x_search_path=/usr/lib | |
9366 | fi | |
9367 | for x_library in `echo ${x_search_path}: | \ | |
9368 | sed -e "s/:/ /g" -e p -e "s:/lib[^ /]* :/share :g"`; do | |
9369 | x_search_path="\ | |
9370 | ${x_library}/X11/%L/%T/%N%C%S:\ | |
9371 | ${x_library}/X11/%l/%T/%N%C%S:\ | |
9372 | ${x_library}/X11/%T/%N%C%S:\ | |
9373 | ${x_library}/X11/%L/%T/%N%S:\ | |
9374 | ${x_library}/X11/%l/%T/%N%S:\ | |
9375 | ${x_library}/X11/%T/%N%S" | |
9376 | if test x"${x_default_search_path}" = x; then | |
9377 | x_default_search_path=${x_search_path} | |
9378 | else | |
9379 | x_default_search_path="${x_search_path}:${x_default_search_path}" | |
9380 | fi | |
9381 | done | |
9382 | fi | |
9383 | ||
9384 | ||
9385 | if test "${x_includes}" != NONE && test -n "${x_includes}"; then | |
9386 | C_SWITCH_X_SITE="$isystem"`echo ${x_includes} | sed -e "s/:/ $isystem/g"` | |
9387 | fi | |
9388 | ||
9389 | if test x"${x_includes}" = x; then | |
9390 | bitmapdir=/usr/include/X11/bitmaps | |
9391 | else | |
9392 | # accumulate include directories that have X11 bitmap subdirectories | |
9393 | bmd_acc="dummyval" | |
9394 | for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do | |
9395 | if test -d "${bmd}/X11/bitmaps"; then | |
9396 | bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps" | |
9397 | fi | |
9398 | if test -d "${bmd}/bitmaps"; then | |
9399 | bmd_acc="${bmd_acc}:${bmd}/bitmaps" | |
9400 | fi | |
9401 | done | |
9402 | if test ${bmd_acc} != "dummyval"; then | |
9403 | bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"` | |
9404 | fi | |
9405 | fi | |
7ee3791f | 9406 | |
5476a9a4 GM |
9407 | HAVE_NS=no |
9408 | NS_IMPL_COCOA=no | |
9409 | NS_IMPL_GNUSTEP=no | |
9410 | tmp_CPPFLAGS="$CPPFLAGS" | |
9411 | tmp_CFLAGS="$CFLAGS" | |
9412 | CPPFLAGS="$CPPFLAGS -x objective-c" | |
9413 | CFLAGS="$CFLAGS -x objective-c" | |
9414 | TEMACS_LDFLAGS2="\${LDFLAGS}" | |
9415 | GNU_OBJC_CFLAGS= | |
9416 | if test "${with_ns}" != no; then | |
9417 | if test "${opsys}" = darwin; then | |
9418 | NS_IMPL_COCOA=yes | |
9419 | ns_appdir=`pwd`/nextstep/Emacs.app | |
9420 | ns_appbindir=${ns_appdir}/Contents/MacOS | |
9421 | ns_appresdir=${ns_appdir}/Contents/Resources | |
9422 | ns_appsrc=${srcdir}/nextstep/Cocoa/Emacs.base | |
9423 | elif test -f $GNUSTEP_CONFIG_FILE; then | |
9424 | NS_IMPL_GNUSTEP=yes | |
9425 | ns_appdir=`pwd`/nextstep/Emacs.app | |
9426 | ns_appbindir=${ns_appdir} | |
9427 | ns_appresdir=${ns_appdir}/Resources | |
9428 | ns_appsrc=${srcdir}/nextstep/GNUstep/Emacs.base | |
9429 | GNUSTEP_SYSTEM_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_HEADERS)" | |
9430 | GNUSTEP_SYSTEM_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_LIBRARIES)" | |
9431 | GNUSTEP_LOCAL_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_HEADERS)" | |
9432 | GNUSTEP_LOCAL_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_LIBRARIES)" | |
9433 | test "x${GNUSTEP_LOCAL_HEADERS}" != "x" && \ | |
9434 | GNUSTEP_LOCAL_HEADERS="-I${GNUSTEP_LOCAL_HEADERS}" | |
9435 | test "x${GNUSTEP_LOCAL_LIBRARIES}" != "x" && \ | |
9436 | GNUSTEP_LOCAL_LIBRARIES="-L${GNUSTEP_LOCAL_LIBRARIES}" | |
9437 | CPPFLAGS="$CPPFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}" | |
9438 | CFLAGS="$CFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}" | |
9439 | LDFLAGS="$LDFLAGS -L${GNUSTEP_SYSTEM_LIBRARIES} ${GNUSTEP_LOCAL_LIBRARIES}" | |
9440 | LIB_STANDARD= | |
9441 | START_FILES= | |
9442 | TEMACS_LDFLAGS2= | |
9443 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if GNUstep defines BASE_NATIVE_OBJC_EXCEPTIONS" >&5 | |
9444 | $as_echo_n "checking if GNUstep defines BASE_NATIVE_OBJC_EXCEPTIONS... " >&6; } | |
9445 | if test "${emacs_cv_objc_exceptions+set}" = set; then : | |
9446 | $as_echo_n "(cached) " >&6 | |
9447 | else | |
9448 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9449 | /* end confdefs.h. */ | |
9450 | #include <GNUstepBase/GSConfig.h> | |
39b3d70b GM |
9451 | int |
9452 | main () | |
9453 | { | |
5476a9a4 GM |
9454 | #if defined BASE_NATIVE_OBJC_EXCEPTIONS && BASE_NATIVE_OBJC_EXCEPTIONS > 0 |
9455 | 1; | |
9456 | #else | |
9457 | fail; | |
9458 | #endif | |
9459 | ; | |
39b3d70b GM |
9460 | return 0; |
9461 | } | |
9462 | _ACEOF | |
5476a9a4 GM |
9463 | if ac_fn_c_try_compile "$LINENO"; then : |
9464 | emacs_cv_objc_exceptions=yes | |
39b3d70b | 9465 | else |
5476a9a4 | 9466 | emacs_cv_objc_exceptions=no |
39b3d70b | 9467 | fi |
5476a9a4 | 9468 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
39b3d70b | 9469 | fi |
5476a9a4 GM |
9470 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_objc_exceptions" >&5 |
9471 | $as_echo "$emacs_cv_objc_exceptions" >&6; } | |
9472 | if test $emacs_cv_objc_exceptions = yes; then | |
39b3d70b | 9473 | |
5476a9a4 GM |
9474 | $as_echo "#define _NATIVE_OBJC_EXCEPTIONS 1" >>confdefs.h |
9475 | ||
9476 | GNU_OBJC_CFLAGS="-fobjc-exceptions" | |
9477 | fi | |
9478 | fi | |
9479 | ||
9480 | CFLAGS="$CFLAGS $GNU_OBJC_CFLAGS" | |
9481 | ||
9482 | ac_fn_c_check_header_mongrel "$LINENO" "AppKit/AppKit.h" "ac_cv_header_AppKit_AppKit_h" "$ac_includes_default" | |
9483 | if test "x$ac_cv_header_AppKit_AppKit_h" = x""yes; then : | |
9484 | HAVE_NS=yes | |
067d23c9 | 9485 | else |
5476a9a4 GM |
9486 | as_fn_error "\`--with-ns' was specified, but the include |
9487 | files are missing or cannot be compiled." "$LINENO" 5 | |
9488 | fi | |
f199cab1 | 9489 | |
f199cab1 | 9490 | |
5476a9a4 GM |
9491 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
9492 | /* end confdefs.h. */ | |
9493 | #include <Foundation/NSObjCRuntime.h> | |
067d23c9 KY |
9494 | int |
9495 | main () | |
9496 | { | |
5476a9a4 GM |
9497 | NSInteger i; |
9498 | ; | |
067d23c9 KY |
9499 | return 0; |
9500 | } | |
9501 | _ACEOF | |
5476a9a4 GM |
9502 | if ac_fn_c_try_compile "$LINENO"; then : |
9503 | ns_have_nsinteger=yes | |
067d23c9 | 9504 | else |
5476a9a4 | 9505 | ns_have_nsinteger=no |
067d23c9 | 9506 | fi |
5476a9a4 GM |
9507 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
9508 | if test $ns_have_nsinteger = yes; then | |
067d23c9 | 9509 | |
5476a9a4 | 9510 | $as_echo "#define NS_HAVE_NSINTEGER 1" >>confdefs.h |
067d23c9 | 9511 | |
067d23c9 | 9512 | fi |
5476a9a4 | 9513 | fi |
067d23c9 | 9514 | |
5476a9a4 GM |
9515 | |
9516 | INSTALL_ARCH_INDEP_EXTRA=install-etc | |
9517 | ns_self_contained=no | |
9518 | ns_frag=/dev/null | |
9519 | NS_OBJ= | |
9520 | NS_OBJC_OBJ= | |
9521 | if test "${HAVE_NS}" = yes; then | |
9522 | if test "$with_toolkit_scroll_bars" = "no"; then | |
9523 | as_fn_error "Non-toolkit scroll bars are not implemented for Nextstep." "$LINENO" 5 | |
9524 | fi | |
9525 | ||
9526 | window_system=nextstep | |
5476a9a4 GM |
9527 | # set up packaging dirs |
9528 | if test "${EN_NS_SELF_CONTAINED}" = yes; then | |
9529 | ns_self_contained=yes | |
9530 | prefix=${ns_appresdir} | |
9531 | exec_prefix=${ns_appbindir} | |
9532 | libexecdir="\${ns_appbindir}/libexec" | |
9533 | archlibdir="\${ns_appbindir}/libexec" | |
9534 | docdir="\${ns_appresdir}/etc" | |
9535 | etcdir="\${ns_appresdir}/etc" | |
9536 | infodir="\${ns_appresdir}/info" | |
9537 | mandir="\${ns_appresdir}/man" | |
9538 | lispdir="\${ns_appresdir}/lisp" | |
9539 | leimdir="\${ns_appresdir}/leim" | |
9540 | INSTALL_ARCH_INDEP_EXTRA= | |
9541 | fi | |
9542 | ns_frag=$srcdir/src/ns.mk | |
5476a9a4 GM |
9543 | NS_OBJC_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o" |
9544 | fi | |
9545 | CFLAGS="$tmp_CFLAGS" | |
9546 | CPPFLAGS="$tmp_CPPFLAGS" | |
9547 | ||
9548 | ||
9549 | ||
9550 | ||
9551 | ||
9552 | ||
9553 | ||
42dcba54 GM |
9554 | ## $window_system is now set to the window system we will |
9555 | ## ultimately use. | |
9556 | ||
9557 | term_header= | |
9558 | HAVE_X_WINDOWS=no | |
9559 | HAVE_X11=no | |
9560 | USE_X_TOOLKIT=none | |
9561 | ||
5476a9a4 GM |
9562 | case "${window_system}" in |
9563 | x11 ) | |
9564 | HAVE_X_WINDOWS=yes | |
9565 | HAVE_X11=yes | |
42dcba54 | 9566 | term_header=xterm.h |
5476a9a4 GM |
9567 | case "${with_x_toolkit}" in |
9568 | athena | lucid ) USE_X_TOOLKIT=LUCID ;; | |
9569 | motif ) USE_X_TOOLKIT=MOTIF ;; | |
9570 | gtk ) with_gtk=yes | |
42dcba54 | 9571 | term_header=gtkutil.h |
5476a9a4 GM |
9572 | USE_X_TOOLKIT=none ;; |
9573 | gtk3 ) with_gtk3=yes | |
42dcba54 | 9574 | term_header=gtkutil.h |
5476a9a4 GM |
9575 | USE_X_TOOLKIT=none ;; |
9576 | no ) USE_X_TOOLKIT=none ;; | |
9577 | * ) USE_X_TOOLKIT=maybe ;; | |
9578 | esac | |
9579 | ;; | |
42dcba54 GM |
9580 | nextstep ) |
9581 | term_header=nsterm.h | |
5476a9a4 GM |
9582 | ;; |
9583 | esac | |
9584 | ||
42dcba54 GM |
9585 | if test -n "${term_header}"; then |
9586 | ||
9587 | cat >>confdefs.h <<_ACEOF | |
9588 | #define TERM_HEADER "${term_header}" | |
9589 | _ACEOF | |
9590 | ||
9591 | fi | |
9592 | ||
5476a9a4 GM |
9593 | if test "$window_system" = none && test "X$with_x" != "Xno"; then |
9594 | # Extract the first word of "X", so it can be a program name with args. | |
9595 | set dummy X; ac_word=$2 | |
9596 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
9597 | $as_echo_n "checking for $ac_word... " >&6; } | |
9598 | if test "${ac_cv_prog_HAVE_XSERVER+set}" = set; then : | |
9599 | $as_echo_n "(cached) " >&6 | |
9600 | else | |
9601 | if test -n "$HAVE_XSERVER"; then | |
9602 | ac_cv_prog_HAVE_XSERVER="$HAVE_XSERVER" # Let the user override the test. | |
9603 | else | |
9604 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
9605 | for as_dir in $PATH | |
9606 | do | |
9607 | IFS=$as_save_IFS | |
9608 | test -z "$as_dir" && as_dir=. | |
9609 | for ac_exec_ext in '' $ac_executable_extensions; do | |
9610 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
9611 | ac_cv_prog_HAVE_XSERVER="true" | |
9612 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
9613 | break 2 | |
9614 | fi | |
9615 | done | |
9616 | done | |
9617 | IFS=$as_save_IFS | |
9618 | ||
9619 | test -z "$ac_cv_prog_HAVE_XSERVER" && ac_cv_prog_HAVE_XSERVER="false" | |
9620 | fi | |
9621 | fi | |
9622 | HAVE_XSERVER=$ac_cv_prog_HAVE_XSERVER | |
9623 | if test -n "$HAVE_XSERVER"; then | |
9624 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_XSERVER" >&5 | |
9625 | $as_echo "$HAVE_XSERVER" >&6; } | |
9626 | else | |
9627 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
9628 | $as_echo "no" >&6; } | |
9629 | fi | |
9630 | ||
9631 | ||
9632 | if test "$HAVE_XSERVER" = true || | |
9633 | test -n "$DISPLAY" || | |
9634 | test "`echo /usr/lib/libX11.*`" != "/usr/lib/libX11.*"; then | |
9635 | as_fn_error "You seem to be running X, but no X development libraries | |
9636 | were found. You should install the relevant development files for X | |
9637 | and for the toolkit you want, such as Gtk+, Lesstif or Motif. Also make | |
9638 | sure you have development files for image handling, i.e. | |
9639 | tiff, gif, jpeg, png and xpm. | |
9640 | If you are sure you want Emacs compiled without X window support, pass | |
9641 | --without-x | |
9642 | to configure." "$LINENO" 5 | |
9643 | fi | |
9644 | fi | |
9645 | ||
9646 | ### If we're using X11, we should use the X menu package. | |
9647 | HAVE_MENUS=no | |
9648 | case ${HAVE_X11} in | |
9649 | yes ) HAVE_MENUS=yes ;; | |
9650 | esac | |
9651 | ||
9652 | # Does the opsystem file prohibit the use of the GNU malloc? | |
9653 | # Assume not, until told otherwise. | |
9654 | GNU_MALLOC=yes | |
9655 | ||
9656 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc is Doug Lea style" >&5 | |
9657 | $as_echo_n "checking whether malloc is Doug Lea style... " >&6; } | |
9658 | if test "${emacs_cv_var_doug_lea_malloc+set}" = set; then : | |
067d23c9 KY |
9659 | $as_echo_n "(cached) " >&6 |
9660 | else | |
5476a9a4 GM |
9661 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
9662 | /* end confdefs.h. */ | |
9663 | #include <malloc.h> | |
9664 | static void hook (void) {} | |
9665 | int | |
9666 | main () | |
9667 | { | |
9668 | malloc_set_state (malloc_get_state ()); | |
9669 | __after_morecore_hook = hook; | |
9670 | __malloc_initialize_hook = hook; | |
9671 | ; | |
9672 | return 0; | |
9673 | } | |
9674 | _ACEOF | |
9675 | if ac_fn_c_try_link "$LINENO"; then : | |
9676 | emacs_cv_var_doug_lea_malloc=yes | |
9677 | else | |
9678 | emacs_cv_var_doug_lea_malloc=no | |
9679 | fi | |
9680 | rm -f core conftest.err conftest.$ac_objext \ | |
9681 | conftest$ac_exeext conftest.$ac_ext | |
9682 | fi | |
9683 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_var_doug_lea_malloc" >&5 | |
9684 | $as_echo "$emacs_cv_var_doug_lea_malloc" >&6; } | |
9685 | doug_lea_malloc=$emacs_cv_var_doug_lea_malloc | |
9686 | ||
9687 | ||
9688 | system_malloc=no | |
9689 | case "$opsys" in | |
9690 | ## darwin ld insists on the use of malloc routines in the System framework. | |
9691 | darwin|sol2-10) system_malloc=yes ;; | |
9692 | esac | |
9693 | ||
9694 | if test "${system_malloc}" = "yes"; then | |
9695 | ||
9696 | $as_echo "#define SYSTEM_MALLOC 1" >>confdefs.h | |
9697 | ||
9698 | GNU_MALLOC=no | |
9699 | GNU_MALLOC_reason=" | |
9700 | (The GNU allocators don't work with this system configuration.)" | |
9701 | GMALLOC_OBJ= | |
9702 | VMLIMIT_OBJ= | |
9703 | else | |
9704 | test "$doug_lea_malloc" != "yes" && GMALLOC_OBJ=gmalloc.o | |
9705 | VMLIMIT_OBJ=vm-limit.o | |
9706 | fi | |
9707 | ||
9708 | ||
9709 | ||
9710 | if test "$doug_lea_malloc" = "yes" ; then | |
9711 | if test "$GNU_MALLOC" = yes ; then | |
9712 | GNU_MALLOC_reason=" | |
9713 | (Using Doug Lea's new malloc from the GNU C Library.)" | |
9714 | fi | |
9715 | ||
9716 | $as_echo "#define DOUG_LEA_MALLOC 1" >>confdefs.h | |
9717 | ||
9718 | ||
9719 | ## Use mmap directly for allocating larger buffers. | |
9720 | ## FIXME this comes from src/s/{gnu,gnu-linux}.h: | |
9721 | ## #ifdef DOUG_LEA_MALLOC; #undef REL_ALLOC; #endif | |
9722 | ## Does the AC_FUNC_MMAP test below make this check unnecessary? | |
9723 | case "$opsys" in | |
9724 | gnu*) REL_ALLOC=no ;; | |
9725 | esac | |
9726 | fi | |
9727 | ||
9728 | if test x"${REL_ALLOC}" = x; then | |
9729 | REL_ALLOC=${GNU_MALLOC} | |
9730 | fi | |
9731 | ||
9732 | use_mmap_for_buffers=no | |
9733 | case "$opsys" in | |
9734 | cygwin|freebsd|irix6-5) use_mmap_for_buffers=yes ;; | |
9735 | esac | |
9736 | ||
9737 | ||
9738 | ||
9739 | ||
9740 | ||
9741 | ||
9742 | ||
9743 | ||
9744 | for ac_func in getpagesize | |
9745 | do : | |
9746 | ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" | |
9747 | if test "x$ac_cv_func_getpagesize" = x""yes; then : | |
9748 | cat >>confdefs.h <<_ACEOF | |
9749 | #define HAVE_GETPAGESIZE 1 | |
9750 | _ACEOF | |
9751 | ||
9752 | fi | |
9753 | done | |
9754 | ||
9755 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 | |
9756 | $as_echo_n "checking for working mmap... " >&6; } | |
9757 | if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then : | |
9758 | $as_echo_n "(cached) " >&6 | |
9759 | else | |
9760 | if test "$cross_compiling" = yes; then : | |
9761 | ac_cv_func_mmap_fixed_mapped=no | |
9762 | else | |
9763 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9764 | /* end confdefs.h. */ | |
9765 | $ac_includes_default | |
9766 | /* malloc might have been renamed as rpl_malloc. */ | |
9767 | #undef malloc | |
9768 | ||
9769 | /* Thanks to Mike Haertel and Jim Avera for this test. | |
9770 | Here is a matrix of mmap possibilities: | |
9771 | mmap private not fixed | |
9772 | mmap private fixed at somewhere currently unmapped | |
9773 | mmap private fixed at somewhere already mapped | |
9774 | mmap shared not fixed | |
9775 | mmap shared fixed at somewhere currently unmapped | |
9776 | mmap shared fixed at somewhere already mapped | |
9777 | For private mappings, we should verify that changes cannot be read() | |
9778 | back from the file, nor mmap's back from the file at a different | |
9779 | address. (There have been systems where private was not correctly | |
9780 | implemented like the infamous i386 svr4.0, and systems where the | |
9781 | VM page cache was not coherent with the file system buffer cache | |
9782 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
9783 | For shared mappings, we should conversely verify that changes get | |
9784 | propagated back to all the places they're supposed to be. | |
9785 | ||
9786 | Grep wants private fixed already mapped. | |
9787 | The main things grep needs to know about mmap are: | |
9788 | * does it exist and is it safe to write into the mmap'd area | |
9789 | * how to use it (BSD variants) */ | |
9790 | ||
9791 | #include <fcntl.h> | |
9792 | #include <sys/mman.h> | |
9793 | ||
9794 | #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H | |
9795 | char *malloc (); | |
9796 | #endif | |
9797 | ||
9798 | /* This mess was copied from the GNU getpagesize.h. */ | |
9799 | #ifndef HAVE_GETPAGESIZE | |
9800 | # ifdef _SC_PAGESIZE | |
9801 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
9802 | # else /* no _SC_PAGESIZE */ | |
9803 | # ifdef HAVE_SYS_PARAM_H | |
9804 | # include <sys/param.h> | |
9805 | # ifdef EXEC_PAGESIZE | |
9806 | # define getpagesize() EXEC_PAGESIZE | |
9807 | # else /* no EXEC_PAGESIZE */ | |
9808 | # ifdef NBPG | |
9809 | # define getpagesize() NBPG * CLSIZE | |
9810 | # ifndef CLSIZE | |
9811 | # define CLSIZE 1 | |
9812 | # endif /* no CLSIZE */ | |
9813 | # else /* no NBPG */ | |
9814 | # ifdef NBPC | |
9815 | # define getpagesize() NBPC | |
9816 | # else /* no NBPC */ | |
9817 | # ifdef PAGESIZE | |
9818 | # define getpagesize() PAGESIZE | |
9819 | # endif /* PAGESIZE */ | |
9820 | # endif /* no NBPC */ | |
9821 | # endif /* no NBPG */ | |
9822 | # endif /* no EXEC_PAGESIZE */ | |
9823 | # else /* no HAVE_SYS_PARAM_H */ | |
9824 | # define getpagesize() 8192 /* punt totally */ | |
9825 | # endif /* no HAVE_SYS_PARAM_H */ | |
9826 | # endif /* no _SC_PAGESIZE */ | |
9827 | ||
9828 | #endif /* no HAVE_GETPAGESIZE */ | |
9829 | ||
9830 | int | |
9831 | main () | |
9832 | { | |
9833 | char *data, *data2, *data3; | |
9834 | const char *cdata2; | |
9835 | int i, pagesize; | |
9836 | int fd, fd2; | |
9837 | ||
9838 | pagesize = getpagesize (); | |
9839 | ||
9840 | /* First, make a file with some known garbage in it. */ | |
9841 | data = (char *) malloc (pagesize); | |
9842 | if (!data) | |
9843 | return 1; | |
9844 | for (i = 0; i < pagesize; ++i) | |
9845 | *(data + i) = rand (); | |
9846 | umask (0); | |
9847 | fd = creat ("conftest.mmap", 0600); | |
9848 | if (fd < 0) | |
9849 | return 2; | |
9850 | if (write (fd, data, pagesize) != pagesize) | |
9851 | return 3; | |
9852 | close (fd); | |
9853 | ||
9854 | /* Next, check that the tail of a page is zero-filled. File must have | |
9855 | non-zero length, otherwise we risk SIGBUS for entire page. */ | |
9856 | fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600); | |
9857 | if (fd2 < 0) | |
9858 | return 4; | |
9859 | cdata2 = ""; | |
9860 | if (write (fd2, cdata2, 1) != 1) | |
9861 | return 5; | |
9862 | data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L); | |
9863 | if (data2 == MAP_FAILED) | |
9864 | return 6; | |
9865 | for (i = 0; i < pagesize; ++i) | |
9866 | if (*(data2 + i)) | |
9867 | return 7; | |
9868 | close (fd2); | |
9869 | if (munmap (data2, pagesize)) | |
9870 | return 8; | |
9871 | ||
9872 | /* Next, try to mmap the file at a fixed address which already has | |
9873 | something else allocated at it. If we can, also make sure that | |
9874 | we see the same garbage. */ | |
9875 | fd = open ("conftest.mmap", O_RDWR); | |
9876 | if (fd < 0) | |
9877 | return 9; | |
9878 | if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, | |
9879 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
9880 | return 10; | |
9881 | for (i = 0; i < pagesize; ++i) | |
9882 | if (*(data + i) != *(data2 + i)) | |
9883 | return 11; | |
9884 | ||
9885 | /* Finally, make sure that changes to the mapped area do not | |
9886 | percolate back to the file as seen by read(). (This is a bug on | |
9887 | some variants of i386 svr4.0.) */ | |
9888 | for (i = 0; i < pagesize; ++i) | |
9889 | *(data2 + i) = *(data2 + i) + 1; | |
9890 | data3 = (char *) malloc (pagesize); | |
9891 | if (!data3) | |
9892 | return 12; | |
9893 | if (read (fd, data3, pagesize) != pagesize) | |
9894 | return 13; | |
9895 | for (i = 0; i < pagesize; ++i) | |
9896 | if (*(data + i) != *(data3 + i)) | |
9897 | return 14; | |
9898 | close (fd); | |
9899 | return 0; | |
9900 | } | |
9901 | _ACEOF | |
9902 | if ac_fn_c_try_run "$LINENO"; then : | |
9903 | ac_cv_func_mmap_fixed_mapped=yes | |
9904 | else | |
9905 | ac_cv_func_mmap_fixed_mapped=no | |
9906 | fi | |
9907 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
9908 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
9909 | fi | |
9910 | ||
9911 | fi | |
9912 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5 | |
9913 | $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; } | |
9914 | if test $ac_cv_func_mmap_fixed_mapped = yes; then | |
9915 | ||
9916 | $as_echo "#define HAVE_MMAP 1" >>confdefs.h | |
9917 | ||
9918 | fi | |
9919 | rm -f conftest.mmap conftest.txt | |
9920 | ||
9921 | if test $use_mmap_for_buffers = yes; then | |
f199cab1 | 9922 | |
5476a9a4 GM |
9923 | $as_echo "#define USE_MMAP_FOR_BUFFERS 1" >>confdefs.h |
9924 | ||
9925 | REL_ALLOC=no | |
9926 | fi | |
9927 | ||
9928 | LIBS="$LIBS_SYSTEM $LIBS" | |
9929 | ||
9930 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5 | |
9931 | $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; } | |
9932 | if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then : | |
9933 | $as_echo_n "(cached) " >&6 | |
067d23c9 | 9934 | else |
5476a9a4 GM |
9935 | ac_check_lib_save_LIBS=$LIBS |
9936 | LIBS="-ldnet $LIBS" | |
9937 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
067d23c9 | 9938 | /* end confdefs.h. */ |
067d23c9 | 9939 | |
5476a9a4 GM |
9940 | /* Override any GCC internal prototype to avoid an error. |
9941 | Use char because int might match the return type of a GCC | |
9942 | builtin and then its argument prototype would still apply. */ | |
9943 | #ifdef __cplusplus | |
9944 | extern "C" | |
9945 | #endif | |
9946 | char dnet_ntoa (); | |
9947 | int | |
9948 | main () | |
f199cab1 | 9949 | { |
5476a9a4 GM |
9950 | return dnet_ntoa (); |
9951 | ; | |
9952 | return 0; | |
f199cab1 | 9953 | } |
5476a9a4 GM |
9954 | _ACEOF |
9955 | if ac_fn_c_try_link "$LINENO"; then : | |
9956 | ac_cv_lib_dnet_dnet_ntoa=yes | |
9957 | else | |
9958 | ac_cv_lib_dnet_dnet_ntoa=no | |
9959 | fi | |
9960 | rm -f core conftest.err conftest.$ac_objext \ | |
9961 | conftest$ac_exeext conftest.$ac_ext | |
9962 | LIBS=$ac_check_lib_save_LIBS | |
9963 | fi | |
9964 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 | |
9965 | $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; } | |
9966 | if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then : | |
9967 | cat >>confdefs.h <<_ACEOF | |
9968 | #define HAVE_LIBDNET 1 | |
9969 | _ACEOF | |
9970 | ||
9971 | LIBS="-ldnet $LIBS" | |
9972 | ||
9973 | fi | |
9974 | ||
9975 | ||
9976 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lXbsd" >&5 | |
9977 | $as_echo_n "checking for main in -lXbsd... " >&6; } | |
9978 | if test "${ac_cv_lib_Xbsd_main+set}" = set; then : | |
9979 | $as_echo_n "(cached) " >&6 | |
9980 | else | |
9981 | ac_check_lib_save_LIBS=$LIBS | |
9982 | LIBS="-lXbsd $LIBS" | |
9983 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9984 | /* end confdefs.h. */ | |
9985 | ||
9986 | ||
9987 | int | |
9988 | main () | |
f199cab1 | 9989 | { |
5476a9a4 GM |
9990 | return main (); |
9991 | ; | |
9992 | return 0; | |
f199cab1 | 9993 | } |
5476a9a4 GM |
9994 | _ACEOF |
9995 | if ac_fn_c_try_link "$LINENO"; then : | |
9996 | ac_cv_lib_Xbsd_main=yes | |
9997 | else | |
9998 | ac_cv_lib_Xbsd_main=no | |
9999 | fi | |
10000 | rm -f core conftest.err conftest.$ac_objext \ | |
10001 | conftest$ac_exeext conftest.$ac_ext | |
10002 | LIBS=$ac_check_lib_save_LIBS | |
10003 | fi | |
10004 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xbsd_main" >&5 | |
10005 | $as_echo "$ac_cv_lib_Xbsd_main" >&6; } | |
10006 | if test "x$ac_cv_lib_Xbsd_main" = x""yes; then : | |
10007 | LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd" | |
10008 | fi | |
10009 | ||
10010 | ||
10011 | LIB_PTHREAD= | |
10012 | ||
10013 | ||
10014 | ||
10015 | if test "$ac_cv_header_pthread_h"; then | |
10016 | if test "$GMALLOC_OBJ" = gmalloc.o; then | |
10017 | emacs_pthread_function=pthread_atfork | |
10018 | else | |
10019 | emacs_pthread_function=pthread_self | |
10020 | fi | |
10021 | as_ac_Lib=`$as_echo "ac_cv_lib_pthread_$emacs_pthread_function" | $as_tr_sh` | |
10022 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $emacs_pthread_function in -lpthread" >&5 | |
10023 | $as_echo_n "checking for $emacs_pthread_function in -lpthread... " >&6; } | |
10024 | if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : | |
10025 | $as_echo_n "(cached) " >&6 | |
10026 | else | |
10027 | ac_check_lib_save_LIBS=$LIBS | |
10028 | LIBS="-lpthread $LIBS" | |
10029 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10030 | /* end confdefs.h. */ | |
10031 | ||
10032 | /* Override any GCC internal prototype to avoid an error. | |
10033 | Use char because int might match the return type of a GCC | |
10034 | builtin and then its argument prototype would still apply. */ | |
10035 | #ifdef __cplusplus | |
10036 | extern "C" | |
10037 | #endif | |
10038 | char $emacs_pthread_function (); | |
10039 | int | |
10040 | main () | |
f199cab1 | 10041 | { |
5476a9a4 GM |
10042 | return $emacs_pthread_function (); |
10043 | ; | |
10044 | return 0; | |
f199cab1 | 10045 | } |
5476a9a4 GM |
10046 | _ACEOF |
10047 | if ac_fn_c_try_link "$LINENO"; then : | |
10048 | eval "$as_ac_Lib=yes" | |
10049 | else | |
10050 | eval "$as_ac_Lib=no" | |
10051 | fi | |
10052 | rm -f core conftest.err conftest.$ac_objext \ | |
10053 | conftest$ac_exeext conftest.$ac_ext | |
10054 | LIBS=$ac_check_lib_save_LIBS | |
10055 | fi | |
10056 | eval ac_res=\$$as_ac_Lib | |
10057 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
10058 | $as_echo "$ac_res" >&6; } | |
10059 | eval as_val=\$$as_ac_Lib | |
10060 | if test "x$as_val" = x""yes; then : | |
10061 | HAVE_PTHREAD=yes | |
10062 | fi | |
10063 | ||
10064 | fi | |
10065 | if test "$HAVE_PTHREAD" = yes; then | |
10066 | case "${canonical}" in | |
10067 | *-hpux*) ;; | |
10068 | *) LIB_PTHREAD="-lpthread" | |
10069 | LIBS="$LIB_PTHREAD $LIBS" ;; | |
10070 | esac | |
10071 | ||
10072 | $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h | |
10073 | ||
10074 | fi | |
10075 | ||
10076 | ||
10077 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cma_open in -lpthreads" >&5 | |
10078 | $as_echo_n "checking for cma_open in -lpthreads... " >&6; } | |
10079 | if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then : | |
10080 | $as_echo_n "(cached) " >&6 | |
10081 | else | |
10082 | ac_check_lib_save_LIBS=$LIBS | |
10083 | LIBS="-lpthreads $LIBS" | |
10084 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10085 | /* end confdefs.h. */ | |
10086 | ||
10087 | /* Override any GCC internal prototype to avoid an error. | |
10088 | Use char because int might match the return type of a GCC | |
10089 | builtin and then its argument prototype would still apply. */ | |
10090 | #ifdef __cplusplus | |
10091 | extern "C" | |
f199cab1 | 10092 | #endif |
5476a9a4 GM |
10093 | char cma_open (); |
10094 | int | |
10095 | main () | |
10096 | { | |
10097 | return cma_open (); | |
10098 | ; | |
10099 | return 0; | |
f199cab1 | 10100 | } |
5476a9a4 GM |
10101 | _ACEOF |
10102 | if ac_fn_c_try_link "$LINENO"; then : | |
10103 | ac_cv_lib_pthreads_cma_open=yes | |
10104 | else | |
10105 | ac_cv_lib_pthreads_cma_open=no | |
10106 | fi | |
10107 | rm -f core conftest.err conftest.$ac_objext \ | |
10108 | conftest$ac_exeext conftest.$ac_ext | |
10109 | LIBS=$ac_check_lib_save_LIBS | |
10110 | fi | |
10111 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_cma_open" >&5 | |
10112 | $as_echo "$ac_cv_lib_pthreads_cma_open" >&6; } | |
10113 | if test "x$ac_cv_lib_pthreads_cma_open" = x""yes; then : | |
10114 | cat >>confdefs.h <<_ACEOF | |
10115 | #define HAVE_LIBPTHREADS 1 | |
10116 | _ACEOF | |
10117 | ||
10118 | LIBS="-lpthreads $LIBS" | |
10119 | ||
10120 | fi | |
10121 | ||
10122 | ||
10123 | ## Note: when using cpp in s/aix4.2.h, this definition depended on | |
10124 | ## HAVE_LIBPTHREADS. That was not defined earlier in configure when | |
10125 | ## the system file was sourced. Hence the value of LIBS_SYSTEM | |
10126 | ## added to LIBS in configure would never contain the pthreads part, | |
10127 | ## but the value used in Makefiles might. FIXME? | |
10128 | ## | |
10129 | ## -lpthreads seems to be necessary for Xlib in X11R6, and should | |
10130 | ## be harmless on older versions of X where it happens to exist. | |
10131 | test "$opsys" = "aix4-2" && \ | |
10132 | test $ac_cv_lib_pthreads_cma_open = yes && \ | |
10133 | LIBS_SYSTEM="$LIBS_SYSTEM -lpthreads" | |
10134 | ||
10135 | ||
10136 | case ${host_os} in | |
10137 | aix*) | |
10138 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5 | |
10139 | $as_echo_n "checking for -bbigtoc option... " >&6; } | |
10140 | if test "${gdb_cv_bigtoc+set}" = set; then : | |
10141 | $as_echo_n "(cached) " >&6 | |
10142 | else | |
10143 | ||
10144 | case $GCC in | |
10145 | yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;; | |
10146 | *) gdb_cv_bigtoc=-bbigtoc ;; | |
10147 | esac | |
067d23c9 | 10148 | |
5476a9a4 GM |
10149 | LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc |
10150 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10151 | /* end confdefs.h. */ | |
067d23c9 KY |
10152 | |
10153 | int | |
10154 | main () | |
10155 | { | |
5476a9a4 GM |
10156 | int i; |
10157 | ; | |
10158 | return 0; | |
10159 | } | |
10160 | _ACEOF | |
10161 | if ac_fn_c_try_link "$LINENO"; then : | |
067d23c9 | 10162 | |
5476a9a4 GM |
10163 | else |
10164 | gdb_cv_bigtoc= | |
10165 | fi | |
10166 | rm -f core conftest.err conftest.$ac_objext \ | |
10167 | conftest$ac_exeext conftest.$ac_ext | |
067d23c9 | 10168 | |
5476a9a4 GM |
10169 | fi |
10170 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5 | |
10171 | $as_echo "$gdb_cv_bigtoc" >&6; } | |
10172 | ;; | |
10173 | esac | |
067d23c9 | 10174 | |
5476a9a4 GM |
10175 | # Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets |
10176 | # used for the tests that follow. We set them back to REAL_CFLAGS and | |
10177 | # REAL_CPPFLAGS later on. | |
067d23c9 | 10178 | |
5476a9a4 GM |
10179 | REAL_CFLAGS="$CFLAGS" |
10180 | REAL_CPPFLAGS="$CPPFLAGS" | |
10181 | ||
10182 | if test "${HAVE_X11}" = "yes"; then | |
10183 | DEFS="$C_SWITCH_X_SITE $DEFS" | |
10184 | LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE" | |
10185 | LIBS="-lX11 $LIBS" | |
10186 | CFLAGS="$C_SWITCH_X_SITE $CFLAGS" | |
10187 | CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS" | |
10188 | ||
10189 | # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests. | |
10190 | # This is handled by LD_SWITCH_X_SITE_RPATH during the real build, | |
10191 | # but it's more convenient here to set LD_RUN_PATH since this | |
10192 | # also works on hosts that don't understand LD_SWITCH_X_SITE_RPATH. | |
10193 | if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then | |
10194 | LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH | |
10195 | export LD_RUN_PATH | |
10196 | fi | |
10197 | ||
10198 | if test "${opsys}" = "gnu-linux"; then | |
10199 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether X on GNU/Linux needs -b to link" >&5 | |
10200 | $as_echo_n "checking whether X on GNU/Linux needs -b to link... " >&6; } | |
10201 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10202 | /* end confdefs.h. */ | |
067d23c9 | 10203 | |
5476a9a4 GM |
10204 | int |
10205 | main () | |
10206 | { | |
10207 | XOpenDisplay ("foo"); | |
f199cab1 | 10208 | ; |
067d23c9 KY |
10209 | return 0; |
10210 | } | |
10211 | _ACEOF | |
5476a9a4 GM |
10212 | if ac_fn_c_try_link "$LINENO"; then : |
10213 | xgnu_linux_first_failure=no | |
067d23c9 | 10214 | else |
5476a9a4 | 10215 | xgnu_linux_first_failure=yes |
067d23c9 | 10216 | fi |
5476a9a4 GM |
10217 | rm -f core conftest.err conftest.$ac_objext \ |
10218 | conftest$ac_exeext conftest.$ac_ext | |
10219 | if test "${xgnu_linux_first_failure}" = "yes"; then | |
10220 | OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE" | |
10221 | OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE" | |
10222 | OLD_CPPFLAGS="$CPPFLAGS" | |
10223 | OLD_LIBS="$LIBS" | |
10224 | LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout" | |
10225 | C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout" | |
10226 | CPPFLAGS="$CPPFLAGS -b i486-linuxaout" | |
10227 | LIBS="$LIBS -b i486-linuxaout" | |
10228 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10229 | /* end confdefs.h. */ | |
067d23c9 | 10230 | |
5476a9a4 GM |
10231 | int |
10232 | main () | |
10233 | { | |
10234 | XOpenDisplay ("foo"); | |
10235 | ; | |
10236 | return 0; | |
10237 | } | |
10238 | _ACEOF | |
10239 | if ac_fn_c_try_link "$LINENO"; then : | |
10240 | xgnu_linux_second_failure=no | |
10241 | else | |
10242 | xgnu_linux_second_failure=yes | |
067d23c9 | 10243 | fi |
5476a9a4 GM |
10244 | rm -f core conftest.err conftest.$ac_objext \ |
10245 | conftest$ac_exeext conftest.$ac_ext | |
10246 | if test "${xgnu_linux_second_failure}" = "yes"; then | |
10247 | # If we get the same failure with -b, there is no use adding -b. | |
10248 | # So take it out. This plays safe. | |
10249 | LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE" | |
10250 | C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE" | |
10251 | CPPFLAGS="$OLD_CPPFLAGS" | |
10252 | LIBS="$OLD_LIBS" | |
10253 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
10254 | $as_echo "no" >&6; } | |
10255 | else | |
10256 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
10257 | $as_echo "yes" >&6; } | |
10258 | fi | |
0eb4e0df | 10259 | else |
5476a9a4 GM |
10260 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
10261 | $as_echo "no" >&6; } | |
10262 | fi | |
10263 | fi | |
0eb4e0df | 10264 | |
5476a9a4 GM |
10265 | # Reportedly, some broken Solaris systems have XKBlib.h but are missing |
10266 | # header files included from there. | |
10267 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Xkb" >&5 | |
10268 | $as_echo_n "checking for Xkb... " >&6; } | |
0eb4e0df GM |
10269 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
10270 | /* end confdefs.h. */ | |
5476a9a4 GM |
10271 | #include <X11/Xlib.h> |
10272 | #include <X11/XKBlib.h> | |
0eb4e0df GM |
10273 | int |
10274 | main () | |
10275 | { | |
5476a9a4 | 10276 | XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd); |
0eb4e0df GM |
10277 | ; |
10278 | return 0; | |
10279 | } | |
10280 | _ACEOF | |
5476a9a4 GM |
10281 | if ac_fn_c_try_link "$LINENO"; then : |
10282 | emacs_xkb=yes | |
0eb4e0df | 10283 | else |
5476a9a4 | 10284 | emacs_xkb=no |
0eb4e0df | 10285 | fi |
5476a9a4 GM |
10286 | rm -f core conftest.err conftest.$ac_objext \ |
10287 | conftest$ac_exeext conftest.$ac_ext | |
10288 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_xkb" >&5 | |
10289 | $as_echo "$emacs_xkb" >&6; } | |
10290 | if test $emacs_xkb = yes; then | |
1abfdc54 | 10291 | |
5476a9a4 | 10292 | $as_echo "#define HAVE_XKBGETKEYBOARD 1" >>confdefs.h |
1abfdc54 | 10293 | |
e1fefc61 | 10294 | fi |
1abfdc54 | 10295 | |
5476a9a4 GM |
10296 | for ac_func in XrmSetDatabase XScreenResourceString \ |
10297 | XScreenNumberOfScreen | |
10298 | do : | |
10299 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
10300 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
10301 | eval as_val=\$$as_ac_var | |
10302 | if test "x$as_val" = x""yes; then : | |
10303 | cat >>confdefs.h <<_ACEOF | |
10304 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
f199cab1 | 10305 | _ACEOF |
1abfdc54 | 10306 | |
5476a9a4 GM |
10307 | fi |
10308 | done | |
1abfdc54 | 10309 | |
5476a9a4 | 10310 | fi |
1abfdc54 | 10311 | |
5476a9a4 GM |
10312 | if test "${window_system}" = "x11"; then |
10313 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 version 6" >&5 | |
10314 | $as_echo_n "checking X11 version 6... " >&6; } | |
10315 | if test "${emacs_cv_x11_version_6+set}" = set; then : | |
067d23c9 KY |
10316 | $as_echo_n "(cached) " >&6 |
10317 | else | |
5476a9a4 | 10318 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
067d23c9 | 10319 | /* end confdefs.h. */ |
5476a9a4 | 10320 | #include <X11/Xlib.h> |
067d23c9 KY |
10321 | int |
10322 | main () | |
10323 | { | |
5476a9a4 GM |
10324 | #if XlibSpecificationRelease < 6 |
10325 | fail; | |
10326 | #endif | |
10327 | ||
067d23c9 KY |
10328 | ; |
10329 | return 0; | |
10330 | } | |
10331 | _ACEOF | |
5476a9a4 GM |
10332 | if ac_fn_c_try_link "$LINENO"; then : |
10333 | emacs_cv_x11_version_6=yes | |
10334 | else | |
10335 | emacs_cv_x11_version_6=no | |
10336 | fi | |
10337 | rm -f core conftest.err conftest.$ac_objext \ | |
10338 | conftest$ac_exeext conftest.$ac_ext | |
067d23c9 | 10339 | fi |
f199cab1 | 10340 | |
5476a9a4 GM |
10341 | if test $emacs_cv_x11_version_6 = yes; then |
10342 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5 | |
10343 | $as_echo "6 or newer" >&6; } | |
f199cab1 | 10344 | |
5476a9a4 | 10345 | $as_echo "#define HAVE_X11R6 1" >>confdefs.h |
f199cab1 GM |
10346 | |
10347 | ||
5476a9a4 | 10348 | $as_echo "#define HAVE_X_I18N 1" >>confdefs.h |
f199cab1 | 10349 | |
5476a9a4 GM |
10350 | ## inoue@ainet.or.jp says Solaris has a bug related to X11R6-style |
10351 | ## XIM support. | |
10352 | case "$opsys" in | |
10353 | sol2-*) : ;; | |
10354 | *) | |
10355 | $as_echo "#define HAVE_X11R6_XIM 1" >>confdefs.h | |
f199cab1 | 10356 | |
5476a9a4 GM |
10357 | ;; |
10358 | esac | |
10359 | else | |
10360 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5 | |
10361 | $as_echo "before 6" >&6; } | |
10362 | fi | |
10363 | fi | |
f199cab1 | 10364 | |
067d23c9 | 10365 | |
5476a9a4 GM |
10366 | ### Use -lrsvg-2 if available, unless `--with-rsvg=no' is specified. |
10367 | HAVE_RSVG=no | |
10368 | if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes"; then | |
10369 | if test "${with_rsvg}" != "no"; then | |
10370 | RSVG_REQUIRED=2.11.0 | |
10371 | RSVG_MODULE="librsvg-2.0 >= $RSVG_REQUIRED" | |
067d23c9 | 10372 | |
f199cab1 | 10373 | |
5476a9a4 | 10374 | succeeded=no |
067d23c9 | 10375 | |
5476a9a4 GM |
10376 | if test "$PKG_CONFIG" = "no" ; then |
10377 | : | |
10378 | else | |
10379 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
10380 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
10381 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $RSVG_MODULE" >&5 | |
10382 | $as_echo_n "checking for $RSVG_MODULE... " >&6; } | |
f199cab1 | 10383 | |
5476a9a4 GM |
10384 | if $PKG_CONFIG --exists "$RSVG_MODULE" 2>&5 && |
10385 | RSVG_CFLAGS=`$PKG_CONFIG --cflags "$RSVG_MODULE" 2>&5` && | |
10386 | RSVG_LIBS=`$PKG_CONFIG --libs "$RSVG_MODULE" 2>&5`; then | |
10387 | edit_cflags=" | |
10388 | s,///*,/,g | |
10389 | s/^/ / | |
10390 | s/ -I/ $isystem/g | |
10391 | s/^ // | |
10392 | " | |
10393 | RSVG_CFLAGS=`$as_echo "$RSVG_CFLAGS" | sed -e "$edit_cflags"` | |
10394 | RSVG_LIBS=`$as_echo "$RSVG_LIBS" | sed -e 's,///*,/,g'` | |
10395 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$RSVG_CFLAGS' LIBS='$RSVG_LIBS'" >&5 | |
10396 | $as_echo "yes CFLAGS='$RSVG_CFLAGS' LIBS='$RSVG_LIBS'" >&6; } | |
10397 | succeeded=yes | |
10398 | else | |
10399 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
10400 | $as_echo "no" >&6; } | |
10401 | RSVG_CFLAGS="" | |
10402 | RSVG_LIBS="" | |
10403 | ## If we have a custom action on failure, don't print errors, but | |
10404 | ## do set a variable so people can do so. | |
10405 | RSVG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$RSVG_MODULE"` | |
f199cab1 | 10406 | |
5476a9a4 | 10407 | fi |
067d23c9 | 10408 | |
067d23c9 | 10409 | |
067d23c9 | 10410 | |
f199cab1 | 10411 | else |
5476a9a4 GM |
10412 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." |
10413 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
f199cab1 | 10414 | fi |
5476a9a4 GM |
10415 | fi |
10416 | ||
10417 | if test $succeeded = yes; then | |
10418 | HAVE_RSVG=yes | |
10419 | else | |
10420 | : | |
10421 | fi | |
067d23c9 | 10422 | |
067d23c9 | 10423 | |
067d23c9 | 10424 | |
f199cab1 | 10425 | |
5476a9a4 | 10426 | if test $HAVE_RSVG = yes; then |
f199cab1 | 10427 | |
5476a9a4 GM |
10428 | $as_echo "#define HAVE_RSVG 1" >>confdefs.h |
10429 | ||
10430 | CFLAGS="$CFLAGS $RSVG_CFLAGS" | |
10431 | LIBS="$RSVG_LIBS $LIBS" | |
10432 | fi | |
f199cab1 | 10433 | fi |
5476a9a4 | 10434 | fi |
f199cab1 | 10435 | |
5476a9a4 GM |
10436 | HAVE_IMAGEMAGICK=no |
10437 | if test "${HAVE_X11}" = "yes"; then | |
10438 | if test "${with_imagemagick}" != "no"; then | |
10439 | ## 6.2.8 is the earliest version known to work, but earlier versions | |
10440 | ## might work - let us know if you find one. | |
10441 | ## 6.0.7 does not work. See bug#7955. | |
10442 | IMAGEMAGICK_MODULE="Wand >= 6.2.8" | |
f199cab1 | 10443 | |
5476a9a4 | 10444 | succeeded=no |
f199cab1 | 10445 | |
5476a9a4 GM |
10446 | if test "$PKG_CONFIG" = "no" ; then |
10447 | : | |
10448 | else | |
10449 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
10450 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
10451 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $IMAGEMAGICK_MODULE" >&5 | |
10452 | $as_echo_n "checking for $IMAGEMAGICK_MODULE... " >&6; } | |
f199cab1 | 10453 | |
5476a9a4 GM |
10454 | if $PKG_CONFIG --exists "$IMAGEMAGICK_MODULE" 2>&5 && |
10455 | IMAGEMAGICK_CFLAGS=`$PKG_CONFIG --cflags "$IMAGEMAGICK_MODULE" 2>&5` && | |
10456 | IMAGEMAGICK_LIBS=`$PKG_CONFIG --libs "$IMAGEMAGICK_MODULE" 2>&5`; then | |
10457 | edit_cflags=" | |
10458 | s,///*,/,g | |
10459 | s/^/ / | |
10460 | s/ -I/ $isystem/g | |
10461 | s/^ // | |
10462 | " | |
10463 | IMAGEMAGICK_CFLAGS=`$as_echo "$IMAGEMAGICK_CFLAGS" | sed -e "$edit_cflags"` | |
10464 | IMAGEMAGICK_LIBS=`$as_echo "$IMAGEMAGICK_LIBS" | sed -e 's,///*,/,g'` | |
10465 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$IMAGEMAGICK_CFLAGS' LIBS='$IMAGEMAGICK_LIBS'" >&5 | |
10466 | $as_echo "yes CFLAGS='$IMAGEMAGICK_CFLAGS' LIBS='$IMAGEMAGICK_LIBS'" >&6; } | |
10467 | succeeded=yes | |
10468 | else | |
10469 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
10470 | $as_echo "no" >&6; } | |
10471 | IMAGEMAGICK_CFLAGS="" | |
10472 | IMAGEMAGICK_LIBS="" | |
10473 | ## If we have a custom action on failure, don't print errors, but | |
10474 | ## do set a variable so people can do so. | |
10475 | IMAGEMAGICK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$IMAGEMAGICK_MODULE"` | |
f199cab1 | 10476 | |
5476a9a4 | 10477 | fi |
f199cab1 | 10478 | |
f199cab1 | 10479 | |
f199cab1 | 10480 | |
5476a9a4 GM |
10481 | else |
10482 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
10483 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
10484 | fi | |
f199cab1 | 10485 | fi |
5476a9a4 GM |
10486 | |
10487 | if test $succeeded = yes; then | |
10488 | HAVE_IMAGEMAGICK=yes | |
f199cab1 | 10489 | else |
5476a9a4 | 10490 | : |
067d23c9 KY |
10491 | fi |
10492 | ||
f199cab1 | 10493 | |
067d23c9 | 10494 | |
f199cab1 | 10495 | |
5476a9a4 | 10496 | if test $HAVE_IMAGEMAGICK = yes; then |
067d23c9 | 10497 | |
5476a9a4 | 10498 | $as_echo "#define HAVE_IMAGEMAGICK 1" >>confdefs.h |
f199cab1 | 10499 | |
5476a9a4 GM |
10500 | CFLAGS="$CFLAGS $IMAGEMAGICK_CFLAGS" |
10501 | LIBS="$IMAGEMAGICK_LIBS $LIBS" | |
10502 | for ac_func in MagickExportImagePixels MagickMergeImageLayers | |
10503 | do : | |
10504 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
10505 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
10506 | eval as_val=\$$as_ac_var | |
10507 | if test "x$as_val" = x""yes; then : | |
10508 | cat >>confdefs.h <<_ACEOF | |
10509 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
067d23c9 | 10510 | _ACEOF |
f199cab1 GM |
10511 | |
10512 | fi | |
5476a9a4 GM |
10513 | done |
10514 | ||
067d23c9 KY |
10515 | fi |
10516 | fi | |
5476a9a4 | 10517 | fi |
067d23c9 | 10518 | |
f199cab1 | 10519 | |
5476a9a4 GM |
10520 | HAVE_GTK=no |
10521 | GTK_OBJ= | |
10522 | if test "${with_gtk3}" = "yes"; then | |
10523 | GLIB_REQUIRED=2.28 | |
10524 | GTK_REQUIRED=3.0 | |
10525 | GTK_MODULES="gtk+-3.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED" | |
f199cab1 GM |
10526 | |
10527 | ||
5476a9a4 | 10528 | succeeded=no |
f199cab1 | 10529 | |
5476a9a4 GM |
10530 | if test "$PKG_CONFIG" = "no" ; then |
10531 | pkg_check_gtk=no | |
10532 | else | |
10533 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
10534 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
10535 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTK_MODULES" >&5 | |
10536 | $as_echo_n "checking for $GTK_MODULES... " >&6; } | |
f199cab1 | 10537 | |
5476a9a4 GM |
10538 | if $PKG_CONFIG --exists "$GTK_MODULES" 2>&5 && |
10539 | GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES" 2>&5` && | |
10540 | GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES" 2>&5`; then | |
10541 | edit_cflags=" | |
10542 | s,///*,/,g | |
10543 | s/^/ / | |
10544 | s/ -I/ $isystem/g | |
10545 | s/^ // | |
10546 | " | |
10547 | GTK_CFLAGS=`$as_echo "$GTK_CFLAGS" | sed -e "$edit_cflags"` | |
10548 | GTK_LIBS=`$as_echo "$GTK_LIBS" | sed -e 's,///*,/,g'` | |
10549 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&5 | |
10550 | $as_echo "yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&6; } | |
10551 | succeeded=yes | |
10552 | else | |
10553 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
10554 | $as_echo "no" >&6; } | |
10555 | GTK_CFLAGS="" | |
10556 | GTK_LIBS="" | |
10557 | ## If we have a custom action on failure, don't print errors, but | |
10558 | ## do set a variable so people can do so. | |
10559 | GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"` | |
f199cab1 | 10560 | |
5476a9a4 | 10561 | fi |
f199cab1 | 10562 | |
f199cab1 | 10563 | |
f199cab1 | 10564 | |
5476a9a4 GM |
10565 | else |
10566 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
10567 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
f199cab1 | 10568 | fi |
5476a9a4 | 10569 | fi |
067d23c9 | 10570 | |
5476a9a4 GM |
10571 | if test $succeeded = yes; then |
10572 | pkg_check_gtk=yes | |
10573 | else | |
10574 | pkg_check_gtk=no | |
10575 | fi | |
067d23c9 | 10576 | |
5476a9a4 GM |
10577 | if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then |
10578 | as_fn_error "$GTK_PKG_ERRORS" "$LINENO" 5 | |
067d23c9 KY |
10579 | fi |
10580 | ||
5476a9a4 | 10581 | $as_echo "#define HAVE_GTK3 1" >>confdefs.h |
067d23c9 | 10582 | |
5476a9a4 | 10583 | GTK_OBJ=emacsgtkfixed.o |
42dcba54 | 10584 | term_header=gtkutil.h |
5476a9a4 | 10585 | fi |
067d23c9 | 10586 | |
5476a9a4 GM |
10587 | if test "$pkg_check_gtk" != "yes"; then |
10588 | HAVE_GTK=no | |
10589 | if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "maybe"; then | |
10590 | GLIB_REQUIRED=2.10 | |
10591 | GTK_REQUIRED=2.10 | |
10592 | GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED" | |
f199cab1 | 10593 | |
5476a9a4 GM |
10594 | |
10595 | succeeded=no | |
10596 | ||
10597 | if test "$PKG_CONFIG" = "no" ; then | |
10598 | pkg_check_gtk=no | |
10599 | else | |
10600 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
10601 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
10602 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTK_MODULES" >&5 | |
10603 | $as_echo_n "checking for $GTK_MODULES... " >&6; } | |
10604 | ||
10605 | if $PKG_CONFIG --exists "$GTK_MODULES" 2>&5 && | |
10606 | GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES" 2>&5` && | |
10607 | GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES" 2>&5`; then | |
10608 | edit_cflags=" | |
10609 | s,///*,/,g | |
10610 | s/^/ / | |
10611 | s/ -I/ $isystem/g | |
10612 | s/^ // | |
10613 | " | |
10614 | GTK_CFLAGS=`$as_echo "$GTK_CFLAGS" | sed -e "$edit_cflags"` | |
10615 | GTK_LIBS=`$as_echo "$GTK_LIBS" | sed -e 's,///*,/,g'` | |
10616 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&5 | |
10617 | $as_echo "yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&6; } | |
10618 | succeeded=yes | |
10619 | else | |
10620 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
10621 | $as_echo "no" >&6; } | |
10622 | GTK_CFLAGS="" | |
10623 | GTK_LIBS="" | |
10624 | ## If we have a custom action on failure, don't print errors, but | |
10625 | ## do set a variable so people can do so. | |
10626 | GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"` | |
10627 | ||
10628 | fi | |
10629 | ||
10630 | ||
10631 | ||
10632 | else | |
10633 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
10634 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
10635 | fi | |
10636 | fi | |
10637 | ||
10638 | if test $succeeded = yes; then | |
10639 | pkg_check_gtk=yes | |
10640 | else | |
10641 | pkg_check_gtk=no | |
10642 | fi | |
10643 | ||
10644 | if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then | |
10645 | as_fn_error "$GTK_PKG_ERRORS" "$LINENO" 5 | |
10646 | fi | |
067d23c9 | 10647 | fi |
067d23c9 KY |
10648 | fi |
10649 | ||
5476a9a4 GM |
10650 | if test x"$pkg_check_gtk" = xyes; then |
10651 | ||
10652 | ||
10653 | ||
10654 | C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS" | |
10655 | CFLAGS="$CFLAGS $GTK_CFLAGS" | |
10656 | LIBS="$GTK_LIBS $LIBS" | |
10657 | GTK_COMPILES=no | |
10658 | for ac_func in gtk_main | |
10659 | do : | |
10660 | ac_fn_c_check_func "$LINENO" "gtk_main" "ac_cv_func_gtk_main" | |
10661 | if test "x$ac_cv_func_gtk_main" = x""yes; then : | |
10662 | cat >>confdefs.h <<_ACEOF | |
10663 | #define HAVE_GTK_MAIN 1 | |
10664 | _ACEOF | |
10665 | GTK_COMPILES=yes | |
f199cab1 | 10666 | fi |
5476a9a4 | 10667 | done |
067d23c9 | 10668 | |
5476a9a4 GM |
10669 | if test "${GTK_COMPILES}" != "yes"; then |
10670 | if test "$USE_X_TOOLKIT" != "maybe"; then | |
10671 | as_fn_error "Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" "$LINENO" 5; | |
10672 | fi | |
10673 | else | |
10674 | HAVE_GTK=yes | |
10675 | ||
10676 | $as_echo "#define USE_GTK 1" >>confdefs.h | |
067d23c9 | 10677 | |
5476a9a4 GM |
10678 | GTK_OBJ="gtkutil.o $GTK_OBJ" |
10679 | USE_X_TOOLKIT=none | |
10680 | if $PKG_CONFIG --atleast-version=2.10 gtk+-2.0; then | |
10681 | : | |
10682 | else | |
10683 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your version of Gtk+ will have problems with | |
10684 | closing open displays. This is no problem if you just use | |
10685 | one display, but if you use more than one and close one of them | |
10686 | Emacs may crash." >&5 | |
10687 | $as_echo "$as_me: WARNING: Your version of Gtk+ will have problems with | |
10688 | closing open displays. This is no problem if you just use | |
10689 | one display, but if you use more than one and close one of them | |
10690 | Emacs may crash." >&2;} | |
10691 | sleep 3 | |
10692 | fi | |
067d23c9 KY |
10693 | fi |
10694 | ||
5476a9a4 | 10695 | fi |
067d23c9 KY |
10696 | |
10697 | ||
10698 | ||
5476a9a4 | 10699 | if test "${HAVE_GTK}" = "yes"; then |
067d23c9 | 10700 | |
5476a9a4 GM |
10701 | if test "$with_toolkit_scroll_bars" != no; then |
10702 | with_toolkit_scroll_bars=yes | |
10703 | fi | |
067d23c9 | 10704 | |
5476a9a4 GM |
10705 | HAVE_GTK_FILE_SELECTION=no |
10706 | ac_fn_c_check_decl "$LINENO" "GTK_TYPE_FILE_SELECTION" "ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" "$ac_includes_default | |
10707 | #include <gtk/gtk.h> | |
10708 | " | |
10709 | if test "x$ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" = x""yes; then : | |
10710 | HAVE_GTK_FILE_SELECTION=yes | |
10711 | else | |
10712 | HAVE_GTK_FILE_SELECTION=no | |
10713 | fi | |
067d23c9 | 10714 | |
5476a9a4 GM |
10715 | if test "$HAVE_GTK_FILE_SELECTION" = yes; then |
10716 | for ac_func in gtk_file_selection_new | |
10717 | do : | |
10718 | ac_fn_c_check_func "$LINENO" "gtk_file_selection_new" "ac_cv_func_gtk_file_selection_new" | |
10719 | if test "x$ac_cv_func_gtk_file_selection_new" = x""yes; then : | |
10720 | cat >>confdefs.h <<_ACEOF | |
10721 | #define HAVE_GTK_FILE_SELECTION_NEW 1 | |
f199cab1 | 10722 | _ACEOF |
067d23c9 | 10723 | |
f199cab1 | 10724 | fi |
5476a9a4 GM |
10725 | done |
10726 | ||
f199cab1 | 10727 | fi |
067d23c9 | 10728 | |
067d23c9 | 10729 | |
5476a9a4 GM |
10730 | for ac_func in gtk_widget_get_window gtk_widget_set_has_window \ |
10731 | gtk_dialog_get_action_area gtk_widget_get_sensitive \ | |
10732 | gtk_widget_get_mapped gtk_adjustment_get_page_size \ | |
10733 | gtk_orientable_set_orientation \ | |
10734 | gtk_window_set_has_resize_grip | |
10735 | do : | |
10736 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
10737 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
10738 | eval as_val=\$$as_ac_var | |
10739 | if test "x$as_val" = x""yes; then : | |
10740 | cat >>confdefs.h <<_ACEOF | |
10741 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
10742 | _ACEOF | |
067d23c9 | 10743 | |
5476a9a4 GM |
10744 | fi |
10745 | done | |
067d23c9 | 10746 | |
42dcba54 GM |
10747 | |
10748 | term_header=gtkutil.h | |
5476a9a4 | 10749 | fi |
067d23c9 | 10750 | |
5476a9a4 GM |
10751 | HAVE_DBUS=no |
10752 | DBUS_OBJ= | |
10753 | if test "${with_dbus}" = "yes"; then | |
067d23c9 | 10754 | |
5476a9a4 | 10755 | succeeded=no |
067d23c9 | 10756 | |
5476a9a4 GM |
10757 | if test "$PKG_CONFIG" = "no" ; then |
10758 | HAVE_DBUS=no | |
f199cab1 | 10759 | else |
5476a9a4 GM |
10760 | PKG_CONFIG_MIN_VERSION=0.9.0 |
10761 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
10762 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbus-1 >= 1.0" >&5 | |
10763 | $as_echo_n "checking for dbus-1 >= 1.0... " >&6; } | |
067d23c9 | 10764 | |
5476a9a4 GM |
10765 | if $PKG_CONFIG --exists "dbus-1 >= 1.0" 2>&5 && |
10766 | DBUS_CFLAGS=`$PKG_CONFIG --cflags "dbus-1 >= 1.0" 2>&5` && | |
10767 | DBUS_LIBS=`$PKG_CONFIG --libs "dbus-1 >= 1.0" 2>&5`; then | |
10768 | edit_cflags=" | |
10769 | s,///*,/,g | |
10770 | s/^/ / | |
10771 | s/ -I/ $isystem/g | |
10772 | s/^ // | |
10773 | " | |
10774 | DBUS_CFLAGS=`$as_echo "$DBUS_CFLAGS" | sed -e "$edit_cflags"` | |
10775 | DBUS_LIBS=`$as_echo "$DBUS_LIBS" | sed -e 's,///*,/,g'` | |
10776 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$DBUS_CFLAGS' LIBS='$DBUS_LIBS'" >&5 | |
10777 | $as_echo "yes CFLAGS='$DBUS_CFLAGS' LIBS='$DBUS_LIBS'" >&6; } | |
10778 | succeeded=yes | |
10779 | else | |
10780 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
10781 | $as_echo "no" >&6; } | |
10782 | DBUS_CFLAGS="" | |
10783 | DBUS_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 | DBUS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "dbus-1 >= 1.0"` | |
067d23c9 | 10787 | |
5476a9a4 | 10788 | fi |
067d23c9 | 10789 | |
15f79fcd | 10790 | |
067d23c9 | 10791 | |
5476a9a4 GM |
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 | |
067d23c9 | 10796 | fi |
067d23c9 | 10797 | |
5476a9a4 GM |
10798 | if test $succeeded = yes; then |
10799 | HAVE_DBUS=yes | |
f199cab1 | 10800 | else |
5476a9a4 | 10801 | HAVE_DBUS=no |
f199cab1 | 10802 | fi |
067d23c9 | 10803 | |
5476a9a4 GM |
10804 | if test "$HAVE_DBUS" = yes; then |
10805 | LIBS="$LIBS $DBUS_LIBS" | |
067d23c9 | 10806 | |
5476a9a4 | 10807 | $as_echo "#define HAVE_DBUS 1" >>confdefs.h |
067d23c9 | 10808 | |
5476a9a4 GM |
10809 | for ac_func in dbus_watch_get_unix_fd \ |
10810 | dbus_type_is_valid \ | |
10811 | dbus_validate_bus_name \ | |
10812 | dbus_validate_path \ | |
10813 | dbus_validate_interface \ | |
10814 | dbus_validate_member | |
10815 | do : | |
10816 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
10817 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
10818 | eval as_val=\$$as_ac_var | |
10819 | if test "x$as_val" = x""yes; then : | |
10820 | cat >>confdefs.h <<_ACEOF | |
10821 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
10822 | _ACEOF | |
067d23c9 | 10823 | |
5476a9a4 GM |
10824 | fi |
10825 | done | |
067d23c9 | 10826 | |
5476a9a4 GM |
10827 | DBUS_OBJ=dbusbind.o |
10828 | fi | |
10829 | fi | |
067d23c9 KY |
10830 | |
10831 | ||
5476a9a4 GM |
10832 | HAVE_GSETTINGS=no |
10833 | if test "${HAVE_X11}" = "yes" && test "${with_gsettings}" = "yes"; then | |
067d23c9 | 10834 | |
5476a9a4 | 10835 | succeeded=no |
067d23c9 | 10836 | |
5476a9a4 GM |
10837 | if test "$PKG_CONFIG" = "no" ; then |
10838 | HAVE_GSETTINGS=no | |
10839 | else | |
10840 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
10841 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
10842 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gio-2.0 >= 2.26" >&5 | |
10843 | $as_echo_n "checking for gio-2.0 >= 2.26... " >&6; } | |
0afb4571 | 10844 | |
5476a9a4 GM |
10845 | if $PKG_CONFIG --exists "gio-2.0 >= 2.26" 2>&5 && |
10846 | GSETTINGS_CFLAGS=`$PKG_CONFIG --cflags "gio-2.0 >= 2.26" 2>&5` && | |
10847 | GSETTINGS_LIBS=`$PKG_CONFIG --libs "gio-2.0 >= 2.26" 2>&5`; then | |
10848 | edit_cflags=" | |
10849 | s,///*,/,g | |
10850 | s/^/ / | |
10851 | s/ -I/ $isystem/g | |
10852 | s/^ // | |
10853 | " | |
10854 | GSETTINGS_CFLAGS=`$as_echo "$GSETTINGS_CFLAGS" | sed -e "$edit_cflags"` | |
10855 | GSETTINGS_LIBS=`$as_echo "$GSETTINGS_LIBS" | sed -e 's,///*,/,g'` | |
10856 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GSETTINGS_CFLAGS' LIBS='$GSETTINGS_LIBS'" >&5 | |
10857 | $as_echo "yes CFLAGS='$GSETTINGS_CFLAGS' LIBS='$GSETTINGS_LIBS'" >&6; } | |
10858 | succeeded=yes | |
10859 | else | |
10860 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
10861 | $as_echo "no" >&6; } | |
10862 | GSETTINGS_CFLAGS="" | |
10863 | GSETTINGS_LIBS="" | |
10864 | ## If we have a custom action on failure, don't print errors, but | |
10865 | ## do set a variable so people can do so. | |
10866 | GSETTINGS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gio-2.0 >= 2.26"` | |
0afb4571 | 10867 | |
5476a9a4 | 10868 | fi |
067d23c9 KY |
10869 | |
10870 | ||
10871 | ||
10872 | else | |
5476a9a4 GM |
10873 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." |
10874 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
067d23c9 | 10875 | fi |
5476a9a4 | 10876 | fi |
067d23c9 | 10877 | |
5476a9a4 GM |
10878 | if test $succeeded = yes; then |
10879 | HAVE_GSETTINGS=yes | |
10880 | else | |
10881 | HAVE_GSETTINGS=no | |
10882 | fi | |
f199cab1 | 10883 | |
5476a9a4 | 10884 | if test "$HAVE_GSETTINGS" = "yes"; then |
f199cab1 | 10885 | |
5476a9a4 | 10886 | $as_echo "#define HAVE_GSETTINGS 1" >>confdefs.h |
f199cab1 | 10887 | |
5476a9a4 GM |
10888 | SETTINGS_CFLAGS="$GSETTINGS_CFLAGS" |
10889 | SETTINGS_LIBS="$GSETTINGS_LIBS" | |
10890 | fi | |
10891 | fi | |
067d23c9 | 10892 | |
5476a9a4 GM |
10893 | HAVE_GCONF=no |
10894 | if test "${HAVE_X11}" = "yes" && test "${with_gconf}" = "yes"; then | |
067d23c9 | 10895 | |
5476a9a4 | 10896 | succeeded=no |
067d23c9 | 10897 | |
5476a9a4 GM |
10898 | if test "$PKG_CONFIG" = "no" ; then |
10899 | HAVE_GCONF=no | |
10900 | else | |
10901 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
10902 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
10903 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gconf-2.0 >= 2.13" >&5 | |
10904 | $as_echo_n "checking for gconf-2.0 >= 2.13... " >&6; } | |
067d23c9 | 10905 | |
5476a9a4 GM |
10906 | if $PKG_CONFIG --exists "gconf-2.0 >= 2.13" 2>&5 && |
10907 | GCONF_CFLAGS=`$PKG_CONFIG --cflags "gconf-2.0 >= 2.13" 2>&5` && | |
10908 | GCONF_LIBS=`$PKG_CONFIG --libs "gconf-2.0 >= 2.13" 2>&5`; then | |
10909 | edit_cflags=" | |
10910 | s,///*,/,g | |
10911 | s/^/ / | |
10912 | s/ -I/ $isystem/g | |
10913 | s/^ // | |
10914 | " | |
10915 | GCONF_CFLAGS=`$as_echo "$GCONF_CFLAGS" | sed -e "$edit_cflags"` | |
10916 | GCONF_LIBS=`$as_echo "$GCONF_LIBS" | sed -e 's,///*,/,g'` | |
10917 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GCONF_CFLAGS' LIBS='$GCONF_LIBS'" >&5 | |
10918 | $as_echo "yes CFLAGS='$GCONF_CFLAGS' LIBS='$GCONF_LIBS'" >&6; } | |
10919 | succeeded=yes | |
10920 | else | |
10921 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
10922 | $as_echo "no" >&6; } | |
10923 | GCONF_CFLAGS="" | |
10924 | GCONF_LIBS="" | |
10925 | ## If we have a custom action on failure, don't print errors, but | |
10926 | ## do set a variable so people can do so. | |
10927 | GCONF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gconf-2.0 >= 2.13"` | |
067d23c9 | 10928 | |
5476a9a4 | 10929 | fi |
f199cab1 | 10930 | |
f199cab1 GM |
10931 | |
10932 | ||
5476a9a4 GM |
10933 | else |
10934 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
10935 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
10936 | fi | |
10937 | fi | |
f199cab1 | 10938 | |
5476a9a4 GM |
10939 | if test $succeeded = yes; then |
10940 | HAVE_GCONF=yes | |
10941 | else | |
10942 | HAVE_GCONF=no | |
10943 | fi | |
f199cab1 | 10944 | |
5476a9a4 | 10945 | if test "$HAVE_GCONF" = yes; then |
f199cab1 | 10946 | |
5476a9a4 | 10947 | $as_echo "#define HAVE_GCONF 1" >>confdefs.h |
f199cab1 | 10948 | |
5476a9a4 GM |
10949 | SETTINGS_CFLAGS="$SETTINGS_CFLAGS $GCONF_CFLAGS" |
10950 | SETTINGS_LIBS="$SETTINGS_LIBS $GCONF_LIBS" | |
10951 | fi | |
10952 | fi | |
f199cab1 | 10953 | |
5476a9a4 GM |
10954 | if test "$HAVE_GSETTINGS" = "yes" || test "$HAVE_GCONF" = "yes"; then |
10955 | SAVE_CFLAGS="$CFLAGS" | |
10956 | SAVE_LIBS="$LIBS" | |
10957 | CFLAGS="$SETTINGS_CFLAGS $CFLAGS" | |
10958 | LIBS="$SETTINGS_LIBS $LIBS" | |
10959 | for ac_func in g_type_init | |
10960 | do : | |
10961 | ac_fn_c_check_func "$LINENO" "g_type_init" "ac_cv_func_g_type_init" | |
10962 | if test "x$ac_cv_func_g_type_init" = x""yes; then : | |
10963 | cat >>confdefs.h <<_ACEOF | |
10964 | #define HAVE_G_TYPE_INIT 1 | |
067d23c9 | 10965 | _ACEOF |
067d23c9 | 10966 | |
5476a9a4 GM |
10967 | fi |
10968 | done | |
067d23c9 | 10969 | |
5476a9a4 GM |
10970 | CFLAGS="$SAVE_CFLAGS" |
10971 | LIBS="$SAVE_LIBS" | |
10972 | fi | |
067d23c9 | 10973 | |
067d23c9 | 10974 | |
f199cab1 | 10975 | |
067d23c9 | 10976 | |
5476a9a4 GM |
10977 | HAVE_LIBSELINUX=no |
10978 | LIBSELINUX_LIBS= | |
10979 | if test "${with_selinux}" = "yes"; then | |
10980 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lgetfilecon in -lselinux" >&5 | |
10981 | $as_echo_n "checking for lgetfilecon in -lselinux... " >&6; } | |
10982 | if test "${ac_cv_lib_selinux_lgetfilecon+set}" = set; then : | |
10983 | $as_echo_n "(cached) " >&6 | |
10984 | else | |
10985 | ac_check_lib_save_LIBS=$LIBS | |
10986 | LIBS="-lselinux $LIBS" | |
10987 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10988 | /* end confdefs.h. */ | |
067d23c9 | 10989 | |
5476a9a4 GM |
10990 | /* Override any GCC internal prototype to avoid an error. |
10991 | Use char because int might match the return type of a GCC | |
10992 | builtin and then its argument prototype would still apply. */ | |
10993 | #ifdef __cplusplus | |
10994 | extern "C" | |
f199cab1 | 10995 | #endif |
5476a9a4 | 10996 | char lgetfilecon (); |
f199cab1 GM |
10997 | int |
10998 | main () | |
10999 | { | |
5476a9a4 | 11000 | return lgetfilecon (); |
f199cab1 GM |
11001 | ; |
11002 | return 0; | |
11003 | } | |
11004 | _ACEOF | |
5476a9a4 GM |
11005 | if ac_fn_c_try_link "$LINENO"; then : |
11006 | ac_cv_lib_selinux_lgetfilecon=yes | |
11007 | else | |
11008 | ac_cv_lib_selinux_lgetfilecon=no | |
f199cab1 | 11009 | fi |
5476a9a4 GM |
11010 | rm -f core conftest.err conftest.$ac_objext \ |
11011 | conftest$ac_exeext conftest.$ac_ext | |
11012 | LIBS=$ac_check_lib_save_LIBS | |
11013 | fi | |
11014 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_lgetfilecon" >&5 | |
11015 | $as_echo "$ac_cv_lib_selinux_lgetfilecon" >&6; } | |
11016 | if test "x$ac_cv_lib_selinux_lgetfilecon" = x""yes; then : | |
11017 | HAVE_LIBSELINUX=yes | |
11018 | else | |
11019 | HAVE_LIBSELINUX=no | |
067d23c9 KY |
11020 | fi |
11021 | ||
5476a9a4 | 11022 | if test "$HAVE_LIBSELINUX" = yes; then |
067d23c9 | 11023 | |
5476a9a4 | 11024 | $as_echo "#define HAVE_LIBSELINUX 1" >>confdefs.h |
067d23c9 | 11025 | |
5476a9a4 GM |
11026 | LIBSELINUX_LIBS=-lselinux |
11027 | fi | |
f199cab1 | 11028 | fi |
067d23c9 | 11029 | |
067d23c9 | 11030 | |
5476a9a4 GM |
11031 | HAVE_GNUTLS=no |
11032 | HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY=no | |
11033 | if test "${with_gnutls}" = "yes" ; then | |
067d23c9 | 11034 | |
5476a9a4 | 11035 | succeeded=no |
067d23c9 | 11036 | |
5476a9a4 GM |
11037 | if test "$PKG_CONFIG" = "no" ; then |
11038 | HAVE_GNUTLS=no | |
11039 | else | |
11040 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
11041 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
11042 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gnutls >= 2.6.6" >&5 | |
11043 | $as_echo_n "checking for gnutls >= 2.6.6... " >&6; } | |
067d23c9 | 11044 | |
5476a9a4 GM |
11045 | if $PKG_CONFIG --exists "gnutls >= 2.6.6" 2>&5 && |
11046 | LIBGNUTLS_CFLAGS=`$PKG_CONFIG --cflags "gnutls >= 2.6.6" 2>&5` && | |
11047 | LIBGNUTLS_LIBS=`$PKG_CONFIG --libs "gnutls >= 2.6.6" 2>&5`; then | |
11048 | edit_cflags=" | |
11049 | s,///*,/,g | |
11050 | s/^/ / | |
11051 | s/ -I/ $isystem/g | |
11052 | s/^ // | |
11053 | " | |
11054 | LIBGNUTLS_CFLAGS=`$as_echo "$LIBGNUTLS_CFLAGS" | sed -e "$edit_cflags"` | |
11055 | LIBGNUTLS_LIBS=`$as_echo "$LIBGNUTLS_LIBS" | sed -e 's,///*,/,g'` | |
11056 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$LIBGNUTLS_CFLAGS' LIBS='$LIBGNUTLS_LIBS'" >&5 | |
11057 | $as_echo "yes CFLAGS='$LIBGNUTLS_CFLAGS' LIBS='$LIBGNUTLS_LIBS'" >&6; } | |
11058 | succeeded=yes | |
11059 | else | |
11060 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
11061 | $as_echo "no" >&6; } | |
11062 | LIBGNUTLS_CFLAGS="" | |
11063 | LIBGNUTLS_LIBS="" | |
11064 | ## If we have a custom action on failure, don't print errors, but | |
11065 | ## do set a variable so people can do so. | |
11066 | LIBGNUTLS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gnutls >= 2.6.6"` | |
067d23c9 | 11067 | |
5476a9a4 | 11068 | fi |
067d23c9 | 11069 | |
067d23c9 | 11070 | |
067d23c9 | 11071 | |
5476a9a4 GM |
11072 | else |
11073 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
11074 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
11075 | fi | |
11076 | fi | |
067d23c9 | 11077 | |
5476a9a4 GM |
11078 | if test $succeeded = yes; then |
11079 | HAVE_GNUTLS=yes | |
11080 | else | |
11081 | HAVE_GNUTLS=no | |
11082 | fi | |
067d23c9 | 11083 | |
5476a9a4 | 11084 | if test "${HAVE_GNUTLS}" = "yes"; then |
067d23c9 | 11085 | |
5476a9a4 | 11086 | $as_echo "#define HAVE_GNUTLS 1" >>confdefs.h |
067d23c9 | 11087 | |
5476a9a4 | 11088 | fi |
f199cab1 | 11089 | |
5476a9a4 GM |
11090 | CFLAGS="$CFLAGS $LIBGNUTLS_CFLAGS" |
11091 | LIBS="$LIBGNUTLS_LIBS $LIBS" | |
11092 | for ac_func in gnutls_certificate_set_verify_function | |
11093 | do : | |
11094 | ac_fn_c_check_func "$LINENO" "gnutls_certificate_set_verify_function" "ac_cv_func_gnutls_certificate_set_verify_function" | |
11095 | if test "x$ac_cv_func_gnutls_certificate_set_verify_function" = x""yes; then : | |
11096 | cat >>confdefs.h <<_ACEOF | |
11097 | #define HAVE_GNUTLS_CERTIFICATE_SET_VERIFY_FUNCTION 1 | |
f199cab1 | 11098 | _ACEOF |
5476a9a4 GM |
11099 | HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY=yes |
11100 | fi | |
11101 | done | |
067d23c9 KY |
11102 | |
11103 | ||
5476a9a4 GM |
11104 | if test "${HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY}" = "yes"; then |
11105 | ||
11106 | $as_echo "#define HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY 1" >>confdefs.h | |
f527bd02 | 11107 | |
f199cab1 | 11108 | fi |
5476a9a4 | 11109 | fi |
f527bd02 | 11110 | |
f527bd02 | 11111 | |
5476a9a4 GM |
11112 | |
11113 | ||
11114 | HAVE_XAW3D=no | |
11115 | LUCID_LIBW= | |
11116 | if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then | |
11117 | if test "$with_xaw3d" != no; then | |
11118 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xaw3d" >&5 | |
11119 | $as_echo_n "checking for xaw3d... " >&6; } | |
11120 | if test "${emacs_cv_xaw3d+set}" = set; then : | |
f199cab1 GM |
11121 | $as_echo_n "(cached) " >&6 |
11122 | else | |
5476a9a4 GM |
11123 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
11124 | /* end confdefs.h. */ | |
f527bd02 | 11125 | |
5476a9a4 GM |
11126 | #include <X11/Intrinsic.h> |
11127 | #include <X11/Xaw3d/Simple.h> | |
11128 | int | |
11129 | main () | |
11130 | { | |
11131 | ||
11132 | ; | |
11133 | return 0; | |
11134 | } | |
11135 | _ACEOF | |
11136 | if ac_fn_c_try_link "$LINENO"; then : | |
11137 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XawScrollbarSetThumb in -lXaw3d" >&5 | |
11138 | $as_echo_n "checking for XawScrollbarSetThumb in -lXaw3d... " >&6; } | |
11139 | if test "${ac_cv_lib_Xaw3d_XawScrollbarSetThumb+set}" = set; then : | |
11140 | $as_echo_n "(cached) " >&6 | |
11141 | else | |
11142 | ac_check_lib_save_LIBS=$LIBS | |
11143 | LIBS="-lXaw3d $LIBS" | |
11144 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11145 | /* end confdefs.h. */ | |
f527bd02 | 11146 | |
5476a9a4 GM |
11147 | /* Override any GCC internal prototype to avoid an error. |
11148 | Use char because int might match the return type of a GCC | |
11149 | builtin and then its argument prototype would still apply. */ | |
11150 | #ifdef __cplusplus | |
11151 | extern "C" | |
11152 | #endif | |
11153 | char XawScrollbarSetThumb (); | |
11154 | int | |
11155 | main () | |
11156 | { | |
11157 | return XawScrollbarSetThumb (); | |
11158 | ; | |
11159 | return 0; | |
11160 | } | |
11161 | _ACEOF | |
11162 | if ac_fn_c_try_link "$LINENO"; then : | |
11163 | ac_cv_lib_Xaw3d_XawScrollbarSetThumb=yes | |
f199cab1 | 11164 | else |
5476a9a4 | 11165 | ac_cv_lib_Xaw3d_XawScrollbarSetThumb=no |
f199cab1 | 11166 | fi |
5476a9a4 GM |
11167 | rm -f core conftest.err conftest.$ac_objext \ |
11168 | conftest$ac_exeext conftest.$ac_ext | |
11169 | LIBS=$ac_check_lib_save_LIBS | |
11170 | fi | |
11171 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&5 | |
11172 | $as_echo "$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&6; } | |
11173 | if test "x$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" = x""yes; then : | |
11174 | emacs_cv_xaw3d=yes | |
11175 | else | |
11176 | emacs_cv_xaw3d=no | |
f199cab1 | 11177 | fi |
f527bd02 | 11178 | |
5476a9a4 GM |
11179 | else |
11180 | emacs_cv_xaw3d=no | |
11181 | fi | |
11182 | rm -f core conftest.err conftest.$ac_objext \ | |
11183 | conftest$ac_exeext conftest.$ac_ext | |
11184 | fi | |
f527bd02 | 11185 | |
5476a9a4 GM |
11186 | else |
11187 | emacs_cv_xaw3d=no | |
11188 | fi | |
11189 | if test $emacs_cv_xaw3d = yes; then | |
11190 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5 | |
11191 | $as_echo "yes; using Lucid toolkit" >&6; } | |
11192 | USE_X_TOOLKIT=LUCID | |
11193 | HAVE_XAW3D=yes | |
11194 | LUCID_LIBW=-lXaw3d | |
f527bd02 | 11195 | |
5476a9a4 | 11196 | $as_echo "#define HAVE_XAW3D 1" >>confdefs.h |
f527bd02 | 11197 | |
5476a9a4 GM |
11198 | else |
11199 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
11200 | $as_echo "no" >&6; } | |
11201 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libXaw" >&5 | |
11202 | $as_echo_n "checking for libXaw... " >&6; } | |
11203 | if test "${emacs_cv_xaw+set}" = set; then : | |
f199cab1 GM |
11204 | $as_echo_n "(cached) " >&6 |
11205 | else | |
11206 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11207 | /* end confdefs.h. */ | |
067d23c9 | 11208 | |
5476a9a4 GM |
11209 | #include <X11/Intrinsic.h> |
11210 | #include <X11/Xaw/Simple.h> | |
f199cab1 GM |
11211 | int |
11212 | main () | |
11213 | { | |
067d23c9 | 11214 | |
f199cab1 GM |
11215 | ; |
11216 | return 0; | |
11217 | } | |
11218 | _ACEOF | |
5476a9a4 GM |
11219 | if ac_fn_c_try_link "$LINENO"; then : |
11220 | emacs_cv_xaw=yes | |
f199cab1 | 11221 | else |
5476a9a4 | 11222 | emacs_cv_xaw=no |
f199cab1 | 11223 | fi |
5476a9a4 GM |
11224 | rm -f core conftest.err conftest.$ac_objext \ |
11225 | conftest$ac_exeext conftest.$ac_ext | |
f199cab1 | 11226 | fi |
067d23c9 | 11227 | |
5476a9a4 GM |
11228 | if test $emacs_cv_xaw = yes; then |
11229 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5 | |
11230 | $as_echo "yes; using Lucid toolkit" >&6; } | |
11231 | USE_X_TOOLKIT=LUCID | |
11232 | LUCID_LIBW=-lXaw | |
11233 | elif test x"${USE_X_TOOLKIT}" = xLUCID; then | |
11234 | as_fn_error "Lucid toolkit requires X11/Xaw include files" "$LINENO" 5 | |
f199cab1 | 11235 | else |
5476a9a4 GM |
11236 | as_fn_error "No X toolkit could be found. |
11237 | If you are sure you want Emacs compiled without an X toolkit, pass | |
11238 | --with-x-toolkit=no | |
11239 | to configure. Otherwise, install the development libraries for the toolkit | |
11240 | that you want to use (e.g. Gtk+) and re-run configure." "$LINENO" 5 | |
f199cab1 | 11241 | fi |
5476a9a4 GM |
11242 | fi |
11243 | fi | |
067d23c9 | 11244 | |
5476a9a4 | 11245 | X_TOOLKIT_TYPE=$USE_X_TOOLKIT |
067d23c9 | 11246 | |
5476a9a4 GM |
11247 | LIBXTR6= |
11248 | if test "${USE_X_TOOLKIT}" != "none"; then | |
11249 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 toolkit version" >&5 | |
11250 | $as_echo_n "checking X11 toolkit version... " >&6; } | |
11251 | if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then : | |
f199cab1 GM |
11252 | $as_echo_n "(cached) " >&6 |
11253 | else | |
5476a9a4 | 11254 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
f199cab1 | 11255 | /* end confdefs.h. */ |
5476a9a4 | 11256 | #include <X11/Intrinsic.h> |
f199cab1 GM |
11257 | int |
11258 | main () | |
11259 | { | |
5476a9a4 GM |
11260 | #if XtSpecificationRelease < 6 |
11261 | fail; | |
11262 | #endif | |
f527bd02 | 11263 | |
f199cab1 GM |
11264 | ; |
11265 | return 0; | |
11266 | } | |
067d23c9 | 11267 | _ACEOF |
5476a9a4 GM |
11268 | if ac_fn_c_try_link "$LINENO"; then : |
11269 | emacs_cv_x11_toolkit_version_6=yes | |
11270 | else | |
11271 | emacs_cv_x11_toolkit_version_6=no | |
067d23c9 | 11272 | fi |
5476a9a4 GM |
11273 | rm -f core conftest.err conftest.$ac_objext \ |
11274 | conftest$ac_exeext conftest.$ac_ext | |
067d23c9 KY |
11275 | fi |
11276 | ||
5476a9a4 GM |
11277 | HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6 |
11278 | if test $emacs_cv_x11_toolkit_version_6 = yes; then | |
11279 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5 | |
11280 | $as_echo "6 or newer" >&6; } | |
f527bd02 | 11281 | |
5476a9a4 | 11282 | $as_echo "#define HAVE_X11XTR6 1" >>confdefs.h |
f527bd02 | 11283 | |
5476a9a4 GM |
11284 | LIBXTR6="-lSM -lICE" |
11285 | case "$opsys" in | |
11286 | ## Use libw.a along with X11R6 Xt. | |
11287 | unixware) LIBXTR6="$LIBXTR6 -lw" ;; | |
11288 | esac | |
11289 | else | |
11290 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5 | |
11291 | $as_echo "before 6" >&6; } | |
f199cab1 | 11292 | fi |
f527bd02 | 11293 | |
5476a9a4 GM |
11294 | OLDLIBS="$LIBS" |
11295 | if test x$HAVE_X11XTR6 = xyes; then | |
11296 | LIBS="-lXt -lSM -lICE $LIBS" | |
11297 | else | |
11298 | LIBS="-lXt $LIBS" | |
11299 | fi | |
11300 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XmuConvertStandardSelection in -lXmu" >&5 | |
11301 | $as_echo_n "checking for XmuConvertStandardSelection in -lXmu... " >&6; } | |
11302 | if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then : | |
11303 | $as_echo_n "(cached) " >&6 | |
11304 | else | |
11305 | ac_check_lib_save_LIBS=$LIBS | |
11306 | LIBS="-lXmu $LIBS" | |
11307 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11308 | /* end confdefs.h. */ | |
f199cab1 | 11309 | |
5476a9a4 GM |
11310 | /* Override any GCC internal prototype to avoid an error. |
11311 | Use char because int might match the return type of a GCC | |
11312 | builtin and then its argument prototype would still apply. */ | |
11313 | #ifdef __cplusplus | |
11314 | extern "C" | |
11315 | #endif | |
11316 | char XmuConvertStandardSelection (); | |
067d23c9 KY |
11317 | int |
11318 | main () | |
11319 | { | |
5476a9a4 | 11320 | return XmuConvertStandardSelection (); |
067d23c9 KY |
11321 | ; |
11322 | return 0; | |
11323 | } | |
11324 | _ACEOF | |
5476a9a4 GM |
11325 | if ac_fn_c_try_link "$LINENO"; then : |
11326 | ac_cv_lib_Xmu_XmuConvertStandardSelection=yes | |
11327 | else | |
11328 | ac_cv_lib_Xmu_XmuConvertStandardSelection=no | |
067d23c9 | 11329 | fi |
5476a9a4 GM |
11330 | rm -f core conftest.err conftest.$ac_objext \ |
11331 | conftest$ac_exeext conftest.$ac_ext | |
11332 | LIBS=$ac_check_lib_save_LIBS | |
067d23c9 | 11333 | fi |
5476a9a4 GM |
11334 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5 |
11335 | $as_echo "$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6; } | |
11336 | if test "x$ac_cv_lib_Xmu_XmuConvertStandardSelection" = x""yes; then : | |
11337 | cat >>confdefs.h <<_ACEOF | |
11338 | #define HAVE_LIBXMU 1 | |
f199cab1 GM |
11339 | _ACEOF |
11340 | ||
5476a9a4 | 11341 | LIBS="-lXmu $LIBS" |
f199cab1 | 11342 | |
067d23c9 KY |
11343 | fi |
11344 | ||
5476a9a4 GM |
11345 | test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS" |
11346 | fi | |
067d23c9 | 11347 | |
067d23c9 | 11348 | |
5476a9a4 GM |
11349 | LIBXMU=-lXmu |
11350 | case $opsys in | |
11351 | ## These systems don't supply Xmu. | |
11352 | hpux* | aix4-2 ) | |
11353 | test "X$ac_cv_lib_Xmu_XmuConvertStandardSelection" != "Xyes" && LIBXMU= | |
11354 | ;; | |
11355 | esac | |
067d23c9 KY |
11356 | |
11357 | ||
5476a9a4 GM |
11358 | # On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D. |
11359 | if test "${HAVE_X11}" = "yes"; then | |
11360 | if test "${USE_X_TOOLKIT}" != "none"; then | |
11361 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XShapeQueryExtension in -lXext" >&5 | |
11362 | $as_echo_n "checking for XShapeQueryExtension in -lXext... " >&6; } | |
11363 | if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then : | |
f199cab1 GM |
11364 | $as_echo_n "(cached) " >&6 |
11365 | else | |
5476a9a4 GM |
11366 | ac_check_lib_save_LIBS=$LIBS |
11367 | LIBS="-lXext $LIBS" | |
11368 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
f199cab1 | 11369 | /* end confdefs.h. */ |
f199cab1 | 11370 | |
5476a9a4 GM |
11371 | /* Override any GCC internal prototype to avoid an error. |
11372 | Use char because int might match the return type of a GCC | |
11373 | builtin and then its argument prototype would still apply. */ | |
11374 | #ifdef __cplusplus | |
11375 | extern "C" | |
11376 | #endif | |
11377 | char XShapeQueryExtension (); | |
11378 | int | |
11379 | main () | |
11380 | { | |
11381 | return XShapeQueryExtension (); | |
11382 | ; | |
11383 | return 0; | |
11384 | } | |
e7d4e61f | 11385 | _ACEOF |
5476a9a4 GM |
11386 | if ac_fn_c_try_link "$LINENO"; then : |
11387 | ac_cv_lib_Xext_XShapeQueryExtension=yes | |
11388 | else | |
11389 | ac_cv_lib_Xext_XShapeQueryExtension=no | |
067d23c9 | 11390 | fi |
5476a9a4 GM |
11391 | rm -f core conftest.err conftest.$ac_objext \ |
11392 | conftest$ac_exeext conftest.$ac_ext | |
11393 | LIBS=$ac_check_lib_save_LIBS | |
11394 | fi | |
11395 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5 | |
11396 | $as_echo "$ac_cv_lib_Xext_XShapeQueryExtension" >&6; } | |
11397 | if test "x$ac_cv_lib_Xext_XShapeQueryExtension" = x""yes; then : | |
11398 | cat >>confdefs.h <<_ACEOF | |
11399 | #define HAVE_LIBXEXT 1 | |
11400 | _ACEOF | |
f199cab1 | 11401 | |
5476a9a4 | 11402 | LIBS="-lXext $LIBS" |
f199cab1 | 11403 | |
5476a9a4 | 11404 | fi |
f199cab1 | 11405 | |
5476a9a4 GM |
11406 | fi |
11407 | fi | |
f199cab1 | 11408 | |
5476a9a4 GM |
11409 | LIBXP= |
11410 | if test "${USE_X_TOOLKIT}" = "MOTIF"; then | |
8ad96b1d GM |
11411 | # OpenMotif may be installed in such a way on some GNU/Linux systems. |
11412 | if test -d /usr/include/openmotif; then | |
11413 | CPPFLAGS="-I/usr/include/openmotif $CPPFLAGS" | |
11414 | emacs_cv_openmotif=yes | |
11415 | case "$canonical" in | |
11416 | x86_64-*-linux-gnu* | powerpc64-*-linux-gnu* | sparc64-*-linux-gnu*) | |
11417 | test -d /usr/lib64/openmotif && LDFLAGS="-L/usr/lib64/openmotif $LDFLAGS" | |
11418 | ;; | |
11419 | *) | |
11420 | test -d /usr/lib/openmotif && LDFLAGS="-L/usr/lib/openmotif $LDFLAGS" | |
11421 | esac | |
11422 | else | |
11423 | emacs_cv_openmotif=no | |
11424 | fi | |
11425 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for (Open)Motif version 2.1" >&5 | |
11426 | $as_echo_n "checking for (Open)Motif version 2.1... " >&6; } | |
5476a9a4 | 11427 | if test "${emacs_cv_motif_version_2_1+set}" = set; then : |
ae1362a3 AS |
11428 | $as_echo_n "(cached) " >&6 |
11429 | else | |
f199cab1 GM |
11430 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
11431 | /* end confdefs.h. */ | |
5476a9a4 GM |
11432 | #include <Xm/Xm.h> |
11433 | int | |
11434 | main () | |
11435 | { | |
11436 | #if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1) | |
11437 | int x = 5; | |
11438 | #else | |
11439 | Motif version prior to 2.1. | |
11440 | #endif | |
11441 | ; | |
11442 | return 0; | |
11443 | } | |
11444 | _ACEOF | |
11445 | if ac_fn_c_try_compile "$LINENO"; then : | |
11446 | emacs_cv_motif_version_2_1=yes | |
11447 | else | |
11448 | emacs_cv_motif_version_2_1=no | |
11449 | fi | |
11450 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
11451 | fi | |
11452 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_motif_version_2_1" >&5 | |
11453 | $as_echo "$emacs_cv_motif_version_2_1" >&6; } | |
11454 | if test $emacs_cv_motif_version_2_1 = yes; then | |
11455 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpCreateContext in -lXp" >&5 | |
11456 | $as_echo_n "checking for XpCreateContext in -lXp... " >&6; } | |
11457 | if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then : | |
11458 | $as_echo_n "(cached) " >&6 | |
11459 | else | |
11460 | ac_check_lib_save_LIBS=$LIBS | |
11461 | LIBS="-lXp $LIBS" | |
11462 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11463 | /* end confdefs.h. */ | |
f199cab1 | 11464 | |
5476a9a4 GM |
11465 | /* Override any GCC internal prototype to avoid an error. |
11466 | Use char because int might match the return type of a GCC | |
11467 | builtin and then its argument prototype would still apply. */ | |
11468 | #ifdef __cplusplus | |
11469 | extern "C" | |
11470 | #endif | |
11471 | char XpCreateContext (); | |
ae1362a3 AS |
11472 | int |
11473 | main () | |
11474 | { | |
5476a9a4 | 11475 | return XpCreateContext (); |
ae1362a3 AS |
11476 | ; |
11477 | return 0; | |
11478 | } | |
11479 | _ACEOF | |
5476a9a4 GM |
11480 | if ac_fn_c_try_link "$LINENO"; then : |
11481 | ac_cv_lib_Xp_XpCreateContext=yes | |
067d23c9 | 11482 | else |
5476a9a4 | 11483 | ac_cv_lib_Xp_XpCreateContext=no |
067d23c9 | 11484 | fi |
5476a9a4 GM |
11485 | rm -f core conftest.err conftest.$ac_objext \ |
11486 | conftest$ac_exeext conftest.$ac_ext | |
11487 | LIBS=$ac_check_lib_save_LIBS | |
11488 | fi | |
11489 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xp_XpCreateContext" >&5 | |
11490 | $as_echo "$ac_cv_lib_Xp_XpCreateContext" >&6; } | |
11491 | if test "x$ac_cv_lib_Xp_XpCreateContext" = x""yes; then : | |
11492 | LIBXP=-lXp | |
067d23c9 | 11493 | fi |
f199cab1 | 11494 | |
8ad96b1d GM |
11495 | if test x$emacs_cv_openmotif = xyes; then |
11496 | REAL_CPPFLAGS="-I/usr/include/openmotif $REAL_CPPFLAGS" | |
11497 | fi | |
5476a9a4 GM |
11498 | else |
11499 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LessTif where some systems put it" >&5 | |
11500 | $as_echo_n "checking for LessTif where some systems put it... " >&6; } | |
11501 | if test "${emacs_cv_lesstif+set}" = set; then : | |
067d23c9 | 11502 | $as_echo_n "(cached) " >&6 |
f199cab1 | 11503 | else |
5476a9a4 GM |
11504 | # We put this in CFLAGS temporarily to precede other -I options |
11505 | # that might be in CFLAGS temporarily. | |
11506 | # We put this in CPPFLAGS where it precedes the other -I options. | |
11507 | OLD_CPPFLAGS=$CPPFLAGS | |
11508 | OLD_CFLAGS=$CFLAGS | |
11509 | CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS" | |
11510 | CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS" | |
11511 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
067d23c9 | 11512 | /* end confdefs.h. */ |
5476a9a4 | 11513 | #include </usr/X11R6/LessTif/Motif1.2/include/Xm/Xm.h> |
067d23c9 KY |
11514 | int |
11515 | main () | |
11516 | { | |
5476a9a4 | 11517 | int x = 5; |
067d23c9 KY |
11518 | ; |
11519 | return 0; | |
11520 | } | |
11521 | _ACEOF | |
5476a9a4 GM |
11522 | if ac_fn_c_try_compile "$LINENO"; then : |
11523 | emacs_cv_lesstif=yes | |
067d23c9 | 11524 | else |
5476a9a4 | 11525 | emacs_cv_lesstif=no |
067d23c9 | 11526 | fi |
5476a9a4 | 11527 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
067d23c9 | 11528 | fi |
5476a9a4 GM |
11529 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_lesstif" >&5 |
11530 | $as_echo "$emacs_cv_lesstif" >&6; } | |
11531 | if test $emacs_cv_lesstif = yes; then | |
11532 | # Make sure this -I option remains in CPPFLAGS after it is set | |
11533 | # back to REAL_CPPFLAGS. | |
11534 | # There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not | |
11535 | # have those other -I options anyway. Ultimately, having this | |
11536 | # directory ultimately in CPPFLAGS will be enough. | |
11537 | REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS" | |
11538 | LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS" | |
11539 | else | |
11540 | CFLAGS=$OLD_CFLAGS | |
11541 | CPPFLAGS=$OLD_CPPFLAGS | |
11542 | fi | |
11543 | fi | |
11544 | ac_fn_c_check_header_mongrel "$LINENO" "Xm/BulletinB.h" "ac_cv_header_Xm_BulletinB_h" "$ac_includes_default" | |
11545 | if test "x$ac_cv_header_Xm_BulletinB_h" = x""yes; then : | |
067d23c9 | 11546 | |
5476a9a4 GM |
11547 | else |
11548 | as_fn_error "Motif toolkit requested but requirements not found." "$LINENO" 5 | |
067d23c9 | 11549 | fi |
f199cab1 GM |
11550 | |
11551 | ||
5476a9a4 | 11552 | fi |
f199cab1 GM |
11553 | |
11554 | ||
5476a9a4 GM |
11555 | USE_TOOLKIT_SCROLL_BARS=no |
11556 | if test "${with_toolkit_scroll_bars}" != "no"; then | |
11557 | if test "${USE_X_TOOLKIT}" != "none"; then | |
11558 | if test "${USE_X_TOOLKIT}" = "MOTIF"; then | |
11559 | $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h | |
f199cab1 | 11560 | |
5476a9a4 GM |
11561 | HAVE_XAW3D=no |
11562 | USE_TOOLKIT_SCROLL_BARS=yes | |
11563 | elif test "${HAVE_XAW3D}" = "yes" || test "${USE_X_TOOLKIT}" = "LUCID"; then | |
11564 | $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h | |
f199cab1 | 11565 | |
5476a9a4 GM |
11566 | USE_TOOLKIT_SCROLL_BARS=yes |
11567 | fi | |
11568 | elif test "${HAVE_GTK}" = "yes"; then | |
11569 | $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h | |
f199cab1 | 11570 | |
5476a9a4 GM |
11571 | USE_TOOLKIT_SCROLL_BARS=yes |
11572 | elif test "${HAVE_NS}" = "yes"; then | |
11573 | $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h | |
f199cab1 | 11574 | |
5476a9a4 GM |
11575 | USE_TOOLKIT_SCROLL_BARS=yes |
11576 | fi | |
11577 | fi | |
f199cab1 | 11578 | |
5476a9a4 | 11579 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
067d23c9 | 11580 | /* end confdefs.h. */ |
5476a9a4 GM |
11581 | |
11582 | #include <X11/Xlib.h> | |
11583 | #include <X11/Xresource.h> | |
067d23c9 KY |
11584 | int |
11585 | main () | |
11586 | { | |
5476a9a4 | 11587 | XIMProc callback; |
067d23c9 KY |
11588 | ; |
11589 | return 0; | |
11590 | } | |
11591 | _ACEOF | |
f199cab1 | 11592 | if ac_fn_c_try_compile "$LINENO"; then : |
5476a9a4 GM |
11593 | HAVE_XIM=yes |
11594 | ||
11595 | $as_echo "#define HAVE_XIM 1" >>confdefs.h | |
11596 | ||
067d23c9 | 11597 | else |
5476a9a4 | 11598 | HAVE_XIM=no |
067d23c9 | 11599 | fi |
f199cab1 | 11600 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
f199cab1 | 11601 | |
f199cab1 | 11602 | |
5476a9a4 GM |
11603 | if test "${with_xim}" != "no"; then |
11604 | ||
11605 | $as_echo "#define USE_XIM 1" >>confdefs.h | |
11606 | ||
11607 | fi | |
11608 | ||
11609 | ||
11610 | if test "${HAVE_XIM}" != "no"; then | |
11611 | late_CFLAGS=$CFLAGS | |
11612 | if test "$GCC" = yes; then | |
11613 | CFLAGS="$CFLAGS --pedantic-errors" | |
11614 | fi | |
11615 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11616 | /* end confdefs.h. */ | |
f199cab1 | 11617 | |
5476a9a4 GM |
11618 | #include <X11/Xlib.h> |
11619 | #include <X11/Xresource.h> | |
11620 | int | |
11621 | main () | |
11622 | { | |
11623 | Display *display; | |
11624 | XrmDatabase db; | |
11625 | char *res_name; | |
11626 | char *res_class; | |
11627 | XIMProc callback; | |
11628 | XPointer *client_data; | |
11629 | #ifndef __GNUC__ | |
11630 | /* If we're not using GCC, it's probably not XFree86, and this is | |
11631 | probably right, but we can't use something like --pedantic-errors. */ | |
11632 | extern Bool XRegisterIMInstantiateCallback(Display*, XrmDatabase, char*, | |
11633 | char*, XIMProc, XPointer*); | |
11634 | #endif | |
11635 | (void)XRegisterIMInstantiateCallback(display, db, res_name, res_class, callback, | |
11636 | client_data); | |
067d23c9 KY |
11637 | ; |
11638 | return 0; | |
11639 | } | |
11640 | _ACEOF | |
5476a9a4 GM |
11641 | if ac_fn_c_try_compile "$LINENO"; then : |
11642 | emacs_cv_arg6_star=yes | |
067d23c9 | 11643 | fi |
f199cab1 | 11644 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5476a9a4 GM |
11645 | if test "$emacs_cv_arg6_star" = yes; then |
11646 | $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer*" >>confdefs.h | |
11647 | ||
11648 | else | |
11649 | $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer" >>confdefs.h | |
067d23c9 | 11650 | |
5476a9a4 GM |
11651 | fi |
11652 | CFLAGS=$late_CFLAGS | |
067d23c9 KY |
11653 | fi |
11654 | ||
5476a9a4 GM |
11655 | ### Start of font-backend (under any platform) section. |
11656 | # (nothing here yet -- this is a placeholder) | |
11657 | ### End of font-backend (under any platform) section. | |
067d23c9 | 11658 | |
5476a9a4 GM |
11659 | ### Start of font-backend (under X11) section. |
11660 | if test "${HAVE_X11}" = "yes"; then | |
067d23c9 | 11661 | |
5476a9a4 | 11662 | succeeded=no |
067d23c9 | 11663 | |
5476a9a4 GM |
11664 | if test "$PKG_CONFIG" = "no" ; then |
11665 | HAVE_FC=no | |
11666 | else | |
11667 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
11668 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
11669 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fontconfig >= 2.2.0" >&5 | |
11670 | $as_echo_n "checking for fontconfig >= 2.2.0... " >&6; } | |
f199cab1 | 11671 | |
5476a9a4 GM |
11672 | if $PKG_CONFIG --exists "fontconfig >= 2.2.0" 2>&5 && |
11673 | FONTCONFIG_CFLAGS=`$PKG_CONFIG --cflags "fontconfig >= 2.2.0" 2>&5` && | |
11674 | FONTCONFIG_LIBS=`$PKG_CONFIG --libs "fontconfig >= 2.2.0" 2>&5`; then | |
11675 | edit_cflags=" | |
11676 | s,///*,/,g | |
11677 | s/^/ / | |
11678 | s/ -I/ $isystem/g | |
11679 | s/^ // | |
11680 | " | |
11681 | FONTCONFIG_CFLAGS=`$as_echo "$FONTCONFIG_CFLAGS" | sed -e "$edit_cflags"` | |
11682 | FONTCONFIG_LIBS=`$as_echo "$FONTCONFIG_LIBS" | sed -e 's,///*,/,g'` | |
11683 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$FONTCONFIG_CFLAGS' LIBS='$FONTCONFIG_LIBS'" >&5 | |
11684 | $as_echo "yes CFLAGS='$FONTCONFIG_CFLAGS' LIBS='$FONTCONFIG_LIBS'" >&6; } | |
11685 | succeeded=yes | |
11686 | else | |
11687 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
11688 | $as_echo "no" >&6; } | |
11689 | FONTCONFIG_CFLAGS="" | |
11690 | FONTCONFIG_LIBS="" | |
11691 | ## If we have a custom action on failure, don't print errors, but | |
11692 | ## do set a variable so people can do so. | |
11693 | FONTCONFIG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "fontconfig >= 2.2.0"` | |
f199cab1 | 11694 | |
5476a9a4 | 11695 | fi |
f199cab1 GM |
11696 | |
11697 | ||
11698 | ||
f199cab1 | 11699 | else |
5476a9a4 GM |
11700 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." |
11701 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
11702 | fi | |
11703 | fi | |
f199cab1 | 11704 | |
5476a9a4 GM |
11705 | if test $succeeded = yes; then |
11706 | HAVE_FC=yes | |
11707 | else | |
11708 | HAVE_FC=no | |
11709 | fi | |
f199cab1 | 11710 | |
067d23c9 | 11711 | |
5476a9a4 GM |
11712 | ## Use -lXft if available, unless `--with-xft=no'. |
11713 | HAVE_XFT=maybe | |
11714 | if test "${HAVE_FC}" = "no" || test "x${with_x}" = "xno"; then | |
11715 | with_xft="no"; | |
11716 | fi | |
11717 | if test "x${with_xft}" != "xno"; then | |
f199cab1 | 11718 | |
f199cab1 | 11719 | |
5476a9a4 | 11720 | succeeded=no |
f199cab1 | 11721 | |
5476a9a4 GM |
11722 | if test "$PKG_CONFIG" = "no" ; then |
11723 | HAVE_XFT=no | |
11724 | else | |
11725 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
11726 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
11727 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xft >= 0.13.0" >&5 | |
11728 | $as_echo_n "checking for xft >= 0.13.0... " >&6; } | |
f199cab1 | 11729 | |
5476a9a4 GM |
11730 | if $PKG_CONFIG --exists "xft >= 0.13.0" 2>&5 && |
11731 | XFT_CFLAGS=`$PKG_CONFIG --cflags "xft >= 0.13.0" 2>&5` && | |
11732 | XFT_LIBS=`$PKG_CONFIG --libs "xft >= 0.13.0" 2>&5`; then | |
11733 | edit_cflags=" | |
11734 | s,///*,/,g | |
11735 | s/^/ / | |
11736 | s/ -I/ $isystem/g | |
11737 | s/^ // | |
11738 | " | |
11739 | XFT_CFLAGS=`$as_echo "$XFT_CFLAGS" | sed -e "$edit_cflags"` | |
11740 | XFT_LIBS=`$as_echo "$XFT_LIBS" | sed -e 's,///*,/,g'` | |
11741 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$XFT_CFLAGS' LIBS='$XFT_LIBS'" >&5 | |
11742 | $as_echo "yes CFLAGS='$XFT_CFLAGS' LIBS='$XFT_LIBS'" >&6; } | |
11743 | succeeded=yes | |
11744 | else | |
11745 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
11746 | $as_echo "no" >&6; } | |
11747 | XFT_CFLAGS="" | |
11748 | XFT_LIBS="" | |
11749 | ## If we have a custom action on failure, don't print errors, but | |
11750 | ## do set a variable so people can do so. | |
11751 | XFT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xft >= 0.13.0"` | |
f199cab1 | 11752 | |
5476a9a4 | 11753 | fi |
f199cab1 GM |
11754 | |
11755 | ||
11756 | ||
5476a9a4 GM |
11757 | else |
11758 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
11759 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
11760 | fi | |
11761 | fi | |
f199cab1 | 11762 | |
5476a9a4 GM |
11763 | if test $succeeded = yes; then |
11764 | : | |
f199cab1 | 11765 | else |
5476a9a4 | 11766 | HAVE_XFT=no |
f199cab1 GM |
11767 | fi |
11768 | ||
5476a9a4 GM |
11769 | ## Because xftfont.c uses XRenderQueryExtension, we also |
11770 | ## need to link to -lXrender. | |
11771 | HAVE_XRENDER=no | |
11772 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRenderQueryExtension in -lXrender" >&5 | |
11773 | $as_echo_n "checking for XRenderQueryExtension in -lXrender... " >&6; } | |
11774 | if test "${ac_cv_lib_Xrender_XRenderQueryExtension+set}" = set; then : | |
11775 | $as_echo_n "(cached) " >&6 | |
11776 | else | |
11777 | ac_check_lib_save_LIBS=$LIBS | |
11778 | LIBS="-lXrender $LIBS" | |
11779 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11780 | /* end confdefs.h. */ | |
f199cab1 | 11781 | |
5476a9a4 GM |
11782 | /* Override any GCC internal prototype to avoid an error. |
11783 | Use char because int might match the return type of a GCC | |
11784 | builtin and then its argument prototype would still apply. */ | |
11785 | #ifdef __cplusplus | |
11786 | extern "C" | |
11787 | #endif | |
11788 | char XRenderQueryExtension (); | |
11789 | int | |
11790 | main () | |
11791 | { | |
11792 | return XRenderQueryExtension (); | |
11793 | ; | |
11794 | return 0; | |
11795 | } | |
11796 | _ACEOF | |
11797 | if ac_fn_c_try_link "$LINENO"; then : | |
11798 | ac_cv_lib_Xrender_XRenderQueryExtension=yes | |
11799 | else | |
11800 | ac_cv_lib_Xrender_XRenderQueryExtension=no | |
11801 | fi | |
11802 | rm -f core conftest.err conftest.$ac_objext \ | |
11803 | conftest$ac_exeext conftest.$ac_ext | |
11804 | LIBS=$ac_check_lib_save_LIBS | |
11805 | fi | |
11806 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrender_XRenderQueryExtension" >&5 | |
11807 | $as_echo "$ac_cv_lib_Xrender_XRenderQueryExtension" >&6; } | |
11808 | if test "x$ac_cv_lib_Xrender_XRenderQueryExtension" = x""yes; then : | |
11809 | HAVE_XRENDER=yes | |
11810 | fi | |
f199cab1 | 11811 | |
5476a9a4 GM |
11812 | if test "$HAVE_XFT" != no && test "$HAVE_XRENDER" != no; then |
11813 | OLD_CPPFLAGS="$CPPFLAGS" | |
11814 | OLD_CFLAGS="$CFLAGS" | |
11815 | OLD_LIBS="$LIBS" | |
11816 | CPPFLAGS="$CPPFLAGS $XFT_CFLAGS" | |
11817 | CFLAGS="$CFLAGS $XFT_CFLAGS" | |
11818 | XFT_LIBS="-lXrender $XFT_LIBS" | |
11819 | LIBS="$XFT_LIBS $LIBS" | |
11820 | ac_fn_c_check_header_mongrel "$LINENO" "X11/Xft/Xft.h" "ac_cv_header_X11_Xft_Xft_h" "$ac_includes_default" | |
11821 | if test "x$ac_cv_header_X11_Xft_Xft_h" = x""yes; then : | |
11822 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XftFontOpen in -lXft" >&5 | |
11823 | $as_echo_n "checking for XftFontOpen in -lXft... " >&6; } | |
11824 | if test "${ac_cv_lib_Xft_XftFontOpen+set}" = set; then : | |
11825 | $as_echo_n "(cached) " >&6 | |
11826 | else | |
11827 | ac_check_lib_save_LIBS=$LIBS | |
11828 | LIBS="-lXft $XFT_LIBS $LIBS" | |
11829 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11830 | /* end confdefs.h. */ | |
f199cab1 | 11831 | |
5476a9a4 GM |
11832 | /* Override any GCC internal prototype to avoid an error. |
11833 | Use char because int might match the return type of a GCC | |
11834 | builtin and then its argument prototype would still apply. */ | |
11835 | #ifdef __cplusplus | |
11836 | extern "C" | |
11837 | #endif | |
11838 | char XftFontOpen (); | |
11839 | int | |
11840 | main () | |
11841 | { | |
11842 | return XftFontOpen (); | |
11843 | ; | |
11844 | return 0; | |
11845 | } | |
067d23c9 | 11846 | _ACEOF |
5476a9a4 GM |
11847 | if ac_fn_c_try_link "$LINENO"; then : |
11848 | ac_cv_lib_Xft_XftFontOpen=yes | |
11849 | else | |
11850 | ac_cv_lib_Xft_XftFontOpen=no | |
11851 | fi | |
11852 | rm -f core conftest.err conftest.$ac_objext \ | |
11853 | conftest$ac_exeext conftest.$ac_ext | |
11854 | LIBS=$ac_check_lib_save_LIBS | |
11855 | fi | |
11856 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xft_XftFontOpen" >&5 | |
11857 | $as_echo "$ac_cv_lib_Xft_XftFontOpen" >&6; } | |
11858 | if test "x$ac_cv_lib_Xft_XftFontOpen" = x""yes; then : | |
11859 | HAVE_XFT=yes | |
f199cab1 GM |
11860 | fi |
11861 | ||
5476a9a4 | 11862 | fi |
f199cab1 GM |
11863 | |
11864 | ||
f199cab1 | 11865 | |
5476a9a4 | 11866 | if test "${HAVE_XFT}" = "yes"; then |
f199cab1 | 11867 | |
5476a9a4 | 11868 | $as_echo "#define HAVE_XFT 1" >>confdefs.h |
f199cab1 | 11869 | |
067d23c9 | 11870 | |
5476a9a4 GM |
11871 | C_SWITCH_X_SITE="$C_SWITCH_X_SITE $XFT_CFLAGS" |
11872 | else | |
11873 | CPPFLAGS="$OLD_CPPFLAGS" | |
11874 | CFLAGS="$OLD_CFLAGS" | |
11875 | LIBS="$OLD_LIBS" | |
11876 | fi # "${HAVE_XFT}" = "yes" | |
11877 | fi # "$HAVE_XFT" != no | |
11878 | fi # "x${with_xft}" != "xno" | |
f199cab1 | 11879 | |
5476a9a4 GM |
11880 | ## We used to allow building with FreeType and without Xft. |
11881 | ## However, the ftx font backend driver is not in good shape. | |
11882 | if test "$HAVE_XFT" != "yes"; then | |
11883 | HAVE_XFT=no | |
11884 | HAVE_FREETYPE=no | |
11885 | else | |
f199cab1 | 11886 | |
5476a9a4 | 11887 | succeeded=no |
f199cab1 | 11888 | |
5476a9a4 GM |
11889 | if test "$PKG_CONFIG" = "no" ; then |
11890 | HAVE_FREETYPE=no | |
11891 | else | |
11892 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
11893 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
11894 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype2" >&5 | |
11895 | $as_echo_n "checking for freetype2... " >&6; } | |
f199cab1 | 11896 | |
5476a9a4 GM |
11897 | if $PKG_CONFIG --exists "freetype2" 2>&5 && |
11898 | FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>&5` && | |
11899 | FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>&5`; then | |
11900 | edit_cflags=" | |
11901 | s,///*,/,g | |
11902 | s/^/ / | |
11903 | s/ -I/ $isystem/g | |
11904 | s/^ // | |
11905 | " | |
11906 | FREETYPE_CFLAGS=`$as_echo "$FREETYPE_CFLAGS" | sed -e "$edit_cflags"` | |
11907 | FREETYPE_LIBS=`$as_echo "$FREETYPE_LIBS" | sed -e 's,///*,/,g'` | |
11908 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$FREETYPE_CFLAGS' LIBS='$FREETYPE_LIBS'" >&5 | |
11909 | $as_echo "yes CFLAGS='$FREETYPE_CFLAGS' LIBS='$FREETYPE_LIBS'" >&6; } | |
11910 | succeeded=yes | |
11911 | else | |
11912 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
11913 | $as_echo "no" >&6; } | |
11914 | FREETYPE_CFLAGS="" | |
11915 | FREETYPE_LIBS="" | |
11916 | ## If we have a custom action on failure, don't print errors, but | |
11917 | ## do set a variable so people can do so. | |
11918 | FREETYPE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "freetype2"` | |
f199cab1 | 11919 | |
5476a9a4 | 11920 | fi |
f199cab1 | 11921 | |
f199cab1 | 11922 | |
067d23c9 | 11923 | |
5476a9a4 GM |
11924 | else |
11925 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
11926 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
11927 | fi | |
067d23c9 | 11928 | fi |
f199cab1 | 11929 | |
5476a9a4 GM |
11930 | if test $succeeded = yes; then |
11931 | HAVE_FREETYPE=yes | |
11932 | else | |
11933 | HAVE_FREETYPE=no | |
11934 | fi | |
f199cab1 | 11935 | |
f199cab1 | 11936 | |
5476a9a4 GM |
11937 | test "$HAVE_FREETYPE" = "no" && as_fn_error "libxft requires libfreetype" "$LINENO" 5 |
11938 | fi | |
f199cab1 | 11939 | |
5476a9a4 GM |
11940 | HAVE_LIBOTF=no |
11941 | if test "${HAVE_FREETYPE}" = "yes"; then | |
f199cab1 | 11942 | |
5476a9a4 | 11943 | $as_echo "#define HAVE_FREETYPE 1" >>confdefs.h |
f199cab1 | 11944 | |
5476a9a4 | 11945 | if test "${with_libotf}" != "no"; then |
f199cab1 | 11946 | |
5476a9a4 | 11947 | succeeded=no |
f199cab1 | 11948 | |
5476a9a4 GM |
11949 | if test "$PKG_CONFIG" = "no" ; then |
11950 | HAVE_LIBOTF=no | |
11951 | else | |
11952 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
11953 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
11954 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libotf" >&5 | |
11955 | $as_echo_n "checking for libotf... " >&6; } | |
f199cab1 | 11956 | |
5476a9a4 GM |
11957 | if $PKG_CONFIG --exists "libotf" 2>&5 && |
11958 | LIBOTF_CFLAGS=`$PKG_CONFIG --cflags "libotf" 2>&5` && | |
11959 | LIBOTF_LIBS=`$PKG_CONFIG --libs "libotf" 2>&5`; then | |
11960 | edit_cflags=" | |
11961 | s,///*,/,g | |
11962 | s/^/ / | |
11963 | s/ -I/ $isystem/g | |
11964 | s/^ // | |
11965 | " | |
11966 | LIBOTF_CFLAGS=`$as_echo "$LIBOTF_CFLAGS" | sed -e "$edit_cflags"` | |
11967 | LIBOTF_LIBS=`$as_echo "$LIBOTF_LIBS" | sed -e 's,///*,/,g'` | |
11968 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$LIBOTF_CFLAGS' LIBS='$LIBOTF_LIBS'" >&5 | |
11969 | $as_echo "yes CFLAGS='$LIBOTF_CFLAGS' LIBS='$LIBOTF_LIBS'" >&6; } | |
11970 | succeeded=yes | |
11971 | else | |
11972 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
11973 | $as_echo "no" >&6; } | |
11974 | LIBOTF_CFLAGS="" | |
11975 | LIBOTF_LIBS="" | |
11976 | ## If we have a custom action on failure, don't print errors, but | |
11977 | ## do set a variable so people can do so. | |
11978 | LIBOTF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libotf"` | |
067d23c9 | 11979 | |
5476a9a4 | 11980 | fi |
f199cab1 GM |
11981 | |
11982 | ||
067d23c9 | 11983 | |
5476a9a4 GM |
11984 | else |
11985 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
11986 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
11987 | fi | |
11988 | fi | |
f199cab1 | 11989 | |
5476a9a4 GM |
11990 | if test $succeeded = yes; then |
11991 | HAVE_LIBOTF=yes | |
11992 | else | |
11993 | HAVE_LIBOTF=no | |
11994 | fi | |
f199cab1 | 11995 | |
5476a9a4 | 11996 | if test "$HAVE_LIBOTF" = "yes"; then |
f199cab1 | 11997 | |
5476a9a4 | 11998 | $as_echo "#define HAVE_LIBOTF 1" >>confdefs.h |
f199cab1 | 11999 | |
5476a9a4 GM |
12000 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTF_get_variation_glyphs in -lotf" >&5 |
12001 | $as_echo_n "checking for OTF_get_variation_glyphs in -lotf... " >&6; } | |
12002 | if test "${ac_cv_lib_otf_OTF_get_variation_glyphs+set}" = set; then : | |
067d23c9 KY |
12003 | $as_echo_n "(cached) " >&6 |
12004 | else | |
5476a9a4 GM |
12005 | ac_check_lib_save_LIBS=$LIBS |
12006 | LIBS="-lotf $LIBS" | |
12007 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
067d23c9 | 12008 | /* end confdefs.h. */ |
5476a9a4 GM |
12009 | |
12010 | /* Override any GCC internal prototype to avoid an error. | |
12011 | Use char because int might match the return type of a GCC | |
12012 | builtin and then its argument prototype would still apply. */ | |
12013 | #ifdef __cplusplus | |
12014 | extern "C" | |
12015 | #endif | |
12016 | char OTF_get_variation_glyphs (); | |
067d23c9 KY |
12017 | int |
12018 | main () | |
12019 | { | |
5476a9a4 | 12020 | return OTF_get_variation_glyphs (); |
067d23c9 KY |
12021 | ; |
12022 | return 0; | |
12023 | } | |
12024 | _ACEOF | |
5476a9a4 GM |
12025 | if ac_fn_c_try_link "$LINENO"; then : |
12026 | ac_cv_lib_otf_OTF_get_variation_glyphs=yes | |
067d23c9 | 12027 | else |
5476a9a4 | 12028 | ac_cv_lib_otf_OTF_get_variation_glyphs=no |
067d23c9 | 12029 | fi |
5476a9a4 GM |
12030 | rm -f core conftest.err conftest.$ac_objext \ |
12031 | conftest$ac_exeext conftest.$ac_ext | |
12032 | LIBS=$ac_check_lib_save_LIBS | |
12033 | fi | |
12034 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_otf_OTF_get_variation_glyphs" >&5 | |
12035 | $as_echo "$ac_cv_lib_otf_OTF_get_variation_glyphs" >&6; } | |
12036 | if test "x$ac_cv_lib_otf_OTF_get_variation_glyphs" = x""yes; then : | |
12037 | HAVE_OTF_GET_VARIATION_GLYPHS=yes | |
12038 | else | |
12039 | HAVE_OTF_GET_VARIATION_GLYPHS=no | |
067d23c9 | 12040 | fi |
067d23c9 | 12041 | |
5476a9a4 GM |
12042 | if test "${HAVE_OTF_GET_VARIATION_GLYPHS}" = "yes"; then |
12043 | ||
12044 | $as_echo "#define HAVE_OTF_GET_VARIATION_GLYPHS 1" >>confdefs.h | |
12045 | ||
12046 | fi | |
12047 | fi | |
12048 | fi | |
12049 | fi | |
12050 | ||
12051 | HAVE_M17N_FLT=no | |
12052 | if test "${HAVE_LIBOTF}" = yes; then | |
12053 | if test "${with_m17n_flt}" != "no"; then | |
12054 | ||
12055 | succeeded=no | |
12056 | ||
12057 | if test "$PKG_CONFIG" = "no" ; then | |
12058 | HAVE_M17N_FLT=no | |
12059 | else | |
12060 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
12061 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
12062 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for m17n-flt" >&5 | |
12063 | $as_echo_n "checking for m17n-flt... " >&6; } | |
12064 | ||
12065 | if $PKG_CONFIG --exists "m17n-flt" 2>&5 && | |
12066 | M17N_FLT_CFLAGS=`$PKG_CONFIG --cflags "m17n-flt" 2>&5` && | |
12067 | M17N_FLT_LIBS=`$PKG_CONFIG --libs "m17n-flt" 2>&5`; then | |
12068 | edit_cflags=" | |
12069 | s,///*,/,g | |
12070 | s/^/ / | |
12071 | s/ -I/ $isystem/g | |
12072 | s/^ // | |
12073 | " | |
12074 | M17N_FLT_CFLAGS=`$as_echo "$M17N_FLT_CFLAGS" | sed -e "$edit_cflags"` | |
12075 | M17N_FLT_LIBS=`$as_echo "$M17N_FLT_LIBS" | sed -e 's,///*,/,g'` | |
12076 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$M17N_FLT_CFLAGS' LIBS='$M17N_FLT_LIBS'" >&5 | |
12077 | $as_echo "yes CFLAGS='$M17N_FLT_CFLAGS' LIBS='$M17N_FLT_LIBS'" >&6; } | |
12078 | succeeded=yes | |
12079 | else | |
12080 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
12081 | $as_echo "no" >&6; } | |
12082 | M17N_FLT_CFLAGS="" | |
12083 | M17N_FLT_LIBS="" | |
12084 | ## If we have a custom action on failure, don't print errors, but | |
12085 | ## do set a variable so people can do so. | |
12086 | M17N_FLT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "m17n-flt"` | |
12087 | ||
12088 | fi | |
12089 | ||
12090 | ||
067d23c9 | 12091 | |
5476a9a4 GM |
12092 | else |
12093 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
12094 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
12095 | fi | |
f199cab1 | 12096 | fi |
067d23c9 | 12097 | |
5476a9a4 GM |
12098 | if test $succeeded = yes; then |
12099 | HAVE_M17N_FLT=yes | |
12100 | else | |
12101 | HAVE_M17N_FLT=no | |
12102 | fi | |
12103 | ||
12104 | if test "$HAVE_M17N_FLT" = "yes"; then | |
12105 | ||
12106 | $as_echo "#define HAVE_M17N_FLT 1" >>confdefs.h | |
12107 | ||
12108 | fi | |
12109 | fi | |
12110 | fi | |
12111 | else | |
12112 | HAVE_XFT=no | |
12113 | HAVE_FREETYPE=no | |
12114 | HAVE_LIBOTF=no | |
12115 | HAVE_M17N_FLT=no | |
12116 | fi | |
12117 | ||
12118 | ### End of font-backend (under X11) section. | |
12119 | ||
12120 | ||
067d23c9 | 12121 | |
067d23c9 | 12122 | |
5476a9a4 GM |
12123 | |
12124 | ||
12125 | ||
12126 | ||
12127 | ||
12128 | ||
12129 | ### Use -lXpm if available, unless `--with-xpm=no'. | |
12130 | HAVE_XPM=no | |
12131 | LIBXPM= | |
12132 | if test "${HAVE_X11}" = "yes"; then | |
12133 | if test "${with_xpm}" != "no"; then | |
12134 | ac_fn_c_check_header_mongrel "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "$ac_includes_default" | |
12135 | if test "x$ac_cv_header_X11_xpm_h" = x""yes; then : | |
12136 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReadFileToPixmap in -lXpm" >&5 | |
12137 | $as_echo_n "checking for XpmReadFileToPixmap in -lXpm... " >&6; } | |
12138 | if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then : | |
f199cab1 GM |
12139 | $as_echo_n "(cached) " >&6 |
12140 | else | |
5476a9a4 GM |
12141 | ac_check_lib_save_LIBS=$LIBS |
12142 | LIBS="-lXpm -lX11 $LIBS" | |
12143 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
067d23c9 KY |
12144 | /* end confdefs.h. */ |
12145 | ||
5476a9a4 GM |
12146 | /* Override any GCC internal prototype to avoid an error. |
12147 | Use char because int might match the return type of a GCC | |
12148 | builtin and then its argument prototype would still apply. */ | |
12149 | #ifdef __cplusplus | |
12150 | extern "C" | |
12151 | #endif | |
12152 | char XpmReadFileToPixmap (); | |
067d23c9 KY |
12153 | int |
12154 | main () | |
12155 | { | |
5476a9a4 | 12156 | return XpmReadFileToPixmap (); |
067d23c9 KY |
12157 | ; |
12158 | return 0; | |
12159 | } | |
12160 | _ACEOF | |
5476a9a4 GM |
12161 | if ac_fn_c_try_link "$LINENO"; then : |
12162 | ac_cv_lib_Xpm_XpmReadFileToPixmap=yes | |
067d23c9 | 12163 | else |
5476a9a4 | 12164 | ac_cv_lib_Xpm_XpmReadFileToPixmap=no |
067d23c9 | 12165 | fi |
5476a9a4 GM |
12166 | rm -f core conftest.err conftest.$ac_objext \ |
12167 | conftest$ac_exeext conftest.$ac_ext | |
12168 | LIBS=$ac_check_lib_save_LIBS | |
12169 | fi | |
12170 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5 | |
12171 | $as_echo "$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6; } | |
12172 | if test "x$ac_cv_lib_Xpm_XpmReadFileToPixmap" = x""yes; then : | |
12173 | HAVE_XPM=yes | |
f199cab1 | 12174 | fi |
067d23c9 KY |
12175 | |
12176 | fi | |
12177 | ||
12178 | ||
5476a9a4 GM |
12179 | if test "${HAVE_XPM}" = "yes"; then |
12180 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReturnAllocPixels preprocessor define" >&5 | |
12181 | $as_echo_n "checking for XpmReturnAllocPixels preprocessor define... " >&6; } | |
12182 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12183 | /* end confdefs.h. */ | |
12184 | #include "X11/xpm.h" | |
12185 | #ifndef XpmReturnAllocPixels | |
12186 | no_return_alloc_pixels | |
12187 | #endif | |
067d23c9 | 12188 | |
067d23c9 | 12189 | _ACEOF |
5476a9a4 GM |
12190 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
12191 | $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then : | |
12192 | HAVE_XPM=no | |
12193 | else | |
12194 | HAVE_XPM=yes | |
12195 | fi | |
12196 | rm -f conftest* | |
067d23c9 | 12197 | |
067d23c9 | 12198 | |
5476a9a4 GM |
12199 | if test "${HAVE_XPM}" = "yes"; then |
12200 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
12201 | $as_echo "yes" >&6; } | |
12202 | else | |
12203 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
12204 | $as_echo "no" >&6; } | |
12205 | fi | |
12206 | fi | |
12207 | fi | |
067d23c9 | 12208 | |
5476a9a4 | 12209 | if test "${HAVE_XPM}" = "yes"; then |
067d23c9 | 12210 | |
5476a9a4 | 12211 | $as_echo "#define HAVE_XPM 1" >>confdefs.h |
067d23c9 | 12212 | |
5476a9a4 GM |
12213 | LIBXPM=-lXpm |
12214 | fi | |
067d23c9 KY |
12215 | fi |
12216 | ||
f199cab1 | 12217 | |
5476a9a4 GM |
12218 | ### Use -ljpeg if available, unless `--with-jpeg=no'. |
12219 | HAVE_JPEG=no | |
12220 | LIBJPEG= | |
12221 | if test "${HAVE_X11}" = "yes"; then | |
12222 | if test "${with_jpeg}" != "no"; then | |
12223 | ac_fn_c_check_header_mongrel "$LINENO" "jerror.h" "ac_cv_header_jerror_h" "$ac_includes_default" | |
12224 | if test "x$ac_cv_header_jerror_h" = x""yes; then : | |
12225 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_destroy_compress in -ljpeg" >&5 | |
12226 | $as_echo_n "checking for jpeg_destroy_compress in -ljpeg... " >&6; } | |
12227 | if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then : | |
067d23c9 KY |
12228 | $as_echo_n "(cached) " >&6 |
12229 | else | |
5476a9a4 GM |
12230 | ac_check_lib_save_LIBS=$LIBS |
12231 | LIBS="-ljpeg $LIBS" | |
12232 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
067d23c9 | 12233 | /* end confdefs.h. */ |
f199cab1 | 12234 | |
5476a9a4 GM |
12235 | /* Override any GCC internal prototype to avoid an error. |
12236 | Use char because int might match the return type of a GCC | |
12237 | builtin and then its argument prototype would still apply. */ | |
12238 | #ifdef __cplusplus | |
12239 | extern "C" | |
12240 | #endif | |
12241 | char jpeg_destroy_compress (); | |
067d23c9 KY |
12242 | int |
12243 | main () | |
12244 | { | |
5476a9a4 | 12245 | return jpeg_destroy_compress (); |
067d23c9 KY |
12246 | ; |
12247 | return 0; | |
12248 | } | |
12249 | _ACEOF | |
12250 | if ac_fn_c_try_link "$LINENO"; then : | |
5476a9a4 | 12251 | ac_cv_lib_jpeg_jpeg_destroy_compress=yes |
067d23c9 | 12252 | else |
5476a9a4 | 12253 | ac_cv_lib_jpeg_jpeg_destroy_compress=no |
067d23c9 KY |
12254 | fi |
12255 | rm -f core conftest.err conftest.$ac_objext \ | |
12256 | conftest$ac_exeext conftest.$ac_ext | |
5476a9a4 GM |
12257 | LIBS=$ac_check_lib_save_LIBS |
12258 | fi | |
12259 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5 | |
12260 | $as_echo "$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6; } | |
12261 | if test "x$ac_cv_lib_jpeg_jpeg_destroy_compress" = x""yes; then : | |
12262 | HAVE_JPEG=yes | |
12263 | fi | |
12264 | ||
067d23c9 | 12265 | fi |
f199cab1 | 12266 | |
f199cab1 GM |
12267 | |
12268 | fi | |
067d23c9 | 12269 | |
5476a9a4 GM |
12270 | if test "${HAVE_JPEG}" = "yes"; then |
12271 | $as_echo "#define HAVE_JPEG 1" >>confdefs.h | |
f199cab1 | 12272 | |
5476a9a4 GM |
12273 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
12274 | /* end confdefs.h. */ | |
12275 | #include <jpeglib.h> | |
12276 | version=JPEG_LIB_VERSION | |
f199cab1 | 12277 | |
5476a9a4 GM |
12278 | _ACEOF |
12279 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
12280 | $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then : | |
12281 | $as_echo "#define HAVE_JPEG 1" >>confdefs.h | |
f199cab1 | 12282 | |
5476a9a4 GM |
12283 | else |
12284 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libjpeg found, but not version 6b or later" >&5 | |
12285 | $as_echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;} | |
12286 | HAVE_JPEG=no | |
067d23c9 | 12287 | fi |
5476a9a4 | 12288 | rm -f conftest* |
067d23c9 | 12289 | |
5476a9a4 GM |
12290 | fi |
12291 | if test "${HAVE_JPEG}" = "yes"; then | |
12292 | LIBJPEG=-ljpeg | |
12293 | fi | |
12294 | fi | |
067d23c9 KY |
12295 | |
12296 | ||
5476a9a4 GM |
12297 | ### Use -lpng if available, unless `--with-png=no'. |
12298 | HAVE_PNG=no | |
12299 | LIBPNG= | |
12300 | if test "${HAVE_X11}" = "yes"; then | |
12301 | if test "${with_png}" != "no"; then | |
12302 | # Debian unstable as of July 2003 has multiple libpngs, and puts png.h | |
12303 | # in /usr/include/libpng. | |
12304 | for ac_header in png.h libpng/png.h | |
12305 | do : | |
12306 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
12307 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
12308 | eval as_val=\$$as_ac_Header | |
12309 | if test "x$as_val" = x""yes; then : | |
12310 | cat >>confdefs.h <<_ACEOF | |
12311 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
12312 | _ACEOF | |
12313 | break | |
12314 | fi | |
067d23c9 | 12315 | |
5476a9a4 | 12316 | done |
067d23c9 | 12317 | |
5476a9a4 GM |
12318 | if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then |
12319 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_get_channels in -lpng" >&5 | |
12320 | $as_echo_n "checking for png_get_channels in -lpng... " >&6; } | |
12321 | if test "${ac_cv_lib_png_png_get_channels+set}" = set; then : | |
12322 | $as_echo_n "(cached) " >&6 | |
12323 | else | |
12324 | ac_check_lib_save_LIBS=$LIBS | |
12325 | LIBS="-lpng -lz -lm $LIBS" | |
12326 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12327 | /* end confdefs.h. */ | |
067d23c9 | 12328 | |
5476a9a4 GM |
12329 | /* Override any GCC internal prototype to avoid an error. |
12330 | Use char because int might match the return type of a GCC | |
12331 | builtin and then its argument prototype would still apply. */ | |
12332 | #ifdef __cplusplus | |
12333 | extern "C" | |
12334 | #endif | |
12335 | char png_get_channels (); | |
12336 | int | |
12337 | main () | |
12338 | { | |
12339 | return png_get_channels (); | |
12340 | ; | |
12341 | return 0; | |
12342 | } | |
12343 | _ACEOF | |
12344 | if ac_fn_c_try_link "$LINENO"; then : | |
12345 | ac_cv_lib_png_png_get_channels=yes | |
f199cab1 | 12346 | else |
5476a9a4 GM |
12347 | ac_cv_lib_png_png_get_channels=no |
12348 | fi | |
12349 | rm -f core conftest.err conftest.$ac_objext \ | |
12350 | conftest$ac_exeext conftest.$ac_ext | |
12351 | LIBS=$ac_check_lib_save_LIBS | |
12352 | fi | |
12353 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_png_png_get_channels" >&5 | |
12354 | $as_echo "$ac_cv_lib_png_png_get_channels" >&6; } | |
12355 | if test "x$ac_cv_lib_png_png_get_channels" = x""yes; then : | |
12356 | HAVE_PNG=yes | |
f199cab1 | 12357 | fi |
067d23c9 | 12358 | |
5476a9a4 GM |
12359 | fi |
12360 | fi | |
7834125e | 12361 | |
5476a9a4 GM |
12362 | if test "${HAVE_PNG}" = "yes"; then |
12363 | ||
12364 | $as_echo "#define HAVE_PNG 1" >>confdefs.h | |
12365 | ||
12366 | LIBPNG="-lpng -lz -lm" | |
12367 | ||
12368 | ac_fn_c_check_decl "$LINENO" "png_longjmp" "ac_cv_have_decl_png_longjmp" "#ifdef HAVE_LIBPNG_PNG_H | |
12369 | # include <libpng/png.h> | |
12370 | #else | |
12371 | # include <png.h> | |
12372 | #endif | |
12373 | ||
12374 | " | |
12375 | if test "x$ac_cv_have_decl_png_longjmp" = x""yes; then : | |
12376 | ||
12377 | else | |
7834125e | 12378 | |
5476a9a4 | 12379 | $as_echo "#define PNG_DEPSTRUCT /**/" >>confdefs.h |
7834125e | 12380 | |
f199cab1 | 12381 | fi |
7834125e | 12382 | |
5476a9a4 GM |
12383 | fi |
12384 | fi | |
7834125e GM |
12385 | |
12386 | ||
5476a9a4 GM |
12387 | ### Use -ltiff if available, unless `--with-tiff=no'. |
12388 | HAVE_TIFF=no | |
12389 | LIBTIFF= | |
12390 | if test "${HAVE_X11}" = "yes"; then | |
12391 | if test "${with_tiff}" != "no"; then | |
12392 | ac_fn_c_check_header_mongrel "$LINENO" "tiffio.h" "ac_cv_header_tiffio_h" "$ac_includes_default" | |
12393 | if test "x$ac_cv_header_tiffio_h" = x""yes; then : | |
12394 | tifflibs="-lz -lm" | |
12395 | # At least one tiff package requires the jpeg library. | |
12396 | if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi | |
12397 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIFFGetVersion in -ltiff" >&5 | |
12398 | $as_echo_n "checking for TIFFGetVersion in -ltiff... " >&6; } | |
12399 | if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then : | |
f199cab1 GM |
12400 | $as_echo_n "(cached) " >&6 |
12401 | else | |
5476a9a4 GM |
12402 | ac_check_lib_save_LIBS=$LIBS |
12403 | LIBS="-ltiff $tifflibs $LIBS" | |
12404 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
f199cab1 | 12405 | /* end confdefs.h. */ |
067d23c9 | 12406 | |
5476a9a4 GM |
12407 | /* Override any GCC internal prototype to avoid an error. |
12408 | Use char because int might match the return type of a GCC | |
12409 | builtin and then its argument prototype would still apply. */ | |
12410 | #ifdef __cplusplus | |
12411 | extern "C" | |
f199cab1 | 12412 | #endif |
5476a9a4 GM |
12413 | char TIFFGetVersion (); |
12414 | int | |
12415 | main () | |
12416 | { | |
12417 | return TIFFGetVersion (); | |
12418 | ; | |
12419 | return 0; | |
12420 | } | |
f199cab1 | 12421 | _ACEOF |
5476a9a4 GM |
12422 | if ac_fn_c_try_link "$LINENO"; then : |
12423 | ac_cv_lib_tiff_TIFFGetVersion=yes | |
f199cab1 | 12424 | else |
5476a9a4 | 12425 | ac_cv_lib_tiff_TIFFGetVersion=no |
f199cab1 | 12426 | fi |
5476a9a4 GM |
12427 | rm -f core conftest.err conftest.$ac_objext \ |
12428 | conftest$ac_exeext conftest.$ac_ext | |
12429 | LIBS=$ac_check_lib_save_LIBS | |
f199cab1 | 12430 | fi |
5476a9a4 GM |
12431 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5 |
12432 | $as_echo "$ac_cv_lib_tiff_TIFFGetVersion" >&6; } | |
12433 | if test "x$ac_cv_lib_tiff_TIFFGetVersion" = x""yes; then : | |
12434 | HAVE_TIFF=yes | |
f199cab1 | 12435 | fi |
067d23c9 | 12436 | |
5476a9a4 | 12437 | fi |
067d23c9 | 12438 | |
067d23c9 | 12439 | |
5476a9a4 | 12440 | fi |
f199cab1 | 12441 | |
5476a9a4 | 12442 | if test "${HAVE_TIFF}" = "yes"; then |
067d23c9 | 12443 | |
5476a9a4 | 12444 | $as_echo "#define HAVE_TIFF 1" >>confdefs.h |
067d23c9 | 12445 | |
5476a9a4 GM |
12446 | LIBTIFF=-ltiff |
12447 | fi | |
f199cab1 | 12448 | fi |
067d23c9 | 12449 | |
067d23c9 | 12450 | |
5476a9a4 GM |
12451 | ### Use -lgif or -lungif if available, unless `--with-gif=no'. |
12452 | HAVE_GIF=no | |
12453 | LIBGIF= | |
12454 | if test "${HAVE_X11}" = "yes" && test "${with_gif}" != "no"; then | |
12455 | ac_fn_c_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default" | |
12456 | if test "x$ac_cv_header_gif_lib_h" = x""yes; then : | |
12457 | # EGifPutExtensionLast only exists from version libungif-4.1.0b1. | |
12458 | # Earlier versions can crash Emacs. | |
12459 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lgif" >&5 | |
12460 | $as_echo_n "checking for EGifPutExtensionLast in -lgif... " >&6; } | |
12461 | if test "${ac_cv_lib_gif_EGifPutExtensionLast+set}" = set; then : | |
f199cab1 GM |
12462 | $as_echo_n "(cached) " >&6 |
12463 | else | |
5476a9a4 GM |
12464 | ac_check_lib_save_LIBS=$LIBS |
12465 | LIBS="-lgif $LIBS" | |
12466 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
f199cab1 | 12467 | /* end confdefs.h. */ |
067d23c9 | 12468 | |
5476a9a4 GM |
12469 | /* Override any GCC internal prototype to avoid an error. |
12470 | Use char because int might match the return type of a GCC | |
12471 | builtin and then its argument prototype would still apply. */ | |
12472 | #ifdef __cplusplus | |
12473 | extern "C" | |
12474 | #endif | |
12475 | char EGifPutExtensionLast (); | |
f199cab1 GM |
12476 | int |
12477 | main () | |
12478 | { | |
5476a9a4 | 12479 | return EGifPutExtensionLast (); |
f199cab1 GM |
12480 | ; |
12481 | return 0; | |
12482 | } | |
12483 | _ACEOF | |
5476a9a4 GM |
12484 | if ac_fn_c_try_link "$LINENO"; then : |
12485 | ac_cv_lib_gif_EGifPutExtensionLast=yes | |
f199cab1 | 12486 | else |
5476a9a4 | 12487 | ac_cv_lib_gif_EGifPutExtensionLast=no |
f199cab1 | 12488 | fi |
5476a9a4 GM |
12489 | rm -f core conftest.err conftest.$ac_objext \ |
12490 | conftest$ac_exeext conftest.$ac_ext | |
12491 | LIBS=$ac_check_lib_save_LIBS | |
12492 | fi | |
12493 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_EGifPutExtensionLast" >&5 | |
12494 | $as_echo "$ac_cv_lib_gif_EGifPutExtensionLast" >&6; } | |
12495 | if test "x$ac_cv_lib_gif_EGifPutExtensionLast" = x""yes; then : | |
12496 | HAVE_GIF=yes | |
12497 | else | |
12498 | HAVE_GIF=maybe | |
f199cab1 | 12499 | fi |
067d23c9 | 12500 | |
5476a9a4 GM |
12501 | fi |
12502 | ||
12503 | ||
12504 | ||
12505 | if test "$HAVE_GIF" = yes; then | |
12506 | LIBGIF=-lgif | |
12507 | elif test "$HAVE_GIF" = maybe; then | |
12508 | # If gif_lib.h but no libgif, try libungif. | |
12509 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lungif" >&5 | |
12510 | $as_echo_n "checking for EGifPutExtensionLast in -lungif... " >&6; } | |
12511 | if test "${ac_cv_lib_ungif_EGifPutExtensionLast+set}" = set; then : | |
f199cab1 GM |
12512 | $as_echo_n "(cached) " >&6 |
12513 | else | |
5476a9a4 GM |
12514 | ac_check_lib_save_LIBS=$LIBS |
12515 | LIBS="-lungif $LIBS" | |
12516 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
f199cab1 | 12517 | /* end confdefs.h. */ |
f199cab1 | 12518 | |
5476a9a4 GM |
12519 | /* Override any GCC internal prototype to avoid an error. |
12520 | Use char because int might match the return type of a GCC | |
12521 | builtin and then its argument prototype would still apply. */ | |
12522 | #ifdef __cplusplus | |
12523 | extern "C" | |
12524 | #endif | |
12525 | char EGifPutExtensionLast (); | |
f199cab1 GM |
12526 | int |
12527 | main () | |
12528 | { | |
5476a9a4 | 12529 | return EGifPutExtensionLast (); |
f199cab1 GM |
12530 | ; |
12531 | return 0; | |
12532 | } | |
12533 | _ACEOF | |
5476a9a4 GM |
12534 | if ac_fn_c_try_link "$LINENO"; then : |
12535 | ac_cv_lib_ungif_EGifPutExtensionLast=yes | |
f199cab1 | 12536 | else |
5476a9a4 | 12537 | ac_cv_lib_ungif_EGifPutExtensionLast=no |
f199cab1 | 12538 | fi |
5476a9a4 GM |
12539 | rm -f core conftest.err conftest.$ac_objext \ |
12540 | conftest$ac_exeext conftest.$ac_ext | |
12541 | LIBS=$ac_check_lib_save_LIBS | |
f199cab1 | 12542 | fi |
5476a9a4 GM |
12543 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5 |
12544 | $as_echo "$ac_cv_lib_ungif_EGifPutExtensionLast" >&6; } | |
12545 | if test "x$ac_cv_lib_ungif_EGifPutExtensionLast" = x""yes; then : | |
12546 | HAVE_GIF=yes | |
12547 | else | |
12548 | HAVE_GIF=no | |
12549 | fi | |
12550 | ||
12551 | test "$HAVE_GIF" = yes && LIBGIF=-lungif | |
12552 | fi | |
12553 | ||
12554 | if test "${HAVE_GIF}" = "yes"; then | |
12555 | ||
12556 | $as_echo "#define HAVE_GIF 1" >>confdefs.h | |
12557 | ||
12558 | fi | |
12559 | fi | |
12560 | ||
12561 | ||
12562 | if test "${HAVE_X11}" = "yes"; then | |
12563 | MISSING="" | |
12564 | WITH_NO="" | |
12565 | test "${with_xpm}" != "no" && test "${HAVE_XPM}" != "yes" && | |
12566 | MISSING="libXpm" && WITH_NO="--with-xpm=no" | |
12567 | test "${with_jpeg}" != "no" && test "${HAVE_JPEG}" != "yes" && | |
12568 | MISSING="$MISSING libjpeg" && WITH_NO="$WITH_NO --with-jpeg=no" | |
12569 | test "${with_png}" != "no" && test "${HAVE_PNG}" != "yes" && | |
12570 | MISSING="$MISSING libpng" && WITH_NO="$WITH_NO --with-png=no" | |
12571 | test "${with_gif}" != "no" && test "${HAVE_GIF}" != "yes" && | |
12572 | MISSING="$MISSING libgif/libungif" && WITH_NO="$WITH_NO --with-gif=no" | |
12573 | test "${with_tiff}" != "no" && test "${HAVE_TIFF}" != "yes" && | |
12574 | MISSING="$MISSING libtiff" && WITH_NO="$WITH_NO --with-tiff=no" | |
12575 | ||
12576 | if test "X${MISSING}" != X; then | |
12577 | as_fn_error "The following required libraries were not found: | |
12578 | $MISSING | |
12579 | Maybe some development libraries/packages are missing? | |
12580 | If you don't want to link with them give | |
12581 | $WITH_NO | |
12582 | as options to configure" "$LINENO" 5 | |
12583 | fi | |
12584 | fi | |
12585 | ||
12586 | ### Use -lgpm if available, unless `--with-gpm=no'. | |
12587 | HAVE_GPM=no | |
12588 | LIBGPM= | |
12589 | if test "${with_gpm}" != "no"; then | |
12590 | ac_fn_c_check_header_mongrel "$LINENO" "gpm.h" "ac_cv_header_gpm_h" "$ac_includes_default" | |
12591 | if test "x$ac_cv_header_gpm_h" = x""yes; then : | |
12592 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Gpm_Open in -lgpm" >&5 | |
12593 | $as_echo_n "checking for Gpm_Open in -lgpm... " >&6; } | |
12594 | if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then : | |
067d23c9 KY |
12595 | $as_echo_n "(cached) " >&6 |
12596 | else | |
5476a9a4 GM |
12597 | ac_check_lib_save_LIBS=$LIBS |
12598 | LIBS="-lgpm $LIBS" | |
12599 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
067d23c9 KY |
12600 | /* end confdefs.h. */ |
12601 | ||
5476a9a4 GM |
12602 | /* Override any GCC internal prototype to avoid an error. |
12603 | Use char because int might match the return type of a GCC | |
12604 | builtin and then its argument prototype would still apply. */ | |
12605 | #ifdef __cplusplus | |
12606 | extern "C" | |
12607 | #endif | |
12608 | char Gpm_Open (); | |
067d23c9 KY |
12609 | int |
12610 | main () | |
12611 | { | |
5476a9a4 | 12612 | return Gpm_Open (); |
067d23c9 KY |
12613 | ; |
12614 | return 0; | |
12615 | } | |
12616 | _ACEOF | |
5476a9a4 GM |
12617 | if ac_fn_c_try_link "$LINENO"; then : |
12618 | ac_cv_lib_gpm_Gpm_Open=yes | |
067d23c9 | 12619 | else |
5476a9a4 | 12620 | ac_cv_lib_gpm_Gpm_Open=no |
067d23c9 | 12621 | fi |
5476a9a4 GM |
12622 | rm -f core conftest.err conftest.$ac_objext \ |
12623 | conftest$ac_exeext conftest.$ac_ext | |
12624 | LIBS=$ac_check_lib_save_LIBS | |
12625 | fi | |
12626 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gpm_Gpm_Open" >&5 | |
12627 | $as_echo "$ac_cv_lib_gpm_Gpm_Open" >&6; } | |
12628 | if test "x$ac_cv_lib_gpm_Gpm_Open" = x""yes; then : | |
12629 | HAVE_GPM=yes | |
067d23c9 | 12630 | fi |
f199cab1 | 12631 | |
5476a9a4 | 12632 | fi |
f199cab1 | 12633 | |
f199cab1 | 12634 | |
f199cab1 | 12635 | |
5476a9a4 | 12636 | if test "${HAVE_GPM}" = "yes"; then |
f199cab1 | 12637 | |
5476a9a4 | 12638 | $as_echo "#define HAVE_GPM 1" >>confdefs.h |
f199cab1 | 12639 | |
5476a9a4 GM |
12640 | LIBGPM=-lgpm |
12641 | fi | |
067d23c9 | 12642 | fi |
067d23c9 KY |
12643 | |
12644 | ||
12645 | ||
12646 | ||
12647 | ||
12648 | ||
5476a9a4 GM |
12649 | GNUSTEP_CFLAGS= |
12650 | ### Use NeXTstep API to implement GUI. | |
12651 | if test "${HAVE_NS}" = "yes"; then | |
067d23c9 | 12652 | |
5476a9a4 | 12653 | $as_echo "#define HAVE_NS 1" >>confdefs.h |
067d23c9 | 12654 | |
5476a9a4 | 12655 | if test "${NS_IMPL_COCOA}" = "yes"; then |
067d23c9 | 12656 | |
5476a9a4 | 12657 | $as_echo "#define NS_IMPL_COCOA 1" >>confdefs.h |
f199cab1 | 12658 | |
5476a9a4 GM |
12659 | fi |
12660 | if test "${NS_IMPL_GNUSTEP}" = "yes"; then | |
f199cab1 | 12661 | |
5476a9a4 | 12662 | $as_echo "#define NS_IMPL_GNUSTEP 1" >>confdefs.h |
f199cab1 | 12663 | |
5476a9a4 GM |
12664 | # See also .m.o rule in Makefile.in */ |
12665 | # FIXME: are all these flags really needed? Document here why. */ | |
12666 | GNUSTEP_CFLAGS="-D_REENTRANT -fPIC -fno-strict-aliasing -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}" | |
12667 | ## Extra CFLAGS applied to src/*.m files. | |
12668 | GNU_OBJC_CFLAGS="$GNU_OBJC_CFLAGS -fgnu-runtime -Wno-import -fconstant-string-class=NSConstantString -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGSWARN -DGSDIAGNOSE" | |
12669 | fi | |
12670 | # We also have mouse menus. | |
12671 | HAVE_MENUS=yes | |
12672 | OTHER_FILES=ns-app | |
12673 | fi | |
f199cab1 GM |
12674 | |
12675 | ||
5476a9a4 GM |
12676 | ### Use session management (-lSM -lICE) if available |
12677 | HAVE_X_SM=no | |
12678 | LIBXSM= | |
12679 | if test "${HAVE_X11}" = "yes"; then | |
12680 | ac_fn_c_check_header_mongrel "$LINENO" "X11/SM/SMlib.h" "ac_cv_header_X11_SM_SMlib_h" "$ac_includes_default" | |
12681 | if test "x$ac_cv_header_X11_SM_SMlib_h" = x""yes; then : | |
12682 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SmcOpenConnection in -lSM" >&5 | |
12683 | $as_echo_n "checking for SmcOpenConnection in -lSM... " >&6; } | |
12684 | if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then : | |
067d23c9 KY |
12685 | $as_echo_n "(cached) " >&6 |
12686 | else | |
5476a9a4 GM |
12687 | ac_check_lib_save_LIBS=$LIBS |
12688 | LIBS="-lSM -lICE $LIBS" | |
12689 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
067d23c9 KY |
12690 | /* end confdefs.h. */ |
12691 | ||
5476a9a4 GM |
12692 | /* Override any GCC internal prototype to avoid an error. |
12693 | Use char because int might match the return type of a GCC | |
12694 | builtin and then its argument prototype would still apply. */ | |
12695 | #ifdef __cplusplus | |
12696 | extern "C" | |
12697 | #endif | |
12698 | char SmcOpenConnection (); | |
f199cab1 GM |
12699 | int |
12700 | main () | |
12701 | { | |
5476a9a4 GM |
12702 | return SmcOpenConnection (); |
12703 | ; | |
12704 | return 0; | |
f199cab1 | 12705 | } |
067d23c9 | 12706 | _ACEOF |
5476a9a4 GM |
12707 | if ac_fn_c_try_link "$LINENO"; then : |
12708 | ac_cv_lib_SM_SmcOpenConnection=yes | |
067d23c9 | 12709 | else |
5476a9a4 | 12710 | ac_cv_lib_SM_SmcOpenConnection=no |
f199cab1 | 12711 | fi |
5476a9a4 GM |
12712 | rm -f core conftest.err conftest.$ac_objext \ |
12713 | conftest$ac_exeext conftest.$ac_ext | |
12714 | LIBS=$ac_check_lib_save_LIBS | |
12715 | fi | |
12716 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_SM_SmcOpenConnection" >&5 | |
12717 | $as_echo "$ac_cv_lib_SM_SmcOpenConnection" >&6; } | |
12718 | if test "x$ac_cv_lib_SM_SmcOpenConnection" = x""yes; then : | |
12719 | HAVE_X_SM=yes | |
067d23c9 | 12720 | fi |
067d23c9 | 12721 | |
f199cab1 | 12722 | fi |
f199cab1 | 12723 | |
f199cab1 | 12724 | |
067d23c9 | 12725 | |
5476a9a4 GM |
12726 | if test "${HAVE_X_SM}" = "yes"; then |
12727 | ||
12728 | $as_echo "#define HAVE_X_SM 1" >>confdefs.h | |
12729 | ||
12730 | LIBXSM="-lSM -lICE" | |
12731 | case "$LIBS" in | |
12732 | *-lSM*) ;; | |
12733 | *) LIBS="$LIBXSM $LIBS" ;; | |
12734 | esac | |
067d23c9 | 12735 | fi |
5476a9a4 | 12736 | fi |
067d23c9 | 12737 | |
067d23c9 | 12738 | |
5476a9a4 GM |
12739 | ### Use libxml (-lxml2) if available |
12740 | HAVE_LIBXML2=no | |
12741 | if test "${with_xml2}" != "no"; then | |
12742 | ### I'm not sure what the version number should be, so I just guessed. | |
067d23c9 | 12743 | |
5476a9a4 | 12744 | succeeded=no |
067d23c9 | 12745 | |
5476a9a4 GM |
12746 | if test "$PKG_CONFIG" = "no" ; then |
12747 | HAVE_LIBXML2=no | |
12748 | else | |
12749 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
12750 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
12751 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxml-2.0 > 2.6.17" >&5 | |
12752 | $as_echo_n "checking for libxml-2.0 > 2.6.17... " >&6; } | |
067d23c9 | 12753 | |
5476a9a4 GM |
12754 | if $PKG_CONFIG --exists "libxml-2.0 > 2.6.17" 2>&5 && |
12755 | LIBXML2_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0 > 2.6.17" 2>&5` && | |
12756 | LIBXML2_LIBS=`$PKG_CONFIG --libs "libxml-2.0 > 2.6.17" 2>&5`; then | |
12757 | edit_cflags=" | |
12758 | s,///*,/,g | |
12759 | s/^/ / | |
12760 | s/ -I/ $isystem/g | |
12761 | s/^ // | |
12762 | " | |
12763 | LIBXML2_CFLAGS=`$as_echo "$LIBXML2_CFLAGS" | sed -e "$edit_cflags"` | |
12764 | LIBXML2_LIBS=`$as_echo "$LIBXML2_LIBS" | sed -e 's,///*,/,g'` | |
12765 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$LIBXML2_CFLAGS' LIBS='$LIBXML2_LIBS'" >&5 | |
12766 | $as_echo "yes CFLAGS='$LIBXML2_CFLAGS' LIBS='$LIBXML2_LIBS'" >&6; } | |
12767 | succeeded=yes | |
12768 | else | |
12769 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
12770 | $as_echo "no" >&6; } | |
12771 | LIBXML2_CFLAGS="" | |
12772 | LIBXML2_LIBS="" | |
12773 | ## If we have a custom action on failure, don't print errors, but | |
12774 | ## do set a variable so people can do so. | |
12775 | LIBXML2_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libxml-2.0 > 2.6.17"` | |
12776 | ||
12777 | fi | |
12778 | ||
12779 | ||
12780 | ||
12781 | else | |
12782 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
12783 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
12784 | fi | |
12785 | fi | |
12786 | ||
12787 | if test $succeeded = yes; then | |
12788 | HAVE_LIBXML2=yes | |
12789 | else | |
12790 | HAVE_LIBXML2=no | |
12791 | fi | |
12792 | ||
12793 | if test "${HAVE_LIBXML2}" = "yes"; then | |
12794 | LIBS="$LIBXML2_LIBS $LIBS" | |
12795 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for htmlReadMemory in -lxml2" >&5 | |
12796 | $as_echo_n "checking for htmlReadMemory in -lxml2... " >&6; } | |
12797 | if test "${ac_cv_lib_xml2_htmlReadMemory+set}" = set; then : | |
067d23c9 KY |
12798 | $as_echo_n "(cached) " >&6 |
12799 | else | |
5476a9a4 GM |
12800 | ac_check_lib_save_LIBS=$LIBS |
12801 | LIBS="-lxml2 $LIBS" | |
12802 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
067d23c9 KY |
12803 | /* end confdefs.h. */ |
12804 | ||
5476a9a4 GM |
12805 | /* Override any GCC internal prototype to avoid an error. |
12806 | Use char because int might match the return type of a GCC | |
12807 | builtin and then its argument prototype would still apply. */ | |
12808 | #ifdef __cplusplus | |
12809 | extern "C" | |
12810 | #endif | |
12811 | char htmlReadMemory (); | |
067d23c9 KY |
12812 | int |
12813 | main () | |
12814 | { | |
5476a9a4 | 12815 | return htmlReadMemory (); |
067d23c9 KY |
12816 | ; |
12817 | return 0; | |
12818 | } | |
12819 | _ACEOF | |
5476a9a4 GM |
12820 | if ac_fn_c_try_link "$LINENO"; then : |
12821 | ac_cv_lib_xml2_htmlReadMemory=yes | |
067d23c9 | 12822 | else |
5476a9a4 | 12823 | ac_cv_lib_xml2_htmlReadMemory=no |
067d23c9 | 12824 | fi |
5476a9a4 GM |
12825 | rm -f core conftest.err conftest.$ac_objext \ |
12826 | conftest$ac_exeext conftest.$ac_ext | |
12827 | LIBS=$ac_check_lib_save_LIBS | |
12828 | fi | |
12829 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_htmlReadMemory" >&5 | |
12830 | $as_echo "$ac_cv_lib_xml2_htmlReadMemory" >&6; } | |
12831 | if test "x$ac_cv_lib_xml2_htmlReadMemory" = x""yes; then : | |
12832 | HAVE_LIBXML2=yes | |
12833 | else | |
12834 | HAVE_LIBXML2=no | |
067d23c9 KY |
12835 | fi |
12836 | ||
5476a9a4 | 12837 | if test "${HAVE_LIBXML2}" = "yes"; then |
067d23c9 | 12838 | |
5476a9a4 | 12839 | $as_echo "#define HAVE_LIBXML2 1" >>confdefs.h |
067d23c9 | 12840 | |
5476a9a4 GM |
12841 | else |
12842 | LIBXML2_LIBS="" | |
12843 | LIBXML2_CFLAGS="" | |
12844 | fi | |
067d23c9 | 12845 | fi |
5476a9a4 | 12846 | fi |
067d23c9 | 12847 | |
067d23c9 | 12848 | |
067d23c9 | 12849 | |
5476a9a4 GM |
12850 | # If netdb.h doesn't declare h_errno, we must declare it by hand. |
12851 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether netdb declares h_errno" >&5 | |
12852 | $as_echo_n "checking whether netdb declares h_errno... " >&6; } | |
12853 | if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then : | |
12854 | $as_echo_n "(cached) " >&6 | |
067d23c9 | 12855 | else |
5476a9a4 GM |
12856 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
12857 | /* end confdefs.h. */ | |
12858 | #include <netdb.h> | |
12859 | int | |
12860 | main () | |
12861 | { | |
12862 | return h_errno; | |
12863 | ; | |
12864 | return 0; | |
12865 | } | |
12866 | _ACEOF | |
12867 | if ac_fn_c_try_link "$LINENO"; then : | |
12868 | emacs_cv_netdb_declares_h_errno=yes | |
12869 | else | |
12870 | emacs_cv_netdb_declares_h_errno=no | |
067d23c9 | 12871 | fi |
5476a9a4 GM |
12872 | rm -f core conftest.err conftest.$ac_objext \ |
12873 | conftest$ac_exeext conftest.$ac_ext | |
12874 | fi | |
12875 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_netdb_declares_h_errno" >&5 | |
12876 | $as_echo "$emacs_cv_netdb_declares_h_errno" >&6; } | |
12877 | if test $emacs_cv_netdb_declares_h_errno = yes; then | |
067d23c9 | 12878 | |
5476a9a4 | 12879 | $as_echo "#define HAVE_H_ERRNO 1" >>confdefs.h |
f199cab1 | 12880 | |
5476a9a4 | 12881 | fi |
f199cab1 | 12882 | |
5476a9a4 GM |
12883 | # fmod, logb, and frexp are found in -lm on most systems. |
12884 | # On HPUX 9.01, -lm does not contain logb, so check for sqrt. | |
12885 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5 | |
12886 | $as_echo_n "checking for sqrt in -lm... " >&6; } | |
12887 | if test "${ac_cv_lib_m_sqrt+set}" = set; then : | |
12888 | $as_echo_n "(cached) " >&6 | |
12889 | else | |
12890 | ac_check_lib_save_LIBS=$LIBS | |
12891 | LIBS="-lm $LIBS" | |
12892 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12893 | /* end confdefs.h. */ | |
f199cab1 | 12894 | |
5476a9a4 GM |
12895 | /* Override any GCC internal prototype to avoid an error. |
12896 | Use char because int might match the return type of a GCC | |
12897 | builtin and then its argument prototype would still apply. */ | |
12898 | #ifdef __cplusplus | |
12899 | extern "C" | |
12900 | #endif | |
12901 | char sqrt (); | |
12902 | int | |
12903 | main () | |
12904 | { | |
12905 | return sqrt (); | |
12906 | ; | |
12907 | return 0; | |
12908 | } | |
12909 | _ACEOF | |
12910 | if ac_fn_c_try_link "$LINENO"; then : | |
12911 | ac_cv_lib_m_sqrt=yes | |
12912 | else | |
12913 | ac_cv_lib_m_sqrt=no | |
12914 | fi | |
12915 | rm -f core conftest.err conftest.$ac_objext \ | |
12916 | conftest$ac_exeext conftest.$ac_ext | |
12917 | LIBS=$ac_check_lib_save_LIBS | |
12918 | fi | |
12919 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sqrt" >&5 | |
12920 | $as_echo "$ac_cv_lib_m_sqrt" >&6; } | |
12921 | if test "x$ac_cv_lib_m_sqrt" = x""yes; then : | |
12922 | cat >>confdefs.h <<_ACEOF | |
12923 | #define HAVE_LIBM 1 | |
12924 | _ACEOF | |
f199cab1 | 12925 | |
5476a9a4 | 12926 | LIBS="-lm $LIBS" |
f199cab1 | 12927 | |
5476a9a4 | 12928 | fi |
f199cab1 | 12929 | |
f199cab1 | 12930 | |
5476a9a4 GM |
12931 | # Check for mail-locking functions in a "mail" library. Probably this should |
12932 | # have the same check as for liblockfile below. | |
12933 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -lmail" >&5 | |
12934 | $as_echo_n "checking for maillock in -lmail... " >&6; } | |
12935 | if test "${ac_cv_lib_mail_maillock+set}" = set; then : | |
067d23c9 KY |
12936 | $as_echo_n "(cached) " >&6 |
12937 | else | |
5476a9a4 GM |
12938 | ac_check_lib_save_LIBS=$LIBS |
12939 | LIBS="-lmail $LIBS" | |
12940 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
067d23c9 KY |
12941 | /* end confdefs.h. */ |
12942 | ||
5476a9a4 GM |
12943 | /* Override any GCC internal prototype to avoid an error. |
12944 | Use char because int might match the return type of a GCC | |
12945 | builtin and then its argument prototype would still apply. */ | |
12946 | #ifdef __cplusplus | |
12947 | extern "C" | |
067d23c9 | 12948 | #endif |
5476a9a4 GM |
12949 | char maillock (); |
12950 | int | |
12951 | main () | |
12952 | { | |
12953 | return maillock (); | |
12954 | ; | |
12955 | return 0; | |
12956 | } | |
067d23c9 | 12957 | _ACEOF |
5476a9a4 GM |
12958 | if ac_fn_c_try_link "$LINENO"; then : |
12959 | ac_cv_lib_mail_maillock=yes | |
067d23c9 | 12960 | else |
5476a9a4 | 12961 | ac_cv_lib_mail_maillock=no |
067d23c9 | 12962 | fi |
5476a9a4 GM |
12963 | rm -f core conftest.err conftest.$ac_objext \ |
12964 | conftest$ac_exeext conftest.$ac_ext | |
12965 | LIBS=$ac_check_lib_save_LIBS | |
067d23c9 | 12966 | fi |
5476a9a4 GM |
12967 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mail_maillock" >&5 |
12968 | $as_echo "$ac_cv_lib_mail_maillock" >&6; } | |
12969 | if test "x$ac_cv_lib_mail_maillock" = x""yes; then : | |
12970 | have_mail=yes | |
f199cab1 | 12971 | else |
5476a9a4 | 12972 | have_mail=no |
067d23c9 KY |
12973 | fi |
12974 | ||
5476a9a4 GM |
12975 | if test $have_mail = yes; then |
12976 | LIBS_MAIL=-lmail | |
12977 | LIBS="$LIBS_MAIL $LIBS" | |
067d23c9 | 12978 | |
5476a9a4 | 12979 | $as_echo "#define HAVE_LIBMAIL 1" >>confdefs.h |
067d23c9 | 12980 | |
5476a9a4 GM |
12981 | else |
12982 | LIBS_MAIL= | |
12983 | fi | |
12984 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -llockfile" >&5 | |
12985 | $as_echo_n "checking for maillock in -llockfile... " >&6; } | |
12986 | if test "${ac_cv_lib_lockfile_maillock+set}" = set; then : | |
067d23c9 KY |
12987 | $as_echo_n "(cached) " >&6 |
12988 | else | |
5476a9a4 GM |
12989 | ac_check_lib_save_LIBS=$LIBS |
12990 | LIBS="-llockfile $LIBS" | |
067d23c9 KY |
12991 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
12992 | /* end confdefs.h. */ | |
12993 | ||
12994 | /* Override any GCC internal prototype to avoid an error. | |
12995 | Use char because int might match the return type of a GCC | |
12996 | builtin and then its argument prototype would still apply. */ | |
12997 | #ifdef __cplusplus | |
12998 | extern "C" | |
12999 | #endif | |
5476a9a4 | 13000 | char maillock (); |
067d23c9 KY |
13001 | int |
13002 | main () | |
13003 | { | |
5476a9a4 | 13004 | return maillock (); |
067d23c9 KY |
13005 | ; |
13006 | return 0; | |
13007 | } | |
13008 | _ACEOF | |
5476a9a4 GM |
13009 | if ac_fn_c_try_link "$LINENO"; then : |
13010 | ac_cv_lib_lockfile_maillock=yes | |
13011 | else | |
13012 | ac_cv_lib_lockfile_maillock=no | |
067d23c9 KY |
13013 | fi |
13014 | rm -f core conftest.err conftest.$ac_objext \ | |
5476a9a4 GM |
13015 | conftest$ac_exeext conftest.$ac_ext |
13016 | LIBS=$ac_check_lib_save_LIBS | |
067d23c9 | 13017 | fi |
5476a9a4 GM |
13018 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lockfile_maillock" >&5 |
13019 | $as_echo "$ac_cv_lib_lockfile_maillock" >&6; } | |
13020 | if test "x$ac_cv_lib_lockfile_maillock" = x""yes; then : | |
13021 | have_lockfile=yes | |
067d23c9 | 13022 | else |
5476a9a4 | 13023 | have_lockfile=no |
f199cab1 GM |
13024 | fi |
13025 | ||
5476a9a4 GM |
13026 | if test $have_lockfile = yes; then |
13027 | LIBS_MAIL=-llockfile | |
13028 | LIBS="$LIBS_MAIL $LIBS" | |
067d23c9 | 13029 | |
5476a9a4 | 13030 | $as_echo "#define HAVE_LIBLOCKFILE 1" >>confdefs.h |
067d23c9 | 13031 | |
5476a9a4 GM |
13032 | else |
13033 | # If we have the shared liblockfile, assume we must use it for mail | |
13034 | # locking (e.g. Debian). If we couldn't link against liblockfile | |
13035 | # (no liblockfile.a installed), ensure that we don't need to. | |
13036 | # Extract the first word of "liblockfile.so", so it can be a program name with args. | |
13037 | set dummy liblockfile.so; ac_word=$2 | |
13038 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
13039 | $as_echo_n "checking for $ac_word... " >&6; } | |
13040 | if test "${ac_cv_prog_liblockfile+set}" = set; then : | |
13041 | $as_echo_n "(cached) " >&6 | |
13042 | else | |
13043 | if test -n "$liblockfile"; then | |
13044 | ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test. | |
13045 | else | |
13046 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
13047 | as_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH" | |
13048 | for as_dir in $as_dummy | |
13049 | do | |
13050 | IFS=$as_save_IFS | |
13051 | test -z "$as_dir" && as_dir=. | |
13052 | for ac_exec_ext in '' $ac_executable_extensions; do | |
13053 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
13054 | ac_cv_prog_liblockfile="yes" | |
13055 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
13056 | break 2 | |
13057 | fi | |
13058 | done | |
13059 | done | |
13060 | IFS=$as_save_IFS | |
067d23c9 | 13061 | |
5476a9a4 GM |
13062 | test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no" |
13063 | fi | |
13064 | fi | |
13065 | liblockfile=$ac_cv_prog_liblockfile | |
13066 | if test -n "$liblockfile"; then | |
13067 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $liblockfile" >&5 | |
13068 | $as_echo "$liblockfile" >&6; } | |
13069 | else | |
13070 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
13071 | $as_echo "no" >&6; } | |
13072 | fi | |
067d23c9 | 13073 | |
067d23c9 | 13074 | |
5476a9a4 GM |
13075 | if test $ac_cv_prog_liblockfile = yes; then |
13076 | as_fn_error "Shared liblockfile found but can't link against it. | |
13077 | This probably means that movemail could lose mail. | |
13078 | There may be a \`development' package to install containing liblockfile." "$LINENO" 5 | |
13079 | fi | |
13080 | fi | |
067d23c9 | 13081 | |
067d23c9 | 13082 | |
067d23c9 | 13083 | |
067d23c9 KY |
13084 | |
13085 | ||
5476a9a4 GM |
13086 | ## Define MAIL_USE_FLOCK (or LOCKF) if the mailer uses flock (or lockf) to |
13087 | ## interlock access to the mail spool. The alternative is a lock file named | |
13088 | ## /usr/spool/mail/$USER.lock. | |
13089 | mail_lock=no | |
13090 | case "$opsys" in | |
13091 | aix4-2) mail_lock="lockf" ;; | |
067d23c9 | 13092 | |
5476a9a4 | 13093 | gnu|freebsd|netbsd|openbsd|darwin|irix6-5) mail_lock="flock" ;; |
067d23c9 | 13094 | |
5476a9a4 GM |
13095 | ## On GNU/Linux systems, both methods are used by various mail programs. |
13096 | ## I assume most people are using newer mailers that have heard of flock. | |
13097 | ## Change this if you need to. | |
13098 | ## Debian contains a patch which says: ``On Debian/GNU/Linux systems, | |
13099 | ## configure gets the right answers, and that means *NOT* using flock. | |
13100 | ## Using flock is guaranteed to be the wrong thing. See Debian Policy | |
13101 | ## for details.'' and then uses `#ifdef DEBIAN'. Unfortunately the | |
13102 | ## Debian maintainer hasn't provided a clean fix for Emacs. | |
13103 | ## movemail.c will use `maillock' when MAILDIR, HAVE_LIBMAIL and | |
13104 | ## HAVE_MAILLOCK_H are defined, so the following appears to be the | |
13105 | ## correct logic. -- fx | |
13106 | ## We must check for HAVE_LIBLOCKFILE too, as movemail does. | |
13107 | ## liblockfile is a Free Software replacement for libmail, used on | |
13108 | ## Debian systems and elsewhere. -rfr. | |
13109 | gnu-*) | |
13110 | mail_lock="flock" | |
13111 | if test $have_mail = yes || test $have_lockfile = yes; then | |
13112 | test $ac_cv_header_maillock_h = yes && mail_lock=no | |
13113 | fi | |
13114 | ;; | |
13115 | esac | |
f199cab1 | 13116 | |
5476a9a4 GM |
13117 | BLESSMAIL_TARGET= |
13118 | case "$mail_lock" in | |
13119 | flock) | |
13120 | $as_echo "#define MAIL_USE_FLOCK 1" >>confdefs.h | |
13121 | ;; | |
f199cab1 | 13122 | |
5476a9a4 GM |
13123 | lockf) |
13124 | $as_echo "#define MAIL_USE_LOCKF 1" >>confdefs.h | |
13125 | ;; | |
f199cab1 | 13126 | |
5476a9a4 GM |
13127 | *) BLESSMAIL_TARGET="need-blessmail" ;; |
13128 | esac | |
f199cab1 GM |
13129 | |
13130 | ||
13131 | ||
5476a9a4 GM |
13132 | for ac_func in gethostname \ |
13133 | closedir getrusage get_current_dir_name \ | |
13134 | lrand48 logb frexp fmod cbrt setsid \ | |
13135 | fpathconf select euidaccess getpagesize setlocale \ | |
13136 | utimes getrlimit setrlimit setpgid getcwd shutdown getaddrinfo \ | |
13137 | __fpending strsignal setitimer \ | |
13138 | sendto recvfrom getsockname getpeername getifaddrs freeifaddrs \ | |
13139 | gai_strerror mkstemp getline getdelim fsync sync \ | |
13140 | difftime posix_memalign \ | |
13141 | getpwent endpwent getgrent endgrent \ | |
13142 | touchlock \ | |
13143 | cfmakeraw cfsetspeed copysign __executable_start | |
13144 | do : | |
13145 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
13146 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
13147 | eval as_val=\$$as_ac_var | |
13148 | if test "x$as_val" = x""yes; then : | |
13149 | cat >>confdefs.h <<_ACEOF | |
13150 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
13151 | _ACEOF | |
f199cab1 | 13152 | |
5476a9a4 GM |
13153 | fi |
13154 | done | |
f199cab1 GM |
13155 | |
13156 | ||
c0528ebe GM |
13157 | if test $opsys = unixware; then |
13158 | ||
13159 | $as_echo "#define BROKEN_GETWD 1" >>confdefs.h | |
13160 | ||
13161 | else | |
5476a9a4 GM |
13162 | for ac_func in getwd |
13163 | do : | |
13164 | ac_fn_c_check_func "$LINENO" "getwd" "ac_cv_func_getwd" | |
13165 | if test "x$ac_cv_func_getwd" = x""yes; then : | |
13166 | cat >>confdefs.h <<_ACEOF | |
13167 | #define HAVE_GETWD 1 | |
13168 | _ACEOF | |
f199cab1 | 13169 | |
5476a9a4 GM |
13170 | fi |
13171 | done | |
f199cab1 | 13172 | |
5476a9a4 | 13173 | fi |
f199cab1 | 13174 | |
5476a9a4 GM |
13175 | ## Eric Backus <ericb@lsid.hp.com> says, HP-UX 9.x on HP 700 machines |
13176 | ## has a broken `rint' in some library versions including math library | |
13177 | ## version number A.09.05. | |
13178 | ## You can fix the math library by installing patch number PHSS_4630. | |
13179 | ## But we can fix it more reliably for Emacs by just not using rint. | |
8ad96b1d | 13180 | ## We also skip HAVE_RANDOM - see comments in src/conf_post.h. |
5476a9a4 GM |
13181 | case $opsys in |
13182 | hpux*) : ;; | |
13183 | *) for ac_func in random rint | |
13184 | do : | |
13185 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
13186 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
13187 | eval as_val=\$$as_ac_var | |
13188 | if test "x$as_val" = x""yes; then : | |
13189 | cat >>confdefs.h <<_ACEOF | |
13190 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
13191 | _ACEOF | |
f199cab1 | 13192 | |
5476a9a4 GM |
13193 | fi |
13194 | done | |
13195 | ;; | |
13196 | esac | |
f199cab1 | 13197 | |
5476a9a4 GM |
13198 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unwind_init" >&5 |
13199 | $as_echo_n "checking for __builtin_unwind_init... " >&6; } | |
13200 | if test "${emacs_cv_func___builtin_unwind_init+set}" = set; then : | |
067d23c9 | 13201 | $as_echo_n "(cached) " >&6 |
f199cab1 GM |
13202 | else |
13203 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
067d23c9 KY |
13204 | /* end confdefs.h. */ |
13205 | ||
067d23c9 KY |
13206 | int |
13207 | main () | |
13208 | { | |
5476a9a4 | 13209 | __builtin_unwind_init (); |
067d23c9 KY |
13210 | ; |
13211 | return 0; | |
13212 | } | |
13213 | _ACEOF | |
5476a9a4 GM |
13214 | if ac_fn_c_try_link "$LINENO"; then : |
13215 | emacs_cv_func___builtin_unwind_init=yes | |
067d23c9 | 13216 | else |
5476a9a4 | 13217 | emacs_cv_func___builtin_unwind_init=no |
067d23c9 | 13218 | fi |
5476a9a4 GM |
13219 | rm -f core conftest.err conftest.$ac_objext \ |
13220 | conftest$ac_exeext conftest.$ac_ext | |
067d23c9 | 13221 | fi |
5476a9a4 GM |
13222 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_func___builtin_unwind_init" >&5 |
13223 | $as_echo "$emacs_cv_func___builtin_unwind_init" >&6; } | |
13224 | if test $emacs_cv_func___builtin_unwind_init = yes; then | |
067d23c9 | 13225 | |
5476a9a4 | 13226 | $as_echo "#define HAVE___BUILTIN_UNWIND_INIT 1" >>confdefs.h |
f199cab1 | 13227 | |
067d23c9 | 13228 | fi |
067d23c9 | 13229 | |
f199cab1 GM |
13230 | |
13231 | ||
13232 | ||
13233 | ||
5476a9a4 GM |
13234 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5 |
13235 | $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; } | |
13236 | if test "${ac_cv_sys_largefile_source+set}" = set; then : | |
13237 | $as_echo_n "(cached) " >&6 | |
13238 | else | |
13239 | while :; do | |
13240 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13241 | /* end confdefs.h. */ | |
13242 | #include <sys/types.h> /* for off_t */ | |
13243 | #include <stdio.h> | |
13244 | int | |
13245 | main () | |
13246 | { | |
13247 | int (*fp) (FILE *, off_t, int) = fseeko; | |
13248 | return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); | |
13249 | ; | |
13250 | return 0; | |
13251 | } | |
13252 | _ACEOF | |
13253 | if ac_fn_c_try_link "$LINENO"; then : | |
13254 | ac_cv_sys_largefile_source=no; break | |
067d23c9 | 13255 | fi |
5476a9a4 GM |
13256 | rm -f core conftest.err conftest.$ac_objext \ |
13257 | conftest$ac_exeext conftest.$ac_ext | |
13258 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13259 | /* end confdefs.h. */ | |
13260 | #define _LARGEFILE_SOURCE 1 | |
13261 | #include <sys/types.h> /* for off_t */ | |
13262 | #include <stdio.h> | |
13263 | int | |
13264 | main () | |
13265 | { | |
13266 | int (*fp) (FILE *, off_t, int) = fseeko; | |
13267 | return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); | |
13268 | ; | |
13269 | return 0; | |
13270 | } | |
13271 | _ACEOF | |
13272 | if ac_fn_c_try_link "$LINENO"; then : | |
13273 | ac_cv_sys_largefile_source=1; break | |
13274 | fi | |
13275 | rm -f core conftest.err conftest.$ac_objext \ | |
13276 | conftest$ac_exeext conftest.$ac_ext | |
13277 | ac_cv_sys_largefile_source=unknown | |
13278 | break | |
13279 | done | |
13280 | fi | |
13281 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5 | |
13282 | $as_echo "$ac_cv_sys_largefile_source" >&6; } | |
13283 | case $ac_cv_sys_largefile_source in #( | |
13284 | no | unknown) ;; | |
13285 | *) | |
13286 | cat >>confdefs.h <<_ACEOF | |
13287 | #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source | |
13288 | _ACEOF | |
13289 | ;; | |
13290 | esac | |
13291 | rm -rf conftest* | |
067d23c9 | 13292 | |
5476a9a4 GM |
13293 | # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug |
13294 | # in glibc 2.1.3, but that breaks too many other things. | |
13295 | # If you want fseeko and ftello with glibc, upgrade to a fixed glibc. | |
13296 | if test $ac_cv_sys_largefile_source != unknown; then | |
067d23c9 | 13297 | |
5476a9a4 | 13298 | $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h |
067d23c9 | 13299 | |
5476a9a4 | 13300 | fi |
067d23c9 KY |
13301 | |
13302 | ||
5476a9a4 GM |
13303 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getpgrp requires zero arguments" >&5 |
13304 | $as_echo_n "checking whether getpgrp requires zero arguments... " >&6; } | |
13305 | if test "${ac_cv_func_getpgrp_void+set}" = set; then : | |
13306 | $as_echo_n "(cached) " >&6 | |
13307 | else | |
13308 | # Use it with a single arg. | |
13309 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13310 | /* end confdefs.h. */ | |
13311 | $ac_includes_default | |
13312 | int | |
13313 | main () | |
13314 | { | |
13315 | getpgrp (0); | |
13316 | ; | |
13317 | return 0; | |
13318 | } | |
13319 | _ACEOF | |
13320 | if ac_fn_c_try_compile "$LINENO"; then : | |
13321 | ac_cv_func_getpgrp_void=no | |
13322 | else | |
13323 | ac_cv_func_getpgrp_void=yes | |
13324 | fi | |
13325 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
067d23c9 | 13326 | |
5476a9a4 GM |
13327 | fi |
13328 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getpgrp_void" >&5 | |
13329 | $as_echo "$ac_cv_func_getpgrp_void" >&6; } | |
13330 | if test $ac_cv_func_getpgrp_void = yes; then | |
067d23c9 | 13331 | |
5476a9a4 | 13332 | $as_echo "#define GETPGRP_VOID 1" >>confdefs.h |
067d23c9 | 13333 | |
5476a9a4 | 13334 | fi |
067d23c9 KY |
13335 | |
13336 | ||
5476a9a4 GM |
13337 | # UNIX98 PTYs. |
13338 | for ac_func in grantpt | |
13339 | do : | |
13340 | ac_fn_c_check_func "$LINENO" "grantpt" "ac_cv_func_grantpt" | |
13341 | if test "x$ac_cv_func_grantpt" = x""yes; then : | |
13342 | cat >>confdefs.h <<_ACEOF | |
13343 | #define HAVE_GRANTPT 1 | |
13344 | _ACEOF | |
f199cab1 | 13345 | |
5476a9a4 GM |
13346 | fi |
13347 | done | |
f199cab1 | 13348 | |
f199cab1 | 13349 | |
5476a9a4 | 13350 | # PTY-related GNU extensions. |
1146da8d | 13351 | for ac_func in getpt posix_openpt |
5476a9a4 | 13352 | do : |
1146da8d GM |
13353 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` |
13354 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
13355 | eval as_val=\$$as_ac_var | |
13356 | if test "x$as_val" = x""yes; then : | |
5476a9a4 | 13357 | cat >>confdefs.h <<_ACEOF |
1146da8d | 13358 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 |
5476a9a4 | 13359 | _ACEOF |
f199cab1 | 13360 | |
5476a9a4 GM |
13361 | fi |
13362 | done | |
f199cab1 | 13363 | |
f199cab1 | 13364 | |
5476a9a4 GM |
13365 | # Check this now, so that we will NOT find the above functions in ncurses. |
13366 | # That is because we have not set up to link ncurses in lib-src. | |
13367 | # It's better to believe a function is not available | |
13368 | # than to expect to find it in ncurses. | |
13369 | # Also we need tputs and friends to be able to build at all. | |
13370 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tputs" >&5 | |
13371 | $as_echo_n "checking for library containing tputs... " >&6; } | |
13372 | # Run a test program that contains a call to tputs, a call that is | |
13373 | # never executed. This tests whether a pre-'main' dynamic linker | |
13374 | # works with the library. It's too much trouble to actually call | |
13375 | # tputs in the test program, due to portability hassles. When | |
13376 | # cross-compiling, assume the test program will run if it links. | |
f199cab1 | 13377 | |
5476a9a4 GM |
13378 | # Maybe curses should be tried earlier? |
13379 | # See http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9736#35 | |
13380 | for tputs_library in '' tinfo ncurses terminfo termcap curses; do | |
13381 | OLIBS=$LIBS | |
13382 | if test -z "$tputs_library"; then | |
13383 | LIBS_TERMCAP= | |
13384 | msg='none required' | |
13385 | else | |
13386 | LIBS_TERMCAP=-l$tputs_library | |
13387 | msg=$LIBS_TERMCAP | |
13388 | LIBS="$LIBS_TERMCAP $LIBS" | |
13389 | fi | |
13390 | if test "$cross_compiling" = yes; then : | |
13391 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
067d23c9 KY |
13392 | /* end confdefs.h. */ |
13393 | ||
5476a9a4 GM |
13394 | extern void tputs (const char *, int, int (*)(int)); |
13395 | int main (int argc, char **argv) | |
13396 | { | |
13397 | if (argc == 10000) | |
13398 | tputs (argv[0], 0, 0); | |
13399 | return 0; | |
13400 | } | |
13401 | ||
067d23c9 KY |
13402 | _ACEOF |
13403 | if ac_fn_c_try_link "$LINENO"; then : | |
5476a9a4 | 13404 | |
067d23c9 | 13405 | else |
5476a9a4 | 13406 | msg=no |
067d23c9 KY |
13407 | fi |
13408 | rm -f core conftest.err conftest.$ac_objext \ | |
13409 | conftest$ac_exeext conftest.$ac_ext | |
067d23c9 | 13410 | else |
5476a9a4 | 13411 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
067d23c9 KY |
13412 | /* end confdefs.h. */ |
13413 | ||
5476a9a4 GM |
13414 | extern void tputs (const char *, int, int (*)(int)); |
13415 | int main (int argc, char **argv) | |
13416 | { | |
13417 | if (argc == 10000) | |
13418 | tputs (argv[0], 0, 0); | |
13419 | return 0; | |
13420 | } | |
13421 | ||
067d23c9 | 13422 | _ACEOF |
5476a9a4 GM |
13423 | if ac_fn_c_try_run "$LINENO"; then : |
13424 | ||
067d23c9 | 13425 | else |
5476a9a4 | 13426 | msg=no |
067d23c9 | 13427 | fi |
5476a9a4 GM |
13428 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
13429 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
067d23c9 | 13430 | fi |
5476a9a4 GM |
13431 | |
13432 | LIBS=$OLIBS | |
13433 | if test "X$msg" != Xno; then | |
13434 | break | |
13435 | fi | |
13436 | done | |
13437 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $msg" >&5 | |
13438 | $as_echo "$msg" >&6; } | |
13439 | if test "X$msg" = Xno; then | |
13440 | as_fn_error "The required function \`tputs' was not found in any library. | |
13441 | The following libraries were tried (in order): | |
13442 | libtinfo, libncurses, libterminfo, libtermcap, libcurses | |
13443 | Please try installing whichever of these libraries is most appropriate | |
13444 | for your system, together with its header files. | |
13445 | For example, a libncurses-dev(el) or similar package." "$LINENO" 5 | |
067d23c9 KY |
13446 | fi |
13447 | ||
5476a9a4 GM |
13448 | ## Use termcap instead of terminfo? |
13449 | ## Only true for: freebsd < 40000, ms-w32, msdos, netbsd < 599002500. | |
13450 | TERMINFO=yes | |
13451 | ## FIXME? In the cases below where we unconditionally set | |
13452 | ## LIBS_TERMCAP="-lncurses", this overrides LIBS_TERMCAP = -ltinfo, | |
13453 | ## if that was found above to have tputs. | |
13454 | ## Should we use the gnu* logic everywhere? | |
13455 | case "$opsys" in | |
13456 | ## darwin: Prevents crashes when running Emacs in Terminal.app under 10.2. | |
13457 | ## The ncurses library has been moved out of the System framework in | |
13458 | ## Mac OS X 10.2. So if configure detects it, set the command-line | |
13459 | ## option to use it. | |
13460 | darwin) LIBS_TERMCAP="-lncurses" ;; | |
13461 | ||
13462 | gnu*) test -z "$LIBS_TERMCAP" && LIBS_TERMCAP="-lncurses" ;; | |
13463 | ||
13464 | freebsd) | |
13465 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether FreeBSD is new enough to use terminfo" >&5 | |
13466 | $as_echo_n "checking whether FreeBSD is new enough to use terminfo... " >&6; } | |
13467 | if test "${emacs_cv_freebsd_terminfo+set}" = set; then : | |
067d23c9 KY |
13468 | $as_echo_n "(cached) " >&6 |
13469 | else | |
5476a9a4 | 13470 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
067d23c9 | 13471 | /* end confdefs.h. */ |
5476a9a4 | 13472 | #include <osreldate.h> |
067d23c9 KY |
13473 | int |
13474 | main () | |
13475 | { | |
5476a9a4 GM |
13476 | #if __FreeBSD_version < 400000 |
13477 | fail; | |
13478 | #endif | |
13479 | ||
067d23c9 KY |
13480 | ; |
13481 | return 0; | |
13482 | } | |
13483 | _ACEOF | |
13484 | if ac_fn_c_try_link "$LINENO"; then : | |
5476a9a4 | 13485 | emacs_cv_freebsd_terminfo=yes |
067d23c9 | 13486 | else |
5476a9a4 | 13487 | emacs_cv_freebsd_terminfo=no |
067d23c9 KY |
13488 | fi |
13489 | rm -f core conftest.err conftest.$ac_objext \ | |
13490 | conftest$ac_exeext conftest.$ac_ext | |
13491 | fi | |
5476a9a4 GM |
13492 | |
13493 | ||
13494 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_freebsd_terminfo" >&5 | |
13495 | $as_echo "$emacs_cv_freebsd_terminfo" >&6; } | |
13496 | ||
13497 | if test $emacs_cv_freebsd_terminfo = yes; then | |
13498 | LIBS_TERMCAP="-lncurses" | |
13499 | else | |
13500 | TERMINFO=no | |
13501 | LIBS_TERMCAP="-ltermcap" | |
13502 | fi | |
13503 | ;; | |
13504 | ||
13505 | netbsd) | |
13506 | if test "x$LIBS_TERMCAP" != "x-lterminfo"; then | |
13507 | TERMINFO=no | |
13508 | LIBS_TERMCAP="-ltermcap" | |
13509 | fi | |
13510 | ;; | |
13511 | ||
13512 | openbsd) LIBS_TERMCAP="-lncurses" ;; | |
13513 | ||
13514 | ## hpux: Make sure we get select from libc rather than from libcurses | |
13515 | ## because libcurses on HPUX 10.10 has a broken version of select. | |
13516 | ## We used to use -lc -lcurses, but this may be cleaner. | |
13517 | ## FIXME? But TERMINFO = yes on hpux (it used to be explicitly | |
13518 | # set that way, now it uses the default). Isn't this a contradiction? | |
13519 | hpux*) LIBS_TERMCAP="-ltermcap" ;; | |
13520 | ||
13521 | esac | |
13522 | ||
13523 | TERMCAP_OBJ=tparam.o | |
13524 | if test $TERMINFO = yes; then | |
13525 | ||
13526 | $as_echo "#define TERMINFO 1" >>confdefs.h | |
13527 | ||
13528 | TERMCAP_OBJ=terminfo.o | |
067d23c9 KY |
13529 | fi |
13530 | ||
f199cab1 | 13531 | |
067d23c9 | 13532 | |
5476a9a4 GM |
13533 | |
13534 | # Do we have res_init, for detecting changes in /etc/resolv.conf? | |
13535 | # On Darwin, res_init appears not to be useful: see bug#562 and | |
13536 | # http://lists.gnu.org/archive/html/emacs-devel/2007-11/msg01467.html | |
13537 | resolv=no | |
13538 | ||
13539 | if test $opsys != darwin; then | |
13540 | ||
13541 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13542 | /* end confdefs.h. */ | |
13543 | #include <netinet/in.h> | |
13544 | #include <arpa/nameser.h> | |
13545 | #include <resolv.h> | |
067d23c9 KY |
13546 | int |
13547 | main () | |
13548 | { | |
5476a9a4 | 13549 | return res_init(); |
067d23c9 KY |
13550 | ; |
13551 | return 0; | |
13552 | } | |
13553 | _ACEOF | |
13554 | if ac_fn_c_try_link "$LINENO"; then : | |
5476a9a4 | 13555 | have_res_init=yes |
067d23c9 | 13556 | else |
5476a9a4 | 13557 | have_res_init=no |
067d23c9 KY |
13558 | fi |
13559 | rm -f core conftest.err conftest.$ac_objext \ | |
13560 | conftest$ac_exeext conftest.$ac_ext | |
5476a9a4 GM |
13561 | if test "$have_res_init" = no; then |
13562 | OLIBS="$LIBS" | |
13563 | LIBS="$LIBS -lresolv" | |
13564 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_init with -lresolv" >&5 | |
13565 | $as_echo_n "checking for res_init with -lresolv... " >&6; } | |
13566 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
067d23c9 | 13567 | /* end confdefs.h. */ |
5476a9a4 GM |
13568 | #include <netinet/in.h> |
13569 | #include <arpa/nameser.h> | |
13570 | #include <resolv.h> | |
067d23c9 KY |
13571 | int |
13572 | main () | |
13573 | { | |
5476a9a4 | 13574 | return res_init(); |
067d23c9 KY |
13575 | ; |
13576 | return 0; | |
13577 | } | |
13578 | _ACEOF | |
13579 | if ac_fn_c_try_link "$LINENO"; then : | |
5476a9a4 | 13580 | have_res_init=yes |
067d23c9 | 13581 | else |
5476a9a4 | 13582 | have_res_init=no |
067d23c9 KY |
13583 | fi |
13584 | rm -f core conftest.err conftest.$ac_objext \ | |
13585 | conftest$ac_exeext conftest.$ac_ext | |
5476a9a4 GM |
13586 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_res_init" >&5 |
13587 | $as_echo "$have_res_init" >&6; } | |
13588 | if test "$have_res_init" = yes ; then | |
13589 | resolv=yes | |
13590 | fi | |
13591 | LIBS="$OLIBS" | |
13592 | fi | |
067d23c9 | 13593 | |
5476a9a4 GM |
13594 | if test "$have_res_init" = yes; then |
13595 | ||
13596 | $as_echo "#define HAVE_RES_INIT 1" >>confdefs.h | |
067d23c9 | 13597 | |
5476a9a4 | 13598 | fi |
067d23c9 | 13599 | fi |
5476a9a4 GM |
13600 | # Do we need the Hesiod library to provide the support routines? |
13601 | LIBHESIOD= | |
13602 | if test "$with_hesiod" != no ; then | |
13603 | # Don't set $LIBS here -- see comments above. FIXME which comments? | |
13604 | ac_fn_c_check_func "$LINENO" "res_send" "ac_cv_func_res_send" | |
13605 | if test "x$ac_cv_func_res_send" = x""yes; then : | |
f199cab1 | 13606 | |
5476a9a4 GM |
13607 | else |
13608 | ac_fn_c_check_func "$LINENO" "__res_send" "ac_cv_func___res_send" | |
13609 | if test "x$ac_cv_func___res_send" = x""yes; then : | |
f199cab1 | 13610 | |
5476a9a4 GM |
13611 | else |
13612 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_send in -lresolv" >&5 | |
13613 | $as_echo_n "checking for res_send in -lresolv... " >&6; } | |
13614 | if test "${ac_cv_lib_resolv_res_send+set}" = set; then : | |
067d23c9 KY |
13615 | $as_echo_n "(cached) " >&6 |
13616 | else | |
13617 | ac_check_lib_save_LIBS=$LIBS | |
5476a9a4 | 13618 | LIBS="-lresolv $LIBS" |
067d23c9 KY |
13619 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
13620 | /* end confdefs.h. */ | |
13621 | ||
13622 | /* Override any GCC internal prototype to avoid an error. | |
13623 | Use char because int might match the return type of a GCC | |
13624 | builtin and then its argument prototype would still apply. */ | |
13625 | #ifdef __cplusplus | |
13626 | extern "C" | |
13627 | #endif | |
5476a9a4 | 13628 | char res_send (); |
067d23c9 KY |
13629 | int |
13630 | main () | |
13631 | { | |
5476a9a4 | 13632 | return res_send (); |
067d23c9 KY |
13633 | ; |
13634 | return 0; | |
13635 | } | |
13636 | _ACEOF | |
13637 | if ac_fn_c_try_link "$LINENO"; then : | |
5476a9a4 | 13638 | ac_cv_lib_resolv_res_send=yes |
067d23c9 | 13639 | else |
5476a9a4 | 13640 | ac_cv_lib_resolv_res_send=no |
067d23c9 KY |
13641 | fi |
13642 | rm -f core conftest.err conftest.$ac_objext \ | |
f199cab1 GM |
13643 | conftest$ac_exeext conftest.$ac_ext |
13644 | LIBS=$ac_check_lib_save_LIBS | |
13645 | fi | |
5476a9a4 GM |
13646 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_send" >&5 |
13647 | $as_echo "$ac_cv_lib_resolv_res_send" >&6; } | |
13648 | if test "x$ac_cv_lib_resolv_res_send" = x""yes; then : | |
13649 | resolv=yes | |
13650 | else | |
13651 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __res_send in -lresolv" >&5 | |
13652 | $as_echo_n "checking for __res_send in -lresolv... " >&6; } | |
13653 | if test "${ac_cv_lib_resolv___res_send+set}" = set; then : | |
f199cab1 GM |
13654 | $as_echo_n "(cached) " >&6 |
13655 | else | |
13656 | ac_check_lib_save_LIBS=$LIBS | |
5476a9a4 | 13657 | LIBS="-lresolv $LIBS" |
f199cab1 GM |
13658 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
13659 | /* end confdefs.h. */ | |
4717915f | 13660 | |
f199cab1 GM |
13661 | /* Override any GCC internal prototype to avoid an error. |
13662 | Use char because int might match the return type of a GCC | |
13663 | builtin and then its argument prototype would still apply. */ | |
13664 | #ifdef __cplusplus | |
13665 | extern "C" | |
13666 | #endif | |
5476a9a4 | 13667 | char __res_send (); |
f199cab1 GM |
13668 | int |
13669 | main () | |
13670 | { | |
5476a9a4 | 13671 | return __res_send (); |
f199cab1 GM |
13672 | ; |
13673 | return 0; | |
13674 | } | |
13675 | _ACEOF | |
13676 | if ac_fn_c_try_link "$LINENO"; then : | |
5476a9a4 | 13677 | ac_cv_lib_resolv___res_send=yes |
f199cab1 | 13678 | else |
5476a9a4 | 13679 | ac_cv_lib_resolv___res_send=no |
f199cab1 GM |
13680 | fi |
13681 | rm -f core conftest.err conftest.$ac_objext \ | |
13682 | conftest$ac_exeext conftest.$ac_ext | |
13683 | LIBS=$ac_check_lib_save_LIBS | |
13684 | fi | |
5476a9a4 GM |
13685 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv___res_send" >&5 |
13686 | $as_echo "$ac_cv_lib_resolv___res_send" >&6; } | |
13687 | if test "x$ac_cv_lib_resolv___res_send" = x""yes; then : | |
13688 | resolv=yes | |
067d23c9 | 13689 | fi |
f199cab1 | 13690 | |
5476a9a4 | 13691 | fi |
1f5d53eb | 13692 | |
5476a9a4 | 13693 | fi |
067d23c9 | 13694 | |
067d23c9 KY |
13695 | fi |
13696 | ||
5476a9a4 GM |
13697 | if test "$resolv" = yes ; then |
13698 | RESOLVLIB=-lresolv | |
13699 | else | |
13700 | RESOLVLIB= | |
13701 | fi | |
13702 | ac_fn_c_check_func "$LINENO" "hes_getmailhost" "ac_cv_func_hes_getmailhost" | |
13703 | if test "x$ac_cv_func_hes_getmailhost" = x""yes; then : | |
13704 | ||
13705 | else | |
13706 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hes_getmailhost in -lhesiod" >&5 | |
13707 | $as_echo_n "checking for hes_getmailhost in -lhesiod... " >&6; } | |
13708 | if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then : | |
13709 | $as_echo_n "(cached) " >&6 | |
13710 | else | |
13711 | ac_check_lib_save_LIBS=$LIBS | |
13712 | LIBS="-lhesiod $RESOLVLIB $LIBS" | |
13713 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
067d23c9 | 13714 | /* end confdefs.h. */ |
5476a9a4 GM |
13715 | |
13716 | /* Override any GCC internal prototype to avoid an error. | |
13717 | Use char because int might match the return type of a GCC | |
13718 | builtin and then its argument prototype would still apply. */ | |
13719 | #ifdef __cplusplus | |
13720 | extern "C" | |
13721 | #endif | |
13722 | char hes_getmailhost (); | |
067d23c9 KY |
13723 | int |
13724 | main () | |
13725 | { | |
5476a9a4 | 13726 | return hes_getmailhost (); |
067d23c9 KY |
13727 | ; |
13728 | return 0; | |
13729 | } | |
13730 | _ACEOF | |
f199cab1 | 13731 | if ac_fn_c_try_link "$LINENO"; then : |
5476a9a4 GM |
13732 | ac_cv_lib_hesiod_hes_getmailhost=yes |
13733 | else | |
13734 | ac_cv_lib_hesiod_hes_getmailhost=no | |
067d23c9 | 13735 | fi |
f199cab1 GM |
13736 | rm -f core conftest.err conftest.$ac_objext \ |
13737 | conftest$ac_exeext conftest.$ac_ext | |
5476a9a4 | 13738 | LIBS=$ac_check_lib_save_LIBS |
067d23c9 | 13739 | fi |
5476a9a4 GM |
13740 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5 |
13741 | $as_echo "$ac_cv_lib_hesiod_hes_getmailhost" >&6; } | |
13742 | if test "x$ac_cv_lib_hesiod_hes_getmailhost" = x""yes; then : | |
13743 | hesiod=yes | |
13744 | else | |
13745 | : | |
067d23c9 KY |
13746 | fi |
13747 | ||
c5a68906 | 13748 | fi |
f199cab1 GM |
13749 | |
13750 | ||
5476a9a4 | 13751 | if test x"$hesiod" = xyes; then |
f199cab1 | 13752 | |
5476a9a4 | 13753 | $as_echo "#define HAVE_LIBHESIOD 1" >>confdefs.h |
f199cab1 | 13754 | |
5476a9a4 | 13755 | LIBHESIOD=-lhesiod |
c5a68906 | 13756 | fi |
5476a9a4 | 13757 | fi |
4fc2b746 | 13758 | |
4fc2b746 | 13759 | |
5476a9a4 GM |
13760 | # Do we need libresolv (due to res_init or Hesiod)? |
13761 | if test "$resolv" = yes && test $opsys != darwin; then | |
4fc2b746 | 13762 | |
5476a9a4 | 13763 | $as_echo "#define HAVE_LIBRESOLV 1" >>confdefs.h |
4fc2b746 | 13764 | |
5476a9a4 GM |
13765 | LIBRESOLV=-lresolv |
13766 | else | |
13767 | LIBRESOLV= | |
13768 | fi | |
4fc2b746 | 13769 | |
4fc2b746 | 13770 | |
5476a9a4 GM |
13771 | # These tell us which Kerberos-related libraries to use. |
13772 | COM_ERRLIB= | |
13773 | CRYPTOLIB= | |
13774 | KRB5LIB= | |
13775 | DESLIB= | |
13776 | KRB4LIB= | |
4fc2b746 | 13777 | |
5476a9a4 GM |
13778 | if test "${with_kerberos}" != no; then |
13779 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for com_err in -lcom_err" >&5 | |
13780 | $as_echo_n "checking for com_err in -lcom_err... " >&6; } | |
13781 | if test "${ac_cv_lib_com_err_com_err+set}" = set; then : | |
13782 | $as_echo_n "(cached) " >&6 | |
13783 | else | |
13784 | ac_check_lib_save_LIBS=$LIBS | |
13785 | LIBS="-lcom_err $LIBS" | |
13786 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13787 | /* end confdefs.h. */ | |
4fc2b746 | 13788 | |
5476a9a4 GM |
13789 | /* Override any GCC internal prototype to avoid an error. |
13790 | Use char because int might match the return type of a GCC | |
13791 | builtin and then its argument prototype would still apply. */ | |
13792 | #ifdef __cplusplus | |
13793 | extern "C" | |
13794 | #endif | |
13795 | char com_err (); | |
13796 | int | |
13797 | main () | |
13798 | { | |
13799 | return com_err (); | |
13800 | ; | |
13801 | return 0; | |
13802 | } | |
13803 | _ACEOF | |
13804 | if ac_fn_c_try_link "$LINENO"; then : | |
13805 | ac_cv_lib_com_err_com_err=yes | |
13806 | else | |
13807 | ac_cv_lib_com_err_com_err=no | |
13808 | fi | |
13809 | rm -f core conftest.err conftest.$ac_objext \ | |
13810 | conftest$ac_exeext conftest.$ac_ext | |
13811 | LIBS=$ac_check_lib_save_LIBS | |
13812 | fi | |
13813 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_com_err_com_err" >&5 | |
13814 | $as_echo "$ac_cv_lib_com_err_com_err" >&6; } | |
13815 | if test "x$ac_cv_lib_com_err_com_err" = x""yes; then : | |
13816 | have_com_err=yes | |
13817 | else | |
13818 | have_com_err=no | |
13819 | fi | |
f199cab1 | 13820 | |
5476a9a4 GM |
13821 | if test $have_com_err = yes; then |
13822 | COM_ERRLIB=-lcom_err | |
13823 | LIBS="$COM_ERRLIB $LIBS" | |
f199cab1 | 13824 | |
5476a9a4 | 13825 | $as_echo "#define HAVE_LIBCOM_ERR 1" >>confdefs.h |
f199cab1 | 13826 | |
5476a9a4 GM |
13827 | fi |
13828 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lcrypto" >&5 | |
13829 | $as_echo_n "checking for mit_des_cbc_encrypt in -lcrypto... " >&6; } | |
13830 | if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then : | |
13831 | $as_echo_n "(cached) " >&6 | |
13832 | else | |
13833 | ac_check_lib_save_LIBS=$LIBS | |
13834 | LIBS="-lcrypto $LIBS" | |
13835 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13836 | /* end confdefs.h. */ | |
f199cab1 | 13837 | |
5476a9a4 GM |
13838 | /* Override any GCC internal prototype to avoid an error. |
13839 | Use char because int might match the return type of a GCC | |
13840 | builtin and then its argument prototype would still apply. */ | |
13841 | #ifdef __cplusplus | |
13842 | extern "C" | |
13843 | #endif | |
13844 | char mit_des_cbc_encrypt (); | |
13845 | int | |
13846 | main () | |
13847 | { | |
13848 | return mit_des_cbc_encrypt (); | |
13849 | ; | |
13850 | return 0; | |
13851 | } | |
13852 | _ACEOF | |
13853 | if ac_fn_c_try_link "$LINENO"; then : | |
13854 | ac_cv_lib_crypto_mit_des_cbc_encrypt=yes | |
13855 | else | |
13856 | ac_cv_lib_crypto_mit_des_cbc_encrypt=no | |
13857 | fi | |
13858 | rm -f core conftest.err conftest.$ac_objext \ | |
13859 | conftest$ac_exeext conftest.$ac_ext | |
13860 | LIBS=$ac_check_lib_save_LIBS | |
13861 | fi | |
13862 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5 | |
13863 | $as_echo "$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6; } | |
13864 | if test "x$ac_cv_lib_crypto_mit_des_cbc_encrypt" = x""yes; then : | |
13865 | have_crypto=yes | |
13866 | else | |
13867 | have_crypto=no | |
13868 | fi | |
f199cab1 | 13869 | |
5476a9a4 GM |
13870 | if test $have_crypto = yes; then |
13871 | CRYPTOLIB=-lcrypto | |
13872 | LIBS="$CRYPTOLIB $LIBS" | |
f199cab1 | 13873 | |
5476a9a4 | 13874 | $as_echo "#define HAVE_LIBCRYPTO 1" >>confdefs.h |
f199cab1 | 13875 | |
5476a9a4 GM |
13876 | fi |
13877 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lk5crypto" >&5 | |
13878 | $as_echo_n "checking for mit_des_cbc_encrypt in -lk5crypto... " >&6; } | |
13879 | if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then : | |
13880 | $as_echo_n "(cached) " >&6 | |
13881 | else | |
13882 | ac_check_lib_save_LIBS=$LIBS | |
13883 | LIBS="-lk5crypto $LIBS" | |
13884 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13885 | /* end confdefs.h. */ | |
f199cab1 | 13886 | |
5476a9a4 GM |
13887 | /* Override any GCC internal prototype to avoid an error. |
13888 | Use char because int might match the return type of a GCC | |
13889 | builtin and then its argument prototype would still apply. */ | |
13890 | #ifdef __cplusplus | |
13891 | extern "C" | |
13892 | #endif | |
13893 | char mit_des_cbc_encrypt (); | |
13894 | int | |
13895 | main () | |
13896 | { | |
13897 | return mit_des_cbc_encrypt (); | |
13898 | ; | |
13899 | return 0; | |
13900 | } | |
13901 | _ACEOF | |
13902 | if ac_fn_c_try_link "$LINENO"; then : | |
13903 | ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes | |
13904 | else | |
13905 | ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no | |
13906 | fi | |
13907 | rm -f core conftest.err conftest.$ac_objext \ | |
13908 | conftest$ac_exeext conftest.$ac_ext | |
13909 | LIBS=$ac_check_lib_save_LIBS | |
13910 | fi | |
13911 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5 | |
13912 | $as_echo "$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6; } | |
13913 | if test "x$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" = x""yes; then : | |
13914 | have_k5crypto=yes | |
13915 | else | |
13916 | have_k5crypto=no | |
4fc2b746 | 13917 | fi |
4fc2b746 | 13918 | |
5476a9a4 GM |
13919 | if test $have_k5crypto = yes; then |
13920 | CRYPTOLIB=-lk5crypto | |
13921 | LIBS="$CRYPTOLIB $LIBS" | |
4fc2b746 | 13922 | |
5476a9a4 | 13923 | $as_echo "#define HAVE_LIBK5CRYPTO 1" >>confdefs.h |
4fc2b746 | 13924 | |
5476a9a4 GM |
13925 | fi |
13926 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5_init_context in -lkrb5" >&5 | |
13927 | $as_echo_n "checking for krb5_init_context in -lkrb5... " >&6; } | |
13928 | if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then : | |
13929 | $as_echo_n "(cached) " >&6 | |
13930 | else | |
13931 | ac_check_lib_save_LIBS=$LIBS | |
13932 | LIBS="-lkrb5 $LIBS" | |
13933 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13934 | /* end confdefs.h. */ | |
4fc2b746 | 13935 | |
5476a9a4 GM |
13936 | /* Override any GCC internal prototype to avoid an error. |
13937 | Use char because int might match the return type of a GCC | |
13938 | builtin and then its argument prototype would still apply. */ | |
13939 | #ifdef __cplusplus | |
13940 | extern "C" | |
13941 | #endif | |
13942 | char krb5_init_context (); | |
13943 | int | |
13944 | main () | |
13945 | { | |
13946 | return krb5_init_context (); | |
13947 | ; | |
13948 | return 0; | |
13949 | } | |
13950 | _ACEOF | |
13951 | if ac_fn_c_try_link "$LINENO"; then : | |
13952 | ac_cv_lib_krb5_krb5_init_context=yes | |
13953 | else | |
13954 | ac_cv_lib_krb5_krb5_init_context=no | |
13955 | fi | |
13956 | rm -f core conftest.err conftest.$ac_objext \ | |
13957 | conftest$ac_exeext conftest.$ac_ext | |
13958 | LIBS=$ac_check_lib_save_LIBS | |
13959 | fi | |
13960 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb5_krb5_init_context" >&5 | |
13961 | $as_echo "$ac_cv_lib_krb5_krb5_init_context" >&6; } | |
13962 | if test "x$ac_cv_lib_krb5_krb5_init_context" = x""yes; then : | |
13963 | have_krb5=yes | |
13964 | else | |
13965 | have_krb5=no | |
13966 | fi | |
f199cab1 | 13967 | |
5476a9a4 GM |
13968 | if test $have_krb5=yes; then |
13969 | KRB5LIB=-lkrb5 | |
13970 | LIBS="$KRB5LIB $LIBS" | |
f199cab1 | 13971 | |
5476a9a4 | 13972 | $as_echo "#define HAVE_LIBKRB5 1" >>confdefs.h |
f199cab1 | 13973 | |
5476a9a4 GM |
13974 | fi |
13975 | if test "${with_kerberos5}" = no; then | |
13976 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes425" >&5 | |
13977 | $as_echo_n "checking for des_cbc_encrypt in -ldes425... " >&6; } | |
13978 | if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then : | |
f199cab1 GM |
13979 | $as_echo_n "(cached) " >&6 |
13980 | else | |
5476a9a4 GM |
13981 | ac_check_lib_save_LIBS=$LIBS |
13982 | LIBS="-ldes425 $LIBS" | |
13983 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3e0be4ab | 13984 | /* end confdefs.h. */ |
f199cab1 | 13985 | |
5476a9a4 GM |
13986 | /* Override any GCC internal prototype to avoid an error. |
13987 | Use char because int might match the return type of a GCC | |
13988 | builtin and then its argument prototype would still apply. */ | |
13989 | #ifdef __cplusplus | |
13990 | extern "C" | |
13991 | #endif | |
13992 | char des_cbc_encrypt (); | |
3e0be4ab GM |
13993 | int |
13994 | main () | |
13995 | { | |
5476a9a4 | 13996 | return des_cbc_encrypt (); |
3e0be4ab GM |
13997 | ; |
13998 | return 0; | |
13999 | } | |
14000 | _ACEOF | |
5476a9a4 GM |
14001 | if ac_fn_c_try_link "$LINENO"; then : |
14002 | ac_cv_lib_des425_des_cbc_encrypt=yes | |
3e0be4ab | 14003 | else |
5476a9a4 | 14004 | ac_cv_lib_des425_des_cbc_encrypt=no |
3e0be4ab | 14005 | fi |
5476a9a4 GM |
14006 | rm -f core conftest.err conftest.$ac_objext \ |
14007 | conftest$ac_exeext conftest.$ac_ext | |
14008 | LIBS=$ac_check_lib_save_LIBS | |
4fc2b746 | 14009 | fi |
5476a9a4 GM |
14010 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5 |
14011 | $as_echo "$ac_cv_lib_des425_des_cbc_encrypt" >&6; } | |
14012 | if test "x$ac_cv_lib_des425_des_cbc_encrypt" = x""yes; then : | |
14013 | have_des425=yes | |
14014 | else | |
14015 | have_des425=no | |
f199cab1 | 14016 | fi |
6c051bab | 14017 | |
5476a9a4 GM |
14018 | if test $have_des425 = yes; then |
14019 | DESLIB=-ldes425 | |
14020 | LIBS="$DESLIB $LIBS" | |
6c051bab | 14021 | |
5476a9a4 | 14022 | $as_echo "#define HAVE_LIBDES425 1" >>confdefs.h |
f199cab1 | 14023 | |
5476a9a4 GM |
14024 | else |
14025 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes" >&5 | |
14026 | $as_echo_n "checking for des_cbc_encrypt in -ldes... " >&6; } | |
14027 | if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then : | |
14028 | $as_echo_n "(cached) " >&6 | |
14029 | else | |
14030 | ac_check_lib_save_LIBS=$LIBS | |
14031 | LIBS="-ldes $LIBS" | |
14032 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14033 | /* end confdefs.h. */ | |
f199cab1 | 14034 | |
5476a9a4 GM |
14035 | /* Override any GCC internal prototype to avoid an error. |
14036 | Use char because int might match the return type of a GCC | |
14037 | builtin and then its argument prototype would still apply. */ | |
14038 | #ifdef __cplusplus | |
14039 | extern "C" | |
14040 | #endif | |
14041 | char des_cbc_encrypt (); | |
14042 | int | |
14043 | main () | |
14044 | { | |
14045 | return des_cbc_encrypt (); | |
14046 | ; | |
14047 | return 0; | |
14048 | } | |
14049 | _ACEOF | |
14050 | if ac_fn_c_try_link "$LINENO"; then : | |
14051 | ac_cv_lib_des_des_cbc_encrypt=yes | |
14052 | else | |
14053 | ac_cv_lib_des_des_cbc_encrypt=no | |
14054 | fi | |
14055 | rm -f core conftest.err conftest.$ac_objext \ | |
14056 | conftest$ac_exeext conftest.$ac_ext | |
14057 | LIBS=$ac_check_lib_save_LIBS | |
14058 | fi | |
14059 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des_des_cbc_encrypt" >&5 | |
14060 | $as_echo "$ac_cv_lib_des_des_cbc_encrypt" >&6; } | |
14061 | if test "x$ac_cv_lib_des_des_cbc_encrypt" = x""yes; then : | |
14062 | have_des=yes | |
14063 | else | |
14064 | have_des=no | |
14065 | fi | |
f199cab1 | 14066 | |
5476a9a4 GM |
14067 | if test $have_des = yes; then |
14068 | DESLIB=-ldes | |
14069 | LIBS="$DESLIB $LIBS" | |
f199cab1 | 14070 | |
5476a9a4 | 14071 | $as_echo "#define HAVE_LIBDES 1" >>confdefs.h |
f199cab1 | 14072 | |
5476a9a4 GM |
14073 | fi |
14074 | fi | |
14075 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb4" >&5 | |
14076 | $as_echo_n "checking for krb_get_cred in -lkrb4... " >&6; } | |
14077 | if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then : | |
942f733f PE |
14078 | $as_echo_n "(cached) " >&6 |
14079 | else | |
5476a9a4 GM |
14080 | ac_check_lib_save_LIBS=$LIBS |
14081 | LIBS="-lkrb4 $LIBS" | |
14082 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
942f733f | 14083 | /* end confdefs.h. */ |
942f733f | 14084 | |
5476a9a4 GM |
14085 | /* Override any GCC internal prototype to avoid an error. |
14086 | Use char because int might match the return type of a GCC | |
14087 | builtin and then its argument prototype would still apply. */ | |
14088 | #ifdef __cplusplus | |
14089 | extern "C" | |
14090 | #endif | |
14091 | char krb_get_cred (); | |
942f733f PE |
14092 | int |
14093 | main () | |
14094 | { | |
5476a9a4 | 14095 | return krb_get_cred (); |
942f733f PE |
14096 | ; |
14097 | return 0; | |
14098 | } | |
14099 | _ACEOF | |
5476a9a4 GM |
14100 | if ac_fn_c_try_link "$LINENO"; then : |
14101 | ac_cv_lib_krb4_krb_get_cred=yes | |
14102 | else | |
14103 | ac_cv_lib_krb4_krb_get_cred=no | |
14104 | fi | |
14105 | rm -f core conftest.err conftest.$ac_objext \ | |
14106 | conftest$ac_exeext conftest.$ac_ext | |
14107 | LIBS=$ac_check_lib_save_LIBS | |
14108 | fi | |
14109 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb4_krb_get_cred" >&5 | |
14110 | $as_echo "$ac_cv_lib_krb4_krb_get_cred" >&6; } | |
14111 | if test "x$ac_cv_lib_krb4_krb_get_cred" = x""yes; then : | |
14112 | have_krb4=yes | |
14113 | else | |
14114 | have_krb4=no | |
14115 | fi | |
14116 | ||
14117 | if test $have_krb4 = yes; then | |
14118 | KRB4LIB=-lkrb4 | |
14119 | LIBS="$KRB4LIB $LIBS" | |
14120 | ||
14121 | $as_echo "#define HAVE_LIBKRB4 1" >>confdefs.h | |
14122 | ||
14123 | else | |
14124 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb" >&5 | |
14125 | $as_echo_n "checking for krb_get_cred in -lkrb... " >&6; } | |
14126 | if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then : | |
14127 | $as_echo_n "(cached) " >&6 | |
3e0be4ab | 14128 | else |
5476a9a4 GM |
14129 | ac_check_lib_save_LIBS=$LIBS |
14130 | LIBS="-lkrb $LIBS" | |
14131 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
942f733f | 14132 | /* end confdefs.h. */ |
942f733f | 14133 | |
5476a9a4 GM |
14134 | /* Override any GCC internal prototype to avoid an error. |
14135 | Use char because int might match the return type of a GCC | |
14136 | builtin and then its argument prototype would still apply. */ | |
14137 | #ifdef __cplusplus | |
14138 | extern "C" | |
14139 | #endif | |
14140 | char krb_get_cred (); | |
942f733f PE |
14141 | int |
14142 | main () | |
14143 | { | |
5476a9a4 | 14144 | return krb_get_cred (); |
942f733f PE |
14145 | ; |
14146 | return 0; | |
14147 | } | |
14148 | _ACEOF | |
5476a9a4 GM |
14149 | if ac_fn_c_try_link "$LINENO"; then : |
14150 | ac_cv_lib_krb_krb_get_cred=yes | |
942f733f | 14151 | else |
5476a9a4 | 14152 | ac_cv_lib_krb_krb_get_cred=no |
942f733f | 14153 | fi |
5476a9a4 GM |
14154 | rm -f core conftest.err conftest.$ac_objext \ |
14155 | conftest$ac_exeext conftest.$ac_ext | |
14156 | LIBS=$ac_check_lib_save_LIBS | |
3e0be4ab | 14157 | fi |
5476a9a4 GM |
14158 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb_krb_get_cred" >&5 |
14159 | $as_echo "$ac_cv_lib_krb_krb_get_cred" >&6; } | |
14160 | if test "x$ac_cv_lib_krb_krb_get_cred" = x""yes; then : | |
14161 | have_krb=yes | |
14162 | else | |
14163 | have_krb=no | |
942f733f | 14164 | fi |
f199cab1 | 14165 | |
5476a9a4 GM |
14166 | if test $have_krb = yes; then |
14167 | KRB4LIB=-lkrb | |
14168 | LIBS="$KRB4LIB $LIBS" | |
14169 | ||
14170 | $as_echo "#define HAVE_LIBKRB 1" >>confdefs.h | |
14171 | ||
14172 | fi | |
14173 | fi | |
f199cab1 GM |
14174 | fi |
14175 | ||
5476a9a4 GM |
14176 | if test "${with_kerberos5}" != no; then |
14177 | for ac_header in krb5.h | |
14178 | do : | |
14179 | ac_fn_c_check_header_mongrel "$LINENO" "krb5.h" "ac_cv_header_krb5_h" "$ac_includes_default" | |
14180 | if test "x$ac_cv_header_krb5_h" = x""yes; then : | |
14181 | cat >>confdefs.h <<_ACEOF | |
14182 | #define HAVE_KRB5_H 1 | |
14183 | _ACEOF | |
14184 | ac_fn_c_check_member "$LINENO" "krb5_error" "text" "ac_cv_member_krb5_error_text" "#include <krb5.h> | |
14185 | " | |
14186 | if test "x$ac_cv_member_krb5_error_text" = x""yes; then : | |
14187 | ||
f199cab1 | 14188 | cat >>confdefs.h <<_ACEOF |
5476a9a4 | 14189 | #define HAVE_KRB5_ERROR_TEXT 1 |
f199cab1 GM |
14190 | _ACEOF |
14191 | ||
14192 | ||
5476a9a4 GM |
14193 | fi |
14194 | ac_fn_c_check_member "$LINENO" "krb5_error" "e_text" "ac_cv_member_krb5_error_e_text" "#include <krb5.h> | |
14195 | " | |
14196 | if test "x$ac_cv_member_krb5_error_e_text" = x""yes; then : | |
f199cab1 | 14197 | |
5476a9a4 GM |
14198 | cat >>confdefs.h <<_ACEOF |
14199 | #define HAVE_KRB5_ERROR_E_TEXT 1 | |
14200 | _ACEOF | |
f199cab1 GM |
14201 | |
14202 | ||
5476a9a4 | 14203 | fi |
f199cab1 | 14204 | |
5476a9a4 | 14205 | fi |
f199cab1 | 14206 | |
5476a9a4 | 14207 | done |
f199cab1 | 14208 | |
5476a9a4 GM |
14209 | else |
14210 | for ac_header in des.h | |
14211 | do : | |
14212 | ac_fn_c_check_header_mongrel "$LINENO" "des.h" "ac_cv_header_des_h" "$ac_includes_default" | |
14213 | if test "x$ac_cv_header_des_h" = x""yes; then : | |
14214 | cat >>confdefs.h <<_ACEOF | |
14215 | #define HAVE_DES_H 1 | |
14216 | _ACEOF | |
f199cab1 | 14217 | |
5476a9a4 GM |
14218 | else |
14219 | for ac_header in kerberosIV/des.h | |
14220 | do : | |
14221 | ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/des.h" "ac_cv_header_kerberosIV_des_h" "$ac_includes_default" | |
14222 | if test "x$ac_cv_header_kerberosIV_des_h" = x""yes; then : | |
14223 | cat >>confdefs.h <<_ACEOF | |
14224 | #define HAVE_KERBEROSIV_DES_H 1 | |
14225 | _ACEOF | |
f199cab1 | 14226 | |
5476a9a4 GM |
14227 | else |
14228 | for ac_header in kerberos/des.h | |
14229 | do : | |
14230 | ac_fn_c_check_header_mongrel "$LINENO" "kerberos/des.h" "ac_cv_header_kerberos_des_h" "$ac_includes_default" | |
14231 | if test "x$ac_cv_header_kerberos_des_h" = x""yes; then : | |
14232 | cat >>confdefs.h <<_ACEOF | |
14233 | #define HAVE_KERBEROS_DES_H 1 | |
14234 | _ACEOF | |
f199cab1 | 14235 | |
5476a9a4 | 14236 | fi |
f199cab1 | 14237 | |
5476a9a4 GM |
14238 | done |
14239 | ||
14240 | fi | |
14241 | ||
14242 | done | |
14243 | ||
14244 | fi | |
14245 | ||
14246 | done | |
14247 | ||
14248 | for ac_header in krb.h | |
f199cab1 | 14249 | do : |
5476a9a4 GM |
14250 | ac_fn_c_check_header_mongrel "$LINENO" "krb.h" "ac_cv_header_krb_h" "$ac_includes_default" |
14251 | if test "x$ac_cv_header_krb_h" = x""yes; then : | |
f199cab1 | 14252 | cat >>confdefs.h <<_ACEOF |
5476a9a4 GM |
14253 | #define HAVE_KRB_H 1 |
14254 | _ACEOF | |
14255 | ||
14256 | else | |
14257 | for ac_header in kerberosIV/krb.h | |
14258 | do : | |
14259 | ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/krb.h" "ac_cv_header_kerberosIV_krb_h" "$ac_includes_default" | |
14260 | if test "x$ac_cv_header_kerberosIV_krb_h" = x""yes; then : | |
14261 | cat >>confdefs.h <<_ACEOF | |
14262 | #define HAVE_KERBEROSIV_KRB_H 1 | |
14263 | _ACEOF | |
14264 | ||
14265 | else | |
14266 | for ac_header in kerberos/krb.h | |
14267 | do : | |
14268 | ac_fn_c_check_header_mongrel "$LINENO" "kerberos/krb.h" "ac_cv_header_kerberos_krb_h" "$ac_includes_default" | |
14269 | if test "x$ac_cv_header_kerberos_krb_h" = x""yes; then : | |
14270 | cat >>confdefs.h <<_ACEOF | |
14271 | #define HAVE_KERBEROS_KRB_H 1 | |
f199cab1 | 14272 | _ACEOF |
942f733f | 14273 | |
3e0be4ab | 14274 | fi |
942f733f | 14275 | |
f199cab1 GM |
14276 | done |
14277 | ||
5476a9a4 GM |
14278 | fi |
14279 | ||
14280 | done | |
14281 | ||
14282 | fi | |
14283 | ||
14284 | done | |
14285 | ||
14286 | fi | |
14287 | for ac_header in com_err.h | |
f199cab1 | 14288 | do : |
5476a9a4 GM |
14289 | ac_fn_c_check_header_mongrel "$LINENO" "com_err.h" "ac_cv_header_com_err_h" "$ac_includes_default" |
14290 | if test "x$ac_cv_header_com_err_h" = x""yes; then : | |
f199cab1 | 14291 | cat >>confdefs.h <<_ACEOF |
5476a9a4 | 14292 | #define HAVE_COM_ERR_H 1 |
f199cab1 GM |
14293 | _ACEOF |
14294 | ||
3e0be4ab | 14295 | fi |
f199cab1 | 14296 | |
5476a9a4 | 14297 | done |
3e0be4ab GM |
14298 | |
14299 | fi | |
14300 | ||
f199cab1 GM |
14301 | |
14302 | ||
14303 | ||
14304 | ||
f199cab1 GM |
14305 | |
14306 | ||
14307 | ||
14308 | ||
14309 | ||
5476a9a4 GM |
14310 | for ac_func in $ac_func_list |
14311 | do : | |
14312 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
14313 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
14314 | eval as_val=\$$as_ac_var | |
14315 | if test "x$as_val" = x""yes; then : | |
14316 | cat >>confdefs.h <<_ACEOF | |
14317 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
14318 | _ACEOF | |
14319 | ||
14320 | fi | |
14321 | done | |
14322 | ||
f199cab1 GM |
14323 | |
14324 | ||
14325 | ||
5476a9a4 GM |
14326 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime caches TZ" >&5 |
14327 | $as_echo_n "checking whether localtime caches TZ... " >&6; } | |
14328 | if test "${emacs_cv_localtime_cache+set}" = set; then : | |
14329 | $as_echo_n "(cached) " >&6 | |
14330 | else | |
14331 | if test x$ac_cv_func_tzset = xyes; then | |
14332 | if test "$cross_compiling" = yes; then : | |
14333 | # If we have tzset, assume the worst when cross-compiling. | |
14334 | emacs_cv_localtime_cache=yes | |
14335 | else | |
14336 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14337 | /* end confdefs.h. */ | |
14338 | #include <time.h> | |
14339 | char TZ_GMT0[] = "TZ=GMT0"; | |
14340 | char TZ_PST8[] = "TZ=PST8"; | |
14341 | main() | |
14342 | { | |
14343 | time_t now = time ((time_t *) 0); | |
14344 | int hour_GMT0, hour_unset; | |
14345 | if (putenv (TZ_GMT0) != 0) | |
14346 | exit (1); | |
14347 | hour_GMT0 = localtime (&now)->tm_hour; | |
14348 | unsetenv("TZ"); | |
14349 | hour_unset = localtime (&now)->tm_hour; | |
14350 | if (putenv (TZ_PST8) != 0) | |
14351 | exit (1); | |
14352 | if (localtime (&now)->tm_hour == hour_GMT0) | |
14353 | exit (1); | |
14354 | unsetenv("TZ"); | |
14355 | if (localtime (&now)->tm_hour != hour_unset) | |
14356 | exit (1); | |
14357 | exit (0); | |
14358 | } | |
14359 | _ACEOF | |
14360 | if ac_fn_c_try_run "$LINENO"; then : | |
14361 | emacs_cv_localtime_cache=no | |
14362 | else | |
14363 | emacs_cv_localtime_cache=yes | |
14364 | fi | |
14365 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
14366 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
14367 | fi | |
f199cab1 | 14368 | |
5476a9a4 GM |
14369 | else |
14370 | # If we lack tzset, report that localtime does not cache TZ, | |
14371 | # since we can't invalidate the cache if we don't have tzset. | |
14372 | emacs_cv_localtime_cache=no | |
14373 | fi | |
14374 | fi | |
14375 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_localtime_cache" >&5 | |
14376 | $as_echo "$emacs_cv_localtime_cache" >&6; } | |
14377 | if test $emacs_cv_localtime_cache = yes; then | |
f199cab1 | 14378 | |
5476a9a4 | 14379 | $as_echo "#define LOCALTIME_CACHE 1" >>confdefs.h |
f199cab1 | 14380 | |
5476a9a4 | 14381 | fi |
f199cab1 | 14382 | |
5476a9a4 GM |
14383 | ok_so_far=yes |
14384 | ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket" | |
14385 | if test "x$ac_cv_func_socket" = x""yes; then : | |
3e0be4ab | 14386 | |
5476a9a4 GM |
14387 | else |
14388 | ok_so_far=no | |
14389 | fi | |
f199cab1 | 14390 | |
5476a9a4 GM |
14391 | if test $ok_so_far = yes; then |
14392 | ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default" | |
14393 | if test "x$ac_cv_header_netinet_in_h" = x""yes; then : | |
f199cab1 | 14394 | |
5476a9a4 GM |
14395 | else |
14396 | ok_so_far=no | |
14397 | fi | |
f199cab1 GM |
14398 | |
14399 | ||
5476a9a4 GM |
14400 | fi |
14401 | if test $ok_so_far = yes; then | |
14402 | ac_fn_c_check_header_mongrel "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$ac_includes_default" | |
14403 | if test "x$ac_cv_header_arpa_inet_h" = x""yes; then : | |
f199cab1 | 14404 | |
5476a9a4 GM |
14405 | else |
14406 | ok_so_far=no | |
14407 | fi | |
f199cab1 GM |
14408 | |
14409 | ||
5476a9a4 GM |
14410 | fi |
14411 | if test $ok_so_far = yes; then | |
f199cab1 | 14412 | |
5476a9a4 | 14413 | $as_echo "#define HAVE_INET_SOCKETS 1" >>confdefs.h |
f199cab1 | 14414 | |
5476a9a4 | 14415 | fi |
f199cab1 | 14416 | |
5476a9a4 | 14417 | if test -f /usr/lpp/X11/bin/smt.exp; then |
942f733f | 14418 | |
5476a9a4 | 14419 | $as_echo "#define HAVE_AIX_SMT_EXP 1" >>confdefs.h |
942f733f | 14420 | |
942f733f | 14421 | fi |
3e0be4ab | 14422 | |
5476a9a4 GM |
14423 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system supports dynamic ptys" >&5 |
14424 | $as_echo_n "checking whether system supports dynamic ptys... " >&6; } | |
14425 | if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then | |
14426 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
14427 | $as_echo "yes" >&6; } | |
14428 | ||
14429 | $as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h | |
3e0be4ab | 14430 | |
5476a9a4 GM |
14431 | else |
14432 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
14433 | $as_echo "no" >&6; } | |
14434 | fi | |
3e0be4ab | 14435 | |
5476a9a4 GM |
14436 | ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" |
14437 | if test "x$ac_cv_type_pid_t" = x""yes; then : | |
3e0be4ab | 14438 | |
5476a9a4 | 14439 | else |
3e0be4ab | 14440 | |
5476a9a4 GM |
14441 | cat >>confdefs.h <<_ACEOF |
14442 | #define pid_t int | |
14443 | _ACEOF | |
f199cab1 | 14444 | |
5476a9a4 | 14445 | fi |
f199cab1 | 14446 | |
5476a9a4 GM |
14447 | for ac_header in vfork.h |
14448 | do : | |
14449 | ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default" | |
14450 | if test "x$ac_cv_header_vfork_h" = x""yes; then : | |
14451 | cat >>confdefs.h <<_ACEOF | |
14452 | #define HAVE_VFORK_H 1 | |
14453 | _ACEOF | |
f199cab1 | 14454 | |
5476a9a4 | 14455 | fi |
f199cab1 | 14456 | |
5476a9a4 | 14457 | done |
f199cab1 | 14458 | |
5476a9a4 GM |
14459 | for ac_func in fork vfork |
14460 | do : | |
14461 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
14462 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
14463 | eval as_val=\$$as_ac_var | |
14464 | if test "x$as_val" = x""yes; then : | |
14465 | cat >>confdefs.h <<_ACEOF | |
14466 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
14467 | _ACEOF | |
f199cab1 | 14468 | |
5476a9a4 GM |
14469 | fi |
14470 | done | |
f199cab1 | 14471 | |
5476a9a4 GM |
14472 | if test "x$ac_cv_func_fork" = xyes; then |
14473 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 | |
14474 | $as_echo_n "checking for working fork... " >&6; } | |
14475 | if test "${ac_cv_func_fork_works+set}" = set; then : | |
14476 | $as_echo_n "(cached) " >&6 | |
14477 | else | |
14478 | if test "$cross_compiling" = yes; then : | |
14479 | ac_cv_func_fork_works=cross | |
14480 | else | |
14481 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14482 | /* end confdefs.h. */ | |
14483 | $ac_includes_default | |
14484 | int | |
14485 | main () | |
14486 | { | |
f199cab1 | 14487 | |
5476a9a4 GM |
14488 | /* By Ruediger Kuhlmann. */ |
14489 | return fork () < 0; | |
f199cab1 | 14490 | |
5476a9a4 GM |
14491 | ; |
14492 | return 0; | |
14493 | } | |
14494 | _ACEOF | |
14495 | if ac_fn_c_try_run "$LINENO"; then : | |
14496 | ac_cv_func_fork_works=yes | |
14497 | else | |
14498 | ac_cv_func_fork_works=no | |
14499 | fi | |
14500 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
14501 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
14502 | fi | |
f199cab1 | 14503 | |
5476a9a4 GM |
14504 | fi |
14505 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5 | |
14506 | $as_echo "$ac_cv_func_fork_works" >&6; } | |
f199cab1 | 14507 | |
5476a9a4 GM |
14508 | else |
14509 | ac_cv_func_fork_works=$ac_cv_func_fork | |
14510 | fi | |
14511 | if test "x$ac_cv_func_fork_works" = xcross; then | |
14512 | case $host in | |
14513 | *-*-amigaos* | *-*-msdosdjgpp*) | |
14514 | # Override, as these systems have only a dummy fork() stub | |
14515 | ac_cv_func_fork_works=no | |
14516 | ;; | |
14517 | *) | |
14518 | ac_cv_func_fork_works=yes | |
14519 | ;; | |
14520 | esac | |
14521 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 | |
14522 | $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} | |
14523 | fi | |
14524 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
14525 | if test "x$ac_cv_func_vfork" = xyes; then | |
14526 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 | |
14527 | $as_echo_n "checking for working vfork... " >&6; } | |
14528 | if test "${ac_cv_func_vfork_works+set}" = set; then : | |
f199cab1 GM |
14529 | $as_echo_n "(cached) " >&6 |
14530 | else | |
14531 | if test "$cross_compiling" = yes; then : | |
5476a9a4 | 14532 | ac_cv_func_vfork_works=cross |
f199cab1 GM |
14533 | else |
14534 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14535 | /* end confdefs.h. */ | |
5476a9a4 GM |
14536 | /* Thanks to Paul Eggert for this test. */ |
14537 | $ac_includes_default | |
14538 | #include <sys/wait.h> | |
14539 | #ifdef HAVE_VFORK_H | |
14540 | # include <vfork.h> | |
f199cab1 | 14541 | #endif |
5476a9a4 GM |
14542 | /* On some sparc systems, changes by the child to local and incoming |
14543 | argument registers are propagated back to the parent. The compiler | |
14544 | is told about this with #include <vfork.h>, but some compilers | |
14545 | (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a | |
14546 | static variable whose address is put into a register that is | |
14547 | clobbered by the vfork. */ | |
14548 | static void | |
14549 | #ifdef __cplusplus | |
14550 | sparc_address_test (int arg) | |
14551 | # else | |
14552 | sparc_address_test (arg) int arg; | |
f199cab1 | 14553 | #endif |
5476a9a4 GM |
14554 | { |
14555 | static pid_t child; | |
14556 | if (!child) { | |
14557 | child = vfork (); | |
14558 | if (child < 0) { | |
14559 | perror ("vfork"); | |
14560 | _exit(2); | |
14561 | } | |
14562 | if (!child) { | |
14563 | arg = getpid(); | |
14564 | write(-1, "", 0); | |
14565 | _exit (arg); | |
14566 | } | |
14567 | } | |
14568 | } | |
f199cab1 | 14569 | |
5476a9a4 GM |
14570 | int |
14571 | main () | |
14572 | { | |
14573 | pid_t parent = getpid (); | |
14574 | pid_t child; | |
f199cab1 | 14575 | |
5476a9a4 | 14576 | sparc_address_test (0); |
f199cab1 | 14577 | |
5476a9a4 | 14578 | child = vfork (); |
3e0be4ab | 14579 | |
5476a9a4 GM |
14580 | if (child == 0) { |
14581 | /* Here is another test for sparc vfork register problems. This | |
14582 | test uses lots of local variables, at least as many local | |
14583 | variables as main has allocated so far including compiler | |
14584 | temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris | |
14585 | 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should | |
14586 | reuse the register of parent for one of the local variables, | |
14587 | since it will think that parent can't possibly be used any more | |
14588 | in this routine. Assigning to the local variable will thus | |
14589 | munge parent in the parent process. */ | |
14590 | pid_t | |
14591 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
14592 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
14593 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
14594 | use the same hardware register for all 8 local variables. */ | |
14595 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
14596 | || p != p5 || p != p6 || p != p7) | |
14597 | _exit(1); | |
3e0be4ab | 14598 | |
5476a9a4 GM |
14599 | /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent |
14600 | from child file descriptors. If the child closes a descriptor | |
14601 | before it execs or exits, this munges the parent's descriptor | |
14602 | as well. Test for this by closing stdout in the child. */ | |
14603 | _exit(close(fileno(stdout)) != 0); | |
14604 | } else { | |
14605 | int status; | |
14606 | struct stat st; | |
3e0be4ab | 14607 | |
5476a9a4 GM |
14608 | while (wait(&status) != child) |
14609 | ; | |
14610 | return ( | |
14611 | /* Was there some problem with vforking? */ | |
14612 | child < 0 | |
3e0be4ab | 14613 | |
5476a9a4 GM |
14614 | /* Did the child fail? (This shouldn't happen.) */ |
14615 | || status | |
14616 | ||
14617 | /* Did the vfork/compiler bug occur? */ | |
14618 | || parent != getpid() | |
14619 | ||
14620 | /* Did the file descriptor bug occur? */ | |
14621 | || fstat(fileno(stdout), &st) != 0 | |
14622 | ); | |
14623 | } | |
f199cab1 | 14624 | } |
5476a9a4 GM |
14625 | _ACEOF |
14626 | if ac_fn_c_try_run "$LINENO"; then : | |
14627 | ac_cv_func_vfork_works=yes | |
14628 | else | |
14629 | ac_cv_func_vfork_works=no | |
14630 | fi | |
14631 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
14632 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
14633 | fi | |
14634 | ||
14635 | fi | |
14636 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 | |
14637 | $as_echo "$ac_cv_func_vfork_works" >&6; } | |
14638 | ||
14639 | fi; | |
14640 | if test "x$ac_cv_func_fork_works" = xcross; then | |
14641 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
14642 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 | |
14643 | $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} | |
14644 | fi | |
14645 | ||
14646 | if test "x$ac_cv_func_vfork_works" = xyes; then | |
3e0be4ab | 14647 | |
5476a9a4 | 14648 | $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h |
3e0be4ab | 14649 | |
5476a9a4 | 14650 | else |
3e0be4ab | 14651 | |
5476a9a4 | 14652 | $as_echo "#define vfork fork" >>confdefs.h |
942f733f | 14653 | |
5476a9a4 GM |
14654 | fi |
14655 | if test "x$ac_cv_func_fork_works" = xyes; then | |
942f733f | 14656 | |
5476a9a4 | 14657 | $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h |
942f733f | 14658 | |
5476a9a4 | 14659 | fi |
f199cab1 | 14660 | |
f199cab1 | 14661 | |
5476a9a4 GM |
14662 | for ac_func in snprintf |
14663 | do : | |
14664 | ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf" | |
14665 | if test "x$ac_cv_func_snprintf" = x""yes; then : | |
14666 | cat >>confdefs.h <<_ACEOF | |
14667 | #define HAVE_SNPRINTF 1 | |
14668 | _ACEOF | |
14669 | ||
14670 | fi | |
14671 | done | |
14672 | ||
942f733f | 14673 | |
5476a9a4 GM |
14674 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 |
14675 | $as_echo_n "checking for nl_langinfo and CODESET... " >&6; } | |
14676 | if test "${emacs_cv_langinfo_codeset+set}" = set; then : | |
14677 | $as_echo_n "(cached) " >&6 | |
14678 | else | |
14679 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14680 | /* end confdefs.h. */ | |
14681 | #include <langinfo.h> | |
3e0be4ab GM |
14682 | int |
14683 | main () | |
14684 | { | |
5476a9a4 GM |
14685 | char* cs = nl_langinfo(CODESET); |
14686 | ; | |
14687 | return 0; | |
14688 | } | |
14689 | _ACEOF | |
14690 | if ac_fn_c_try_link "$LINENO"; then : | |
14691 | emacs_cv_langinfo_codeset=yes | |
14692 | else | |
14693 | emacs_cv_langinfo_codeset=no | |
14694 | fi | |
14695 | rm -f core conftest.err conftest.$ac_objext \ | |
14696 | conftest$ac_exeext conftest.$ac_ext | |
f199cab1 | 14697 | |
5476a9a4 GM |
14698 | fi |
14699 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_langinfo_codeset" >&5 | |
14700 | $as_echo "$emacs_cv_langinfo_codeset" >&6; } | |
14701 | if test $emacs_cv_langinfo_codeset = yes; then | |
f199cab1 | 14702 | |
5476a9a4 | 14703 | $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h |
f199cab1 | 14704 | |
5476a9a4 | 14705 | fi |
f199cab1 | 14706 | |
5476a9a4 GM |
14707 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5 |
14708 | $as_echo_n "checking for mbstate_t... " >&6; } | |
14709 | if test "${ac_cv_type_mbstate_t+set}" = set; then : | |
14710 | $as_echo_n "(cached) " >&6 | |
14711 | else | |
14712 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14713 | /* end confdefs.h. */ | |
14714 | $ac_includes_default | |
14715 | # include <wchar.h> | |
14716 | int | |
14717 | main () | |
14718 | { | |
14719 | mbstate_t x; return sizeof x; | |
14720 | ; | |
14721 | return 0; | |
3e0be4ab | 14722 | } |
942f733f | 14723 | _ACEOF |
5476a9a4 GM |
14724 | if ac_fn_c_try_compile "$LINENO"; then : |
14725 | ac_cv_type_mbstate_t=yes | |
3e0be4ab | 14726 | else |
5476a9a4 | 14727 | ac_cv_type_mbstate_t=no |
942f733f | 14728 | fi |
5476a9a4 | 14729 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3e0be4ab | 14730 | fi |
5476a9a4 GM |
14731 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5 |
14732 | $as_echo "$ac_cv_type_mbstate_t" >&6; } | |
14733 | if test $ac_cv_type_mbstate_t = yes; then | |
f199cab1 | 14734 | |
5476a9a4 | 14735 | $as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h |
f199cab1 | 14736 | |
5476a9a4 | 14737 | else |
f199cab1 | 14738 | |
5476a9a4 | 14739 | $as_echo "#define mbstate_t int" >>confdefs.h |
f199cab1 | 14740 | |
5476a9a4 GM |
14741 | fi |
14742 | ||
14743 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C restricted array declarations" >&5 | |
14744 | $as_echo_n "checking for C restricted array declarations... " >&6; } | |
14745 | if test "${emacs_cv_c_restrict_arr+set}" = set; then : | |
14746 | $as_echo_n "(cached) " >&6 | |
14747 | else | |
14748 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14749 | /* end confdefs.h. */ | |
14750 | void fred (int x[__restrict]); | |
14751 | int | |
14752 | main () | |
14753 | { | |
14754 | ||
14755 | ; | |
14756 | return 0; | |
14757 | } | |
14758 | _ACEOF | |
14759 | if ac_fn_c_try_compile "$LINENO"; then : | |
14760 | emacs_cv_c_restrict_arr=yes | |
14761 | else | |
14762 | emacs_cv_c_restrict_arr=no | |
14763 | fi | |
14764 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
14765 | fi | |
14766 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_c_restrict_arr" >&5 | |
14767 | $as_echo "$emacs_cv_c_restrict_arr" >&6; } | |
14768 | if test "$emacs_cv_c_restrict_arr" = yes; then | |
f199cab1 | 14769 | |
5476a9a4 | 14770 | $as_echo "#define __restrict_arr __restrict" >>confdefs.h |
f199cab1 | 14771 | |
5476a9a4 | 14772 | fi |
f199cab1 GM |
14773 | |
14774 | ||
14775 | ||
8ad96b1d GM |
14776 | $as_echo "#define AMPERSAND_FULL_NAME 1" >>confdefs.h |
14777 | ||
14778 | ||
14779 | ||
5476a9a4 | 14780 | $as_echo "#define CLASH_DETECTION 1" >>confdefs.h |
f199cab1 GM |
14781 | |
14782 | ||
6b10626d GM |
14783 | |
14784 | ||
14785 | ||
14786 | ||
5476a9a4 | 14787 | ## Note: PTYs are broken on darwin <6. Use at your own risk. |
f199cab1 | 14788 | |
5476a9a4 | 14789 | $as_echo "#define HAVE_PTYS 1" >>confdefs.h |
f199cab1 GM |
14790 | |
14791 | ||
14792 | ||
5476a9a4 | 14793 | $as_echo "#define HAVE_SOCKETS 1" >>confdefs.h |
f199cab1 | 14794 | |
942f733f | 14795 | |
942f733f | 14796 | |
6b10626d GM |
14797 | |
14798 | ||
8ad96b1d GM |
14799 | $as_echo "#define NULL_DEVICE \"/dev/null\"" >>confdefs.h |
14800 | ||
14801 | ||
14802 | ||
14803 | $as_echo "#define SEPCHAR ':'" >>confdefs.h | |
14804 | ||
14805 | ||
14806 | ||
14807 | $as_echo "#define subprocesses 1" >>confdefs.h | |
14808 | ||
14809 | ||
14810 | ||
14811 | $as_echo "#define USER_FULL_NAME pw->pw_gecos" >>confdefs.h | |
14812 | ||
14813 | ||
14814 | ||
942f733f | 14815 | |
9ff736dc GM |
14816 | $as_echo "#define DIRECTORY_SEP '/'" >>confdefs.h |
14817 | ||
14818 | ||
14819 | ||
f199cab1 | 14820 | |
6b10626d GM |
14821 | |
14822 | $as_echo "#define IS_DEVICE_SEP(_c_) 0" >>confdefs.h | |
14823 | ||
14824 | ||
14825 | ||
14826 | $as_echo "#define IS_DIRECTORY_SEP(_c_) ((_c_) == DIRECTORY_SEP)" >>confdefs.h | |
14827 | ||
14828 | ||
14829 | ||
14830 | $as_echo "#define IS_ANY_SEP(_c_) (IS_DIRECTORY_SEP (_c_))" >>confdefs.h | |
14831 | ||
14832 | ||
14833 | ||
14834 | ||
14835 | ||
5476a9a4 GM |
14836 | case $opsys in |
14837 | aix4-2) | |
14838 | if test x$ac_cv_lib_Xmu_XmuConvertStandardSelection != xyes; then | |
14839 | $as_echo "#define NO_EDITRES 1" >>confdefs.h | |
f199cab1 | 14840 | |
5476a9a4 GM |
14841 | fi |
14842 | ;; | |
f199cab1 | 14843 | |
5476a9a4 GM |
14844 | hpux*) |
14845 | $as_echo "#define NO_EDITRES 1" >>confdefs.h | |
f199cab1 | 14846 | |
5476a9a4 GM |
14847 | ;; |
14848 | esac | |
f199cab1 GM |
14849 | |
14850 | ||
5476a9a4 GM |
14851 | case $opsys in |
14852 | darwin | gnu | hpux* | *bsd ) | |
f199cab1 | 14853 | |
5476a9a4 | 14854 | $as_echo "#define NO_TERMIO 1" >>confdefs.h |
f199cab1 | 14855 | |
5476a9a4 | 14856 | ;; |
f199cab1 | 14857 | |
5476a9a4 | 14858 | irix6-5 | sol2* | unixware ) |
f199cab1 | 14859 | |
5476a9a4 | 14860 | $as_echo "#define NSIG_MINIMUM 32" >>confdefs.h |
f199cab1 | 14861 | |
5476a9a4 GM |
14862 | ;; |
14863 | esac | |
f199cab1 GM |
14864 | |
14865 | ||
5476a9a4 GM |
14866 | case $opsys in |
14867 | hpux* | irix6-5 | openbsd | sol2* | unixware ) | |
3e0be4ab | 14868 | |
5476a9a4 | 14869 | $as_echo "#define BROKEN_SIGIO 1" >>confdefs.h |
f199cab1 | 14870 | |
5476a9a4 | 14871 | ;; |
f199cab1 | 14872 | |
5476a9a4 | 14873 | aix4-2) |
f199cab1 | 14874 | |
5476a9a4 | 14875 | $as_echo "#define BROKEN_FIONREAD 1" >>confdefs.h |
f199cab1 GM |
14876 | |
14877 | ||
5476a9a4 | 14878 | $as_echo "#define BROKEN_SIGAIO 1" >>confdefs.h |
f199cab1 GM |
14879 | |
14880 | ||
5476a9a4 | 14881 | $as_echo "#define BROKEN_SIGPOLL 1" >>confdefs.h |
f199cab1 GM |
14882 | |
14883 | ||
5476a9a4 | 14884 | $as_echo "#define BROKEN_SIGPTY 1" >>confdefs.h |
f199cab1 | 14885 | |
f199cab1 | 14886 | |
067d23c9 | 14887 | |
5476a9a4 | 14888 | $as_echo "#define BROKEN_GET_CURRENT_DIR_NAME 1" >>confdefs.h |
067d23c9 | 14889 | |
5476a9a4 | 14890 | ;; |
067d23c9 | 14891 | |
5476a9a4 | 14892 | freebsd) |
f199cab1 | 14893 | |
5476a9a4 | 14894 | $as_echo "#define BROKEN_PTY_READ_AFTER_EAGAIN 1" >>confdefs.h |
f199cab1 | 14895 | |
5476a9a4 | 14896 | ;; |
f199cab1 | 14897 | |
5476a9a4 | 14898 | darwin) |
f199cab1 | 14899 | |
5476a9a4 | 14900 | $as_echo "#define NO_ABORT 1" >>confdefs.h |
f199cab1 | 14901 | |
5476a9a4 GM |
14902 | ;; |
14903 | esac | |
f199cab1 | 14904 | |
5476a9a4 GM |
14905 | case $opsys in |
14906 | gnu-* | sol2-10 ) | |
f199cab1 | 14907 | |
5476a9a4 | 14908 | $as_echo "#define HAVE_PROCFS 1" >>confdefs.h |
f199cab1 | 14909 | |
5476a9a4 GM |
14910 | ;; |
14911 | esac | |
f199cab1 | 14912 | |
5476a9a4 GM |
14913 | case $opsys in |
14914 | darwin | freebsd | netbsd | openbsd ) | |
f199cab1 | 14915 | |
5476a9a4 | 14916 | $as_echo "#define DONT_REOPEN_PTY 1" >>confdefs.h |
f199cab1 | 14917 | |
5476a9a4 GM |
14918 | ;; |
14919 | esac | |
f199cab1 | 14920 | |
5476a9a4 GM |
14921 | case $opsys in |
14922 | netbsd | openbsd) sound_device="/dev/audio" ;; | |
14923 | *) sound_device="/dev/dsp" ;; | |
14924 | esac | |
f199cab1 | 14925 | |
f199cab1 | 14926 | |
5476a9a4 GM |
14927 | cat >>confdefs.h <<_ACEOF |
14928 | #define DEFAULT_SOUND_DEVICE "$sound_device" | |
14929 | _ACEOF | |
f199cab1 GM |
14930 | |
14931 | ||
14932 | ||
5476a9a4 GM |
14933 | case $opsys in |
14934 | darwin | gnu-linux | gnu-kfreebsd ) | |
f199cab1 | 14935 | |
5476a9a4 | 14936 | $as_echo "#define INTERRUPT_INPUT 1" >>confdefs.h |
f199cab1 | 14937 | |
5476a9a4 GM |
14938 | ;; |
14939 | esac | |
f199cab1 | 14940 | |
f199cab1 | 14941 | |
5476a9a4 GM |
14942 | case $opsys in |
14943 | cygwin|gnu|gnu-linux|gnu-kfreebsd|irix6-5|freebsd|netbsd|openbsd) | |
f199cab1 | 14944 | |
5476a9a4 | 14945 | $as_echo "#define NARROWPROTO 1" >>confdefs.h |
067d23c9 | 14946 | |
5476a9a4 GM |
14947 | ;; |
14948 | esac | |
f199cab1 GM |
14949 | |
14950 | ||
067d23c9 | 14951 | |
1f5d53eb PE |
14952 | |
14953 | ||
f199cab1 | 14954 | |
f199cab1 | 14955 | |
7d2a1c5e | 14956 | |
5476a9a4 GM |
14957 | case $opsys in |
14958 | aix4-2 ) | |
a09508f2 | 14959 | $as_echo "#define PTY_ITERATION int c; for (c = 0; !c ; c++)" >>confdefs.h |
f199cab1 | 14960 | |
a09508f2 | 14961 | $as_echo "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptc\");" >>confdefs.h |
f199cab1 | 14962 | |
a09508f2 | 14963 | $as_echo "#define PTY_TTY_NAME_SPRINTF strcpy (pty_name, ttyname (fd));" >>confdefs.h |
7d2a1c5e | 14964 | |
5476a9a4 | 14965 | ;; |
7d2a1c5e | 14966 | |
5476a9a4 | 14967 | cygwin ) |
a09508f2 | 14968 | $as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++)" >>confdefs.h |
7d2a1c5e | 14969 | |
a09508f2 | 14970 | $as_echo "#define PTY_OPEN do { int dummy; SIGMASKTYPE mask; mask = sigblock (sigmask (SIGCHLD)); if (-1 == openpty (&fd, &dummy, pty_name, 0, 0)) fd = -1; sigsetmask (mask); if (fd >= 0) emacs_close (dummy); } while (0)" >>confdefs.h |
f199cab1 | 14971 | |
a09508f2 | 14972 | $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h |
7d2a1c5e | 14973 | |
a09508f2 | 14974 | $as_echo "#define PTY_TTY_NAME_SPRINTF /**/" >>confdefs.h |
f199cab1 | 14975 | |
5476a9a4 | 14976 | ;; |
f199cab1 | 14977 | |
1146da8d | 14978 | darwin ) |
a09508f2 | 14979 | $as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++)" >>confdefs.h |
7d2a1c5e | 14980 | |
5476a9a4 | 14981 | $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h |
7d2a1c5e | 14982 | |
a09508f2 | 14983 | $as_echo "#define PTY_OPEN do { int slave; if (openpty (&fd, &slave, pty_name, NULL, NULL) == -1) fd = -1; else emacs_close (slave); } while (0)" >>confdefs.h |
7d2a1c5e | 14984 | |
a09508f2 | 14985 | $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h |
f199cab1 | 14986 | |
a09508f2 | 14987 | $as_echo "#define PTY_TTY_NAME_SPRINTF /**/" >>confdefs.h |
f199cab1 | 14988 | |
5476a9a4 | 14989 | ;; |
f199cab1 | 14990 | |
1146da8d | 14991 | gnu | openbsd ) |
5476a9a4 | 14992 | $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h |
f199cab1 | 14993 | |
5476a9a4 | 14994 | ;; |
f199cab1 | 14995 | |
1146da8d | 14996 | gnu-linux | gnu-kfreebsd | freebsd | netbsd ) |
5476a9a4 | 14997 | if test "x$ac_cv_func_grantpt" = xyes; then |
f199cab1 | 14998 | |
5476a9a4 | 14999 | $as_echo "#define UNIX98_PTYS 1" >>confdefs.h |
f199cab1 | 15000 | |
a09508f2 | 15001 | $as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++)" >>confdefs.h |
f199cab1 | 15002 | |
a09508f2 | 15003 | $as_echo "#define PTY_TTY_NAME_SPRINTF { char *ptyname; sigblock (sigmask (SIGCHLD)); if (grantpt (fd) == -1 || unlockpt (fd) == -1 || !(ptyname = ptsname(fd))) { sigunblock (sigmask (SIGCHLD)); close (fd); return -1; } snprintf (pty_name, sizeof pty_name, \"%s\", ptyname); sigunblock (sigmask (SIGCHLD)); }" >>confdefs.h |
f199cab1 | 15004 | |
1146da8d GM |
15005 | if test "x$ac_cv_func_posix_openpt" = xyes; then |
15006 | $as_echo "#define PTY_OPEN fd = posix_openpt (O_RDWR | O_NOCTTY)" >>confdefs.h | |
15007 | ||
15008 | $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h | |
15009 | ||
15010 | elif test "x$ac_cv_func_getpt" = xyes; then | |
5476a9a4 | 15011 | $as_echo "#define PTY_OPEN fd = getpt ()" >>confdefs.h |
f199cab1 | 15012 | |
a09508f2 | 15013 | $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h |
f199cab1 | 15014 | |
5476a9a4 | 15015 | else |
a09508f2 | 15016 | $as_echo "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptmx\");" >>confdefs.h |
f199cab1 | 15017 | |
5476a9a4 GM |
15018 | fi |
15019 | else | |
15020 | $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h | |
f199cab1 | 15021 | |
5476a9a4 GM |
15022 | fi |
15023 | ;; | |
f199cab1 | 15024 | |
5476a9a4 GM |
15025 | hpux*) |
15026 | $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h | |
f199cab1 | 15027 | |
a09508f2 | 15028 | $as_echo "#define PTY_NAME_SPRINTF sprintf (pty_name, \"/dev/ptym/pty%c%x\", c, i);" >>confdefs.h |
f199cab1 | 15029 | |
a09508f2 | 15030 | $as_echo "#define PTY_TTY_NAME_SPRINTF sprintf (pty_name, \"/dev/pty/tty%c%x\", c, i);" >>confdefs.h |
f199cab1 | 15031 | |
5476a9a4 | 15032 | ;; |
f199cab1 | 15033 | |
5476a9a4 GM |
15034 | irix6-5 ) |
15035 | $as_echo "#define PTY_ITERATION /**/" >>confdefs.h | |
f199cab1 | 15036 | |
5476a9a4 | 15037 | $as_echo "#define FIRST_PTY_LETTER 'q'" >>confdefs.h |
f199cab1 | 15038 | |
a09508f2 | 15039 | $as_echo "#define PTY_OPEN { struct sigaction ocstat, cstat; struct stat stb; char * name; sigemptyset(&cstat.sa_mask); cstat.sa_handler = SIG_DFL; cstat.sa_flags = 0; sigaction(SIGCLD, &cstat, &ocstat); name = _getpty (&fd, O_RDWR | O_NDELAY, 0600, 0); sigaction(SIGCLD, &ocstat, (struct sigaction *)0); if (name == 0) return -1; if (fd < 0) return -1; if (fstat (fd, &stb) < 0) return -1; strcpy (pty_name, name); }" >>confdefs.h |
f199cab1 | 15040 | |
a09508f2 | 15041 | $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h |
f199cab1 | 15042 | |
a09508f2 | 15043 | $as_echo "#define PTY_TTY_NAME_SPRINTF /**/" >>confdefs.h |
f199cab1 | 15044 | |
5476a9a4 | 15045 | ;; |
f199cab1 | 15046 | |
5476a9a4 | 15047 | sol2* ) |
a09508f2 | 15048 | $as_echo "#define PTY_TTY_NAME_SPRINTF { char *ptsname (int), *ptyname; sigblock (sigmask (SIGCLD)); if (grantpt (fd) == -1) { emacs_close (fd); return -1; } sigunblock (sigmask (SIGCLD)); if (unlockpt (fd) == -1) { emacs_close (fd); return -1; } if (!(ptyname = ptsname (fd))) { emacs_close (fd); return -1; } snprintf (pty_name, sizeof pty_name, \"%s\", ptyname); }" >>confdefs.h |
f199cab1 | 15049 | |
5476a9a4 | 15050 | ;; |
f199cab1 | 15051 | |
5476a9a4 | 15052 | unixware ) |
a09508f2 | 15053 | $as_echo "#define PTY_TTY_NAME_SPRINTF { char *ptsname (int), *ptyname; sigblock(sigmask(SIGCLD)); if (grantpt(fd) == -1) fatal(\"could not grant slave pty\"); sigunblock(sigmask(SIGCLD)); if (unlockpt(fd) == -1) fatal(\"could not unlock slave pty\"); if (!(ptyname = ptsname(fd))) fatal (\"could not enable slave pty\"); snprintf (pty_name, sizeof pty_name, \"%s\", ptyname); }" >>confdefs.h |
5476a9a4 GM |
15054 | |
15055 | ;; | |
15056 | esac | |
15057 | ||
15058 | ||
15059 | case $opsys in | |
15060 | sol2* | unixware ) | |
15061 | $as_echo "#define FIRST_PTY_LETTER 'z'" >>confdefs.h | |
15062 | ||
a09508f2 | 15063 | $as_echo "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptmx\");" >>confdefs.h |
5476a9a4 GM |
15064 | |
15065 | ||
15066 | $as_echo "#define SETUP_SLAVE_PTY if (ioctl (xforkin, I_PUSH, \"ptem\") == -1) fatal (\"ioctl I_PUSH ptem\"); if (ioctl (xforkin, I_PUSH, \"ldterm\") == -1) fatal (\"ioctl I_PUSH ldterm\"); if (ioctl (xforkin, I_PUSH, \"ttcompat\") == -1) fatal (\"ioctl I_PUSH ttcompat\");" >>confdefs.h | |
15067 | ||
15068 | ;; | |
15069 | esac | |
15070 | ||
15071 | ||
15072 | ||
15073 | ||
15074 | case $opsys in | |
15075 | aix4-2 | cygwin | gnu | irix6-5 | freebsd | netbsd | openbsd ) | |
15076 | $as_echo "#define SIGNALS_VIA_CHARACTERS 1" >>confdefs.h | |
15077 | ||
15078 | ;; | |
15079 | ||
15080 | gnu-linux | gnu-kfreebsd ) | |
15081 | ||
15082 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signals via characters" >&5 | |
15083 | $as_echo_n "checking for signals via characters... " >&6; } | |
15084 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1f5d53eb | 15085 | /* end confdefs.h. */ |
5476a9a4 GM |
15086 | |
15087 | #include <linux/version.h> | |
15088 | #if LINUX_VERSION_CODE < 0x20400 | |
15089 | # error "Linux version too old" | |
15090 | #endif | |
15091 | ||
3e0be4ab GM |
15092 | int |
15093 | main () | |
15094 | { | |
f199cab1 | 15095 | |
3e0be4ab GM |
15096 | ; |
15097 | return 0; | |
15098 | } | |
067d23c9 | 15099 | _ACEOF |
5476a9a4 GM |
15100 | if ac_fn_c_try_cpp "$LINENO"; then : |
15101 | emacs_signals_via_chars=yes | |
1f5d53eb | 15102 | else |
5476a9a4 | 15103 | emacs_signals_via_chars=no |
067d23c9 | 15104 | fi |
5476a9a4 | 15105 | rm -f conftest.err conftest.$ac_ext |
067d23c9 | 15106 | |
5476a9a4 GM |
15107 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_signals_via_chars" >&5 |
15108 | $as_echo "$emacs_signals_via_chars" >&6; } | |
15109 | test $emacs_signals_via_chars = yes && $as_echo "#define SIGNALS_VIA_CHARACTERS 1" >>confdefs.h | |
15110 | ||
15111 | ;; | |
15112 | esac | |
15113 | ||
15114 | ||
15115 | ||
15116 | ||
c0528ebe GM |
15117 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C library" >&5 |
15118 | $as_echo_n "checking whether we are using the GNU C library... " >&6; } | |
15119 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15120 | /* end confdefs.h. */ | |
5476a9a4 | 15121 | |
c0528ebe GM |
15122 | #include <features.h> |
15123 | #ifndef __GNU_LIBRARY__ | |
15124 | # error "this is not the GNU C library" | |
15125 | #endif | |
5476a9a4 | 15126 | |
c0528ebe GM |
15127 | int |
15128 | main () | |
15129 | { | |
5476a9a4 | 15130 | |
c0528ebe GM |
15131 | ; |
15132 | return 0; | |
15133 | } | |
15134 | _ACEOF | |
15135 | if ac_fn_c_try_cpp "$LINENO"; then : | |
15136 | emacs_glibc=yes | |
15137 | else | |
15138 | emacs_glibc=no | |
15139 | fi | |
15140 | rm -f conftest.err conftest.$ac_ext | |
15141 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_glibc" >&5 | |
15142 | $as_echo "$emacs_glibc" >&6; } | |
5476a9a4 | 15143 | |
c0528ebe | 15144 | if test $emacs_glibc = yes; then |
5476a9a4 | 15145 | |
c0528ebe | 15146 | emacs_pending_output=unknown |
5476a9a4 | 15147 | |
c0528ebe GM |
15148 | case $opsys in |
15149 | gnu | gnu-linux | gnu-kfreebsd ) | |
15150 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of pending output formalism" >&5 | |
5476a9a4 | 15151 | $as_echo_n "checking for style of pending output formalism... " >&6; } |
c0528ebe | 15152 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
1f5d53eb | 15153 | /* end confdefs.h. */ |
5476a9a4 GM |
15154 | |
15155 | #include <stdio.h> | |
15156 | #if !defined (_IO_STDIO_H) && !defined (_STDIO_USES_IOSTREAM) | |
15157 | # error "stdio definitions not found" | |
15158 | #endif | |
067d23c9 | 15159 | |
3e0be4ab GM |
15160 | int |
15161 | main () | |
15162 | { | |
5476a9a4 | 15163 | |
3e0be4ab GM |
15164 | ; |
15165 | return 0; | |
15166 | } | |
067d23c9 | 15167 | _ACEOF |
5476a9a4 GM |
15168 | if ac_fn_c_try_cpp "$LINENO"; then : |
15169 | emacs_pending_output=new | |
067d23c9 | 15170 | fi |
5476a9a4 | 15171 | rm -f conftest.err conftest.$ac_ext |
067d23c9 | 15172 | |
5476a9a4 GM |
15173 | if test $emacs_pending_output = unknown; then |
15174 | case $opsys in | |
15175 | gnu-linux | gnu-kfreebsd) | |
15176 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15177 | /* end confdefs.h. */ | |
067d23c9 | 15178 | |
5476a9a4 GM |
15179 | #include <stdio.h> |
15180 | #ifndef __UCLIBC__ | |
15181 | # error "not using uclibc" | |
15182 | #endif | |
067d23c9 | 15183 | |
5476a9a4 GM |
15184 | int |
15185 | main () | |
15186 | { | |
067d23c9 | 15187 | |
5476a9a4 GM |
15188 | ; |
15189 | return 0; | |
15190 | } | |
15191 | _ACEOF | |
15192 | if ac_fn_c_try_cpp "$LINENO"; then : | |
15193 | emacs_pending_output=uclibc | |
15194 | else | |
15195 | emacs_pending_output=old | |
15196 | fi | |
15197 | rm -f conftest.err conftest.$ac_ext | |
15198 | ;; | |
15199 | esac | |
15200 | fi | |
067d23c9 | 15201 | |
5476a9a4 GM |
15202 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_pending_output" >&5 |
15203 | $as_echo "$emacs_pending_output" >&6; } | |
067d23c9 | 15204 | |
5476a9a4 GM |
15205 | case $emacs_pending_output in |
15206 | new) | |
c0528ebe | 15207 | $as_echo "#define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_IO_write_ptr - (FILE)->_IO_write_base)" >>confdefs.h |
067d23c9 | 15208 | |
5476a9a4 GM |
15209 | ;; |
15210 | uclibc) | |
c0528ebe | 15211 | $as_echo "#define PENDING_OUTPUT_COUNT(FILE) ((FILE)->__bufpos - (FILE)->__bufstart)" >>confdefs.h |
067d23c9 | 15212 | |
5476a9a4 GM |
15213 | ;; |
15214 | old) | |
c0528ebe | 15215 | $as_echo "#define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_pptr - (FILE)->_pbase)" >>confdefs.h |
067d23c9 | 15216 | |
5476a9a4 GM |
15217 | ;; |
15218 | esac | |
15219 | ;; | |
c0528ebe GM |
15220 | esac |
15221 | if test $emacs_pending_output = unknown; then | |
15222 | $as_echo "#define PENDING_OUTPUT_COUNT(FILE) ((FILE)->__bufp - (FILE)->__buffer)" >>confdefs.h | |
15223 | ||
15224 | fi | |
15225 | ||
15226 | else | |
15227 | case $opsys in | |
15228 | cygwin | darwin | freebsd | netbsd | openbsd ) | |
15229 | $as_echo "#define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_p - (FILE)->_bf._base)" >>confdefs.h | |
15230 | ||
15231 | ;; | |
15232 | ||
15233 | unixware) | |
15234 | $as_echo "#define PENDING_OUTPUT_COUNT(FILE) ((FILE)->__ptr - (FILE)->__base)" >>confdefs.h | |
067d23c9 | 15235 | |
c0528ebe GM |
15236 | ;; |
15237 | ||
15238 | *) | |
15239 | if test x$ac_cv_header_stdio_ext_h = xyes && \ | |
15240 | test x$ac_cv_func___fpending = xyes; then | |
15241 | $as_echo "#define PENDING_OUTPUT_COUNT(FILE) __fpending (FILE)" >>confdefs.h | |
15242 | ||
15243 | ||
15244 | $as_echo "#define DISPNEW_NEEDS_STDIO_EXT 1" >>confdefs.h | |
15245 | ||
15246 | else | |
15247 | $as_echo "#define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_ptr - (FILE)->_base)" >>confdefs.h | |
15248 | ||
15249 | fi | |
15250 | ;; | |
15251 | esac | |
15252 | fi | |
067d23c9 | 15253 | |
067d23c9 | 15254 | |
067d23c9 | 15255 | |
f199cab1 | 15256 | |
5476a9a4 GM |
15257 | case $opsys in |
15258 | gnu) | |
15259 | $as_echo "#define DATA_START ({ extern int data_start; (char *) &data_start; })" >>confdefs.h | |
f199cab1 | 15260 | |
5476a9a4 | 15261 | ;; |
067d23c9 | 15262 | |
5476a9a4 GM |
15263 | hpux*) |
15264 | $as_echo "#define DATA_START 0x40000000" >>confdefs.h | |
067d23c9 | 15265 | |
5476a9a4 | 15266 | $as_echo "#define DATA_SEG_BITS 0x40000000" >>confdefs.h |
067d23c9 | 15267 | |
5476a9a4 GM |
15268 | ;; |
15269 | irix6-5) | |
15270 | $as_echo "#define DATA_START 0x10000000" >>confdefs.h | |
067d23c9 | 15271 | |
5476a9a4 | 15272 | $as_echo "#define DATA_SEG_BITS 0x10000000" >>confdefs.h |
067d23c9 | 15273 | |
5476a9a4 GM |
15274 | ;; |
15275 | esac | |
067d23c9 | 15276 | |
1f5d53eb | 15277 | |
1f5d53eb | 15278 | |
067d23c9 | 15279 | |
f199cab1 | 15280 | |
5476a9a4 GM |
15281 | case $opsys in |
15282 | darwin) $as_echo "#define TAB3 OXTABS" >>confdefs.h | |
15283 | ;; | |
f199cab1 | 15284 | |
5476a9a4 | 15285 | gnu | freebsd | netbsd | openbsd ) |
f199cab1 | 15286 | |
5476a9a4 | 15287 | $as_echo "#define TABDLY OXTABS" >>confdefs.h |
f199cab1 | 15288 | |
5476a9a4 | 15289 | $as_echo "#define TAB3 OXTABS" >>confdefs.h |
f199cab1 | 15290 | |
5476a9a4 | 15291 | ;; |
f199cab1 | 15292 | |
5476a9a4 GM |
15293 | gnu-linux | gnu-kfreebsd ) |
15294 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
f199cab1 | 15295 | /* end confdefs.h. */ |
3e0be4ab | 15296 | |
5476a9a4 GM |
15297 | #ifndef __i386__ |
15298 | # error "not i386" | |
15299 | #endif | |
f199cab1 | 15300 | |
5476a9a4 GM |
15301 | int |
15302 | main () | |
15303 | { | |
067d23c9 | 15304 | |
5476a9a4 GM |
15305 | ; |
15306 | return 0; | |
15307 | } | |
15308 | _ACEOF | |
15309 | if ac_fn_c_try_cpp "$LINENO"; then : | |
15310 | $as_echo "#define ULIMIT_BREAK_VALUE (32*1024*1024)" >>confdefs.h | |
1f5d53eb | 15311 | |
3e0be4ab | 15312 | fi |
5476a9a4 | 15313 | rm -f conftest.err conftest.$ac_ext |
3e0be4ab | 15314 | |
5476a9a4 GM |
15315 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
15316 | /* end confdefs.h. */ | |
3e0be4ab | 15317 | |
5476a9a4 GM |
15318 | #ifndef __ia64__ |
15319 | # error "not ia64" | |
15320 | #endif | |
067d23c9 | 15321 | |
5476a9a4 GM |
15322 | int |
15323 | main () | |
15324 | { | |
3e0be4ab | 15325 | |
5476a9a4 GM |
15326 | ; |
15327 | return 0; | |
15328 | } | |
15329 | _ACEOF | |
15330 | if ac_fn_c_try_cpp "$LINENO"; then : | |
f199cab1 | 15331 | |
5476a9a4 | 15332 | $as_echo "#define GC_MARK_SECONDARY_STACK() do { extern void *__libc_ia64_register_backing_store_base; __builtin_ia64_flushrs (); mark_memory (__libc_ia64_register_backing_store_base, __builtin_ia64_bsp ());} while (0)" >>confdefs.h |
067d23c9 | 15333 | |
3e0be4ab | 15334 | fi |
5476a9a4 GM |
15335 | rm -f conftest.err conftest.$ac_ext |
15336 | ;; | |
067d23c9 | 15337 | |
5476a9a4 | 15338 | hpux*) |
3e0be4ab | 15339 | |
5476a9a4 | 15340 | $as_echo "#define RUN_TIME_REMAP 1" >>confdefs.h |
3e0be4ab | 15341 | |
5476a9a4 | 15342 | ;; |
3e0be4ab | 15343 | |
5476a9a4 GM |
15344 | irix6-5) |
15345 | $as_echo "#define ULIMIT_BREAK_VALUE 0x14000000" >>confdefs.h | |
3e0be4ab | 15346 | |
5476a9a4 GM |
15347 | ;; |
15348 | esac | |
3e0be4ab GM |
15349 | |
15350 | ||
f199cab1 | 15351 | |
e700232f GM |
15352 | |
15353 | ||
15354 | ||
f199cab1 | 15355 | |
5476a9a4 GM |
15356 | case $opsys in |
15357 | aix4-2 | hpux* | unixware) | |
15358 | $as_echo "#define GC_MARK_STACK GC_USE_GCPROS_AS_BEFORE" >>confdefs.h | |
f199cab1 | 15359 | |
5476a9a4 | 15360 | ;; |
f199cab1 | 15361 | |
5476a9a4 GM |
15362 | gnu-linux | gnu-kfreebsd ) |
15363 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1fd182f0 | 15364 | /* end confdefs.h. */ |
f199cab1 | 15365 | |
5476a9a4 GM |
15366 | #if defined __i386__ || defined __sparc__ || defined __mc68000__ \ |
15367 | || defined __alpha__ || defined __mips__ || defined __s390__ \ | |
15368 | || defined __arm__ || defined __powerpc__ || defined __amd64__ \ | |
15369 | || defined __ia64__ || defined __sh__ | |
15370 | /* ok */ | |
15371 | #else | |
15372 | # error "setjmp not known to work on this arch" | |
15373 | #endif | |
15374 | ||
f199cab1 GM |
15375 | int |
15376 | main () | |
1fd182f0 | 15377 | { |
5476a9a4 | 15378 | |
f199cab1 GM |
15379 | ; |
15380 | return 0; | |
1fd182f0 PE |
15381 | } |
15382 | _ACEOF | |
5476a9a4 GM |
15383 | if ac_fn_c_try_cpp "$LINENO"; then : |
15384 | $as_echo "#define GC_SETJMP_WORKS 1" >>confdefs.h | |
f199cab1 | 15385 | |
5476a9a4 GM |
15386 | else |
15387 | $as_echo "#define GC_MARK_STACK GC_USE_GCPROS_AS_BEFORE" >>confdefs.h | |
1fd182f0 | 15388 | |
1f5d53eb | 15389 | fi |
5476a9a4 GM |
15390 | rm -f conftest.err conftest.$ac_ext |
15391 | ;; | |
15392 | esac | |
1fd182f0 | 15393 | |
f199cab1 | 15394 | |
5476a9a4 GM |
15395 | if test x$GCC = xyes; then |
15396 | $as_echo "#define GC_SETJMP_WORKS 1" >>confdefs.h | |
15397 | ||
1fd182f0 | 15398 | else |
5476a9a4 GM |
15399 | case $opsys in |
15400 | freebsd | netbsd | openbsd | irix6-5 | sol2* ) | |
15401 | $as_echo "#define GC_SETJMP_WORKS 1" >>confdefs.h | |
1fd182f0 | 15402 | |
5476a9a4 GM |
15403 | ;; |
15404 | esac | |
15405 | fi | |
1fd182f0 | 15406 | |
906debc3 GM |
15407 | case $opsys in |
15408 | sol2* | unixware ) | |
15409 | ||
15410 | $as_echo "#define _setjmp setjmp" >>confdefs.h | |
15411 | ||
15412 | ||
15413 | $as_echo "#define _longjmp longjmp" >>confdefs.h | |
15414 | ||
15415 | ||
15416 | $as_echo "#define TIOCSIGSEND TIOCSIGNAL" >>confdefs.h | |
15417 | ||
15418 | ;; | |
15419 | esac | |
15420 | ||
906debc3 | 15421 | |
5476a9a4 GM |
15422 | case $opsys in |
15423 | hpux* | sol2* ) | |
1f5d53eb | 15424 | |
5476a9a4 | 15425 | $as_echo "#define XOS_NEEDS_TIME_H 1" >>confdefs.h |
1f5d53eb | 15426 | |
5476a9a4 | 15427 | ;; |
906debc3 GM |
15428 | |
15429 | netbsd | openbsd ) | |
15430 | ||
15431 | $as_echo "#define SIGNAL_H_AHB 1" >>confdefs.h | |
15432 | ||
15433 | ;; | |
5476a9a4 | 15434 | esac |
1f5d53eb | 15435 | |
1f5d53eb | 15436 | |
4fda9c95 | 15437 | |
3e0be4ab | 15438 | |
4fda9c95 | 15439 | |
4fda9c95 | 15440 | |
f199cab1 | 15441 | |
906debc3 | 15442 | |
7cd2ed2c GM |
15443 | |
15444 | ||
5476a9a4 GM |
15445 | case $opsys in |
15446 | aix4-2) | |
15447 | $as_echo "#define USG /**/" >>confdefs.h | |
15448 | ||
15449 | $as_echo "#define USG5 /**/" >>confdefs.h | |
15450 | ||
15451 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15452 | /* end confdefs.h. */ | |
15453 | ||
15454 | #ifndef _AIX | |
15455 | # error "_AIX not defined" | |
15456 | #endif | |
f199cab1 | 15457 | |
4fda9c95 GM |
15458 | int |
15459 | main () | |
15460 | { | |
3e0be4ab | 15461 | |
4fda9c95 GM |
15462 | ; |
15463 | return 0; | |
15464 | } | |
15465 | _ACEOF | |
5476a9a4 | 15466 | if ac_fn_c_try_cpp "$LINENO"; then : |
4fda9c95 | 15467 | |
3e0be4ab | 15468 | else |
4fda9c95 | 15469 | |
5476a9a4 | 15470 | $as_echo "#define _AIX /**/" >>confdefs.h |
3e0be4ab | 15471 | |
5476a9a4 GM |
15472 | fi |
15473 | rm -f conftest.err conftest.$ac_ext | |
15474 | ;; | |
4fda9c95 | 15475 | |
5476a9a4 | 15476 | cygwin) |
3e0be4ab | 15477 | |
5476a9a4 | 15478 | $as_echo "#define CYGWIN 1" >>confdefs.h |
f199cab1 | 15479 | |
5476a9a4 | 15480 | ;; |
f199cab1 | 15481 | |
5476a9a4 GM |
15482 | darwin) |
15483 | $as_echo "#define BSD4_2 /**/" >>confdefs.h | |
f199cab1 | 15484 | |
5476a9a4 | 15485 | $as_echo "#define BSD_SYSTEM /**/" >>confdefs.h |
f199cab1 GM |
15486 | |
15487 | ||
5476a9a4 | 15488 | $as_echo "#define DARWIN_OS /**/" >>confdefs.h |
f199cab1 | 15489 | |
5476a9a4 | 15490 | ;; |
4fda9c95 | 15491 | |
5476a9a4 GM |
15492 | freebsd) |
15493 | $as_echo "#define BSD4_2 /**/" >>confdefs.h | |
4fda9c95 | 15494 | |
4fda9c95 | 15495 | |
5476a9a4 | 15496 | $as_echo "#define BSD_SYSTEM_AHB 1" >>confdefs.h |
4fda9c95 | 15497 | |
5476a9a4 | 15498 | ;; |
f199cab1 | 15499 | |
5476a9a4 GM |
15500 | gnu | netbsd | openbsd ) |
15501 | $as_echo "#define BSD4_2 /**/" >>confdefs.h | |
f199cab1 | 15502 | |
5476a9a4 GM |
15503 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
15504 | /* end confdefs.h. */ | |
f199cab1 | 15505 | |
5476a9a4 GM |
15506 | #ifndef BSD_SYSTEM |
15507 | # error "BSD_SYSTEM not defined" | |
15508 | #endif | |
f199cab1 | 15509 | |
5476a9a4 GM |
15510 | int |
15511 | main () | |
15512 | { | |
f199cab1 | 15513 | |
5476a9a4 GM |
15514 | ; |
15515 | return 0; | |
15516 | } | |
f199cab1 | 15517 | _ACEOF |
5476a9a4 | 15518 | if ac_fn_c_try_cpp "$LINENO"; then : |
4fda9c95 | 15519 | |
3e0be4ab | 15520 | else |
5476a9a4 | 15521 | $as_echo "#define BSD_SYSTEM 43" >>confdefs.h |
4fda9c95 | 15522 | |
5476a9a4 GM |
15523 | fi |
15524 | rm -f conftest.err conftest.$ac_ext | |
15525 | ;; | |
4fda9c95 | 15526 | |
5476a9a4 GM |
15527 | gnu-linux | gnu-kfreebsd ) |
15528 | $as_echo "#define USG /**/" >>confdefs.h | |
4fda9c95 | 15529 | |
f199cab1 | 15530 | |
5476a9a4 | 15531 | $as_echo "#define GNU_LINUX /**/" >>confdefs.h |
4fda9c95 | 15532 | |
5476a9a4 | 15533 | ;; |
4fda9c95 | 15534 | |
5476a9a4 GM |
15535 | hpux*) |
15536 | $as_echo "#define USG /**/" >>confdefs.h | |
4fda9c95 | 15537 | |
5476a9a4 | 15538 | $as_echo "#define USG5 /**/" >>confdefs.h |
697210c4 | 15539 | |
4717915f | 15540 | |
5476a9a4 | 15541 | $as_echo "#define HPUX /**/" >>confdefs.h |
697210c4 | 15542 | |
5476a9a4 | 15543 | ;; |
697210c4 | 15544 | |
5476a9a4 GM |
15545 | irix6-5) |
15546 | $as_echo "#define USG /**/" >>confdefs.h | |
f199cab1 | 15547 | |
5476a9a4 | 15548 | $as_echo "#define USG5 /**/" >>confdefs.h |
f199cab1 | 15549 | |
906debc3 GM |
15550 | $as_echo "#define USG5_4 /**/" >>confdefs.h |
15551 | ||
f199cab1 | 15552 | |
5476a9a4 | 15553 | $as_echo "#define IRIX6_5 /**/" >>confdefs.h |
f199cab1 | 15554 | |
5476a9a4 | 15555 | ;; |
f199cab1 | 15556 | |
5476a9a4 GM |
15557 | sol2*) |
15558 | $as_echo "#define USG /**/" >>confdefs.h | |
4fda9c95 | 15559 | |
5476a9a4 | 15560 | $as_echo "#define USG5 /**/" >>confdefs.h |
4fda9c95 | 15561 | |
906debc3 GM |
15562 | $as_echo "#define USG5_4 /**/" >>confdefs.h |
15563 | ||
4fda9c95 | 15564 | |
5476a9a4 | 15565 | $as_echo "#define SOLARIS2 /**/" >>confdefs.h |
f199cab1 | 15566 | |
5476a9a4 | 15567 | ;; |
f199cab1 | 15568 | |
5476a9a4 GM |
15569 | unixware) |
15570 | $as_echo "#define USG /**/" >>confdefs.h | |
f199cab1 | 15571 | |
5476a9a4 | 15572 | $as_echo "#define USG5 /**/" >>confdefs.h |
f199cab1 | 15573 | |
906debc3 GM |
15574 | $as_echo "#define USG5_4 /**/" >>confdefs.h |
15575 | ||
5476a9a4 GM |
15576 | ;; |
15577 | esac | |
f199cab1 | 15578 | |
4fda9c95 | 15579 | |
5476a9a4 GM |
15580 | case $opsys in |
15581 | cygwin) | |
4fda9c95 | 15582 | |
5476a9a4 | 15583 | $as_echo "#define G_SLICE_ALWAYS_MALLOC 1" >>confdefs.h |
4fda9c95 | 15584 | |
5476a9a4 | 15585 | ;; |
4fda9c95 | 15586 | |
5476a9a4 | 15587 | hpux11) |
f199cab1 | 15588 | |
5476a9a4 | 15589 | $as_echo "#define BROKEN_SA_RESTART 1" >>confdefs.h |
f199cab1 GM |
15590 | |
15591 | ||
5476a9a4 | 15592 | $as_echo "#define USG_SUBTTY_WORKS 1" >>confdefs.h |
f199cab1 | 15593 | |
5476a9a4 | 15594 | ;; |
f199cab1 | 15595 | |
5476a9a4 | 15596 | irix6-5) |
f199cab1 | 15597 | |
5476a9a4 | 15598 | $as_echo "#define PREFER_VSUSP 1" >>confdefs.h |
f199cab1 | 15599 | |
f199cab1 | 15600 | |
5476a9a4 | 15601 | $as_echo "#define SETPGRP_RELEASES_CTTY 1" >>confdefs.h |
f199cab1 | 15602 | |
5476a9a4 | 15603 | ;; |
f199cab1 | 15604 | |
5476a9a4 | 15605 | sol2-10) |
f199cab1 | 15606 | |
5476a9a4 | 15607 | $as_echo "#define _STRUCTURED_PROC 1" >>confdefs.h |
f199cab1 | 15608 | |
5476a9a4 GM |
15609 | ;; |
15610 | esac | |
f199cab1 | 15611 | |
5476a9a4 GM |
15612 | # Set up the CFLAGS for real compilation, so we can substitute it. |
15613 | CFLAGS="$REAL_CFLAGS" | |
15614 | CPPFLAGS="$REAL_CPPFLAGS" | |
f199cab1 | 15615 | |
5476a9a4 GM |
15616 | ## Hack to detect a buggy GCC version. |
15617 | if test "x$GCC" = xyes \ | |
15618 | && test x"`$CC --version 2> /dev/null | grep 'gcc.* 4.5.0'`" != x \ | |
15619 | && test x"`echo $CFLAGS | grep '\-O[23]'`" != x \ | |
15620 | && test x"`echo $CFLAGS | grep '\-fno-optimize-sibling-calls'`" = x; then | |
15621 | as_fn_error "GCC 4.5.0 has problems compiling Emacs; see etc/PROBLEMS'." "$LINENO" 5 | |
15622 | fi | |
f199cab1 | 15623 | |
5476a9a4 | 15624 | version=$PACKAGE_VERSION |
f199cab1 | 15625 | |
5476a9a4 GM |
15626 | ### Specify what sort of things we'll be editing into Makefile and config.h. |
15627 | ### Use configuration here uncanonicalized to avoid exceeding size limits. | |
4fda9c95 | 15628 | |
f199cab1 | 15629 | |
5476a9a4 | 15630 | ## Unused? |
4fda9c95 GM |
15631 | |
15632 | ||
15633 | ||
15634 | ||
4717915f | 15635 | |
4717915f | 15636 | |
4717915f | 15637 | |
4717915f | 15638 | |
4717915f | 15639 | |
4717915f | 15640 | |
4717915f | 15641 | |
4717915f | 15642 | |
4717915f | 15643 | |
4717915f | 15644 | |
4717915f | 15645 | |
4717915f GM |
15646 | |
15647 | ||
4717915f GM |
15648 | |
15649 | ||
4717915f | 15650 | |
4717915f | 15651 | |
4717915f | 15652 | |
5476a9a4 GM |
15653 | ## FIXME? Nothing uses @LD_SWITCH_X_SITE@. |
15654 | ## src/Makefile.in did add LD_SWITCH_X_SITE (as a cpp define) to the | |
15655 | ## end of LIBX_BASE, but nothing ever set it. | |
4717915f | 15656 | |
4717915f | 15657 | |
4fda9c95 | 15658 | |
4fda9c95 | 15659 | |
5476a9a4 GM |
15660 | ## Used in lwlib/Makefile.in. |
15661 | ||
4fda9c95 | 15662 | |
4fda9c95 | 15663 | |
4fda9c95 GM |
15664 | |
15665 | ||
15666 | ||
15667 | ||
4fda9c95 | 15668 | |
42dcba54 GM |
15669 | if test -n "${term_header}"; then |
15670 | ||
15671 | cat >>confdefs.h <<_ACEOF | |
15672 | #define TERM_HEADER "${term_header}" | |
15673 | _ACEOF | |
15674 | ||
15675 | fi | |
15676 | ||
4fda9c95 | 15677 | |
5476a9a4 GM |
15678 | cat >>confdefs.h <<_ACEOF |
15679 | #define EMACS_CONFIGURATION "${canonical}" | |
15680 | _ACEOF | |
4fda9c95 GM |
15681 | |
15682 | ||
5476a9a4 GM |
15683 | cat >>confdefs.h <<_ACEOF |
15684 | #define EMACS_CONFIG_OPTIONS "${ac_configure_args}" | |
15685 | _ACEOF | |
15686 | ||
5476a9a4 | 15687 | |
4fda9c95 | 15688 | |
5476a9a4 GM |
15689 | XMENU_OBJ= |
15690 | XOBJ= | |
15691 | FONT_OBJ= | |
15692 | if test "${HAVE_X_WINDOWS}" = "yes" ; then | |
15693 | ||
15694 | $as_echo "#define HAVE_X_WINDOWS 1" >>confdefs.h | |
4fda9c95 | 15695 | |
5476a9a4 | 15696 | XMENU_OBJ=xmenu.o |
42dcba54 | 15697 | XOBJ="xterm.o xfns.o xselect.o xrdb.o xsmfns.o xsettings.o xgselect.o" |
5476a9a4 GM |
15698 | FONT_OBJ=xfont.o |
15699 | if test "$HAVE_XFT" = "yes"; then | |
15700 | FONT_OBJ="$FONT_OBJ ftfont.o xftfont.o ftxfont.o" | |
15701 | elif test "$HAVE_FREETYPE" = "yes"; then | |
15702 | FONT_OBJ="$FONT_OBJ ftfont.o ftxfont.o" | |
15703 | fi | |
4fda9c95 | 15704 | |
f199cab1 | 15705 | fi |
4fda9c95 | 15706 | |
4fda9c95 | 15707 | |
4fda9c95 | 15708 | |
4fda9c95 | 15709 | |
5476a9a4 GM |
15710 | WIDGET_OBJ= |
15711 | MOTIF_LIBW= | |
15712 | if test "${USE_X_TOOLKIT}" != "none" ; then | |
15713 | WIDGET_OBJ=widget.o | |
15714 | ||
15715 | $as_echo "#define USE_X_TOOLKIT 1" >>confdefs.h | |
15716 | ||
15717 | if test "${USE_X_TOOLKIT}" = "LUCID"; then | |
15718 | ||
15719 | $as_echo "#define USE_LUCID 1" >>confdefs.h | |
e1939eb1 | 15720 | |
5476a9a4 | 15721 | elif test "${USE_X_TOOLKIT}" = "MOTIF"; then |
4fda9c95 | 15722 | |
5476a9a4 | 15723 | $as_echo "#define USE_MOTIF 1" >>confdefs.h |
3e0be4ab | 15724 | |
5476a9a4 GM |
15725 | MOTIF_LIBW=-lXm |
15726 | case "$opsys" in | |
15727 | gnu-linux) | |
15728 | ## Paul Abrahams <abrahams at equinox.shaysnet.com> says this is needed. | |
15729 | MOTIF_LIBW="$MOTIF_LIBW -lXpm" | |
15730 | ;; | |
3e0be4ab | 15731 | |
5476a9a4 GM |
15732 | unixware) |
15733 | ## Richard Anthony Ryan <ryanr at ellingtn.ftc.nrcs.usda.gov> | |
15734 | ## says -lXimp is needed in UNIX_SV ... 4.2 1.1.2. | |
15735 | MOTIF_LIBW="MOTIF_LIBW -lXimp" | |
15736 | ;; | |
3e0be4ab | 15737 | |
5476a9a4 GM |
15738 | aix4-2) |
15739 | ## olson@mcs.anl.gov says -li18n is needed by -lXm. | |
15740 | MOTIF_LIBW="$MOTIF_LIBW -li18n" | |
15741 | ;; | |
15742 | esac | |
15743 | MOTIF_LIBW="$MOTIF_LIBW $LIBXP" | |
15744 | fi | |
15745 | fi | |
4fda9c95 | 15746 | |
3e0be4ab | 15747 | |
5476a9a4 GM |
15748 | TOOLKIT_LIBW= |
15749 | case "$USE_X_TOOLKIT" in | |
15750 | MOTIF) TOOLKIT_LIBW="$MOTIF_LIBW" ;; | |
15751 | LUCID) TOOLKIT_LIBW="$LUCID_LIBW" ;; | |
15752 | none) test "x$HAVE_GTK" = "xyes" && TOOLKIT_LIBW="$GTK_LIBS" ;; | |
15753 | esac | |
4fda9c95 GM |
15754 | |
15755 | ||
5476a9a4 GM |
15756 | if test "$USE_X_TOOLKIT" = "none"; then |
15757 | LIBXT_OTHER="\$(LIBXSM)" | |
15758 | OLDXMENU_TARGET="really-oldXMenu" | |
15759 | else | |
15760 | LIBXT_OTHER="\$(LIBXMU) -lXt \$(LIBXTR6) -lXext" | |
15761 | OLDXMENU_TARGET="really-lwlib" | |
15762 | fi | |
4fda9c95 GM |
15763 | |
15764 | ||
5476a9a4 GM |
15765 | ## The X Menu stuff is present in the X10 distribution, but missing |
15766 | ## from X11. If we have X10, just use the installed library; | |
15767 | ## otherwise, use our own copy. | |
15768 | if test "${HAVE_X11}" = "yes" ; then | |
4fda9c95 | 15769 | |
5476a9a4 | 15770 | $as_echo "#define HAVE_X11 1" >>confdefs.h |
4fda9c95 | 15771 | |
4fda9c95 | 15772 | |
5476a9a4 GM |
15773 | if test "$USE_X_TOOLKIT" = "none"; then |
15774 | OLDXMENU="\${oldXMenudir}/libXMenu11.a" | |
15775 | else | |
15776 | OLDXMENU="\${lwlibdir}/liblw.a" | |
15777 | fi | |
15778 | LIBXMENU="\$(OLDXMENU)" | |
15779 | LIBX_OTHER="\$(LIBXT) \$(LIBX_EXTRA)" | |
15780 | OLDXMENU_DEPS="\${OLDXMENU} ../src/\${OLDXMENU}" | |
f199cab1 | 15781 | else |
5476a9a4 GM |
15782 | ## For a syntactically valid Makefile; not actually used for anything. |
15783 | ## See comments in src/Makefile.in. | |
15784 | OLDXMENU=nothing | |
15785 | ## FIXME This case (!HAVE_X11 && HAVE_X_WINDOWS) is no longer possible(?). | |
15786 | if test "${HAVE_X_WINDOWS}" = "yes"; then | |
15787 | LIBXMENU="-lXMenu" | |
15788 | else | |
15789 | LIBXMENU= | |
15790 | fi | |
15791 | LIBX_OTHER= | |
15792 | OLDXMENU_DEPS= | |
15793 | fi | |
4fda9c95 | 15794 | |
5476a9a4 GM |
15795 | if test "$HAVE_GTK" = "yes" || test "$HAVE_MENUS" != "yes"; then |
15796 | OLDXMENU_TARGET= | |
15797 | OLDXMENU=nothing | |
15798 | LIBXMENU= | |
15799 | OLDXMENU_DEPS= | |
15800 | fi | |
4fda9c95 | 15801 | |
4fda9c95 GM |
15802 | |
15803 | ||
3e0be4ab | 15804 | |
4fda9c95 | 15805 | |
3e0be4ab | 15806 | |
3e0be4ab | 15807 | |
5476a9a4 | 15808 | if test "${HAVE_MENUS}" = "yes" ; then |
3e0be4ab | 15809 | |
5476a9a4 | 15810 | $as_echo "#define HAVE_MENUS 1" >>confdefs.h |
4fda9c95 | 15811 | |
5476a9a4 | 15812 | fi |
4fda9c95 | 15813 | |
5476a9a4 | 15814 | if test "${GNU_MALLOC}" = "yes" ; then |
4fda9c95 | 15815 | |
5476a9a4 | 15816 | $as_echo "#define GNU_MALLOC 1" >>confdefs.h |
4fda9c95 | 15817 | |
5476a9a4 | 15818 | fi |
3e0be4ab | 15819 | |
5476a9a4 GM |
15820 | RALLOC_OBJ= |
15821 | if test "${REL_ALLOC}" = "yes" ; then | |
15822 | ||
15823 | $as_echo "#define REL_ALLOC 1" >>confdefs.h | |
4fda9c95 GM |
15824 | |
15825 | ||
5476a9a4 GM |
15826 | test "$system_malloc" != "yes" && RALLOC_OBJ=ralloc.o |
15827 | fi | |
4fda9c95 | 15828 | |
4fda9c95 | 15829 | |
5476a9a4 GM |
15830 | if test "$opsys" = "cygwin"; then |
15831 | CYGWIN_OBJ="sheap.o" | |
15832 | ## Cygwin differs because of its unexec(). | |
15833 | PRE_ALLOC_OBJ= | |
15834 | POST_ALLOC_OBJ=lastfile.o | |
15835 | else | |
15836 | CYGWIN_OBJ= | |
15837 | PRE_ALLOC_OBJ=lastfile.o | |
15838 | POST_ALLOC_OBJ= | |
15839 | fi | |
4fda9c95 | 15840 | |
3e0be4ab | 15841 | |
3e0be4ab | 15842 | |
3e0be4ab | 15843 | |
5476a9a4 GM |
15844 | # Configure gnulib. Although this does not affect CFLAGS or LIBS permanently. |
15845 | # it temporarily reverts them to their pre-pkg-config values, | |
15846 | # because gnulib needs to work with both src (which uses the | |
15847 | # pkg-config stuff) and lib-src (which does not). For example, gnulib | |
15848 | # may need to determine whether LIB_CLOCK_GETTIME should contain -lrt, | |
15849 | # and it therefore needs to run in an environment where LIBS does not | |
15850 | # already contain -lrt merely because 'pkg-config --libs' printed '-lrt' | |
15851 | # for some package unrelated to lib-src. | |
15852 | SAVE_CFLAGS=$CFLAGS | |
15853 | SAVE_LIBS=$LIBS | |
15854 | CFLAGS=$pre_PKG_CONFIG_CFLAGS | |
15855 | LIBS="$LIB_PTHREAD $pre_PKG_CONFIG_LIBS" | |
3e0be4ab | 15856 | |
3e0be4ab GM |
15857 | |
15858 | ||
4fda9c95 | 15859 | |
4fda9c95 | 15860 | |
3e0be4ab | 15861 | |
3e0be4ab GM |
15862 | |
15863 | ||
4fda9c95 | 15864 | |
3e0be4ab GM |
15865 | |
15866 | ||
5476a9a4 GM |
15867 | LIBC_FATAL_STDERR_=1 |
15868 | export LIBC_FATAL_STDERR_ | |
3e0be4ab | 15869 | |
5476a9a4 GM |
15870 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works |
15871 | # for constant arguments. Useless! | |
15872 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 | |
15873 | $as_echo_n "checking for working alloca.h... " >&6; } | |
15874 | if test "${ac_cv_working_alloca_h+set}" = set; then : | |
15875 | $as_echo_n "(cached) " >&6 | |
15876 | else | |
15877 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15878 | /* end confdefs.h. */ | |
15879 | #include <alloca.h> | |
15880 | int | |
15881 | main () | |
15882 | { | |
15883 | char *p = (char *) alloca (2 * sizeof (int)); | |
15884 | if (p) return 0; | |
15885 | ; | |
15886 | return 0; | |
15887 | } | |
15888 | _ACEOF | |
15889 | if ac_fn_c_try_link "$LINENO"; then : | |
15890 | ac_cv_working_alloca_h=yes | |
15891 | else | |
15892 | ac_cv_working_alloca_h=no | |
15893 | fi | |
15894 | rm -f core conftest.err conftest.$ac_objext \ | |
15895 | conftest$ac_exeext conftest.$ac_ext | |
15896 | fi | |
15897 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 | |
15898 | $as_echo "$ac_cv_working_alloca_h" >&6; } | |
15899 | if test $ac_cv_working_alloca_h = yes; then | |
3e0be4ab | 15900 | |
5476a9a4 | 15901 | $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h |
3e0be4ab | 15902 | |
5476a9a4 | 15903 | fi |
3e0be4ab | 15904 | |
5476a9a4 GM |
15905 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 |
15906 | $as_echo_n "checking for alloca... " >&6; } | |
15907 | if test "${ac_cv_func_alloca_works+set}" = set; then : | |
f199cab1 GM |
15908 | $as_echo_n "(cached) " >&6 |
15909 | else | |
5476a9a4 | 15910 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
f199cab1 | 15911 | /* end confdefs.h. */ |
5476a9a4 GM |
15912 | #ifdef __GNUC__ |
15913 | # define alloca __builtin_alloca | |
15914 | #else | |
15915 | # ifdef _MSC_VER | |
15916 | # include <malloc.h> | |
15917 | # define alloca _alloca | |
15918 | # else | |
15919 | # ifdef HAVE_ALLOCA_H | |
15920 | # include <alloca.h> | |
15921 | # else | |
15922 | # ifdef _AIX | |
15923 | #pragma alloca | |
15924 | # else | |
15925 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
15926 | char *alloca (); | |
15927 | # endif | |
15928 | # endif | |
15929 | # endif | |
15930 | # endif | |
15931 | #endif | |
15932 | ||
15933 | int | |
15934 | main () | |
15935 | { | |
15936 | char *p = (char *) alloca (1); | |
15937 | if (p) return 0; | |
15938 | ; | |
15939 | return 0; | |
15940 | } | |
15941 | _ACEOF | |
15942 | if ac_fn_c_try_link "$LINENO"; then : | |
15943 | ac_cv_func_alloca_works=yes | |
15944 | else | |
15945 | ac_cv_func_alloca_works=no | |
15946 | fi | |
15947 | rm -f core conftest.err conftest.$ac_objext \ | |
15948 | conftest$ac_exeext conftest.$ac_ext | |
15949 | fi | |
15950 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 | |
15951 | $as_echo "$ac_cv_func_alloca_works" >&6; } | |
15952 | ||
15953 | if test $ac_cv_func_alloca_works = yes; then | |
15954 | ||
15955 | $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h | |
15956 | ||
15957 | else | |
15958 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
15959 | # that cause trouble. Some versions do not even contain alloca or | |
15960 | # contain a buggy version. If you still want to use their alloca, | |
15961 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
3e0be4ab | 15962 | |
4fda9c95 | 15963 | |
4fda9c95 | 15964 | |
4fda9c95 GM |
15965 | |
15966 | ||
5476a9a4 | 15967 | ALLOCA=\${LIBOBJDIR}alloca.$ac_objext |
4fda9c95 | 15968 | |
5476a9a4 | 15969 | $as_echo "#define C_ALLOCA 1" >>confdefs.h |
4fda9c95 | 15970 | |
4fda9c95 | 15971 | |
5476a9a4 GM |
15972 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether 'alloca.c' needs Cray hooks" >&5 |
15973 | $as_echo_n "checking whether 'alloca.c' needs Cray hooks... " >&6; } | |
15974 | if test "${ac_cv_os_cray+set}" = set; then : | |
15975 | $as_echo_n "(cached) " >&6 | |
15976 | else | |
15977 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15978 | /* end confdefs.h. */ | |
15979 | #if defined CRAY && ! defined CRAY2 | |
15980 | webecray | |
15981 | #else | |
15982 | wenotbecray | |
15983 | #endif | |
4fda9c95 | 15984 | |
5476a9a4 GM |
15985 | _ACEOF |
15986 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
15987 | $EGREP "webecray" >/dev/null 2>&1; then : | |
15988 | ac_cv_os_cray=yes | |
15989 | else | |
15990 | ac_cv_os_cray=no | |
15991 | fi | |
15992 | rm -f conftest* | |
4fda9c95 | 15993 | |
5476a9a4 GM |
15994 | fi |
15995 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 | |
15996 | $as_echo "$ac_cv_os_cray" >&6; } | |
15997 | if test $ac_cv_os_cray = yes; then | |
15998 | for ac_func in _getb67 GETB67 getb67; do | |
15999 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
16000 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
16001 | eval as_val=\$$as_ac_var | |
16002 | if test "x$as_val" = x""yes; then : | |
4fda9c95 | 16003 | |
5476a9a4 GM |
16004 | cat >>confdefs.h <<_ACEOF |
16005 | #define CRAY_STACKSEG_END $ac_func | |
16006 | _ACEOF | |
4fda9c95 | 16007 | |
5476a9a4 GM |
16008 | break |
16009 | fi | |
4fda9c95 | 16010 | |
5476a9a4 GM |
16011 | done |
16012 | fi | |
4fda9c95 | 16013 | |
5476a9a4 GM |
16014 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 |
16015 | $as_echo_n "checking stack direction for C alloca... " >&6; } | |
16016 | if test "${ac_cv_c_stack_direction+set}" = set; then : | |
16017 | $as_echo_n "(cached) " >&6 | |
16018 | else | |
16019 | if test "$cross_compiling" = yes; then : | |
16020 | ac_cv_c_stack_direction=0 | |
16021 | else | |
16022 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16023 | /* end confdefs.h. */ | |
16024 | $ac_includes_default | |
16025 | int | |
16026 | find_stack_direction (int *addr, int depth) | |
16027 | { | |
16028 | int dir, dummy = 0; | |
16029 | if (! addr) | |
16030 | addr = &dummy; | |
16031 | *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1; | |
16032 | dir = depth ? find_stack_direction (addr, depth - 1) : 0; | |
16033 | return dir + dummy; | |
16034 | } | |
4fda9c95 | 16035 | |
5476a9a4 GM |
16036 | int |
16037 | main (int argc, char **argv) | |
16038 | { | |
16039 | return find_stack_direction (0, argc + !argv + 20) < 0; | |
16040 | } | |
16041 | _ACEOF | |
16042 | if ac_fn_c_try_run "$LINENO"; then : | |
16043 | ac_cv_c_stack_direction=1 | |
16044 | else | |
16045 | ac_cv_c_stack_direction=-1 | |
16046 | fi | |
16047 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
16048 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
16049 | fi | |
4fda9c95 | 16050 | |
5476a9a4 GM |
16051 | fi |
16052 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 | |
16053 | $as_echo "$ac_cv_c_stack_direction" >&6; } | |
16054 | cat >>confdefs.h <<_ACEOF | |
16055 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
16056 | _ACEOF | |
3e0be4ab GM |
16057 | |
16058 | ||
5476a9a4 | 16059 | fi |
3e0be4ab GM |
16060 | |
16061 | ||
16062 | ||
16063 | ||
5476a9a4 GM |
16064 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 |
16065 | $as_echo_n "checking whether byte ordering is bigendian... " >&6; } | |
16066 | if test "${ac_cv_c_bigendian+set}" = set; then : | |
16067 | $as_echo_n "(cached) " >&6 | |
16068 | else | |
16069 | ac_cv_c_bigendian=unknown | |
16070 | # See if we're dealing with a universal compiler. | |
16071 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16072 | /* end confdefs.h. */ | |
16073 | #ifndef __APPLE_CC__ | |
16074 | not a universal capable compiler | |
16075 | #endif | |
16076 | typedef int dummy; | |
16077 | ||
16078 | _ACEOF | |
16079 | if ac_fn_c_try_compile "$LINENO"; then : | |
3e0be4ab | 16080 | |
5476a9a4 GM |
16081 | # Check for potential -arch flags. It is not universal unless |
16082 | # there are at least two -arch flags with different values. | |
16083 | ac_arch= | |
16084 | ac_prev= | |
16085 | for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do | |
16086 | if test -n "$ac_prev"; then | |
16087 | case $ac_word in | |
16088 | i?86 | x86_64 | ppc | ppc64) | |
16089 | if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then | |
16090 | ac_arch=$ac_word | |
16091 | else | |
16092 | ac_cv_c_bigendian=universal | |
16093 | break | |
16094 | fi | |
16095 | ;; | |
16096 | esac | |
16097 | ac_prev= | |
16098 | elif test "x$ac_word" = "x-arch"; then | |
16099 | ac_prev=arch | |
16100 | fi | |
16101 | done | |
16102 | fi | |
16103 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
16104 | if test $ac_cv_c_bigendian = unknown; then | |
16105 | # See if sys/param.h defines the BYTE_ORDER macro. | |
16106 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16107 | /* end confdefs.h. */ | |
16108 | #include <sys/types.h> | |
16109 | #include <sys/param.h> | |
3e0be4ab | 16110 | |
5476a9a4 GM |
16111 | int |
16112 | main () | |
16113 | { | |
16114 | #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ | |
16115 | && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ | |
16116 | && LITTLE_ENDIAN) | |
16117 | bogus endian macros | |
16118 | #endif | |
3e0be4ab | 16119 | |
5476a9a4 GM |
16120 | ; |
16121 | return 0; | |
16122 | } | |
16123 | _ACEOF | |
16124 | if ac_fn_c_try_compile "$LINENO"; then : | |
16125 | # It does; now see whether it defined to BIG_ENDIAN or not. | |
16126 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16127 | /* end confdefs.h. */ | |
16128 | #include <sys/types.h> | |
16129 | #include <sys/param.h> | |
369e19fc | 16130 | |
5476a9a4 GM |
16131 | int |
16132 | main () | |
16133 | { | |
16134 | #if BYTE_ORDER != BIG_ENDIAN | |
16135 | not big endian | |
16136 | #endif | |
3e0be4ab | 16137 | |
5476a9a4 GM |
16138 | ; |
16139 | return 0; | |
16140 | } | |
16141 | _ACEOF | |
16142 | if ac_fn_c_try_compile "$LINENO"; then : | |
16143 | ac_cv_c_bigendian=yes | |
16144 | else | |
16145 | ac_cv_c_bigendian=no | |
16146 | fi | |
16147 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
16148 | fi | |
16149 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
16150 | fi | |
16151 | if test $ac_cv_c_bigendian = unknown; then | |
16152 | # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). | |
16153 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16154 | /* end confdefs.h. */ | |
16155 | #include <limits.h> | |
4fda9c95 | 16156 | |
5476a9a4 GM |
16157 | int |
16158 | main () | |
16159 | { | |
16160 | #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) | |
16161 | bogus endian macros | |
16162 | #endif | |
4fda9c95 | 16163 | |
5476a9a4 GM |
16164 | ; |
16165 | return 0; | |
16166 | } | |
16167 | _ACEOF | |
16168 | if ac_fn_c_try_compile "$LINENO"; then : | |
16169 | # It does; now see whether it defined to _BIG_ENDIAN or not. | |
16170 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16171 | /* end confdefs.h. */ | |
16172 | #include <limits.h> | |
4fda9c95 | 16173 | |
5476a9a4 GM |
16174 | int |
16175 | main () | |
16176 | { | |
16177 | #ifndef _BIG_ENDIAN | |
16178 | not big endian | |
16179 | #endif | |
f199cab1 | 16180 | |
5476a9a4 GM |
16181 | ; |
16182 | return 0; | |
16183 | } | |
16184 | _ACEOF | |
16185 | if ac_fn_c_try_compile "$LINENO"; then : | |
16186 | ac_cv_c_bigendian=yes | |
f199cab1 | 16187 | else |
5476a9a4 GM |
16188 | ac_cv_c_bigendian=no |
16189 | fi | |
16190 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
16191 | fi | |
16192 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
16193 | fi | |
16194 | if test $ac_cv_c_bigendian = unknown; then | |
16195 | # Compile a test program. | |
16196 | if test "$cross_compiling" = yes; then : | |
16197 | # Try to guess by grepping values from an object file. | |
16198 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16199 | /* end confdefs.h. */ | |
16200 | short int ascii_mm[] = | |
16201 | { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; | |
16202 | short int ascii_ii[] = | |
16203 | { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; | |
16204 | int use_ascii (int i) { | |
16205 | return ascii_mm[i] + ascii_ii[i]; | |
16206 | } | |
16207 | short int ebcdic_ii[] = | |
16208 | { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; | |
16209 | short int ebcdic_mm[] = | |
16210 | { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; | |
16211 | int use_ebcdic (int i) { | |
16212 | return ebcdic_mm[i] + ebcdic_ii[i]; | |
16213 | } | |
16214 | extern int foo; | |
f199cab1 | 16215 | |
5476a9a4 GM |
16216 | int |
16217 | main () | |
16218 | { | |
16219 | return use_ascii (foo) == use_ebcdic (foo); | |
16220 | ; | |
16221 | return 0; | |
16222 | } | |
16223 | _ACEOF | |
16224 | if ac_fn_c_try_compile "$LINENO"; then : | |
16225 | if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then | |
16226 | ac_cv_c_bigendian=yes | |
16227 | fi | |
16228 | if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then | |
16229 | if test "$ac_cv_c_bigendian" = unknown; then | |
16230 | ac_cv_c_bigendian=no | |
16231 | else | |
16232 | # finding both strings is unlikely to happen, but who knows? | |
16233 | ac_cv_c_bigendian=unknown | |
16234 | fi | |
16235 | fi | |
16236 | fi | |
16237 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4fda9c95 | 16238 | else |
3e0be4ab | 16239 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
4fda9c95 | 16240 | /* end confdefs.h. */ |
5476a9a4 GM |
16241 | $ac_includes_default |
16242 | int | |
16243 | main () | |
4fda9c95 | 16244 | { |
5476a9a4 GM |
16245 | |
16246 | /* Are we little or big endian? From Harbison&Steele. */ | |
16247 | union | |
16248 | { | |
16249 | long int l; | |
16250 | char c[sizeof (long int)]; | |
16251 | } u; | |
16252 | u.l = 1; | |
16253 | return u.c[sizeof (long int) - 1] == 1; | |
16254 | ||
16255 | ; | |
4fda9c95 GM |
16256 | return 0; |
16257 | } | |
16258 | _ACEOF | |
f199cab1 | 16259 | if ac_fn_c_try_run "$LINENO"; then : |
5476a9a4 | 16260 | ac_cv_c_bigendian=no |
3e0be4ab | 16261 | else |
5476a9a4 | 16262 | ac_cv_c_bigendian=yes |
4fda9c95 | 16263 | fi |
f199cab1 GM |
16264 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
16265 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
4fda9c95 | 16266 | fi |
4fda9c95 | 16267 | |
5476a9a4 | 16268 | fi |
f199cab1 | 16269 | fi |
5476a9a4 GM |
16270 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 |
16271 | $as_echo "$ac_cv_c_bigendian" >&6; } | |
16272 | case $ac_cv_c_bigendian in #( | |
16273 | yes) | |
16274 | $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h | |
16275 | ;; #( | |
16276 | no) | |
16277 | ;; #( | |
16278 | universal) | |
3e0be4ab | 16279 | |
5476a9a4 | 16280 | $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h |
3e0be4ab | 16281 | |
5476a9a4 GM |
16282 | ;; #( |
16283 | *) | |
16284 | as_fn_error "unknown endianness | |
16285 | presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; | |
16286 | esac | |
4fda9c95 | 16287 | |
4fda9c95 | 16288 | |
5476a9a4 GM |
16289 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 |
16290 | $as_echo_n "checking for inline... " >&6; } | |
16291 | if test "${ac_cv_c_inline+set}" = set; then : | |
16292 | $as_echo_n "(cached) " >&6 | |
f199cab1 | 16293 | else |
5476a9a4 GM |
16294 | ac_cv_c_inline=no |
16295 | for ac_kw in inline __inline__ __inline; do | |
16296 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16297 | /* end confdefs.h. */ | |
16298 | #ifndef __cplusplus | |
16299 | typedef int foo_t; | |
16300 | static $ac_kw foo_t static_foo () {return 0; } | |
16301 | $ac_kw foo_t foo () {return 0; } | |
16302 | #endif | |
3e0be4ab | 16303 | |
3e0be4ab | 16304 | _ACEOF |
5476a9a4 GM |
16305 | if ac_fn_c_try_compile "$LINENO"; then : |
16306 | ac_cv_c_inline=$ac_kw | |
3e0be4ab | 16307 | fi |
5476a9a4 GM |
16308 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
16309 | test "$ac_cv_c_inline" != no && break | |
16310 | done | |
3e0be4ab | 16311 | |
4fda9c95 | 16312 | fi |
5476a9a4 GM |
16313 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 |
16314 | $as_echo "$ac_cv_c_inline" >&6; } | |
3e0be4ab | 16315 | |
5476a9a4 GM |
16316 | case $ac_cv_c_inline in |
16317 | inline | yes) ;; | |
16318 | *) | |
16319 | case $ac_cv_c_inline in | |
16320 | no) ac_val=;; | |
16321 | *) ac_val=$ac_cv_c_inline;; | |
16322 | esac | |
16323 | cat >>confdefs.h <<_ACEOF | |
16324 | #ifndef __cplusplus | |
16325 | #define inline $ac_val | |
16326 | #endif | |
4fda9c95 | 16327 | _ACEOF |
5476a9a4 GM |
16328 | ;; |
16329 | esac | |
4fda9c95 | 16330 | |
da6c8463 | 16331 | |
5476a9a4 GM |
16332 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtold conforms to C99" >&5 |
16333 | $as_echo_n "checking whether strtold conforms to C99... " >&6; } | |
16334 | if test "${gl_cv_func_c99_strtold+set}" = set; then : | |
16335 | $as_echo_n "(cached) " >&6 | |
16336 | else | |
16337 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16338 | /* end confdefs.h. */ | |
16339 | /* On HP-UX before 11.23, strtold returns a struct instead of | |
16340 | long double. Reject implementations like that, by requiring | |
16341 | compatibility with the C99 prototype. */ | |
16342 | #include <stdlib.h> | |
16343 | static long double (*p) (char const *, char **) = strtold; | |
16344 | static long double | |
16345 | test (char const *nptr, char **endptr) | |
16346 | { | |
16347 | long double r; | |
16348 | r = strtold (nptr, endptr); | |
16349 | return r; | |
16350 | } | |
16351 | int | |
16352 | main () | |
16353 | { | |
16354 | return test ("1.0", NULL) != 1 || p ("1.0", NULL) != 1; | |
16355 | ; | |
16356 | return 0; | |
16357 | } | |
16358 | _ACEOF | |
16359 | if ac_fn_c_try_link "$LINENO"; then : | |
16360 | gl_cv_func_c99_strtold=yes | |
16361 | else | |
16362 | gl_cv_func_c99_strtold=no | |
3e0be4ab | 16363 | fi |
5476a9a4 GM |
16364 | rm -f core conftest.err conftest.$ac_objext \ |
16365 | conftest$ac_exeext conftest.$ac_ext | |
16366 | fi | |
16367 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_c99_strtold" >&5 | |
16368 | $as_echo "$gl_cv_func_c99_strtold" >&6; } | |
16369 | if test $gl_cv_func_c99_strtold = yes; then | |
da6c8463 | 16370 | |
5476a9a4 | 16371 | $as_echo "#define HAVE_C99_STRTOLD 1" >>confdefs.h |
da6c8463 | 16372 | |
5476a9a4 | 16373 | fi |
da6c8463 GM |
16374 | |
16375 | ||
5476a9a4 GM |
16376 | GNULIB_CHDIR=0; |
16377 | GNULIB_CHOWN=0; | |
16378 | GNULIB_CLOSE=0; | |
16379 | GNULIB_DUP=0; | |
16380 | GNULIB_DUP2=0; | |
16381 | GNULIB_DUP3=0; | |
16382 | GNULIB_ENVIRON=0; | |
16383 | GNULIB_EUIDACCESS=0; | |
16384 | GNULIB_FACCESSAT=0; | |
16385 | GNULIB_FCHDIR=0; | |
16386 | GNULIB_FCHOWNAT=0; | |
16387 | GNULIB_FDATASYNC=0; | |
16388 | GNULIB_FSYNC=0; | |
16389 | GNULIB_FTRUNCATE=0; | |
16390 | GNULIB_GETCWD=0; | |
16391 | GNULIB_GETDOMAINNAME=0; | |
16392 | GNULIB_GETDTABLESIZE=0; | |
16393 | GNULIB_GETGROUPS=0; | |
16394 | GNULIB_GETHOSTNAME=0; | |
16395 | GNULIB_GETLOGIN=0; | |
16396 | GNULIB_GETLOGIN_R=0; | |
16397 | GNULIB_GETPAGESIZE=0; | |
16398 | GNULIB_GETUSERSHELL=0; | |
16399 | GNULIB_GROUP_MEMBER=0; | |
16400 | GNULIB_ISATTY=0; | |
16401 | GNULIB_LCHOWN=0; | |
16402 | GNULIB_LINK=0; | |
16403 | GNULIB_LINKAT=0; | |
16404 | GNULIB_LSEEK=0; | |
16405 | GNULIB_PIPE=0; | |
16406 | GNULIB_PIPE2=0; | |
16407 | GNULIB_PREAD=0; | |
16408 | GNULIB_PWRITE=0; | |
16409 | GNULIB_READ=0; | |
16410 | GNULIB_READLINK=0; | |
16411 | GNULIB_READLINKAT=0; | |
16412 | GNULIB_RMDIR=0; | |
16413 | GNULIB_SETHOSTNAME=0; | |
16414 | GNULIB_SLEEP=0; | |
16415 | GNULIB_SYMLINK=0; | |
16416 | GNULIB_SYMLINKAT=0; | |
16417 | GNULIB_TTYNAME_R=0; | |
16418 | GNULIB_UNISTD_H_NONBLOCKING=0; | |
16419 | GNULIB_UNISTD_H_SIGPIPE=0; | |
16420 | GNULIB_UNLINK=0; | |
16421 | GNULIB_UNLINKAT=0; | |
16422 | GNULIB_USLEEP=0; | |
16423 | GNULIB_WRITE=0; | |
16424 | HAVE_CHOWN=1; | |
16425 | HAVE_DUP2=1; | |
16426 | HAVE_DUP3=1; | |
16427 | HAVE_EUIDACCESS=1; | |
16428 | HAVE_FACCESSAT=1; | |
16429 | HAVE_FCHDIR=1; | |
16430 | HAVE_FCHOWNAT=1; | |
16431 | HAVE_FDATASYNC=1; | |
16432 | HAVE_FSYNC=1; | |
16433 | HAVE_FTRUNCATE=1; | |
16434 | HAVE_GETDTABLESIZE=1; | |
16435 | HAVE_GETGROUPS=1; | |
16436 | HAVE_GETHOSTNAME=1; | |
16437 | HAVE_GETLOGIN=1; | |
16438 | HAVE_GETPAGESIZE=1; | |
16439 | HAVE_GROUP_MEMBER=1; | |
16440 | HAVE_LCHOWN=1; | |
16441 | HAVE_LINK=1; | |
16442 | HAVE_LINKAT=1; | |
16443 | HAVE_PIPE=1; | |
16444 | HAVE_PIPE2=1; | |
16445 | HAVE_PREAD=1; | |
16446 | HAVE_PWRITE=1; | |
16447 | HAVE_READLINK=1; | |
16448 | HAVE_READLINKAT=1; | |
16449 | HAVE_SETHOSTNAME=1; | |
16450 | HAVE_SLEEP=1; | |
16451 | HAVE_SYMLINK=1; | |
16452 | HAVE_SYMLINKAT=1; | |
16453 | HAVE_UNLINKAT=1; | |
16454 | HAVE_USLEEP=1; | |
16455 | HAVE_DECL_ENVIRON=1; | |
16456 | HAVE_DECL_FCHDIR=1; | |
16457 | HAVE_DECL_FDATASYNC=1; | |
16458 | HAVE_DECL_GETDOMAINNAME=1; | |
16459 | HAVE_DECL_GETLOGIN_R=1; | |
16460 | HAVE_DECL_GETPAGESIZE=1; | |
16461 | HAVE_DECL_GETUSERSHELL=1; | |
16462 | HAVE_DECL_SETHOSTNAME=1; | |
16463 | HAVE_DECL_TTYNAME_R=1; | |
16464 | HAVE_OS_H=0; | |
16465 | HAVE_SYS_PARAM_H=0; | |
16466 | REPLACE_CHOWN=0; | |
16467 | REPLACE_CLOSE=0; | |
16468 | REPLACE_DUP=0; | |
16469 | REPLACE_DUP2=0; | |
16470 | REPLACE_FCHOWNAT=0; | |
16471 | REPLACE_FTRUNCATE=0; | |
16472 | REPLACE_GETCWD=0; | |
16473 | REPLACE_GETDOMAINNAME=0; | |
16474 | REPLACE_GETLOGIN_R=0; | |
16475 | REPLACE_GETGROUPS=0; | |
16476 | REPLACE_GETPAGESIZE=0; | |
16477 | REPLACE_ISATTY=0; | |
16478 | REPLACE_LCHOWN=0; | |
16479 | REPLACE_LINK=0; | |
16480 | REPLACE_LINKAT=0; | |
16481 | REPLACE_LSEEK=0; | |
16482 | REPLACE_PREAD=0; | |
16483 | REPLACE_PWRITE=0; | |
16484 | REPLACE_READ=0; | |
16485 | REPLACE_READLINK=0; | |
16486 | REPLACE_RMDIR=0; | |
16487 | REPLACE_SLEEP=0; | |
16488 | REPLACE_SYMLINK=0; | |
16489 | REPLACE_TTYNAME_R=0; | |
16490 | REPLACE_UNLINK=0; | |
16491 | REPLACE_UNLINKAT=0; | |
16492 | REPLACE_USLEEP=0; | |
16493 | REPLACE_WRITE=0; | |
16494 | UNISTD_H_HAVE_WINSOCK2_H=0; | |
16495 | UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0; | |
f199cab1 GM |
16496 | |
16497 | ||
93131e11 GM |
16498 | |
16499 | ||
16500 | ||
16501 | ||
16502 | ||
16503 | ||
16504 | ||
16505 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5 | |
16506 | $as_echo_n "checking if environ is properly declared... " >&6; } | |
16507 | if test "${gt_cv_var_environ_declaration+set}" = set; then : | |
16508 | $as_echo_n "(cached) " >&6 | |
16509 | else | |
16510 | ||
16511 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16512 | /* end confdefs.h. */ | |
16513 | #if HAVE_UNISTD_H | |
16514 | #include <unistd.h> | |
16515 | #endif | |
16516 | /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>. */ | |
16517 | #include <stdlib.h> | |
16518 | ||
16519 | extern struct { int foo; } environ; | |
16520 | int | |
16521 | main () | |
16522 | { | |
16523 | environ.foo = 1; | |
16524 | ; | |
16525 | return 0; | |
16526 | } | |
16527 | _ACEOF | |
16528 | if ac_fn_c_try_compile "$LINENO"; then : | |
16529 | gt_cv_var_environ_declaration=no | |
16530 | else | |
16531 | gt_cv_var_environ_declaration=yes | |
16532 | fi | |
16533 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
16534 | fi | |
16535 | ||
16536 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5 | |
16537 | $as_echo "$gt_cv_var_environ_declaration" >&6; } | |
16538 | if test $gt_cv_var_environ_declaration = yes; then | |
16539 | ||
16540 | $as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h | |
16541 | ||
16542 | fi | |
16543 | ||
16544 | ||
16545 | if test $gt_cv_var_environ_declaration != yes; then | |
16546 | HAVE_DECL_ENVIRON=0 | |
16547 | fi | |
16548 | ||
7cd2ed2c GM |
16549 | |
16550 | ||
16551 | ||
16552 | ||
8966cbff GM |
16553 | |
16554 | ||
5476a9a4 GM |
16555 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for st_dm_mode in struct stat" >&5 |
16556 | $as_echo_n "checking for st_dm_mode in struct stat... " >&6; } | |
16557 | if test "${ac_cv_struct_st_dm_mode+set}" = set; then : | |
f199cab1 | 16558 | $as_echo_n "(cached) " >&6 |
ae0d7250 | 16559 | else |
f199cab1 | 16560 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
3e0be4ab | 16561 | /* end confdefs.h. */ |
ae0d7250 | 16562 | |
5476a9a4 GM |
16563 | #include <sys/types.h> |
16564 | #include <sys/stat.h> | |
3e0be4ab GM |
16565 | int |
16566 | main () | |
16567 | { | |
5476a9a4 | 16568 | struct stat s; s.st_dm_mode; |
3e0be4ab GM |
16569 | ; |
16570 | return 0; | |
16571 | } | |
6ad6792b | 16572 | _ACEOF |
5476a9a4 GM |
16573 | if ac_fn_c_try_compile "$LINENO"; then : |
16574 | ac_cv_struct_st_dm_mode=yes | |
f199cab1 | 16575 | else |
5476a9a4 | 16576 | ac_cv_struct_st_dm_mode=no |
f199cab1 | 16577 | fi |
5476a9a4 | 16578 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
f199cab1 | 16579 | fi |
5476a9a4 GM |
16580 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_st_dm_mode" >&5 |
16581 | $as_echo "$ac_cv_struct_st_dm_mode" >&6; } | |
f199cab1 | 16582 | |
5476a9a4 | 16583 | if test $ac_cv_struct_st_dm_mode = yes; then |
f199cab1 | 16584 | |
5476a9a4 | 16585 | $as_echo "#define HAVE_ST_DM_MODE 1" >>confdefs.h |
f199cab1 | 16586 | |
5476a9a4 | 16587 | fi |
f199cab1 | 16588 | |
f199cab1 | 16589 | |
5476a9a4 GM |
16590 | ac_fn_c_check_decl "$LINENO" "strmode" "ac_cv_have_decl_strmode" "$ac_includes_default" |
16591 | if test "x$ac_cv_have_decl_strmode" = x""yes; then : | |
16592 | ac_have_decl=1 | |
16593 | else | |
16594 | ac_have_decl=0 | |
f199cab1 GM |
16595 | fi |
16596 | ||
5476a9a4 GM |
16597 | cat >>confdefs.h <<_ACEOF |
16598 | #define HAVE_DECL_STRMODE $ac_have_decl | |
16599 | _ACEOF | |
f199cab1 | 16600 | |
4fda9c95 | 16601 | |
5476a9a4 GM |
16602 | GNULIB__EXIT=0; |
16603 | GNULIB_ATOLL=0; | |
16604 | GNULIB_CALLOC_POSIX=0; | |
16605 | GNULIB_CANONICALIZE_FILE_NAME=0; | |
16606 | GNULIB_GETLOADAVG=0; | |
16607 | GNULIB_GETSUBOPT=0; | |
16608 | GNULIB_GRANTPT=0; | |
16609 | GNULIB_MALLOC_POSIX=0; | |
16610 | GNULIB_MBTOWC=0; | |
16611 | GNULIB_MKDTEMP=0; | |
16612 | GNULIB_MKOSTEMP=0; | |
16613 | GNULIB_MKOSTEMPS=0; | |
16614 | GNULIB_MKSTEMP=0; | |
16615 | GNULIB_MKSTEMPS=0; | |
16616 | GNULIB_POSIX_OPENPT=0; | |
16617 | GNULIB_PTSNAME=0; | |
16618 | GNULIB_PTSNAME_R=0; | |
16619 | GNULIB_PUTENV=0; | |
16620 | GNULIB_RANDOM=0; | |
16621 | GNULIB_RANDOM_R=0; | |
16622 | GNULIB_REALLOC_POSIX=0; | |
16623 | GNULIB_REALPATH=0; | |
16624 | GNULIB_RPMATCH=0; | |
16625 | GNULIB_SETENV=0; | |
16626 | GNULIB_STRTOD=0; | |
16627 | GNULIB_STRTOLL=0; | |
16628 | GNULIB_STRTOULL=0; | |
16629 | GNULIB_SYSTEM_POSIX=0; | |
16630 | GNULIB_UNLOCKPT=0; | |
16631 | GNULIB_UNSETENV=0; | |
16632 | GNULIB_WCTOMB=0; | |
16633 | HAVE__EXIT=1; | |
16634 | HAVE_ATOLL=1; | |
16635 | HAVE_CANONICALIZE_FILE_NAME=1; | |
16636 | HAVE_DECL_GETLOADAVG=1; | |
16637 | HAVE_GETSUBOPT=1; | |
16638 | HAVE_GRANTPT=1; | |
16639 | HAVE_MKDTEMP=1; | |
16640 | HAVE_MKOSTEMP=1; | |
16641 | HAVE_MKOSTEMPS=1; | |
16642 | HAVE_MKSTEMP=1; | |
16643 | HAVE_MKSTEMPS=1; | |
16644 | HAVE_POSIX_OPENPT=1; | |
16645 | HAVE_PTSNAME=1; | |
16646 | HAVE_PTSNAME_R=1; | |
16647 | HAVE_RANDOM=1; | |
16648 | HAVE_RANDOM_H=1; | |
16649 | HAVE_RANDOM_R=1; | |
16650 | HAVE_REALPATH=1; | |
16651 | HAVE_RPMATCH=1; | |
16652 | HAVE_SETENV=1; | |
16653 | HAVE_DECL_SETENV=1; | |
16654 | HAVE_STRTOD=1; | |
16655 | HAVE_STRTOLL=1; | |
16656 | HAVE_STRTOULL=1; | |
16657 | HAVE_STRUCT_RANDOM_DATA=1; | |
16658 | HAVE_SYS_LOADAVG_H=0; | |
16659 | HAVE_UNLOCKPT=1; | |
16660 | HAVE_DECL_UNSETENV=1; | |
16661 | REPLACE_CALLOC=0; | |
16662 | REPLACE_CANONICALIZE_FILE_NAME=0; | |
16663 | REPLACE_MALLOC=0; | |
16664 | REPLACE_MBTOWC=0; | |
16665 | REPLACE_MKSTEMP=0; | |
16666 | REPLACE_PTSNAME_R=0; | |
16667 | REPLACE_PUTENV=0; | |
16668 | REPLACE_RANDOM_R=0; | |
16669 | REPLACE_REALLOC=0; | |
16670 | REPLACE_REALPATH=0; | |
16671 | REPLACE_SETENV=0; | |
16672 | REPLACE_STRTOD=0; | |
16673 | REPLACE_UNSETENV=0; | |
16674 | REPLACE_WCTOMB=0; | |
f199cab1 GM |
16675 | |
16676 | ||
16677 | ||
5476a9a4 GM |
16678 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5 |
16679 | $as_echo_n "checking whether the preprocessor supports include_next... " >&6; } | |
16680 | if test "${gl_cv_have_include_next+set}" = set; then : | |
f199cab1 GM |
16681 | $as_echo_n "(cached) " >&6 |
16682 | else | |
5476a9a4 GM |
16683 | rm -rf conftestd1a conftestd1b conftestd2 |
16684 | mkdir conftestd1a conftestd1b conftestd2 | |
16685 | cat <<EOF > conftestd1a/conftest.h | |
16686 | #define DEFINED_IN_CONFTESTD1 | |
16687 | #include_next <conftest.h> | |
16688 | #ifdef DEFINED_IN_CONFTESTD2 | |
16689 | int foo; | |
16690 | #else | |
16691 | #error "include_next doesn't work" | |
16692 | #endif | |
16693 | EOF | |
16694 | cat <<EOF > conftestd1b/conftest.h | |
16695 | #define DEFINED_IN_CONFTESTD1 | |
16696 | #include <stdio.h> | |
16697 | #include_next <conftest.h> | |
16698 | #ifdef DEFINED_IN_CONFTESTD2 | |
16699 | int foo; | |
16700 | #else | |
16701 | #error "include_next doesn't work" | |
16702 | #endif | |
16703 | EOF | |
16704 | cat <<EOF > conftestd2/conftest.h | |
16705 | #ifndef DEFINED_IN_CONFTESTD1 | |
16706 | #error "include_next test doesn't work" | |
16707 | #endif | |
16708 | #define DEFINED_IN_CONFTESTD2 | |
16709 | EOF | |
16710 | gl_save_CPPFLAGS="$CPPFLAGS" | |
16711 | CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2" | |
16712 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
f199cab1 | 16713 | /* end confdefs.h. */ |
5476a9a4 | 16714 | #include <conftest.h> |
5f90be1b | 16715 | _ACEOF |
4fda9c95 | 16716 | if ac_fn_c_try_compile "$LINENO"; then : |
5476a9a4 | 16717 | gl_cv_have_include_next=yes |
5f90be1b | 16718 | else |
5476a9a4 | 16719 | CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2" |
f199cab1 | 16720 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
3e0be4ab | 16721 | /* end confdefs.h. */ |
5476a9a4 | 16722 | #include <conftest.h> |
4fda9c95 | 16723 | _ACEOF |
3e0be4ab | 16724 | if ac_fn_c_try_compile "$LINENO"; then : |
5476a9a4 | 16725 | gl_cv_have_include_next=buggy |
3e0be4ab | 16726 | else |
5476a9a4 | 16727 | gl_cv_have_include_next=no |
3e0be4ab | 16728 | fi |
5476a9a4 | 16729 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
f199cab1 | 16730 | |
4fda9c95 | 16731 | fi |
f199cab1 | 16732 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5476a9a4 GM |
16733 | CPPFLAGS="$gl_save_CPPFLAGS" |
16734 | rm -rf conftestd1a conftestd1b conftestd2 | |
5f90be1b | 16735 | |
3e0be4ab | 16736 | fi |
5476a9a4 GM |
16737 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5 |
16738 | $as_echo "$gl_cv_have_include_next" >&6; } | |
16739 | PRAGMA_SYSTEM_HEADER= | |
16740 | if test $gl_cv_have_include_next = yes; then | |
16741 | INCLUDE_NEXT=include_next | |
16742 | INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next | |
16743 | if test -n "$GCC"; then | |
16744 | PRAGMA_SYSTEM_HEADER='#pragma GCC system_header' | |
16745 | fi | |
16746 | else | |
16747 | if test $gl_cv_have_include_next = buggy; then | |
16748 | INCLUDE_NEXT=include | |
16749 | INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next | |
16750 | else | |
16751 | INCLUDE_NEXT=include | |
16752 | INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include | |
16753 | fi | |
16754 | fi | |
f199cab1 GM |
16755 | |
16756 | ||
16757 | ||
5476a9a4 GM |
16758 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5 |
16759 | $as_echo_n "checking whether system header files limit the line length... " >&6; } | |
16760 | if test "${gl_cv_pragma_columns+set}" = set; then : | |
f199cab1 GM |
16761 | $as_echo_n "(cached) " >&6 |
16762 | else | |
5476a9a4 | 16763 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
f199cab1 | 16764 | /* end confdefs.h. */ |
f199cab1 | 16765 | |
5476a9a4 GM |
16766 | #ifdef __TANDEM |
16767 | choke me | |
16768 | #endif | |
f199cab1 | 16769 | |
f199cab1 | 16770 | _ACEOF |
5476a9a4 GM |
16771 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
16772 | $EGREP "choke me" >/dev/null 2>&1; then : | |
16773 | gl_cv_pragma_columns=yes | |
16774 | else | |
16775 | gl_cv_pragma_columns=no | |
f199cab1 | 16776 | fi |
5476a9a4 | 16777 | rm -f conftest* |
f199cab1 | 16778 | |
f199cab1 | 16779 | |
5476a9a4 GM |
16780 | fi |
16781 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5 | |
16782 | $as_echo "$gl_cv_pragma_columns" >&6; } | |
16783 | if test $gl_cv_pragma_columns = yes; then | |
16784 | PRAGMA_COLUMNS="#pragma COLUMNS 10000" | |
f199cab1 | 16785 | else |
5476a9a4 | 16786 | PRAGMA_COLUMNS= |
f199cab1 GM |
16787 | fi |
16788 | ||
16789 | ||
16790 | ||
16791 | ||
16792 | ||
16793 | ||
16794 | ||
16795 | ||
16796 | ||
16797 | ||
16798 | ||
16799 | ||
16800 | ||
16801 | ||
5f90be1b | 16802 | |
f199cab1 GM |
16803 | |
16804 | ||
16805 | if test $gl_cv_have_include_next = yes; then | |
5476a9a4 | 16806 | gl_cv_next_getopt_h='<'getopt.h'>' |
f199cab1 | 16807 | else |
5476a9a4 GM |
16808 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <getopt.h>" >&5 |
16809 | $as_echo_n "checking absolute name of <getopt.h>... " >&6; } | |
16810 | if test "${gl_cv_next_getopt_h+set}" = set; then : | |
5f90be1b | 16811 | $as_echo_n "(cached) " >&6 |
5f90be1b | 16812 | else |
f199cab1 | 16813 | |
5476a9a4 | 16814 | if test $ac_cv_header_getopt_h = yes; then |
f199cab1 GM |
16815 | |
16816 | ||
16817 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5f90be1b | 16818 | /* end confdefs.h. */ |
5476a9a4 | 16819 | #include <getopt.h> |
4fda9c95 | 16820 | |
5f90be1b | 16821 | _ACEOF |
f199cab1 GM |
16822 | case "$host_os" in |
16823 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
16824 | *) gl_absname_cpp="$ac_cpp" ;; | |
16825 | esac | |
5f90be1b | 16826 | |
f199cab1 GM |
16827 | case "$host_os" in |
16828 | mingw*) | |
16829 | gl_dirsep_regex='[/\\]' | |
16830 | ;; | |
16831 | *) | |
16832 | gl_dirsep_regex='\/' | |
16833 | ;; | |
16834 | esac | |
16835 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
5f90be1b | 16836 | |
5476a9a4 | 16837 | gl_header_literal_regex=`echo 'getopt.h' \ |
f199cab1 GM |
16838 | | sed -e "$gl_make_literal_regex_sed"` |
16839 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
16840 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
16841 | s|^/[^/]|//&| | |
16842 | p | |
16843 | q | |
16844 | }' | |
5476a9a4 | 16845 | gl_cv_next_getopt_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | |
f199cab1 GM |
16846 | sed -n "$gl_absolute_header_sed"`'"' |
16847 | else | |
5476a9a4 | 16848 | gl_cv_next_getopt_h='<'getopt.h'>' |
f199cab1 | 16849 | fi |
5f90be1b PE |
16850 | |
16851 | ||
3e0be4ab | 16852 | fi |
5476a9a4 GM |
16853 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5 |
16854 | $as_echo "$gl_cv_next_getopt_h" >&6; } | |
f199cab1 | 16855 | fi |
5476a9a4 | 16856 | NEXT_GETOPT_H=$gl_cv_next_getopt_h |
3e0be4ab | 16857 | |
f199cab1 GM |
16858 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then |
16859 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
5476a9a4 | 16860 | gl_next_as_first_directive='<'getopt.h'>' |
f199cab1 GM |
16861 | else |
16862 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
5476a9a4 | 16863 | gl_next_as_first_directive=$gl_cv_next_getopt_h |
f199cab1 | 16864 | fi |
5476a9a4 | 16865 | NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive |
f199cab1 GM |
16866 | |
16867 | ||
f199cab1 | 16868 | |
f199cab1 | 16869 | |
5476a9a4 GM |
16870 | if test $ac_cv_header_getopt_h = yes; then |
16871 | HAVE_GETOPT_H=1 | |
16872 | else | |
16873 | HAVE_GETOPT_H=0 | |
f199cab1 GM |
16874 | fi |
16875 | ||
f199cab1 | 16876 | |
5476a9a4 | 16877 | gl_replace_getopt= |
f199cab1 | 16878 | |
5476a9a4 GM |
16879 | if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then |
16880 | for ac_header in getopt.h | |
16881 | do : | |
16882 | ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default" | |
16883 | if test "x$ac_cv_header_getopt_h" = x""yes; then : | |
16884 | cat >>confdefs.h <<_ACEOF | |
16885 | #define HAVE_GETOPT_H 1 | |
16886 | _ACEOF | |
f199cab1 | 16887 | |
5476a9a4 GM |
16888 | else |
16889 | gl_replace_getopt=yes | |
3e0be4ab | 16890 | fi |
3e0be4ab | 16891 | |
5476a9a4 | 16892 | done |
3e0be4ab | 16893 | |
5476a9a4 | 16894 | fi |
3e0be4ab | 16895 | |
5476a9a4 GM |
16896 | if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then |
16897 | for ac_func in getopt_long_only | |
16898 | do : | |
16899 | ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only" | |
16900 | if test "x$ac_cv_func_getopt_long_only" = x""yes; then : | |
16901 | cat >>confdefs.h <<_ACEOF | |
16902 | #define HAVE_GETOPT_LONG_ONLY 1 | |
16903 | _ACEOF | |
3e0be4ab | 16904 | |
3e0be4ab | 16905 | else |
5476a9a4 | 16906 | gl_replace_getopt=yes |
3e0be4ab | 16907 | fi |
5476a9a4 | 16908 | done |
3e0be4ab | 16909 | |
f199cab1 | 16910 | fi |
3e0be4ab | 16911 | |
5476a9a4 GM |
16912 | if test -z "$gl_replace_getopt"; then |
16913 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5 | |
16914 | $as_echo_n "checking whether getopt is POSIX compatible... " >&6; } | |
16915 | if test "${gl_cv_func_getopt_posix+set}" = set; then : | |
3e0be4ab | 16916 | $as_echo_n "(cached) " >&6 |
5476a9a4 GM |
16917 | else |
16918 | ||
16919 | if test $cross_compiling = no; then | |
16920 | if test "$cross_compiling" = yes; then : | |
16921 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
16922 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
16923 | as_fn_error "cannot run test program while cross compiling | |
16924 | See \`config.log' for more details." "$LINENO" 5; } | |
3e0be4ab | 16925 | else |
f199cab1 | 16926 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
3e0be4ab | 16927 | /* end confdefs.h. */ |
5476a9a4 GM |
16928 | |
16929 | #include <unistd.h> | |
16930 | #include <stdlib.h> | |
16931 | #include <string.h> | |
16932 | ||
f199cab1 GM |
16933 | int |
16934 | main () | |
16935 | { | |
5476a9a4 GM |
16936 | static char program[] = "program"; |
16937 | static char a[] = "-a"; | |
16938 | static char foo[] = "foo"; | |
16939 | static char bar[] = "bar"; | |
16940 | char *argv[] = { program, a, foo, bar, NULL }; | |
16941 | int c; | |
16942 | ||
16943 | c = getopt (4, argv, "ab"); | |
16944 | if (!(c == 'a')) | |
16945 | return 1; | |
16946 | c = getopt (4, argv, "ab"); | |
16947 | if (!(c == -1)) | |
16948 | return 2; | |
16949 | if (!(optind == 2)) | |
16950 | return 3; | |
f199cab1 GM |
16951 | return 0; |
16952 | } | |
16953 | ||
3e0be4ab | 16954 | _ACEOF |
5476a9a4 GM |
16955 | if ac_fn_c_try_run "$LINENO"; then : |
16956 | gl_cv_func_getopt_posix=maybe | |
3e0be4ab | 16957 | else |
5476a9a4 | 16958 | gl_cv_func_getopt_posix=no |
3e0be4ab | 16959 | fi |
5476a9a4 GM |
16960 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
16961 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
f199cab1 GM |
16962 | fi |
16963 | ||
5476a9a4 GM |
16964 | if test $gl_cv_func_getopt_posix = maybe; then |
16965 | if test "$cross_compiling" = yes; then : | |
16966 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
16967 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
16968 | as_fn_error "cannot run test program while cross compiling | |
16969 | See \`config.log' for more details." "$LINENO" 5; } | |
3e0be4ab | 16970 | else |
5476a9a4 GM |
16971 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
16972 | /* end confdefs.h. */ | |
3e0be4ab | 16973 | |
5476a9a4 GM |
16974 | #include <unistd.h> |
16975 | #include <stdlib.h> | |
16976 | #include <string.h> | |
3e0be4ab | 16977 | |
5476a9a4 GM |
16978 | int |
16979 | main () | |
16980 | { | |
16981 | static char program[] = "program"; | |
16982 | static char donald[] = "donald"; | |
16983 | static char p[] = "-p"; | |
16984 | static char billy[] = "billy"; | |
16985 | static char duck[] = "duck"; | |
16986 | static char a[] = "-a"; | |
16987 | static char bar[] = "bar"; | |
16988 | char *argv[] = { program, donald, p, billy, duck, a, bar, NULL }; | |
16989 | int c; | |
3e0be4ab | 16990 | |
5476a9a4 GM |
16991 | c = getopt (7, argv, "+abp:q:"); |
16992 | if (!(c == -1)) | |
16993 | return 4; | |
16994 | if (!(strcmp (argv[0], "program") == 0)) | |
16995 | return 5; | |
16996 | if (!(strcmp (argv[1], "donald") == 0)) | |
16997 | return 6; | |
16998 | if (!(strcmp (argv[2], "-p") == 0)) | |
16999 | return 7; | |
17000 | if (!(strcmp (argv[3], "billy") == 0)) | |
17001 | return 8; | |
17002 | if (!(strcmp (argv[4], "duck") == 0)) | |
17003 | return 9; | |
17004 | if (!(strcmp (argv[5], "-a") == 0)) | |
17005 | return 10; | |
17006 | if (!(strcmp (argv[6], "bar") == 0)) | |
17007 | return 11; | |
17008 | if (!(optind == 1)) | |
17009 | return 12; | |
17010 | return 0; | |
17011 | } | |
3e0be4ab GM |
17012 | |
17013 | _ACEOF | |
5476a9a4 GM |
17014 | if ac_fn_c_try_run "$LINENO"; then : |
17015 | gl_cv_func_getopt_posix=maybe | |
17016 | else | |
17017 | gl_cv_func_getopt_posix=no | |
17018 | fi | |
17019 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
17020 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
17021 | fi | |
b0415a03 | 17022 | |
5476a9a4 GM |
17023 | fi |
17024 | if test $gl_cv_func_getopt_posix = maybe; then | |
17025 | if test "$cross_compiling" = yes; then : | |
17026 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
17027 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
17028 | as_fn_error "cannot run test program while cross compiling | |
17029 | See \`config.log' for more details." "$LINENO" 5; } | |
17030 | else | |
17031 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
17032 | /* end confdefs.h. */ | |
b0415a03 | 17033 | |
5476a9a4 GM |
17034 | #include <unistd.h> |
17035 | #include <stdlib.h> | |
17036 | #include <string.h> | |
3e0be4ab | 17037 | |
5476a9a4 GM |
17038 | int |
17039 | main () | |
17040 | { | |
17041 | static char program[] = "program"; | |
17042 | static char ab[] = "-ab"; | |
17043 | char *argv[3] = { program, ab, NULL }; | |
17044 | if (getopt (2, argv, "ab:") != 'a') | |
17045 | return 13; | |
17046 | if (getopt (2, argv, "ab:") != '?') | |
17047 | return 14; | |
17048 | if (optopt != 'b') | |
17049 | return 15; | |
17050 | if (optind != 2) | |
17051 | return 16; | |
17052 | return 0; | |
17053 | } | |
3e0be4ab | 17054 | |
5476a9a4 GM |
17055 | _ACEOF |
17056 | if ac_fn_c_try_run "$LINENO"; then : | |
17057 | gl_cv_func_getopt_posix=yes | |
17058 | else | |
17059 | gl_cv_func_getopt_posix=no | |
17060 | fi | |
17061 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
17062 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
3e0be4ab | 17063 | fi |
3e0be4ab | 17064 | |
5476a9a4 GM |
17065 | fi |
17066 | else | |
17067 | case "$host_os" in | |
17068 | darwin* | aix* | mingw*) gl_cv_func_getopt_posix="guessing no";; | |
17069 | *) gl_cv_func_getopt_posix="guessing yes";; | |
17070 | esac | |
17071 | fi | |
3e0be4ab | 17072 | |
5476a9a4 GM |
17073 | fi |
17074 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5 | |
17075 | $as_echo "$gl_cv_func_getopt_posix" >&6; } | |
17076 | case "$gl_cv_func_getopt_posix" in | |
17077 | *no) gl_replace_getopt=yes ;; | |
17078 | esac | |
3e0be4ab GM |
17079 | fi |
17080 | ||
5476a9a4 GM |
17081 | if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then |
17082 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5 | |
17083 | $as_echo_n "checking for working GNU getopt function... " >&6; } | |
17084 | if test "${gl_cv_func_getopt_gnu+set}" = set; then : | |
17085 | $as_echo_n "(cached) " >&6 | |
17086 | else | |
17087 | # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the | |
17088 | # optstring is necessary for programs like m4 that have POSIX-mandated | |
17089 | # semantics for supporting options interspersed with files. | |
17090 | # Also, since getopt_long is a GNU extension, we require optind=0. | |
17091 | # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT; | |
17092 | # so take care to revert to the correct (non-)export state. | |
17093 | gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }' | |
17094 | case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" </dev/null` in | |
17095 | xx) gl_had_POSIXLY_CORRECT=exported ;; | |
17096 | x) gl_had_POSIXLY_CORRECT=yes ;; | |
17097 | *) gl_had_POSIXLY_CORRECT= ;; | |
17098 | esac | |
17099 | POSIXLY_CORRECT=1 | |
17100 | export POSIXLY_CORRECT | |
17101 | if test "$cross_compiling" = yes; then : | |
17102 | gl_cv_func_getopt_gnu="guessing no" | |
3e0be4ab | 17103 | |
5476a9a4 GM |
17104 | else |
17105 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
17106 | /* end confdefs.h. */ | |
17107 | #include <getopt.h> | |
17108 | #include <stddef.h> | |
17109 | #include <string.h> | |
3e0be4ab | 17110 | |
5476a9a4 GM |
17111 | #include <stdlib.h> |
17112 | #if defined __MACH__ && defined __APPLE__ | |
17113 | /* Avoid a crash on Mac OS X. */ | |
17114 | #include <mach/mach.h> | |
17115 | #include <mach/mach_error.h> | |
17116 | #include <mach/thread_status.h> | |
17117 | #include <mach/exception.h> | |
17118 | #include <mach/task.h> | |
17119 | #include <pthread.h> | |
17120 | /* The exception port on which our thread listens. */ | |
17121 | static mach_port_t our_exception_port; | |
17122 | /* The main function of the thread listening for exceptions of type | |
17123 | EXC_BAD_ACCESS. */ | |
17124 | static void * | |
17125 | mach_exception_thread (void *arg) | |
17126 | { | |
17127 | /* Buffer for a message to be received. */ | |
17128 | struct { | |
17129 | mach_msg_header_t head; | |
17130 | mach_msg_body_t msgh_body; | |
17131 | char data[1024]; | |
17132 | } msg; | |
17133 | mach_msg_return_t retval; | |
17134 | /* Wait for a message on the exception port. */ | |
17135 | retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg), | |
17136 | our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL); | |
17137 | if (retval != MACH_MSG_SUCCESS) | |
17138 | abort (); | |
17139 | exit (1); | |
17140 | } | |
17141 | static void | |
17142 | nocrash_init (void) | |
17143 | { | |
17144 | mach_port_t self = mach_task_self (); | |
17145 | /* Allocate a port on which the thread shall listen for exceptions. */ | |
17146 | if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port) | |
17147 | == KERN_SUCCESS) { | |
17148 | /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */ | |
17149 | if (mach_port_insert_right (self, our_exception_port, our_exception_port, | |
17150 | MACH_MSG_TYPE_MAKE_SEND) | |
17151 | == KERN_SUCCESS) { | |
17152 | /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting | |
17153 | for us. */ | |
17154 | exception_mask_t mask = EXC_MASK_BAD_ACCESS; | |
17155 | /* Create the thread listening on the exception port. */ | |
17156 | pthread_attr_t attr; | |
17157 | pthread_t thread; | |
17158 | if (pthread_attr_init (&attr) == 0 | |
17159 | && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0 | |
17160 | && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) { | |
17161 | pthread_attr_destroy (&attr); | |
17162 | /* Replace the exception port info for these exceptions with our own. | |
17163 | Note that we replace the exception port for the entire task, not only | |
17164 | for a particular thread. This has the effect that when our exception | |
17165 | port gets the message, the thread specific exception port has already | |
17166 | been asked, and we don't need to bother about it. | |
17167 | See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */ | |
17168 | task_set_exception_ports (self, mask, our_exception_port, | |
17169 | EXCEPTION_DEFAULT, MACHINE_THREAD_STATE); | |
17170 | } | |
17171 | } | |
17172 | } | |
17173 | } | |
17174 | #elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ | |
17175 | /* Avoid a crash on native Windows. */ | |
17176 | #define WIN32_LEAN_AND_MEAN | |
17177 | #include <windows.h> | |
17178 | #include <winerror.h> | |
17179 | static LONG WINAPI | |
17180 | exception_filter (EXCEPTION_POINTERS *ExceptionInfo) | |
17181 | { | |
17182 | switch (ExceptionInfo->ExceptionRecord->ExceptionCode) | |
17183 | { | |
17184 | case EXCEPTION_ACCESS_VIOLATION: | |
17185 | case EXCEPTION_IN_PAGE_ERROR: | |
17186 | case EXCEPTION_STACK_OVERFLOW: | |
17187 | case EXCEPTION_GUARD_PAGE: | |
17188 | case EXCEPTION_PRIV_INSTRUCTION: | |
17189 | case EXCEPTION_ILLEGAL_INSTRUCTION: | |
17190 | case EXCEPTION_DATATYPE_MISALIGNMENT: | |
17191 | case EXCEPTION_ARRAY_BOUNDS_EXCEEDED: | |
17192 | case EXCEPTION_NONCONTINUABLE_EXCEPTION: | |
17193 | exit (1); | |
17194 | } | |
17195 | return EXCEPTION_CONTINUE_SEARCH; | |
17196 | } | |
17197 | static void | |
17198 | nocrash_init (void) | |
17199 | { | |
17200 | SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter); | |
17201 | } | |
17202 | #else | |
17203 | /* Avoid a crash on POSIX systems. */ | |
17204 | #include <signal.h> | |
17205 | /* A POSIX signal handler. */ | |
17206 | static void | |
17207 | exception_handler (int sig) | |
17208 | { | |
17209 | exit (1); | |
17210 | } | |
17211 | static void | |
17212 | nocrash_init (void) | |
17213 | { | |
17214 | #ifdef SIGSEGV | |
17215 | signal (SIGSEGV, exception_handler); | |
17216 | #endif | |
17217 | #ifdef SIGBUS | |
17218 | signal (SIGBUS, exception_handler); | |
17219 | #endif | |
17220 | } | |
17221 | #endif | |
3e0be4ab | 17222 | |
3e0be4ab | 17223 | |
5476a9a4 GM |
17224 | int |
17225 | main () | |
17226 | { | |
3e0be4ab | 17227 | |
5476a9a4 | 17228 | int result = 0; |
3e0be4ab | 17229 | |
5476a9a4 | 17230 | nocrash_init(); |
3e0be4ab | 17231 | |
5476a9a4 GM |
17232 | /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw, |
17233 | and fails on Mac OS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5, | |
17234 | OSF/1 5.1, Solaris 10. */ | |
17235 | { | |
17236 | static char conftest[] = "conftest"; | |
17237 | static char plus[] = "-+"; | |
17238 | char *argv[3] = { conftest, plus, NULL }; | |
17239 | opterr = 0; | |
17240 | if (getopt (2, argv, "+a") != '?') | |
17241 | result |= 1; | |
17242 | } | |
17243 | /* This code succeeds on glibc 2.8, mingw, | |
17244 | and fails on Mac OS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11, | |
17245 | IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */ | |
17246 | { | |
17247 | static char program[] = "program"; | |
17248 | static char p[] = "-p"; | |
17249 | static char foo[] = "foo"; | |
17250 | static char bar[] = "bar"; | |
17251 | char *argv[] = { program, p, foo, bar, NULL }; | |
3e0be4ab | 17252 | |
5476a9a4 GM |
17253 | optind = 1; |
17254 | if (getopt (4, argv, "p::") != 'p') | |
17255 | result |= 2; | |
17256 | else if (optarg != NULL) | |
17257 | result |= 4; | |
17258 | else if (getopt (4, argv, "p::") != -1) | |
17259 | result |= 6; | |
17260 | else if (optind != 2) | |
17261 | result |= 8; | |
17262 | } | |
17263 | /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */ | |
17264 | { | |
17265 | static char program[] = "program"; | |
17266 | static char foo[] = "foo"; | |
17267 | static char p[] = "-p"; | |
17268 | char *argv[] = { program, foo, p, NULL }; | |
17269 | optind = 0; | |
17270 | if (getopt (3, argv, "-p") != 1) | |
17271 | result |= 16; | |
17272 | else if (getopt (3, argv, "-p") != 'p') | |
17273 | result |= 16; | |
17274 | } | |
17275 | /* This code fails on glibc 2.11. */ | |
17276 | { | |
17277 | static char program[] = "program"; | |
17278 | static char b[] = "-b"; | |
17279 | static char a[] = "-a"; | |
17280 | char *argv[] = { program, b, a, NULL }; | |
17281 | optind = opterr = 0; | |
17282 | if (getopt (3, argv, "+:a:b") != 'b') | |
17283 | result |= 32; | |
17284 | else if (getopt (3, argv, "+:a:b") != ':') | |
17285 | result |= 32; | |
17286 | } | |
17287 | /* This code dumps core on glibc 2.14. */ | |
17288 | { | |
17289 | static char program[] = "program"; | |
17290 | static char w[] = "-W"; | |
17291 | static char dummy[] = "dummy"; | |
17292 | char *argv[] = { program, w, dummy, NULL }; | |
17293 | optind = opterr = 1; | |
17294 | if (getopt (3, argv, "W;") != 'W') | |
17295 | result |= 64; | |
17296 | } | |
17297 | return result; | |
3e0be4ab | 17298 | |
5476a9a4 GM |
17299 | ; |
17300 | return 0; | |
17301 | } | |
17302 | _ACEOF | |
17303 | if ac_fn_c_try_run "$LINENO"; then : | |
17304 | gl_cv_func_getopt_gnu=yes | |
17305 | else | |
17306 | gl_cv_func_getopt_gnu=no | |
17307 | fi | |
17308 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
17309 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
17310 | fi | |
3e0be4ab | 17311 | |
5476a9a4 GM |
17312 | case $gl_had_POSIXLY_CORRECT in |
17313 | exported) ;; | |
17314 | yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;; | |
17315 | *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;; | |
17316 | esac | |
3e0be4ab | 17317 | |
5476a9a4 GM |
17318 | fi |
17319 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5 | |
17320 | $as_echo "$gl_cv_func_getopt_gnu" >&6; } | |
17321 | if test "$gl_cv_func_getopt_gnu" != yes; then | |
17322 | gl_replace_getopt=yes | |
17323 | else | |
17324 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt_long function" >&5 | |
17325 | $as_echo_n "checking for working GNU getopt_long function... " >&6; } | |
17326 | if test "${gl_cv_func_getopt_long_gnu+set}" = set; then : | |
f199cab1 GM |
17327 | $as_echo_n "(cached) " >&6 |
17328 | else | |
5476a9a4 GM |
17329 | if test "$cross_compiling" = yes; then : |
17330 | case "$host_os" in | |
17331 | openbsd*) gl_cv_func_getopt_long_gnu="guessing no";; | |
17332 | *) gl_cv_func_getopt_long_gnu="guessing yes";; | |
17333 | esac | |
3e0be4ab GM |
17334 | |
17335 | else | |
17336 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
17337 | /* end confdefs.h. */ | |
5476a9a4 GM |
17338 | #include <getopt.h> |
17339 | #include <stddef.h> | |
17340 | #include <string.h> | |
f199cab1 GM |
17341 | |
17342 | int | |
17343 | main () | |
369e19fc | 17344 | { |
5476a9a4 GM |
17345 | static const struct option long_options[] = |
17346 | { | |
17347 | { "xtremely-",no_argument, NULL, 1003 }, | |
17348 | { "xtra", no_argument, NULL, 1001 }, | |
17349 | { "xtreme", no_argument, NULL, 1002 }, | |
17350 | { "xtremely", no_argument, NULL, 1003 }, | |
17351 | { NULL, 0, NULL, 0 } | |
17352 | }; | |
17353 | /* This code fails on OpenBSD 5.0. */ | |
17354 | { | |
17355 | static char program[] = "program"; | |
17356 | static char xtremel[] = "--xtremel"; | |
17357 | char *argv[] = { program, xtremel, NULL }; | |
17358 | int option_index; | |
17359 | optind = 1; opterr = 0; | |
17360 | if (getopt_long (2, argv, "", long_options, &option_index) != 1003) | |
17361 | return 1; | |
17362 | } | |
17363 | return 0; | |
f199cab1 GM |
17364 | |
17365 | ; | |
17366 | return 0; | |
369e19fc | 17367 | } |
f199cab1 GM |
17368 | _ACEOF |
17369 | if ac_fn_c_try_run "$LINENO"; then : | |
5476a9a4 | 17370 | gl_cv_func_getopt_long_gnu=yes |
f199cab1 | 17371 | else |
5476a9a4 | 17372 | gl_cv_func_getopt_long_gnu=no |
f199cab1 GM |
17373 | fi |
17374 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
17375 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
17376 | fi | |
17377 | ||
5476a9a4 | 17378 | |
f199cab1 | 17379 | fi |
5476a9a4 GM |
17380 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_long_gnu" >&5 |
17381 | $as_echo "$gl_cv_func_getopt_long_gnu" >&6; } | |
17382 | case "$gl_cv_func_getopt_long_gnu" in | |
17383 | *yes) ;; | |
17384 | *) gl_replace_getopt=yes ;; | |
17385 | esac | |
17386 | fi | |
17387 | fi | |
f199cab1 | 17388 | |
f199cab1 | 17389 | |
f199cab1 | 17390 | |
369e19fc PE |
17391 | |
17392 | ||
5476a9a4 GM |
17393 | |
17394 | REPLACE_GETOPT=0 | |
17395 | if test -n "$gl_replace_getopt"; then | |
17396 | REPLACE_GETOPT=1 | |
f199cab1 | 17397 | fi |
3e0be4ab | 17398 | |
5476a9a4 | 17399 | if test $REPLACE_GETOPT = 1; then |
369e19fc | 17400 | |
5476a9a4 | 17401 | GETOPT_H=getopt.h |
369e19fc | 17402 | |
5476a9a4 | 17403 | $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h |
6ad6792b GM |
17404 | |
17405 | ||
f199cab1 | 17406 | |
5476a9a4 | 17407 | fi |
f199cab1 | 17408 | |
5476a9a4 GM |
17409 | ac_fn_c_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default" |
17410 | if test "x$ac_cv_have_decl_getenv" = x""yes; then : | |
17411 | ac_have_decl=1 | |
3e0be4ab | 17412 | else |
5476a9a4 | 17413 | ac_have_decl=0 |
3e0be4ab | 17414 | fi |
e275c824 | 17415 | |
5476a9a4 GM |
17416 | cat >>confdefs.h <<_ACEOF |
17417 | #define HAVE_DECL_GETENV $ac_have_decl | |
17418 | _ACEOF | |
17419 | ||
a6342fc8 | 17420 | : |
f199cab1 | 17421 | |
5476a9a4 GM |
17422 | |
17423 | ||
17424 | ||
17425 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5 | |
17426 | $as_echo_n "checking for C/C++ restrict keyword... " >&6; } | |
17427 | if test "${ac_cv_c_restrict+set}" = set; then : | |
17428 | $as_echo_n "(cached) " >&6 | |
f199cab1 | 17429 | else |
5476a9a4 GM |
17430 | ac_cv_c_restrict=no |
17431 | # The order here caters to the fact that C++ does not require restrict. | |
17432 | for ac_kw in __restrict __restrict__ _Restrict restrict; do | |
17433 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
f199cab1 | 17434 | /* end confdefs.h. */ |
5476a9a4 GM |
17435 | typedef int * int_ptr; |
17436 | int foo (int_ptr $ac_kw ip) { | |
17437 | return ip[0]; | |
17438 | } | |
f199cab1 GM |
17439 | int |
17440 | main () | |
17441 | { | |
5476a9a4 GM |
17442 | int s[1]; |
17443 | int * $ac_kw t = s; | |
17444 | t[0] = 0; | |
17445 | return foo(t) | |
f199cab1 GM |
17446 | ; |
17447 | return 0; | |
17448 | } | |
17449 | _ACEOF | |
5476a9a4 GM |
17450 | if ac_fn_c_try_compile "$LINENO"; then : |
17451 | ac_cv_c_restrict=$ac_kw | |
f199cab1 | 17452 | fi |
5476a9a4 GM |
17453 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
17454 | test "$ac_cv_c_restrict" != no && break | |
17455 | done | |
f199cab1 | 17456 | |
f199cab1 | 17457 | fi |
5476a9a4 GM |
17458 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5 |
17459 | $as_echo "$ac_cv_c_restrict" >&6; } | |
f199cab1 | 17460 | |
5476a9a4 GM |
17461 | case $ac_cv_c_restrict in |
17462 | restrict) ;; | |
17463 | no) $as_echo "#define restrict /**/" >>confdefs.h | |
17464 | ;; | |
17465 | *) cat >>confdefs.h <<_ACEOF | |
17466 | #define restrict $ac_cv_c_restrict | |
17467 | _ACEOF | |
17468 | ;; | |
17469 | esac | |
f199cab1 | 17470 | |
f199cab1 | 17471 | |
5476a9a4 GM |
17472 | GNULIB_GETTIMEOFDAY=0; |
17473 | HAVE_GETTIMEOFDAY=1; | |
17474 | HAVE_STRUCT_TIMEVAL=1; | |
17475 | HAVE_SYS_TIME_H=1; | |
17476 | REPLACE_GETTIMEOFDAY=0; | |
17477 | REPLACE_STRUCT_TIMEVAL=0; | |
e275c824 | 17478 | |
e275c824 | 17479 | |
e275c824 | 17480 | |
e275c824 | 17481 | |
4fda9c95 | 17482 | |
5fa4ac76 | 17483 | |
5fa4ac76 | 17484 | |
5fa4ac76 | 17485 | |
f199cab1 GM |
17486 | |
17487 | ||
17488 | ||
5fa4ac76 | 17489 | |
5fa4ac76 | 17490 | |
5fa4ac76 | 17491 | |
5fa4ac76 | 17492 | |
5fa4ac76 | 17493 | |
5476a9a4 GM |
17494 | if test $gl_cv_have_include_next = yes; then |
17495 | gl_cv_next_sys_time_h='<'sys/time.h'>' | |
17496 | else | |
17497 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5 | |
17498 | $as_echo_n "checking absolute name of <sys/time.h>... " >&6; } | |
17499 | if test "${gl_cv_next_sys_time_h+set}" = set; then : | |
17500 | $as_echo_n "(cached) " >&6 | |
17501 | else | |
5fa4ac76 | 17502 | |
5476a9a4 | 17503 | if test $ac_cv_header_sys_time_h = yes; then |
5fa4ac76 PE |
17504 | |
17505 | ||
5476a9a4 GM |
17506 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
17507 | /* end confdefs.h. */ | |
17508 | #include <sys/time.h> | |
5fa4ac76 | 17509 | |
5476a9a4 GM |
17510 | _ACEOF |
17511 | case "$host_os" in | |
17512 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
17513 | *) gl_absname_cpp="$ac_cpp" ;; | |
17514 | esac | |
1f5d53eb | 17515 | |
5476a9a4 GM |
17516 | case "$host_os" in |
17517 | mingw*) | |
17518 | gl_dirsep_regex='[/\\]' | |
17519 | ;; | |
17520 | *) | |
17521 | gl_dirsep_regex='\/' | |
17522 | ;; | |
17523 | esac | |
17524 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
1f5d53eb | 17525 | |
5476a9a4 GM |
17526 | gl_header_literal_regex=`echo 'sys/time.h' \ |
17527 | | sed -e "$gl_make_literal_regex_sed"` | |
17528 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
17529 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
17530 | s|^/[^/]|//&| | |
17531 | p | |
17532 | q | |
17533 | }' | |
17534 | gl_cv_next_sys_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
17535 | sed -n "$gl_absolute_header_sed"`'"' | |
17536 | else | |
17537 | gl_cv_next_sys_time_h='<'sys/time.h'>' | |
17538 | fi | |
1f5d53eb | 17539 | |
1f5d53eb | 17540 | |
5476a9a4 GM |
17541 | fi |
17542 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5 | |
17543 | $as_echo "$gl_cv_next_sys_time_h" >&6; } | |
17544 | fi | |
17545 | NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h | |
3e0be4ab | 17546 | |
5476a9a4 GM |
17547 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then |
17548 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
17549 | gl_next_as_first_directive='<'sys/time.h'>' | |
17550 | else | |
17551 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
17552 | gl_next_as_first_directive=$gl_cv_next_sys_time_h | |
17553 | fi | |
17554 | NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive | |
3e0be4ab | 17555 | |
e275c824 | 17556 | |
3e0be4ab | 17557 | |
f199cab1 GM |
17558 | |
17559 | ||
5476a9a4 GM |
17560 | if test $ac_cv_header_sys_time_h != yes; then |
17561 | HAVE_SYS_TIME_H=0 | |
17562 | fi | |
f199cab1 GM |
17563 | |
17564 | ||
17565 | ||
17566 | ||
17567 | ||
5476a9a4 GM |
17568 | if test $ac_cv_header_sys_socket_h != yes; then |
17569 | for ac_header in winsock2.h | |
17570 | do : | |
17571 | ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default" | |
17572 | if test "x$ac_cv_header_winsock2_h" = x""yes; then : | |
17573 | cat >>confdefs.h <<_ACEOF | |
17574 | #define HAVE_WINSOCK2_H 1 | |
17575 | _ACEOF | |
f199cab1 | 17576 | |
5476a9a4 | 17577 | fi |
3e0be4ab | 17578 | |
5476a9a4 | 17579 | done |
3e0be4ab | 17580 | |
5476a9a4 GM |
17581 | fi |
17582 | if test "$ac_cv_header_winsock2_h" = yes; then | |
17583 | HAVE_WINSOCK2_H=1 | |
17584 | UNISTD_H_HAVE_WINSOCK2_H=1 | |
17585 | SYS_IOCTL_H_HAVE_WINSOCK2_H=1 | |
17586 | else | |
17587 | HAVE_WINSOCK2_H=0 | |
17588 | fi | |
17589 | ||
17590 | ||
17591 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5 | |
17592 | $as_echo_n "checking for struct timeval... " >&6; } | |
17593 | if test "${gl_cv_sys_struct_timeval+set}" = set; then : | |
17594 | $as_echo_n "(cached) " >&6 | |
17595 | else | |
17596 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
17597 | /* end confdefs.h. */ | |
17598 | #if HAVE_SYS_TIME_H | |
17599 | #include <sys/time.h> | |
17600 | #endif | |
17601 | #include <time.h> | |
17602 | #if HAVE_WINSOCK2_H | |
17603 | # include <winsock2.h> | |
17604 | #endif | |
f199cab1 | 17605 | |
5476a9a4 GM |
17606 | int |
17607 | main () | |
17608 | { | |
17609 | static struct timeval x; x.tv_sec = x.tv_usec; | |
17610 | ; | |
17611 | return 0; | |
17612 | } | |
17613 | _ACEOF | |
17614 | if ac_fn_c_try_compile "$LINENO"; then : | |
17615 | gl_cv_sys_struct_timeval=yes | |
17616 | else | |
17617 | gl_cv_sys_struct_timeval=no | |
f199cab1 | 17618 | fi |
5476a9a4 | 17619 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
f199cab1 | 17620 | |
5476a9a4 GM |
17621 | fi |
17622 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5 | |
17623 | $as_echo "$gl_cv_sys_struct_timeval" >&6; } | |
17624 | if test $gl_cv_sys_struct_timeval != yes; then | |
17625 | HAVE_STRUCT_TIMEVAL=0 | |
17626 | else | |
17627 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5 | |
17628 | $as_echo_n "checking for wide-enough struct timeval.tv_sec member... " >&6; } | |
17629 | if test "${gl_cv_sys_struct_timeval_tv_sec+set}" = set; then : | |
17630 | $as_echo_n "(cached) " >&6 | |
17631 | else | |
17632 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
17633 | /* end confdefs.h. */ | |
17634 | #if HAVE_SYS_TIME_H | |
17635 | #include <sys/time.h> | |
17636 | #endif | |
17637 | #include <time.h> | |
17638 | #if HAVE_WINSOCK2_H | |
17639 | # include <winsock2.h> | |
17640 | #endif | |
f199cab1 | 17641 | |
5476a9a4 GM |
17642 | int |
17643 | main () | |
17644 | { | |
17645 | static struct timeval x; | |
17646 | typedef int verify_tv_sec_type[ | |
17647 | sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1 | |
17648 | ]; | |
f199cab1 | 17649 | |
5476a9a4 GM |
17650 | ; |
17651 | return 0; | |
17652 | } | |
17653 | _ACEOF | |
17654 | if ac_fn_c_try_compile "$LINENO"; then : | |
17655 | gl_cv_sys_struct_timeval_tv_sec=yes | |
17656 | else | |
17657 | gl_cv_sys_struct_timeval_tv_sec=no | |
17658 | fi | |
17659 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
f199cab1 | 17660 | |
5476a9a4 GM |
17661 | fi |
17662 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5 | |
17663 | $as_echo "$gl_cv_sys_struct_timeval_tv_sec" >&6; } | |
17664 | if test $gl_cv_sys_struct_timeval_tv_sec != yes; then | |
17665 | REPLACE_STRUCT_TIMEVAL=1 | |
17666 | fi | |
17667 | fi | |
f199cab1 | 17668 | |
f199cab1 GM |
17669 | |
17670 | ||
17671 | ||
17672 | ||
17673 | ||
f199cab1 | 17674 | |
5476a9a4 GM |
17675 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5 |
17676 | $as_echo_n "checking for unsigned long long int... " >&6; } | |
17677 | if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then : | |
17678 | $as_echo_n "(cached) " >&6 | |
17679 | else | |
17680 | ac_cv_type_unsigned_long_long_int=yes | |
17681 | if test "x${ac_cv_prog_cc_c99-no}" = xno; then | |
17682 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
17683 | /* end confdefs.h. */ | |
f199cab1 | 17684 | |
5476a9a4 GM |
17685 | /* For now, do not test the preprocessor; as of 2007 there are too many |
17686 | implementations with broken preprocessors. Perhaps this can | |
17687 | be revisited in 2012. In the meantime, code should not expect | |
17688 | #if to work with literals wider than 32 bits. */ | |
17689 | /* Test literals. */ | |
17690 | long long int ll = 9223372036854775807ll; | |
17691 | long long int nll = -9223372036854775807LL; | |
17692 | unsigned long long int ull = 18446744073709551615ULL; | |
17693 | /* Test constant expressions. */ | |
17694 | typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) | |
17695 | ? 1 : -1)]; | |
17696 | typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 | |
17697 | ? 1 : -1)]; | |
17698 | int i = 63; | |
17699 | int | |
17700 | main () | |
17701 | { | |
17702 | /* Test availability of runtime routines for shift and division. */ | |
17703 | long long int llmax = 9223372036854775807ll; | |
17704 | unsigned long long int ullmax = 18446744073709551615ull; | |
17705 | return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) | |
17706 | | (llmax / ll) | (llmax % ll) | |
17707 | | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) | |
17708 | | (ullmax / ull) | (ullmax % ull)); | |
17709 | ; | |
17710 | return 0; | |
17711 | } | |
f199cab1 | 17712 | |
e275c824 | 17713 | _ACEOF |
5476a9a4 | 17714 | if ac_fn_c_try_link "$LINENO"; then : |
3e0be4ab | 17715 | |
5476a9a4 GM |
17716 | else |
17717 | ac_cv_type_unsigned_long_long_int=no | |
e275c824 | 17718 | fi |
5476a9a4 GM |
17719 | rm -f core conftest.err conftest.$ac_objext \ |
17720 | conftest$ac_exeext conftest.$ac_ext | |
17721 | fi | |
17722 | fi | |
17723 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5 | |
17724 | $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; } | |
17725 | if test $ac_cv_type_unsigned_long_long_int = yes; then | |
e275c824 | 17726 | |
5476a9a4 | 17727 | $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h |
e275c824 | 17728 | |
5476a9a4 | 17729 | fi |
e275c824 PE |
17730 | |
17731 | ||
f199cab1 | 17732 | |
5476a9a4 GM |
17733 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5 |
17734 | $as_echo_n "checking for long long int... " >&6; } | |
17735 | if test "${ac_cv_type_long_long_int+set}" = set; then : | |
17736 | $as_echo_n "(cached) " >&6 | |
17737 | else | |
17738 | ac_cv_type_long_long_int=yes | |
17739 | if test "x${ac_cv_prog_cc_c99-no}" = xno; then | |
17740 | ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int | |
17741 | if test $ac_cv_type_long_long_int = yes; then | |
17742 | if test "$cross_compiling" = yes; then : | |
f199cab1 | 17743 | : |
5476a9a4 GM |
17744 | else |
17745 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
17746 | /* end confdefs.h. */ | |
17747 | #include <limits.h> | |
17748 | #ifndef LLONG_MAX | |
17749 | # define HALF \ | |
17750 | (1LL << (sizeof (long long int) * CHAR_BIT - 2)) | |
17751 | # define LLONG_MAX (HALF - 1 + HALF) | |
17752 | #endif | |
17753 | int | |
17754 | main () | |
17755 | { | |
17756 | long long int n = 1; | |
17757 | int i; | |
17758 | for (i = 0; ; i++) | |
17759 | { | |
17760 | long long int m = n << i; | |
17761 | if (m >> i != n) | |
17762 | return 1; | |
17763 | if (LLONG_MAX / 2 < m) | |
17764 | break; | |
17765 | } | |
17766 | return 0; | |
17767 | ; | |
17768 | return 0; | |
17769 | } | |
17770 | _ACEOF | |
17771 | if ac_fn_c_try_run "$LINENO"; then : | |
17772 | ||
17773 | else | |
17774 | ac_cv_type_long_long_int=no | |
17775 | fi | |
17776 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
17777 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
17778 | fi | |
e275c824 | 17779 | |
5476a9a4 GM |
17780 | fi |
17781 | fi | |
1f5d53eb | 17782 | fi |
5476a9a4 GM |
17783 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5 |
17784 | $as_echo "$ac_cv_type_long_long_int" >&6; } | |
17785 | if test $ac_cv_type_long_long_int = yes; then | |
e275c824 | 17786 | |
5476a9a4 | 17787 | $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h |
e275c824 | 17788 | |
5476a9a4 | 17789 | fi |
e275c824 PE |
17790 | |
17791 | ||
e275c824 PE |
17792 | |
17793 | ||
17794 | ||
17795 | ||
5476a9a4 GM |
17796 | gl_cv_c_multiarch=no |
17797 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
17798 | /* end confdefs.h. */ | |
17799 | #ifndef __APPLE_CC__ | |
17800 | not a universal capable compiler | |
17801 | #endif | |
17802 | typedef int dummy; | |
e275c824 | 17803 | |
5476a9a4 GM |
17804 | _ACEOF |
17805 | if ac_fn_c_try_compile "$LINENO"; then : | |
e275c824 | 17806 | |
5476a9a4 GM |
17807 | arch= |
17808 | prev= | |
17809 | for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do | |
17810 | if test -n "$prev"; then | |
17811 | case $word in | |
17812 | i?86 | x86_64 | ppc | ppc64) | |
17813 | if test -z "$arch" || test "$arch" = "$word"; then | |
17814 | arch="$word" | |
17815 | else | |
17816 | gl_cv_c_multiarch=yes | |
17817 | fi | |
17818 | ;; | |
17819 | esac | |
17820 | prev= | |
17821 | else | |
17822 | if test "x$word" = "x-arch"; then | |
17823 | prev=arch | |
17824 | fi | |
17825 | fi | |
17826 | done | |
f199cab1 | 17827 | |
f199cab1 | 17828 | fi |
5476a9a4 GM |
17829 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
17830 | if test $gl_cv_c_multiarch = yes; then | |
17831 | APPLE_UNIVERSAL_BUILD=1 | |
17832 | else | |
17833 | APPLE_UNIVERSAL_BUILD=0 | |
17834 | fi | |
e275c824 PE |
17835 | |
17836 | ||
67342916 | 17837 | |
67342916 | 17838 | |
67342916 | 17839 | |
5476a9a4 GM |
17840 | if test $ac_cv_type_long_long_int = yes; then |
17841 | HAVE_LONG_LONG_INT=1 | |
17842 | else | |
17843 | HAVE_LONG_LONG_INT=0 | |
17844 | fi | |
e275c824 | 17845 | |
e275c824 | 17846 | |
5476a9a4 GM |
17847 | if test $ac_cv_type_unsigned_long_long_int = yes; then |
17848 | HAVE_UNSIGNED_LONG_LONG_INT=1 | |
17849 | else | |
17850 | HAVE_UNSIGNED_LONG_LONG_INT=0 | |
17851 | fi | |
e275c824 PE |
17852 | |
17853 | ||
17854 | ||
5476a9a4 GM |
17855 | if test $ac_cv_header_wchar_h = yes; then |
17856 | HAVE_WCHAR_H=1 | |
17857 | else | |
17858 | HAVE_WCHAR_H=0 | |
17859 | fi | |
e275c824 | 17860 | |
e275c824 | 17861 | |
5476a9a4 GM |
17862 | if test $ac_cv_header_inttypes_h = yes; then |
17863 | HAVE_INTTYPES_H=1 | |
17864 | else | |
17865 | HAVE_INTTYPES_H=0 | |
17866 | fi | |
6c051bab | 17867 | |
942f733f | 17868 | |
5476a9a4 GM |
17869 | if test $ac_cv_header_sys_types_h = yes; then |
17870 | HAVE_SYS_TYPES_H=1 | |
17871 | else | |
17872 | HAVE_SYS_TYPES_H=0 | |
17873 | fi | |
4fc2b746 | 17874 | |
4fc2b746 | 17875 | |
f199cab1 GM |
17876 | |
17877 | ||
17878 | ||
17879 | ||
17880 | ||
17881 | ||
17882 | ||
17883 | ||
17884 | ||
5476a9a4 GM |
17885 | if test $gl_cv_have_include_next = yes; then |
17886 | gl_cv_next_stdint_h='<'stdint.h'>' | |
17887 | else | |
17888 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5 | |
17889 | $as_echo_n "checking absolute name of <stdint.h>... " >&6; } | |
17890 | if test "${gl_cv_next_stdint_h+set}" = set; then : | |
17891 | $as_echo_n "(cached) " >&6 | |
17892 | else | |
f199cab1 | 17893 | |
5476a9a4 | 17894 | if test $ac_cv_header_stdint_h = yes; then |
f199cab1 GM |
17895 | |
17896 | ||
5476a9a4 GM |
17897 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
17898 | /* end confdefs.h. */ | |
17899 | #include <stdint.h> | |
f199cab1 | 17900 | |
5476a9a4 GM |
17901 | _ACEOF |
17902 | case "$host_os" in | |
17903 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
17904 | *) gl_absname_cpp="$ac_cpp" ;; | |
17905 | esac | |
f199cab1 | 17906 | |
5476a9a4 GM |
17907 | case "$host_os" in |
17908 | mingw*) | |
17909 | gl_dirsep_regex='[/\\]' | |
17910 | ;; | |
17911 | *) | |
17912 | gl_dirsep_regex='\/' | |
17913 | ;; | |
17914 | esac | |
17915 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
4fc2b746 | 17916 | |
5476a9a4 GM |
17917 | gl_header_literal_regex=`echo 'stdint.h' \ |
17918 | | sed -e "$gl_make_literal_regex_sed"` | |
17919 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
17920 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
17921 | s|^/[^/]|//&| | |
17922 | p | |
17923 | q | |
17924 | }' | |
17925 | gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
17926 | sed -n "$gl_absolute_header_sed"`'"' | |
17927 | else | |
17928 | gl_cv_next_stdint_h='<'stdint.h'>' | |
17929 | fi | |
4fc2b746 | 17930 | |
4fc2b746 | 17931 | |
5476a9a4 GM |
17932 | fi |
17933 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5 | |
17934 | $as_echo "$gl_cv_next_stdint_h" >&6; } | |
17935 | fi | |
17936 | NEXT_STDINT_H=$gl_cv_next_stdint_h | |
b0415a03 | 17937 | |
5476a9a4 GM |
17938 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then |
17939 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
17940 | gl_next_as_first_directive='<'stdint.h'>' | |
17941 | else | |
17942 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
17943 | gl_next_as_first_directive=$gl_cv_next_stdint_h | |
17944 | fi | |
17945 | NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive | |
b0415a03 | 17946 | |
4fc2b746 | 17947 | |
f199cab1 | 17948 | |
f199cab1 | 17949 | |
5476a9a4 GM |
17950 | if test $ac_cv_header_stdint_h = yes; then |
17951 | HAVE_STDINT_H=1 | |
17952 | else | |
17953 | HAVE_STDINT_H=0 | |
17954 | fi | |
f199cab1 GM |
17955 | |
17956 | ||
5476a9a4 GM |
17957 | if test $ac_cv_header_stdint_h = yes; then |
17958 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5 | |
17959 | $as_echo_n "checking whether stdint.h conforms to C99... " >&6; } | |
17960 | if test "${gl_cv_header_working_stdint_h+set}" = set; then : | |
f199cab1 GM |
17961 | $as_echo_n "(cached) " >&6 |
17962 | else | |
5476a9a4 GM |
17963 | gl_cv_header_working_stdint_h=no |
17964 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
17965 | /* end confdefs.h. */ | |
4fc2b746 GM |
17966 | |
17967 | ||
5476a9a4 GM |
17968 | #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ |
17969 | #include <stdint.h> | |
17970 | /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */ | |
17971 | #if !(defined WCHAR_MIN && defined WCHAR_MAX) | |
17972 | #error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>" | |
17973 | #endif | |
4fc2b746 | 17974 | |
942f733f | 17975 | |
5476a9a4 GM |
17976 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be |
17977 | included before <wchar.h>. */ | |
17978 | #include <stddef.h> | |
17979 | #include <signal.h> | |
17980 | #if HAVE_WCHAR_H | |
17981 | # include <stdio.h> | |
17982 | # include <time.h> | |
17983 | # include <wchar.h> | |
17984 | #endif | |
e275c824 | 17985 | |
f199cab1 | 17986 | |
5476a9a4 GM |
17987 | #ifdef INT8_MAX |
17988 | int8_t a1 = INT8_MAX; | |
17989 | int8_t a1min = INT8_MIN; | |
17990 | #endif | |
17991 | #ifdef INT16_MAX | |
17992 | int16_t a2 = INT16_MAX; | |
17993 | int16_t a2min = INT16_MIN; | |
17994 | #endif | |
17995 | #ifdef INT32_MAX | |
17996 | int32_t a3 = INT32_MAX; | |
17997 | int32_t a3min = INT32_MIN; | |
17998 | #endif | |
17999 | #ifdef INT64_MAX | |
18000 | int64_t a4 = INT64_MAX; | |
18001 | int64_t a4min = INT64_MIN; | |
18002 | #endif | |
18003 | #ifdef UINT8_MAX | |
18004 | uint8_t b1 = UINT8_MAX; | |
18005 | #else | |
18006 | typedef int b1[(unsigned char) -1 != 255 ? 1 : -1]; | |
18007 | #endif | |
18008 | #ifdef UINT16_MAX | |
18009 | uint16_t b2 = UINT16_MAX; | |
18010 | #endif | |
18011 | #ifdef UINT32_MAX | |
18012 | uint32_t b3 = UINT32_MAX; | |
18013 | #endif | |
18014 | #ifdef UINT64_MAX | |
18015 | uint64_t b4 = UINT64_MAX; | |
18016 | #endif | |
18017 | int_least8_t c1 = INT8_C (0x7f); | |
18018 | int_least8_t c1max = INT_LEAST8_MAX; | |
18019 | int_least8_t c1min = INT_LEAST8_MIN; | |
18020 | int_least16_t c2 = INT16_C (0x7fff); | |
18021 | int_least16_t c2max = INT_LEAST16_MAX; | |
18022 | int_least16_t c2min = INT_LEAST16_MIN; | |
18023 | int_least32_t c3 = INT32_C (0x7fffffff); | |
18024 | int_least32_t c3max = INT_LEAST32_MAX; | |
18025 | int_least32_t c3min = INT_LEAST32_MIN; | |
18026 | int_least64_t c4 = INT64_C (0x7fffffffffffffff); | |
18027 | int_least64_t c4max = INT_LEAST64_MAX; | |
18028 | int_least64_t c4min = INT_LEAST64_MIN; | |
18029 | uint_least8_t d1 = UINT8_C (0xff); | |
18030 | uint_least8_t d1max = UINT_LEAST8_MAX; | |
18031 | uint_least16_t d2 = UINT16_C (0xffff); | |
18032 | uint_least16_t d2max = UINT_LEAST16_MAX; | |
18033 | uint_least32_t d3 = UINT32_C (0xffffffff); | |
18034 | uint_least32_t d3max = UINT_LEAST32_MAX; | |
18035 | uint_least64_t d4 = UINT64_C (0xffffffffffffffff); | |
18036 | uint_least64_t d4max = UINT_LEAST64_MAX; | |
18037 | int_fast8_t e1 = INT_FAST8_MAX; | |
18038 | int_fast8_t e1min = INT_FAST8_MIN; | |
18039 | int_fast16_t e2 = INT_FAST16_MAX; | |
18040 | int_fast16_t e2min = INT_FAST16_MIN; | |
18041 | int_fast32_t e3 = INT_FAST32_MAX; | |
18042 | int_fast32_t e3min = INT_FAST32_MIN; | |
18043 | int_fast64_t e4 = INT_FAST64_MAX; | |
18044 | int_fast64_t e4min = INT_FAST64_MIN; | |
18045 | uint_fast8_t f1 = UINT_FAST8_MAX; | |
18046 | uint_fast16_t f2 = UINT_FAST16_MAX; | |
18047 | uint_fast32_t f3 = UINT_FAST32_MAX; | |
18048 | uint_fast64_t f4 = UINT_FAST64_MAX; | |
18049 | #ifdef INTPTR_MAX | |
18050 | intptr_t g = INTPTR_MAX; | |
18051 | intptr_t gmin = INTPTR_MIN; | |
18052 | #endif | |
18053 | #ifdef UINTPTR_MAX | |
18054 | uintptr_t h = UINTPTR_MAX; | |
18055 | #endif | |
18056 | intmax_t i = INTMAX_MAX; | |
18057 | uintmax_t j = UINTMAX_MAX; | |
5fa4ac76 | 18058 | |
5476a9a4 GM |
18059 | #include <limits.h> /* for CHAR_BIT */ |
18060 | #define TYPE_MINIMUM(t) \ | |
18061 | ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t))) | |
18062 | #define TYPE_MAXIMUM(t) \ | |
18063 | ((t) ((t) 0 < (t) -1 \ | |
18064 | ? (t) -1 \ | |
18065 | : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1))) | |
18066 | struct s { | |
18067 | int check_PTRDIFF: | |
18068 | PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t) | |
18069 | && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t) | |
18070 | ? 1 : -1; | |
18071 | /* Detect bug in FreeBSD 6.0 / ia64. */ | |
18072 | int check_SIG_ATOMIC: | |
18073 | SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t) | |
18074 | && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t) | |
18075 | ? 1 : -1; | |
18076 | int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1; | |
18077 | int check_WCHAR: | |
18078 | WCHAR_MIN == TYPE_MINIMUM (wchar_t) | |
18079 | && WCHAR_MAX == TYPE_MAXIMUM (wchar_t) | |
18080 | ? 1 : -1; | |
18081 | /* Detect bug in mingw. */ | |
18082 | int check_WINT: | |
18083 | WINT_MIN == TYPE_MINIMUM (wint_t) | |
18084 | && WINT_MAX == TYPE_MAXIMUM (wint_t) | |
18085 | ? 1 : -1; | |
5fa4ac76 | 18086 | |
5476a9a4 GM |
18087 | /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */ |
18088 | int check_UINT8_C: | |
18089 | (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1; | |
18090 | int check_UINT16_C: | |
18091 | (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1; | |
18092 | ||
18093 | /* Detect bugs in OpenBSD 3.9 stdint.h. */ | |
18094 | #ifdef UINT8_MAX | |
18095 | int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1; | |
3e0be4ab | 18096 | #endif |
5476a9a4 GM |
18097 | #ifdef UINT16_MAX |
18098 | int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1; | |
18099 | #endif | |
18100 | #ifdef UINT32_MAX | |
18101 | int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1; | |
18102 | #endif | |
18103 | #ifdef UINT64_MAX | |
18104 | int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1; | |
18105 | #endif | |
18106 | int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1; | |
18107 | int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1; | |
18108 | int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1; | |
18109 | int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1; | |
18110 | int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1; | |
18111 | int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1; | |
18112 | int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1; | |
18113 | int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1; | |
18114 | int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1; | |
18115 | int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1; | |
18116 | int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1; | |
18117 | }; | |
18118 | ||
f199cab1 GM |
18119 | int |
18120 | main () | |
18121 | { | |
5476a9a4 | 18122 | |
f199cab1 GM |
18123 | ; |
18124 | return 0; | |
18125 | } | |
18126 | _ACEOF | |
5476a9a4 GM |
18127 | if ac_fn_c_try_compile "$LINENO"; then : |
18128 | if test "$cross_compiling" = yes; then : | |
18129 | gl_cv_header_working_stdint_h=yes | |
40e27e7f | 18130 | |
5476a9a4 GM |
18131 | else |
18132 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
18133 | /* end confdefs.h. */ | |
40e27e7f | 18134 | |
f199cab1 | 18135 | |
5476a9a4 GM |
18136 | #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ |
18137 | #include <stdint.h> | |
f199cab1 GM |
18138 | |
18139 | ||
5476a9a4 GM |
18140 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be |
18141 | included before <wchar.h>. */ | |
18142 | #include <stddef.h> | |
18143 | #include <signal.h> | |
18144 | #if HAVE_WCHAR_H | |
18145 | # include <stdio.h> | |
18146 | # include <time.h> | |
18147 | # include <wchar.h> | |
18148 | #endif | |
f199cab1 | 18149 | |
d87ffdb7 | 18150 | |
5476a9a4 GM |
18151 | #include <stdio.h> |
18152 | #include <string.h> | |
18153 | #define MVAL(macro) MVAL1(macro) | |
18154 | #define MVAL1(expression) #expression | |
18155 | static const char *macro_values[] = | |
18156 | { | |
18157 | #ifdef INT8_MAX | |
18158 | MVAL (INT8_MAX), | |
18159 | #endif | |
18160 | #ifdef INT16_MAX | |
18161 | MVAL (INT16_MAX), | |
18162 | #endif | |
18163 | #ifdef INT32_MAX | |
18164 | MVAL (INT32_MAX), | |
18165 | #endif | |
18166 | #ifdef INT64_MAX | |
18167 | MVAL (INT64_MAX), | |
18168 | #endif | |
18169 | #ifdef UINT8_MAX | |
18170 | MVAL (UINT8_MAX), | |
18171 | #endif | |
18172 | #ifdef UINT16_MAX | |
18173 | MVAL (UINT16_MAX), | |
18174 | #endif | |
18175 | #ifdef UINT32_MAX | |
18176 | MVAL (UINT32_MAX), | |
18177 | #endif | |
18178 | #ifdef UINT64_MAX | |
18179 | MVAL (UINT64_MAX), | |
18180 | #endif | |
18181 | NULL | |
18182 | }; | |
f199cab1 | 18183 | |
3e0be4ab GM |
18184 | int |
18185 | main () | |
18186 | { | |
5476a9a4 GM |
18187 | |
18188 | const char **mv; | |
18189 | for (mv = macro_values; *mv != NULL; mv++) | |
18190 | { | |
18191 | const char *value = *mv; | |
18192 | /* Test whether it looks like a cast expression. */ | |
18193 | if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0 | |
18194 | || strncmp (value, "((unsigned short)"/*)*/, 17) == 0 | |
18195 | || strncmp (value, "((unsigned char)"/*)*/, 16) == 0 | |
18196 | || strncmp (value, "((int)"/*)*/, 6) == 0 | |
18197 | || strncmp (value, "((signed short)"/*)*/, 15) == 0 | |
18198 | || strncmp (value, "((signed char)"/*)*/, 14) == 0) | |
18199 | return mv - macro_values + 1; | |
18200 | } | |
3e0be4ab | 18201 | return 0; |
5476a9a4 | 18202 | |
f199cab1 GM |
18203 | ; |
18204 | return 0; | |
18205 | } | |
18206 | _ACEOF | |
5476a9a4 GM |
18207 | if ac_fn_c_try_run "$LINENO"; then : |
18208 | gl_cv_header_working_stdint_h=yes | |
f199cab1 | 18209 | fi |
5476a9a4 GM |
18210 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
18211 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
f199cab1 GM |
18212 | fi |
18213 | ||
d87ffdb7 | 18214 | |
5476a9a4 GM |
18215 | fi |
18216 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
d87ffdb7 | 18217 | |
5476a9a4 GM |
18218 | fi |
18219 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5 | |
18220 | $as_echo "$gl_cv_header_working_stdint_h" >&6; } | |
18221 | fi | |
18222 | if test "$gl_cv_header_working_stdint_h" = yes; then | |
18223 | STDINT_H= | |
18224 | else | |
18225 | for ac_header in sys/inttypes.h sys/bitypes.h | |
18226 | do : | |
18227 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
18228 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
18229 | eval as_val=\$$as_ac_Header | |
18230 | if test "x$as_val" = x""yes; then : | |
18231 | cat >>confdefs.h <<_ACEOF | |
18232 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
18233 | _ACEOF | |
d87ffdb7 | 18234 | |
5476a9a4 | 18235 | fi |
d87ffdb7 | 18236 | |
5476a9a4 | 18237 | done |
7d2a1c5e | 18238 | |
5476a9a4 GM |
18239 | if test $ac_cv_header_sys_inttypes_h = yes; then |
18240 | HAVE_SYS_INTTYPES_H=1 | |
18241 | else | |
18242 | HAVE_SYS_INTTYPES_H=0 | |
18243 | fi | |
7d2a1c5e | 18244 | |
5476a9a4 GM |
18245 | if test $ac_cv_header_sys_bitypes_h = yes; then |
18246 | HAVE_SYS_BITYPES_H=1 | |
18247 | else | |
18248 | HAVE_SYS_BITYPES_H=0 | |
18249 | fi | |
7d2a1c5e | 18250 | |
f199cab1 GM |
18251 | |
18252 | ||
18253 | ||
5476a9a4 | 18254 | if test $APPLE_UNIVERSAL_BUILD = 0; then |
f199cab1 GM |
18255 | |
18256 | ||
5476a9a4 GM |
18257 | for gltype in ptrdiff_t size_t ; do |
18258 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5 | |
18259 | $as_echo_n "checking for bit size of $gltype... " >&6; } | |
18260 | if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then : | |
18261 | $as_echo_n "(cached) " >&6 | |
18262 | else | |
18263 | if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" " | |
18264 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
18265 | included before <wchar.h>. */ | |
18266 | #include <stddef.h> | |
18267 | #include <signal.h> | |
18268 | #if HAVE_WCHAR_H | |
18269 | # include <stdio.h> | |
18270 | # include <time.h> | |
18271 | # include <wchar.h> | |
18272 | #endif | |
f199cab1 | 18273 | |
5476a9a4 | 18274 | #include <limits.h>"; then : |
f199cab1 | 18275 | |
5476a9a4 GM |
18276 | else |
18277 | result=unknown | |
18278 | fi | |
f199cab1 | 18279 | |
5476a9a4 | 18280 | eval gl_cv_bitsizeof_${gltype}=\$result |
f199cab1 | 18281 | |
5476a9a4 GM |
18282 | fi |
18283 | eval ac_res=\$gl_cv_bitsizeof_${gltype} | |
18284 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
18285 | $as_echo "$ac_res" >&6; } | |
18286 | eval result=\$gl_cv_bitsizeof_${gltype} | |
18287 | if test $result = unknown; then | |
18288 | result=0 | |
18289 | fi | |
18290 | GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` | |
18291 | cat >>confdefs.h <<_ACEOF | |
18292 | #define BITSIZEOF_${GLTYPE} $result | |
18293 | _ACEOF | |
f199cab1 | 18294 | |
5476a9a4 GM |
18295 | eval BITSIZEOF_${GLTYPE}=\$result |
18296 | done | |
f199cab1 GM |
18297 | |
18298 | ||
5476a9a4 | 18299 | fi |
f199cab1 GM |
18300 | |
18301 | ||
5476a9a4 GM |
18302 | for gltype in sig_atomic_t wchar_t wint_t ; do |
18303 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5 | |
18304 | $as_echo_n "checking for bit size of $gltype... " >&6; } | |
18305 | if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then : | |
18306 | $as_echo_n "(cached) " >&6 | |
18307 | else | |
18308 | if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" " | |
18309 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
18310 | included before <wchar.h>. */ | |
18311 | #include <stddef.h> | |
18312 | #include <signal.h> | |
18313 | #if HAVE_WCHAR_H | |
18314 | # include <stdio.h> | |
18315 | # include <time.h> | |
18316 | # include <wchar.h> | |
18317 | #endif | |
f199cab1 | 18318 | |
5476a9a4 | 18319 | #include <limits.h>"; then : |
f199cab1 | 18320 | |
f199cab1 | 18321 | else |
5476a9a4 | 18322 | result=unknown |
7d2a1c5e | 18323 | fi |
7d2a1c5e | 18324 | |
5476a9a4 | 18325 | eval gl_cv_bitsizeof_${gltype}=\$result |
7d2a1c5e | 18326 | |
3e0be4ab | 18327 | fi |
5476a9a4 GM |
18328 | eval ac_res=\$gl_cv_bitsizeof_${gltype} |
18329 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
18330 | $as_echo "$ac_res" >&6; } | |
18331 | eval result=\$gl_cv_bitsizeof_${gltype} | |
18332 | if test $result = unknown; then | |
18333 | result=0 | |
18334 | fi | |
18335 | GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` | |
18336 | cat >>confdefs.h <<_ACEOF | |
18337 | #define BITSIZEOF_${GLTYPE} $result | |
3e0be4ab | 18338 | _ACEOF |
7d2a1c5e | 18339 | |
5476a9a4 GM |
18340 | eval BITSIZEOF_${GLTYPE}=\$result |
18341 | done | |
7d2a1c5e GM |
18342 | |
18343 | ||
5476a9a4 GM |
18344 | |
18345 | ||
18346 | for gltype in sig_atomic_t wchar_t wint_t ; do | |
18347 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5 | |
18348 | $as_echo_n "checking whether $gltype is signed... " >&6; } | |
18349 | if { as_var=gl_cv_type_${gltype}_signed; eval "test \"\${$as_var+set}\" = set"; }; then : | |
3e0be4ab GM |
18350 | $as_echo_n "(cached) " >&6 |
18351 | else | |
f199cab1 GM |
18352 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
18353 | /* end confdefs.h. */ | |
f199cab1 | 18354 | |
5476a9a4 GM |
18355 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be |
18356 | included before <wchar.h>. */ | |
18357 | #include <stddef.h> | |
18358 | #include <signal.h> | |
18359 | #if HAVE_WCHAR_H | |
18360 | # include <stdio.h> | |
18361 | # include <time.h> | |
18362 | # include <wchar.h> | |
18363 | #endif | |
18364 | ||
18365 | int verify[2 * (($gltype) -1 < ($gltype) 0) - 1]; | |
f199cab1 GM |
18366 | int |
18367 | main () | |
18368 | { | |
5476a9a4 | 18369 | |
f199cab1 GM |
18370 | ; |
18371 | return 0; | |
18372 | } | |
18373 | _ACEOF | |
18374 | if ac_fn_c_try_compile "$LINENO"; then : | |
5476a9a4 | 18375 | result=yes |
f199cab1 | 18376 | else |
5476a9a4 | 18377 | result=no |
f199cab1 GM |
18378 | fi |
18379 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5476a9a4 | 18380 | eval gl_cv_type_${gltype}_signed=\$result |
7d2a1c5e | 18381 | |
3e0be4ab | 18382 | fi |
5476a9a4 GM |
18383 | eval ac_res=\$gl_cv_type_${gltype}_signed |
18384 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
18385 | $as_echo "$ac_res" >&6; } | |
18386 | eval result=\$gl_cv_type_${gltype}_signed | |
18387 | GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` | |
18388 | if test "$result" = yes; then | |
18389 | cat >>confdefs.h <<_ACEOF | |
18390 | #define HAVE_SIGNED_${GLTYPE} 1 | |
f199cab1 | 18391 | _ACEOF |
d87ffdb7 | 18392 | |
5476a9a4 GM |
18393 | eval HAVE_SIGNED_${GLTYPE}=1 |
18394 | else | |
18395 | eval HAVE_SIGNED_${GLTYPE}=0 | |
18396 | fi | |
18397 | done | |
f199cab1 | 18398 | |
e275c824 | 18399 | |
5476a9a4 GM |
18400 | gl_cv_type_ptrdiff_t_signed=yes |
18401 | gl_cv_type_size_t_signed=no | |
18402 | if test $APPLE_UNIVERSAL_BUILD = 0; then | |
e275c824 | 18403 | |
e275c824 | 18404 | |
5476a9a4 GM |
18405 | for gltype in ptrdiff_t size_t ; do |
18406 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5 | |
18407 | $as_echo_n "checking for $gltype integer literal suffix... " >&6; } | |
18408 | if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then : | |
16c3e636 PE |
18409 | $as_echo_n "(cached) " >&6 |
18410 | else | |
5476a9a4 GM |
18411 | eval gl_cv_type_${gltype}_suffix=no |
18412 | eval result=\$gl_cv_type_${gltype}_signed | |
18413 | if test "$result" = yes; then | |
18414 | glsufu= | |
18415 | else | |
18416 | glsufu=u | |
18417 | fi | |
18418 | for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do | |
18419 | case $glsuf in | |
18420 | '') gltype1='int';; | |
18421 | l) gltype1='long int';; | |
18422 | ll) gltype1='long long int';; | |
18423 | i64) gltype1='__int64';; | |
18424 | u) gltype1='unsigned int';; | |
18425 | ul) gltype1='unsigned long int';; | |
18426 | ull) gltype1='unsigned long long int';; | |
18427 | ui64)gltype1='unsigned __int64';; | |
18428 | esac | |
18429 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
f199cab1 | 18430 | /* end confdefs.h. */ |
16c3e636 | 18431 | |
5476a9a4 GM |
18432 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be |
18433 | included before <wchar.h>. */ | |
18434 | #include <stddef.h> | |
18435 | #include <signal.h> | |
18436 | #if HAVE_WCHAR_H | |
18437 | # include <stdio.h> | |
18438 | # include <time.h> | |
18439 | # include <wchar.h> | |
18440 | #endif | |
1f5d53eb | 18441 | |
5476a9a4 GM |
18442 | extern $gltype foo; |
18443 | extern $gltype1 foo; | |
f199cab1 GM |
18444 | int |
18445 | main () | |
18446 | { | |
5476a9a4 | 18447 | |
f199cab1 GM |
18448 | ; |
18449 | return 0; | |
18450 | } | |
18451 | _ACEOF | |
18452 | if ac_fn_c_try_compile "$LINENO"; then : | |
5476a9a4 | 18453 | eval gl_cv_type_${gltype}_suffix=\$glsuf |
f199cab1 GM |
18454 | fi |
18455 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5476a9a4 GM |
18456 | eval result=\$gl_cv_type_${gltype}_suffix |
18457 | test "$result" != no && break | |
18458 | done | |
f199cab1 | 18459 | fi |
5476a9a4 GM |
18460 | eval ac_res=\$gl_cv_type_${gltype}_suffix |
18461 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
18462 | $as_echo "$ac_res" >&6; } | |
18463 | GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` | |
18464 | eval result=\$gl_cv_type_${gltype}_suffix | |
18465 | test "$result" = no && result= | |
18466 | eval ${GLTYPE}_SUFFIX=\$result | |
18467 | cat >>confdefs.h <<_ACEOF | |
18468 | #define ${GLTYPE}_SUFFIX $result | |
18469 | _ACEOF | |
16c3e636 | 18470 | |
5476a9a4 | 18471 | done |
16c3e636 | 18472 | |
3e0be4ab | 18473 | |
5476a9a4 GM |
18474 | fi |
18475 | ||
18476 | ||
18477 | for gltype in sig_atomic_t wchar_t wint_t ; do | |
18478 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5 | |
18479 | $as_echo_n "checking for $gltype integer literal suffix... " >&6; } | |
18480 | if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then : | |
1fd182f0 PE |
18481 | $as_echo_n "(cached) " >&6 |
18482 | else | |
5476a9a4 GM |
18483 | eval gl_cv_type_${gltype}_suffix=no |
18484 | eval result=\$gl_cv_type_${gltype}_signed | |
18485 | if test "$result" = yes; then | |
18486 | glsufu= | |
18487 | else | |
18488 | glsufu=u | |
18489 | fi | |
18490 | for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do | |
18491 | case $glsuf in | |
18492 | '') gltype1='int';; | |
18493 | l) gltype1='long int';; | |
18494 | ll) gltype1='long long int';; | |
18495 | i64) gltype1='__int64';; | |
18496 | u) gltype1='unsigned int';; | |
18497 | ul) gltype1='unsigned long int';; | |
18498 | ull) gltype1='unsigned long long int';; | |
18499 | ui64)gltype1='unsigned __int64';; | |
18500 | esac | |
18501 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1fd182f0 | 18502 | /* end confdefs.h. */ |
5476a9a4 GM |
18503 | |
18504 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
18505 | included before <wchar.h>. */ | |
18506 | #include <stddef.h> | |
18507 | #include <signal.h> | |
18508 | #if HAVE_WCHAR_H | |
18509 | # include <stdio.h> | |
18510 | # include <time.h> | |
18511 | # include <wchar.h> | |
18512 | #endif | |
18513 | ||
18514 | extern $gltype foo; | |
18515 | extern $gltype1 foo; | |
1fd182f0 PE |
18516 | int |
18517 | main () | |
18518 | { | |
5476a9a4 | 18519 | |
1fd182f0 PE |
18520 | ; |
18521 | return 0; | |
18522 | } | |
18523 | _ACEOF | |
3e0be4ab | 18524 | if ac_fn_c_try_compile "$LINENO"; then : |
5476a9a4 | 18525 | eval gl_cv_type_${gltype}_suffix=\$glsuf |
1f5d53eb | 18526 | fi |
3e0be4ab | 18527 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5476a9a4 GM |
18528 | eval result=\$gl_cv_type_${gltype}_suffix |
18529 | test "$result" != no && break | |
18530 | done | |
f199cab1 | 18531 | fi |
5476a9a4 GM |
18532 | eval ac_res=\$gl_cv_type_${gltype}_suffix |
18533 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
18534 | $as_echo "$ac_res" >&6; } | |
18535 | GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` | |
18536 | eval result=\$gl_cv_type_${gltype}_suffix | |
18537 | test "$result" = no && result= | |
18538 | eval ${GLTYPE}_SUFFIX=\$result | |
18539 | cat >>confdefs.h <<_ACEOF | |
18540 | #define ${GLTYPE}_SUFFIX $result | |
f199cab1 GM |
18541 | _ACEOF |
18542 | ||
5476a9a4 | 18543 | done |
f199cab1 | 18544 | |
f199cab1 | 18545 | |
f199cab1 | 18546 | |
5476a9a4 GM |
18547 | if test $BITSIZEOF_WINT_T -lt 32; then |
18548 | BITSIZEOF_WINT_T=32 | |
18549 | fi | |
f199cab1 | 18550 | |
5476a9a4 GM |
18551 | STDINT_H=stdint.h |
18552 | fi | |
f199cab1 | 18553 | |
5476a9a4 GM |
18554 | if test -n "$STDINT_H"; then |
18555 | GL_GENERATE_STDINT_H_TRUE= | |
18556 | GL_GENERATE_STDINT_H_FALSE='#' | |
18557 | else | |
18558 | GL_GENERATE_STDINT_H_TRUE='#' | |
18559 | GL_GENERATE_STDINT_H_FALSE= | |
f199cab1 GM |
18560 | fi |
18561 | ||
f199cab1 | 18562 | |
f199cab1 | 18563 | |
3e0be4ab | 18564 | |
f199cab1 | 18565 | |
5476a9a4 GM |
18566 | GNULIB_IMAXABS=0; |
18567 | GNULIB_IMAXDIV=0; | |
18568 | GNULIB_STRTOIMAX=0; | |
18569 | GNULIB_STRTOUMAX=0; | |
18570 | HAVE_DECL_IMAXABS=1; | |
18571 | HAVE_DECL_IMAXDIV=1; | |
18572 | HAVE_DECL_STRTOIMAX=1; | |
18573 | HAVE_DECL_STRTOUMAX=1; | |
18574 | REPLACE_STRTOIMAX=0; | |
18575 | INT32_MAX_LT_INTMAX_MAX=1; | |
18576 | INT64_MAX_EQ_LONG_MAX='defined _LP64'; | |
18577 | PRI_MACROS_BROKEN=0; | |
18578 | PRIPTR_PREFIX=__PRIPTR_PREFIX; | |
18579 | UINT32_MAX_LT_UINTMAX_MAX=1; | |
18580 | UINT64_MAX_EQ_ULONG_MAX='defined _LP64'; | |
1fd182f0 | 18581 | |
1fd182f0 | 18582 | |
1f5d53eb | 18583 | |
3e0be4ab GM |
18584 | |
18585 | ||
1fd182f0 | 18586 | |
3e0be4ab | 18587 | |
3e0be4ab | 18588 | |
f199cab1 | 18589 | |
1fd182f0 | 18590 | |
1f5d53eb | 18591 | |
1f5d53eb | 18592 | |
1f5d53eb | 18593 | |
3e0be4ab | 18594 | |
3e0be4ab | 18595 | |
5476a9a4 GM |
18596 | if test $gl_cv_have_include_next = yes; then |
18597 | gl_cv_next_inttypes_h='<'inttypes.h'>' | |
18598 | else | |
18599 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5 | |
18600 | $as_echo_n "checking absolute name of <inttypes.h>... " >&6; } | |
18601 | if test "${gl_cv_next_inttypes_h+set}" = set; then : | |
18602 | $as_echo_n "(cached) " >&6 | |
f199cab1 | 18603 | else |
2b1928b8 | 18604 | |
5476a9a4 | 18605 | if test $ac_cv_header_inttypes_h = yes; then |
3e0be4ab GM |
18606 | |
18607 | ||
5476a9a4 | 18608 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
f199cab1 | 18609 | /* end confdefs.h. */ |
5476a9a4 | 18610 | #include <inttypes.h> |
3e0be4ab | 18611 | |
f199cab1 | 18612 | _ACEOF |
5476a9a4 GM |
18613 | case "$host_os" in |
18614 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
18615 | *) gl_absname_cpp="$ac_cpp" ;; | |
18616 | esac | |
1fd182f0 | 18617 | |
5476a9a4 GM |
18618 | case "$host_os" in |
18619 | mingw*) | |
18620 | gl_dirsep_regex='[/\\]' | |
18621 | ;; | |
18622 | *) | |
18623 | gl_dirsep_regex='\/' | |
18624 | ;; | |
18625 | esac | |
18626 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
1fd182f0 | 18627 | |
5476a9a4 GM |
18628 | gl_header_literal_regex=`echo 'inttypes.h' \ |
18629 | | sed -e "$gl_make_literal_regex_sed"` | |
18630 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
18631 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
18632 | s|^/[^/]|//&| | |
18633 | p | |
18634 | q | |
18635 | }' | |
18636 | gl_cv_next_inttypes_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
18637 | sed -n "$gl_absolute_header_sed"`'"' | |
18638 | else | |
18639 | gl_cv_next_inttypes_h='<'inttypes.h'>' | |
18640 | fi | |
1fd182f0 PE |
18641 | |
18642 | ||
5476a9a4 GM |
18643 | fi |
18644 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5 | |
18645 | $as_echo "$gl_cv_next_inttypes_h" >&6; } | |
18646 | fi | |
18647 | NEXT_INTTYPES_H=$gl_cv_next_inttypes_h | |
1fd182f0 | 18648 | |
5476a9a4 GM |
18649 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then |
18650 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
18651 | gl_next_as_first_directive='<'inttypes.h'>' | |
18652 | else | |
18653 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
18654 | gl_next_as_first_directive=$gl_cv_next_inttypes_h | |
18655 | fi | |
18656 | NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive | |
34119902 GM |
18657 | |
18658 | ||
3e0be4ab | 18659 | |
34119902 | 18660 | |
3e0be4ab | 18661 | |
34119902 | 18662 | |
b0415a03 | 18663 | |
b0415a03 | 18664 | |
3e0be4ab | 18665 | |
34119902 | 18666 | |
34119902 | 18667 | |
5476a9a4 GM |
18668 | case "$host_os" in |
18669 | mingw*) | |
18670 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5 | |
18671 | $as_echo_n "checking for 64-bit off_t... " >&6; } | |
18672 | if test "${gl_cv_type_off_t_64+set}" = set; then : | |
f199cab1 GM |
18673 | $as_echo_n "(cached) " >&6 |
18674 | else | |
5476a9a4 GM |
18675 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
18676 | /* end confdefs.h. */ | |
18677 | #include <sys/types.h> | |
18678 | int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1]; | |
18679 | ||
18680 | int | |
18681 | main () | |
18682 | { | |
18683 | ||
18684 | ; | |
18685 | return 0; | |
18686 | } | |
f199cab1 | 18687 | _ACEOF |
5476a9a4 GM |
18688 | if ac_fn_c_try_compile "$LINENO"; then : |
18689 | gl_cv_type_off_t_64=yes | |
18690 | else | |
18691 | gl_cv_type_off_t_64=no | |
f199cab1 | 18692 | fi |
5476a9a4 | 18693 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
34119902 | 18694 | |
5476a9a4 GM |
18695 | fi |
18696 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5 | |
18697 | $as_echo "$gl_cv_type_off_t_64" >&6; } | |
18698 | if test $gl_cv_type_off_t_64 = no; then | |
18699 | WINDOWS_64_BIT_OFF_T=1 | |
18700 | else | |
18701 | WINDOWS_64_BIT_OFF_T=0 | |
18702 | fi | |
18703 | WINDOWS_64_BIT_ST_SIZE=1 | |
18704 | ;; | |
18705 | *) | |
18706 | WINDOWS_64_BIT_OFF_T=0 | |
18707 | WINDOWS_64_BIT_ST_SIZE=0 | |
18708 | ;; | |
18709 | esac | |
34119902 GM |
18710 | |
18711 | ||
5476a9a4 GM |
18712 | GNULIB_FCHMODAT=0; |
18713 | GNULIB_FSTAT=0; | |
18714 | GNULIB_FSTATAT=0; | |
18715 | GNULIB_FUTIMENS=0; | |
18716 | GNULIB_LCHMOD=0; | |
18717 | GNULIB_LSTAT=0; | |
18718 | GNULIB_MKDIRAT=0; | |
18719 | GNULIB_MKFIFO=0; | |
18720 | GNULIB_MKFIFOAT=0; | |
18721 | GNULIB_MKNOD=0; | |
18722 | GNULIB_MKNODAT=0; | |
18723 | GNULIB_STAT=0; | |
18724 | GNULIB_UTIMENSAT=0; | |
18725 | HAVE_FCHMODAT=1; | |
18726 | HAVE_FSTATAT=1; | |
18727 | HAVE_FUTIMENS=1; | |
18728 | HAVE_LCHMOD=1; | |
18729 | HAVE_LSTAT=1; | |
18730 | HAVE_MKDIRAT=1; | |
18731 | HAVE_MKFIFO=1; | |
18732 | HAVE_MKFIFOAT=1; | |
18733 | HAVE_MKNOD=1; | |
18734 | HAVE_MKNODAT=1; | |
18735 | HAVE_UTIMENSAT=1; | |
18736 | REPLACE_FSTAT=0; | |
18737 | REPLACE_FSTATAT=0; | |
18738 | REPLACE_FUTIMENS=0; | |
18739 | REPLACE_LSTAT=0; | |
18740 | REPLACE_MKDIR=0; | |
18741 | REPLACE_MKFIFO=0; | |
18742 | REPLACE_MKNOD=0; | |
18743 | REPLACE_STAT=0; | |
18744 | REPLACE_UTIMENSAT=0; | |
34119902 GM |
18745 | |
18746 | ||
18747 | ||
18748 | ||
5476a9a4 GM |
18749 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5 |
18750 | $as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; } | |
18751 | if test "${gl_cv_func_lstat_dereferences_slashed_symlink+set}" = set; then : | |
18752 | $as_echo_n "(cached) " >&6 | |
f199cab1 | 18753 | else |
5476a9a4 GM |
18754 | rm -f conftest.sym conftest.file |
18755 | echo >conftest.file | |
18756 | if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then | |
18757 | if test "$cross_compiling" = yes; then : | |
18758 | case "$host_os" in | |
18759 | # Guess yes on glibc systems. | |
18760 | *-gnu*) gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;; | |
18761 | # If we don't know, assume the worst. | |
18762 | *) gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;; | |
18763 | esac | |
34119902 | 18764 | |
5476a9a4 | 18765 | else |
f199cab1 GM |
18766 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
18767 | /* end confdefs.h. */ | |
5476a9a4 | 18768 | $ac_includes_default |
0eb775a3 GM |
18769 | int |
18770 | main () | |
18771 | { | |
5476a9a4 GM |
18772 | struct stat sbuf; |
18773 | /* Linux will dereference the symlink and fail, as required by | |
18774 | POSIX. That is better in the sense that it means we will not | |
18775 | have to compile and use the lstat wrapper. */ | |
18776 | return lstat ("conftest.sym/", &sbuf) == 0; | |
18777 | ||
0eb775a3 GM |
18778 | ; |
18779 | return 0; | |
18780 | } | |
18781 | _ACEOF | |
5476a9a4 GM |
18782 | if ac_fn_c_try_run "$LINENO"; then : |
18783 | gl_cv_func_lstat_dereferences_slashed_symlink=yes | |
0eb775a3 | 18784 | else |
5476a9a4 GM |
18785 | gl_cv_func_lstat_dereferences_slashed_symlink=no |
18786 | fi | |
18787 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
18788 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
0eb775a3 | 18789 | fi |
0eb775a3 | 18790 | |
5476a9a4 GM |
18791 | else |
18792 | # If the 'ln -s' command failed, then we probably don't even | |
18793 | # have an lstat function. | |
18794 | gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" | |
18795 | fi | |
18796 | rm -f conftest.sym conftest.file | |
18797 | ||
0eb775a3 | 18798 | fi |
5476a9a4 GM |
18799 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5 |
18800 | $as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; } | |
18801 | case "$gl_cv_func_lstat_dereferences_slashed_symlink" in | |
18802 | *yes) | |
18803 | ||
18804 | cat >>confdefs.h <<_ACEOF | |
18805 | #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 | |
18806 | _ACEOF | |
18807 | ||
18808 | ;; | |
0eb775a3 | 18809 | esac |
34119902 GM |
18810 | |
18811 | ||
5476a9a4 GM |
18812 | GNULIB_MKTIME=0; |
18813 | GNULIB_NANOSLEEP=0; | |
18814 | GNULIB_STRPTIME=0; | |
18815 | GNULIB_TIMEGM=0; | |
18816 | GNULIB_TIME_R=0; | |
18817 | HAVE_DECL_LOCALTIME_R=1; | |
18818 | HAVE_NANOSLEEP=1; | |
18819 | HAVE_STRPTIME=1; | |
18820 | HAVE_TIMEGM=1; | |
18821 | REPLACE_LOCALTIME_R=GNULIB_PORTCHECK; | |
18822 | REPLACE_MKTIME=GNULIB_PORTCHECK; | |
18823 | REPLACE_NANOSLEEP=GNULIB_PORTCHECK; | |
18824 | REPLACE_TIMEGM=GNULIB_PORTCHECK; | |
34119902 | 18825 | |
3e0be4ab GM |
18826 | |
18827 | ||
18828 | ||
5476a9a4 GM |
18829 | GNULIB_PSELECT=0; |
18830 | GNULIB_SELECT=0; | |
18831 | HAVE_PSELECT=1; | |
18832 | REPLACE_PSELECT=0; | |
18833 | REPLACE_SELECT=0; | |
18834 | ||
18835 | ||
3e0be4ab | 18836 | |
5476a9a4 GM |
18837 | |
18838 | ||
18839 | ||
18840 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/select.h> is self-contained" >&5 | |
18841 | $as_echo_n "checking whether <sys/select.h> is self-contained... " >&6; } | |
18842 | if test "${gl_cv_header_sys_select_h_selfcontained+set}" = set; then : | |
f199cab1 | 18843 | $as_echo_n "(cached) " >&6 |
3e0be4ab | 18844 | else |
5476a9a4 GM |
18845 | |
18846 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3e0be4ab | 18847 | /* end confdefs.h. */ |
5476a9a4 | 18848 | #include <sys/select.h> |
3e0be4ab GM |
18849 | int |
18850 | main () | |
18851 | { | |
5476a9a4 | 18852 | struct timeval b; |
3e0be4ab GM |
18853 | ; |
18854 | return 0; | |
18855 | } | |
34119902 | 18856 | _ACEOF |
f199cab1 | 18857 | if ac_fn_c_try_compile "$LINENO"; then : |
5476a9a4 | 18858 | gl_cv_header_sys_select_h_selfcontained=yes |
3e0be4ab | 18859 | else |
5476a9a4 | 18860 | gl_cv_header_sys_select_h_selfcontained=no |
3e0be4ab | 18861 | fi |
f199cab1 | 18862 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5476a9a4 GM |
18863 | if test $gl_cv_header_sys_select_h_selfcontained = yes; then |
18864 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
18865 | /* end confdefs.h. */ | |
18866 | #include <sys/select.h> | |
18867 | int | |
18868 | main () | |
18869 | { | |
18870 | int memset; int bzero; | |
18871 | ; | |
18872 | return 0; | |
18873 | } | |
3e0be4ab | 18874 | |
5476a9a4 GM |
18875 | _ACEOF |
18876 | if ac_fn_c_try_compile "$LINENO"; then : | |
f199cab1 GM |
18877 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
18878 | /* end confdefs.h. */ | |
5476a9a4 | 18879 | #include <sys/select.h> |
f199cab1 GM |
18880 | int |
18881 | main () | |
18882 | { | |
5476a9a4 GM |
18883 | |
18884 | #undef memset | |
18885 | #define memset nonexistent_memset | |
18886 | extern | |
18887 | #ifdef __cplusplus | |
18888 | "C" | |
18889 | #endif | |
18890 | void *memset (void *, int, unsigned long); | |
18891 | #undef bzero | |
18892 | #define bzero nonexistent_bzero | |
18893 | extern | |
18894 | #ifdef __cplusplus | |
18895 | "C" | |
18896 | #endif | |
18897 | void bzero (void *, unsigned long); | |
18898 | fd_set fds; | |
18899 | FD_ZERO (&fds); | |
18900 | ||
f199cab1 GM |
18901 | ; |
18902 | return 0; | |
18903 | } | |
5476a9a4 | 18904 | |
f199cab1 | 18905 | _ACEOF |
5476a9a4 GM |
18906 | if ac_fn_c_try_link "$LINENO"; then : |
18907 | ||
f199cab1 | 18908 | else |
5476a9a4 | 18909 | gl_cv_header_sys_select_h_selfcontained=no |
f199cab1 | 18910 | fi |
5476a9a4 GM |
18911 | rm -f core conftest.err conftest.$ac_objext \ |
18912 | conftest$ac_exeext conftest.$ac_ext | |
1fd182f0 | 18913 | |
f199cab1 | 18914 | fi |
5476a9a4 GM |
18915 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
18916 | fi | |
1fd182f0 | 18917 | |
f199cab1 | 18918 | fi |
5476a9a4 GM |
18919 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_select_h_selfcontained" >&5 |
18920 | $as_echo "$gl_cv_header_sys_select_h_selfcontained" >&6; } | |
1fd182f0 PE |
18921 | |
18922 | ||
b06b1098 | 18923 | |
0eb775a3 GM |
18924 | |
18925 | ||
b06b1098 | 18926 | |
1fd182f0 | 18927 | |
1fd182f0 | 18928 | |
5476a9a4 GM |
18929 | |
18930 | if test $gl_cv_have_include_next = yes; then | |
18931 | gl_cv_next_sys_select_h='<'sys/select.h'>' | |
18932 | else | |
18933 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/select.h>" >&5 | |
18934 | $as_echo_n "checking absolute name of <sys/select.h>... " >&6; } | |
18935 | if test "${gl_cv_next_sys_select_h+set}" = set; then : | |
f199cab1 | 18936 | $as_echo_n "(cached) " >&6 |
3e0be4ab | 18937 | else |
1fd182f0 | 18938 | |
5476a9a4 GM |
18939 | if test $ac_cv_header_sys_select_h = yes; then |
18940 | ||
18941 | ||
18942 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
18943 | /* end confdefs.h. */ | |
18944 | #include <sys/select.h> | |
18945 | ||
18946 | _ACEOF | |
18947 | case "$host_os" in | |
18948 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
18949 | *) gl_absname_cpp="$ac_cpp" ;; | |
18950 | esac | |
18951 | ||
18952 | case "$host_os" in | |
18953 | mingw*) | |
18954 | gl_dirsep_regex='[/\\]' | |
18955 | ;; | |
18956 | *) | |
18957 | gl_dirsep_regex='\/' | |
18958 | ;; | |
18959 | esac | |
18960 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
18961 | ||
18962 | gl_header_literal_regex=`echo 'sys/select.h' \ | |
18963 | | sed -e "$gl_make_literal_regex_sed"` | |
18964 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
18965 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
18966 | s|^/[^/]|//&| | |
18967 | p | |
18968 | q | |
18969 | }' | |
18970 | gl_cv_next_sys_select_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
18971 | sed -n "$gl_absolute_header_sed"`'"' | |
18972 | else | |
18973 | gl_cv_next_sys_select_h='<'sys/select.h'>' | |
18974 | fi | |
1fd182f0 | 18975 | |
3e0be4ab | 18976 | |
1f5d53eb | 18977 | fi |
5476a9a4 GM |
18978 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_select_h" >&5 |
18979 | $as_echo "$gl_cv_next_sys_select_h" >&6; } | |
18980 | fi | |
18981 | NEXT_SYS_SELECT_H=$gl_cv_next_sys_select_h | |
1fd182f0 | 18982 | |
5476a9a4 GM |
18983 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then |
18984 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
18985 | gl_next_as_first_directive='<'sys/select.h'>' | |
18986 | else | |
18987 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
18988 | gl_next_as_first_directive=$gl_cv_next_sys_select_h | |
18989 | fi | |
18990 | NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H=$gl_next_as_first_directive | |
1fd182f0 PE |
18991 | |
18992 | ||
5476a9a4 GM |
18993 | |
18994 | ||
18995 | if test $ac_cv_header_sys_select_h = yes; then | |
18996 | HAVE_SYS_SELECT_H=1 | |
18997 | else | |
18998 | HAVE_SYS_SELECT_H=0 | |
18999 | fi | |
19000 | ||
19001 | ||
19002 | ||
19003 | ||
19004 | ||
19005 | if test $ac_cv_header_sys_socket_h != yes; then | |
19006 | for ac_header in winsock2.h | |
19007 | do : | |
19008 | ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default" | |
19009 | if test "x$ac_cv_header_winsock2_h" = x""yes; then : | |
19010 | cat >>confdefs.h <<_ACEOF | |
19011 | #define HAVE_WINSOCK2_H 1 | |
f199cab1 | 19012 | _ACEOF |
5476a9a4 | 19013 | |
f199cab1 | 19014 | fi |
3e0be4ab | 19015 | |
5476a9a4 | 19016 | done |
3e0be4ab | 19017 | |
5476a9a4 GM |
19018 | fi |
19019 | if test "$ac_cv_header_winsock2_h" = yes; then | |
19020 | HAVE_WINSOCK2_H=1 | |
19021 | UNISTD_H_HAVE_WINSOCK2_H=1 | |
19022 | SYS_IOCTL_H_HAVE_WINSOCK2_H=1 | |
19023 | else | |
19024 | HAVE_WINSOCK2_H=0 | |
19025 | fi | |
f199cab1 | 19026 | |
f199cab1 | 19027 | |
f199cab1 | 19028 | |
f199cab1 | 19029 | |
3e0be4ab | 19030 | |
3e0be4ab | 19031 | |
3e0be4ab | 19032 | |
3e0be4ab | 19033 | |
5476a9a4 GM |
19034 | GNULIB_PTHREAD_SIGMASK=0; |
19035 | GNULIB_RAISE=0; | |
19036 | GNULIB_SIGNAL_H_SIGPIPE=0; | |
19037 | GNULIB_SIGPROCMASK=0; | |
19038 | GNULIB_SIGACTION=0; | |
19039 | HAVE_POSIX_SIGNALBLOCKING=1; | |
19040 | HAVE_PTHREAD_SIGMASK=1; | |
19041 | HAVE_RAISE=1; | |
19042 | HAVE_SIGSET_T=1; | |
19043 | HAVE_SIGINFO_T=1; | |
19044 | HAVE_SIGACTION=1; | |
19045 | HAVE_STRUCT_SIGACTION_SA_SIGACTION=1; | |
19046 | ||
19047 | HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1; | |
f199cab1 | 19048 | |
5476a9a4 GM |
19049 | HAVE_SIGHANDLER_T=1; |
19050 | REPLACE_PTHREAD_SIGMASK=0; | |
19051 | REPLACE_RAISE=0; | |
1f5d53eb | 19052 | |
1fd182f0 | 19053 | |
b06b1098 | 19054 | |
1fd182f0 | 19055 | |
3e0be4ab GM |
19056 | |
19057 | ||
5476a9a4 GM |
19058 | ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" " |
19059 | #include <signal.h> | |
19060 | /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */ | |
19061 | #include <sys/types.h> | |
19062 | ||
19063 | " | |
19064 | if test "x$ac_cv_type_sigset_t" = x""yes; then : | |
19065 | ||
19066 | cat >>confdefs.h <<_ACEOF | |
19067 | #define HAVE_SIGSET_T 1 | |
f199cab1 | 19068 | _ACEOF |
3e0be4ab | 19069 | |
5476a9a4 GM |
19070 | gl_cv_type_sigset_t=yes |
19071 | else | |
19072 | gl_cv_type_sigset_t=no | |
f199cab1 | 19073 | fi |
3e0be4ab | 19074 | |
5476a9a4 GM |
19075 | if test $gl_cv_type_sigset_t != yes; then |
19076 | HAVE_SIGSET_T=0 | |
19077 | fi | |
3e0be4ab | 19078 | |
1f5d53eb | 19079 | |
3e0be4ab | 19080 | |
5476a9a4 GM |
19081 | if test $ac_cv_header_sys_socket_h = no; then |
19082 | for ac_header in ws2tcpip.h | |
19083 | do : | |
19084 | ac_fn_c_check_header_mongrel "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default" | |
19085 | if test "x$ac_cv_header_ws2tcpip_h" = x""yes; then : | |
19086 | cat >>confdefs.h <<_ACEOF | |
19087 | #define HAVE_WS2TCPIP_H 1 | |
19088 | _ACEOF | |
3e0be4ab | 19089 | |
5476a9a4 | 19090 | fi |
3e0be4ab | 19091 | |
5476a9a4 GM |
19092 | done |
19093 | ||
19094 | fi | |
19095 | ||
19096 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5 | |
19097 | $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; } | |
19098 | if test "${ac_cv_header_stdbool_h+set}" = set; then : | |
19099 | $as_echo_n "(cached) " >&6 | |
19100 | else | |
19101 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
19102 | /* end confdefs.h. */ | |
1f5d53eb | 19103 | |
5476a9a4 GM |
19104 | #include <stdbool.h> |
19105 | #ifndef bool | |
19106 | "error: bool is not defined" | |
19107 | #endif | |
19108 | #ifndef false | |
19109 | "error: false is not defined" | |
19110 | #endif | |
19111 | #if false | |
19112 | "error: false is not 0" | |
19113 | #endif | |
19114 | #ifndef true | |
19115 | "error: true is not defined" | |
19116 | #endif | |
19117 | #if true != 1 | |
19118 | "error: true is not 1" | |
19119 | #endif | |
19120 | #ifndef __bool_true_false_are_defined | |
19121 | "error: __bool_true_false_are_defined is not defined" | |
19122 | #endif | |
19123 | ||
19124 | struct s { _Bool s: 1; _Bool t; } s; | |
19125 | ||
19126 | char a[true == 1 ? 1 : -1]; | |
19127 | char b[false == 0 ? 1 : -1]; | |
19128 | char c[__bool_true_false_are_defined == 1 ? 1 : -1]; | |
19129 | char d[(bool) 0.5 == true ? 1 : -1]; | |
19130 | /* See body of main program for 'e'. */ | |
19131 | char f[(_Bool) 0.0 == false ? 1 : -1]; | |
19132 | char g[true]; | |
19133 | char h[sizeof (_Bool)]; | |
19134 | char i[sizeof s.t]; | |
19135 | enum { j = false, k = true, l = false * true, m = true * 256 }; | |
19136 | /* The following fails for | |
19137 | HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */ | |
19138 | _Bool n[m]; | |
19139 | char o[sizeof n == m * sizeof n[0] ? 1 : -1]; | |
19140 | char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; | |
19141 | /* Catch a bug in an HP-UX C compiler. See | |
19142 | http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html | |
19143 | http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html | |
19144 | */ | |
19145 | _Bool q = true; | |
19146 | _Bool *pq = &q; | |
1ebc9c87 GM |
19147 | |
19148 | int | |
19149 | main () | |
19150 | { | |
f199cab1 | 19151 | |
5476a9a4 GM |
19152 | bool e = &s; |
19153 | *pq |= q; | |
19154 | *pq |= ! q; | |
19155 | /* Refer to every declared value, to avoid compiler optimizations. */ | |
19156 | return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l | |
19157 | + !m + !n + !o + !p + !q + !pq); | |
f199cab1 | 19158 | |
5476a9a4 | 19159 | ; |
1ebc9c87 GM |
19160 | return 0; |
19161 | } | |
19162 | _ACEOF | |
5476a9a4 GM |
19163 | if ac_fn_c_try_compile "$LINENO"; then : |
19164 | ac_cv_header_stdbool_h=yes | |
1ebc9c87 | 19165 | else |
5476a9a4 | 19166 | ac_cv_header_stdbool_h=no |
1ebc9c87 | 19167 | fi |
5476a9a4 | 19168 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
1ebc9c87 | 19169 | fi |
5476a9a4 GM |
19170 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5 |
19171 | $as_echo "$ac_cv_header_stdbool_h" >&6; } | |
19172 | ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default" | |
19173 | if test "x$ac_cv_type__Bool" = x""yes; then : | |
1ebc9c87 | 19174 | |
5476a9a4 GM |
19175 | cat >>confdefs.h <<_ACEOF |
19176 | #define HAVE__BOOL 1 | |
19177 | _ACEOF | |
1ebc9c87 | 19178 | |
1ebc9c87 GM |
19179 | |
19180 | fi | |
19181 | ||
1ebc9c87 | 19182 | |
1ebc9c87 | 19183 | |
5476a9a4 GM |
19184 | REPLACE_NULL=0; |
19185 | HAVE_WCHAR_T=1; | |
19186 | ||
19187 | ||
19188 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5 | |
19189 | $as_echo_n "checking for wchar_t... " >&6; } | |
19190 | if test "${gt_cv_c_wchar_t+set}" = set; then : | |
19191 | $as_echo_n "(cached) " >&6 | |
19192 | else | |
19193 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
19194 | /* end confdefs.h. */ | |
19195 | #include <stddef.h> | |
19196 | wchar_t foo = (wchar_t)'\0'; | |
19197 | int | |
19198 | main () | |
19199 | { | |
19200 | ||
19201 | ; | |
19202 | return 0; | |
19203 | } | |
19204 | _ACEOF | |
19205 | if ac_fn_c_try_compile "$LINENO"; then : | |
19206 | gt_cv_c_wchar_t=yes | |
19207 | else | |
19208 | gt_cv_c_wchar_t=no | |
19209 | fi | |
19210 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1ebc9c87 | 19211 | fi |
5476a9a4 GM |
19212 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5 |
19213 | $as_echo "$gt_cv_c_wchar_t" >&6; } | |
19214 | if test $gt_cv_c_wchar_t = yes; then | |
1ebc9c87 | 19215 | |
5476a9a4 GM |
19216 | $as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h |
19217 | ||
19218 | fi | |
19219 | ||
19220 | ||
19221 | GNULIB_DPRINTF=0; | |
19222 | GNULIB_FCLOSE=0; | |
19223 | GNULIB_FDOPEN=0; | |
19224 | GNULIB_FFLUSH=0; | |
19225 | GNULIB_FGETC=0; | |
19226 | GNULIB_FGETS=0; | |
19227 | GNULIB_FOPEN=0; | |
19228 | GNULIB_FPRINTF=0; | |
19229 | GNULIB_FPRINTF_POSIX=0; | |
19230 | GNULIB_FPURGE=0; | |
19231 | GNULIB_FPUTC=0; | |
19232 | GNULIB_FPUTS=0; | |
19233 | GNULIB_FREAD=0; | |
19234 | GNULIB_FREOPEN=0; | |
19235 | GNULIB_FSCANF=0; | |
19236 | GNULIB_FSEEK=0; | |
19237 | GNULIB_FSEEKO=0; | |
19238 | GNULIB_FTELL=0; | |
19239 | GNULIB_FTELLO=0; | |
19240 | GNULIB_FWRITE=0; | |
19241 | GNULIB_GETC=0; | |
19242 | GNULIB_GETCHAR=0; | |
19243 | GNULIB_GETDELIM=0; | |
19244 | GNULIB_GETLINE=0; | |
19245 | GNULIB_OBSTACK_PRINTF=0; | |
19246 | GNULIB_OBSTACK_PRINTF_POSIX=0; | |
19247 | GNULIB_PCLOSE=0; | |
19248 | GNULIB_PERROR=0; | |
19249 | GNULIB_POPEN=0; | |
19250 | GNULIB_PRINTF=0; | |
19251 | GNULIB_PRINTF_POSIX=0; | |
19252 | GNULIB_PUTC=0; | |
19253 | GNULIB_PUTCHAR=0; | |
19254 | GNULIB_PUTS=0; | |
19255 | GNULIB_REMOVE=0; | |
19256 | GNULIB_RENAME=0; | |
19257 | GNULIB_RENAMEAT=0; | |
19258 | GNULIB_SCANF=0; | |
19259 | GNULIB_SNPRINTF=0; | |
19260 | GNULIB_SPRINTF_POSIX=0; | |
19261 | GNULIB_STDIO_H_NONBLOCKING=0; | |
19262 | GNULIB_STDIO_H_SIGPIPE=0; | |
19263 | GNULIB_TMPFILE=0; | |
19264 | GNULIB_VASPRINTF=0; | |
19265 | GNULIB_VFSCANF=0; | |
19266 | GNULIB_VSCANF=0; | |
19267 | GNULIB_VDPRINTF=0; | |
19268 | GNULIB_VFPRINTF=0; | |
19269 | GNULIB_VFPRINTF_POSIX=0; | |
19270 | GNULIB_VPRINTF=0; | |
19271 | GNULIB_VPRINTF_POSIX=0; | |
19272 | GNULIB_VSNPRINTF=0; | |
19273 | GNULIB_VSPRINTF_POSIX=0; | |
19274 | HAVE_DECL_FPURGE=1; | |
19275 | HAVE_DECL_FSEEKO=1; | |
19276 | HAVE_DECL_FTELLO=1; | |
19277 | HAVE_DECL_GETDELIM=1; | |
19278 | HAVE_DECL_GETLINE=1; | |
19279 | HAVE_DECL_OBSTACK_PRINTF=1; | |
19280 | HAVE_DECL_SNPRINTF=1; | |
19281 | HAVE_DECL_VSNPRINTF=1; | |
19282 | HAVE_DPRINTF=1; | |
19283 | HAVE_FSEEKO=1; | |
19284 | HAVE_FTELLO=1; | |
19285 | HAVE_PCLOSE=1; | |
19286 | HAVE_POPEN=1; | |
19287 | HAVE_RENAMEAT=1; | |
19288 | HAVE_VASPRINTF=1; | |
19289 | HAVE_VDPRINTF=1; | |
19290 | REPLACE_DPRINTF=0; | |
19291 | REPLACE_FCLOSE=0; | |
19292 | REPLACE_FDOPEN=0; | |
19293 | REPLACE_FFLUSH=0; | |
19294 | REPLACE_FOPEN=0; | |
19295 | REPLACE_FPRINTF=0; | |
19296 | REPLACE_FPURGE=0; | |
19297 | REPLACE_FREOPEN=0; | |
19298 | REPLACE_FSEEK=0; | |
19299 | REPLACE_FSEEKO=0; | |
19300 | REPLACE_FTELL=0; | |
19301 | REPLACE_FTELLO=0; | |
19302 | REPLACE_GETDELIM=0; | |
19303 | REPLACE_GETLINE=0; | |
19304 | REPLACE_OBSTACK_PRINTF=0; | |
19305 | REPLACE_PERROR=0; | |
19306 | REPLACE_POPEN=0; | |
19307 | REPLACE_PRINTF=0; | |
19308 | REPLACE_REMOVE=0; | |
19309 | REPLACE_RENAME=0; | |
19310 | REPLACE_RENAMEAT=0; | |
19311 | REPLACE_SNPRINTF=0; | |
19312 | REPLACE_SPRINTF=0; | |
19313 | REPLACE_STDIO_READ_FUNCS=0; | |
19314 | REPLACE_STDIO_WRITE_FUNCS=0; | |
19315 | REPLACE_TMPFILE=0; | |
19316 | REPLACE_VASPRINTF=0; | |
19317 | REPLACE_VDPRINTF=0; | |
19318 | REPLACE_VFPRINTF=0; | |
19319 | REPLACE_VPRINTF=0; | |
19320 | REPLACE_VSNPRINTF=0; | |
19321 | REPLACE_VSPRINTF=0; | |
1ebc9c87 | 19322 | |
5476a9a4 GM |
19323 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 |
19324 | $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; } | |
19325 | if test "${ac_cv_struct_tm+set}" = set; then : | |
1ebc9c87 GM |
19326 | $as_echo_n "(cached) " >&6 |
19327 | else | |
5476a9a4 | 19328 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
1ebc9c87 | 19329 | /* end confdefs.h. */ |
5476a9a4 GM |
19330 | #include <sys/types.h> |
19331 | #include <time.h> | |
1ebc9c87 GM |
19332 | |
19333 | int | |
19334 | main () | |
19335 | { | |
5476a9a4 GM |
19336 | struct tm tm; |
19337 | int *p = &tm.tm_sec; | |
19338 | return !p; | |
1ebc9c87 GM |
19339 | ; |
19340 | return 0; | |
19341 | } | |
19342 | _ACEOF | |
5476a9a4 GM |
19343 | if ac_fn_c_try_compile "$LINENO"; then : |
19344 | ac_cv_struct_tm=time.h | |
1ebc9c87 | 19345 | else |
5476a9a4 | 19346 | ac_cv_struct_tm=sys/time.h |
1ebc9c87 | 19347 | fi |
5476a9a4 | 19348 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
1ebc9c87 | 19349 | fi |
5476a9a4 GM |
19350 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5 |
19351 | $as_echo "$ac_cv_struct_tm" >&6; } | |
19352 | if test $ac_cv_struct_tm = sys/time.h; then | |
1ebc9c87 | 19353 | |
5476a9a4 | 19354 | $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h |
1ebc9c87 | 19355 | |
1ebc9c87 GM |
19356 | fi |
19357 | ||
5476a9a4 GM |
19358 | ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h> |
19359 | #include <$ac_cv_struct_tm> | |
1fd182f0 | 19360 | |
5476a9a4 GM |
19361 | " |
19362 | if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then : | |
1fd182f0 | 19363 | |
5476a9a4 GM |
19364 | cat >>confdefs.h <<_ACEOF |
19365 | #define HAVE_STRUCT_TM_TM_ZONE 1 | |
f199cab1 | 19366 | _ACEOF |
5476a9a4 GM |
19367 | |
19368 | ||
1f5d53eb | 19369 | fi |
1fd182f0 | 19370 | |
5476a9a4 | 19371 | if test "$ac_cv_member_struct_tm_tm_zone" = yes; then |
1f5d53eb | 19372 | |
5476a9a4 | 19373 | $as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h |
1fd182f0 | 19374 | |
5476a9a4 GM |
19375 | else |
19376 | ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h> | |
19377 | " | |
19378 | if test "x$ac_cv_have_decl_tzname" = x""yes; then : | |
19379 | ac_have_decl=1 | |
19380 | else | |
19381 | ac_have_decl=0 | |
19382 | fi | |
1fd182f0 | 19383 | |
5476a9a4 GM |
19384 | cat >>confdefs.h <<_ACEOF |
19385 | #define HAVE_DECL_TZNAME $ac_have_decl | |
19386 | _ACEOF | |
f199cab1 | 19387 | |
5476a9a4 GM |
19388 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5 |
19389 | $as_echo_n "checking for tzname... " >&6; } | |
19390 | if test "${ac_cv_var_tzname+set}" = set; then : | |
f199cab1 | 19391 | $as_echo_n "(cached) " >&6 |
3e0be4ab | 19392 | else |
5476a9a4 | 19393 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
f199cab1 | 19394 | /* end confdefs.h. */ |
5476a9a4 GM |
19395 | #include <time.h> |
19396 | #if !HAVE_DECL_TZNAME | |
19397 | extern char *tzname[]; | |
f199cab1 | 19398 | #endif |
5476a9a4 | 19399 | |
f199cab1 GM |
19400 | int |
19401 | main () | |
19402 | { | |
5476a9a4 | 19403 | return tzname[0][0]; |
f199cab1 GM |
19404 | ; |
19405 | return 0; | |
19406 | } | |
3e0be4ab | 19407 | _ACEOF |
f199cab1 | 19408 | if ac_fn_c_try_link "$LINENO"; then : |
5476a9a4 | 19409 | ac_cv_var_tzname=yes |
3e0be4ab | 19410 | else |
5476a9a4 | 19411 | ac_cv_var_tzname=no |
f199cab1 GM |
19412 | fi |
19413 | rm -f core conftest.err conftest.$ac_objext \ | |
19414 | conftest$ac_exeext conftest.$ac_ext | |
f199cab1 | 19415 | fi |
5476a9a4 GM |
19416 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5 |
19417 | $as_echo "$ac_cv_var_tzname" >&6; } | |
19418 | if test $ac_cv_var_tzname = yes; then | |
19419 | ||
19420 | $as_echo "#define HAVE_TZNAME 1" >>confdefs.h | |
f199cab1 | 19421 | |
5476a9a4 | 19422 | fi |
3e0be4ab | 19423 | fi |
cc322c06 | 19424 | |
5476a9a4 GM |
19425 | |
19426 | ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include <time.h> | |
19427 | " | |
19428 | if test "x$ac_cv_member_struct_tm_tm_gmtoff" = x""yes; then : | |
19429 | ||
19430 | $as_echo "#define HAVE_TM_GMTOFF 1" >>confdefs.h | |
cc322c06 | 19431 | |
f199cab1 | 19432 | fi |
cc322c06 | 19433 | |
1f5d53eb | 19434 | |
e275c824 | 19435 | |
5476a9a4 GM |
19436 | |
19437 | ac_fn_c_check_decl "$LINENO" "strtoimax" "ac_cv_have_decl_strtoimax" "$ac_includes_default" | |
19438 | if test "x$ac_cv_have_decl_strtoimax" = x""yes; then : | |
19439 | ac_have_decl=1 | |
3e0be4ab | 19440 | else |
5476a9a4 | 19441 | ac_have_decl=0 |
3e0be4ab | 19442 | fi |
5476a9a4 GM |
19443 | |
19444 | cat >>confdefs.h <<_ACEOF | |
19445 | #define HAVE_DECL_STRTOIMAX $ac_have_decl | |
f199cab1 | 19446 | _ACEOF |
e275c824 PE |
19447 | |
19448 | ||
5476a9a4 GM |
19449 | |
19450 | ac_fn_c_check_decl "$LINENO" "strtoumax" "ac_cv_have_decl_strtoumax" "$ac_includes_default" | |
19451 | if test "x$ac_cv_have_decl_strtoumax" = x""yes; then : | |
19452 | ac_have_decl=1 | |
19453 | else | |
19454 | ac_have_decl=0 | |
3e0be4ab | 19455 | fi |
e275c824 | 19456 | |
5476a9a4 GM |
19457 | cat >>confdefs.h <<_ACEOF |
19458 | #define HAVE_DECL_STRTOUMAX $ac_have_decl | |
19459 | _ACEOF | |
e275c824 PE |
19460 | |
19461 | ||
2b1928b8 | 19462 | |
5476a9a4 GM |
19463 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5 |
19464 | $as_echo_n "checking whether stat file-mode macros are broken... " >&6; } | |
19465 | if test "${ac_cv_header_stat_broken+set}" = set; then : | |
f199cab1 | 19466 | $as_echo_n "(cached) " >&6 |
2b1928b8 | 19467 | else |
5476a9a4 GM |
19468 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
19469 | /* end confdefs.h. */ | |
19470 | #include <sys/types.h> | |
19471 | #include <sys/stat.h> | |
2b1928b8 | 19472 | |
5476a9a4 GM |
19473 | #if defined S_ISBLK && defined S_IFDIR |
19474 | extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1]; | |
19475 | #endif | |
2b1928b8 | 19476 | |
5476a9a4 GM |
19477 | #if defined S_ISBLK && defined S_IFCHR |
19478 | extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1]; | |
19479 | #endif | |
0eb775a3 | 19480 | |
5476a9a4 GM |
19481 | #if defined S_ISLNK && defined S_IFREG |
19482 | extern char c3[S_ISLNK (S_IFREG) ? -1 : 1]; | |
19483 | #endif | |
19484 | ||
19485 | #if defined S_ISSOCK && defined S_IFREG | |
19486 | extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1]; | |
19487 | #endif | |
0eb775a3 | 19488 | |
5476a9a4 GM |
19489 | _ACEOF |
19490 | if ac_fn_c_try_compile "$LINENO"; then : | |
19491 | ac_cv_header_stat_broken=no | |
f199cab1 | 19492 | else |
5476a9a4 | 19493 | ac_cv_header_stat_broken=yes |
f199cab1 | 19494 | fi |
5476a9a4 | 19495 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
f199cab1 | 19496 | fi |
5476a9a4 GM |
19497 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5 |
19498 | $as_echo "$ac_cv_header_stat_broken" >&6; } | |
19499 | if test $ac_cv_header_stat_broken = yes; then | |
0eb775a3 | 19500 | |
5476a9a4 | 19501 | $as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h |
0eb775a3 | 19502 | |
5476a9a4 | 19503 | fi |
0eb775a3 GM |
19504 | |
19505 | ||
19506 | ||
5476a9a4 GM |
19507 | ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default" |
19508 | if test "x$ac_cv_type_mode_t" = x""yes; then : | |
f199cab1 | 19509 | |
3e0be4ab | 19510 | else |
5476a9a4 GM |
19511 | |
19512 | cat >>confdefs.h <<_ACEOF | |
19513 | #define mode_t int | |
19514 | _ACEOF | |
19515 | ||
f199cab1 | 19516 | fi |
5476a9a4 GM |
19517 | |
19518 | ||
19519 | ||
19520 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5 | |
19521 | $as_echo_n "checking for struct timespec in <time.h>... " >&6; } | |
19522 | if test "${gl_cv_sys_struct_timespec_in_time_h+set}" = set; then : | |
19523 | $as_echo_n "(cached) " >&6 | |
19524 | else | |
19525 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3e0be4ab | 19526 | /* end confdefs.h. */ |
5476a9a4 | 19527 | #include <time.h> |
52724a05 | 19528 | |
3e0be4ab GM |
19529 | int |
19530 | main () | |
19531 | { | |
5476a9a4 | 19532 | static struct timespec x; x.tv_sec = x.tv_nsec; |
3e0be4ab GM |
19533 | ; |
19534 | return 0; | |
19535 | } | |
19536 | _ACEOF | |
5476a9a4 GM |
19537 | if ac_fn_c_try_compile "$LINENO"; then : |
19538 | gl_cv_sys_struct_timespec_in_time_h=yes | |
3e0be4ab | 19539 | else |
5476a9a4 | 19540 | gl_cv_sys_struct_timespec_in_time_h=no |
3e0be4ab | 19541 | fi |
5476a9a4 GM |
19542 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
19543 | fi | |
19544 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5 | |
19545 | $as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; } | |
52724a05 | 19546 | |
5476a9a4 GM |
19547 | TIME_H_DEFINES_STRUCT_TIMESPEC=0 |
19548 | SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0 | |
19549 | PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0 | |
19550 | if test $gl_cv_sys_struct_timespec_in_time_h = yes; then | |
19551 | TIME_H_DEFINES_STRUCT_TIMESPEC=1 | |
19552 | else | |
19553 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5 | |
19554 | $as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; } | |
19555 | if test "${gl_cv_sys_struct_timespec_in_sys_time_h+set}" = set; then : | |
19556 | $as_echo_n "(cached) " >&6 | |
19557 | else | |
3e0be4ab GM |
19558 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
19559 | /* end confdefs.h. */ | |
5476a9a4 GM |
19560 | #include <sys/time.h> |
19561 | ||
3e0be4ab GM |
19562 | int |
19563 | main () | |
19564 | { | |
5476a9a4 | 19565 | static struct timespec x; x.tv_sec = x.tv_nsec; |
3e0be4ab GM |
19566 | ; |
19567 | return 0; | |
19568 | } | |
19569 | _ACEOF | |
5476a9a4 GM |
19570 | if ac_fn_c_try_compile "$LINENO"; then : |
19571 | gl_cv_sys_struct_timespec_in_sys_time_h=yes | |
3e0be4ab | 19572 | else |
5476a9a4 | 19573 | gl_cv_sys_struct_timespec_in_sys_time_h=no |
3e0be4ab | 19574 | fi |
5476a9a4 | 19575 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
f199cab1 | 19576 | fi |
5476a9a4 GM |
19577 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5 |
19578 | $as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; } | |
19579 | if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then | |
19580 | SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1 | |
19581 | else | |
19582 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5 | |
19583 | $as_echo_n "checking for struct timespec in <pthread.h>... " >&6; } | |
19584 | if test "${gl_cv_sys_struct_timespec_in_pthread_h+set}" = set; then : | |
3e0be4ab GM |
19585 | $as_echo_n "(cached) " >&6 |
19586 | else | |
19587 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
19588 | /* end confdefs.h. */ | |
5476a9a4 GM |
19589 | #include <pthread.h> |
19590 | ||
3e0be4ab GM |
19591 | int |
19592 | main () | |
19593 | { | |
5476a9a4 | 19594 | static struct timespec x; x.tv_sec = x.tv_nsec; |
3e0be4ab GM |
19595 | ; |
19596 | return 0; | |
19597 | } | |
19598 | _ACEOF | |
5476a9a4 GM |
19599 | if ac_fn_c_try_compile "$LINENO"; then : |
19600 | gl_cv_sys_struct_timespec_in_pthread_h=yes | |
3e0be4ab | 19601 | else |
5476a9a4 | 19602 | gl_cv_sys_struct_timespec_in_pthread_h=no |
3e0be4ab | 19603 | fi |
5476a9a4 | 19604 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3e0be4ab | 19605 | fi |
5476a9a4 GM |
19606 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5 |
19607 | $as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; } | |
19608 | if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then | |
19609 | PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1 | |
19610 | fi | |
19611 | fi | |
f199cab1 | 19612 | fi |
e275c824 PE |
19613 | |
19614 | ||
b0415a03 | 19615 | |
b0415a03 | 19616 | |
e275c824 | 19617 | |
e275c824 PE |
19618 | |
19619 | ||
f199cab1 | 19620 | |
e275c824 PE |
19621 | |
19622 | ||
19623 | ||
19624 | ||
19625 | ||
19626 | ||
19627 | ||
5476a9a4 GM |
19628 | if test $gl_cv_have_include_next = yes; then |
19629 | gl_cv_next_time_h='<'time.h'>' | |
19630 | else | |
19631 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5 | |
19632 | $as_echo_n "checking absolute name of <time.h>... " >&6; } | |
19633 | if test "${gl_cv_next_time_h+set}" = set; then : | |
19634 | $as_echo_n "(cached) " >&6 | |
19635 | else | |
e275c824 | 19636 | |
5476a9a4 GM |
19637 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
19638 | /* end confdefs.h. */ | |
19639 | #include <time.h> | |
e275c824 | 19640 | |
5476a9a4 GM |
19641 | _ACEOF |
19642 | case "$host_os" in | |
19643 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
19644 | *) gl_absname_cpp="$ac_cpp" ;; | |
19645 | esac | |
e275c824 | 19646 | |
5476a9a4 GM |
19647 | case "$host_os" in |
19648 | mingw*) | |
19649 | gl_dirsep_regex='[/\\]' | |
19650 | ;; | |
19651 | *) | |
19652 | gl_dirsep_regex='\/' | |
19653 | ;; | |
19654 | esac | |
19655 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
e275c824 | 19656 | |
5476a9a4 GM |
19657 | gl_header_literal_regex=`echo 'time.h' \ |
19658 | | sed -e "$gl_make_literal_regex_sed"` | |
19659 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
19660 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
19661 | s|^/[^/]|//&| | |
19662 | p | |
19663 | q | |
19664 | }' | |
19665 | gl_cv_next_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
19666 | sed -n "$gl_absolute_header_sed"`'"' | |
e275c824 PE |
19667 | |
19668 | ||
5476a9a4 GM |
19669 | fi |
19670 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5 | |
19671 | $as_echo "$gl_cv_next_time_h" >&6; } | |
19672 | fi | |
19673 | NEXT_TIME_H=$gl_cv_next_time_h | |
67342916 | 19674 | |
5476a9a4 GM |
19675 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then |
19676 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
19677 | gl_next_as_first_directive='<'time.h'>' | |
f199cab1 | 19678 | else |
5476a9a4 GM |
19679 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' |
19680 | gl_next_as_first_directive=$gl_cv_next_time_h | |
f199cab1 | 19681 | fi |
5476a9a4 | 19682 | NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive |
4fda9c95 GM |
19683 | |
19684 | ||
52724a05 GM |
19685 | |
19686 | ||
19687 | ||
19688 | ||
19689 | ||
19690 | ||
19691 | ||
ae0d7250 PE |
19692 | |
19693 | ||
19694 | ||
cc322c06 | 19695 | |
f199cab1 | 19696 | |
cc322c06 | 19697 | |
5476a9a4 GM |
19698 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the utimes function works" >&5 |
19699 | $as_echo_n "checking whether the utimes function works... " >&6; } | |
19700 | if test "${gl_cv_func_working_utimes+set}" = set; then : | |
19701 | $as_echo_n "(cached) " >&6 | |
19702 | else | |
1fd182f0 | 19703 | |
5476a9a4 GM |
19704 | if test "$cross_compiling" = yes; then : |
19705 | gl_cv_func_working_utimes=no | |
19706 | else | |
19707 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
19708 | /* end confdefs.h. */ | |
19709 | ||
19710 | #include <sys/types.h> | |
19711 | #include <sys/stat.h> | |
19712 | #include <fcntl.h> | |
19713 | #include <sys/time.h> | |
19714 | #include <time.h> | |
19715 | #include <unistd.h> | |
19716 | #include <stdlib.h> | |
19717 | #include <stdio.h> | |
19718 | #include <utime.h> | |
1fd182f0 | 19719 | |
5476a9a4 GM |
19720 | static int |
19721 | inorder (time_t a, time_t b, time_t c) | |
19722 | { | |
19723 | return a <= b && b <= c; | |
19724 | } | |
1fd182f0 | 19725 | |
5476a9a4 GM |
19726 | int |
19727 | main () | |
19728 | { | |
19729 | int result = 0; | |
19730 | char const *file = "conftest.utimes"; | |
19731 | static struct timeval timeval[2] = {{9, 10}, {999999, 999999}}; | |
1fd182f0 | 19732 | |
5476a9a4 GM |
19733 | /* Test whether utimes() essentially works. */ |
19734 | { | |
19735 | struct stat sbuf; | |
19736 | FILE *f = fopen (file, "w"); | |
19737 | if (f == NULL) | |
19738 | result |= 1; | |
19739 | else if (fclose (f) != 0) | |
19740 | result |= 1; | |
19741 | else if (utimes (file, timeval) != 0) | |
19742 | result |= 2; | |
19743 | else if (lstat (file, &sbuf) != 0) | |
19744 | result |= 1; | |
19745 | else if (!(sbuf.st_atime == timeval[0].tv_sec | |
19746 | && sbuf.st_mtime == timeval[1].tv_sec)) | |
19747 | result |= 4; | |
19748 | if (unlink (file) != 0) | |
19749 | result |= 1; | |
19750 | } | |
1fd182f0 | 19751 | |
5476a9a4 GM |
19752 | /* Test whether utimes() with a NULL argument sets the file's timestamp |
19753 | to the current time. Use 'fstat' as well as 'time' to | |
19754 | determine the "current" time, to accommodate NFS file systems | |
19755 | if there is a time skew between the host and the NFS server. */ | |
19756 | { | |
19757 | int fd = open (file, O_WRONLY|O_CREAT, 0644); | |
19758 | if (fd < 0) | |
19759 | result |= 1; | |
19760 | else | |
19761 | { | |
19762 | time_t t0, t2; | |
19763 | struct stat st0, st1, st2; | |
19764 | if (time (&t0) == (time_t) -1) | |
19765 | result |= 1; | |
19766 | else if (fstat (fd, &st0) != 0) | |
19767 | result |= 1; | |
19768 | else if (utimes (file, timeval) != 0) | |
19769 | result |= 2; | |
19770 | else if (utimes (file, NULL) != 0) | |
19771 | result |= 8; | |
19772 | else if (fstat (fd, &st1) != 0) | |
19773 | result |= 1; | |
19774 | else if (write (fd, "\n", 1) != 1) | |
19775 | result |= 1; | |
19776 | else if (fstat (fd, &st2) != 0) | |
19777 | result |= 1; | |
19778 | else if (time (&t2) == (time_t) -1) | |
19779 | result |= 1; | |
19780 | else | |
19781 | { | |
19782 | int m_ok_POSIX = inorder (t0, st1.st_mtime, t2); | |
19783 | int m_ok_NFS = inorder (st0.st_mtime, st1.st_mtime, st2.st_mtime); | |
19784 | if (! (st1.st_atime == st1.st_mtime)) | |
19785 | result |= 16; | |
19786 | if (! (m_ok_POSIX || m_ok_NFS)) | |
19787 | result |= 32; | |
19788 | } | |
19789 | if (close (fd) != 0) | |
19790 | result |= 1; | |
19791 | } | |
19792 | if (unlink (file) != 0) | |
19793 | result |= 1; | |
19794 | } | |
52724a05 | 19795 | |
5476a9a4 GM |
19796 | /* Test whether utimes() with a NULL argument works on read-only files. */ |
19797 | { | |
19798 | int fd = open (file, O_WRONLY|O_CREAT, 0444); | |
19799 | if (fd < 0) | |
19800 | result |= 1; | |
19801 | else if (close (fd) != 0) | |
19802 | result |= 1; | |
19803 | else if (utimes (file, NULL) != 0) | |
19804 | result |= 64; | |
19805 | if (unlink (file) != 0) | |
19806 | result |= 1; | |
19807 | } | |
1fd182f0 | 19808 | |
5476a9a4 GM |
19809 | return result; |
19810 | } | |
1fd182f0 | 19811 | |
5476a9a4 GM |
19812 | _ACEOF |
19813 | if ac_fn_c_try_run "$LINENO"; then : | |
19814 | gl_cv_func_working_utimes=yes | |
19815 | else | |
19816 | gl_cv_func_working_utimes=no | |
19817 | fi | |
19818 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
19819 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
f199cab1 | 19820 | fi |
1fd182f0 | 19821 | |
5476a9a4 GM |
19822 | fi |
19823 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_utimes" >&5 | |
19824 | $as_echo "$gl_cv_func_working_utimes" >&6; } | |
1fd182f0 | 19825 | |
5476a9a4 | 19826 | if test $gl_cv_func_working_utimes = yes; then |
1fd182f0 | 19827 | |
5476a9a4 | 19828 | $as_echo "#define HAVE_WORKING_UTIMES 1" >>confdefs.h |
1fd182f0 | 19829 | |
5476a9a4 | 19830 | fi |
1fd182f0 | 19831 | |
1fd182f0 | 19832 | |
1fd182f0 | 19833 | |
1fd182f0 | 19834 | |
1fd182f0 | 19835 | |
5476a9a4 GM |
19836 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct utimbuf" >&5 |
19837 | $as_echo_n "checking for struct utimbuf... " >&6; } | |
19838 | if test "${gl_cv_sys_struct_utimbuf+set}" = set; then : | |
19839 | $as_echo_n "(cached) " >&6 | |
19840 | else | |
19841 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
19842 | /* end confdefs.h. */ | |
19843 | #if HAVE_SYS_TIME_H | |
19844 | #include <sys/time.h> | |
19845 | #endif | |
19846 | #include <time.h> | |
19847 | #ifdef HAVE_UTIME_H | |
19848 | #include <utime.h> | |
19849 | #endif | |
1fd182f0 | 19850 | |
5476a9a4 GM |
19851 | int |
19852 | main () | |
19853 | { | |
19854 | static struct utimbuf x; x.actime = x.modtime; | |
19855 | ; | |
19856 | return 0; | |
19857 | } | |
19858 | _ACEOF | |
19859 | if ac_fn_c_try_compile "$LINENO"; then : | |
19860 | gl_cv_sys_struct_utimbuf=yes | |
19861 | else | |
19862 | gl_cv_sys_struct_utimbuf=no | |
f199cab1 | 19863 | fi |
5476a9a4 | 19864 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
f199cab1 | 19865 | fi |
5476a9a4 GM |
19866 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_utimbuf" >&5 |
19867 | $as_echo "$gl_cv_sys_struct_utimbuf" >&6; } | |
1fd182f0 | 19868 | |
5476a9a4 | 19869 | if test $gl_cv_sys_struct_utimbuf = yes; then |
1fd182f0 | 19870 | |
5476a9a4 | 19871 | $as_echo "#define HAVE_STRUCT_UTIMBUF 1" >>confdefs.h |
1fd182f0 | 19872 | |
5476a9a4 | 19873 | fi |
1fd182f0 | 19874 | |
1fd182f0 | 19875 | |
1fd182f0 | 19876 | |
1fd182f0 | 19877 | |
1fd182f0 | 19878 | |
1fd182f0 | 19879 | |
1fd182f0 | 19880 | |
3e0be4ab | 19881 | |
f199cab1 | 19882 | |
f199cab1 | 19883 | |
067d23c9 | 19884 | |
067d23c9 | 19885 | |
5476a9a4 GM |
19886 | if false; then |
19887 | GL_COND_LIBTOOL_TRUE= | |
19888 | GL_COND_LIBTOOL_FALSE='#' | |
19889 | else | |
19890 | GL_COND_LIBTOOL_TRUE='#' | |
19891 | GL_COND_LIBTOOL_FALSE= | |
1fd182f0 | 19892 | fi |
067d23c9 | 19893 | |
5476a9a4 GM |
19894 | gl_cond_libtool=false |
19895 | gl_libdeps= | |
19896 | gl_ltlibdeps= | |
19897 | gl_m4_base='m4' | |
067d23c9 | 19898 | |
f199cab1 | 19899 | |
f199cab1 | 19900 | |
f199cab1 | 19901 | |
067d23c9 | 19902 | |
f199cab1 | 19903 | |
f199cab1 | 19904 | |
f199cab1 | 19905 | |
067d23c9 | 19906 | |
5476a9a4 | 19907 | gl_source_base='lib' |
cc322c06 GM |
19908 | |
19909 | ||
5476a9a4 GM |
19910 | if test $ac_cv_func_alloca_works = no; then |
19911 | : | |
f199cab1 | 19912 | fi |
cc322c06 | 19913 | |
5476a9a4 GM |
19914 | # Define an additional variable used in the Makefile substitution. |
19915 | if test $ac_cv_working_alloca_h = yes; then | |
19916 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5 | |
19917 | $as_echo_n "checking for alloca as a compiler built-in... " >&6; } | |
19918 | if test "${gl_cv_rpl_alloca+set}" = set; then : | |
19919 | $as_echo_n "(cached) " >&6 | |
19920 | else | |
cc322c06 | 19921 | |
5476a9a4 GM |
19922 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
19923 | /* end confdefs.h. */ | |
067d23c9 | 19924 | |
5476a9a4 GM |
19925 | #if defined __GNUC__ || defined _AIX || defined _MSC_VER |
19926 | Need own alloca | |
19927 | #endif | |
067d23c9 | 19928 | |
f199cab1 | 19929 | _ACEOF |
5476a9a4 GM |
19930 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
19931 | $EGREP "Need own alloca" >/dev/null 2>&1; then : | |
19932 | gl_cv_rpl_alloca=yes | |
19933 | else | |
19934 | gl_cv_rpl_alloca=no | |
369e19fc | 19935 | fi |
5476a9a4 | 19936 | rm -f conftest* |
067d23c9 | 19937 | |
ae0d7250 | 19938 | |
5476a9a4 GM |
19939 | fi |
19940 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5 | |
19941 | $as_echo "$gl_cv_rpl_alloca" >&6; } | |
19942 | if test $gl_cv_rpl_alloca = yes; then | |
52724a05 | 19943 | |
5476a9a4 | 19944 | $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h |
ae0d7250 | 19945 | |
5476a9a4 GM |
19946 | ALLOCA_H=alloca.h |
19947 | else | |
19948 | ALLOCA_H= | |
19949 | fi | |
f199cab1 | 19950 | else |
5476a9a4 GM |
19951 | ALLOCA_H=alloca.h |
19952 | fi | |
ae0d7250 | 19953 | |
5476a9a4 GM |
19954 | if test -n "$ALLOCA_H"; then |
19955 | GL_GENERATE_ALLOCA_H_TRUE= | |
19956 | GL_GENERATE_ALLOCA_H_FALSE='#' | |
19957 | else | |
19958 | GL_GENERATE_ALLOCA_H_TRUE='#' | |
19959 | GL_GENERATE_ALLOCA_H_FALSE= | |
19960 | fi | |
f199cab1 | 19961 | |
ae0d7250 PE |
19962 | |
19963 | ||
19964 | ||
19965 | ||
19966 | ||
5476a9a4 GM |
19967 | # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function. |
19968 | # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4. | |
ae0d7250 | 19969 | |
5476a9a4 GM |
19970 | # Save and restore LIBS so e.g., -lrt, isn't added to it. Otherwise, *all* |
19971 | # programs in the package would end up linked with that potentially-shared | |
19972 | # library, inducing unnecessary run-time overhead. | |
19973 | LIB_CLOCK_GETTIME= | |
ae0d7250 | 19974 | |
5476a9a4 GM |
19975 | gl_saved_libs=$LIBS |
19976 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5 | |
19977 | $as_echo_n "checking for library containing clock_gettime... " >&6; } | |
19978 | if test "${ac_cv_search_clock_gettime+set}" = set; then : | |
19979 | $as_echo_n "(cached) " >&6 | |
19980 | else | |
19981 | ac_func_search_save_LIBS=$LIBS | |
19982 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
19983 | /* end confdefs.h. */ | |
19984 | ||
19985 | /* Override any GCC internal prototype to avoid an error. | |
19986 | Use char because int might match the return type of a GCC | |
19987 | builtin and then its argument prototype would still apply. */ | |
19988 | #ifdef __cplusplus | |
19989 | extern "C" | |
19990 | #endif | |
19991 | char clock_gettime (); | |
19992 | int | |
19993 | main () | |
19994 | { | |
19995 | return clock_gettime (); | |
19996 | ; | |
19997 | return 0; | |
19998 | } | |
19999 | _ACEOF | |
20000 | for ac_lib in '' rt posix4; do | |
20001 | if test -z "$ac_lib"; then | |
20002 | ac_res="none required" | |
20003 | else | |
20004 | ac_res=-l$ac_lib | |
20005 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
20006 | fi | |
20007 | if ac_fn_c_try_link "$LINENO"; then : | |
20008 | ac_cv_search_clock_gettime=$ac_res | |
f199cab1 | 20009 | fi |
5476a9a4 GM |
20010 | rm -f core conftest.err conftest.$ac_objext \ |
20011 | conftest$ac_exeext | |
20012 | if test "${ac_cv_search_clock_gettime+set}" = set; then : | |
20013 | break | |
20014 | fi | |
20015 | done | |
20016 | if test "${ac_cv_search_clock_gettime+set}" = set; then : | |
ae0d7250 | 20017 | |
5476a9a4 GM |
20018 | else |
20019 | ac_cv_search_clock_gettime=no | |
20020 | fi | |
20021 | rm conftest.$ac_ext | |
20022 | LIBS=$ac_func_search_save_LIBS | |
20023 | fi | |
20024 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5 | |
20025 | $as_echo "$ac_cv_search_clock_gettime" >&6; } | |
20026 | ac_res=$ac_cv_search_clock_gettime | |
20027 | if test "$ac_res" != no; then : | |
20028 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
20029 | test "$ac_cv_search_clock_gettime" = "none required" || | |
20030 | LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime | |
20031 | fi | |
ae0d7250 | 20032 | |
5476a9a4 GM |
20033 | for ac_func in clock_gettime clock_settime |
20034 | do : | |
20035 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
20036 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
20037 | eval as_val=\$$as_ac_var | |
20038 | if test "x$as_val" = x""yes; then : | |
20039 | cat >>confdefs.h <<_ACEOF | |
20040 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
20041 | _ACEOF | |
ae0d7250 | 20042 | |
5476a9a4 GM |
20043 | fi |
20044 | done | |
ae0d7250 | 20045 | |
5476a9a4 | 20046 | LIBS=$gl_saved_libs |
3e0be4ab GM |
20047 | |
20048 | ||
3e0be4ab | 20049 | |
3e0be4ab | 20050 | |
5476a9a4 | 20051 | : |
3e0be4ab | 20052 | |
f199cab1 | 20053 | |
f199cab1 | 20054 | |
f199cab1 | 20055 | |
5476a9a4 | 20056 | : |
3e0be4ab | 20057 | |
f199cab1 | 20058 | |
f199cab1 | 20059 | |
3e0be4ab | 20060 | |
f199cab1 GM |
20061 | |
20062 | ||
20063 | ||
5476a9a4 GM |
20064 | |
20065 | ||
20066 | ||
20067 | ||
20068 | ||
20069 | ||
20070 | ||
20071 | ||
20072 | $as_echo "#define HAVE_DUP2 1" >>confdefs.h | |
20073 | ||
20074 | ||
20075 | if test $HAVE_DUP2 = 1; then | |
20076 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5 | |
20077 | $as_echo_n "checking whether dup2 works... " >&6; } | |
20078 | if test "${gl_cv_func_dup2_works+set}" = set; then : | |
3e0be4ab GM |
20079 | $as_echo_n "(cached) " >&6 |
20080 | else | |
5476a9a4 GM |
20081 | if test "$cross_compiling" = yes; then : |
20082 | case "$host_os" in | |
20083 | mingw*) # on this platform, dup2 always returns 0 for success | |
20084 | gl_cv_func_dup2_works="guessing no" ;; | |
20085 | cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0 | |
20086 | gl_cv_func_dup2_works="guessing no" ;; | |
20087 | linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a | |
20088 | # closed fd may yield -EBADF instead of -1 / errno=EBADF. | |
20089 | gl_cv_func_dup2_works="guessing no" ;; | |
20090 | freebsd*) # on FreeBSD 6.1, dup2(1,1000000) gives EMFILE, not EBADF. | |
20091 | gl_cv_func_dup2_works="guessing no" ;; | |
20092 | haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC. | |
20093 | gl_cv_func_dup2_works="guessing no" ;; | |
20094 | *) gl_cv_func_dup2_works="guessing yes" ;; | |
20095 | esac | |
20096 | else | |
20097 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3e0be4ab | 20098 | /* end confdefs.h. */ |
ae0d7250 | 20099 | |
5476a9a4 GM |
20100 | #include <unistd.h> |
20101 | #include <fcntl.h> | |
20102 | #include <errno.h> | |
3e0be4ab GM |
20103 | int |
20104 | main () | |
20105 | { | |
5476a9a4 GM |
20106 | int result = 0; |
20107 | #ifdef FD_CLOEXEC | |
20108 | if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1) | |
20109 | result |= 1; | |
20110 | #endif | |
20111 | if (dup2 (1, 1) == 0) | |
20112 | result |= 2; | |
20113 | #ifdef FD_CLOEXEC | |
20114 | if (fcntl (1, F_GETFD) != FD_CLOEXEC) | |
20115 | result |= 4; | |
20116 | #endif | |
20117 | close (0); | |
20118 | if (dup2 (0, 0) != -1) | |
20119 | result |= 8; | |
20120 | /* Many gnulib modules require POSIX conformance of EBADF. */ | |
20121 | if (dup2 (2, 1000000) == -1 && errno != EBADF) | |
20122 | result |= 16; | |
20123 | return result; | |
20124 | ||
ae0d7250 PE |
20125 | ; |
20126 | return 0; | |
20127 | } | |
5476a9a4 | 20128 | |
ae0d7250 | 20129 | _ACEOF |
5476a9a4 GM |
20130 | if ac_fn_c_try_run "$LINENO"; then : |
20131 | gl_cv_func_dup2_works=yes | |
ae0d7250 | 20132 | else |
5476a9a4 | 20133 | gl_cv_func_dup2_works=no |
ae0d7250 | 20134 | fi |
5476a9a4 GM |
20135 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
20136 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
ae0d7250 | 20137 | fi |
5476a9a4 GM |
20138 | |
20139 | ||
3e0be4ab | 20140 | fi |
5476a9a4 GM |
20141 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5 |
20142 | $as_echo "$gl_cv_func_dup2_works" >&6; } | |
20143 | case "$gl_cv_func_dup2_works" in | |
20144 | *yes) ;; | |
20145 | *) | |
20146 | REPLACE_DUP2=1 | |
20147 | ;; | |
20148 | esac | |
20149 | fi | |
3e0be4ab | 20150 | |
3e0be4ab | 20151 | |
a6342fc8 | 20152 | if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then |
f199cab1 | 20153 | |
f199cab1 GM |
20154 | |
20155 | ||
f199cab1 | 20156 | |
f199cab1 | 20157 | |
f199cab1 | 20158 | |
f199cab1 | 20159 | |
f199cab1 | 20160 | |
5476a9a4 | 20161 | gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext" |
f199cab1 GM |
20162 | |
20163 | ||
a6342fc8 | 20164 | fi |
f199cab1 | 20165 | |
f199cab1 | 20166 | |
f199cab1 | 20167 | |
f199cab1 | 20168 | |
f199cab1 | 20169 | |
5476a9a4 | 20170 | GNULIB_DUP2=1 |
f199cab1 GM |
20171 | |
20172 | ||
f199cab1 | 20173 | |
f199cab1 | 20174 | |
3e0be4ab | 20175 | |
3e0be4ab | 20176 | |
f199cab1 GM |
20177 | |
20178 | ||
ae0d7250 | 20179 | |
ae0d7250 | 20180 | |
5476a9a4 | 20181 | |
93131e11 GM |
20182 | GNULIB_ENVIRON=1 |
20183 | ||
20184 | ||
20185 | ||
20186 | ||
20187 | ||
20188 | ||
20189 | ||
20190 | ||
8966cbff GM |
20191 | LIB_EXECINFO='' |
20192 | EXECINFO_H='execinfo.h' | |
20193 | ||
20194 | if test $ac_cv_header_execinfo_h = yes; then | |
20195 | gl_saved_libs=$LIBS | |
20196 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing backtrace_symbols_fd" >&5 | |
20197 | $as_echo_n "checking for library containing backtrace_symbols_fd... " >&6; } | |
20198 | if test "${ac_cv_search_backtrace_symbols_fd+set}" = set; then : | |
20199 | $as_echo_n "(cached) " >&6 | |
20200 | else | |
20201 | ac_func_search_save_LIBS=$LIBS | |
20202 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
20203 | /* end confdefs.h. */ | |
20204 | ||
20205 | /* Override any GCC internal prototype to avoid an error. | |
20206 | Use char because int might match the return type of a GCC | |
20207 | builtin and then its argument prototype would still apply. */ | |
20208 | #ifdef __cplusplus | |
20209 | extern "C" | |
20210 | #endif | |
20211 | char backtrace_symbols_fd (); | |
20212 | int | |
20213 | main () | |
20214 | { | |
20215 | return backtrace_symbols_fd (); | |
20216 | ; | |
20217 | return 0; | |
20218 | } | |
20219 | _ACEOF | |
20220 | for ac_lib in '' execinfo; do | |
20221 | if test -z "$ac_lib"; then | |
20222 | ac_res="none required" | |
20223 | else | |
20224 | ac_res=-l$ac_lib | |
20225 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
20226 | fi | |
20227 | if ac_fn_c_try_link "$LINENO"; then : | |
20228 | ac_cv_search_backtrace_symbols_fd=$ac_res | |
20229 | fi | |
20230 | rm -f core conftest.err conftest.$ac_objext \ | |
20231 | conftest$ac_exeext | |
20232 | if test "${ac_cv_search_backtrace_symbols_fd+set}" = set; then : | |
20233 | break | |
20234 | fi | |
20235 | done | |
20236 | if test "${ac_cv_search_backtrace_symbols_fd+set}" = set; then : | |
20237 | ||
20238 | else | |
20239 | ac_cv_search_backtrace_symbols_fd=no | |
20240 | fi | |
20241 | rm conftest.$ac_ext | |
20242 | LIBS=$ac_func_search_save_LIBS | |
20243 | fi | |
20244 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_backtrace_symbols_fd" >&5 | |
20245 | $as_echo "$ac_cv_search_backtrace_symbols_fd" >&6; } | |
20246 | ac_res=$ac_cv_search_backtrace_symbols_fd | |
20247 | if test "$ac_res" != no; then : | |
20248 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
20249 | test "$ac_cv_search_backtrace_symbols_fd" = "none required" || | |
20250 | LIB_EXECINFO=$ac_cv_search_backtrace_symbols_fd | |
20251 | fi | |
20252 | ||
20253 | LIBS=$gl_saved_libs | |
20254 | test "$ac_cv_search_backtrace_symbols_fd" = no || EXECINFO_H='' | |
20255 | fi | |
20256 | ||
20257 | if test -n "$EXECINFO_H"; then | |
20258 | ||
20259 | ||
20260 | ||
20261 | ||
20262 | ||
20263 | ||
20264 | ||
20265 | ||
20266 | gl_LIBOBJS="$gl_LIBOBJS execinfo.$ac_objext" | |
20267 | ||
20268 | fi | |
20269 | ||
20270 | ||
20271 | ||
20272 | if test -n "$EXECINFO_H"; then | |
20273 | GL_GENERATE_EXECINFO_H_TRUE= | |
20274 | GL_GENERATE_EXECINFO_H_FALSE='#' | |
20275 | else | |
20276 | GL_GENERATE_EXECINFO_H_TRUE='#' | |
20277 | GL_GENERATE_EXECINFO_H_FALSE= | |
20278 | fi | |
20279 | ||
20280 | ||
20281 | ||
20282 | ||
20283 | ||
93131e11 GM |
20284 | |
20285 | ||
20286 | ||
7cd2ed2c | 20287 | |
5476a9a4 GM |
20288 | # Persuade glibc <stdlib.h> to declare getloadavg(). |
20289 | ||
20290 | ||
20291 | gl_save_LIBS=$LIBS | |
20292 | ||
20293 | # getloadvg is present in libc on glibc >= 2.2, Mac OS X, FreeBSD >= 2.0, | |
20294 | # NetBSD >= 0.9, OpenBSD >= 2.0, Solaris >= 7. | |
20295 | HAVE_GETLOADAVG=1 | |
20296 | ac_fn_c_check_func "$LINENO" "getloadavg" "ac_cv_func_getloadavg" | |
20297 | if test "x$ac_cv_func_getloadavg" = x""yes; then : | |
20298 | ||
20299 | else | |
20300 | gl_func_getloadavg_done=no | |
20301 | ||
20302 | # Some systems with -lutil have (and need) -lkvm as well, some do not. | |
20303 | # On Solaris, -lkvm requires nlist from -lelf, so check that first | |
20304 | # to get the right answer into the cache. | |
20305 | # For kstat on solaris, we need to test for libelf and libkvm to force the | |
20306 | # definition of SVR4 below. | |
20307 | if test $gl_func_getloadavg_done = no; then | |
20308 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_begin in -lelf" >&5 | |
20309 | $as_echo_n "checking for elf_begin in -lelf... " >&6; } | |
20310 | if test "${ac_cv_lib_elf_elf_begin+set}" = set; then : | |
6ad6792b GM |
20311 | $as_echo_n "(cached) " >&6 |
20312 | else | |
3e0be4ab | 20313 | ac_check_lib_save_LIBS=$LIBS |
5476a9a4 | 20314 | LIBS="-lelf $LIBS" |
3e0be4ab | 20315 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
6ad6792b | 20316 | /* end confdefs.h. */ |
6ad6792b | 20317 | |
3e0be4ab GM |
20318 | /* Override any GCC internal prototype to avoid an error. |
20319 | Use char because int might match the return type of a GCC | |
20320 | builtin and then its argument prototype would still apply. */ | |
20321 | #ifdef __cplusplus | |
20322 | extern "C" | |
20323 | #endif | |
5476a9a4 | 20324 | char elf_begin (); |
6ad6792b GM |
20325 | int |
20326 | main () | |
20327 | { | |
5476a9a4 | 20328 | return elf_begin (); |
6ad6792b GM |
20329 | ; |
20330 | return 0; | |
20331 | } | |
20332 | _ACEOF | |
3e0be4ab | 20333 | if ac_fn_c_try_link "$LINENO"; then : |
5476a9a4 | 20334 | ac_cv_lib_elf_elf_begin=yes |
3e0be4ab | 20335 | else |
5476a9a4 | 20336 | ac_cv_lib_elf_elf_begin=no |
6ad6792b | 20337 | fi |
3e0be4ab GM |
20338 | rm -f core conftest.err conftest.$ac_objext \ |
20339 | conftest$ac_exeext conftest.$ac_ext | |
20340 | LIBS=$ac_check_lib_save_LIBS | |
6ad6792b | 20341 | fi |
5476a9a4 GM |
20342 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_elf_elf_begin" >&5 |
20343 | $as_echo "$ac_cv_lib_elf_elf_begin" >&6; } | |
20344 | if test "x$ac_cv_lib_elf_elf_begin" = x""yes; then : | |
20345 | LIBS="-lelf $LIBS" | |
6ad6792b GM |
20346 | fi |
20347 | ||
5476a9a4 GM |
20348 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kvm_open in -lkvm" >&5 |
20349 | $as_echo_n "checking for kvm_open in -lkvm... " >&6; } | |
20350 | if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then : | |
6c051bab GM |
20351 | $as_echo_n "(cached) " >&6 |
20352 | else | |
5476a9a4 GM |
20353 | ac_check_lib_save_LIBS=$LIBS |
20354 | LIBS="-lkvm $LIBS" | |
20355 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6c051bab | 20356 | /* end confdefs.h. */ |
3e0be4ab | 20357 | |
5476a9a4 GM |
20358 | /* Override any GCC internal prototype to avoid an error. |
20359 | Use char because int might match the return type of a GCC | |
20360 | builtin and then its argument prototype would still apply. */ | |
20361 | #ifdef __cplusplus | |
20362 | extern "C" | |
20363 | #endif | |
20364 | char kvm_open (); | |
6c051bab GM |
20365 | int |
20366 | main () | |
20367 | { | |
5476a9a4 | 20368 | return kvm_open (); |
6c051bab GM |
20369 | ; |
20370 | return 0; | |
20371 | } | |
20372 | _ACEOF | |
3e0be4ab | 20373 | if ac_fn_c_try_link "$LINENO"; then : |
5476a9a4 | 20374 | ac_cv_lib_kvm_kvm_open=yes |
6c051bab | 20375 | else |
5476a9a4 | 20376 | ac_cv_lib_kvm_kvm_open=no |
6c051bab | 20377 | fi |
3e0be4ab GM |
20378 | rm -f core conftest.err conftest.$ac_objext \ |
20379 | conftest$ac_exeext conftest.$ac_ext | |
5476a9a4 | 20380 | LIBS=$ac_check_lib_save_LIBS |
6c051bab | 20381 | fi |
5476a9a4 GM |
20382 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kvm_kvm_open" >&5 |
20383 | $as_echo "$ac_cv_lib_kvm_kvm_open" >&6; } | |
20384 | if test "x$ac_cv_lib_kvm_kvm_open" = x""yes; then : | |
20385 | LIBS="-lkvm $LIBS" | |
3e0be4ab | 20386 | fi |
6c051bab | 20387 | |
5476a9a4 GM |
20388 | # Check for the 4.4BSD definition of getloadavg. |
20389 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lutil" >&5 | |
20390 | $as_echo_n "checking for getloadavg in -lutil... " >&6; } | |
20391 | if test "${ac_cv_lib_util_getloadavg+set}" = set; then : | |
ae0d7250 PE |
20392 | $as_echo_n "(cached) " >&6 |
20393 | else | |
5476a9a4 GM |
20394 | ac_check_lib_save_LIBS=$LIBS |
20395 | LIBS="-lutil $LIBS" | |
20396 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6d153f56 | 20397 | /* end confdefs.h. */ |
5476a9a4 GM |
20398 | |
20399 | /* Override any GCC internal prototype to avoid an error. | |
20400 | Use char because int might match the return type of a GCC | |
20401 | builtin and then its argument prototype would still apply. */ | |
20402 | #ifdef __cplusplus | |
20403 | extern "C" | |
20404 | #endif | |
20405 | char getloadavg (); | |
ae0d7250 PE |
20406 | int |
20407 | main () | |
20408 | { | |
5476a9a4 | 20409 | return getloadavg (); |
ae0d7250 PE |
20410 | ; |
20411 | return 0; | |
20412 | } | |
20413 | _ACEOF | |
3e0be4ab | 20414 | if ac_fn_c_try_link "$LINENO"; then : |
5476a9a4 | 20415 | ac_cv_lib_util_getloadavg=yes |
ae0d7250 | 20416 | else |
5476a9a4 | 20417 | ac_cv_lib_util_getloadavg=no |
ae0d7250 | 20418 | fi |
3e0be4ab GM |
20419 | rm -f core conftest.err conftest.$ac_objext \ |
20420 | conftest$ac_exeext conftest.$ac_ext | |
5476a9a4 GM |
20421 | LIBS=$ac_check_lib_save_LIBS |
20422 | fi | |
20423 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_getloadavg" >&5 | |
20424 | $as_echo "$ac_cv_lib_util_getloadavg" >&6; } | |
20425 | if test "x$ac_cv_lib_util_getloadavg" = x""yes; then : | |
20426 | LIBS="-lutil $LIBS" gl_func_getloadavg_done=yes | |
3e0be4ab | 20427 | fi |
6d153f56 | 20428 | |
5476a9a4 | 20429 | fi |
6d153f56 | 20430 | |
5476a9a4 GM |
20431 | if test $gl_func_getloadavg_done = no; then |
20432 | # There is a commonly available library for RS/6000 AIX. | |
20433 | # Since it is not a standard part of AIX, it might be installed locally. | |
20434 | gl_getloadavg_LIBS=$LIBS | |
20435 | LIBS="-L/usr/local/lib $LIBS" | |
20436 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lgetloadavg" >&5 | |
20437 | $as_echo_n "checking for getloadavg in -lgetloadavg... " >&6; } | |
20438 | if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then : | |
f199cab1 | 20439 | $as_echo_n "(cached) " >&6 |
3e0be4ab | 20440 | else |
f199cab1 | 20441 | ac_check_lib_save_LIBS=$LIBS |
5476a9a4 | 20442 | LIBS="-lgetloadavg $LIBS" |
f199cab1 GM |
20443 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
20444 | /* end confdefs.h. */ | |
3e0be4ab | 20445 | |
f199cab1 GM |
20446 | /* Override any GCC internal prototype to avoid an error. |
20447 | Use char because int might match the return type of a GCC | |
20448 | builtin and then its argument prototype would still apply. */ | |
20449 | #ifdef __cplusplus | |
20450 | extern "C" | |
20451 | #endif | |
5476a9a4 | 20452 | char getloadavg (); |
f199cab1 GM |
20453 | int |
20454 | main () | |
20455 | { | |
5476a9a4 | 20456 | return getloadavg (); |
f199cab1 GM |
20457 | ; |
20458 | return 0; | |
20459 | } | |
ae0d7250 | 20460 | _ACEOF |
f199cab1 | 20461 | if ac_fn_c_try_link "$LINENO"; then : |
5476a9a4 | 20462 | ac_cv_lib_getloadavg_getloadavg=yes |
f199cab1 | 20463 | else |
5476a9a4 | 20464 | ac_cv_lib_getloadavg_getloadavg=no |
ae0d7250 | 20465 | fi |
f199cab1 GM |
20466 | rm -f core conftest.err conftest.$ac_objext \ |
20467 | conftest$ac_exeext conftest.$ac_ext | |
20468 | LIBS=$ac_check_lib_save_LIBS | |
3e0be4ab | 20469 | fi |
5476a9a4 GM |
20470 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_getloadavg_getloadavg" >&5 |
20471 | $as_echo "$ac_cv_lib_getloadavg_getloadavg" >&6; } | |
20472 | if test "x$ac_cv_lib_getloadavg_getloadavg" = x""yes; then : | |
20473 | LIBS="-lgetloadavg $LIBS" gl_func_getloadavg_done=yes | |
20474 | else | |
20475 | LIBS=$gl_getloadavg_LIBS | |
6d153f56 | 20476 | fi |
ae0d7250 | 20477 | |
5476a9a4 | 20478 | fi |
16c3e636 | 20479 | |
5476a9a4 GM |
20480 | # Set up the replacement function if necessary. |
20481 | if test $gl_func_getloadavg_done = no; then | |
20482 | HAVE_GETLOADAVG=0 | |
16c3e636 | 20483 | |
5476a9a4 GM |
20484 | # Solaris has libkstat which does not require root. |
20485 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kstat_open in -lkstat" >&5 | |
20486 | $as_echo_n "checking for kstat_open in -lkstat... " >&6; } | |
20487 | if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then : | |
f199cab1 GM |
20488 | $as_echo_n "(cached) " >&6 |
20489 | else | |
20490 | ac_check_lib_save_LIBS=$LIBS | |
5476a9a4 | 20491 | LIBS="-lkstat $LIBS" |
f199cab1 GM |
20492 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
20493 | /* end confdefs.h. */ | |
5f90be1b | 20494 | |
f199cab1 GM |
20495 | /* Override any GCC internal prototype to avoid an error. |
20496 | Use char because int might match the return type of a GCC | |
20497 | builtin and then its argument prototype would still apply. */ | |
20498 | #ifdef __cplusplus | |
20499 | extern "C" | |
20500 | #endif | |
5476a9a4 | 20501 | char kstat_open (); |
f199cab1 GM |
20502 | int |
20503 | main () | |
20504 | { | |
5476a9a4 | 20505 | return kstat_open (); |
f199cab1 GM |
20506 | ; |
20507 | return 0; | |
20508 | } | |
3e0be4ab | 20509 | _ACEOF |
f199cab1 | 20510 | if ac_fn_c_try_link "$LINENO"; then : |
5476a9a4 | 20511 | ac_cv_lib_kstat_kstat_open=yes |
f199cab1 | 20512 | else |
5476a9a4 | 20513 | ac_cv_lib_kstat_kstat_open=no |
5f90be1b | 20514 | fi |
f199cab1 GM |
20515 | rm -f core conftest.err conftest.$ac_objext \ |
20516 | conftest$ac_exeext conftest.$ac_ext | |
20517 | LIBS=$ac_check_lib_save_LIBS | |
3e0be4ab | 20518 | fi |
5476a9a4 GM |
20519 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kstat_kstat_open" >&5 |
20520 | $as_echo "$ac_cv_lib_kstat_kstat_open" >&6; } | |
20521 | if test "x$ac_cv_lib_kstat_kstat_open" = x""yes; then : | |
3e0be4ab | 20522 | cat >>confdefs.h <<_ACEOF |
5476a9a4 | 20523 | #define HAVE_LIBKSTAT 1 |
3e0be4ab | 20524 | _ACEOF |
5f90be1b | 20525 | |
5476a9a4 | 20526 | LIBS="-lkstat $LIBS" |
5f90be1b | 20527 | |
f199cab1 | 20528 | fi |
5f90be1b | 20529 | |
5476a9a4 | 20530 | test $ac_cv_lib_kstat_kstat_open = yes && gl_func_getloadavg_done=yes |
da6c8463 | 20531 | |
5476a9a4 GM |
20532 | # AIX has libperfstat which does not require root |
20533 | if test $gl_func_getloadavg_done = no; then | |
20534 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for perfstat_cpu_total in -lperfstat" >&5 | |
20535 | $as_echo_n "checking for perfstat_cpu_total in -lperfstat... " >&6; } | |
20536 | if test "${ac_cv_lib_perfstat_perfstat_cpu_total+set}" = set; then : | |
f199cab1 GM |
20537 | $as_echo_n "(cached) " >&6 |
20538 | else | |
5476a9a4 GM |
20539 | ac_check_lib_save_LIBS=$LIBS |
20540 | LIBS="-lperfstat $LIBS" | |
20541 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5f90be1b | 20542 | /* end confdefs.h. */ |
5476a9a4 GM |
20543 | |
20544 | /* Override any GCC internal prototype to avoid an error. | |
20545 | Use char because int might match the return type of a GCC | |
20546 | builtin and then its argument prototype would still apply. */ | |
20547 | #ifdef __cplusplus | |
20548 | extern "C" | |
20549 | #endif | |
20550 | char perfstat_cpu_total (); | |
5f90be1b PE |
20551 | int |
20552 | main () | |
20553 | { | |
5476a9a4 | 20554 | return perfstat_cpu_total (); |
5f90be1b PE |
20555 | ; |
20556 | return 0; | |
20557 | } | |
20558 | _ACEOF | |
5476a9a4 GM |
20559 | if ac_fn_c_try_link "$LINENO"; then : |
20560 | ac_cv_lib_perfstat_perfstat_cpu_total=yes | |
f199cab1 | 20561 | else |
5476a9a4 | 20562 | ac_cv_lib_perfstat_perfstat_cpu_total=no |
f199cab1 | 20563 | fi |
5476a9a4 GM |
20564 | rm -f core conftest.err conftest.$ac_objext \ |
20565 | conftest$ac_exeext conftest.$ac_ext | |
20566 | LIBS=$ac_check_lib_save_LIBS | |
f199cab1 | 20567 | fi |
5476a9a4 GM |
20568 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_perfstat_perfstat_cpu_total" >&5 |
20569 | $as_echo "$ac_cv_lib_perfstat_perfstat_cpu_total" >&6; } | |
20570 | if test "x$ac_cv_lib_perfstat_perfstat_cpu_total" = x""yes; then : | |
20571 | cat >>confdefs.h <<_ACEOF | |
20572 | #define HAVE_LIBPERFSTAT 1 | |
20573 | _ACEOF | |
20574 | ||
20575 | LIBS="-lperfstat $LIBS" | |
20576 | ||
20577 | fi | |
20578 | ||
20579 | test $ac_cv_lib_perfstat_perfstat_cpu_total = yes && gl_func_getloadavg_done=yes | |
20580 | fi | |
20581 | ||
20582 | if test $gl_func_getloadavg_done = no; then | |
20583 | ac_fn_c_check_header_mongrel "$LINENO" "sys/dg_sys_info.h" "ac_cv_header_sys_dg_sys_info_h" "$ac_includes_default" | |
20584 | if test "x$ac_cv_header_sys_dg_sys_info_h" = x""yes; then : | |
20585 | gl_func_getloadavg_done=yes | |
20586 | ||
20587 | $as_echo "#define DGUX 1" >>confdefs.h | |
20588 | ||
20589 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dg_sys_info in -ldgc" >&5 | |
20590 | $as_echo_n "checking for dg_sys_info in -ldgc... " >&6; } | |
20591 | if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then : | |
f199cab1 GM |
20592 | $as_echo_n "(cached) " >&6 |
20593 | else | |
20594 | ac_check_lib_save_LIBS=$LIBS | |
5476a9a4 | 20595 | LIBS="-ldgc $LIBS" |
f199cab1 GM |
20596 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
20597 | /* end confdefs.h. */ | |
3e0be4ab | 20598 | |
f199cab1 GM |
20599 | /* Override any GCC internal prototype to avoid an error. |
20600 | Use char because int might match the return type of a GCC | |
20601 | builtin and then its argument prototype would still apply. */ | |
20602 | #ifdef __cplusplus | |
20603 | extern "C" | |
20604 | #endif | |
5476a9a4 | 20605 | char dg_sys_info (); |
f199cab1 GM |
20606 | int |
20607 | main () | |
20608 | { | |
5476a9a4 | 20609 | return dg_sys_info (); |
f199cab1 GM |
20610 | ; |
20611 | return 0; | |
20612 | } | |
20613 | _ACEOF | |
20614 | if ac_fn_c_try_link "$LINENO"; then : | |
5476a9a4 | 20615 | ac_cv_lib_dgc_dg_sys_info=yes |
f199cab1 | 20616 | else |
5476a9a4 | 20617 | ac_cv_lib_dgc_dg_sys_info=no |
5f90be1b | 20618 | fi |
3e0be4ab GM |
20619 | rm -f core conftest.err conftest.$ac_objext \ |
20620 | conftest$ac_exeext conftest.$ac_ext | |
f199cab1 | 20621 | LIBS=$ac_check_lib_save_LIBS |
5f90be1b | 20622 | fi |
5476a9a4 GM |
20623 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dgc_dg_sys_info" >&5 |
20624 | $as_echo "$ac_cv_lib_dgc_dg_sys_info" >&6; } | |
20625 | if test "x$ac_cv_lib_dgc_dg_sys_info" = x""yes; then : | |
20626 | cat >>confdefs.h <<_ACEOF | |
20627 | #define HAVE_LIBDGC 1 | |
20628 | _ACEOF | |
20629 | ||
20630 | LIBS="-ldgc $LIBS" | |
20631 | ||
da6c8463 GM |
20632 | fi |
20633 | ||
5476a9a4 GM |
20634 | fi |
20635 | ||
20636 | ||
20637 | fi | |
20638 | fi | |
20639 | fi | |
20640 | ||
20641 | ||
20642 | if test "x$gl_save_LIBS" = x; then | |
20643 | GETLOADAVG_LIBS=$LIBS | |
f199cab1 | 20644 | else |
5476a9a4 GM |
20645 | GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$gl_save_LIBS!!"` |
20646 | fi | |
20647 | LIBS=$gl_save_LIBS | |
20648 | ||
20649 | ||
20650 | # Test whether the system declares getloadavg. Solaris has the function | |
20651 | # but declares it in <sys/loadavg.h>, not <stdlib.h>. | |
20652 | for ac_header in sys/loadavg.h | |
20653 | do : | |
20654 | ac_fn_c_check_header_mongrel "$LINENO" "sys/loadavg.h" "ac_cv_header_sys_loadavg_h" "$ac_includes_default" | |
20655 | if test "x$ac_cv_header_sys_loadavg_h" = x""yes; then : | |
20656 | cat >>confdefs.h <<_ACEOF | |
20657 | #define HAVE_SYS_LOADAVG_H 1 | |
f199cab1 | 20658 | _ACEOF |
5476a9a4 | 20659 | |
f199cab1 | 20660 | fi |
5476a9a4 GM |
20661 | |
20662 | done | |
20663 | ||
20664 | if test $ac_cv_header_sys_loadavg_h = yes; then | |
20665 | HAVE_SYS_LOADAVG_H=1 | |
20666 | else | |
20667 | HAVE_SYS_LOADAVG_H=0 | |
f199cab1 | 20668 | fi |
5476a9a4 GM |
20669 | ac_fn_c_check_decl "$LINENO" "getloadavg" "ac_cv_have_decl_getloadavg" "#if HAVE_SYS_LOADAVG_H |
20670 | # include <sys/loadavg.h> | |
20671 | #endif | |
20672 | #include <stdlib.h> | |
20673 | " | |
20674 | if test "x$ac_cv_have_decl_getloadavg" = x""yes; then : | |
5f90be1b | 20675 | |
f199cab1 | 20676 | else |
5476a9a4 | 20677 | HAVE_DECL_GETLOADAVG=0 |
f199cab1 | 20678 | fi |
5f90be1b | 20679 | |
5f90be1b | 20680 | |
a6342fc8 | 20681 | if test $HAVE_GETLOADAVG = 0; then |
5476a9a4 GM |
20682 | |
20683 | ||
20684 | ||
20685 | ||
20686 | ||
20687 | ||
20688 | ||
20689 | ||
20690 | gl_LIBOBJS="$gl_LIBOBJS getloadavg.$ac_objext" | |
20691 | ||
20692 | ||
20693 | # Figure out what our getloadavg.c needs. | |
20694 | ||
20695 | ||
20696 | ||
20697 | # On HPUX9, an unprivileged user can get load averages this way. | |
20698 | if test $gl_func_getloadavg_done = no; then | |
20699 | for ac_func in pstat_getdynamic | |
20700 | do : | |
20701 | ac_fn_c_check_func "$LINENO" "pstat_getdynamic" "ac_cv_func_pstat_getdynamic" | |
20702 | if test "x$ac_cv_func_pstat_getdynamic" = x""yes; then : | |
20703 | cat >>confdefs.h <<_ACEOF | |
20704 | #define HAVE_PSTAT_GETDYNAMIC 1 | |
20705 | _ACEOF | |
20706 | gl_func_getloadavg_done=yes | |
3e0be4ab | 20707 | fi |
5476a9a4 | 20708 | done |
6ad6792b | 20709 | |
5476a9a4 | 20710 | fi |
6ad6792b | 20711 | |
5476a9a4 GM |
20712 | # We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it |
20713 | # uses stabs), but it is still SVR4. We cannot check for <elf.h> because | |
20714 | # Irix 4.0.5F has the header but not the library. | |
20715 | if test $gl_func_getloadavg_done = no && test "$ac_cv_lib_elf_elf_begin" = yes \ | |
20716 | && test "$ac_cv_lib_kvm_kvm_open" = yes; then | |
20717 | gl_func_getloadavg_done=yes | |
6ad6792b | 20718 | |
5476a9a4 | 20719 | $as_echo "#define SVR4 1" >>confdefs.h |
6ad6792b | 20720 | |
5476a9a4 GM |
20721 | fi |
20722 | ||
20723 | if test $gl_func_getloadavg_done = no; then | |
20724 | ac_fn_c_check_header_mongrel "$LINENO" "inq_stats/cpustats.h" "ac_cv_header_inq_stats_cpustats_h" "$ac_includes_default" | |
20725 | if test "x$ac_cv_header_inq_stats_cpustats_h" = x""yes; then : | |
20726 | gl_func_getloadavg_done=yes | |
20727 | ||
20728 | $as_echo "#define UMAX 1" >>confdefs.h | |
20729 | ||
20730 | ||
20731 | $as_echo "#define UMAX4_3 1" >>confdefs.h | |
20732 | ||
20733 | fi | |
20734 | ||
20735 | ||
20736 | fi | |
20737 | ||
20738 | if test $gl_func_getloadavg_done = no; then | |
20739 | ac_fn_c_check_header_mongrel "$LINENO" "sys/cpustats.h" "ac_cv_header_sys_cpustats_h" "$ac_includes_default" | |
20740 | if test "x$ac_cv_header_sys_cpustats_h" = x""yes; then : | |
20741 | gl_func_getloadavg_done=yes; $as_echo "#define UMAX 1" >>confdefs.h | |
20742 | ||
20743 | fi | |
20744 | ||
20745 | ||
20746 | fi | |
20747 | ||
20748 | if test $gl_func_getloadavg_done = no; then | |
20749 | for ac_header in mach/mach.h | |
20750 | do : | |
20751 | ac_fn_c_check_header_mongrel "$LINENO" "mach/mach.h" "ac_cv_header_mach_mach_h" "$ac_includes_default" | |
20752 | if test "x$ac_cv_header_mach_mach_h" = x""yes; then : | |
20753 | cat >>confdefs.h <<_ACEOF | |
20754 | #define HAVE_MACH_MACH_H 1 | |
20755 | _ACEOF | |
20756 | ||
20757 | fi | |
20758 | ||
20759 | done | |
20760 | ||
20761 | fi | |
20762 | ||
20763 | for ac_header in nlist.h | |
20764 | do : | |
20765 | ac_fn_c_check_header_mongrel "$LINENO" "nlist.h" "ac_cv_header_nlist_h" "$ac_includes_default" | |
20766 | if test "x$ac_cv_header_nlist_h" = x""yes; then : | |
20767 | cat >>confdefs.h <<_ACEOF | |
20768 | #define HAVE_NLIST_H 1 | |
20769 | _ACEOF | |
20770 | ac_fn_c_check_member "$LINENO" "struct nlist" "n_un.n_name" "ac_cv_member_struct_nlist_n_un_n_name" "#include <nlist.h> | |
20771 | " | |
20772 | if test "x$ac_cv_member_struct_nlist_n_un_n_name" = x""yes; then : | |
20773 | ||
20774 | cat >>confdefs.h <<_ACEOF | |
20775 | #define HAVE_STRUCT_NLIST_N_UN_N_NAME 1 | |
20776 | _ACEOF | |
6ad6792b | 20777 | |
0eb775a3 | 20778 | |
f199cab1 | 20779 | fi |
3e0be4ab | 20780 | |
5476a9a4 | 20781 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
f199cab1 | 20782 | /* end confdefs.h. */ |
5476a9a4 | 20783 | #include <nlist.h> |
f199cab1 GM |
20784 | int |
20785 | main () | |
20786 | { | |
5476a9a4 GM |
20787 | struct nlist x; |
20788 | #ifdef HAVE_STRUCT_NLIST_N_UN_N_NAME | |
20789 | x.n_un.n_name = ""; | |
20790 | #else | |
20791 | x.n_name = ""; | |
20792 | #endif | |
f199cab1 GM |
20793 | ; |
20794 | return 0; | |
20795 | } | |
20796 | _ACEOF | |
5476a9a4 | 20797 | if ac_fn_c_try_link "$LINENO"; then : |
6ad6792b | 20798 | |
5476a9a4 | 20799 | $as_echo "#define N_NAME_POINTER 1" >>confdefs.h |
6ad6792b GM |
20800 | |
20801 | fi | |
5476a9a4 GM |
20802 | rm -f core conftest.err conftest.$ac_objext \ |
20803 | conftest$ac_exeext conftest.$ac_ext | |
6ad6792b | 20804 | |
5476a9a4 | 20805 | fi |
6ad6792b | 20806 | |
5476a9a4 | 20807 | done |
6ad6792b | 20808 | |
a6342fc8 | 20809 | fi |
ca36e0ff | 20810 | |
ca36e0ff GM |
20811 | |
20812 | ||
1f5d53eb PE |
20813 | |
20814 | ||
5476a9a4 | 20815 | GNULIB_GETLOADAVG=1 |
1f5d53eb PE |
20816 | |
20817 | ||
20818 | ||
20819 | ||
20820 | ||
20821 | ||
20822 | ||
1f5d53eb | 20823 | |
1f5d53eb | 20824 | |
3e0be4ab | 20825 | |
a6342fc8 | 20826 | if test $REPLACE_GETOPT = 1; then |
3e0be4ab | 20827 | |
1f5d53eb PE |
20828 | |
20829 | ||
1f5d53eb | 20830 | |
1f5d53eb PE |
20831 | |
20832 | ||
20833 | ||
20834 | ||
5476a9a4 | 20835 | gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext" |
0eb775a3 GM |
20836 | |
20837 | ||
1f5d53eb PE |
20838 | |
20839 | ||
16c3e636 | 20840 | |
5476a9a4 GM |
20841 | |
20842 | ||
20843 | ||
20844 | ||
20845 | gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext" | |
20846 | ||
20847 | ||
20848 | ||
20849 | ||
a6342fc8 GM |
20850 | GNULIB_GL_UNISTD_H_GETOPT=1 |
20851 | fi | |
16c3e636 PE |
20852 | |
20853 | ||
20854 | ||
4fda9c95 GM |
20855 | |
20856 | ||
20857 | ||
20858 | ||
5476a9a4 GM |
20859 | REPLACE_GETOPT=0 |
20860 | if test -n "$gl_replace_getopt"; then | |
20861 | REPLACE_GETOPT=1 | |
20862 | fi | |
20863 | ||
20864 | if test $REPLACE_GETOPT = 1; then | |
20865 | ||
20866 | GETOPT_H=getopt.h | |
20867 | ||
20868 | $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h | |
20869 | ||
20870 | ||
20871 | ||
20872 | fi | |
20873 | ||
a6342fc8 | 20874 | if test $REPLACE_GETOPT = 1; then |
5476a9a4 GM |
20875 | |
20876 | ||
20877 | ||
20878 | ||
20879 | ||
20880 | ||
20881 | ||
20882 | ||
20883 | gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext" | |
20884 | ||
20885 | ||
20886 | ||
20887 | ||
20888 | ||
20889 | ||
20890 | ||
20891 | ||
20892 | ||
20893 | gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext" | |
4fda9c95 GM |
20894 | |
20895 | ||
20896 | ||
20897 | ||
a6342fc8 GM |
20898 | GNULIB_GL_UNISTD_H_GETOPT=1 |
20899 | fi | |
4fda9c95 GM |
20900 | |
20901 | ||
20902 | ||
20903 | ||
4fda9c95 | 20904 | |
4fda9c95 | 20905 | |
4fda9c95 | 20906 | |
5476a9a4 GM |
20907 | |
20908 | ||
20909 | ||
20910 | ||
20911 | ||
20912 | gl_gettimeofday_timezone=void | |
20913 | if test $ac_cv_func_gettimeofday != yes; then | |
20914 | HAVE_GETTIMEOFDAY=0 | |
f199cab1 | 20915 | else |
4fda9c95 GM |
20916 | |
20917 | ||
3e0be4ab | 20918 | |
5476a9a4 GM |
20919 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5 |
20920 | $as_echo_n "checking whether gettimeofday clobbers localtime buffer... " >&6; } | |
20921 | if test "${gl_cv_func_gettimeofday_clobber+set}" = set; then : | |
20922 | $as_echo_n "(cached) " >&6 | |
20923 | else | |
20924 | if test "$cross_compiling" = yes; then : | |
20925 | # When cross-compiling: | |
20926 | case "$host_os" in | |
20927 | # Guess all is fine on glibc systems. | |
20928 | *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;; | |
20929 | # If we don't know, assume the worst. | |
20930 | *) gl_cv_func_gettimeofday_clobber="guessing yes" ;; | |
20931 | esac | |
4fda9c95 | 20932 | |
5476a9a4 GM |
20933 | else |
20934 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
20935 | /* end confdefs.h. */ | |
20936 | #include <string.h> | |
20937 | #include <sys/time.h> | |
20938 | #include <time.h> | |
20939 | #include <stdlib.h> | |
4fda9c95 | 20940 | |
5476a9a4 GM |
20941 | int |
20942 | main () | |
20943 | { | |
4fda9c95 | 20944 | |
5476a9a4 GM |
20945 | time_t t = 0; |
20946 | struct tm *lt; | |
20947 | struct tm saved_lt; | |
20948 | struct timeval tv; | |
20949 | lt = localtime (&t); | |
20950 | saved_lt = *lt; | |
20951 | gettimeofday (&tv, NULL); | |
20952 | return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0; | |
cc322c06 | 20953 | |
5476a9a4 GM |
20954 | ; |
20955 | return 0; | |
20956 | } | |
20957 | _ACEOF | |
20958 | if ac_fn_c_try_run "$LINENO"; then : | |
20959 | gl_cv_func_gettimeofday_clobber=no | |
20960 | else | |
20961 | gl_cv_func_gettimeofday_clobber=yes | |
20962 | fi | |
20963 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
20964 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
20965 | fi | |
cc322c06 | 20966 | |
5476a9a4 GM |
20967 | fi |
20968 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5 | |
20969 | $as_echo "$gl_cv_func_gettimeofday_clobber" >&6; } | |
cc322c06 | 20970 | |
5476a9a4 GM |
20971 | case "$gl_cv_func_gettimeofday_clobber" in |
20972 | *yes) | |
20973 | REPLACE_GETTIMEOFDAY=1 | |
cc322c06 | 20974 | |
4fda9c95 | 20975 | |
5476a9a4 | 20976 | $as_echo "#define gmtime rpl_gmtime" >>confdefs.h |
4fda9c95 | 20977 | |
ae0d7250 | 20978 | |
5476a9a4 | 20979 | $as_echo "#define localtime rpl_localtime" >>confdefs.h |
ae0d7250 PE |
20980 | |
20981 | ||
ae0d7250 | 20982 | |
5476a9a4 GM |
20983 | $as_echo "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h |
20984 | ||
20985 | ;; | |
20986 | esac | |
20987 | ||
20988 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5 | |
20989 | $as_echo_n "checking for gettimeofday with POSIX signature... " >&6; } | |
20990 | if test "${gl_cv_func_gettimeofday_posix_signature+set}" = set; then : | |
f199cab1 GM |
20991 | $as_echo_n "(cached) " >&6 |
20992 | else | |
5476a9a4 GM |
20993 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
20994 | /* end confdefs.h. */ | |
20995 | #include <sys/time.h> | |
20996 | struct timeval c; | |
20997 | int gettimeofday (struct timeval *restrict, void *restrict); | |
20998 | ||
20999 | int | |
21000 | main () | |
21001 | { | |
21002 | /* glibc uses struct timezone * rather than the POSIX void * | |
21003 | if _GNU_SOURCE is defined. However, since the only portable | |
21004 | use of gettimeofday uses NULL as the second parameter, and | |
21005 | since the glibc definition is actually more typesafe, it is | |
21006 | not worth wrapping this to get a compliant signature. */ | |
21007 | int (*f) (struct timeval *restrict, void *restrict) | |
21008 | = gettimeofday; | |
21009 | int x = f (&c, 0); | |
21010 | return !(x | c.tv_sec | c.tv_usec); | |
21011 | ||
21012 | ; | |
21013 | return 0; | |
21014 | } | |
21015 | _ACEOF | |
21016 | if ac_fn_c_try_compile "$LINENO"; then : | |
21017 | gl_cv_func_gettimeofday_posix_signature=yes | |
21018 | else | |
21019 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
f199cab1 | 21020 | /* end confdefs.h. */ |
5476a9a4 GM |
21021 | #include <sys/time.h> |
21022 | int gettimeofday (struct timeval *restrict, struct timezone *restrict); | |
ae0d7250 | 21023 | |
f199cab1 GM |
21024 | int |
21025 | main () | |
21026 | { | |
5476a9a4 | 21027 | |
f199cab1 GM |
21028 | ; |
21029 | return 0; | |
ae0d7250 PE |
21030 | } |
21031 | _ACEOF | |
5476a9a4 GM |
21032 | if ac_fn_c_try_compile "$LINENO"; then : |
21033 | gl_cv_func_gettimeofday_posix_signature=almost | |
ae0d7250 | 21034 | else |
5476a9a4 | 21035 | gl_cv_func_gettimeofday_posix_signature=no |
ae0d7250 | 21036 | fi |
5476a9a4 | 21037 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
ae0d7250 | 21038 | fi |
5476a9a4 | 21039 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
52724a05 | 21040 | fi |
5476a9a4 GM |
21041 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5 |
21042 | $as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; } | |
21043 | if test $gl_cv_func_gettimeofday_posix_signature = almost; then | |
21044 | gl_gettimeofday_timezone='struct timezone' | |
21045 | elif test $gl_cv_func_gettimeofday_posix_signature != yes; then | |
21046 | REPLACE_GETTIMEOFDAY=1 | |
21047 | fi | |
21048 | if test $REPLACE_STRUCT_TIMEVAL = 1; then | |
21049 | REPLACE_GETTIMEOFDAY=1 | |
21050 | fi | |
3e0be4ab | 21051 | |
5476a9a4 | 21052 | fi |
ae0d7250 | 21053 | |
5476a9a4 GM |
21054 | cat >>confdefs.h <<_ACEOF |
21055 | #define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone | |
21056 | _ACEOF | |
f199cab1 | 21057 | |
ae0d7250 | 21058 | |
a6342fc8 | 21059 | if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then |
ae0d7250 | 21060 | |
cc322c06 GM |
21061 | |
21062 | ||
cc322c06 GM |
21063 | |
21064 | ||
ae0d7250 PE |
21065 | |
21066 | ||
21067 | ||
5476a9a4 | 21068 | gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext" |
5fa4ac76 PE |
21069 | |
21070 | ||
5476a9a4 GM |
21071 | for ac_header in sys/timeb.h |
21072 | do : | |
21073 | ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default" | |
21074 | if test "x$ac_cv_header_sys_timeb_h" = x""yes; then : | |
21075 | cat >>confdefs.h <<_ACEOF | |
21076 | #define HAVE_SYS_TIMEB_H 1 | |
21077 | _ACEOF | |
5fa4ac76 | 21078 | |
3e0be4ab | 21079 | fi |
5fa4ac76 | 21080 | |
5476a9a4 | 21081 | done |
f199cab1 | 21082 | |
5476a9a4 GM |
21083 | for ac_func in _ftime |
21084 | do : | |
21085 | ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime" | |
21086 | if test "x$ac_cv_func__ftime" = x""yes; then : | |
21087 | cat >>confdefs.h <<_ACEOF | |
21088 | #define HAVE__FTIME 1 | |
21089 | _ACEOF | |
5fa4ac76 | 21090 | |
5476a9a4 GM |
21091 | fi |
21092 | done | |
5fa4ac76 PE |
21093 | |
21094 | ||
a6342fc8 | 21095 | fi |
5fa4ac76 PE |
21096 | |
21097 | ||
21098 | ||
21099 | ||
21100 | ||
5476a9a4 | 21101 | GNULIB_GETTIMEOFDAY=1 |
5fa4ac76 PE |
21102 | |
21103 | ||
21104 | ||
21105 | ||
0eb775a3 GM |
21106 | |
21107 | ||
369e19fc PE |
21108 | |
21109 | ||
369e19fc PE |
21110 | |
21111 | ||
5476a9a4 GM |
21112 | if test $ac_cv_func_lstat = yes; then |
21113 | ||
21114 | case "$gl_cv_func_lstat_dereferences_slashed_symlink" in | |
21115 | *no) | |
21116 | REPLACE_LSTAT=1 | |
21117 | ;; | |
21118 | esac | |
21119 | else | |
21120 | HAVE_LSTAT=0 | |
f199cab1 | 21121 | fi |
369e19fc | 21122 | |
a6342fc8 | 21123 | if test $REPLACE_LSTAT = 1; then |
369e19fc | 21124 | |
5fa4ac76 | 21125 | |
369e19fc | 21126 | |
369e19fc | 21127 | |
369e19fc | 21128 | |
369e19fc | 21129 | |
369e19fc | 21130 | |
369e19fc | 21131 | |
5476a9a4 | 21132 | gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext" |
f199cab1 | 21133 | |
f199cab1 | 21134 | |
5fa4ac76 | 21135 | |
5476a9a4 | 21136 | : |
369e19fc | 21137 | |
a6342fc8 | 21138 | fi |
369e19fc | 21139 | |
369e19fc | 21140 | |
369e19fc | 21141 | |
5fa4ac76 PE |
21142 | |
21143 | ||
5476a9a4 | 21144 | GNULIB_LSTAT=1 |
5fa4ac76 | 21145 | |
5fa4ac76 | 21146 | |
27505cf5 | 21147 | |
27505cf5 | 21148 | |
27505cf5 | 21149 | |
27505cf5 | 21150 | |
27505cf5 | 21151 | |
27505cf5 | 21152 | |
5fa4ac76 PE |
21153 | |
21154 | ||
5476a9a4 GM |
21155 | |
21156 | if test $APPLE_UNIVERSAL_BUILD = 1; then | |
21157 | # A universal build on Apple Mac OS X platforms. | |
21158 | # The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode. | |
21159 | # But we need a configuration result that is valid in both modes. | |
21160 | gl_cv_func_working_mktime=no | |
21161 | fi | |
21162 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5 | |
21163 | $as_echo_n "checking for working mktime... " >&6; } | |
21164 | if test "${gl_cv_func_working_mktime+set}" = set; then : | |
f199cab1 GM |
21165 | $as_echo_n "(cached) " >&6 |
21166 | else | |
5476a9a4 GM |
21167 | if test "$cross_compiling" = yes; then : |
21168 | gl_cv_func_working_mktime=no | |
21169 | else | |
21170 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
f199cab1 | 21171 | /* end confdefs.h. */ |
5476a9a4 GM |
21172 | /* Test program from Paul Eggert and Tony Leneis. */ |
21173 | #include <limits.h> | |
21174 | #include <stdlib.h> | |
21175 | #include <time.h> | |
5fa4ac76 | 21176 | |
5476a9a4 GM |
21177 | #ifdef HAVE_UNISTD_H |
21178 | # include <unistd.h> | |
f199cab1 | 21179 | #endif |
5476a9a4 GM |
21180 | |
21181 | #ifndef HAVE_ALARM | |
21182 | # define alarm(X) /* empty */ | |
21183 | #endif | |
21184 | ||
21185 | /* Work around redefinition to rpl_putenv by other config tests. */ | |
21186 | #undef putenv | |
21187 | ||
21188 | static time_t time_t_max; | |
21189 | static time_t time_t_min; | |
21190 | ||
21191 | /* Values we'll use to set the TZ environment variable. */ | |
21192 | static char *tz_strings[] = { | |
21193 | (char *) 0, "TZ=GMT0", "TZ=JST-9", | |
21194 | "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00" | |
21195 | }; | |
21196 | #define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0])) | |
21197 | ||
21198 | /* Return 0 if mktime fails to convert a date in the spring-forward gap. | |
21199 | Based on a problem report from Andreas Jaeger. */ | |
21200 | static int | |
21201 | spring_forward_gap () | |
f199cab1 | 21202 | { |
5476a9a4 GM |
21203 | /* glibc (up to about 1998-10-07) failed this test. */ |
21204 | struct tm tm; | |
21205 | ||
21206 | /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0" | |
21207 | instead of "TZ=America/Vancouver" in order to detect the bug even | |
21208 | on systems that don't support the Olson extension, or don't have the | |
21209 | full zoneinfo tables installed. */ | |
21210 | putenv ("TZ=PST8PDT,M4.1.0,M10.5.0"); | |
21211 | ||
21212 | tm.tm_year = 98; | |
21213 | tm.tm_mon = 3; | |
21214 | tm.tm_mday = 5; | |
21215 | tm.tm_hour = 2; | |
21216 | tm.tm_min = 0; | |
21217 | tm.tm_sec = 0; | |
21218 | tm.tm_isdst = -1; | |
21219 | return mktime (&tm) != (time_t) -1; | |
f199cab1 | 21220 | } |
5fa4ac76 | 21221 | |
5476a9a4 GM |
21222 | static int |
21223 | mktime_test1 (time_t now) | |
21224 | { | |
21225 | struct tm *lt; | |
21226 | return ! (lt = localtime (&now)) || mktime (lt) == now; | |
21227 | } | |
5fa4ac76 | 21228 | |
5476a9a4 GM |
21229 | static int |
21230 | mktime_test (time_t now) | |
21231 | { | |
21232 | return (mktime_test1 (now) | |
21233 | && mktime_test1 ((time_t) (time_t_max - now)) | |
21234 | && mktime_test1 ((time_t) (time_t_min + now))); | |
21235 | } | |
067d23c9 | 21236 | |
5476a9a4 GM |
21237 | static int |
21238 | irix_6_4_bug () | |
21239 | { | |
21240 | /* Based on code from Ariel Faigon. */ | |
21241 | struct tm tm; | |
21242 | tm.tm_year = 96; | |
21243 | tm.tm_mon = 3; | |
21244 | tm.tm_mday = 0; | |
21245 | tm.tm_hour = 0; | |
21246 | tm.tm_min = 0; | |
21247 | tm.tm_sec = 0; | |
21248 | tm.tm_isdst = -1; | |
21249 | mktime (&tm); | |
21250 | return tm.tm_mon == 2 && tm.tm_mday == 31; | |
21251 | } | |
21252 | ||
21253 | static int | |
21254 | bigtime_test (int j) | |
21255 | { | |
21256 | struct tm tm; | |
21257 | time_t now; | |
21258 | tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j; | |
21259 | now = mktime (&tm); | |
21260 | if (now != (time_t) -1) | |
21261 | { | |
21262 | struct tm *lt = localtime (&now); | |
21263 | if (! (lt | |
21264 | && lt->tm_year == tm.tm_year | |
21265 | && lt->tm_mon == tm.tm_mon | |
21266 | && lt->tm_mday == tm.tm_mday | |
21267 | && lt->tm_hour == tm.tm_hour | |
21268 | && lt->tm_min == tm.tm_min | |
21269 | && lt->tm_sec == tm.tm_sec | |
21270 | && lt->tm_yday == tm.tm_yday | |
21271 | && lt->tm_wday == tm.tm_wday | |
21272 | && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst) | |
21273 | == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst)))) | |
21274 | return 0; | |
21275 | } | |
21276 | return 1; | |
21277 | } | |
369e19fc | 21278 | |
5476a9a4 GM |
21279 | static int |
21280 | year_2050_test () | |
21281 | { | |
21282 | /* The correct answer for 2050-02-01 00:00:00 in Pacific time, | |
21283 | ignoring leap seconds. */ | |
21284 | unsigned long int answer = 2527315200UL; | |
369e19fc | 21285 | |
5476a9a4 GM |
21286 | struct tm tm; |
21287 | time_t t; | |
21288 | tm.tm_year = 2050 - 1900; | |
21289 | tm.tm_mon = 2 - 1; | |
21290 | tm.tm_mday = 1; | |
21291 | tm.tm_hour = tm.tm_min = tm.tm_sec = 0; | |
21292 | tm.tm_isdst = -1; | |
369e19fc | 21293 | |
5476a9a4 GM |
21294 | /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0" |
21295 | instead of "TZ=America/Vancouver" in order to detect the bug even | |
21296 | on systems that don't support the Olson extension, or don't have the | |
21297 | full zoneinfo tables installed. */ | |
21298 | putenv ("TZ=PST8PDT,M4.1.0,M10.5.0"); | |
067d23c9 | 21299 | |
5476a9a4 | 21300 | t = mktime (&tm); |
067d23c9 | 21301 | |
5476a9a4 GM |
21302 | /* Check that the result is either a failure, or close enough |
21303 | to the correct answer that we can assume the discrepancy is | |
21304 | due to leap seconds. */ | |
21305 | return (t == (time_t) -1 | |
21306 | || (0 < t && answer - 120 <= t && t <= answer + 120)); | |
21307 | } | |
067d23c9 | 21308 | |
f199cab1 GM |
21309 | int |
21310 | main () | |
21311 | { | |
5476a9a4 GM |
21312 | int result = 0; |
21313 | time_t t, delta; | |
21314 | int i, j; | |
21315 | int time_t_signed_magnitude = (time_t) ~ (time_t) 0 < (time_t) -1; | |
21316 | int time_t_signed = ! ((time_t) 0 < (time_t) -1); | |
067d23c9 | 21317 | |
5476a9a4 GM |
21318 | /* This test makes some buggy mktime implementations loop. |
21319 | Give up after 60 seconds; a mktime slower than that | |
21320 | isn't worth using anyway. */ | |
21321 | alarm (60); | |
067d23c9 | 21322 | |
5476a9a4 GM |
21323 | time_t_max = (! time_t_signed |
21324 | ? (time_t) -1 | |
21325 | : ((((time_t) 1 << (sizeof (time_t) * CHAR_BIT - 2)) - 1) | |
21326 | * 2 + 1)); | |
21327 | time_t_min = (! time_t_signed | |
21328 | ? (time_t) 0 | |
21329 | : time_t_signed_magnitude | |
21330 | ? ~ (time_t) 0 | |
21331 | : ~ time_t_max); | |
3e0be4ab | 21332 | |
5476a9a4 GM |
21333 | delta = time_t_max / 997; /* a suitable prime number */ |
21334 | for (i = 0; i < N_STRINGS; i++) | |
21335 | { | |
21336 | if (tz_strings[i]) | |
21337 | putenv (tz_strings[i]); | |
3e0be4ab | 21338 | |
5476a9a4 GM |
21339 | for (t = 0; t <= time_t_max - delta && (result & 1) == 0; t += delta) |
21340 | if (! mktime_test (t)) | |
21341 | result |= 1; | |
21342 | if ((result & 2) == 0 | |
21343 | && ! (mktime_test ((time_t) 1) | |
21344 | && mktime_test ((time_t) (60 * 60)) | |
21345 | && mktime_test ((time_t) (60 * 60 * 24)))) | |
21346 | result |= 2; | |
f199cab1 | 21347 | |
5476a9a4 GM |
21348 | for (j = 1; (result & 4) == 0; j <<= 1) |
21349 | { | |
21350 | if (! bigtime_test (j)) | |
21351 | result |= 4; | |
21352 | if (INT_MAX / 2 < j) | |
21353 | break; | |
21354 | } | |
21355 | if ((result & 8) == 0 && ! bigtime_test (INT_MAX)) | |
21356 | result |= 8; | |
21357 | } | |
21358 | if (! irix_6_4_bug ()) | |
21359 | result |= 16; | |
21360 | if (! spring_forward_gap ()) | |
21361 | result |= 32; | |
21362 | if (! year_2050_test ()) | |
21363 | result |= 64; | |
21364 | return result; | |
067d23c9 KY |
21365 | } |
21366 | _ACEOF | |
5476a9a4 GM |
21367 | if ac_fn_c_try_run "$LINENO"; then : |
21368 | gl_cv_func_working_mktime=yes | |
067d23c9 | 21369 | else |
5476a9a4 | 21370 | gl_cv_func_working_mktime=no |
3e0be4ab | 21371 | fi |
5476a9a4 GM |
21372 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
21373 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
f199cab1 GM |
21374 | fi |
21375 | ||
f199cab1 | 21376 | |
5476a9a4 GM |
21377 | fi |
21378 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_mktime" >&5 | |
21379 | $as_echo "$gl_cv_func_working_mktime" >&6; } | |
f199cab1 | 21380 | |
5476a9a4 GM |
21381 | if test $gl_cv_func_working_mktime = no; then |
21382 | REPLACE_MKTIME=1 | |
21383 | else | |
21384 | REPLACE_MKTIME=0 | |
f199cab1 | 21385 | fi |
f199cab1 | 21386 | |
a6342fc8 | 21387 | if test $REPLACE_MKTIME = 1; then |
f199cab1 | 21388 | |
f199cab1 | 21389 | |
0eb775a3 | 21390 | |
067d23c9 | 21391 | |
a451f14b | 21392 | |
a451f14b | 21393 | |
743c80a7 PE |
21394 | |
21395 | ||
5476a9a4 GM |
21396 | gl_LIBOBJS="$gl_LIBOBJS mktime.$ac_objext" |
21397 | ||
a6342fc8 GM |
21398 | : |
21399 | fi | |
a451f14b PE |
21400 | |
21401 | ||
21402 | ||
e275c824 PE |
21403 | |
21404 | ||
5476a9a4 | 21405 | GNULIB_MKTIME=1 |
e275c824 PE |
21406 | |
21407 | ||
21408 | ||
21409 | ||
21410 | ||
21411 | ||
21412 | ||
21413 | ||
d87ffdb7 | 21414 | |
5476a9a4 GM |
21415 | |
21416 | ||
21417 | if test $ac_cv_func_pselect = yes; then | |
21418 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether signature of pselect conforms to POSIX" >&5 | |
21419 | $as_echo_n "checking whether signature of pselect conforms to POSIX... " >&6; } | |
21420 | if test "${gl_cv_sig_pselect+set}" = set; then : | |
e275c824 PE |
21421 | $as_echo_n "(cached) " >&6 |
21422 | else | |
5476a9a4 | 21423 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
e275c824 | 21424 | /* end confdefs.h. */ |
5476a9a4 | 21425 | #include <sys/select.h> |
e275c824 | 21426 | |
f199cab1 GM |
21427 | int |
21428 | main () | |
21429 | { | |
5476a9a4 GM |
21430 | int (*p) (int, fd_set *, fd_set *, fd_set *restrict, |
21431 | struct timespec const *restrict, | |
21432 | sigset_t const *restrict) = pselect; | |
21433 | return !p; | |
f199cab1 GM |
21434 | ; |
21435 | return 0; | |
21436 | } | |
e275c824 | 21437 | _ACEOF |
f199cab1 | 21438 | if ac_fn_c_try_link "$LINENO"; then : |
5476a9a4 | 21439 | gl_cv_sig_pselect=yes |
3e0be4ab | 21440 | else |
5476a9a4 | 21441 | gl_cv_sig_pselect=no |
f199cab1 GM |
21442 | fi |
21443 | rm -f core conftest.err conftest.$ac_objext \ | |
21444 | conftest$ac_exeext conftest.$ac_ext | |
3e0be4ab | 21445 | fi |
5476a9a4 GM |
21446 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sig_pselect" >&5 |
21447 | $as_echo "$gl_cv_sig_pselect" >&6; } | |
21448 | fi | |
3e0be4ab | 21449 | |
5476a9a4 GM |
21450 | if test $ac_cv_func_pselect = no || test $gl_cv_sig_pselect = no; then |
21451 | REPLACE_PSELECT=1 | |
21452 | fi | |
3e0be4ab | 21453 | |
a6342fc8 | 21454 | if test $HAVE_PSELECT = 0 || test $REPLACE_PSELECT = 1; then |
3e0be4ab GM |
21455 | |
21456 | ||
3e0be4ab | 21457 | |
3e0be4ab | 21458 | |
3e0be4ab | 21459 | |
3e0be4ab | 21460 | |
3e0be4ab | 21461 | |
3e0be4ab | 21462 | |
5476a9a4 | 21463 | gl_LIBOBJS="$gl_LIBOBJS pselect.$ac_objext" |
3e0be4ab | 21464 | |
a6342fc8 | 21465 | fi |
3e0be4ab GM |
21466 | |
21467 | ||
f199cab1 | 21468 | |
f199cab1 | 21469 | |
f199cab1 | 21470 | |
5476a9a4 | 21471 | GNULIB_PSELECT=1 |
f199cab1 | 21472 | |
6d153f56 | 21473 | |
f199cab1 | 21474 | |
3e0be4ab | 21475 | |
3e0be4ab GM |
21476 | |
21477 | ||
f199cab1 | 21478 | |
0eb775a3 GM |
21479 | |
21480 | ||
5476a9a4 | 21481 | LIB_PTHREAD_SIGMASK= |
0eb775a3 | 21482 | |
f199cab1 | 21483 | |
5476a9a4 GM |
21484 | if test $ac_cv_func_pthread_sigmask = yes; then |
21485 | : | |
21486 | else | |
21487 | HAVE_PTHREAD_SIGMASK=0 | |
21488 | REPLACE_PTHREAD_SIGMASK=1 | |
21489 | fi | |
6d153f56 | 21490 | |
52724a05 | 21491 | |
6d153f56 GM |
21492 | |
21493 | ||
5476a9a4 GM |
21494 | if test $HAVE_PTHREAD_SIGMASK = 1; then |
21495 | ||
21496 | ||
21497 | if test -z "$LIB_PTHREAD_SIGMASK"; then | |
21498 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask works without -lpthread" >&5 | |
21499 | $as_echo_n "checking whether pthread_sigmask works without -lpthread... " >&6; } | |
21500 | if test "${gl_cv_func_pthread_sigmask_in_libc_works+set}" = set; then : | |
f199cab1 GM |
21501 | $as_echo_n "(cached) " >&6 |
21502 | else | |
5476a9a4 GM |
21503 | |
21504 | if test "$cross_compiling" = yes; then : | |
21505 | ||
21506 | case "$host_os" in | |
21507 | freebsd* | hpux* | solaris | solaris2.[2-9]*) | |
21508 | gl_cv_func_pthread_sigmask_in_libc_works="guessing no";; | |
21509 | *) | |
21510 | gl_cv_func_pthread_sigmask_in_libc_works="guessing yes";; | |
21511 | esac | |
21512 | ||
21513 | else | |
21514 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
f199cab1 | 21515 | /* end confdefs.h. */ |
6d153f56 | 21516 | |
5476a9a4 GM |
21517 | #include <pthread.h> |
21518 | #include <signal.h> | |
21519 | #include <stddef.h> | |
21520 | int main () | |
f199cab1 | 21521 | { |
5476a9a4 GM |
21522 | sigset_t set; |
21523 | sigemptyset (&set); | |
21524 | return pthread_sigmask (1729, &set, NULL) != 0; | |
f199cab1 GM |
21525 | } |
21526 | _ACEOF | |
5476a9a4 GM |
21527 | if ac_fn_c_try_run "$LINENO"; then : |
21528 | gl_cv_func_pthread_sigmask_in_libc_works=no | |
f199cab1 | 21529 | else |
5476a9a4 | 21530 | gl_cv_func_pthread_sigmask_in_libc_works=yes |
f199cab1 | 21531 | fi |
5476a9a4 GM |
21532 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
21533 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
f199cab1 | 21534 | fi |
5476a9a4 GM |
21535 | |
21536 | ||
f199cab1 | 21537 | fi |
5476a9a4 GM |
21538 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_in_libc_works" >&5 |
21539 | $as_echo "$gl_cv_func_pthread_sigmask_in_libc_works" >&6; } | |
21540 | case "$gl_cv_func_pthread_sigmask_in_libc_works" in | |
21541 | *no) | |
21542 | REPLACE_PTHREAD_SIGMASK=1 | |
cc322c06 | 21543 | |
5476a9a4 | 21544 | $as_echo "#define PTHREAD_SIGMASK_INEFFECTIVE 1" >>confdefs.h |
cc322c06 | 21545 | |
5476a9a4 GM |
21546 | ;; |
21547 | esac | |
21548 | fi | |
3e0be4ab | 21549 | |
5476a9a4 GM |
21550 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask returns error numbers" >&5 |
21551 | $as_echo_n "checking whether pthread_sigmask returns error numbers... " >&6; } | |
21552 | if test "${gl_cv_func_pthread_sigmask_return_works+set}" = set; then : | |
3e0be4ab GM |
21553 | $as_echo_n "(cached) " >&6 |
21554 | else | |
5476a9a4 GM |
21555 | |
21556 | gl_save_LIBS="$LIBS" | |
21557 | LIBS="$LIBS $LIB_PTHREAD_SIGMASK" | |
21558 | if test "$cross_compiling" = yes; then : | |
21559 | case "$host_os" in | |
21560 | cygwin*) | |
21561 | gl_cv_func_pthread_sigmask_return_works="guessing no";; | |
21562 | *) | |
21563 | gl_cv_func_pthread_sigmask_return_works="guessing yes";; | |
21564 | esac | |
21565 | ||
21566 | else | |
21567 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3e0be4ab | 21568 | /* end confdefs.h. */ |
f199cab1 | 21569 | |
5476a9a4 GM |
21570 | #include <pthread.h> |
21571 | #include <signal.h> | |
21572 | #include <stddef.h> | |
21573 | int main () | |
3e0be4ab | 21574 | { |
5476a9a4 GM |
21575 | sigset_t set; |
21576 | sigemptyset (&set); | |
21577 | if (pthread_sigmask (1729, &set, NULL) == -1) | |
21578 | return 1; | |
3e0be4ab GM |
21579 | return 0; |
21580 | } | |
6d153f56 | 21581 | _ACEOF |
5476a9a4 GM |
21582 | if ac_fn_c_try_run "$LINENO"; then : |
21583 | gl_cv_func_pthread_sigmask_return_works=yes | |
3e0be4ab | 21584 | else |
5476a9a4 | 21585 | gl_cv_func_pthread_sigmask_return_works=no |
6d153f56 | 21586 | fi |
5476a9a4 GM |
21587 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
21588 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
f199cab1 | 21589 | fi |
5476a9a4 GM |
21590 | |
21591 | LIBS="$gl_save_LIBS" | |
21592 | ||
52724a05 | 21593 | fi |
5476a9a4 GM |
21594 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_return_works" >&5 |
21595 | $as_echo "$gl_cv_func_pthread_sigmask_return_works" >&6; } | |
21596 | case "$gl_cv_func_pthread_sigmask_return_works" in | |
21597 | *no) | |
21598 | REPLACE_PTHREAD_SIGMASK=1 | |
6d153f56 | 21599 | |
5476a9a4 | 21600 | $as_echo "#define PTHREAD_SIGMASK_FAILS_WITH_ERRNO 1" >>confdefs.h |
6d153f56 | 21601 | |
5476a9a4 GM |
21602 | ;; |
21603 | esac | |
cc322c06 | 21604 | |
5476a9a4 GM |
21605 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask unblocks signals correctly" >&5 |
21606 | $as_echo_n "checking whether pthread_sigmask unblocks signals correctly... " >&6; } | |
21607 | if test "${gl_cv_func_pthread_sigmask_unblock_works+set}" = set; then : | |
f199cab1 GM |
21608 | $as_echo_n "(cached) " >&6 |
21609 | else | |
5476a9a4 GM |
21610 | |
21611 | case "$host_os" in | |
21612 | irix*) | |
21613 | gl_cv_func_pthread_sigmask_unblock_works="guessing no";; | |
21614 | *) | |
21615 | gl_cv_func_pthread_sigmask_unblock_works="guessing yes";; | |
21616 | esac | |
21617 | gl_save_LIBS="$LIBS" | |
21618 | LIBS="$LIBS $LIBMULTITHREAD" | |
21619 | if test "$cross_compiling" = yes; then : | |
21620 | : | |
f199cab1 | 21621 | else |
5476a9a4 GM |
21622 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
21623 | /* end confdefs.h. */ | |
6d153f56 | 21624 | |
5476a9a4 GM |
21625 | #include <pthread.h> |
21626 | #include <signal.h> | |
21627 | #include <stdio.h> | |
21628 | #include <stdlib.h> | |
21629 | #include <unistd.h> | |
21630 | static volatile int sigint_occurred; | |
21631 | static void | |
21632 | sigint_handler (int sig) | |
21633 | { | |
21634 | sigint_occurred++; | |
21635 | } | |
21636 | int main () | |
21637 | { | |
21638 | sigset_t set; | |
21639 | int pid = getpid (); | |
21640 | char command[80]; | |
21641 | signal (SIGINT, sigint_handler); | |
21642 | sigemptyset (&set); | |
21643 | sigaddset (&set, SIGINT); | |
21644 | if (!(pthread_sigmask (SIG_BLOCK, &set, NULL) == 0)) | |
21645 | return 1; | |
21646 | sprintf (command, "sh -c 'sleep 1; kill -%d %d' &", SIGINT, pid); | |
21647 | if (!(system (command) == 0)) | |
21648 | return 2; | |
21649 | sleep (2); | |
21650 | if (!(sigint_occurred == 0)) | |
21651 | return 3; | |
21652 | if (!(pthread_sigmask (SIG_UNBLOCK, &set, NULL) == 0)) | |
21653 | return 4; | |
21654 | if (!(sigint_occurred == 1)) /* This fails on IRIX. */ | |
21655 | return 5; | |
21656 | return 0; | |
21657 | } | |
21658 | _ACEOF | |
21659 | if ac_fn_c_try_run "$LINENO"; then : | |
21660 | : | |
21661 | else | |
21662 | gl_cv_func_pthread_sigmask_unblock_works=no | |
f199cab1 | 21663 | fi |
5476a9a4 GM |
21664 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
21665 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
f199cab1 | 21666 | fi |
5476a9a4 GM |
21667 | |
21668 | LIBS="$gl_save_LIBS" | |
21669 | ||
f199cab1 | 21670 | fi |
5476a9a4 GM |
21671 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_unblock_works" >&5 |
21672 | $as_echo "$gl_cv_func_pthread_sigmask_unblock_works" >&6; } | |
21673 | case "$gl_cv_func_pthread_sigmask_unblock_works" in | |
21674 | *no) | |
21675 | REPLACE_PTHREAD_SIGMASK=1 | |
6d153f56 | 21676 | |
5476a9a4 | 21677 | $as_echo "#define PTHREAD_SIGMASK_UNBLOCK_BUG 1" >>confdefs.h |
6d153f56 | 21678 | |
5476a9a4 GM |
21679 | ;; |
21680 | esac | |
6d153f56 | 21681 | fi |
6d153f56 | 21682 | |
a6342fc8 | 21683 | if test $HAVE_PTHREAD_SIGMASK = 0 || test $REPLACE_PTHREAD_SIGMASK = 1; then |
a451f14b | 21684 | |
a451f14b | 21685 | |
743c80a7 PE |
21686 | |
21687 | ||
21688 | ||
21689 | ||
21690 | ||
f199cab1 | 21691 | |
5476a9a4 | 21692 | gl_LIBOBJS="$gl_LIBOBJS pthread_sigmask.$ac_objext" |
743c80a7 PE |
21693 | |
21694 | ||
5476a9a4 | 21695 | if test $HAVE_PTHREAD_SIGMASK = 1; then |
743c80a7 | 21696 | |
5476a9a4 | 21697 | $as_echo "#define HAVE_PTHREAD_SIGMASK 1" >>confdefs.h |
743c80a7 | 21698 | |
5476a9a4 | 21699 | fi |
743c80a7 | 21700 | |
a6342fc8 | 21701 | fi |
938a4ef9 | 21702 | |
938a4ef9 | 21703 | |
938a4ef9 | 21704 | |
938a4ef9 | 21705 | |
938a4ef9 | 21706 | |
5476a9a4 | 21707 | GNULIB_PTHREAD_SIGMASK=1 |
a451f14b | 21708 | |
a451f14b | 21709 | |
743c80a7 PE |
21710 | |
21711 | ||
21712 | ||
21713 | ||
21714 | ||
21715 | ||
5476a9a4 GM |
21716 | if test $ac_cv_func_readlink = no; then |
21717 | HAVE_READLINK=0 | |
21718 | else | |
21719 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5 | |
21720 | $as_echo_n "checking whether readlink signature is correct... " >&6; } | |
21721 | if test "${gl_cv_decl_readlink_works+set}" = set; then : | |
3e0be4ab GM |
21722 | $as_echo_n "(cached) " >&6 |
21723 | else | |
f199cab1 | 21724 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
3e0be4ab | 21725 | /* end confdefs.h. */ |
5476a9a4 GM |
21726 | #include <unistd.h> |
21727 | /* Cause compilation failure if original declaration has wrong type. */ | |
21728 | ssize_t readlink (const char *, char *, size_t); | |
f199cab1 GM |
21729 | int |
21730 | main () | |
21731 | { | |
5476a9a4 | 21732 | |
f199cab1 GM |
21733 | ; |
21734 | return 0; | |
21735 | } | |
3e0be4ab | 21736 | _ACEOF |
5476a9a4 GM |
21737 | if ac_fn_c_try_compile "$LINENO"; then : |
21738 | gl_cv_decl_readlink_works=yes | |
21739 | else | |
21740 | gl_cv_decl_readlink_works=no | |
3e0be4ab | 21741 | fi |
5476a9a4 GM |
21742 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
21743 | fi | |
21744 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5 | |
21745 | $as_echo "$gl_cv_decl_readlink_works" >&6; } | |
21746 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5 | |
21747 | $as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; } | |
21748 | if test "${gl_cv_func_readlink_works+set}" = set; then : | |
21749 | $as_echo_n "(cached) " >&6 | |
21750 | else | |
21751 | # We have readlink, so assume ln -s works. | |
21752 | ln -s conftest.no-such conftest.link | |
21753 | ln -s conftest.link conftest.lnk2 | |
21754 | if test "$cross_compiling" = yes; then : | |
21755 | case "$host_os" in | |
21756 | # Guess yes on glibc systems. | |
21757 | *-gnu*) gl_cv_func_readlink_works="guessing yes" ;; | |
21758 | # If we don't know, assume the worst. | |
21759 | *) gl_cv_func_readlink_works="guessing no" ;; | |
21760 | esac | |
21761 | ||
21762 | else | |
f199cab1 | 21763 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
067d23c9 | 21764 | /* end confdefs.h. */ |
5476a9a4 GM |
21765 | #include <unistd.h> |
21766 | ||
f199cab1 GM |
21767 | int |
21768 | main () | |
21769 | { | |
5476a9a4 GM |
21770 | char buf[20]; |
21771 | return readlink ("conftest.lnk2/", buf, sizeof buf) != -1; | |
f199cab1 GM |
21772 | ; |
21773 | return 0; | |
21774 | } | |
067d23c9 | 21775 | _ACEOF |
5476a9a4 GM |
21776 | if ac_fn_c_try_run "$LINENO"; then : |
21777 | gl_cv_func_readlink_works=yes | |
21778 | else | |
21779 | gl_cv_func_readlink_works=no | |
067d23c9 | 21780 | fi |
5476a9a4 GM |
21781 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
21782 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
f199cab1 | 21783 | fi |
067d23c9 | 21784 | |
5476a9a4 | 21785 | rm -f conftest.link conftest.lnk2 |
f199cab1 | 21786 | fi |
5476a9a4 GM |
21787 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_works" >&5 |
21788 | $as_echo "$gl_cv_func_readlink_works" >&6; } | |
21789 | case "$gl_cv_func_readlink_works" in | |
21790 | *yes) | |
21791 | if test "$gl_cv_decl_readlink_works" != yes; then | |
21792 | REPLACE_READLINK=1 | |
21793 | fi | |
21794 | ;; | |
21795 | *) | |
067d23c9 | 21796 | |
5476a9a4 | 21797 | $as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h |
067d23c9 | 21798 | |
5476a9a4 GM |
21799 | REPLACE_READLINK=1 |
21800 | ;; | |
21801 | esac | |
21802 | fi | |
3e0be4ab | 21803 | |
a6342fc8 | 21804 | if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then |
3e0be4ab GM |
21805 | |
21806 | ||
21807 | ||
21808 | ||
3e0be4ab GM |
21809 | |
21810 | ||
5476a9a4 GM |
21811 | |
21812 | ||
21813 | gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext" | |
21814 | ||
21815 | ||
21816 | : | |
3e0be4ab | 21817 | |
a6342fc8 | 21818 | fi |
3e0be4ab | 21819 | |
067d23c9 | 21820 | |
067d23c9 | 21821 | |
067d23c9 | 21822 | |
067d23c9 | 21823 | |
5476a9a4 | 21824 | GNULIB_READLINK=1 |
067d23c9 | 21825 | |
067d23c9 | 21826 | |
067d23c9 | 21827 | |
067d23c9 KY |
21828 | |
21829 | ||
067d23c9 | 21830 | |
369e19fc | 21831 | |
067d23c9 | 21832 | |
5476a9a4 GM |
21833 | |
21834 | ||
21835 | ||
21836 | ||
21837 | ||
21838 | ||
21839 | ||
21840 | ||
21841 | if test $gl_cv_have_include_next = yes; then | |
21842 | gl_cv_next_signal_h='<'signal.h'>' | |
21843 | else | |
21844 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5 | |
21845 | $as_echo_n "checking absolute name of <signal.h>... " >&6; } | |
21846 | if test "${gl_cv_next_signal_h+set}" = set; then : | |
0eb775a3 | 21847 | $as_echo_n "(cached) " >&6 |
0eb775a3 | 21848 | else |
5476a9a4 GM |
21849 | |
21850 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
0eb775a3 | 21851 | /* end confdefs.h. */ |
5476a9a4 | 21852 | #include <signal.h> |
f199cab1 | 21853 | |
0eb775a3 | 21854 | _ACEOF |
5476a9a4 GM |
21855 | case "$host_os" in |
21856 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
21857 | *) gl_absname_cpp="$ac_cpp" ;; | |
21858 | esac | |
0eb775a3 | 21859 | |
5476a9a4 GM |
21860 | case "$host_os" in |
21861 | mingw*) | |
21862 | gl_dirsep_regex='[/\\]' | |
21863 | ;; | |
21864 | *) | |
21865 | gl_dirsep_regex='\/' | |
21866 | ;; | |
21867 | esac | |
21868 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
0eb775a3 | 21869 | |
5476a9a4 GM |
21870 | gl_header_literal_regex=`echo 'signal.h' \ |
21871 | | sed -e "$gl_make_literal_regex_sed"` | |
21872 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
21873 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
21874 | s|^/[^/]|//&| | |
21875 | p | |
21876 | q | |
21877 | }' | |
21878 | gl_cv_next_signal_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
21879 | sed -n "$gl_absolute_header_sed"`'"' | |
0eb775a3 | 21880 | |
f199cab1 | 21881 | |
5476a9a4 GM |
21882 | fi |
21883 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5 | |
21884 | $as_echo "$gl_cv_next_signal_h" >&6; } | |
21885 | fi | |
21886 | NEXT_SIGNAL_H=$gl_cv_next_signal_h | |
067d23c9 | 21887 | |
5476a9a4 GM |
21888 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then |
21889 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
21890 | gl_next_as_first_directive='<'signal.h'>' | |
21891 | else | |
21892 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
21893 | gl_next_as_first_directive=$gl_cv_next_signal_h | |
21894 | fi | |
21895 | NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive | |
067d23c9 | 21896 | |
067d23c9 KY |
21897 | |
21898 | ||
067d23c9 | 21899 | |
067d23c9 | 21900 | |
5476a9a4 GM |
21901 | # AIX declares sig_atomic_t to already include volatile, and C89 compilers |
21902 | # then choke on 'volatile sig_atomic_t'. C99 requires that it compile. | |
21903 | ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" " | |
21904 | #include <signal.h> | |
21905 | ||
21906 | " | |
21907 | if test "x$ac_cv_type_volatile_sig_atomic_t" = x""yes; then : | |
21908 | ||
21909 | else | |
21910 | HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0 | |
f199cab1 | 21911 | fi |
067d23c9 | 21912 | |
067d23c9 | 21913 | |
067d23c9 | 21914 | |
067d23c9 | 21915 | |
938a4ef9 | 21916 | |
938a4ef9 | 21917 | |
5476a9a4 GM |
21918 | |
21919 | ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" " | |
21920 | #include <signal.h> | |
21921 | ||
21922 | " | |
21923 | if test "x$ac_cv_type_sighandler_t" = x""yes; then : | |
21924 | ||
21925 | else | |
21926 | HAVE_SIGHANDLER_T=0 | |
21927 | fi | |
21928 | ||
21929 | ||
21930 | ||
21931 | ||
a6342fc8 | 21932 | ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" " |
5476a9a4 GM |
21933 | /* <sys/types.h> is not needed according to POSIX, but the |
21934 | <sys/socket.h> in i386-unknown-freebsd4.10 and | |
21935 | powerpc-apple-darwin5.5 required it. */ | |
21936 | #include <sys/types.h> | |
21937 | #if HAVE_SYS_SOCKET_H | |
21938 | # include <sys/socket.h> | |
21939 | #elif HAVE_WS2TCPIP_H | |
21940 | # include <ws2tcpip.h> | |
21941 | #endif | |
21942 | ||
21943 | " | |
21944 | if test "x$ac_cv_type_socklen_t" = x""yes; then : | |
21945 | ||
067d23c9 | 21946 | else |
5476a9a4 GM |
21947 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5 |
21948 | $as_echo_n "checking for socklen_t equivalent... " >&6; } | |
21949 | if test "${gl_cv_socklen_t_equiv+set}" = set; then : | |
21950 | $as_echo_n "(cached) " >&6 | |
21951 | else | |
21952 | # Systems have either "struct sockaddr *" or | |
21953 | # "void *" as the second argument to getpeername | |
21954 | gl_cv_socklen_t_equiv= | |
21955 | for arg2 in "struct sockaddr" void; do | |
21956 | for t in int size_t "unsigned int" "long int" "unsigned long int"; do | |
21957 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
f199cab1 | 21958 | /* end confdefs.h. */ |
5476a9a4 GM |
21959 | #include <sys/types.h> |
21960 | #include <sys/socket.h> | |
21961 | ||
21962 | int getpeername (int, $arg2 *, $t *); | |
f199cab1 GM |
21963 | int |
21964 | main () | |
21965 | { | |
5476a9a4 GM |
21966 | $t len; |
21967 | getpeername (0, 0, &len); | |
f199cab1 GM |
21968 | ; |
21969 | return 0; | |
21970 | } | |
3e0be4ab | 21971 | _ACEOF |
5476a9a4 GM |
21972 | if ac_fn_c_try_compile "$LINENO"; then : |
21973 | gl_cv_socklen_t_equiv="$t" | |
067d23c9 | 21974 | fi |
5476a9a4 GM |
21975 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
21976 | test "$gl_cv_socklen_t_equiv" != "" && break | |
21977 | done | |
21978 | test "$gl_cv_socklen_t_equiv" != "" && break | |
21979 | done | |
067d23c9 | 21980 | |
5476a9a4 | 21981 | fi |
067d23c9 | 21982 | |
5476a9a4 GM |
21983 | if test "$gl_cv_socklen_t_equiv" = ""; then |
21984 | as_fn_error "Cannot find a type to use in place of socklen_t" "$LINENO" 5 | |
21985 | fi | |
21986 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socklen_t_equiv" >&5 | |
21987 | $as_echo "$gl_cv_socklen_t_equiv" >&6; } | |
21988 | ||
21989 | cat >>confdefs.h <<_ACEOF | |
21990 | #define socklen_t $gl_cv_socklen_t_equiv | |
21991 | _ACEOF | |
067d23c9 | 21992 | |
f199cab1 | 21993 | fi |
3e0be4ab | 21994 | |
3e0be4ab | 21995 | |
5476a9a4 GM |
21996 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5 |
21997 | $as_echo_n "checking for ssize_t... " >&6; } | |
21998 | if test "${gt_cv_ssize_t+set}" = set; then : | |
f199cab1 GM |
21999 | $as_echo_n "(cached) " >&6 |
22000 | else | |
5476a9a4 | 22001 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
f199cab1 | 22002 | /* end confdefs.h. */ |
5476a9a4 | 22003 | #include <sys/types.h> |
f199cab1 GM |
22004 | int |
22005 | main () | |
22006 | { | |
5476a9a4 GM |
22007 | int x = sizeof (ssize_t *) + sizeof (ssize_t); |
22008 | return !x; | |
f199cab1 GM |
22009 | ; |
22010 | return 0; | |
22011 | } | |
22012 | _ACEOF | |
5476a9a4 GM |
22013 | if ac_fn_c_try_compile "$LINENO"; then : |
22014 | gt_cv_ssize_t=yes | |
067d23c9 | 22015 | else |
5476a9a4 | 22016 | gt_cv_ssize_t=no |
f199cab1 | 22017 | fi |
5476a9a4 | 22018 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
067d23c9 | 22019 | fi |
5476a9a4 GM |
22020 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5 |
22021 | $as_echo "$gt_cv_ssize_t" >&6; } | |
22022 | if test $gt_cv_ssize_t = no; then | |
22023 | ||
22024 | $as_echo "#define ssize_t int" >>confdefs.h | |
22025 | ||
22026 | fi | |
22027 | ||
22028 | ||
22029 | ||
22030 | ||
22031 | ||
5476a9a4 GM |
22032 | ac_fn_c_check_member "$LINENO" "struct stat" "st_atim.tv_nsec" "ac_cv_member_struct_stat_st_atim_tv_nsec" "#include <sys/types.h> |
22033 | #include <sys/stat.h> | |
22034 | " | |
22035 | if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = x""yes; then : | |
22036 | ||
22037 | cat >>confdefs.h <<_ACEOF | |
22038 | #define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1 | |
22039 | _ACEOF | |
22040 | ||
22041 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5 | |
22042 | $as_echo_n "checking whether struct stat.st_atim is of type struct timespec... " >&6; } | |
22043 | if test "${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+set}" = set; then : | |
f199cab1 GM |
22044 | $as_echo_n "(cached) " >&6 |
22045 | else | |
5476a9a4 | 22046 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
f199cab1 | 22047 | /* end confdefs.h. */ |
3e0be4ab | 22048 | |
5476a9a4 GM |
22049 | #include <sys/types.h> |
22050 | #include <sys/stat.h> | |
22051 | #if HAVE_SYS_TIME_H | |
22052 | # include <sys/time.h> | |
22053 | #endif | |
22054 | #include <time.h> | |
22055 | struct timespec ts; | |
22056 | struct stat st; | |
22057 | ||
f199cab1 GM |
22058 | int |
22059 | main () | |
22060 | { | |
5476a9a4 GM |
22061 | |
22062 | st.st_atim = ts; | |
22063 | ||
f199cab1 GM |
22064 | ; |
22065 | return 0; | |
22066 | } | |
3e0be4ab | 22067 | _ACEOF |
5476a9a4 GM |
22068 | if ac_fn_c_try_compile "$LINENO"; then : |
22069 | ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes | |
f199cab1 | 22070 | else |
5476a9a4 | 22071 | ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no |
f199cab1 | 22072 | fi |
5476a9a4 | 22073 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
067d23c9 | 22074 | fi |
5476a9a4 GM |
22075 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5 |
22076 | $as_echo "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; } | |
22077 | if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then | |
067d23c9 | 22078 | |
5476a9a4 | 22079 | $as_echo "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h |
067d23c9 | 22080 | |
5476a9a4 GM |
22081 | fi |
22082 | else | |
22083 | ac_fn_c_check_member "$LINENO" "struct stat" "st_atimespec.tv_nsec" "ac_cv_member_struct_stat_st_atimespec_tv_nsec" "#include <sys/types.h> | |
22084 | #include <sys/stat.h> | |
22085 | " | |
22086 | if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = x""yes; then : | |
067d23c9 | 22087 | |
5476a9a4 GM |
22088 | cat >>confdefs.h <<_ACEOF |
22089 | #define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1 | |
22090 | _ACEOF | |
3e0be4ab | 22091 | |
0eb775a3 | 22092 | |
3e0be4ab | 22093 | else |
5476a9a4 GM |
22094 | ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h> |
22095 | #include <sys/stat.h> | |
22096 | " | |
22097 | if test "x$ac_cv_member_struct_stat_st_atimensec" = x""yes; then : | |
22098 | ||
22099 | cat >>confdefs.h <<_ACEOF | |
22100 | #define HAVE_STRUCT_STAT_ST_ATIMENSEC 1 | |
067d23c9 | 22101 | _ACEOF |
5476a9a4 GM |
22102 | |
22103 | ||
067d23c9 | 22104 | else |
5476a9a4 GM |
22105 | ac_fn_c_check_member "$LINENO" "struct stat" "st_atim.st__tim.tv_nsec" "ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" "#include <sys/types.h> |
22106 | #include <sys/stat.h> | |
22107 | " | |
22108 | if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = x""yes; then : | |
22109 | ||
22110 | cat >>confdefs.h <<_ACEOF | |
22111 | #define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1 | |
22112 | _ACEOF | |
22113 | ||
22114 | ||
3e0be4ab | 22115 | fi |
5476a9a4 | 22116 | |
067d23c9 | 22117 | fi |
5476a9a4 | 22118 | |
067d23c9 | 22119 | fi |
067d23c9 KY |
22120 | |
22121 | fi | |
22122 | ||
067d23c9 | 22123 | |
067d23c9 | 22124 | |
067d23c9 | 22125 | |
067d23c9 | 22126 | |
5476a9a4 GM |
22127 | ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimespec.tv_nsec" "ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" "#include <sys/types.h> |
22128 | #include <sys/stat.h> | |
22129 | " | |
22130 | if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = x""yes; then : | |
22131 | ||
22132 | cat >>confdefs.h <<_ACEOF | |
22133 | #define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1 | |
22134 | _ACEOF | |
067d23c9 KY |
22135 | |
22136 | ||
f199cab1 | 22137 | else |
5476a9a4 GM |
22138 | ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "#include <sys/types.h> |
22139 | #include <sys/stat.h> | |
22140 | " | |
22141 | if test "x$ac_cv_member_struct_stat_st_birthtimensec" = x""yes; then : | |
067d23c9 | 22142 | |
5476a9a4 GM |
22143 | cat >>confdefs.h <<_ACEOF |
22144 | #define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1 | |
22145 | _ACEOF | |
067d23c9 | 22146 | |
3e0be4ab | 22147 | |
067d23c9 | 22148 | else |
5476a9a4 GM |
22149 | ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtim.tv_nsec" "ac_cv_member_struct_stat_st_birthtim_tv_nsec" "#include <sys/types.h> |
22150 | #include <sys/stat.h> | |
22151 | " | |
22152 | if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = x""yes; then : | |
067d23c9 | 22153 | |
5476a9a4 GM |
22154 | cat >>confdefs.h <<_ACEOF |
22155 | #define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1 | |
067d23c9 | 22156 | _ACEOF |
5476a9a4 GM |
22157 | |
22158 | ||
f199cab1 | 22159 | fi |
5476a9a4 | 22160 | |
f199cab1 | 22161 | fi |
5476a9a4 | 22162 | |
067d23c9 | 22163 | fi |
0eb775a3 | 22164 | |
0eb775a3 | 22165 | |
0eb775a3 | 22166 | |
5476a9a4 GM |
22167 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working stdalign.h" >&5 |
22168 | $as_echo_n "checking for working stdalign.h... " >&6; } | |
22169 | if test "${gl_cv_header_working_stdalign_h+set}" = set; then : | |
f199cab1 | 22170 | $as_echo_n "(cached) " >&6 |
067d23c9 | 22171 | else |
5476a9a4 | 22172 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
f199cab1 | 22173 | /* end confdefs.h. */ |
5476a9a4 GM |
22174 | #include <stdalign.h> |
22175 | #include <stddef.h> | |
22176 | ||
22177 | /* Test that alignof yields a result consistent with offsetof. | |
22178 | This catches GCC bug 52023 | |
22179 | <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. */ | |
22180 | #ifdef __cplusplus | |
22181 | template <class t> struct alignof_helper { char a; t b; }; | |
22182 | # define ao(type) offsetof (alignof_helper<type>, b) | |
22183 | #else | |
22184 | # define ao(type) offsetof (struct { char a; type b; }, b) | |
22185 | #endif | |
22186 | char test_double[ao (double) % _Alignof (double) == 0 ? 1 : -1]; | |
22187 | char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1]; | |
22188 | char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1]; | |
22189 | ||
22190 | /* Test _Alignas only on platforms where gnulib can help. */ | |
22191 | #if \ | |
22192 | (__GNUC__ || __IBMC__ || __IBMCPP__ \ | |
22193 | || 0x5110 <= __SUNPRO_C || 1300 <= _MSC_VER) | |
22194 | int alignas (8) alignas_int = 1; | |
22195 | char test_alignas[_Alignof (alignas_int) == 8 ? 1 : -1]; | |
22196 | #endif | |
067d23c9 | 22197 | |
f199cab1 GM |
22198 | int |
22199 | main () | |
22200 | { | |
5476a9a4 | 22201 | |
f199cab1 GM |
22202 | ; |
22203 | return 0; | |
22204 | } | |
22205 | _ACEOF | |
5476a9a4 GM |
22206 | if ac_fn_c_try_compile "$LINENO"; then : |
22207 | gl_cv_header_working_stdalign_h=yes | |
f199cab1 | 22208 | else |
5476a9a4 | 22209 | gl_cv_header_working_stdalign_h=no |
f199cab1 | 22210 | fi |
5476a9a4 | 22211 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
067d23c9 | 22212 | fi |
5476a9a4 GM |
22213 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdalign_h" >&5 |
22214 | $as_echo "$gl_cv_header_working_stdalign_h" >&6; } | |
067d23c9 | 22215 | |
5476a9a4 GM |
22216 | if test $gl_cv_header_working_stdalign_h = yes; then |
22217 | STDALIGN_H='' | |
22218 | else | |
22219 | STDALIGN_H='stdalign.h' | |
f199cab1 | 22220 | fi |
0eb775a3 | 22221 | |
5476a9a4 GM |
22222 | |
22223 | if test -n "$STDALIGN_H"; then | |
22224 | GL_GENERATE_STDALIGN_H_TRUE= | |
22225 | GL_GENERATE_STDALIGN_H_FALSE='#' | |
f199cab1 | 22226 | else |
5476a9a4 GM |
22227 | GL_GENERATE_STDALIGN_H_TRUE='#' |
22228 | GL_GENERATE_STDALIGN_H_FALSE= | |
0eb775a3 | 22229 | fi |
0eb775a3 GM |
22230 | |
22231 | ||
22232 | ||
5476a9a4 GM |
22233 | STDARG_H='' |
22234 | NEXT_STDARG_H='<stdarg.h>' | |
22235 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5 | |
22236 | $as_echo_n "checking for va_copy... " >&6; } | |
22237 | if test "${gl_cv_func_va_copy+set}" = set; then : | |
f199cab1 | 22238 | $as_echo_n "(cached) " >&6 |
5476a9a4 GM |
22239 | else |
22240 | ||
22241 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
22242 | /* end confdefs.h. */ | |
22243 | #include <stdarg.h> | |
f199cab1 GM |
22244 | int |
22245 | main () | |
22246 | { | |
5476a9a4 GM |
22247 | |
22248 | #ifndef va_copy | |
22249 | void (*func) (va_list, va_list) = va_copy; | |
22250 | #endif | |
22251 | ||
f199cab1 GM |
22252 | ; |
22253 | return 0; | |
22254 | } | |
22255 | _ACEOF | |
5476a9a4 GM |
22256 | if ac_fn_c_try_compile "$LINENO"; then : |
22257 | gl_cv_func_va_copy=yes | |
f199cab1 | 22258 | else |
5476a9a4 | 22259 | gl_cv_func_va_copy=no |
f199cab1 | 22260 | fi |
5476a9a4 | 22261 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
f199cab1 | 22262 | fi |
5476a9a4 GM |
22263 | |
22264 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_va_copy" >&5 | |
22265 | $as_echo "$gl_cv_func_va_copy" >&6; } | |
22266 | if test $gl_cv_func_va_copy = no; then | |
22267 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
22268 | /* end confdefs.h. */ | |
22269 | #if defined _AIX && !defined __GNUC__ | |
22270 | AIX vaccine | |
22271 | #endif | |
22272 | ||
22273 | _ACEOF | |
22274 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
22275 | $EGREP "vaccine" >/dev/null 2>&1; then : | |
22276 | gl_aixcc=yes | |
f199cab1 | 22277 | else |
5476a9a4 | 22278 | gl_aixcc=no |
f199cab1 | 22279 | fi |
5476a9a4 | 22280 | rm -f conftest* |
0eb775a3 | 22281 | |
5476a9a4 GM |
22282 | if test $gl_aixcc = yes; then |
22283 | STDARG_H=stdarg.h | |
0eb775a3 GM |
22284 | |
22285 | ||
5476a9a4 GM |
22286 | |
22287 | ||
22288 | ||
22289 | ||
22290 | ||
22291 | ||
22292 | if test $gl_cv_have_include_next = yes; then | |
22293 | gl_cv_next_stdarg_h='<'stdarg.h'>' | |
22294 | else | |
22295 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdarg.h>" >&5 | |
22296 | $as_echo_n "checking absolute name of <stdarg.h>... " >&6; } | |
22297 | if test "${gl_cv_next_stdarg_h+set}" = set; then : | |
f199cab1 GM |
22298 | $as_echo_n "(cached) " >&6 |
22299 | else | |
5476a9a4 GM |
22300 | |
22301 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
f199cab1 | 22302 | /* end confdefs.h. */ |
5476a9a4 | 22303 | #include <stdarg.h> |
0eb775a3 | 22304 | |
f199cab1 | 22305 | _ACEOF |
5476a9a4 GM |
22306 | case "$host_os" in |
22307 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
22308 | *) gl_absname_cpp="$ac_cpp" ;; | |
22309 | esac | |
22310 | ||
22311 | case "$host_os" in | |
22312 | mingw*) | |
22313 | gl_dirsep_regex='[/\\]' | |
22314 | ;; | |
22315 | *) | |
22316 | gl_dirsep_regex='\/' | |
22317 | ;; | |
22318 | esac | |
22319 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
22320 | ||
22321 | gl_header_literal_regex=`echo 'stdarg.h' \ | |
22322 | | sed -e "$gl_make_literal_regex_sed"` | |
22323 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
22324 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
22325 | s|^/[^/]|//&| | |
22326 | p | |
22327 | q | |
22328 | }' | |
22329 | gl_cv_next_stdarg_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
22330 | sed -n "$gl_absolute_header_sed"`'"' | |
22331 | ||
22332 | ||
f199cab1 | 22333 | fi |
5476a9a4 GM |
22334 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdarg_h" >&5 |
22335 | $as_echo "$gl_cv_next_stdarg_h" >&6; } | |
22336 | fi | |
22337 | NEXT_STDARG_H=$gl_cv_next_stdarg_h | |
22338 | ||
22339 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then | |
22340 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
22341 | gl_next_as_first_directive='<'stdarg.h'>' | |
22342 | else | |
22343 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
22344 | gl_next_as_first_directive=$gl_cv_next_stdarg_h | |
22345 | fi | |
22346 | NEXT_AS_FIRST_DIRECTIVE_STDARG_H=$gl_next_as_first_directive | |
0eb775a3 GM |
22347 | |
22348 | ||
22349 | ||
5476a9a4 GM |
22350 | |
22351 | if test "$gl_cv_next_stdarg_h" = '""'; then | |
22352 | gl_cv_next_stdarg_h='"///usr/include/stdarg.h"' | |
22353 | NEXT_STDARG_H="$gl_cv_next_stdarg_h" | |
22354 | fi | |
f199cab1 | 22355 | else |
5476a9a4 GM |
22356 | |
22357 | saved_as_echo_n="$as_echo_n" | |
22358 | as_echo_n=':' | |
22359 | if test "${gl_cv_func___va_copy+set}" = set; then : | |
f199cab1 GM |
22360 | $as_echo_n "(cached) " >&6 |
22361 | else | |
0eb775a3 | 22362 | |
5476a9a4 GM |
22363 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
22364 | /* end confdefs.h. */ | |
22365 | #include <stdarg.h> | |
f199cab1 GM |
22366 | int |
22367 | main () | |
22368 | { | |
5476a9a4 GM |
22369 | |
22370 | #ifndef __va_copy | |
22371 | error, bail out | |
22372 | #endif | |
22373 | ||
f199cab1 GM |
22374 | ; |
22375 | return 0; | |
22376 | } | |
22377 | _ACEOF | |
5476a9a4 GM |
22378 | if ac_fn_c_try_compile "$LINENO"; then : |
22379 | gl_cv_func___va_copy=yes | |
f199cab1 | 22380 | else |
5476a9a4 | 22381 | gl_cv_func___va_copy=no |
f199cab1 | 22382 | fi |
5476a9a4 | 22383 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
f199cab1 | 22384 | fi |
0eb775a3 | 22385 | |
5476a9a4 GM |
22386 | as_echo_n="$saved_as_echo_n" |
22387 | ||
22388 | if test $gl_cv_func___va_copy = yes; then | |
22389 | ||
22390 | $as_echo "#define va_copy __va_copy" >>confdefs.h | |
22391 | ||
22392 | else | |
0eb775a3 | 22393 | |
5476a9a4 GM |
22394 | |
22395 | $as_echo "#define va_copy gl_va_copy" >>confdefs.h | |
0eb775a3 | 22396 | |
f199cab1 GM |
22397 | fi |
22398 | fi | |
5476a9a4 GM |
22399 | fi |
22400 | ||
22401 | if test -n "$STDARG_H"; then | |
22402 | GL_GENERATE_STDARG_H_TRUE= | |
22403 | GL_GENERATE_STDARG_H_FALSE='#' | |
22404 | else | |
22405 | GL_GENERATE_STDARG_H_TRUE='#' | |
22406 | GL_GENERATE_STDARG_H_FALSE= | |
22407 | fi | |
22408 | ||
22409 | ||
22410 | ||
22411 | ||
22412 | ||
22413 | ||
22414 | # Define two additional variables used in the Makefile substitution. | |
22415 | ||
22416 | if test "$ac_cv_header_stdbool_h" = yes; then | |
22417 | STDBOOL_H='' | |
22418 | else | |
22419 | STDBOOL_H='stdbool.h' | |
22420 | fi | |
22421 | ||
22422 | if test -n "$STDBOOL_H"; then | |
22423 | GL_GENERATE_STDBOOL_H_TRUE= | |
22424 | GL_GENERATE_STDBOOL_H_FALSE='#' | |
22425 | else | |
22426 | GL_GENERATE_STDBOOL_H_TRUE='#' | |
22427 | GL_GENERATE_STDBOOL_H_FALSE= | |
22428 | fi | |
22429 | ||
22430 | ||
22431 | if test "$ac_cv_type__Bool" = yes; then | |
22432 | HAVE__BOOL=1 | |
22433 | else | |
22434 | HAVE__BOOL=0 | |
22435 | fi | |
22436 | ||
22437 | ||
22438 | ||
22439 | ||
22440 | ||
22441 | STDDEF_H= | |
22442 | if test $gt_cv_c_wchar_t = no; then | |
22443 | HAVE_WCHAR_T=0 | |
22444 | STDDEF_H=stddef.h | |
22445 | fi | |
22446 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5 | |
22447 | $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; } | |
22448 | if test "${gl_cv_decl_null_works+set}" = set; then : | |
f199cab1 GM |
22449 | $as_echo_n "(cached) " >&6 |
22450 | else | |
5476a9a4 | 22451 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
f199cab1 | 22452 | /* end confdefs.h. */ |
5476a9a4 GM |
22453 | #include <stddef.h> |
22454 | int test[2 * (sizeof NULL == sizeof (void *)) -1]; | |
3e0be4ab | 22455 | |
f199cab1 GM |
22456 | int |
22457 | main () | |
22458 | { | |
5476a9a4 | 22459 | |
f199cab1 GM |
22460 | ; |
22461 | return 0; | |
22462 | } | |
22463 | _ACEOF | |
5476a9a4 GM |
22464 | if ac_fn_c_try_compile "$LINENO"; then : |
22465 | gl_cv_decl_null_works=yes | |
f199cab1 | 22466 | else |
5476a9a4 | 22467 | gl_cv_decl_null_works=no |
f199cab1 | 22468 | fi |
5476a9a4 | 22469 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
f199cab1 | 22470 | fi |
5476a9a4 GM |
22471 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5 |
22472 | $as_echo "$gl_cv_decl_null_works" >&6; } | |
22473 | if test $gl_cv_decl_null_works = no; then | |
22474 | REPLACE_NULL=1 | |
22475 | STDDEF_H=stddef.h | |
22476 | fi | |
22477 | ||
22478 | if test -n "$STDDEF_H"; then | |
22479 | GL_GENERATE_STDDEF_H_TRUE= | |
22480 | GL_GENERATE_STDDEF_H_FALSE='#' | |
f199cab1 | 22481 | else |
5476a9a4 GM |
22482 | GL_GENERATE_STDDEF_H_TRUE='#' |
22483 | GL_GENERATE_STDDEF_H_FALSE= | |
f199cab1 | 22484 | fi |
3e0be4ab | 22485 | |
5476a9a4 | 22486 | if test -n "$STDDEF_H"; then |
3e0be4ab GM |
22487 | |
22488 | ||
5476a9a4 GM |
22489 | |
22490 | ||
22491 | ||
22492 | ||
22493 | ||
22494 | ||
22495 | if test $gl_cv_have_include_next = yes; then | |
22496 | gl_cv_next_stddef_h='<'stddef.h'>' | |
22497 | else | |
22498 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5 | |
22499 | $as_echo_n "checking absolute name of <stddef.h>... " >&6; } | |
22500 | if test "${gl_cv_next_stddef_h+set}" = set; then : | |
067d23c9 KY |
22501 | $as_echo_n "(cached) " >&6 |
22502 | else | |
5476a9a4 GM |
22503 | |
22504 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
067d23c9 | 22505 | /* end confdefs.h. */ |
5476a9a4 | 22506 | #include <stddef.h> |
f199cab1 | 22507 | |
067d23c9 | 22508 | _ACEOF |
5476a9a4 GM |
22509 | case "$host_os" in |
22510 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
22511 | *) gl_absname_cpp="$ac_cpp" ;; | |
22512 | esac | |
22513 | ||
22514 | case "$host_os" in | |
22515 | mingw*) | |
22516 | gl_dirsep_regex='[/\\]' | |
22517 | ;; | |
22518 | *) | |
22519 | gl_dirsep_regex='\/' | |
22520 | ;; | |
22521 | esac | |
22522 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
22523 | ||
22524 | gl_header_literal_regex=`echo 'stddef.h' \ | |
22525 | | sed -e "$gl_make_literal_regex_sed"` | |
22526 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
22527 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
22528 | s|^/[^/]|//&| | |
22529 | p | |
22530 | q | |
22531 | }' | |
22532 | gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
22533 | sed -n "$gl_absolute_header_sed"`'"' | |
22534 | ||
22535 | ||
f199cab1 | 22536 | fi |
5476a9a4 GM |
22537 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5 |
22538 | $as_echo "$gl_cv_next_stddef_h" >&6; } | |
22539 | fi | |
22540 | NEXT_STDDEF_H=$gl_cv_next_stddef_h | |
22541 | ||
22542 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then | |
22543 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
22544 | gl_next_as_first_directive='<'stddef.h'>' | |
22545 | else | |
22546 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
22547 | gl_next_as_first_directive=$gl_cv_next_stddef_h | |
22548 | fi | |
22549 | NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive | |
22550 | ||
f199cab1 | 22551 | |
f199cab1 | 22552 | |
f199cab1 | 22553 | |
067d23c9 | 22554 | fi |
067d23c9 | 22555 | |
f199cab1 | 22556 | |
067d23c9 | 22557 | |
067d23c9 | 22558 | |
067d23c9 | 22559 | |
067d23c9 KY |
22560 | |
22561 | ||
067d23c9 | 22562 | |
067d23c9 KY |
22563 | |
22564 | ||
067d23c9 | 22565 | |
3e0be4ab | 22566 | |
5476a9a4 GM |
22567 | |
22568 | if test $gl_cv_have_include_next = yes; then | |
22569 | gl_cv_next_stdio_h='<'stdio.h'>' | |
22570 | else | |
22571 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5 | |
22572 | $as_echo_n "checking absolute name of <stdio.h>... " >&6; } | |
22573 | if test "${gl_cv_next_stdio_h+set}" = set; then : | |
22574 | $as_echo_n "(cached) " >&6 | |
f199cab1 | 22575 | else |
5476a9a4 GM |
22576 | |
22577 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
22578 | /* end confdefs.h. */ | |
22579 | #include <stdio.h> | |
22580 | ||
f199cab1 | 22581 | _ACEOF |
5476a9a4 GM |
22582 | case "$host_os" in |
22583 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
22584 | *) gl_absname_cpp="$ac_cpp" ;; | |
22585 | esac | |
067d23c9 | 22586 | |
5476a9a4 GM |
22587 | case "$host_os" in |
22588 | mingw*) | |
22589 | gl_dirsep_regex='[/\\]' | |
22590 | ;; | |
22591 | *) | |
22592 | gl_dirsep_regex='\/' | |
22593 | ;; | |
22594 | esac | |
22595 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
22596 | ||
22597 | gl_header_literal_regex=`echo 'stdio.h' \ | |
22598 | | sed -e "$gl_make_literal_regex_sed"` | |
22599 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
22600 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
22601 | s|^/[^/]|//&| | |
22602 | p | |
22603 | q | |
22604 | }' | |
22605 | gl_cv_next_stdio_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
22606 | sed -n "$gl_absolute_header_sed"`'"' | |
067d23c9 | 22607 | |
067d23c9 | 22608 | |
f199cab1 | 22609 | fi |
5476a9a4 GM |
22610 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5 |
22611 | $as_echo "$gl_cv_next_stdio_h" >&6; } | |
22612 | fi | |
22613 | NEXT_STDIO_H=$gl_cv_next_stdio_h | |
067d23c9 | 22614 | |
5476a9a4 GM |
22615 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then |
22616 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
22617 | gl_next_as_first_directive='<'stdio.h'>' | |
22618 | else | |
22619 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
22620 | gl_next_as_first_directive=$gl_cv_next_stdio_h | |
22621 | fi | |
22622 | NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive | |
22623 | ||
22624 | ||
22625 | ||
22626 | ||
22627 | ||
22628 | GNULIB_FSCANF=1 | |
22629 | ||
22630 | ||
22631 | cat >>confdefs.h <<_ACEOF | |
22632 | #define GNULIB_FSCANF 1 | |
22633 | _ACEOF | |
067d23c9 | 22634 | |
067d23c9 | 22635 | |
5476a9a4 | 22636 | GNULIB_SCANF=1 |
f199cab1 | 22637 | |
f199cab1 | 22638 | |
5476a9a4 GM |
22639 | cat >>confdefs.h <<_ACEOF |
22640 | #define GNULIB_SCANF 1 | |
f199cab1 GM |
22641 | _ACEOF |
22642 | ||
067d23c9 | 22643 | |
5476a9a4 GM |
22644 | GNULIB_FGETC=1 |
22645 | GNULIB_GETC=1 | |
22646 | GNULIB_GETCHAR=1 | |
22647 | GNULIB_FGETS=1 | |
22648 | GNULIB_FREAD=1 | |
067d23c9 | 22649 | |
067d23c9 | 22650 | |
5476a9a4 GM |
22651 | GNULIB_FPRINTF=1 |
22652 | GNULIB_PRINTF=1 | |
22653 | GNULIB_VFPRINTF=1 | |
22654 | GNULIB_VPRINTF=1 | |
22655 | GNULIB_FPUTC=1 | |
22656 | GNULIB_PUTC=1 | |
22657 | GNULIB_PUTCHAR=1 | |
22658 | GNULIB_FPUTS=1 | |
22659 | GNULIB_PUTS=1 | |
22660 | GNULIB_FWRITE=1 | |
067d23c9 | 22661 | |
067d23c9 | 22662 | |
067d23c9 | 22663 | |
067d23c9 | 22664 | |
067d23c9 | 22665 | |
067d23c9 | 22666 | |
067d23c9 | 22667 | |
067d23c9 | 22668 | |
3e0be4ab GM |
22669 | |
22670 | ||
22671 | ||
22672 | ||
22673 | ||
22674 | ||
3e0be4ab | 22675 | |
5476a9a4 GM |
22676 | if test $gl_cv_have_include_next = yes; then |
22677 | gl_cv_next_stdlib_h='<'stdlib.h'>' | |
22678 | else | |
22679 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5 | |
22680 | $as_echo_n "checking absolute name of <stdlib.h>... " >&6; } | |
22681 | if test "${gl_cv_next_stdlib_h+set}" = set; then : | |
067d23c9 KY |
22682 | $as_echo_n "(cached) " >&6 |
22683 | else | |
5476a9a4 GM |
22684 | |
22685 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
f199cab1 | 22686 | /* end confdefs.h. */ |
5476a9a4 GM |
22687 | #include <stdlib.h> |
22688 | ||
f199cab1 | 22689 | _ACEOF |
5476a9a4 GM |
22690 | case "$host_os" in |
22691 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
22692 | *) gl_absname_cpp="$ac_cpp" ;; | |
22693 | esac | |
067d23c9 | 22694 | |
5476a9a4 GM |
22695 | case "$host_os" in |
22696 | mingw*) | |
22697 | gl_dirsep_regex='[/\\]' | |
22698 | ;; | |
22699 | *) | |
22700 | gl_dirsep_regex='\/' | |
22701 | ;; | |
22702 | esac | |
22703 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
22704 | ||
22705 | gl_header_literal_regex=`echo 'stdlib.h' \ | |
22706 | | sed -e "$gl_make_literal_regex_sed"` | |
22707 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
22708 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
22709 | s|^/[^/]|//&| | |
22710 | p | |
22711 | q | |
22712 | }' | |
22713 | gl_cv_next_stdlib_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
22714 | sed -n "$gl_absolute_header_sed"`'"' | |
3e0be4ab | 22715 | |
067d23c9 | 22716 | |
f199cab1 | 22717 | fi |
5476a9a4 GM |
22718 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5 |
22719 | $as_echo "$gl_cv_next_stdlib_h" >&6; } | |
22720 | fi | |
22721 | NEXT_STDLIB_H=$gl_cv_next_stdlib_h | |
b0415a03 | 22722 | |
5476a9a4 GM |
22723 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then |
22724 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
22725 | gl_next_as_first_directive='<'stdlib.h'>' | |
22726 | else | |
22727 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
22728 | gl_next_as_first_directive=$gl_cv_next_stdlib_h | |
22729 | fi | |
22730 | NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive | |
b0415a03 | 22731 | |
067d23c9 | 22732 | |
067d23c9 | 22733 | |
067d23c9 | 22734 | |
067d23c9 | 22735 | |
067d23c9 | 22736 | |
067d23c9 | 22737 | |
067d23c9 | 22738 | |
067d23c9 | 22739 | |
5476a9a4 | 22740 | # This defines (or not) HAVE_TZNAME and HAVE_TM_ZONE. |
067d23c9 | 22741 | |
067d23c9 | 22742 | |
067d23c9 | 22743 | |
b0415a03 GM |
22744 | |
22745 | ||
ac1ca7e9 | 22746 | |
0eb775a3 | 22747 | |
5476a9a4 | 22748 | $as_echo "#define my_strftime nstrftime" >>confdefs.h |
067d23c9 | 22749 | |
067d23c9 | 22750 | |
a0a61e58 GM |
22751 | |
22752 | ||
22753 | ||
3e0be4ab | 22754 | |
5476a9a4 GM |
22755 | |
22756 | ||
22757 | if test "$ac_cv_have_decl_strtoimax" != yes; then | |
22758 | HAVE_DECL_STRTOIMAX=0 | |
22759 | fi | |
22760 | ||
22761 | if test $ac_cv_func_strtoimax = yes; then | |
22762 | HAVE_STRTOIMAX=1 | |
22763 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtoimax works" >&5 | |
22764 | $as_echo_n "checking whether strtoimax works... " >&6; } | |
22765 | if test "${gl_cv_func_strtoimax+set}" = set; then : | |
f199cab1 GM |
22766 | $as_echo_n "(cached) " >&6 |
22767 | else | |
22768 | if test "$cross_compiling" = yes; then : | |
5476a9a4 GM |
22769 | case "$host_os" in |
22770 | # Guess no on AIX 5. | |
22771 | aix5*) gl_cv_func_strtoimax="guessing no" ;; | |
22772 | # Guess yes otherwise. | |
22773 | *) gl_cv_func_strtoimax="guessing yes" ;; | |
22774 | esac | |
22775 | ||
f199cab1 GM |
22776 | else |
22777 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
22778 | /* end confdefs.h. */ | |
3e0be4ab | 22779 | |
5476a9a4 GM |
22780 | #include <errno.h> |
22781 | #include <string.h> | |
22782 | #include <inttypes.h> | |
22783 | int main () | |
22784 | { | |
22785 | if (sizeof (intmax_t) > sizeof (int)) | |
22786 | { | |
22787 | const char *s = "4294967295"; | |
22788 | char *p; | |
22789 | intmax_t res; | |
22790 | errno = 0; | |
22791 | res = strtoimax (s, &p, 10); | |
22792 | if (p != s + strlen (s)) | |
22793 | return 1; | |
22794 | if (errno != 0) | |
22795 | return 2; | |
22796 | if (res != (intmax_t) 65535 * (intmax_t) 65537) | |
22797 | return 3; | |
22798 | } | |
22799 | else | |
22800 | { | |
22801 | const char *s = "2147483647"; | |
22802 | char *p; | |
22803 | intmax_t res; | |
22804 | errno = 0; | |
22805 | res = strtoimax (s, &p, 10); | |
22806 | if (p != s + strlen (s)) | |
22807 | return 1; | |
22808 | if (errno != 0) | |
22809 | return 2; | |
22810 | if (res != 2147483647) | |
22811 | return 3; | |
22812 | } | |
f199cab1 GM |
22813 | return 0; |
22814 | } | |
5476a9a4 | 22815 | |
f199cab1 GM |
22816 | _ACEOF |
22817 | if ac_fn_c_try_run "$LINENO"; then : | |
5476a9a4 | 22818 | gl_cv_func_strtoimax=yes |
f199cab1 | 22819 | else |
5476a9a4 | 22820 | gl_cv_func_strtoimax=no |
f199cab1 GM |
22821 | fi |
22822 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
22823 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
067d23c9 KY |
22824 | fi |
22825 | ||
3e0be4ab | 22826 | |
f199cab1 | 22827 | fi |
5476a9a4 GM |
22828 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtoimax" >&5 |
22829 | $as_echo "$gl_cv_func_strtoimax" >&6; } | |
22830 | case "$gl_cv_func_strtoimax" in | |
22831 | *no) REPLACE_STRTOIMAX=1 ;; | |
22832 | esac | |
22833 | else | |
22834 | HAVE_STRTOIMAX=0 | |
22835 | fi | |
067d23c9 | 22836 | |
a6342fc8 | 22837 | if test $HAVE_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; then |
067d23c9 | 22838 | |
067d23c9 | 22839 | |
067d23c9 | 22840 | |
067d23c9 | 22841 | |
067d23c9 | 22842 | |
3e0be4ab | 22843 | |
2b1928b8 GM |
22844 | |
22845 | ||
5476a9a4 GM |
22846 | gl_LIBOBJS="$gl_LIBOBJS strtoimax.$ac_objext" |
22847 | ||
22848 | ||
22849 | ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default" | |
22850 | if test "x$ac_cv_have_decl_strtoll" = x""yes; then : | |
22851 | ac_have_decl=1 | |
f199cab1 | 22852 | else |
5476a9a4 | 22853 | ac_have_decl=0 |
f199cab1 | 22854 | fi |
2b1928b8 | 22855 | |
5476a9a4 GM |
22856 | cat >>confdefs.h <<_ACEOF |
22857 | #define HAVE_DECL_STRTOLL $ac_have_decl | |
22858 | _ACEOF | |
22859 | ||
22860 | ||
067d23c9 | 22861 | |
a6342fc8 | 22862 | fi |
067d23c9 | 22863 | |
3e0be4ab GM |
22864 | |
22865 | ||
22866 | ||
3e0be4ab | 22867 | |
5476a9a4 | 22868 | GNULIB_STRTOIMAX=1 |
3e0be4ab GM |
22869 | |
22870 | ||
22871 | ||
22872 | ||
3e0be4ab GM |
22873 | |
22874 | ||
22875 | ||
f199cab1 | 22876 | |
f199cab1 | 22877 | |
5476a9a4 GM |
22878 | if test "$ac_cv_have_decl_strtoumax" != yes; then |
22879 | HAVE_DECL_STRTOUMAX=0 | |
22880 | fi | |
067d23c9 | 22881 | |
a6342fc8 | 22882 | if test $ac_cv_func_strtoumax = no; then |
0eb775a3 | 22883 | |
5476a9a4 GM |
22884 | |
22885 | ||
22886 | ||
22887 | ||
22888 | ||
22889 | ||
22890 | ||
22891 | gl_LIBOBJS="$gl_LIBOBJS strtoumax.$ac_objext" | |
22892 | ||
22893 | ||
22894 | ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default" | |
22895 | if test "x$ac_cv_have_decl_strtoull" = x""yes; then : | |
22896 | ac_have_decl=1 | |
067d23c9 | 22897 | else |
5476a9a4 | 22898 | ac_have_decl=0 |
067d23c9 | 22899 | fi |
5476a9a4 GM |
22900 | |
22901 | cat >>confdefs.h <<_ACEOF | |
22902 | #define HAVE_DECL_STRTOULL $ac_have_decl | |
22903 | _ACEOF | |
22904 | ||
22905 | ||
22906 | ||
a6342fc8 | 22907 | fi |
067d23c9 | 22908 | |
067d23c9 | 22909 | |
067d23c9 | 22910 | |
067d23c9 | 22911 | |
067d23c9 | 22912 | |
5476a9a4 GM |
22913 | GNULIB_STRTOUMAX=1 |
22914 | ||
22915 | ||
22916 | ||
22917 | ||
22918 | ||
22919 | ||
22920 | ||
22921 | if test $ac_cv_func_symlink = no; then | |
22922 | HAVE_SYMLINK=0 | |
22923 | else | |
22924 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether symlink handles trailing slash correctly" >&5 | |
22925 | $as_echo_n "checking whether symlink handles trailing slash correctly... " >&6; } | |
22926 | if test "${gl_cv_func_symlink_works+set}" = set; then : | |
f199cab1 | 22927 | $as_echo_n "(cached) " >&6 |
5476a9a4 GM |
22928 | else |
22929 | if test "$cross_compiling" = yes; then : | |
22930 | case "$host_os" in | |
22931 | # Guess yes on glibc systems. | |
22932 | *-gnu*) gl_cv_func_symlink_works="guessing yes" ;; | |
22933 | # If we don't know, assume the worst. | |
22934 | *) gl_cv_func_symlink_works="guessing no" ;; | |
22935 | esac | |
22936 | ||
f199cab1 GM |
22937 | else |
22938 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
22939 | /* end confdefs.h. */ | |
5476a9a4 GM |
22940 | #include <unistd.h> |
22941 | ||
f199cab1 GM |
22942 | int |
22943 | main () | |
22944 | { | |
5476a9a4 GM |
22945 | int result = 0; |
22946 | if (!symlink ("a", "conftest.link/")) | |
22947 | result |= 1; | |
22948 | if (symlink ("conftest.f", "conftest.lnk2")) | |
22949 | result |= 2; | |
22950 | else if (!symlink ("a", "conftest.lnk2/")) | |
22951 | result |= 4; | |
22952 | return result; | |
067d23c9 | 22953 | |
f199cab1 GM |
22954 | ; |
22955 | return 0; | |
22956 | } | |
22957 | _ACEOF | |
5476a9a4 GM |
22958 | if ac_fn_c_try_run "$LINENO"; then : |
22959 | gl_cv_func_symlink_works=yes | |
f199cab1 | 22960 | else |
5476a9a4 | 22961 | gl_cv_func_symlink_works=no |
f199cab1 | 22962 | fi |
5476a9a4 GM |
22963 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
22964 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
f199cab1 | 22965 | fi |
067d23c9 | 22966 | |
5476a9a4 | 22967 | rm -f conftest.f conftest.link conftest.lnk2 |
f199cab1 | 22968 | fi |
5476a9a4 GM |
22969 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_symlink_works" >&5 |
22970 | $as_echo "$gl_cv_func_symlink_works" >&6; } | |
22971 | case "$gl_cv_func_symlink_works" in | |
22972 | *yes) ;; | |
22973 | *) | |
22974 | REPLACE_SYMLINK=1 | |
22975 | ;; | |
22976 | esac | |
22977 | fi | |
067d23c9 | 22978 | |
a6342fc8 | 22979 | if test $HAVE_SYMLINK = 0 || test $REPLACE_SYMLINK = 1; then |
067d23c9 | 22980 | |
7e723570 | 22981 | |
7e723570 GM |
22982 | |
22983 | ||
dd0d840e | 22984 | |
dd0d840e GM |
22985 | |
22986 | ||
22987 | ||
5476a9a4 | 22988 | gl_LIBOBJS="$gl_LIBOBJS symlink.$ac_objext" |
dd0d840e | 22989 | |
a6342fc8 | 22990 | fi |
dd0d840e GM |
22991 | |
22992 | ||
d3127c14 GM |
22993 | |
22994 | ||
d3127c14 | 22995 | |
5476a9a4 | 22996 | GNULIB_SYMLINK=1 |
d3127c14 | 22997 | |
d3127c14 | 22998 | |
d3127c14 GM |
22999 | |
23000 | ||
067d23c9 | 23001 | |
067d23c9 | 23002 | |
d3127c14 | 23003 | |
d3127c14 | 23004 | |
5476a9a4 GM |
23005 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/select.h> is self-contained" >&5 |
23006 | $as_echo_n "checking whether <sys/select.h> is self-contained... " >&6; } | |
23007 | if test "${gl_cv_header_sys_select_h_selfcontained+set}" = set; then : | |
23008 | $as_echo_n "(cached) " >&6 | |
23009 | else | |
d3127c14 | 23010 | |
5476a9a4 GM |
23011 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
23012 | /* end confdefs.h. */ | |
23013 | #include <sys/select.h> | |
23014 | int | |
23015 | main () | |
23016 | { | |
23017 | struct timeval b; | |
23018 | ; | |
23019 | return 0; | |
23020 | } | |
23021 | _ACEOF | |
23022 | if ac_fn_c_try_compile "$LINENO"; then : | |
23023 | gl_cv_header_sys_select_h_selfcontained=yes | |
23024 | else | |
23025 | gl_cv_header_sys_select_h_selfcontained=no | |
23026 | fi | |
23027 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
23028 | if test $gl_cv_header_sys_select_h_selfcontained = yes; then | |
23029 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
23030 | /* end confdefs.h. */ | |
23031 | #include <sys/select.h> | |
23032 | int | |
23033 | main () | |
23034 | { | |
23035 | int memset; int bzero; | |
23036 | ; | |
23037 | return 0; | |
23038 | } | |
3e0be4ab | 23039 | |
5476a9a4 GM |
23040 | _ACEOF |
23041 | if ac_fn_c_try_compile "$LINENO"; then : | |
23042 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
23043 | /* end confdefs.h. */ | |
23044 | #include <sys/select.h> | |
23045 | int | |
23046 | main () | |
23047 | { | |
dd0d840e | 23048 | |
5476a9a4 GM |
23049 | #undef memset |
23050 | #define memset nonexistent_memset | |
23051 | extern | |
23052 | #ifdef __cplusplus | |
23053 | "C" | |
23054 | #endif | |
23055 | void *memset (void *, int, unsigned long); | |
23056 | #undef bzero | |
23057 | #define bzero nonexistent_bzero | |
23058 | extern | |
23059 | #ifdef __cplusplus | |
23060 | "C" | |
23061 | #endif | |
23062 | void bzero (void *, unsigned long); | |
23063 | fd_set fds; | |
23064 | FD_ZERO (&fds); | |
3e0be4ab | 23065 | |
5476a9a4 GM |
23066 | ; |
23067 | return 0; | |
23068 | } | |
067d23c9 | 23069 | |
5476a9a4 GM |
23070 | _ACEOF |
23071 | if ac_fn_c_try_link "$LINENO"; then : | |
dd0d840e | 23072 | |
5476a9a4 GM |
23073 | else |
23074 | gl_cv_header_sys_select_h_selfcontained=no | |
23075 | fi | |
23076 | rm -f core conftest.err conftest.$ac_objext \ | |
23077 | conftest$ac_exeext conftest.$ac_ext | |
dd0d840e | 23078 | |
5476a9a4 GM |
23079 | fi |
23080 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
23081 | fi | |
dd0d840e | 23082 | |
5476a9a4 GM |
23083 | fi |
23084 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_select_h_selfcontained" >&5 | |
23085 | $as_echo "$gl_cv_header_sys_select_h_selfcontained" >&6; } | |
dd0d840e | 23086 | |
dd0d840e GM |
23087 | |
23088 | ||
dd0d840e GM |
23089 | |
23090 | ||
dd0d840e GM |
23091 | |
23092 | ||
23093 | ||
dd0d840e | 23094 | |
5476a9a4 GM |
23095 | if test $gl_cv_have_include_next = yes; then |
23096 | gl_cv_next_sys_select_h='<'sys/select.h'>' | |
23097 | else | |
23098 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/select.h>" >&5 | |
23099 | $as_echo_n "checking absolute name of <sys/select.h>... " >&6; } | |
23100 | if test "${gl_cv_next_sys_select_h+set}" = set; then : | |
23101 | $as_echo_n "(cached) " >&6 | |
23102 | else | |
dd0d840e | 23103 | |
5476a9a4 | 23104 | if test $ac_cv_header_sys_select_h = yes; then |
dd0d840e | 23105 | |
dd0d840e | 23106 | |
5476a9a4 GM |
23107 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
23108 | /* end confdefs.h. */ | |
23109 | #include <sys/select.h> | |
dd0d840e | 23110 | |
5476a9a4 GM |
23111 | _ACEOF |
23112 | case "$host_os" in | |
23113 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
23114 | *) gl_absname_cpp="$ac_cpp" ;; | |
23115 | esac | |
dd0d840e | 23116 | |
5476a9a4 GM |
23117 | case "$host_os" in |
23118 | mingw*) | |
23119 | gl_dirsep_regex='[/\\]' | |
23120 | ;; | |
23121 | *) | |
23122 | gl_dirsep_regex='\/' | |
23123 | ;; | |
23124 | esac | |
23125 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
dd0d840e | 23126 | |
5476a9a4 GM |
23127 | gl_header_literal_regex=`echo 'sys/select.h' \ |
23128 | | sed -e "$gl_make_literal_regex_sed"` | |
23129 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
23130 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
23131 | s|^/[^/]|//&| | |
23132 | p | |
23133 | q | |
23134 | }' | |
23135 | gl_cv_next_sys_select_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
23136 | sed -n "$gl_absolute_header_sed"`'"' | |
23137 | else | |
23138 | gl_cv_next_sys_select_h='<'sys/select.h'>' | |
23139 | fi | |
067d23c9 | 23140 | |
067d23c9 | 23141 | |
5476a9a4 GM |
23142 | fi |
23143 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_select_h" >&5 | |
23144 | $as_echo "$gl_cv_next_sys_select_h" >&6; } | |
23145 | fi | |
23146 | NEXT_SYS_SELECT_H=$gl_cv_next_sys_select_h | |
23147 | ||
23148 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then | |
23149 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
23150 | gl_next_as_first_directive='<'sys/select.h'>' | |
23151 | else | |
23152 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
23153 | gl_next_as_first_directive=$gl_cv_next_sys_select_h | |
23154 | fi | |
23155 | NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H=$gl_next_as_first_directive | |
23156 | ||
23157 | ||
23158 | ||
23159 | ||
23160 | if test $ac_cv_header_sys_select_h = yes; then | |
23161 | HAVE_SYS_SELECT_H=1 | |
23162 | else | |
23163 | HAVE_SYS_SELECT_H=0 | |
23164 | fi | |
067d23c9 KY |
23165 | |
23166 | ||
7e723570 | 23167 | |
7e723570 | 23168 | |
7e723570 | 23169 | |
5476a9a4 GM |
23170 | if test $ac_cv_header_sys_socket_h != yes; then |
23171 | for ac_header in winsock2.h | |
23172 | do : | |
23173 | ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default" | |
23174 | if test "x$ac_cv_header_winsock2_h" = x""yes; then : | |
23175 | cat >>confdefs.h <<_ACEOF | |
23176 | #define HAVE_WINSOCK2_H 1 | |
23177 | _ACEOF | |
7e723570 | 23178 | |
5476a9a4 | 23179 | fi |
7e723570 | 23180 | |
5476a9a4 | 23181 | done |
7e723570 | 23182 | |
5476a9a4 GM |
23183 | fi |
23184 | if test "$ac_cv_header_winsock2_h" = yes; then | |
23185 | HAVE_WINSOCK2_H=1 | |
23186 | UNISTD_H_HAVE_WINSOCK2_H=1 | |
23187 | SYS_IOCTL_H_HAVE_WINSOCK2_H=1 | |
23188 | else | |
23189 | HAVE_WINSOCK2_H=0 | |
23190 | fi | |
7e723570 GM |
23191 | |
23192 | ||
dd0d840e | 23193 | |
dd0d840e | 23194 | |
dd0d840e GM |
23195 | |
23196 | ||
dd0d840e | 23197 | |
dd0d840e | 23198 | |
dd0d840e GM |
23199 | |
23200 | ||
23201 | ||
23202 | ||
23203 | ||
23204 | ||
23205 | ||
23206 | ||
dd0d840e | 23207 | |
dd0d840e | 23208 | |
dd0d840e | 23209 | |
dd0d840e | 23210 | |
dd0d840e | 23211 | |
dd0d840e | 23212 | |
5476a9a4 GM |
23213 | if test $gl_cv_have_include_next = yes; then |
23214 | gl_cv_next_sys_stat_h='<'sys/stat.h'>' | |
23215 | else | |
23216 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5 | |
23217 | $as_echo_n "checking absolute name of <sys/stat.h>... " >&6; } | |
23218 | if test "${gl_cv_next_sys_stat_h+set}" = set; then : | |
23219 | $as_echo_n "(cached) " >&6 | |
23220 | else | |
dd0d840e | 23221 | |
5476a9a4 | 23222 | if test $ac_cv_header_sys_stat_h = yes; then |
dd0d840e | 23223 | |
dd0d840e | 23224 | |
5476a9a4 GM |
23225 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
23226 | /* end confdefs.h. */ | |
23227 | #include <sys/stat.h> | |
dd0d840e | 23228 | |
5476a9a4 GM |
23229 | _ACEOF |
23230 | case "$host_os" in | |
23231 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
23232 | *) gl_absname_cpp="$ac_cpp" ;; | |
23233 | esac | |
dd0d840e | 23234 | |
5476a9a4 GM |
23235 | case "$host_os" in |
23236 | mingw*) | |
23237 | gl_dirsep_regex='[/\\]' | |
23238 | ;; | |
23239 | *) | |
23240 | gl_dirsep_regex='\/' | |
23241 | ;; | |
23242 | esac | |
23243 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
dd0d840e | 23244 | |
5476a9a4 GM |
23245 | gl_header_literal_regex=`echo 'sys/stat.h' \ |
23246 | | sed -e "$gl_make_literal_regex_sed"` | |
23247 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
23248 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
23249 | s|^/[^/]|//&| | |
23250 | p | |
23251 | q | |
23252 | }' | |
23253 | gl_cv_next_sys_stat_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
23254 | sed -n "$gl_absolute_header_sed"`'"' | |
23255 | else | |
23256 | gl_cv_next_sys_stat_h='<'sys/stat.h'>' | |
23257 | fi | |
dd0d840e | 23258 | |
dd0d840e | 23259 | |
5476a9a4 GM |
23260 | fi |
23261 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5 | |
23262 | $as_echo "$gl_cv_next_sys_stat_h" >&6; } | |
23263 | fi | |
23264 | NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h | |
dd0d840e | 23265 | |
5476a9a4 GM |
23266 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then |
23267 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
23268 | gl_next_as_first_directive='<'sys/stat.h'>' | |
23269 | else | |
23270 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
23271 | gl_next_as_first_directive=$gl_cv_next_sys_stat_h | |
23272 | fi | |
23273 | NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive | |
dd0d840e | 23274 | |
dd0d840e | 23275 | |
d3127c14 | 23276 | |
d3127c14 | 23277 | |
dd0d840e | 23278 | |
dd0d840e | 23279 | |
dd0d840e | 23280 | |
dd0d840e | 23281 | |
dd0d840e | 23282 | |
dd0d840e | 23283 | |
dd0d840e | 23284 | |
5476a9a4 | 23285 | if test $WINDOWS_64_BIT_ST_SIZE = 1; then |
dd0d840e | 23286 | |
5476a9a4 | 23287 | $as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h |
dd0d840e | 23288 | |
5476a9a4 | 23289 | fi |
dd0d840e | 23290 | |
5476a9a4 GM |
23291 | ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h> |
23292 | #include <sys/stat.h> | |
23293 | " | |
23294 | if test "x$ac_cv_type_nlink_t" = x""yes; then : | |
dd0d840e | 23295 | |
5476a9a4 | 23296 | else |
dd0d840e | 23297 | |
5476a9a4 | 23298 | $as_echo "#define nlink_t int" >>confdefs.h |
dd0d840e | 23299 | |
5476a9a4 | 23300 | fi |
dd0d840e | 23301 | |
dd0d840e | 23302 | |
dd0d840e | 23303 | |
dd0d840e | 23304 | |
dd0d840e | 23305 | |
dd0d840e | 23306 | |
dd0d840e | 23307 | |
c9ca3f76 | 23308 | |
dd0d840e | 23309 | |
dd0d840e | 23310 | |
dd0d840e | 23311 | |
c9ca3f76 | 23312 | |
dd0d840e | 23313 | |
dd0d840e GM |
23314 | |
23315 | ||
7e723570 GM |
23316 | |
23317 | ||
7e723570 | 23318 | |
5476a9a4 GM |
23319 | ac_fn_c_check_decl "$LINENO" "localtime_r" "ac_cv_have_decl_localtime_r" "#include <time.h> |
23320 | " | |
23321 | if test "x$ac_cv_have_decl_localtime_r" = x""yes; then : | |
23322 | ac_have_decl=1 | |
23323 | else | |
23324 | ac_have_decl=0 | |
23325 | fi | |
7e723570 | 23326 | |
5476a9a4 GM |
23327 | cat >>confdefs.h <<_ACEOF |
23328 | #define HAVE_DECL_LOCALTIME_R $ac_have_decl | |
23329 | _ACEOF | |
7e723570 | 23330 | |
5476a9a4 GM |
23331 | if test $ac_cv_have_decl_localtime_r = no; then |
23332 | HAVE_DECL_LOCALTIME_R=0 | |
23333 | fi | |
7e723570 | 23334 | |
7e723570 | 23335 | |
5476a9a4 GM |
23336 | if test $ac_cv_func_localtime_r = yes; then |
23337 | HAVE_LOCALTIME_R=1 | |
23338 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime_r is compatible with its POSIX signature" >&5 | |
23339 | $as_echo_n "checking whether localtime_r is compatible with its POSIX signature... " >&6; } | |
23340 | if test "${gl_cv_time_r_posix+set}" = set; then : | |
23341 | $as_echo_n "(cached) " >&6 | |
23342 | else | |
23343 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
23344 | /* end confdefs.h. */ | |
23345 | #include <time.h> | |
7e723570 GM |
23346 | int |
23347 | main () | |
23348 | { | |
5476a9a4 GM |
23349 | /* We don't need to append 'restrict's to the argument types, |
23350 | even though the POSIX signature has the 'restrict's, | |
23351 | since C99 says they can't affect type compatibility. */ | |
23352 | struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r; | |
23353 | if (ptr) return 0; | |
23354 | /* Check the return type is a pointer. | |
23355 | On HP-UX 10 it is 'int'. */ | |
23356 | *localtime_r (0, 0); | |
7e723570 GM |
23357 | ; |
23358 | return 0; | |
23359 | } | |
5476a9a4 | 23360 | |
7e723570 | 23361 | _ACEOF |
5476a9a4 GM |
23362 | if ac_fn_c_try_compile "$LINENO"; then : |
23363 | gl_cv_time_r_posix=yes | |
7e723570 | 23364 | else |
5476a9a4 | 23365 | gl_cv_time_r_posix=no |
7e723570 | 23366 | fi |
5476a9a4 | 23367 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
02bd7257 | 23368 | |
5476a9a4 GM |
23369 | fi |
23370 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_r_posix" >&5 | |
23371 | $as_echo "$gl_cv_time_r_posix" >&6; } | |
23372 | if test $gl_cv_time_r_posix = yes; then | |
23373 | REPLACE_LOCALTIME_R=0 | |
23374 | else | |
23375 | REPLACE_LOCALTIME_R=1 | |
23376 | fi | |
23377 | else | |
23378 | HAVE_LOCALTIME_R=0 | |
23379 | fi | |
02bd7257 | 23380 | |
a6342fc8 | 23381 | if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then |
02bd7257 GM |
23382 | |
23383 | ||
02bd7257 | 23384 | |
02bd7257 | 23385 | |
02bd7257 | 23386 | |
02bd7257 | 23387 | |
7e723570 | 23388 | |
7e723570 | 23389 | |
5476a9a4 GM |
23390 | gl_LIBOBJS="$gl_LIBOBJS time_r.$ac_objext" |
23391 | ||
23392 | ||
23393 | : | |
7e723570 | 23394 | |
a6342fc8 | 23395 | fi |
7e723570 | 23396 | |
7e723570 | 23397 | |
7e723570 | 23398 | |
7e723570 | 23399 | |
7e723570 | 23400 | |
5476a9a4 | 23401 | GNULIB_TIME_R=1 |
7e723570 | 23402 | |
7e723570 | 23403 | |
7e723570 | 23404 | |
7e723570 | 23405 | |
7e723570 | 23406 | |
a6342fc8 | 23407 | : |
7e723570 | 23408 | |
02bd7257 | 23409 | |
02bd7257 | 23410 | |
02bd7257 | 23411 | |
02bd7257 | 23412 | |
02bd7257 | 23413 | |
02bd7257 | 23414 | |
02bd7257 | 23415 | |
dd0d840e GM |
23416 | |
23417 | ||
23418 | ||
dd0d840e | 23419 | |
dd0d840e | 23420 | |
5476a9a4 GM |
23421 | if test $gl_cv_have_include_next = yes; then |
23422 | gl_cv_next_unistd_h='<'unistd.h'>' | |
23423 | else | |
23424 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5 | |
23425 | $as_echo_n "checking absolute name of <unistd.h>... " >&6; } | |
23426 | if test "${gl_cv_next_unistd_h+set}" = set; then : | |
23427 | $as_echo_n "(cached) " >&6 | |
23428 | else | |
dd0d840e | 23429 | |
5476a9a4 | 23430 | if test $ac_cv_header_unistd_h = yes; then |
dd0d840e | 23431 | |
dd0d840e | 23432 | |
5476a9a4 | 23433 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
d3127c14 | 23434 | /* end confdefs.h. */ |
5476a9a4 | 23435 | #include <unistd.h> |
d3127c14 | 23436 | |
5476a9a4 GM |
23437 | _ACEOF |
23438 | case "$host_os" in | |
23439 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
23440 | *) gl_absname_cpp="$ac_cpp" ;; | |
23441 | esac | |
d3127c14 | 23442 | |
5476a9a4 GM |
23443 | case "$host_os" in |
23444 | mingw*) | |
23445 | gl_dirsep_regex='[/\\]' | |
23446 | ;; | |
23447 | *) | |
23448 | gl_dirsep_regex='\/' | |
23449 | ;; | |
23450 | esac | |
23451 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
23452 | ||
23453 | gl_header_literal_regex=`echo 'unistd.h' \ | |
23454 | | sed -e "$gl_make_literal_regex_sed"` | |
23455 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
23456 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
23457 | s|^/[^/]|//&| | |
23458 | p | |
23459 | q | |
23460 | }' | |
23461 | gl_cv_next_unistd_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
23462 | sed -n "$gl_absolute_header_sed"`'"' | |
23463 | else | |
23464 | gl_cv_next_unistd_h='<'unistd.h'>' | |
23465 | fi | |
d3127c14 | 23466 | |
d3127c14 | 23467 | |
c9ca3f76 | 23468 | fi |
5476a9a4 GM |
23469 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5 |
23470 | $as_echo "$gl_cv_next_unistd_h" >&6; } | |
23471 | fi | |
23472 | NEXT_UNISTD_H=$gl_cv_next_unistd_h | |
c9ca3f76 | 23473 | |
5476a9a4 GM |
23474 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then |
23475 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
23476 | gl_next_as_first_directive='<'unistd.h'>' | |
23477 | else | |
23478 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
23479 | gl_next_as_first_directive=$gl_cv_next_unistd_h | |
23480 | fi | |
23481 | NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive | |
c9ca3f76 | 23482 | |
c9ca3f76 | 23483 | |
c9ca3f76 | 23484 | |
c9ca3f76 | 23485 | |
5476a9a4 GM |
23486 | if test $ac_cv_header_unistd_h = yes; then |
23487 | HAVE_UNISTD_H=1 | |
23488 | else | |
23489 | HAVE_UNISTD_H=0 | |
23490 | fi | |
c9ca3f76 | 23491 | |
d3127c14 | 23492 | |
dd0d840e | 23493 | |
dd0d840e | 23494 | |
d3127c14 | 23495 | |
d3127c14 | 23496 | |
dd0d840e GM |
23497 | |
23498 | ||
c9ca3f76 GM |
23499 | |
23500 | ||
23501 | ||
23502 | ||
23503 | ||
c9ca3f76 | 23504 | |
5476a9a4 GM |
23505 | if test $ac_cv_func_futimens = no && test $ac_cv_func_futimesat = yes; then |
23506 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether futimesat handles NULL file" >&5 | |
23507 | $as_echo_n "checking whether futimesat handles NULL file... " >&6; } | |
23508 | if test "${gl_cv_func_futimesat_works+set}" = set; then : | |
23509 | $as_echo_n "(cached) " >&6 | |
23510 | else | |
23511 | touch conftest.file | |
23512 | if test "$cross_compiling" = yes; then : | |
23513 | case "$host_os" in | |
23514 | # Guess yes on glibc systems. | |
23515 | *-gnu*) gl_cv_func_futimesat_works="guessing yes" ;; | |
23516 | # If we don't know, assume the worst. | |
23517 | *) gl_cv_func_futimesat_works="guessing no" ;; | |
23518 | esac | |
c9ca3f76 | 23519 | |
5476a9a4 GM |
23520 | else |
23521 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
c9ca3f76 GM |
23522 | /* end confdefs.h. */ |
23523 | ||
5476a9a4 GM |
23524 | #include <stddef.h> |
23525 | #include <sys/times.h> | |
23526 | #include <fcntl.h> | |
c9ca3f76 GM |
23527 | |
23528 | int | |
23529 | main () | |
23530 | { | |
5476a9a4 GM |
23531 | int fd = open ("conftest.file", O_RDWR); |
23532 | if (fd < 0) return 1; | |
23533 | if (futimesat (fd, NULL, NULL)) return 2; | |
c9ca3f76 GM |
23534 | |
23535 | ; | |
23536 | return 0; | |
23537 | } | |
23538 | _ACEOF | |
5476a9a4 GM |
23539 | if ac_fn_c_try_run "$LINENO"; then : |
23540 | gl_cv_func_futimesat_works=yes | |
c9ca3f76 | 23541 | else |
5476a9a4 | 23542 | gl_cv_func_futimesat_works=no |
c9ca3f76 | 23543 | fi |
5476a9a4 GM |
23544 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
23545 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
c9ca3f76 GM |
23546 | fi |
23547 | ||
5476a9a4 GM |
23548 | rm -f conftest.file |
23549 | fi | |
23550 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_futimesat_works" >&5 | |
23551 | $as_echo "$gl_cv_func_futimesat_works" >&6; } | |
23552 | case "$gl_cv_func_futimesat_works" in | |
23553 | *yes) ;; | |
23554 | *) | |
7e723570 | 23555 | |
5476a9a4 | 23556 | $as_echo "#define FUTIMESAT_NULL_BUG 1" >>confdefs.h |
067d23c9 | 23557 | |
5476a9a4 GM |
23558 | ;; |
23559 | esac | |
23560 | fi | |
dd0d840e | 23561 | |
5476a9a4 GM |
23562 | gl_gnulib_enabled_dosname=false |
23563 | gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=false | |
23564 | gl_gnulib_enabled_pathmax=false | |
23565 | gl_gnulib_enabled_stat=false | |
23566 | gl_gnulib_enabled_strtoll=false | |
23567 | gl_gnulib_enabled_strtoull=false | |
23568 | gl_gnulib_enabled_verify=false | |
23569 | func_gl_gnulib_m4code_dosname () | |
23570 | { | |
23571 | if ! $gl_gnulib_enabled_dosname; then | |
23572 | gl_gnulib_enabled_dosname=true | |
23573 | fi | |
23574 | } | |
23575 | func_gl_gnulib_m4code_be453cec5eecf5731a274f2de7f2db36 () | |
23576 | { | |
23577 | if ! $gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36; then | |
dd0d840e | 23578 | |
d3127c14 | 23579 | |
5476a9a4 GM |
23580 | gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=true |
23581 | fi | |
23582 | } | |
23583 | func_gl_gnulib_m4code_pathmax () | |
23584 | { | |
23585 | if ! $gl_gnulib_enabled_pathmax; then | |
d3127c14 GM |
23586 | |
23587 | ||
23588 | ||
5476a9a4 GM |
23589 | gl_gnulib_enabled_pathmax=true |
23590 | fi | |
23591 | } | |
23592 | func_gl_gnulib_m4code_stat () | |
23593 | { | |
23594 | if ! $gl_gnulib_enabled_stat; then | |
d3127c14 | 23595 | |
d3127c14 | 23596 | |
d3127c14 | 23597 | |
5476a9a4 GM |
23598 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5 |
23599 | $as_echo_n "checking whether stat handles trailing slashes on directories... " >&6; } | |
23600 | if test "${gl_cv_func_stat_dir_slash+set}" = set; then : | |
23601 | $as_echo_n "(cached) " >&6 | |
23602 | else | |
23603 | if test "$cross_compiling" = yes; then : | |
23604 | case $host_os in | |
23605 | mingw*) gl_cv_func_stat_dir_slash="guessing no";; | |
23606 | *) gl_cv_func_stat_dir_slash="guessing yes";; | |
23607 | esac | |
23608 | else | |
23609 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
d3127c14 | 23610 | /* end confdefs.h. */ |
5476a9a4 | 23611 | #include <sys/stat.h> |
d3127c14 GM |
23612 | |
23613 | int | |
23614 | main () | |
23615 | { | |
5476a9a4 | 23616 | struct stat st; return stat (".", &st) != stat ("./", &st); |
d3127c14 GM |
23617 | ; |
23618 | return 0; | |
23619 | } | |
23620 | _ACEOF | |
5476a9a4 GM |
23621 | if ac_fn_c_try_run "$LINENO"; then : |
23622 | gl_cv_func_stat_dir_slash=yes | |
d3127c14 | 23623 | else |
5476a9a4 GM |
23624 | gl_cv_func_stat_dir_slash=no |
23625 | fi | |
23626 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
23627 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
d3127c14 | 23628 | fi |
d3127c14 | 23629 | |
5476a9a4 GM |
23630 | fi |
23631 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5 | |
23632 | $as_echo "$gl_cv_func_stat_dir_slash" >&6; } | |
23633 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5 | |
23634 | $as_echo_n "checking whether stat handles trailing slashes on files... " >&6; } | |
23635 | if test "${gl_cv_func_stat_file_slash+set}" = set; then : | |
23636 | $as_echo_n "(cached) " >&6 | |
23637 | else | |
23638 | touch conftest.tmp | |
23639 | # Assume that if we have lstat, we can also check symlinks. | |
23640 | if test $ac_cv_func_lstat = yes; then | |
23641 | ln -s conftest.tmp conftest.lnk | |
23642 | fi | |
23643 | if test "$cross_compiling" = yes; then : | |
23644 | case "$host_os" in | |
23645 | # Guess yes on glibc systems. | |
23646 | *-gnu*) gl_cv_func_stat_file_slash="guessing yes" ;; | |
23647 | # If we don't know, assume the worst. | |
23648 | *) gl_cv_func_stat_file_slash="guessing no" ;; | |
23649 | esac | |
d3127c14 | 23650 | |
5476a9a4 GM |
23651 | else |
23652 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
d3127c14 | 23653 | /* end confdefs.h. */ |
5476a9a4 | 23654 | #include <sys/stat.h> |
d3127c14 GM |
23655 | |
23656 | int | |
23657 | main () | |
23658 | { | |
5476a9a4 GM |
23659 | int result = 0; |
23660 | struct stat st; | |
23661 | if (!stat ("conftest.tmp/", &st)) | |
23662 | result |= 1; | |
23663 | #if HAVE_LSTAT | |
23664 | if (!stat ("conftest.lnk/", &st)) | |
23665 | result |= 2; | |
23666 | #endif | |
23667 | return result; | |
d3127c14 GM |
23668 | |
23669 | ; | |
23670 | return 0; | |
23671 | } | |
23672 | _ACEOF | |
5476a9a4 GM |
23673 | if ac_fn_c_try_run "$LINENO"; then : |
23674 | gl_cv_func_stat_file_slash=yes | |
d3127c14 | 23675 | else |
5476a9a4 GM |
23676 | gl_cv_func_stat_file_slash=no |
23677 | fi | |
23678 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
23679 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
d3127c14 | 23680 | fi |
d3127c14 | 23681 | |
5476a9a4 GM |
23682 | rm -f conftest.tmp conftest.lnk |
23683 | fi | |
23684 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5 | |
23685 | $as_echo "$gl_cv_func_stat_file_slash" >&6; } | |
23686 | case $gl_cv_func_stat_dir_slash in | |
23687 | *no) REPLACE_STAT=1 | |
d3127c14 | 23688 | |
5476a9a4 GM |
23689 | $as_echo "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h |
23690 | ;; | |
23691 | esac | |
23692 | case $gl_cv_func_stat_file_slash in | |
23693 | *no) REPLACE_STAT=1 | |
d3127c14 | 23694 | |
5476a9a4 GM |
23695 | $as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h |
23696 | ;; | |
23697 | esac | |
d3127c14 | 23698 | |
a6342fc8 | 23699 | if test $REPLACE_STAT = 1; then |
d3127c14 | 23700 | |
dd0d840e | 23701 | |
dd0d840e | 23702 | |
dd0d840e | 23703 | |
dd0d840e | 23704 | |
dd0d840e | 23705 | |
067d23c9 KY |
23706 | |
23707 | ||
5476a9a4 | 23708 | gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext" |
067d23c9 KY |
23709 | |
23710 | ||
23711 | ||
5476a9a4 | 23712 | : |
067d23c9 | 23713 | |
a6342fc8 | 23714 | fi |
067d23c9 | 23715 | |
dd0d840e GM |
23716 | |
23717 | ||
dd0d840e | 23718 | |
dd0d840e | 23719 | |
5476a9a4 | 23720 | GNULIB_STAT=1 |
dd0d840e | 23721 | |
067d23c9 KY |
23722 | |
23723 | ||
23724 | ||
23725 | ||
5476a9a4 GM |
23726 | gl_gnulib_enabled_stat=true |
23727 | if test $REPLACE_STAT = 1; then | |
23728 | func_gl_gnulib_m4code_dosname | |
23729 | fi | |
23730 | if test $REPLACE_STAT = 1; then | |
23731 | func_gl_gnulib_m4code_pathmax | |
23732 | fi | |
23733 | if test $REPLACE_STAT = 1; then | |
23734 | func_gl_gnulib_m4code_verify | |
23735 | fi | |
23736 | fi | |
23737 | } | |
23738 | func_gl_gnulib_m4code_strtoll () | |
23739 | { | |
23740 | if ! $gl_gnulib_enabled_strtoll; then | |
067d23c9 KY |
23741 | |
23742 | ||
23743 | ||
5476a9a4 GM |
23744 | if test "$ac_cv_type_long_long_int" = yes; then |
23745 | for ac_func in strtoll | |
23746 | do : | |
23747 | ac_fn_c_check_func "$LINENO" "strtoll" "ac_cv_func_strtoll" | |
23748 | if test "x$ac_cv_func_strtoll" = x""yes; then : | |
23749 | cat >>confdefs.h <<_ACEOF | |
23750 | #define HAVE_STRTOLL 1 | |
23751 | _ACEOF | |
067d23c9 | 23752 | |
5476a9a4 GM |
23753 | fi |
23754 | done | |
067d23c9 | 23755 | |
5476a9a4 GM |
23756 | if test $ac_cv_func_strtoll = no; then |
23757 | HAVE_STRTOLL=0 | |
23758 | fi | |
23759 | fi | |
067d23c9 | 23760 | |
a6342fc8 | 23761 | if test $HAVE_STRTOLL = 0; then |
067d23c9 KY |
23762 | |
23763 | ||
23764 | ||
067d23c9 KY |
23765 | |
23766 | ||
23767 | ||
23768 | ||
23769 | ||
5476a9a4 | 23770 | gl_LIBOBJS="$gl_LIBOBJS strtoll.$ac_objext" |
067d23c9 KY |
23771 | |
23772 | ||
5476a9a4 | 23773 | : |
067d23c9 | 23774 | |
a6342fc8 | 23775 | fi |
067d23c9 KY |
23776 | |
23777 | ||
23778 | ||
067d23c9 | 23779 | |
067d23c9 | 23780 | |
5476a9a4 | 23781 | GNULIB_STRTOLL=1 |
067d23c9 | 23782 | |
397f7161 | 23783 | |
067d23c9 KY |
23784 | |
23785 | ||
067d23c9 | 23786 | |
5476a9a4 GM |
23787 | gl_gnulib_enabled_strtoll=true |
23788 | fi | |
23789 | } | |
23790 | func_gl_gnulib_m4code_strtoull () | |
23791 | { | |
23792 | if ! $gl_gnulib_enabled_strtoull; then | |
067d23c9 | 23793 | |
067d23c9 | 23794 | |
067d23c9 | 23795 | |
5476a9a4 GM |
23796 | if test "$ac_cv_type_unsigned_long_long_int" = yes; then |
23797 | for ac_func in strtoull | |
23798 | do : | |
23799 | ac_fn_c_check_func "$LINENO" "strtoull" "ac_cv_func_strtoull" | |
23800 | if test "x$ac_cv_func_strtoull" = x""yes; then : | |
23801 | cat >>confdefs.h <<_ACEOF | |
23802 | #define HAVE_STRTOULL 1 | |
23803 | _ACEOF | |
067d23c9 | 23804 | |
f199cab1 | 23805 | fi |
5476a9a4 | 23806 | done |
067d23c9 | 23807 | |
5476a9a4 GM |
23808 | if test $ac_cv_func_strtoull = no; then |
23809 | HAVE_STRTOULL=0 | |
23810 | fi | |
23811 | fi | |
067d23c9 | 23812 | |
a6342fc8 | 23813 | if test $HAVE_STRTOULL = 0; then |
067d23c9 KY |
23814 | |
23815 | ||
067d23c9 | 23816 | |
067d23c9 | 23817 | |
067d23c9 | 23818 | |
067d23c9 | 23819 | |
067d23c9 | 23820 | |
067d23c9 | 23821 | |
5476a9a4 | 23822 | gl_LIBOBJS="$gl_LIBOBJS strtoull.$ac_objext" |
067d23c9 | 23823 | |
067d23c9 | 23824 | |
5476a9a4 | 23825 | : |
067d23c9 | 23826 | |
a6342fc8 | 23827 | fi |
067d23c9 KY |
23828 | |
23829 | ||
3e0be4ab | 23830 | |
3e0be4ab | 23831 | |
067d23c9 | 23832 | |
5476a9a4 | 23833 | GNULIB_STRTOULL=1 |
067d23c9 | 23834 | |
a0a61e58 | 23835 | |
067d23c9 | 23836 | |
067d23c9 KY |
23837 | |
23838 | ||
5476a9a4 GM |
23839 | gl_gnulib_enabled_strtoull=true |
23840 | fi | |
23841 | } | |
23842 | func_gl_gnulib_m4code_verify () | |
23843 | { | |
23844 | if ! $gl_gnulib_enabled_verify; then | |
23845 | gl_gnulib_enabled_verify=true | |
23846 | fi | |
23847 | } | |
23848 | if test $REPLACE_GETOPT = 1; then | |
23849 | func_gl_gnulib_m4code_be453cec5eecf5731a274f2de7f2db36 | |
23850 | fi | |
23851 | if test $REPLACE_LSTAT = 1; then | |
23852 | func_gl_gnulib_m4code_dosname | |
23853 | fi | |
23854 | if test $REPLACE_LSTAT = 1; then | |
23855 | func_gl_gnulib_m4code_stat | |
23856 | fi | |
23857 | if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then | |
23858 | func_gl_gnulib_m4code_stat | |
23859 | fi | |
23860 | if { test $HAVE_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; } && test $ac_cv_type_long_long_int = yes; then | |
23861 | func_gl_gnulib_m4code_strtoll | |
23862 | fi | |
23863 | if test $HAVE_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; then | |
23864 | func_gl_gnulib_m4code_verify | |
23865 | fi | |
23866 | if test $ac_cv_func_strtoumax = no && test $ac_cv_type_unsigned_long_long_int = yes; then | |
23867 | func_gl_gnulib_m4code_strtoull | |
23868 | fi | |
23869 | if test $ac_cv_func_strtoumax = no; then | |
23870 | func_gl_gnulib_m4code_verify | |
23871 | fi | |
067d23c9 | 23872 | |
5476a9a4 GM |
23873 | if $gl_gnulib_enabled_dosname; then |
23874 | gl_GNULIB_ENABLED_dosname_TRUE= | |
23875 | gl_GNULIB_ENABLED_dosname_FALSE='#' | |
23876 | else | |
23877 | gl_GNULIB_ENABLED_dosname_TRUE='#' | |
23878 | gl_GNULIB_ENABLED_dosname_FALSE= | |
23879 | fi | |
067d23c9 | 23880 | |
5476a9a4 GM |
23881 | if $gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36; then |
23882 | gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE= | |
23883 | gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE='#' | |
23884 | else | |
23885 | gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE='#' | |
23886 | gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE= | |
23887 | fi | |
067d23c9 | 23888 | |
5476a9a4 GM |
23889 | if $gl_gnulib_enabled_pathmax; then |
23890 | gl_GNULIB_ENABLED_pathmax_TRUE= | |
23891 | gl_GNULIB_ENABLED_pathmax_FALSE='#' | |
23892 | else | |
23893 | gl_GNULIB_ENABLED_pathmax_TRUE='#' | |
23894 | gl_GNULIB_ENABLED_pathmax_FALSE= | |
23895 | fi | |
067d23c9 | 23896 | |
5476a9a4 GM |
23897 | if $gl_gnulib_enabled_stat; then |
23898 | gl_GNULIB_ENABLED_stat_TRUE= | |
23899 | gl_GNULIB_ENABLED_stat_FALSE='#' | |
23900 | else | |
23901 | gl_GNULIB_ENABLED_stat_TRUE='#' | |
23902 | gl_GNULIB_ENABLED_stat_FALSE= | |
23903 | fi | |
067d23c9 | 23904 | |
5476a9a4 GM |
23905 | if $gl_gnulib_enabled_strtoll; then |
23906 | gl_GNULIB_ENABLED_strtoll_TRUE= | |
23907 | gl_GNULIB_ENABLED_strtoll_FALSE='#' | |
23908 | else | |
23909 | gl_GNULIB_ENABLED_strtoll_TRUE='#' | |
23910 | gl_GNULIB_ENABLED_strtoll_FALSE= | |
23911 | fi | |
067d23c9 | 23912 | |
5476a9a4 GM |
23913 | if $gl_gnulib_enabled_strtoull; then |
23914 | gl_GNULIB_ENABLED_strtoull_TRUE= | |
23915 | gl_GNULIB_ENABLED_strtoull_FALSE='#' | |
23916 | else | |
23917 | gl_GNULIB_ENABLED_strtoull_TRUE='#' | |
23918 | gl_GNULIB_ENABLED_strtoull_FALSE= | |
f199cab1 | 23919 | fi |
067d23c9 | 23920 | |
5476a9a4 GM |
23921 | if $gl_gnulib_enabled_verify; then |
23922 | gl_GNULIB_ENABLED_verify_TRUE= | |
23923 | gl_GNULIB_ENABLED_verify_FALSE='#' | |
23924 | else | |
23925 | gl_GNULIB_ENABLED_verify_TRUE='#' | |
23926 | gl_GNULIB_ENABLED_verify_FALSE= | |
23927 | fi | |
067d23c9 | 23928 | |
5476a9a4 | 23929 | # End of code from modules |
067d23c9 | 23930 | |
067d23c9 | 23931 | |
067d23c9 | 23932 | |
067d23c9 | 23933 | |
f199cab1 | 23934 | |
f199cab1 GM |
23935 | |
23936 | ||
067d23c9 | 23937 | |
5476a9a4 GM |
23938 | |
23939 | gltests_libdeps= | |
23940 | gltests_ltlibdeps= | |
067d23c9 | 23941 | |
067d23c9 | 23942 | |
067d23c9 KY |
23943 | |
23944 | ||
067d23c9 KY |
23945 | |
23946 | ||
3e0be4ab | 23947 | |
3e0be4ab | 23948 | |
3e0be4ab | 23949 | |
5476a9a4 GM |
23950 | gl_source_base='tests' |
23951 | 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 | |
3e0be4ab | 23952 | |
5476a9a4 | 23953 | gl_module_indicator_condition=$gltests_WITNESS |
3e0be4ab GM |
23954 | |
23955 | ||
23956 | ||
23957 | ||
23958 | ||
067d23c9 KY |
23959 | |
23960 | ||
23961 | ||
3e0be4ab | 23962 | |
3e0be4ab | 23963 | |
5476a9a4 GM |
23964 | LIBGNU_LIBDEPS="$gl_libdeps" |
23965 | ||
23966 | LIBGNU_LTLIBDEPS="$gl_ltlibdeps" | |
23967 | ||
067d23c9 | 23968 | |
5476a9a4 GM |
23969 | CFLAGS=$SAVE_CFLAGS |
23970 | LIBS=$SAVE_LIBS | |
067d23c9 KY |
23971 | |
23972 | case "$opsys" in | |
23973 | aix4-2) LD_SWITCH_SYSTEM_TEMACS="-Wl,-bnodelcsect" ;; | |
23974 | ||
23975 | darwin) | |
23976 | ## The -headerpad option tells ld (see man page) to leave room at the | |
23977 | ## end of the header for adding load commands. Needed for dumping. | |
23978 | ## 0x690 is the total size of 30 segment load commands (at 56 | |
23979 | ## each); under Cocoa 31 commands are required. | |
23980 | if test "$HAVE_NS" = "yes"; then | |
23981 | libs_nsgui="-framework AppKit" | |
23982 | headerpad_extra=6C8 | |
23983 | else | |
23984 | libs_nsgui= | |
23985 | headerpad_extra=690 | |
23986 | fi | |
85cf5029 | 23987 | LD_SWITCH_SYSTEM_TEMACS="-fno-pie -prebind $libs_nsgui -Xlinker -headerpad -Xlinker $headerpad_extra" |
067d23c9 KY |
23988 | |
23989 | ## This is here because src/Makefile.in did some extra fiddling around | |
23990 | ## with LD_SWITCH_SYSTEM. The cpp logic was: | |
23991 | ## #ifndef LD_SWITCH_SYSTEM | |
23992 | ## #if !defined (__GNUC__) && ((defined (BSD_SYSTEM) && !defined (COFF))) | |
23993 | ## Since all the *bsds define LD_SWITCH_SYSTEM, this simplifies to: | |
42bbbe8b | 23994 | ## not using gcc, darwin. |
067d23c9 KY |
23995 | ## Because this was done in src/Makefile.in, the resulting part of |
23996 | ## LD_SWITCH_SYSTEM was not used in configure (ie, in ac_link). | |
23997 | ## It therefore seems cleaner to put this in LD_SWITCH_SYSTEM_TEMACS, | |
23998 | ## rather than LD_SWITCH_SYSTEM. | |
23999 | test "x$LD_SWITCH_SYSTEM" = "x" && test "x$GCC" != "xyes" && \ | |
24000 | LD_SWITCH_SYSTEM_TEMACS="-X $LD_SWITCH_SYSTEM_TEMACS" | |
24001 | ;; | |
24002 | ||
ae629dae GM |
24003 | ## LD_SWITCH_X_SITE_RPATH is a -rpath option saying where to |
24004 | ## find X at run-time. | |
24005 | ## When handled by cpp, this was in LD_SWITCH_SYSTEM. However, at the | |
24006 | ## point where configure sourced the s/*.h file, LD_SWITCH_X_SITE_RPATH | |
067d23c9 KY |
24007 | ## had not yet been defined and was expanded to null. Hence LD_SWITCH_SYSTEM |
24008 | ## had different values in configure (in ac_link) and src/Makefile.in. | |
24009 | ## It seems clearer therefore to put this piece in LD_SWITCH_SYSTEM_TEMACS. | |
ae629dae | 24010 | gnu*) LD_SWITCH_SYSTEM_TEMACS="\$(LD_SWITCH_X_SITE_RPATH)" ;; |
067d23c9 KY |
24011 | |
24012 | *) LD_SWITCH_SYSTEM_TEMACS= ;; | |
24013 | esac | |
24014 | ||
24015 | if test "$NS_IMPL_GNUSTEP" = "yes"; then | |
24016 | LD_SWITCH_SYSTEM_TEMACS="${LD_SWITCH_SYSTEM_TEMACS} -L${GNUSTEP_SYSTEM_LIBRARIES} ${GNUSTEP_LOCAL_LIBRARIES} -lgnustep-gui -lgnustep-base -lobjc -lpthread" | |
24017 | fi | |
24018 | ||
24019 | ||
24020 | ||
24021 | ||
24022 | LD_FIRSTFLAG= | |
24023 | ORDINARY_LINK= | |
24024 | case "$opsys" in | |
24025 | ## gnu: GNU needs its own crt0. | |
24026 | aix4-2|cygwin|darwin|gnu|hpux*|irix6-5|sol2*|unixware) ORDINARY_LINK=yes ;; | |
24027 | ||
24028 | ## On post 1.3 releases of NetBSD, gcc -nostdlib also clears the | |
24029 | ## library search parth, i.e. it won't search /usr/lib for libc and | |
24030 | ## friends. Using -nostartfiles instead avoids this problem, and | |
24031 | ## will also work on earlier NetBSD releases. | |
24032 | netbsd|openbsd) LD_FIRSTFLAG="-nostartfiles" ;; | |
24033 | ||
42bbbe8b | 24034 | ## powerpc*: NAKAJI Hiroyuki <nakaji@tutrp.tut.ac.jp> says |
067d23c9 | 24035 | ## MkLinux/LinuxPPC needs this. |
42bbbe8b | 24036 | ## s390x-* only supports opsys = gnu-linux so it can be added here. |
067d23c9 | 24037 | gnu-*) |
42bbbe8b GM |
24038 | case "$canonical" in |
24039 | powerpc*|s390x-*) LD_FIRSTFLAG="-nostdlib" ;; | |
067d23c9 KY |
24040 | esac |
24041 | ;; | |
24042 | esac | |
24043 | ||
24044 | ||
24045 | if test "x$ORDINARY_LINK" = "xyes"; then | |
24046 | ||
24047 | LD_FIRSTFLAG="" | |
24048 | ||
24049 | $as_echo "#define ORDINARY_LINK 1" >>confdefs.h | |
24050 | ||
24051 | ||
24052 | ## The system files defining neither ORDINARY_LINK nor LD_FIRSTFLAG are: | |
42bbbe8b | 24053 | ## freebsd, gnu-* not on powerpc*|s390x*. |
067d23c9 KY |
24054 | elif test "x$GCC" = "xyes" && test "x$LD_FIRSTFLAG" = "x"; then |
24055 | ||
24056 | ## Versions of GCC >= 2.0 put their library, libgcc.a, in obscure | |
24057 | ## places that are difficult to figure out at make time. Fortunately, | |
24058 | ## these same versions allow you to pass arbitrary flags on to the | |
24059 | ## linker, so there is no reason not to use it as a linker. | |
24060 | ## | |
24061 | ## Well, it is not quite perfect. The "-nostdlib" keeps GCC from | |
24062 | ## searching for libraries in its internal directories, so we have to | |
24063 | ## ask GCC explicitly where to find libgcc.a (LIB_GCC below). | |
24064 | LD_FIRSTFLAG="-nostdlib" | |
24065 | fi | |
24066 | ||
24067 | ## FIXME? What setting of EDIT_LDFLAGS should this have? | |
24068 | test "$NS_IMPL_GNUSTEP" = "yes" && LD_FIRSTFLAG="-rdynamic" | |
24069 | ||
24070 | ||
24071 | ||
24072 | ||
24073 | ## FIXME? The logic here is not precisely the same as that above. | |
24074 | ## There is no check here for a pre-defined LD_FIRSTFLAG. | |
24075 | ## Should we only be setting LIB_GCC if LD ~ -nostdlib? | |
24076 | LIB_GCC= | |
24077 | if test "x$GCC" = "xyes" && test "x$ORDINARY_LINK" != "xyes"; then | |
24078 | ||
24079 | case "$opsys" in | |
24080 | freebsd|netbsd|openbsd) LIB_GCC= ;; | |
24081 | ||
24082 | gnu-*) | |
24083 | ## armin76@gentoo.org reported that the lgcc_s flag is necessary to | |
24084 | ## build on ARM EABI under GNU/Linux. (Bug#5518) | |
d6a003a8 AS |
24085 | case $host_cpu in |
24086 | arm*) | |
067d23c9 | 24087 | LIB_GCC="-lgcc_s" |
d6a003a8 AS |
24088 | ;; |
24089 | *) | |
067d23c9 KY |
24090 | ## FIXME? s/gnu-linux.h used to define LIB_GCC as below, then |
24091 | ## immediately undefine it again and redefine it to empty. | |
24092 | ## Was the C_SWITCH_X_SITE part really necessary? | |
24093 | ## LIB_GCC=`$CC $C_SWITCH_X_SITE -print-libgcc-file-name` | |
24094 | LIB_GCC= | |
d6a003a8 AS |
24095 | ;; |
24096 | esac | |
067d23c9 KY |
24097 | ;; |
24098 | ||
24099 | ## Ask GCC where to find libgcc.a. | |
24100 | *) LIB_GCC=`$CC -print-libgcc-file-name 2> /dev/null` ;; | |
24101 | esac | |
24102 | fi | |
24103 | ||
42dcba54 GM |
24104 | ## Common for all window systems |
24105 | if test "$window_system" != "none"; then | |
067d23c9 KY |
24106 | |
24107 | $as_echo "#define HAVE_WINDOW_SYSTEM 1" >>confdefs.h | |
24108 | ||
24109 | ||
24110 | $as_echo "#define HAVE_MOUSE 1" >>confdefs.h | |
24111 | ||
42dcba54 | 24112 | WINDOW_SYSTEM_OBJ="fontset.o fringe.o image.o" |
067d23c9 KY |
24113 | fi |
24114 | ||
24115 | ||
24116 | ||
24117 | ||
42dcba54 | 24118 | |
067d23c9 KY |
24119 | #### Report on what we decided to do. |
24120 | #### Report GTK as a toolkit, even if it doesn't use Xt. | |
24121 | #### It makes printing result more understandable as using GTK sets | |
24122 | #### toolkit_scroll_bars to yes by default. | |
24123 | if test "${HAVE_GTK}" = "yes"; then | |
5476a9a4 GM |
24124 | if test "${with_gtk3}" = "yes"; then |
24125 | USE_X_TOOLKIT=GTK3 | |
24126 | else | |
24127 | USE_X_TOOLKIT=GTK | |
24128 | fi | |
067d23c9 KY |
24129 | fi |
24130 | ||
24131 | echo " | |
24132 | Configured for \`${canonical}'. | |
24133 | ||
24134 | Where should the build process find the source code? ${srcdir} | |
067d23c9 KY |
24135 | What compiler should emacs be built with? ${CC} ${CFLAGS} |
24136 | Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason} | |
24137 | Should Emacs use a relocating allocator for buffers? ${REL_ALLOC} | |
24138 | Should Emacs use mmap(2) for buffer allocation? $use_mmap_for_buffers | |
24139 | What window system should Emacs use? ${window_system} | |
24140 | What toolkit should Emacs use? ${USE_X_TOOLKIT}" | |
24141 | ||
24142 | if test -n "${x_includes}"; then | |
24143 | echo " Where do we find X Windows header files? ${x_includes}" | |
24144 | else | |
24145 | echo " Where do we find X Windows header files? Standard dirs" | |
24146 | fi | |
24147 | if test -n "${x_libraries}"; then | |
24148 | echo " Where do we find X Windows libraries? ${x_libraries}" | |
24149 | else | |
24150 | echo " Where do we find X Windows libraries? Standard dirs" | |
24151 | fi | |
24152 | ||
24153 | echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}" | |
24154 | echo " Does Emacs use -lXpm? ${HAVE_XPM}" | |
24155 | echo " Does Emacs use -ljpeg? ${HAVE_JPEG}" | |
24156 | echo " Does Emacs use -ltiff? ${HAVE_TIFF}" | |
24157 | echo " Does Emacs use a gif library? ${HAVE_GIF} $LIBGIF" | |
24158 | echo " Does Emacs use -lpng? ${HAVE_PNG}" | |
24159 | echo " Does Emacs use -lrsvg-2? ${HAVE_RSVG}" | |
24160 | echo " Does Emacs use imagemagick? ${HAVE_IMAGEMAGICK}" | |
24161 | ||
24162 | echo " Does Emacs use -lgpm? ${HAVE_GPM}" | |
24163 | echo " Does Emacs use -ldbus? ${HAVE_DBUS}" | |
24164 | echo " Does Emacs use -lgconf? ${HAVE_GCONF}" | |
f527bd02 | 24165 | echo " Does Emacs use GSettings? ${HAVE_GSETTINGS}" |
067d23c9 | 24166 | echo " Does Emacs use -lselinux? ${HAVE_LIBSELINUX}" |
27f5a136 | 24167 | echo " Does Emacs use -lgnutls? ${HAVE_GNUTLS}" |
067d23c9 KY |
24168 | echo " Does Emacs use -lxml2? ${HAVE_LIBXML2}" |
24169 | ||
24170 | echo " Does Emacs use -lfreetype? ${HAVE_FREETYPE}" | |
24171 | echo " Does Emacs use -lm17n-flt? ${HAVE_M17N_FLT}" | |
24172 | echo " Does Emacs use -lotf? ${HAVE_LIBOTF}" | |
24173 | echo " Does Emacs use -lxft? ${HAVE_XFT}" | |
24174 | ||
24175 | echo " Does Emacs use toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}" | |
24176 | echo | |
24177 | ||
eb39a72d GM |
24178 | if test -n "${EMACSDATA}"; then |
24179 | echo " Environment variable EMACSDATA set to: $EMACSDATA" | |
24180 | fi | |
24181 | if test -n "${EMACSDOC}"; then | |
24182 | echo " Environment variable EMACSDOC set to: $EMACSDOC" | |
24183 | fi | |
24184 | ||
067d23c9 KY |
24185 | echo |
24186 | ||
24187 | if test "$HAVE_NS" = "yes"; then | |
24188 | echo | |
3d0788a9 | 24189 | echo "You must run \"${MAKE-make} install\" in order to test the built application. |
067d23c9 KY |
24190 | The installed application will go to nextstep/Emacs.app and can be |
24191 | run or moved from there." | |
24192 | if test "$EN_NS_SELF_CONTAINED" = "yes"; then | |
24193 | echo "The application will be fully self-contained." | |
24194 | else | |
24195 | echo "The lisp resources for the application will be installed under ${prefix}. | |
3d0788a9 | 24196 | You may need to run \"${MAKE-make} install\" with sudo. The application will fail |
067d23c9 KY |
24197 | to run if these resources are not installed." |
24198 | fi | |
24199 | echo | |
24200 | fi | |
24201 | ||
031fabfc GM |
24202 | if test "${opsys}" = "cygwin"; then |
24203 | case `uname -r` in | |
24204 | 1.5.*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: building Emacs on Cygwin 1.5 is not supported." >&5 | |
24205 | $as_echo "$as_me: WARNING: building Emacs on Cygwin 1.5 is not supported." >&2;} | |
24206 | echo | |
24207 | ;; | |
24208 | esac | |
24209 | fi | |
067d23c9 KY |
24210 | |
24211 | # Remove any trailing slashes in these variables. | |
24212 | test "${prefix}" != NONE && | |
24213 | prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'` | |
24214 | test "${exec_prefix}" != NONE && | |
24215 | exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'` | |
24216 | ||
56ade35c GM |
24217 | 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" |
24218 | ||
24219 | 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" | |
24220 | ||
a877df06 | 24221 | |
73b78882 | 24222 | opt_makefile=test/automated/Makefile |
a877df06 | 24223 | |
56ade35c | 24224 | if test -f $srcdir/${opt_makefile}.in; then |
73b78882 | 24225 | SUBDIR_MAKEFILES="$SUBDIR_MAKEFILES $opt_makefile" |
56ade35c | 24226 | ac_config_files="$ac_config_files test/automated/Makefile" |
a877df06 | 24227 | |
56ade35c | 24228 | fi |
73b78882 | 24229 | |
40b65096 GM |
24230 | |
24231 | opt_makefile=admin/unidata/Makefile | |
24232 | ||
24233 | if test -f $srcdir/${opt_makefile}.in; then | |
24234 | SUBDIR_MAKEFILES="$SUBDIR_MAKEFILES $opt_makefile" | |
24235 | ac_config_files="$ac_config_files admin/unidata/Makefile" | |
24236 | ||
24237 | fi | |
24238 | ||
24239 | ||
56ade35c | 24240 | SUBDIR_MAKEFILES_IN=`echo " ${SUBDIR_MAKEFILES}" | sed -e 's| | $(srcdir)/|g' -e 's|Makefile|Makefile.in|g'` |
73b78882 | 24241 | |
067d23c9 | 24242 | |
9411886d PE |
24243 | |
24244 | ac_config_commands="$ac_config_commands mkdirs" | |
24245 | ||
24246 | ||
24247 | ac_config_commands="$ac_config_commands epaths" | |
24248 | ||
24249 | ||
24250 | ac_config_commands="$ac_config_commands gdbinit" | |
24251 | ||
067d23c9 KY |
24252 | |
24253 | cat >confcache <<\_ACEOF | |
24254 | # This file is a shell script that caches the results of configure | |
24255 | # tests run on this system so they can be shared between configure | |
24256 | # scripts and configure runs, see configure's option --config-cache. | |
24257 | # It is not useful on other systems. If it contains results you don't | |
24258 | # want to keep, you may remove or edit it. | |
24259 | # | |
24260 | # config.status only pays attention to the cache file if you give it | |
24261 | # the --recheck option to rerun configure. | |
24262 | # | |
24263 | # `ac_cv_env_foo' variables (set or unset) will be overridden when | |
24264 | # loading this file, other *unset* `ac_cv_foo' will be assigned the | |
24265 | # following values. | |
24266 | ||
24267 | _ACEOF | |
24268 | ||
24269 | # The following way of writing the cache mishandles newlines in values, | |
24270 | # but we know of no workaround that is simple, portable, and efficient. | |
24271 | # So, we kill variables containing newlines. | |
24272 | # Ultrix sh set writes to stderr and can't be redirected directly, | |
24273 | # and sets the high bit in the cache file unless we assign to the vars. | |
24274 | ( | |
24275 | for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do | |
24276 | eval ac_val=\$$ac_var | |
24277 | case $ac_val in #( | |
24278 | *${as_nl}*) | |
24279 | case $ac_var in #( | |
24280 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
24281 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
24282 | esac | |
24283 | case $ac_var in #( | |
24284 | _ | IFS | as_nl) ;; #( | |
24285 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
24286 | *) { eval $ac_var=; unset $ac_var;} ;; | |
24287 | esac ;; | |
24288 | esac | |
24289 | done | |
24290 | ||
24291 | (set) 2>&1 | | |
24292 | case $as_nl`(ac_space=' '; set) 2>&1` in #( | |
24293 | *${as_nl}ac_space=\ *) | |
24294 | # `set' does not quote correctly, so add quotes: double-quote | |
24295 | # substitution turns \\\\ into \\, and sed turns \\ into \. | |
24296 | sed -n \ | |
24297 | "s/'/'\\\\''/g; | |
24298 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" | |
24299 | ;; #( | |
24300 | *) | |
24301 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
24302 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" | |
24303 | ;; | |
24304 | esac | | |
24305 | sort | |
24306 | ) | | |
24307 | sed ' | |
24308 | /^ac_cv_env_/b end | |
24309 | t clear | |
24310 | :clear | |
24311 | s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ | |
24312 | t end | |
24313 | s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ | |
24314 | :end' >>confcache | |
24315 | if diff "$cache_file" confcache >/dev/null 2>&1; then :; else | |
24316 | if test -w "$cache_file"; then | |
a9bec17c | 24317 | test "x$cache_file" != "x/dev/null" && |
067d23c9 KY |
24318 | { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 |
24319 | $as_echo "$as_me: updating cache $cache_file" >&6;} | |
a9bec17c | 24320 | cat confcache >$cache_file |
067d23c9 KY |
24321 | else |
24322 | { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 | |
24323 | $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} | |
24324 | fi | |
24325 | fi | |
24326 | rm -f confcache | |
24327 | ||
24328 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
24329 | # Let make expand exec_prefix. | |
24330 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
24331 | ||
24332 | DEFS=-DHAVE_CONFIG_H | |
24333 | ||
24334 | ac_libobjs= | |
24335 | ac_ltlibobjs= | |
24336 | for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue | |
24337 | # 1. Remove the extension, and $U if already installed. | |
24338 | ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' | |
24339 | ac_i=`$as_echo "$ac_i" | sed "$ac_script"` | |
24340 | # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR | |
24341 | # will be set to the directory where LIBOBJS objects are built. | |
24342 | as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" | |
24343 | as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' | |
24344 | done | |
24345 | LIBOBJS=$ac_libobjs | |
24346 | ||
24347 | LTLIBOBJS=$ac_ltlibobjs | |
24348 | ||
24349 | ||
743c80a7 PE |
24350 | if test -n "$EXEEXT"; then |
24351 | am__EXEEXT_TRUE= | |
24352 | am__EXEEXT_FALSE='#' | |
24353 | else | |
24354 | am__EXEEXT_TRUE='#' | |
24355 | am__EXEEXT_FALSE= | |
24356 | fi | |
24357 | ||
24358 | if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then | |
a9bec17c | 24359 | as_fn_error "conditional \"AMDEP\" was never defined. |
743c80a7 PE |
24360 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
24361 | fi | |
24362 | if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then | |
a9bec17c | 24363 | as_fn_error "conditional \"am__fastdepCC\" was never defined. |
743c80a7 PE |
24364 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
24365 | fi | |
743c80a7 | 24366 | if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then |
a9bec17c | 24367 | as_fn_error "conditional \"GL_COND_LIBTOOL\" was never defined. |
743c80a7 PE |
24368 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
24369 | fi | |
4fc2b746 | 24370 | if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then |
a9bec17c | 24371 | as_fn_error "conditional \"GL_GENERATE_ALLOCA_H\" was never defined. |
4fc2b746 GM |
24372 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
24373 | fi | |
743c80a7 | 24374 | |
8966cbff GM |
24375 | if test -z "${GL_GENERATE_EXECINFO_H_TRUE}" && test -z "${GL_GENERATE_EXECINFO_H_FALSE}"; then |
24376 | as_fn_error "conditional \"GL_GENERATE_EXECINFO_H\" was never defined. | |
24377 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
24378 | fi | |
4fda9c95 | 24379 | if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then |
a9bec17c | 24380 | as_fn_error "conditional \"GL_GENERATE_STDINT_H\" was never defined. |
4fda9c95 GM |
24381 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
24382 | fi | |
0eb775a3 GM |
24383 | if test -z "${GL_GENERATE_STDALIGN_H_TRUE}" && test -z "${GL_GENERATE_STDALIGN_H_FALSE}"; then |
24384 | as_fn_error "conditional \"GL_GENERATE_STDALIGN_H\" was never defined. | |
24385 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
24386 | fi | |
6d153f56 | 24387 | if test -z "${GL_GENERATE_STDARG_H_TRUE}" && test -z "${GL_GENERATE_STDARG_H_FALSE}"; then |
a9bec17c | 24388 | as_fn_error "conditional \"GL_GENERATE_STDARG_H\" was never defined. |
6d153f56 GM |
24389 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
24390 | fi | |
6c051bab | 24391 | if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then |
a9bec17c | 24392 | as_fn_error "conditional \"GL_GENERATE_STDBOOL_H\" was never defined. |
6c051bab GM |
24393 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
24394 | fi | |
24395 | if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then | |
a9bec17c | 24396 | as_fn_error "conditional \"GL_GENERATE_STDDEF_H\" was never defined. |
6c051bab GM |
24397 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
24398 | fi | |
6d153f56 | 24399 | if test -z "${gl_GNULIB_ENABLED_dosname_TRUE}" && test -z "${gl_GNULIB_ENABLED_dosname_FALSE}"; then |
a9bec17c | 24400 | as_fn_error "conditional \"gl_GNULIB_ENABLED_dosname\" was never defined. |
6d153f56 GM |
24401 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
24402 | fi | |
24403 | if test -z "${gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE}" && test -z "${gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE}"; then | |
a9bec17c | 24404 | as_fn_error "conditional \"gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36\" was never defined. |
6d153f56 GM |
24405 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
24406 | fi | |
a0a61e58 GM |
24407 | if test -z "${gl_GNULIB_ENABLED_pathmax_TRUE}" && test -z "${gl_GNULIB_ENABLED_pathmax_FALSE}"; then |
24408 | as_fn_error "conditional \"gl_GNULIB_ENABLED_pathmax\" was never defined. | |
24409 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
24410 | fi | |
6d153f56 | 24411 | if test -z "${gl_GNULIB_ENABLED_stat_TRUE}" && test -z "${gl_GNULIB_ENABLED_stat_FALSE}"; then |
a9bec17c | 24412 | as_fn_error "conditional \"gl_GNULIB_ENABLED_stat\" was never defined. |
6d153f56 GM |
24413 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
24414 | fi | |
3e0be4ab | 24415 | if test -z "${gl_GNULIB_ENABLED_strtoll_TRUE}" && test -z "${gl_GNULIB_ENABLED_strtoll_FALSE}"; then |
a9bec17c | 24416 | as_fn_error "conditional \"gl_GNULIB_ENABLED_strtoll\" was never defined. |
3e0be4ab GM |
24417 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
24418 | fi | |
6d153f56 | 24419 | if test -z "${gl_GNULIB_ENABLED_strtoull_TRUE}" && test -z "${gl_GNULIB_ENABLED_strtoull_FALSE}"; then |
a9bec17c | 24420 | as_fn_error "conditional \"gl_GNULIB_ENABLED_strtoull\" was never defined. |
6d153f56 GM |
24421 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
24422 | fi | |
24423 | if test -z "${gl_GNULIB_ENABLED_verify_TRUE}" && test -z "${gl_GNULIB_ENABLED_verify_FALSE}"; then | |
a9bec17c | 24424 | as_fn_error "conditional \"gl_GNULIB_ENABLED_verify\" was never defined. |
6d153f56 | 24425 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
6c051bab | 24426 | fi |
942f733f | 24427 | |
743c80a7 PE |
24428 | gl_libobjs= |
24429 | gl_ltlibobjs= | |
24430 | if test -n "$gl_LIBOBJS"; then | |
24431 | # Remove the extension. | |
24432 | sed_drop_objext='s/\.o$//;s/\.obj$//' | |
24433 | for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do | |
24434 | gl_libobjs="$gl_libobjs $i.$ac_objext" | |
24435 | gl_ltlibobjs="$gl_ltlibobjs $i.lo" | |
24436 | done | |
24437 | fi | |
24438 | gl_LIBOBJS=$gl_libobjs | |
24439 | ||
24440 | gl_LTLIBOBJS=$gl_ltlibobjs | |
24441 | ||
24442 | ||
24443 | ||
24444 | gltests_libobjs= | |
24445 | gltests_ltlibobjs= | |
24446 | if test -n "$gltests_LIBOBJS"; then | |
24447 | # Remove the extension. | |
24448 | sed_drop_objext='s/\.o$//;s/\.obj$//' | |
24449 | for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do | |
24450 | gltests_libobjs="$gltests_libobjs $i.$ac_objext" | |
24451 | gltests_ltlibobjs="$gltests_ltlibobjs $i.lo" | |
24452 | done | |
24453 | fi | |
24454 | gltests_LIBOBJS=$gltests_libobjs | |
24455 | ||
24456 | gltests_LTLIBOBJS=$gltests_ltlibobjs | |
24457 | ||
067d23c9 KY |
24458 | |
24459 | ||
a9bec17c | 24460 | : ${CONFIG_STATUS=./config.status} |
067d23c9 KY |
24461 | ac_write_fail=0 |
24462 | ac_clean_files_save=$ac_clean_files | |
24463 | ac_clean_files="$ac_clean_files $CONFIG_STATUS" | |
24464 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 | |
24465 | $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} | |
24466 | as_write_fail=0 | |
24467 | cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 | |
24468 | #! $SHELL | |
24469 | # Generated by $as_me. | |
24470 | # Run this file to recreate the current configuration. | |
24471 | # Compiler output produced by configure, useful for debugging | |
24472 | # configure, is in config.log if it exists. | |
24473 | ||
24474 | debug=false | |
24475 | ac_cs_recheck=false | |
24476 | ac_cs_silent=false | |
24477 | ||
24478 | SHELL=\${CONFIG_SHELL-$SHELL} | |
24479 | export SHELL | |
24480 | _ASEOF | |
24481 | cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 | |
24482 | ## -------------------- ## | |
24483 | ## M4sh Initialization. ## | |
24484 | ## -------------------- ## | |
24485 | ||
24486 | # Be more Bourne compatible | |
24487 | DUALCASE=1; export DUALCASE # for MKS sh | |
24488 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : | |
24489 | emulate sh | |
24490 | NULLCMD=: | |
24491 | # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which | |
24492 | # is contrary to our usage. Disable this feature. | |
24493 | alias -g '${1+"$@"}'='"$@"' | |
24494 | setopt NO_GLOB_SUBST | |
24495 | else | |
24496 | case `(set -o) 2>/dev/null` in #( | |
24497 | *posix*) : | |
24498 | set -o posix ;; #( | |
24499 | *) : | |
24500 | ;; | |
24501 | esac | |
24502 | fi | |
24503 | ||
24504 | ||
24505 | as_nl=' | |
24506 | ' | |
24507 | export as_nl | |
24508 | # Printing a long string crashes Solaris 7 /usr/bin/printf. | |
24509 | as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' | |
24510 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo | |
24511 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo | |
24512 | # Prefer a ksh shell builtin over an external printf program on Solaris, | |
24513 | # but without wasting forks for bash or zsh. | |
24514 | if test -z "$BASH_VERSION$ZSH_VERSION" \ | |
24515 | && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then | |
24516 | as_echo='print -r --' | |
24517 | as_echo_n='print -rn --' | |
24518 | elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then | |
24519 | as_echo='printf %s\n' | |
24520 | as_echo_n='printf %s' | |
24521 | else | |
24522 | if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then | |
24523 | as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' | |
24524 | as_echo_n='/usr/ucb/echo -n' | |
24525 | else | |
24526 | as_echo_body='eval expr "X$1" : "X\\(.*\\)"' | |
24527 | as_echo_n_body='eval | |
24528 | arg=$1; | |
24529 | case $arg in #( | |
24530 | *"$as_nl"*) | |
24531 | expr "X$arg" : "X\\(.*\\)$as_nl"; | |
24532 | arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; | |
24533 | esac; | |
24534 | expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" | |
24535 | ' | |
24536 | export as_echo_n_body | |
24537 | as_echo_n='sh -c $as_echo_n_body as_echo' | |
24538 | fi | |
24539 | export as_echo_body | |
24540 | as_echo='sh -c $as_echo_body as_echo' | |
24541 | fi | |
24542 | ||
24543 | # The user is always right. | |
24544 | if test "${PATH_SEPARATOR+set}" != set; then | |
24545 | PATH_SEPARATOR=: | |
24546 | (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { | |
24547 | (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || | |
24548 | PATH_SEPARATOR=';' | |
24549 | } | |
24550 | fi | |
24551 | ||
24552 | ||
24553 | # IFS | |
24554 | # We need space, tab and new line, in precisely that order. Quoting is | |
24555 | # there to prevent editors from complaining about space-tab. | |
24556 | # (If _AS_PATH_WALK were called with IFS unset, it would disable word | |
24557 | # splitting by setting IFS to empty value.) | |
24558 | IFS=" "" $as_nl" | |
24559 | ||
24560 | # Find who we are. Look in the path if we contain no directory separator. | |
24561 | case $0 in #(( | |
24562 | *[\\/]* ) as_myself=$0 ;; | |
24563 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
24564 | for as_dir in $PATH | |
24565 | do | |
24566 | IFS=$as_save_IFS | |
24567 | test -z "$as_dir" && as_dir=. | |
24568 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | |
24569 | done | |
24570 | IFS=$as_save_IFS | |
24571 | ||
24572 | ;; | |
24573 | esac | |
24574 | # We did not find ourselves, most probably we were run as `sh COMMAND' | |
24575 | # in which case we are not to be found in the path. | |
24576 | if test "x$as_myself" = x; then | |
24577 | as_myself=$0 | |
24578 | fi | |
24579 | if test ! -f "$as_myself"; then | |
24580 | $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 | |
24581 | exit 1 | |
24582 | fi | |
24583 | ||
24584 | # Unset variables that we do not need and which cause bugs (e.g. in | |
24585 | # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" | |
24586 | # suppresses any "Segmentation fault" message there. '((' could | |
24587 | # trigger a bug in pdksh 5.2.14. | |
24588 | for as_var in BASH_ENV ENV MAIL MAILPATH | |
24589 | do eval test x\${$as_var+set} = xset \ | |
24590 | && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : | |
24591 | done | |
24592 | PS1='$ ' | |
24593 | PS2='> ' | |
24594 | PS4='+ ' | |
24595 | ||
24596 | # NLS nuisances. | |
24597 | LC_ALL=C | |
24598 | export LC_ALL | |
24599 | LANGUAGE=C | |
24600 | export LANGUAGE | |
24601 | ||
24602 | # CDPATH. | |
24603 | (unset CDPATH) >/dev/null 2>&1 && unset CDPATH | |
24604 | ||
24605 | ||
a9bec17c GM |
24606 | # as_fn_error ERROR [LINENO LOG_FD] |
24607 | # --------------------------------- | |
067d23c9 KY |
24608 | # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are |
24609 | # provided, also output the error to LOG_FD, referencing LINENO. Then exit the | |
a9bec17c | 24610 | # script with status $?, using 1 if that was 0. |
067d23c9 KY |
24611 | as_fn_error () |
24612 | { | |
a9bec17c GM |
24613 | as_status=$?; test $as_status -eq 0 && as_status=1 |
24614 | if test "$3"; then | |
24615 | as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
24616 | $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 | |
067d23c9 | 24617 | fi |
a9bec17c | 24618 | $as_echo "$as_me: error: $1" >&2 |
067d23c9 KY |
24619 | as_fn_exit $as_status |
24620 | } # as_fn_error | |
24621 | ||
24622 | ||
24623 | # as_fn_set_status STATUS | |
24624 | # ----------------------- | |
24625 | # Set $? to STATUS, without forking. | |
24626 | as_fn_set_status () | |
24627 | { | |
24628 | return $1 | |
24629 | } # as_fn_set_status | |
24630 | ||
24631 | # as_fn_exit STATUS | |
24632 | # ----------------- | |
24633 | # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. | |
24634 | as_fn_exit () | |
24635 | { | |
24636 | set +e | |
24637 | as_fn_set_status $1 | |
24638 | exit $1 | |
24639 | } # as_fn_exit | |
24640 | ||
24641 | # as_fn_unset VAR | |
24642 | # --------------- | |
24643 | # Portably unset VAR. | |
24644 | as_fn_unset () | |
24645 | { | |
24646 | { eval $1=; unset $1;} | |
24647 | } | |
24648 | as_unset=as_fn_unset | |
24649 | # as_fn_append VAR VALUE | |
24650 | # ---------------------- | |
24651 | # Append the text in VALUE to the end of the definition contained in VAR. Take | |
24652 | # advantage of any shell optimizations that allow amortized linear growth over | |
24653 | # repeated appends, instead of the typical quadratic growth present in naive | |
24654 | # implementations. | |
24655 | if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : | |
24656 | eval 'as_fn_append () | |
24657 | { | |
24658 | eval $1+=\$2 | |
24659 | }' | |
24660 | else | |
24661 | as_fn_append () | |
24662 | { | |
24663 | eval $1=\$$1\$2 | |
24664 | } | |
24665 | fi # as_fn_append | |
24666 | ||
24667 | # as_fn_arith ARG... | |
24668 | # ------------------ | |
24669 | # Perform arithmetic evaluation on the ARGs, and store the result in the | |
24670 | # global $as_val. Take advantage of shells that can avoid forks. The arguments | |
24671 | # must be portable across $(()) and expr. | |
24672 | if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : | |
24673 | eval 'as_fn_arith () | |
24674 | { | |
24675 | as_val=$(( $* )) | |
24676 | }' | |
24677 | else | |
24678 | as_fn_arith () | |
24679 | { | |
24680 | as_val=`expr "$@" || test $? -eq 1` | |
24681 | } | |
24682 | fi # as_fn_arith | |
24683 | ||
24684 | ||
24685 | if expr a : '\(a\)' >/dev/null 2>&1 && | |
24686 | test "X`expr 00001 : '.*\(...\)'`" = X001; then | |
24687 | as_expr=expr | |
24688 | else | |
24689 | as_expr=false | |
24690 | fi | |
24691 | ||
24692 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then | |
24693 | as_basename=basename | |
24694 | else | |
24695 | as_basename=false | |
24696 | fi | |
24697 | ||
24698 | if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then | |
24699 | as_dirname=dirname | |
24700 | else | |
24701 | as_dirname=false | |
24702 | fi | |
24703 | ||
24704 | as_me=`$as_basename -- "$0" || | |
24705 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ | |
24706 | X"$0" : 'X\(//\)$' \| \ | |
24707 | X"$0" : 'X\(/\)' \| . 2>/dev/null || | |
24708 | $as_echo X/"$0" | | |
24709 | sed '/^.*\/\([^/][^/]*\)\/*$/{ | |
24710 | s//\1/ | |
24711 | q | |
24712 | } | |
24713 | /^X\/\(\/\/\)$/{ | |
24714 | s//\1/ | |
24715 | q | |
24716 | } | |
24717 | /^X\/\(\/\).*/{ | |
24718 | s//\1/ | |
24719 | q | |
24720 | } | |
24721 | s/.*/./; q'` | |
24722 | ||
24723 | # Avoid depending upon Character Ranges. | |
24724 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
24725 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
24726 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
24727 | as_cr_digits='0123456789' | |
24728 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
24729 | ||
24730 | ECHO_C= ECHO_N= ECHO_T= | |
24731 | case `echo -n x` in #((((( | |
24732 | -n*) | |
24733 | case `echo 'xy\c'` in | |
24734 | *c*) ECHO_T=' ';; # ECHO_T is single tab character. | |
24735 | xy) ECHO_C='\c';; | |
24736 | *) echo `echo ksh88 bug on AIX 6.1` > /dev/null | |
24737 | ECHO_T=' ';; | |
24738 | esac;; | |
24739 | *) | |
24740 | ECHO_N='-n';; | |
24741 | esac | |
24742 | ||
24743 | rm -f conf$$ conf$$.exe conf$$.file | |
24744 | if test -d conf$$.dir; then | |
24745 | rm -f conf$$.dir/conf$$.file | |
24746 | else | |
24747 | rm -f conf$$.dir | |
24748 | mkdir conf$$.dir 2>/dev/null | |
24749 | fi | |
24750 | if (echo >conf$$.file) 2>/dev/null; then | |
24751 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
24752 | as_ln_s='ln -s' | |
24753 | # ... but there are two gotchas: | |
24754 | # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. | |
24755 | # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. | |
24756 | # In both cases, we have to default to `cp -p'. | |
24757 | ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || | |
24758 | as_ln_s='cp -p' | |
24759 | elif ln conf$$.file conf$$ 2>/dev/null; then | |
24760 | as_ln_s=ln | |
24761 | else | |
24762 | as_ln_s='cp -p' | |
24763 | fi | |
24764 | else | |
24765 | as_ln_s='cp -p' | |
24766 | fi | |
24767 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file | |
24768 | rmdir conf$$.dir 2>/dev/null | |
24769 | ||
24770 | ||
24771 | # as_fn_mkdir_p | |
24772 | # ------------- | |
24773 | # Create "$as_dir" as a directory, including parents if necessary. | |
24774 | as_fn_mkdir_p () | |
24775 | { | |
24776 | ||
24777 | case $as_dir in #( | |
24778 | -*) as_dir=./$as_dir;; | |
24779 | esac | |
24780 | test -d "$as_dir" || eval $as_mkdir_p || { | |
24781 | as_dirs= | |
24782 | while :; do | |
24783 | case $as_dir in #( | |
24784 | *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( | |
24785 | *) as_qdir=$as_dir;; | |
24786 | esac | |
24787 | as_dirs="'$as_qdir' $as_dirs" | |
24788 | as_dir=`$as_dirname -- "$as_dir" || | |
24789 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
24790 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
24791 | X"$as_dir" : 'X\(//\)$' \| \ | |
24792 | X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || | |
24793 | $as_echo X"$as_dir" | | |
24794 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
24795 | s//\1/ | |
24796 | q | |
24797 | } | |
24798 | /^X\(\/\/\)[^/].*/{ | |
24799 | s//\1/ | |
24800 | q | |
24801 | } | |
24802 | /^X\(\/\/\)$/{ | |
24803 | s//\1/ | |
24804 | q | |
24805 | } | |
24806 | /^X\(\/\).*/{ | |
24807 | s//\1/ | |
24808 | q | |
24809 | } | |
24810 | s/.*/./; q'` | |
24811 | test -d "$as_dir" && break | |
24812 | done | |
24813 | test -z "$as_dirs" || eval "mkdir $as_dirs" | |
a9bec17c | 24814 | } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" |
067d23c9 KY |
24815 | |
24816 | ||
24817 | } # as_fn_mkdir_p | |
24818 | if mkdir -p . 2>/dev/null; then | |
24819 | as_mkdir_p='mkdir -p "$as_dir"' | |
24820 | else | |
24821 | test -d ./-p && rmdir ./-p | |
24822 | as_mkdir_p=false | |
24823 | fi | |
24824 | ||
24825 | if test -x / >/dev/null 2>&1; then | |
24826 | as_test_x='test -x' | |
24827 | else | |
24828 | if ls -dL / >/dev/null 2>&1; then | |
24829 | as_ls_L_option=L | |
24830 | else | |
24831 | as_ls_L_option= | |
24832 | fi | |
24833 | as_test_x=' | |
24834 | eval sh -c '\'' | |
24835 | if test -d "$1"; then | |
24836 | test -d "$1/."; | |
24837 | else | |
24838 | case $1 in #( | |
24839 | -*)set "./$1";; | |
24840 | esac; | |
24841 | case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( | |
24842 | ???[sx]*):;;*)false;;esac;fi | |
24843 | '\'' sh | |
24844 | ' | |
24845 | fi | |
24846 | as_executable_p=$as_test_x | |
24847 | ||
24848 | # Sed expression to map a string onto a valid CPP name. | |
24849 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" | |
24850 | ||
24851 | # Sed expression to map a string onto a valid variable name. | |
24852 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" | |
24853 | ||
24854 | ||
24855 | exec 6>&1 | |
24856 | ## ----------------------------------- ## | |
24857 | ## Main body of $CONFIG_STATUS script. ## | |
24858 | ## ----------------------------------- ## | |
24859 | _ASEOF | |
24860 | test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 | |
24861 | ||
24862 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
24863 | # Save the log message, to keep $0 and so on meaningful, and to | |
24864 | # report actual input values of CONFIG_FILES etc. instead of their | |
24865 | # values after options handling. | |
24866 | ac_log=" | |
250c8ab9 | 24867 | This file was extended by emacs $as_me 24.2.50, which was |
a9bec17c | 24868 | generated by GNU Autoconf 2.65. Invocation command line was |
067d23c9 KY |
24869 | |
24870 | CONFIG_FILES = $CONFIG_FILES | |
24871 | CONFIG_HEADERS = $CONFIG_HEADERS | |
24872 | CONFIG_LINKS = $CONFIG_LINKS | |
24873 | CONFIG_COMMANDS = $CONFIG_COMMANDS | |
24874 | $ $0 $@ | |
24875 | ||
24876 | on `(hostname || uname -n) 2>/dev/null | sed 1q` | |
24877 | " | |
24878 | ||
24879 | _ACEOF | |
24880 | ||
24881 | case $ac_config_files in *" | |
24882 | "*) set x $ac_config_files; shift; ac_config_files=$*;; | |
24883 | esac | |
24884 | ||
24885 | case $ac_config_headers in *" | |
24886 | "*) set x $ac_config_headers; shift; ac_config_headers=$*;; | |
24887 | esac | |
24888 | ||
24889 | ||
24890 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
24891 | # Files that config.status was made for. | |
24892 | config_files="$ac_config_files" | |
24893 | config_headers="$ac_config_headers" | |
24894 | config_commands="$ac_config_commands" | |
24895 | ||
24896 | _ACEOF | |
24897 | ||
24898 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
24899 | ac_cs_usage="\ | |
24900 | \`$as_me' instantiates files and other configuration actions | |
24901 | from templates according to the current configuration. Unless the files | |
24902 | and actions are specified as TAGs, all are instantiated by default. | |
24903 | ||
24904 | Usage: $0 [OPTION]... [TAG]... | |
24905 | ||
24906 | -h, --help print this help, then exit | |
24907 | -V, --version print version number and configuration settings, then exit | |
24908 | --config print configuration, then exit | |
24909 | -q, --quiet, --silent | |
24910 | do not print progress messages | |
24911 | -d, --debug don't remove temporary files | |
24912 | --recheck update $as_me by reconfiguring in the same conditions | |
24913 | --file=FILE[:TEMPLATE] | |
24914 | instantiate the configuration file FILE | |
24915 | --header=FILE[:TEMPLATE] | |
24916 | instantiate the configuration header FILE | |
24917 | ||
24918 | Configuration files: | |
24919 | $config_files | |
24920 | ||
24921 | Configuration headers: | |
24922 | $config_headers | |
24923 | ||
24924 | Configuration commands: | |
24925 | $config_commands | |
24926 | ||
24927 | Report bugs to the package provider." | |
24928 | ||
24929 | _ACEOF | |
24930 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
24931 | ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" | |
24932 | ac_cs_version="\\ | |
250c8ab9 | 24933 | emacs config.status 24.2.50 |
a9bec17c | 24934 | configured by $0, generated by GNU Autoconf 2.65, |
067d23c9 KY |
24935 | with options \\"\$ac_cs_config\\" |
24936 | ||
a9bec17c | 24937 | Copyright (C) 2009 Free Software Foundation, Inc. |
067d23c9 KY |
24938 | This config.status script is free software; the Free Software Foundation |
24939 | gives unlimited permission to copy, distribute and modify it." | |
24940 | ||
24941 | ac_pwd='$ac_pwd' | |
24942 | srcdir='$srcdir' | |
24943 | INSTALL='$INSTALL' | |
743c80a7 PE |
24944 | MKDIR_P='$MKDIR_P' |
24945 | AWK='$AWK' | |
067d23c9 KY |
24946 | test -n "\$AWK" || AWK=awk |
24947 | _ACEOF | |
24948 | ||
24949 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
24950 | # The default lists apply if the user does not specify any file. | |
24951 | ac_need_defaults=: | |
24952 | while test $# != 0 | |
24953 | do | |
24954 | case $1 in | |
a9bec17c | 24955 | --*=*) |
067d23c9 KY |
24956 | ac_option=`expr "X$1" : 'X\([^=]*\)='` |
24957 | ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` | |
24958 | ac_shift=: | |
24959 | ;; | |
24960 | *) | |
24961 | ac_option=$1 | |
24962 | ac_optarg=$2 | |
24963 | ac_shift=shift | |
24964 | ;; | |
24965 | esac | |
24966 | ||
24967 | case $ac_option in | |
24968 | # Handling of the options. | |
24969 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) | |
24970 | ac_cs_recheck=: ;; | |
24971 | --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) | |
24972 | $as_echo "$ac_cs_version"; exit ;; | |
24973 | --config | --confi | --conf | --con | --co | --c ) | |
24974 | $as_echo "$ac_cs_config"; exit ;; | |
24975 | --debug | --debu | --deb | --de | --d | -d ) | |
24976 | debug=: ;; | |
24977 | --file | --fil | --fi | --f ) | |
24978 | $ac_shift | |
24979 | case $ac_optarg in | |
24980 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
24981 | esac | |
24982 | as_fn_append CONFIG_FILES " '$ac_optarg'" | |
24983 | ac_need_defaults=false;; | |
24984 | --header | --heade | --head | --hea ) | |
24985 | $ac_shift | |
24986 | case $ac_optarg in | |
24987 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
24988 | esac | |
24989 | as_fn_append CONFIG_HEADERS " '$ac_optarg'" | |
24990 | ac_need_defaults=false;; | |
24991 | --he | --h) | |
24992 | # Conflict between --help and --header | |
a9bec17c | 24993 | as_fn_error "ambiguous option: \`$1' |
067d23c9 KY |
24994 | Try \`$0 --help' for more information.";; |
24995 | --help | --hel | -h ) | |
24996 | $as_echo "$ac_cs_usage"; exit ;; | |
24997 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
24998 | | -silent | --silent | --silen | --sile | --sil | --si | --s) | |
24999 | ac_cs_silent=: ;; | |
25000 | ||
25001 | # This is an error. | |
a9bec17c | 25002 | -*) as_fn_error "unrecognized option: \`$1' |
067d23c9 KY |
25003 | Try \`$0 --help' for more information." ;; |
25004 | ||
25005 | *) as_fn_append ac_config_targets " $1" | |
25006 | ac_need_defaults=false ;; | |
25007 | ||
25008 | esac | |
25009 | shift | |
25010 | done | |
25011 | ||
25012 | ac_configure_extra_args= | |
25013 | ||
25014 | if $ac_cs_silent; then | |
25015 | exec 6>/dev/null | |
25016 | ac_configure_extra_args="$ac_configure_extra_args --silent" | |
25017 | fi | |
25018 | ||
25019 | _ACEOF | |
25020 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
25021 | if \$ac_cs_recheck; then | |
25022 | set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion | |
25023 | shift | |
25024 | \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 | |
25025 | CONFIG_SHELL='$SHELL' | |
25026 | export CONFIG_SHELL | |
25027 | exec "\$@" | |
25028 | fi | |
25029 | ||
25030 | _ACEOF | |
25031 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
25032 | exec 5>>config.log | |
25033 | { | |
25034 | echo | |
25035 | sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX | |
25036 | ## Running $as_me. ## | |
25037 | _ASBOX | |
25038 | $as_echo "$ac_log" | |
25039 | } >&5 | |
25040 | ||
25041 | _ACEOF | |
25042 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
25043 | # | |
25044 | # INIT-COMMANDS | |
25045 | # | |
743c80a7 | 25046 | AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" |
5ec54608 | 25047 | GCC="$GCC" CPPFLAGS="$CPPFLAGS" |
067d23c9 KY |
25048 | |
25049 | _ACEOF | |
25050 | ||
25051 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
25052 | ||
25053 | # Handling of arguments. | |
25054 | for ac_config_target in $ac_config_targets | |
25055 | do | |
25056 | case $ac_config_target in | |
25057 | "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:src/config.in" ;; | |
743c80a7 | 25058 | "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; |
067d23c9 | 25059 | "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; |
743c80a7 | 25060 | "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;; |
56ade35c GM |
25061 | "lib-src/Makefile") CONFIG_FILES="$CONFIG_FILES lib-src/Makefile" ;; |
25062 | "oldXMenu/Makefile") CONFIG_FILES="$CONFIG_FILES oldXMenu/Makefile" ;; | |
25063 | "doc/emacs/Makefile") CONFIG_FILES="$CONFIG_FILES doc/emacs/Makefile" ;; | |
25064 | "doc/misc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/misc/Makefile" ;; | |
25065 | "doc/lispintro/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispintro/Makefile" ;; | |
25066 | "doc/lispref/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispref/Makefile" ;; | |
25067 | "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; | |
25068 | "lwlib/Makefile") CONFIG_FILES="$CONFIG_FILES lwlib/Makefile" ;; | |
25069 | "lisp/Makefile") CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;; | |
25070 | "leim/Makefile") CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;; | |
25071 | "test/automated/Makefile") CONFIG_FILES="$CONFIG_FILES test/automated/Makefile" ;; | |
40b65096 | 25072 | "admin/unidata/Makefile") CONFIG_FILES="$CONFIG_FILES admin/unidata/Makefile" ;; |
9411886d PE |
25073 | "mkdirs") CONFIG_COMMANDS="$CONFIG_COMMANDS mkdirs" ;; |
25074 | "epaths") CONFIG_COMMANDS="$CONFIG_COMMANDS epaths" ;; | |
25075 | "gdbinit") CONFIG_COMMANDS="$CONFIG_COMMANDS gdbinit" ;; | |
067d23c9 | 25076 | |
a9bec17c | 25077 | *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; |
067d23c9 KY |
25078 | esac |
25079 | done | |
25080 | ||
25081 | ||
25082 | # If the user did not use the arguments to specify the items to instantiate, | |
25083 | # then the envvar interface is used. Set only those that are not. | |
25084 | # We use the long form for the default assignment because of an extremely | |
25085 | # bizarre bug on SunOS 4.1.3. | |
25086 | if $ac_need_defaults; then | |
25087 | test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files | |
25088 | test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers | |
25089 | test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands | |
25090 | fi | |
25091 | ||
25092 | # Have a temporary directory for convenience. Make it in the build tree | |
25093 | # simply because there is no reason against having it here, and in addition, | |
25094 | # creating and moving files from /tmp can sometimes cause problems. | |
25095 | # Hook for its removal unless debugging. | |
25096 | # Note that there is a small window in which the directory will not be cleaned: | |
25097 | # after its creation but before its name has been assigned to `$tmp'. | |
25098 | $debug || | |
25099 | { | |
a9bec17c | 25100 | tmp= |
067d23c9 | 25101 | trap 'exit_status=$? |
a9bec17c | 25102 | { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status |
067d23c9 KY |
25103 | ' 0 |
25104 | trap 'as_fn_exit 1' 1 2 13 15 | |
25105 | } | |
25106 | # Create a (secure) tmp directory for tmp files. | |
25107 | ||
25108 | { | |
25109 | tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && | |
a9bec17c | 25110 | test -n "$tmp" && test -d "$tmp" |
067d23c9 KY |
25111 | } || |
25112 | { | |
25113 | tmp=./conf$$-$RANDOM | |
25114 | (umask 077 && mkdir "$tmp") | |
a9bec17c | 25115 | } || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 |
067d23c9 KY |
25116 | |
25117 | # Set up the scripts for CONFIG_FILES section. | |
25118 | # No need to generate them if there are no CONFIG_FILES. | |
25119 | # This happens for instance with `./config.status config.h'. | |
25120 | if test -n "$CONFIG_FILES"; then | |
25121 | ||
25122 | if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then | |
25123 | ac_cs_awk_getline=: | |
25124 | ac_cs_awk_pipe_init= | |
25125 | ac_cs_awk_read_file=' | |
25126 | while ((getline aline < (F[key])) > 0) | |
25127 | print(aline) | |
25128 | close(F[key])' | |
25129 | ac_cs_awk_pipe_fini= | |
25130 | else | |
25131 | ac_cs_awk_getline=false | |
25132 | ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\"" | |
25133 | ac_cs_awk_read_file=' | |
25134 | print "|#_!!_#|" | |
25135 | print "cat " F[key] " &&" | |
25136 | '$ac_cs_awk_pipe_init | |
25137 | # The final `:' finishes the AND list. | |
25138 | ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }' | |
25139 | fi | |
25140 | ac_cr=`echo X | tr X '\015'` | |
25141 | # On cygwin, bash can eat \r inside `` if the user requested igncr. | |
25142 | # But we know of no other shell where ac_cr would be empty at this | |
25143 | # point, so we can use a bashism as a fallback. | |
25144 | if test "x$ac_cr" = x; then | |
25145 | eval ac_cr=\$\'\\r\' | |
25146 | fi | |
25147 | ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` | |
25148 | if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then | |
a9bec17c | 25149 | ac_cs_awk_cr='\r' |
067d23c9 KY |
25150 | else |
25151 | ac_cs_awk_cr=$ac_cr | |
25152 | fi | |
25153 | ||
a9bec17c | 25154 | echo 'BEGIN {' >"$tmp/subs1.awk" && |
067d23c9 KY |
25155 | _ACEOF |
25156 | ||
25157 | # Create commands to substitute file output variables. | |
25158 | { | |
25159 | echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" && | |
a9bec17c | 25160 | echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' && |
067d23c9 KY |
25161 | echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' && |
25162 | echo "_ACAWK" && | |
25163 | echo "_ACEOF" | |
25164 | } >conf$$files.sh && | |
25165 | . ./conf$$files.sh || | |
a9bec17c | 25166 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 |
067d23c9 KY |
25167 | rm -f conf$$files.sh |
25168 | ||
25169 | { | |
25170 | echo "cat >conf$$subs.awk <<_ACEOF" && | |
25171 | echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && | |
25172 | echo "_ACEOF" | |
25173 | } >conf$$subs.sh || | |
a9bec17c GM |
25174 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 |
25175 | ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` | |
067d23c9 KY |
25176 | ac_delim='%!_!# ' |
25177 | for ac_last_try in false false false false false :; do | |
25178 | . ./conf$$subs.sh || | |
a9bec17c | 25179 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 |
067d23c9 KY |
25180 | |
25181 | ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` | |
25182 | if test $ac_delim_n = $ac_delim_num; then | |
25183 | break | |
25184 | elif $ac_last_try; then | |
a9bec17c | 25185 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 |
067d23c9 KY |
25186 | else |
25187 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
25188 | fi | |
25189 | done | |
25190 | rm -f conf$$subs.sh | |
25191 | ||
25192 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
a9bec17c | 25193 | cat >>"\$tmp/subs1.awk" <<\\_ACAWK && |
067d23c9 KY |
25194 | _ACEOF |
25195 | sed -n ' | |
25196 | h | |
25197 | s/^/S["/; s/!.*/"]=/ | |
25198 | p | |
25199 | g | |
25200 | s/^[^!]*!// | |
25201 | :repl | |
25202 | t repl | |
25203 | s/'"$ac_delim"'$// | |
25204 | t delim | |
25205 | :nl | |
25206 | h | |
25207 | s/\(.\{148\}\)..*/\1/ | |
25208 | t more1 | |
25209 | s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ | |
25210 | p | |
25211 | n | |
25212 | b repl | |
25213 | :more1 | |
25214 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
25215 | p | |
25216 | g | |
25217 | s/.\{148\}// | |
25218 | t nl | |
25219 | :delim | |
25220 | h | |
25221 | s/\(.\{148\}\)..*/\1/ | |
25222 | t more2 | |
25223 | s/["\\]/\\&/g; s/^/"/; s/$/"/ | |
25224 | p | |
25225 | b | |
25226 | :more2 | |
25227 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
25228 | p | |
25229 | g | |
25230 | s/.\{148\}// | |
25231 | t delim | |
25232 | ' <conf$$subs.awk | sed ' | |
25233 | /^[^""]/{ | |
25234 | N | |
25235 | s/\n// | |
25236 | } | |
25237 | ' >>$CONFIG_STATUS || ac_write_fail=1 | |
25238 | rm -f conf$$subs.awk | |
25239 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
25240 | _ACAWK | |
a9bec17c | 25241 | cat >>"\$tmp/subs1.awk" <<_ACAWK && |
067d23c9 KY |
25242 | for (key in S) S_is_set[key] = 1 |
25243 | FS = "\a" | |
25244 | \$ac_cs_awk_pipe_init | |
25245 | } | |
25246 | { | |
25247 | line = $ 0 | |
25248 | nfields = split(line, field, "@") | |
25249 | substed = 0 | |
25250 | len = length(field[1]) | |
25251 | for (i = 2; i < nfields; i++) { | |
25252 | key = field[i] | |
25253 | keylen = length(key) | |
25254 | if (S_is_set[key]) { | |
25255 | value = S[key] | |
25256 | line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) | |
25257 | len += length(value) + length(field[++i]) | |
25258 | substed = 1 | |
25259 | } else | |
25260 | len += 1 + keylen | |
25261 | } | |
25262 | if (nfields == 3 && !substed) { | |
25263 | key = field[2] | |
25264 | if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) { | |
25265 | \$ac_cs_awk_read_file | |
25266 | next | |
25267 | } | |
25268 | } | |
25269 | print line | |
25270 | } | |
25271 | \$ac_cs_awk_pipe_fini | |
25272 | _ACAWK | |
25273 | _ACEOF | |
25274 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
25275 | if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then | |
25276 | sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" | |
25277 | else | |
25278 | cat | |
a9bec17c GM |
25279 | fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ |
25280 | || as_fn_error "could not setup config files machinery" "$LINENO" 5 | |
067d23c9 KY |
25281 | _ACEOF |
25282 | ||
a9bec17c GM |
25283 | # VPATH may cause trouble with some makes, so we remove $(srcdir), |
25284 | # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and | |
067d23c9 KY |
25285 | # trailing colons and then remove the whole line if VPATH becomes empty |
25286 | # (actually we leave an empty line to preserve line numbers). | |
25287 | if test "x$srcdir" = x.; then | |
a9bec17c GM |
25288 | ac_vpsub='/^[ ]*VPATH[ ]*=/{ |
25289 | s/:*\$(srcdir):*/:/ | |
25290 | s/:*\${srcdir}:*/:/ | |
25291 | s/:*@srcdir@:*/:/ | |
25292 | s/^\([^=]*=[ ]*\):*/\1/ | |
067d23c9 KY |
25293 | s/:*$// |
25294 | s/^[^=]*=[ ]*$// | |
25295 | }' | |
25296 | fi | |
25297 | ||
25298 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
25299 | fi # test -n "$CONFIG_FILES" | |
25300 | ||
25301 | # Set up the scripts for CONFIG_HEADERS section. | |
25302 | # No need to generate them if there are no CONFIG_HEADERS. | |
25303 | # This happens for instance with `./config.status Makefile'. | |
25304 | if test -n "$CONFIG_HEADERS"; then | |
a9bec17c | 25305 | cat >"$tmp/defines.awk" <<\_ACAWK || |
067d23c9 KY |
25306 | BEGIN { |
25307 | _ACEOF | |
25308 | ||
25309 | # Transform confdefs.h into an awk script `defines.awk', embedded as | |
25310 | # here-document in config.status, that substitutes the proper values into | |
25311 | # config.h.in to produce config.h. | |
25312 | ||
25313 | # Create a delimiter string that does not exist in confdefs.h, to ease | |
25314 | # handling of long lines. | |
25315 | ac_delim='%!_!# ' | |
25316 | for ac_last_try in false false :; do | |
a9bec17c GM |
25317 | ac_t=`sed -n "/$ac_delim/p" confdefs.h` |
25318 | if test -z "$ac_t"; then | |
067d23c9 KY |
25319 | break |
25320 | elif $ac_last_try; then | |
a9bec17c | 25321 | as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5 |
067d23c9 KY |
25322 | else |
25323 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
25324 | fi | |
25325 | done | |
25326 | ||
25327 | # For the awk script, D is an array of macro values keyed by name, | |
25328 | # likewise P contains macro parameters if any. Preserve backslash | |
25329 | # newline sequences. | |
25330 | ||
25331 | ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* | |
25332 | sed -n ' | |
25333 | s/.\{148\}/&'"$ac_delim"'/g | |
25334 | t rset | |
25335 | :rset | |
25336 | s/^[ ]*#[ ]*define[ ][ ]*/ / | |
25337 | t def | |
25338 | d | |
25339 | :def | |
25340 | s/\\$// | |
25341 | t bsnl | |
25342 | s/["\\]/\\&/g | |
25343 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
25344 | D["\1"]=" \3"/p | |
25345 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p | |
25346 | d | |
25347 | :bsnl | |
25348 | s/["\\]/\\&/g | |
25349 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
25350 | D["\1"]=" \3\\\\\\n"\\/p | |
25351 | t cont | |
25352 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p | |
25353 | t cont | |
25354 | d | |
25355 | :cont | |
25356 | n | |
25357 | s/.\{148\}/&'"$ac_delim"'/g | |
25358 | t clear | |
25359 | :clear | |
25360 | s/\\$// | |
25361 | t bsnlc | |
25362 | s/["\\]/\\&/g; s/^/"/; s/$/"/p | |
25363 | d | |
25364 | :bsnlc | |
25365 | s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p | |
25366 | b cont | |
25367 | ' <confdefs.h | sed ' | |
25368 | s/'"$ac_delim"'/"\\\ | |
25369 | "/g' >>$CONFIG_STATUS || ac_write_fail=1 | |
25370 | ||
25371 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
25372 | for (key in D) D_is_set[key] = 1 | |
25373 | FS = "\a" | |
25374 | } | |
25375 | /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { | |
25376 | line = \$ 0 | |
25377 | split(line, arg, " ") | |
25378 | if (arg[1] == "#") { | |
25379 | defundef = arg[2] | |
25380 | mac1 = arg[3] | |
25381 | } else { | |
25382 | defundef = substr(arg[1], 2) | |
25383 | mac1 = arg[2] | |
25384 | } | |
25385 | split(mac1, mac2, "(") #) | |
25386 | macro = mac2[1] | |
25387 | prefix = substr(line, 1, index(line, defundef) - 1) | |
25388 | if (D_is_set[macro]) { | |
25389 | # Preserve the white space surrounding the "#". | |
25390 | print prefix "define", macro P[macro] D[macro] | |
25391 | next | |
25392 | } else { | |
25393 | # Replace #undef with comments. This is necessary, for example, | |
25394 | # in the case of _POSIX_SOURCE, which is predefined and required | |
25395 | # on some systems where configure will not decide to define it. | |
25396 | if (defundef == "undef") { | |
25397 | print "/*", prefix defundef, macro, "*/" | |
25398 | next | |
25399 | } | |
25400 | } | |
25401 | } | |
25402 | { print } | |
25403 | _ACAWK | |
25404 | _ACEOF | |
25405 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
a9bec17c | 25406 | as_fn_error "could not setup config headers machinery" "$LINENO" 5 |
067d23c9 KY |
25407 | fi # test -n "$CONFIG_HEADERS" |
25408 | ||
25409 | ||
25410 | eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" | |
25411 | shift | |
25412 | for ac_tag | |
25413 | do | |
25414 | case $ac_tag in | |
25415 | :[FHLC]) ac_mode=$ac_tag; continue;; | |
25416 | esac | |
25417 | case $ac_mode$ac_tag in | |
25418 | :[FHL]*:*);; | |
a9bec17c | 25419 | :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; |
067d23c9 KY |
25420 | :[FH]-) ac_tag=-:-;; |
25421 | :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; | |
25422 | esac | |
25423 | ac_save_IFS=$IFS | |
25424 | IFS=: | |
25425 | set x $ac_tag | |
25426 | IFS=$ac_save_IFS | |
25427 | shift | |
25428 | ac_file=$1 | |
25429 | shift | |
25430 | ||
25431 | case $ac_mode in | |
25432 | :L) ac_source=$1;; | |
25433 | :[FH]) | |
25434 | ac_file_inputs= | |
25435 | for ac_f | |
25436 | do | |
25437 | case $ac_f in | |
a9bec17c | 25438 | -) ac_f="$tmp/stdin";; |
067d23c9 KY |
25439 | *) # Look for the file first in the build tree, then in the source tree |
25440 | # (if the path is not absolute). The absolute path cannot be DOS-style, | |
25441 | # because $ac_f cannot contain `:'. | |
25442 | test -f "$ac_f" || | |
25443 | case $ac_f in | |
25444 | [\\/$]*) false;; | |
25445 | *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; | |
25446 | esac || | |
a9bec17c | 25447 | as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; |
067d23c9 KY |
25448 | esac |
25449 | case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac | |
25450 | as_fn_append ac_file_inputs " '$ac_f'" | |
25451 | done | |
25452 | ||
25453 | # Let's still pretend it is `configure' which instantiates (i.e., don't | |
25454 | # use $as_me), people would be surprised to read: | |
25455 | # /* config.h. Generated by config.status. */ | |
25456 | configure_input='Generated from '` | |
25457 | $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' | |
25458 | `' by configure.' | |
25459 | if test x"$ac_file" != x-; then | |
25460 | configure_input="$ac_file. $configure_input" | |
25461 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 | |
25462 | $as_echo "$as_me: creating $ac_file" >&6;} | |
25463 | fi | |
25464 | # Neutralize special characters interpreted by sed in replacement strings. | |
25465 | case $configure_input in #( | |
25466 | *\&* | *\|* | *\\* ) | |
25467 | ac_sed_conf_input=`$as_echo "$configure_input" | | |
25468 | sed 's/[\\\\&|]/\\\\&/g'`;; #( | |
25469 | *) ac_sed_conf_input=$configure_input;; | |
25470 | esac | |
25471 | ||
25472 | case $ac_tag in | |
a9bec17c GM |
25473 | *:-:* | *:-) cat >"$tmp/stdin" \ |
25474 | || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; | |
067d23c9 KY |
25475 | esac |
25476 | ;; | |
25477 | esac | |
25478 | ||
25479 | ac_dir=`$as_dirname -- "$ac_file" || | |
25480 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
25481 | X"$ac_file" : 'X\(//\)[^/]' \| \ | |
25482 | X"$ac_file" : 'X\(//\)$' \| \ | |
25483 | X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || | |
25484 | $as_echo X"$ac_file" | | |
25485 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
25486 | s//\1/ | |
25487 | q | |
25488 | } | |
25489 | /^X\(\/\/\)[^/].*/{ | |
25490 | s//\1/ | |
25491 | q | |
25492 | } | |
25493 | /^X\(\/\/\)$/{ | |
25494 | s//\1/ | |
25495 | q | |
25496 | } | |
25497 | /^X\(\/\).*/{ | |
25498 | s//\1/ | |
25499 | q | |
25500 | } | |
25501 | s/.*/./; q'` | |
25502 | as_dir="$ac_dir"; as_fn_mkdir_p | |
25503 | ac_builddir=. | |
25504 | ||
25505 | case "$ac_dir" in | |
25506 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
25507 | *) | |
25508 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
25509 | # A ".." for each directory in $ac_dir_suffix. | |
25510 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
25511 | case $ac_top_builddir_sub in | |
25512 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
25513 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
25514 | esac ;; | |
25515 | esac | |
25516 | ac_abs_top_builddir=$ac_pwd | |
25517 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
25518 | # for backward compatibility: | |
25519 | ac_top_builddir=$ac_top_build_prefix | |
25520 | ||
25521 | case $srcdir in | |
25522 | .) # We are building in place. | |
25523 | ac_srcdir=. | |
25524 | ac_top_srcdir=$ac_top_builddir_sub | |
25525 | ac_abs_top_srcdir=$ac_pwd ;; | |
25526 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
25527 | ac_srcdir=$srcdir$ac_dir_suffix; | |
25528 | ac_top_srcdir=$srcdir | |
25529 | ac_abs_top_srcdir=$srcdir ;; | |
25530 | *) # Relative name. | |
25531 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
25532 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
25533 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
25534 | esac | |
25535 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix | |
25536 | ||
25537 | ||
25538 | case $ac_mode in | |
25539 | :F) | |
25540 | # | |
25541 | # CONFIG_FILE | |
25542 | # | |
25543 | ||
25544 | case $INSTALL in | |
25545 | [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; | |
25546 | *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; | |
25547 | esac | |
743c80a7 PE |
25548 | ac_MKDIR_P=$MKDIR_P |
25549 | case $MKDIR_P in | |
25550 | [\\/$]* | ?:[\\/]* ) ;; | |
25551 | */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; | |
25552 | esac | |
067d23c9 KY |
25553 | _ACEOF |
25554 | ||
25555 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
25556 | # If the template does not know about datarootdir, expand it. | |
25557 | # FIXME: This hack should be removed a few years after 2.60. | |
25558 | ac_datarootdir_hack=; ac_datarootdir_seen= | |
25559 | ac_sed_dataroot=' | |
25560 | /datarootdir/ { | |
25561 | p | |
25562 | q | |
25563 | } | |
25564 | /@datadir@/p | |
25565 | /@docdir@/p | |
25566 | /@infodir@/p | |
25567 | /@localedir@/p | |
25568 | /@mandir@/p' | |
25569 | case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in | |
25570 | *datarootdir*) ac_datarootdir_seen=yes;; | |
25571 | *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) | |
25572 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 | |
25573 | $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} | |
25574 | _ACEOF | |
25575 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
25576 | ac_datarootdir_hack=' | |
25577 | s&@datadir@&$datadir&g | |
25578 | s&@docdir@&$docdir&g | |
25579 | s&@infodir@&$infodir&g | |
25580 | s&@localedir@&$localedir&g | |
25581 | s&@mandir@&$mandir&g | |
25582 | s&\\\${datarootdir}&$datarootdir&g' ;; | |
25583 | esac | |
25584 | _ACEOF | |
25585 | ||
25586 | # Neutralize VPATH when `$srcdir' = `.'. | |
25587 | # Shell code in configure.ac might set extrasub. | |
25588 | # FIXME: do we really want to maintain this feature? | |
25589 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
25590 | ac_sed_extra="$ac_vpsub | |
25591 | $extrasub | |
25592 | _ACEOF | |
25593 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
25594 | :t | |
25595 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b | |
25596 | s|@configure_input@|$ac_sed_conf_input|;t t | |
25597 | s&@top_builddir@&$ac_top_builddir_sub&;t t | |
25598 | s&@top_build_prefix@&$ac_top_build_prefix&;t t | |
25599 | s&@srcdir@&$ac_srcdir&;t t | |
25600 | s&@abs_srcdir@&$ac_abs_srcdir&;t t | |
25601 | s&@top_srcdir@&$ac_top_srcdir&;t t | |
25602 | s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t | |
25603 | s&@builddir@&$ac_builddir&;t t | |
25604 | s&@abs_builddir@&$ac_abs_builddir&;t t | |
25605 | s&@abs_top_builddir@&$ac_abs_top_builddir&;t t | |
25606 | s&@INSTALL@&$ac_INSTALL&;t t | |
743c80a7 | 25607 | s&@MKDIR_P@&$ac_MKDIR_P&;t t |
067d23c9 KY |
25608 | $ac_datarootdir_hack |
25609 | " | |
25610 | eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | | |
25611 | if $ac_cs_awk_getline; then | |
a9bec17c | 25612 | $AWK -f "$tmp/subs.awk" |
067d23c9 | 25613 | else |
a9bec17c GM |
25614 | $AWK -f "$tmp/subs.awk" | $SHELL |
25615 | fi >$tmp/out \ | |
25616 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
067d23c9 KY |
25617 | |
25618 | test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && | |
a9bec17c GM |
25619 | { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && |
25620 | { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && | |
067d23c9 | 25621 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' |
a9bec17c | 25622 | which seems to be undefined. Please make sure it is defined." >&5 |
067d23c9 | 25623 | $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' |
a9bec17c | 25624 | which seems to be undefined. Please make sure it is defined." >&2;} |
067d23c9 | 25625 | |
a9bec17c | 25626 | rm -f "$tmp/stdin" |
067d23c9 | 25627 | case $ac_file in |
a9bec17c GM |
25628 | -) cat "$tmp/out" && rm -f "$tmp/out";; |
25629 | *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; | |
067d23c9 | 25630 | esac \ |
a9bec17c | 25631 | || as_fn_error "could not create $ac_file" "$LINENO" 5 |
067d23c9 KY |
25632 | ;; |
25633 | :H) | |
25634 | # | |
25635 | # CONFIG_HEADER | |
25636 | # | |
25637 | if test x"$ac_file" != x-; then | |
25638 | { | |
25639 | $as_echo "/* $configure_input */" \ | |
a9bec17c GM |
25640 | && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" |
25641 | } >"$tmp/config.h" \ | |
25642 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
25643 | if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then | |
067d23c9 KY |
25644 | { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 |
25645 | $as_echo "$as_me: $ac_file is unchanged" >&6;} | |
25646 | else | |
25647 | rm -f "$ac_file" | |
a9bec17c GM |
25648 | mv "$tmp/config.h" "$ac_file" \ |
25649 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
067d23c9 KY |
25650 | fi |
25651 | else | |
25652 | $as_echo "/* $configure_input */" \ | |
a9bec17c GM |
25653 | && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ |
25654 | || as_fn_error "could not create -" "$LINENO" 5 | |
067d23c9 | 25655 | fi |
743c80a7 PE |
25656 | # Compute "$ac_file"'s index in $config_headers. |
25657 | _am_arg="$ac_file" | |
25658 | _am_stamp_count=1 | |
25659 | for _am_header in $config_headers :; do | |
25660 | case $_am_header in | |
25661 | $_am_arg | $_am_arg:* ) | |
25662 | break ;; | |
25663 | * ) | |
25664 | _am_stamp_count=`expr $_am_stamp_count + 1` ;; | |
25665 | esac | |
25666 | done | |
25667 | echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || | |
25668 | $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
25669 | X"$_am_arg" : 'X\(//\)[^/]' \| \ | |
25670 | X"$_am_arg" : 'X\(//\)$' \| \ | |
25671 | X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || | |
25672 | $as_echo X"$_am_arg" | | |
25673 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
25674 | s//\1/ | |
25675 | q | |
25676 | } | |
25677 | /^X\(\/\/\)[^/].*/{ | |
25678 | s//\1/ | |
25679 | q | |
25680 | } | |
25681 | /^X\(\/\/\)$/{ | |
25682 | s//\1/ | |
25683 | q | |
25684 | } | |
25685 | /^X\(\/\).*/{ | |
25686 | s//\1/ | |
25687 | q | |
25688 | } | |
25689 | s/.*/./; q'`/stamp-h$_am_stamp_count | |
067d23c9 KY |
25690 | ;; |
25691 | ||
25692 | :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 | |
25693 | $as_echo "$as_me: executing $ac_file commands" >&6;} | |
25694 | ;; | |
25695 | esac | |
25696 | ||
25697 | ||
25698 | case $ac_file$ac_mode in | |
743c80a7 PE |
25699 | "depfiles":C) test x"$AMDEP_TRUE" != x"" || { |
25700 | # Autoconf 2.62 quotes --file arguments for eval, but not when files | |
25701 | # are listed without --file. Let's play safe and only enable the eval | |
25702 | # if we detect the quoting. | |
25703 | case $CONFIG_FILES in | |
25704 | *\'*) eval set x "$CONFIG_FILES" ;; | |
25705 | *) set x $CONFIG_FILES ;; | |
25706 | esac | |
25707 | shift | |
25708 | for mf | |
25709 | do | |
25710 | # Strip MF so we end up with the name of the file. | |
25711 | mf=`echo "$mf" | sed -e 's/:.*$//'` | |
25712 | # Check whether this is an Automake generated Makefile or not. | |
25713 | # We used to match only the files named `Makefile.in', but | |
25714 | # some people rename them; so instead we look at the file content. | |
25715 | # Grep'ing the first line is not enough: some people post-process | |
25716 | # each Makefile.in and add a new line on top of each file to say so. | |
25717 | # Grep'ing the whole file is not good either: AIX grep has a line | |
25718 | # limit of 2048, but all sed's we know have understand at least 4000. | |
25719 | if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then | |
25720 | dirpart=`$as_dirname -- "$mf" || | |
25721 | $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
25722 | X"$mf" : 'X\(//\)[^/]' \| \ | |
25723 | X"$mf" : 'X\(//\)$' \| \ | |
25724 | X"$mf" : 'X\(/\)' \| . 2>/dev/null || | |
25725 | $as_echo X"$mf" | | |
25726 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
25727 | s//\1/ | |
25728 | q | |
25729 | } | |
25730 | /^X\(\/\/\)[^/].*/{ | |
25731 | s//\1/ | |
25732 | q | |
25733 | } | |
25734 | /^X\(\/\/\)$/{ | |
25735 | s//\1/ | |
25736 | q | |
25737 | } | |
25738 | /^X\(\/\).*/{ | |
25739 | s//\1/ | |
25740 | q | |
25741 | } | |
25742 | s/.*/./; q'` | |
25743 | else | |
25744 | continue | |
25745 | fi | |
25746 | # Extract the definition of DEPDIR, am__include, and am__quote | |
25747 | # from the Makefile without running `make'. | |
25748 | DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` | |
25749 | test -z "$DEPDIR" && continue | |
25750 | am__include=`sed -n 's/^am__include = //p' < "$mf"` | |
25751 | test -z "am__include" && continue | |
25752 | am__quote=`sed -n 's/^am__quote = //p' < "$mf"` | |
25753 | # When using ansi2knr, U may be empty or an underscore; expand it | |
25754 | U=`sed -n 's/^U = //p' < "$mf"` | |
25755 | # Find all dependency output files, they are included files with | |
25756 | # $(DEPDIR) in their names. We invoke sed twice because it is the | |
25757 | # simplest approach to changing $(DEPDIR) to its actual value in the | |
25758 | # expansion. | |
25759 | for file in `sed -n " | |
25760 | s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ | |
25761 | sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do | |
25762 | # Make sure the directory exists. | |
25763 | test -f "$dirpart/$file" && continue | |
25764 | fdir=`$as_dirname -- "$file" || | |
25765 | $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
25766 | X"$file" : 'X\(//\)[^/]' \| \ | |
25767 | X"$file" : 'X\(//\)$' \| \ | |
25768 | X"$file" : 'X\(/\)' \| . 2>/dev/null || | |
25769 | $as_echo X"$file" | | |
25770 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
25771 | s//\1/ | |
25772 | q | |
25773 | } | |
25774 | /^X\(\/\/\)[^/].*/{ | |
25775 | s//\1/ | |
25776 | q | |
25777 | } | |
25778 | /^X\(\/\/\)$/{ | |
25779 | s//\1/ | |
25780 | q | |
25781 | } | |
25782 | /^X\(\/\).*/{ | |
25783 | s//\1/ | |
25784 | q | |
25785 | } | |
25786 | s/.*/./; q'` | |
25787 | as_dir=$dirpart/$fdir; as_fn_mkdir_p | |
25788 | # echo "creating $dirpart/$file" | |
25789 | echo '# dummy' > "$dirpart/$file" | |
25790 | done | |
25791 | done | |
25792 | } | |
25793 | ;; | |
9411886d | 25794 | "mkdirs":C) |
067d23c9 KY |
25795 | for dir in etc lisp ; do |
25796 | test -d ${dir} || mkdir ${dir} | |
25797 | done | |
9411886d PE |
25798 | ;; |
25799 | "epaths":C) | |
067d23c9 | 25800 | echo creating src/epaths.h |
906debc3 | 25801 | ${MAKE-make} MAKEFILE_NAME=do-not-make-Makefile epaths-force |
9411886d PE |
25802 | ;; |
25803 | "gdbinit":C) | |
067d23c9 KY |
25804 | if test ! -f src/.gdbinit && test -f $srcdir/src/.gdbinit; then |
25805 | echo creating src/.gdbinit | |
25806 | echo source $srcdir/src/.gdbinit > src/.gdbinit | |
25807 | fi | |
067d23c9 KY |
25808 | ;; |
25809 | ||
25810 | esac | |
25811 | done # for ac_tag | |
25812 | ||
25813 | ||
25814 | as_fn_exit 0 | |
25815 | _ACEOF | |
25816 | ac_clean_files=$ac_clean_files_save | |
25817 | ||
25818 | test $ac_write_fail = 0 || | |
a9bec17c | 25819 | as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 |
067d23c9 KY |
25820 | |
25821 | ||
25822 | # configure is writing to config.log, and then calls config.status. | |
25823 | # config.status does its own redirection, appending to config.log. | |
25824 | # Unfortunately, on DOS this fails, as config.log is still kept open | |
25825 | # by configure, so config.status won't be able to write to it; its | |
25826 | # output is simply discarded. So we exec the FD to /dev/null, | |
25827 | # effectively closing config.log, so it can be properly (re)opened and | |
25828 | # appended to by config.status. When coming back to configure, we | |
25829 | # need to make the FD available again. | |
25830 | if test "$no_create" != yes; then | |
25831 | ac_cs_success=: | |
25832 | ac_config_status_args= | |
25833 | test "$silent" = yes && | |
25834 | ac_config_status_args="$ac_config_status_args --quiet" | |
25835 | exec 5>/dev/null | |
25836 | $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false | |
25837 | exec 5>>config.log | |
25838 | # Use ||, not &&, to avoid exiting from the if with $? = 1, which | |
25839 | # would make configure fail if this is the last instruction. | |
a9bec17c | 25840 | $ac_cs_success || as_fn_exit $? |
067d23c9 KY |
25841 | fi |
25842 | if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then | |
25843 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 | |
25844 | $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} | |
25845 | fi | |
25846 |