Commit | Line | Data |
---|---|---|
067d23c9 KY |
1 | #! /bin/sh |
2 | # Guess values for system-dependent variables and create Makefiles. | |
5f64f7bd | 3 | # Generated by GNU Autoconf 2.65 for emacs 24.0.50. |
067d23c9 KY |
4 | # |
5 | # | |
6 | # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, | |
5f64f7bd GM |
7 | # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, |
8 | # Inc. | |
067d23c9 KY |
9 | # |
10 | # | |
11 | # This configure script is free software; the Free Software Foundation | |
12 | # gives unlimited permission to copy, distribute and modify it. | |
13 | ## -------------------- ## | |
14 | ## M4sh Initialization. ## | |
15 | ## -------------------- ## | |
16 | ||
17 | # Be more Bourne compatible | |
18 | DUALCASE=1; export DUALCASE # for MKS sh | |
19 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : | |
20 | emulate sh | |
21 | NULLCMD=: | |
22 | # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which | |
23 | # is contrary to our usage. Disable this feature. | |
24 | alias -g '${1+"$@"}'='"$@"' | |
25 | setopt NO_GLOB_SUBST | |
26 | else | |
27 | case `(set -o) 2>/dev/null` in #( | |
28 | *posix*) : | |
29 | set -o posix ;; #( | |
30 | *) : | |
31 | ;; | |
32 | esac | |
33 | fi | |
34 | ||
35 | ||
36 | as_nl=' | |
37 | ' | |
38 | export as_nl | |
39 | # Printing a long string crashes Solaris 7 /usr/bin/printf. | |
40 | as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' | |
41 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo | |
42 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo | |
43 | # Prefer a ksh shell builtin over an external printf program on Solaris, | |
44 | # but without wasting forks for bash or zsh. | |
45 | if test -z "$BASH_VERSION$ZSH_VERSION" \ | |
46 | && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then | |
47 | as_echo='print -r --' | |
48 | as_echo_n='print -rn --' | |
49 | elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then | |
50 | as_echo='printf %s\n' | |
51 | as_echo_n='printf %s' | |
52 | else | |
53 | if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then | |
54 | as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' | |
55 | as_echo_n='/usr/ucb/echo -n' | |
56 | else | |
57 | as_echo_body='eval expr "X$1" : "X\\(.*\\)"' | |
58 | as_echo_n_body='eval | |
59 | arg=$1; | |
60 | case $arg in #( | |
61 | *"$as_nl"*) | |
62 | expr "X$arg" : "X\\(.*\\)$as_nl"; | |
63 | arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; | |
64 | esac; | |
65 | expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" | |
66 | ' | |
67 | export as_echo_n_body | |
68 | as_echo_n='sh -c $as_echo_n_body as_echo' | |
69 | fi | |
70 | export as_echo_body | |
71 | as_echo='sh -c $as_echo_body as_echo' | |
72 | fi | |
73 | ||
74 | # The user is always right. | |
75 | if test "${PATH_SEPARATOR+set}" != set; then | |
76 | PATH_SEPARATOR=: | |
77 | (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { | |
78 | (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || | |
79 | PATH_SEPARATOR=';' | |
80 | } | |
81 | fi | |
82 | ||
83 | ||
84 | # IFS | |
85 | # We need space, tab and new line, in precisely that order. Quoting is | |
86 | # there to prevent editors from complaining about space-tab. | |
87 | # (If _AS_PATH_WALK were called with IFS unset, it would disable word | |
88 | # splitting by setting IFS to empty value.) | |
89 | IFS=" "" $as_nl" | |
90 | ||
91 | # Find who we are. Look in the path if we contain no directory separator. | |
92 | case $0 in #(( | |
93 | *[\\/]* ) as_myself=$0 ;; | |
94 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
95 | for as_dir in $PATH | |
96 | do | |
97 | IFS=$as_save_IFS | |
98 | test -z "$as_dir" && as_dir=. | |
99 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | |
100 | done | |
101 | IFS=$as_save_IFS | |
102 | ||
103 | ;; | |
104 | esac | |
105 | # We did not find ourselves, most probably we were run as `sh COMMAND' | |
106 | # in which case we are not to be found in the path. | |
107 | if test "x$as_myself" = x; then | |
108 | as_myself=$0 | |
109 | fi | |
110 | if test ! -f "$as_myself"; then | |
111 | $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 | |
112 | exit 1 | |
113 | fi | |
114 | ||
115 | # Unset variables that we do not need and which cause bugs (e.g. in | |
116 | # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" | |
117 | # suppresses any "Segmentation fault" message there. '((' could | |
118 | # trigger a bug in pdksh 5.2.14. | |
119 | for as_var in BASH_ENV ENV MAIL MAILPATH | |
120 | do eval test x\${$as_var+set} = xset \ | |
121 | && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : | |
122 | done | |
123 | PS1='$ ' | |
124 | PS2='> ' | |
125 | PS4='+ ' | |
126 | ||
127 | # NLS nuisances. | |
128 | LC_ALL=C | |
129 | export LC_ALL | |
130 | LANGUAGE=C | |
131 | export LANGUAGE | |
132 | ||
133 | # CDPATH. | |
134 | (unset CDPATH) >/dev/null 2>&1 && unset CDPATH | |
135 | ||
136 | if test "x$CONFIG_SHELL" = x; then | |
137 | as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : | |
138 | emulate sh | |
139 | NULLCMD=: | |
140 | # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which | |
141 | # is contrary to our usage. Disable this feature. | |
142 | alias -g '\${1+\"\$@\"}'='\"\$@\"' | |
143 | setopt NO_GLOB_SUBST | |
144 | else | |
145 | case \`(set -o) 2>/dev/null\` in #( | |
146 | *posix*) : | |
147 | set -o posix ;; #( | |
148 | *) : | |
149 | ;; | |
150 | esac | |
151 | fi | |
152 | " | |
153 | as_required="as_fn_return () { (exit \$1); } | |
154 | as_fn_success () { as_fn_return 0; } | |
155 | as_fn_failure () { as_fn_return 1; } | |
156 | as_fn_ret_success () { return 0; } | |
157 | as_fn_ret_failure () { return 1; } | |
158 | ||
159 | exitcode=0 | |
160 | as_fn_success || { exitcode=1; echo as_fn_success failed.; } | |
161 | as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } | |
162 | as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } | |
163 | as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } | |
164 | if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : | |
165 | ||
166 | else | |
167 | exitcode=1; echo positional parameters were not saved. | |
168 | fi | |
169 | test x\$exitcode = x0 || exit 1" | |
170 | as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO | |
171 | as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO | |
172 | eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && | |
173 | test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 | |
174 | test \$(( 1 + 1 )) = 2 || exit 1" | |
175 | if (eval "$as_required") 2>/dev/null; then : | |
176 | as_have_required=yes | |
177 | else | |
178 | as_have_required=no | |
179 | fi | |
180 | if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : | |
181 | ||
182 | else | |
183 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
184 | as_found=false | |
185 | for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH | |
186 | do | |
187 | IFS=$as_save_IFS | |
188 | test -z "$as_dir" && as_dir=. | |
189 | as_found=: | |
190 | case $as_dir in #( | |
191 | /*) | |
192 | for as_base in sh bash ksh sh5; do | |
193 | # Try only shells that exist, to save several forks. | |
194 | as_shell=$as_dir/$as_base | |
195 | if { test -f "$as_shell" || test -f "$as_shell.exe"; } && | |
196 | { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : | |
197 | CONFIG_SHELL=$as_shell as_have_required=yes | |
198 | if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : | |
199 | break 2 | |
200 | fi | |
201 | fi | |
202 | done;; | |
203 | esac | |
204 | as_found=false | |
205 | done | |
206 | $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && | |
207 | { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : | |
208 | CONFIG_SHELL=$SHELL as_have_required=yes | |
209 | fi; } | |
210 | IFS=$as_save_IFS | |
211 | ||
212 | ||
213 | if test "x$CONFIG_SHELL" != x; then : | |
214 | # We cannot yet assume a decent shell, so we have to provide a | |
215 | # neutralization value for shells without unset; and this also | |
216 | # works around shells that cannot unset nonexistent variables. | |
217 | BASH_ENV=/dev/null | |
218 | ENV=/dev/null | |
219 | (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV | |
220 | export CONFIG_SHELL | |
5f64f7bd | 221 | exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} |
067d23c9 KY |
222 | fi |
223 | ||
224 | if test x$as_have_required = xno; then : | |
225 | $as_echo "$0: This script requires a shell more modern than all" | |
226 | $as_echo "$0: the shells that I found on your system." | |
227 | if test x${ZSH_VERSION+set} = xset ; then | |
228 | $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" | |
229 | $as_echo "$0: be upgraded to zsh 4.3.4 or later." | |
230 | else | |
231 | $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, | |
232 | $0: including any error possibly output before this | |
233 | $0: message. Then install a modern shell, or manually run | |
234 | $0: the script under such a shell if you do have one." | |
235 | fi | |
236 | exit 1 | |
237 | fi | |
238 | fi | |
239 | fi | |
240 | SHELL=${CONFIG_SHELL-/bin/sh} | |
241 | export SHELL | |
242 | # Unset more variables known to interfere with behavior of common tools. | |
243 | CLICOLOR_FORCE= GREP_OPTIONS= | |
244 | unset CLICOLOR_FORCE GREP_OPTIONS | |
245 | ||
246 | ## --------------------- ## | |
247 | ## M4sh Shell Functions. ## | |
248 | ## --------------------- ## | |
249 | # as_fn_unset VAR | |
250 | # --------------- | |
251 | # Portably unset VAR. | |
252 | as_fn_unset () | |
253 | { | |
254 | { eval $1=; unset $1;} | |
255 | } | |
256 | as_unset=as_fn_unset | |
257 | ||
258 | # as_fn_set_status STATUS | |
259 | # ----------------------- | |
260 | # Set $? to STATUS, without forking. | |
261 | as_fn_set_status () | |
262 | { | |
263 | return $1 | |
264 | } # as_fn_set_status | |
265 | ||
266 | # as_fn_exit STATUS | |
267 | # ----------------- | |
268 | # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. | |
269 | as_fn_exit () | |
270 | { | |
271 | set +e | |
272 | as_fn_set_status $1 | |
273 | exit $1 | |
274 | } # as_fn_exit | |
275 | ||
276 | # as_fn_mkdir_p | |
277 | # ------------- | |
278 | # Create "$as_dir" as a directory, including parents if necessary. | |
279 | as_fn_mkdir_p () | |
280 | { | |
281 | ||
282 | case $as_dir in #( | |
283 | -*) as_dir=./$as_dir;; | |
284 | esac | |
285 | test -d "$as_dir" || eval $as_mkdir_p || { | |
286 | as_dirs= | |
287 | while :; do | |
288 | case $as_dir in #( | |
289 | *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( | |
290 | *) as_qdir=$as_dir;; | |
291 | esac | |
292 | as_dirs="'$as_qdir' $as_dirs" | |
293 | as_dir=`$as_dirname -- "$as_dir" || | |
294 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
295 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
296 | X"$as_dir" : 'X\(//\)$' \| \ | |
297 | X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || | |
298 | $as_echo X"$as_dir" | | |
299 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
300 | s//\1/ | |
301 | q | |
302 | } | |
303 | /^X\(\/\/\)[^/].*/{ | |
304 | s//\1/ | |
305 | q | |
306 | } | |
307 | /^X\(\/\/\)$/{ | |
308 | s//\1/ | |
309 | q | |
310 | } | |
311 | /^X\(\/\).*/{ | |
312 | s//\1/ | |
313 | q | |
314 | } | |
315 | s/.*/./; q'` | |
316 | test -d "$as_dir" && break | |
317 | done | |
318 | test -z "$as_dirs" || eval "mkdir $as_dirs" | |
5f64f7bd | 319 | } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" |
067d23c9 KY |
320 | |
321 | ||
322 | } # as_fn_mkdir_p | |
323 | # as_fn_append VAR VALUE | |
324 | # ---------------------- | |
325 | # Append the text in VALUE to the end of the definition contained in VAR. Take | |
326 | # advantage of any shell optimizations that allow amortized linear growth over | |
327 | # repeated appends, instead of the typical quadratic growth present in naive | |
328 | # implementations. | |
329 | if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : | |
330 | eval 'as_fn_append () | |
331 | { | |
332 | eval $1+=\$2 | |
333 | }' | |
334 | else | |
335 | as_fn_append () | |
336 | { | |
337 | eval $1=\$$1\$2 | |
338 | } | |
339 | fi # as_fn_append | |
340 | ||
341 | # as_fn_arith ARG... | |
342 | # ------------------ | |
343 | # Perform arithmetic evaluation on the ARGs, and store the result in the | |
344 | # global $as_val. Take advantage of shells that can avoid forks. The arguments | |
345 | # must be portable across $(()) and expr. | |
346 | if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : | |
347 | eval 'as_fn_arith () | |
348 | { | |
349 | as_val=$(( $* )) | |
350 | }' | |
351 | else | |
352 | as_fn_arith () | |
353 | { | |
354 | as_val=`expr "$@" || test $? -eq 1` | |
355 | } | |
356 | fi # as_fn_arith | |
357 | ||
358 | ||
5f64f7bd GM |
359 | # as_fn_error ERROR [LINENO LOG_FD] |
360 | # --------------------------------- | |
067d23c9 KY |
361 | # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are |
362 | # provided, also output the error to LOG_FD, referencing LINENO. Then exit the | |
5f64f7bd | 363 | # script with status $?, using 1 if that was 0. |
067d23c9 KY |
364 | as_fn_error () |
365 | { | |
5f64f7bd GM |
366 | as_status=$?; test $as_status -eq 0 && as_status=1 |
367 | if test "$3"; then | |
368 | as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
369 | $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 | |
067d23c9 | 370 | fi |
5f64f7bd | 371 | $as_echo "$as_me: error: $1" >&2 |
067d23c9 KY |
372 | as_fn_exit $as_status |
373 | } # as_fn_error | |
374 | ||
375 | if expr a : '\(a\)' >/dev/null 2>&1 && | |
376 | test "X`expr 00001 : '.*\(...\)'`" = X001; then | |
377 | as_expr=expr | |
378 | else | |
379 | as_expr=false | |
380 | fi | |
381 | ||
382 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then | |
383 | as_basename=basename | |
384 | else | |
385 | as_basename=false | |
386 | fi | |
387 | ||
388 | if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then | |
389 | as_dirname=dirname | |
390 | else | |
391 | as_dirname=false | |
392 | fi | |
393 | ||
394 | as_me=`$as_basename -- "$0" || | |
395 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ | |
396 | X"$0" : 'X\(//\)$' \| \ | |
397 | X"$0" : 'X\(/\)' \| . 2>/dev/null || | |
398 | $as_echo X/"$0" | | |
399 | sed '/^.*\/\([^/][^/]*\)\/*$/{ | |
400 | s//\1/ | |
401 | q | |
402 | } | |
403 | /^X\/\(\/\/\)$/{ | |
404 | s//\1/ | |
405 | q | |
406 | } | |
407 | /^X\/\(\/\).*/{ | |
408 | s//\1/ | |
409 | q | |
410 | } | |
411 | s/.*/./; q'` | |
412 | ||
413 | # Avoid depending upon Character Ranges. | |
414 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
415 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
416 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
417 | as_cr_digits='0123456789' | |
418 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
419 | ||
420 | ||
421 | as_lineno_1=$LINENO as_lineno_1a=$LINENO | |
422 | as_lineno_2=$LINENO as_lineno_2a=$LINENO | |
423 | eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && | |
424 | test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { | |
425 | # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) | |
426 | sed -n ' | |
427 | p | |
428 | /[$]LINENO/= | |
429 | ' <$as_myself | | |
430 | sed ' | |
431 | s/[$]LINENO.*/&-/ | |
432 | t lineno | |
433 | b | |
434 | :lineno | |
435 | N | |
436 | :loop | |
437 | s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ | |
438 | t loop | |
439 | s/-\n.*// | |
440 | ' >$as_me.lineno && | |
441 | chmod +x "$as_me.lineno" || | |
442 | { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } | |
443 | ||
444 | # Don't try to exec as it changes $[0], causing all sort of problems | |
445 | # (the dirname of $[0] is not the place where we might find the | |
446 | # original and so on. Autoconf is especially sensitive to this). | |
447 | . "./$as_me.lineno" | |
448 | # Exit status is that of the last command. | |
449 | exit | |
450 | } | |
451 | ||
452 | ECHO_C= ECHO_N= ECHO_T= | |
453 | case `echo -n x` in #((((( | |
454 | -n*) | |
455 | case `echo 'xy\c'` in | |
456 | *c*) ECHO_T=' ';; # ECHO_T is single tab character. | |
457 | xy) ECHO_C='\c';; | |
458 | *) echo `echo ksh88 bug on AIX 6.1` > /dev/null | |
459 | ECHO_T=' ';; | |
460 | esac;; | |
461 | *) | |
462 | ECHO_N='-n';; | |
463 | esac | |
464 | ||
465 | rm -f conf$$ conf$$.exe conf$$.file | |
466 | if test -d conf$$.dir; then | |
467 | rm -f conf$$.dir/conf$$.file | |
468 | else | |
469 | rm -f conf$$.dir | |
470 | mkdir conf$$.dir 2>/dev/null | |
471 | fi | |
472 | if (echo >conf$$.file) 2>/dev/null; then | |
473 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
474 | as_ln_s='ln -s' | |
475 | # ... but there are two gotchas: | |
476 | # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. | |
477 | # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. | |
478 | # In both cases, we have to default to `cp -p'. | |
479 | ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || | |
480 | as_ln_s='cp -p' | |
481 | elif ln conf$$.file conf$$ 2>/dev/null; then | |
482 | as_ln_s=ln | |
483 | else | |
484 | as_ln_s='cp -p' | |
485 | fi | |
486 | else | |
487 | as_ln_s='cp -p' | |
488 | fi | |
489 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file | |
490 | rmdir conf$$.dir 2>/dev/null | |
491 | ||
492 | if mkdir -p . 2>/dev/null; then | |
493 | as_mkdir_p='mkdir -p "$as_dir"' | |
494 | else | |
495 | test -d ./-p && rmdir ./-p | |
496 | as_mkdir_p=false | |
497 | fi | |
498 | ||
499 | if test -x / >/dev/null 2>&1; then | |
500 | as_test_x='test -x' | |
501 | else | |
502 | if ls -dL / >/dev/null 2>&1; then | |
503 | as_ls_L_option=L | |
504 | else | |
505 | as_ls_L_option= | |
506 | fi | |
507 | as_test_x=' | |
508 | eval sh -c '\'' | |
509 | if test -d "$1"; then | |
510 | test -d "$1/."; | |
511 | else | |
512 | case $1 in #( | |
513 | -*)set "./$1";; | |
514 | esac; | |
515 | case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( | |
516 | ???[sx]*):;;*)false;;esac;fi | |
517 | '\'' sh | |
518 | ' | |
519 | fi | |
520 | as_executable_p=$as_test_x | |
521 | ||
522 | # Sed expression to map a string onto a valid CPP name. | |
523 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" | |
524 | ||
525 | # Sed expression to map a string onto a valid variable name. | |
526 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" | |
527 | ||
528 | ||
529 | test -n "$DJDIR" || exec 7<&0 </dev/null | |
530 | exec 6>&1 | |
531 | ||
532 | # Name of the host. | |
5f64f7bd | 533 | # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, |
067d23c9 KY |
534 | # so uname gets run too. |
535 | ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` | |
536 | ||
537 | # | |
538 | # Initializations. | |
539 | # | |
540 | ac_default_prefix=/usr/local | |
541 | ac_clean_files= | |
542 | ac_config_libobj_dir=. | |
543 | LIBOBJS= | |
544 | cross_compiling=no | |
545 | subdirs= | |
546 | MFLAGS= | |
547 | MAKEFLAGS= | |
548 | ||
549 | # Identity of this package. | |
550 | PACKAGE_NAME='emacs' | |
551 | PACKAGE_TARNAME='emacs' | |
552 | PACKAGE_VERSION='24.0.50' | |
553 | PACKAGE_STRING='emacs 24.0.50' | |
554 | PACKAGE_BUGREPORT='' | |
555 | PACKAGE_URL='' | |
556 | ||
557 | ac_unique_file="src/lisp.h" | |
558 | # Factoring default headers for most tests. | |
559 | ac_includes_default="\ | |
560 | #include <stdio.h> | |
561 | #ifdef HAVE_SYS_TYPES_H | |
562 | # include <sys/types.h> | |
563 | #endif | |
564 | #ifdef HAVE_SYS_STAT_H | |
565 | # include <sys/stat.h> | |
566 | #endif | |
567 | #ifdef STDC_HEADERS | |
568 | # include <stdlib.h> | |
569 | # include <stddef.h> | |
570 | #else | |
571 | # ifdef HAVE_STDLIB_H | |
572 | # include <stdlib.h> | |
573 | # endif | |
574 | #endif | |
575 | #ifdef HAVE_STRING_H | |
576 | # if !defined STDC_HEADERS && defined HAVE_MEMORY_H | |
577 | # include <memory.h> | |
578 | # endif | |
579 | # include <string.h> | |
580 | #endif | |
581 | #ifdef HAVE_STRINGS_H | |
582 | # include <strings.h> | |
583 | #endif | |
584 | #ifdef HAVE_INTTYPES_H | |
585 | # include <inttypes.h> | |
586 | #endif | |
587 | #ifdef HAVE_STDINT_H | |
588 | # include <stdint.h> | |
589 | #endif | |
590 | #ifdef HAVE_UNISTD_H | |
591 | # include <unistd.h> | |
592 | #endif" | |
593 | ||
067d23c9 | 594 | ac_header_list= |
6c051bab | 595 | ac_func_list= |
e275c824 PE |
596 | gl_getopt_required=POSIX |
597 | gl_getopt_required=POSIX | |
743c80a7 PE |
598 | ac_subst_vars='gltests_LTLIBOBJS |
599 | gltests_LIBOBJS | |
600 | gl_LTLIBOBJS | |
601 | gl_LIBOBJS | |
602 | am__EXEEXT_FALSE | |
603 | am__EXEEXT_TRUE | |
604 | LTLIBOBJS | |
1f5d53eb | 605 | LIBOBJS |
73b78882 | 606 | SUBDIR_MAKEFILES_IN |
067d23c9 KY |
607 | LIB_GCC |
608 | LD_FIRSTFLAG | |
609 | LD_SWITCH_SYSTEM_TEMACS | |
743c80a7 PE |
610 | LIBGNU_LTLIBDEPS |
611 | LIBGNU_LIBDEPS | |
612 | gltests_WITNESS | |
6d153f56 GM |
613 | gl_GNULIB_ENABLED_verify_FALSE |
614 | gl_GNULIB_ENABLED_verify_TRUE | |
615 | gl_GNULIB_ENABLED_strtoull_FALSE | |
616 | gl_GNULIB_ENABLED_strtoull_TRUE | |
3e0be4ab GM |
617 | gl_GNULIB_ENABLED_strtoll_FALSE |
618 | gl_GNULIB_ENABLED_strtoll_TRUE | |
6d153f56 GM |
619 | gl_GNULIB_ENABLED_stat_FALSE |
620 | gl_GNULIB_ENABLED_stat_TRUE | |
3e0be4ab GM |
621 | gl_GNULIB_ENABLED_sigprocmask_FALSE |
622 | gl_GNULIB_ENABLED_sigprocmask_TRUE | |
6d153f56 GM |
623 | gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE |
624 | gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE | |
625 | gl_GNULIB_ENABLED_dosname_FALSE | |
626 | gl_GNULIB_ENABLED_dosname_TRUE | |
627 | LTLIBINTL | |
628 | LIBINTL | |
e275c824 PE |
629 | HAVE_UNISTD_H |
630 | NEXT_AS_FIRST_DIRECTIVE_UNISTD_H | |
631 | NEXT_UNISTD_H | |
1fd182f0 PE |
632 | PTHREAD_H_DEFINES_STRUCT_TIMESPEC |
633 | SYS_TIME_H_DEFINES_STRUCT_TIMESPEC | |
634 | TIME_H_DEFINES_STRUCT_TIMESPEC | |
635 | NEXT_AS_FIRST_DIRECTIVE_TIME_H | |
636 | NEXT_TIME_H | |
5fa4ac76 PE |
637 | NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H |
638 | NEXT_SYS_STAT_H | |
1f5d53eb PE |
639 | NEXT_AS_FIRST_DIRECTIVE_STDLIB_H |
640 | NEXT_STDLIB_H | |
6ad6792b GM |
641 | NEXT_AS_FIRST_DIRECTIVE_STDIO_H |
642 | NEXT_STDIO_H | |
643 | REPLACE_VSPRINTF | |
644 | REPLACE_VSNPRINTF | |
645 | REPLACE_VPRINTF | |
646 | REPLACE_VFPRINTF | |
647 | REPLACE_VDPRINTF | |
648 | REPLACE_VASPRINTF | |
649 | REPLACE_TMPFILE | |
650 | REPLACE_STDIO_WRITE_FUNCS | |
ca36e0ff | 651 | REPLACE_STDIO_READ_FUNCS |
6ad6792b GM |
652 | REPLACE_SPRINTF |
653 | REPLACE_SNPRINTF | |
654 | REPLACE_RENAMEAT | |
655 | REPLACE_RENAME | |
656 | REPLACE_REMOVE | |
657 | REPLACE_PRINTF | |
658 | REPLACE_POPEN | |
659 | REPLACE_PERROR | |
660 | REPLACE_OBSTACK_PRINTF | |
661 | REPLACE_GETLINE | |
662 | REPLACE_GETDELIM | |
663 | REPLACE_FTELLO | |
664 | REPLACE_FTELL | |
665 | REPLACE_FSEEKO | |
666 | REPLACE_FSEEK | |
667 | REPLACE_FREOPEN | |
668 | REPLACE_FPURGE | |
669 | REPLACE_FPRINTF | |
670 | REPLACE_FOPEN | |
671 | REPLACE_FFLUSH | |
672 | REPLACE_FCLOSE | |
673 | REPLACE_DPRINTF | |
674 | HAVE_VDPRINTF | |
675 | HAVE_VASPRINTF | |
676 | HAVE_RENAMEAT | |
677 | HAVE_FTELLO | |
678 | HAVE_FSEEKO | |
679 | HAVE_DPRINTF | |
680 | HAVE_DECL_VSNPRINTF | |
681 | HAVE_DECL_SNPRINTF | |
682 | HAVE_DECL_OBSTACK_PRINTF | |
683 | HAVE_DECL_GETLINE | |
684 | HAVE_DECL_GETDELIM | |
685 | HAVE_DECL_FTELLO | |
686 | HAVE_DECL_FSEEKO | |
687 | HAVE_DECL_FPURGE | |
688 | GNULIB_VSPRINTF_POSIX | |
689 | GNULIB_VSNPRINTF | |
690 | GNULIB_VPRINTF_POSIX | |
691 | GNULIB_VPRINTF | |
692 | GNULIB_VFPRINTF_POSIX | |
693 | GNULIB_VFPRINTF | |
694 | GNULIB_VDPRINTF | |
ca36e0ff GM |
695 | GNULIB_VSCANF |
696 | GNULIB_VFSCANF | |
6ad6792b GM |
697 | GNULIB_VASPRINTF |
698 | GNULIB_TMPFILE | |
699 | GNULIB_STDIO_H_SIGPIPE | |
ca36e0ff | 700 | GNULIB_STDIO_H_NONBLOCKING |
6ad6792b GM |
701 | GNULIB_SPRINTF_POSIX |
702 | GNULIB_SNPRINTF | |
ca36e0ff | 703 | GNULIB_SCANF |
6ad6792b GM |
704 | GNULIB_RENAMEAT |
705 | GNULIB_RENAME | |
706 | GNULIB_REMOVE | |
707 | GNULIB_PUTS | |
708 | GNULIB_PUTCHAR | |
709 | GNULIB_PUTC | |
710 | GNULIB_PRINTF_POSIX | |
711 | GNULIB_PRINTF | |
712 | GNULIB_POPEN | |
713 | GNULIB_PERROR | |
714 | GNULIB_OBSTACK_PRINTF_POSIX | |
715 | GNULIB_OBSTACK_PRINTF | |
ca36e0ff | 716 | GNULIB_GETS |
6ad6792b GM |
717 | GNULIB_GETLINE |
718 | GNULIB_GETDELIM | |
ca36e0ff GM |
719 | GNULIB_GETCHAR |
720 | GNULIB_GETC | |
6ad6792b GM |
721 | GNULIB_FWRITE |
722 | GNULIB_FTELLO | |
723 | GNULIB_FTELL | |
724 | GNULIB_FSEEKO | |
725 | GNULIB_FSEEK | |
ca36e0ff | 726 | GNULIB_FSCANF |
6ad6792b | 727 | GNULIB_FREOPEN |
ca36e0ff | 728 | GNULIB_FREAD |
6ad6792b GM |
729 | GNULIB_FPUTS |
730 | GNULIB_FPUTC | |
731 | GNULIB_FPURGE | |
732 | GNULIB_FPRINTF_POSIX | |
733 | GNULIB_FPRINTF | |
734 | GNULIB_FOPEN | |
ca36e0ff GM |
735 | GNULIB_FGETS |
736 | GNULIB_FGETC | |
6ad6792b GM |
737 | GNULIB_FFLUSH |
738 | GNULIB_FCLOSE | |
739 | GNULIB_DPRINTF | |
1fd182f0 PE |
740 | NEXT_AS_FIRST_DIRECTIVE_STDDEF_H |
741 | NEXT_STDDEF_H | |
6c051bab GM |
742 | GL_GENERATE_STDDEF_H_FALSE |
743 | GL_GENERATE_STDDEF_H_TRUE | |
1fd182f0 PE |
744 | STDDEF_H |
745 | HAVE_WCHAR_T | |
746 | REPLACE_NULL | |
16c3e636 | 747 | HAVE__BOOL |
6c051bab GM |
748 | GL_GENERATE_STDBOOL_H_FALSE |
749 | GL_GENERATE_STDBOOL_H_TRUE | |
16c3e636 | 750 | STDBOOL_H |
6d153f56 GM |
751 | GL_GENERATE_STDARG_H_FALSE |
752 | GL_GENERATE_STDARG_H_TRUE | |
753 | STDARG_H | |
754 | NEXT_AS_FIRST_DIRECTIVE_STDARG_H | |
755 | NEXT_STDARG_H | |
3e0be4ab GM |
756 | NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H |
757 | NEXT_SIGNAL_H | |
758 | REPLACE_PTHREAD_SIGMASK | |
759 | HAVE_SIGHANDLER_T | |
760 | HAVE_TYPE_VOLATILE_SIG_ATOMIC_T | |
761 | HAVE_STRUCT_SIGACTION_SA_SIGACTION | |
762 | HAVE_SIGACTION | |
763 | HAVE_SIGINFO_T | |
764 | HAVE_SIGSET_T | |
765 | HAVE_PTHREAD_SIGMASK | |
766 | HAVE_POSIX_SIGNALBLOCKING | |
767 | GNULIB_SIGACTION | |
768 | GNULIB_SIGPROCMASK | |
769 | GNULIB_SIGNAL_H_SIGPIPE | |
770 | GNULIB_PTHREAD_SIGMASK | |
771 | LIB_PTHREAD_SIGMASK | |
1fd182f0 PE |
772 | REPLACE_TIMEGM |
773 | REPLACE_NANOSLEEP | |
774 | REPLACE_MKTIME | |
775 | REPLACE_LOCALTIME_R | |
776 | HAVE_TIMEGM | |
777 | HAVE_STRPTIME | |
778 | HAVE_NANOSLEEP | |
779 | HAVE_DECL_LOCALTIME_R | |
780 | GNULIB_TIME_R | |
781 | GNULIB_TIMEGM | |
782 | GNULIB_STRPTIME | |
783 | GNULIB_NANOSLEEP | |
784 | GNULIB_MKTIME | |
ae0d7250 PE |
785 | REPLACE_UTIMENSAT |
786 | REPLACE_STAT | |
787 | REPLACE_MKNOD | |
788 | REPLACE_MKFIFO | |
789 | REPLACE_MKDIR | |
790 | REPLACE_LSTAT | |
791 | REPLACE_FUTIMENS | |
792 | REPLACE_FSTATAT | |
793 | REPLACE_FSTAT | |
794 | HAVE_UTIMENSAT | |
795 | HAVE_MKNODAT | |
796 | HAVE_MKNOD | |
797 | HAVE_MKFIFOAT | |
798 | HAVE_MKFIFO | |
799 | HAVE_MKDIRAT | |
800 | HAVE_LSTAT | |
801 | HAVE_LCHMOD | |
802 | HAVE_FUTIMENS | |
803 | HAVE_FSTATAT | |
804 | HAVE_FCHMODAT | |
805 | GNULIB_UTIMENSAT | |
806 | GNULIB_STAT | |
807 | GNULIB_MKNODAT | |
808 | GNULIB_MKNOD | |
809 | GNULIB_MKFIFOAT | |
810 | GNULIB_MKFIFO | |
811 | GNULIB_MKDIRAT | |
812 | GNULIB_LSTAT | |
813 | GNULIB_LCHMOD | |
814 | GNULIB_FUTIMENS | |
815 | GNULIB_FSTATAT | |
816 | GNULIB_FCHMODAT | |
4fda9c95 GM |
817 | NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H |
818 | NEXT_INTTYPES_H | |
819 | UINT64_MAX_EQ_ULONG_MAX | |
820 | UINT32_MAX_LT_UINTMAX_MAX | |
821 | PRIPTR_PREFIX | |
822 | PRI_MACROS_BROKEN | |
823 | INT64_MAX_EQ_LONG_MAX | |
824 | INT32_MAX_LT_INTMAX_MAX | |
825 | HAVE_DECL_STRTOUMAX | |
826 | HAVE_DECL_STRTOIMAX | |
827 | HAVE_DECL_IMAXDIV | |
828 | HAVE_DECL_IMAXABS | |
829 | GNULIB_STRTOUMAX | |
830 | GNULIB_STRTOIMAX | |
831 | GNULIB_IMAXDIV | |
832 | GNULIB_IMAXABS | |
833 | GL_GENERATE_STDINT_H_FALSE | |
834 | GL_GENERATE_STDINT_H_TRUE | |
835 | STDINT_H | |
836 | WINT_T_SUFFIX | |
837 | WCHAR_T_SUFFIX | |
838 | SIG_ATOMIC_T_SUFFIX | |
839 | SIZE_T_SUFFIX | |
840 | PTRDIFF_T_SUFFIX | |
841 | HAVE_SIGNED_WINT_T | |
842 | HAVE_SIGNED_WCHAR_T | |
843 | HAVE_SIGNED_SIG_ATOMIC_T | |
844 | BITSIZEOF_WINT_T | |
845 | BITSIZEOF_WCHAR_T | |
846 | BITSIZEOF_SIG_ATOMIC_T | |
847 | BITSIZEOF_SIZE_T | |
848 | BITSIZEOF_PTRDIFF_T | |
849 | APPLE_UNIVERSAL_BUILD | |
850 | HAVE_SYS_BITYPES_H | |
851 | HAVE_SYS_INTTYPES_H | |
852 | HAVE_STDINT_H | |
853 | NEXT_AS_FIRST_DIRECTIVE_STDINT_H | |
854 | NEXT_STDINT_H | |
855 | HAVE_SYS_TYPES_H | |
856 | HAVE_INTTYPES_H | |
857 | HAVE_WCHAR_H | |
858 | HAVE_UNSIGNED_LONG_LONG_INT | |
859 | HAVE_LONG_LONG_INT | |
e275c824 PE |
860 | GETOPT_H |
861 | HAVE_GETOPT_H | |
862 | NEXT_AS_FIRST_DIRECTIVE_GETOPT_H | |
863 | NEXT_GETOPT_H | |
864 | PRAGMA_COLUMNS | |
865 | PRAGMA_SYSTEM_HEADER | |
866 | INCLUDE_NEXT_AS_FIRST_DIRECTIVE | |
867 | INCLUDE_NEXT | |
7d2a1c5e GM |
868 | GETLOADAVG_LIBS |
869 | REPLACE_WCTOMB | |
870 | REPLACE_UNSETENV | |
871 | REPLACE_STRTOD | |
872 | REPLACE_SETENV | |
873 | REPLACE_REALPATH | |
874 | REPLACE_REALLOC | |
875 | REPLACE_PUTENV | |
876 | REPLACE_MKSTEMP | |
877 | REPLACE_MBTOWC | |
878 | REPLACE_MALLOC | |
879 | REPLACE_CANONICALIZE_FILE_NAME | |
880 | REPLACE_CALLOC | |
881 | HAVE_DECL_UNSETENV | |
882 | HAVE_UNLOCKPT | |
883 | HAVE_SYS_LOADAVG_H | |
884 | HAVE_STRUCT_RANDOM_DATA | |
885 | HAVE_STRTOULL | |
886 | HAVE_STRTOLL | |
887 | HAVE_STRTOD | |
888 | HAVE_DECL_SETENV | |
889 | HAVE_SETENV | |
890 | HAVE_RPMATCH | |
891 | HAVE_REALPATH | |
892 | HAVE_RANDOM_R | |
893 | HAVE_RANDOM_H | |
894 | HAVE_PTSNAME | |
895 | HAVE_MKSTEMPS | |
896 | HAVE_MKSTEMP | |
897 | HAVE_MKOSTEMPS | |
898 | HAVE_MKOSTEMP | |
899 | HAVE_MKDTEMP | |
900 | HAVE_GRANTPT | |
901 | HAVE_GETSUBOPT | |
902 | HAVE_DECL_GETLOADAVG | |
903 | HAVE_CANONICALIZE_FILE_NAME | |
904 | HAVE_ATOLL | |
905 | HAVE__EXIT | |
906 | GNULIB_WCTOMB | |
907 | GNULIB_UNSETENV | |
908 | GNULIB_UNLOCKPT | |
909 | GNULIB_SYSTEM_POSIX | |
910 | GNULIB_STRTOULL | |
911 | GNULIB_STRTOLL | |
912 | GNULIB_STRTOD | |
913 | GNULIB_SETENV | |
914 | GNULIB_RPMATCH | |
915 | GNULIB_REALPATH | |
916 | GNULIB_REALLOC_POSIX | |
917 | GNULIB_RANDOM_R | |
918 | GNULIB_PUTENV | |
919 | GNULIB_PTSNAME | |
920 | GNULIB_MKSTEMPS | |
921 | GNULIB_MKSTEMP | |
922 | GNULIB_MKOSTEMPS | |
923 | GNULIB_MKOSTEMP | |
924 | GNULIB_MKDTEMP | |
925 | GNULIB_MBTOWC | |
926 | GNULIB_MALLOC_POSIX | |
927 | GNULIB_GRANTPT | |
928 | GNULIB_GETSUBOPT | |
929 | GNULIB_GETLOADAVG | |
930 | GNULIB_CANONICALIZE_FILE_NAME | |
931 | GNULIB_CALLOC_POSIX | |
932 | GNULIB_ATOLL | |
933 | GNULIB__EXIT | |
e275c824 PE |
934 | UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS |
935 | UNISTD_H_HAVE_WINSOCK2_H | |
936 | REPLACE_WRITE | |
937 | REPLACE_USLEEP | |
938 | REPLACE_UNLINKAT | |
939 | REPLACE_UNLINK | |
940 | REPLACE_TTYNAME_R | |
941 | REPLACE_SYMLINK | |
942 | REPLACE_SLEEP | |
943 | REPLACE_RMDIR | |
944 | REPLACE_READLINK | |
ca36e0ff | 945 | REPLACE_READ |
e275c824 PE |
946 | REPLACE_PWRITE |
947 | REPLACE_PREAD | |
948 | REPLACE_LSEEK | |
949 | REPLACE_LINKAT | |
950 | REPLACE_LINK | |
951 | REPLACE_LCHOWN | |
952 | REPLACE_GETPAGESIZE | |
953 | REPLACE_GETGROUPS | |
954 | REPLACE_GETLOGIN_R | |
955 | REPLACE_GETDOMAINNAME | |
956 | REPLACE_GETCWD | |
957 | REPLACE_FCHOWNAT | |
958 | REPLACE_DUP2 | |
959 | REPLACE_DUP | |
960 | REPLACE_CLOSE | |
961 | REPLACE_CHOWN | |
962 | HAVE_SYS_PARAM_H | |
963 | HAVE_OS_H | |
964 | HAVE_DECL_TTYNAME_R | |
965 | HAVE_DECL_GETUSERSHELL | |
966 | HAVE_DECL_GETPAGESIZE | |
967 | HAVE_DECL_GETLOGIN_R | |
968 | HAVE_DECL_GETDOMAINNAME | |
969 | HAVE_DECL_FCHDIR | |
970 | HAVE_DECL_ENVIRON | |
971 | HAVE_USLEEP | |
972 | HAVE_UNLINKAT | |
973 | HAVE_SYMLINKAT | |
974 | HAVE_SYMLINK | |
975 | HAVE_SLEEP | |
976 | HAVE_READLINKAT | |
977 | HAVE_READLINK | |
978 | HAVE_PWRITE | |
979 | HAVE_PREAD | |
980 | HAVE_PIPE2 | |
981 | HAVE_PIPE | |
982 | HAVE_LINKAT | |
983 | HAVE_LINK | |
984 | HAVE_LCHOWN | |
da6c8463 | 985 | HAVE_GROUP_MEMBER |
e275c824 PE |
986 | HAVE_GETPAGESIZE |
987 | HAVE_GETLOGIN | |
988 | HAVE_GETHOSTNAME | |
989 | HAVE_GETGROUPS | |
990 | HAVE_GETDTABLESIZE | |
991 | HAVE_FTRUNCATE | |
992 | HAVE_FSYNC | |
993 | HAVE_FCHOWNAT | |
994 | HAVE_FCHDIR | |
995 | HAVE_FACCESSAT | |
996 | HAVE_EUIDACCESS | |
997 | HAVE_DUP3 | |
998 | HAVE_DUP2 | |
999 | HAVE_CHOWN | |
1000 | GNULIB_WRITE | |
1001 | GNULIB_USLEEP | |
1002 | GNULIB_UNLINKAT | |
1003 | GNULIB_UNLINK | |
1004 | GNULIB_UNISTD_H_SIGPIPE | |
ca36e0ff | 1005 | GNULIB_UNISTD_H_NONBLOCKING |
e275c824 PE |
1006 | GNULIB_UNISTD_H_GETOPT |
1007 | GNULIB_TTYNAME_R | |
1008 | GNULIB_SYMLINKAT | |
1009 | GNULIB_SYMLINK | |
1010 | GNULIB_SLEEP | |
1011 | GNULIB_RMDIR | |
1012 | GNULIB_READLINKAT | |
1013 | GNULIB_READLINK | |
ca36e0ff | 1014 | GNULIB_READ |
e275c824 PE |
1015 | GNULIB_PWRITE |
1016 | GNULIB_PREAD | |
1017 | GNULIB_PIPE2 | |
1018 | GNULIB_PIPE | |
1019 | GNULIB_LSEEK | |
1020 | GNULIB_LINKAT | |
1021 | GNULIB_LINK | |
1022 | GNULIB_LCHOWN | |
da6c8463 | 1023 | GNULIB_GROUP_MEMBER |
e275c824 PE |
1024 | GNULIB_GETUSERSHELL |
1025 | GNULIB_GETPAGESIZE | |
1026 | GNULIB_GETLOGIN_R | |
1027 | GNULIB_GETLOGIN | |
1028 | GNULIB_GETHOSTNAME | |
1029 | GNULIB_GETGROUPS | |
1030 | GNULIB_GETDTABLESIZE | |
1031 | GNULIB_GETDOMAINNAME | |
1032 | GNULIB_GETCWD | |
1033 | GNULIB_FTRUNCATE | |
1034 | GNULIB_FSYNC | |
1035 | GNULIB_FCHOWNAT | |
1036 | GNULIB_FCHDIR | |
1037 | GNULIB_FACCESSAT | |
1038 | GNULIB_EUIDACCESS | |
1039 | GNULIB_ENVIRON | |
1040 | GNULIB_DUP3 | |
1041 | GNULIB_DUP2 | |
1042 | GNULIB_CLOSE | |
1043 | GNULIB_CHOWN | |
4fc2b746 GM |
1044 | GL_GENERATE_ALLOCA_H_FALSE |
1045 | GL_GENERATE_ALLOCA_H_TRUE | |
1046 | ALLOCA_H | |
1047 | ALLOCA | |
743c80a7 PE |
1048 | GL_COND_LIBTOOL_FALSE |
1049 | GL_COND_LIBTOOL_TRUE | |
3e0be4ab GM |
1050 | POST_ALLOC_OBJ |
1051 | PRE_ALLOC_OBJ | |
1052 | CYGWIN_OBJ | |
1053 | RALLOC_OBJ | |
1054 | OLDXMENU_DEPS | |
1055 | LIBX_OTHER | |
1056 | LIBXMENU | |
1057 | OLDXMENU | |
1058 | OLDXMENU_TARGET | |
1059 | LIBXT_OTHER | |
1060 | TOOLKIT_LIBW | |
1061 | WIDGET_OBJ | |
1062 | XOBJ | |
1063 | XMENU_OBJ | |
1064 | FONT_OBJ | |
1065 | OTHER_FILES | |
1066 | GNU_OBJC_CFLAGS | |
1067 | ns_appsrc | |
1068 | ns_appresdir | |
1069 | ns_appbindir | |
1070 | ns_appdir | |
1071 | S_FILE | |
1072 | M_FILE | |
1073 | X_TOOLKIT_TYPE | |
1074 | C_SWITCH_X_SYSTEM | |
1075 | C_SWITCH_X_SITE | |
1076 | LD_SWITCH_X_SITE | |
1077 | gameuser | |
1078 | gamedir | |
1079 | bitmapdir | |
1080 | archlibdir | |
1081 | etcdir | |
1082 | x_default_search_path | |
1083 | lisppath | |
1084 | locallisppath | |
1085 | lispdir | |
1086 | srcdir | |
1087 | canonical | |
1088 | configuration | |
1089 | version | |
1090 | KRB4LIB | |
1091 | DESLIB | |
1092 | KRB5LIB | |
1093 | CRYPTOLIB | |
1094 | COM_ERRLIB | |
1095 | LIBRESOLV | |
1096 | LIBHESIOD | |
1097 | TERMCAP_OBJ | |
1098 | LIBS_TERMCAP | |
067d23c9 KY |
1099 | BLESSMAIL_TARGET |
1100 | LIBS_MAIL | |
1101 | liblockfile | |
067d23c9 KY |
1102 | LIBXML2_LIBS |
1103 | LIBXML2_CFLAGS | |
1104 | LIBXSM | |
1105 | LIBGPM | |
1106 | LIBGIF | |
1107 | LIBTIFF | |
1108 | LIBPNG | |
1109 | LIBJPEG | |
1110 | LIBXPM | |
067d23c9 KY |
1111 | M17N_FLT_LIBS |
1112 | M17N_FLT_CFLAGS | |
1113 | LIBOTF_LIBS | |
1114 | LIBOTF_CFLAGS | |
7834125e GM |
1115 | FREETYPE_LIBS |
1116 | FREETYPE_CFLAGS | |
067d23c9 KY |
1117 | XFT_LIBS |
1118 | XFT_CFLAGS | |
1119 | FONTCONFIG_LIBS | |
1120 | FONTCONFIG_CFLAGS | |
1121 | LIBXMU | |
1122 | LIBXTR6 | |
1123 | LIBGNUTLS_LIBS | |
1124 | LIBGNUTLS_CFLAGS | |
1125 | LIBSELINUX_LIBS | |
f527bd02 GM |
1126 | SETTINGS_LIBS |
1127 | SETTINGS_CFLAGS | |
067d23c9 KY |
1128 | GCONF_LIBS |
1129 | GCONF_CFLAGS | |
f527bd02 GM |
1130 | GSETTINGS_LIBS |
1131 | GSETTINGS_CFLAGS | |
067d23c9 KY |
1132 | DBUS_OBJ |
1133 | DBUS_LIBS | |
1134 | DBUS_CFLAGS | |
1135 | GTK_OBJ | |
1136 | GTK_LIBS | |
1137 | GTK_CFLAGS | |
1138 | IMAGEMAGICK_LIBS | |
1139 | IMAGEMAGICK_CFLAGS | |
1140 | RSVG_LIBS | |
1141 | RSVG_CFLAGS | |
1abfdc54 | 1142 | LIB_PTHREAD |
067d23c9 KY |
1143 | VMLIMIT_OBJ |
1144 | GMALLOC_OBJ | |
1145 | HAVE_XSERVER | |
1146 | LIB_STANDARD | |
00b3c7ac | 1147 | NS_OBJC_OBJ |
067d23c9 KY |
1148 | NS_OBJ |
1149 | TEMACS_LDFLAGS2 | |
1150 | LD_SWITCH_X_SITE_AUX_RPATH | |
1151 | LD_SWITCH_X_SITE_AUX | |
1152 | XMKMF | |
1153 | DEPFLAGS | |
1154 | MKDEPDIR | |
067d23c9 KY |
1155 | CFLAGS_SOUND |
1156 | ALSA_LIBS | |
1157 | ALSA_CFLAGS | |
1158 | PKG_CONFIG | |
1159 | LIBSOUND | |
130f1dac | 1160 | CRT_DIR |
067d23c9 KY |
1161 | START_FILES |
1162 | LIB_MATH | |
067d23c9 KY |
1163 | LIBS_SYSTEM |
1164 | C_SWITCH_SYSTEM | |
1165 | UNEXEC_OBJ | |
1166 | C_SWITCH_MACHINE | |
1167 | LD_SWITCH_SYSTEM | |
1168 | CANNOT_DUMP | |
96f129d5 | 1169 | HAVE_MAKEINFO |
067d23c9 KY |
1170 | GZIP_PROG |
1171 | INSTALL_INFO | |
067d23c9 KY |
1172 | C_WARNINGS_SWITCH |
1173 | EGREP | |
1174 | GREP | |
1175 | CPP | |
743c80a7 PE |
1176 | RANLIB |
1177 | am__fastdepCC_FALSE | |
1178 | am__fastdepCC_TRUE | |
1179 | CCDEPMODE | |
1180 | AMDEPBACKSLASH | |
1181 | AMDEP_FALSE | |
1182 | AMDEP_TRUE | |
1183 | am__quote | |
1184 | am__include | |
1185 | DEPDIR | |
067d23c9 KY |
1186 | OBJEXT |
1187 | EXEEXT | |
1188 | ac_ct_CC | |
1189 | CPPFLAGS | |
1190 | LDFLAGS | |
1191 | CFLAGS | |
1192 | CC | |
1193 | host_os | |
1194 | host_vendor | |
1195 | host_cpu | |
1196 | host | |
1197 | build_os | |
1198 | build_vendor | |
1199 | build_cpu | |
1200 | build | |
1201 | PROFILING_CFLAGS | |
1202 | MAINT | |
1203 | GZIP_INFO | |
743c80a7 PE |
1204 | am__untar |
1205 | am__tar | |
1206 | AMTAR | |
1207 | am__leading_dot | |
1208 | SET_MAKE | |
1209 | AWK | |
1210 | mkdir_p | |
1211 | MKDIR_P | |
1212 | INSTALL_STRIP_PROGRAM | |
1213 | STRIP | |
1214 | install_sh | |
1215 | MAKEINFO | |
1216 | AUTOHEADER | |
1217 | AUTOMAKE | |
1218 | AUTOCONF | |
1219 | ACLOCAL | |
1220 | VERSION | |
1221 | PACKAGE | |
1222 | CYGPATH_W | |
1223 | am__isrc | |
1224 | INSTALL_DATA | |
1225 | INSTALL_SCRIPT | |
1226 | INSTALL_PROGRAM | |
067d23c9 KY |
1227 | target_alias |
1228 | host_alias | |
1229 | build_alias | |
1230 | LIBS | |
1231 | ECHO_T | |
1232 | ECHO_N | |
1233 | ECHO_C | |
1234 | DEFS | |
1235 | mandir | |
1236 | localedir | |
1237 | libdir | |
1238 | psdir | |
1239 | pdfdir | |
1240 | dvidir | |
1241 | htmldir | |
1242 | infodir | |
1243 | docdir | |
1244 | oldincludedir | |
1245 | includedir | |
1246 | localstatedir | |
1247 | sharedstatedir | |
1248 | sysconfdir | |
1249 | datadir | |
1250 | datarootdir | |
1251 | libexecdir | |
1252 | sbindir | |
1253 | bindir | |
1254 | program_transform_name | |
1255 | prefix | |
1256 | exec_prefix | |
1257 | PACKAGE_URL | |
1258 | PACKAGE_BUGREPORT | |
1259 | PACKAGE_STRING | |
1260 | PACKAGE_VERSION | |
1261 | PACKAGE_TARNAME | |
1262 | PACKAGE_NAME | |
1263 | PATH_SEPARATOR | |
1264 | SHELL' | |
1265 | ac_subst_files='deps_frag | |
4d4b75e8 | 1266 | lisp_frag |
067d23c9 KY |
1267 | ns_frag' |
1268 | ac_user_opts=' | |
1269 | enable_option_checking | |
1270 | with_pop | |
1271 | with_kerberos | |
1272 | with_kerberos5 | |
1273 | with_hesiod | |
1274 | with_mmdf | |
1275 | with_mail_unlink | |
1276 | with_mailhost | |
1277 | with_sound | |
1278 | with_sync_input | |
1279 | with_x_toolkit | |
0442dc7f | 1280 | with_wide_int |
067d23c9 KY |
1281 | with_xpm |
1282 | with_jpeg | |
1283 | with_tiff | |
1284 | with_gif | |
1285 | with_png | |
1286 | with_rsvg | |
1287 | with_xml2 | |
1288 | with_imagemagick | |
1289 | with_xft | |
1290 | with_libotf | |
1291 | with_m17n_flt | |
1292 | with_toolkit_scroll_bars | |
1293 | with_xaw3d | |
1294 | with_xim | |
1295 | with_ns | |
1296 | with_gpm | |
1297 | with_dbus | |
1298 | with_gconf | |
f527bd02 | 1299 | with_gsettings |
067d23c9 KY |
1300 | with_selinux |
1301 | with_gnutls | |
1302 | with_makeinfo | |
1303 | with_compress_info | |
1304 | with_pkg_config_prog | |
1305 | with_crt_dir | |
4fc5868a | 1306 | with_gameuser |
067d23c9 KY |
1307 | with_gnustep_conf |
1308 | enable_ns_self_contained | |
1309 | enable_asserts | |
1310 | enable_maintainer_mode | |
1311 | enable_locallisppath | |
1312 | enable_checking | |
1313 | enable_use_lisp_union_type | |
1314 | enable_profiling | |
1315 | enable_autodepend | |
743c80a7 | 1316 | enable_dependency_tracking |
067d23c9 KY |
1317 | enable_largefile |
1318 | with_x | |
1319 | ' | |
1320 | ac_precious_vars='build_alias | |
1321 | host_alias | |
1322 | target_alias | |
1323 | CC | |
1324 | CFLAGS | |
1325 | LDFLAGS | |
1326 | LIBS | |
1327 | CPPFLAGS | |
1328 | CPP | |
1329 | XMKMF' | |
1330 | ||
1331 | ||
1332 | # Initialize some variables set by options. | |
1333 | ac_init_help= | |
1334 | ac_init_version=false | |
1335 | ac_unrecognized_opts= | |
1336 | ac_unrecognized_sep= | |
1337 | # The variables have the same names as the options, with | |
1338 | # dashes changed to underlines. | |
1339 | cache_file=/dev/null | |
1340 | exec_prefix=NONE | |
1341 | no_create= | |
1342 | no_recursion= | |
1343 | prefix=NONE | |
1344 | program_prefix=NONE | |
1345 | program_suffix=NONE | |
1346 | program_transform_name=s,x,x, | |
1347 | silent= | |
1348 | site= | |
1349 | srcdir= | |
1350 | verbose= | |
1351 | x_includes=NONE | |
1352 | x_libraries=NONE | |
1353 | ||
1354 | # Installation directory options. | |
1355 | # These are left unexpanded so users can "make install exec_prefix=/foo" | |
1356 | # and all the variables that are supposed to be based on exec_prefix | |
1357 | # by default will actually change. | |
1358 | # Use braces instead of parens because sh, perl, etc. also accept them. | |
1359 | # (The list follows the same order as the GNU Coding Standards.) | |
1360 | bindir='${exec_prefix}/bin' | |
1361 | sbindir='${exec_prefix}/sbin' | |
1362 | libexecdir='${exec_prefix}/libexec' | |
1363 | datarootdir='${prefix}/share' | |
1364 | datadir='${datarootdir}' | |
1365 | sysconfdir='${prefix}/etc' | |
1366 | sharedstatedir='${prefix}/com' | |
1367 | localstatedir='${prefix}/var' | |
1368 | includedir='${prefix}/include' | |
1369 | oldincludedir='/usr/include' | |
1370 | docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' | |
1371 | infodir='${datarootdir}/info' | |
1372 | htmldir='${docdir}' | |
1373 | dvidir='${docdir}' | |
1374 | pdfdir='${docdir}' | |
1375 | psdir='${docdir}' | |
1376 | libdir='${exec_prefix}/lib' | |
1377 | localedir='${datarootdir}/locale' | |
1378 | mandir='${datarootdir}/man' | |
1379 | ||
1380 | ac_prev= | |
1381 | ac_dashdash= | |
1382 | for ac_option | |
1383 | do | |
1384 | # If the previous option needs an argument, assign it. | |
1385 | if test -n "$ac_prev"; then | |
1386 | eval $ac_prev=\$ac_option | |
1387 | ac_prev= | |
1388 | continue | |
1389 | fi | |
1390 | ||
1391 | case $ac_option in | |
5f64f7bd GM |
1392 | *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; |
1393 | *) ac_optarg=yes ;; | |
067d23c9 KY |
1394 | esac |
1395 | ||
1396 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
1397 | ||
1398 | case $ac_dashdash$ac_option in | |
1399 | --) | |
1400 | ac_dashdash=yes ;; | |
1401 | ||
1402 | -bindir | --bindir | --bindi | --bind | --bin | --bi) | |
1403 | ac_prev=bindir ;; | |
1404 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
1405 | bindir=$ac_optarg ;; | |
1406 | ||
1407 | -build | --build | --buil | --bui | --bu) | |
1408 | ac_prev=build_alias ;; | |
1409 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) | |
1410 | build_alias=$ac_optarg ;; | |
1411 | ||
1412 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
1413 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
1414 | ac_prev=cache_file ;; | |
1415 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
1416 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
1417 | cache_file=$ac_optarg ;; | |
1418 | ||
1419 | --config-cache | -C) | |
1420 | cache_file=config.cache ;; | |
1421 | ||
1422 | -datadir | --datadir | --datadi | --datad) | |
1423 | ac_prev=datadir ;; | |
1424 | -datadir=* | --datadir=* | --datadi=* | --datad=*) | |
1425 | datadir=$ac_optarg ;; | |
1426 | ||
1427 | -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | |
1428 | | --dataroo | --dataro | --datar) | |
1429 | ac_prev=datarootdir ;; | |
1430 | -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | |
1431 | | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) | |
1432 | datarootdir=$ac_optarg ;; | |
1433 | ||
1434 | -disable-* | --disable-*) | |
1435 | ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` | |
1436 | # Reject names that are not valid shell variable names. | |
1437 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && | |
5f64f7bd | 1438 | as_fn_error "invalid feature name: $ac_useropt" |
067d23c9 KY |
1439 | ac_useropt_orig=$ac_useropt |
1440 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1441 | case $ac_user_opts in | |
1442 | *" | |
1443 | "enable_$ac_useropt" | |
1444 | "*) ;; | |
1445 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" | |
1446 | ac_unrecognized_sep=', ';; | |
1447 | esac | |
1448 | eval enable_$ac_useropt=no ;; | |
1449 | ||
1450 | -docdir | --docdir | --docdi | --doc | --do) | |
1451 | ac_prev=docdir ;; | |
1452 | -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) | |
1453 | docdir=$ac_optarg ;; | |
1454 | ||
1455 | -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) | |
1456 | ac_prev=dvidir ;; | |
1457 | -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) | |
1458 | dvidir=$ac_optarg ;; | |
1459 | ||
1460 | -enable-* | --enable-*) | |
1461 | ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` | |
1462 | # Reject names that are not valid shell variable names. | |
1463 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && | |
5f64f7bd | 1464 | as_fn_error "invalid feature name: $ac_useropt" |
067d23c9 KY |
1465 | ac_useropt_orig=$ac_useropt |
1466 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1467 | case $ac_user_opts in | |
1468 | *" | |
1469 | "enable_$ac_useropt" | |
1470 | "*) ;; | |
1471 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" | |
1472 | ac_unrecognized_sep=', ';; | |
1473 | esac | |
1474 | eval enable_$ac_useropt=\$ac_optarg ;; | |
1475 | ||
1476 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
1477 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
1478 | | --exec | --exe | --ex) | |
1479 | ac_prev=exec_prefix ;; | |
1480 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
1481 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
1482 | | --exec=* | --exe=* | --ex=*) | |
1483 | exec_prefix=$ac_optarg ;; | |
1484 | ||
1485 | -gas | --gas | --ga | --g) | |
1486 | # Obsolete; use --with-gas. | |
1487 | with_gas=yes ;; | |
1488 | ||
1489 | -help | --help | --hel | --he | -h) | |
1490 | ac_init_help=long ;; | |
1491 | -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) | |
1492 | ac_init_help=recursive ;; | |
1493 | -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) | |
1494 | ac_init_help=short ;; | |
1495 | ||
1496 | -host | --host | --hos | --ho) | |
1497 | ac_prev=host_alias ;; | |
1498 | -host=* | --host=* | --hos=* | --ho=*) | |
1499 | host_alias=$ac_optarg ;; | |
1500 | ||
1501 | -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) | |
1502 | ac_prev=htmldir ;; | |
1503 | -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | |
1504 | | --ht=*) | |
1505 | htmldir=$ac_optarg ;; | |
1506 | ||
1507 | -includedir | --includedir | --includedi | --included | --include \ | |
1508 | | --includ | --inclu | --incl | --inc) | |
1509 | ac_prev=includedir ;; | |
1510 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
1511 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
1512 | includedir=$ac_optarg ;; | |
1513 | ||
1514 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
1515 | ac_prev=infodir ;; | |
1516 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
1517 | infodir=$ac_optarg ;; | |
1518 | ||
1519 | -libdir | --libdir | --libdi | --libd) | |
1520 | ac_prev=libdir ;; | |
1521 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
1522 | libdir=$ac_optarg ;; | |
1523 | ||
1524 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
1525 | | --libexe | --libex | --libe) | |
1526 | ac_prev=libexecdir ;; | |
1527 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
1528 | | --libexe=* | --libex=* | --libe=*) | |
1529 | libexecdir=$ac_optarg ;; | |
1530 | ||
1531 | -localedir | --localedir | --localedi | --localed | --locale) | |
1532 | ac_prev=localedir ;; | |
1533 | -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) | |
1534 | localedir=$ac_optarg ;; | |
1535 | ||
1536 | -localstatedir | --localstatedir | --localstatedi | --localstated \ | |
1537 | | --localstate | --localstat | --localsta | --localst | --locals) | |
1538 | ac_prev=localstatedir ;; | |
1539 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
1540 | | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) | |
1541 | localstatedir=$ac_optarg ;; | |
1542 | ||
1543 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
1544 | ac_prev=mandir ;; | |
1545 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
1546 | mandir=$ac_optarg ;; | |
1547 | ||
1548 | -nfp | --nfp | --nf) | |
1549 | # Obsolete; use --without-fp. | |
1550 | with_fp=no ;; | |
1551 | ||
1552 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
1553 | | --no-cr | --no-c | -n) | |
1554 | no_create=yes ;; | |
1555 | ||
1556 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
1557 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
1558 | no_recursion=yes ;; | |
1559 | ||
1560 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | |
1561 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
1562 | | --oldin | --oldi | --old | --ol | --o) | |
1563 | ac_prev=oldincludedir ;; | |
1564 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
1565 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
1566 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
1567 | oldincludedir=$ac_optarg ;; | |
1568 | ||
1569 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
1570 | ac_prev=prefix ;; | |
1571 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
1572 | prefix=$ac_optarg ;; | |
1573 | ||
1574 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
1575 | | --program-pre | --program-pr | --program-p) | |
1576 | ac_prev=program_prefix ;; | |
1577 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
1578 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
1579 | program_prefix=$ac_optarg ;; | |
1580 | ||
1581 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
1582 | | --program-suf | --program-su | --program-s) | |
1583 | ac_prev=program_suffix ;; | |
1584 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
1585 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
1586 | program_suffix=$ac_optarg ;; | |
1587 | ||
1588 | -program-transform-name | --program-transform-name \ | |
1589 | | --program-transform-nam | --program-transform-na \ | |
1590 | | --program-transform-n | --program-transform- \ | |
1591 | | --program-transform | --program-transfor \ | |
1592 | | --program-transfo | --program-transf \ | |
1593 | | --program-trans | --program-tran \ | |
1594 | | --progr-tra | --program-tr | --program-t) | |
1595 | ac_prev=program_transform_name ;; | |
1596 | -program-transform-name=* | --program-transform-name=* \ | |
1597 | | --program-transform-nam=* | --program-transform-na=* \ | |
1598 | | --program-transform-n=* | --program-transform-=* \ | |
1599 | | --program-transform=* | --program-transfor=* \ | |
1600 | | --program-transfo=* | --program-transf=* \ | |
1601 | | --program-trans=* | --program-tran=* \ | |
1602 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
1603 | program_transform_name=$ac_optarg ;; | |
1604 | ||
1605 | -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) | |
1606 | ac_prev=pdfdir ;; | |
1607 | -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) | |
1608 | pdfdir=$ac_optarg ;; | |
1609 | ||
1610 | -psdir | --psdir | --psdi | --psd | --ps) | |
1611 | ac_prev=psdir ;; | |
1612 | -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) | |
1613 | psdir=$ac_optarg ;; | |
1614 | ||
1615 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
1616 | | -silent | --silent | --silen | --sile | --sil) | |
1617 | silent=yes ;; | |
1618 | ||
1619 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | |
1620 | ac_prev=sbindir ;; | |
1621 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
1622 | | --sbi=* | --sb=*) | |
1623 | sbindir=$ac_optarg ;; | |
1624 | ||
1625 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
1626 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
1627 | | --sharedst | --shareds | --shared | --share | --shar \ | |
1628 | | --sha | --sh) | |
1629 | ac_prev=sharedstatedir ;; | |
1630 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
1631 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
1632 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
1633 | | --sha=* | --sh=*) | |
1634 | sharedstatedir=$ac_optarg ;; | |
1635 | ||
1636 | -site | --site | --sit) | |
1637 | ac_prev=site ;; | |
1638 | -site=* | --site=* | --sit=*) | |
1639 | site=$ac_optarg ;; | |
1640 | ||
1641 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
1642 | ac_prev=srcdir ;; | |
1643 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
1644 | srcdir=$ac_optarg ;; | |
1645 | ||
1646 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | |
1647 | | --syscon | --sysco | --sysc | --sys | --sy) | |
1648 | ac_prev=sysconfdir ;; | |
1649 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
1650 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
1651 | sysconfdir=$ac_optarg ;; | |
1652 | ||
1653 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
1654 | ac_prev=target_alias ;; | |
1655 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) | |
1656 | target_alias=$ac_optarg ;; | |
1657 | ||
1658 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
1659 | verbose=yes ;; | |
1660 | ||
1661 | -version | --version | --versio | --versi | --vers | -V) | |
1662 | ac_init_version=: ;; | |
1663 | ||
1664 | -with-* | --with-*) | |
1665 | ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` | |
1666 | # Reject names that are not valid shell variable names. | |
1667 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && | |
5f64f7bd | 1668 | as_fn_error "invalid package name: $ac_useropt" |
067d23c9 KY |
1669 | ac_useropt_orig=$ac_useropt |
1670 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1671 | case $ac_user_opts in | |
1672 | *" | |
1673 | "with_$ac_useropt" | |
1674 | "*) ;; | |
1675 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" | |
1676 | ac_unrecognized_sep=', ';; | |
1677 | esac | |
1678 | eval with_$ac_useropt=\$ac_optarg ;; | |
1679 | ||
1680 | -without-* | --without-*) | |
1681 | ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` | |
1682 | # Reject names that are not valid shell variable names. | |
1683 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && | |
5f64f7bd | 1684 | as_fn_error "invalid package name: $ac_useropt" |
067d23c9 KY |
1685 | ac_useropt_orig=$ac_useropt |
1686 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1687 | case $ac_user_opts in | |
1688 | *" | |
1689 | "with_$ac_useropt" | |
1690 | "*) ;; | |
1691 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" | |
1692 | ac_unrecognized_sep=', ';; | |
1693 | esac | |
1694 | eval with_$ac_useropt=no ;; | |
1695 | ||
1696 | --x) | |
1697 | # Obsolete; use --with-x. | |
1698 | with_x=yes ;; | |
1699 | ||
1700 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
1701 | | --x-incl | --x-inc | --x-in | --x-i) | |
1702 | ac_prev=x_includes ;; | |
1703 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
1704 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
1705 | x_includes=$ac_optarg ;; | |
1706 | ||
1707 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
1708 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
1709 | ac_prev=x_libraries ;; | |
1710 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
1711 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
1712 | x_libraries=$ac_optarg ;; | |
1713 | ||
5f64f7bd GM |
1714 | -*) as_fn_error "unrecognized option: \`$ac_option' |
1715 | Try \`$0 --help' for more information." | |
067d23c9 KY |
1716 | ;; |
1717 | ||
1718 | *=*) | |
1719 | ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` | |
1720 | # Reject names that are not valid shell variable names. | |
1721 | case $ac_envvar in #( | |
1722 | '' | [0-9]* | *[!_$as_cr_alnum]* ) | |
5f64f7bd | 1723 | as_fn_error "invalid variable name: \`$ac_envvar'" ;; |
067d23c9 KY |
1724 | esac |
1725 | eval $ac_envvar=\$ac_optarg | |
1726 | export $ac_envvar ;; | |
1727 | ||
1728 | *) | |
1729 | # FIXME: should be removed in autoconf 3.0. | |
1730 | $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 | |
1731 | expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && | |
1732 | $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 | |
5f64f7bd | 1733 | : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} |
067d23c9 KY |
1734 | ;; |
1735 | ||
1736 | esac | |
1737 | done | |
1738 | ||
1739 | if test -n "$ac_prev"; then | |
1740 | ac_option=--`echo $ac_prev | sed 's/_/-/g'` | |
5f64f7bd | 1741 | as_fn_error "missing argument to $ac_option" |
067d23c9 KY |
1742 | fi |
1743 | ||
1744 | if test -n "$ac_unrecognized_opts"; then | |
1745 | case $enable_option_checking in | |
1746 | no) ;; | |
5f64f7bd | 1747 | fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; |
067d23c9 KY |
1748 | *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; |
1749 | esac | |
1750 | fi | |
1751 | ||
1752 | # Check all directory arguments for consistency. | |
1753 | for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ | |
1754 | datadir sysconfdir sharedstatedir localstatedir includedir \ | |
1755 | oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ | |
1756 | libdir localedir mandir | |
1757 | do | |
1758 | eval ac_val=\$$ac_var | |
1759 | # Remove trailing slashes. | |
1760 | case $ac_val in | |
1761 | */ ) | |
1762 | ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` | |
1763 | eval $ac_var=\$ac_val;; | |
1764 | esac | |
1765 | # Be sure to have absolute directory names. | |
1766 | case $ac_val in | |
1767 | [\\/$]* | ?:[\\/]* ) continue;; | |
1768 | NONE | '' ) case $ac_var in *prefix ) continue;; esac;; | |
1769 | esac | |
5f64f7bd | 1770 | as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" |
067d23c9 KY |
1771 | done |
1772 | ||
1773 | # There might be people who depend on the old broken behavior: `$host' | |
1774 | # used to hold the argument of --host etc. | |
1775 | # FIXME: To remove some day. | |
1776 | build=$build_alias | |
1777 | host=$host_alias | |
1778 | target=$target_alias | |
1779 | ||
1780 | # FIXME: To remove some day. | |
1781 | if test "x$host_alias" != x; then | |
1782 | if test "x$build_alias" = x; then | |
1783 | cross_compiling=maybe | |
5f64f7bd GM |
1784 | $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. |
1785 | If a cross compiler is detected then cross compile mode will be used." >&2 | |
067d23c9 KY |
1786 | elif test "x$build_alias" != "x$host_alias"; then |
1787 | cross_compiling=yes | |
1788 | fi | |
1789 | fi | |
1790 | ||
1791 | ac_tool_prefix= | |
1792 | test -n "$host_alias" && ac_tool_prefix=$host_alias- | |
1793 | ||
1794 | test "$silent" = yes && exec 6>/dev/null | |
1795 | ||
1796 | ||
1797 | ac_pwd=`pwd` && test -n "$ac_pwd" && | |
1798 | ac_ls_di=`ls -di .` && | |
1799 | ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || | |
5f64f7bd | 1800 | as_fn_error "working directory cannot be determined" |
067d23c9 | 1801 | test "X$ac_ls_di" = "X$ac_pwd_ls_di" || |
5f64f7bd | 1802 | as_fn_error "pwd does not report name of working directory" |
067d23c9 KY |
1803 | |
1804 | ||
1805 | # Find the source files, if location was not specified. | |
1806 | if test -z "$srcdir"; then | |
1807 | ac_srcdir_defaulted=yes | |
1808 | # Try the directory containing this script, then the parent directory. | |
1809 | ac_confdir=`$as_dirname -- "$as_myself" || | |
1810 | $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
1811 | X"$as_myself" : 'X\(//\)[^/]' \| \ | |
1812 | X"$as_myself" : 'X\(//\)$' \| \ | |
1813 | X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || | |
1814 | $as_echo X"$as_myself" | | |
1815 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
1816 | s//\1/ | |
1817 | q | |
1818 | } | |
1819 | /^X\(\/\/\)[^/].*/{ | |
1820 | s//\1/ | |
1821 | q | |
1822 | } | |
1823 | /^X\(\/\/\)$/{ | |
1824 | s//\1/ | |
1825 | q | |
1826 | } | |
1827 | /^X\(\/\).*/{ | |
1828 | s//\1/ | |
1829 | q | |
1830 | } | |
1831 | s/.*/./; q'` | |
1832 | srcdir=$ac_confdir | |
1833 | if test ! -r "$srcdir/$ac_unique_file"; then | |
1834 | srcdir=.. | |
1835 | fi | |
1836 | else | |
1837 | ac_srcdir_defaulted=no | |
1838 | fi | |
1839 | if test ! -r "$srcdir/$ac_unique_file"; then | |
1840 | test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." | |
5f64f7bd | 1841 | as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" |
067d23c9 KY |
1842 | fi |
1843 | ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" | |
1844 | ac_abs_confdir=`( | |
5f64f7bd | 1845 | cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" |
067d23c9 KY |
1846 | pwd)` |
1847 | # When building in place, set srcdir=. | |
1848 | if test "$ac_abs_confdir" = "$ac_pwd"; then | |
1849 | srcdir=. | |
1850 | fi | |
1851 | # Remove unnecessary trailing slashes from srcdir. | |
1852 | # Double slashes in file names in object file debugging info | |
1853 | # mess up M-x gdb in Emacs. | |
1854 | case $srcdir in | |
1855 | */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; | |
1856 | esac | |
1857 | for ac_var in $ac_precious_vars; do | |
1858 | eval ac_env_${ac_var}_set=\${${ac_var}+set} | |
1859 | eval ac_env_${ac_var}_value=\$${ac_var} | |
1860 | eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} | |
1861 | eval ac_cv_env_${ac_var}_value=\$${ac_var} | |
1862 | done | |
1863 | ||
1864 | # | |
1865 | # Report the --help message. | |
1866 | # | |
1867 | if test "$ac_init_help" = "long"; then | |
1868 | # Omit some internal or obsolete options to make the list less imposing. | |
1869 | # This message is too long to be a string in the A/UX 3.1 sh. | |
1870 | cat <<_ACEOF | |
1871 | \`configure' configures emacs 24.0.50 to adapt to many kinds of systems. | |
1872 | ||
1873 | Usage: $0 [OPTION]... [VAR=VALUE]... | |
1874 | ||
1875 | To assign environment variables (e.g., CC, CFLAGS...), specify them as | |
1876 | VAR=VALUE. See below for descriptions of some of the useful variables. | |
1877 | ||
1878 | Defaults for the options are specified in brackets. | |
1879 | ||
1880 | Configuration: | |
1881 | -h, --help display this help and exit | |
1882 | --help=short display options specific to this package | |
1883 | --help=recursive display the short help of all the included packages | |
1884 | -V, --version display version information and exit | |
5f64f7bd | 1885 | -q, --quiet, --silent do not print \`checking...' messages |
067d23c9 KY |
1886 | --cache-file=FILE cache test results in FILE [disabled] |
1887 | -C, --config-cache alias for \`--cache-file=config.cache' | |
1888 | -n, --no-create do not create output files | |
1889 | --srcdir=DIR find the sources in DIR [configure dir or \`..'] | |
1890 | ||
1891 | Installation directories: | |
1892 | --prefix=PREFIX install architecture-independent files in PREFIX | |
1893 | [$ac_default_prefix] | |
1894 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX | |
1895 | [PREFIX] | |
1896 | ||
1897 | By default, \`make install' will install all the files in | |
1898 | \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify | |
1899 | an installation prefix other than \`$ac_default_prefix' using \`--prefix', | |
1900 | for instance \`--prefix=\$HOME'. | |
1901 | ||
1902 | For better control, use the options below. | |
1903 | ||
1904 | Fine tuning of the installation directories: | |
1905 | --bindir=DIR user executables [EPREFIX/bin] | |
1906 | --sbindir=DIR system admin executables [EPREFIX/sbin] | |
1907 | --libexecdir=DIR program executables [EPREFIX/libexec] | |
1908 | --sysconfdir=DIR read-only single-machine data [PREFIX/etc] | |
1909 | --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] | |
1910 | --localstatedir=DIR modifiable single-machine data [PREFIX/var] | |
1911 | --libdir=DIR object code libraries [EPREFIX/lib] | |
1912 | --includedir=DIR C header files [PREFIX/include] | |
1913 | --oldincludedir=DIR C header files for non-gcc [/usr/include] | |
1914 | --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] | |
1915 | --datadir=DIR read-only architecture-independent data [DATAROOTDIR] | |
1916 | --infodir=DIR info documentation [DATAROOTDIR/info] | |
1917 | --localedir=DIR locale-dependent data [DATAROOTDIR/locale] | |
1918 | --mandir=DIR man documentation [DATAROOTDIR/man] | |
1919 | --docdir=DIR documentation root [DATAROOTDIR/doc/emacs] | |
1920 | --htmldir=DIR html documentation [DOCDIR] | |
1921 | --dvidir=DIR dvi documentation [DOCDIR] | |
1922 | --pdfdir=DIR pdf documentation [DOCDIR] | |
1923 | --psdir=DIR ps documentation [DOCDIR] | |
1924 | _ACEOF | |
1925 | ||
1926 | cat <<\_ACEOF | |
1927 | ||
1928 | Program names: | |
1929 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
1930 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
1931 | --program-transform-name=PROGRAM run sed PROGRAM on installed program names | |
1932 | ||
1933 | X features: | |
1934 | --x-includes=DIR X include files are in DIR | |
1935 | --x-libraries=DIR X library files are in DIR | |
1936 | ||
1937 | System types: | |
1938 | --build=BUILD configure for building on BUILD [guessed] | |
1939 | --host=HOST cross-compile to build programs to run on HOST [BUILD] | |
1940 | _ACEOF | |
1941 | fi | |
1942 | ||
1943 | if test -n "$ac_init_help"; then | |
1944 | case $ac_init_help in | |
1945 | short | recursive ) echo "Configuration of emacs 24.0.50:";; | |
1946 | esac | |
1947 | cat <<\_ACEOF | |
1948 | ||
1949 | Optional Features: | |
1950 | --disable-option-checking ignore unrecognized --enable/--with options | |
1951 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) | |
1952 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
1953 | --disable-ns-self-contained | |
1954 | disable self contained build under NeXTstep | |
1955 | --enable-asserts compile code with asserts enabled | |
2b7f7d99 GM |
1956 | --disable-maintainer-mode |
1957 | disable make rules and dependencies not useful (and | |
067d23c9 KY |
1958 | sometimes confusing) to the casual installer |
1959 | --enable-locallisppath=PATH | |
1960 | directories Emacs should search for lisp files | |
1961 | specific to this site | |
1962 | --enable-checking[=LIST] | |
1963 | enable expensive run-time checks. With LIST, enable | |
1964 | only specific categories of checks. Categories are: | |
1965 | all,yes,no. Flags are: stringbytes, stringoverrun, | |
1966 | stringfreelist, xmallocoverrun, conslist | |
1967 | --enable-use-lisp-union-type | |
1968 | use a union for the Lisp_Object data type. This is | |
1969 | only useful for development for catching certain | |
1970 | types of bugs. | |
1971 | --enable-profiling build emacs with profiling support. This might not | |
1972 | work on all platforms | |
1973 | --enable-autodepend automatically generate dependencies to .h-files. | |
1974 | Requires GNU Make and Gcc. Enabled if GNU Make and | |
1975 | Gcc is found | |
743c80a7 PE |
1976 | --disable-dependency-tracking speeds up one-time build |
1977 | --enable-dependency-tracking do not reject slow dependency extractors | |
067d23c9 KY |
1978 | --disable-largefile omit support for large files |
1979 | ||
1980 | Optional Packages: | |
1981 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
1982 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
1983 | --without-pop don't support POP mail retrieval with movemail | |
1984 | --with-kerberos support Kerberos-authenticated POP | |
1985 | --with-kerberos5 support Kerberos version 5 authenticated POP | |
1986 | --with-hesiod support Hesiod to get the POP server host | |
1987 | --with-mmdf support MMDF mailboxes | |
1988 | --with-mail-unlink unlink, rather than empty, mail spool after reading | |
1989 | --with-mailhost=HOSTNAME | |
1990 | string giving default POP mail host | |
1991 | --without-sound don't compile with sound support | |
1992 | --without-sync-input process async input synchronously | |
1993 | --with-x-toolkit=KIT use an X toolkit (KIT one of: yes or gtk, gtk3, | |
1994 | lucid or athena, motif, no) | |
0442dc7f | 1995 | --with-wide-int prefer wide Emacs integers (typically 62-bit) |
067d23c9 KY |
1996 | --without-xpm don't compile with XPM image support |
1997 | --without-jpeg don't compile with JPEG image support | |
1998 | --without-tiff don't compile with TIFF image support | |
1999 | --without-gif don't compile with GIF image support | |
2000 | --without-png don't compile with PNG image support | |
2001 | --without-rsvg don't compile with SVG image support | |
2002 | --without-xml2 don't compile with XML parsing support | |
2003 | --without-imagemagick don't compile with ImageMagick image support | |
2004 | --without-xft don't use XFT for anti aliased fonts | |
2005 | --without-libotf don't use libotf for OpenType font support | |
2006 | --without-m17n-flt don't use m17n-flt for text shaping | |
2007 | --without-toolkit-scroll-bars | |
2008 | don't use Motif or Xaw3d scroll bars | |
2009 | --without-xaw3d don't use Xaw3d | |
2010 | --without-xim don't use X11 XIM | |
7834125e | 2011 | --with-ns use NeXTstep (Cocoa or GNUstep) windowing system |
067d23c9 KY |
2012 | --without-gpm don't use -lgpm for mouse support on a GNU/Linux |
2013 | console | |
2014 | --without-dbus don't compile with D-Bus support | |
2015 | --without-gconf don't compile with GConf support | |
f527bd02 | 2016 | --without-gsettings don't compile with GSettings support |
067d23c9 KY |
2017 | --without-selinux don't compile with SELinux support |
2018 | --without-gnutls don't use -lgnutls for SSL/TLS support | |
2019 | --without-makeinfo don't require makeinfo for building manuals | |
2020 | --without-compress-info don't compress the installed Info pages | |
2021 | --with-pkg-config-prog=PATH | |
2022 | path to pkg-config for finding GTK and librsvg | |
2023 | --with-crt-dir=DIR directory containing crtn.o etc. The default is | |
2024 | /usr/lib, or /usr/lib64 on some platforms. | |
4fc5868a | 2025 | --with-gameuser=USER user for shared game score files |
067d23c9 KY |
2026 | --with-gnustep-conf=PATH |
2027 | path to GNUstep.conf; default $GNUSTEP_CONFIG_FILE, | |
2028 | or /etc/GNUstep/GNUstep.conf | |
2029 | --with-x use the X Window System | |
2030 | ||
2031 | Some influential environment variables: | |
2032 | CC C compiler command | |
2033 | CFLAGS C compiler flags | |
2034 | LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a | |
2035 | nonstandard directory <lib dir> | |
2036 | LIBS libraries to pass to the linker, e.g. -l<library> | |
2037 | CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if | |
2038 | you have headers in a nonstandard directory <include dir> | |
2039 | CPP C preprocessor | |
2040 | XMKMF Path to xmkmf, Makefile generator for X Window System | |
2041 | ||
2042 | Use these variables to override the choices made by `configure' or to help | |
2043 | it to find libraries and programs with nonstandard names/locations. | |
2044 | ||
2045 | Report bugs to the package provider. | |
2046 | _ACEOF | |
2047 | ac_status=$? | |
2048 | fi | |
2049 | ||
2050 | if test "$ac_init_help" = "recursive"; then | |
2051 | # If there are subdirs, report their specific --help. | |
2052 | for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue | |
2053 | test -d "$ac_dir" || | |
2054 | { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || | |
2055 | continue | |
2056 | ac_builddir=. | |
2057 | ||
2058 | case "$ac_dir" in | |
2059 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
2060 | *) | |
2061 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
2062 | # A ".." for each directory in $ac_dir_suffix. | |
2063 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
2064 | case $ac_top_builddir_sub in | |
2065 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
2066 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
2067 | esac ;; | |
2068 | esac | |
2069 | ac_abs_top_builddir=$ac_pwd | |
2070 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
2071 | # for backward compatibility: | |
2072 | ac_top_builddir=$ac_top_build_prefix | |
2073 | ||
2074 | case $srcdir in | |
2075 | .) # We are building in place. | |
2076 | ac_srcdir=. | |
2077 | ac_top_srcdir=$ac_top_builddir_sub | |
2078 | ac_abs_top_srcdir=$ac_pwd ;; | |
2079 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
2080 | ac_srcdir=$srcdir$ac_dir_suffix; | |
2081 | ac_top_srcdir=$srcdir | |
2082 | ac_abs_top_srcdir=$srcdir ;; | |
2083 | *) # Relative name. | |
2084 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
2085 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
2086 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
2087 | esac | |
2088 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix | |
2089 | ||
2090 | cd "$ac_dir" || { ac_status=$?; continue; } | |
2091 | # Check for guested configure. | |
2092 | if test -f "$ac_srcdir/configure.gnu"; then | |
2093 | echo && | |
2094 | $SHELL "$ac_srcdir/configure.gnu" --help=recursive | |
2095 | elif test -f "$ac_srcdir/configure"; then | |
2096 | echo && | |
2097 | $SHELL "$ac_srcdir/configure" --help=recursive | |
2098 | else | |
2099 | $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 | |
2100 | fi || ac_status=$? | |
2101 | cd "$ac_pwd" || { ac_status=$?; break; } | |
2102 | done | |
2103 | fi | |
2104 | ||
2105 | test -n "$ac_init_help" && exit $ac_status | |
2106 | if $ac_init_version; then | |
2107 | cat <<\_ACEOF | |
2108 | emacs configure 24.0.50 | |
5f64f7bd | 2109 | generated by GNU Autoconf 2.65 |
067d23c9 | 2110 | |
5f64f7bd | 2111 | Copyright (C) 2009 Free Software Foundation, Inc. |
067d23c9 KY |
2112 | This configure script is free software; the Free Software Foundation |
2113 | gives unlimited permission to copy, distribute and modify it. | |
2114 | _ACEOF | |
2115 | exit | |
2116 | fi | |
2117 | ||
2118 | ## ------------------------ ## | |
2119 | ## Autoconf initialization. ## | |
2120 | ## ------------------------ ## | |
2121 | ||
2122 | # ac_fn_c_try_compile LINENO | |
2123 | # -------------------------- | |
2124 | # Try to compile conftest.$ac_ext, and return whether this succeeded. | |
2125 | ac_fn_c_try_compile () | |
2126 | { | |
2127 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2128 | rm -f conftest.$ac_objext | |
2129 | if { { ac_try="$ac_compile" | |
2130 | case "(($ac_try" in | |
2131 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2132 | *) ac_try_echo=$ac_try;; | |
2133 | esac | |
2134 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
2135 | $as_echo "$ac_try_echo"; } >&5 | |
2136 | (eval "$ac_compile") 2>conftest.err | |
2137 | ac_status=$? | |
2138 | if test -s conftest.err; then | |
2139 | grep -v '^ *+' conftest.err >conftest.er1 | |
2140 | cat conftest.er1 >&5 | |
2141 | mv -f conftest.er1 conftest.err | |
2142 | fi | |
2143 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
2144 | test $ac_status = 0; } && { | |
2145 | test -z "$ac_c_werror_flag" || | |
2146 | test ! -s conftest.err | |
2147 | } && test -s conftest.$ac_objext; then : | |
2148 | ac_retval=0 | |
2149 | else | |
2150 | $as_echo "$as_me: failed program was:" >&5 | |
2151 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2152 | ||
2153 | ac_retval=1 | |
2154 | fi | |
5f64f7bd | 2155 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} |
067d23c9 KY |
2156 | as_fn_set_status $ac_retval |
2157 | ||
2158 | } # ac_fn_c_try_compile | |
2159 | ||
067d23c9 KY |
2160 | # ac_fn_c_try_cpp LINENO |
2161 | # ---------------------- | |
2162 | # Try to preprocess conftest.$ac_ext, and return whether this succeeded. | |
2163 | ac_fn_c_try_cpp () | |
2164 | { | |
2165 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2166 | if { { ac_try="$ac_cpp conftest.$ac_ext" | |
2167 | case "(($ac_try" in | |
2168 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2169 | *) ac_try_echo=$ac_try;; | |
2170 | esac | |
2171 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
2172 | $as_echo "$ac_try_echo"; } >&5 | |
2173 | (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err | |
2174 | ac_status=$? | |
2175 | if test -s conftest.err; then | |
2176 | grep -v '^ *+' conftest.err >conftest.er1 | |
2177 | cat conftest.er1 >&5 | |
2178 | mv -f conftest.er1 conftest.err | |
2179 | fi | |
2180 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
5f64f7bd | 2181 | test $ac_status = 0; } >/dev/null && { |
067d23c9 KY |
2182 | test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || |
2183 | test ! -s conftest.err | |
2184 | }; then : | |
2185 | ac_retval=0 | |
2186 | else | |
2187 | $as_echo "$as_me: failed program was:" >&5 | |
2188 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2189 | ||
2190 | ac_retval=1 | |
2191 | fi | |
5f64f7bd | 2192 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} |
067d23c9 KY |
2193 | as_fn_set_status $ac_retval |
2194 | ||
2195 | } # ac_fn_c_try_cpp | |
2196 | ||
2197 | # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES | |
2198 | # ------------------------------------------------------- | |
2199 | # Tests whether HEADER exists, giving a warning if it cannot be compiled using | |
2200 | # the include files in INCLUDES and setting the cache variable VAR | |
2201 | # accordingly. | |
2202 | ac_fn_c_check_header_mongrel () | |
2203 | { | |
2204 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
5f64f7bd | 2205 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : |
067d23c9 KY |
2206 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 |
2207 | $as_echo_n "checking for $2... " >&6; } | |
5f64f7bd | 2208 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : |
067d23c9 KY |
2209 | $as_echo_n "(cached) " >&6 |
2210 | fi | |
2211 | eval ac_res=\$$3 | |
2212 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2213 | $as_echo "$ac_res" >&6; } | |
2214 | else | |
2215 | # Is the header compilable? | |
2216 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 | |
2217 | $as_echo_n "checking $2 usability... " >&6; } | |
2218 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2219 | /* end confdefs.h. */ | |
2220 | $4 | |
2221 | #include <$2> | |
2222 | _ACEOF | |
2223 | if ac_fn_c_try_compile "$LINENO"; then : | |
2224 | ac_header_compiler=yes | |
2225 | else | |
2226 | ac_header_compiler=no | |
2227 | fi | |
2228 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2229 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 | |
2230 | $as_echo "$ac_header_compiler" >&6; } | |
2231 | ||
2232 | # Is the header present? | |
2233 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 | |
2234 | $as_echo_n "checking $2 presence... " >&6; } | |
2235 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2236 | /* end confdefs.h. */ | |
2237 | #include <$2> | |
2238 | _ACEOF | |
2239 | if ac_fn_c_try_cpp "$LINENO"; then : | |
2240 | ac_header_preproc=yes | |
2241 | else | |
2242 | ac_header_preproc=no | |
2243 | fi | |
5f64f7bd | 2244 | rm -f conftest.err conftest.$ac_ext |
067d23c9 KY |
2245 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 |
2246 | $as_echo "$ac_header_preproc" >&6; } | |
2247 | ||
2248 | # So? What about this header? | |
2249 | case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( | |
2250 | yes:no: ) | |
2251 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 | |
2252 | $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} | |
2253 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
2254 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
2255 | ;; | |
2256 | no:yes:* ) | |
2257 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 | |
2258 | $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} | |
2259 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 | |
2260 | $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} | |
2261 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 | |
2262 | $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} | |
2263 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 | |
2264 | $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} | |
2265 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
2266 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
2267 | ;; | |
2268 | esac | |
2269 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2270 | $as_echo_n "checking for $2... " >&6; } | |
5f64f7bd | 2271 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : |
067d23c9 KY |
2272 | $as_echo_n "(cached) " >&6 |
2273 | else | |
2274 | eval "$3=\$ac_header_compiler" | |
2275 | fi | |
2276 | eval ac_res=\$$3 | |
2277 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2278 | $as_echo "$ac_res" >&6; } | |
2279 | fi | |
5f64f7bd | 2280 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} |
067d23c9 KY |
2281 | |
2282 | } # ac_fn_c_check_header_mongrel | |
2283 | ||
2284 | # ac_fn_c_try_run LINENO | |
2285 | # ---------------------- | |
2286 | # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes | |
2287 | # that executables *can* be run. | |
2288 | ac_fn_c_try_run () | |
2289 | { | |
2290 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2291 | if { { ac_try="$ac_link" | |
2292 | case "(($ac_try" in | |
2293 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2294 | *) ac_try_echo=$ac_try;; | |
2295 | esac | |
2296 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
2297 | $as_echo "$ac_try_echo"; } >&5 | |
2298 | (eval "$ac_link") 2>&5 | |
2299 | ac_status=$? | |
2300 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
2301 | test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' | |
2302 | { { case "(($ac_try" in | |
2303 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2304 | *) ac_try_echo=$ac_try;; | |
2305 | esac | |
2306 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
2307 | $as_echo "$ac_try_echo"; } >&5 | |
2308 | (eval "$ac_try") 2>&5 | |
2309 | ac_status=$? | |
2310 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
2311 | test $ac_status = 0; }; }; then : | |
2312 | ac_retval=0 | |
2313 | else | |
2314 | $as_echo "$as_me: program exited with status $ac_status" >&5 | |
2315 | $as_echo "$as_me: failed program was:" >&5 | |
2316 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2317 | ||
2318 | ac_retval=$ac_status | |
2319 | fi | |
2320 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
5f64f7bd | 2321 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} |
067d23c9 KY |
2322 | as_fn_set_status $ac_retval |
2323 | ||
2324 | } # ac_fn_c_try_run | |
2325 | ||
2326 | # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES | |
2327 | # ------------------------------------------------------- | |
2328 | # Tests whether HEADER exists and can be compiled using the include files in | |
2329 | # INCLUDES, setting the cache variable VAR accordingly. | |
2330 | ac_fn_c_check_header_compile () | |
2331 | { | |
2332 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2333 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2334 | $as_echo_n "checking for $2... " >&6; } | |
5f64f7bd | 2335 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : |
067d23c9 KY |
2336 | $as_echo_n "(cached) " >&6 |
2337 | else | |
2338 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2339 | /* end confdefs.h. */ | |
2340 | $4 | |
2341 | #include <$2> | |
2342 | _ACEOF | |
2343 | if ac_fn_c_try_compile "$LINENO"; then : | |
2344 | eval "$3=yes" | |
2345 | else | |
2346 | eval "$3=no" | |
2347 | fi | |
2348 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2349 | fi | |
2350 | eval ac_res=\$$3 | |
2351 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2352 | $as_echo "$ac_res" >&6; } | |
5f64f7bd | 2353 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} |
067d23c9 KY |
2354 | |
2355 | } # ac_fn_c_check_header_compile | |
2356 | ||
1fd182f0 PE |
2357 | # ac_fn_c_try_link LINENO |
2358 | # ----------------------- | |
2359 | # Try to link conftest.$ac_ext, and return whether this succeeded. | |
2360 | ac_fn_c_try_link () | |
2361 | { | |
2362 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2363 | rm -f conftest.$ac_objext conftest$ac_exeext | |
2364 | if { { ac_try="$ac_link" | |
2365 | case "(($ac_try" in | |
2366 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2367 | *) ac_try_echo=$ac_try;; | |
2368 | esac | |
2369 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
2370 | $as_echo "$ac_try_echo"; } >&5 | |
2371 | (eval "$ac_link") 2>conftest.err | |
2372 | ac_status=$? | |
2373 | if test -s conftest.err; then | |
2374 | grep -v '^ *+' conftest.err >conftest.er1 | |
2375 | cat conftest.er1 >&5 | |
2376 | mv -f conftest.er1 conftest.err | |
2377 | fi | |
2378 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
2379 | test $ac_status = 0; } && { | |
2380 | test -z "$ac_c_werror_flag" || | |
2381 | test ! -s conftest.err | |
2382 | } && test -s conftest$ac_exeext && { | |
2383 | test "$cross_compiling" = yes || | |
2384 | $as_test_x conftest$ac_exeext | |
2385 | }; then : | |
2386 | ac_retval=0 | |
2387 | else | |
2388 | $as_echo "$as_me: failed program was:" >&5 | |
2389 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2390 | ||
2391 | ac_retval=1 | |
2392 | fi | |
2393 | # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information | |
2394 | # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would | |
2395 | # interfere with the next link command; also delete a directory that is | |
2396 | # left behind by Apple's compiler. We do this before executing the actions. | |
2397 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
5f64f7bd | 2398 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} |
1fd182f0 PE |
2399 | as_fn_set_status $ac_retval |
2400 | ||
2401 | } # ac_fn_c_try_link | |
2402 | ||
5f64f7bd GM |
2403 | # ac_fn_c_check_decl LINENO SYMBOL VAR |
2404 | # ------------------------------------ | |
2405 | # Tests whether SYMBOL is declared, setting cache variable VAR accordingly. | |
067d23c9 KY |
2406 | ac_fn_c_check_decl () |
2407 | { | |
2408 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
5f64f7bd GM |
2409 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5 |
2410 | $as_echo_n "checking whether $2 is declared... " >&6; } | |
2411 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
067d23c9 KY |
2412 | $as_echo_n "(cached) " >&6 |
2413 | else | |
2414 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2415 | /* end confdefs.h. */ | |
2416 | $4 | |
2417 | int | |
2418 | main () | |
2419 | { | |
5f64f7bd GM |
2420 | #ifndef $2 |
2421 | (void) $2; | |
067d23c9 KY |
2422 | #endif |
2423 | ||
2424 | ; | |
2425 | return 0; | |
2426 | } | |
2427 | _ACEOF | |
2428 | if ac_fn_c_try_compile "$LINENO"; then : | |
2429 | eval "$3=yes" | |
2430 | else | |
2431 | eval "$3=no" | |
2432 | fi | |
2433 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2434 | fi | |
2435 | eval ac_res=\$$3 | |
2436 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2437 | $as_echo "$ac_res" >&6; } | |
5f64f7bd | 2438 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} |
067d23c9 KY |
2439 | |
2440 | } # ac_fn_c_check_decl | |
2441 | ||
2442 | # ac_fn_c_check_header_preproc LINENO HEADER VAR | |
2443 | # ---------------------------------------------- | |
2444 | # Tests whether HEADER is present, setting the cache variable VAR accordingly. | |
2445 | ac_fn_c_check_header_preproc () | |
2446 | { | |
2447 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2448 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2449 | $as_echo_n "checking for $2... " >&6; } | |
5f64f7bd | 2450 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : |
067d23c9 KY |
2451 | $as_echo_n "(cached) " >&6 |
2452 | else | |
2453 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2454 | /* end confdefs.h. */ | |
2455 | #include <$2> | |
2456 | _ACEOF | |
2457 | if ac_fn_c_try_cpp "$LINENO"; then : | |
2458 | eval "$3=yes" | |
2459 | else | |
2460 | eval "$3=no" | |
2461 | fi | |
5f64f7bd | 2462 | rm -f conftest.err conftest.$ac_ext |
067d23c9 KY |
2463 | fi |
2464 | eval ac_res=\$$3 | |
2465 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2466 | $as_echo "$ac_res" >&6; } | |
5f64f7bd | 2467 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} |
067d23c9 KY |
2468 | |
2469 | } # ac_fn_c_check_header_preproc | |
2470 | ||
067d23c9 KY |
2471 | # ac_fn_c_check_func LINENO FUNC VAR |
2472 | # ---------------------------------- | |
2473 | # Tests whether FUNC exists, setting the cache variable VAR accordingly | |
2474 | ac_fn_c_check_func () | |
2475 | { | |
2476 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2477 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2478 | $as_echo_n "checking for $2... " >&6; } | |
5f64f7bd | 2479 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : |
067d23c9 KY |
2480 | $as_echo_n "(cached) " >&6 |
2481 | else | |
2482 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2483 | /* end confdefs.h. */ | |
2484 | /* Define $2 to an innocuous variant, in case <limits.h> declares $2. | |
2485 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
2486 | #define $2 innocuous_$2 | |
2487 | ||
2488 | /* System header to define __stub macros and hopefully few prototypes, | |
2489 | which can conflict with char $2 (); below. | |
2490 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
2491 | <limits.h> exists even on freestanding compilers. */ | |
2492 | ||
2493 | #ifdef __STDC__ | |
2494 | # include <limits.h> | |
2495 | #else | |
2496 | # include <assert.h> | |
2497 | #endif | |
2498 | ||
2499 | #undef $2 | |
2500 | ||
2501 | /* Override any GCC internal prototype to avoid an error. | |
2502 | Use char because int might match the return type of a GCC | |
2503 | builtin and then its argument prototype would still apply. */ | |
2504 | #ifdef __cplusplus | |
2505 | extern "C" | |
2506 | #endif | |
2507 | char $2 (); | |
2508 | /* The GNU C library defines this for functions which it implements | |
2509 | to always fail with ENOSYS. Some functions are actually named | |
2510 | something starting with __ and the normal name is an alias. */ | |
2511 | #if defined __stub_$2 || defined __stub___$2 | |
2512 | choke me | |
2513 | #endif | |
2514 | ||
2515 | int | |
2516 | main () | |
2517 | { | |
2518 | return $2 (); | |
2519 | ; | |
2520 | return 0; | |
2521 | } | |
2522 | _ACEOF | |
2523 | if ac_fn_c_try_link "$LINENO"; then : | |
2524 | eval "$3=yes" | |
2525 | else | |
2526 | eval "$3=no" | |
2527 | fi | |
2528 | rm -f core conftest.err conftest.$ac_objext \ | |
2529 | conftest$ac_exeext conftest.$ac_ext | |
2530 | fi | |
2531 | eval ac_res=\$$3 | |
2532 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2533 | $as_echo "$ac_res" >&6; } | |
5f64f7bd | 2534 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} |
067d23c9 KY |
2535 | |
2536 | } # ac_fn_c_check_func | |
2537 | ||
7417b37c GM |
2538 | # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES |
2539 | # ---------------------------------------------------- | |
2540 | # Tries to find if the field MEMBER exists in type AGGR, after including | |
2541 | # INCLUDES, setting cache variable VAR accordingly. | |
2542 | ac_fn_c_check_member () | |
2543 | { | |
2544 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2545 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 | |
2546 | $as_echo_n "checking for $2.$3... " >&6; } | |
2547 | if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then : | |
2548 | $as_echo_n "(cached) " >&6 | |
2549 | else | |
2550 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2551 | /* end confdefs.h. */ | |
2552 | $5 | |
2553 | int | |
2554 | main () | |
2555 | { | |
2556 | static $2 ac_aggr; | |
2557 | if (ac_aggr.$3) | |
2558 | return 0; | |
2559 | ; | |
2560 | return 0; | |
2561 | } | |
2562 | _ACEOF | |
2563 | if ac_fn_c_try_compile "$LINENO"; then : | |
2564 | eval "$4=yes" | |
2565 | else | |
2566 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2567 | /* end confdefs.h. */ | |
2568 | $5 | |
2569 | int | |
2570 | main () | |
2571 | { | |
2572 | static $2 ac_aggr; | |
2573 | if (sizeof ac_aggr.$3) | |
2574 | return 0; | |
2575 | ; | |
2576 | return 0; | |
2577 | } | |
2578 | _ACEOF | |
2579 | if ac_fn_c_try_compile "$LINENO"; then : | |
2580 | eval "$4=yes" | |
2581 | else | |
2582 | eval "$4=no" | |
2583 | fi | |
2584 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2585 | fi | |
2586 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2587 | fi | |
2588 | eval ac_res=\$$4 | |
2589 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2590 | $as_echo "$ac_res" >&6; } | |
2591 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2592 | ||
2593 | } # ac_fn_c_check_member | |
2594 | ||
3e0be4ab GM |
2595 | # ac_fn_c_check_type LINENO TYPE VAR INCLUDES |
2596 | # ------------------------------------------- | |
2597 | # Tests whether TYPE exists after having included INCLUDES, setting cache | |
2598 | # variable VAR accordingly. | |
2599 | ac_fn_c_check_type () | |
2600 | { | |
2601 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2602 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2603 | $as_echo_n "checking for $2... " >&6; } | |
2604 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
2605 | $as_echo_n "(cached) " >&6 | |
2606 | else | |
2607 | eval "$3=no" | |
2608 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2609 | /* end confdefs.h. */ | |
2610 | $4 | |
2611 | int | |
2612 | main () | |
2613 | { | |
2614 | if (sizeof ($2)) | |
2615 | return 0; | |
2616 | ; | |
2617 | return 0; | |
2618 | } | |
2619 | _ACEOF | |
2620 | if ac_fn_c_try_compile "$LINENO"; then : | |
2621 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2622 | /* end confdefs.h. */ | |
2623 | $4 | |
2624 | int | |
2625 | main () | |
2626 | { | |
2627 | if (sizeof (($2))) | |
2628 | return 0; | |
2629 | ; | |
2630 | return 0; | |
2631 | } | |
2632 | _ACEOF | |
2633 | if ac_fn_c_try_compile "$LINENO"; then : | |
2634 | ||
2635 | else | |
2636 | eval "$3=yes" | |
2637 | fi | |
2638 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2639 | fi | |
2640 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2641 | fi | |
2642 | eval ac_res=\$$3 | |
2643 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2644 | $as_echo "$ac_res" >&6; } | |
2645 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2646 | ||
2647 | } # ac_fn_c_check_type | |
2648 | ||
5f90be1b PE |
2649 | # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES |
2650 | # -------------------------------------------- | |
2651 | # Tries to find the compile-time value of EXPR in a program that includes | |
2652 | # INCLUDES, setting VAR accordingly. Returns whether the value could be | |
2653 | # computed | |
2654 | ac_fn_c_compute_int () | |
2655 | { | |
2656 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2657 | if test "$cross_compiling" = yes; then | |
2658 | # Depending upon the size, compute the lo and hi bounds. | |
2659 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2660 | /* end confdefs.h. */ | |
2661 | $4 | |
2662 | int | |
2663 | main () | |
2664 | { | |
2665 | static int test_array [1 - 2 * !(($2) >= 0)]; | |
2666 | test_array [0] = 0 | |
2667 | ||
2668 | ; | |
2669 | return 0; | |
2670 | } | |
2671 | _ACEOF | |
2672 | if ac_fn_c_try_compile "$LINENO"; then : | |
2673 | ac_lo=0 ac_mid=0 | |
2674 | while :; do | |
2675 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2676 | /* end confdefs.h. */ | |
2677 | $4 | |
2678 | int | |
2679 | main () | |
2680 | { | |
2681 | static int test_array [1 - 2 * !(($2) <= $ac_mid)]; | |
2682 | test_array [0] = 0 | |
2683 | ||
2684 | ; | |
2685 | return 0; | |
2686 | } | |
2687 | _ACEOF | |
2688 | if ac_fn_c_try_compile "$LINENO"; then : | |
2689 | ac_hi=$ac_mid; break | |
2690 | else | |
2691 | as_fn_arith $ac_mid + 1 && ac_lo=$as_val | |
2692 | if test $ac_lo -le $ac_mid; then | |
2693 | ac_lo= ac_hi= | |
2694 | break | |
2695 | fi | |
2696 | as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val | |
2697 | fi | |
2698 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2699 | done | |
2700 | else | |
2701 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2702 | /* end confdefs.h. */ | |
2703 | $4 | |
2704 | int | |
2705 | main () | |
2706 | { | |
2707 | static int test_array [1 - 2 * !(($2) < 0)]; | |
2708 | test_array [0] = 0 | |
2709 | ||
2710 | ; | |
2711 | return 0; | |
2712 | } | |
2713 | _ACEOF | |
2714 | if ac_fn_c_try_compile "$LINENO"; then : | |
2715 | ac_hi=-1 ac_mid=-1 | |
2716 | while :; do | |
2717 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2718 | /* end confdefs.h. */ | |
2719 | $4 | |
2720 | int | |
2721 | main () | |
2722 | { | |
2723 | static int test_array [1 - 2 * !(($2) >= $ac_mid)]; | |
2724 | test_array [0] = 0 | |
2725 | ||
2726 | ; | |
2727 | return 0; | |
2728 | } | |
2729 | _ACEOF | |
2730 | if ac_fn_c_try_compile "$LINENO"; then : | |
2731 | ac_lo=$ac_mid; break | |
2732 | else | |
2733 | as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val | |
2734 | if test $ac_mid -le $ac_hi; then | |
2735 | ac_lo= ac_hi= | |
2736 | break | |
2737 | fi | |
2738 | as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val | |
2739 | fi | |
2740 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2741 | done | |
2742 | else | |
2743 | ac_lo= ac_hi= | |
2744 | fi | |
2745 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2746 | fi | |
2747 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2748 | # Binary search between lo and hi bounds. | |
2749 | while test "x$ac_lo" != "x$ac_hi"; do | |
2750 | as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val | |
2751 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2752 | /* end confdefs.h. */ | |
2753 | $4 | |
2754 | int | |
2755 | main () | |
2756 | { | |
2757 | static int test_array [1 - 2 * !(($2) <= $ac_mid)]; | |
2758 | test_array [0] = 0 | |
2759 | ||
2760 | ; | |
2761 | return 0; | |
2762 | } | |
2763 | _ACEOF | |
2764 | if ac_fn_c_try_compile "$LINENO"; then : | |
2765 | ac_hi=$ac_mid | |
2766 | else | |
2767 | as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val | |
2768 | fi | |
2769 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2770 | done | |
2771 | case $ac_lo in #(( | |
2772 | ?*) eval "$3=\$ac_lo"; ac_retval=0 ;; | |
2773 | '') ac_retval=1 ;; | |
2774 | esac | |
2775 | else | |
2776 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2777 | /* end confdefs.h. */ | |
2778 | $4 | |
2779 | static long int longval () { return $2; } | |
2780 | static unsigned long int ulongval () { return $2; } | |
2781 | #include <stdio.h> | |
2782 | #include <stdlib.h> | |
2783 | int | |
2784 | main () | |
2785 | { | |
2786 | ||
2787 | FILE *f = fopen ("conftest.val", "w"); | |
2788 | if (! f) | |
2789 | return 1; | |
2790 | if (($2) < 0) | |
2791 | { | |
2792 | long int i = longval (); | |
2793 | if (i != ($2)) | |
2794 | return 1; | |
2795 | fprintf (f, "%ld", i); | |
2796 | } | |
2797 | else | |
2798 | { | |
2799 | unsigned long int i = ulongval (); | |
2800 | if (i != ($2)) | |
2801 | return 1; | |
2802 | fprintf (f, "%lu", i); | |
2803 | } | |
2804 | /* Do not output a trailing newline, as this causes \r\n confusion | |
2805 | on some platforms. */ | |
2806 | return ferror (f) || fclose (f) != 0; | |
2807 | ||
2808 | ; | |
2809 | return 0; | |
2810 | } | |
2811 | _ACEOF | |
2812 | if ac_fn_c_try_run "$LINENO"; then : | |
2813 | echo >>conftest.val; read $3 <conftest.val; ac_retval=0 | |
2814 | else | |
2815 | ac_retval=1 | |
2816 | fi | |
2817 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
2818 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
2819 | rm -f conftest.val | |
2820 | ||
2821 | fi | |
5f64f7bd | 2822 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} |
5f90be1b PE |
2823 | as_fn_set_status $ac_retval |
2824 | ||
2825 | } # ac_fn_c_compute_int | |
067d23c9 KY |
2826 | cat >config.log <<_ACEOF |
2827 | This file contains any messages produced by compilers while | |
2828 | running configure, to aid debugging if configure makes a mistake. | |
2829 | ||
2830 | It was created by emacs $as_me 24.0.50, which was | |
5f64f7bd | 2831 | generated by GNU Autoconf 2.65. Invocation command line was |
067d23c9 KY |
2832 | |
2833 | $ $0 $@ | |
2834 | ||
2835 | _ACEOF | |
2836 | exec 5>>config.log | |
2837 | { | |
2838 | cat <<_ASUNAME | |
2839 | ## --------- ## | |
2840 | ## Platform. ## | |
2841 | ## --------- ## | |
2842 | ||
2843 | hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` | |
2844 | uname -m = `(uname -m) 2>/dev/null || echo unknown` | |
2845 | uname -r = `(uname -r) 2>/dev/null || echo unknown` | |
2846 | uname -s = `(uname -s) 2>/dev/null || echo unknown` | |
2847 | uname -v = `(uname -v) 2>/dev/null || echo unknown` | |
2848 | ||
2849 | /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` | |
2850 | /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` | |
2851 | ||
2852 | /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` | |
2853 | /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` | |
2854 | /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` | |
2855 | /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` | |
2856 | /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` | |
2857 | /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` | |
2858 | /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` | |
2859 | ||
2860 | _ASUNAME | |
2861 | ||
2862 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2863 | for as_dir in $PATH | |
2864 | do | |
2865 | IFS=$as_save_IFS | |
2866 | test -z "$as_dir" && as_dir=. | |
2867 | $as_echo "PATH: $as_dir" | |
2868 | done | |
2869 | IFS=$as_save_IFS | |
2870 | ||
2871 | } >&5 | |
2872 | ||
2873 | cat >&5 <<_ACEOF | |
2874 | ||
2875 | ||
2876 | ## ----------- ## | |
2877 | ## Core tests. ## | |
2878 | ## ----------- ## | |
2879 | ||
2880 | _ACEOF | |
2881 | ||
2882 | ||
2883 | # Keep a trace of the command line. | |
2884 | # Strip out --no-create and --no-recursion so they do not pile up. | |
2885 | # Strip out --silent because we don't want to record it for future runs. | |
2886 | # Also quote any args containing shell meta-characters. | |
2887 | # Make two passes to allow for proper duplicate-argument suppression. | |
2888 | ac_configure_args= | |
2889 | ac_configure_args0= | |
2890 | ac_configure_args1= | |
2891 | ac_must_keep_next=false | |
2892 | for ac_pass in 1 2 | |
2893 | do | |
2894 | for ac_arg | |
2895 | do | |
2896 | case $ac_arg in | |
2897 | -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; | |
2898 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
2899 | | -silent | --silent | --silen | --sile | --sil) | |
2900 | continue ;; | |
2901 | *\'*) | |
2902 | ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
2903 | esac | |
2904 | case $ac_pass in | |
2905 | 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; | |
2906 | 2) | |
2907 | as_fn_append ac_configure_args1 " '$ac_arg'" | |
2908 | if test $ac_must_keep_next = true; then | |
2909 | ac_must_keep_next=false # Got value, back to normal. | |
2910 | else | |
2911 | case $ac_arg in | |
2912 | *=* | --config-cache | -C | -disable-* | --disable-* \ | |
2913 | | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | |
2914 | | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | |
2915 | | -with-* | --with-* | -without-* | --without-* | --x) | |
2916 | case "$ac_configure_args0 " in | |
2917 | "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; | |
2918 | esac | |
2919 | ;; | |
2920 | -* ) ac_must_keep_next=true ;; | |
2921 | esac | |
2922 | fi | |
2923 | as_fn_append ac_configure_args " '$ac_arg'" | |
2924 | ;; | |
2925 | esac | |
2926 | done | |
2927 | done | |
2928 | { ac_configure_args0=; unset ac_configure_args0;} | |
2929 | { ac_configure_args1=; unset ac_configure_args1;} | |
2930 | ||
2931 | # When interrupted or exit'd, cleanup temporary files, and complete | |
2932 | # config.log. We remove comments because anyway the quotes in there | |
2933 | # would cause problems or look ugly. | |
2934 | # WARNING: Use '\'' to represent an apostrophe within the trap. | |
2935 | # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. | |
2936 | trap 'exit_status=$? | |
2937 | # Save into config.log some information that might help in debugging. | |
2938 | { | |
2939 | echo | |
2940 | ||
5f64f7bd GM |
2941 | cat <<\_ASBOX |
2942 | ## ---------------- ## | |
067d23c9 | 2943 | ## Cache variables. ## |
5f64f7bd GM |
2944 | ## ---------------- ## |
2945 | _ASBOX | |
067d23c9 KY |
2946 | echo |
2947 | # The following way of writing the cache mishandles newlines in values, | |
2948 | ( | |
2949 | for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do | |
2950 | eval ac_val=\$$ac_var | |
2951 | case $ac_val in #( | |
2952 | *${as_nl}*) | |
2953 | case $ac_var in #( | |
2954 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
2955 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
2956 | esac | |
2957 | case $ac_var in #( | |
2958 | _ | IFS | as_nl) ;; #( | |
2959 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
2960 | *) { eval $ac_var=; unset $ac_var;} ;; | |
2961 | esac ;; | |
2962 | esac | |
2963 | done | |
2964 | (set) 2>&1 | | |
2965 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( | |
2966 | *${as_nl}ac_space=\ *) | |
2967 | sed -n \ | |
2968 | "s/'\''/'\''\\\\'\'''\''/g; | |
2969 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" | |
2970 | ;; #( | |
2971 | *) | |
2972 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" | |
2973 | ;; | |
2974 | esac | | |
2975 | sort | |
2976 | ) | |
2977 | echo | |
2978 | ||
5f64f7bd GM |
2979 | cat <<\_ASBOX |
2980 | ## ----------------- ## | |
067d23c9 | 2981 | ## Output variables. ## |
5f64f7bd GM |
2982 | ## ----------------- ## |
2983 | _ASBOX | |
067d23c9 KY |
2984 | echo |
2985 | for ac_var in $ac_subst_vars | |
2986 | do | |
2987 | eval ac_val=\$$ac_var | |
2988 | case $ac_val in | |
2989 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
2990 | esac | |
2991 | $as_echo "$ac_var='\''$ac_val'\''" | |
2992 | done | sort | |
2993 | echo | |
2994 | ||
2995 | if test -n "$ac_subst_files"; then | |
5f64f7bd GM |
2996 | cat <<\_ASBOX |
2997 | ## ------------------- ## | |
067d23c9 | 2998 | ## File substitutions. ## |
5f64f7bd GM |
2999 | ## ------------------- ## |
3000 | _ASBOX | |
067d23c9 KY |
3001 | echo |
3002 | for ac_var in $ac_subst_files | |
3003 | do | |
3004 | eval ac_val=\$$ac_var | |
3005 | case $ac_val in | |
3006 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
3007 | esac | |
3008 | $as_echo "$ac_var='\''$ac_val'\''" | |
3009 | done | sort | |
3010 | echo | |
3011 | fi | |
3012 | ||
3013 | if test -s confdefs.h; then | |
5f64f7bd GM |
3014 | cat <<\_ASBOX |
3015 | ## ----------- ## | |
067d23c9 | 3016 | ## confdefs.h. ## |
5f64f7bd GM |
3017 | ## ----------- ## |
3018 | _ASBOX | |
067d23c9 KY |
3019 | echo |
3020 | cat confdefs.h | |
3021 | echo | |
3022 | fi | |
3023 | test "$ac_signal" != 0 && | |
3024 | $as_echo "$as_me: caught signal $ac_signal" | |
3025 | $as_echo "$as_me: exit $exit_status" | |
3026 | } >&5 | |
3027 | rm -f core *.core core.conftest.* && | |
3028 | rm -f -r conftest* confdefs* conf$$* $ac_clean_files && | |
3029 | exit $exit_status | |
3030 | ' 0 | |
3031 | for ac_signal in 1 2 13 15; do | |
3032 | trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal | |
3033 | done | |
3034 | ac_signal=0 | |
3035 | ||
3036 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
3037 | rm -f -r conftest* confdefs.h | |
3038 | ||
3039 | $as_echo "/* confdefs.h */" > confdefs.h | |
3040 | ||
3041 | # Predefined preprocessor variables. | |
3042 | ||
3043 | cat >>confdefs.h <<_ACEOF | |
3044 | #define PACKAGE_NAME "$PACKAGE_NAME" | |
3045 | _ACEOF | |
3046 | ||
3047 | cat >>confdefs.h <<_ACEOF | |
3048 | #define PACKAGE_TARNAME "$PACKAGE_TARNAME" | |
3049 | _ACEOF | |
3050 | ||
3051 | cat >>confdefs.h <<_ACEOF | |
3052 | #define PACKAGE_VERSION "$PACKAGE_VERSION" | |
3053 | _ACEOF | |
3054 | ||
3055 | cat >>confdefs.h <<_ACEOF | |
3056 | #define PACKAGE_STRING "$PACKAGE_STRING" | |
3057 | _ACEOF | |
3058 | ||
3059 | cat >>confdefs.h <<_ACEOF | |
3060 | #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" | |
3061 | _ACEOF | |
3062 | ||
3063 | cat >>confdefs.h <<_ACEOF | |
3064 | #define PACKAGE_URL "$PACKAGE_URL" | |
3065 | _ACEOF | |
3066 | ||
3067 | ||
3068 | # Let the site file select an alternate cache file if it wants to. | |
3069 | # Prefer an explicitly selected file to automatically selected ones. | |
3070 | ac_site_file1=NONE | |
3071 | ac_site_file2=NONE | |
3072 | if test -n "$CONFIG_SITE"; then | |
5f64f7bd | 3073 | ac_site_file1=$CONFIG_SITE |
067d23c9 KY |
3074 | elif test "x$prefix" != xNONE; then |
3075 | ac_site_file1=$prefix/share/config.site | |
3076 | ac_site_file2=$prefix/etc/config.site | |
3077 | else | |
3078 | ac_site_file1=$ac_default_prefix/share/config.site | |
3079 | ac_site_file2=$ac_default_prefix/etc/config.site | |
3080 | fi | |
3081 | for ac_site_file in "$ac_site_file1" "$ac_site_file2" | |
3082 | do | |
3083 | test "x$ac_site_file" = xNONE && continue | |
3084 | if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then | |
3085 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 | |
3086 | $as_echo "$as_me: loading site script $ac_site_file" >&6;} | |
3087 | sed 's/^/| /' "$ac_site_file" >&5 | |
5f64f7bd | 3088 | . "$ac_site_file" |
067d23c9 KY |
3089 | fi |
3090 | done | |
3091 | ||
3092 | if test -r "$cache_file"; then | |
3093 | # Some versions of bash will fail to source /dev/null (special files | |
3094 | # actually), so we avoid doing that. DJGPP emulates it as a regular file. | |
3095 | if test /dev/null != "$cache_file" && test -f "$cache_file"; then | |
3096 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 | |
3097 | $as_echo "$as_me: loading cache $cache_file" >&6;} | |
3098 | case $cache_file in | |
3099 | [\\/]* | ?:[\\/]* ) . "$cache_file";; | |
3100 | *) . "./$cache_file";; | |
3101 | esac | |
3102 | fi | |
3103 | else | |
3104 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 | |
3105 | $as_echo "$as_me: creating cache $cache_file" >&6;} | |
3106 | >$cache_file | |
3107 | fi | |
3108 | ||
3109 | as_fn_append ac_header_list " stdlib.h" | |
3110 | as_fn_append ac_header_list " unistd.h" | |
3111 | as_fn_append ac_header_list " sys/param.h" | |
6c051bab | 3112 | as_fn_append ac_func_list " readlinkat" |
7d2a1c5e | 3113 | as_fn_append ac_func_list " dup2" |
e275c824 PE |
3114 | gl_getopt_required=GNU |
3115 | as_fn_append ac_header_list " getopt.h" | |
4fda9c95 GM |
3116 | as_fn_append ac_header_list " wchar.h" |
3117 | as_fn_append ac_header_list " stdint.h" | |
3118 | as_fn_append ac_header_list " inttypes.h" | |
ae0d7250 | 3119 | as_fn_append ac_func_list " lstat" |
067d23c9 | 3120 | as_fn_append ac_func_list " alarm" |
3e0be4ab | 3121 | as_fn_append ac_func_list " pthread_sigmask" |
ae0d7250 | 3122 | as_fn_append ac_func_list " readlink" |
6ad6792b | 3123 | as_fn_append ac_header_list " sys/socket.h" |
16c3e636 | 3124 | as_fn_append ac_func_list " tzset" |
ae0d7250 | 3125 | as_fn_append ac_func_list " symlink" |
5fa4ac76 | 3126 | as_fn_append ac_header_list " sys/stat.h" |
1fd182f0 PE |
3127 | as_fn_append ac_header_list " sys/time.h" |
3128 | as_fn_append ac_func_list " localtime_r" | |
067d23c9 KY |
3129 | # Check that the precious variables saved in the cache have kept the same |
3130 | # value. | |
3131 | ac_cache_corrupted=false | |
3132 | for ac_var in $ac_precious_vars; do | |
3133 | eval ac_old_set=\$ac_cv_env_${ac_var}_set | |
3134 | eval ac_new_set=\$ac_env_${ac_var}_set | |
3135 | eval ac_old_val=\$ac_cv_env_${ac_var}_value | |
3136 | eval ac_new_val=\$ac_env_${ac_var}_value | |
3137 | case $ac_old_set,$ac_new_set in | |
3138 | set,) | |
3139 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 | |
3140 | $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} | |
3141 | ac_cache_corrupted=: ;; | |
3142 | ,set) | |
3143 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 | |
3144 | $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} | |
3145 | ac_cache_corrupted=: ;; | |
3146 | ,);; | |
3147 | *) | |
3148 | if test "x$ac_old_val" != "x$ac_new_val"; then | |
3149 | # differences in whitespace do not lead to failure. | |
3150 | ac_old_val_w=`echo x $ac_old_val` | |
3151 | ac_new_val_w=`echo x $ac_new_val` | |
3152 | if test "$ac_old_val_w" != "$ac_new_val_w"; then | |
3153 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 | |
3154 | $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} | |
3155 | ac_cache_corrupted=: | |
3156 | else | |
3157 | { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 | |
3158 | $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} | |
3159 | eval $ac_var=\$ac_old_val | |
3160 | fi | |
3161 | { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 | |
3162 | $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} | |
3163 | { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 | |
3164 | $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} | |
3165 | fi;; | |
3166 | esac | |
3167 | # Pass precious variables to config.status. | |
3168 | if test "$ac_new_set" = set; then | |
3169 | case $ac_new_val in | |
3170 | *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; | |
3171 | *) ac_arg=$ac_var=$ac_new_val ;; | |
3172 | esac | |
3173 | case " $ac_configure_args " in | |
3174 | *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. | |
3175 | *) as_fn_append ac_configure_args " '$ac_arg'" ;; | |
3176 | esac | |
3177 | fi | |
3178 | done | |
3179 | if $ac_cache_corrupted; then | |
3180 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
3181 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3182 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 | |
3183 | $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} | |
5f64f7bd | 3184 | as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 |
067d23c9 KY |
3185 | fi |
3186 | ## -------------------- ## | |
3187 | ## Main body of script. ## | |
3188 | ## -------------------- ## | |
3189 | ||
3190 | ac_ext=c | |
3191 | ac_cpp='$CPP $CPPFLAGS' | |
3192 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3193 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3194 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
3195 | ||
3196 | ||
3197 | ac_config_headers="$ac_config_headers src/config.h:src/config.in" | |
3198 | ||
3199 | ||
743c80a7 | 3200 | am__api_version='1.11' |
067d23c9 | 3201 | |
743c80a7 PE |
3202 | ac_aux_dir= |
3203 | for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do | |
5f64f7bd GM |
3204 | for ac_t in install-sh install.sh shtool; do |
3205 | if test -f "$ac_dir/$ac_t"; then | |
3206 | ac_aux_dir=$ac_dir | |
3207 | ac_install_sh="$ac_aux_dir/$ac_t -c" | |
3208 | break 2 | |
3209 | fi | |
3210 | done | |
743c80a7 PE |
3211 | done |
3212 | if test -z "$ac_aux_dir"; then | |
5f64f7bd | 3213 | as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 |
743c80a7 | 3214 | fi |
067d23c9 | 3215 | |
743c80a7 PE |
3216 | # These three variables are undocumented and unsupported, |
3217 | # and are intended to be withdrawn in a future Autoconf release. | |
3218 | # They can cause serious problems if a builder's source tree is in a directory | |
3219 | # whose full name contains unusual characters. | |
3220 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. | |
3221 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. | |
3222 | ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. | |
067d23c9 | 3223 | |
067d23c9 | 3224 | |
743c80a7 PE |
3225 | # Find a good install program. We prefer a C program (faster), |
3226 | # so one script is as good as another. But avoid the broken or | |
3227 | # incompatible versions: | |
3228 | # SysV /etc/install, /usr/sbin/install | |
3229 | # SunOS /usr/etc/install | |
3230 | # IRIX /sbin/install | |
3231 | # AIX /bin/install | |
3232 | # AmigaOS /C/install, which installs bootblocks on floppy discs | |
3233 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag | |
3234 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
3235 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
3236 | # OS/2's system install, which has a completely different semantic | |
3237 | # ./install, which can be erroneously created by make from ./install.sh. | |
3238 | # Reject install programs that cannot install multiple files. | |
3239 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 | |
3240 | $as_echo_n "checking for a BSD-compatible install... " >&6; } | |
3241 | if test -z "$INSTALL"; then | |
5f64f7bd | 3242 | if test "${ac_cv_path_install+set}" = set; then : |
743c80a7 PE |
3243 | $as_echo_n "(cached) " >&6 |
3244 | else | |
3245 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3246 | for as_dir in $PATH | |
3247 | do | |
3248 | IFS=$as_save_IFS | |
3249 | test -z "$as_dir" && as_dir=. | |
3250 | # Account for people who put trailing slashes in PATH elements. | |
3251 | case $as_dir/ in #(( | |
3252 | ./ | .// | /[cC]/* | \ | |
3253 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ | |
3254 | ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ | |
3255 | /usr/ucb/* ) ;; | |
3256 | *) | |
3257 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
3258 | # Don't use installbsd from OSF since it installs stuff as root | |
3259 | # by default. | |
3260 | for ac_prog in ginstall scoinst install; do | |
3261 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3262 | if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then | |
3263 | if test $ac_prog = install && | |
3264 | grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
3265 | # AIX install. It has an incompatible calling convention. | |
3266 | : | |
3267 | elif test $ac_prog = install && | |
3268 | grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
3269 | # program-specific install script used by HP pwplus--don't use. | |
3270 | : | |
3271 | else | |
3272 | rm -rf conftest.one conftest.two conftest.dir | |
3273 | echo one > conftest.one | |
3274 | echo two > conftest.two | |
3275 | mkdir conftest.dir | |
3276 | if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && | |
3277 | test -s conftest.one && test -s conftest.two && | |
3278 | test -s conftest.dir/conftest.one && | |
3279 | test -s conftest.dir/conftest.two | |
3280 | then | |
3281 | ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" | |
3282 | break 3 | |
3283 | fi | |
3284 | fi | |
3285 | fi | |
3286 | done | |
3287 | done | |
3288 | ;; | |
3289 | esac | |
067d23c9 | 3290 | |
743c80a7 PE |
3291 | done |
3292 | IFS=$as_save_IFS | |
067d23c9 | 3293 | |
743c80a7 | 3294 | rm -rf conftest.one conftest.two conftest.dir |
067d23c9 | 3295 | |
067d23c9 | 3296 | fi |
743c80a7 PE |
3297 | if test "${ac_cv_path_install+set}" = set; then |
3298 | INSTALL=$ac_cv_path_install | |
3299 | else | |
3300 | # As a last resort, use the slow shell script. Don't cache a | |
3301 | # value for INSTALL within a source directory, because that will | |
3302 | # break other packages using the cache if that directory is | |
3303 | # removed, or if the value is a relative name. | |
3304 | INSTALL=$ac_install_sh | |
3305 | fi | |
067d23c9 | 3306 | fi |
743c80a7 PE |
3307 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 |
3308 | $as_echo "$INSTALL" >&6; } | |
067d23c9 | 3309 | |
743c80a7 PE |
3310 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. |
3311 | # It thinks the first close brace ends the variable substitution. | |
3312 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
067d23c9 | 3313 | |
743c80a7 | 3314 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' |
067d23c9 | 3315 | |
743c80a7 | 3316 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' |
067d23c9 | 3317 | |
743c80a7 PE |
3318 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 |
3319 | $as_echo_n "checking whether build environment is sane... " >&6; } | |
3320 | # Just in case | |
3321 | sleep 1 | |
3322 | echo timestamp > conftest.file | |
3323 | # Reject unsafe characters in $srcdir or the absolute working directory | |
3324 | # name. Accept space and tab only in the latter. | |
3325 | am_lf=' | |
3326 | ' | |
3327 | case `pwd` in | |
3328 | *[\\\"\#\$\&\'\`$am_lf]*) | |
5f64f7bd | 3329 | as_fn_error "unsafe absolute working directory name" "$LINENO" 5;; |
743c80a7 PE |
3330 | esac |
3331 | case $srcdir in | |
3332 | *[\\\"\#\$\&\'\`$am_lf\ \ ]*) | |
5f64f7bd | 3333 | as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; |
743c80a7 | 3334 | esac |
067d23c9 | 3335 | |
743c80a7 PE |
3336 | # Do `set' in a subshell so we don't clobber the current shell's |
3337 | # arguments. Must try -L first in case configure is actually a | |
3338 | # symlink; some systems play weird games with the mod time of symlinks | |
3339 | # (eg FreeBSD returns the mod time of the symlink's containing | |
3340 | # directory). | |
3341 | if ( | |
3342 | set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` | |
3343 | if test "$*" = "X"; then | |
3344 | # -L didn't work. | |
3345 | set X `ls -t "$srcdir/configure" conftest.file` | |
3346 | fi | |
3347 | rm -f conftest.file | |
3348 | if test "$*" != "X $srcdir/configure conftest.file" \ | |
3349 | && test "$*" != "X conftest.file $srcdir/configure"; then | |
3350 | ||
3351 | # If neither matched, then we have a broken ls. This can happen | |
3352 | # if, for instance, CONFIG_SHELL is bash and it inherits a | |
3353 | # broken ls alias from the environment. This has actually | |
3354 | # happened. Such a system could not be considered "sane". | |
5f64f7bd | 3355 | as_fn_error "ls -t appears to fail. Make sure there is not a broken |
743c80a7 PE |
3356 | alias in your environment" "$LINENO" 5 |
3357 | fi | |
067d23c9 | 3358 | |
743c80a7 PE |
3359 | test "$2" = conftest.file |
3360 | ) | |
3361 | then | |
3362 | # Ok. | |
3363 | : | |
067d23c9 | 3364 | else |
5f64f7bd | 3365 | as_fn_error "newly created file is older than distributed files! |
743c80a7 | 3366 | Check your system clock" "$LINENO" 5 |
067d23c9 | 3367 | fi |
743c80a7 PE |
3368 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
3369 | $as_echo "yes" >&6; } | |
3370 | test "$program_prefix" != NONE && | |
3371 | program_transform_name="s&^&$program_prefix&;$program_transform_name" | |
3372 | # Use a double $ so make ignores it. | |
3373 | test "$program_suffix" != NONE && | |
3374 | program_transform_name="s&\$&$program_suffix&;$program_transform_name" | |
3375 | # Double any \ or $. | |
3376 | # By default was `s,x,x', remove it if useless. | |
3377 | ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' | |
3378 | program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` | |
067d23c9 | 3379 | |
743c80a7 PE |
3380 | # expand $ac_aux_dir to an absolute path |
3381 | am_aux_dir=`cd $ac_aux_dir && pwd` | |
067d23c9 | 3382 | |
743c80a7 PE |
3383 | if test x"${MISSING+set}" != xset; then |
3384 | case $am_aux_dir in | |
3385 | *\ * | *\ *) | |
3386 | MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; | |
3387 | *) | |
3388 | MISSING="\${SHELL} $am_aux_dir/missing" ;; | |
3389 | esac | |
067d23c9 | 3390 | fi |
743c80a7 PE |
3391 | # Use eval to expand $SHELL |
3392 | if eval "$MISSING --run true"; then | |
3393 | am_missing_run="$MISSING --run " | |
067d23c9 | 3394 | else |
743c80a7 PE |
3395 | am_missing_run= |
3396 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 | |
3397 | $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} | |
067d23c9 KY |
3398 | fi |
3399 | ||
743c80a7 PE |
3400 | if test x"${install_sh}" != xset; then |
3401 | case $am_aux_dir in | |
3402 | *\ * | *\ *) | |
3403 | install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; | |
3404 | *) | |
3405 | install_sh="\${SHELL} $am_aux_dir/install-sh" | |
3406 | esac | |
067d23c9 KY |
3407 | fi |
3408 | ||
743c80a7 PE |
3409 | # Installed binaries are usually stripped using `strip' when the user |
3410 | # run `make install-strip'. However `strip' might not be the right | |
3411 | # tool to use in cross-compilation environments, therefore Automake | |
3412 | # will honor the `STRIP' environment variable to overrule this program. | |
3413 | if test "$cross_compiling" != no; then | |
3414 | if test -n "$ac_tool_prefix"; then | |
3415 | # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. | |
3416 | set dummy ${ac_tool_prefix}strip; ac_word=$2 | |
3417 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3418 | $as_echo_n "checking for $ac_word... " >&6; } | |
5f64f7bd | 3419 | if test "${ac_cv_prog_STRIP+set}" = set; then : |
743c80a7 | 3420 | $as_echo_n "(cached) " >&6 |
067d23c9 | 3421 | else |
743c80a7 PE |
3422 | if test -n "$STRIP"; then |
3423 | ac_cv_prog_STRIP="$STRIP" # Let the user override the test. | |
3424 | else | |
3425 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3426 | for as_dir in $PATH | |
3427 | do | |
3428 | IFS=$as_save_IFS | |
3429 | test -z "$as_dir" && as_dir=. | |
3430 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3431 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
3432 | ac_cv_prog_STRIP="${ac_tool_prefix}strip" | |
3433 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3434 | break 2 | |
3435 | fi | |
3436 | done | |
3437 | done | |
3438 | IFS=$as_save_IFS | |
067d23c9 KY |
3439 | |
3440 | fi | |
067d23c9 | 3441 | fi |
743c80a7 PE |
3442 | STRIP=$ac_cv_prog_STRIP |
3443 | if test -n "$STRIP"; then | |
3444 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 | |
3445 | $as_echo "$STRIP" >&6; } | |
3446 | else | |
3447 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3448 | $as_echo "no" >&6; } | |
067d23c9 KY |
3449 | fi |
3450 | ||
3451 | ||
067d23c9 | 3452 | fi |
743c80a7 PE |
3453 | if test -z "$ac_cv_prog_STRIP"; then |
3454 | ac_ct_STRIP=$STRIP | |
3455 | # Extract the first word of "strip", so it can be a program name with args. | |
3456 | set dummy strip; ac_word=$2 | |
3457 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3458 | $as_echo_n "checking for $ac_word... " >&6; } | |
5f64f7bd | 3459 | if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : |
743c80a7 PE |
3460 | $as_echo_n "(cached) " >&6 |
3461 | else | |
3462 | if test -n "$ac_ct_STRIP"; then | |
3463 | ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. | |
3464 | else | |
3465 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3466 | for as_dir in $PATH | |
3467 | do | |
3468 | IFS=$as_save_IFS | |
3469 | test -z "$as_dir" && as_dir=. | |
3470 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3471 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
3472 | ac_cv_prog_ac_ct_STRIP="strip" | |
3473 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3474 | break 2 | |
3475 | fi | |
3476 | done | |
3477 | done | |
3478 | IFS=$as_save_IFS | |
3479 | ||
3480 | fi | |
3481 | fi | |
3482 | ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP | |
3483 | if test -n "$ac_ct_STRIP"; then | |
3484 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 | |
3485 | $as_echo "$ac_ct_STRIP" >&6; } | |
3486 | else | |
3487 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3488 | $as_echo "no" >&6; } | |
3489 | fi | |
3490 | ||
3491 | if test "x$ac_ct_STRIP" = x; then | |
3492 | STRIP=":" | |
3493 | else | |
3494 | case $cross_compiling:$ac_tool_warned in | |
3495 | yes:) | |
3496 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
3497 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
3498 | ac_tool_warned=yes ;; | |
3499 | esac | |
3500 | STRIP=$ac_ct_STRIP | |
3501 | fi | |
3502 | else | |
3503 | STRIP="$ac_cv_prog_STRIP" | |
3504 | fi | |
3505 | ||
3506 | fi | |
3507 | INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" | |
3508 | ||
3509 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 | |
3510 | $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } | |
3511 | if test -z "$MKDIR_P"; then | |
5f64f7bd | 3512 | if test "${ac_cv_path_mkdir+set}" = set; then : |
743c80a7 PE |
3513 | $as_echo_n "(cached) " >&6 |
3514 | else | |
3515 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3516 | for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin | |
3517 | do | |
3518 | IFS=$as_save_IFS | |
3519 | test -z "$as_dir" && as_dir=. | |
3520 | for ac_prog in mkdir gmkdir; do | |
3521 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3522 | { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue | |
3523 | case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( | |
3524 | 'mkdir (GNU coreutils) '* | \ | |
3525 | 'mkdir (coreutils) '* | \ | |
3526 | 'mkdir (fileutils) '4.1*) | |
3527 | ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext | |
3528 | break 3;; | |
3529 | esac | |
3530 | done | |
3531 | done | |
3532 | done | |
3533 | IFS=$as_save_IFS | |
3534 | ||
3535 | fi | |
3536 | ||
3537 | test -d ./--version && rmdir ./--version | |
3538 | if test "${ac_cv_path_mkdir+set}" = set; then | |
3539 | MKDIR_P="$ac_cv_path_mkdir -p" | |
3540 | else | |
3541 | # As a last resort, use the slow shell script. Don't cache a | |
3542 | # value for MKDIR_P within a source directory, because that will | |
3543 | # break other packages using the cache if that directory is | |
3544 | # removed, or if the value is a relative name. | |
3545 | MKDIR_P="$ac_install_sh -d" | |
3546 | fi | |
3547 | fi | |
3548 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 | |
3549 | $as_echo "$MKDIR_P" >&6; } | |
3550 | ||
a451f14b | 3551 | |
743c80a7 PE |
3552 | mkdir_p="$MKDIR_P" |
3553 | case $mkdir_p in | |
3554 | [\\/$]* | ?:[\\/]*) ;; | |
3555 | */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; | |
3556 | esac | |
3557 | ||
3558 | for ac_prog in gawk mawk nawk awk | |
3559 | do | |
3560 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
3561 | set dummy $ac_prog; ac_word=$2 | |
3562 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3563 | $as_echo_n "checking for $ac_word... " >&6; } | |
5f64f7bd | 3564 | if test "${ac_cv_prog_AWK+set}" = set; then : |
743c80a7 PE |
3565 | $as_echo_n "(cached) " >&6 |
3566 | else | |
3567 | if test -n "$AWK"; then | |
3568 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
3569 | else | |
3570 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3571 | for as_dir in $PATH | |
3572 | do | |
3573 | IFS=$as_save_IFS | |
3574 | test -z "$as_dir" && as_dir=. | |
3575 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3576 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
3577 | ac_cv_prog_AWK="$ac_prog" | |
3578 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3579 | break 2 | |
3580 | fi | |
3581 | done | |
3582 | done | |
3583 | IFS=$as_save_IFS | |
3584 | ||
3585 | fi | |
3586 | fi | |
3587 | AWK=$ac_cv_prog_AWK | |
3588 | if test -n "$AWK"; then | |
3589 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 | |
3590 | $as_echo "$AWK" >&6; } | |
3591 | else | |
3592 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3593 | $as_echo "no" >&6; } | |
3594 | fi | |
3595 | ||
3596 | ||
3597 | test -n "$AWK" && break | |
3598 | done | |
3599 | ||
3600 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 | |
3601 | $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } | |
3602 | set x ${MAKE-make} | |
3603 | ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` | |
5f64f7bd | 3604 | if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : |
743c80a7 PE |
3605 | $as_echo_n "(cached) " >&6 |
3606 | else | |
3607 | cat >conftest.make <<\_ACEOF | |
3608 | SHELL = /bin/sh | |
3609 | all: | |
3610 | @echo '@@@%%%=$(MAKE)=@@@%%%' | |
3611 | _ACEOF | |
5f64f7bd | 3612 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. |
743c80a7 PE |
3613 | case `${MAKE-make} -f conftest.make 2>/dev/null` in |
3614 | *@@@%%%=?*=@@@%%%*) | |
3615 | eval ac_cv_prog_make_${ac_make}_set=yes;; | |
3616 | *) | |
3617 | eval ac_cv_prog_make_${ac_make}_set=no;; | |
3618 | esac | |
3619 | rm -f conftest.make | |
3620 | fi | |
3621 | if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then | |
3622 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
3623 | $as_echo "yes" >&6; } | |
3624 | SET_MAKE= | |
3625 | else | |
3626 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3627 | $as_echo "no" >&6; } | |
3628 | SET_MAKE="MAKE=${MAKE-make}" | |
3629 | fi | |
3630 | ||
3631 | rm -rf .tst 2>/dev/null | |
3632 | mkdir .tst 2>/dev/null | |
3633 | if test -d .tst; then | |
3634 | am__leading_dot=. | |
3635 | else | |
3636 | am__leading_dot=_ | |
3637 | fi | |
3638 | rmdir .tst 2>/dev/null | |
3639 | ||
3640 | if test "`cd $srcdir && pwd`" != "`pwd`"; then | |
3641 | # Use -I$(srcdir) only when $(srcdir) != ., so that make's output | |
3642 | # is not polluted with repeated "-I." | |
3643 | am__isrc=' -I$(srcdir)' | |
3644 | # test to see if srcdir already configured | |
3645 | if test -f $srcdir/config.status; then | |
5f64f7bd | 3646 | as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 |
743c80a7 PE |
3647 | fi |
3648 | fi | |
3649 | ||
3650 | # test whether we have cygpath | |
3651 | if test -z "$CYGPATH_W"; then | |
3652 | if (cygpath --version) >/dev/null 2>/dev/null; then | |
3653 | CYGPATH_W='cygpath -w' | |
3654 | else | |
3655 | CYGPATH_W=echo | |
3656 | fi | |
3657 | fi | |
3658 | ||
3659 | ||
3660 | # Define the identity of the package. | |
3661 | PACKAGE='emacs' | |
3662 | VERSION='24.0.50' | |
3663 | ||
3664 | ||
3665 | cat >>confdefs.h <<_ACEOF | |
3666 | #define PACKAGE "$PACKAGE" | |
3667 | _ACEOF | |
3668 | ||
3669 | ||
3670 | cat >>confdefs.h <<_ACEOF | |
3671 | #define VERSION "$VERSION" | |
3672 | _ACEOF | |
3673 | ||
3674 | # Some tools Automake needs. | |
3675 | ||
3676 | ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} | |
3677 | ||
3678 | ||
3679 | AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} | |
3680 | ||
3681 | ||
3682 | AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} | |
3683 | ||
3684 | ||
3685 | AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} | |
3686 | ||
3687 | ||
3688 | MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} | |
3689 | ||
3690 | # We need awk for the "check" target. The system "awk" is bad on | |
3691 | # some platforms. | |
3692 | # Always define AMTAR for backward compatibility. | |
3693 | ||
3694 | AMTAR=${AMTAR-"${am_missing_run}tar"} | |
3695 | ||
3696 | am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' | |
3697 | ||
3698 | ||
3699 | ||
3700 | ||
3701 | ||
3702 | ||
3703 | ||
3704 | ||
3705 | lispdir='${datadir}/emacs/${version}/lisp' | |
3706 | locallisppath='${datadir}/emacs/${version}/site-lisp:'\ | |
3707 | '${datadir}/emacs/site-lisp' | |
3708 | lisppath='${locallisppath}:${lispdir}:${datadir}/emacs/${version}/leim' | |
3709 | etcdir='${datadir}/emacs/${version}/etc' | |
3710 | archlibdir='${libexecdir}/emacs/${version}/${configuration}' | |
3711 | docdir='${datadir}/emacs/${version}/etc' | |
3712 | gamedir='${localstatedir}/games/emacs' | |
3713 | ||
3714 | ||
3715 | ||
3716 | ||
3717 | # Check whether --with-pop was given. | |
3718 | if test "${with_pop+set}" = set; then : | |
3719 | withval=$with_pop; | |
3720 | else | |
3721 | with_pop=yes | |
3722 | fi | |
3723 | ||
3724 | if test "$with_pop" = yes; then | |
3725 | $as_echo "#define MAIL_USE_POP 1" >>confdefs.h | |
3726 | ||
3727 | fi | |
3728 | ||
3729 | ||
3730 | # Check whether --with-kerberos was given. | |
3731 | if test "${with_kerberos+set}" = set; then : | |
3732 | withval=$with_kerberos; | |
3733 | else | |
3734 | with_kerberos=no | |
3735 | fi | |
3736 | ||
3737 | if test "$with_kerberos" != no; then | |
3738 | $as_echo "#define KERBEROS 1" >>confdefs.h | |
3739 | ||
3740 | fi | |
3741 | ||
3742 | ||
3743 | # Check whether --with-kerberos5 was given. | |
3744 | if test "${with_kerberos5+set}" = set; then : | |
3745 | withval=$with_kerberos5; | |
3746 | else | |
3747 | with_kerberos5=no | |
3748 | fi | |
3749 | ||
3750 | if test "${with_kerberos5}" != no; then | |
3751 | if test "${with_kerberos}" = no; then | |
3752 | with_kerberos=yes | |
3753 | $as_echo "#define KERBEROS 1" >>confdefs.h | |
3754 | ||
3755 | fi | |
3756 | ||
3757 | $as_echo "#define KERBEROS5 1" >>confdefs.h | |
3758 | ||
3759 | fi | |
3760 | ||
3761 | ||
3762 | # Check whether --with-hesiod was given. | |
3763 | if test "${with_hesiod+set}" = set; then : | |
3764 | withval=$with_hesiod; | |
3765 | else | |
3766 | with_hesiod=no | |
3767 | fi | |
3768 | ||
3769 | if test "$with_hesiod" != no; then | |
3770 | ||
3771 | $as_echo "#define HESIOD 1" >>confdefs.h | |
3772 | ||
3773 | fi | |
3774 | ||
3775 | ||
3776 | # Check whether --with-mmdf was given. | |
3777 | if test "${with_mmdf+set}" = set; then : | |
3778 | withval=$with_mmdf; | |
3779 | else | |
3780 | with_mmdf=no | |
3781 | fi | |
3782 | ||
3783 | if test "$with_mmdf" != no; then | |
3784 | ||
3785 | $as_echo "#define MAIL_USE_MMDF 1" >>confdefs.h | |
3786 | ||
3787 | fi | |
3788 | ||
3789 | ||
3790 | # Check whether --with-mail-unlink was given. | |
3791 | if test "${with_mail_unlink+set}" = set; then : | |
3792 | withval=$with_mail_unlink; | |
3793 | else | |
3794 | with_mail_unlink=no | |
3795 | fi | |
3796 | ||
3797 | if test "$with_mail_unlink" != no; then | |
3798 | ||
3799 | $as_echo "#define MAIL_UNLINK_SPOOL 1" >>confdefs.h | |
3800 | ||
3801 | fi | |
3802 | ||
3803 | ||
3804 | # Check whether --with-mailhost was given. | |
3805 | if test "${with_mailhost+set}" = set; then : | |
3806 | withval=$with_mailhost; | |
3807 | cat >>confdefs.h <<_ACEOF | |
3808 | #define MAILHOST "$withval" | |
3809 | _ACEOF | |
3810 | ||
3811 | fi | |
3812 | ||
3813 | ||
3814 | ||
067d23c9 KY |
3815 | # Check whether --with-sound was given. |
3816 | if test "${with_sound+set}" = set; then : | |
3817 | withval=$with_sound; | |
3818 | else | |
3819 | with_sound=yes | |
3820 | fi | |
3821 | ||
3822 | ||
3823 | ||
3824 | # Check whether --with-sync-input was given. | |
3825 | if test "${with_sync_input+set}" = set; then : | |
3826 | withval=$with_sync_input; | |
3827 | else | |
3828 | with_sync_input=yes | |
3829 | fi | |
3830 | ||
3831 | if test "$with_sync_input" = yes; then | |
3832 | ||
3833 | $as_echo "#define SYNC_INPUT 1" >>confdefs.h | |
3834 | ||
3835 | fi | |
3836 | ||
3837 | ||
3838 | # Check whether --with-x-toolkit was given. | |
3839 | if test "${with_x_toolkit+set}" = set; then : | |
3840 | withval=$with_x_toolkit; case "${withval}" in | |
3841 | y | ye | yes ) val=gtk ;; | |
3842 | n | no ) val=no ;; | |
3843 | l | lu | luc | luci | lucid ) val=lucid ;; | |
3844 | a | at | ath | athe | athen | athena ) val=athena ;; | |
3845 | m | mo | mot | moti | motif ) val=motif ;; | |
3846 | g | gt | gtk ) val=gtk ;; | |
3847 | gtk3 ) val=gtk3 ;; | |
3848 | * ) | |
5f64f7bd | 3849 | as_fn_error "\`--with-x-toolkit=$withval' is invalid; |
067d23c9 KY |
3850 | this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif', \`gtk' or |
3851 | \`gtk3'. \`yes' and \`gtk' are synonyms. \`athena' and \`lucid' are synonyms." "$LINENO" 5 | |
3852 | ;; | |
3853 | esac | |
3854 | with_x_toolkit=$val | |
3855 | ||
3856 | fi | |
3857 | ||
3858 | ||
3859 | ||
0442dc7f GM |
3860 | # Check whether --with-wide-int was given. |
3861 | if test "${with_wide_int+set}" = set; then : | |
3862 | withval=$with_wide_int; | |
3863 | else | |
3864 | with_wide_int=no | |
3865 | fi | |
3866 | ||
3867 | if test "$with_wide_int" = yes; then | |
3868 | ||
3869 | $as_echo "#define WIDE_EMACS_INT 1" >>confdefs.h | |
3870 | ||
3871 | fi | |
3872 | ||
3873 | ||
067d23c9 KY |
3874 | # Check whether --with-xpm was given. |
3875 | if test "${with_xpm+set}" = set; then : | |
3876 | withval=$with_xpm; | |
3877 | else | |
3878 | with_xpm=yes | |
3879 | fi | |
3880 | ||
3881 | ||
3882 | # Check whether --with-jpeg was given. | |
3883 | if test "${with_jpeg+set}" = set; then : | |
3884 | withval=$with_jpeg; | |
3885 | else | |
3886 | with_jpeg=yes | |
3887 | fi | |
3888 | ||
3889 | ||
3890 | # Check whether --with-tiff was given. | |
3891 | if test "${with_tiff+set}" = set; then : | |
3892 | withval=$with_tiff; | |
3893 | else | |
3894 | with_tiff=yes | |
3895 | fi | |
3896 | ||
3897 | ||
3898 | # Check whether --with-gif was given. | |
3899 | if test "${with_gif+set}" = set; then : | |
3900 | withval=$with_gif; | |
3901 | else | |
3902 | with_gif=yes | |
3903 | fi | |
3904 | ||
3905 | ||
3906 | # Check whether --with-png was given. | |
3907 | if test "${with_png+set}" = set; then : | |
3908 | withval=$with_png; | |
3909 | else | |
3910 | with_png=yes | |
3911 | fi | |
3912 | ||
3913 | ||
3914 | # Check whether --with-rsvg was given. | |
3915 | if test "${with_rsvg+set}" = set; then : | |
3916 | withval=$with_rsvg; | |
3917 | else | |
3918 | with_rsvg=yes | |
3919 | fi | |
3920 | ||
3921 | ||
3922 | # Check whether --with-xml2 was given. | |
3923 | if test "${with_xml2+set}" = set; then : | |
3924 | withval=$with_xml2; | |
3925 | else | |
3926 | with_xml2=yes | |
3927 | fi | |
3928 | ||
3929 | ||
3930 | # Check whether --with-imagemagick was given. | |
3931 | if test "${with_imagemagick+set}" = set; then : | |
3932 | withval=$with_imagemagick; | |
3933 | else | |
3934 | with_imagemagick=yes | |
3935 | fi | |
3936 | ||
3937 | ||
3938 | ||
3939 | # Check whether --with-xft was given. | |
3940 | if test "${with_xft+set}" = set; then : | |
3941 | withval=$with_xft; | |
3942 | else | |
3943 | with_xft=yes | |
3944 | fi | |
3945 | ||
3946 | ||
3947 | # Check whether --with-libotf was given. | |
3948 | if test "${with_libotf+set}" = set; then : | |
3949 | withval=$with_libotf; | |
3950 | else | |
3951 | with_libotf=yes | |
3952 | fi | |
3953 | ||
3954 | ||
3955 | # Check whether --with-m17n-flt was given. | |
3956 | if test "${with_m17n_flt+set}" = set; then : | |
3957 | withval=$with_m17n_flt; | |
3958 | else | |
3959 | with_m17n_flt=yes | |
3960 | fi | |
3961 | ||
3962 | ||
3963 | ||
3964 | # Check whether --with-toolkit-scroll-bars was given. | |
3965 | if test "${with_toolkit_scroll_bars+set}" = set; then : | |
3966 | withval=$with_toolkit_scroll_bars; | |
3967 | else | |
3968 | with_toolkit_scroll_bars=yes | |
3969 | fi | |
3970 | ||
3971 | ||
3972 | # Check whether --with-xaw3d was given. | |
3973 | if test "${with_xaw3d+set}" = set; then : | |
3974 | withval=$with_xaw3d; | |
3975 | else | |
3976 | with_xaw3d=yes | |
3977 | fi | |
3978 | ||
3979 | ||
3980 | # Check whether --with-xim was given. | |
3981 | if test "${with_xim+set}" = set; then : | |
3982 | withval=$with_xim; | |
3983 | else | |
3984 | with_xim=yes | |
3985 | fi | |
3986 | ||
3987 | ||
3988 | # Check whether --with-ns was given. | |
3989 | if test "${with_ns+set}" = set; then : | |
3990 | withval=$with_ns; | |
3991 | else | |
3992 | with_ns=no | |
3993 | fi | |
3994 | ||
3995 | ||
3996 | ||
3997 | # Check whether --with-gpm was given. | |
3998 | if test "${with_gpm+set}" = set; then : | |
3999 | withval=$with_gpm; | |
4000 | else | |
4001 | with_gpm=yes | |
4002 | fi | |
4003 | ||
4004 | ||
4005 | # Check whether --with-dbus was given. | |
4006 | if test "${with_dbus+set}" = set; then : | |
4007 | withval=$with_dbus; | |
4008 | else | |
4009 | with_dbus=yes | |
4010 | fi | |
4011 | ||
4012 | ||
4013 | # Check whether --with-gconf was given. | |
4014 | if test "${with_gconf+set}" = set; then : | |
4015 | withval=$with_gconf; | |
4016 | else | |
4017 | with_gconf=yes | |
4018 | fi | |
4019 | ||
4020 | ||
f527bd02 GM |
4021 | # Check whether --with-gsettings was given. |
4022 | if test "${with_gsettings+set}" = set; then : | |
4023 | withval=$with_gsettings; | |
4024 | else | |
4025 | with_gsettings=yes | |
4026 | fi | |
4027 | ||
4028 | ||
067d23c9 KY |
4029 | # Check whether --with-selinux was given. |
4030 | if test "${with_selinux+set}" = set; then : | |
4031 | withval=$with_selinux; | |
4032 | else | |
4033 | with_selinux=yes | |
4034 | fi | |
4035 | ||
4036 | ||
4037 | # Check whether --with-gnutls was given. | |
4038 | if test "${with_gnutls+set}" = set; then : | |
4039 | withval=$with_gnutls; | |
4040 | else | |
4041 | with_gnutls=yes | |
4042 | fi | |
4043 | ||
4044 | ||
4045 | ## For the times when you want to build Emacs but don't have | |
4046 | ## a suitable makeinfo, and can live without the manuals. | |
4047 | ||
4048 | # Check whether --with-makeinfo was given. | |
4049 | if test "${with_makeinfo+set}" = set; then : | |
4050 | withval=$with_makeinfo; | |
4051 | else | |
4052 | with_makeinfo=yes | |
4053 | fi | |
4054 | ||
4055 | ||
4056 | ## This is an option because I do not know if all info/man support | |
4057 | ## compressed files, nor how to test if they do so. | |
4058 | ||
4059 | # Check whether --with-compress-info was given. | |
4060 | if test "${with_compress_info+set}" = set; then : | |
4061 | withval=$with_compress_info; | |
4062 | else | |
4063 | with_compress_info=yes | |
4064 | fi | |
4065 | ||
4066 | if test $with_compress_info = yes; then | |
4067 | GZIP_INFO=yes | |
4068 | else | |
4069 | GZIP_INFO= | |
4070 | fi | |
4071 | ||
4072 | ||
4073 | ||
4074 | # Check whether --with-pkg-config-prog was given. | |
4075 | if test "${with_pkg_config_prog+set}" = set; then : | |
4076 | withval=$with_pkg_config_prog; | |
4077 | fi | |
4078 | ||
4079 | if test "X${with_pkg_config_prog}" != X; then | |
4080 | if test "${with_pkg_config_prog}" != yes; then | |
4081 | PKG_CONFIG="${with_pkg_config_prog}" | |
4082 | fi | |
4083 | fi | |
4084 | ||
4085 | CRT_DIR= | |
4086 | ||
4087 | # Check whether --with-crt-dir was given. | |
4088 | if test "${with_crt_dir+set}" = set; then : | |
4089 | withval=$with_crt_dir; | |
4090 | fi | |
4091 | ||
4092 | CRT_DIR="${with_crt_dir}" | |
4093 | ||
4094 | ||
4fc5868a UM |
4095 | # Check whether --with-gameuser was given. |
4096 | if test "${with_gameuser+set}" = set; then : | |
4097 | withval=$with_gameuser; | |
4098 | fi | |
4099 | ||
4100 | test "X${with_gameuser}" != X && test "${with_gameuser}" != yes \ | |
4101 | && gameuser="${with_gameuser}" | |
4102 | test "X$gameuser" = X && gameuser=games | |
4103 | ||
4104 | ||
067d23c9 KY |
4105 | # Check whether --with-gnustep-conf was given. |
4106 | if test "${with_gnustep_conf+set}" = set; then : | |
4107 | withval=$with_gnustep_conf; | |
4108 | fi | |
4109 | ||
4110 | test "X${with_gnustep_conf}" != X && test "${with_gnustep_conf}" != yes && \ | |
4111 | GNUSTEP_CONFIG_FILE="${with_gnustep_conf}" | |
4112 | test "X$GNUSTEP_CONFIG_FILE" = "X" && \ | |
4113 | GNUSTEP_CONFIG_FILE=/etc/GNUstep/GNUstep.conf | |
4114 | ||
4115 | # Check whether --enable-ns-self-contained was given. | |
4116 | if test "${enable_ns_self_contained+set}" = set; then : | |
4117 | enableval=$enable_ns_self_contained; EN_NS_SELF_CONTAINED=$enableval | |
4118 | else | |
4119 | EN_NS_SELF_CONTAINED=yes | |
4120 | fi | |
4121 | ||
4122 | ||
4123 | # Check whether --enable-asserts was given. | |
4124 | if test "${enable_asserts+set}" = set; then : | |
4125 | enableval=$enable_asserts; USE_XASSERTS=$enableval | |
4126 | else | |
4127 | USE_XASSERTS=no | |
4128 | fi | |
4129 | ||
4130 | ||
4131 | # Check whether --enable-maintainer-mode was given. | |
4132 | if test "${enable_maintainer_mode+set}" = set; then : | |
4133 | enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval | |
4134 | else | |
dccef361 | 4135 | USE_MAINTAINER_MODE=yes |
067d23c9 KY |
4136 | fi |
4137 | ||
4138 | if test $USE_MAINTAINER_MODE = yes; then | |
4139 | MAINT= | |
4140 | else | |
4141 | MAINT=# | |
4142 | fi | |
4143 | ||
4144 | ||
4145 | # Check whether --enable-locallisppath was given. | |
4146 | if test "${enable_locallisppath+set}" = set; then : | |
4147 | enableval=$enable_locallisppath; if test "${enableval}" = "no"; then | |
4148 | locallisppath= | |
4149 | elif test "${enableval}" != "yes"; then | |
4150 | locallisppath=${enableval} | |
4151 | fi | |
4152 | fi | |
4153 | ||
4154 | ||
4155 | # Check whether --enable-checking was given. | |
4156 | if test "${enable_checking+set}" = set; then : | |
4157 | enableval=$enable_checking; ac_checking_flags="${enableval}" | |
4158 | fi | |
4159 | ||
4160 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS," | |
4161 | for check in $ac_checking_flags | |
4162 | do | |
4163 | case $check in | |
4164 | # these set all the flags to specific states | |
4165 | yes) ac_enable_checking=1 ;; | |
4166 | no) ac_enable_checking= ; | |
4167 | ac_gc_check_stringbytes= ; | |
4168 | ac_gc_check_string_overrun= ; | |
4169 | ac_gc_check_string_free_list= ; | |
4170 | ac_xmalloc_overrun= ; | |
4171 | ac_gc_check_cons_list= ;; | |
4172 | all) ac_enable_checking=1 ; | |
4173 | ac_gc_check_stringbytes=1 ; | |
4174 | ac_gc_check_string_overrun=1 ; | |
4175 | ac_gc_check_string_free_list=1 ; | |
4176 | ac_xmalloc_overrun=1 ; | |
4177 | ac_gc_check_cons_list=1 ;; | |
4178 | # these enable particular checks | |
4179 | stringbytes) ac_gc_check_stringbytes=1 ;; | |
4180 | stringoverrun) ac_gc_check_string_overrun=1 ;; | |
4181 | stringfreelist) ac_gc_check_string_free_list=1 ;; | |
4182 | xmallocoverrun) ac_xmalloc_overrun=1 ;; | |
4183 | conslist) ac_gc_check_cons_list=1 ;; | |
5f64f7bd | 4184 | *) as_fn_error "unknown check category $check" "$LINENO" 5 ;; |
067d23c9 KY |
4185 | esac |
4186 | done | |
4187 | IFS="$ac_save_IFS" | |
4188 | ||
4189 | if test x$ac_enable_checking != x ; then | |
4190 | ||
4191 | $as_echo "#define ENABLE_CHECKING 1" >>confdefs.h | |
4192 | ||
4193 | fi | |
4194 | if test x$ac_gc_check_stringbytes != x ; then | |
4195 | ||
4196 | $as_echo "#define GC_CHECK_STRING_BYTES 1" >>confdefs.h | |
4197 | ||
4198 | fi | |
4fda9c95 | 4199 | if test x$ac_gc_check_string_overrun != x ; then |
067d23c9 KY |
4200 | |
4201 | $as_echo "#define GC_CHECK_STRING_OVERRUN 1" >>confdefs.h | |
4202 | ||
4203 | fi | |
4204 | if test x$ac_gc_check_string_free_list != x ; then | |
4205 | ||
4206 | $as_echo "#define GC_CHECK_STRING_FREE_LIST 1" >>confdefs.h | |
4207 | ||
4208 | fi | |
4209 | if test x$ac_xmalloc_overrun != x ; then | |
4210 | ||
4211 | $as_echo "#define XMALLOC_OVERRUN_CHECK 1" >>confdefs.h | |
4212 | ||
4213 | fi | |
4214 | if test x$ac_gc_check_cons_list != x ; then | |
4215 | ||
4216 | $as_echo "#define GC_CHECK_CONS_LIST 1" >>confdefs.h | |
4217 | ||
4218 | fi | |
4219 | ||
4220 | # Check whether --enable-use-lisp-union-type was given. | |
4221 | if test "${enable_use_lisp_union_type+set}" = set; then : | |
4222 | enableval=$enable_use_lisp_union_type; if test "${enableval}" != "no"; then | |
4223 | ||
4224 | $as_echo "#define USE_LISP_UNION_TYPE 1" >>confdefs.h | |
4225 | ||
4226 | fi | |
4227 | fi | |
4228 | ||
4229 | ||
4230 | ||
4231 | # Check whether --enable-profiling was given. | |
4232 | if test "${enable_profiling+set}" = set; then : | |
4233 | enableval=$enable_profiling; ac_enable_profiling="${enableval}" | |
4234 | fi | |
4235 | ||
4236 | if test x$ac_enable_profiling != x ; then | |
4237 | PROFILING_CFLAGS="-DPROFILING=1 -pg" | |
4238 | else | |
4239 | PROFILING_CFLAGS= | |
4240 | fi | |
4241 | ||
4242 | ||
4243 | # Check whether --enable-autodepend was given. | |
4244 | if test "${enable_autodepend+set}" = set; then : | |
4245 | enableval=$enable_autodepend; ac_enable_autodepend="${enableval}" | |
4246 | else | |
4247 | ac_enable_autodepend=yes | |
4248 | fi | |
4249 | ||
4250 | ||
4251 | #### Make srcdir absolute, if it isn't already. It's important to | |
4252 | #### avoid running the path through pwd unnecessarily, since pwd can | |
4253 | #### give you automounter prefixes, which can go away. We do all this | |
4254 | #### so Emacs can find its files when run uninstalled. | |
4255 | ## Make sure CDPATH doesn't affect cd (in case PWD is relative). | |
4256 | unset CDPATH | |
4257 | case "${srcdir}" in | |
4258 | /* ) ;; | |
4259 | . ) | |
4260 | ## We may be able to use the $PWD environment variable to make this | |
4261 | ## absolute. But sometimes PWD is inaccurate. | |
4262 | ## Note: we used to use ${PWD} at the end instead of `pwd`, | |
4263 | ## but that tested only for a well-formed and valid PWD, | |
4264 | ## it did not object when PWD was well-formed and valid but just wrong. | |
4265 | if test ".${PWD}" != "." && test ".`(cd ${PWD} ; sh -c pwd)`" = ".`pwd`" ; | |
4266 | then | |
4267 | srcdir="$PWD" | |
4268 | else | |
4269 | srcdir="`(cd ${srcdir}; pwd)`" | |
4270 | fi | |
4271 | ;; | |
4272 | * ) srcdir="`(cd ${srcdir}; pwd)`" ;; | |
4273 | esac | |
4274 | ||
067d23c9 KY |
4275 | #### Given the configuration name, set machfile and opsysfile to the |
4276 | #### names of the m/*.h and s/*.h files we should use. | |
4277 | ||
4278 | ### Canonicalize the configuration name. | |
4279 | ||
067d23c9 KY |
4280 | # Make sure we can run config.sub. |
4281 | $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || | |
5f64f7bd | 4282 | as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 |
067d23c9 KY |
4283 | |
4284 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 | |
4285 | $as_echo_n "checking build system type... " >&6; } | |
5f64f7bd | 4286 | if test "${ac_cv_build+set}" = set; then : |
067d23c9 KY |
4287 | $as_echo_n "(cached) " >&6 |
4288 | else | |
4289 | ac_build_alias=$build_alias | |
4290 | test "x$ac_build_alias" = x && | |
4291 | ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` | |
4292 | test "x$ac_build_alias" = x && | |
5f64f7bd | 4293 | as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 |
067d23c9 | 4294 | ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || |
5f64f7bd | 4295 | as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 |
067d23c9 KY |
4296 | |
4297 | fi | |
4298 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 | |
4299 | $as_echo "$ac_cv_build" >&6; } | |
4300 | case $ac_cv_build in | |
4301 | *-*-*) ;; | |
5f64f7bd | 4302 | *) as_fn_error "invalid value of canonical build" "$LINENO" 5;; |
067d23c9 KY |
4303 | esac |
4304 | build=$ac_cv_build | |
4305 | ac_save_IFS=$IFS; IFS='-' | |
4306 | set x $ac_cv_build | |
4307 | shift | |
4308 | build_cpu=$1 | |
4309 | build_vendor=$2 | |
4310 | shift; shift | |
4311 | # Remember, the first character of IFS is used to create $*, | |
4312 | # except with old shells: | |
4313 | build_os=$* | |
4314 | IFS=$ac_save_IFS | |
4315 | case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac | |
4316 | ||
4317 | ||
4318 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 | |
4319 | $as_echo_n "checking host system type... " >&6; } | |
5f64f7bd | 4320 | if test "${ac_cv_host+set}" = set; then : |
067d23c9 KY |
4321 | $as_echo_n "(cached) " >&6 |
4322 | else | |
4323 | if test "x$host_alias" = x; then | |
4324 | ac_cv_host=$ac_cv_build | |
4325 | else | |
4326 | ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || | |
5f64f7bd | 4327 | as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 |
067d23c9 KY |
4328 | fi |
4329 | ||
4330 | fi | |
4331 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 | |
4332 | $as_echo "$ac_cv_host" >&6; } | |
4333 | case $ac_cv_host in | |
4334 | *-*-*) ;; | |
5f64f7bd | 4335 | *) as_fn_error "invalid value of canonical host" "$LINENO" 5;; |
067d23c9 KY |
4336 | esac |
4337 | host=$ac_cv_host | |
4338 | ac_save_IFS=$IFS; IFS='-' | |
4339 | set x $ac_cv_host | |
4340 | shift | |
4341 | host_cpu=$1 | |
4342 | host_vendor=$2 | |
4343 | shift; shift | |
4344 | # Remember, the first character of IFS is used to create $*, | |
4345 | # except with old shells: | |
4346 | host_os=$* | |
4347 | IFS=$ac_save_IFS | |
4348 | case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac | |
4349 | ||
4350 | ||
4351 | canonical=$host | |
4352 | configuration=${host_alias-${build_alias-$host}} | |
4353 | ||
4354 | ||
4355 | ||
4356 | ### If you add support for a new configuration, add code to this | |
4357 | ### switch statement to recognize your configuration name and select | |
4358 | ### the appropriate operating system and machine description files. | |
4359 | ||
4360 | ### You would hope that you could choose an m/*.h file pretty much | |
4361 | ### based on the machine portion of the configuration name, and an s/*.h | |
4362 | ### file based on the operating system portion. However, it turns out | |
4363 | ### that each m/*.h file is pretty manufacturer-specific - for | |
4364 | ### example mips.h is MIPS | |
4365 | ### So we basically have to have a special case for each | |
4366 | ### configuration name. | |
4367 | ### | |
4368 | ### As far as handling version numbers on operating systems is | |
4369 | ### concerned, make sure things will fail in a fixable way. If | |
4370 | ### /etc/MACHINES doesn't say anything about version numbers, be | |
4371 | ### prepared to handle anything reasonably. If version numbers | |
4372 | ### matter, be sure /etc/MACHINES says something about it. | |
4373 | ||
4374 | machine='' opsys='' unported=no | |
4375 | case "${canonical}" in | |
4376 | ||
d6a003a8 AS |
4377 | ## GNU/Linux ports |
4378 | *-*-linux-gnu*) | |
4379 | opsys=gnu-linux | |
4380 | case ${canonical} in | |
4381 | alpha*) machine=alpha ;; | |
4382 | s390-*) machine=ibms390 ;; | |
4383 | s390x-*) machine=ibms390x ;; | |
4384 | powerpc*) machine=macppc ;; | |
4385 | sparc*) machine=sparc ;; | |
4386 | ia64*) machine=ia64 ;; | |
4387 | m68k*) machine=m68k ;; | |
4388 | x86_64*) machine=amdx86-64 ;; | |
4389 | esac | |
4390 | ;; | |
4391 | ||
067d23c9 KY |
4392 | ## FreeBSD ports |
4393 | *-*-freebsd* ) | |
4394 | opsys=freebsd | |
4395 | case "${canonical}" in | |
4396 | alpha*) machine=alpha ;; | |
4397 | amd64-*|x86_64-*) machine=amdx86-64 ;; | |
067d23c9 KY |
4398 | ia64-*) machine=ia64 ;; |
4399 | i[3456]86-*) machine=intel386 ;; | |
4400 | powerpc-*) machine=macppc ;; | |
4401 | sparc-*) machine=sparc ;; | |
4402 | sparc64-*) machine=sparc ;; | |
4403 | esac | |
4404 | ;; | |
4405 | ||
4406 | ## FreeBSD kernel + glibc based userland | |
4407 | *-*-kfreebsd*gnu* ) | |
4408 | opsys=gnu-kfreebsd | |
4409 | case "${canonical}" in | |
4410 | alpha*) machine=alpha ;; | |
4411 | amd64-*|x86_64-*) machine=amdx86-64 ;; | |
4412 | ia64-*) machine=ia64 ;; | |
4413 | i[3456]86-*) machine=intel386 ;; | |
4414 | powerpc-*) machine=macppc ;; | |
4415 | sparc-*) machine=sparc ;; | |
4416 | sparc64-*) machine=sparc ;; | |
4417 | esac | |
4418 | ;; | |
4419 | ||
4420 | ## NetBSD ports | |
4421 | *-*-netbsd* ) | |
4422 | opsys=netbsd | |
4423 | case "${canonical}" in | |
4424 | alpha*) machine=alpha ;; | |
4425 | x86_64-*) machine=amdx86-64 ;; | |
067d23c9 KY |
4426 | i[3456]86-*) machine=intel386 ;; |
4427 | m68k-*) machine=m68k ;; | |
4428 | powerpc-*) machine=macppc ;; | |
067d23c9 KY |
4429 | sparc*-) machine=sparc ;; |
4430 | vax-*) machine=vax ;; | |
4431 | esac | |
4432 | ;; | |
4433 | ||
4434 | ## OpenBSD ports | |
4435 | *-*-openbsd* ) | |
4436 | opsys=openbsd | |
4437 | case "${canonical}" in | |
4438 | alpha*) machine=alpha ;; | |
4439 | x86_64-*) machine=amdx86-64 ;; | |
067d23c9 KY |
4440 | i386-*) machine=intel386 ;; |
4441 | powerpc-*) machine=macppc ;; | |
4442 | sparc*) machine=sparc ;; | |
4443 | vax-*) machine=vax ;; | |
4444 | esac | |
4445 | ;; | |
4446 | ||
067d23c9 KY |
4447 | ## Apple Darwin / Mac OS X |
4448 | *-apple-darwin* ) | |
4449 | case "${canonical}" in | |
4450 | i[3456]86-* ) machine=intel386 ;; | |
4451 | powerpc-* ) machine=macppc ;; | |
4452 | x86_64-* ) machine=amdx86-64 ;; | |
4453 | * ) unported=yes ;; | |
4454 | esac | |
4455 | opsys=darwin | |
4456 | # Define CPP as follows to make autoconf work correctly. | |
4457 | CPP="${CC-cc} -E -no-cpp-precomp" | |
4458 | # Use fink packages if available. | |
4459 | if test -d /sw/include && test -d /sw/lib; then | |
4460 | GCC_TEST_OPTIONS="-I/sw/include -L/sw/lib" | |
4461 | CPP="${CPP} ${GCC_TEST_OPTIONS}" | |
4462 | NON_GCC_TEST_OPTIONS=${GCC_TEST_OPTIONS} | |
4463 | fi | |
4464 | ;; | |
4465 | ||
4466 | ## HP 9000 series 700 and 800, running HP/UX | |
4467 | hppa*-hp-hpux10.2* ) | |
d6a003a8 | 4468 | opsys=hpux10-20 |
067d23c9 KY |
4469 | ;; |
4470 | hppa*-hp-hpux1[1-9]* ) | |
d6a003a8 | 4471 | opsys=hpux11 |
067d23c9 KY |
4472 | CFLAGS="-D_INCLUDE__STDC_A1_SOURCE $CFLAGS" |
4473 | ;; | |
4474 | ||
125c3718 PE |
4475 | ia64*-hp-hpux1[1-9]* ) |
4476 | machine=hp800 opsys=hpux11 | |
4477 | ## FIXME. Peter O'Gorman reports that dumping using unexelf.o doesn't | |
4478 | ## work either: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=6811 | |
4479 | CANNOT_DUMP=yes | |
4480 | ;; | |
4481 | ||
4482 | hppa*-*-linux-gnu* ) | |
4483 | machine=hp800 opsys=gnu-linux | |
4484 | ;; | |
4485 | ||
067d23c9 | 4486 | ## IBM machines |
067d23c9 KY |
4487 | rs6000-ibm-aix4.[23]* ) |
4488 | machine=ibmrs6000 opsys=aix4-2 | |
4489 | ;; | |
4490 | powerpc-ibm-aix4.[23]* ) | |
4491 | machine=ibmrs6000 opsys=aix4-2 | |
4492 | ;; | |
4493 | rs6000-ibm-aix[56]* ) | |
4494 | machine=ibmrs6000 opsys=aix4-2 | |
4495 | ;; | |
4496 | powerpc-ibm-aix[56]* ) | |
4497 | machine=ibmrs6000 opsys=aix4-2 | |
4498 | ;; | |
4499 | ||
067d23c9 KY |
4500 | ## Silicon Graphics machines |
4501 | ## Iris 4D | |
4502 | mips-sgi-irix6.5 ) | |
fd44db7f | 4503 | opsys=irix6-5 |
067d23c9 KY |
4504 | # Without defining _LANGUAGE_C, things get masked out in the headers |
4505 | # so that, for instance, grepping for `free' in stdlib.h fails and | |
4506 | # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m). | |
4507 | NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C" | |
4508 | NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C" | |
4509 | ;; | |
4510 | ||
4511 | ## Suns | |
067d23c9 KY |
4512 | *-sun-solaris* \ |
4513 | | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* \ | |
4514 | | x86_64-*-solaris2* | x86_64-*-sunos5*) | |
4515 | case "${canonical}" in | |
4516 | i[3456]86-*-* ) machine=intel386 ;; | |
4517 | amd64-*-*|x86_64-*-*) machine=amdx86-64 ;; | |
4518 | sparc* ) machine=sparc ;; | |
4519 | * ) unported=yes ;; | |
4520 | esac | |
4521 | case "${canonical}" in | |
4522 | *-sunos5.6* | *-solaris2.6* ) | |
4523 | opsys=sol2-6 | |
4524 | NON_GNU_CPP=/usr/ccs/lib/cpp | |
4525 | RANLIB="ar -ts" | |
4526 | ;; | |
4527 | *-sunos5.[7-9]* | *-solaris2.[7-9]* ) | |
4528 | opsys=sol2-6 | |
4529 | emacs_check_sunpro_c=yes | |
4530 | NON_GNU_CPP=/usr/ccs/lib/cpp | |
4531 | ;; | |
4532 | *-sunos5* | *-solaris* ) | |
4533 | opsys=sol2-10 | |
4534 | emacs_check_sunpro_c=yes | |
4535 | NON_GNU_CPP=/usr/ccs/lib/cpp | |
4536 | ;; | |
4537 | esac | |
4538 | ## Watch out for a compiler that we know will not work. | |
4539 | case "${canonical}" in | |
4540 | *-solaris* | *-sunos5* ) | |
4541 | if [ "x$CC" = x/usr/ucb/cc ]; then | |
4542 | ## /usr/ucb/cc doesn't work; | |
4543 | ## we should find some other compiler that does work. | |
4544 | unset CC | |
4545 | fi | |
4546 | ;; | |
4547 | *) ;; | |
4548 | esac | |
4549 | ;; | |
4550 | ||
067d23c9 KY |
4551 | ## Intel 386 machines where we don't care about the manufacturer. |
4552 | i[3456]86-*-* ) | |
4553 | machine=intel386 | |
4554 | case "${canonical}" in | |
4555 | *-cygwin ) opsys=cygwin ;; | |
4556 | *-darwin* ) opsys=darwin | |
4557 | CPP="${CC-cc} -E -no-cpp-precomp" | |
4558 | ;; | |
067d23c9 KY |
4559 | *-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;; |
4560 | *-sysv5uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;; | |
4561 | *-sysv5OpenUNIX* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;; | |
4562 | ## Otherwise, we'll fall through to the generic opsys code at the bottom. | |
4563 | esac | |
4564 | ;; | |
4565 | ||
067d23c9 KY |
4566 | * ) |
4567 | unported=yes | |
4568 | ;; | |
4569 | esac | |
4570 | ||
4571 | ### If the code above didn't choose an operating system, just choose | |
4572 | ### an operating system based on the configuration name. You really | |
4573 | ### only want to use this when you have no idea what the right | |
4574 | ### operating system is; if you know what operating systems a machine | |
4575 | ### runs, it's cleaner to make it explicit in the case statement | |
4576 | ### above. | |
4577 | if test x"${opsys}" = x; then | |
4578 | case "${canonical}" in | |
4579 | *-gnu* ) opsys=gnu ;; | |
4580 | * ) | |
4581 | unported=yes | |
4582 | ;; | |
4583 | esac | |
4584 | fi | |
4585 | ||
4586 | ||
4587 | ||
4588 | if test $unported = yes; then | |
5f64f7bd | 4589 | as_fn_error "Emacs hasn't been ported to \`${canonical}' systems. |
067d23c9 KY |
4590 | Check \`etc/MACHINES' for recognized configuration names." "$LINENO" 5 |
4591 | fi | |
4592 | ||
d6a003a8 AS |
4593 | if test -n "$machine"; then |
4594 | machfile="m/${machine}.h" | |
4595 | else | |
4596 | machfile= | |
4597 | fi | |
067d23c9 KY |
4598 | opsysfile="s/${opsys}.h" |
4599 | ||
4600 | ||
4601 | #### Choose a compiler. | |
4602 | test -n "$CC" && cc_specified=yes | |
4603 | ||
4604 | # Save the value of CFLAGS that the user specified. | |
4605 | SPECIFIED_CFLAGS="$CFLAGS" | |
4606 | ||
4607 | ac_ext=c | |
4608 | ac_cpp='$CPP $CPPFLAGS' | |
4609 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
4610 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
4611 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
4612 | if test -n "$ac_tool_prefix"; then | |
4613 | # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. | |
4614 | set dummy ${ac_tool_prefix}gcc; ac_word=$2 | |
4615 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4616 | $as_echo_n "checking for $ac_word... " >&6; } | |
5f64f7bd | 4617 | if test "${ac_cv_prog_CC+set}" = set; then : |
067d23c9 KY |
4618 | $as_echo_n "(cached) " >&6 |
4619 | else | |
4620 | if test -n "$CC"; then | |
4621 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
4622 | else | |
4623 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4624 | for as_dir in $PATH | |
4625 | do | |
4626 | IFS=$as_save_IFS | |
4627 | test -z "$as_dir" && as_dir=. | |
4628 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4629 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
4630 | ac_cv_prog_CC="${ac_tool_prefix}gcc" | |
4631 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4632 | break 2 | |
4633 | fi | |
4634 | done | |
4635 | done | |
4636 | IFS=$as_save_IFS | |
4637 | ||
4638 | fi | |
4639 | fi | |
4640 | CC=$ac_cv_prog_CC | |
4641 | if test -n "$CC"; then | |
4642 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
4643 | $as_echo "$CC" >&6; } | |
4644 | else | |
4645 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4646 | $as_echo "no" >&6; } | |
4647 | fi | |
4648 | ||
4649 | ||
4650 | fi | |
4651 | if test -z "$ac_cv_prog_CC"; then | |
4652 | ac_ct_CC=$CC | |
4653 | # Extract the first word of "gcc", so it can be a program name with args. | |
4654 | set dummy gcc; ac_word=$2 | |
4655 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4656 | $as_echo_n "checking for $ac_word... " >&6; } | |
5f64f7bd | 4657 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : |
067d23c9 KY |
4658 | $as_echo_n "(cached) " >&6 |
4659 | else | |
4660 | if test -n "$ac_ct_CC"; then | |
4661 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
4662 | else | |
4663 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4664 | for as_dir in $PATH | |
4665 | do | |
4666 | IFS=$as_save_IFS | |
4667 | test -z "$as_dir" && as_dir=. | |
4668 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4669 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
4670 | ac_cv_prog_ac_ct_CC="gcc" | |
4671 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4672 | break 2 | |
4673 | fi | |
4674 | done | |
4675 | done | |
4676 | IFS=$as_save_IFS | |
4677 | ||
4678 | fi | |
4679 | fi | |
4680 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
4681 | if test -n "$ac_ct_CC"; then | |
4682 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 | |
4683 | $as_echo "$ac_ct_CC" >&6; } | |
4684 | else | |
4685 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4686 | $as_echo "no" >&6; } | |
4687 | fi | |
4688 | ||
4689 | if test "x$ac_ct_CC" = x; then | |
4690 | CC="" | |
4691 | else | |
4692 | case $cross_compiling:$ac_tool_warned in | |
4693 | yes:) | |
4694 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
4695 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
4696 | ac_tool_warned=yes ;; | |
4697 | esac | |
4698 | CC=$ac_ct_CC | |
4699 | fi | |
4700 | else | |
4701 | CC="$ac_cv_prog_CC" | |
4702 | fi | |
4703 | ||
4704 | if test -z "$CC"; then | |
4705 | if test -n "$ac_tool_prefix"; then | |
4706 | # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. | |
4707 | set dummy ${ac_tool_prefix}cc; ac_word=$2 | |
4708 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4709 | $as_echo_n "checking for $ac_word... " >&6; } | |
5f64f7bd | 4710 | if test "${ac_cv_prog_CC+set}" = set; then : |
067d23c9 KY |
4711 | $as_echo_n "(cached) " >&6 |
4712 | else | |
4713 | if test -n "$CC"; then | |
4714 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
4715 | else | |
4716 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4717 | for as_dir in $PATH | |
4718 | do | |
4719 | IFS=$as_save_IFS | |
4720 | test -z "$as_dir" && as_dir=. | |
4721 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4722 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
4723 | ac_cv_prog_CC="${ac_tool_prefix}cc" | |
4724 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4725 | break 2 | |
4726 | fi | |
4727 | done | |
4728 | done | |
4729 | IFS=$as_save_IFS | |
4730 | ||
4731 | fi | |
4732 | fi | |
4733 | CC=$ac_cv_prog_CC | |
4734 | if test -n "$CC"; then | |
4735 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
4736 | $as_echo "$CC" >&6; } | |
4737 | else | |
4738 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4739 | $as_echo "no" >&6; } | |
4740 | fi | |
4741 | ||
4742 | ||
4743 | fi | |
4744 | fi | |
4745 | if test -z "$CC"; then | |
4746 | # Extract the first word of "cc", so it can be a program name with args. | |
4747 | set dummy cc; ac_word=$2 | |
4748 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4749 | $as_echo_n "checking for $ac_word... " >&6; } | |
5f64f7bd | 4750 | if test "${ac_cv_prog_CC+set}" = set; then : |
067d23c9 KY |
4751 | $as_echo_n "(cached) " >&6 |
4752 | else | |
4753 | if test -n "$CC"; then | |
4754 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
4755 | else | |
4756 | ac_prog_rejected=no | |
4757 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4758 | for as_dir in $PATH | |
4759 | do | |
4760 | IFS=$as_save_IFS | |
4761 | test -z "$as_dir" && as_dir=. | |
4762 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4763 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
4764 | if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then | |
4765 | ac_prog_rejected=yes | |
4766 | continue | |
4767 | fi | |
4768 | ac_cv_prog_CC="cc" | |
4769 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4770 | break 2 | |
4771 | fi | |
4772 | done | |
4773 | done | |
4774 | IFS=$as_save_IFS | |
4775 | ||
4776 | if test $ac_prog_rejected = yes; then | |
4777 | # We found a bogon in the path, so make sure we never use it. | |
4778 | set dummy $ac_cv_prog_CC | |
4779 | shift | |
4780 | if test $# != 0; then | |
4781 | # We chose a different compiler from the bogus one. | |
4782 | # However, it has the same basename, so the bogon will be chosen | |
4783 | # first if we set CC to just the basename; use the full file name. | |
4784 | shift | |
4785 | ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" | |
4786 | fi | |
4787 | fi | |
4788 | fi | |
4789 | fi | |
4790 | CC=$ac_cv_prog_CC | |
4791 | if test -n "$CC"; then | |
4792 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
4793 | $as_echo "$CC" >&6; } | |
4794 | else | |
4795 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4796 | $as_echo "no" >&6; } | |
4797 | fi | |
4798 | ||
4799 | ||
4800 | fi | |
4801 | if test -z "$CC"; then | |
4802 | if test -n "$ac_tool_prefix"; then | |
4803 | for ac_prog in cl.exe | |
4804 | do | |
4805 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | |
4806 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | |
4807 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4808 | $as_echo_n "checking for $ac_word... " >&6; } | |
5f64f7bd | 4809 | if test "${ac_cv_prog_CC+set}" = set; then : |
067d23c9 KY |
4810 | $as_echo_n "(cached) " >&6 |
4811 | else | |
4812 | if test -n "$CC"; then | |
4813 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
4814 | else | |
4815 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4816 | for as_dir in $PATH | |
4817 | do | |
4818 | IFS=$as_save_IFS | |
4819 | test -z "$as_dir" && as_dir=. | |
4820 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4821 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
4822 | ac_cv_prog_CC="$ac_tool_prefix$ac_prog" | |
4823 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4824 | break 2 | |
4825 | fi | |
4826 | done | |
4827 | done | |
4828 | IFS=$as_save_IFS | |
4829 | ||
4830 | fi | |
4831 | fi | |
4832 | CC=$ac_cv_prog_CC | |
4833 | if test -n "$CC"; then | |
4834 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
4835 | $as_echo "$CC" >&6; } | |
4836 | else | |
4837 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4838 | $as_echo "no" >&6; } | |
4839 | fi | |
4840 | ||
4841 | ||
4842 | test -n "$CC" && break | |
4843 | done | |
4844 | fi | |
4845 | if test -z "$CC"; then | |
4846 | ac_ct_CC=$CC | |
4847 | for ac_prog in cl.exe | |
4848 | do | |
4849 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
4850 | set dummy $ac_prog; ac_word=$2 | |
4851 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4852 | $as_echo_n "checking for $ac_word... " >&6; } | |
5f64f7bd | 4853 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : |
067d23c9 KY |
4854 | $as_echo_n "(cached) " >&6 |
4855 | else | |
4856 | if test -n "$ac_ct_CC"; then | |
4857 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
4858 | else | |
4859 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4860 | for as_dir in $PATH | |
4861 | do | |
4862 | IFS=$as_save_IFS | |
4863 | test -z "$as_dir" && as_dir=. | |
4864 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4865 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
4866 | ac_cv_prog_ac_ct_CC="$ac_prog" | |
4867 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4868 | break 2 | |
4869 | fi | |
4870 | done | |
4871 | done | |
4872 | IFS=$as_save_IFS | |
4873 | ||
4874 | fi | |
4875 | fi | |
4876 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
4877 | if test -n "$ac_ct_CC"; then | |
4878 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 | |
4879 | $as_echo "$ac_ct_CC" >&6; } | |
4880 | else | |
4881 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4882 | $as_echo "no" >&6; } | |
4883 | fi | |
4884 | ||
4885 | ||
4886 | test -n "$ac_ct_CC" && break | |
4887 | done | |
4888 | ||
4889 | if test "x$ac_ct_CC" = x; then | |
4890 | CC="" | |
4891 | else | |
4892 | case $cross_compiling:$ac_tool_warned in | |
4893 | yes:) | |
4894 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
4895 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
4896 | ac_tool_warned=yes ;; | |
4897 | esac | |
4898 | CC=$ac_ct_CC | |
4899 | fi | |
4900 | fi | |
4901 | ||
4902 | fi | |
4903 | ||
4904 | ||
4905 | test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
4906 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
5f64f7bd GM |
4907 | as_fn_error "no acceptable C compiler found in \$PATH |
4908 | See \`config.log' for more details." "$LINENO" 5; } | |
067d23c9 KY |
4909 | |
4910 | # Provide some information about the compiler. | |
4911 | $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 | |
4912 | set X $ac_compile | |
4913 | ac_compiler=$2 | |
4914 | for ac_option in --version -v -V -qversion; do | |
4915 | { { ac_try="$ac_compiler $ac_option >&5" | |
4916 | case "(($ac_try" in | |
4917 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4918 | *) ac_try_echo=$ac_try;; | |
4919 | esac | |
4920 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
4921 | $as_echo "$ac_try_echo"; } >&5 | |
4922 | (eval "$ac_compiler $ac_option >&5") 2>conftest.err | |
4923 | ac_status=$? | |
4924 | if test -s conftest.err; then | |
4925 | sed '10a\ | |
4926 | ... rest of stderr output deleted ... | |
4927 | 10q' conftest.err >conftest.er1 | |
4928 | cat conftest.er1 >&5 | |
4929 | fi | |
4930 | rm -f conftest.er1 conftest.err | |
4931 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
4932 | test $ac_status = 0; } | |
4933 | done | |
4934 | ||
4935 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4936 | /* end confdefs.h. */ | |
4937 | ||
4938 | int | |
4939 | main () | |
4940 | { | |
4941 | ||
4942 | ; | |
4943 | return 0; | |
4944 | } | |
4945 | _ACEOF | |
4946 | ac_clean_files_save=$ac_clean_files | |
4947 | ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" | |
4948 | # Try to create an executable without -o first, disregard a.out. | |
4949 | # It will help us diagnose broken compilers, and finding out an intuition | |
4950 | # of exeext. | |
4951 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 | |
4952 | $as_echo_n "checking whether the C compiler works... " >&6; } | |
4953 | ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` | |
4954 | ||
4955 | # The possible output files: | |
4956 | ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" | |
4957 | ||
4958 | ac_rmfiles= | |
4959 | for ac_file in $ac_files | |
4960 | do | |
4961 | case $ac_file in | |
4962 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; | |
4963 | * ) ac_rmfiles="$ac_rmfiles $ac_file";; | |
4964 | esac | |
4965 | done | |
4966 | rm -f $ac_rmfiles | |
4967 | ||
4968 | if { { ac_try="$ac_link_default" | |
4969 | case "(($ac_try" in | |
4970 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4971 | *) ac_try_echo=$ac_try;; | |
4972 | esac | |
4973 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
4974 | $as_echo "$ac_try_echo"; } >&5 | |
4975 | (eval "$ac_link_default") 2>&5 | |
4976 | ac_status=$? | |
4977 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
4978 | test $ac_status = 0; }; then : | |
4979 | # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. | |
4980 | # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' | |
4981 | # in a Makefile. We should not override ac_cv_exeext if it was cached, | |
4982 | # so that the user can short-circuit this test for compilers unknown to | |
4983 | # Autoconf. | |
4984 | for ac_file in $ac_files '' | |
4985 | do | |
4986 | test -f "$ac_file" || continue | |
4987 | case $ac_file in | |
4988 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) | |
4989 | ;; | |
4990 | [ab].out ) | |
4991 | # We found the default executable, but exeext='' is most | |
4992 | # certainly right. | |
4993 | break;; | |
4994 | *.* ) | |
4995 | if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; | |
4996 | then :; else | |
4997 | ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` | |
4998 | fi | |
4999 | # We set ac_cv_exeext here because the later test for it is not | |
5000 | # safe: cross compilers may not add the suffix if given an `-o' | |
5001 | # argument, so we may need to know it at that point already. | |
5002 | # Even if this section looks crufty: it has the advantage of | |
5003 | # actually working. | |
5004 | break;; | |
5005 | * ) | |
5006 | break;; | |
5007 | esac | |
5008 | done | |
5009 | test "$ac_cv_exeext" = no && ac_cv_exeext= | |
5010 | ||
5011 | else | |
5012 | ac_file='' | |
5013 | fi | |
5014 | if test -z "$ac_file"; then : | |
5015 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
5016 | $as_echo "no" >&6; } | |
5017 | $as_echo "$as_me: failed program was:" >&5 | |
5018 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5019 | ||
5020 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
5021 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
5f64f7bd GM |
5022 | { as_fn_set_status 77 |
5023 | as_fn_error "C compiler cannot create executables | |
5024 | See \`config.log' for more details." "$LINENO" 5; }; } | |
067d23c9 KY |
5025 | else |
5026 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
5027 | $as_echo "yes" >&6; } | |
5028 | fi | |
5029 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 | |
5030 | $as_echo_n "checking for C compiler default output file name... " >&6; } | |
5031 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 | |
5032 | $as_echo "$ac_file" >&6; } | |
5033 | ac_exeext=$ac_cv_exeext | |
5034 | ||
5035 | rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out | |
5036 | ac_clean_files=$ac_clean_files_save | |
5037 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 | |
5038 | $as_echo_n "checking for suffix of executables... " >&6; } | |
5039 | if { { ac_try="$ac_link" | |
5040 | case "(($ac_try" in | |
5041 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5042 | *) ac_try_echo=$ac_try;; | |
5043 | esac | |
5044 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
5045 | $as_echo "$ac_try_echo"; } >&5 | |
5046 | (eval "$ac_link") 2>&5 | |
5047 | ac_status=$? | |
5048 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
5049 | test $ac_status = 0; }; then : | |
5050 | # If both `conftest.exe' and `conftest' are `present' (well, observable) | |
5051 | # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will | |
5052 | # work properly (i.e., refer to `conftest.exe'), while it won't with | |
5053 | # `rm'. | |
5054 | for ac_file in conftest.exe conftest conftest.*; do | |
5055 | test -f "$ac_file" || continue | |
5056 | case $ac_file in | |
5057 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; | |
5058 | *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` | |
5059 | break;; | |
5060 | * ) break;; | |
5061 | esac | |
5062 | done | |
5063 | else | |
5064 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
5065 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
5f64f7bd GM |
5066 | as_fn_error "cannot compute suffix of executables: cannot compile and link |
5067 | See \`config.log' for more details." "$LINENO" 5; } | |
067d23c9 KY |
5068 | fi |
5069 | rm -f conftest conftest$ac_cv_exeext | |
5070 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 | |
5071 | $as_echo "$ac_cv_exeext" >&6; } | |
5072 | ||
5073 | rm -f conftest.$ac_ext | |
5074 | EXEEXT=$ac_cv_exeext | |
5075 | ac_exeext=$EXEEXT | |
5076 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5077 | /* end confdefs.h. */ | |
5078 | #include <stdio.h> | |
5079 | int | |
5080 | main () | |
5081 | { | |
5082 | FILE *f = fopen ("conftest.out", "w"); | |
5083 | return ferror (f) || fclose (f) != 0; | |
5084 | ||
5085 | ; | |
5086 | return 0; | |
5087 | } | |
5088 | _ACEOF | |
5089 | ac_clean_files="$ac_clean_files conftest.out" | |
5090 | # Check that the compiler produces executables we can run. If not, either | |
5091 | # the compiler is broken, or we cross compile. | |
5092 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 | |
5093 | $as_echo_n "checking whether we are cross compiling... " >&6; } | |
5094 | if test "$cross_compiling" != yes; then | |
5095 | { { ac_try="$ac_link" | |
5096 | case "(($ac_try" in | |
5097 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5098 | *) ac_try_echo=$ac_try;; | |
5099 | esac | |
5100 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
5101 | $as_echo "$ac_try_echo"; } >&5 | |
5102 | (eval "$ac_link") 2>&5 | |
5103 | ac_status=$? | |
5104 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
5105 | test $ac_status = 0; } | |
5106 | if { ac_try='./conftest$ac_cv_exeext' | |
5107 | { { case "(($ac_try" in | |
5108 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5109 | *) ac_try_echo=$ac_try;; | |
5110 | esac | |
5111 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
5112 | $as_echo "$ac_try_echo"; } >&5 | |
5113 | (eval "$ac_try") 2>&5 | |
5114 | ac_status=$? | |
5115 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
5116 | test $ac_status = 0; }; }; then | |
5117 | cross_compiling=no | |
5118 | else | |
5119 | if test "$cross_compiling" = maybe; then | |
5120 | cross_compiling=yes | |
5121 | else | |
5122 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
5123 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
5f64f7bd | 5124 | as_fn_error "cannot run C compiled programs. |
067d23c9 | 5125 | If you meant to cross compile, use \`--host'. |
5f64f7bd | 5126 | See \`config.log' for more details." "$LINENO" 5; } |
067d23c9 KY |
5127 | fi |
5128 | fi | |
5129 | fi | |
5130 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 | |
5131 | $as_echo "$cross_compiling" >&6; } | |
5132 | ||
5133 | rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out | |
5134 | ac_clean_files=$ac_clean_files_save | |
5135 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 | |
5136 | $as_echo_n "checking for suffix of object files... " >&6; } | |
5f64f7bd | 5137 | if test "${ac_cv_objext+set}" = set; then : |
067d23c9 KY |
5138 | $as_echo_n "(cached) " >&6 |
5139 | else | |
5140 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5141 | /* end confdefs.h. */ | |
5142 | ||
5143 | int | |
5144 | main () | |
5145 | { | |
5146 | ||
5147 | ; | |
5148 | return 0; | |
5149 | } | |
5150 | _ACEOF | |
5151 | rm -f conftest.o conftest.obj | |
5152 | if { { ac_try="$ac_compile" | |
5153 | case "(($ac_try" in | |
5154 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5155 | *) ac_try_echo=$ac_try;; | |
5156 | esac | |
5157 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
5158 | $as_echo "$ac_try_echo"; } >&5 | |
5159 | (eval "$ac_compile") 2>&5 | |
5160 | ac_status=$? | |
5161 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
5162 | test $ac_status = 0; }; then : | |
5163 | for ac_file in conftest.o conftest.obj conftest.*; do | |
5164 | test -f "$ac_file" || continue; | |
5165 | case $ac_file in | |
5166 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; | |
5167 | *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` | |
5168 | break;; | |
5169 | esac | |
5170 | done | |
5171 | else | |
5172 | $as_echo "$as_me: failed program was:" >&5 | |
5173 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5174 | ||
5175 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
5176 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
5f64f7bd GM |
5177 | as_fn_error "cannot compute suffix of object files: cannot compile |
5178 | See \`config.log' for more details." "$LINENO" 5; } | |
067d23c9 KY |
5179 | fi |
5180 | rm -f conftest.$ac_cv_objext conftest.$ac_ext | |
5181 | fi | |
5182 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 | |
5183 | $as_echo "$ac_cv_objext" >&6; } | |
5184 | OBJEXT=$ac_cv_objext | |
5185 | ac_objext=$OBJEXT | |
5186 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 | |
5187 | $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } | |
5f64f7bd | 5188 | if test "${ac_cv_c_compiler_gnu+set}" = set; then : |
067d23c9 KY |
5189 | $as_echo_n "(cached) " >&6 |
5190 | else | |
5191 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5192 | /* end confdefs.h. */ | |
5193 | ||
5194 | int | |
5195 | main () | |
5196 | { | |
5197 | #ifndef __GNUC__ | |
5198 | choke me | |
5199 | #endif | |
5200 | ||
5201 | ; | |
5202 | return 0; | |
5203 | } | |
5204 | _ACEOF | |
5205 | if ac_fn_c_try_compile "$LINENO"; then : | |
5206 | ac_compiler_gnu=yes | |
5207 | else | |
5208 | ac_compiler_gnu=no | |
5209 | fi | |
5210 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5211 | ac_cv_c_compiler_gnu=$ac_compiler_gnu | |
5212 | ||
5213 | fi | |
5214 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 | |
5215 | $as_echo "$ac_cv_c_compiler_gnu" >&6; } | |
5216 | if test $ac_compiler_gnu = yes; then | |
5217 | GCC=yes | |
5218 | else | |
5219 | GCC= | |
5220 | fi | |
5221 | ac_test_CFLAGS=${CFLAGS+set} | |
5222 | ac_save_CFLAGS=$CFLAGS | |
5223 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 | |
5224 | $as_echo_n "checking whether $CC accepts -g... " >&6; } | |
5f64f7bd | 5225 | if test "${ac_cv_prog_cc_g+set}" = set; then : |
067d23c9 KY |
5226 | $as_echo_n "(cached) " >&6 |
5227 | else | |
5228 | ac_save_c_werror_flag=$ac_c_werror_flag | |
5229 | ac_c_werror_flag=yes | |
5230 | ac_cv_prog_cc_g=no | |
5231 | CFLAGS="-g" | |
5232 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5233 | /* end confdefs.h. */ | |
5234 | ||
5235 | int | |
5236 | main () | |
5237 | { | |
5238 | ||
5239 | ; | |
5240 | return 0; | |
5241 | } | |
5242 | _ACEOF | |
5243 | if ac_fn_c_try_compile "$LINENO"; then : | |
5244 | ac_cv_prog_cc_g=yes | |
5245 | else | |
5246 | CFLAGS="" | |
5247 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5248 | /* end confdefs.h. */ | |
5249 | ||
5250 | int | |
5251 | main () | |
5252 | { | |
5253 | ||
5254 | ; | |
5255 | return 0; | |
5256 | } | |
5257 | _ACEOF | |
5258 | if ac_fn_c_try_compile "$LINENO"; then : | |
5259 | ||
5260 | else | |
5261 | ac_c_werror_flag=$ac_save_c_werror_flag | |
5262 | CFLAGS="-g" | |
5263 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5264 | /* end confdefs.h. */ | |
5265 | ||
5266 | int | |
5267 | main () | |
5268 | { | |
5269 | ||
5270 | ; | |
5271 | return 0; | |
5272 | } | |
5273 | _ACEOF | |
5274 | if ac_fn_c_try_compile "$LINENO"; then : | |
5275 | ac_cv_prog_cc_g=yes | |
5276 | fi | |
5277 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5278 | fi | |
5279 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5280 | fi | |
5281 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5282 | ac_c_werror_flag=$ac_save_c_werror_flag | |
5283 | fi | |
5284 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 | |
5285 | $as_echo "$ac_cv_prog_cc_g" >&6; } | |
5286 | if test "$ac_test_CFLAGS" = set; then | |
5287 | CFLAGS=$ac_save_CFLAGS | |
5288 | elif test $ac_cv_prog_cc_g = yes; then | |
5289 | if test "$GCC" = yes; then | |
5290 | CFLAGS="-g -O2" | |
5291 | else | |
5292 | CFLAGS="-g" | |
5293 | fi | |
5294 | else | |
5295 | if test "$GCC" = yes; then | |
5296 | CFLAGS="-O2" | |
5297 | else | |
5298 | CFLAGS= | |
5299 | fi | |
5300 | fi | |
5301 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 | |
5302 | $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } | |
5f64f7bd | 5303 | if test "${ac_cv_prog_cc_c89+set}" = set; then : |
067d23c9 KY |
5304 | $as_echo_n "(cached) " >&6 |
5305 | else | |
5306 | ac_cv_prog_cc_c89=no | |
5307 | ac_save_CC=$CC | |
5308 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5309 | /* end confdefs.h. */ | |
5310 | #include <stdarg.h> | |
5311 | #include <stdio.h> | |
5312 | #include <sys/types.h> | |
5313 | #include <sys/stat.h> | |
5314 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
5315 | struct buf { int x; }; | |
5316 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
5317 | static char *e (p, i) | |
5318 | char **p; | |
5319 | int i; | |
5320 | { | |
5321 | return p[i]; | |
5322 | } | |
5323 | static char *f (char * (*g) (char **, int), char **p, ...) | |
5324 | { | |
5325 | char *s; | |
5326 | va_list v; | |
5327 | va_start (v,p); | |
5328 | s = g (p, va_arg (v,int)); | |
5329 | va_end (v); | |
5330 | return s; | |
5331 | } | |
5332 | ||
5333 | /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has | |
5334 | function prototypes and stuff, but not '\xHH' hex character constants. | |
5335 | These don't provoke an error unfortunately, instead are silently treated | |
5336 | as 'x'. The following induces an error, until -std is added to get | |
5337 | proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an | |
5338 | array size at least. It's necessary to write '\x00'==0 to get something | |
5339 | that's true only with -std. */ | |
5340 | int osf4_cc_array ['\x00' == 0 ? 1 : -1]; | |
5341 | ||
5342 | /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters | |
5343 | inside strings and character constants. */ | |
5344 | #define FOO(x) 'x' | |
5345 | int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; | |
5346 | ||
5347 | int test (int i, double x); | |
5348 | struct s1 {int (*f) (int a);}; | |
5349 | struct s2 {int (*f) (double a);}; | |
5350 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
5351 | int argc; | |
5352 | char **argv; | |
5353 | int | |
5354 | main () | |
5355 | { | |
5356 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; | |
5357 | ; | |
5358 | return 0; | |
5359 | } | |
5360 | _ACEOF | |
5361 | for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ | |
5362 | -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
5363 | do | |
5364 | CC="$ac_save_CC $ac_arg" | |
5365 | if ac_fn_c_try_compile "$LINENO"; then : | |
5366 | ac_cv_prog_cc_c89=$ac_arg | |
5367 | fi | |
5368 | rm -f core conftest.err conftest.$ac_objext | |
5369 | test "x$ac_cv_prog_cc_c89" != "xno" && break | |
5370 | done | |
743c80a7 PE |
5371 | rm -f conftest.$ac_ext |
5372 | CC=$ac_save_CC | |
5373 | ||
5374 | fi | |
5375 | # AC_CACHE_VAL | |
5376 | case "x$ac_cv_prog_cc_c89" in | |
5377 | x) | |
5378 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 | |
5379 | $as_echo "none needed" >&6; } ;; | |
5380 | xno) | |
5381 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 | |
5382 | $as_echo "unsupported" >&6; } ;; | |
5383 | *) | |
5384 | CC="$CC $ac_cv_prog_cc_c89" | |
5385 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 | |
5386 | $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; | |
5387 | esac | |
5388 | if test "x$ac_cv_prog_cc_c89" != xno; then : | |
5389 | ||
5390 | fi | |
5391 | ||
5392 | ac_ext=c | |
5393 | ac_cpp='$CPP $CPPFLAGS' | |
5394 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
5395 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
5396 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
5397 | DEPDIR="${am__leading_dot}deps" | |
5398 | ||
5399 | ac_config_commands="$ac_config_commands depfiles" | |
5400 | ||
5401 | ||
5402 | am_make=${MAKE-make} | |
5403 | cat > confinc << 'END' | |
5404 | am__doit: | |
5405 | @echo this is the am__doit target | |
5406 | .PHONY: am__doit | |
5407 | END | |
5408 | # If we don't find an include directive, just comment out the code. | |
5409 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 | |
5410 | $as_echo_n "checking for style of include used by $am_make... " >&6; } | |
5411 | am__include="#" | |
5412 | am__quote= | |
5413 | _am_result=none | |
5414 | # First try GNU make style include. | |
5415 | echo "include confinc" > confmf | |
5416 | # Ignore all kinds of additional output from `make'. | |
5417 | case `$am_make -s -f confmf 2> /dev/null` in #( | |
5418 | *the\ am__doit\ target*) | |
5419 | am__include=include | |
5420 | am__quote= | |
5421 | _am_result=GNU | |
5422 | ;; | |
5423 | esac | |
5424 | # Now try BSD make style include. | |
5425 | if test "$am__include" = "#"; then | |
5426 | echo '.include "confinc"' > confmf | |
5427 | case `$am_make -s -f confmf 2> /dev/null` in #( | |
5428 | *the\ am__doit\ target*) | |
5429 | am__include=.include | |
5430 | am__quote="\"" | |
5431 | _am_result=BSD | |
5432 | ;; | |
5433 | esac | |
5434 | fi | |
5435 | ||
5436 | ||
5437 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 | |
5438 | $as_echo "$_am_result" >&6; } | |
5439 | rm -f confinc confmf | |
5440 | ||
5441 | # Check whether --enable-dependency-tracking was given. | |
5442 | if test "${enable_dependency_tracking+set}" = set; then : | |
5443 | enableval=$enable_dependency_tracking; | |
5444 | fi | |
5445 | ||
5446 | if test "x$enable_dependency_tracking" != xno; then | |
5447 | am_depcomp="$ac_aux_dir/depcomp" | |
5448 | AMDEPBACKSLASH='\' | |
5449 | fi | |
5450 | if test "x$enable_dependency_tracking" != xno; then | |
5451 | AMDEP_TRUE= | |
5452 | AMDEP_FALSE='#' | |
5453 | else | |
5454 | AMDEP_TRUE='#' | |
5455 | AMDEP_FALSE= | |
5456 | fi | |
5457 | ||
5458 | ||
5459 | ||
5460 | depcc="$CC" am_compiler_list= | |
5461 | ||
5462 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 | |
5463 | $as_echo_n "checking dependency style of $depcc... " >&6; } | |
5f64f7bd | 5464 | if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : |
743c80a7 PE |
5465 | $as_echo_n "(cached) " >&6 |
5466 | else | |
5467 | if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then | |
5468 | # We make a subdir and do the tests there. Otherwise we can end up | |
5469 | # making bogus files that we don't know about and never remove. For | |
5470 | # instance it was reported that on HP-UX the gcc test will end up | |
5471 | # making a dummy file named `D' -- because `-MD' means `put the output | |
5472 | # in D'. | |
5473 | mkdir conftest.dir | |
5474 | # Copy depcomp to subdir because otherwise we won't find it if we're | |
5475 | # using a relative directory. | |
5476 | cp "$am_depcomp" conftest.dir | |
5477 | cd conftest.dir | |
5478 | # We will build objects and dependencies in a subdirectory because | |
5479 | # it helps to detect inapplicable dependency modes. For instance | |
5480 | # both Tru64's cc and ICC support -MD to output dependencies as a | |
5481 | # side effect of compilation, but ICC will put the dependencies in | |
5482 | # the current directory while Tru64 will put them in the object | |
5483 | # directory. | |
5484 | mkdir sub | |
5485 | ||
5486 | am_cv_CC_dependencies_compiler_type=none | |
5487 | if test "$am_compiler_list" = ""; then | |
5488 | am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` | |
5489 | fi | |
5490 | am__universal=false | |
5491 | case " $depcc " in #( | |
5492 | *\ -arch\ *\ -arch\ *) am__universal=true ;; | |
5493 | esac | |
5494 | ||
5495 | for depmode in $am_compiler_list; do | |
5496 | # Setup a source with many dependencies, because some compilers | |
5497 | # like to wrap large dependency lists on column 80 (with \), and | |
5498 | # we should not choose a depcomp mode which is confused by this. | |
5499 | # | |
5500 | # We need to recreate these files for each test, as the compiler may | |
5501 | # overwrite some of them when testing with obscure command lines. | |
5502 | # This happens at least with the AIX C compiler. | |
5503 | : > sub/conftest.c | |
5504 | for i in 1 2 3 4 5 6; do | |
5505 | echo '#include "conftst'$i'.h"' >> sub/conftest.c | |
5506 | # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with | |
5507 | # Solaris 8's {/usr,}/bin/sh. | |
5508 | touch sub/conftst$i.h | |
5509 | done | |
5510 | echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf | |
5511 | ||
5512 | # We check with `-c' and `-o' for the sake of the "dashmstdout" | |
5513 | # mode. It turns out that the SunPro C++ compiler does not properly | |
5514 | # handle `-M -o', and we need to detect this. Also, some Intel | |
5515 | # versions had trouble with output in subdirs | |
5516 | am__obj=sub/conftest.${OBJEXT-o} | |
5517 | am__minus_obj="-o $am__obj" | |
5518 | case $depmode in | |
5519 | gcc) | |
5520 | # This depmode causes a compiler race in universal mode. | |
5521 | test "$am__universal" = false || continue | |
5522 | ;; | |
5523 | nosideeffect) | |
5524 | # after this tag, mechanisms are not by side-effect, so they'll | |
5525 | # only be used when explicitly requested | |
5526 | if test "x$enable_dependency_tracking" = xyes; then | |
5527 | continue | |
5528 | else | |
5529 | break | |
5530 | fi | |
5531 | ;; | |
5532 | msvisualcpp | msvcmsys) | |
5533 | # This compiler won't grok `-c -o', but also, the minuso test has | |
5534 | # not run yet. These depmodes are late enough in the game, and | |
5535 | # so weak that their functioning should not be impacted. | |
5536 | am__obj=conftest.${OBJEXT-o} | |
5537 | am__minus_obj= | |
5538 | ;; | |
5539 | none) break ;; | |
5540 | esac | |
5541 | if depmode=$depmode \ | |
5542 | source=sub/conftest.c object=$am__obj \ | |
5543 | depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ | |
5544 | $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ | |
5545 | >/dev/null 2>conftest.err && | |
5546 | grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && | |
5547 | grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && | |
5548 | grep $am__obj sub/conftest.Po > /dev/null 2>&1 && | |
5549 | ${MAKE-make} -s -f confmf > /dev/null 2>&1; then | |
5550 | # icc doesn't choke on unknown options, it will just issue warnings | |
5551 | # or remarks (even with -Werror). So we grep stderr for any message | |
5552 | # that says an option was ignored or not supported. | |
5553 | # When given -MP, icc 7.0 and 7.1 complain thusly: | |
5554 | # icc: Command line warning: ignoring option '-M'; no argument required | |
5555 | # The diagnosis changed in icc 8.0: | |
5556 | # icc: Command line remark: option '-MP' not supported | |
5557 | if (grep 'ignoring option' conftest.err || | |
5558 | grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else | |
5559 | am_cv_CC_dependencies_compiler_type=$depmode | |
5560 | break | |
5561 | fi | |
5562 | fi | |
5563 | done | |
5564 | ||
5565 | cd .. | |
5566 | rm -rf conftest.dir | |
5567 | else | |
5568 | am_cv_CC_dependencies_compiler_type=none | |
5569 | fi | |
5570 | ||
5571 | fi | |
5572 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 | |
5573 | $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } | |
5574 | CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type | |
5575 | ||
5576 | if | |
5577 | test "x$enable_dependency_tracking" != xno \ | |
5578 | && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then | |
5579 | am__fastdepCC_TRUE= | |
5580 | am__fastdepCC_FALSE='#' | |
5581 | else | |
5582 | am__fastdepCC_TRUE='#' | |
5583 | am__fastdepCC_FALSE= | |
5584 | fi | |
5585 | ||
5586 | ||
5587 | if test "x$CC" != xcc; then | |
5588 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5 | |
5589 | $as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; } | |
5590 | else | |
5591 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5 | |
5592 | $as_echo_n "checking whether cc understands -c and -o together... " >&6; } | |
5593 | fi | |
5594 | set dummy $CC; ac_cc=`$as_echo "$2" | | |
5595 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` | |
5f64f7bd | 5596 | if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then : |
743c80a7 PE |
5597 | $as_echo_n "(cached) " >&6 |
5598 | else | |
5599 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5600 | /* end confdefs.h. */ | |
5601 | ||
5602 | int | |
5603 | main () | |
5604 | { | |
5605 | ||
5606 | ; | |
5607 | return 0; | |
5608 | } | |
5609 | _ACEOF | |
5610 | # Make sure it works both with $CC and with simple cc. | |
5611 | # We do the test twice because some compilers refuse to overwrite an | |
5612 | # existing .o file with -o, though they will create one. | |
5613 | ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5' | |
5614 | rm -f conftest2.* | |
5615 | if { { case "(($ac_try" in | |
5616 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5617 | *) ac_try_echo=$ac_try;; | |
5618 | esac | |
5619 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
5620 | $as_echo "$ac_try_echo"; } >&5 | |
5621 | (eval "$ac_try") 2>&5 | |
5622 | ac_status=$? | |
5623 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
5624 | test $ac_status = 0; } && | |
5625 | test -f conftest2.$ac_objext && { { case "(($ac_try" in | |
5626 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5627 | *) ac_try_echo=$ac_try;; | |
5628 | esac | |
5629 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
5630 | $as_echo "$ac_try_echo"; } >&5 | |
5631 | (eval "$ac_try") 2>&5 | |
5632 | ac_status=$? | |
5633 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
5634 | test $ac_status = 0; }; | |
5635 | then | |
5636 | eval ac_cv_prog_cc_${ac_cc}_c_o=yes | |
5637 | if test "x$CC" != xcc; then | |
5638 | # Test first that cc exists at all. | |
5639 | if { ac_try='cc -c conftest.$ac_ext >&5' | |
5640 | { { case "(($ac_try" in | |
5641 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5642 | *) ac_try_echo=$ac_try;; | |
5643 | esac | |
5644 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
5645 | $as_echo "$ac_try_echo"; } >&5 | |
5646 | (eval "$ac_try") 2>&5 | |
5647 | ac_status=$? | |
5648 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
5649 | test $ac_status = 0; }; }; then | |
5650 | ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5' | |
5651 | rm -f conftest2.* | |
5652 | if { { case "(($ac_try" in | |
5653 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5654 | *) ac_try_echo=$ac_try;; | |
5655 | esac | |
5656 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
5657 | $as_echo "$ac_try_echo"; } >&5 | |
5658 | (eval "$ac_try") 2>&5 | |
5659 | ac_status=$? | |
5660 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
5661 | test $ac_status = 0; } && | |
5662 | test -f conftest2.$ac_objext && { { case "(($ac_try" in | |
5663 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5664 | *) ac_try_echo=$ac_try;; | |
5665 | esac | |
5666 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
5667 | $as_echo "$ac_try_echo"; } >&5 | |
5668 | (eval "$ac_try") 2>&5 | |
5669 | ac_status=$? | |
5670 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
5671 | test $ac_status = 0; }; | |
5672 | then | |
5673 | # cc works too. | |
5674 | : | |
5675 | else | |
5676 | # cc exists but doesn't like -o. | |
5677 | eval ac_cv_prog_cc_${ac_cc}_c_o=no | |
5678 | fi | |
5679 | fi | |
5680 | fi | |
5681 | else | |
5682 | eval ac_cv_prog_cc_${ac_cc}_c_o=no | |
5683 | fi | |
5684 | rm -f core conftest* | |
5685 | ||
5686 | fi | |
5687 | if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then | |
5688 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
5689 | $as_echo "yes" >&6; } | |
5690 | else | |
5691 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
5692 | $as_echo "no" >&6; } | |
5693 | ||
5694 | $as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h | |
5695 | ||
5696 | fi | |
5697 | ||
5698 | # FIXME: we rely on the cache variable name because | |
5699 | # there is no other way. | |
5700 | set dummy $CC | |
5701 | am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` | |
5702 | eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o | |
5703 | if test "$am_t" != yes; then | |
5704 | # Losing compiler, so override with the script. | |
5705 | # FIXME: It is wrong to rewrite CC. | |
5706 | # But if we don't then we get into trouble of one sort or another. | |
5707 | # A longer-term fix would be to have automake use am__CC in this case, | |
5708 | # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" | |
5709 | CC="$am_aux_dir/compile $CC" | |
5710 | fi | |
5711 | ||
5712 | ||
5713 | ||
5714 | # Initialize gnulib right after verifying that the C compiler works. | |
5715 | if test -n "$ac_tool_prefix"; then | |
5716 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
5717 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
5718 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
5719 | $as_echo_n "checking for $ac_word... " >&6; } | |
5f64f7bd | 5720 | if test "${ac_cv_prog_RANLIB+set}" = set; then : |
743c80a7 PE |
5721 | $as_echo_n "(cached) " >&6 |
5722 | else | |
5723 | if test -n "$RANLIB"; then | |
5724 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
5725 | else | |
5726 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5727 | for as_dir in $PATH | |
5728 | do | |
5729 | IFS=$as_save_IFS | |
5730 | test -z "$as_dir" && as_dir=. | |
5731 | for ac_exec_ext in '' $ac_executable_extensions; do | |
5732 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
5733 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" | |
5734 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
5735 | break 2 | |
5736 | fi | |
5737 | done | |
5738 | done | |
5739 | IFS=$as_save_IFS | |
5740 | ||
5741 | fi | |
5742 | fi | |
5743 | RANLIB=$ac_cv_prog_RANLIB | |
5744 | if test -n "$RANLIB"; then | |
5745 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 | |
5746 | $as_echo "$RANLIB" >&6; } | |
5747 | else | |
5748 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
5749 | $as_echo "no" >&6; } | |
5750 | fi | |
5751 | ||
5752 | ||
5753 | fi | |
5754 | if test -z "$ac_cv_prog_RANLIB"; then | |
5755 | ac_ct_RANLIB=$RANLIB | |
5756 | # Extract the first word of "ranlib", so it can be a program name with args. | |
5757 | set dummy ranlib; ac_word=$2 | |
5758 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
5759 | $as_echo_n "checking for $ac_word... " >&6; } | |
5f64f7bd | 5760 | if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : |
743c80a7 PE |
5761 | $as_echo_n "(cached) " >&6 |
5762 | else | |
5763 | if test -n "$ac_ct_RANLIB"; then | |
5764 | ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. | |
5765 | else | |
5766 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5767 | for as_dir in $PATH | |
5768 | do | |
5769 | IFS=$as_save_IFS | |
5770 | test -z "$as_dir" && as_dir=. | |
5771 | for ac_exec_ext in '' $ac_executable_extensions; do | |
5772 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
5773 | ac_cv_prog_ac_ct_RANLIB="ranlib" | |
5774 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
5775 | break 2 | |
5776 | fi | |
5777 | done | |
5778 | done | |
5779 | IFS=$as_save_IFS | |
067d23c9 KY |
5780 | |
5781 | fi | |
743c80a7 PE |
5782 | fi |
5783 | ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB | |
5784 | if test -n "$ac_ct_RANLIB"; then | |
5785 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 | |
5786 | $as_echo "$ac_ct_RANLIB" >&6; } | |
5787 | else | |
5788 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
5789 | $as_echo "no" >&6; } | |
5790 | fi | |
067d23c9 | 5791 | |
743c80a7 PE |
5792 | if test "x$ac_ct_RANLIB" = x; then |
5793 | RANLIB=":" | |
5794 | else | |
5795 | case $cross_compiling:$ac_tool_warned in | |
5796 | yes:) | |
5797 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
5798 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
5799 | ac_tool_warned=yes ;; | |
5800 | esac | |
5801 | RANLIB=$ac_ct_RANLIB | |
5802 | fi | |
5803 | else | |
5804 | RANLIB="$ac_cv_prog_RANLIB" | |
067d23c9 KY |
5805 | fi |
5806 | ||
743c80a7 | 5807 | |
067d23c9 KY |
5808 | ac_ext=c |
5809 | ac_cpp='$CPP $CPPFLAGS' | |
5810 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
5811 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
5812 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
5813 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 | |
5814 | $as_echo_n "checking how to run the C preprocessor... " >&6; } | |
5815 | # On Suns, sometimes $CPP names a directory. | |
5816 | if test -n "$CPP" && test -d "$CPP"; then | |
5817 | CPP= | |
5818 | fi | |
5819 | if test -z "$CPP"; then | |
5f64f7bd | 5820 | if test "${ac_cv_prog_CPP+set}" = set; then : |
067d23c9 KY |
5821 | $as_echo_n "(cached) " >&6 |
5822 | else | |
5823 | # Double quotes because CPP needs to be expanded | |
5824 | for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" | |
5825 | do | |
5826 | ac_preproc_ok=false | |
5827 | for ac_c_preproc_warn_flag in '' yes | |
5828 | do | |
5829 | # Use a header file that comes with gcc, so configuring glibc | |
5830 | # with a fresh cross-compiler works. | |
5831 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
5832 | # <limits.h> exists even on freestanding compilers. | |
5833 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
5834 | # not just through cpp. "Syntax error" is here to catch this case. | |
5835 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5836 | /* end confdefs.h. */ | |
5837 | #ifdef __STDC__ | |
5838 | # include <limits.h> | |
5839 | #else | |
5840 | # include <assert.h> | |
5841 | #endif | |
5842 | Syntax error | |
5843 | _ACEOF | |
5844 | if ac_fn_c_try_cpp "$LINENO"; then : | |
5845 | ||
5846 | else | |
5847 | # Broken: fails on valid input. | |
5848 | continue | |
5849 | fi | |
5f64f7bd | 5850 | rm -f conftest.err conftest.$ac_ext |
067d23c9 KY |
5851 | |
5852 | # OK, works on sane cases. Now check whether nonexistent headers | |
5853 | # can be detected and how. | |
5854 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5855 | /* end confdefs.h. */ | |
5856 | #include <ac_nonexistent.h> | |
5857 | _ACEOF | |
5858 | if ac_fn_c_try_cpp "$LINENO"; then : | |
5859 | # Broken: success on invalid input. | |
5860 | continue | |
5861 | else | |
5862 | # Passes both tests. | |
5863 | ac_preproc_ok=: | |
5864 | break | |
5865 | fi | |
5f64f7bd | 5866 | rm -f conftest.err conftest.$ac_ext |
067d23c9 KY |
5867 | |
5868 | done | |
5869 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
5f64f7bd | 5870 | rm -f conftest.err conftest.$ac_ext |
067d23c9 KY |
5871 | if $ac_preproc_ok; then : |
5872 | break | |
5873 | fi | |
5874 | ||
5875 | done | |
5876 | ac_cv_prog_CPP=$CPP | |
5877 | ||
5878 | fi | |
5879 | CPP=$ac_cv_prog_CPP | |
5880 | else | |
5881 | ac_cv_prog_CPP=$CPP | |
5882 | fi | |
5883 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 | |
5884 | $as_echo "$CPP" >&6; } | |
5885 | ac_preproc_ok=false | |
5886 | for ac_c_preproc_warn_flag in '' yes | |
5887 | do | |
5888 | # Use a header file that comes with gcc, so configuring glibc | |
5889 | # with a fresh cross-compiler works. | |
5890 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
5891 | # <limits.h> exists even on freestanding compilers. | |
5892 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
5893 | # not just through cpp. "Syntax error" is here to catch this case. | |
5894 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5895 | /* end confdefs.h. */ | |
5896 | #ifdef __STDC__ | |
5897 | # include <limits.h> | |
5898 | #else | |
5899 | # include <assert.h> | |
5900 | #endif | |
5901 | Syntax error | |
5902 | _ACEOF | |
5903 | if ac_fn_c_try_cpp "$LINENO"; then : | |
5904 | ||
5905 | else | |
5906 | # Broken: fails on valid input. | |
5907 | continue | |
5908 | fi | |
5f64f7bd | 5909 | rm -f conftest.err conftest.$ac_ext |
067d23c9 KY |
5910 | |
5911 | # OK, works on sane cases. Now check whether nonexistent headers | |
5912 | # can be detected and how. | |
5913 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5914 | /* end confdefs.h. */ | |
5915 | #include <ac_nonexistent.h> | |
5916 | _ACEOF | |
5917 | if ac_fn_c_try_cpp "$LINENO"; then : | |
5918 | # Broken: success on invalid input. | |
5919 | continue | |
5920 | else | |
5921 | # Passes both tests. | |
5922 | ac_preproc_ok=: | |
5923 | break | |
5924 | fi | |
5f64f7bd | 5925 | rm -f conftest.err conftest.$ac_ext |
067d23c9 KY |
5926 | |
5927 | done | |
5928 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
5f64f7bd | 5929 | rm -f conftest.err conftest.$ac_ext |
067d23c9 KY |
5930 | if $ac_preproc_ok; then : |
5931 | ||
5932 | else | |
5933 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
5934 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
5f64f7bd GM |
5935 | as_fn_error "C preprocessor \"$CPP\" fails sanity check |
5936 | See \`config.log' for more details." "$LINENO" 5; } | |
067d23c9 KY |
5937 | fi |
5938 | ||
5939 | ac_ext=c | |
5940 | ac_cpp='$CPP $CPPFLAGS' | |
5941 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
5942 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
5943 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
5944 | ||
5945 | ||
5946 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 | |
5947 | $as_echo_n "checking for grep that handles long lines and -e... " >&6; } | |
5f64f7bd | 5948 | if test "${ac_cv_path_GREP+set}" = set; then : |
067d23c9 KY |
5949 | $as_echo_n "(cached) " >&6 |
5950 | else | |
5951 | if test -z "$GREP"; then | |
5952 | ac_path_GREP_found=false | |
5953 | # Loop through the user's path and test for each of PROGNAME-LIST | |
5954 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5955 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
5956 | do | |
5957 | IFS=$as_save_IFS | |
5958 | test -z "$as_dir" && as_dir=. | |
5959 | for ac_prog in grep ggrep; do | |
5960 | for ac_exec_ext in '' $ac_executable_extensions; do | |
5961 | ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" | |
5962 | { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue | |
5963 | # Check for GNU ac_path_GREP and select it if it is found. | |
5964 | # Check for GNU $ac_path_GREP | |
5965 | case `"$ac_path_GREP" --version 2>&1` in | |
5966 | *GNU*) | |
5967 | ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; | |
5968 | *) | |
5969 | ac_count=0 | |
5970 | $as_echo_n 0123456789 >"conftest.in" | |
5971 | while : | |
5972 | do | |
5973 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
5974 | mv "conftest.tmp" "conftest.in" | |
5975 | cp "conftest.in" "conftest.nl" | |
5976 | $as_echo 'GREP' >> "conftest.nl" | |
5977 | "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
5978 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
5979 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
5980 | if test $ac_count -gt ${ac_path_GREP_max-0}; then | |
5981 | # Best one so far, save it but keep looking for a better one | |
5982 | ac_cv_path_GREP="$ac_path_GREP" | |
5983 | ac_path_GREP_max=$ac_count | |
5984 | fi | |
5985 | # 10*(2^10) chars as input seems more than enough | |
5986 | test $ac_count -gt 10 && break | |
5987 | done | |
5988 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
5989 | esac | |
5990 | ||
5991 | $ac_path_GREP_found && break 3 | |
5992 | done | |
5993 | done | |
5994 | done | |
5995 | IFS=$as_save_IFS | |
5996 | if test -z "$ac_cv_path_GREP"; then | |
5f64f7bd | 5997 | as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 |
067d23c9 KY |
5998 | fi |
5999 | else | |
6000 | ac_cv_path_GREP=$GREP | |
6001 | fi | |
6002 | ||
6003 | fi | |
6004 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 | |
6005 | $as_echo "$ac_cv_path_GREP" >&6; } | |
6006 | GREP="$ac_cv_path_GREP" | |
6007 | ||
6008 | ||
6009 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 | |
6010 | $as_echo_n "checking for egrep... " >&6; } | |
5f64f7bd | 6011 | if test "${ac_cv_path_EGREP+set}" = set; then : |
067d23c9 KY |
6012 | $as_echo_n "(cached) " >&6 |
6013 | else | |
6014 | if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 | |
6015 | then ac_cv_path_EGREP="$GREP -E" | |
6016 | else | |
6017 | if test -z "$EGREP"; then | |
6018 | ac_path_EGREP_found=false | |
6019 | # Loop through the user's path and test for each of PROGNAME-LIST | |
6020 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6021 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
6022 | do | |
6023 | IFS=$as_save_IFS | |
6024 | test -z "$as_dir" && as_dir=. | |
6025 | for ac_prog in egrep; do | |
6026 | for ac_exec_ext in '' $ac_executable_extensions; do | |
6027 | ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" | |
6028 | { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue | |
6029 | # Check for GNU ac_path_EGREP and select it if it is found. | |
6030 | # Check for GNU $ac_path_EGREP | |
6031 | case `"$ac_path_EGREP" --version 2>&1` in | |
6032 | *GNU*) | |
6033 | ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; | |
6034 | *) | |
6035 | ac_count=0 | |
6036 | $as_echo_n 0123456789 >"conftest.in" | |
6037 | while : | |
6038 | do | |
6039 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
6040 | mv "conftest.tmp" "conftest.in" | |
6041 | cp "conftest.in" "conftest.nl" | |
6042 | $as_echo 'EGREP' >> "conftest.nl" | |
6043 | "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
6044 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
6045 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
6046 | if test $ac_count -gt ${ac_path_EGREP_max-0}; then | |
6047 | # Best one so far, save it but keep looking for a better one | |
6048 | ac_cv_path_EGREP="$ac_path_EGREP" | |
6049 | ac_path_EGREP_max=$ac_count | |
6050 | fi | |
6051 | # 10*(2^10) chars as input seems more than enough | |
6052 | test $ac_count -gt 10 && break | |
6053 | done | |
6054 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
6055 | esac | |
6056 | ||
6057 | $ac_path_EGREP_found && break 3 | |
6058 | done | |
6059 | done | |
6060 | done | |
6061 | IFS=$as_save_IFS | |
6062 | if test -z "$ac_cv_path_EGREP"; then | |
5f64f7bd | 6063 | as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 |
067d23c9 KY |
6064 | fi |
6065 | else | |
6066 | ac_cv_path_EGREP=$EGREP | |
6067 | fi | |
6068 | ||
6069 | fi | |
6070 | fi | |
6071 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 | |
6072 | $as_echo "$ac_cv_path_EGREP" >&6; } | |
6073 | EGREP="$ac_cv_path_EGREP" | |
6074 | ||
6075 | ||
6076 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 | |
6077 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
5f64f7bd | 6078 | if test "${ac_cv_header_stdc+set}" = set; then : |
067d23c9 KY |
6079 | $as_echo_n "(cached) " >&6 |
6080 | else | |
6081 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6082 | /* end confdefs.h. */ | |
6083 | #include <stdlib.h> | |
6084 | #include <stdarg.h> | |
6085 | #include <string.h> | |
6086 | #include <float.h> | |
6087 | ||
6088 | int | |
6089 | main () | |
6090 | { | |
6091 | ||
6092 | ; | |
6093 | return 0; | |
6094 | } | |
6095 | _ACEOF | |
6096 | if ac_fn_c_try_compile "$LINENO"; then : | |
6097 | ac_cv_header_stdc=yes | |
6098 | else | |
6099 | ac_cv_header_stdc=no | |
6100 | fi | |
6101 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
6102 | ||
6103 | if test $ac_cv_header_stdc = yes; then | |
6104 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
6105 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6106 | /* end confdefs.h. */ | |
6107 | #include <string.h> | |
6108 | ||
6109 | _ACEOF | |
6110 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
6111 | $EGREP "memchr" >/dev/null 2>&1; then : | |
6112 | ||
6113 | else | |
6114 | ac_cv_header_stdc=no | |
6115 | fi | |
6116 | rm -f conftest* | |
6117 | ||
6118 | fi | |
6119 | ||
6120 | if test $ac_cv_header_stdc = yes; then | |
6121 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
6122 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6123 | /* end confdefs.h. */ | |
6124 | #include <stdlib.h> | |
6125 | ||
6126 | _ACEOF | |
6127 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
6128 | $EGREP "free" >/dev/null 2>&1; then : | |
6129 | ||
6130 | else | |
6131 | ac_cv_header_stdc=no | |
6132 | fi | |
6133 | rm -f conftest* | |
6134 | ||
6135 | fi | |
6136 | ||
6137 | if test $ac_cv_header_stdc = yes; then | |
6138 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
6139 | if test "$cross_compiling" = yes; then : | |
6140 | : | |
6141 | else | |
6142 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6143 | /* end confdefs.h. */ | |
6144 | #include <ctype.h> | |
6145 | #include <stdlib.h> | |
6146 | #if ((' ' & 0x0FF) == 0x020) | |
6147 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
6148 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
6149 | #else | |
6150 | # define ISLOWER(c) \ | |
6151 | (('a' <= (c) && (c) <= 'i') \ | |
6152 | || ('j' <= (c) && (c) <= 'r') \ | |
6153 | || ('s' <= (c) && (c) <= 'z')) | |
6154 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
6155 | #endif | |
6156 | ||
6157 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
6158 | int | |
6159 | main () | |
6160 | { | |
6161 | int i; | |
6162 | for (i = 0; i < 256; i++) | |
6163 | if (XOR (islower (i), ISLOWER (i)) | |
6164 | || toupper (i) != TOUPPER (i)) | |
6165 | return 2; | |
6166 | return 0; | |
6167 | } | |
6168 | _ACEOF | |
6169 | if ac_fn_c_try_run "$LINENO"; then : | |
6170 | ||
6171 | else | |
6172 | ac_cv_header_stdc=no | |
6173 | fi | |
6174 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
6175 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
6176 | fi | |
6177 | ||
6178 | fi | |
6179 | fi | |
6180 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 | |
6181 | $as_echo "$ac_cv_header_stdc" >&6; } | |
6182 | if test $ac_cv_header_stdc = yes; then | |
6183 | ||
6184 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h | |
6185 | ||
6186 | fi | |
6187 | ||
6188 | # On IRIX 5.3, sys/types and inttypes.h are conflicting. | |
6189 | for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ | |
6190 | inttypes.h stdint.h unistd.h | |
6191 | do : | |
6192 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
6193 | ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default | |
6194 | " | |
5f64f7bd GM |
6195 | eval as_val=\$$as_ac_Header |
6196 | if test "x$as_val" = x""yes; then : | |
067d23c9 KY |
6197 | cat >>confdefs.h <<_ACEOF |
6198 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
6199 | _ACEOF | |
6200 | ||
6201 | fi | |
6202 | ||
6203 | done | |
6204 | ||
6205 | ||
6206 | ||
1fd182f0 PE |
6207 | |
6208 | ||
067d23c9 | 6209 | ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" |
5f64f7bd | 6210 | if test "x$ac_cv_header_minix_config_h" = x""yes; then : |
067d23c9 KY |
6211 | MINIX=yes |
6212 | else | |
6213 | MINIX= | |
6214 | fi | |
6215 | ||
6216 | ||
6217 | if test "$MINIX" = yes; then | |
6218 | ||
6219 | $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h | |
6220 | ||
6221 | ||
6222 | $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h | |
6223 | ||
6224 | ||
6225 | $as_echo "#define _MINIX 1" >>confdefs.h | |
6226 | ||
6227 | fi | |
6228 | ||
1fd182f0 PE |
6229 | case "$host_os" in |
6230 | hpux*) | |
6231 | ||
6232 | $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h | |
6233 | ||
6234 | ;; | |
6235 | esac | |
6236 | ||
067d23c9 KY |
6237 | |
6238 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 | |
6239 | $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } | |
5f64f7bd | 6240 | if test "${ac_cv_safe_to_define___extensions__+set}" = set; then : |
067d23c9 KY |
6241 | $as_echo_n "(cached) " >&6 |
6242 | else | |
6243 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6244 | /* end confdefs.h. */ | |
6245 | ||
1fd182f0 PE |
6246 | # define __EXTENSIONS__ 1 |
6247 | $ac_includes_default | |
067d23c9 KY |
6248 | int |
6249 | main () | |
6250 | { | |
6251 | ||
6252 | ; | |
6253 | return 0; | |
6254 | } | |
6255 | _ACEOF | |
6256 | if ac_fn_c_try_compile "$LINENO"; then : | |
6257 | ac_cv_safe_to_define___extensions__=yes | |
6258 | else | |
6259 | ac_cv_safe_to_define___extensions__=no | |
6260 | fi | |
6261 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
6262 | fi | |
6263 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 | |
6264 | $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } | |
6265 | test $ac_cv_safe_to_define___extensions__ = yes && | |
6266 | $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h | |
6267 | ||
6268 | $as_echo "#define _ALL_SOURCE 1" >>confdefs.h | |
6269 | ||
6270 | $as_echo "#define _GNU_SOURCE 1" >>confdefs.h | |
6271 | ||
6272 | $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h | |
6273 | ||
6274 | $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h | |
6275 | ||
6276 | ||
6277 | ||
1fd182f0 PE |
6278 | |
6279 | ||
6280 | ||
6281 | ||
6282 | ||
6d153f56 GM |
6283 | case $ac_cv_prog_cc_stdc in #( |
6284 | no) : | |
6285 | ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; #( | |
6286 | *) : | |
6287 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5 | |
6288 | $as_echo_n "checking for $CC option to accept ISO C99... " >&6; } | |
6289 | if test "${ac_cv_prog_cc_c99+set}" = set; then : | |
6290 | $as_echo_n "(cached) " >&6 | |
6291 | else | |
6292 | ac_cv_prog_cc_c99=no | |
6293 | ac_save_CC=$CC | |
6294 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6295 | /* end confdefs.h. */ | |
6296 | #include <stdarg.h> | |
6297 | #include <stdbool.h> | |
6298 | #include <stdlib.h> | |
6299 | #include <wchar.h> | |
6300 | #include <stdio.h> | |
6301 | ||
6302 | // Check varargs macros. These examples are taken from C99 6.10.3.5. | |
6303 | #define debug(...) fprintf (stderr, __VA_ARGS__) | |
6304 | #define showlist(...) puts (#__VA_ARGS__) | |
6305 | #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) | |
6306 | static void | |
6307 | test_varargs_macros (void) | |
6308 | { | |
6309 | int x = 1234; | |
6310 | int y = 5678; | |
6311 | debug ("Flag"); | |
6312 | debug ("X = %d\n", x); | |
6313 | showlist (The first, second, and third items.); | |
6314 | report (x>y, "x is %d but y is %d", x, y); | |
6315 | } | |
6316 | ||
6317 | // Check long long types. | |
6318 | #define BIG64 18446744073709551615ull | |
6319 | #define BIG32 4294967295ul | |
6320 | #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) | |
6321 | #if !BIG_OK | |
6322 | your preprocessor is broken; | |
6323 | #endif | |
6324 | #if BIG_OK | |
6325 | #else | |
6326 | your preprocessor is broken; | |
6327 | #endif | |
6328 | static long long int bignum = -9223372036854775807LL; | |
6329 | static unsigned long long int ubignum = BIG64; | |
6330 | ||
6331 | struct incomplete_array | |
6332 | { | |
6333 | int datasize; | |
6334 | double data[]; | |
6335 | }; | |
6336 | ||
6337 | struct named_init { | |
6338 | int number; | |
6339 | const wchar_t *name; | |
6340 | double average; | |
6341 | }; | |
6342 | ||
6343 | typedef const char *ccp; | |
6344 | ||
6345 | static inline int | |
6346 | test_restrict (ccp restrict text) | |
6347 | { | |
6348 | // See if C++-style comments work. | |
6349 | // Iterate through items via the restricted pointer. | |
6350 | // Also check for declarations in for loops. | |
6351 | for (unsigned int i = 0; *(text+i) != '\0'; ++i) | |
6352 | continue; | |
6353 | return 0; | |
6354 | } | |
6355 | ||
6356 | // Check varargs and va_copy. | |
6357 | static void | |
6358 | test_varargs (const char *format, ...) | |
6359 | { | |
6360 | va_list args; | |
6361 | va_start (args, format); | |
6362 | va_list args_copy; | |
6363 | va_copy (args_copy, args); | |
6364 | ||
6365 | const char *str; | |
6366 | int number; | |
6367 | float fnumber; | |
6368 | ||
6369 | while (*format) | |
6370 | { | |
6371 | switch (*format++) | |
6372 | { | |
6373 | case 's': // string | |
6374 | str = va_arg (args_copy, const char *); | |
6375 | break; | |
6376 | case 'd': // int | |
6377 | number = va_arg (args_copy, int); | |
6378 | break; | |
6379 | case 'f': // float | |
6380 | fnumber = va_arg (args_copy, double); | |
6381 | break; | |
6382 | default: | |
6383 | break; | |
6384 | } | |
6385 | } | |
6386 | va_end (args_copy); | |
6387 | va_end (args); | |
6388 | } | |
6389 | ||
6390 | int | |
6391 | main () | |
6392 | { | |
6393 | ||
6394 | // Check bool. | |
6395 | _Bool success = false; | |
6396 | ||
6397 | // Check restrict. | |
6398 | if (test_restrict ("String literal") == 0) | |
6399 | success = true; | |
6400 | char *restrict newvar = "Another string"; | |
6401 | ||
6402 | // Check varargs. | |
6403 | test_varargs ("s, d' f .", "string", 65, 34.234); | |
6404 | test_varargs_macros (); | |
6405 | ||
6406 | // Check flexible array members. | |
6407 | struct incomplete_array *ia = | |
6408 | malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); | |
6409 | ia->datasize = 10; | |
6410 | for (int i = 0; i < ia->datasize; ++i) | |
6411 | ia->data[i] = i * 1.234; | |
6412 | ||
6413 | // Check named initializers. | |
6414 | struct named_init ni = { | |
6415 | .number = 34, | |
6416 | .name = L"Test wide string", | |
6417 | .average = 543.34343, | |
6418 | }; | |
6419 | ||
6420 | ni.number = 58; | |
6421 | ||
6422 | int dynamic_array[ni.number]; | |
6423 | dynamic_array[ni.number - 1] = 543; | |
6424 | ||
6425 | // work around unused variable warnings | |
6426 | return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x' | |
6427 | || dynamic_array[ni.number - 1] != 543); | |
6428 | ||
6429 | ; | |
6430 | return 0; | |
6431 | } | |
6432 | _ACEOF | |
6433 | for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99 | |
6434 | do | |
6435 | CC="$ac_save_CC $ac_arg" | |
6436 | if ac_fn_c_try_compile "$LINENO"; then : | |
6437 | ac_cv_prog_cc_c99=$ac_arg | |
6438 | fi | |
6439 | rm -f core conftest.err conftest.$ac_objext | |
6440 | test "x$ac_cv_prog_cc_c99" != "xno" && break | |
6441 | done | |
6442 | rm -f conftest.$ac_ext | |
6443 | CC=$ac_save_CC | |
6444 | ||
6445 | fi | |
6446 | # AC_CACHE_VAL | |
6447 | case "x$ac_cv_prog_cc_c99" in | |
6448 | x) | |
6449 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 | |
6450 | $as_echo "none needed" >&6; } ;; | |
6451 | xno) | |
6452 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 | |
6453 | $as_echo "unsupported" >&6; } ;; | |
6454 | *) | |
6455 | CC="$CC $ac_cv_prog_cc_c99" | |
6456 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 | |
6457 | $as_echo "$ac_cv_prog_cc_c99" >&6; } ;; | |
6458 | esac | |
6459 | if test "x$ac_cv_prog_cc_c99" != xno; then : | |
6460 | ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 | |
6461 | else | |
6462 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 | |
6463 | $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } | |
6464 | if test "${ac_cv_prog_cc_c89+set}" = set; then : | |
6465 | $as_echo_n "(cached) " >&6 | |
6466 | else | |
6467 | ac_cv_prog_cc_c89=no | |
6468 | ac_save_CC=$CC | |
6469 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6470 | /* end confdefs.h. */ | |
6471 | #include <stdarg.h> | |
6472 | #include <stdio.h> | |
6473 | #include <sys/types.h> | |
6474 | #include <sys/stat.h> | |
6475 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
6476 | struct buf { int x; }; | |
6477 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
6478 | static char *e (p, i) | |
6479 | char **p; | |
6480 | int i; | |
6481 | { | |
6482 | return p[i]; | |
6483 | } | |
6484 | static char *f (char * (*g) (char **, int), char **p, ...) | |
6485 | { | |
6486 | char *s; | |
6487 | va_list v; | |
6488 | va_start (v,p); | |
6489 | s = g (p, va_arg (v,int)); | |
6490 | va_end (v); | |
6491 | return s; | |
6492 | } | |
6493 | ||
6494 | /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has | |
6495 | function prototypes and stuff, but not '\xHH' hex character constants. | |
6496 | These don't provoke an error unfortunately, instead are silently treated | |
6497 | as 'x'. The following induces an error, until -std is added to get | |
6498 | proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an | |
6499 | array size at least. It's necessary to write '\x00'==0 to get something | |
6500 | that's true only with -std. */ | |
6501 | int osf4_cc_array ['\x00' == 0 ? 1 : -1]; | |
6502 | ||
6503 | /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters | |
6504 | inside strings and character constants. */ | |
6505 | #define FOO(x) 'x' | |
6506 | int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; | |
6507 | ||
6508 | int test (int i, double x); | |
6509 | struct s1 {int (*f) (int a);}; | |
6510 | struct s2 {int (*f) (double a);}; | |
6511 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
6512 | int argc; | |
6513 | char **argv; | |
6514 | int | |
6515 | main () | |
6516 | { | |
6517 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; | |
6518 | ; | |
6519 | return 0; | |
6520 | } | |
6521 | _ACEOF | |
6522 | for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ | |
6523 | -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
6524 | do | |
6525 | CC="$ac_save_CC $ac_arg" | |
6526 | if ac_fn_c_try_compile "$LINENO"; then : | |
6527 | ac_cv_prog_cc_c89=$ac_arg | |
6528 | fi | |
6529 | rm -f core conftest.err conftest.$ac_objext | |
6530 | test "x$ac_cv_prog_cc_c89" != "xno" && break | |
6531 | done | |
6532 | rm -f conftest.$ac_ext | |
6533 | CC=$ac_save_CC | |
6534 | ||
6535 | fi | |
6536 | # AC_CACHE_VAL | |
6537 | case "x$ac_cv_prog_cc_c89" in | |
6538 | x) | |
6539 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 | |
6540 | $as_echo "none needed" >&6; } ;; | |
6541 | xno) | |
6542 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 | |
6543 | $as_echo "unsupported" >&6; } ;; | |
6544 | *) | |
6545 | CC="$CC $ac_cv_prog_cc_c89" | |
6546 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 | |
6547 | $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; | |
6548 | esac | |
6549 | if test "x$ac_cv_prog_cc_c89" != xno; then : | |
6550 | ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 | |
6551 | else | |
6552 | ac_cv_prog_cc_stdc=no | |
6553 | fi | |
6554 | ||
6555 | fi | |
6556 | ;; | |
6557 | esac | |
6558 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5 | |
6559 | $as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; } | |
6560 | if test "${ac_cv_prog_cc_stdc+set}" = set; then : | |
6561 | $as_echo_n "(cached) " >&6 | |
6562 | fi | |
6563 | ||
6564 | case $ac_cv_prog_cc_stdc in #( | |
6565 | no) : | |
6566 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 | |
6567 | $as_echo "unsupported" >&6; } ;; #( | |
6568 | '') : | |
6569 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 | |
6570 | $as_echo "none needed" >&6; } ;; #( | |
6571 | *) : | |
6572 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_stdc" >&5 | |
6573 | $as_echo "$ac_cv_prog_cc_stdc" >&6; } ;; | |
6574 | esac | |
6575 | ||
1fd182f0 PE |
6576 | |
6577 | ||
4fc2b746 | 6578 | # Code from module alloca-opt: |
8d8af66d | 6579 | # Code from module allocator: |
1fd182f0 PE |
6580 | # Code from module arg-nonnull: |
6581 | # Code from module c++defs: | |
6c051bab | 6582 | # Code from module careadlinkat: |
942f733f | 6583 | # Code from module crypto/md5: |
40e27e7f | 6584 | # Code from module crypto/sha1: |
d87ffdb7 GM |
6585 | # Code from module crypto/sha256: |
6586 | # Code from module crypto/sha512: | |
36f13e16 | 6587 | # Code from module dosname: |
f737437b | 6588 | # Code from module dtoastr: |
7d2a1c5e | 6589 | # Code from module dup2: |
1fd182f0 PE |
6590 | # Code from module extensions: |
6591 | ||
5fa4ac76 | 6592 | # Code from module filemode: |
1f5d53eb | 6593 | # Code from module getloadavg: |
e275c824 PE |
6594 | # Code from module getopt-gnu: |
6595 | # Code from module getopt-posix: | |
6596 | # Code from module gettext-h: | |
67342916 | 6597 | # Code from module ignore-value: |
1fd182f0 PE |
6598 | # Code from module include_next: |
6599 | # Code from module intprops: | |
4fda9c95 | 6600 | # Code from module inttypes-incomplete: |
ae0d7250 | 6601 | # Code from module lstat: |
1fd182f0 PE |
6602 | # Code from module mktime: |
6603 | # Code from module multiarch: | |
3e0be4ab | 6604 | # Code from module pthread_sigmask: |
ae0d7250 | 6605 | # Code from module readlink: |
3e0be4ab GM |
6606 | # Code from module signal: |
6607 | # Code from module sigprocmask: | |
6ad6792b | 6608 | # Code from module socklen: |
6c051bab | 6609 | # Code from module ssize_t: |
ae0d7250 | 6610 | # Code from module stat: |
6d153f56 GM |
6611 | # Code from module stdarg: |
6612 | ||
16c3e636 | 6613 | # Code from module stdbool: |
1fd182f0 | 6614 | # Code from module stddef: |
5f90be1b | 6615 | # Code from module stdint: |
6ad6792b | 6616 | # Code from module stdio: |
1f5d53eb | 6617 | # Code from module stdlib: |
16c3e636 | 6618 | # Code from module strftime: |
3e0be4ab GM |
6619 | # Code from module strtoimax: |
6620 | # Code from module strtoll: | |
4fda9c95 GM |
6621 | # Code from module strtoull: |
6622 | # Code from module strtoumax: | |
ae0d7250 | 6623 | # Code from module symlink: |
5fa4ac76 | 6624 | # Code from module sys_stat: |
1fd182f0 PE |
6625 | # Code from module time: |
6626 | # Code from module time_r: | |
d87ffdb7 | 6627 | # Code from module u64: |
e275c824 | 6628 | # Code from module unistd: |
4fda9c95 | 6629 | # Code from module verify: |
1fd182f0 PE |
6630 | # Code from module warn-on-use: |
6631 | ||
6632 | ||
6633 | # On Suns, sometimes $CPP names a directory. | |
6634 | if test -n "$CPP" && test -d "$CPP"; then | |
6635 | CPP= | |
6636 | fi | |
6637 | ||
6638 | ## If not using gcc, and on Solaris, and no CPP specified, see if | |
6639 | ## using a Sun compiler, which needs -Xs to prevent whitespace. | |
6640 | if test x"$GCC" != xyes && test x"$emacs_check_sunpro_c" = xyes && \ | |
6641 | test x"$CPP" = x; then | |
6642 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using a Sun C compiler" >&5 | |
6643 | $as_echo_n "checking whether we are using a Sun C compiler... " >&6; } | |
5f64f7bd | 6644 | if test "${emacs_cv_sunpro_c+set}" = set; then : |
1fd182f0 PE |
6645 | $as_echo_n "(cached) " >&6 |
6646 | else | |
6647 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6648 | /* end confdefs.h. */ | |
6649 | ||
6650 | int | |
6651 | main () | |
6652 | { | |
6653 | #ifndef __SUNPRO_C | |
6654 | fail; | |
6655 | #endif | |
6656 | ||
6657 | ; | |
6658 | return 0; | |
6659 | } | |
6660 | _ACEOF | |
6661 | if ac_fn_c_try_link "$LINENO"; then : | |
6662 | emacs_cv_sunpro_c=yes | |
6663 | else | |
6664 | emacs_cv_sunpro_c=no | |
6665 | fi | |
6666 | rm -f core conftest.err conftest.$ac_objext \ | |
6667 | conftest$ac_exeext conftest.$ac_ext | |
6668 | fi | |
6669 | ||
6670 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_sunpro_c" >&5 | |
6671 | $as_echo "$emacs_cv_sunpro_c" >&6; } | |
6672 | ||
6673 | if test x"$emacs_cv_sunpro_c" = xyes; then | |
6674 | NON_GNU_CPP="$CC -E -Xs" | |
6675 | fi | |
6676 | fi | |
6677 | ||
6678 | #### Some systems specify a CPP to use unless we are using GCC. | |
6679 | #### Now that we know whether we are using GCC, we can decide whether | |
6680 | #### to use that one. | |
6681 | if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x | |
6682 | then | |
6683 | CPP="$NON_GNU_CPP" | |
6684 | fi | |
6685 | ||
6686 | #### Some systems specify a CC to use unless we are using GCC. | |
6687 | #### Now that we know whether we are using GCC, we can decide whether | |
6688 | #### to use that one. | |
6689 | if test "x$NON_GNU_CC" != x && test x$GCC != xyes && | |
6690 | test x$cc_specified != xyes | |
6691 | then | |
6692 | CC="$NON_GNU_CC" | |
6693 | fi | |
6694 | ||
6695 | if test x$GCC = xyes; then | |
6696 | test "x$GCC_TEST_OPTIONS" != x && CC="$CC $GCC_TEST_OPTIONS" | |
6697 | else | |
6698 | test "x$NON_GCC_TEST_OPTIONS" != x && CC="$CC $NON_GCC_TEST_OPTIONS" | |
6699 | fi | |
6700 | ||
067d23c9 KY |
6701 | ### Use -Wdeclaration-after-statement if the compiler supports it |
6702 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -Wdeclaration-after-statement" >&5 | |
6703 | $as_echo_n "checking whether gcc understands -Wdeclaration-after-statement... " >&6; } | |
6704 | SAVE_CFLAGS="$CFLAGS" | |
6705 | CFLAGS="$CFLAGS -Wdeclaration-after-statement" | |
6706 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6707 | /* end confdefs.h. */ | |
6708 | ||
6709 | int | |
6710 | main () | |
6711 | { | |
6712 | ||
6713 | ; | |
6714 | return 0; | |
6715 | } | |
6716 | _ACEOF | |
6717 | if ac_fn_c_try_compile "$LINENO"; then : | |
6718 | has_option=yes | |
6719 | else | |
6720 | has_option=no | |
6721 | fi | |
6722 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
6723 | if test $has_option = yes; then | |
6724 | C_WARNINGS_SWITCH="-Wdeclaration-after-statement $C_WARNINGS_SWITCH" | |
6725 | fi | |
6726 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_option" >&5 | |
6727 | $as_echo "$has_option" >&6; } | |
6728 | CFLAGS="$SAVE_CFLAGS" | |
6729 | unset has_option | |
6730 | unset SAVE_CFLAGS | |
6731 | ||
6732 | ### Use -Wold-style-definition if the compiler supports it | |
6733 | # This can be removed when conversion to standard C is finished. | |
6734 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -Wold-style-definition" >&5 | |
6735 | $as_echo_n "checking whether gcc understands -Wold-style-definition... " >&6; } | |
6736 | SAVE_CFLAGS="$CFLAGS" | |
6737 | CFLAGS="$CFLAGS -Wold-style-definition" | |
6738 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6739 | /* end confdefs.h. */ | |
6740 | ||
6741 | int | |
6742 | main () | |
6743 | { | |
6744 | ||
6745 | ; | |
6746 | return 0; | |
6747 | } | |
6748 | _ACEOF | |
6749 | if ac_fn_c_try_compile "$LINENO"; then : | |
6750 | has_option=yes | |
6751 | else | |
6752 | has_option=no | |
6753 | fi | |
6754 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
6755 | if test $has_option = yes; then | |
6756 | C_WARNINGS_SWITCH="-Wold-style-definition $C_WARNINGS_SWITCH" | |
6757 | fi | |
6758 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_option" >&5 | |
6759 | $as_echo "$has_option" >&6; } | |
6760 | CFLAGS="$SAVE_CFLAGS" | |
6761 | unset has_option | |
6762 | unset SAVE_CFLAGS | |
6763 | ||
6764 | ### Use -Wimplicit-function-declaration if the compiler supports it | |
6765 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -Wimplicit-function-declaration" >&5 | |
6766 | $as_echo_n "checking whether gcc understands -Wimplicit-function-declaration... " >&6; } | |
6767 | SAVE_CFLAGS="$CFLAGS" | |
6768 | CFLAGS="$CFLAGS -Wimplicit-function-declaration" | |
6769 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6770 | /* end confdefs.h. */ | |
6771 | ||
6772 | int | |
6773 | main () | |
6774 | { | |
6775 | ||
6776 | ; | |
6777 | return 0; | |
6778 | } | |
6779 | _ACEOF | |
6780 | if ac_fn_c_try_compile "$LINENO"; then : | |
6781 | has_option=yes | |
6782 | else | |
6783 | has_option=no | |
6784 | fi | |
6785 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
6786 | if test $has_option = yes; then | |
6787 | C_WARNINGS_SWITCH="-Wimplicit-function-declaration $C_WARNINGS_SWITCH" | |
6788 | fi | |
6789 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_option" >&5 | |
6790 | $as_echo "$has_option" >&6; } | |
6791 | CFLAGS="$SAVE_CFLAGS" | |
6792 | unset has_option | |
6793 | unset SAVE_CFLAGS | |
6794 | ||
6795 | ||
6796 | ||
6797 | ||
6798 | #### Some other nice autoconf tests. | |
6799 | ||
6800 | ac_ext=c | |
6801 | ac_cpp='$CPP $CPPFLAGS' | |
6802 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
6803 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
6804 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
6805 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 | |
6806 | $as_echo_n "checking how to run the C preprocessor... " >&6; } | |
6807 | # On Suns, sometimes $CPP names a directory. | |
6808 | if test -n "$CPP" && test -d "$CPP"; then | |
6809 | CPP= | |
6810 | fi | |
6811 | if test -z "$CPP"; then | |
5f64f7bd | 6812 | if test "${ac_cv_prog_CPP+set}" = set; then : |
067d23c9 KY |
6813 | $as_echo_n "(cached) " >&6 |
6814 | else | |
6815 | # Double quotes because CPP needs to be expanded | |
6816 | for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" | |
6817 | do | |
6818 | ac_preproc_ok=false | |
6819 | for ac_c_preproc_warn_flag in '' yes | |
6820 | do | |
6821 | # Use a header file that comes with gcc, so configuring glibc | |
6822 | # with a fresh cross-compiler works. | |
6823 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
6824 | # <limits.h> exists even on freestanding compilers. | |
6825 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
6826 | # not just through cpp. "Syntax error" is here to catch this case. | |
6827 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6828 | /* end confdefs.h. */ | |
6829 | #ifdef __STDC__ | |
6830 | # include <limits.h> | |
6831 | #else | |
6832 | # include <assert.h> | |
6833 | #endif | |
6834 | Syntax error | |
6835 | _ACEOF | |
6836 | if ac_fn_c_try_cpp "$LINENO"; then : | |
6837 | ||
6838 | else | |
6839 | # Broken: fails on valid input. | |
6840 | continue | |
6841 | fi | |
5f64f7bd | 6842 | rm -f conftest.err conftest.$ac_ext |
067d23c9 KY |
6843 | |
6844 | # OK, works on sane cases. Now check whether nonexistent headers | |
6845 | # can be detected and how. | |
6846 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6847 | /* end confdefs.h. */ | |
6848 | #include <ac_nonexistent.h> | |
6849 | _ACEOF | |
6850 | if ac_fn_c_try_cpp "$LINENO"; then : | |
6851 | # Broken: success on invalid input. | |
6852 | continue | |
6853 | else | |
6854 | # Passes both tests. | |
6855 | ac_preproc_ok=: | |
6856 | break | |
6857 | fi | |
5f64f7bd | 6858 | rm -f conftest.err conftest.$ac_ext |
067d23c9 KY |
6859 | |
6860 | done | |
6861 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
5f64f7bd | 6862 | rm -f conftest.err conftest.$ac_ext |
067d23c9 KY |
6863 | if $ac_preproc_ok; then : |
6864 | break | |
6865 | fi | |
6866 | ||
6867 | done | |
6868 | ac_cv_prog_CPP=$CPP | |
6869 | ||
6870 | fi | |
6871 | CPP=$ac_cv_prog_CPP | |
6872 | else | |
6873 | ac_cv_prog_CPP=$CPP | |
6874 | fi | |
6875 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 | |
6876 | $as_echo "$CPP" >&6; } | |
6877 | ac_preproc_ok=false | |
6878 | for ac_c_preproc_warn_flag in '' yes | |
6879 | do | |
6880 | # Use a header file that comes with gcc, so configuring glibc | |
6881 | # with a fresh cross-compiler works. | |
6882 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
6883 | # <limits.h> exists even on freestanding compilers. | |
6884 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
6885 | # not just through cpp. "Syntax error" is here to catch this case. | |
6886 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6887 | /* end confdefs.h. */ | |
6888 | #ifdef __STDC__ | |
6889 | # include <limits.h> | |
6890 | #else | |
6891 | # include <assert.h> | |
6892 | #endif | |
6893 | Syntax error | |
6894 | _ACEOF | |
6895 | if ac_fn_c_try_cpp "$LINENO"; then : | |
6896 | ||
6897 | else | |
6898 | # Broken: fails on valid input. | |
6899 | continue | |
6900 | fi | |
5f64f7bd | 6901 | rm -f conftest.err conftest.$ac_ext |
067d23c9 KY |
6902 | |
6903 | # OK, works on sane cases. Now check whether nonexistent headers | |
6904 | # can be detected and how. | |
6905 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6906 | /* end confdefs.h. */ | |
6907 | #include <ac_nonexistent.h> | |
6908 | _ACEOF | |
6909 | if ac_fn_c_try_cpp "$LINENO"; then : | |
6910 | # Broken: success on invalid input. | |
6911 | continue | |
6912 | else | |
6913 | # Passes both tests. | |
6914 | ac_preproc_ok=: | |
6915 | break | |
6916 | fi | |
5f64f7bd | 6917 | rm -f conftest.err conftest.$ac_ext |
067d23c9 KY |
6918 | |
6919 | done | |
6920 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
5f64f7bd | 6921 | rm -f conftest.err conftest.$ac_ext |
067d23c9 KY |
6922 | if $ac_preproc_ok; then : |
6923 | ||
6924 | else | |
6925 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
6926 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
5f64f7bd GM |
6927 | as_fn_error "C preprocessor \"$CPP\" fails sanity check |
6928 | See \`config.log' for more details." "$LINENO" 5; } | |
067d23c9 KY |
6929 | fi |
6930 | ||
6931 | ac_ext=c | |
6932 | ac_cpp='$CPP $CPPFLAGS' | |
6933 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
6934 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
6935 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
6936 | ||
067d23c9 KY |
6937 | |
6938 | if test "x$RANLIB" = x; then | |
6939 | if test -n "$ac_tool_prefix"; then | |
6940 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
6941 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
6942 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
6943 | $as_echo_n "checking for $ac_word... " >&6; } | |
5f64f7bd | 6944 | if test "${ac_cv_prog_RANLIB+set}" = set; then : |
067d23c9 KY |
6945 | $as_echo_n "(cached) " >&6 |
6946 | else | |
6947 | if test -n "$RANLIB"; then | |
6948 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
6949 | else | |
6950 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6951 | for as_dir in $PATH | |
6952 | do | |
6953 | IFS=$as_save_IFS | |
6954 | test -z "$as_dir" && as_dir=. | |
6955 | for ac_exec_ext in '' $ac_executable_extensions; do | |
6956 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
6957 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" | |
6958 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
6959 | break 2 | |
6960 | fi | |
6961 | done | |
6962 | done | |
6963 | IFS=$as_save_IFS | |
6964 | ||
6965 | fi | |
6966 | fi | |
6967 | RANLIB=$ac_cv_prog_RANLIB | |
6968 | if test -n "$RANLIB"; then | |
6969 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 | |
6970 | $as_echo "$RANLIB" >&6; } | |
6971 | else | |
6972 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
6973 | $as_echo "no" >&6; } | |
6974 | fi | |
6975 | ||
6976 | ||
6977 | fi | |
6978 | if test -z "$ac_cv_prog_RANLIB"; then | |
6979 | ac_ct_RANLIB=$RANLIB | |
6980 | # Extract the first word of "ranlib", so it can be a program name with args. | |
6981 | set dummy ranlib; ac_word=$2 | |
6982 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
6983 | $as_echo_n "checking for $ac_word... " >&6; } | |
5f64f7bd | 6984 | if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : |
067d23c9 KY |
6985 | $as_echo_n "(cached) " >&6 |
6986 | else | |
6987 | if test -n "$ac_ct_RANLIB"; then | |
6988 | ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. | |
6989 | else | |
6990 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6991 | for as_dir in $PATH | |
6992 | do | |
6993 | IFS=$as_save_IFS | |
6994 | test -z "$as_dir" && as_dir=. | |
6995 | for ac_exec_ext in '' $ac_executable_extensions; do | |
6996 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
6997 | ac_cv_prog_ac_ct_RANLIB="ranlib" | |
6998 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
6999 | break 2 | |
7000 | fi | |
7001 | done | |
7002 | done | |
7003 | IFS=$as_save_IFS | |
7004 | ||
7005 | fi | |
7006 | fi | |
7007 | ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB | |
7008 | if test -n "$ac_ct_RANLIB"; then | |
7009 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 | |
7010 | $as_echo "$ac_ct_RANLIB" >&6; } | |
7011 | else | |
7012 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
7013 | $as_echo "no" >&6; } | |
7014 | fi | |
7015 | ||
7016 | if test "x$ac_ct_RANLIB" = x; then | |
7017 | RANLIB=":" | |
7018 | else | |
7019 | case $cross_compiling:$ac_tool_warned in | |
7020 | yes:) | |
7021 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
7022 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
7023 | ac_tool_warned=yes ;; | |
7024 | esac | |
7025 | RANLIB=$ac_ct_RANLIB | |
7026 | fi | |
7027 | else | |
7028 | RANLIB="$ac_cv_prog_RANLIB" | |
7029 | fi | |
7030 | ||
7031 | fi | |
7032 | ||
7033 | ## Although we're running on an amd64 kernel, we're actually compiling for | |
7034 | ## the x86 architecture. The user should probably have provided an | |
7035 | ## explicit --build to `configure', but if everything else than the kernel | |
7036 | ## is running in i386 mode, we can help them out. | |
7037 | if test "$machine" = "amdx86-64"; then | |
7038 | ac_fn_c_check_decl "$LINENO" "i386" "ac_cv_have_decl_i386" "$ac_includes_default" | |
5f64f7bd | 7039 | if test "x$ac_cv_have_decl_i386" = x""yes; then : |
067d23c9 KY |
7040 | |
7041 | fi | |
7042 | ||
7043 | if test "$ac_cv_have_decl_i386" = "yes"; then | |
7044 | canonical=`echo "$canonical" | sed -e 's/^amd64/i386/' -e 's/^x86_64/i386/'` | |
7045 | machine=intel386 | |
7046 | machfile="m/${machine}.h" | |
7047 | fi | |
7048 | fi | |
7049 | ||
7050 | # Extract the first word of "install-info", so it can be a program name with args. | |
7051 | set dummy install-info; ac_word=$2 | |
7052 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
7053 | $as_echo_n "checking for $ac_word... " >&6; } | |
5f64f7bd | 7054 | if test "${ac_cv_path_INSTALL_INFO+set}" = set; then : |
067d23c9 KY |
7055 | $as_echo_n "(cached) " >&6 |
7056 | else | |
7057 | case $INSTALL_INFO in | |
7058 | [\\/]* | ?:[\\/]*) | |
7059 | ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path. | |
7060 | ;; | |
7061 | *) | |
7062 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7063 | for as_dir in $PATH | |
7064 | do | |
7065 | IFS=$as_save_IFS | |
7066 | test -z "$as_dir" && as_dir=. | |
7067 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7068 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
7069 | ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext" | |
7070 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7071 | break 2 | |
7072 | fi | |
7073 | done | |
7074 | done | |
7075 | IFS=$as_save_IFS | |
7076 | ||
7077 | ;; | |
7078 | esac | |
7079 | fi | |
7080 | INSTALL_INFO=$ac_cv_path_INSTALL_INFO | |
7081 | if test -n "$INSTALL_INFO"; then | |
7082 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_INFO" >&5 | |
7083 | $as_echo "$INSTALL_INFO" >&6; } | |
7084 | else | |
7085 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
7086 | $as_echo "no" >&6; } | |
7087 | fi | |
7088 | ||
7089 | ||
7090 | # Extract the first word of "install-info", so it can be a program name with args. | |
7091 | set dummy install-info; ac_word=$2 | |
7092 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
7093 | $as_echo_n "checking for $ac_word... " >&6; } | |
5f64f7bd | 7094 | if test "${ac_cv_path_INSTALL_INFO+set}" = set; then : |
067d23c9 KY |
7095 | $as_echo_n "(cached) " >&6 |
7096 | else | |
7097 | case $INSTALL_INFO in | |
7098 | [\\/]* | ?:[\\/]*) | |
7099 | ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path. | |
7100 | ;; | |
7101 | *) | |
7102 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7103 | for as_dir in /usr/sbin | |
7104 | do | |
7105 | IFS=$as_save_IFS | |
7106 | test -z "$as_dir" && as_dir=. | |
7107 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7108 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
7109 | ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext" | |
7110 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7111 | break 2 | |
7112 | fi | |
7113 | done | |
7114 | done | |
7115 | IFS=$as_save_IFS | |
7116 | ||
7117 | ;; | |
7118 | esac | |
7119 | fi | |
7120 | INSTALL_INFO=$ac_cv_path_INSTALL_INFO | |
7121 | if test -n "$INSTALL_INFO"; then | |
7122 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_INFO" >&5 | |
7123 | $as_echo "$INSTALL_INFO" >&6; } | |
7124 | else | |
7125 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
7126 | $as_echo "no" >&6; } | |
7127 | fi | |
7128 | ||
7129 | ||
7130 | # Extract the first word of "install-info", so it can be a program name with args. | |
7131 | set dummy install-info; ac_word=$2 | |
7132 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
7133 | $as_echo_n "checking for $ac_word... " >&6; } | |
5f64f7bd | 7134 | if test "${ac_cv_path_INSTALL_INFO+set}" = set; then : |
067d23c9 KY |
7135 | $as_echo_n "(cached) " >&6 |
7136 | else | |
7137 | case $INSTALL_INFO in | |
7138 | [\\/]* | ?:[\\/]*) | |
7139 | ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path. | |
7140 | ;; | |
7141 | *) | |
7142 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7143 | for as_dir in /sbin | |
7144 | do | |
7145 | IFS=$as_save_IFS | |
7146 | test -z "$as_dir" && as_dir=. | |
7147 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7148 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
7149 | ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext" | |
7150 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7151 | break 2 | |
7152 | fi | |
7153 | done | |
7154 | done | |
7155 | IFS=$as_save_IFS | |
7156 | ||
7157 | test -z "$ac_cv_path_INSTALL_INFO" && ac_cv_path_INSTALL_INFO=":" | |
7158 | ;; | |
7159 | esac | |
7160 | fi | |
7161 | INSTALL_INFO=$ac_cv_path_INSTALL_INFO | |
7162 | if test -n "$INSTALL_INFO"; then | |
7163 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_INFO" >&5 | |
7164 | $as_echo "$INSTALL_INFO" >&6; } | |
7165 | else | |
7166 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
7167 | $as_echo "no" >&6; } | |
7168 | fi | |
7169 | ||
7170 | ||
7171 | # Extract the first word of "gzip", so it can be a program name with args. | |
7172 | set dummy gzip; ac_word=$2 | |
7173 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
7174 | $as_echo_n "checking for $ac_word... " >&6; } | |
5f64f7bd | 7175 | if test "${ac_cv_path_GZIP_PROG+set}" = set; then : |
067d23c9 KY |
7176 | $as_echo_n "(cached) " >&6 |
7177 | else | |
7178 | case $GZIP_PROG in | |
7179 | [\\/]* | ?:[\\/]*) | |
7180 | ac_cv_path_GZIP_PROG="$GZIP_PROG" # Let the user override the test with a path. | |
7181 | ;; | |
7182 | *) | |
7183 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7184 | for as_dir in $PATH | |
7185 | do | |
7186 | IFS=$as_save_IFS | |
7187 | test -z "$as_dir" && as_dir=. | |
7188 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7189 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
7190 | ac_cv_path_GZIP_PROG="$as_dir/$ac_word$ac_exec_ext" | |
7191 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7192 | break 2 | |
7193 | fi | |
7194 | done | |
7195 | done | |
7196 | IFS=$as_save_IFS | |
7197 | ||
7198 | ;; | |
7199 | esac | |
7200 | fi | |
7201 | GZIP_PROG=$ac_cv_path_GZIP_PROG | |
7202 | if test -n "$GZIP_PROG"; then | |
7203 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP_PROG" >&5 | |
7204 | $as_echo "$GZIP_PROG" >&6; } | |
7205 | else | |
7206 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
7207 | $as_echo "no" >&6; } | |
7208 | fi | |
7209 | ||
7210 | ||
7211 | ||
7212 | ||
7213 | ## Need makeinfo >= 4.6 (?) to build the manuals. | |
7214 | # Extract the first word of "makeinfo", so it can be a program name with args. | |
7215 | set dummy makeinfo; ac_word=$2 | |
7216 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
7217 | $as_echo_n "checking for $ac_word... " >&6; } | |
5f64f7bd | 7218 | if test "${ac_cv_path_MAKEINFO+set}" = set; then : |
067d23c9 KY |
7219 | $as_echo_n "(cached) " >&6 |
7220 | else | |
7221 | case $MAKEINFO in | |
7222 | [\\/]* | ?:[\\/]*) | |
7223 | ac_cv_path_MAKEINFO="$MAKEINFO" # Let the user override the test with a path. | |
7224 | ;; | |
7225 | *) | |
7226 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7227 | for as_dir in $PATH | |
7228 | do | |
7229 | IFS=$as_save_IFS | |
7230 | test -z "$as_dir" && as_dir=. | |
7231 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7232 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
7233 | ac_cv_path_MAKEINFO="$as_dir/$ac_word$ac_exec_ext" | |
7234 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7235 | break 2 | |
7236 | fi | |
7237 | done | |
7238 | done | |
7239 | IFS=$as_save_IFS | |
7240 | ||
7241 | test -z "$ac_cv_path_MAKEINFO" && ac_cv_path_MAKEINFO="no" | |
7242 | ;; | |
7243 | esac | |
7244 | fi | |
7245 | MAKEINFO=$ac_cv_path_MAKEINFO | |
7246 | if test -n "$MAKEINFO"; then | |
7247 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKEINFO" >&5 | |
7248 | $as_echo "$MAKEINFO" >&6; } | |
7249 | else | |
7250 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
7251 | $as_echo "no" >&6; } | |
7252 | fi | |
7253 | ||
7254 | ||
7255 | if test "$MAKEINFO" != "no" && \ | |
7256 | test x"`$MAKEINFO --version 2> /dev/null | $EGREP 'texinfo[^0-9]*([1-4][0-9]+|[5-9]|4\.[6-9]|4\.[1-5][0-9]+)'`" = x; then | |
7257 | MAKEINFO=no | |
7258 | fi | |
7259 | ||
7260 | ## Makeinfo is unusual. For a released Emacs, the manuals are | |
7261 | ## pre-built, and not deleted by the normal clean rules. makeinfo is | |
7262 | ## therefore in the category of "special tools" not normally required, which | |
7263 | ## configure does not have to check for (eg autoconf itself). | |
7264 | ## In a Bazaar checkout on the other hand, the manuals are not included. | |
7265 | ## So makeinfo is a requirement to build from Bazaar, and configure | |
7266 | ## should test for it as it does for any other build requirement. | |
7267 | ## We use the presence of $srcdir/info/emacs to distinguish a release, | |
7268 | ## with pre-built manuals, from a Bazaar checkout. | |
96f129d5 GM |
7269 | HAVE_MAKEINFO=yes |
7270 | ||
067d23c9 | 7271 | if test "$MAKEINFO" = "no"; then |
96f129d5 | 7272 | MAKEINFO=makeinfo |
067d23c9 | 7273 | if test "x${with_makeinfo}" = "xno"; then |
96f129d5 | 7274 | HAVE_MAKEINFO=no |
067d23c9 | 7275 | elif test ! -e $srcdir/info/emacs; then |
5f64f7bd | 7276 | as_fn_error "You do not seem to have makeinfo >= 4.6, and your |
067d23c9 KY |
7277 | source tree does not seem to have pre-built manuals in the \`info' directory. |
7278 | Either install a suitable version of makeinfo, or re-run configure | |
7279 | with the \`--without-makeinfo' option to build without the manuals. " "$LINENO" 5 | |
7280 | fi | |
7281 | fi | |
7282 | ||
7283 | ||
96f129d5 | 7284 | |
067d23c9 KY |
7285 | if test x$GCC = xyes; then |
7286 | test "x$GCC_LINK_TEST_OPTIONS" != x && \ | |
7287 | ac_link="$ac_link $GCC_LINK_TEST_OPTIONS" | |
7288 | else | |
7289 | test "x$NON_GCC_LINK_TEST_OPTIONS" != x && \ | |
7290 | ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS" | |
7291 | fi | |
7292 | ||
7293 | ||
7294 | late_LDFLAGS=$LDFLAGS | |
7295 | if test x$GCC = xyes; then | |
7296 | LDFLAGS="$LDFLAGS -Wl,-znocombreloc" | |
7297 | else | |
7298 | LDFLAGS="$LDFLAGS -znocombreloc" | |
7299 | fi | |
7300 | ||
7301 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -znocombreloc" >&5 | |
7302 | $as_echo_n "checking for -znocombreloc... " >&6; } | |
7303 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7304 | /* end confdefs.h. */ | |
7305 | ||
7306 | int | |
7307 | main () | |
7308 | { | |
7309 | ||
7310 | ; | |
7311 | return 0; | |
7312 | } | |
7313 | _ACEOF | |
7314 | if ac_fn_c_try_link "$LINENO"; then : | |
7315 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
7316 | $as_echo "yes" >&6; } | |
7317 | else | |
7318 | LDFLAGS=$late_LDFLAGS | |
7319 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
7320 | $as_echo "no" >&6; } | |
7321 | fi | |
7322 | rm -f core conftest.err conftest.$ac_objext \ | |
7323 | conftest$ac_exeext conftest.$ac_ext | |
7324 | ||
7325 | ||
7326 | # The value of CPP is a quoted variable reference, so we need to do this | |
7327 | # to get its actual value... | |
7328 | CPP=`eval "echo $CPP"` | |
7329 | ||
7330 | ||
125c3718 | 7331 | test "x$CANNOT_DUMP" = "x" && CANNOT_DUMP=no |
067d23c9 | 7332 | case "$opsys" in |
125c3718 PE |
7333 | your-opsys-here) CANNOT_DUMP=yes ;; |
7334 | esac | |
7335 | ||
7336 | test "$CANNOT_DUMP" = "yes" && \ | |
067d23c9 KY |
7337 | |
7338 | $as_echo "#define CANNOT_DUMP 1" >>confdefs.h | |
7339 | ||
125c3718 | 7340 | |
067d23c9 KY |
7341 | |
7342 | ||
7343 | ||
7344 | UNEXEC_OBJ=unexelf.o | |
7345 | case "$opsys" in | |
7346 | # MSDOS uses unexcoff.o | |
7347 | # MSWindows uses unexw32.o | |
7348 | aix4-2) | |
7349 | UNEXEC_OBJ=unexaix.o | |
7350 | ;; | |
7351 | cygwin) | |
7352 | UNEXEC_OBJ=unexcw.o | |
7353 | ;; | |
7354 | darwin) | |
7355 | UNEXEC_OBJ=unexmacosx.o | |
7356 | ;; | |
7357 | hpux10-20 | hpux11) | |
7358 | UNEXEC_OBJ=unexhp9k800.o | |
7359 | ;; | |
7360 | sol2-10) | |
7361 | # Use the Solaris dldump() function, called from unexsol.c, to dump | |
7362 | # emacs, instead of the generic ELF dump code found in unexelf.c. | |
7363 | # The resulting binary has a complete symbol table, and is better | |
7364 | # for debugging and other observability tools (debuggers, pstack, etc). | |
7365 | # | |
7366 | # If you encounter a problem using dldump(), please consider sending | |
7367 | # a message to the OpenSolaris tools-linking mailing list: | |
7368 | # http://mail.opensolaris.org/mailman/listinfo/tools-linking | |
7369 | # | |
7370 | # It is likely that dldump() works with older Solaris too, but this has | |
7371 | # not been tested, so for now this change is for Solaris 10 or newer. | |
7372 | UNEXEC_OBJ=unexsol.o | |
7373 | ;; | |
7374 | esac | |
7375 | ||
7376 | LD_SWITCH_SYSTEM= | |
7377 | case "$opsys" in | |
7378 | freebsd) | |
7379 | ## Let `ld' find image libs and similar things in /usr/local/lib. | |
7380 | ## The system compiler, GCC, has apparently been modified to not | |
7381 | ## look there, contrary to what a stock GCC would do. | |
7382 | LD_SWITCH_SYSTEM=-L/usr/local/lib | |
7383 | ;; | |
7384 | ||
7385 | gnu-linux) | |
7386 | ## cpp test was "ifdef __mips__", but presumably this is equivalent... | |
d6a003a8 | 7387 | case $host_cpu in mips*) LD_SWITCH_SYSTEM="-G 0";; esac |
067d23c9 KY |
7388 | ;; |
7389 | ||
7390 | netbsd) | |
7391 | LD_SWITCH_SYSTEM="-Wl,-rpath,/usr/pkg/lib -L/usr/pkg/lib -Wl,-rpath,/usr/local/lib -L/usr/local/lib" | |
7392 | ;; | |
7393 | ||
7394 | openbsd) | |
7395 | ## Han Boetes <han@mijncomputer.nl> says this is necessary, | |
7396 | ## otherwise Emacs dumps core on elf systems. | |
7397 | LD_SWITCH_SYSTEM="-Z" | |
7398 | ;; | |
7399 | esac | |
7400 | ||
7401 | ||
7402 | ac_link="$ac_link $LD_SWITCH_SYSTEM" | |
7403 | ||
7404 | ## This setting of LD_SWITCH_SYSTEM references LD_SWITCH_X_SITE_AUX, | |
7405 | ## which has not been defined yet. When this was handled with cpp, | |
7406 | ## it was expanded to null when configure sourced the s/*.h file. | |
7407 | ## Thus LD_SWITCH_SYSTEM had different values in configure and the Makefiles. | |
7408 | ## FIXME it would be cleaner to put this in LD_SWITCH_SYSTEM_TEMACS | |
7409 | ## (or somesuch), but because it is supposed to go at the _front_ | |
7410 | ## of LD_SWITCH_SYSTEM, we cannot do that in exactly the same way. | |
7411 | ## Compare with the gnu-linux case below, which added to the end | |
7412 | ## of LD_SWITCH_SYSTEM, and so can instead go at the front of | |
7413 | ## LD_SWITCH_SYSTEM_TEMACS. | |
7414 | case "$opsys" in | |
7415 | netbsd|openbsd) | |
7416 | ## _AUX_RPATH is like _AUX, but uses -rpath instead of -R. | |
7417 | LD_SWITCH_SYSTEM="\$(LD_SWITCH_X_SITE_AUX_RPATH) $LD_SWITCH_SYSTEM" ;; | |
7418 | esac | |
7419 | ||
7420 | ||
7421 | C_SWITCH_MACHINE= | |
7422 | if test "$machine" = "alpha"; then | |
7423 | ac_fn_c_check_decl "$LINENO" "__ELF__" "ac_cv_have_decl___ELF__" "$ac_includes_default" | |
5f64f7bd | 7424 | if test "x$ac_cv_have_decl___ELF__" = x""yes; then : |
067d23c9 KY |
7425 | |
7426 | fi | |
7427 | ||
7428 | if test "$ac_cv_have_decl___ELF__" = "yes"; then | |
7429 | ## With ELF, make sure that all common symbols get allocated to in the | |
7430 | ## data section. Otherwise, the dump of temacs may miss variables in | |
7431 | ## the shared library that have been initialized. For example, with | |
7432 | ## GNU libc, __malloc_initialized would normally be resolved to the | |
7433 | ## shared library's .bss section, which is fatal. | |
7434 | if test "x$GCC" = "xyes"; then | |
7435 | C_SWITCH_MACHINE="-fno-common" | |
7436 | else | |
5f64f7bd | 7437 | as_fn_error "What gives? Fix me if DEC Unix supports ELF now." "$LINENO" 5 |
067d23c9 KY |
7438 | fi |
7439 | else | |
7440 | UNEXEC_OBJ=unexalpha.o | |
7441 | fi | |
7442 | fi | |
7443 | ||
7444 | ||
7445 | ||
7446 | ||
7447 | C_SWITCH_SYSTEM= | |
7448 | ## Some programs in src produce warnings saying certain subprograms | |
7449 | ## are too complex and need a MAXMEM value greater than 2000 for | |
7450 | ## additional optimization. --nils@exp-math.uni-essen.de | |
7451 | test "$opsys" = "aix4.2" && test "x$GCC" != "xyes" && \ | |
7452 | C_SWITCH_SYSTEM="-ma -qmaxmem=4000" | |
7453 | ## gnu-linux might need -D_BSD_SOURCE on old libc5 systems. | |
7454 | ## It is redundant in glibc2, since we define _GNU_SOURCE. | |
7455 | ||
7456 | ||
7457 | ||
7458 | LIBS_SYSTEM= | |
7459 | case "$opsys" in | |
7460 | ## IBM's X11R5 uses -lIM and -liconv in AIX 3.2.2. | |
7461 | aix4-2) LIBS_SYSTEM="-lrts -lIM -liconv" ;; | |
7462 | ||
7463 | freebsd) LIBS_SYSTEM="-lutil" ;; | |
7464 | ||
7465 | hpux*) LIBS_SYSTEM="-l:libdld.sl" ;; | |
7466 | ||
1f5d53eb | 7467 | sol2*) LIBS_SYSTEM="-lsocket -lnsl" ;; |
067d23c9 KY |
7468 | |
7469 | ## Motif needs -lgen. | |
7470 | unixware) LIBS_SYSTEM="-lsocket -lnsl -lelf -lgen" ;; | |
7471 | esac | |
7472 | ||
7473 | ||
7474 | ||
7475 | ### Make sure subsequent tests use flags consistent with the build flags. | |
7476 | ||
7477 | if test x"${OVERRIDE_CPPFLAGS}" != x; then | |
7478 | CPPFLAGS="${OVERRIDE_CPPFLAGS}" | |
7479 | else | |
7480 | CPPFLAGS="$C_SWITCH_SYSTEM $C_SWITCH_MACHINE $CPPFLAGS" | |
7481 | fi | |
7482 | ||
4fda9c95 GM |
7483 | # Suppress obsolescent Autoconf test for size_t; Emacs assumes C89 or better. |
7484 | ||
3e0be4ab GM |
7485 | # Likewise for obsolescent test for uid_t, gid_t; Emacs assumes them. |
7486 | ||
4fda9c95 | 7487 | |
067d23c9 KY |
7488 | # Check whether --enable-largefile was given. |
7489 | if test "${enable_largefile+set}" = set; then : | |
7490 | enableval=$enable_largefile; | |
7491 | fi | |
7492 | ||
7493 | if test "$enable_largefile" != no; then | |
7494 | ||
7495 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 | |
7496 | $as_echo_n "checking for special C compiler options needed for large files... " >&6; } | |
5f64f7bd | 7497 | if test "${ac_cv_sys_largefile_CC+set}" = set; then : |
067d23c9 KY |
7498 | $as_echo_n "(cached) " >&6 |
7499 | else | |
7500 | ac_cv_sys_largefile_CC=no | |
7501 | if test "$GCC" != yes; then | |
7502 | ac_save_CC=$CC | |
7503 | while :; do | |
7504 | # IRIX 6.2 and later do not support large files by default, | |
7505 | # so use the C compiler's -n32 option if that helps. | |
7506 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7507 | /* end confdefs.h. */ | |
7508 | #include <sys/types.h> | |
7509 | /* Check that off_t can represent 2**63 - 1 correctly. | |
7510 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
7511 | since some C++ compilers masquerading as C compilers | |
7512 | incorrectly reject 9223372036854775807. */ | |
7513 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
7514 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
7515 | && LARGE_OFF_T % 2147483647 == 1) | |
7516 | ? 1 : -1]; | |
7517 | int | |
7518 | main () | |
7519 | { | |
7520 | ||
7521 | ; | |
7522 | return 0; | |
7523 | } | |
7524 | _ACEOF | |
7525 | if ac_fn_c_try_compile "$LINENO"; then : | |
7526 | break | |
7527 | fi | |
7528 | rm -f core conftest.err conftest.$ac_objext | |
7529 | CC="$CC -n32" | |
7530 | if ac_fn_c_try_compile "$LINENO"; then : | |
7531 | ac_cv_sys_largefile_CC=' -n32'; break | |
7532 | fi | |
7533 | rm -f core conftest.err conftest.$ac_objext | |
7534 | break | |
7535 | done | |
7536 | CC=$ac_save_CC | |
7537 | rm -f conftest.$ac_ext | |
7538 | fi | |
7539 | fi | |
7540 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 | |
7541 | $as_echo "$ac_cv_sys_largefile_CC" >&6; } | |
7542 | if test "$ac_cv_sys_largefile_CC" != no; then | |
7543 | CC=$CC$ac_cv_sys_largefile_CC | |
7544 | fi | |
7545 | ||
7546 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 | |
7547 | $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } | |
5f64f7bd | 7548 | if test "${ac_cv_sys_file_offset_bits+set}" = set; then : |
067d23c9 KY |
7549 | $as_echo_n "(cached) " >&6 |
7550 | else | |
7551 | while :; do | |
7552 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7553 | /* end confdefs.h. */ | |
7554 | #include <sys/types.h> | |
7555 | /* Check that off_t can represent 2**63 - 1 correctly. | |
7556 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
7557 | since some C++ compilers masquerading as C compilers | |
7558 | incorrectly reject 9223372036854775807. */ | |
7559 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
7560 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
7561 | && LARGE_OFF_T % 2147483647 == 1) | |
7562 | ? 1 : -1]; | |
7563 | int | |
7564 | main () | |
7565 | { | |
7566 | ||
7567 | ; | |
7568 | return 0; | |
7569 | } | |
7570 | _ACEOF | |
7571 | if ac_fn_c_try_compile "$LINENO"; then : | |
7572 | ac_cv_sys_file_offset_bits=no; break | |
7573 | fi | |
7574 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7575 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7576 | /* end confdefs.h. */ | |
7577 | #define _FILE_OFFSET_BITS 64 | |
7578 | #include <sys/types.h> | |
7579 | /* Check that off_t can represent 2**63 - 1 correctly. | |
7580 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
7581 | since some C++ compilers masquerading as C compilers | |
7582 | incorrectly reject 9223372036854775807. */ | |
7583 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
7584 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
7585 | && LARGE_OFF_T % 2147483647 == 1) | |
7586 | ? 1 : -1]; | |
7587 | int | |
7588 | main () | |
7589 | { | |
7590 | ||
7591 | ; | |
7592 | return 0; | |
7593 | } | |
7594 | _ACEOF | |
7595 | if ac_fn_c_try_compile "$LINENO"; then : | |
7596 | ac_cv_sys_file_offset_bits=64; break | |
7597 | fi | |
7598 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7599 | ac_cv_sys_file_offset_bits=unknown | |
7600 | break | |
7601 | done | |
7602 | fi | |
7603 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 | |
7604 | $as_echo "$ac_cv_sys_file_offset_bits" >&6; } | |
7605 | case $ac_cv_sys_file_offset_bits in #( | |
7606 | no | unknown) ;; | |
7607 | *) | |
7608 | cat >>confdefs.h <<_ACEOF | |
7609 | #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits | |
7610 | _ACEOF | |
7611 | ;; | |
7612 | esac | |
7613 | rm -rf conftest* | |
7614 | if test $ac_cv_sys_file_offset_bits = unknown; then | |
7615 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 | |
7616 | $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } | |
5f64f7bd | 7617 | if test "${ac_cv_sys_large_files+set}" = set; then : |
067d23c9 KY |
7618 | $as_echo_n "(cached) " >&6 |
7619 | else | |
7620 | while :; do | |
7621 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7622 | /* end confdefs.h. */ | |
7623 | #include <sys/types.h> | |
7624 | /* Check that off_t can represent 2**63 - 1 correctly. | |
7625 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
7626 | since some C++ compilers masquerading as C compilers | |
7627 | incorrectly reject 9223372036854775807. */ | |
7628 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
7629 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
7630 | && LARGE_OFF_T % 2147483647 == 1) | |
7631 | ? 1 : -1]; | |
7632 | int | |
7633 | main () | |
7634 | { | |
7635 | ||
7636 | ; | |
7637 | return 0; | |
7638 | } | |
7639 | _ACEOF | |
7640 | if ac_fn_c_try_compile "$LINENO"; then : | |
7641 | ac_cv_sys_large_files=no; break | |
7642 | fi | |
7643 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7644 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7645 | /* end confdefs.h. */ | |
7646 | #define _LARGE_FILES 1 | |
7647 | #include <sys/types.h> | |
7648 | /* Check that off_t can represent 2**63 - 1 correctly. | |
7649 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
7650 | since some C++ compilers masquerading as C compilers | |
7651 | incorrectly reject 9223372036854775807. */ | |
7652 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
7653 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
7654 | && LARGE_OFF_T % 2147483647 == 1) | |
7655 | ? 1 : -1]; | |
7656 | int | |
7657 | main () | |
7658 | { | |
7659 | ||
7660 | ; | |
7661 | return 0; | |
7662 | } | |
7663 | _ACEOF | |
7664 | if ac_fn_c_try_compile "$LINENO"; then : | |
7665 | ac_cv_sys_large_files=1; break | |
7666 | fi | |
7667 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7668 | ac_cv_sys_large_files=unknown | |
7669 | break | |
7670 | done | |
7671 | fi | |
7672 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 | |
7673 | $as_echo "$ac_cv_sys_large_files" >&6; } | |
7674 | case $ac_cv_sys_large_files in #( | |
7675 | no | unknown) ;; | |
7676 | *) | |
7677 | cat >>confdefs.h <<_ACEOF | |
7678 | #define _LARGE_FILES $ac_cv_sys_large_files | |
7679 | _ACEOF | |
7680 | ;; | |
7681 | esac | |
7682 | rm -rf conftest* | |
7683 | fi | |
7684 | fi | |
7685 | ||
7686 | ||
7687 | ||
067d23c9 KY |
7688 | LIB_MATH=-lm |
7689 | LIB_STANDARD= | |
7690 | START_FILES= | |
7691 | ||
7692 | case $opsys in | |
7693 | cygwin ) | |
7694 | LIB_MATH= | |
7695 | START_FILES='pre-crt0.o' | |
7696 | ;; | |
7697 | darwin ) | |
7698 | ## Adding -lm confuses the dynamic linker, so omit it. | |
7699 | LIB_MATH= | |
7700 | START_FILES='pre-crt0.o' | |
7701 | ;; | |
7702 | freebsd ) | |
7703 | LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o $(CRT_DIR)/crtn.o' | |
7704 | START_FILES='pre-crt0.o $(CRT_DIR)/crt1.o $(CRT_DIR)/crti.o $(CRT_DIR)/crtbegin.o' | |
7705 | ;; | |
7706 | gnu-linux | gnu-kfreebsd ) | |
7707 | LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtn.o' | |
7708 | START_FILES='pre-crt0.o $(CRT_DIR)/crt1.o $(CRT_DIR)/crti.o' | |
7709 | ;; | |
7710 | hpux10-20 | hpux11 ) | |
7711 | LIB_STANDARD=-lc | |
7712 | START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o' | |
7713 | ;; | |
7714 | netbsd | openbsd ) | |
7715 | if test -f $CRT_DIR/crti.o; then | |
7716 | LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o $(CRT_DIR)/crtn.o' | |
7717 | START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o $(CRT_DIR)/crti.o $(CRT_DIR)/crtbegin.o' | |
7718 | else | |
7719 | LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o' | |
7720 | START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o $(CRT_DIR)/crtbegin.o' | |
7721 | fi | |
7722 | ;; | |
7723 | esac | |
7724 | ||
7725 | ||
7726 | ||
7727 | ||
130f1dac GM |
7728 | crt_files= |
7729 | ||
7730 | for file in x $LIB_STANDARD $START_FILES; do | |
7731 | case "$file" in | |
7732 | *CRT_DIR*) crt_files="$crt_files `echo $file | sed -e 's|.*/||'`" ;; | |
7733 | esac | |
7734 | done | |
7735 | ||
7736 | if test "x$crt_files" != x; then | |
7737 | ||
7738 | ## If user specified a crt-dir, use that unconditionally. | |
7739 | crt_gcc=no | |
7740 | ||
7741 | if test "X$CRT_DIR" = "X"; then | |
7742 | ||
7743 | CRT_DIR=/usr/lib # default | |
7744 | ||
7745 | case "$canonical" in | |
7746 | x86_64-*-linux-gnu* | s390x-*-linux-gnu*) | |
7747 | ## On x86-64 and s390x GNU/Linux distributions, the standard library | |
7748 | ## can be in a variety of places. We only try /usr/lib64 and /usr/lib. | |
7749 | ## For anything else (eg /usr/lib32), it is up the user to specify | |
7750 | ## the location (bug#5655). | |
7751 | ## Test for crtn.o, not just the directory, because sometimes the | |
7752 | ## directory exists but does not have the relevant files (bug#1287). | |
7753 | ## FIXME better to test for binary compatibility somehow. | |
7754 | test -e /usr/lib64/crtn.o && CRT_DIR=/usr/lib64 | |
7755 | ;; | |
7756 | ||
7757 | powerpc64-*-linux-gnu* | sparc64-*-linux-gnu*) CRT_DIR=/usr/lib64 ;; | |
7758 | esac | |
7759 | ||
7760 | case "$opsys" in | |
7761 | hpux10-20) CRT_DIR=/lib ;; | |
7762 | esac | |
7763 | ||
7764 | test "x${GCC}" = xyes && crt_gcc=yes | |
7765 | ||
7766 | fi # CRT_DIR = "" | |
7767 | ||
7768 | crt_missing= | |
7769 | ||
7770 | for file in $crt_files; do | |
7771 | ||
7772 | ## If we're using gcc, try to determine it automatically by asking | |
7773 | ## gcc. [If this doesn't work, CRT_DIR will remain at the | |
7774 | ## system-dependent default from above.] | |
7775 | if test $crt_gcc = yes && test ! -e $CRT_DIR/$file; then | |
7776 | ||
7777 | crt_file=`$CC --print-file-name=$file 2>/dev/null` | |
7778 | case "$crt_file" in | |
7779 | */*) | |
7780 | CRT_DIR=`$as_dirname -- "$crt_file" || | |
7781 | $as_expr X"$crt_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
7782 | X"$crt_file" : 'X\(//\)[^/]' \| \ | |
7783 | X"$crt_file" : 'X\(//\)$' \| \ | |
7784 | X"$crt_file" : 'X\(/\)' \| . 2>/dev/null || | |
7785 | $as_echo X"$crt_file" | | |
7786 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
7787 | s//\1/ | |
7788 | q | |
7789 | } | |
7790 | /^X\(\/\/\)[^/].*/{ | |
7791 | s//\1/ | |
7792 | q | |
7793 | } | |
7794 | /^X\(\/\/\)$/{ | |
7795 | s//\1/ | |
7796 | q | |
7797 | } | |
7798 | /^X\(\/\).*/{ | |
7799 | s//\1/ | |
7800 | q | |
7801 | } | |
7802 | s/.*/./; q'` | |
7803 | ;; | |
7804 | esac | |
7805 | fi | |
7806 | ||
7807 | crt_gcc=no | |
7808 | ||
7809 | test -e $CRT_DIR/$file || crt_missing="$crt_missing $file" | |
7810 | done # $crt_files | |
7811 | ||
7812 | test "x$crt_missing" = x || \ | |
7813 | as_fn_error "Required file(s) not found:$crt_missing | |
7814 | Try using the --with-crt-dir option." "$LINENO" 5 | |
7815 | ||
7816 | fi # crt_files != "" | |
7817 | ||
7818 | ||
7819 | ||
7820 | ||
067d23c9 KY |
7821 | |
7822 | ||
7823 | ||
7824 | if test "${with_sound}" != "no"; then | |
7825 | # Sound support for GNU/Linux and the free BSDs. | |
7826 | for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h | |
7827 | do : | |
7828 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
7829 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
5f64f7bd GM |
7830 | eval as_val=\$$as_ac_Header |
7831 | if test "x$as_val" = x""yes; then : | |
067d23c9 KY |
7832 | cat >>confdefs.h <<_ACEOF |
7833 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
7834 | _ACEOF | |
7835 | have_sound_header=yes | |
7836 | fi | |
7837 | ||
7838 | done | |
7839 | ||
7840 | # Emulation library used on NetBSD. | |
7841 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _oss_ioctl in -lossaudio" >&5 | |
7842 | $as_echo_n "checking for _oss_ioctl in -lossaudio... " >&6; } | |
5f64f7bd | 7843 | if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then : |
067d23c9 KY |
7844 | $as_echo_n "(cached) " >&6 |
7845 | else | |
7846 | ac_check_lib_save_LIBS=$LIBS | |
7847 | LIBS="-lossaudio $LIBS" | |
7848 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7849 | /* end confdefs.h. */ | |
7850 | ||
7851 | /* Override any GCC internal prototype to avoid an error. | |
7852 | Use char because int might match the return type of a GCC | |
7853 | builtin and then its argument prototype would still apply. */ | |
7854 | #ifdef __cplusplus | |
7855 | extern "C" | |
7856 | #endif | |
7857 | char _oss_ioctl (); | |
7858 | int | |
7859 | main () | |
7860 | { | |
7861 | return _oss_ioctl (); | |
7862 | ; | |
7863 | return 0; | |
7864 | } | |
7865 | _ACEOF | |
7866 | if ac_fn_c_try_link "$LINENO"; then : | |
7867 | ac_cv_lib_ossaudio__oss_ioctl=yes | |
7868 | else | |
7869 | ac_cv_lib_ossaudio__oss_ioctl=no | |
7870 | fi | |
7871 | rm -f core conftest.err conftest.$ac_objext \ | |
7872 | conftest$ac_exeext conftest.$ac_ext | |
7873 | LIBS=$ac_check_lib_save_LIBS | |
7874 | fi | |
7875 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5 | |
7876 | $as_echo "$ac_cv_lib_ossaudio__oss_ioctl" >&6; } | |
5f64f7bd | 7877 | if test "x$ac_cv_lib_ossaudio__oss_ioctl" = x""yes; then : |
067d23c9 KY |
7878 | LIBSOUND=-lossaudio |
7879 | else | |
7880 | LIBSOUND= | |
7881 | fi | |
7882 | ||
7883 | ||
7884 | ||
7885 | ALSA_REQUIRED=1.0.0 | |
7886 | ALSA_MODULES="alsa >= $ALSA_REQUIRED" | |
7887 | ||
7888 | succeeded=no | |
7889 | ||
7890 | # Extract the first word of "pkg-config", so it can be a program name with args. | |
7891 | set dummy pkg-config; ac_word=$2 | |
7892 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
7893 | $as_echo_n "checking for $ac_word... " >&6; } | |
5f64f7bd | 7894 | if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : |
067d23c9 KY |
7895 | $as_echo_n "(cached) " >&6 |
7896 | else | |
7897 | case $PKG_CONFIG in | |
7898 | [\\/]* | ?:[\\/]*) | |
7899 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
7900 | ;; | |
7901 | *) | |
7902 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7903 | for as_dir in $PATH | |
7904 | do | |
7905 | IFS=$as_save_IFS | |
7906 | test -z "$as_dir" && as_dir=. | |
7907 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7908 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
7909 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
7910 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7911 | break 2 | |
7912 | fi | |
7913 | done | |
7914 | done | |
7915 | IFS=$as_save_IFS | |
7916 | ||
7917 | test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" | |
7918 | ;; | |
7919 | esac | |
7920 | fi | |
7921 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG | |
7922 | if test -n "$PKG_CONFIG"; then | |
7923 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
7924 | $as_echo "$PKG_CONFIG" >&6; } | |
7925 | else | |
7926 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
7927 | $as_echo "no" >&6; } | |
7928 | fi | |
7929 | ||
7930 | ||
7931 | ||
7932 | if test "$PKG_CONFIG" = "no" ; then | |
7933 | HAVE_ALSA=no | |
7934 | else | |
7935 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
7936 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
7937 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ALSA_MODULES" >&5 | |
7938 | $as_echo_n "checking for $ALSA_MODULES... " >&6; } | |
7939 | ||
7940 | if $PKG_CONFIG --exists "$ALSA_MODULES" 2>&5; then | |
7941 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
7942 | $as_echo "yes" >&6; } | |
7943 | succeeded=yes | |
7944 | ||
7945 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking ALSA_CFLAGS" >&5 | |
7946 | $as_echo_n "checking ALSA_CFLAGS... " >&6; } | |
7947 | ALSA_CFLAGS=`$PKG_CONFIG --cflags "$ALSA_MODULES"|sed -e 's,///*,/,g'` | |
7948 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ALSA_CFLAGS" >&5 | |
7949 | $as_echo "$ALSA_CFLAGS" >&6; } | |
7950 | ||
7951 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking ALSA_LIBS" >&5 | |
7952 | $as_echo_n "checking ALSA_LIBS... " >&6; } | |
7953 | ALSA_LIBS=`$PKG_CONFIG --libs "$ALSA_MODULES"|sed -e 's,///*,/,g'` | |
7954 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ALSA_LIBS" >&5 | |
7955 | $as_echo "$ALSA_LIBS" >&6; } | |
7956 | else | |
7957 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
7958 | $as_echo "no" >&6; } | |
7959 | ALSA_CFLAGS="" | |
7960 | ALSA_LIBS="" | |
7961 | ## If we have a custom action on failure, don't print errors, but | |
7962 | ## do set a variable so people can do so. | |
7963 | ALSA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$ALSA_MODULES"` | |
7964 | ||
7965 | fi | |
7966 | ||
7967 | ||
7968 | ||
7969 | else | |
7970 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
7971 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
7972 | fi | |
7973 | fi | |
7974 | ||
7975 | if test $succeeded = yes; then | |
7976 | HAVE_ALSA=yes | |
7977 | else | |
7978 | HAVE_ALSA=no | |
7979 | fi | |
7980 | ||
7981 | if test $HAVE_ALSA = yes; then | |
7982 | SAVE_CFLAGS="$CFLAGS" | |
7983 | SAVE_LDFLAGS="$LDFLAGS" | |
7984 | CFLAGS="$ALSA_CFLAGS $CFLAGS" | |
7985 | LDFLAGS="$ALSA_LIBS $LDFLAGS" | |
7986 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7987 | /* end confdefs.h. */ | |
7988 | #include <asoundlib.h> | |
7989 | int | |
7990 | main () | |
7991 | { | |
7992 | snd_lib_error_set_handler (0); | |
7993 | ; | |
7994 | return 0; | |
7995 | } | |
7996 | _ACEOF | |
7997 | if ac_fn_c_try_compile "$LINENO"; then : | |
7998 | emacs_alsa_normal=yes | |
7999 | else | |
8000 | emacs_alsa_normal=no | |
8001 | fi | |
8002 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8003 | if test "$emacs_alsa_normal" != yes; then | |
8004 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8005 | /* end confdefs.h. */ | |
8006 | #include <alsa/asoundlib.h> | |
8007 | int | |
8008 | main () | |
8009 | { | |
8010 | snd_lib_error_set_handler (0); | |
8011 | ; | |
8012 | return 0; | |
8013 | } | |
8014 | _ACEOF | |
8015 | if ac_fn_c_try_compile "$LINENO"; then : | |
8016 | emacs_alsa_subdir=yes | |
8017 | else | |
8018 | emacs_alsa_subdir=no | |
8019 | fi | |
8020 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8021 | if test "$emacs_alsa_subdir" != yes; then | |
5f64f7bd | 8022 | as_fn_error "pkg-config found alsa, but it does not compile. See config.log for error messages." "$LINENO" 5 |
067d23c9 KY |
8023 | fi |
8024 | ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE" | |
8025 | fi | |
8026 | ||
8027 | CFLAGS="$SAVE_CFLAGS" | |
8028 | LDFLAGS="$SAVE_LDFLAGS" | |
8029 | LIBSOUND="$LIBSOUND $ALSA_LIBS" | |
8030 | CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS" | |
8031 | ||
8032 | $as_echo "#define HAVE_ALSA 1" >>confdefs.h | |
8033 | ||
8034 | fi | |
8035 | ||
8036 | if test x$have_sound_header = xyes || test $HAVE_ALSA = yes; then | |
8037 | case "$opsys" in | |
8038 | gnu-linux|freebsd|netbsd) | |
8039 | ||
8040 | $as_echo "#define HAVE_SOUND 1" >>confdefs.h | |
8041 | ||
8042 | ;; | |
8043 | esac | |
8044 | fi | |
8045 | ||
8046 | ||
8047 | fi | |
8048 | ||
8049 | for ac_header in sys/select.h sys/time.h unistd.h utime.h \ | |
1fb8351b | 8050 | linux/version.h sys/systeminfo.h \ |
067d23c9 KY |
8051 | stdio_ext.h fcntl.h coff.h pty.h sys/mman.h \ |
8052 | sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h \ | |
8053 | sys/utsname.h pwd.h utmp.h dirent.h util.h | |
8054 | do : | |
8055 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
8056 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
5f64f7bd GM |
8057 | eval as_val=\$$as_ac_Header |
8058 | if test "x$as_val" = x""yes; then : | |
067d23c9 KY |
8059 | cat >>confdefs.h <<_ACEOF |
8060 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
8061 | _ACEOF | |
8062 | ||
8063 | fi | |
8064 | ||
8065 | done | |
8066 | ||
8067 | ||
8068 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if personality LINUX32 can be set" >&5 | |
8069 | $as_echo_n "checking if personality LINUX32 can be set... " >&6; } | |
8070 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8071 | /* end confdefs.h. */ | |
8072 | #include <sys/personality.h> | |
8073 | int | |
8074 | main () | |
8075 | { | |
8076 | personality (PER_LINUX32) | |
8077 | ; | |
8078 | return 0; | |
8079 | } | |
8080 | _ACEOF | |
8081 | if ac_fn_c_try_compile "$LINENO"; then : | |
8082 | emacs_cv_personality_linux32=yes | |
8083 | else | |
8084 | emacs_cv_personality_linux32=no | |
8085 | fi | |
8086 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8087 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_personality_linux32" >&5 | |
8088 | $as_echo "$emacs_cv_personality_linux32" >&6; } | |
8089 | ||
8090 | if test $emacs_cv_personality_linux32 = yes; then | |
8091 | ||
8092 | $as_echo "#define HAVE_PERSONALITY_LINUX32 1" >>confdefs.h | |
8093 | ||
8094 | fi | |
8095 | ||
8096 | for ac_header in term.h | |
8097 | do : | |
8098 | ac_fn_c_check_header_preproc "$LINENO" "term.h" "ac_cv_header_term_h" | |
5f64f7bd | 8099 | if test "x$ac_cv_header_term_h" = x""yes; then : |
067d23c9 KY |
8100 | cat >>confdefs.h <<_ACEOF |
8101 | #define HAVE_TERM_H 1 | |
8102 | _ACEOF | |
8103 | ||
8104 | fi | |
8105 | ||
8106 | done | |
8107 | ||
067d23c9 KY |
8108 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 |
8109 | $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } | |
5f64f7bd | 8110 | if test "${ac_cv_header_time+set}" = set; then : |
067d23c9 KY |
8111 | $as_echo_n "(cached) " >&6 |
8112 | else | |
8113 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8114 | /* end confdefs.h. */ | |
8115 | #include <sys/types.h> | |
8116 | #include <sys/time.h> | |
8117 | #include <time.h> | |
8118 | ||
8119 | int | |
8120 | main () | |
8121 | { | |
8122 | if ((struct tm *) 0) | |
8123 | return 0; | |
8124 | ; | |
8125 | return 0; | |
8126 | } | |
8127 | _ACEOF | |
8128 | if ac_fn_c_try_compile "$LINENO"; then : | |
8129 | ac_cv_header_time=yes | |
8130 | else | |
8131 | ac_cv_header_time=no | |
8132 | fi | |
8133 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8134 | fi | |
8135 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 | |
8136 | $as_echo "$ac_cv_header_time" >&6; } | |
8137 | if test $ac_cv_header_time = yes; then | |
8138 | ||
8139 | $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h | |
8140 | ||
8141 | fi | |
8142 | ||
8143 | ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "$ac_includes_default" | |
5f64f7bd | 8144 | if test "x$ac_cv_have_decl_sys_siglist" = x""yes; then : |
067d23c9 KY |
8145 | ac_have_decl=1 |
8146 | else | |
8147 | ac_have_decl=0 | |
8148 | fi | |
8149 | ||
8150 | cat >>confdefs.h <<_ACEOF | |
8151 | #define HAVE_DECL_SYS_SIGLIST $ac_have_decl | |
8152 | _ACEOF | |
8153 | ||
8154 | if test $ac_cv_have_decl_sys_siglist != yes; then | |
8155 | # For Tru64, at least: | |
8156 | ac_fn_c_check_decl "$LINENO" "__sys_siglist" "ac_cv_have_decl___sys_siglist" "$ac_includes_default" | |
5f64f7bd | 8157 | if test "x$ac_cv_have_decl___sys_siglist" = x""yes; then : |
067d23c9 KY |
8158 | ac_have_decl=1 |
8159 | else | |
8160 | ac_have_decl=0 | |
8161 | fi | |
8162 | ||
8163 | cat >>confdefs.h <<_ACEOF | |
8164 | #define HAVE_DECL___SYS_SIGLIST $ac_have_decl | |
8165 | _ACEOF | |
8166 | ||
8167 | if test $ac_cv_have_decl___sys_siglist = yes; then | |
8168 | ||
8169 | $as_echo "#define sys_siglist __sys_siglist" >>confdefs.h | |
8170 | ||
8171 | fi | |
8172 | fi | |
8173 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5 | |
8174 | $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; } | |
5f64f7bd | 8175 | if test "${ac_cv_header_sys_wait_h+set}" = set; then : |
067d23c9 KY |
8176 | $as_echo_n "(cached) " >&6 |
8177 | else | |
8178 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8179 | /* end confdefs.h. */ | |
8180 | #include <sys/types.h> | |
8181 | #include <sys/wait.h> | |
8182 | #ifndef WEXITSTATUS | |
8183 | # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8) | |
8184 | #endif | |
8185 | #ifndef WIFEXITED | |
8186 | # define WIFEXITED(stat_val) (((stat_val) & 255) == 0) | |
8187 | #endif | |
8188 | ||
8189 | int | |
8190 | main () | |
8191 | { | |
8192 | int s; | |
8193 | wait (&s); | |
8194 | s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; | |
8195 | ; | |
8196 | return 0; | |
8197 | } | |
8198 | _ACEOF | |
8199 | if ac_fn_c_try_compile "$LINENO"; then : | |
8200 | ac_cv_header_sys_wait_h=yes | |
8201 | else | |
8202 | ac_cv_header_sys_wait_h=no | |
8203 | fi | |
8204 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8205 | fi | |
8206 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5 | |
8207 | $as_echo "$ac_cv_header_sys_wait_h" >&6; } | |
8208 | if test $ac_cv_header_sys_wait_h = yes; then | |
8209 | ||
8210 | $as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h | |
8211 | ||
8212 | fi | |
8213 | ||
8214 | ||
8215 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct utimbuf" >&5 | |
8216 | $as_echo_n "checking for struct utimbuf... " >&6; } | |
5f64f7bd | 8217 | if test "${emacs_cv_struct_utimbuf+set}" = set; then : |
067d23c9 KY |
8218 | $as_echo_n "(cached) " >&6 |
8219 | else | |
8220 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8221 | /* end confdefs.h. */ | |
8222 | #ifdef TIME_WITH_SYS_TIME | |
8223 | #include <sys/time.h> | |
8224 | #include <time.h> | |
8225 | #else | |
8226 | #ifdef HAVE_SYS_TIME_H | |
8227 | #include <sys/time.h> | |
8228 | #else | |
8229 | #include <time.h> | |
8230 | #endif | |
8231 | #endif | |
8232 | #ifdef HAVE_UTIME_H | |
8233 | #include <utime.h> | |
8234 | #endif | |
8235 | int | |
8236 | main () | |
8237 | { | |
8238 | static struct utimbuf x; x.actime = x.modtime; | |
8239 | ; | |
8240 | return 0; | |
8241 | } | |
8242 | _ACEOF | |
8243 | if ac_fn_c_try_compile "$LINENO"; then : | |
8244 | emacs_cv_struct_utimbuf=yes | |
8245 | else | |
8246 | emacs_cv_struct_utimbuf=no | |
8247 | fi | |
8248 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8249 | fi | |
8250 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_struct_utimbuf" >&5 | |
8251 | $as_echo "$emacs_cv_struct_utimbuf" >&6; } | |
8252 | if test $emacs_cv_struct_utimbuf = yes; then | |
8253 | ||
8254 | $as_echo "#define HAVE_STRUCT_UTIMBUF 1" >>confdefs.h | |
8255 | ||
8256 | fi | |
8257 | ||
067d23c9 KY |
8258 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for speed_t" >&5 |
8259 | $as_echo_n "checking for speed_t... " >&6; } | |
5f64f7bd | 8260 | if test "${emacs_cv_speed_t+set}" = set; then : |
067d23c9 KY |
8261 | $as_echo_n "(cached) " >&6 |
8262 | else | |
8263 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8264 | /* end confdefs.h. */ | |
8265 | #include <termios.h> | |
8266 | int | |
8267 | main () | |
8268 | { | |
8269 | speed_t x = 1; | |
8270 | ; | |
8271 | return 0; | |
8272 | } | |
8273 | _ACEOF | |
8274 | if ac_fn_c_try_compile "$LINENO"; then : | |
8275 | emacs_cv_speed_t=yes | |
8276 | else | |
8277 | emacs_cv_speed_t=no | |
8278 | fi | |
8279 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8280 | fi | |
8281 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_speed_t" >&5 | |
8282 | $as_echo "$emacs_cv_speed_t" >&6; } | |
8283 | if test $emacs_cv_speed_t = yes; then | |
8284 | ||
8285 | $as_echo "#define HAVE_SPEED_T 1" >>confdefs.h | |
8286 | ||
8287 | fi | |
8288 | ||
8289 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5 | |
8290 | $as_echo_n "checking for struct timeval... " >&6; } | |
5f64f7bd | 8291 | if test "${emacs_cv_struct_timeval+set}" = set; then : |
067d23c9 KY |
8292 | $as_echo_n "(cached) " >&6 |
8293 | else | |
8294 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8295 | /* end confdefs.h. */ | |
8296 | #ifdef TIME_WITH_SYS_TIME | |
8297 | #include <sys/time.h> | |
8298 | #include <time.h> | |
8299 | #else | |
8300 | #ifdef HAVE_SYS_TIME_H | |
8301 | #include <sys/time.h> | |
8302 | #else | |
8303 | #include <time.h> | |
8304 | #endif | |
8305 | #endif | |
8306 | int | |
8307 | main () | |
8308 | { | |
8309 | static struct timeval x; x.tv_sec = x.tv_usec; | |
8310 | ; | |
8311 | return 0; | |
8312 | } | |
8313 | _ACEOF | |
8314 | if ac_fn_c_try_compile "$LINENO"; then : | |
8315 | emacs_cv_struct_timeval=yes | |
8316 | else | |
8317 | emacs_cv_struct_timeval=no | |
8318 | fi | |
8319 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8320 | fi | |
8321 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_struct_timeval" >&5 | |
8322 | $as_echo "$emacs_cv_struct_timeval" >&6; } | |
8323 | HAVE_TIMEVAL=$emacs_cv_struct_timeval | |
8324 | if test $emacs_cv_struct_timeval = yes; then | |
8325 | ||
8326 | $as_echo "#define HAVE_TIMEVAL 1" >>confdefs.h | |
8327 | ||
8328 | fi | |
8329 | ||
8330 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct exception" >&5 | |
8331 | $as_echo_n "checking for struct exception... " >&6; } | |
5f64f7bd | 8332 | if test "${emacs_cv_struct_exception+set}" = set; then : |
067d23c9 KY |
8333 | $as_echo_n "(cached) " >&6 |
8334 | else | |
8335 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8336 | /* end confdefs.h. */ | |
8337 | #include <math.h> | |
8338 | int | |
8339 | main () | |
8340 | { | |
8341 | static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1; | |
8342 | ; | |
8343 | return 0; | |
8344 | } | |
8345 | _ACEOF | |
8346 | if ac_fn_c_try_compile "$LINENO"; then : | |
8347 | emacs_cv_struct_exception=yes | |
8348 | else | |
8349 | emacs_cv_struct_exception=no | |
8350 | fi | |
8351 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8352 | fi | |
8353 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_struct_exception" >&5 | |
8354 | $as_echo "$emacs_cv_struct_exception" >&6; } | |
8355 | HAVE_EXCEPTION=$emacs_cv_struct_exception | |
8356 | if test $emacs_cv_struct_exception != yes; then | |
8357 | ||
8358 | $as_echo "#define NO_MATHERR 1" >>confdefs.h | |
8359 | ||
8360 | fi | |
8361 | ||
7417b37c GM |
8362 | for ac_header in sys/socket.h |
8363 | do : | |
8364 | ac_fn_c_check_header_mongrel "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default" | |
8365 | if test "x$ac_cv_header_sys_socket_h" = x""yes; then : | |
8366 | cat >>confdefs.h <<_ACEOF | |
8367 | #define HAVE_SYS_SOCKET_H 1 | |
8368 | _ACEOF | |
8369 | ||
8370 | fi | |
8371 | ||
8372 | done | |
8373 | ||
067d23c9 KY |
8374 | for ac_header in net/if.h |
8375 | do : | |
8376 | ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default | |
8377 | #if HAVE_SYS_SOCKET_H | |
8378 | #include <sys/socket.h> | |
8379 | #endif | |
8380 | " | |
5f64f7bd | 8381 | if test "x$ac_cv_header_net_if_h" = x""yes; then : |
067d23c9 KY |
8382 | cat >>confdefs.h <<_ACEOF |
8383 | #define HAVE_NET_IF_H 1 | |
8384 | _ACEOF | |
8385 | ||
8386 | fi | |
8387 | ||
8388 | done | |
8389 | ||
7417b37c GM |
8390 | for ac_header in ifaddrs.h |
8391 | do : | |
8392 | ac_fn_c_check_header_compile "$LINENO" "ifaddrs.h" "ac_cv_header_ifaddrs_h" "$ac_includes_default | |
8393 | #if HAVE_SYS_SOCKET_H | |
8394 | #include <sys/socket.h> | |
8395 | #endif | |
8396 | " | |
8397 | if test "x$ac_cv_header_ifaddrs_h" = x""yes; then : | |
8398 | cat >>confdefs.h <<_ACEOF | |
8399 | #define HAVE_IFADDRS_H 1 | |
8400 | _ACEOF | |
8401 | ||
8402 | fi | |
8403 | ||
8404 | done | |
8405 | ||
8406 | for ac_header in net/if_dl.h | |
8407 | do : | |
8408 | ac_fn_c_check_header_compile "$LINENO" "net/if_dl.h" "ac_cv_header_net_if_dl_h" "$ac_includes_default | |
8409 | #if HAVE_SYS_SOCKET_H | |
8410 | #include <sys/socket.h> | |
8411 | #endif | |
8412 | " | |
8413 | if test "x$ac_cv_header_net_if_dl_h" = x""yes; then : | |
8414 | cat >>confdefs.h <<_ACEOF | |
8415 | #define HAVE_NET_IF_DL_H 1 | |
8416 | _ACEOF | |
8417 | ||
8418 | fi | |
8419 | ||
8420 | done | |
8421 | ||
8422 | for ac_func in getifaddrs freeifaddrs | |
8423 | do : | |
8424 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
8425 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
8426 | eval as_val=\$$as_ac_var | |
8427 | if test "x$as_val" = x""yes; then : | |
8428 | cat >>confdefs.h <<_ACEOF | |
8429 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
8430 | _ACEOF | |
8431 | ||
8432 | fi | |
8433 | done | |
8434 | ||
067d23c9 KY |
8435 | |
8436 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 | |
8437 | $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; } | |
5f64f7bd | 8438 | if test "${ac_cv_struct_tm+set}" = set; then : |
067d23c9 KY |
8439 | $as_echo_n "(cached) " >&6 |
8440 | else | |
8441 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8442 | /* end confdefs.h. */ | |
8443 | #include <sys/types.h> | |
8444 | #include <time.h> | |
8445 | ||
8446 | int | |
8447 | main () | |
8448 | { | |
8449 | struct tm tm; | |
8450 | int *p = &tm.tm_sec; | |
8451 | return !p; | |
8452 | ; | |
8453 | return 0; | |
8454 | } | |
8455 | _ACEOF | |
8456 | if ac_fn_c_try_compile "$LINENO"; then : | |
8457 | ac_cv_struct_tm=time.h | |
8458 | else | |
8459 | ac_cv_struct_tm=sys/time.h | |
8460 | fi | |
8461 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8462 | fi | |
8463 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5 | |
8464 | $as_echo "$ac_cv_struct_tm" >&6; } | |
8465 | if test $ac_cv_struct_tm = sys/time.h; then | |
8466 | ||
8467 | $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h | |
8468 | ||
8469 | fi | |
8470 | ||
8471 | ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h> | |
8472 | #include <$ac_cv_struct_tm> | |
8473 | ||
8474 | " | |
5f64f7bd | 8475 | if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then : |
067d23c9 KY |
8476 | |
8477 | cat >>confdefs.h <<_ACEOF | |
8478 | #define HAVE_STRUCT_TM_TM_ZONE 1 | |
8479 | _ACEOF | |
8480 | ||
8481 | ||
8482 | fi | |
8483 | ||
8484 | if test "$ac_cv_member_struct_tm_tm_zone" = yes; then | |
8485 | ||
8486 | $as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h | |
8487 | ||
8488 | else | |
8489 | ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h> | |
8490 | " | |
5f64f7bd | 8491 | if test "x$ac_cv_have_decl_tzname" = x""yes; then : |
067d23c9 KY |
8492 | ac_have_decl=1 |
8493 | else | |
8494 | ac_have_decl=0 | |
8495 | fi | |
8496 | ||
8497 | cat >>confdefs.h <<_ACEOF | |
8498 | #define HAVE_DECL_TZNAME $ac_have_decl | |
8499 | _ACEOF | |
8500 | ||
8501 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5 | |
8502 | $as_echo_n "checking for tzname... " >&6; } | |
5f64f7bd | 8503 | if test "${ac_cv_var_tzname+set}" = set; then : |
067d23c9 KY |
8504 | $as_echo_n "(cached) " >&6 |
8505 | else | |
8506 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8507 | /* end confdefs.h. */ | |
8508 | #include <time.h> | |
8509 | #if !HAVE_DECL_TZNAME | |
8510 | extern char *tzname[]; | |
8511 | #endif | |
8512 | ||
8513 | int | |
8514 | main () | |
8515 | { | |
8516 | return tzname[0][0]; | |
8517 | ; | |
8518 | return 0; | |
8519 | } | |
8520 | _ACEOF | |
8521 | if ac_fn_c_try_link "$LINENO"; then : | |
8522 | ac_cv_var_tzname=yes | |
8523 | else | |
8524 | ac_cv_var_tzname=no | |
8525 | fi | |
8526 | rm -f core conftest.err conftest.$ac_objext \ | |
8527 | conftest$ac_exeext conftest.$ac_ext | |
8528 | fi | |
8529 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5 | |
8530 | $as_echo "$ac_cv_var_tzname" >&6; } | |
8531 | if test $ac_cv_var_tzname = yes; then | |
8532 | ||
8533 | $as_echo "#define HAVE_TZNAME 1" >>confdefs.h | |
8534 | ||
8535 | fi | |
8536 | fi | |
8537 | ||
8538 | ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include <time.h> | |
8539 | " | |
5f64f7bd | 8540 | if test "x$ac_cv_member_struct_tm_tm_gmtoff" = x""yes; then : |
067d23c9 KY |
8541 | |
8542 | $as_echo "#define HAVE_TM_GMTOFF 1" >>confdefs.h | |
8543 | ||
8544 | fi | |
8545 | ||
8546 | ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_flags" "ac_cv_member_struct_ifreq_ifr_flags" "$ac_includes_default | |
8547 | #if HAVE_SYS_SOCKET_H | |
8548 | #include <sys/socket.h> | |
8549 | #endif | |
8550 | #if HAVE_NET_IF_H | |
8551 | #include <net/if.h> | |
8552 | #endif | |
8553 | " | |
5f64f7bd | 8554 | if test "x$ac_cv_member_struct_ifreq_ifr_flags" = x""yes; then : |
067d23c9 KY |
8555 | |
8556 | cat >>confdefs.h <<_ACEOF | |
8557 | #define HAVE_STRUCT_IFREQ_IFR_FLAGS 1 | |
8558 | _ACEOF | |
8559 | ||
8560 | ||
8561 | fi | |
8562 | ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_hwaddr" "ac_cv_member_struct_ifreq_ifr_hwaddr" "$ac_includes_default | |
8563 | #if HAVE_SYS_SOCKET_H | |
8564 | #include <sys/socket.h> | |
8565 | #endif | |
8566 | #if HAVE_NET_IF_H | |
8567 | #include <net/if.h> | |
8568 | #endif | |
8569 | " | |
5f64f7bd | 8570 | if test "x$ac_cv_member_struct_ifreq_ifr_hwaddr" = x""yes; then : |
067d23c9 KY |
8571 | |
8572 | cat >>confdefs.h <<_ACEOF | |
8573 | #define HAVE_STRUCT_IFREQ_IFR_HWADDR 1 | |
8574 | _ACEOF | |
8575 | ||
8576 | ||
8577 | fi | |
8578 | ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_netmask" "ac_cv_member_struct_ifreq_ifr_netmask" "$ac_includes_default | |
8579 | #if HAVE_SYS_SOCKET_H | |
8580 | #include <sys/socket.h> | |
8581 | #endif | |
8582 | #if HAVE_NET_IF_H | |
8583 | #include <net/if.h> | |
8584 | #endif | |
8585 | " | |
5f64f7bd | 8586 | if test "x$ac_cv_member_struct_ifreq_ifr_netmask" = x""yes; then : |
067d23c9 KY |
8587 | |
8588 | cat >>confdefs.h <<_ACEOF | |
8589 | #define HAVE_STRUCT_IFREQ_IFR_NETMASK 1 | |
8590 | _ACEOF | |
8591 | ||
8592 | ||
8593 | fi | |
8594 | ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_broadaddr" "ac_cv_member_struct_ifreq_ifr_broadaddr" "$ac_includes_default | |
8595 | #if HAVE_SYS_SOCKET_H | |
8596 | #include <sys/socket.h> | |
8597 | #endif | |
8598 | #if HAVE_NET_IF_H | |
8599 | #include <net/if.h> | |
8600 | #endif | |
8601 | " | |
5f64f7bd | 8602 | if test "x$ac_cv_member_struct_ifreq_ifr_broadaddr" = x""yes; then : |
067d23c9 KY |
8603 | |
8604 | cat >>confdefs.h <<_ACEOF | |
8605 | #define HAVE_STRUCT_IFREQ_IFR_BROADADDR 1 | |
8606 | _ACEOF | |
8607 | ||
8608 | ||
8609 | fi | |
8610 | ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_addr" "ac_cv_member_struct_ifreq_ifr_addr" "$ac_includes_default | |
8611 | #if HAVE_SYS_SOCKET_H | |
8612 | #include <sys/socket.h> | |
8613 | #endif | |
8614 | #if HAVE_NET_IF_H | |
8615 | #include <net/if.h> | |
8616 | #endif | |
8617 | " | |
5f64f7bd | 8618 | if test "x$ac_cv_member_struct_ifreq_ifr_addr" = x""yes; then : |
067d23c9 KY |
8619 | |
8620 | cat >>confdefs.h <<_ACEOF | |
8621 | #define HAVE_STRUCT_IFREQ_IFR_ADDR 1 | |
8622 | _ACEOF | |
8623 | ||
8624 | ||
7417b37c GM |
8625 | fi |
8626 | ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_addr.sa_len" "ac_cv_member_struct_ifreq_ifr_addr_sa_len" "$ac_includes_default | |
8627 | #if HAVE_SYS_SOCKET_H | |
8628 | #include <sys/socket.h> | |
8629 | #endif | |
8630 | #if HAVE_NET_IF_H | |
8631 | #include <net/if.h> | |
8632 | #endif | |
8633 | " | |
8634 | if test "x$ac_cv_member_struct_ifreq_ifr_addr_sa_len" = x""yes; then : | |
8635 | ||
8636 | cat >>confdefs.h <<_ACEOF | |
8637 | #define HAVE_STRUCT_IFREQ_IFR_ADDR_SA_LEN 1 | |
8638 | _ACEOF | |
8639 | ||
8640 | ||
067d23c9 KY |
8641 | fi |
8642 | ||
8643 | ||
8644 | ||
8645 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for function prototypes" >&5 | |
8646 | $as_echo_n "checking for function prototypes... " >&6; } | |
8647 | if test "$ac_cv_prog_cc_c89" != no; then | |
8648 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
8649 | $as_echo "yes" >&6; } | |
8650 | ||
8651 | $as_echo "#define PROTOTYPES 1" >>confdefs.h | |
8652 | ||
8653 | ||
8654 | $as_echo "#define __PROTOTYPES 1" >>confdefs.h | |
8655 | ||
8656 | else | |
8657 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
8658 | $as_echo "no" >&6; } | |
8659 | fi | |
8660 | ||
8661 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5 | |
8662 | $as_echo_n "checking for working volatile... " >&6; } | |
5f64f7bd | 8663 | if test "${ac_cv_c_volatile+set}" = set; then : |
067d23c9 KY |
8664 | $as_echo_n "(cached) " >&6 |
8665 | else | |
8666 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8667 | /* end confdefs.h. */ | |
8668 | ||
8669 | int | |
8670 | main () | |
8671 | { | |
8672 | ||
8673 | volatile int x; | |
8674 | int * volatile y = (int *) 0; | |
8675 | return !x && !y; | |
8676 | ; | |
8677 | return 0; | |
8678 | } | |
8679 | _ACEOF | |
8680 | if ac_fn_c_try_compile "$LINENO"; then : | |
8681 | ac_cv_c_volatile=yes | |
8682 | else | |
8683 | ac_cv_c_volatile=no | |
8684 | fi | |
8685 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8686 | fi | |
8687 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5 | |
8688 | $as_echo "$ac_cv_c_volatile" >&6; } | |
8689 | if test $ac_cv_c_volatile = no; then | |
8690 | ||
8691 | $as_echo "#define volatile /**/" >>confdefs.h | |
8692 | ||
8693 | fi | |
8694 | ||
8695 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 | |
8696 | $as_echo_n "checking for an ANSI C-conforming const... " >&6; } | |
5f64f7bd | 8697 | if test "${ac_cv_c_const+set}" = set; then : |
067d23c9 KY |
8698 | $as_echo_n "(cached) " >&6 |
8699 | else | |
8700 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8701 | /* end confdefs.h. */ | |
8702 | ||
8703 | int | |
8704 | main () | |
8705 | { | |
8706 | /* FIXME: Include the comments suggested by Paul. */ | |
8707 | #ifndef __cplusplus | |
8708 | /* Ultrix mips cc rejects this. */ | |
8709 | typedef int charset[2]; | |
8710 | const charset cs; | |
8711 | /* SunOS 4.1.1 cc rejects this. */ | |
8712 | char const *const *pcpcc; | |
8713 | char **ppc; | |
8714 | /* NEC SVR4.0.2 mips cc rejects this. */ | |
8715 | struct point {int x, y;}; | |
8716 | static struct point const zero = {0,0}; | |
8717 | /* AIX XL C 1.02.0.0 rejects this. | |
8718 | It does not let you subtract one const X* pointer from another in | |
8719 | an arm of an if-expression whose if-part is not a constant | |
8720 | expression */ | |
8721 | const char *g = "string"; | |
8722 | pcpcc = &g + (g ? g-g : 0); | |
8723 | /* HPUX 7.0 cc rejects these. */ | |
8724 | ++pcpcc; | |
8725 | ppc = (char**) pcpcc; | |
8726 | pcpcc = (char const *const *) ppc; | |
8727 | { /* SCO 3.2v4 cc rejects this. */ | |
8728 | char *t; | |
8729 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
8730 | ||
8731 | *t++ = 0; | |
8732 | if (s) return 0; | |
8733 | } | |
8734 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
8735 | int x[] = {25, 17}; | |
8736 | const int *foo = &x[0]; | |
8737 | ++foo; | |
8738 | } | |
8739 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
8740 | typedef const int *iptr; | |
8741 | iptr p = 0; | |
8742 | ++p; | |
8743 | } | |
8744 | { /* AIX XL C 1.02.0.0 rejects this saying | |
8745 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
8746 | struct s { int j; const int *ap[3]; }; | |
8747 | struct s *b; b->j = 5; | |
8748 | } | |
8749 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
8750 | const int foo = 10; | |
8751 | if (!foo) return 0; | |
8752 | } | |
8753 | return !cs[0] && !zero.x; | |
8754 | #endif | |
8755 | ||
8756 | ; | |
8757 | return 0; | |
8758 | } | |
8759 | _ACEOF | |
8760 | if ac_fn_c_try_compile "$LINENO"; then : | |
8761 | ac_cv_c_const=yes | |
8762 | else | |
8763 | ac_cv_c_const=no | |
8764 | fi | |
8765 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8766 | fi | |
8767 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 | |
8768 | $as_echo "$ac_cv_c_const" >&6; } | |
8769 | if test $ac_cv_c_const = no; then | |
8770 | ||
8771 | $as_echo "#define const /**/" >>confdefs.h | |
8772 | ||
8773 | fi | |
8774 | ||
8775 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for void * support" >&5 | |
8776 | $as_echo_n "checking for void * support... " >&6; } | |
5f64f7bd | 8777 | if test "${emacs_cv_void_star+set}" = set; then : |
067d23c9 KY |
8778 | $as_echo_n "(cached) " >&6 |
8779 | else | |
8780 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8781 | /* end confdefs.h. */ | |
8782 | ||
8783 | int | |
8784 | main () | |
8785 | { | |
8786 | void * foo; | |
8787 | ; | |
8788 | return 0; | |
8789 | } | |
8790 | _ACEOF | |
8791 | if ac_fn_c_try_compile "$LINENO"; then : | |
8792 | emacs_cv_void_star=yes | |
8793 | else | |
8794 | emacs_cv_void_star=no | |
8795 | fi | |
8796 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8797 | fi | |
8798 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_void_star" >&5 | |
8799 | $as_echo "$emacs_cv_void_star" >&6; } | |
8800 | if test $emacs_cv_void_star = yes; then | |
8801 | $as_echo "#define POINTER_TYPE void" >>confdefs.h | |
8802 | ||
8803 | else | |
8804 | $as_echo "#define POINTER_TYPE char" >>confdefs.h | |
8805 | ||
8806 | fi | |
8807 | ||
8808 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 | |
8809 | $as_echo_n "checking whether byte ordering is bigendian... " >&6; } | |
5f64f7bd | 8810 | if test "${ac_cv_c_bigendian+set}" = set; then : |
067d23c9 KY |
8811 | $as_echo_n "(cached) " >&6 |
8812 | else | |
8813 | ac_cv_c_bigendian=unknown | |
8814 | # See if we're dealing with a universal compiler. | |
8815 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8816 | /* end confdefs.h. */ | |
8817 | #ifndef __APPLE_CC__ | |
8818 | not a universal capable compiler | |
8819 | #endif | |
8820 | typedef int dummy; | |
8821 | ||
8822 | _ACEOF | |
8823 | if ac_fn_c_try_compile "$LINENO"; then : | |
8824 | ||
8825 | # Check for potential -arch flags. It is not universal unless | |
8826 | # there are at least two -arch flags with different values. | |
8827 | ac_arch= | |
8828 | ac_prev= | |
8829 | for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do | |
8830 | if test -n "$ac_prev"; then | |
8831 | case $ac_word in | |
8832 | i?86 | x86_64 | ppc | ppc64) | |
8833 | if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then | |
8834 | ac_arch=$ac_word | |
8835 | else | |
8836 | ac_cv_c_bigendian=universal | |
8837 | break | |
8838 | fi | |
8839 | ;; | |
8840 | esac | |
8841 | ac_prev= | |
8842 | elif test "x$ac_word" = "x-arch"; then | |
8843 | ac_prev=arch | |
8844 | fi | |
8845 | done | |
8846 | fi | |
8847 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8848 | if test $ac_cv_c_bigendian = unknown; then | |
8849 | # See if sys/param.h defines the BYTE_ORDER macro. | |
8850 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8851 | /* end confdefs.h. */ | |
8852 | #include <sys/types.h> | |
8853 | #include <sys/param.h> | |
8854 | ||
8855 | int | |
8856 | main () | |
8857 | { | |
8858 | #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ | |
8859 | && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ | |
8860 | && LITTLE_ENDIAN) | |
8861 | bogus endian macros | |
8862 | #endif | |
8863 | ||
8864 | ; | |
8865 | return 0; | |
8866 | } | |
8867 | _ACEOF | |
8868 | if ac_fn_c_try_compile "$LINENO"; then : | |
8869 | # It does; now see whether it defined to BIG_ENDIAN or not. | |
8870 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8871 | /* end confdefs.h. */ | |
8872 | #include <sys/types.h> | |
8873 | #include <sys/param.h> | |
8874 | ||
8875 | int | |
8876 | main () | |
8877 | { | |
8878 | #if BYTE_ORDER != BIG_ENDIAN | |
8879 | not big endian | |
8880 | #endif | |
8881 | ||
8882 | ; | |
8883 | return 0; | |
8884 | } | |
8885 | _ACEOF | |
8886 | if ac_fn_c_try_compile "$LINENO"; then : | |
8887 | ac_cv_c_bigendian=yes | |
8888 | else | |
8889 | ac_cv_c_bigendian=no | |
8890 | fi | |
8891 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8892 | fi | |
8893 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8894 | fi | |
8895 | if test $ac_cv_c_bigendian = unknown; then | |
8896 | # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). | |
8897 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8898 | /* end confdefs.h. */ | |
8899 | #include <limits.h> | |
8900 | ||
8901 | int | |
8902 | main () | |
8903 | { | |
8904 | #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) | |
8905 | bogus endian macros | |
8906 | #endif | |
8907 | ||
8908 | ; | |
8909 | return 0; | |
8910 | } | |
8911 | _ACEOF | |
8912 | if ac_fn_c_try_compile "$LINENO"; then : | |
8913 | # It does; now see whether it defined to _BIG_ENDIAN or not. | |
8914 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8915 | /* end confdefs.h. */ | |
8916 | #include <limits.h> | |
8917 | ||
8918 | int | |
8919 | main () | |
8920 | { | |
8921 | #ifndef _BIG_ENDIAN | |
8922 | not big endian | |
8923 | #endif | |
8924 | ||
8925 | ; | |
8926 | return 0; | |
8927 | } | |
8928 | _ACEOF | |
8929 | if ac_fn_c_try_compile "$LINENO"; then : | |
8930 | ac_cv_c_bigendian=yes | |
8931 | else | |
8932 | ac_cv_c_bigendian=no | |
8933 | fi | |
8934 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8935 | fi | |
8936 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8937 | fi | |
8938 | if test $ac_cv_c_bigendian = unknown; then | |
8939 | # Compile a test program. | |
8940 | if test "$cross_compiling" = yes; then : | |
8941 | # Try to guess by grepping values from an object file. | |
8942 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8943 | /* end confdefs.h. */ | |
8944 | short int ascii_mm[] = | |
8945 | { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; | |
8946 | short int ascii_ii[] = | |
8947 | { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; | |
8948 | int use_ascii (int i) { | |
8949 | return ascii_mm[i] + ascii_ii[i]; | |
8950 | } | |
8951 | short int ebcdic_ii[] = | |
8952 | { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; | |
8953 | short int ebcdic_mm[] = | |
8954 | { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; | |
8955 | int use_ebcdic (int i) { | |
8956 | return ebcdic_mm[i] + ebcdic_ii[i]; | |
8957 | } | |
8958 | extern int foo; | |
8959 | ||
8960 | int | |
8961 | main () | |
8962 | { | |
8963 | return use_ascii (foo) == use_ebcdic (foo); | |
8964 | ; | |
8965 | return 0; | |
8966 | } | |
8967 | _ACEOF | |
8968 | if ac_fn_c_try_compile "$LINENO"; then : | |
8969 | if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then | |
8970 | ac_cv_c_bigendian=yes | |
8971 | fi | |
8972 | if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then | |
8973 | if test "$ac_cv_c_bigendian" = unknown; then | |
8974 | ac_cv_c_bigendian=no | |
8975 | else | |
8976 | # finding both strings is unlikely to happen, but who knows? | |
8977 | ac_cv_c_bigendian=unknown | |
8978 | fi | |
8979 | fi | |
8980 | fi | |
8981 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8982 | else | |
8983 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8984 | /* end confdefs.h. */ | |
8985 | $ac_includes_default | |
8986 | int | |
8987 | main () | |
8988 | { | |
8989 | ||
8990 | /* Are we little or big endian? From Harbison&Steele. */ | |
8991 | union | |
8992 | { | |
8993 | long int l; | |
8994 | char c[sizeof (long int)]; | |
8995 | } u; | |
8996 | u.l = 1; | |
8997 | return u.c[sizeof (long int) - 1] == 1; | |
8998 | ||
8999 | ; | |
9000 | return 0; | |
9001 | } | |
9002 | _ACEOF | |
9003 | if ac_fn_c_try_run "$LINENO"; then : | |
9004 | ac_cv_c_bigendian=no | |
9005 | else | |
9006 | ac_cv_c_bigendian=yes | |
9007 | fi | |
9008 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
9009 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
9010 | fi | |
9011 | ||
9012 | fi | |
9013 | fi | |
9014 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 | |
9015 | $as_echo "$ac_cv_c_bigendian" >&6; } | |
9016 | case $ac_cv_c_bigendian in #( | |
9017 | yes) | |
9018 | $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h | |
9019 | ;; #( | |
9020 | no) | |
9021 | ;; #( | |
9022 | universal) | |
9023 | ||
9024 | $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h | |
9025 | ||
9026 | ;; #( | |
9027 | *) | |
5f64f7bd | 9028 | as_fn_error "unknown endianness |
0afb4571 | 9029 | presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; |
067d23c9 KY |
9030 | esac |
9031 | ||
9032 | ||
7cae64b4 PE |
9033 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __attribute__ ((__aligned__ (expr)))" >&5 |
9034 | $as_echo_n "checking for __attribute__ ((__aligned__ (expr)))... " >&6; } | |
5f64f7bd | 9035 | if test "${emacs_cv_attribute_aligned+set}" = set; then : |
7cae64b4 PE |
9036 | $as_echo_n "(cached) " >&6 |
9037 | else | |
9038 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9039 | /* end confdefs.h. */ | |
9040 | char __attribute__ ((__aligned__ (1 << 3))) c; | |
9041 | int | |
9042 | main () | |
9043 | { | |
9044 | ||
9045 | ; | |
9046 | return 0; | |
9047 | } | |
9048 | _ACEOF | |
9049 | if ac_fn_c_try_compile "$LINENO"; then : | |
9050 | emacs_cv_attribute_aligned=yes | |
9051 | else | |
9052 | emacs_cv_attribute_aligned=no | |
9053 | fi | |
9054 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
9055 | fi | |
9056 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_attribute_aligned" >&5 | |
9057 | $as_echo "$emacs_cv_attribute_aligned" >&6; } | |
9058 | if test $emacs_cv_attribute_aligned = yes; then | |
9059 | ||
9060 | $as_echo "#define HAVE_ATTRIBUTE_ALIGNED 1" >>confdefs.h | |
9061 | ||
9062 | fi | |
9063 | ||
067d23c9 KY |
9064 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 |
9065 | $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } | |
9066 | set x ${MAKE-make} | |
9067 | ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` | |
5f64f7bd | 9068 | if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : |
067d23c9 KY |
9069 | $as_echo_n "(cached) " >&6 |
9070 | else | |
9071 | cat >conftest.make <<\_ACEOF | |
9072 | SHELL = /bin/sh | |
9073 | all: | |
9074 | @echo '@@@%%%=$(MAKE)=@@@%%%' | |
9075 | _ACEOF | |
5f64f7bd | 9076 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. |
067d23c9 KY |
9077 | case `${MAKE-make} -f conftest.make 2>/dev/null` in |
9078 | *@@@%%%=?*=@@@%%%*) | |
9079 | eval ac_cv_prog_make_${ac_make}_set=yes;; | |
9080 | *) | |
9081 | eval ac_cv_prog_make_${ac_make}_set=no;; | |
9082 | esac | |
9083 | rm -f conftest.make | |
9084 | fi | |
9085 | if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then | |
9086 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
9087 | $as_echo "yes" >&6; } | |
9088 | SET_MAKE= | |
9089 | else | |
9090 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
9091 | $as_echo "no" >&6; } | |
9092 | SET_MAKE="MAKE=${MAKE-make}" | |
9093 | fi | |
9094 | ||
9095 | ||
9096 | DEPFLAGS= | |
9097 | MKDEPDIR=":" | |
9098 | deps_frag=deps.mk | |
9099 | if test "$GCC" = yes && test "$ac_enable_autodepend" = yes; then | |
9100 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using GNU Make" >&5 | |
9101 | $as_echo_n "checking whether we are using GNU Make... " >&6; } | |
9102 | HAVE_GNU_MAKE=no | |
9103 | testval=`make --version 2>/dev/null | grep 'GNU Make'` | |
9104 | if test "x$testval" != x; then | |
9105 | HAVE_GNU_MAKE=yes | |
9106 | else | |
9107 | ac_enable_autodepend=no | |
9108 | fi | |
9109 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_GNU_MAKE" >&5 | |
9110 | $as_echo "$HAVE_GNU_MAKE" >&6; } | |
9111 | if test $HAVE_GNU_MAKE = yes; then | |
9112 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -MMD -MF" >&5 | |
9113 | $as_echo_n "checking whether gcc understands -MMD -MF... " >&6; } | |
9114 | SAVE_CFLAGS="$CFLAGS" | |
9115 | CFLAGS="$CFLAGS -MMD -MF deps.d" | |
9116 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9117 | /* end confdefs.h. */ | |
9118 | ||
9119 | int | |
9120 | main () | |
9121 | { | |
9122 | ||
9123 | ; | |
9124 | return 0; | |
9125 | } | |
9126 | _ACEOF | |
9127 | if ac_fn_c_try_compile "$LINENO"; then : | |
9128 | ||
9129 | else | |
9130 | ac_enable_autodepend=no | |
9131 | fi | |
9132 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
9133 | CFLAGS="$SAVE_CFLAGS" | |
9134 | test -f deps.d || ac_enable_autodepend=no | |
9135 | rm -rf deps.d | |
9136 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_autodepend" >&5 | |
9137 | $as_echo "$ac_enable_autodepend" >&6; } | |
9138 | fi | |
9139 | if test $ac_enable_autodepend = yes; then | |
9140 | DEPFLAGS='-MMD -MF ${DEPDIR}/$*.d' | |
9141 | ## In parallel builds, another make might create depdir between | |
9142 | ## the first test and mkdir, so stick another test on the end. | |
6ad6792b | 9143 | ## Or use install-sh -d? mkdir -p is not portable. |
067d23c9 KY |
9144 | MKDEPDIR='test -d ${DEPDIR} || mkdir ${DEPDIR} || test -d ${DEPDIR}' |
9145 | deps_frag=autodeps.mk | |
9146 | fi | |
9147 | fi | |
9148 | deps_frag=$srcdir/src/$deps_frag | |
9149 | ||
9150 | ||
9151 | ||
9152 | ||
9153 | ||
4d4b75e8 GM |
9154 | lisp_frag=$srcdir/src/lisp.mk |
9155 | ||
9156 | ||
9157 | ||
067d23c9 KY |
9158 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long file names" >&5 |
9159 | $as_echo_n "checking for long file names... " >&6; } | |
5f64f7bd | 9160 | if test "${ac_cv_sys_long_file_names+set}" = set; then : |
067d23c9 KY |
9161 | $as_echo_n "(cached) " >&6 |
9162 | else | |
9163 | ac_cv_sys_long_file_names=yes | |
9164 | # Test for long file names in all the places we know might matter: | |
9165 | # . the current directory, where building will happen | |
9166 | # $prefix/lib where we will be installing things | |
9167 | # $exec_prefix/lib likewise | |
9168 | # $TMPDIR if set, where it might want to write temporary files | |
9169 | # /tmp where it might want to write temporary files | |
9170 | # /var/tmp likewise | |
9171 | # /usr/tmp likewise | |
9172 | for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do | |
9173 | # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib | |
9174 | # in the usual case where exec_prefix is '${prefix}'. | |
9175 | case $ac_dir in #( | |
9176 | . | /* | ?:[\\/]*) ;; #( | |
9177 | *) continue;; | |
9178 | esac | |
9179 | test -w "$ac_dir/." || continue # It is less confusing to not echo anything here. | |
9180 | ac_xdir=$ac_dir/cf$$ | |
9181 | (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue | |
9182 | ac_tf1=$ac_xdir/conftest9012345 | |
9183 | ac_tf2=$ac_xdir/conftest9012346 | |
9184 | touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" || | |
9185 | ac_cv_sys_long_file_names=no | |
9186 | rm -f -r "$ac_xdir" 2>/dev/null | |
9187 | test $ac_cv_sys_long_file_names = no && break | |
9188 | done | |
9189 | fi | |
9190 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_long_file_names" >&5 | |
9191 | $as_echo "$ac_cv_sys_long_file_names" >&6; } | |
9192 | if test $ac_cv_sys_long_file_names = yes; then | |
9193 | ||
9194 | $as_echo "#define HAVE_LONG_FILE_NAMES 1" >>confdefs.h | |
9195 | ||
9196 | fi | |
9197 | ||
9198 | ||
9199 | #### Choose a window system. | |
9200 | ||
9201 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5 | |
9202 | $as_echo_n "checking for X... " >&6; } | |
9203 | ||
9204 | ||
9205 | # Check whether --with-x was given. | |
9206 | if test "${with_x+set}" = set; then : | |
9207 | withval=$with_x; | |
9208 | fi | |
9209 | ||
9210 | # $have_x is `yes', `no', `disabled', or empty when we do not yet know. | |
9211 | if test "x$with_x" = xno; then | |
9212 | # The user explicitly disabled X. | |
9213 | have_x=disabled | |
9214 | else | |
9215 | case $x_includes,$x_libraries in #( | |
5f64f7bd GM |
9216 | *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #( |
9217 | *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then : | |
067d23c9 KY |
9218 | $as_echo_n "(cached) " >&6 |
9219 | else | |
9220 | # One or both of the vars are not set, and there is no cached value. | |
9221 | ac_x_includes=no ac_x_libraries=no | |
9222 | rm -f -r conftest.dir | |
9223 | if mkdir conftest.dir; then | |
9224 | cd conftest.dir | |
9225 | cat >Imakefile <<'_ACEOF' | |
9226 | incroot: | |
9227 | @echo incroot='${INCROOT}' | |
9228 | usrlibdir: | |
9229 | @echo usrlibdir='${USRLIBDIR}' | |
9230 | libdir: | |
9231 | @echo libdir='${LIBDIR}' | |
9232 | _ACEOF | |
9233 | if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then | |
5f64f7bd | 9234 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. |
067d23c9 KY |
9235 | for ac_var in incroot usrlibdir libdir; do |
9236 | eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" | |
9237 | done | |
9238 | # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. | |
9239 | for ac_extension in a so sl dylib la dll; do | |
9240 | if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && | |
9241 | test -f "$ac_im_libdir/libX11.$ac_extension"; then | |
9242 | ac_im_usrlibdir=$ac_im_libdir; break | |
9243 | fi | |
9244 | done | |
9245 | # Screen out bogus values from the imake configuration. They are | |
9246 | # bogus both because they are the default anyway, and because | |
9247 | # using them would break gcc on systems where it needs fixed includes. | |
9248 | case $ac_im_incroot in | |
9249 | /usr/include) ac_x_includes= ;; | |
9250 | *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; | |
9251 | esac | |
9252 | case $ac_im_usrlibdir in | |
9253 | /usr/lib | /usr/lib64 | /lib | /lib64) ;; | |
9254 | *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; | |
9255 | esac | |
9256 | fi | |
9257 | cd .. | |
9258 | rm -f -r conftest.dir | |
9259 | fi | |
9260 | ||
9261 | # Standard set of common directories for X headers. | |
9262 | # Check X11 before X11Rn because it is often a symlink to the current release. | |
9263 | ac_x_header_dirs=' | |
9264 | /usr/X11/include | |
9265 | /usr/X11R7/include | |
9266 | /usr/X11R6/include | |
9267 | /usr/X11R5/include | |
9268 | /usr/X11R4/include | |
9269 | ||
9270 | /usr/include/X11 | |
9271 | /usr/include/X11R7 | |
9272 | /usr/include/X11R6 | |
9273 | /usr/include/X11R5 | |
9274 | /usr/include/X11R4 | |
9275 | ||
9276 | /usr/local/X11/include | |
9277 | /usr/local/X11R7/include | |
9278 | /usr/local/X11R6/include | |
9279 | /usr/local/X11R5/include | |
9280 | /usr/local/X11R4/include | |
9281 | ||
9282 | /usr/local/include/X11 | |
9283 | /usr/local/include/X11R7 | |
9284 | /usr/local/include/X11R6 | |
9285 | /usr/local/include/X11R5 | |
9286 | /usr/local/include/X11R4 | |
9287 | ||
9288 | /usr/X386/include | |
9289 | /usr/x386/include | |
9290 | /usr/XFree86/include/X11 | |
9291 | ||
9292 | /usr/include | |
9293 | /usr/local/include | |
9294 | /usr/unsupported/include | |
9295 | /usr/athena/include | |
9296 | /usr/local/x11r5/include | |
9297 | /usr/lpp/Xamples/include | |
9298 | ||
9299 | /usr/openwin/include | |
9300 | /usr/openwin/share/include' | |
9301 | ||
9302 | if test "$ac_x_includes" = no; then | |
9303 | # Guess where to find include files, by looking for Xlib.h. | |
9304 | # First, try using that file with no special directory specified. | |
9305 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9306 | /* end confdefs.h. */ | |
9307 | #include <X11/Xlib.h> | |
9308 | _ACEOF | |
9309 | if ac_fn_c_try_cpp "$LINENO"; then : | |
9310 | # We can compile using X headers with no special include directory. | |
9311 | ac_x_includes= | |
9312 | else | |
9313 | for ac_dir in $ac_x_header_dirs; do | |
9314 | if test -r "$ac_dir/X11/Xlib.h"; then | |
9315 | ac_x_includes=$ac_dir | |
9316 | break | |
9317 | fi | |
9318 | done | |
9319 | fi | |
5f64f7bd | 9320 | rm -f conftest.err conftest.$ac_ext |
067d23c9 KY |
9321 | fi # $ac_x_includes = no |
9322 | ||
9323 | if test "$ac_x_libraries" = no; then | |
9324 | # Check for the libraries. | |
9325 | # See if we find them without any special options. | |
9326 | # Don't add to $LIBS permanently. | |
9327 | ac_save_LIBS=$LIBS | |
9328 | LIBS="-lX11 $LIBS" | |
9329 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9330 | /* end confdefs.h. */ | |
9331 | #include <X11/Xlib.h> | |
9332 | int | |
9333 | main () | |
9334 | { | |
9335 | XrmInitialize () | |
9336 | ; | |
9337 | return 0; | |
9338 | } | |
9339 | _ACEOF | |
9340 | if ac_fn_c_try_link "$LINENO"; then : | |
9341 | LIBS=$ac_save_LIBS | |
9342 | # We can link X programs with no special library path. | |
9343 | ac_x_libraries= | |
9344 | else | |
9345 | LIBS=$ac_save_LIBS | |
9346 | for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` | |
9347 | do | |
9348 | # Don't even attempt the hair of trying to link an X program! | |
9349 | for ac_extension in a so sl dylib la dll; do | |
9350 | if test -r "$ac_dir/libX11.$ac_extension"; then | |
9351 | ac_x_libraries=$ac_dir | |
9352 | break 2 | |
9353 | fi | |
9354 | done | |
9355 | done | |
9356 | fi | |
9357 | rm -f core conftest.err conftest.$ac_objext \ | |
9358 | conftest$ac_exeext conftest.$ac_ext | |
9359 | fi # $ac_x_libraries = no | |
9360 | ||
9361 | case $ac_x_includes,$ac_x_libraries in #( | |
9362 | no,* | *,no | *\'*) | |
9363 | # Didn't find X, or a directory has "'" in its name. | |
9364 | ac_cv_have_x="have_x=no";; #( | |
9365 | *) | |
9366 | # Record where we found X for the cache. | |
9367 | ac_cv_have_x="have_x=yes\ | |
9368 | ac_x_includes='$ac_x_includes'\ | |
9369 | ac_x_libraries='$ac_x_libraries'" | |
9370 | esac | |
9371 | fi | |
9372 | ;; #( | |
9373 | *) have_x=yes;; | |
9374 | esac | |
9375 | eval "$ac_cv_have_x" | |
9376 | fi # $with_x != no | |
9377 | ||
9378 | if test "$have_x" != yes; then | |
9379 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5 | |
9380 | $as_echo "$have_x" >&6; } | |
9381 | no_x=yes | |
9382 | else | |
9383 | # If each of the values was on the command line, it overrides each guess. | |
9384 | test "x$x_includes" = xNONE && x_includes=$ac_x_includes | |
9385 | test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries | |
9386 | # Update the cache value to reflect the command line values. | |
9387 | ac_cv_have_x="have_x=yes\ | |
9388 | ac_x_includes='$x_includes'\ | |
9389 | ac_x_libraries='$x_libraries'" | |
9390 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5 | |
9391 | $as_echo "libraries $x_libraries, headers $x_includes" >&6; } | |
9392 | fi | |
9393 | ||
9394 | if test "$no_x" = yes; then | |
9395 | window_system=none | |
9396 | else | |
9397 | window_system=x11 | |
9398 | fi | |
9399 | ||
9400 | ## Workaround for bug in autoconf <= 2.62. | |
9401 | ## http://lists.gnu.org/archive/html/emacs-devel/2008-04/msg01551.html | |
9402 | ## No need to do anything special for these standard directories. | |
9403 | if test -n "${x_libraries}" && test x"${x_libraries}" != xNONE; then | |
9404 | ||
9405 | x_libraries=`echo :${x_libraries}: | sed -e 's|:/usr/lib64:|:|g' -e 's|:/lib64:|:|g' -e 's|^:||' -e 's|:$||'` | |
9406 | ||
9407 | fi | |
9408 | ||
9409 | LD_SWITCH_X_SITE_AUX= | |
9410 | LD_SWITCH_X_SITE_AUX_RPATH= | |
9411 | if test "${x_libraries}" != NONE; then | |
9412 | if test -n "${x_libraries}"; then | |
9413 | LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"` | |
9414 | LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"` | |
9415 | LD_SWITCH_X_SITE_AUX_RPATH=`echo ${LD_SWITCH_X_SITE_AUX} | sed -e 's/-R/-Wl,-rpath,/'` | |
9416 | fi | |
9417 | x_default_search_path="" | |
9418 | x_search_path=${x_libraries} | |
9419 | if test -z "${x_search_path}"; then | |
9420 | x_search_path=/usr/lib | |
9421 | fi | |
9422 | for x_library in `echo ${x_search_path}: | \ | |
9423 | sed -e "s/:/ /g" -e p -e "s:/lib[^ /]* :/share :g"`; do | |
9424 | x_search_path="\ | |
9425 | ${x_library}/X11/%L/%T/%N%C%S:\ | |
9426 | ${x_library}/X11/%l/%T/%N%C%S:\ | |
9427 | ${x_library}/X11/%T/%N%C%S:\ | |
9428 | ${x_library}/X11/%L/%T/%N%S:\ | |
9429 | ${x_library}/X11/%l/%T/%N%S:\ | |
9430 | ${x_library}/X11/%T/%N%S" | |
9431 | if test x"${x_default_search_path}" = x; then | |
9432 | x_default_search_path=${x_search_path} | |
9433 | else | |
9434 | x_default_search_path="${x_search_path}:${x_default_search_path}" | |
9435 | fi | |
9436 | done | |
9437 | fi | |
9438 | ||
9439 | ||
9440 | ||
9441 | if test "${x_includes}" != NONE && test -n "${x_includes}"; then | |
9442 | C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"` | |
9443 | fi | |
9444 | ||
9445 | if test x"${x_includes}" = x; then | |
9446 | bitmapdir=/usr/include/X11/bitmaps | |
9447 | else | |
9448 | # accumulate include directories that have X11 bitmap subdirectories | |
9449 | bmd_acc="dummyval" | |
9450 | for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do | |
9451 | if test -d "${bmd}/X11/bitmaps"; then | |
9452 | bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps" | |
9453 | fi | |
9454 | if test -d "${bmd}/bitmaps"; then | |
9455 | bmd_acc="${bmd_acc}:${bmd}/bitmaps" | |
9456 | fi | |
9457 | done | |
9458 | if test ${bmd_acc} != "dummyval"; then | |
9459 | bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"` | |
9460 | fi | |
9461 | fi | |
9462 | ||
9463 | HAVE_NS=no | |
9464 | NS_IMPL_COCOA=no | |
9465 | NS_IMPL_GNUSTEP=no | |
9466 | tmp_CPPFLAGS="$CPPFLAGS" | |
9467 | tmp_CFLAGS="$CFLAGS" | |
9468 | CPPFLAGS="$CPPFLAGS -x objective-c" | |
9469 | CFLAGS="$CFLAGS -x objective-c" | |
9470 | TEMACS_LDFLAGS2="\${LDFLAGS}" | |
9471 | if test "${with_ns}" != no; then | |
9472 | if test "${opsys}" = darwin; then | |
9473 | NS_IMPL_COCOA=yes | |
9474 | ns_appdir=`pwd`/nextstep/Emacs.app | |
9475 | ns_appbindir=${ns_appdir}/Contents/MacOS/ | |
9476 | ns_appresdir=${ns_appdir}/Contents/Resources | |
9477 | ns_appsrc=${srcdir}/nextstep/Cocoa/Emacs.base | |
9478 | elif test -f $GNUSTEP_CONFIG_FILE; then | |
9479 | NS_IMPL_GNUSTEP=yes | |
9480 | ns_appdir=`pwd`/nextstep/Emacs.app | |
9481 | ns_appbindir=${ns_appdir}/ | |
9482 | ns_appresdir=${ns_appdir}/Resources | |
9483 | ns_appsrc=${srcdir}/nextstep/GNUstep/Emacs.base | |
9484 | GNUSTEP_SYSTEM_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_HEADERS)" | |
9485 | GNUSTEP_SYSTEM_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_LIBRARIES)" | |
9486 | GNUSTEP_LOCAL_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_HEADERS)" | |
9487 | GNUSTEP_LOCAL_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_LIBRARIES)" | |
9488 | test "x${GNUSTEP_LOCAL_HEADERS}" != "x" && \ | |
9489 | GNUSTEP_LOCAL_HEADERS="-I${GNUSTEP_LOCAL_HEADERS}" | |
9490 | test "x${GNUSTEP_LOCAL_LIBRARIES}" != "x" && \ | |
9491 | GNUSTEP_LOCAL_LIBRARIES="-L${GNUSTEP_LOCAL_LIBRARIES}" | |
9492 | CPPFLAGS="$CPPFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}" | |
9493 | CFLAGS="$CFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}" | |
9494 | LDFLAGS="$LDFLAGS -L${GNUSTEP_SYSTEM_LIBRARIES} ${GNUSTEP_LOCAL_LIBRARIES}" | |
9495 | LIB_STANDARD= | |
9496 | START_FILES= | |
9497 | TEMACS_LDFLAGS2= | |
9498 | fi | |
9499 | ac_fn_c_check_header_mongrel "$LINENO" "AppKit/AppKit.h" "ac_cv_header_AppKit_AppKit_h" "$ac_includes_default" | |
5f64f7bd | 9500 | if test "x$ac_cv_header_AppKit_AppKit_h" = x""yes; then : |
067d23c9 KY |
9501 | HAVE_NS=yes |
9502 | else | |
5f64f7bd | 9503 | as_fn_error "\`--with-ns' was specified, but the include |
067d23c9 KY |
9504 | files are missing or cannot be compiled." "$LINENO" 5 |
9505 | fi | |
9506 | ||
9507 | ||
9508 | NS_HAVE_NSINTEGER=yes | |
9509 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9510 | /* end confdefs.h. */ | |
9511 | #include <Foundation/NSObjCRuntime.h> | |
9512 | int | |
9513 | main () | |
9514 | { | |
9515 | NSInteger i; | |
9516 | ; | |
9517 | return 0; | |
9518 | } | |
9519 | _ACEOF | |
9520 | if ac_fn_c_try_compile "$LINENO"; then : | |
9521 | ns_have_nsinteger=yes | |
9522 | else | |
9523 | ns_have_nsinteger=no | |
9524 | fi | |
9525 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
9526 | if test $ns_have_nsinteger = no; then | |
9527 | NS_HAVE_NSINTEGER=no | |
9528 | fi | |
9529 | fi | |
9530 | ||
9531 | ||
9532 | ns_frag=/dev/null | |
9533 | NS_OBJ= | |
00b3c7ac | 9534 | NS_OBJC_OBJ= |
067d23c9 KY |
9535 | if test "${HAVE_NS}" = yes; then |
9536 | window_system=nextstep | |
9537 | with_xft=no | |
9538 | # set up packaging dirs | |
9539 | exec_prefix=${ns_appbindir} | |
9540 | libexecdir=${ns_appbindir}/libexec | |
9541 | if test "${EN_NS_SELF_CONTAINED}" = yes; then | |
9542 | prefix=${ns_appresdir} | |
9543 | fi | |
9544 | ns_frag=$srcdir/src/ns.mk | |
00b3c7ac TT |
9545 | NS_OBJ="fontset.o fringe.o image.o" |
9546 | NS_OBJC_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o" | |
067d23c9 KY |
9547 | fi |
9548 | CFLAGS="$tmp_CFLAGS" | |
9549 | CPPFLAGS="$tmp_CPPFLAGS" | |
9550 | ||
9551 | ||
9552 | ||
9553 | ||
9554 | ||
9555 | case "${window_system}" in | |
9556 | x11 ) | |
9557 | HAVE_X_WINDOWS=yes | |
9558 | HAVE_X11=yes | |
9559 | case "${with_x_toolkit}" in | |
9560 | athena | lucid ) USE_X_TOOLKIT=LUCID ;; | |
9561 | motif ) USE_X_TOOLKIT=MOTIF ;; | |
9562 | gtk ) with_gtk=yes | |
9563 | USE_X_TOOLKIT=none ;; | |
9564 | gtk3 ) with_gtk3=yes | |
9565 | USE_X_TOOLKIT=none ;; | |
9566 | no ) USE_X_TOOLKIT=none ;; | |
9567 | * ) USE_X_TOOLKIT=maybe ;; | |
9568 | esac | |
9569 | ;; | |
9570 | nextstep | none ) | |
9571 | HAVE_X_WINDOWS=no | |
9572 | HAVE_X11=no | |
9573 | USE_X_TOOLKIT=none | |
9574 | ;; | |
9575 | esac | |
9576 | ||
9577 | if test "$window_system" = none && test "X$with_x" != "Xno"; then | |
9578 | # Extract the first word of "X", so it can be a program name with args. | |
9579 | set dummy X; ac_word=$2 | |
9580 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
9581 | $as_echo_n "checking for $ac_word... " >&6; } | |
5f64f7bd | 9582 | if test "${ac_cv_prog_HAVE_XSERVER+set}" = set; then : |
067d23c9 KY |
9583 | $as_echo_n "(cached) " >&6 |
9584 | else | |
9585 | if test -n "$HAVE_XSERVER"; then | |
9586 | ac_cv_prog_HAVE_XSERVER="$HAVE_XSERVER" # Let the user override the test. | |
9587 | else | |
9588 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
9589 | for as_dir in $PATH | |
9590 | do | |
9591 | IFS=$as_save_IFS | |
9592 | test -z "$as_dir" && as_dir=. | |
9593 | for ac_exec_ext in '' $ac_executable_extensions; do | |
9594 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
9595 | ac_cv_prog_HAVE_XSERVER="true" | |
9596 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
9597 | break 2 | |
9598 | fi | |
9599 | done | |
9600 | done | |
9601 | IFS=$as_save_IFS | |
9602 | ||
9603 | test -z "$ac_cv_prog_HAVE_XSERVER" && ac_cv_prog_HAVE_XSERVER="false" | |
9604 | fi | |
9605 | fi | |
9606 | HAVE_XSERVER=$ac_cv_prog_HAVE_XSERVER | |
9607 | if test -n "$HAVE_XSERVER"; then | |
9608 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_XSERVER" >&5 | |
9609 | $as_echo "$HAVE_XSERVER" >&6; } | |
9610 | else | |
9611 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
9612 | $as_echo "no" >&6; } | |
9613 | fi | |
9614 | ||
9615 | ||
9616 | if test "$HAVE_XSERVER" = true || | |
9617 | test -n "$DISPLAY" || | |
9618 | test "`echo /usr/lib/libX11.*`" != "/usr/lib/libX11.*"; then | |
5f64f7bd | 9619 | as_fn_error "You seem to be running X, but no X development libraries |
067d23c9 KY |
9620 | were found. You should install the relevant development files for X |
9621 | and for the toolkit you want, such as Gtk+, Lesstif or Motif. Also make | |
9622 | sure you have development files for image handling, i.e. | |
9623 | tiff, gif, jpeg, png and xpm. | |
9624 | If you are sure you want Emacs compiled without X window support, pass | |
9625 | --without-x | |
9626 | to configure." "$LINENO" 5 | |
9627 | fi | |
9628 | fi | |
9629 | ||
9630 | ### If we're using X11, we should use the X menu package. | |
9631 | HAVE_MENUS=no | |
9632 | case ${HAVE_X11} in | |
9633 | yes ) HAVE_MENUS=yes ;; | |
9634 | esac | |
9635 | ||
9636 | # Do the opsystem or machine files prohibit the use of the GNU malloc? | |
9637 | # Assume not, until told otherwise. | |
9638 | GNU_MALLOC=yes | |
9639 | doug_lea_malloc=yes | |
9640 | ac_fn_c_check_func "$LINENO" "malloc_get_state" "ac_cv_func_malloc_get_state" | |
5f64f7bd | 9641 | if test "x$ac_cv_func_malloc_get_state" = x""yes; then : |
067d23c9 KY |
9642 | |
9643 | else | |
9644 | doug_lea_malloc=no | |
9645 | fi | |
9646 | ||
9647 | ac_fn_c_check_func "$LINENO" "malloc_set_state" "ac_cv_func_malloc_set_state" | |
5f64f7bd | 9648 | if test "x$ac_cv_func_malloc_set_state" = x""yes; then : |
067d23c9 KY |
9649 | |
9650 | else | |
9651 | doug_lea_malloc=no | |
9652 | fi | |
9653 | ||
9654 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __after_morecore_hook exists" >&5 | |
9655 | $as_echo_n "checking whether __after_morecore_hook exists... " >&6; } | |
5f64f7bd | 9656 | if test "${emacs_cv_var___after_morecore_hook+set}" = set; then : |
067d23c9 KY |
9657 | $as_echo_n "(cached) " >&6 |
9658 | else | |
9659 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9660 | /* end confdefs.h. */ | |
9661 | extern void (* __after_morecore_hook)(); | |
9662 | int | |
9663 | main () | |
9664 | { | |
9665 | __after_morecore_hook = 0 | |
9666 | ; | |
9667 | return 0; | |
9668 | } | |
9669 | _ACEOF | |
9670 | if ac_fn_c_try_link "$LINENO"; then : | |
9671 | emacs_cv_var___after_morecore_hook=yes | |
9672 | else | |
9673 | emacs_cv_var___after_morecore_hook=no | |
9674 | fi | |
9675 | rm -f core conftest.err conftest.$ac_objext \ | |
9676 | conftest$ac_exeext conftest.$ac_ext | |
9677 | fi | |
9678 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_var___after_morecore_hook" >&5 | |
9679 | $as_echo "$emacs_cv_var___after_morecore_hook" >&6; } | |
9680 | if test $emacs_cv_var___after_morecore_hook = no; then | |
9681 | doug_lea_malloc=no | |
9682 | fi | |
9683 | ||
9684 | ||
9685 | system_malloc=no | |
9686 | case "$opsys" in | |
9687 | ## darwin ld insists on the use of malloc routines in the System framework. | |
9688 | darwin|sol2-10) system_malloc=yes ;; | |
9689 | esac | |
9690 | ||
9691 | if test "${system_malloc}" = "yes"; then | |
9692 | ||
9693 | $as_echo "#define SYSTEM_MALLOC 1" >>confdefs.h | |
9694 | ||
9695 | GNU_MALLOC=no | |
9696 | GNU_MALLOC_reason=" | |
9697 | (The GNU allocators don't work with this system configuration.)" | |
9698 | GMALLOC_OBJ= | |
9699 | VMLIMIT_OBJ= | |
9700 | else | |
9701 | test "$doug_lea_malloc" != "yes" && GMALLOC_OBJ=gmalloc.o | |
9702 | VMLIMIT_OBJ=vm-limit.o | |
9703 | fi | |
9704 | ||
9705 | ||
9706 | ||
9707 | if test "$doug_lea_malloc" = "yes" ; then | |
9708 | if test "$GNU_MALLOC" = yes ; then | |
9709 | GNU_MALLOC_reason=" | |
9710 | (Using Doug Lea's new malloc from the GNU C Library.)" | |
9711 | fi | |
9712 | ||
9713 | $as_echo "#define DOUG_LEA_MALLOC 1" >>confdefs.h | |
9714 | ||
9715 | ||
9716 | ## Use mmap directly for allocating larger buffers. | |
9717 | ## FIXME this comes from src/s/{gnu,gnu-linux}.h: | |
9718 | ## #ifdef DOUG_LEA_MALLOC; #undef REL_ALLOC; #endif | |
9719 | ## Does the AC_FUNC_MMAP test below make this check unecessary? | |
9720 | case "$opsys" in | |
9721 | gnu*) REL_ALLOC=no ;; | |
9722 | esac | |
9723 | fi | |
9724 | ||
9725 | if test x"${REL_ALLOC}" = x; then | |
9726 | REL_ALLOC=${GNU_MALLOC} | |
9727 | fi | |
9728 | ||
9729 | use_mmap_for_buffers=no | |
9730 | case "$opsys" in | |
e7dcef2a | 9731 | cygwin|freebsd|irix6-5) use_mmap_for_buffers=yes ;; |
067d23c9 KY |
9732 | esac |
9733 | ||
9734 | ||
9735 | ||
9736 | ||
9737 | for ac_header in $ac_header_list | |
9738 | do : | |
9739 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
9740 | ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default | |
9741 | " | |
5f64f7bd GM |
9742 | eval as_val=\$$as_ac_Header |
9743 | if test "x$as_val" = x""yes; then : | |
067d23c9 KY |
9744 | cat >>confdefs.h <<_ACEOF |
9745 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
9746 | _ACEOF | |
9747 | ||
9748 | fi | |
9749 | ||
9750 | done | |
9751 | ||
9752 | ||
9753 | ||
9754 | ||
9755 | ||
9756 | ||
9757 | ||
9758 | ||
9759 | for ac_func in getpagesize | |
9760 | do : | |
9761 | ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" | |
5f64f7bd | 9762 | if test "x$ac_cv_func_getpagesize" = x""yes; then : |
067d23c9 KY |
9763 | cat >>confdefs.h <<_ACEOF |
9764 | #define HAVE_GETPAGESIZE 1 | |
9765 | _ACEOF | |
9766 | ||
9767 | fi | |
9768 | done | |
9769 | ||
9770 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 | |
9771 | $as_echo_n "checking for working mmap... " >&6; } | |
5f64f7bd | 9772 | if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then : |
067d23c9 KY |
9773 | $as_echo_n "(cached) " >&6 |
9774 | else | |
9775 | if test "$cross_compiling" = yes; then : | |
9776 | ac_cv_func_mmap_fixed_mapped=no | |
9777 | else | |
9778 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9779 | /* end confdefs.h. */ | |
9780 | $ac_includes_default | |
9781 | /* malloc might have been renamed as rpl_malloc. */ | |
9782 | #undef malloc | |
9783 | ||
9784 | /* Thanks to Mike Haertel and Jim Avera for this test. | |
9785 | Here is a matrix of mmap possibilities: | |
9786 | mmap private not fixed | |
9787 | mmap private fixed at somewhere currently unmapped | |
9788 | mmap private fixed at somewhere already mapped | |
9789 | mmap shared not fixed | |
9790 | mmap shared fixed at somewhere currently unmapped | |
9791 | mmap shared fixed at somewhere already mapped | |
9792 | For private mappings, we should verify that changes cannot be read() | |
9793 | back from the file, nor mmap's back from the file at a different | |
9794 | address. (There have been systems where private was not correctly | |
9795 | implemented like the infamous i386 svr4.0, and systems where the | |
9796 | VM page cache was not coherent with the file system buffer cache | |
9797 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
9798 | For shared mappings, we should conversely verify that changes get | |
9799 | propagated back to all the places they're supposed to be. | |
9800 | ||
9801 | Grep wants private fixed already mapped. | |
9802 | The main things grep needs to know about mmap are: | |
9803 | * does it exist and is it safe to write into the mmap'd area | |
9804 | * how to use it (BSD variants) */ | |
9805 | ||
9806 | #include <fcntl.h> | |
9807 | #include <sys/mman.h> | |
9808 | ||
9809 | #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H | |
9810 | char *malloc (); | |
9811 | #endif | |
9812 | ||
9813 | /* This mess was copied from the GNU getpagesize.h. */ | |
9814 | #ifndef HAVE_GETPAGESIZE | |
9815 | # ifdef _SC_PAGESIZE | |
9816 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
9817 | # else /* no _SC_PAGESIZE */ | |
9818 | # ifdef HAVE_SYS_PARAM_H | |
9819 | # include <sys/param.h> | |
9820 | # ifdef EXEC_PAGESIZE | |
9821 | # define getpagesize() EXEC_PAGESIZE | |
9822 | # else /* no EXEC_PAGESIZE */ | |
9823 | # ifdef NBPG | |
9824 | # define getpagesize() NBPG * CLSIZE | |
9825 | # ifndef CLSIZE | |
9826 | # define CLSIZE 1 | |
9827 | # endif /* no CLSIZE */ | |
9828 | # else /* no NBPG */ | |
9829 | # ifdef NBPC | |
9830 | # define getpagesize() NBPC | |
9831 | # else /* no NBPC */ | |
9832 | # ifdef PAGESIZE | |
9833 | # define getpagesize() PAGESIZE | |
9834 | # endif /* PAGESIZE */ | |
9835 | # endif /* no NBPC */ | |
9836 | # endif /* no NBPG */ | |
9837 | # endif /* no EXEC_PAGESIZE */ | |
9838 | # else /* no HAVE_SYS_PARAM_H */ | |
9839 | # define getpagesize() 8192 /* punt totally */ | |
9840 | # endif /* no HAVE_SYS_PARAM_H */ | |
9841 | # endif /* no _SC_PAGESIZE */ | |
9842 | ||
9843 | #endif /* no HAVE_GETPAGESIZE */ | |
9844 | ||
9845 | int | |
9846 | main () | |
9847 | { | |
9848 | char *data, *data2, *data3; | |
1ef6de05 | 9849 | const char *cdata2; |
067d23c9 KY |
9850 | int i, pagesize; |
9851 | int fd, fd2; | |
9852 | ||
9853 | pagesize = getpagesize (); | |
9854 | ||
9855 | /* First, make a file with some known garbage in it. */ | |
9856 | data = (char *) malloc (pagesize); | |
9857 | if (!data) | |
9858 | return 1; | |
9859 | for (i = 0; i < pagesize; ++i) | |
9860 | *(data + i) = rand (); | |
9861 | umask (0); | |
9862 | fd = creat ("conftest.mmap", 0600); | |
9863 | if (fd < 0) | |
9864 | return 2; | |
9865 | if (write (fd, data, pagesize) != pagesize) | |
9866 | return 3; | |
9867 | close (fd); | |
9868 | ||
9869 | /* Next, check that the tail of a page is zero-filled. File must have | |
9870 | non-zero length, otherwise we risk SIGBUS for entire page. */ | |
9871 | fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600); | |
9872 | if (fd2 < 0) | |
9873 | return 4; | |
1ef6de05 PE |
9874 | cdata2 = ""; |
9875 | if (write (fd2, cdata2, 1) != 1) | |
067d23c9 | 9876 | return 5; |
1ef6de05 | 9877 | data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L); |
067d23c9 KY |
9878 | if (data2 == MAP_FAILED) |
9879 | return 6; | |
9880 | for (i = 0; i < pagesize; ++i) | |
9881 | if (*(data2 + i)) | |
9882 | return 7; | |
9883 | close (fd2); | |
9884 | if (munmap (data2, pagesize)) | |
9885 | return 8; | |
9886 | ||
9887 | /* Next, try to mmap the file at a fixed address which already has | |
9888 | something else allocated at it. If we can, also make sure that | |
9889 | we see the same garbage. */ | |
9890 | fd = open ("conftest.mmap", O_RDWR); | |
9891 | if (fd < 0) | |
9892 | return 9; | |
9893 | if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, | |
9894 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
9895 | return 10; | |
9896 | for (i = 0; i < pagesize; ++i) | |
9897 | if (*(data + i) != *(data2 + i)) | |
9898 | return 11; | |
9899 | ||
9900 | /* Finally, make sure that changes to the mapped area do not | |
9901 | percolate back to the file as seen by read(). (This is a bug on | |
9902 | some variants of i386 svr4.0.) */ | |
9903 | for (i = 0; i < pagesize; ++i) | |
9904 | *(data2 + i) = *(data2 + i) + 1; | |
9905 | data3 = (char *) malloc (pagesize); | |
9906 | if (!data3) | |
9907 | return 12; | |
9908 | if (read (fd, data3, pagesize) != pagesize) | |
9909 | return 13; | |
9910 | for (i = 0; i < pagesize; ++i) | |
9911 | if (*(data + i) != *(data3 + i)) | |
9912 | return 14; | |
9913 | close (fd); | |
9914 | return 0; | |
9915 | } | |
9916 | _ACEOF | |
9917 | if ac_fn_c_try_run "$LINENO"; then : | |
9918 | ac_cv_func_mmap_fixed_mapped=yes | |
9919 | else | |
9920 | ac_cv_func_mmap_fixed_mapped=no | |
9921 | fi | |
9922 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
9923 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
9924 | fi | |
9925 | ||
9926 | fi | |
9927 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5 | |
9928 | $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; } | |
9929 | if test $ac_cv_func_mmap_fixed_mapped = yes; then | |
9930 | ||
9931 | $as_echo "#define HAVE_MMAP 1" >>confdefs.h | |
9932 | ||
9933 | fi | |
9934 | rm -f conftest.mmap conftest.txt | |
9935 | ||
9936 | if test $use_mmap_for_buffers = yes; then | |
9937 | ||
9938 | $as_echo "#define USE_MMAP_FOR_BUFFERS 1" >>confdefs.h | |
9939 | ||
9940 | REL_ALLOC=no | |
9941 | fi | |
9942 | ||
9943 | LIBS="$LIBS_SYSTEM $LIBS" | |
9944 | ||
9945 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5 | |
9946 | $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; } | |
5f64f7bd | 9947 | if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then : |
067d23c9 KY |
9948 | $as_echo_n "(cached) " >&6 |
9949 | else | |
9950 | ac_check_lib_save_LIBS=$LIBS | |
9951 | LIBS="-ldnet $LIBS" | |
9952 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9953 | /* end confdefs.h. */ | |
9954 | ||
9955 | /* Override any GCC internal prototype to avoid an error. | |
9956 | Use char because int might match the return type of a GCC | |
9957 | builtin and then its argument prototype would still apply. */ | |
9958 | #ifdef __cplusplus | |
9959 | extern "C" | |
9960 | #endif | |
9961 | char dnet_ntoa (); | |
9962 | int | |
9963 | main () | |
9964 | { | |
9965 | return dnet_ntoa (); | |
9966 | ; | |
9967 | return 0; | |
9968 | } | |
9969 | _ACEOF | |
9970 | if ac_fn_c_try_link "$LINENO"; then : | |
9971 | ac_cv_lib_dnet_dnet_ntoa=yes | |
9972 | else | |
9973 | ac_cv_lib_dnet_dnet_ntoa=no | |
9974 | fi | |
9975 | rm -f core conftest.err conftest.$ac_objext \ | |
9976 | conftest$ac_exeext conftest.$ac_ext | |
9977 | LIBS=$ac_check_lib_save_LIBS | |
9978 | fi | |
9979 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 | |
9980 | $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; } | |
5f64f7bd | 9981 | if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then : |
067d23c9 KY |
9982 | cat >>confdefs.h <<_ACEOF |
9983 | #define HAVE_LIBDNET 1 | |
9984 | _ACEOF | |
9985 | ||
9986 | LIBS="-ldnet $LIBS" | |
9987 | ||
9988 | fi | |
9989 | ||
9990 | ||
9991 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lXbsd" >&5 | |
9992 | $as_echo_n "checking for main in -lXbsd... " >&6; } | |
5f64f7bd | 9993 | if test "${ac_cv_lib_Xbsd_main+set}" = set; then : |
067d23c9 KY |
9994 | $as_echo_n "(cached) " >&6 |
9995 | else | |
9996 | ac_check_lib_save_LIBS=$LIBS | |
9997 | LIBS="-lXbsd $LIBS" | |
9998 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9999 | /* end confdefs.h. */ | |
10000 | ||
10001 | ||
10002 | int | |
10003 | main () | |
10004 | { | |
10005 | return main (); | |
10006 | ; | |
10007 | return 0; | |
10008 | } | |
10009 | _ACEOF | |
10010 | if ac_fn_c_try_link "$LINENO"; then : | |
10011 | ac_cv_lib_Xbsd_main=yes | |
10012 | else | |
10013 | ac_cv_lib_Xbsd_main=no | |
10014 | fi | |
10015 | rm -f core conftest.err conftest.$ac_objext \ | |
10016 | conftest$ac_exeext conftest.$ac_ext | |
10017 | LIBS=$ac_check_lib_save_LIBS | |
10018 | fi | |
10019 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xbsd_main" >&5 | |
10020 | $as_echo "$ac_cv_lib_Xbsd_main" >&6; } | |
5f64f7bd | 10021 | if test "x$ac_cv_lib_Xbsd_main" = x""yes; then : |
067d23c9 KY |
10022 | LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd" |
10023 | fi | |
10024 | ||
10025 | ||
1abfdc54 GM |
10026 | LIB_PTHREAD= |
10027 | for ac_header in pthread.h | |
10028 | do : | |
10029 | ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default" | |
10030 | if test "x$ac_cv_header_pthread_h" = x""yes; then : | |
10031 | cat >>confdefs.h <<_ACEOF | |
10032 | #define HAVE_PTHREAD_H 1 | |
10033 | _ACEOF | |
10034 | ||
10035 | fi | |
10036 | ||
10037 | done | |
10038 | ||
10039 | if test "$ac_cv_header_pthread_h"; then | |
10040 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_self in -lpthread" >&5 | |
10041 | $as_echo_n "checking for pthread_self in -lpthread... " >&6; } | |
10042 | if test "${ac_cv_lib_pthread_pthread_self+set}" = set; then : | |
10043 | $as_echo_n "(cached) " >&6 | |
10044 | else | |
10045 | ac_check_lib_save_LIBS=$LIBS | |
10046 | LIBS="-lpthread $LIBS" | |
10047 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10048 | /* end confdefs.h. */ | |
10049 | ||
10050 | /* Override any GCC internal prototype to avoid an error. | |
10051 | Use char because int might match the return type of a GCC | |
10052 | builtin and then its argument prototype would still apply. */ | |
10053 | #ifdef __cplusplus | |
10054 | extern "C" | |
10055 | #endif | |
10056 | char pthread_self (); | |
10057 | int | |
10058 | main () | |
10059 | { | |
10060 | return pthread_self (); | |
10061 | ; | |
10062 | return 0; | |
10063 | } | |
10064 | _ACEOF | |
10065 | if ac_fn_c_try_link "$LINENO"; then : | |
10066 | ac_cv_lib_pthread_pthread_self=yes | |
10067 | else | |
10068 | ac_cv_lib_pthread_pthread_self=no | |
10069 | fi | |
10070 | rm -f core conftest.err conftest.$ac_objext \ | |
10071 | conftest$ac_exeext conftest.$ac_ext | |
10072 | LIBS=$ac_check_lib_save_LIBS | |
10073 | fi | |
10074 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_self" >&5 | |
10075 | $as_echo "$ac_cv_lib_pthread_pthread_self" >&6; } | |
10076 | if test "x$ac_cv_lib_pthread_pthread_self" = x""yes; then : | |
10077 | HAVE_PTHREAD=yes | |
10078 | fi | |
10079 | ||
10080 | fi | |
10081 | if test "$HAVE_PTHREAD" = yes; then | |
10082 | case "${canonical}" in | |
10083 | *-hpux*) ;; | |
10084 | *) LIB_PTHREAD="-lpthread" ;; | |
10085 | esac | |
10086 | ||
10087 | $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h | |
10088 | ||
10089 | fi | |
10090 | ||
10091 | ||
067d23c9 KY |
10092 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cma_open in -lpthreads" >&5 |
10093 | $as_echo_n "checking for cma_open in -lpthreads... " >&6; } | |
5f64f7bd | 10094 | if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then : |
067d23c9 KY |
10095 | $as_echo_n "(cached) " >&6 |
10096 | else | |
10097 | ac_check_lib_save_LIBS=$LIBS | |
10098 | LIBS="-lpthreads $LIBS" | |
10099 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10100 | /* end confdefs.h. */ | |
10101 | ||
10102 | /* Override any GCC internal prototype to avoid an error. | |
10103 | Use char because int might match the return type of a GCC | |
10104 | builtin and then its argument prototype would still apply. */ | |
10105 | #ifdef __cplusplus | |
10106 | extern "C" | |
10107 | #endif | |
10108 | char cma_open (); | |
10109 | int | |
10110 | main () | |
10111 | { | |
10112 | return cma_open (); | |
10113 | ; | |
10114 | return 0; | |
10115 | } | |
10116 | _ACEOF | |
10117 | if ac_fn_c_try_link "$LINENO"; then : | |
10118 | ac_cv_lib_pthreads_cma_open=yes | |
10119 | else | |
10120 | ac_cv_lib_pthreads_cma_open=no | |
10121 | fi | |
10122 | rm -f core conftest.err conftest.$ac_objext \ | |
10123 | conftest$ac_exeext conftest.$ac_ext | |
10124 | LIBS=$ac_check_lib_save_LIBS | |
10125 | fi | |
10126 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_cma_open" >&5 | |
10127 | $as_echo "$ac_cv_lib_pthreads_cma_open" >&6; } | |
5f64f7bd | 10128 | if test "x$ac_cv_lib_pthreads_cma_open" = x""yes; then : |
067d23c9 KY |
10129 | cat >>confdefs.h <<_ACEOF |
10130 | #define HAVE_LIBPTHREADS 1 | |
10131 | _ACEOF | |
10132 | ||
10133 | LIBS="-lpthreads $LIBS" | |
10134 | ||
10135 | fi | |
10136 | ||
10137 | ||
10138 | ## Note: when using cpp in s/aix4.2.h, this definition depended on | |
10139 | ## HAVE_LIBPTHREADS. That was not defined earlier in configure when | |
10140 | ## the system file was sourced. Hence the value of LIBS_SYSTEM | |
10141 | ## added to LIBS in configure would never contain the pthreads part, | |
10142 | ## but the value used in Makefiles might. FIXME? | |
10143 | ## | |
10144 | ## -lpthreads seems to be necessary for Xlib in X11R6, and should | |
10145 | ## be harmless on older versions of X where it happens to exist. | |
10146 | test "$opsys" = "aix4-2" && \ | |
10147 | test $ac_cv_lib_pthreads_cma_open = yes && \ | |
10148 | LIBS_SYSTEM="$LIBS_SYSTEM -lpthreads" | |
10149 | ||
10150 | ||
10151 | case ${host_os} in | |
10152 | aix*) | |
10153 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5 | |
10154 | $as_echo_n "checking for -bbigtoc option... " >&6; } | |
5f64f7bd | 10155 | if test "${gdb_cv_bigtoc+set}" = set; then : |
067d23c9 KY |
10156 | $as_echo_n "(cached) " >&6 |
10157 | else | |
10158 | ||
10159 | case $GCC in | |
10160 | yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;; | |
10161 | *) gdb_cv_bigtoc=-bbigtoc ;; | |
10162 | esac | |
10163 | ||
10164 | LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc | |
10165 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10166 | /* end confdefs.h. */ | |
10167 | ||
10168 | int | |
10169 | main () | |
10170 | { | |
10171 | int i; | |
10172 | ; | |
10173 | return 0; | |
10174 | } | |
10175 | _ACEOF | |
10176 | if ac_fn_c_try_link "$LINENO"; then : | |
10177 | ||
10178 | else | |
10179 | gdb_cv_bigtoc= | |
10180 | fi | |
10181 | rm -f core conftest.err conftest.$ac_objext \ | |
10182 | conftest$ac_exeext conftest.$ac_ext | |
10183 | ||
10184 | fi | |
10185 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5 | |
10186 | $as_echo "$gdb_cv_bigtoc" >&6; } | |
10187 | ;; | |
10188 | esac | |
10189 | ||
10190 | # Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets | |
10191 | # used for the tests that follow. We set them back to REAL_CFLAGS and | |
10192 | # REAL_CPPFLAGS later on. | |
10193 | ||
10194 | REAL_CFLAGS="$CFLAGS" | |
10195 | REAL_CPPFLAGS="$CPPFLAGS" | |
10196 | ||
10197 | if test "${HAVE_X11}" = "yes"; then | |
10198 | DEFS="$C_SWITCH_X_SITE $DEFS" | |
10199 | LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE" | |
10200 | LIBS="-lX11 $LIBS" | |
10201 | CFLAGS="$C_SWITCH_X_SITE $CFLAGS" | |
10202 | CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS" | |
10203 | ||
10204 | # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests. | |
10205 | # This is handled by LD_SWITCH_X_SITE_AUX during the real build, | |
10206 | # but it's more convenient here to set LD_RUN_PATH | |
10207 | # since this also works on hosts that don't understand LD_SWITCH_X_SITE_AUX. | |
10208 | if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then | |
10209 | LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH | |
10210 | export LD_RUN_PATH | |
10211 | fi | |
10212 | ||
10213 | if test "${opsys}" = "gnu-linux"; then | |
10214 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether X on GNU/Linux needs -b to link" >&5 | |
10215 | $as_echo_n "checking whether X on GNU/Linux needs -b to link... " >&6; } | |
10216 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10217 | /* end confdefs.h. */ | |
10218 | ||
10219 | int | |
10220 | main () | |
10221 | { | |
10222 | XOpenDisplay ("foo"); | |
10223 | ; | |
10224 | return 0; | |
10225 | } | |
10226 | _ACEOF | |
10227 | if ac_fn_c_try_link "$LINENO"; then : | |
10228 | xlinux_first_failure=no | |
10229 | else | |
10230 | xlinux_first_failure=yes | |
10231 | fi | |
10232 | rm -f core conftest.err conftest.$ac_objext \ | |
10233 | conftest$ac_exeext conftest.$ac_ext | |
10234 | if test "${xlinux_first_failure}" = "yes"; then | |
10235 | OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE" | |
10236 | OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE" | |
10237 | OLD_CPPFLAGS="$CPPFLAGS" | |
10238 | OLD_LIBS="$LIBS" | |
10239 | LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout" | |
10240 | C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout" | |
10241 | CPPFLAGS="$CPPFLAGS -b i486-linuxaout" | |
10242 | LIBS="$LIBS -b i486-linuxaout" | |
10243 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10244 | /* end confdefs.h. */ | |
10245 | ||
10246 | int | |
10247 | main () | |
10248 | { | |
10249 | XOpenDisplay ("foo"); | |
10250 | ; | |
10251 | return 0; | |
10252 | } | |
10253 | _ACEOF | |
10254 | if ac_fn_c_try_link "$LINENO"; then : | |
10255 | xlinux_second_failure=no | |
10256 | else | |
10257 | xlinux_second_failure=yes | |
10258 | fi | |
10259 | rm -f core conftest.err conftest.$ac_objext \ | |
10260 | conftest$ac_exeext conftest.$ac_ext | |
10261 | if test "${xlinux_second_failure}" = "yes"; then | |
10262 | # If we get the same failure with -b, there is no use adding -b. | |
10263 | # So take it out. This plays safe. | |
10264 | LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE" | |
10265 | C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE" | |
10266 | CPPFLAGS="$OLD_CPPFLAGS" | |
10267 | LIBS="$OLD_LIBS" | |
10268 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
10269 | $as_echo "no" >&6; } | |
10270 | else | |
10271 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
10272 | $as_echo "yes" >&6; } | |
10273 | fi | |
10274 | else | |
10275 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
10276 | $as_echo "no" >&6; } | |
10277 | fi | |
10278 | fi | |
10279 | ||
10280 | # Reportedly, some broken Solaris systems have XKBlib.h but are missing | |
10281 | # header files included from there. | |
10282 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Xkb" >&5 | |
10283 | $as_echo_n "checking for Xkb... " >&6; } | |
10284 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10285 | /* end confdefs.h. */ | |
10286 | #include <X11/Xlib.h> | |
10287 | #include <X11/XKBlib.h> | |
10288 | int | |
10289 | main () | |
10290 | { | |
10291 | XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd); | |
10292 | ; | |
10293 | return 0; | |
10294 | } | |
10295 | _ACEOF | |
10296 | if ac_fn_c_try_link "$LINENO"; then : | |
10297 | emacs_xkb=yes | |
10298 | else | |
10299 | emacs_xkb=no | |
10300 | fi | |
10301 | rm -f core conftest.err conftest.$ac_objext \ | |
10302 | conftest$ac_exeext conftest.$ac_ext | |
10303 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_xkb" >&5 | |
10304 | $as_echo "$emacs_xkb" >&6; } | |
10305 | if test $emacs_xkb = yes; then | |
10306 | ||
10307 | $as_echo "#define HAVE_XKBGETKEYBOARD 1" >>confdefs.h | |
10308 | ||
10309 | fi | |
10310 | ||
10311 | for ac_func in XrmSetDatabase XScreenResourceString \ | |
10312 | XScreenNumberOfScreen XSetWMProtocols | |
10313 | do : | |
10314 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
10315 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
5f64f7bd GM |
10316 | eval as_val=\$$as_ac_var |
10317 | if test "x$as_val" = x""yes; then : | |
067d23c9 KY |
10318 | cat >>confdefs.h <<_ACEOF |
10319 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
10320 | _ACEOF | |
10321 | ||
10322 | fi | |
10323 | done | |
10324 | ||
10325 | fi | |
10326 | ||
10327 | if test "${window_system}" = "x11"; then | |
10328 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 version 6" >&5 | |
10329 | $as_echo_n "checking X11 version 6... " >&6; } | |
5f64f7bd | 10330 | if test "${emacs_cv_x11_version_6+set}" = set; then : |
067d23c9 KY |
10331 | $as_echo_n "(cached) " >&6 |
10332 | else | |
10333 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10334 | /* end confdefs.h. */ | |
10335 | #include <X11/Xlib.h> | |
10336 | int | |
10337 | main () | |
10338 | { | |
10339 | #if XlibSpecificationRelease < 6 | |
10340 | fail; | |
10341 | #endif | |
10342 | ||
10343 | ; | |
10344 | return 0; | |
10345 | } | |
10346 | _ACEOF | |
10347 | if ac_fn_c_try_link "$LINENO"; then : | |
10348 | emacs_cv_x11_version_6=yes | |
10349 | else | |
10350 | emacs_cv_x11_version_6=no | |
10351 | fi | |
10352 | rm -f core conftest.err conftest.$ac_objext \ | |
10353 | conftest$ac_exeext conftest.$ac_ext | |
10354 | fi | |
10355 | ||
10356 | if test $emacs_cv_x11_version_6 = yes; then | |
10357 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5 | |
10358 | $as_echo "6 or newer" >&6; } | |
10359 | ||
10360 | $as_echo "#define HAVE_X11R6 1" >>confdefs.h | |
10361 | ||
10362 | ||
10363 | $as_echo "#define HAVE_X_I18N 1" >>confdefs.h | |
10364 | ||
10365 | ## inoue@ainet.or.jp says Solaris has a bug related to X11R6-style | |
10366 | ## XIM support. | |
10367 | case "$opsys" in | |
10368 | sol2-*) : ;; | |
10369 | *) | |
10370 | $as_echo "#define HAVE_X11R6_XIM 1" >>confdefs.h | |
10371 | ||
10372 | ;; | |
10373 | esac | |
10374 | else | |
10375 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5 | |
10376 | $as_echo "before 6" >&6; } | |
10377 | fi | |
10378 | fi | |
10379 | ||
10380 | ||
10381 | ### Use -lrsvg-2 if available, unless `--with-rsvg=no' is specified. | |
10382 | HAVE_RSVG=no | |
096a6052 | 10383 | if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes"; then |
067d23c9 KY |
10384 | if test "${with_rsvg}" != "no"; then |
10385 | RSVG_REQUIRED=2.11.0 | |
10386 | RSVG_MODULE="librsvg-2.0 >= $RSVG_REQUIRED" | |
10387 | ||
10388 | ||
10389 | succeeded=no | |
10390 | ||
10391 | # Extract the first word of "pkg-config", so it can be a program name with args. | |
10392 | set dummy pkg-config; ac_word=$2 | |
10393 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
10394 | $as_echo_n "checking for $ac_word... " >&6; } | |
5f64f7bd | 10395 | if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : |
067d23c9 KY |
10396 | $as_echo_n "(cached) " >&6 |
10397 | else | |
10398 | case $PKG_CONFIG in | |
10399 | [\\/]* | ?:[\\/]*) | |
10400 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
10401 | ;; | |
10402 | *) | |
10403 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
10404 | for as_dir in $PATH | |
10405 | do | |
10406 | IFS=$as_save_IFS | |
10407 | test -z "$as_dir" && as_dir=. | |
10408 | for ac_exec_ext in '' $ac_executable_extensions; do | |
10409 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
10410 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
10411 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
10412 | break 2 | |
10413 | fi | |
10414 | done | |
10415 | done | |
10416 | IFS=$as_save_IFS | |
10417 | ||
10418 | test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" | |
10419 | ;; | |
10420 | esac | |
10421 | fi | |
10422 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG | |
10423 | if test -n "$PKG_CONFIG"; then | |
10424 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
10425 | $as_echo "$PKG_CONFIG" >&6; } | |
10426 | else | |
10427 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
10428 | $as_echo "no" >&6; } | |
10429 | fi | |
10430 | ||
10431 | ||
10432 | ||
10433 | if test "$PKG_CONFIG" = "no" ; then | |
10434 | : | |
10435 | else | |
10436 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
10437 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
10438 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $RSVG_MODULE" >&5 | |
10439 | $as_echo_n "checking for $RSVG_MODULE... " >&6; } | |
10440 | ||
10441 | if $PKG_CONFIG --exists "$RSVG_MODULE" 2>&5; then | |
10442 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
10443 | $as_echo "yes" >&6; } | |
10444 | succeeded=yes | |
10445 | ||
10446 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking RSVG_CFLAGS" >&5 | |
10447 | $as_echo_n "checking RSVG_CFLAGS... " >&6; } | |
10448 | RSVG_CFLAGS=`$PKG_CONFIG --cflags "$RSVG_MODULE"|sed -e 's,///*,/,g'` | |
10449 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RSVG_CFLAGS" >&5 | |
10450 | $as_echo "$RSVG_CFLAGS" >&6; } | |
10451 | ||
10452 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking RSVG_LIBS" >&5 | |
10453 | $as_echo_n "checking RSVG_LIBS... " >&6; } | |
10454 | RSVG_LIBS=`$PKG_CONFIG --libs "$RSVG_MODULE"|sed -e 's,///*,/,g'` | |
10455 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RSVG_LIBS" >&5 | |
10456 | $as_echo "$RSVG_LIBS" >&6; } | |
10457 | else | |
10458 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
10459 | $as_echo "no" >&6; } | |
10460 | RSVG_CFLAGS="" | |
10461 | RSVG_LIBS="" | |
10462 | ## If we have a custom action on failure, don't print errors, but | |
10463 | ## do set a variable so people can do so. | |
10464 | RSVG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$RSVG_MODULE"` | |
10465 | ||
10466 | fi | |
10467 | ||
10468 | ||
10469 | ||
10470 | else | |
10471 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
10472 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
10473 | fi | |
10474 | fi | |
10475 | ||
10476 | if test $succeeded = yes; then | |
10477 | HAVE_RSVG=yes | |
10478 | else | |
10479 | : | |
10480 | fi | |
10481 | ||
10482 | ||
10483 | ||
10484 | ||
10485 | if test $HAVE_RSVG = yes; then | |
10486 | ||
10487 | $as_echo "#define HAVE_RSVG 1" >>confdefs.h | |
10488 | ||
10489 | CFLAGS="$CFLAGS $RSVG_CFLAGS" | |
10490 | LIBS="$RSVG_LIBS $LIBS" | |
10491 | fi | |
10492 | fi | |
10493 | fi | |
10494 | ||
10495 | HAVE_IMAGEMAGICK=no | |
10496 | if test "${HAVE_X11}" = "yes"; then | |
10497 | if test "${with_imagemagick}" != "no"; then | |
718ad21a GM |
10498 | ## 6.2.8 is the earliest version known to work, but earlier versions |
10499 | ## might work - let us know if you find one. | |
10500 | ## 6.0.7 does not work. See bug#7955. | |
10501 | IMAGEMAGICK_MODULE="Wand >= 6.2.8" | |
067d23c9 KY |
10502 | |
10503 | succeeded=no | |
10504 | ||
10505 | # Extract the first word of "pkg-config", so it can be a program name with args. | |
10506 | set dummy pkg-config; ac_word=$2 | |
10507 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
10508 | $as_echo_n "checking for $ac_word... " >&6; } | |
5f64f7bd | 10509 | if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : |
067d23c9 KY |
10510 | $as_echo_n "(cached) " >&6 |
10511 | else | |
10512 | case $PKG_CONFIG in | |
10513 | [\\/]* | ?:[\\/]*) | |
10514 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
10515 | ;; | |
10516 | *) | |
10517 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
10518 | for as_dir in $PATH | |
10519 | do | |
10520 | IFS=$as_save_IFS | |
10521 | test -z "$as_dir" && as_dir=. | |
10522 | for ac_exec_ext in '' $ac_executable_extensions; do | |
10523 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
10524 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
10525 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
10526 | break 2 | |
10527 | fi | |
10528 | done | |
10529 | done | |
10530 | IFS=$as_save_IFS | |
10531 | ||
10532 | test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" | |
10533 | ;; | |
10534 | esac | |
10535 | fi | |
10536 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG | |
10537 | if test -n "$PKG_CONFIG"; then | |
10538 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
10539 | $as_echo "$PKG_CONFIG" >&6; } | |
10540 | else | |
10541 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
10542 | $as_echo "no" >&6; } | |
10543 | fi | |
10544 | ||
10545 | ||
10546 | ||
10547 | if test "$PKG_CONFIG" = "no" ; then | |
10548 | : | |
10549 | else | |
10550 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
10551 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
10552 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $IMAGEMAGICK_MODULE" >&5 | |
10553 | $as_echo_n "checking for $IMAGEMAGICK_MODULE... " >&6; } | |
10554 | ||
10555 | if $PKG_CONFIG --exists "$IMAGEMAGICK_MODULE" 2>&5; then | |
10556 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
10557 | $as_echo "yes" >&6; } | |
10558 | succeeded=yes | |
10559 | ||
10560 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking IMAGEMAGICK_CFLAGS" >&5 | |
10561 | $as_echo_n "checking IMAGEMAGICK_CFLAGS... " >&6; } | |
10562 | IMAGEMAGICK_CFLAGS=`$PKG_CONFIG --cflags "$IMAGEMAGICK_MODULE"|sed -e 's,///*,/,g'` | |
10563 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $IMAGEMAGICK_CFLAGS" >&5 | |
10564 | $as_echo "$IMAGEMAGICK_CFLAGS" >&6; } | |
10565 | ||
10566 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking IMAGEMAGICK_LIBS" >&5 | |
10567 | $as_echo_n "checking IMAGEMAGICK_LIBS... " >&6; } | |
10568 | IMAGEMAGICK_LIBS=`$PKG_CONFIG --libs "$IMAGEMAGICK_MODULE"|sed -e 's,///*,/,g'` | |
10569 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $IMAGEMAGICK_LIBS" >&5 | |
10570 | $as_echo "$IMAGEMAGICK_LIBS" >&6; } | |
10571 | else | |
10572 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
10573 | $as_echo "no" >&6; } | |
10574 | IMAGEMAGICK_CFLAGS="" | |
10575 | IMAGEMAGICK_LIBS="" | |
10576 | ## If we have a custom action on failure, don't print errors, but | |
10577 | ## do set a variable so people can do so. | |
10578 | IMAGEMAGICK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$IMAGEMAGICK_MODULE"` | |
10579 | ||
10580 | fi | |
10581 | ||
10582 | ||
10583 | ||
10584 | else | |
10585 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
10586 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
10587 | fi | |
10588 | fi | |
10589 | ||
10590 | if test $succeeded = yes; then | |
10591 | HAVE_IMAGEMAGICK=yes | |
10592 | else | |
10593 | : | |
10594 | fi | |
10595 | ||
10596 | ||
10597 | ||
10598 | ||
10599 | if test $HAVE_IMAGEMAGICK = yes; then | |
10600 | ||
10601 | $as_echo "#define HAVE_IMAGEMAGICK 1" >>confdefs.h | |
10602 | ||
10603 | CFLAGS="$CFLAGS $IMAGEMAGICK_CFLAGS" | |
10604 | LIBS="$IMAGEMAGICK_LIBS $LIBS" | |
10605 | for ac_func in MagickExportImagePixels | |
10606 | do : | |
10607 | ac_fn_c_check_func "$LINENO" "MagickExportImagePixels" "ac_cv_func_MagickExportImagePixels" | |
5f64f7bd | 10608 | if test "x$ac_cv_func_MagickExportImagePixels" = x""yes; then : |
067d23c9 KY |
10609 | cat >>confdefs.h <<_ACEOF |
10610 | #define HAVE_MAGICKEXPORTIMAGEPIXELS 1 | |
10611 | _ACEOF | |
10612 | ||
10613 | fi | |
10614 | done | |
10615 | ||
10616 | fi | |
10617 | fi | |
10618 | fi | |
10619 | ||
10620 | ||
10621 | HAVE_GTK=no | |
571e1872 | 10622 | GTK_OBJ= |
067d23c9 | 10623 | if test "${with_gtk3}" = "yes"; then |
0afb4571 J |
10624 | GLIB_REQUIRED=2.28 |
10625 | GTK_REQUIRED=3.0 | |
067d23c9 KY |
10626 | GTK_MODULES="gtk+-3.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED" |
10627 | ||
10628 | ||
10629 | succeeded=no | |
10630 | ||
10631 | # Extract the first word of "pkg-config", so it can be a program name with args. | |
10632 | set dummy pkg-config; ac_word=$2 | |
10633 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
10634 | $as_echo_n "checking for $ac_word... " >&6; } | |
5f64f7bd | 10635 | if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : |
067d23c9 KY |
10636 | $as_echo_n "(cached) " >&6 |
10637 | else | |
10638 | case $PKG_CONFIG in | |
10639 | [\\/]* | ?:[\\/]*) | |
10640 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
10641 | ;; | |
10642 | *) | |
10643 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
10644 | for as_dir in $PATH | |
10645 | do | |
10646 | IFS=$as_save_IFS | |
10647 | test -z "$as_dir" && as_dir=. | |
10648 | for ac_exec_ext in '' $ac_executable_extensions; do | |
10649 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
10650 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
10651 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
10652 | break 2 | |
10653 | fi | |
10654 | done | |
10655 | done | |
10656 | IFS=$as_save_IFS | |
10657 | ||
10658 | test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" | |
10659 | ;; | |
10660 | esac | |
10661 | fi | |
10662 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG | |
10663 | if test -n "$PKG_CONFIG"; then | |
10664 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
10665 | $as_echo "$PKG_CONFIG" >&6; } | |
10666 | else | |
10667 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
10668 | $as_echo "no" >&6; } | |
10669 | fi | |
10670 | ||
10671 | ||
10672 | ||
10673 | if test "$PKG_CONFIG" = "no" ; then | |
10674 | pkg_check_gtk=no | |
10675 | else | |
10676 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
10677 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
10678 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTK_MODULES" >&5 | |
10679 | $as_echo_n "checking for $GTK_MODULES... " >&6; } | |
10680 | ||
10681 | if $PKG_CONFIG --exists "$GTK_MODULES" 2>&5; then | |
10682 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
10683 | $as_echo "yes" >&6; } | |
10684 | succeeded=yes | |
10685 | ||
10686 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking GTK_CFLAGS" >&5 | |
10687 | $as_echo_n "checking GTK_CFLAGS... " >&6; } | |
10688 | GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES"|sed -e 's,///*,/,g'` | |
10689 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_CFLAGS" >&5 | |
10690 | $as_echo "$GTK_CFLAGS" >&6; } | |
10691 | ||
10692 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking GTK_LIBS" >&5 | |
10693 | $as_echo_n "checking GTK_LIBS... " >&6; } | |
10694 | GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES"|sed -e 's,///*,/,g'` | |
10695 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_LIBS" >&5 | |
10696 | $as_echo "$GTK_LIBS" >&6; } | |
10697 | else | |
10698 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
10699 | $as_echo "no" >&6; } | |
10700 | GTK_CFLAGS="" | |
10701 | GTK_LIBS="" | |
10702 | ## If we have a custom action on failure, don't print errors, but | |
10703 | ## do set a variable so people can do so. | |
10704 | GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"` | |
10705 | ||
10706 | fi | |
10707 | ||
10708 | ||
10709 | ||
10710 | else | |
10711 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
10712 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
10713 | fi | |
10714 | fi | |
10715 | ||
10716 | if test $succeeded = yes; then | |
10717 | pkg_check_gtk=yes | |
10718 | else | |
10719 | pkg_check_gtk=no | |
10720 | fi | |
10721 | ||
10722 | if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then | |
5f64f7bd | 10723 | as_fn_error "$GTK_PKG_ERRORS" "$LINENO" 5 |
067d23c9 | 10724 | fi |
0afb4571 J |
10725 | |
10726 | $as_echo "#define HAVE_GTK3 1" >>confdefs.h | |
10727 | ||
571e1872 | 10728 | GTK_OBJ=emacsgtkfixed.o |
067d23c9 KY |
10729 | fi |
10730 | ||
10731 | if test "$pkg_check_gtk" != "yes"; then | |
10732 | HAVE_GTK=no | |
10733 | if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "maybe"; then | |
10734 | GLIB_REQUIRED=2.6 | |
10735 | GTK_REQUIRED=2.6 | |
10736 | GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED" | |
10737 | ||
10738 | ||
10739 | succeeded=no | |
10740 | ||
10741 | # Extract the first word of "pkg-config", so it can be a program name with args. | |
10742 | set dummy pkg-config; ac_word=$2 | |
10743 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
10744 | $as_echo_n "checking for $ac_word... " >&6; } | |
5f64f7bd | 10745 | if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : |
067d23c9 KY |
10746 | $as_echo_n "(cached) " >&6 |
10747 | else | |
10748 | case $PKG_CONFIG in | |
10749 | [\\/]* | ?:[\\/]*) | |
10750 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
10751 | ;; | |
10752 | *) | |
10753 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
10754 | for as_dir in $PATH | |
10755 | do | |
10756 | IFS=$as_save_IFS | |
10757 | test -z "$as_dir" && as_dir=. | |
10758 | for ac_exec_ext in '' $ac_executable_extensions; do | |
10759 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
10760 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
10761 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
10762 | break 2 | |
10763 | fi | |
10764 | done | |
10765 | done | |
10766 | IFS=$as_save_IFS | |
10767 | ||
10768 | test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" | |
10769 | ;; | |
10770 | esac | |
10771 | fi | |
10772 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG | |
10773 | if test -n "$PKG_CONFIG"; then | |
10774 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
10775 | $as_echo "$PKG_CONFIG" >&6; } | |
10776 | else | |
10777 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
10778 | $as_echo "no" >&6; } | |
10779 | fi | |
10780 | ||
10781 | ||
10782 | ||
10783 | if test "$PKG_CONFIG" = "no" ; then | |
10784 | pkg_check_gtk=no | |
10785 | else | |
10786 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
10787 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
10788 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTK_MODULES" >&5 | |
10789 | $as_echo_n "checking for $GTK_MODULES... " >&6; } | |
10790 | ||
10791 | if $PKG_CONFIG --exists "$GTK_MODULES" 2>&5; then | |
10792 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
10793 | $as_echo "yes" >&6; } | |
10794 | succeeded=yes | |
10795 | ||
10796 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking GTK_CFLAGS" >&5 | |
10797 | $as_echo_n "checking GTK_CFLAGS... " >&6; } | |
10798 | GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES"|sed -e 's,///*,/,g'` | |
10799 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_CFLAGS" >&5 | |
10800 | $as_echo "$GTK_CFLAGS" >&6; } | |
10801 | ||
10802 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking GTK_LIBS" >&5 | |
10803 | $as_echo_n "checking GTK_LIBS... " >&6; } | |
10804 | GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES"|sed -e 's,///*,/,g'` | |
10805 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_LIBS" >&5 | |
10806 | $as_echo "$GTK_LIBS" >&6; } | |
10807 | else | |
10808 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
10809 | $as_echo "no" >&6; } | |
10810 | GTK_CFLAGS="" | |
10811 | GTK_LIBS="" | |
10812 | ## If we have a custom action on failure, don't print errors, but | |
10813 | ## do set a variable so people can do so. | |
10814 | GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"` | |
10815 | ||
10816 | fi | |
10817 | ||
10818 | ||
10819 | ||
10820 | else | |
10821 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
10822 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
10823 | fi | |
10824 | fi | |
10825 | ||
10826 | if test $succeeded = yes; then | |
10827 | pkg_check_gtk=yes | |
10828 | else | |
10829 | pkg_check_gtk=no | |
10830 | fi | |
10831 | ||
10832 | if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then | |
5f64f7bd | 10833 | as_fn_error "$GTK_PKG_ERRORS" "$LINENO" 5 |
067d23c9 KY |
10834 | fi |
10835 | fi | |
10836 | fi | |
10837 | ||
067d23c9 KY |
10838 | if test x"$pkg_check_gtk" = xyes; then |
10839 | ||
10840 | ||
10841 | ||
10842 | C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS" | |
10843 | CFLAGS="$CFLAGS $GTK_CFLAGS" | |
10844 | LIBS="$GTK_LIBS $LIBS" | |
10845 | GTK_COMPILES=no | |
10846 | for ac_func in gtk_main | |
10847 | do : | |
10848 | ac_fn_c_check_func "$LINENO" "gtk_main" "ac_cv_func_gtk_main" | |
5f64f7bd | 10849 | if test "x$ac_cv_func_gtk_main" = x""yes; then : |
067d23c9 KY |
10850 | cat >>confdefs.h <<_ACEOF |
10851 | #define HAVE_GTK_MAIN 1 | |
10852 | _ACEOF | |
10853 | GTK_COMPILES=yes | |
10854 | fi | |
10855 | done | |
10856 | ||
10857 | if test "${GTK_COMPILES}" != "yes"; then | |
10858 | if test "$USE_X_TOOLKIT" != "maybe"; then | |
5f64f7bd | 10859 | as_fn_error "Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" "$LINENO" 5; |
067d23c9 KY |
10860 | fi |
10861 | else | |
10862 | HAVE_GTK=yes | |
10863 | ||
10864 | $as_echo "#define USE_GTK 1" >>confdefs.h | |
10865 | ||
571e1872 | 10866 | GTK_OBJ="gtkutil.o $GTK_OBJ" |
067d23c9 KY |
10867 | USE_X_TOOLKIT=none |
10868 | if $PKG_CONFIG --atleast-version=2.10 gtk+-2.0; then | |
10869 | : | |
10870 | else | |
10871 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your version of Gtk+ will have problems with | |
10872 | closing open displays. This is no problem if you just use | |
10873 | one display, but if you use more than one and close one of them | |
10874 | Emacs may crash." >&5 | |
10875 | $as_echo "$as_me: WARNING: Your version of Gtk+ will have problems with | |
10876 | closing open displays. This is no problem if you just use | |
10877 | one display, but if you use more than one and close one of them | |
10878 | Emacs may crash." >&2;} | |
10879 | sleep 3 | |
10880 | fi | |
10881 | fi | |
10882 | ||
10883 | fi | |
10884 | ||
10885 | ||
10886 | ||
10887 | if test "${HAVE_GTK}" = "yes"; then | |
10888 | ||
10889 | if test "$with_toolkit_scroll_bars" != no; then | |
10890 | with_toolkit_scroll_bars=yes | |
10891 | fi | |
10892 | ||
10893 | HAVE_GTK_FILE_SELECTION=no | |
10894 | ac_fn_c_check_decl "$LINENO" "GTK_TYPE_FILE_SELECTION" "ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" "$ac_includes_default | |
10895 | #include <gtk/gtk.h> | |
10896 | " | |
5f64f7bd | 10897 | if test "x$ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" = x""yes; then : |
067d23c9 KY |
10898 | HAVE_GTK_FILE_SELECTION=yes |
10899 | else | |
10900 | HAVE_GTK_FILE_SELECTION=no | |
10901 | fi | |
10902 | ||
10903 | if test "$HAVE_GTK_FILE_SELECTION" = yes; then | |
10904 | for ac_func in gtk_file_selection_new | |
10905 | do : | |
10906 | ac_fn_c_check_func "$LINENO" "gtk_file_selection_new" "ac_cv_func_gtk_file_selection_new" | |
5f64f7bd | 10907 | if test "x$ac_cv_func_gtk_file_selection_new" = x""yes; then : |
067d23c9 KY |
10908 | cat >>confdefs.h <<_ACEOF |
10909 | #define HAVE_GTK_FILE_SELECTION_NEW 1 | |
10910 | _ACEOF | |
10911 | ||
10912 | fi | |
10913 | done | |
10914 | ||
10915 | fi | |
10916 | ||
067d23c9 KY |
10917 | |
10918 | for ac_func in gtk_widget_get_window gtk_widget_set_has_window \ | |
10919 | gtk_dialog_get_action_area gtk_widget_get_sensitive \ | |
10920 | gtk_widget_get_mapped gtk_adjustment_get_page_size \ | |
10921 | gtk_orientable_set_orientation | |
10922 | do : | |
10923 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
10924 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
5f64f7bd GM |
10925 | eval as_val=\$$as_ac_var |
10926 | if test "x$as_val" = x""yes; then : | |
067d23c9 KY |
10927 | cat >>confdefs.h <<_ACEOF |
10928 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
10929 | _ACEOF | |
10930 | ||
10931 | fi | |
10932 | done | |
10933 | ||
10934 | ||
10935 | fi | |
10936 | ||
10937 | HAVE_DBUS=no | |
10938 | DBUS_OBJ= | |
10939 | if test "${with_dbus}" = "yes"; then | |
10940 | ||
10941 | succeeded=no | |
10942 | ||
10943 | # Extract the first word of "pkg-config", so it can be a program name with args. | |
10944 | set dummy pkg-config; ac_word=$2 | |
10945 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
10946 | $as_echo_n "checking for $ac_word... " >&6; } | |
5f64f7bd | 10947 | if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : |
067d23c9 KY |
10948 | $as_echo_n "(cached) " >&6 |
10949 | else | |
10950 | case $PKG_CONFIG in | |
10951 | [\\/]* | ?:[\\/]*) | |
10952 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
10953 | ;; | |
10954 | *) | |
10955 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
10956 | for as_dir in $PATH | |
10957 | do | |
10958 | IFS=$as_save_IFS | |
10959 | test -z "$as_dir" && as_dir=. | |
10960 | for ac_exec_ext in '' $ac_executable_extensions; do | |
10961 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
10962 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
10963 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
10964 | break 2 | |
10965 | fi | |
10966 | done | |
10967 | done | |
10968 | IFS=$as_save_IFS | |
10969 | ||
10970 | test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" | |
10971 | ;; | |
10972 | esac | |
10973 | fi | |
10974 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG | |
10975 | if test -n "$PKG_CONFIG"; then | |
10976 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
10977 | $as_echo "$PKG_CONFIG" >&6; } | |
10978 | else | |
10979 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
10980 | $as_echo "no" >&6; } | |
10981 | fi | |
10982 | ||
10983 | ||
10984 | ||
10985 | if test "$PKG_CONFIG" = "no" ; then | |
10986 | HAVE_DBUS=no | |
10987 | else | |
10988 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
10989 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
10990 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbus-1 >= 1.0" >&5 | |
10991 | $as_echo_n "checking for dbus-1 >= 1.0... " >&6; } | |
10992 | ||
10993 | if $PKG_CONFIG --exists "dbus-1 >= 1.0" 2>&5; then | |
10994 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
10995 | $as_echo "yes" >&6; } | |
10996 | succeeded=yes | |
10997 | ||
10998 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking DBUS_CFLAGS" >&5 | |
10999 | $as_echo_n "checking DBUS_CFLAGS... " >&6; } | |
11000 | DBUS_CFLAGS=`$PKG_CONFIG --cflags "dbus-1 >= 1.0"|sed -e 's,///*,/,g'` | |
11001 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBUS_CFLAGS" >&5 | |
11002 | $as_echo "$DBUS_CFLAGS" >&6; } | |
11003 | ||
11004 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking DBUS_LIBS" >&5 | |
11005 | $as_echo_n "checking DBUS_LIBS... " >&6; } | |
11006 | DBUS_LIBS=`$PKG_CONFIG --libs "dbus-1 >= 1.0"|sed -e 's,///*,/,g'` | |
11007 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBUS_LIBS" >&5 | |
11008 | $as_echo "$DBUS_LIBS" >&6; } | |
11009 | else | |
11010 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
11011 | $as_echo "no" >&6; } | |
11012 | DBUS_CFLAGS="" | |
11013 | DBUS_LIBS="" | |
11014 | ## If we have a custom action on failure, don't print errors, but | |
11015 | ## do set a variable so people can do so. | |
11016 | DBUS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "dbus-1 >= 1.0"` | |
11017 | ||
11018 | fi | |
11019 | ||
11020 | ||
11021 | ||
11022 | else | |
11023 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
11024 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
11025 | fi | |
11026 | fi | |
11027 | ||
11028 | if test $succeeded = yes; then | |
11029 | HAVE_DBUS=yes | |
11030 | else | |
11031 | HAVE_DBUS=no | |
11032 | fi | |
11033 | ||
11034 | if test "$HAVE_DBUS" = yes; then | |
11035 | LIBS="$LIBS $DBUS_LIBS" | |
11036 | ||
11037 | $as_echo "#define HAVE_DBUS 1" >>confdefs.h | |
11038 | ||
11039 | for ac_func in dbus_watch_get_unix_fd | |
11040 | do : | |
11041 | ac_fn_c_check_func "$LINENO" "dbus_watch_get_unix_fd" "ac_cv_func_dbus_watch_get_unix_fd" | |
5f64f7bd | 11042 | if test "x$ac_cv_func_dbus_watch_get_unix_fd" = x""yes; then : |
067d23c9 KY |
11043 | cat >>confdefs.h <<_ACEOF |
11044 | #define HAVE_DBUS_WATCH_GET_UNIX_FD 1 | |
11045 | _ACEOF | |
11046 | ||
11047 | fi | |
11048 | done | |
11049 | ||
11050 | DBUS_OBJ=dbusbind.o | |
11051 | fi | |
11052 | fi | |
11053 | ||
11054 | ||
f527bd02 GM |
11055 | HAVE_GSETTINGS=no |
11056 | if test "${HAVE_X11}" = "yes" && test "${with_gsettings}" = "yes"; then | |
11057 | ||
11058 | succeeded=no | |
11059 | ||
11060 | # Extract the first word of "pkg-config", so it can be a program name with args. | |
11061 | set dummy pkg-config; ac_word=$2 | |
11062 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
11063 | $as_echo_n "checking for $ac_word... " >&6; } | |
11064 | if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : | |
11065 | $as_echo_n "(cached) " >&6 | |
11066 | else | |
11067 | case $PKG_CONFIG in | |
11068 | [\\/]* | ?:[\\/]*) | |
11069 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
11070 | ;; | |
11071 | *) | |
11072 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
11073 | for as_dir in $PATH | |
11074 | do | |
11075 | IFS=$as_save_IFS | |
11076 | test -z "$as_dir" && as_dir=. | |
11077 | for ac_exec_ext in '' $ac_executable_extensions; do | |
11078 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
11079 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
11080 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
11081 | break 2 | |
11082 | fi | |
11083 | done | |
11084 | done | |
11085 | IFS=$as_save_IFS | |
11086 | ||
11087 | test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" | |
11088 | ;; | |
11089 | esac | |
11090 | fi | |
11091 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG | |
11092 | if test -n "$PKG_CONFIG"; then | |
11093 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
11094 | $as_echo "$PKG_CONFIG" >&6; } | |
11095 | else | |
11096 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
11097 | $as_echo "no" >&6; } | |
11098 | fi | |
11099 | ||
11100 | ||
11101 | ||
11102 | if test "$PKG_CONFIG" = "no" ; then | |
11103 | HAVE_GSETTINGS=no | |
11104 | else | |
11105 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
11106 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
85c1ab0b GM |
11107 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gio-2.0 >= 2.26" >&5 |
11108 | $as_echo_n "checking for gio-2.0 >= 2.26... " >&6; } | |
f527bd02 | 11109 | |
85c1ab0b | 11110 | if $PKG_CONFIG --exists "gio-2.0 >= 2.26" 2>&5; then |
f527bd02 GM |
11111 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
11112 | $as_echo "yes" >&6; } | |
11113 | succeeded=yes | |
11114 | ||
11115 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking GSETTINGS_CFLAGS" >&5 | |
11116 | $as_echo_n "checking GSETTINGS_CFLAGS... " >&6; } | |
85c1ab0b | 11117 | GSETTINGS_CFLAGS=`$PKG_CONFIG --cflags "gio-2.0 >= 2.26"|sed -e 's,///*,/,g'` |
f527bd02 GM |
11118 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GSETTINGS_CFLAGS" >&5 |
11119 | $as_echo "$GSETTINGS_CFLAGS" >&6; } | |
11120 | ||
11121 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking GSETTINGS_LIBS" >&5 | |
11122 | $as_echo_n "checking GSETTINGS_LIBS... " >&6; } | |
85c1ab0b | 11123 | GSETTINGS_LIBS=`$PKG_CONFIG --libs "gio-2.0 >= 2.26"|sed -e 's,///*,/,g'` |
f527bd02 GM |
11124 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GSETTINGS_LIBS" >&5 |
11125 | $as_echo "$GSETTINGS_LIBS" >&6; } | |
11126 | else | |
11127 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
11128 | $as_echo "no" >&6; } | |
11129 | GSETTINGS_CFLAGS="" | |
11130 | GSETTINGS_LIBS="" | |
11131 | ## If we have a custom action on failure, don't print errors, but | |
11132 | ## do set a variable so people can do so. | |
85c1ab0b | 11133 | GSETTINGS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gio-2.0 >= 2.26"` |
f527bd02 GM |
11134 | |
11135 | fi | |
11136 | ||
11137 | ||
11138 | ||
11139 | else | |
11140 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
11141 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
11142 | fi | |
11143 | fi | |
11144 | ||
11145 | if test $succeeded = yes; then | |
11146 | HAVE_GSETTINGS=yes | |
11147 | else | |
11148 | HAVE_GSETTINGS=no | |
11149 | fi | |
11150 | ||
11151 | if test "$HAVE_GSETTINGS" = "yes"; then | |
11152 | ||
11153 | $as_echo "#define HAVE_GSETTINGS 1" >>confdefs.h | |
11154 | ||
11155 | SETTINGS_CFLAGS="$GSETTINGS_CFLAGS" | |
11156 | SETTINGS_LIBS="$GSETTINGS_LIBS" | |
11157 | fi | |
11158 | fi | |
11159 | ||
067d23c9 | 11160 | HAVE_GCONF=no |
17410582 | 11161 | if test "${HAVE_X11}" = "yes" && test "${with_gconf}" = "yes"; then |
067d23c9 KY |
11162 | |
11163 | succeeded=no | |
11164 | ||
11165 | # Extract the first word of "pkg-config", so it can be a program name with args. | |
11166 | set dummy pkg-config; ac_word=$2 | |
11167 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
11168 | $as_echo_n "checking for $ac_word... " >&6; } | |
5f64f7bd | 11169 | if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : |
067d23c9 KY |
11170 | $as_echo_n "(cached) " >&6 |
11171 | else | |
11172 | case $PKG_CONFIG in | |
11173 | [\\/]* | ?:[\\/]*) | |
11174 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
11175 | ;; | |
11176 | *) | |
11177 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
11178 | for as_dir in $PATH | |
11179 | do | |
11180 | IFS=$as_save_IFS | |
11181 | test -z "$as_dir" && as_dir=. | |
11182 | for ac_exec_ext in '' $ac_executable_extensions; do | |
11183 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
11184 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
11185 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
11186 | break 2 | |
11187 | fi | |
11188 | done | |
11189 | done | |
11190 | IFS=$as_save_IFS | |
11191 | ||
11192 | test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" | |
11193 | ;; | |
11194 | esac | |
11195 | fi | |
11196 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG | |
11197 | if test -n "$PKG_CONFIG"; then | |
11198 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
11199 | $as_echo "$PKG_CONFIG" >&6; } | |
11200 | else | |
11201 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
11202 | $as_echo "no" >&6; } | |
11203 | fi | |
11204 | ||
11205 | ||
11206 | ||
11207 | if test "$PKG_CONFIG" = "no" ; then | |
11208 | HAVE_GCONF=no | |
11209 | else | |
11210 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
11211 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
11212 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gconf-2.0 >= 2.13" >&5 | |
11213 | $as_echo_n "checking for gconf-2.0 >= 2.13... " >&6; } | |
11214 | ||
11215 | if $PKG_CONFIG --exists "gconf-2.0 >= 2.13" 2>&5; then | |
11216 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
11217 | $as_echo "yes" >&6; } | |
11218 | succeeded=yes | |
11219 | ||
11220 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking GCONF_CFLAGS" >&5 | |
11221 | $as_echo_n "checking GCONF_CFLAGS... " >&6; } | |
11222 | GCONF_CFLAGS=`$PKG_CONFIG --cflags "gconf-2.0 >= 2.13"|sed -e 's,///*,/,g'` | |
11223 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCONF_CFLAGS" >&5 | |
11224 | $as_echo "$GCONF_CFLAGS" >&6; } | |
11225 | ||
11226 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking GCONF_LIBS" >&5 | |
11227 | $as_echo_n "checking GCONF_LIBS... " >&6; } | |
11228 | GCONF_LIBS=`$PKG_CONFIG --libs "gconf-2.0 >= 2.13"|sed -e 's,///*,/,g'` | |
11229 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCONF_LIBS" >&5 | |
11230 | $as_echo "$GCONF_LIBS" >&6; } | |
11231 | else | |
11232 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
11233 | $as_echo "no" >&6; } | |
11234 | GCONF_CFLAGS="" | |
11235 | GCONF_LIBS="" | |
11236 | ## If we have a custom action on failure, don't print errors, but | |
11237 | ## do set a variable so people can do so. | |
11238 | GCONF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gconf-2.0 >= 2.13"` | |
11239 | ||
11240 | fi | |
11241 | ||
11242 | ||
11243 | ||
11244 | else | |
11245 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
11246 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
11247 | fi | |
11248 | fi | |
11249 | ||
11250 | if test $succeeded = yes; then | |
11251 | HAVE_GCONF=yes | |
11252 | else | |
11253 | HAVE_GCONF=no | |
11254 | fi | |
11255 | ||
11256 | if test "$HAVE_GCONF" = yes; then | |
11257 | ||
11258 | $as_echo "#define HAVE_GCONF 1" >>confdefs.h | |
11259 | ||
17410582 GM |
11260 | SETTINGS_CFLAGS="$SETTINGS_CFLAGS $GCONF_CFLAGS" |
11261 | SETTINGS_LIBS="$SETTINGS_LIBS $GCONF_LIBS" | |
f527bd02 GM |
11262 | fi |
11263 | fi | |
11264 | ||
11265 | if test "$HAVE_GSETTINGS" = "yes" || test "$HAVE_GCONF" = "yes"; then | |
11266 | SAVE_CFLAGS="$CFLAGS" | |
11267 | SAVE_LDFLAGS="$LDFLAGS" | |
11268 | CFLAGS="$SETTINGS_CFLAGS $CFLAGS" | |
11269 | LDFLAGS="$SETTINGS_LIBS $LDFLAGS" | |
11270 | for ac_func in g_type_init | |
067d23c9 KY |
11271 | do : |
11272 | ac_fn_c_check_func "$LINENO" "g_type_init" "ac_cv_func_g_type_init" | |
5f64f7bd | 11273 | if test "x$ac_cv_func_g_type_init" = x""yes; then : |
067d23c9 KY |
11274 | cat >>confdefs.h <<_ACEOF |
11275 | #define HAVE_G_TYPE_INIT 1 | |
11276 | _ACEOF | |
11277 | ||
11278 | fi | |
11279 | done | |
11280 | ||
f527bd02 GM |
11281 | CFLAGS="$SAVE_CFLAGS" |
11282 | LDFLAGS="$SAVE_LDFLAGS" | |
067d23c9 KY |
11283 | fi |
11284 | ||
f527bd02 GM |
11285 | |
11286 | ||
11287 | ||
067d23c9 KY |
11288 | HAVE_LIBSELINUX=no |
11289 | LIBSELINUX_LIBS= | |
11290 | if test "${with_selinux}" = "yes"; then | |
11291 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lgetfilecon in -lselinux" >&5 | |
11292 | $as_echo_n "checking for lgetfilecon in -lselinux... " >&6; } | |
5f64f7bd | 11293 | if test "${ac_cv_lib_selinux_lgetfilecon+set}" = set; then : |
067d23c9 KY |
11294 | $as_echo_n "(cached) " >&6 |
11295 | else | |
11296 | ac_check_lib_save_LIBS=$LIBS | |
11297 | LIBS="-lselinux $LIBS" | |
11298 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11299 | /* end confdefs.h. */ | |
11300 | ||
11301 | /* Override any GCC internal prototype to avoid an error. | |
11302 | Use char because int might match the return type of a GCC | |
11303 | builtin and then its argument prototype would still apply. */ | |
11304 | #ifdef __cplusplus | |
11305 | extern "C" | |
11306 | #endif | |
11307 | char lgetfilecon (); | |
11308 | int | |
11309 | main () | |
11310 | { | |
11311 | return lgetfilecon (); | |
11312 | ; | |
11313 | return 0; | |
11314 | } | |
11315 | _ACEOF | |
11316 | if ac_fn_c_try_link "$LINENO"; then : | |
11317 | ac_cv_lib_selinux_lgetfilecon=yes | |
11318 | else | |
11319 | ac_cv_lib_selinux_lgetfilecon=no | |
11320 | fi | |
11321 | rm -f core conftest.err conftest.$ac_objext \ | |
11322 | conftest$ac_exeext conftest.$ac_ext | |
11323 | LIBS=$ac_check_lib_save_LIBS | |
11324 | fi | |
11325 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_lgetfilecon" >&5 | |
11326 | $as_echo "$ac_cv_lib_selinux_lgetfilecon" >&6; } | |
5f64f7bd | 11327 | if test "x$ac_cv_lib_selinux_lgetfilecon" = x""yes; then : |
067d23c9 KY |
11328 | HAVE_LIBSELINUX=yes |
11329 | else | |
11330 | HAVE_LIBSELINUX=no | |
11331 | fi | |
11332 | ||
11333 | if test "$HAVE_LIBSELINUX" = yes; then | |
11334 | ||
11335 | $as_echo "#define HAVE_LIBSELINUX 1" >>confdefs.h | |
11336 | ||
11337 | LIBSELINUX_LIBS=-lselinux | |
11338 | fi | |
11339 | fi | |
11340 | ||
11341 | ||
11342 | HAVE_GNUTLS=no | |
e7d4e61f | 11343 | HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY=no |
067d23c9 KY |
11344 | if test "${with_gnutls}" = "yes" ; then |
11345 | ||
11346 | succeeded=no | |
11347 | ||
11348 | # Extract the first word of "pkg-config", so it can be a program name with args. | |
11349 | set dummy pkg-config; ac_word=$2 | |
11350 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
11351 | $as_echo_n "checking for $ac_word... " >&6; } | |
5f64f7bd | 11352 | if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : |
067d23c9 KY |
11353 | $as_echo_n "(cached) " >&6 |
11354 | else | |
11355 | case $PKG_CONFIG in | |
11356 | [\\/]* | ?:[\\/]*) | |
11357 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
11358 | ;; | |
11359 | *) | |
11360 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
11361 | for as_dir in $PATH | |
11362 | do | |
11363 | IFS=$as_save_IFS | |
11364 | test -z "$as_dir" && as_dir=. | |
11365 | for ac_exec_ext in '' $ac_executable_extensions; do | |
11366 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
11367 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
11368 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
11369 | break 2 | |
11370 | fi | |
11371 | done | |
11372 | done | |
11373 | IFS=$as_save_IFS | |
11374 | ||
11375 | test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" | |
11376 | ;; | |
11377 | esac | |
11378 | fi | |
11379 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG | |
11380 | if test -n "$PKG_CONFIG"; then | |
11381 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
11382 | $as_echo "$PKG_CONFIG" >&6; } | |
11383 | else | |
11384 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
11385 | $as_echo "no" >&6; } | |
11386 | fi | |
11387 | ||
11388 | ||
11389 | ||
11390 | if test "$PKG_CONFIG" = "no" ; then | |
11391 | HAVE_GNUTLS=no | |
11392 | else | |
11393 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
11394 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
b8bd6c8d GM |
11395 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gnutls >= 2.6.0" >&5 |
11396 | $as_echo_n "checking for gnutls >= 2.6.0... " >&6; } | |
067d23c9 | 11397 | |
b8bd6c8d | 11398 | if $PKG_CONFIG --exists "gnutls >= 2.6.0" 2>&5; then |
067d23c9 KY |
11399 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
11400 | $as_echo "yes" >&6; } | |
11401 | succeeded=yes | |
11402 | ||
11403 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBGNUTLS_CFLAGS" >&5 | |
11404 | $as_echo_n "checking LIBGNUTLS_CFLAGS... " >&6; } | |
b8bd6c8d | 11405 | LIBGNUTLS_CFLAGS=`$PKG_CONFIG --cflags "gnutls >= 2.6.0"|sed -e 's,///*,/,g'` |
067d23c9 KY |
11406 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBGNUTLS_CFLAGS" >&5 |
11407 | $as_echo "$LIBGNUTLS_CFLAGS" >&6; } | |
11408 | ||
11409 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBGNUTLS_LIBS" >&5 | |
11410 | $as_echo_n "checking LIBGNUTLS_LIBS... " >&6; } | |
b8bd6c8d | 11411 | LIBGNUTLS_LIBS=`$PKG_CONFIG --libs "gnutls >= 2.6.0"|sed -e 's,///*,/,g'` |
067d23c9 KY |
11412 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBGNUTLS_LIBS" >&5 |
11413 | $as_echo "$LIBGNUTLS_LIBS" >&6; } | |
11414 | else | |
11415 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
11416 | $as_echo "no" >&6; } | |
11417 | LIBGNUTLS_CFLAGS="" | |
11418 | LIBGNUTLS_LIBS="" | |
11419 | ## If we have a custom action on failure, don't print errors, but | |
11420 | ## do set a variable so people can do so. | |
b8bd6c8d | 11421 | LIBGNUTLS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gnutls >= 2.6.0"` |
067d23c9 KY |
11422 | |
11423 | fi | |
11424 | ||
11425 | ||
11426 | ||
11427 | else | |
11428 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
11429 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
11430 | fi | |
11431 | fi | |
11432 | ||
11433 | if test $succeeded = yes; then | |
11434 | HAVE_GNUTLS=yes | |
11435 | else | |
11436 | HAVE_GNUTLS=no | |
11437 | fi | |
11438 | ||
11439 | if test "${HAVE_GNUTLS}" = "yes"; then | |
11440 | ||
11441 | $as_echo "#define HAVE_GNUTLS 1" >>confdefs.h | |
11442 | ||
11443 | fi | |
e7d4e61f GM |
11444 | |
11445 | CFLAGS="$CFLAGS $LIBGNUTLS_CFLAGS" | |
11446 | LIBS="$LIBGNUTLS_LIBS $LIBS" | |
11447 | for ac_func in gnutls_certificate_set_verify_function | |
11448 | do : | |
11449 | ac_fn_c_check_func "$LINENO" "gnutls_certificate_set_verify_function" "ac_cv_func_gnutls_certificate_set_verify_function" | |
11450 | if test "x$ac_cv_func_gnutls_certificate_set_verify_function" = x""yes; then : | |
11451 | cat >>confdefs.h <<_ACEOF | |
11452 | #define HAVE_GNUTLS_CERTIFICATE_SET_VERIFY_FUNCTION 1 | |
11453 | _ACEOF | |
11454 | HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY=yes | |
11455 | fi | |
11456 | done | |
11457 | ||
11458 | ||
11459 | if test "${HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY}" = "yes"; then | |
11460 | ||
11461 | $as_echo "#define HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY 1" >>confdefs.h | |
11462 | ||
11463 | fi | |
067d23c9 KY |
11464 | fi |
11465 | ||
11466 | ||
11467 | ||
e7d4e61f | 11468 | |
067d23c9 KY |
11469 | HAVE_XAW3D=no |
11470 | LUCID_LIBW= | |
11471 | if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then | |
11472 | if test "$with_xaw3d" != no; then | |
11473 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xaw3d" >&5 | |
11474 | $as_echo_n "checking for xaw3d... " >&6; } | |
5f64f7bd | 11475 | if test "${emacs_cv_xaw3d+set}" = set; then : |
067d23c9 KY |
11476 | $as_echo_n "(cached) " >&6 |
11477 | else | |
11478 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11479 | /* end confdefs.h. */ | |
11480 | ||
11481 | #include <X11/Intrinsic.h> | |
11482 | #include <X11/Xaw3d/Simple.h> | |
11483 | int | |
11484 | main () | |
11485 | { | |
11486 | ||
11487 | ; | |
11488 | return 0; | |
11489 | } | |
11490 | _ACEOF | |
11491 | if ac_fn_c_try_link "$LINENO"; then : | |
14beddf4 CY |
11492 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XawScrollbarSetThumb in -lXaw3d" >&5 |
11493 | $as_echo_n "checking for XawScrollbarSetThumb in -lXaw3d... " >&6; } | |
5f64f7bd | 11494 | if test "${ac_cv_lib_Xaw3d_XawScrollbarSetThumb+set}" = set; then : |
ae1362a3 AS |
11495 | $as_echo_n "(cached) " >&6 |
11496 | else | |
11497 | ac_check_lib_save_LIBS=$LIBS | |
14beddf4 | 11498 | LIBS="-lXaw3d $LIBS" |
ae1362a3 AS |
11499 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
11500 | /* end confdefs.h. */ | |
bf89cb4d | 11501 | |
ae1362a3 AS |
11502 | /* Override any GCC internal prototype to avoid an error. |
11503 | Use char because int might match the return type of a GCC | |
11504 | builtin and then its argument prototype would still apply. */ | |
11505 | #ifdef __cplusplus | |
11506 | extern "C" | |
11507 | #endif | |
14beddf4 | 11508 | char XawScrollbarSetThumb (); |
ae1362a3 AS |
11509 | int |
11510 | main () | |
11511 | { | |
14beddf4 | 11512 | return XawScrollbarSetThumb (); |
ae1362a3 AS |
11513 | ; |
11514 | return 0; | |
11515 | } | |
11516 | _ACEOF | |
11517 | if ac_fn_c_try_link "$LINENO"; then : | |
14beddf4 | 11518 | ac_cv_lib_Xaw3d_XawScrollbarSetThumb=yes |
ae1362a3 | 11519 | else |
14beddf4 | 11520 | ac_cv_lib_Xaw3d_XawScrollbarSetThumb=no |
ae1362a3 AS |
11521 | fi |
11522 | rm -f core conftest.err conftest.$ac_objext \ | |
11523 | conftest$ac_exeext conftest.$ac_ext | |
11524 | LIBS=$ac_check_lib_save_LIBS | |
11525 | fi | |
14beddf4 CY |
11526 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&5 |
11527 | $as_echo "$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&6; } | |
5f64f7bd | 11528 | if test "x$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" = x""yes; then : |
067d23c9 KY |
11529 | emacs_cv_xaw3d=yes |
11530 | else | |
11531 | emacs_cv_xaw3d=no | |
11532 | fi | |
14beddf4 CY |
11533 | |
11534 | else | |
11535 | emacs_cv_xaw3d=no | |
11536 | fi | |
067d23c9 KY |
11537 | rm -f core conftest.err conftest.$ac_objext \ |
11538 | conftest$ac_exeext conftest.$ac_ext | |
11539 | fi | |
11540 | ||
11541 | else | |
11542 | emacs_cv_xaw3d=no | |
11543 | fi | |
11544 | if test $emacs_cv_xaw3d = yes; then | |
11545 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5 | |
11546 | $as_echo "yes; using Lucid toolkit" >&6; } | |
11547 | USE_X_TOOLKIT=LUCID | |
11548 | HAVE_XAW3D=yes | |
11549 | LUCID_LIBW=-lXaw3d | |
11550 | ||
11551 | $as_echo "#define HAVE_XAW3D 1" >>confdefs.h | |
11552 | ||
11553 | else | |
11554 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
11555 | $as_echo "no" >&6; } | |
11556 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libXaw" >&5 | |
11557 | $as_echo_n "checking for libXaw... " >&6; } | |
5f64f7bd | 11558 | if test "${emacs_cv_xaw+set}" = set; then : |
067d23c9 KY |
11559 | $as_echo_n "(cached) " >&6 |
11560 | else | |
11561 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11562 | /* end confdefs.h. */ | |
11563 | ||
11564 | #include <X11/Intrinsic.h> | |
11565 | #include <X11/Xaw/Simple.h> | |
11566 | int | |
11567 | main () | |
11568 | { | |
11569 | ||
11570 | ; | |
11571 | return 0; | |
11572 | } | |
11573 | _ACEOF | |
11574 | if ac_fn_c_try_link "$LINENO"; then : | |
11575 | emacs_cv_xaw=yes | |
11576 | else | |
11577 | emacs_cv_xaw=no | |
11578 | fi | |
11579 | rm -f core conftest.err conftest.$ac_objext \ | |
11580 | conftest$ac_exeext conftest.$ac_ext | |
11581 | fi | |
11582 | ||
11583 | if test $emacs_cv_xaw = yes; then | |
11584 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5 | |
11585 | $as_echo "yes; using Lucid toolkit" >&6; } | |
11586 | USE_X_TOOLKIT=LUCID | |
11587 | LUCID_LIBW=-lXaw | |
11588 | elif test x"${USE_X_TOOLKIT}" = xLUCID; then | |
5f64f7bd | 11589 | as_fn_error "Lucid toolkit requires X11/Xaw include files" "$LINENO" 5 |
067d23c9 | 11590 | else |
cf6f3ed8 GM |
11591 | as_fn_error "No X toolkit could be found. |
11592 | If you are sure you want Emacs compiled without an X toolkit, pass | |
11593 | --with-x-toolkit=no | |
11594 | to configure. Otherwise, install the development libraries for the toolkit | |
11595 | that you want to use (e.g. Gtk+) and re-run configure." "$LINENO" 5 | |
067d23c9 KY |
11596 | fi |
11597 | fi | |
11598 | fi | |
11599 | ||
11600 | X_TOOLKIT_TYPE=$USE_X_TOOLKIT | |
11601 | ||
11602 | LIBXTR6= | |
11603 | if test "${USE_X_TOOLKIT}" != "none"; then | |
11604 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 toolkit version" >&5 | |
11605 | $as_echo_n "checking X11 toolkit version... " >&6; } | |
5f64f7bd | 11606 | if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then : |
067d23c9 KY |
11607 | $as_echo_n "(cached) " >&6 |
11608 | else | |
11609 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11610 | /* end confdefs.h. */ | |
11611 | #include <X11/Intrinsic.h> | |
11612 | int | |
11613 | main () | |
11614 | { | |
11615 | #if XtSpecificationRelease < 6 | |
11616 | fail; | |
11617 | #endif | |
11618 | ||
11619 | ; | |
11620 | return 0; | |
11621 | } | |
11622 | _ACEOF | |
11623 | if ac_fn_c_try_link "$LINENO"; then : | |
11624 | emacs_cv_x11_toolkit_version_6=yes | |
11625 | else | |
11626 | emacs_cv_x11_toolkit_version_6=no | |
11627 | fi | |
11628 | rm -f core conftest.err conftest.$ac_objext \ | |
11629 | conftest$ac_exeext conftest.$ac_ext | |
11630 | fi | |
11631 | ||
11632 | HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6 | |
11633 | if test $emacs_cv_x11_toolkit_version_6 = yes; then | |
11634 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5 | |
11635 | $as_echo "6 or newer" >&6; } | |
11636 | ||
11637 | $as_echo "#define HAVE_X11XTR6 1" >>confdefs.h | |
11638 | ||
11639 | LIBXTR6="-lSM -lICE" | |
11640 | case "$opsys" in | |
11641 | ## Use libw.a along with X11R6 Xt. | |
11642 | unixware) LIBXTR6="$LIBXTR6 -lw" ;; | |
11643 | esac | |
11644 | else | |
11645 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5 | |
11646 | $as_echo "before 6" >&6; } | |
11647 | fi | |
11648 | ||
11649 | OLDLIBS="$LIBS" | |
11650 | if test x$HAVE_X11XTR6 = xyes; then | |
11651 | LIBS="-lXt -lSM -lICE $LIBS" | |
11652 | else | |
11653 | LIBS="-lXt $LIBS" | |
11654 | fi | |
11655 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XmuConvertStandardSelection in -lXmu" >&5 | |
11656 | $as_echo_n "checking for XmuConvertStandardSelection in -lXmu... " >&6; } | |
5f64f7bd | 11657 | if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then : |
067d23c9 KY |
11658 | $as_echo_n "(cached) " >&6 |
11659 | else | |
11660 | ac_check_lib_save_LIBS=$LIBS | |
11661 | LIBS="-lXmu $LIBS" | |
11662 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11663 | /* end confdefs.h. */ | |
11664 | ||
11665 | /* Override any GCC internal prototype to avoid an error. | |
11666 | Use char because int might match the return type of a GCC | |
11667 | builtin and then its argument prototype would still apply. */ | |
11668 | #ifdef __cplusplus | |
11669 | extern "C" | |
11670 | #endif | |
11671 | char XmuConvertStandardSelection (); | |
11672 | int | |
11673 | main () | |
11674 | { | |
11675 | return XmuConvertStandardSelection (); | |
11676 | ; | |
11677 | return 0; | |
11678 | } | |
11679 | _ACEOF | |
11680 | if ac_fn_c_try_link "$LINENO"; then : | |
11681 | ac_cv_lib_Xmu_XmuConvertStandardSelection=yes | |
11682 | else | |
11683 | ac_cv_lib_Xmu_XmuConvertStandardSelection=no | |
11684 | fi | |
11685 | rm -f core conftest.err conftest.$ac_objext \ | |
11686 | conftest$ac_exeext conftest.$ac_ext | |
11687 | LIBS=$ac_check_lib_save_LIBS | |
11688 | fi | |
11689 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5 | |
11690 | $as_echo "$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6; } | |
5f64f7bd | 11691 | if test "x$ac_cv_lib_Xmu_XmuConvertStandardSelection" = x""yes; then : |
067d23c9 KY |
11692 | cat >>confdefs.h <<_ACEOF |
11693 | #define HAVE_LIBXMU 1 | |
11694 | _ACEOF | |
11695 | ||
11696 | LIBS="-lXmu $LIBS" | |
11697 | ||
11698 | fi | |
11699 | ||
11700 | test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS" | |
11701 | fi | |
11702 | ||
11703 | ||
11704 | LIBXMU=-lXmu | |
d6a003a8 AS |
11705 | case $opsys in |
11706 | ## These systems don't supply Xmu. | |
067d23c9 KY |
11707 | hpux* | aix4-2 ) |
11708 | test "X$ac_cv_lib_Xmu_XmuConvertStandardSelection" != "Xyes" && LIBXMU= | |
11709 | ;; | |
11710 | esac | |
11711 | ||
11712 | ||
11713 | # On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D. | |
11714 | if test "${HAVE_X11}" = "yes"; then | |
11715 | if test "${USE_X_TOOLKIT}" != "none"; then | |
11716 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XShapeQueryExtension in -lXext" >&5 | |
11717 | $as_echo_n "checking for XShapeQueryExtension in -lXext... " >&6; } | |
5f64f7bd | 11718 | if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then : |
067d23c9 KY |
11719 | $as_echo_n "(cached) " >&6 |
11720 | else | |
11721 | ac_check_lib_save_LIBS=$LIBS | |
11722 | LIBS="-lXext $LIBS" | |
11723 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11724 | /* end confdefs.h. */ | |
11725 | ||
11726 | /* Override any GCC internal prototype to avoid an error. | |
11727 | Use char because int might match the return type of a GCC | |
11728 | builtin and then its argument prototype would still apply. */ | |
11729 | #ifdef __cplusplus | |
11730 | extern "C" | |
11731 | #endif | |
11732 | char XShapeQueryExtension (); | |
11733 | int | |
11734 | main () | |
11735 | { | |
11736 | return XShapeQueryExtension (); | |
11737 | ; | |
11738 | return 0; | |
11739 | } | |
11740 | _ACEOF | |
11741 | if ac_fn_c_try_link "$LINENO"; then : | |
11742 | ac_cv_lib_Xext_XShapeQueryExtension=yes | |
11743 | else | |
11744 | ac_cv_lib_Xext_XShapeQueryExtension=no | |
11745 | fi | |
11746 | rm -f core conftest.err conftest.$ac_objext \ | |
11747 | conftest$ac_exeext conftest.$ac_ext | |
11748 | LIBS=$ac_check_lib_save_LIBS | |
11749 | fi | |
11750 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5 | |
11751 | $as_echo "$ac_cv_lib_Xext_XShapeQueryExtension" >&6; } | |
5f64f7bd | 11752 | if test "x$ac_cv_lib_Xext_XShapeQueryExtension" = x""yes; then : |
067d23c9 KY |
11753 | cat >>confdefs.h <<_ACEOF |
11754 | #define HAVE_LIBXEXT 1 | |
11755 | _ACEOF | |
11756 | ||
11757 | LIBS="-lXext $LIBS" | |
11758 | ||
11759 | fi | |
11760 | ||
11761 | fi | |
11762 | fi | |
11763 | ||
11764 | LIBXP= | |
11765 | if test "${USE_X_TOOLKIT}" = "MOTIF"; then | |
11766 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Motif version 2.1" >&5 | |
11767 | $as_echo_n "checking for Motif version 2.1... " >&6; } | |
5f64f7bd | 11768 | if test "${emacs_cv_motif_version_2_1+set}" = set; then : |
067d23c9 KY |
11769 | $as_echo_n "(cached) " >&6 |
11770 | else | |
11771 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11772 | /* end confdefs.h. */ | |
11773 | #include <Xm/Xm.h> | |
11774 | int | |
11775 | main () | |
11776 | { | |
11777 | #if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1) | |
11778 | int x = 5; | |
11779 | #else | |
11780 | Motif version prior to 2.1. | |
11781 | #endif | |
11782 | ; | |
11783 | return 0; | |
11784 | } | |
11785 | _ACEOF | |
11786 | if ac_fn_c_try_compile "$LINENO"; then : | |
11787 | emacs_cv_motif_version_2_1=yes | |
11788 | else | |
11789 | emacs_cv_motif_version_2_1=no | |
11790 | fi | |
11791 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
11792 | fi | |
11793 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_motif_version_2_1" >&5 | |
11794 | $as_echo "$emacs_cv_motif_version_2_1" >&6; } | |
11795 | if test $emacs_cv_motif_version_2_1 = yes; then | |
11796 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpCreateContext in -lXp" >&5 | |
11797 | $as_echo_n "checking for XpCreateContext in -lXp... " >&6; } | |
5f64f7bd | 11798 | if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then : |
067d23c9 KY |
11799 | $as_echo_n "(cached) " >&6 |
11800 | else | |
11801 | ac_check_lib_save_LIBS=$LIBS | |
11802 | LIBS="-lXp $LIBS" | |
11803 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11804 | /* end confdefs.h. */ | |
11805 | ||
11806 | /* Override any GCC internal prototype to avoid an error. | |
11807 | Use char because int might match the return type of a GCC | |
11808 | builtin and then its argument prototype would still apply. */ | |
11809 | #ifdef __cplusplus | |
11810 | extern "C" | |
11811 | #endif | |
11812 | char XpCreateContext (); | |
11813 | int | |
11814 | main () | |
11815 | { | |
11816 | return XpCreateContext (); | |
11817 | ; | |
11818 | return 0; | |
11819 | } | |
11820 | _ACEOF | |
11821 | if ac_fn_c_try_link "$LINENO"; then : | |
11822 | ac_cv_lib_Xp_XpCreateContext=yes | |
11823 | else | |
11824 | ac_cv_lib_Xp_XpCreateContext=no | |
11825 | fi | |
11826 | rm -f core conftest.err conftest.$ac_objext \ | |
11827 | conftest$ac_exeext conftest.$ac_ext | |
11828 | LIBS=$ac_check_lib_save_LIBS | |
11829 | fi | |
11830 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xp_XpCreateContext" >&5 | |
11831 | $as_echo "$ac_cv_lib_Xp_XpCreateContext" >&6; } | |
5f64f7bd | 11832 | if test "x$ac_cv_lib_Xp_XpCreateContext" = x""yes; then : |
067d23c9 KY |
11833 | LIBXP=-lXp |
11834 | fi | |
11835 | ||
11836 | else | |
11837 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LessTif where some systems put it" >&5 | |
11838 | $as_echo_n "checking for LessTif where some systems put it... " >&6; } | |
5f64f7bd | 11839 | if test "${emacs_cv_lesstif+set}" = set; then : |
067d23c9 KY |
11840 | $as_echo_n "(cached) " >&6 |
11841 | else | |
11842 | # We put this in CFLAGS temporarily to precede other -I options | |
11843 | # that might be in CFLAGS temporarily. | |
11844 | # We put this in CPPFLAGS where it precedes the other -I options. | |
11845 | OLD_CPPFLAGS=$CPPFLAGS | |
11846 | OLD_CFLAGS=$CFLAGS | |
11847 | CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS" | |
11848 | CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS" | |
11849 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11850 | /* end confdefs.h. */ | |
11851 | #include </usr/X11R6/LessTif/Motif1.2/include/Xm/Xm.h> | |
11852 | int | |
11853 | main () | |
11854 | { | |
11855 | int x = 5; | |
11856 | ; | |
11857 | return 0; | |
11858 | } | |
11859 | _ACEOF | |
11860 | if ac_fn_c_try_compile "$LINENO"; then : | |
11861 | emacs_cv_lesstif=yes | |
11862 | else | |
11863 | emacs_cv_lesstif=no | |
11864 | fi | |
11865 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
11866 | fi | |
11867 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_lesstif" >&5 | |
11868 | $as_echo "$emacs_cv_lesstif" >&6; } | |
11869 | if test $emacs_cv_lesstif = yes; then | |
11870 | # Make sure this -I option remains in CPPFLAGS after it is set | |
11871 | # back to REAL_CPPFLAGS. | |
11872 | # There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not | |
11873 | # have those other -I options anyway. Ultimately, having this | |
11874 | # directory ultimately in CPPFLAGS will be enough. | |
11875 | REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS" | |
11876 | LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS" | |
11877 | else | |
11878 | CFLAGS=$OLD_CFLAGS | |
11879 | CPPFLAGS=$OLD_CPPFLAGS | |
11880 | fi | |
11881 | fi | |
11882 | fi | |
11883 | ||
11884 | ||
11885 | USE_TOOLKIT_SCROLL_BARS=no | |
11886 | if test "${with_toolkit_scroll_bars}" != "no"; then | |
11887 | if test "${USE_X_TOOLKIT}" != "none"; then | |
11888 | if test "${USE_X_TOOLKIT}" = "MOTIF"; then | |
11889 | $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h | |
11890 | ||
11891 | HAVE_XAW3D=no | |
11892 | USE_TOOLKIT_SCROLL_BARS=yes | |
11893 | elif test "${HAVE_XAW3D}" = "yes"; then | |
11894 | $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h | |
11895 | ||
11896 | USE_TOOLKIT_SCROLL_BARS=yes | |
11897 | fi | |
11898 | elif test "${HAVE_GTK}" = "yes"; then | |
11899 | $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h | |
11900 | ||
11901 | USE_TOOLKIT_SCROLL_BARS=yes | |
11902 | elif test "${HAVE_NS}" = "yes"; then | |
11903 | $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h | |
11904 | ||
11905 | USE_TOOLKIT_SCROLL_BARS=yes | |
11906 | fi | |
11907 | fi | |
11908 | ||
11909 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11910 | /* end confdefs.h. */ | |
11911 | ||
11912 | #include <X11/Xlib.h> | |
11913 | #include <X11/Xresource.h> | |
11914 | int | |
11915 | main () | |
11916 | { | |
11917 | XIMProc callback; | |
11918 | ; | |
11919 | return 0; | |
11920 | } | |
11921 | _ACEOF | |
11922 | if ac_fn_c_try_compile "$LINENO"; then : | |
11923 | HAVE_XIM=yes | |
11924 | ||
11925 | $as_echo "#define HAVE_XIM 1" >>confdefs.h | |
11926 | ||
11927 | else | |
11928 | HAVE_XIM=no | |
11929 | fi | |
11930 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
11931 | ||
11932 | ||
11933 | if test "${with_xim}" != "no"; then | |
11934 | ||
11935 | $as_echo "#define USE_XIM 1" >>confdefs.h | |
11936 | ||
11937 | fi | |
11938 | ||
11939 | ||
11940 | if test "${HAVE_XIM}" != "no"; then | |
11941 | late_CFLAGS=$CFLAGS | |
11942 | if test "$GCC" = yes; then | |
11943 | CFLAGS="$CFLAGS --pedantic-errors" | |
11944 | fi | |
11945 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11946 | /* end confdefs.h. */ | |
11947 | ||
11948 | #include <X11/Xlib.h> | |
11949 | #include <X11/Xresource.h> | |
11950 | int | |
11951 | main () | |
11952 | { | |
11953 | Display *display; | |
11954 | XrmDatabase db; | |
11955 | char *res_name; | |
11956 | char *res_class; | |
11957 | XIMProc callback; | |
11958 | XPointer *client_data; | |
11959 | #ifndef __GNUC__ | |
11960 | /* If we're not using GCC, it's probably not XFree86, and this is | |
11961 | probably right, but we can't use something like --pedantic-errors. */ | |
11962 | extern Bool XRegisterIMInstantiateCallback(Display*, XrmDatabase, char*, | |
11963 | char*, XIMProc, XPointer*); | |
11964 | #endif | |
11965 | (void)XRegisterIMInstantiateCallback(display, db, res_name, res_class, callback, | |
11966 | client_data); | |
11967 | ; | |
11968 | return 0; | |
11969 | } | |
11970 | _ACEOF | |
11971 | if ac_fn_c_try_compile "$LINENO"; then : | |
11972 | emacs_cv_arg6_star=yes | |
11973 | fi | |
11974 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
11975 | if test "$emacs_cv_arg6_star" = yes; then | |
11976 | $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer*" >>confdefs.h | |
11977 | ||
11978 | else | |
11979 | $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer" >>confdefs.h | |
11980 | ||
11981 | fi | |
11982 | CFLAGS=$late_CFLAGS | |
11983 | fi | |
11984 | ||
11985 | ### Start of font-backend (under any platform) section. | |
11986 | # (nothing here yet -- this is a placeholder) | |
11987 | ### End of font-backend (under any platform) section. | |
11988 | ||
11989 | ### Start of font-backend (under X11) section. | |
11990 | if test "${HAVE_X11}" = "yes"; then | |
11991 | ||
11992 | succeeded=no | |
11993 | ||
11994 | # Extract the first word of "pkg-config", so it can be a program name with args. | |
11995 | set dummy pkg-config; ac_word=$2 | |
11996 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
11997 | $as_echo_n "checking for $ac_word... " >&6; } | |
5f64f7bd | 11998 | if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : |
067d23c9 KY |
11999 | $as_echo_n "(cached) " >&6 |
12000 | else | |
12001 | case $PKG_CONFIG in | |
12002 | [\\/]* | ?:[\\/]*) | |
12003 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
12004 | ;; | |
12005 | *) | |
12006 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
12007 | for as_dir in $PATH | |
12008 | do | |
12009 | IFS=$as_save_IFS | |
12010 | test -z "$as_dir" && as_dir=. | |
12011 | for ac_exec_ext in '' $ac_executable_extensions; do | |
12012 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
12013 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
12014 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
12015 | break 2 | |
12016 | fi | |
12017 | done | |
12018 | done | |
12019 | IFS=$as_save_IFS | |
12020 | ||
12021 | test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" | |
12022 | ;; | |
12023 | esac | |
12024 | fi | |
12025 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG | |
12026 | if test -n "$PKG_CONFIG"; then | |
12027 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
12028 | $as_echo "$PKG_CONFIG" >&6; } | |
12029 | else | |
12030 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
12031 | $as_echo "no" >&6; } | |
12032 | fi | |
12033 | ||
12034 | ||
12035 | ||
12036 | if test "$PKG_CONFIG" = "no" ; then | |
12037 | HAVE_FC=no | |
12038 | else | |
12039 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
12040 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
12041 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fontconfig >= 2.2.0" >&5 | |
12042 | $as_echo_n "checking for fontconfig >= 2.2.0... " >&6; } | |
12043 | ||
12044 | if $PKG_CONFIG --exists "fontconfig >= 2.2.0" 2>&5; then | |
12045 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
12046 | $as_echo "yes" >&6; } | |
12047 | succeeded=yes | |
12048 | ||
12049 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking FONTCONFIG_CFLAGS" >&5 | |
12050 | $as_echo_n "checking FONTCONFIG_CFLAGS... " >&6; } | |
12051 | FONTCONFIG_CFLAGS=`$PKG_CONFIG --cflags "fontconfig >= 2.2.0"|sed -e 's,///*,/,g'` | |
12052 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FONTCONFIG_CFLAGS" >&5 | |
12053 | $as_echo "$FONTCONFIG_CFLAGS" >&6; } | |
12054 | ||
12055 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking FONTCONFIG_LIBS" >&5 | |
12056 | $as_echo_n "checking FONTCONFIG_LIBS... " >&6; } | |
12057 | FONTCONFIG_LIBS=`$PKG_CONFIG --libs "fontconfig >= 2.2.0"|sed -e 's,///*,/,g'` | |
12058 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FONTCONFIG_LIBS" >&5 | |
12059 | $as_echo "$FONTCONFIG_LIBS" >&6; } | |
12060 | else | |
12061 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
12062 | $as_echo "no" >&6; } | |
12063 | FONTCONFIG_CFLAGS="" | |
12064 | FONTCONFIG_LIBS="" | |
12065 | ## If we have a custom action on failure, don't print errors, but | |
12066 | ## do set a variable so people can do so. | |
12067 | FONTCONFIG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "fontconfig >= 2.2.0"` | |
12068 | ||
12069 | fi | |
12070 | ||
12071 | ||
12072 | ||
12073 | else | |
12074 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
12075 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
12076 | fi | |
12077 | fi | |
12078 | ||
12079 | if test $succeeded = yes; then | |
12080 | HAVE_FC=yes | |
12081 | else | |
12082 | HAVE_FC=no | |
12083 | fi | |
12084 | ||
12085 | ||
12086 | ## Use -lXft if available, unless `--with-xft=no'. | |
12087 | HAVE_XFT=maybe | |
12088 | if test "${HAVE_FC}" = "no" || test "x${with_x}" = "xno"; then | |
12089 | with_xft="no"; | |
12090 | fi | |
12091 | if test "x${with_xft}" != "xno"; then | |
12092 | ||
12093 | ||
12094 | succeeded=no | |
12095 | ||
12096 | # Extract the first word of "pkg-config", so it can be a program name with args. | |
12097 | set dummy pkg-config; ac_word=$2 | |
12098 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
12099 | $as_echo_n "checking for $ac_word... " >&6; } | |
5f64f7bd | 12100 | if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : |
067d23c9 KY |
12101 | $as_echo_n "(cached) " >&6 |
12102 | else | |
12103 | case $PKG_CONFIG in | |
12104 | [\\/]* | ?:[\\/]*) | |
12105 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
12106 | ;; | |
12107 | *) | |
12108 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
12109 | for as_dir in $PATH | |
12110 | do | |
12111 | IFS=$as_save_IFS | |
12112 | test -z "$as_dir" && as_dir=. | |
12113 | for ac_exec_ext in '' $ac_executable_extensions; do | |
12114 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
12115 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
12116 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
12117 | break 2 | |
12118 | fi | |
12119 | done | |
12120 | done | |
12121 | IFS=$as_save_IFS | |
12122 | ||
12123 | test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" | |
12124 | ;; | |
12125 | esac | |
12126 | fi | |
12127 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG | |
12128 | if test -n "$PKG_CONFIG"; then | |
12129 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
12130 | $as_echo "$PKG_CONFIG" >&6; } | |
12131 | else | |
12132 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
12133 | $as_echo "no" >&6; } | |
12134 | fi | |
12135 | ||
12136 | ||
12137 | ||
12138 | if test "$PKG_CONFIG" = "no" ; then | |
12139 | HAVE_XFT=no | |
12140 | else | |
12141 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
12142 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
12143 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xft >= 0.13.0" >&5 | |
12144 | $as_echo_n "checking for xft >= 0.13.0... " >&6; } | |
12145 | ||
12146 | if $PKG_CONFIG --exists "xft >= 0.13.0" 2>&5; then | |
12147 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
12148 | $as_echo "yes" >&6; } | |
12149 | succeeded=yes | |
12150 | ||
12151 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking XFT_CFLAGS" >&5 | |
12152 | $as_echo_n "checking XFT_CFLAGS... " >&6; } | |
12153 | XFT_CFLAGS=`$PKG_CONFIG --cflags "xft >= 0.13.0"|sed -e 's,///*,/,g'` | |
12154 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XFT_CFLAGS" >&5 | |
12155 | $as_echo "$XFT_CFLAGS" >&6; } | |
12156 | ||
12157 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking XFT_LIBS" >&5 | |
12158 | $as_echo_n "checking XFT_LIBS... " >&6; } | |
12159 | XFT_LIBS=`$PKG_CONFIG --libs "xft >= 0.13.0"|sed -e 's,///*,/,g'` | |
12160 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XFT_LIBS" >&5 | |
12161 | $as_echo "$XFT_LIBS" >&6; } | |
12162 | else | |
12163 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
12164 | $as_echo "no" >&6; } | |
12165 | XFT_CFLAGS="" | |
12166 | XFT_LIBS="" | |
12167 | ## If we have a custom action on failure, don't print errors, but | |
12168 | ## do set a variable so people can do so. | |
12169 | XFT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xft >= 0.13.0"` | |
12170 | ||
12171 | fi | |
12172 | ||
12173 | ||
12174 | ||
12175 | else | |
12176 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
12177 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
12178 | fi | |
12179 | fi | |
12180 | ||
12181 | if test $succeeded = yes; then | |
12182 | : | |
12183 | else | |
12184 | HAVE_XFT=no | |
12185 | fi | |
12186 | ||
12187 | ## Because xftfont.c uses XRenderQueryExtension, we also | |
12188 | ## need to link to -lXrender. | |
12189 | HAVE_XRENDER=no | |
12190 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRenderQueryExtension in -lXrender" >&5 | |
12191 | $as_echo_n "checking for XRenderQueryExtension in -lXrender... " >&6; } | |
5f64f7bd | 12192 | if test "${ac_cv_lib_Xrender_XRenderQueryExtension+set}" = set; then : |
067d23c9 KY |
12193 | $as_echo_n "(cached) " >&6 |
12194 | else | |
12195 | ac_check_lib_save_LIBS=$LIBS | |
12196 | LIBS="-lXrender $LIBS" | |
12197 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12198 | /* end confdefs.h. */ | |
12199 | ||
12200 | /* Override any GCC internal prototype to avoid an error. | |
12201 | Use char because int might match the return type of a GCC | |
12202 | builtin and then its argument prototype would still apply. */ | |
12203 | #ifdef __cplusplus | |
12204 | extern "C" | |
12205 | #endif | |
12206 | char XRenderQueryExtension (); | |
12207 | int | |
12208 | main () | |
12209 | { | |
12210 | return XRenderQueryExtension (); | |
12211 | ; | |
12212 | return 0; | |
12213 | } | |
12214 | _ACEOF | |
12215 | if ac_fn_c_try_link "$LINENO"; then : | |
12216 | ac_cv_lib_Xrender_XRenderQueryExtension=yes | |
12217 | else | |
12218 | ac_cv_lib_Xrender_XRenderQueryExtension=no | |
12219 | fi | |
12220 | rm -f core conftest.err conftest.$ac_objext \ | |
12221 | conftest$ac_exeext conftest.$ac_ext | |
12222 | LIBS=$ac_check_lib_save_LIBS | |
12223 | fi | |
12224 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrender_XRenderQueryExtension" >&5 | |
12225 | $as_echo "$ac_cv_lib_Xrender_XRenderQueryExtension" >&6; } | |
5f64f7bd | 12226 | if test "x$ac_cv_lib_Xrender_XRenderQueryExtension" = x""yes; then : |
067d23c9 KY |
12227 | HAVE_XRENDER=yes |
12228 | fi | |
12229 | ||
12230 | if test "$HAVE_XFT" != no && test "$HAVE_XRENDER" != no; then | |
12231 | OLD_CPPFLAGS="$CPPFLAGS" | |
12232 | OLD_CFLAGS="$CFLAGS" | |
12233 | OLD_LIBS="$LIBS" | |
12234 | CPPFLAGS="$CPPFLAGS $XFT_CFLAGS" | |
12235 | CFLAGS="$CFLAGS $XFT_CFLAGS" | |
12236 | XFT_LIBS="-lXrender $XFT_LIBS" | |
12237 | LIBS="$XFT_LIBS $LIBS" | |
12238 | ac_fn_c_check_header_mongrel "$LINENO" "X11/Xft/Xft.h" "ac_cv_header_X11_Xft_Xft_h" "$ac_includes_default" | |
5f64f7bd | 12239 | if test "x$ac_cv_header_X11_Xft_Xft_h" = x""yes; then : |
067d23c9 KY |
12240 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XftFontOpen in -lXft" >&5 |
12241 | $as_echo_n "checking for XftFontOpen in -lXft... " >&6; } | |
5f64f7bd | 12242 | if test "${ac_cv_lib_Xft_XftFontOpen+set}" = set; then : |
067d23c9 KY |
12243 | $as_echo_n "(cached) " >&6 |
12244 | else | |
12245 | ac_check_lib_save_LIBS=$LIBS | |
12246 | LIBS="-lXft $XFT_LIBS $LIBS" | |
12247 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12248 | /* end confdefs.h. */ | |
12249 | ||
12250 | /* Override any GCC internal prototype to avoid an error. | |
12251 | Use char because int might match the return type of a GCC | |
12252 | builtin and then its argument prototype would still apply. */ | |
12253 | #ifdef __cplusplus | |
12254 | extern "C" | |
12255 | #endif | |
12256 | char XftFontOpen (); | |
12257 | int | |
12258 | main () | |
12259 | { | |
12260 | return XftFontOpen (); | |
12261 | ; | |
12262 | return 0; | |
12263 | } | |
12264 | _ACEOF | |
12265 | if ac_fn_c_try_link "$LINENO"; then : | |
12266 | ac_cv_lib_Xft_XftFontOpen=yes | |
12267 | else | |
12268 | ac_cv_lib_Xft_XftFontOpen=no | |
12269 | fi | |
12270 | rm -f core conftest.err conftest.$ac_objext \ | |
12271 | conftest$ac_exeext conftest.$ac_ext | |
12272 | LIBS=$ac_check_lib_save_LIBS | |
12273 | fi | |
12274 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xft_XftFontOpen" >&5 | |
12275 | $as_echo "$ac_cv_lib_Xft_XftFontOpen" >&6; } | |
5f64f7bd | 12276 | if test "x$ac_cv_lib_Xft_XftFontOpen" = x""yes; then : |
067d23c9 KY |
12277 | HAVE_XFT=yes |
12278 | fi | |
12279 | ||
12280 | fi | |
12281 | ||
12282 | ||
12283 | ||
12284 | if test "${HAVE_XFT}" = "yes"; then | |
12285 | ||
12286 | $as_echo "#define HAVE_XFT 1" >>confdefs.h | |
12287 | ||
12288 | ||
12289 | C_SWITCH_X_SITE="$C_SWITCH_X_SITE $XFT_CFLAGS" | |
12290 | else | |
12291 | CPPFLAGS="$OLD_CPPFLAGS" | |
12292 | CFLAGS="$OLD_CFLAGS" | |
12293 | LIBS="$OLD_LIBS" | |
12294 | fi # "${HAVE_XFT}" = "yes" | |
12295 | fi # "$HAVE_XFT" != no | |
12296 | fi # "x${with_xft}" != "xno" | |
12297 | ||
067d23c9 KY |
12298 | ## We used to allow building with FreeType and without Xft. |
12299 | ## However, the ftx font backend driver is not in good shape. | |
7834125e GM |
12300 | if test "$HAVE_XFT" != "yes"; then |
12301 | HAVE_XFT=no | |
12302 | HAVE_FREETYPE=no | |
12303 | else | |
12304 | ||
12305 | succeeded=no | |
12306 | ||
12307 | # Extract the first word of "pkg-config", so it can be a program name with args. | |
12308 | set dummy pkg-config; ac_word=$2 | |
12309 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
12310 | $as_echo_n "checking for $ac_word... " >&6; } | |
5f64f7bd | 12311 | if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : |
7834125e GM |
12312 | $as_echo_n "(cached) " >&6 |
12313 | else | |
12314 | case $PKG_CONFIG in | |
12315 | [\\/]* | ?:[\\/]*) | |
12316 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
12317 | ;; | |
12318 | *) | |
12319 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
12320 | for as_dir in $PATH | |
12321 | do | |
12322 | IFS=$as_save_IFS | |
12323 | test -z "$as_dir" && as_dir=. | |
12324 | for ac_exec_ext in '' $ac_executable_extensions; do | |
12325 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
12326 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
12327 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
12328 | break 2 | |
12329 | fi | |
12330 | done | |
12331 | done | |
12332 | IFS=$as_save_IFS | |
12333 | ||
12334 | test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" | |
12335 | ;; | |
12336 | esac | |
12337 | fi | |
12338 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG | |
12339 | if test -n "$PKG_CONFIG"; then | |
12340 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
12341 | $as_echo "$PKG_CONFIG" >&6; } | |
12342 | else | |
12343 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
12344 | $as_echo "no" >&6; } | |
12345 | fi | |
12346 | ||
12347 | ||
12348 | ||
12349 | if test "$PKG_CONFIG" = "no" ; then | |
12350 | HAVE_FREETYPE=no | |
12351 | else | |
12352 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
12353 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
12354 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype2" >&5 | |
12355 | $as_echo_n "checking for freetype2... " >&6; } | |
12356 | ||
12357 | if $PKG_CONFIG --exists "freetype2" 2>&5; then | |
12358 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
12359 | $as_echo "yes" >&6; } | |
12360 | succeeded=yes | |
12361 | ||
12362 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking FREETYPE_CFLAGS" >&5 | |
12363 | $as_echo_n "checking FREETYPE_CFLAGS... " >&6; } | |
12364 | FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2"|sed -e 's,///*,/,g'` | |
12365 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_CFLAGS" >&5 | |
12366 | $as_echo "$FREETYPE_CFLAGS" >&6; } | |
12367 | ||
12368 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking FREETYPE_LIBS" >&5 | |
12369 | $as_echo_n "checking FREETYPE_LIBS... " >&6; } | |
12370 | FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2"|sed -e 's,///*,/,g'` | |
12371 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIBS" >&5 | |
12372 | $as_echo "$FREETYPE_LIBS" >&6; } | |
12373 | else | |
12374 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
12375 | $as_echo "no" >&6; } | |
12376 | FREETYPE_CFLAGS="" | |
12377 | FREETYPE_LIBS="" | |
12378 | ## If we have a custom action on failure, don't print errors, but | |
12379 | ## do set a variable so people can do so. | |
12380 | FREETYPE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "freetype2"` | |
12381 | ||
12382 | fi | |
12383 | ||
12384 | ||
12385 | ||
12386 | else | |
12387 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
12388 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
12389 | fi | |
12390 | fi | |
12391 | ||
12392 | if test $succeeded = yes; then | |
12393 | HAVE_FREETYPE=yes | |
12394 | else | |
12395 | HAVE_FREETYPE=no | |
12396 | fi | |
12397 | ||
12398 | ||
5f64f7bd | 12399 | test "$HAVE_FREETYPE" = "no" && as_fn_error "libxft requires libfreetype" "$LINENO" 5 |
7834125e | 12400 | fi |
067d23c9 KY |
12401 | |
12402 | HAVE_LIBOTF=no | |
12403 | if test "${HAVE_FREETYPE}" = "yes"; then | |
12404 | ||
12405 | $as_echo "#define HAVE_FREETYPE 1" >>confdefs.h | |
12406 | ||
12407 | if test "${with_libotf}" != "no"; then | |
12408 | ||
12409 | succeeded=no | |
12410 | ||
12411 | # Extract the first word of "pkg-config", so it can be a program name with args. | |
12412 | set dummy pkg-config; ac_word=$2 | |
12413 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
12414 | $as_echo_n "checking for $ac_word... " >&6; } | |
5f64f7bd | 12415 | if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : |
067d23c9 KY |
12416 | $as_echo_n "(cached) " >&6 |
12417 | else | |
12418 | case $PKG_CONFIG in | |
12419 | [\\/]* | ?:[\\/]*) | |
12420 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
12421 | ;; | |
12422 | *) | |
12423 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
12424 | for as_dir in $PATH | |
12425 | do | |
12426 | IFS=$as_save_IFS | |
12427 | test -z "$as_dir" && as_dir=. | |
12428 | for ac_exec_ext in '' $ac_executable_extensions; do | |
12429 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
12430 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
12431 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
12432 | break 2 | |
12433 | fi | |
12434 | done | |
12435 | done | |
12436 | IFS=$as_save_IFS | |
12437 | ||
12438 | test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" | |
12439 | ;; | |
12440 | esac | |
12441 | fi | |
12442 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG | |
12443 | if test -n "$PKG_CONFIG"; then | |
12444 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
12445 | $as_echo "$PKG_CONFIG" >&6; } | |
12446 | else | |
12447 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
12448 | $as_echo "no" >&6; } | |
12449 | fi | |
12450 | ||
12451 | ||
12452 | ||
12453 | if test "$PKG_CONFIG" = "no" ; then | |
12454 | HAVE_LIBOTF=no | |
12455 | else | |
12456 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
12457 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
12458 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libotf" >&5 | |
12459 | $as_echo_n "checking for libotf... " >&6; } | |
12460 | ||
12461 | if $PKG_CONFIG --exists "libotf" 2>&5; then | |
12462 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
12463 | $as_echo "yes" >&6; } | |
12464 | succeeded=yes | |
12465 | ||
12466 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBOTF_CFLAGS" >&5 | |
12467 | $as_echo_n "checking LIBOTF_CFLAGS... " >&6; } | |
12468 | LIBOTF_CFLAGS=`$PKG_CONFIG --cflags "libotf"|sed -e 's,///*,/,g'` | |
12469 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBOTF_CFLAGS" >&5 | |
12470 | $as_echo "$LIBOTF_CFLAGS" >&6; } | |
12471 | ||
12472 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBOTF_LIBS" >&5 | |
12473 | $as_echo_n "checking LIBOTF_LIBS... " >&6; } | |
12474 | LIBOTF_LIBS=`$PKG_CONFIG --libs "libotf"|sed -e 's,///*,/,g'` | |
12475 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBOTF_LIBS" >&5 | |
12476 | $as_echo "$LIBOTF_LIBS" >&6; } | |
12477 | else | |
12478 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
12479 | $as_echo "no" >&6; } | |
12480 | LIBOTF_CFLAGS="" | |
12481 | LIBOTF_LIBS="" | |
12482 | ## If we have a custom action on failure, don't print errors, but | |
12483 | ## do set a variable so people can do so. | |
12484 | LIBOTF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libotf"` | |
12485 | ||
12486 | fi | |
12487 | ||
12488 | ||
12489 | ||
12490 | else | |
12491 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
12492 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
12493 | fi | |
12494 | fi | |
12495 | ||
12496 | if test $succeeded = yes; then | |
12497 | HAVE_LIBOTF=yes | |
12498 | else | |
12499 | HAVE_LIBOTF=no | |
12500 | fi | |
12501 | ||
12502 | if test "$HAVE_LIBOTF" = "yes"; then | |
12503 | ||
12504 | $as_echo "#define HAVE_LIBOTF 1" >>confdefs.h | |
12505 | ||
12506 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTF_get_variation_glyphs in -lotf" >&5 | |
12507 | $as_echo_n "checking for OTF_get_variation_glyphs in -lotf... " >&6; } | |
5f64f7bd | 12508 | if test "${ac_cv_lib_otf_OTF_get_variation_glyphs+set}" = set; then : |
067d23c9 KY |
12509 | $as_echo_n "(cached) " >&6 |
12510 | else | |
12511 | ac_check_lib_save_LIBS=$LIBS | |
12512 | LIBS="-lotf $LIBS" | |
12513 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12514 | /* end confdefs.h. */ | |
12515 | ||
12516 | /* Override any GCC internal prototype to avoid an error. | |
12517 | Use char because int might match the return type of a GCC | |
12518 | builtin and then its argument prototype would still apply. */ | |
12519 | #ifdef __cplusplus | |
12520 | extern "C" | |
12521 | #endif | |
12522 | char OTF_get_variation_glyphs (); | |
12523 | int | |
12524 | main () | |
12525 | { | |
12526 | return OTF_get_variation_glyphs (); | |
12527 | ; | |
12528 | return 0; | |
12529 | } | |
12530 | _ACEOF | |
12531 | if ac_fn_c_try_link "$LINENO"; then : | |
12532 | ac_cv_lib_otf_OTF_get_variation_glyphs=yes | |
12533 | else | |
12534 | ac_cv_lib_otf_OTF_get_variation_glyphs=no | |
12535 | fi | |
12536 | rm -f core conftest.err conftest.$ac_objext \ | |
12537 | conftest$ac_exeext conftest.$ac_ext | |
12538 | LIBS=$ac_check_lib_save_LIBS | |
12539 | fi | |
12540 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_otf_OTF_get_variation_glyphs" >&5 | |
12541 | $as_echo "$ac_cv_lib_otf_OTF_get_variation_glyphs" >&6; } | |
5f64f7bd | 12542 | if test "x$ac_cv_lib_otf_OTF_get_variation_glyphs" = x""yes; then : |
067d23c9 KY |
12543 | HAVE_OTF_GET_VARIATION_GLYPHS=yes |
12544 | else | |
12545 | HAVE_OTF_GET_VARIATION_GLYPHS=no | |
12546 | fi | |
12547 | ||
12548 | if test "${HAVE_OTF_GET_VARIATION_GLYPHS}" = "yes"; then | |
12549 | ||
12550 | $as_echo "#define HAVE_OTF_GET_VARIATION_GLYPHS 1" >>confdefs.h | |
12551 | ||
12552 | fi | |
12553 | fi | |
12554 | fi | |
12555 | fi | |
12556 | ||
12557 | HAVE_M17N_FLT=no | |
12558 | if test "${HAVE_LIBOTF}" = yes; then | |
12559 | if test "${with_m17n_flt}" != "no"; then | |
12560 | ||
12561 | succeeded=no | |
12562 | ||
12563 | # Extract the first word of "pkg-config", so it can be a program name with args. | |
12564 | set dummy pkg-config; ac_word=$2 | |
12565 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
12566 | $as_echo_n "checking for $ac_word... " >&6; } | |
5f64f7bd | 12567 | if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : |
067d23c9 KY |
12568 | $as_echo_n "(cached) " >&6 |
12569 | else | |
12570 | case $PKG_CONFIG in | |
12571 | [\\/]* | ?:[\\/]*) | |
12572 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
12573 | ;; | |
12574 | *) | |
12575 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
12576 | for as_dir in $PATH | |
12577 | do | |
12578 | IFS=$as_save_IFS | |
12579 | test -z "$as_dir" && as_dir=. | |
12580 | for ac_exec_ext in '' $ac_executable_extensions; do | |
12581 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
12582 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
12583 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
12584 | break 2 | |
12585 | fi | |
12586 | done | |
12587 | done | |
12588 | IFS=$as_save_IFS | |
12589 | ||
12590 | test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" | |
12591 | ;; | |
12592 | esac | |
12593 | fi | |
12594 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG | |
12595 | if test -n "$PKG_CONFIG"; then | |
12596 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
12597 | $as_echo "$PKG_CONFIG" >&6; } | |
12598 | else | |
12599 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
12600 | $as_echo "no" >&6; } | |
12601 | fi | |
12602 | ||
12603 | ||
12604 | ||
12605 | if test "$PKG_CONFIG" = "no" ; then | |
12606 | HAVE_M17N_FLT=no | |
12607 | else | |
12608 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
12609 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
12610 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for m17n-flt" >&5 | |
12611 | $as_echo_n "checking for m17n-flt... " >&6; } | |
12612 | ||
12613 | if $PKG_CONFIG --exists "m17n-flt" 2>&5; then | |
12614 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
12615 | $as_echo "yes" >&6; } | |
12616 | succeeded=yes | |
12617 | ||
12618 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking M17N_FLT_CFLAGS" >&5 | |
12619 | $as_echo_n "checking M17N_FLT_CFLAGS... " >&6; } | |
12620 | M17N_FLT_CFLAGS=`$PKG_CONFIG --cflags "m17n-flt"|sed -e 's,///*,/,g'` | |
12621 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $M17N_FLT_CFLAGS" >&5 | |
12622 | $as_echo "$M17N_FLT_CFLAGS" >&6; } | |
12623 | ||
12624 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking M17N_FLT_LIBS" >&5 | |
12625 | $as_echo_n "checking M17N_FLT_LIBS... " >&6; } | |
12626 | M17N_FLT_LIBS=`$PKG_CONFIG --libs "m17n-flt"|sed -e 's,///*,/,g'` | |
12627 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $M17N_FLT_LIBS" >&5 | |
12628 | $as_echo "$M17N_FLT_LIBS" >&6; } | |
12629 | else | |
12630 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
12631 | $as_echo "no" >&6; } | |
12632 | M17N_FLT_CFLAGS="" | |
12633 | M17N_FLT_LIBS="" | |
12634 | ## If we have a custom action on failure, don't print errors, but | |
12635 | ## do set a variable so people can do so. | |
12636 | M17N_FLT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "m17n-flt"` | |
12637 | ||
12638 | fi | |
12639 | ||
12640 | ||
12641 | ||
12642 | else | |
12643 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
12644 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
12645 | fi | |
12646 | fi | |
12647 | ||
12648 | if test $succeeded = yes; then | |
12649 | HAVE_M17N_FLT=yes | |
12650 | else | |
12651 | HAVE_M17N_FLT=no | |
12652 | fi | |
12653 | ||
12654 | if test "$HAVE_M17N_FLT" = "yes"; then | |
12655 | ||
12656 | $as_echo "#define HAVE_M17N_FLT 1" >>confdefs.h | |
12657 | ||
12658 | fi | |
12659 | fi | |
12660 | fi | |
12661 | else | |
12662 | HAVE_XFT=no | |
12663 | HAVE_FREETYPE=no | |
12664 | HAVE_LIBOTF=no | |
12665 | HAVE_M17N_FLT=no | |
12666 | fi | |
12667 | ||
12668 | ### End of font-backend (under X11) section. | |
12669 | ||
12670 | ||
12671 | ||
12672 | ||
12673 | ||
12674 | ||
12675 | ||
12676 | ||
12677 | ||
12678 | ||
12679 | ### Use -lXpm if available, unless `--with-xpm=no'. | |
12680 | HAVE_XPM=no | |
12681 | LIBXPM= | |
12682 | if test "${HAVE_X11}" = "yes"; then | |
12683 | if test "${with_xpm}" != "no"; then | |
12684 | ac_fn_c_check_header_mongrel "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "$ac_includes_default" | |
5f64f7bd | 12685 | if test "x$ac_cv_header_X11_xpm_h" = x""yes; then : |
067d23c9 KY |
12686 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReadFileToPixmap in -lXpm" >&5 |
12687 | $as_echo_n "checking for XpmReadFileToPixmap in -lXpm... " >&6; } | |
5f64f7bd | 12688 | if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then : |
067d23c9 KY |
12689 | $as_echo_n "(cached) " >&6 |
12690 | else | |
12691 | ac_check_lib_save_LIBS=$LIBS | |
12692 | LIBS="-lXpm -lX11 $LIBS" | |
12693 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12694 | /* end confdefs.h. */ | |
12695 | ||
12696 | /* Override any GCC internal prototype to avoid an error. | |
12697 | Use char because int might match the return type of a GCC | |
12698 | builtin and then its argument prototype would still apply. */ | |
12699 | #ifdef __cplusplus | |
12700 | extern "C" | |
12701 | #endif | |
12702 | char XpmReadFileToPixmap (); | |
12703 | int | |
12704 | main () | |
12705 | { | |
12706 | return XpmReadFileToPixmap (); | |
12707 | ; | |
12708 | return 0; | |
12709 | } | |
12710 | _ACEOF | |
12711 | if ac_fn_c_try_link "$LINENO"; then : | |
12712 | ac_cv_lib_Xpm_XpmReadFileToPixmap=yes | |
12713 | else | |
12714 | ac_cv_lib_Xpm_XpmReadFileToPixmap=no | |
12715 | fi | |
12716 | rm -f core conftest.err conftest.$ac_objext \ | |
12717 | conftest$ac_exeext conftest.$ac_ext | |
12718 | LIBS=$ac_check_lib_save_LIBS | |
12719 | fi | |
12720 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5 | |
12721 | $as_echo "$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6; } | |
5f64f7bd | 12722 | if test "x$ac_cv_lib_Xpm_XpmReadFileToPixmap" = x""yes; then : |
067d23c9 KY |
12723 | HAVE_XPM=yes |
12724 | fi | |
12725 | ||
12726 | fi | |
12727 | ||
12728 | ||
12729 | if test "${HAVE_XPM}" = "yes"; then | |
12730 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReturnAllocPixels preprocessor define" >&5 | |
12731 | $as_echo_n "checking for XpmReturnAllocPixels preprocessor define... " >&6; } | |
12732 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12733 | /* end confdefs.h. */ | |
12734 | #include "X11/xpm.h" | |
12735 | #ifndef XpmReturnAllocPixels | |
12736 | no_return_alloc_pixels | |
12737 | #endif | |
12738 | ||
12739 | _ACEOF | |
12740 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
12741 | $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then : | |
12742 | HAVE_XPM=no | |
12743 | else | |
12744 | HAVE_XPM=yes | |
12745 | fi | |
12746 | rm -f conftest* | |
12747 | ||
12748 | ||
12749 | if test "${HAVE_XPM}" = "yes"; then | |
12750 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
12751 | $as_echo "yes" >&6; } | |
12752 | else | |
12753 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
12754 | $as_echo "no" >&6; } | |
12755 | fi | |
12756 | fi | |
12757 | fi | |
12758 | ||
12759 | if test "${HAVE_XPM}" = "yes"; then | |
12760 | ||
12761 | $as_echo "#define HAVE_XPM 1" >>confdefs.h | |
12762 | ||
12763 | LIBXPM=-lXpm | |
12764 | fi | |
12765 | fi | |
12766 | ||
12767 | ||
12768 | ### Use -ljpeg if available, unless `--with-jpeg=no'. | |
12769 | HAVE_JPEG=no | |
12770 | LIBJPEG= | |
12771 | if test "${HAVE_X11}" = "yes"; then | |
12772 | if test "${with_jpeg}" != "no"; then | |
12773 | ac_fn_c_check_header_mongrel "$LINENO" "jerror.h" "ac_cv_header_jerror_h" "$ac_includes_default" | |
5f64f7bd | 12774 | if test "x$ac_cv_header_jerror_h" = x""yes; then : |
067d23c9 KY |
12775 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_destroy_compress in -ljpeg" >&5 |
12776 | $as_echo_n "checking for jpeg_destroy_compress in -ljpeg... " >&6; } | |
5f64f7bd | 12777 | if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then : |
067d23c9 KY |
12778 | $as_echo_n "(cached) " >&6 |
12779 | else | |
12780 | ac_check_lib_save_LIBS=$LIBS | |
12781 | LIBS="-ljpeg $LIBS" | |
12782 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12783 | /* end confdefs.h. */ | |
12784 | ||
12785 | /* Override any GCC internal prototype to avoid an error. | |
12786 | Use char because int might match the return type of a GCC | |
12787 | builtin and then its argument prototype would still apply. */ | |
12788 | #ifdef __cplusplus | |
12789 | extern "C" | |
12790 | #endif | |
12791 | char jpeg_destroy_compress (); | |
12792 | int | |
12793 | main () | |
12794 | { | |
12795 | return jpeg_destroy_compress (); | |
12796 | ; | |
12797 | return 0; | |
12798 | } | |
12799 | _ACEOF | |
12800 | if ac_fn_c_try_link "$LINENO"; then : | |
12801 | ac_cv_lib_jpeg_jpeg_destroy_compress=yes | |
12802 | else | |
12803 | ac_cv_lib_jpeg_jpeg_destroy_compress=no | |
12804 | fi | |
12805 | rm -f core conftest.err conftest.$ac_objext \ | |
12806 | conftest$ac_exeext conftest.$ac_ext | |
12807 | LIBS=$ac_check_lib_save_LIBS | |
12808 | fi | |
12809 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5 | |
12810 | $as_echo "$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6; } | |
5f64f7bd | 12811 | if test "x$ac_cv_lib_jpeg_jpeg_destroy_compress" = x""yes; then : |
067d23c9 KY |
12812 | HAVE_JPEG=yes |
12813 | fi | |
12814 | ||
12815 | fi | |
12816 | ||
12817 | ||
12818 | fi | |
12819 | ||
12820 | if test "${HAVE_JPEG}" = "yes"; then | |
12821 | $as_echo "#define HAVE_JPEG 1" >>confdefs.h | |
12822 | ||
12823 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12824 | /* end confdefs.h. */ | |
12825 | #include <jpeglib.h> | |
12826 | version=JPEG_LIB_VERSION | |
12827 | ||
12828 | _ACEOF | |
12829 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
12830 | $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then : | |
12831 | $as_echo "#define HAVE_JPEG 1" >>confdefs.h | |
12832 | ||
12833 | else | |
12834 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libjpeg found, but not version 6b or later" >&5 | |
12835 | $as_echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;} | |
12836 | HAVE_JPEG=no | |
12837 | fi | |
12838 | rm -f conftest* | |
12839 | ||
12840 | fi | |
12841 | if test "${HAVE_JPEG}" = "yes"; then | |
12842 | LIBJPEG=-ljpeg | |
12843 | fi | |
12844 | fi | |
12845 | ||
12846 | ||
12847 | ### Use -lpng if available, unless `--with-png=no'. | |
12848 | HAVE_PNG=no | |
12849 | LIBPNG= | |
12850 | if test "${HAVE_X11}" = "yes"; then | |
12851 | if test "${with_png}" != "no"; then | |
12852 | # Debian unstable as of July 2003 has multiple libpngs, and puts png.h | |
12853 | # in /usr/include/libpng. | |
12854 | for ac_header in png.h libpng/png.h | |
12855 | do : | |
12856 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
12857 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
5f64f7bd GM |
12858 | eval as_val=\$$as_ac_Header |
12859 | if test "x$as_val" = x""yes; then : | |
067d23c9 KY |
12860 | cat >>confdefs.h <<_ACEOF |
12861 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
12862 | _ACEOF | |
12863 | ||
12864 | fi | |
12865 | ||
12866 | done | |
12867 | ||
12868 | if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then | |
12869 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_get_channels in -lpng" >&5 | |
12870 | $as_echo_n "checking for png_get_channels in -lpng... " >&6; } | |
5f64f7bd | 12871 | if test "${ac_cv_lib_png_png_get_channels+set}" = set; then : |
067d23c9 KY |
12872 | $as_echo_n "(cached) " >&6 |
12873 | else | |
12874 | ac_check_lib_save_LIBS=$LIBS | |
12875 | LIBS="-lpng -lz -lm $LIBS" | |
12876 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12877 | /* end confdefs.h. */ | |
12878 | ||
12879 | /* Override any GCC internal prototype to avoid an error. | |
12880 | Use char because int might match the return type of a GCC | |
12881 | builtin and then its argument prototype would still apply. */ | |
12882 | #ifdef __cplusplus | |
12883 | extern "C" | |
12884 | #endif | |
12885 | char png_get_channels (); | |
12886 | int | |
12887 | main () | |
12888 | { | |
12889 | return png_get_channels (); | |
12890 | ; | |
12891 | return 0; | |
12892 | } | |
12893 | _ACEOF | |
12894 | if ac_fn_c_try_link "$LINENO"; then : | |
12895 | ac_cv_lib_png_png_get_channels=yes | |
12896 | else | |
12897 | ac_cv_lib_png_png_get_channels=no | |
12898 | fi | |
12899 | rm -f core conftest.err conftest.$ac_objext \ | |
12900 | conftest$ac_exeext conftest.$ac_ext | |
12901 | LIBS=$ac_check_lib_save_LIBS | |
12902 | fi | |
12903 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_png_png_get_channels" >&5 | |
12904 | $as_echo "$ac_cv_lib_png_png_get_channels" >&6; } | |
5f64f7bd | 12905 | if test "x$ac_cv_lib_png_png_get_channels" = x""yes; then : |
067d23c9 KY |
12906 | HAVE_PNG=yes |
12907 | fi | |
12908 | ||
12909 | fi | |
12910 | fi | |
12911 | ||
12912 | if test "${HAVE_PNG}" = "yes"; then | |
12913 | ||
12914 | $as_echo "#define HAVE_PNG 1" >>confdefs.h | |
12915 | ||
12916 | LIBPNG="-lpng -lz -lm" | |
12917 | fi | |
12918 | fi | |
12919 | ||
12920 | ||
12921 | ### Use -ltiff if available, unless `--with-tiff=no'. | |
12922 | HAVE_TIFF=no | |
12923 | LIBTIFF= | |
12924 | if test "${HAVE_X11}" = "yes"; then | |
12925 | if test "${with_tiff}" != "no"; then | |
12926 | ac_fn_c_check_header_mongrel "$LINENO" "tiffio.h" "ac_cv_header_tiffio_h" "$ac_includes_default" | |
5f64f7bd | 12927 | if test "x$ac_cv_header_tiffio_h" = x""yes; then : |
067d23c9 KY |
12928 | tifflibs="-lz -lm" |
12929 | # At least one tiff package requires the jpeg library. | |
12930 | if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi | |
12931 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIFFGetVersion in -ltiff" >&5 | |
12932 | $as_echo_n "checking for TIFFGetVersion in -ltiff... " >&6; } | |
5f64f7bd | 12933 | if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then : |
067d23c9 KY |
12934 | $as_echo_n "(cached) " >&6 |
12935 | else | |
12936 | ac_check_lib_save_LIBS=$LIBS | |
12937 | LIBS="-ltiff $tifflibs $LIBS" | |
12938 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12939 | /* end confdefs.h. */ | |
12940 | ||
12941 | /* Override any GCC internal prototype to avoid an error. | |
12942 | Use char because int might match the return type of a GCC | |
12943 | builtin and then its argument prototype would still apply. */ | |
12944 | #ifdef __cplusplus | |
12945 | extern "C" | |
12946 | #endif | |
12947 | char TIFFGetVersion (); | |
12948 | int | |
12949 | main () | |
12950 | { | |
12951 | return TIFFGetVersion (); | |
12952 | ; | |
12953 | return 0; | |
12954 | } | |
12955 | _ACEOF | |
12956 | if ac_fn_c_try_link "$LINENO"; then : | |
12957 | ac_cv_lib_tiff_TIFFGetVersion=yes | |
12958 | else | |
12959 | ac_cv_lib_tiff_TIFFGetVersion=no | |
12960 | fi | |
12961 | rm -f core conftest.err conftest.$ac_objext \ | |
12962 | conftest$ac_exeext conftest.$ac_ext | |
12963 | LIBS=$ac_check_lib_save_LIBS | |
12964 | fi | |
12965 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5 | |
12966 | $as_echo "$ac_cv_lib_tiff_TIFFGetVersion" >&6; } | |
5f64f7bd | 12967 | if test "x$ac_cv_lib_tiff_TIFFGetVersion" = x""yes; then : |
067d23c9 KY |
12968 | HAVE_TIFF=yes |
12969 | fi | |
12970 | ||
12971 | fi | |
12972 | ||
12973 | ||
12974 | fi | |
12975 | ||
12976 | if test "${HAVE_TIFF}" = "yes"; then | |
12977 | ||
12978 | $as_echo "#define HAVE_TIFF 1" >>confdefs.h | |
12979 | ||
12980 | LIBTIFF=-ltiff | |
12981 | fi | |
12982 | fi | |
12983 | ||
12984 | ||
12985 | ### Use -lgif or -lungif if available, unless `--with-gif=no'. | |
12986 | HAVE_GIF=no | |
12987 | LIBGIF= | |
12988 | if test "${HAVE_X11}" = "yes" && test "${with_gif}" != "no"; then | |
12989 | ac_fn_c_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default" | |
5f64f7bd | 12990 | if test "x$ac_cv_header_gif_lib_h" = x""yes; then : |
067d23c9 KY |
12991 | # EGifPutExtensionLast only exists from version libungif-4.1.0b1. |
12992 | # Earlier versions can crash Emacs. | |
12993 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lgif" >&5 | |
12994 | $as_echo_n "checking for EGifPutExtensionLast in -lgif... " >&6; } | |
5f64f7bd | 12995 | if test "${ac_cv_lib_gif_EGifPutExtensionLast+set}" = set; then : |
067d23c9 KY |
12996 | $as_echo_n "(cached) " >&6 |
12997 | else | |
12998 | ac_check_lib_save_LIBS=$LIBS | |
12999 | LIBS="-lgif $LIBS" | |
13000 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13001 | /* end confdefs.h. */ | |
13002 | ||
13003 | /* Override any GCC internal prototype to avoid an error. | |
13004 | Use char because int might match the return type of a GCC | |
13005 | builtin and then its argument prototype would still apply. */ | |
13006 | #ifdef __cplusplus | |
13007 | extern "C" | |
13008 | #endif | |
13009 | char EGifPutExtensionLast (); | |
13010 | int | |
13011 | main () | |
13012 | { | |
13013 | return EGifPutExtensionLast (); | |
13014 | ; | |
13015 | return 0; | |
13016 | } | |
13017 | _ACEOF | |
13018 | if ac_fn_c_try_link "$LINENO"; then : | |
13019 | ac_cv_lib_gif_EGifPutExtensionLast=yes | |
13020 | else | |
13021 | ac_cv_lib_gif_EGifPutExtensionLast=no | |
13022 | fi | |
13023 | rm -f core conftest.err conftest.$ac_objext \ | |
13024 | conftest$ac_exeext conftest.$ac_ext | |
13025 | LIBS=$ac_check_lib_save_LIBS | |
13026 | fi | |
13027 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_EGifPutExtensionLast" >&5 | |
13028 | $as_echo "$ac_cv_lib_gif_EGifPutExtensionLast" >&6; } | |
5f64f7bd | 13029 | if test "x$ac_cv_lib_gif_EGifPutExtensionLast" = x""yes; then : |
067d23c9 KY |
13030 | HAVE_GIF=yes |
13031 | else | |
13032 | HAVE_GIF=maybe | |
13033 | fi | |
13034 | ||
13035 | fi | |
13036 | ||
13037 | ||
13038 | ||
13039 | if test "$HAVE_GIF" = yes; then | |
13040 | LIBGIF=-lgif | |
13041 | elif test "$HAVE_GIF" = maybe; then | |
13042 | # If gif_lib.h but no libgif, try libungif. | |
13043 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lungif" >&5 | |
13044 | $as_echo_n "checking for EGifPutExtensionLast in -lungif... " >&6; } | |
5f64f7bd | 13045 | if test "${ac_cv_lib_ungif_EGifPutExtensionLast+set}" = set; then : |
067d23c9 KY |
13046 | $as_echo_n "(cached) " >&6 |
13047 | else | |
13048 | ac_check_lib_save_LIBS=$LIBS | |
13049 | LIBS="-lungif $LIBS" | |
13050 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13051 | /* end confdefs.h. */ | |
13052 | ||
13053 | /* Override any GCC internal prototype to avoid an error. | |
13054 | Use char because int might match the return type of a GCC | |
13055 | builtin and then its argument prototype would still apply. */ | |
13056 | #ifdef __cplusplus | |
13057 | extern "C" | |
13058 | #endif | |
13059 | char EGifPutExtensionLast (); | |
13060 | int | |
13061 | main () | |
13062 | { | |
13063 | return EGifPutExtensionLast (); | |
13064 | ; | |
13065 | return 0; | |
13066 | } | |
13067 | _ACEOF | |
13068 | if ac_fn_c_try_link "$LINENO"; then : | |
13069 | ac_cv_lib_ungif_EGifPutExtensionLast=yes | |
13070 | else | |
13071 | ac_cv_lib_ungif_EGifPutExtensionLast=no | |
13072 | fi | |
13073 | rm -f core conftest.err conftest.$ac_objext \ | |
13074 | conftest$ac_exeext conftest.$ac_ext | |
13075 | LIBS=$ac_check_lib_save_LIBS | |
13076 | fi | |
13077 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5 | |
13078 | $as_echo "$ac_cv_lib_ungif_EGifPutExtensionLast" >&6; } | |
5f64f7bd | 13079 | if test "x$ac_cv_lib_ungif_EGifPutExtensionLast" = x""yes; then : |
067d23c9 KY |
13080 | HAVE_GIF=yes |
13081 | else | |
13082 | HAVE_GIF=no | |
13083 | fi | |
13084 | ||
13085 | test "$HAVE_GIF" = yes && LIBGIF=-lungif | |
13086 | fi | |
13087 | ||
13088 | if test "${HAVE_GIF}" = "yes"; then | |
13089 | ||
13090 | $as_echo "#define HAVE_GIF 1" >>confdefs.h | |
13091 | ||
13092 | fi | |
13093 | fi | |
13094 | ||
13095 | ||
13096 | if test "${HAVE_X11}" = "yes"; then | |
13097 | MISSING="" | |
13098 | WITH_NO="" | |
13099 | test "${with_xpm}" != "no" && test "${HAVE_XPM}" != "yes" && | |
13100 | MISSING="libXpm" && WITH_NO="--with-xpm=no" | |
13101 | test "${with_jpeg}" != "no" && test "${HAVE_JPEG}" != "yes" && | |
13102 | MISSING="$MISSING libjpeg" && WITH_NO="$WITH_NO --with-jpeg=no" | |
13103 | test "${with_png}" != "no" && test "${HAVE_PNG}" != "yes" && | |
13104 | MISSING="$MISSING libpng" && WITH_NO="$WITH_NO --with-png=no" | |
13105 | test "${with_gif}" != "no" && test "${HAVE_GIF}" != "yes" && | |
13106 | MISSING="$MISSING libgif/libungif" && WITH_NO="$WITH_NO --with-gif=no" | |
13107 | test "${with_tiff}" != "no" && test "${HAVE_TIFF}" != "yes" && | |
13108 | MISSING="$MISSING libtiff" && WITH_NO="$WITH_NO --with-tiff=no" | |
13109 | ||
13110 | if test "X${MISSING}" != X; then | |
5f64f7bd | 13111 | as_fn_error "The following required libraries were not found: |
067d23c9 KY |
13112 | $MISSING |
13113 | Maybe some development libraries/packages are missing? | |
13114 | If you don't want to link with them give | |
13115 | $WITH_NO | |
13116 | as options to configure" "$LINENO" 5 | |
13117 | fi | |
13118 | fi | |
13119 | ||
13120 | ### Use -lgpm if available, unless `--with-gpm=no'. | |
13121 | HAVE_GPM=no | |
13122 | LIBGPM= | |
067d23c9 KY |
13123 | if test "${with_gpm}" != "no"; then |
13124 | ac_fn_c_check_header_mongrel "$LINENO" "gpm.h" "ac_cv_header_gpm_h" "$ac_includes_default" | |
5f64f7bd | 13125 | if test "x$ac_cv_header_gpm_h" = x""yes; then : |
067d23c9 KY |
13126 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Gpm_Open in -lgpm" >&5 |
13127 | $as_echo_n "checking for Gpm_Open in -lgpm... " >&6; } | |
5f64f7bd | 13128 | if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then : |
067d23c9 KY |
13129 | $as_echo_n "(cached) " >&6 |
13130 | else | |
13131 | ac_check_lib_save_LIBS=$LIBS | |
13132 | LIBS="-lgpm $LIBS" | |
13133 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13134 | /* end confdefs.h. */ | |
13135 | ||
13136 | /* Override any GCC internal prototype to avoid an error. | |
13137 | Use char because int might match the return type of a GCC | |
13138 | builtin and then its argument prototype would still apply. */ | |
13139 | #ifdef __cplusplus | |
13140 | extern "C" | |
13141 | #endif | |
13142 | char Gpm_Open (); | |
13143 | int | |
13144 | main () | |
13145 | { | |
13146 | return Gpm_Open (); | |
13147 | ; | |
13148 | return 0; | |
13149 | } | |
13150 | _ACEOF | |
13151 | if ac_fn_c_try_link "$LINENO"; then : | |
13152 | ac_cv_lib_gpm_Gpm_Open=yes | |
13153 | else | |
13154 | ac_cv_lib_gpm_Gpm_Open=no | |
13155 | fi | |
13156 | rm -f core conftest.err conftest.$ac_objext \ | |
13157 | conftest$ac_exeext conftest.$ac_ext | |
13158 | LIBS=$ac_check_lib_save_LIBS | |
13159 | fi | |
13160 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gpm_Gpm_Open" >&5 | |
13161 | $as_echo "$ac_cv_lib_gpm_Gpm_Open" >&6; } | |
5f64f7bd | 13162 | if test "x$ac_cv_lib_gpm_Gpm_Open" = x""yes; then : |
067d23c9 KY |
13163 | HAVE_GPM=yes |
13164 | fi | |
13165 | ||
13166 | fi | |
13167 | ||
13168 | ||
13169 | ||
13170 | if test "${HAVE_GPM}" = "yes"; then | |
13171 | ||
13172 | $as_echo "#define HAVE_GPM 1" >>confdefs.h | |
13173 | ||
13174 | LIBGPM=-lgpm | |
067d23c9 KY |
13175 | fi |
13176 | fi | |
13177 | ||
13178 | ||
13179 | ac_fn_c_check_header_mongrel "$LINENO" "malloc/malloc.h" "ac_cv_header_malloc_malloc_h" "$ac_includes_default" | |
5f64f7bd | 13180 | if test "x$ac_cv_header_malloc_malloc_h" = x""yes; then : |
067d23c9 KY |
13181 | |
13182 | $as_echo "#define HAVE_MALLOC_MALLOC_H 1" >>confdefs.h | |
13183 | ||
13184 | fi | |
13185 | ||
13186 | ||
13187 | ||
13188 | C_SWITCH_X_SYSTEM= | |
13189 | ### Use NeXTstep API to implement GUI. | |
13190 | if test "${HAVE_NS}" = "yes"; then | |
13191 | ||
13192 | $as_echo "#define HAVE_NS 1" >>confdefs.h | |
13193 | ||
13194 | if test "${NS_IMPL_COCOA}" = "yes"; then | |
13195 | ||
13196 | $as_echo "#define NS_IMPL_COCOA 1" >>confdefs.h | |
13197 | ||
13198 | GNU_OBJC_CFLAGS= | |
13199 | fi | |
13200 | if test "${NS_IMPL_GNUSTEP}" = "yes"; then | |
13201 | ||
13202 | $as_echo "#define NS_IMPL_GNUSTEP 1" >>confdefs.h | |
13203 | ||
13204 | # See also .m.o rule in Makefile.in */ | |
13205 | # FIXME: are all these flags really needed? Document here why. */ | |
13206 | C_SWITCH_X_SYSTEM="-D_REENTRANT -fPIC -fno-strict-aliasing" | |
13207 | GNU_OBJC_CFLAGS="-fgnu-runtime -Wno-import -fconstant-string-class=NSConstantString -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGSWARN -DGSDIAGNOSE" | |
13208 | fi | |
13209 | if test "${NS_HAVE_NSINTEGER}" = "yes"; then | |
13210 | ||
13211 | $as_echo "#define NS_HAVE_NSINTEGER 1" >>confdefs.h | |
13212 | ||
13213 | fi | |
13214 | # We also have mouse menus. | |
13215 | HAVE_MENUS=yes | |
13216 | OTHER_FILES=ns-app | |
13217 | fi | |
13218 | ||
13219 | ||
13220 | ### Use session management (-lSM -lICE) if available | |
13221 | HAVE_X_SM=no | |
13222 | LIBXSM= | |
13223 | if test "${HAVE_X11}" = "yes"; then | |
13224 | ac_fn_c_check_header_mongrel "$LINENO" "X11/SM/SMlib.h" "ac_cv_header_X11_SM_SMlib_h" "$ac_includes_default" | |
5f64f7bd | 13225 | if test "x$ac_cv_header_X11_SM_SMlib_h" = x""yes; then : |
067d23c9 KY |
13226 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SmcOpenConnection in -lSM" >&5 |
13227 | $as_echo_n "checking for SmcOpenConnection in -lSM... " >&6; } | |
5f64f7bd | 13228 | if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then : |
067d23c9 KY |
13229 | $as_echo_n "(cached) " >&6 |
13230 | else | |
13231 | ac_check_lib_save_LIBS=$LIBS | |
13232 | LIBS="-lSM -lICE $LIBS" | |
13233 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13234 | /* end confdefs.h. */ | |
13235 | ||
13236 | /* Override any GCC internal prototype to avoid an error. | |
13237 | Use char because int might match the return type of a GCC | |
13238 | builtin and then its argument prototype would still apply. */ | |
13239 | #ifdef __cplusplus | |
13240 | extern "C" | |
13241 | #endif | |
13242 | char SmcOpenConnection (); | |
13243 | int | |
13244 | main () | |
13245 | { | |
13246 | return SmcOpenConnection (); | |
13247 | ; | |
13248 | return 0; | |
13249 | } | |
13250 | _ACEOF | |
13251 | if ac_fn_c_try_link "$LINENO"; then : | |
13252 | ac_cv_lib_SM_SmcOpenConnection=yes | |
13253 | else | |
13254 | ac_cv_lib_SM_SmcOpenConnection=no | |
13255 | fi | |
13256 | rm -f core conftest.err conftest.$ac_objext \ | |
13257 | conftest$ac_exeext conftest.$ac_ext | |
13258 | LIBS=$ac_check_lib_save_LIBS | |
13259 | fi | |
13260 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_SM_SmcOpenConnection" >&5 | |
13261 | $as_echo "$ac_cv_lib_SM_SmcOpenConnection" >&6; } | |
5f64f7bd | 13262 | if test "x$ac_cv_lib_SM_SmcOpenConnection" = x""yes; then : |
067d23c9 KY |
13263 | HAVE_X_SM=yes |
13264 | fi | |
13265 | ||
13266 | fi | |
13267 | ||
13268 | ||
13269 | ||
13270 | if test "${HAVE_X_SM}" = "yes"; then | |
13271 | ||
13272 | $as_echo "#define HAVE_X_SM 1" >>confdefs.h | |
13273 | ||
13274 | LIBXSM="-lSM -lICE" | |
13275 | case "$LIBS" in | |
13276 | *-lSM*) ;; | |
13277 | *) LIBS="$LIBXSM $LIBS" ;; | |
13278 | esac | |
13279 | fi | |
13280 | fi | |
13281 | ||
13282 | ||
13283 | ### Use libxml (-lxml2) if available | |
13284 | if test "${with_xml2}" != "no"; then | |
13285 | ### I'm not sure what the version number should be, so I just guessed. | |
13286 | ||
13287 | succeeded=no | |
13288 | ||
13289 | # Extract the first word of "pkg-config", so it can be a program name with args. | |
13290 | set dummy pkg-config; ac_word=$2 | |
13291 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
13292 | $as_echo_n "checking for $ac_word... " >&6; } | |
5f64f7bd | 13293 | if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : |
067d23c9 KY |
13294 | $as_echo_n "(cached) " >&6 |
13295 | else | |
13296 | case $PKG_CONFIG in | |
13297 | [\\/]* | ?:[\\/]*) | |
13298 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
13299 | ;; | |
13300 | *) | |
13301 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
13302 | for as_dir in $PATH | |
13303 | do | |
13304 | IFS=$as_save_IFS | |
13305 | test -z "$as_dir" && as_dir=. | |
13306 | for ac_exec_ext in '' $ac_executable_extensions; do | |
13307 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
13308 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
13309 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
13310 | break 2 | |
13311 | fi | |
13312 | done | |
13313 | done | |
13314 | IFS=$as_save_IFS | |
13315 | ||
13316 | test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" | |
13317 | ;; | |
13318 | esac | |
13319 | fi | |
13320 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG | |
13321 | if test -n "$PKG_CONFIG"; then | |
13322 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
13323 | $as_echo "$PKG_CONFIG" >&6; } | |
13324 | else | |
13325 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
13326 | $as_echo "no" >&6; } | |
13327 | fi | |
13328 | ||
13329 | ||
13330 | ||
13331 | if test "$PKG_CONFIG" = "no" ; then | |
13332 | HAVE_LIBXML2=no | |
13333 | else | |
13334 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
13335 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
dab73760 CY |
13336 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxml-2.0 > 2.6.17" >&5 |
13337 | $as_echo_n "checking for libxml-2.0 > 2.6.17... " >&6; } | |
067d23c9 | 13338 | |
dab73760 | 13339 | if $PKG_CONFIG --exists "libxml-2.0 > 2.6.17" 2>&5; then |
067d23c9 KY |
13340 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
13341 | $as_echo "yes" >&6; } | |
13342 | succeeded=yes | |
13343 | ||
13344 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBXML2_CFLAGS" >&5 | |
13345 | $as_echo_n "checking LIBXML2_CFLAGS... " >&6; } | |
dab73760 | 13346 | LIBXML2_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0 > 2.6.17"|sed -e 's,///*,/,g'` |
067d23c9 KY |
13347 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBXML2_CFLAGS" >&5 |
13348 | $as_echo "$LIBXML2_CFLAGS" >&6; } | |
13349 | ||
13350 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBXML2_LIBS" >&5 | |
13351 | $as_echo_n "checking LIBXML2_LIBS... " >&6; } | |
dab73760 | 13352 | LIBXML2_LIBS=`$PKG_CONFIG --libs "libxml-2.0 > 2.6.17"|sed -e 's,///*,/,g'` |
067d23c9 KY |
13353 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBXML2_LIBS" >&5 |
13354 | $as_echo "$LIBXML2_LIBS" >&6; } | |
13355 | else | |
13356 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
13357 | $as_echo "no" >&6; } | |
13358 | LIBXML2_CFLAGS="" | |
13359 | LIBXML2_LIBS="" | |
13360 | ## If we have a custom action on failure, don't print errors, but | |
13361 | ## do set a variable so people can do so. | |
dab73760 | 13362 | LIBXML2_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libxml-2.0 > 2.6.17"` |
067d23c9 KY |
13363 | |
13364 | fi | |
13365 | ||
13366 | ||
13367 | ||
13368 | else | |
13369 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
13370 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
13371 | fi | |
13372 | fi | |
13373 | ||
13374 | if test $succeeded = yes; then | |
13375 | HAVE_LIBXML2=yes | |
13376 | else | |
13377 | HAVE_LIBXML2=no | |
13378 | fi | |
13379 | ||
13380 | if test "${HAVE_LIBXML2}" = "yes"; then | |
13381 | LIBS="$LIBXML2_LIBS $LIBS" | |
13382 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for htmlReadMemory in -lxml2" >&5 | |
13383 | $as_echo_n "checking for htmlReadMemory in -lxml2... " >&6; } | |
5f64f7bd | 13384 | if test "${ac_cv_lib_xml2_htmlReadMemory+set}" = set; then : |
067d23c9 KY |
13385 | $as_echo_n "(cached) " >&6 |
13386 | else | |
13387 | ac_check_lib_save_LIBS=$LIBS | |
13388 | LIBS="-lxml2 $LIBS" | |
13389 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13390 | /* end confdefs.h. */ | |
13391 | ||
13392 | /* Override any GCC internal prototype to avoid an error. | |
13393 | Use char because int might match the return type of a GCC | |
13394 | builtin and then its argument prototype would still apply. */ | |
13395 | #ifdef __cplusplus | |
13396 | extern "C" | |
13397 | #endif | |
13398 | char htmlReadMemory (); | |
13399 | int | |
13400 | main () | |
13401 | { | |
13402 | return htmlReadMemory (); | |
13403 | ; | |
13404 | return 0; | |
13405 | } | |
13406 | _ACEOF | |
13407 | if ac_fn_c_try_link "$LINENO"; then : | |
13408 | ac_cv_lib_xml2_htmlReadMemory=yes | |
13409 | else | |
13410 | ac_cv_lib_xml2_htmlReadMemory=no | |
13411 | fi | |
13412 | rm -f core conftest.err conftest.$ac_objext \ | |
13413 | conftest$ac_exeext conftest.$ac_ext | |
13414 | LIBS=$ac_check_lib_save_LIBS | |
13415 | fi | |
13416 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_htmlReadMemory" >&5 | |
13417 | $as_echo "$ac_cv_lib_xml2_htmlReadMemory" >&6; } | |
5f64f7bd | 13418 | if test "x$ac_cv_lib_xml2_htmlReadMemory" = x""yes; then : |
067d23c9 KY |
13419 | HAVE_LIBXML2=yes |
13420 | else | |
13421 | HAVE_LIBXML2=no | |
13422 | fi | |
13423 | ||
13424 | if test "${HAVE_LIBXML2}" = "yes"; then | |
13425 | ||
13426 | $as_echo "#define HAVE_LIBXML2 1" >>confdefs.h | |
13427 | ||
13428 | else | |
13429 | LIBXML2_LIBS="" | |
13430 | LIBXML2_CFLAGS="" | |
13431 | fi | |
13432 | fi | |
13433 | fi | |
13434 | ||
13435 | ||
13436 | ||
13437 | # If netdb.h doesn't declare h_errno, we must declare it by hand. | |
13438 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether netdb declares h_errno" >&5 | |
13439 | $as_echo_n "checking whether netdb declares h_errno... " >&6; } | |
5f64f7bd | 13440 | if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then : |
067d23c9 KY |
13441 | $as_echo_n "(cached) " >&6 |
13442 | else | |
13443 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13444 | /* end confdefs.h. */ | |
13445 | #include <netdb.h> | |
13446 | int | |
13447 | main () | |
13448 | { | |
13449 | return h_errno; | |
13450 | ; | |
13451 | return 0; | |
13452 | } | |
13453 | _ACEOF | |
13454 | if ac_fn_c_try_link "$LINENO"; then : | |
13455 | emacs_cv_netdb_declares_h_errno=yes | |
13456 | else | |
13457 | emacs_cv_netdb_declares_h_errno=no | |
13458 | fi | |
13459 | rm -f core conftest.err conftest.$ac_objext \ | |
13460 | conftest$ac_exeext conftest.$ac_ext | |
13461 | fi | |
13462 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_netdb_declares_h_errno" >&5 | |
13463 | $as_echo "$emacs_cv_netdb_declares_h_errno" >&6; } | |
13464 | if test $emacs_cv_netdb_declares_h_errno = yes; then | |
13465 | ||
13466 | $as_echo "#define HAVE_H_ERRNO 1" >>confdefs.h | |
13467 | ||
13468 | fi | |
13469 | ||
067d23c9 KY |
13470 | # fmod, logb, and frexp are found in -lm on most systems. |
13471 | # On HPUX 9.01, -lm does not contain logb, so check for sqrt. | |
13472 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5 | |
13473 | $as_echo_n "checking for sqrt in -lm... " >&6; } | |
5f64f7bd | 13474 | if test "${ac_cv_lib_m_sqrt+set}" = set; then : |
067d23c9 KY |
13475 | $as_echo_n "(cached) " >&6 |
13476 | else | |
13477 | ac_check_lib_save_LIBS=$LIBS | |
13478 | LIBS="-lm $LIBS" | |
13479 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13480 | /* end confdefs.h. */ | |
13481 | ||
13482 | /* Override any GCC internal prototype to avoid an error. | |
13483 | Use char because int might match the return type of a GCC | |
13484 | builtin and then its argument prototype would still apply. */ | |
13485 | #ifdef __cplusplus | |
13486 | extern "C" | |
13487 | #endif | |
13488 | char sqrt (); | |
13489 | int | |
13490 | main () | |
13491 | { | |
13492 | return sqrt (); | |
13493 | ; | |
13494 | return 0; | |
13495 | } | |
13496 | _ACEOF | |
13497 | if ac_fn_c_try_link "$LINENO"; then : | |
13498 | ac_cv_lib_m_sqrt=yes | |
13499 | else | |
13500 | ac_cv_lib_m_sqrt=no | |
13501 | fi | |
13502 | rm -f core conftest.err conftest.$ac_objext \ | |
13503 | conftest$ac_exeext conftest.$ac_ext | |
13504 | LIBS=$ac_check_lib_save_LIBS | |
13505 | fi | |
13506 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sqrt" >&5 | |
13507 | $as_echo "$ac_cv_lib_m_sqrt" >&6; } | |
5f64f7bd | 13508 | if test "x$ac_cv_lib_m_sqrt" = x""yes; then : |
067d23c9 KY |
13509 | cat >>confdefs.h <<_ACEOF |
13510 | #define HAVE_LIBM 1 | |
13511 | _ACEOF | |
13512 | ||
13513 | LIBS="-lm $LIBS" | |
13514 | ||
13515 | fi | |
13516 | ||
13517 | ||
13518 | # Check for mail-locking functions in a "mail" library. Probably this should | |
13519 | # have the same check as for liblockfile below. | |
13520 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -lmail" >&5 | |
13521 | $as_echo_n "checking for maillock in -lmail... " >&6; } | |
5f64f7bd | 13522 | if test "${ac_cv_lib_mail_maillock+set}" = set; then : |
067d23c9 KY |
13523 | $as_echo_n "(cached) " >&6 |
13524 | else | |
13525 | ac_check_lib_save_LIBS=$LIBS | |
13526 | LIBS="-lmail $LIBS" | |
13527 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13528 | /* end confdefs.h. */ | |
13529 | ||
13530 | /* Override any GCC internal prototype to avoid an error. | |
13531 | Use char because int might match the return type of a GCC | |
13532 | builtin and then its argument prototype would still apply. */ | |
13533 | #ifdef __cplusplus | |
13534 | extern "C" | |
13535 | #endif | |
13536 | char maillock (); | |
13537 | int | |
13538 | main () | |
13539 | { | |
13540 | return maillock (); | |
13541 | ; | |
13542 | return 0; | |
13543 | } | |
13544 | _ACEOF | |
13545 | if ac_fn_c_try_link "$LINENO"; then : | |
13546 | ac_cv_lib_mail_maillock=yes | |
13547 | else | |
13548 | ac_cv_lib_mail_maillock=no | |
13549 | fi | |
13550 | rm -f core conftest.err conftest.$ac_objext \ | |
13551 | conftest$ac_exeext conftest.$ac_ext | |
13552 | LIBS=$ac_check_lib_save_LIBS | |
13553 | fi | |
13554 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mail_maillock" >&5 | |
13555 | $as_echo "$ac_cv_lib_mail_maillock" >&6; } | |
5f64f7bd | 13556 | if test "x$ac_cv_lib_mail_maillock" = x""yes; then : |
067d23c9 KY |
13557 | have_mail=yes |
13558 | else | |
13559 | have_mail=no | |
13560 | fi | |
13561 | ||
13562 | if test $have_mail = yes; then | |
13563 | LIBS_MAIL=-lmail | |
13564 | LIBS="$LIBS_MAIL $LIBS" | |
13565 | ||
13566 | $as_echo "#define HAVE_LIBMAIL 1" >>confdefs.h | |
13567 | ||
13568 | else | |
13569 | LIBS_MAIL= | |
13570 | fi | |
13571 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -llockfile" >&5 | |
13572 | $as_echo_n "checking for maillock in -llockfile... " >&6; } | |
5f64f7bd | 13573 | if test "${ac_cv_lib_lockfile_maillock+set}" = set; then : |
067d23c9 KY |
13574 | $as_echo_n "(cached) " >&6 |
13575 | else | |
13576 | ac_check_lib_save_LIBS=$LIBS | |
13577 | LIBS="-llockfile $LIBS" | |
13578 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13579 | /* end confdefs.h. */ | |
13580 | ||
13581 | /* Override any GCC internal prototype to avoid an error. | |
13582 | Use char because int might match the return type of a GCC | |
13583 | builtin and then its argument prototype would still apply. */ | |
13584 | #ifdef __cplusplus | |
13585 | extern "C" | |
13586 | #endif | |
13587 | char maillock (); | |
13588 | int | |
13589 | main () | |
13590 | { | |
13591 | return maillock (); | |
13592 | ; | |
13593 | return 0; | |
13594 | } | |
13595 | _ACEOF | |
13596 | if ac_fn_c_try_link "$LINENO"; then : | |
13597 | ac_cv_lib_lockfile_maillock=yes | |
13598 | else | |
13599 | ac_cv_lib_lockfile_maillock=no | |
13600 | fi | |
13601 | rm -f core conftest.err conftest.$ac_objext \ | |
13602 | conftest$ac_exeext conftest.$ac_ext | |
13603 | LIBS=$ac_check_lib_save_LIBS | |
13604 | fi | |
13605 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lockfile_maillock" >&5 | |
13606 | $as_echo "$ac_cv_lib_lockfile_maillock" >&6; } | |
5f64f7bd | 13607 | if test "x$ac_cv_lib_lockfile_maillock" = x""yes; then : |
067d23c9 KY |
13608 | have_lockfile=yes |
13609 | else | |
13610 | have_lockfile=no | |
13611 | fi | |
13612 | ||
13613 | if test $have_lockfile = yes; then | |
13614 | LIBS_MAIL=-llockfile | |
13615 | LIBS="$LIBS_MAIL $LIBS" | |
13616 | ||
13617 | $as_echo "#define HAVE_LIBLOCKFILE 1" >>confdefs.h | |
13618 | ||
13619 | else | |
13620 | # If we have the shared liblockfile, assume we must use it for mail | |
13621 | # locking (e.g. Debian). If we couldn't link against liblockfile | |
13622 | # (no liblockfile.a installed), ensure that we don't need to. | |
13623 | # Extract the first word of "liblockfile.so", so it can be a program name with args. | |
13624 | set dummy liblockfile.so; ac_word=$2 | |
13625 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
13626 | $as_echo_n "checking for $ac_word... " >&6; } | |
5f64f7bd | 13627 | if test "${ac_cv_prog_liblockfile+set}" = set; then : |
067d23c9 KY |
13628 | $as_echo_n "(cached) " >&6 |
13629 | else | |
13630 | if test -n "$liblockfile"; then | |
13631 | ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test. | |
13632 | else | |
13633 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
13634 | as_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH" | |
13635 | for as_dir in $as_dummy | |
13636 | do | |
13637 | IFS=$as_save_IFS | |
13638 | test -z "$as_dir" && as_dir=. | |
13639 | for ac_exec_ext in '' $ac_executable_extensions; do | |
13640 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
13641 | ac_cv_prog_liblockfile="yes" | |
13642 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
13643 | break 2 | |
13644 | fi | |
13645 | done | |
13646 | done | |
13647 | IFS=$as_save_IFS | |
13648 | ||
13649 | test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no" | |
13650 | fi | |
13651 | fi | |
13652 | liblockfile=$ac_cv_prog_liblockfile | |
13653 | if test -n "$liblockfile"; then | |
13654 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $liblockfile" >&5 | |
13655 | $as_echo "$liblockfile" >&6; } | |
13656 | else | |
13657 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
13658 | $as_echo "no" >&6; } | |
13659 | fi | |
13660 | ||
13661 | ||
13662 | if test $ac_cv_prog_liblockfile = yes; then | |
5f64f7bd | 13663 | as_fn_error "Shared liblockfile found but can't link against it. |
067d23c9 KY |
13664 | This probably means that movemail could lose mail. |
13665 | There may be a \`development' package to install containing liblockfile." "$LINENO" 5 | |
13666 | fi | |
13667 | fi | |
13668 | for ac_func in touchlock | |
13669 | do : | |
13670 | ac_fn_c_check_func "$LINENO" "touchlock" "ac_cv_func_touchlock" | |
5f64f7bd | 13671 | if test "x$ac_cv_func_touchlock" = x""yes; then : |
067d23c9 KY |
13672 | cat >>confdefs.h <<_ACEOF |
13673 | #define HAVE_TOUCHLOCK 1 | |
13674 | _ACEOF | |
13675 | ||
13676 | fi | |
13677 | done | |
13678 | ||
13679 | for ac_header in maillock.h | |
13680 | do : | |
13681 | ac_fn_c_check_header_mongrel "$LINENO" "maillock.h" "ac_cv_header_maillock_h" "$ac_includes_default" | |
5f64f7bd | 13682 | if test "x$ac_cv_header_maillock_h" = x""yes; then : |
067d23c9 KY |
13683 | cat >>confdefs.h <<_ACEOF |
13684 | #define HAVE_MAILLOCK_H 1 | |
13685 | _ACEOF | |
13686 | ||
13687 | fi | |
13688 | ||
13689 | done | |
13690 | ||
13691 | ||
13692 | ||
13693 | ## Define MAIL_USE_FLOCK (or LOCKF) if the mailer uses flock (or lockf) to | |
13694 | ## interlock access to the mail spool. The alternative is a lock file named | |
13695 | ## /usr/spool/mail/$USER.lock. | |
13696 | mail_lock=no | |
13697 | case "$opsys" in | |
13698 | aix4-2) mail_lock="lockf" ;; | |
13699 | ||
13700 | gnu|freebsd|netbsd|openbsd|darwin|irix6-5) mail_lock="flock" ;; | |
13701 | ||
13702 | ## On GNU/Linux systems, both methods are used by various mail programs. | |
13703 | ## I assume most people are using newer mailers that have heard of flock. | |
13704 | ## Change this if you need to. | |
13705 | ## Debian contains a patch which says: ``On Debian/GNU/Linux systems, | |
13706 | ## configure gets the right answers, and that means *NOT* using flock. | |
13707 | ## Using flock is guaranteed to be the wrong thing. See Debian Policy | |
13708 | ## for details.'' and then uses `#ifdef DEBIAN'. Unfortunately the | |
13709 | ## Debian maintainer hasn't provided a clean fix for Emacs. | |
13710 | ## movemail.c will use `maillock' when MAILDIR, HAVE_LIBMAIL and | |
13711 | ## HAVE_MAILLOCK_H are defined, so the following appears to be the | |
13712 | ## correct logic. -- fx | |
13713 | ## We must check for HAVE_LIBLOCKFILE too, as movemail does. | |
13714 | ## liblockfile is a Free Software replacement for libmail, used on | |
13715 | ## Debian systems and elsewhere. -rfr. | |
13716 | gnu-*) | |
13717 | mail_lock="flock" | |
13718 | if test $have_mail = yes || test $have_lockfile = yes; then | |
13719 | test $ac_cv_header_maillock_h = yes && mail_lock=no | |
13720 | fi | |
13721 | ;; | |
13722 | esac | |
13723 | ||
13724 | BLESSMAIL_TARGET= | |
13725 | case "$mail_lock" in | |
13726 | flock) | |
13727 | $as_echo "#define MAIL_USE_FLOCK 1" >>confdefs.h | |
13728 | ;; | |
13729 | ||
13730 | lockf) | |
13731 | $as_echo "#define MAIL_USE_LOCKF 1" >>confdefs.h | |
13732 | ;; | |
13733 | ||
13734 | *) BLESSMAIL_TARGET="need-blessmail" ;; | |
13735 | esac | |
13736 | ||
13737 | ||
13738 | ||
7d2a1c5e | 13739 | for ac_func in gethostname getdomainname \ |
067d23c9 KY |
13740 | rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \ |
13741 | random lrand48 logb frexp fmod rint cbrt ftime setsid \ | |
1fd182f0 | 13742 | strerror fpathconf select euidaccess getpagesize tzset setlocale \ |
067d23c9 | 13743 | utimes getrlimit setrlimit setpgid getcwd getwd shutdown getaddrinfo \ |
1fb8351b | 13744 | __fpending mblen mbrlen mbsinit strsignal setitimer ualarm \ |
067d23c9 | 13745 | sendto recvfrom getsockopt setsockopt getsockname getpeername \ |
1fb8351b GM |
13746 | gai_strerror mkstemp getline getdelim mremap fsync sync \ |
13747 | difftime mempcpy mblen mbrlen posix_memalign \ | |
067d23c9 KY |
13748 | cfmakeraw cfsetspeed isnan copysign __executable_start |
13749 | do : | |
13750 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
13751 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
5f64f7bd GM |
13752 | eval as_val=\$$as_ac_var |
13753 | if test "x$as_val" = x""yes; then : | |
067d23c9 KY |
13754 | cat >>confdefs.h <<_ACEOF |
13755 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
13756 | _ACEOF | |
13757 | ||
13758 | fi | |
13759 | done | |
13760 | ||
13761 | ||
2018939f AS |
13762 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unwind_init" >&5 |
13763 | $as_echo_n "checking for __builtin_unwind_init... " >&6; } | |
5f64f7bd | 13764 | if test "${emacs_cv_func___builtin_unwind_init+set}" = set; then : |
2018939f AS |
13765 | $as_echo_n "(cached) " >&6 |
13766 | else | |
13767 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13768 | /* end confdefs.h. */ | |
13769 | ||
13770 | int | |
13771 | main () | |
13772 | { | |
13773 | __builtin_unwind_init (); | |
13774 | ; | |
13775 | return 0; | |
13776 | } | |
13777 | _ACEOF | |
13778 | if ac_fn_c_try_link "$LINENO"; then : | |
13779 | emacs_cv_func___builtin_unwind_init=yes | |
13780 | else | |
13781 | emacs_cv_func___builtin_unwind_init=no | |
13782 | fi | |
13783 | rm -f core conftest.err conftest.$ac_objext \ | |
13784 | conftest$ac_exeext conftest.$ac_ext | |
13785 | fi | |
13786 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_func___builtin_unwind_init" >&5 | |
13787 | $as_echo "$emacs_cv_func___builtin_unwind_init" >&6; } | |
13788 | if test $emacs_cv_func___builtin_unwind_init = yes; then | |
13789 | ||
13790 | $as_echo "#define HAVE___BUILTIN_UNWIND_INIT 1" >>confdefs.h | |
13791 | ||
13792 | fi | |
13793 | ||
067d23c9 KY |
13794 | for ac_header in sys/un.h |
13795 | do : | |
13796 | ac_fn_c_check_header_mongrel "$LINENO" "sys/un.h" "ac_cv_header_sys_un_h" "$ac_includes_default" | |
5f64f7bd | 13797 | if test "x$ac_cv_header_sys_un_h" = x""yes; then : |
067d23c9 KY |
13798 | cat >>confdefs.h <<_ACEOF |
13799 | #define HAVE_SYS_UN_H 1 | |
13800 | _ACEOF | |
13801 | ||
13802 | fi | |
13803 | ||
13804 | done | |
13805 | ||
13806 | ||
1f5d53eb PE |
13807 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5 |
13808 | $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; } | |
5f64f7bd | 13809 | if test "${ac_cv_sys_largefile_source+set}" = set; then : |
067d23c9 KY |
13810 | $as_echo_n "(cached) " >&6 |
13811 | else | |
1f5d53eb PE |
13812 | while :; do |
13813 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
067d23c9 | 13814 | /* end confdefs.h. */ |
1f5d53eb PE |
13815 | #include <sys/types.h> /* for off_t */ |
13816 | #include <stdio.h> | |
067d23c9 KY |
13817 | int |
13818 | main () | |
13819 | { | |
1f5d53eb PE |
13820 | int (*fp) (FILE *, off_t, int) = fseeko; |
13821 | return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); | |
067d23c9 KY |
13822 | ; |
13823 | return 0; | |
13824 | } | |
13825 | _ACEOF | |
13826 | if ac_fn_c_try_link "$LINENO"; then : | |
1f5d53eb | 13827 | ac_cv_sys_largefile_source=no; break |
067d23c9 KY |
13828 | fi |
13829 | rm -f core conftest.err conftest.$ac_objext \ | |
13830 | conftest$ac_exeext conftest.$ac_ext | |
1f5d53eb | 13831 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
067d23c9 | 13832 | /* end confdefs.h. */ |
1f5d53eb PE |
13833 | #define _LARGEFILE_SOURCE 1 |
13834 | #include <sys/types.h> /* for off_t */ | |
13835 | #include <stdio.h> | |
067d23c9 KY |
13836 | int |
13837 | main () | |
13838 | { | |
1f5d53eb PE |
13839 | int (*fp) (FILE *, off_t, int) = fseeko; |
13840 | return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); | |
067d23c9 KY |
13841 | ; |
13842 | return 0; | |
13843 | } | |
13844 | _ACEOF | |
13845 | if ac_fn_c_try_link "$LINENO"; then : | |
1f5d53eb | 13846 | ac_cv_sys_largefile_source=1; break |
067d23c9 KY |
13847 | fi |
13848 | rm -f core conftest.err conftest.$ac_objext \ | |
13849 | conftest$ac_exeext conftest.$ac_ext | |
1f5d53eb PE |
13850 | ac_cv_sys_largefile_source=unknown |
13851 | break | |
13852 | done | |
067d23c9 | 13853 | fi |
1f5d53eb PE |
13854 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5 |
13855 | $as_echo "$ac_cv_sys_largefile_source" >&6; } | |
13856 | case $ac_cv_sys_largefile_source in #( | |
13857 | no | unknown) ;; | |
13858 | *) | |
13859 | cat >>confdefs.h <<_ACEOF | |
13860 | #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source | |
13861 | _ACEOF | |
13862 | ;; | |
13863 | esac | |
13864 | rm -rf conftest* | |
067d23c9 | 13865 | |
1f5d53eb PE |
13866 | # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug |
13867 | # in glibc 2.1.3, but that breaks too many other things. | |
13868 | # If you want fseeko and ftello with glibc, upgrade to a fixed glibc. | |
13869 | if test $ac_cv_sys_largefile_source != unknown; then | |
13870 | ||
13871 | $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h | |
067d23c9 | 13872 | |
067d23c9 KY |
13873 | fi |
13874 | ||
1f5d53eb PE |
13875 | |
13876 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getpgrp requires zero arguments" >&5 | |
13877 | $as_echo_n "checking whether getpgrp requires zero arguments... " >&6; } | |
5f64f7bd | 13878 | if test "${ac_cv_func_getpgrp_void+set}" = set; then : |
067d23c9 KY |
13879 | $as_echo_n "(cached) " >&6 |
13880 | else | |
1f5d53eb | 13881 | # Use it with a single arg. |
067d23c9 KY |
13882 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
13883 | /* end confdefs.h. */ | |
1f5d53eb | 13884 | $ac_includes_default |
067d23c9 KY |
13885 | int |
13886 | main () | |
13887 | { | |
1f5d53eb | 13888 | getpgrp (0); |
067d23c9 KY |
13889 | ; |
13890 | return 0; | |
13891 | } | |
13892 | _ACEOF | |
1f5d53eb PE |
13893 | if ac_fn_c_try_compile "$LINENO"; then : |
13894 | ac_cv_func_getpgrp_void=no | |
067d23c9 | 13895 | else |
1f5d53eb | 13896 | ac_cv_func_getpgrp_void=yes |
067d23c9 | 13897 | fi |
1f5d53eb PE |
13898 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
13899 | ||
067d23c9 | 13900 | fi |
1f5d53eb PE |
13901 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getpgrp_void" >&5 |
13902 | $as_echo "$ac_cv_func_getpgrp_void" >&6; } | |
13903 | if test $ac_cv_func_getpgrp_void = yes; then | |
13904 | ||
13905 | $as_echo "#define GETPGRP_VOID 1" >>confdefs.h | |
067d23c9 KY |
13906 | |
13907 | fi | |
13908 | ||
1f5d53eb | 13909 | |
3e0be4ab GM |
13910 | # UNIX98 PTYs. |
13911 | for ac_func in grantpt | |
13912 | do : | |
13913 | ac_fn_c_check_func "$LINENO" "grantpt" "ac_cv_func_grantpt" | |
13914 | if test "x$ac_cv_func_grantpt" = x""yes; then : | |
13915 | cat >>confdefs.h <<_ACEOF | |
13916 | #define HAVE_GRANTPT 1 | |
13917 | _ACEOF | |
1f5d53eb | 13918 | |
3e0be4ab GM |
13919 | fi |
13920 | done | |
1f5d53eb PE |
13921 | |
13922 | ||
3e0be4ab GM |
13923 | # PTY-related GNU extensions. |
13924 | for ac_func in getpt | |
13925 | do : | |
13926 | ac_fn_c_check_func "$LINENO" "getpt" "ac_cv_func_getpt" | |
13927 | if test "x$ac_cv_func_getpt" = x""yes; then : | |
13928 | cat >>confdefs.h <<_ACEOF | |
13929 | #define HAVE_GETPT 1 | |
13930 | _ACEOF | |
1f5d53eb | 13931 | |
3e0be4ab GM |
13932 | fi |
13933 | done | |
1f5d53eb | 13934 | |
1f5d53eb | 13935 | |
3e0be4ab GM |
13936 | # Check this now, so that we will NOT find the above functions in ncurses. |
13937 | # That is because we have not set up to link ncurses in lib-src. | |
13938 | # It's better to believe a function is not available | |
13939 | # than to expect to find it in ncurses. | |
13940 | # Also we need tputs and friends to be able to build at all. | |
13941 | have_tputs_et_al=true | |
13942 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tputs" >&5 | |
13943 | $as_echo_n "checking for library containing tputs... " >&6; } | |
13944 | if test "${ac_cv_search_tputs+set}" = set; then : | |
4fc2b746 GM |
13945 | $as_echo_n "(cached) " >&6 |
13946 | else | |
3e0be4ab GM |
13947 | ac_func_search_save_LIBS=$LIBS |
13948 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4fc2b746 | 13949 | /* end confdefs.h. */ |
3e0be4ab GM |
13950 | |
13951 | /* Override any GCC internal prototype to avoid an error. | |
13952 | Use char because int might match the return type of a GCC | |
13953 | builtin and then its argument prototype would still apply. */ | |
13954 | #ifdef __cplusplus | |
13955 | extern "C" | |
13956 | #endif | |
13957 | char tputs (); | |
13958 | int | |
13959 | main () | |
13960 | { | |
13961 | return tputs (); | |
4fc2b746 GM |
13962 | ; |
13963 | return 0; | |
13964 | } | |
13965 | _ACEOF | |
3e0be4ab GM |
13966 | for ac_lib in '' ncurses terminfo termcap; do |
13967 | if test -z "$ac_lib"; then | |
13968 | ac_res="none required" | |
13969 | else | |
13970 | ac_res=-l$ac_lib | |
13971 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
13972 | fi | |
13973 | if ac_fn_c_try_link "$LINENO"; then : | |
13974 | ac_cv_search_tputs=$ac_res | |
4fc2b746 GM |
13975 | fi |
13976 | rm -f core conftest.err conftest.$ac_objext \ | |
3e0be4ab GM |
13977 | conftest$ac_exeext |
13978 | if test "${ac_cv_search_tputs+set}" = set; then : | |
13979 | break | |
4fc2b746 | 13980 | fi |
3e0be4ab GM |
13981 | done |
13982 | if test "${ac_cv_search_tputs+set}" = set; then : | |
4fc2b746 | 13983 | |
3e0be4ab GM |
13984 | else |
13985 | ac_cv_search_tputs=no | |
13986 | fi | |
13987 | rm conftest.$ac_ext | |
13988 | LIBS=$ac_func_search_save_LIBS | |
13989 | fi | |
13990 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tputs" >&5 | |
13991 | $as_echo "$ac_cv_search_tputs" >&6; } | |
13992 | ac_res=$ac_cv_search_tputs | |
13993 | if test "$ac_res" != no; then : | |
13994 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
13995 | ||
13996 | else | |
13997 | have_tputs_et_al=false | |
13998 | fi | |
4fc2b746 | 13999 | |
3e0be4ab GM |
14000 | if test "$have_tputs_et_al" != true; then |
14001 | as_fn_error "I couldn't find termcap functions (tputs and friends). | |
14002 | Maybe some development libraries/packages are missing? Try installing | |
14003 | libncurses-dev(el), libterminfo-dev(el) or similar." "$LINENO" 5 | |
4fc2b746 | 14004 | fi |
3e0be4ab | 14005 | # Must define this when any termcap library is found. |
4fc2b746 | 14006 | |
3e0be4ab GM |
14007 | $as_echo "#define HAVE_LIBNCURSES 1" >>confdefs.h |
14008 | ||
14009 | ## FIXME This was the cpp logic, but I am not sure it is right. | |
14010 | ## The above test has not necessarily found libncurses. | |
14011 | HAVE_LIBNCURSES=yes | |
14012 | ||
14013 | ## Use terminfo instead of termcap? | |
14014 | ## Note only system files NOT using terminfo are: | |
14015 | ## freebsd < 40000, ms-w32, msdos, netbsd < 599002500, and | |
14016 | ## darwin|gnu without ncurses. | |
14017 | TERMINFO=no | |
14018 | LIBS_TERMCAP= | |
14019 | case "$opsys" in | |
14020 | ## cygwin: Fewer environment variables to go wrong, more terminal types. | |
14021 | ## hpux10-20: Use the system provided termcap(3) library. | |
14022 | ## openbsd: David Mazieres <dm@reeducation-labor.lcs.mit.edu> says this | |
14023 | ## is necessary. Otherwise Emacs dumps core when run -nw. | |
14024 | aix4-2|cygwin|hpux*|irix6-5|openbsd|sol2*|unixware) TERMINFO=yes ;; | |
14025 | ||
14026 | ## darwin: Prevents crashes when running Emacs in Terminal.app under 10.2. | |
14027 | ## The ncurses library has been moved out of the System framework in | |
14028 | ## Mac OS X 10.2. So if configure detects it, set the command-line | |
14029 | ## option to use it. | |
14030 | darwin|gnu*) | |
14031 | ## (HAVE_LIBNCURSES was not always true, but is since 2010-03-18.) | |
14032 | if test "x$HAVE_LIBNCURSES" = "xyes"; then | |
14033 | TERMINFO=yes | |
14034 | LIBS_TERMCAP="-lncurses" | |
14035 | fi | |
14036 | ;; | |
14037 | ||
14038 | freebsd) | |
14039 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether FreeBSD is new enough to use terminfo" >&5 | |
14040 | $as_echo_n "checking whether FreeBSD is new enough to use terminfo... " >&6; } | |
14041 | if test "${emacs_cv_freebsd_terminfo+set}" = set; then : | |
4fc2b746 GM |
14042 | $as_echo_n "(cached) " >&6 |
14043 | else | |
14044 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14045 | /* end confdefs.h. */ | |
3e0be4ab | 14046 | #include <osreldate.h> |
4fc2b746 GM |
14047 | int |
14048 | main () | |
14049 | { | |
3e0be4ab GM |
14050 | #if __FreeBSD_version < 400000 |
14051 | fail; | |
14052 | #endif | |
14053 | ||
4fc2b746 GM |
14054 | ; |
14055 | return 0; | |
14056 | } | |
14057 | _ACEOF | |
14058 | if ac_fn_c_try_link "$LINENO"; then : | |
3e0be4ab | 14059 | emacs_cv_freebsd_terminfo=yes |
4fc2b746 | 14060 | else |
3e0be4ab | 14061 | emacs_cv_freebsd_terminfo=no |
4fc2b746 GM |
14062 | fi |
14063 | rm -f core conftest.err conftest.$ac_objext \ | |
14064 | conftest$ac_exeext conftest.$ac_ext | |
14065 | fi | |
4fc2b746 | 14066 | |
4fc2b746 | 14067 | |
3e0be4ab GM |
14068 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_freebsd_terminfo" >&5 |
14069 | $as_echo "$emacs_cv_freebsd_terminfo" >&6; } | |
4fc2b746 | 14070 | |
3e0be4ab GM |
14071 | if test $emacs_cv_freebsd_terminfo = yes; then |
14072 | TERMINFO=yes | |
14073 | LIBS_TERMCAP="-lncurses" | |
14074 | else | |
14075 | LIBS_TERMCAP="-ltermcap" | |
14076 | fi | |
14077 | ;; | |
4fc2b746 | 14078 | |
3e0be4ab GM |
14079 | netbsd) |
14080 | if test $ac_cv_search_tputs = -lterminfo; then | |
14081 | TERMINFO=yes | |
14082 | LIBS_TERMCAP="-lterminfo" | |
14083 | else | |
14084 | LIBS_TERMCAP="-ltermcap" | |
14085 | fi | |
14086 | ;; | |
4fc2b746 | 14087 | |
3e0be4ab | 14088 | esac |
4fc2b746 | 14089 | |
3e0be4ab GM |
14090 | case "$opsys" in |
14091 | ## hpux: Make sure we get select from libc rather than from libcurses | |
14092 | ## because libcurses on HPUX 10.10 has a broken version of select. | |
14093 | ## We used to use -lc -lcurses, but this may be cleaner. | |
14094 | hpux*) LIBS_TERMCAP="-ltermcap" ;; | |
4fc2b746 | 14095 | |
3e0be4ab | 14096 | openbsd) LIBS_TERMCAP="-lncurses" ;; |
4fc2b746 | 14097 | |
3e0be4ab GM |
14098 | ## Must use system termcap, if we use any termcap. It does special things. |
14099 | sol2*) test "$TERMINFO" != yes && LIBS_TERMCAP="-ltermcap" ;; | |
14100 | esac | |
4fc2b746 | 14101 | |
3e0be4ab GM |
14102 | TERMCAP_OBJ=tparam.o |
14103 | if test $TERMINFO = yes; then | |
4fc2b746 | 14104 | |
3e0be4ab | 14105 | $as_echo "#define TERMINFO 1" >>confdefs.h |
4fc2b746 | 14106 | |
4fc2b746 | 14107 | |
3e0be4ab GM |
14108 | ## Default used to be -ltermcap. Add a case above if need something else. |
14109 | test "x$LIBS_TERMCAP" = "x" && LIBS_TERMCAP="-lcurses" | |
4fc2b746 | 14110 | |
3e0be4ab | 14111 | TERMCAP_OBJ=terminfo.o |
4fc2b746 | 14112 | fi |
4fc2b746 | 14113 | |
4fc2b746 | 14114 | |
4fc2b746 | 14115 | |
4fc2b746 | 14116 | |
3e0be4ab GM |
14117 | # Do we have res_init, for detecting changes in /etc/resolv.conf? |
14118 | resolv=no | |
14119 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4fc2b746 | 14120 | /* end confdefs.h. */ |
3e0be4ab GM |
14121 | #include <netinet/in.h> |
14122 | #include <arpa/nameser.h> | |
14123 | #include <resolv.h> | |
4fc2b746 | 14124 | int |
3e0be4ab | 14125 | main () |
4fc2b746 | 14126 | { |
3e0be4ab GM |
14127 | return res_init(); |
14128 | ; | |
14129 | return 0; | |
4fc2b746 GM |
14130 | } |
14131 | _ACEOF | |
3e0be4ab GM |
14132 | if ac_fn_c_try_link "$LINENO"; then : |
14133 | have_res_init=yes | |
4fc2b746 | 14134 | else |
3e0be4ab | 14135 | have_res_init=no |
4fc2b746 | 14136 | fi |
3e0be4ab GM |
14137 | rm -f core conftest.err conftest.$ac_objext \ |
14138 | conftest$ac_exeext conftest.$ac_ext | |
14139 | if test "$have_res_init" = no; then | |
14140 | OLIBS="$LIBS" | |
14141 | LIBS="$LIBS -lresolv" | |
14142 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_init with -lresolv" >&5 | |
14143 | $as_echo_n "checking for res_init with -lresolv... " >&6; } | |
14144 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14145 | /* end confdefs.h. */ | |
14146 | #include <netinet/in.h> | |
14147 | #include <arpa/nameser.h> | |
14148 | #include <resolv.h> | |
14149 | int | |
14150 | main () | |
14151 | { | |
14152 | return res_init(); | |
14153 | ; | |
14154 | return 0; | |
14155 | } | |
14156 | _ACEOF | |
14157 | if ac_fn_c_try_link "$LINENO"; then : | |
14158 | have_res_init=yes | |
14159 | else | |
14160 | have_res_init=no | |
14161 | fi | |
14162 | rm -f core conftest.err conftest.$ac_objext \ | |
14163 | conftest$ac_exeext conftest.$ac_ext | |
14164 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_res_init" >&5 | |
14165 | $as_echo "$have_res_init" >&6; } | |
14166 | if test "$have_res_init" = yes ; then | |
14167 | resolv=yes | |
14168 | fi | |
14169 | LIBS="$OLIBS" | |
4fc2b746 GM |
14170 | fi |
14171 | ||
3e0be4ab | 14172 | if test "$have_res_init" = yes; then |
1f5d53eb | 14173 | |
3e0be4ab | 14174 | $as_echo "#define HAVE_RES_INIT 1" >>confdefs.h |
6c051bab GM |
14175 | |
14176 | fi | |
6c051bab | 14177 | |
3e0be4ab GM |
14178 | # Do we need the Hesiod library to provide the support routines? |
14179 | LIBHESIOD= | |
14180 | if test "$with_hesiod" != no ; then | |
14181 | # Don't set $LIBS here -- see comments above. FIXME which comments? | |
14182 | ac_fn_c_check_func "$LINENO" "res_send" "ac_cv_func_res_send" | |
14183 | if test "x$ac_cv_func_res_send" = x""yes; then : | |
6c051bab | 14184 | |
3e0be4ab GM |
14185 | else |
14186 | ac_fn_c_check_func "$LINENO" "__res_send" "ac_cv_func___res_send" | |
14187 | if test "x$ac_cv_func___res_send" = x""yes; then : | |
6c051bab | 14188 | |
3e0be4ab GM |
14189 | else |
14190 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_send in -lresolv" >&5 | |
14191 | $as_echo_n "checking for res_send in -lresolv... " >&6; } | |
14192 | if test "${ac_cv_lib_resolv_res_send+set}" = set; then : | |
942f733f PE |
14193 | $as_echo_n "(cached) " >&6 |
14194 | else | |
3e0be4ab GM |
14195 | ac_check_lib_save_LIBS=$LIBS |
14196 | LIBS="-lresolv $LIBS" | |
14197 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
942f733f | 14198 | /* end confdefs.h. */ |
942f733f | 14199 | |
3e0be4ab GM |
14200 | /* Override any GCC internal prototype to avoid an error. |
14201 | Use char because int might match the return type of a GCC | |
14202 | builtin and then its argument prototype would still apply. */ | |
14203 | #ifdef __cplusplus | |
14204 | extern "C" | |
14205 | #endif | |
14206 | char res_send (); | |
942f733f PE |
14207 | int |
14208 | main () | |
14209 | { | |
3e0be4ab | 14210 | return res_send (); |
942f733f PE |
14211 | ; |
14212 | return 0; | |
14213 | } | |
14214 | _ACEOF | |
3e0be4ab GM |
14215 | if ac_fn_c_try_link "$LINENO"; then : |
14216 | ac_cv_lib_resolv_res_send=yes | |
14217 | else | |
14218 | ac_cv_lib_resolv_res_send=no | |
14219 | fi | |
14220 | rm -f core conftest.err conftest.$ac_objext \ | |
14221 | conftest$ac_exeext conftest.$ac_ext | |
14222 | LIBS=$ac_check_lib_save_LIBS | |
14223 | fi | |
14224 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_send" >&5 | |
14225 | $as_echo "$ac_cv_lib_resolv_res_send" >&6; } | |
14226 | if test "x$ac_cv_lib_resolv_res_send" = x""yes; then : | |
14227 | resolv=yes | |
14228 | else | |
14229 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __res_send in -lresolv" >&5 | |
14230 | $as_echo_n "checking for __res_send in -lresolv... " >&6; } | |
14231 | if test "${ac_cv_lib_resolv___res_send+set}" = set; then : | |
14232 | $as_echo_n "(cached) " >&6 | |
14233 | else | |
14234 | ac_check_lib_save_LIBS=$LIBS | |
14235 | LIBS="-lresolv $LIBS" | |
14236 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
942f733f | 14237 | /* end confdefs.h. */ |
942f733f | 14238 | |
3e0be4ab GM |
14239 | /* Override any GCC internal prototype to avoid an error. |
14240 | Use char because int might match the return type of a GCC | |
14241 | builtin and then its argument prototype would still apply. */ | |
14242 | #ifdef __cplusplus | |
14243 | extern "C" | |
14244 | #endif | |
14245 | char __res_send (); | |
942f733f PE |
14246 | int |
14247 | main () | |
14248 | { | |
3e0be4ab | 14249 | return __res_send (); |
942f733f PE |
14250 | ; |
14251 | return 0; | |
14252 | } | |
14253 | _ACEOF | |
3e0be4ab GM |
14254 | if ac_fn_c_try_link "$LINENO"; then : |
14255 | ac_cv_lib_resolv___res_send=yes | |
942f733f | 14256 | else |
3e0be4ab | 14257 | ac_cv_lib_resolv___res_send=no |
942f733f | 14258 | fi |
3e0be4ab GM |
14259 | rm -f core conftest.err conftest.$ac_objext \ |
14260 | conftest$ac_exeext conftest.$ac_ext | |
14261 | LIBS=$ac_check_lib_save_LIBS | |
14262 | fi | |
14263 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv___res_send" >&5 | |
14264 | $as_echo "$ac_cv_lib_resolv___res_send" >&6; } | |
14265 | if test "x$ac_cv_lib_resolv___res_send" = x""yes; then : | |
14266 | resolv=yes | |
942f733f | 14267 | fi |
942f733f | 14268 | |
3e0be4ab | 14269 | fi |
942f733f | 14270 | |
3e0be4ab GM |
14271 | fi |
14272 | ||
14273 | fi | |
14274 | ||
14275 | if test "$resolv" = yes ; then | |
14276 | RESOLVLIB=-lresolv | |
14277 | else | |
14278 | RESOLVLIB= | |
14279 | fi | |
14280 | ac_fn_c_check_func "$LINENO" "hes_getmailhost" "ac_cv_func_hes_getmailhost" | |
14281 | if test "x$ac_cv_func_hes_getmailhost" = x""yes; then : | |
14282 | ||
14283 | else | |
14284 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hes_getmailhost in -lhesiod" >&5 | |
14285 | $as_echo_n "checking for hes_getmailhost in -lhesiod... " >&6; } | |
14286 | if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then : | |
14287 | $as_echo_n "(cached) " >&6 | |
14288 | else | |
14289 | ac_check_lib_save_LIBS=$LIBS | |
14290 | LIBS="-lhesiod $RESOLVLIB $LIBS" | |
14291 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
942f733f | 14292 | /* end confdefs.h. */ |
942f733f | 14293 | |
3e0be4ab GM |
14294 | /* Override any GCC internal prototype to avoid an error. |
14295 | Use char because int might match the return type of a GCC | |
14296 | builtin and then its argument prototype would still apply. */ | |
14297 | #ifdef __cplusplus | |
14298 | extern "C" | |
14299 | #endif | |
14300 | char hes_getmailhost (); | |
942f733f PE |
14301 | int |
14302 | main () | |
14303 | { | |
3e0be4ab | 14304 | return hes_getmailhost (); |
942f733f PE |
14305 | ; |
14306 | return 0; | |
14307 | } | |
14308 | _ACEOF | |
3e0be4ab GM |
14309 | if ac_fn_c_try_link "$LINENO"; then : |
14310 | ac_cv_lib_hesiod_hes_getmailhost=yes | |
942f733f | 14311 | else |
3e0be4ab | 14312 | ac_cv_lib_hesiod_hes_getmailhost=no |
942f733f | 14313 | fi |
3e0be4ab GM |
14314 | rm -f core conftest.err conftest.$ac_objext \ |
14315 | conftest$ac_exeext conftest.$ac_ext | |
14316 | LIBS=$ac_check_lib_save_LIBS | |
14317 | fi | |
14318 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5 | |
14319 | $as_echo "$ac_cv_lib_hesiod_hes_getmailhost" >&6; } | |
14320 | if test "x$ac_cv_lib_hesiod_hes_getmailhost" = x""yes; then : | |
14321 | hesiod=yes | |
14322 | else | |
14323 | : | |
942f733f | 14324 | fi |
942f733f | 14325 | |
942f733f | 14326 | fi |
3e0be4ab GM |
14327 | |
14328 | ||
14329 | if test x"$hesiod" = xyes; then | |
14330 | ||
14331 | $as_echo "#define HAVE_LIBHESIOD 1" >>confdefs.h | |
14332 | ||
14333 | LIBHESIOD=-lhesiod | |
14334 | fi | |
14335 | fi | |
14336 | ||
14337 | ||
14338 | # Do we need libresolv (due to res_init or Hesiod)? | |
14339 | if test "$resolv" = yes ; then | |
14340 | ||
14341 | $as_echo "#define HAVE_LIBRESOLV 1" >>confdefs.h | |
14342 | ||
14343 | LIBRESOLV=-lresolv | |
942f733f | 14344 | else |
3e0be4ab GM |
14345 | LIBRESOLV= |
14346 | fi | |
14347 | ||
14348 | ||
14349 | # These tell us which Kerberos-related libraries to use. | |
14350 | COM_ERRLIB= | |
14351 | CRYPTOLIB= | |
14352 | KRB5LIB= | |
14353 | DESLIB= | |
14354 | KRB4LIB= | |
14355 | ||
14356 | if test "${with_kerberos}" != no; then | |
14357 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for com_err in -lcom_err" >&5 | |
14358 | $as_echo_n "checking for com_err in -lcom_err... " >&6; } | |
14359 | if test "${ac_cv_lib_com_err_com_err+set}" = set; then : | |
14360 | $as_echo_n "(cached) " >&6 | |
14361 | else | |
14362 | ac_check_lib_save_LIBS=$LIBS | |
14363 | LIBS="-lcom_err $LIBS" | |
14364 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
942f733f | 14365 | /* end confdefs.h. */ |
3e0be4ab GM |
14366 | |
14367 | /* Override any GCC internal prototype to avoid an error. | |
14368 | Use char because int might match the return type of a GCC | |
14369 | builtin and then its argument prototype would still apply. */ | |
14370 | #ifdef __cplusplus | |
14371 | extern "C" | |
14372 | #endif | |
14373 | char com_err (); | |
942f733f PE |
14374 | int |
14375 | main () | |
14376 | { | |
3e0be4ab | 14377 | return com_err (); |
942f733f PE |
14378 | ; |
14379 | return 0; | |
14380 | } | |
14381 | _ACEOF | |
3e0be4ab GM |
14382 | if ac_fn_c_try_link "$LINENO"; then : |
14383 | ac_cv_lib_com_err_com_err=yes | |
942f733f | 14384 | else |
3e0be4ab | 14385 | ac_cv_lib_com_err_com_err=no |
942f733f | 14386 | fi |
3e0be4ab GM |
14387 | rm -f core conftest.err conftest.$ac_objext \ |
14388 | conftest$ac_exeext conftest.$ac_ext | |
14389 | LIBS=$ac_check_lib_save_LIBS | |
942f733f | 14390 | fi |
3e0be4ab GM |
14391 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_com_err_com_err" >&5 |
14392 | $as_echo "$ac_cv_lib_com_err_com_err" >&6; } | |
14393 | if test "x$ac_cv_lib_com_err_com_err" = x""yes; then : | |
14394 | have_com_err=yes | |
14395 | else | |
14396 | have_com_err=no | |
942f733f | 14397 | fi |
942f733f | 14398 | |
3e0be4ab GM |
14399 | if test $have_com_err = yes; then |
14400 | COM_ERRLIB=-lcom_err | |
14401 | LIBS="$COM_ERRLIB $LIBS" | |
942f733f | 14402 | |
3e0be4ab | 14403 | $as_echo "#define HAVE_LIBCOM_ERR 1" >>confdefs.h |
942f733f | 14404 | |
3e0be4ab GM |
14405 | fi |
14406 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lcrypto" >&5 | |
14407 | $as_echo_n "checking for mit_des_cbc_encrypt in -lcrypto... " >&6; } | |
14408 | if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then : | |
942f733f PE |
14409 | $as_echo_n "(cached) " >&6 |
14410 | else | |
3e0be4ab GM |
14411 | ac_check_lib_save_LIBS=$LIBS |
14412 | LIBS="-lcrypto $LIBS" | |
14413 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
942f733f | 14414 | /* end confdefs.h. */ |
942f733f | 14415 | |
3e0be4ab GM |
14416 | /* Override any GCC internal prototype to avoid an error. |
14417 | Use char because int might match the return type of a GCC | |
14418 | builtin and then its argument prototype would still apply. */ | |
14419 | #ifdef __cplusplus | |
14420 | extern "C" | |
14421 | #endif | |
14422 | char mit_des_cbc_encrypt (); | |
14423 | int | |
14424 | main () | |
14425 | { | |
14426 | return mit_des_cbc_encrypt (); | |
14427 | ; | |
14428 | return 0; | |
14429 | } | |
942f733f | 14430 | _ACEOF |
3e0be4ab GM |
14431 | if ac_fn_c_try_link "$LINENO"; then : |
14432 | ac_cv_lib_crypto_mit_des_cbc_encrypt=yes | |
14433 | else | |
14434 | ac_cv_lib_crypto_mit_des_cbc_encrypt=no | |
942f733f | 14435 | fi |
3e0be4ab GM |
14436 | rm -f core conftest.err conftest.$ac_objext \ |
14437 | conftest$ac_exeext conftest.$ac_ext | |
14438 | LIBS=$ac_check_lib_save_LIBS | |
14439 | fi | |
14440 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5 | |
14441 | $as_echo "$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6; } | |
14442 | if test "x$ac_cv_lib_crypto_mit_des_cbc_encrypt" = x""yes; then : | |
14443 | have_crypto=yes | |
14444 | else | |
14445 | have_crypto=no | |
942f733f | 14446 | fi |
942f733f | 14447 | |
3e0be4ab GM |
14448 | if test $have_crypto = yes; then |
14449 | CRYPTOLIB=-lcrypto | |
14450 | LIBS="$CRYPTOLIB $LIBS" | |
942f733f | 14451 | |
3e0be4ab | 14452 | $as_echo "#define HAVE_LIBCRYPTO 1" >>confdefs.h |
942f733f | 14453 | |
3e0be4ab GM |
14454 | fi |
14455 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lk5crypto" >&5 | |
14456 | $as_echo_n "checking for mit_des_cbc_encrypt in -lk5crypto... " >&6; } | |
14457 | if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then : | |
067d23c9 KY |
14458 | $as_echo_n "(cached) " >&6 |
14459 | else | |
3e0be4ab GM |
14460 | ac_check_lib_save_LIBS=$LIBS |
14461 | LIBS="-lk5crypto $LIBS" | |
14462 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
067d23c9 | 14463 | /* end confdefs.h. */ |
3e0be4ab GM |
14464 | |
14465 | /* Override any GCC internal prototype to avoid an error. | |
14466 | Use char because int might match the return type of a GCC | |
14467 | builtin and then its argument prototype would still apply. */ | |
14468 | #ifdef __cplusplus | |
14469 | extern "C" | |
14470 | #endif | |
14471 | char mit_des_cbc_encrypt (); | |
067d23c9 KY |
14472 | int |
14473 | main () | |
14474 | { | |
3e0be4ab | 14475 | return mit_des_cbc_encrypt (); |
067d23c9 KY |
14476 | ; |
14477 | return 0; | |
14478 | } | |
14479 | _ACEOF | |
14480 | if ac_fn_c_try_link "$LINENO"; then : | |
3e0be4ab | 14481 | ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes |
067d23c9 | 14482 | else |
3e0be4ab | 14483 | ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no |
067d23c9 KY |
14484 | fi |
14485 | rm -f core conftest.err conftest.$ac_objext \ | |
14486 | conftest$ac_exeext conftest.$ac_ext | |
3e0be4ab GM |
14487 | LIBS=$ac_check_lib_save_LIBS |
14488 | fi | |
14489 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5 | |
14490 | $as_echo "$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6; } | |
14491 | if test "x$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" = x""yes; then : | |
14492 | have_k5crypto=yes | |
14493 | else | |
14494 | have_k5crypto=no | |
067d23c9 KY |
14495 | fi |
14496 | ||
3e0be4ab GM |
14497 | if test $have_k5crypto = yes; then |
14498 | CRYPTOLIB=-lk5crypto | |
14499 | LIBS="$CRYPTOLIB $LIBS" | |
067d23c9 | 14500 | |
3e0be4ab | 14501 | $as_echo "#define HAVE_LIBK5CRYPTO 1" >>confdefs.h |
067d23c9 | 14502 | |
3e0be4ab GM |
14503 | fi |
14504 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5_init_context in -lkrb5" >&5 | |
14505 | $as_echo_n "checking for krb5_init_context in -lkrb5... " >&6; } | |
14506 | if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then : | |
14507 | $as_echo_n "(cached) " >&6 | |
14508 | else | |
14509 | ac_check_lib_save_LIBS=$LIBS | |
14510 | LIBS="-lkrb5 $LIBS" | |
14511 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14512 | /* end confdefs.h. */ | |
067d23c9 | 14513 | |
3e0be4ab GM |
14514 | /* Override any GCC internal prototype to avoid an error. |
14515 | Use char because int might match the return type of a GCC | |
14516 | builtin and then its argument prototype would still apply. */ | |
14517 | #ifdef __cplusplus | |
14518 | extern "C" | |
14519 | #endif | |
14520 | char krb5_init_context (); | |
14521 | int | |
14522 | main () | |
14523 | { | |
14524 | return krb5_init_context (); | |
14525 | ; | |
14526 | return 0; | |
14527 | } | |
14528 | _ACEOF | |
14529 | if ac_fn_c_try_link "$LINENO"; then : | |
14530 | ac_cv_lib_krb5_krb5_init_context=yes | |
14531 | else | |
14532 | ac_cv_lib_krb5_krb5_init_context=no | |
14533 | fi | |
14534 | rm -f core conftest.err conftest.$ac_objext \ | |
14535 | conftest$ac_exeext conftest.$ac_ext | |
14536 | LIBS=$ac_check_lib_save_LIBS | |
14537 | fi | |
14538 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb5_krb5_init_context" >&5 | |
14539 | $as_echo "$ac_cv_lib_krb5_krb5_init_context" >&6; } | |
14540 | if test "x$ac_cv_lib_krb5_krb5_init_context" = x""yes; then : | |
14541 | have_krb5=yes | |
14542 | else | |
14543 | have_krb5=no | |
14544 | fi | |
067d23c9 | 14545 | |
3e0be4ab GM |
14546 | if test $have_krb5=yes; then |
14547 | KRB5LIB=-lkrb5 | |
14548 | LIBS="$KRB5LIB $LIBS" | |
1f5d53eb | 14549 | |
3e0be4ab | 14550 | $as_echo "#define HAVE_LIBKRB5 1" >>confdefs.h |
1f5d53eb | 14551 | |
3e0be4ab GM |
14552 | fi |
14553 | if test "${with_kerberos5}" = no; then | |
14554 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes425" >&5 | |
14555 | $as_echo_n "checking for des_cbc_encrypt in -ldes425... " >&6; } | |
14556 | if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then : | |
7d2a1c5e GM |
14557 | $as_echo_n "(cached) " >&6 |
14558 | else | |
3e0be4ab GM |
14559 | ac_check_lib_save_LIBS=$LIBS |
14560 | LIBS="-ldes425 $LIBS" | |
14561 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7d2a1c5e GM |
14562 | /* end confdefs.h. */ |
14563 | ||
3e0be4ab GM |
14564 | /* Override any GCC internal prototype to avoid an error. |
14565 | Use char because int might match the return type of a GCC | |
14566 | builtin and then its argument prototype would still apply. */ | |
14567 | #ifdef __cplusplus | |
14568 | extern "C" | |
14569 | #endif | |
14570 | char des_cbc_encrypt (); | |
7d2a1c5e GM |
14571 | int |
14572 | main () | |
14573 | { | |
3e0be4ab | 14574 | return des_cbc_encrypt (); |
7d2a1c5e GM |
14575 | ; |
14576 | return 0; | |
14577 | } | |
14578 | _ACEOF | |
3e0be4ab GM |
14579 | if ac_fn_c_try_link "$LINENO"; then : |
14580 | ac_cv_lib_des425_des_cbc_encrypt=yes | |
7d2a1c5e | 14581 | else |
3e0be4ab | 14582 | ac_cv_lib_des425_des_cbc_encrypt=no |
7d2a1c5e | 14583 | fi |
3e0be4ab GM |
14584 | rm -f core conftest.err conftest.$ac_objext \ |
14585 | conftest$ac_exeext conftest.$ac_ext | |
14586 | LIBS=$ac_check_lib_save_LIBS | |
14587 | fi | |
14588 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5 | |
14589 | $as_echo "$ac_cv_lib_des425_des_cbc_encrypt" >&6; } | |
14590 | if test "x$ac_cv_lib_des425_des_cbc_encrypt" = x""yes; then : | |
14591 | have_des425=yes | |
14592 | else | |
14593 | have_des425=no | |
7d2a1c5e | 14594 | fi |
7d2a1c5e | 14595 | |
3e0be4ab GM |
14596 | if test $have_des425 = yes; then |
14597 | DESLIB=-ldes425 | |
14598 | LIBS="$DESLIB $LIBS" | |
7d2a1c5e | 14599 | |
3e0be4ab | 14600 | $as_echo "#define HAVE_LIBDES425 1" >>confdefs.h |
7d2a1c5e | 14601 | |
3e0be4ab GM |
14602 | else |
14603 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes" >&5 | |
14604 | $as_echo_n "checking for des_cbc_encrypt in -ldes... " >&6; } | |
14605 | if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then : | |
14606 | $as_echo_n "(cached) " >&6 | |
7d2a1c5e | 14607 | else |
3e0be4ab GM |
14608 | ac_check_lib_save_LIBS=$LIBS |
14609 | LIBS="-ldes $LIBS" | |
14610 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14611 | /* end confdefs.h. */ | |
7d2a1c5e | 14612 | |
3e0be4ab GM |
14613 | /* Override any GCC internal prototype to avoid an error. |
14614 | Use char because int might match the return type of a GCC | |
14615 | builtin and then its argument prototype would still apply. */ | |
14616 | #ifdef __cplusplus | |
14617 | extern "C" | |
14618 | #endif | |
14619 | char des_cbc_encrypt (); | |
14620 | int | |
14621 | main () | |
14622 | { | |
14623 | return des_cbc_encrypt (); | |
14624 | ; | |
14625 | return 0; | |
14626 | } | |
7d2a1c5e | 14627 | _ACEOF |
3e0be4ab GM |
14628 | if ac_fn_c_try_link "$LINENO"; then : |
14629 | ac_cv_lib_des_des_cbc_encrypt=yes | |
14630 | else | |
14631 | ac_cv_lib_des_des_cbc_encrypt=no | |
14632 | fi | |
14633 | rm -f core conftest.err conftest.$ac_objext \ | |
14634 | conftest$ac_exeext conftest.$ac_ext | |
14635 | LIBS=$ac_check_lib_save_LIBS | |
14636 | fi | |
14637 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des_des_cbc_encrypt" >&5 | |
14638 | $as_echo "$ac_cv_lib_des_des_cbc_encrypt" >&6; } | |
14639 | if test "x$ac_cv_lib_des_des_cbc_encrypt" = x""yes; then : | |
14640 | have_des=yes | |
14641 | else | |
14642 | have_des=no | |
14643 | fi | |
7d2a1c5e | 14644 | |
3e0be4ab GM |
14645 | if test $have_des = yes; then |
14646 | DESLIB=-ldes | |
14647 | LIBS="$DESLIB $LIBS" | |
7d2a1c5e | 14648 | |
3e0be4ab | 14649 | $as_echo "#define HAVE_LIBDES 1" >>confdefs.h |
7d2a1c5e | 14650 | |
3e0be4ab GM |
14651 | fi |
14652 | fi | |
14653 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb4" >&5 | |
14654 | $as_echo_n "checking for krb_get_cred in -lkrb4... " >&6; } | |
14655 | if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then : | |
067d23c9 KY |
14656 | $as_echo_n "(cached) " >&6 |
14657 | else | |
3e0be4ab GM |
14658 | ac_check_lib_save_LIBS=$LIBS |
14659 | LIBS="-lkrb4 $LIBS" | |
14660 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1f5d53eb | 14661 | /* end confdefs.h. */ |
3e0be4ab GM |
14662 | |
14663 | /* Override any GCC internal prototype to avoid an error. | |
14664 | Use char because int might match the return type of a GCC | |
14665 | builtin and then its argument prototype would still apply. */ | |
14666 | #ifdef __cplusplus | |
14667 | extern "C" | |
14668 | #endif | |
14669 | char krb_get_cred (); | |
14670 | int | |
14671 | main () | |
14672 | { | |
14673 | return krb_get_cred (); | |
14674 | ; | |
14675 | return 0; | |
14676 | } | |
067d23c9 | 14677 | _ACEOF |
3e0be4ab GM |
14678 | if ac_fn_c_try_link "$LINENO"; then : |
14679 | ac_cv_lib_krb4_krb_get_cred=yes | |
1f5d53eb | 14680 | else |
3e0be4ab | 14681 | ac_cv_lib_krb4_krb_get_cred=no |
067d23c9 | 14682 | fi |
3e0be4ab GM |
14683 | rm -f core conftest.err conftest.$ac_objext \ |
14684 | conftest$ac_exeext conftest.$ac_ext | |
14685 | LIBS=$ac_check_lib_save_LIBS | |
067d23c9 | 14686 | fi |
3e0be4ab GM |
14687 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb4_krb_get_cred" >&5 |
14688 | $as_echo "$ac_cv_lib_krb4_krb_get_cred" >&6; } | |
14689 | if test "x$ac_cv_lib_krb4_krb_get_cred" = x""yes; then : | |
14690 | have_krb4=yes | |
14691 | else | |
14692 | have_krb4=no | |
1f5d53eb | 14693 | fi |
067d23c9 | 14694 | |
3e0be4ab GM |
14695 | if test $have_krb4 = yes; then |
14696 | KRB4LIB=-lkrb4 | |
14697 | LIBS="$KRB4LIB $LIBS" | |
067d23c9 | 14698 | |
3e0be4ab | 14699 | $as_echo "#define HAVE_LIBKRB4 1" >>confdefs.h |
067d23c9 | 14700 | |
3e0be4ab GM |
14701 | else |
14702 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb" >&5 | |
14703 | $as_echo_n "checking for krb_get_cred in -lkrb... " >&6; } | |
14704 | if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then : | |
1f5d53eb PE |
14705 | $as_echo_n "(cached) " >&6 |
14706 | else | |
3e0be4ab GM |
14707 | ac_check_lib_save_LIBS=$LIBS |
14708 | LIBS="-lkrb $LIBS" | |
14709 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1f5d53eb | 14710 | /* end confdefs.h. */ |
067d23c9 | 14711 | |
3e0be4ab GM |
14712 | /* Override any GCC internal prototype to avoid an error. |
14713 | Use char because int might match the return type of a GCC | |
14714 | builtin and then its argument prototype would still apply. */ | |
14715 | #ifdef __cplusplus | |
14716 | extern "C" | |
1f5d53eb | 14717 | #endif |
3e0be4ab GM |
14718 | char krb_get_cred (); |
14719 | int | |
14720 | main () | |
14721 | { | |
14722 | return krb_get_cred (); | |
14723 | ; | |
14724 | return 0; | |
14725 | } | |
067d23c9 | 14726 | _ACEOF |
3e0be4ab GM |
14727 | if ac_fn_c_try_link "$LINENO"; then : |
14728 | ac_cv_lib_krb_krb_get_cred=yes | |
1f5d53eb | 14729 | else |
3e0be4ab | 14730 | ac_cv_lib_krb_krb_get_cred=no |
067d23c9 | 14731 | fi |
3e0be4ab GM |
14732 | rm -f core conftest.err conftest.$ac_objext \ |
14733 | conftest$ac_exeext conftest.$ac_ext | |
14734 | LIBS=$ac_check_lib_save_LIBS | |
14735 | fi | |
14736 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb_krb_get_cred" >&5 | |
14737 | $as_echo "$ac_cv_lib_krb_krb_get_cred" >&6; } | |
14738 | if test "x$ac_cv_lib_krb_krb_get_cred" = x""yes; then : | |
14739 | have_krb=yes | |
14740 | else | |
14741 | have_krb=no | |
067d23c9 | 14742 | fi |
067d23c9 | 14743 | |
3e0be4ab GM |
14744 | if test $have_krb = yes; then |
14745 | KRB4LIB=-lkrb | |
14746 | LIBS="$KRB4LIB $LIBS" | |
067d23c9 | 14747 | |
3e0be4ab | 14748 | $as_echo "#define HAVE_LIBKRB 1" >>confdefs.h |
067d23c9 | 14749 | |
3e0be4ab GM |
14750 | fi |
14751 | fi | |
14752 | fi | |
067d23c9 | 14753 | |
3e0be4ab GM |
14754 | if test "${with_kerberos5}" != no; then |
14755 | for ac_header in krb5.h | |
14756 | do : | |
14757 | ac_fn_c_check_header_mongrel "$LINENO" "krb5.h" "ac_cv_header_krb5_h" "$ac_includes_default" | |
14758 | if test "x$ac_cv_header_krb5_h" = x""yes; then : | |
14759 | cat >>confdefs.h <<_ACEOF | |
14760 | #define HAVE_KRB5_H 1 | |
14761 | _ACEOF | |
14762 | ac_fn_c_check_member "$LINENO" "krb5_error" "text" "ac_cv_member_krb5_error_text" "#include <krb5.h> | |
14763 | " | |
14764 | if test "x$ac_cv_member_krb5_error_text" = x""yes; then : | |
067d23c9 | 14765 | |
3e0be4ab GM |
14766 | cat >>confdefs.h <<_ACEOF |
14767 | #define HAVE_KRB5_ERROR_TEXT 1 | |
14768 | _ACEOF | |
067d23c9 | 14769 | |
067d23c9 | 14770 | |
3e0be4ab GM |
14771 | fi |
14772 | ac_fn_c_check_member "$LINENO" "krb5_error" "e_text" "ac_cv_member_krb5_error_e_text" "#include <krb5.h> | |
14773 | " | |
14774 | if test "x$ac_cv_member_krb5_error_e_text" = x""yes; then : | |
067d23c9 | 14775 | |
3e0be4ab GM |
14776 | cat >>confdefs.h <<_ACEOF |
14777 | #define HAVE_KRB5_ERROR_E_TEXT 1 | |
14778 | _ACEOF | |
067d23c9 | 14779 | |
067d23c9 | 14780 | |
3e0be4ab | 14781 | fi |
067d23c9 | 14782 | |
3e0be4ab | 14783 | fi |
067d23c9 | 14784 | |
3e0be4ab | 14785 | done |
067d23c9 | 14786 | |
3e0be4ab GM |
14787 | else |
14788 | for ac_header in des.h | |
14789 | do : | |
14790 | ac_fn_c_check_header_mongrel "$LINENO" "des.h" "ac_cv_header_des_h" "$ac_includes_default" | |
14791 | if test "x$ac_cv_header_des_h" = x""yes; then : | |
14792 | cat >>confdefs.h <<_ACEOF | |
14793 | #define HAVE_DES_H 1 | |
14794 | _ACEOF | |
067d23c9 | 14795 | |
1f5d53eb | 14796 | else |
3e0be4ab GM |
14797 | for ac_header in kerberosIV/des.h |
14798 | do : | |
14799 | ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/des.h" "ac_cv_header_kerberosIV_des_h" "$ac_includes_default" | |
14800 | if test "x$ac_cv_header_kerberosIV_des_h" = x""yes; then : | |
14801 | cat >>confdefs.h <<_ACEOF | |
14802 | #define HAVE_KERBEROSIV_DES_H 1 | |
1f5d53eb | 14803 | _ACEOF |
067d23c9 | 14804 | |
3e0be4ab GM |
14805 | else |
14806 | for ac_header in kerberos/des.h | |
14807 | do : | |
14808 | ac_fn_c_check_header_mongrel "$LINENO" "kerberos/des.h" "ac_cv_header_kerberos_des_h" "$ac_includes_default" | |
14809 | if test "x$ac_cv_header_kerberos_des_h" = x""yes; then : | |
14810 | cat >>confdefs.h <<_ACEOF | |
14811 | #define HAVE_KERBEROS_DES_H 1 | |
14812 | _ACEOF | |
067d23c9 KY |
14813 | |
14814 | fi | |
067d23c9 | 14815 | |
3e0be4ab | 14816 | done |
067d23c9 | 14817 | |
3e0be4ab | 14818 | fi |
067d23c9 | 14819 | |
3e0be4ab | 14820 | done |
067d23c9 | 14821 | |
3e0be4ab | 14822 | fi |
067d23c9 | 14823 | |
3e0be4ab | 14824 | done |
1f5d53eb | 14825 | |
3e0be4ab GM |
14826 | for ac_header in krb.h |
14827 | do : | |
14828 | ac_fn_c_check_header_mongrel "$LINENO" "krb.h" "ac_cv_header_krb_h" "$ac_includes_default" | |
14829 | if test "x$ac_cv_header_krb_h" = x""yes; then : | |
14830 | cat >>confdefs.h <<_ACEOF | |
14831 | #define HAVE_KRB_H 1 | |
14832 | _ACEOF | |
1f5d53eb | 14833 | |
3e0be4ab GM |
14834 | else |
14835 | for ac_header in kerberosIV/krb.h | |
1f5d53eb | 14836 | do : |
3e0be4ab GM |
14837 | ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/krb.h" "ac_cv_header_kerberosIV_krb_h" "$ac_includes_default" |
14838 | if test "x$ac_cv_header_kerberosIV_krb_h" = x""yes; then : | |
1f5d53eb | 14839 | cat >>confdefs.h <<_ACEOF |
3e0be4ab | 14840 | #define HAVE_KERBEROSIV_KRB_H 1 |
1f5d53eb | 14841 | _ACEOF |
067d23c9 KY |
14842 | |
14843 | else | |
3e0be4ab GM |
14844 | for ac_header in kerberos/krb.h |
14845 | do : | |
14846 | ac_fn_c_check_header_mongrel "$LINENO" "kerberos/krb.h" "ac_cv_header_kerberos_krb_h" "$ac_includes_default" | |
14847 | if test "x$ac_cv_header_kerberos_krb_h" = x""yes; then : | |
14848 | cat >>confdefs.h <<_ACEOF | |
14849 | #define HAVE_KERBEROS_KRB_H 1 | |
14850 | _ACEOF | |
14851 | ||
067d23c9 KY |
14852 | fi |
14853 | ||
1f5d53eb PE |
14854 | done |
14855 | ||
3e0be4ab | 14856 | fi |
1f5d53eb | 14857 | |
3e0be4ab GM |
14858 | done |
14859 | ||
14860 | fi | |
14861 | ||
14862 | done | |
14863 | ||
14864 | fi | |
14865 | for ac_header in com_err.h | |
1f5d53eb | 14866 | do : |
3e0be4ab GM |
14867 | ac_fn_c_check_header_mongrel "$LINENO" "com_err.h" "ac_cv_header_com_err_h" "$ac_includes_default" |
14868 | if test "x$ac_cv_header_com_err_h" = x""yes; then : | |
1f5d53eb | 14869 | cat >>confdefs.h <<_ACEOF |
3e0be4ab | 14870 | #define HAVE_COM_ERR_H 1 |
1f5d53eb | 14871 | _ACEOF |
067d23c9 | 14872 | |
067d23c9 | 14873 | fi |
3e0be4ab | 14874 | |
1f5d53eb | 14875 | done |
067d23c9 | 14876 | |
3e0be4ab | 14877 | fi |
067d23c9 | 14878 | |
3e0be4ab GM |
14879 | |
14880 | ||
14881 | ||
14882 | ||
14883 | ||
14884 | ||
14885 | # Solaris requires -lintl if you want strerror (which calls dgettext) | |
14886 | # to return localized messages. | |
14887 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dgettext in -lintl" >&5 | |
14888 | $as_echo_n "checking for dgettext in -lintl... " >&6; } | |
14889 | if test "${ac_cv_lib_intl_dgettext+set}" = set; then : | |
067d23c9 KY |
14890 | $as_echo_n "(cached) " >&6 |
14891 | else | |
3e0be4ab GM |
14892 | ac_check_lib_save_LIBS=$LIBS |
14893 | LIBS="-lintl $LIBS" | |
14894 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
067d23c9 | 14895 | /* end confdefs.h. */ |
3e0be4ab GM |
14896 | |
14897 | /* Override any GCC internal prototype to avoid an error. | |
14898 | Use char because int might match the return type of a GCC | |
14899 | builtin and then its argument prototype would still apply. */ | |
14900 | #ifdef __cplusplus | |
14901 | extern "C" | |
14902 | #endif | |
14903 | char dgettext (); | |
067d23c9 KY |
14904 | int |
14905 | main () | |
14906 | { | |
3e0be4ab | 14907 | return dgettext (); |
067d23c9 KY |
14908 | ; |
14909 | return 0; | |
14910 | } | |
14911 | _ACEOF | |
2b7f7d99 | 14912 | if ac_fn_c_try_link "$LINENO"; then : |
3e0be4ab GM |
14913 | ac_cv_lib_intl_dgettext=yes |
14914 | else | |
14915 | ac_cv_lib_intl_dgettext=no | |
14916 | fi | |
14917 | rm -f core conftest.err conftest.$ac_objext \ | |
14918 | conftest$ac_exeext conftest.$ac_ext | |
14919 | LIBS=$ac_check_lib_save_LIBS | |
14920 | fi | |
14921 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_dgettext" >&5 | |
14922 | $as_echo "$ac_cv_lib_intl_dgettext" >&6; } | |
14923 | if test "x$ac_cv_lib_intl_dgettext" = x""yes; then : | |
14924 | cat >>confdefs.h <<_ACEOF | |
14925 | #define HAVE_LIBINTL 1 | |
14926 | _ACEOF | |
14927 | ||
14928 | LIBS="-lintl $LIBS" | |
14929 | ||
14930 | fi | |
14931 | ||
14932 | ||
14933 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime caches TZ" >&5 | |
14934 | $as_echo_n "checking whether localtime caches TZ... " >&6; } | |
14935 | if test "${emacs_cv_localtime_cache+set}" = set; then : | |
14936 | $as_echo_n "(cached) " >&6 | |
14937 | else | |
14938 | if test x$ac_cv_func_tzset = xyes; then | |
14939 | if test "$cross_compiling" = yes; then : | |
14940 | # If we have tzset, assume the worst when cross-compiling. | |
14941 | emacs_cv_localtime_cache=yes | |
1fd182f0 | 14942 | else |
1f5d53eb | 14943 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
1fd182f0 | 14944 | /* end confdefs.h. */ |
3e0be4ab GM |
14945 | #include <time.h> |
14946 | char TZ_GMT0[] = "TZ=GMT0"; | |
14947 | char TZ_PST8[] = "TZ=PST8"; | |
14948 | main() | |
1fd182f0 | 14949 | { |
3e0be4ab GM |
14950 | time_t now = time ((time_t *) 0); |
14951 | int hour_GMT0, hour_unset; | |
14952 | if (putenv (TZ_GMT0) != 0) | |
14953 | exit (1); | |
14954 | hour_GMT0 = localtime (&now)->tm_hour; | |
14955 | unsetenv("TZ"); | |
14956 | hour_unset = localtime (&now)->tm_hour; | |
14957 | if (putenv (TZ_PST8) != 0) | |
14958 | exit (1); | |
14959 | if (localtime (&now)->tm_hour == hour_GMT0) | |
14960 | exit (1); | |
14961 | unsetenv("TZ"); | |
14962 | if (localtime (&now)->tm_hour != hour_unset) | |
14963 | exit (1); | |
14964 | exit (0); | |
1fd182f0 PE |
14965 | } |
14966 | _ACEOF | |
3e0be4ab GM |
14967 | if ac_fn_c_try_run "$LINENO"; then : |
14968 | emacs_cv_localtime_cache=no | |
1fd182f0 | 14969 | else |
3e0be4ab | 14970 | emacs_cv_localtime_cache=yes |
1fd182f0 | 14971 | fi |
3e0be4ab GM |
14972 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
14973 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
1fd182f0 | 14974 | fi |
1fd182f0 | 14975 | |
1f5d53eb | 14976 | else |
3e0be4ab GM |
14977 | # If we lack tzset, report that localtime does not cache TZ, |
14978 | # since we can't invalidate the cache if we don't have tzset. | |
14979 | emacs_cv_localtime_cache=no | |
14980 | fi | |
14981 | fi | |
14982 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_localtime_cache" >&5 | |
14983 | $as_echo "$emacs_cv_localtime_cache" >&6; } | |
14984 | if test $emacs_cv_localtime_cache = yes; then | |
1fd182f0 | 14985 | |
3e0be4ab | 14986 | $as_echo "#define LOCALTIME_CACHE 1" >>confdefs.h |
1fd182f0 | 14987 | |
1f5d53eb | 14988 | fi |
d6974efa | 14989 | |
3e0be4ab GM |
14990 | if test "x$HAVE_TIMEVAL" = xyes; then |
14991 | for ac_func in gettimeofday | |
14992 | do : | |
14993 | ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday" | |
14994 | if test "x$ac_cv_func_gettimeofday" = x""yes; then : | |
14995 | cat >>confdefs.h <<_ACEOF | |
14996 | #define HAVE_GETTIMEOFDAY 1 | |
14997 | _ACEOF | |
1fd182f0 | 14998 | |
1f5d53eb | 14999 | fi |
3e0be4ab | 15000 | done |
1fd182f0 | 15001 | |
3e0be4ab GM |
15002 | if test $ac_cv_func_gettimeofday = yes; then |
15003 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday can accept two arguments" >&5 | |
15004 | $as_echo_n "checking whether gettimeofday can accept two arguments... " >&6; } | |
15005 | if test "${emacs_cv_gettimeofday_two_arguments+set}" = set; then : | |
1fd182f0 PE |
15006 | $as_echo_n "(cached) " >&6 |
15007 | else | |
15008 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15009 | /* end confdefs.h. */ | |
1f5d53eb | 15010 | |
3e0be4ab GM |
15011 | #ifdef TIME_WITH_SYS_TIME |
15012 | #include <sys/time.h> | |
15013 | #include <time.h> | |
15014 | #else | |
15015 | #ifdef HAVE_SYS_TIME_H | |
15016 | #include <sys/time.h> | |
15017 | #else | |
15018 | #include <time.h> | |
15019 | #endif | |
15020 | #endif | |
1fd182f0 PE |
15021 | int |
15022 | main () | |
15023 | { | |
3e0be4ab GM |
15024 | struct timeval time; |
15025 | gettimeofday (&time, 0); | |
1fd182f0 PE |
15026 | ; |
15027 | return 0; | |
15028 | } | |
15029 | _ACEOF | |
3e0be4ab GM |
15030 | if ac_fn_c_try_compile "$LINENO"; then : |
15031 | emacs_cv_gettimeofday_two_arguments=yes | |
1fd182f0 | 15032 | else |
3e0be4ab | 15033 | emacs_cv_gettimeofday_two_arguments=no |
1fd182f0 | 15034 | fi |
3e0be4ab | 15035 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
1fd182f0 | 15036 | fi |
3e0be4ab GM |
15037 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_gettimeofday_two_arguments" >&5 |
15038 | $as_echo "$emacs_cv_gettimeofday_two_arguments" >&6; } | |
15039 | if test $emacs_cv_gettimeofday_two_arguments = no; then | |
1fd182f0 | 15040 | |
3e0be4ab | 15041 | $as_echo "#define GETTIMEOFDAY_ONE_ARGUMENT 1" >>confdefs.h |
1fd182f0 | 15042 | |
1f5d53eb | 15043 | fi |
1fd182f0 | 15044 | fi |
3e0be4ab | 15045 | fi |
1fd182f0 | 15046 | |
3e0be4ab GM |
15047 | ok_so_far=yes |
15048 | ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket" | |
15049 | if test "x$ac_cv_func_socket" = x""yes; then : | |
1fd182f0 | 15050 | |
3e0be4ab GM |
15051 | else |
15052 | ok_so_far=no | |
15053 | fi | |
1fd182f0 | 15054 | |
3e0be4ab GM |
15055 | if test $ok_so_far = yes; then |
15056 | ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default" | |
15057 | if test "x$ac_cv_header_netinet_in_h" = x""yes; then : | |
1fd182f0 | 15058 | |
3e0be4ab GM |
15059 | else |
15060 | ok_so_far=no | |
15061 | fi | |
1fd182f0 | 15062 | |
1f5d53eb | 15063 | |
52724a05 | 15064 | fi |
3e0be4ab GM |
15065 | if test $ok_so_far = yes; then |
15066 | ac_fn_c_check_header_mongrel "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$ac_includes_default" | |
15067 | if test "x$ac_cv_header_arpa_inet_h" = x""yes; then : | |
1f5d53eb | 15068 | |
3e0be4ab GM |
15069 | else |
15070 | ok_so_far=no | |
15071 | fi | |
1f5d53eb | 15072 | |
1f5d53eb | 15073 | |
3e0be4ab GM |
15074 | fi |
15075 | if test $ok_so_far = yes; then | |
1f5d53eb | 15076 | |
3e0be4ab | 15077 | $as_echo "#define HAVE_INET_SOCKETS 1" >>confdefs.h |
1f5d53eb | 15078 | |
3e0be4ab | 15079 | fi |
1f5d53eb | 15080 | |
3e0be4ab | 15081 | if test -f /usr/lpp/X11/bin/smt.exp; then |
1f5d53eb | 15082 | |
3e0be4ab | 15083 | $as_echo "#define HAVE_AIX_SMT_EXP 1" >>confdefs.h |
1f5d53eb PE |
15084 | |
15085 | fi | |
15086 | ||
3e0be4ab GM |
15087 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system supports dynamic ptys" >&5 |
15088 | $as_echo_n "checking whether system supports dynamic ptys... " >&6; } | |
15089 | if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then | |
15090 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
15091 | $as_echo "yes" >&6; } | |
1f5d53eb | 15092 | |
3e0be4ab | 15093 | $as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h |
1f5d53eb | 15094 | |
ae0d7250 | 15095 | else |
3e0be4ab GM |
15096 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
15097 | $as_echo "no" >&6; } | |
15098 | fi | |
4fda9c95 | 15099 | |
3e0be4ab GM |
15100 | ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" |
15101 | if test "x$ac_cv_type_pid_t" = x""yes; then : | |
15102 | ||
15103 | else | |
4fda9c95 | 15104 | |
3e0be4ab GM |
15105 | cat >>confdefs.h <<_ACEOF |
15106 | #define pid_t int | |
ae0d7250 | 15107 | _ACEOF |
4fda9c95 | 15108 | |
4fda9c95 | 15109 | fi |
4fda9c95 | 15110 | |
3e0be4ab GM |
15111 | for ac_header in vfork.h |
15112 | do : | |
15113 | ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default" | |
15114 | if test "x$ac_cv_header_vfork_h" = x""yes; then : | |
15115 | cat >>confdefs.h <<_ACEOF | |
15116 | #define HAVE_VFORK_H 1 | |
15117 | _ACEOF | |
4fda9c95 | 15118 | |
3e0be4ab GM |
15119 | fi |
15120 | ||
15121 | done | |
4fda9c95 | 15122 | |
3e0be4ab GM |
15123 | for ac_func in fork vfork |
15124 | do : | |
15125 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
15126 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
15127 | eval as_val=\$$as_ac_var | |
15128 | if test "x$as_val" = x""yes; then : | |
15129 | cat >>confdefs.h <<_ACEOF | |
15130 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
15131 | _ACEOF | |
4fda9c95 | 15132 | |
3e0be4ab GM |
15133 | fi |
15134 | done | |
4fda9c95 | 15135 | |
3e0be4ab GM |
15136 | if test "x$ac_cv_func_fork" = xyes; then |
15137 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 | |
15138 | $as_echo_n "checking for working fork... " >&6; } | |
15139 | if test "${ac_cv_func_fork_works+set}" = set; then : | |
4fda9c95 GM |
15140 | $as_echo_n "(cached) " >&6 |
15141 | else | |
3e0be4ab GM |
15142 | if test "$cross_compiling" = yes; then : |
15143 | ac_cv_func_fork_works=cross | |
4fda9c95 GM |
15144 | else |
15145 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15146 | /* end confdefs.h. */ | |
3e0be4ab | 15147 | $ac_includes_default |
4fda9c95 GM |
15148 | int |
15149 | main () | |
15150 | { | |
3e0be4ab GM |
15151 | |
15152 | /* By Ruediger Kuhlmann. */ | |
15153 | return fork () < 0; | |
15154 | ||
4fda9c95 GM |
15155 | ; |
15156 | return 0; | |
15157 | } | |
15158 | _ACEOF | |
15159 | if ac_fn_c_try_run "$LINENO"; then : | |
3e0be4ab | 15160 | ac_cv_func_fork_works=yes |
4fda9c95 | 15161 | else |
3e0be4ab | 15162 | ac_cv_func_fork_works=no |
4fda9c95 GM |
15163 | fi |
15164 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
15165 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
15166 | fi | |
15167 | ||
4fda9c95 | 15168 | fi |
3e0be4ab GM |
15169 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5 |
15170 | $as_echo "$ac_cv_func_fork_works" >&6; } | |
4fda9c95 | 15171 | |
3e0be4ab GM |
15172 | else |
15173 | ac_cv_func_fork_works=$ac_cv_func_fork | |
15174 | fi | |
15175 | if test "x$ac_cv_func_fork_works" = xcross; then | |
15176 | case $host in | |
15177 | *-*-amigaos* | *-*-msdosdjgpp*) | |
15178 | # Override, as these systems have only a dummy fork() stub | |
15179 | ac_cv_func_fork_works=no | |
15180 | ;; | |
15181 | *) | |
15182 | ac_cv_func_fork_works=yes | |
15183 | ;; | |
15184 | esac | |
15185 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 | |
15186 | $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} | |
15187 | fi | |
15188 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
15189 | if test "x$ac_cv_func_vfork" = xyes; then | |
15190 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 | |
15191 | $as_echo_n "checking for working vfork... " >&6; } | |
15192 | if test "${ac_cv_func_vfork_works+set}" = set; then : | |
15193 | $as_echo_n "(cached) " >&6 | |
15194 | else | |
15195 | if test "$cross_compiling" = yes; then : | |
15196 | ac_cv_func_vfork_works=cross | |
15197 | else | |
15198 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15199 | /* end confdefs.h. */ | |
15200 | /* Thanks to Paul Eggert for this test. */ | |
15201 | $ac_includes_default | |
15202 | #include <sys/wait.h> | |
15203 | #ifdef HAVE_VFORK_H | |
15204 | # include <vfork.h> | |
15205 | #endif | |
15206 | /* On some sparc systems, changes by the child to local and incoming | |
15207 | argument registers are propagated back to the parent. The compiler | |
15208 | is told about this with #include <vfork.h>, but some compilers | |
15209 | (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a | |
15210 | static variable whose address is put into a register that is | |
15211 | clobbered by the vfork. */ | |
15212 | static void | |
15213 | #ifdef __cplusplus | |
15214 | sparc_address_test (int arg) | |
15215 | # else | |
15216 | sparc_address_test (arg) int arg; | |
15217 | #endif | |
15218 | { | |
15219 | static pid_t child; | |
15220 | if (!child) { | |
15221 | child = vfork (); | |
15222 | if (child < 0) { | |
15223 | perror ("vfork"); | |
15224 | _exit(2); | |
15225 | } | |
15226 | if (!child) { | |
15227 | arg = getpid(); | |
15228 | write(-1, "", 0); | |
15229 | _exit (arg); | |
15230 | } | |
15231 | } | |
15232 | } | |
4fda9c95 | 15233 | |
3e0be4ab GM |
15234 | int |
15235 | main () | |
15236 | { | |
15237 | pid_t parent = getpid (); | |
15238 | pid_t child; | |
4fda9c95 | 15239 | |
3e0be4ab | 15240 | sparc_address_test (0); |
4fda9c95 | 15241 | |
3e0be4ab | 15242 | child = vfork (); |
4fda9c95 | 15243 | |
3e0be4ab GM |
15244 | if (child == 0) { |
15245 | /* Here is another test for sparc vfork register problems. This | |
15246 | test uses lots of local variables, at least as many local | |
15247 | variables as main has allocated so far including compiler | |
15248 | temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris | |
15249 | 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should | |
15250 | reuse the register of parent for one of the local variables, | |
15251 | since it will think that parent can't possibly be used any more | |
15252 | in this routine. Assigning to the local variable will thus | |
15253 | munge parent in the parent process. */ | |
15254 | pid_t | |
15255 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
15256 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
15257 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
15258 | use the same hardware register for all 8 local variables. */ | |
15259 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
15260 | || p != p5 || p != p6 || p != p7) | |
15261 | _exit(1); | |
4fda9c95 | 15262 | |
3e0be4ab GM |
15263 | /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent |
15264 | from child file descriptors. If the child closes a descriptor | |
15265 | before it execs or exits, this munges the parent's descriptor | |
15266 | as well. Test for this by closing stdout in the child. */ | |
15267 | _exit(close(fileno(stdout)) != 0); | |
15268 | } else { | |
15269 | int status; | |
15270 | struct stat st; | |
4fda9c95 | 15271 | |
3e0be4ab GM |
15272 | while (wait(&status) != child) |
15273 | ; | |
15274 | return ( | |
15275 | /* Was there some problem with vforking? */ | |
15276 | child < 0 | |
15277 | ||
15278 | /* Did the child fail? (This shouldn't happen.) */ | |
15279 | || status | |
4fda9c95 | 15280 | |
3e0be4ab GM |
15281 | /* Did the vfork/compiler bug occur? */ |
15282 | || parent != getpid() | |
15283 | ||
15284 | /* Did the file descriptor bug occur? */ | |
15285 | || fstat(fileno(stdout), &st) != 0 | |
15286 | ); | |
15287 | } | |
15288 | } | |
4fda9c95 | 15289 | _ACEOF |
3e0be4ab GM |
15290 | if ac_fn_c_try_run "$LINENO"; then : |
15291 | ac_cv_func_vfork_works=yes | |
15292 | else | |
15293 | ac_cv_func_vfork_works=no | |
15294 | fi | |
15295 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
15296 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
15297 | fi | |
4fda9c95 | 15298 | |
3e0be4ab GM |
15299 | fi |
15300 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 | |
15301 | $as_echo "$ac_cv_func_vfork_works" >&6; } | |
4fda9c95 | 15302 | |
3e0be4ab GM |
15303 | fi; |
15304 | if test "x$ac_cv_func_fork_works" = xcross; then | |
15305 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
15306 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 | |
15307 | $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} | |
4fda9c95 | 15308 | fi |
4fda9c95 | 15309 | |
3e0be4ab | 15310 | if test "x$ac_cv_func_vfork_works" = xyes; then |
4fda9c95 | 15311 | |
3e0be4ab | 15312 | $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h |
4fda9c95 | 15313 | |
3e0be4ab | 15314 | else |
4fda9c95 | 15315 | |
3e0be4ab | 15316 | $as_echo "#define vfork fork" >>confdefs.h |
4fda9c95 | 15317 | |
3e0be4ab GM |
15318 | fi |
15319 | if test "x$ac_cv_func_fork_works" = xyes; then | |
4fda9c95 | 15320 | |
3e0be4ab | 15321 | $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h |
4fda9c95 | 15322 | |
3e0be4ab | 15323 | fi |
4fda9c95 GM |
15324 | |
15325 | ||
3e0be4ab GM |
15326 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 |
15327 | $as_echo_n "checking for nl_langinfo and CODESET... " >&6; } | |
15328 | if test "${emacs_cv_langinfo_codeset+set}" = set; then : | |
15329 | $as_echo_n "(cached) " >&6 | |
15330 | else | |
15331 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15332 | /* end confdefs.h. */ | |
15333 | #include <langinfo.h> | |
15334 | int | |
15335 | main () | |
15336 | { | |
15337 | char* cs = nl_langinfo(CODESET); | |
15338 | ; | |
15339 | return 0; | |
15340 | } | |
15341 | _ACEOF | |
15342 | if ac_fn_c_try_link "$LINENO"; then : | |
15343 | emacs_cv_langinfo_codeset=yes | |
15344 | else | |
15345 | emacs_cv_langinfo_codeset=no | |
15346 | fi | |
15347 | rm -f core conftest.err conftest.$ac_objext \ | |
15348 | conftest$ac_exeext conftest.$ac_ext | |
4fda9c95 | 15349 | |
3e0be4ab GM |
15350 | fi |
15351 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_langinfo_codeset" >&5 | |
15352 | $as_echo "$emacs_cv_langinfo_codeset" >&6; } | |
15353 | if test $emacs_cv_langinfo_codeset = yes; then | |
4fda9c95 | 15354 | |
3e0be4ab | 15355 | $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h |
4fda9c95 | 15356 | |
3e0be4ab | 15357 | fi |
4fda9c95 | 15358 | |
3e0be4ab GM |
15359 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5 |
15360 | $as_echo_n "checking for mbstate_t... " >&6; } | |
15361 | if test "${ac_cv_type_mbstate_t+set}" = set; then : | |
15362 | $as_echo_n "(cached) " >&6 | |
15363 | else | |
15364 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15365 | /* end confdefs.h. */ | |
15366 | $ac_includes_default | |
15367 | # include <wchar.h> | |
15368 | int | |
15369 | main () | |
15370 | { | |
15371 | mbstate_t x; return sizeof x; | |
15372 | ; | |
15373 | return 0; | |
15374 | } | |
15375 | _ACEOF | |
15376 | if ac_fn_c_try_compile "$LINENO"; then : | |
15377 | ac_cv_type_mbstate_t=yes | |
15378 | else | |
15379 | ac_cv_type_mbstate_t=no | |
15380 | fi | |
15381 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
15382 | fi | |
15383 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5 | |
15384 | $as_echo "$ac_cv_type_mbstate_t" >&6; } | |
15385 | if test $ac_cv_type_mbstate_t = yes; then | |
4fda9c95 | 15386 | |
3e0be4ab | 15387 | $as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h |
4fda9c95 | 15388 | |
3e0be4ab | 15389 | else |
4fda9c95 | 15390 | |
3e0be4ab | 15391 | $as_echo "#define mbstate_t int" >>confdefs.h |
4fda9c95 | 15392 | |
3e0be4ab | 15393 | fi |
4fda9c95 | 15394 | |
3e0be4ab GM |
15395 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C restricted array declarations" >&5 |
15396 | $as_echo_n "checking for C restricted array declarations... " >&6; } | |
15397 | if test "${emacs_cv_c_restrict_arr+set}" = set; then : | |
15398 | $as_echo_n "(cached) " >&6 | |
15399 | else | |
15400 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15401 | /* end confdefs.h. */ | |
15402 | void fred (int x[__restrict]); | |
15403 | int | |
15404 | main () | |
15405 | { | |
4fda9c95 | 15406 | |
3e0be4ab GM |
15407 | ; |
15408 | return 0; | |
15409 | } | |
15410 | _ACEOF | |
15411 | if ac_fn_c_try_compile "$LINENO"; then : | |
15412 | emacs_cv_c_restrict_arr=yes | |
15413 | else | |
15414 | emacs_cv_c_restrict_arr=no | |
15415 | fi | |
15416 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
15417 | fi | |
15418 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_c_restrict_arr" >&5 | |
15419 | $as_echo "$emacs_cv_c_restrict_arr" >&6; } | |
15420 | if test "$emacs_cv_c_restrict_arr" = yes; then | |
4fda9c95 | 15421 | |
3e0be4ab | 15422 | $as_echo "#define __restrict_arr __restrict" >>confdefs.h |
4fda9c95 | 15423 | |
3e0be4ab | 15424 | fi |
4fda9c95 GM |
15425 | |
15426 | ||
3e0be4ab GM |
15427 | # Set up the CFLAGS for real compilation, so we can substitute it. |
15428 | CFLAGS="$REAL_CFLAGS" | |
15429 | CPPFLAGS="$REAL_CPPFLAGS" | |
4fda9c95 | 15430 | |
3e0be4ab GM |
15431 | ## Hack to detect a buggy GCC version. |
15432 | if test "x$GCC" = xyes \ | |
15433 | && test x"`$CC --version 2> /dev/null | grep 'gcc.* 4.5.0'`" != x \ | |
15434 | && test x"`echo $CFLAGS | grep '\-O[23]'`" != x \ | |
15435 | && test x"`echo $CFLAGS | grep '\-fno-optimize-sibling-calls'`" = x; then | |
15436 | as_fn_error "GCC 4.5.0 has problems compiling Emacs; see etc/PROBLEMS'." "$LINENO" 5 | |
15437 | fi | |
4fda9c95 | 15438 | |
3e0be4ab | 15439 | version=$PACKAGE_VERSION |
4fda9c95 | 15440 | |
3e0be4ab GM |
15441 | ### Specify what sort of things we'll be editing into Makefile and config.h. |
15442 | ### Use configuration here uncanonicalized to avoid exceeding size limits. | |
4fda9c95 | 15443 | |
4fda9c95 | 15444 | |
3e0be4ab | 15445 | ## Unused? |
4fda9c95 GM |
15446 | |
15447 | ||
4fda9c95 | 15448 | |
4fda9c95 GM |
15449 | |
15450 | ||
15451 | ||
15452 | ||
4fda9c95 GM |
15453 | |
15454 | ||
4fda9c95 GM |
15455 | |
15456 | ||
4fda9c95 GM |
15457 | |
15458 | ||
4fda9c95 GM |
15459 | |
15460 | ||
4fda9c95 | 15461 | |
4fda9c95 | 15462 | |
4fda9c95 | 15463 | |
4fda9c95 | 15464 | |
4fda9c95 | 15465 | |
3e0be4ab GM |
15466 | ## FIXME? Nothing uses @LD_SWITCH_X_SITE@. |
15467 | ## src/Makefile.in did add LD_SWITCH_X_SITE (as a cpp define) to the | |
15468 | ## end of LIBX_BASE, but nothing ever set it. | |
15469 | ||
15470 | ||
15471 | ||
4fda9c95 | 15472 | |
3e0be4ab GM |
15473 | ## Used in lwlib/Makefile.in. |
15474 | ||
15475 | if test -n "${machfile}"; then | |
15476 | M_FILE="\$(srcdir)/${machfile}" | |
4fda9c95 | 15477 | else |
3e0be4ab GM |
15478 | M_FILE= |
15479 | fi | |
15480 | S_FILE="\$(srcdir)/${opsysfile}" | |
4fda9c95 GM |
15481 | |
15482 | ||
4fda9c95 GM |
15483 | |
15484 | ||
4fda9c95 GM |
15485 | |
15486 | ||
4fda9c95 | 15487 | |
4fda9c95 | 15488 | |
4fda9c95 | 15489 | |
3e0be4ab GM |
15490 | |
15491 | cat >>confdefs.h <<_ACEOF | |
15492 | #define EMACS_CONFIGURATION "${canonical}" | |
4fda9c95 | 15493 | _ACEOF |
4fda9c95 GM |
15494 | |
15495 | ||
3e0be4ab GM |
15496 | cat >>confdefs.h <<_ACEOF |
15497 | #define EMACS_CONFIG_OPTIONS "${ac_configure_args}" | |
15498 | _ACEOF | |
15499 | ||
15500 | if test -n "$machfile"; then | |
15501 | ||
15502 | cat >>confdefs.h <<_ACEOF | |
15503 | #define config_machfile "${machfile}" | |
15504 | _ACEOF | |
4fda9c95 GM |
15505 | |
15506 | fi | |
3e0be4ab GM |
15507 | |
15508 | cat >>confdefs.h <<_ACEOF | |
15509 | #define config_opsysfile "${opsysfile}" | |
4fda9c95 GM |
15510 | _ACEOF |
15511 | ||
3e0be4ab GM |
15512 | |
15513 | XMENU_OBJ= | |
15514 | XOBJ= | |
15515 | FONT_OBJ= | |
15516 | if test "${HAVE_X_WINDOWS}" = "yes" ; then | |
15517 | ||
15518 | $as_echo "#define HAVE_X_WINDOWS 1" >>confdefs.h | |
15519 | ||
15520 | XMENU_OBJ=xmenu.o | |
15521 | XOBJ="xterm.o xfns.o xselect.o xrdb.o fontset.o xsmfns.o fringe.o image.o xsettings.o xgselect.o" | |
15522 | FONT_OBJ=xfont.o | |
15523 | if test "$HAVE_XFT" = "yes"; then | |
15524 | FONT_OBJ="$FONT_OBJ ftfont.o xftfont.o ftxfont.o" | |
15525 | elif test "$HAVE_FREETYPE" = "yes"; then | |
15526 | FONT_OBJ="$FONT_OBJ ftfont.o ftxfont.o" | |
15527 | fi | |
15528 | ||
4fda9c95 GM |
15529 | fi |
15530 | ||
4fda9c95 | 15531 | |
4fda9c95 | 15532 | |
4fda9c95 | 15533 | |
3e0be4ab GM |
15534 | WIDGET_OBJ= |
15535 | MOTIF_LIBW= | |
15536 | if test "${USE_X_TOOLKIT}" != "none" ; then | |
15537 | WIDGET_OBJ=widget.o | |
15538 | ||
15539 | $as_echo "#define USE_X_TOOLKIT 1" >>confdefs.h | |
4fda9c95 | 15540 | |
3e0be4ab | 15541 | if test "${USE_X_TOOLKIT}" = "LUCID"; then |
4fda9c95 | 15542 | |
3e0be4ab | 15543 | $as_echo "#define USE_LUCID 1" >>confdefs.h |
4fda9c95 | 15544 | |
3e0be4ab | 15545 | elif test "${USE_X_TOOLKIT}" = "MOTIF"; then |
4fda9c95 | 15546 | |
3e0be4ab | 15547 | $as_echo "#define USE_MOTIF 1" >>confdefs.h |
4fda9c95 | 15548 | |
3e0be4ab GM |
15549 | MOTIF_LIBW=-lXm |
15550 | case "$opsys" in | |
15551 | gnu-linux) | |
15552 | ## Paul Abrahams <abrahams at equinox.shaysnet.com> says this is needed. | |
15553 | MOTIF_LIBW="$MOTIF_LIBW -lXpm" | |
15554 | ;; | |
15555 | ||
15556 | unixware) | |
15557 | ## Richard Anthony Ryan <ryanr at ellingtn.ftc.nrcs.usda.gov> | |
15558 | ## says -lXimp is needed in UNIX_SV ... 4.2 1.1.2. | |
15559 | MOTIF_LIBW="MOTIF_LIBW -lXimp" | |
15560 | ;; | |
15561 | ||
15562 | aix4-2) | |
15563 | ## olson@mcs.anl.gov says -li18n is needed by -lXm. | |
15564 | MOTIF_LIBW="$MOTIF_LIBW -li18n" | |
15565 | ;; | |
15566 | esac | |
15567 | MOTIF_LIBW="$MOTIF_LIBW $LIBXP" | |
15568 | fi | |
15569 | fi | |
15570 | ||
15571 | ||
15572 | TOOLKIT_LIBW= | |
15573 | case "$USE_X_TOOLKIT" in | |
15574 | MOTIF) TOOLKIT_LIBW="$MOTIF_LIBW" ;; | |
15575 | LUCID) TOOLKIT_LIBW="$LUCID_LIBW" ;; | |
15576 | none) test "x$HAVE_GTK" = "xyes" && TOOLKIT_LIBW="$GTK_LIBS" ;; | |
15577 | esac | |
15578 | ||
15579 | ||
15580 | if test "$USE_X_TOOLKIT" = "none"; then | |
15581 | LIBXT_OTHER="\$(LIBXSM)" | |
15582 | OLDXMENU_TARGET="really-oldXMenu" | |
4fda9c95 | 15583 | else |
3e0be4ab GM |
15584 | LIBXT_OTHER="\$(LIBXMU) -lXt \$(LIBXTR6) -lXext" |
15585 | OLDXMENU_TARGET="really-lwlib" | |
15586 | fi | |
4fda9c95 | 15587 | |
4fda9c95 | 15588 | |
3e0be4ab GM |
15589 | ## The X Menu stuff is present in the X10 distribution, but missing |
15590 | ## from X11. If we have X10, just use the installed library; | |
15591 | ## otherwise, use our own copy. | |
15592 | if test "${HAVE_X11}" = "yes" ; then | |
15593 | ||
15594 | $as_echo "#define HAVE_X11 1" >>confdefs.h | |
15595 | ||
15596 | ||
15597 | if test "$USE_X_TOOLKIT" = "none"; then | |
15598 | OLDXMENU="\${oldXMenudir}/libXMenu11.a" | |
15599 | else | |
15600 | OLDXMENU="\${lwlibdir}/liblw.a" | |
15601 | fi | |
15602 | LIBXMENU="\$(OLDXMENU)" | |
15603 | LIBX_OTHER="\$(LIBXT) \$(LIBX_EXTRA)" | |
15604 | OLDXMENU_DEPS="\${OLDXMENU} ../src/\${OLDXMENU}" | |
4fda9c95 | 15605 | else |
3e0be4ab GM |
15606 | ## For a syntactically valid Makefile; not actually used for anything. |
15607 | ## See comments in src/Makefile.in. | |
15608 | OLDXMENU=nothing | |
15609 | ## FIXME This case (!HAVE_X11 && HAVE_X_WINDOWS) is no longer possible(?). | |
15610 | if test "${HAVE_X_WINDOWS}" = "yes"; then | |
15611 | LIBXMENU="-lXMenu" | |
15612 | else | |
15613 | LIBXMENU= | |
15614 | fi | |
15615 | LIBX_OTHER= | |
15616 | OLDXMENU_DEPS= | |
4fda9c95 GM |
15617 | fi |
15618 | ||
3e0be4ab GM |
15619 | if test "$HAVE_GTK" = "yes" || test "$HAVE_MENUS" != "yes"; then |
15620 | OLDXMENU_TARGET= | |
15621 | OLDXMENU=nothing | |
15622 | LIBXMENU= | |
15623 | OLDXMENU_DEPS= | |
15624 | fi | |
15625 | ||
15626 | ||
15627 | ||
15628 | ||
15629 | ||
15630 | ||
15631 | ||
15632 | if test "${HAVE_MENUS}" = "yes" ; then | |
15633 | ||
15634 | $as_echo "#define HAVE_MENUS 1" >>confdefs.h | |
4fda9c95 GM |
15635 | |
15636 | fi | |
4fda9c95 | 15637 | |
3e0be4ab | 15638 | if test "${GNU_MALLOC}" = "yes" ; then |
4fda9c95 | 15639 | |
3e0be4ab | 15640 | $as_echo "#define GNU_MALLOC 1" >>confdefs.h |
4fda9c95 | 15641 | |
3e0be4ab | 15642 | fi |
4fda9c95 | 15643 | |
3e0be4ab GM |
15644 | RALLOC_OBJ= |
15645 | if test "${REL_ALLOC}" = "yes" ; then | |
4fda9c95 | 15646 | |
3e0be4ab | 15647 | $as_echo "#define REL_ALLOC 1" >>confdefs.h |
4fda9c95 | 15648 | |
4fda9c95 | 15649 | |
3e0be4ab | 15650 | test "$system_malloc" != "yes" && RALLOC_OBJ=ralloc.o |
4fda9c95 GM |
15651 | fi |
15652 | ||
4fda9c95 | 15653 | |
3e0be4ab GM |
15654 | if test "$opsys" = "cygwin"; then |
15655 | CYGWIN_OBJ="sheap.o" | |
15656 | ## Cygwin differs because of its unexec(). | |
15657 | PRE_ALLOC_OBJ= | |
15658 | POST_ALLOC_OBJ=lastfile.o | |
15659 | else | |
15660 | CYGWIN_OBJ= | |
15661 | PRE_ALLOC_OBJ=lastfile.o | |
15662 | POST_ALLOC_OBJ= | |
4fda9c95 | 15663 | fi |
4fda9c95 | 15664 | |
4fda9c95 GM |
15665 | |
15666 | ||
15667 | ||
3e0be4ab | 15668 | # Configure gnulib here, now that we know LIBS. |
4fda9c95 | 15669 | |
3e0be4ab GM |
15670 | |
15671 | ||
15672 | ||
15673 | ||
15674 | ||
15675 | ||
15676 | ||
15677 | ||
15678 | ||
15679 | LIBC_FATAL_STDERR_=1 | |
15680 | export LIBC_FATAL_STDERR_ | |
15681 | ||
15682 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works | |
15683 | # for constant arguments. Useless! | |
15684 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 | |
15685 | $as_echo_n "checking for working alloca.h... " >&6; } | |
15686 | if test "${ac_cv_working_alloca_h+set}" = set; then : | |
4fda9c95 GM |
15687 | $as_echo_n "(cached) " >&6 |
15688 | else | |
15689 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15690 | /* end confdefs.h. */ | |
3e0be4ab | 15691 | #include <alloca.h> |
4fda9c95 GM |
15692 | int |
15693 | main () | |
15694 | { | |
3e0be4ab GM |
15695 | char *p = (char *) alloca (2 * sizeof (int)); |
15696 | if (p) return 0; | |
4fda9c95 GM |
15697 | ; |
15698 | return 0; | |
15699 | } | |
15700 | _ACEOF | |
3e0be4ab GM |
15701 | if ac_fn_c_try_link "$LINENO"; then : |
15702 | ac_cv_working_alloca_h=yes | |
4fda9c95 | 15703 | else |
3e0be4ab | 15704 | ac_cv_working_alloca_h=no |
4fda9c95 | 15705 | fi |
3e0be4ab GM |
15706 | rm -f core conftest.err conftest.$ac_objext \ |
15707 | conftest$ac_exeext conftest.$ac_ext | |
4fda9c95 | 15708 | fi |
3e0be4ab GM |
15709 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 |
15710 | $as_echo "$ac_cv_working_alloca_h" >&6; } | |
15711 | if test $ac_cv_working_alloca_h = yes; then | |
4fda9c95 | 15712 | |
3e0be4ab | 15713 | $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h |
4fda9c95 | 15714 | |
3e0be4ab | 15715 | fi |
4fda9c95 | 15716 | |
3e0be4ab GM |
15717 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 |
15718 | $as_echo_n "checking for alloca... " >&6; } | |
15719 | if test "${ac_cv_func_alloca_works+set}" = set; then : | |
4fda9c95 GM |
15720 | $as_echo_n "(cached) " >&6 |
15721 | else | |
3e0be4ab | 15722 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
4fda9c95 | 15723 | /* end confdefs.h. */ |
3e0be4ab GM |
15724 | #ifdef __GNUC__ |
15725 | # define alloca __builtin_alloca | |
15726 | #else | |
15727 | # ifdef _MSC_VER | |
15728 | # include <malloc.h> | |
15729 | # define alloca _alloca | |
15730 | # else | |
15731 | # ifdef HAVE_ALLOCA_H | |
15732 | # include <alloca.h> | |
15733 | # else | |
15734 | # ifdef _AIX | |
15735 | #pragma alloca | |
15736 | # else | |
15737 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
15738 | char *alloca (); | |
15739 | # endif | |
15740 | # endif | |
15741 | # endif | |
15742 | # endif | |
15743 | #endif | |
4fda9c95 | 15744 | |
4fda9c95 GM |
15745 | int |
15746 | main () | |
15747 | { | |
3e0be4ab GM |
15748 | char *p = (char *) alloca (1); |
15749 | if (p) return 0; | |
4fda9c95 GM |
15750 | ; |
15751 | return 0; | |
15752 | } | |
15753 | _ACEOF | |
3e0be4ab GM |
15754 | if ac_fn_c_try_link "$LINENO"; then : |
15755 | ac_cv_func_alloca_works=yes | |
15756 | else | |
15757 | ac_cv_func_alloca_works=no | |
4fda9c95 | 15758 | fi |
3e0be4ab GM |
15759 | rm -f core conftest.err conftest.$ac_objext \ |
15760 | conftest$ac_exeext conftest.$ac_ext | |
4fda9c95 | 15761 | fi |
3e0be4ab GM |
15762 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 |
15763 | $as_echo "$ac_cv_func_alloca_works" >&6; } | |
4fda9c95 | 15764 | |
3e0be4ab | 15765 | if test $ac_cv_func_alloca_works = yes; then |
4fda9c95 | 15766 | |
3e0be4ab | 15767 | $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h |
4fda9c95 | 15768 | |
3e0be4ab GM |
15769 | else |
15770 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
15771 | # that cause trouble. Some versions do not even contain alloca or | |
15772 | # contain a buggy version. If you still want to use their alloca, | |
15773 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
4fda9c95 GM |
15774 | |
15775 | ||
3e0be4ab GM |
15776 | |
15777 | ||
15778 | ||
15779 | ALLOCA=\${LIBOBJDIR}alloca.$ac_objext | |
15780 | ||
15781 | $as_echo "#define C_ALLOCA 1" >>confdefs.h | |
15782 | ||
15783 | ||
15784 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 | |
15785 | $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } | |
15786 | if test "${ac_cv_os_cray+set}" = set; then : | |
4fda9c95 GM |
15787 | $as_echo_n "(cached) " >&6 |
15788 | else | |
3e0be4ab | 15789 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
4fda9c95 | 15790 | /* end confdefs.h. */ |
3e0be4ab GM |
15791 | #if defined CRAY && ! defined CRAY2 |
15792 | webecray | |
15793 | #else | |
15794 | wenotbecray | |
15795 | #endif | |
4fda9c95 | 15796 | |
3e0be4ab GM |
15797 | _ACEOF |
15798 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
15799 | $EGREP "webecray" >/dev/null 2>&1; then : | |
15800 | ac_cv_os_cray=yes | |
15801 | else | |
15802 | ac_cv_os_cray=no | |
15803 | fi | |
15804 | rm -f conftest* | |
4fda9c95 | 15805 | |
3e0be4ab GM |
15806 | fi |
15807 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 | |
15808 | $as_echo "$ac_cv_os_cray" >&6; } | |
15809 | if test $ac_cv_os_cray = yes; then | |
15810 | for ac_func in _getb67 GETB67 getb67; do | |
15811 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
15812 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
15813 | eval as_val=\$$as_ac_var | |
15814 | if test "x$as_val" = x""yes; then : | |
15815 | ||
15816 | cat >>confdefs.h <<_ACEOF | |
15817 | #define CRAY_STACKSEG_END $ac_func | |
15818 | _ACEOF | |
15819 | ||
15820 | break | |
15821 | fi | |
15822 | ||
15823 | done | |
15824 | fi | |
15825 | ||
15826 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 | |
15827 | $as_echo_n "checking stack direction for C alloca... " >&6; } | |
15828 | if test "${ac_cv_c_stack_direction+set}" = set; then : | |
15829 | $as_echo_n "(cached) " >&6 | |
15830 | else | |
15831 | if test "$cross_compiling" = yes; then : | |
15832 | ac_cv_c_stack_direction=0 | |
15833 | else | |
15834 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15835 | /* end confdefs.h. */ | |
15836 | $ac_includes_default | |
4fda9c95 | 15837 | int |
3e0be4ab | 15838 | find_stack_direction (int *addr, int depth) |
4fda9c95 | 15839 | { |
3e0be4ab GM |
15840 | int dir, dummy = 0; |
15841 | if (! addr) | |
15842 | addr = &dummy; | |
15843 | *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1; | |
15844 | dir = depth ? find_stack_direction (addr, depth - 1) : 0; | |
15845 | return dir + dummy; | |
15846 | } | |
4fda9c95 | 15847 | |
3e0be4ab GM |
15848 | int |
15849 | main (int argc, char **argv) | |
15850 | { | |
15851 | return find_stack_direction (0, argc + !argv + 20) < 0; | |
4fda9c95 GM |
15852 | } |
15853 | _ACEOF | |
3e0be4ab GM |
15854 | if ac_fn_c_try_run "$LINENO"; then : |
15855 | ac_cv_c_stack_direction=1 | |
15856 | else | |
15857 | ac_cv_c_stack_direction=-1 | |
4fda9c95 | 15858 | fi |
3e0be4ab GM |
15859 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
15860 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
4fda9c95 | 15861 | fi |
3e0be4ab GM |
15862 | |
15863 | fi | |
15864 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 | |
15865 | $as_echo "$ac_cv_c_stack_direction" >&6; } | |
15866 | cat >>confdefs.h <<_ACEOF | |
15867 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
4fda9c95 GM |
15868 | _ACEOF |
15869 | ||
da6c8463 | 15870 | |
3e0be4ab | 15871 | fi |
da6c8463 GM |
15872 | |
15873 | ||
15874 | ||
15875 | ||
3e0be4ab GM |
15876 | for ac_func in $ac_func_list |
15877 | do : | |
15878 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
15879 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
15880 | eval as_val=\$$as_ac_var | |
15881 | if test "x$as_val" = x""yes; then : | |
15882 | cat >>confdefs.h <<_ACEOF | |
15883 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
15884 | _ACEOF | |
da6c8463 | 15885 | |
3e0be4ab GM |
15886 | fi |
15887 | done | |
da6c8463 GM |
15888 | |
15889 | ||
15890 | ||
15891 | ||
3e0be4ab GM |
15892 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 |
15893 | $as_echo_n "checking whether byte ordering is bigendian... " >&6; } | |
15894 | if test "${ac_cv_c_bigendian+set}" = set; then : | |
da6c8463 GM |
15895 | $as_echo_n "(cached) " >&6 |
15896 | else | |
3e0be4ab GM |
15897 | ac_cv_c_bigendian=unknown |
15898 | # See if we're dealing with a universal compiler. | |
15899 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
da6c8463 | 15900 | /* end confdefs.h. */ |
3e0be4ab GM |
15901 | #ifndef __APPLE_CC__ |
15902 | not a universal capable compiler | |
15903 | #endif | |
15904 | typedef int dummy; | |
da6c8463 GM |
15905 | |
15906 | _ACEOF | |
3e0be4ab | 15907 | if ac_fn_c_try_compile "$LINENO"; then : |
da6c8463 | 15908 | |
3e0be4ab GM |
15909 | # Check for potential -arch flags. It is not universal unless |
15910 | # there are at least two -arch flags with different values. | |
15911 | ac_arch= | |
15912 | ac_prev= | |
15913 | for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do | |
15914 | if test -n "$ac_prev"; then | |
15915 | case $ac_word in | |
15916 | i?86 | x86_64 | ppc | ppc64) | |
15917 | if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then | |
15918 | ac_arch=$ac_word | |
15919 | else | |
15920 | ac_cv_c_bigendian=universal | |
15921 | break | |
15922 | fi | |
15923 | ;; | |
15924 | esac | |
15925 | ac_prev= | |
15926 | elif test "x$ac_word" = "x-arch"; then | |
15927 | ac_prev=arch | |
15928 | fi | |
15929 | done | |
da6c8463 | 15930 | fi |
3e0be4ab GM |
15931 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
15932 | if test $ac_cv_c_bigendian = unknown; then | |
15933 | # See if sys/param.h defines the BYTE_ORDER macro. | |
15934 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15935 | /* end confdefs.h. */ | |
15936 | #include <sys/types.h> | |
15937 | #include <sys/param.h> | |
ce4331ef | 15938 | |
3e0be4ab GM |
15939 | int |
15940 | main () | |
15941 | { | |
15942 | #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ | |
15943 | && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ | |
15944 | && LITTLE_ENDIAN) | |
15945 | bogus endian macros | |
15946 | #endif | |
ce4331ef | 15947 | |
3e0be4ab GM |
15948 | ; |
15949 | return 0; | |
15950 | } | |
15951 | _ACEOF | |
15952 | if ac_fn_c_try_compile "$LINENO"; then : | |
15953 | # It does; now see whether it defined to BIG_ENDIAN or not. | |
15954 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4fda9c95 | 15955 | /* end confdefs.h. */ |
3e0be4ab GM |
15956 | #include <sys/types.h> |
15957 | #include <sys/param.h> | |
15958 | ||
4fda9c95 GM |
15959 | int |
15960 | main () | |
15961 | { | |
3e0be4ab GM |
15962 | #if BYTE_ORDER != BIG_ENDIAN |
15963 | not big endian | |
15964 | #endif | |
ce4331ef | 15965 | |
4fda9c95 GM |
15966 | ; |
15967 | return 0; | |
15968 | } | |
15969 | _ACEOF | |
3e0be4ab GM |
15970 | if ac_fn_c_try_compile "$LINENO"; then : |
15971 | ac_cv_c_bigendian=yes | |
ae0d7250 | 15972 | else |
3e0be4ab | 15973 | ac_cv_c_bigendian=no |
ae0d7250 | 15974 | fi |
3e0be4ab | 15975 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
ae0d7250 | 15976 | fi |
3e0be4ab GM |
15977 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
15978 | fi | |
15979 | if test $ac_cv_c_bigendian = unknown; then | |
15980 | # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). | |
15981 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15982 | /* end confdefs.h. */ | |
15983 | #include <limits.h> | |
ae0d7250 | 15984 | |
3e0be4ab GM |
15985 | int |
15986 | main () | |
15987 | { | |
15988 | #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) | |
15989 | bogus endian macros | |
15990 | #endif | |
ae0d7250 | 15991 | |
3e0be4ab GM |
15992 | ; |
15993 | return 0; | |
15994 | } | |
6ad6792b | 15995 | _ACEOF |
3e0be4ab GM |
15996 | if ac_fn_c_try_compile "$LINENO"; then : |
15997 | # It does; now see whether it defined to _BIG_ENDIAN or not. | |
15998 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1f5d53eb | 15999 | /* end confdefs.h. */ |
3e0be4ab | 16000 | #include <limits.h> |
4fda9c95 | 16001 | |
5f90be1b PE |
16002 | int |
16003 | main () | |
16004 | { | |
3e0be4ab GM |
16005 | #ifndef _BIG_ENDIAN |
16006 | not big endian | |
16007 | #endif | |
4fda9c95 | 16008 | |
5f90be1b PE |
16009 | ; |
16010 | return 0; | |
16011 | } | |
5f90be1b | 16012 | _ACEOF |
4fda9c95 | 16013 | if ac_fn_c_try_compile "$LINENO"; then : |
3e0be4ab | 16014 | ac_cv_c_bigendian=yes |
5f90be1b | 16015 | else |
3e0be4ab | 16016 | ac_cv_c_bigendian=no |
5f90be1b | 16017 | fi |
4fda9c95 | 16018 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5f90be1b | 16019 | fi |
3e0be4ab GM |
16020 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
16021 | fi | |
16022 | if test $ac_cv_c_bigendian = unknown; then | |
16023 | # Compile a test program. | |
16024 | if test "$cross_compiling" = yes; then : | |
16025 | # Try to guess by grepping values from an object file. | |
16026 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16027 | /* end confdefs.h. */ | |
16028 | short int ascii_mm[] = | |
16029 | { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; | |
16030 | short int ascii_ii[] = | |
16031 | { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; | |
16032 | int use_ascii (int i) { | |
16033 | return ascii_mm[i] + ascii_ii[i]; | |
16034 | } | |
16035 | short int ebcdic_ii[] = | |
16036 | { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; | |
16037 | short int ebcdic_mm[] = | |
16038 | { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; | |
16039 | int use_ebcdic (int i) { | |
16040 | return ebcdic_mm[i] + ebcdic_ii[i]; | |
16041 | } | |
16042 | extern int foo; | |
5f90be1b | 16043 | |
3e0be4ab GM |
16044 | int |
16045 | main () | |
16046 | { | |
16047 | return use_ascii (foo) == use_ebcdic (foo); | |
16048 | ; | |
16049 | return 0; | |
16050 | } | |
4fda9c95 | 16051 | _ACEOF |
3e0be4ab GM |
16052 | if ac_fn_c_try_compile "$LINENO"; then : |
16053 | if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then | |
16054 | ac_cv_c_bigendian=yes | |
16055 | fi | |
16056 | if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then | |
16057 | if test "$ac_cv_c_bigendian" = unknown; then | |
16058 | ac_cv_c_bigendian=no | |
16059 | else | |
16060 | # finding both strings is unlikely to happen, but who knows? | |
16061 | ac_cv_c_bigendian=unknown | |
16062 | fi | |
16063 | fi | |
16064 | fi | |
16065 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
16066 | else | |
16067 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16068 | /* end confdefs.h. */ | |
16069 | $ac_includes_default | |
16070 | int | |
16071 | main () | |
16072 | { | |
5f90be1b | 16073 | |
3e0be4ab GM |
16074 | /* Are we little or big endian? From Harbison&Steele. */ |
16075 | union | |
16076 | { | |
16077 | long int l; | |
16078 | char c[sizeof (long int)]; | |
16079 | } u; | |
16080 | u.l = 1; | |
16081 | return u.c[sizeof (long int) - 1] == 1; | |
4fda9c95 | 16082 | |
3e0be4ab GM |
16083 | ; |
16084 | return 0; | |
16085 | } | |
16086 | _ACEOF | |
16087 | if ac_fn_c_try_run "$LINENO"; then : | |
16088 | ac_cv_c_bigendian=no | |
16089 | else | |
16090 | ac_cv_c_bigendian=yes | |
16091 | fi | |
16092 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
16093 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
4fda9c95 | 16094 | fi |
5f90be1b | 16095 | |
3e0be4ab GM |
16096 | fi |
16097 | fi | |
16098 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 | |
16099 | $as_echo "$ac_cv_c_bigendian" >&6; } | |
16100 | case $ac_cv_c_bigendian in #( | |
16101 | yes) | |
16102 | $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h | |
16103 | ;; #( | |
16104 | no) | |
16105 | ;; #( | |
16106 | universal) | |
5f90be1b | 16107 | |
3e0be4ab | 16108 | $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h |
5f90be1b | 16109 | |
3e0be4ab GM |
16110 | ;; #( |
16111 | *) | |
16112 | as_fn_error "unknown endianness | |
16113 | presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; | |
16114 | esac | |
4fda9c95 GM |
16115 | |
16116 | ||
3e0be4ab GM |
16117 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 |
16118 | $as_echo_n "checking for inline... " >&6; } | |
16119 | if test "${ac_cv_c_inline+set}" = set; then : | |
5f90be1b | 16120 | $as_echo_n "(cached) " >&6 |
5f90be1b | 16121 | else |
3e0be4ab GM |
16122 | ac_cv_c_inline=no |
16123 | for ac_kw in inline __inline__ __inline; do | |
5f90be1b PE |
16124 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
16125 | /* end confdefs.h. */ | |
3e0be4ab GM |
16126 | #ifndef __cplusplus |
16127 | typedef int foo_t; | |
16128 | static $ac_kw foo_t static_foo () {return 0; } | |
16129 | $ac_kw foo_t foo () {return 0; } | |
16130 | #endif | |
4fda9c95 | 16131 | |
5f90be1b | 16132 | _ACEOF |
4fda9c95 | 16133 | if ac_fn_c_try_compile "$LINENO"; then : |
3e0be4ab | 16134 | ac_cv_c_inline=$ac_kw |
5f90be1b | 16135 | fi |
4fda9c95 | 16136 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3e0be4ab GM |
16137 | test "$ac_cv_c_inline" != no && break |
16138 | done | |
5f90be1b | 16139 | |
3e0be4ab GM |
16140 | fi |
16141 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 | |
16142 | $as_echo "$ac_cv_c_inline" >&6; } | |
5f90be1b | 16143 | |
3e0be4ab GM |
16144 | case $ac_cv_c_inline in |
16145 | inline | yes) ;; | |
16146 | *) | |
16147 | case $ac_cv_c_inline in | |
16148 | no) ac_val=;; | |
16149 | *) ac_val=$ac_cv_c_inline;; | |
16150 | esac | |
16151 | cat >>confdefs.h <<_ACEOF | |
16152 | #ifndef __cplusplus | |
16153 | #define inline $ac_val | |
16154 | #endif | |
16155 | _ACEOF | |
16156 | ;; | |
16157 | esac | |
5f90be1b PE |
16158 | |
16159 | ||
3e0be4ab GM |
16160 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtold conforms to C99" >&5 |
16161 | $as_echo_n "checking whether strtold conforms to C99... " >&6; } | |
16162 | if test "${gl_cv_func_c99_strtold+set}" = set; then : | |
16163 | $as_echo_n "(cached) " >&6 | |
16164 | else | |
16165 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16166 | /* end confdefs.h. */ | |
16167 | /* On HP-UX before 11.23, strtold returns a struct instead of | |
16168 | long double. Reject implementations like that, by requiring | |
16169 | compatibility with the C99 prototype. */ | |
16170 | #include <stdlib.h> | |
16171 | static long double (*p) (char const *, char **) = strtold; | |
16172 | static long double | |
16173 | test (char const *nptr, char **endptr) | |
16174 | { | |
16175 | long double r; | |
16176 | r = strtold (nptr, endptr); | |
16177 | return r; | |
16178 | } | |
16179 | int | |
16180 | main () | |
16181 | { | |
16182 | return test ("1.0", NULL) != 1 || p ("1.0", NULL) != 1; | |
16183 | ; | |
16184 | return 0; | |
16185 | } | |
16186 | _ACEOF | |
16187 | if ac_fn_c_try_link "$LINENO"; then : | |
16188 | gl_cv_func_c99_strtold=yes | |
16189 | else | |
16190 | gl_cv_func_c99_strtold=no | |
16191 | fi | |
16192 | rm -f core conftest.err conftest.$ac_objext \ | |
16193 | conftest$ac_exeext conftest.$ac_ext | |
16194 | fi | |
16195 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_c99_strtold" >&5 | |
16196 | $as_echo "$gl_cv_func_c99_strtold" >&6; } | |
16197 | if test $gl_cv_func_c99_strtold = yes; then | |
16198 | ||
16199 | $as_echo "#define HAVE_C99_STRTOLD 1" >>confdefs.h | |
16200 | ||
16201 | fi | |
16202 | ||
16203 | ||
16204 | GNULIB_CHOWN=0; | |
16205 | GNULIB_CLOSE=0; | |
16206 | GNULIB_DUP2=0; | |
16207 | GNULIB_DUP3=0; | |
16208 | GNULIB_ENVIRON=0; | |
16209 | GNULIB_EUIDACCESS=0; | |
16210 | GNULIB_FACCESSAT=0; | |
16211 | GNULIB_FCHDIR=0; | |
16212 | GNULIB_FCHOWNAT=0; | |
16213 | GNULIB_FSYNC=0; | |
16214 | GNULIB_FTRUNCATE=0; | |
16215 | GNULIB_GETCWD=0; | |
16216 | GNULIB_GETDOMAINNAME=0; | |
16217 | GNULIB_GETDTABLESIZE=0; | |
16218 | GNULIB_GETGROUPS=0; | |
16219 | GNULIB_GETHOSTNAME=0; | |
16220 | GNULIB_GETLOGIN=0; | |
16221 | GNULIB_GETLOGIN_R=0; | |
16222 | GNULIB_GETPAGESIZE=0; | |
16223 | GNULIB_GETUSERSHELL=0; | |
16224 | GNULIB_GROUP_MEMBER=0; | |
16225 | GNULIB_LCHOWN=0; | |
16226 | GNULIB_LINK=0; | |
16227 | GNULIB_LINKAT=0; | |
16228 | GNULIB_LSEEK=0; | |
16229 | GNULIB_PIPE=0; | |
16230 | GNULIB_PIPE2=0; | |
16231 | GNULIB_PREAD=0; | |
16232 | GNULIB_PWRITE=0; | |
16233 | GNULIB_READ=0; | |
16234 | GNULIB_READLINK=0; | |
16235 | GNULIB_READLINKAT=0; | |
16236 | GNULIB_RMDIR=0; | |
16237 | GNULIB_SLEEP=0; | |
16238 | GNULIB_SYMLINK=0; | |
16239 | GNULIB_SYMLINKAT=0; | |
16240 | GNULIB_TTYNAME_R=0; | |
16241 | GNULIB_UNISTD_H_GETOPT=0; | |
16242 | GNULIB_UNISTD_H_NONBLOCKING=0; | |
16243 | GNULIB_UNISTD_H_SIGPIPE=0; | |
16244 | GNULIB_UNLINK=0; | |
16245 | GNULIB_UNLINKAT=0; | |
16246 | GNULIB_USLEEP=0; | |
16247 | GNULIB_WRITE=0; | |
16248 | HAVE_CHOWN=1; | |
16249 | HAVE_DUP2=1; | |
16250 | HAVE_DUP3=1; | |
16251 | HAVE_EUIDACCESS=1; | |
16252 | HAVE_FACCESSAT=1; | |
16253 | HAVE_FCHDIR=1; | |
16254 | HAVE_FCHOWNAT=1; | |
16255 | HAVE_FSYNC=1; | |
16256 | HAVE_FTRUNCATE=1; | |
16257 | HAVE_GETDTABLESIZE=1; | |
16258 | HAVE_GETGROUPS=1; | |
16259 | HAVE_GETHOSTNAME=1; | |
16260 | HAVE_GETLOGIN=1; | |
16261 | HAVE_GETPAGESIZE=1; | |
16262 | HAVE_GROUP_MEMBER=1; | |
16263 | HAVE_LCHOWN=1; | |
16264 | HAVE_LINK=1; | |
16265 | HAVE_LINKAT=1; | |
16266 | HAVE_PIPE=1; | |
16267 | HAVE_PIPE2=1; | |
16268 | HAVE_PREAD=1; | |
16269 | HAVE_PWRITE=1; | |
16270 | HAVE_READLINK=1; | |
16271 | HAVE_READLINKAT=1; | |
16272 | HAVE_SLEEP=1; | |
16273 | HAVE_SYMLINK=1; | |
16274 | HAVE_SYMLINKAT=1; | |
16275 | HAVE_UNLINKAT=1; | |
16276 | HAVE_USLEEP=1; | |
16277 | HAVE_DECL_ENVIRON=1; | |
16278 | HAVE_DECL_FCHDIR=1; | |
16279 | HAVE_DECL_GETDOMAINNAME=1; | |
16280 | HAVE_DECL_GETLOGIN_R=1; | |
16281 | HAVE_DECL_GETPAGESIZE=1; | |
16282 | HAVE_DECL_GETUSERSHELL=1; | |
16283 | HAVE_DECL_TTYNAME_R=1; | |
16284 | HAVE_OS_H=0; | |
16285 | HAVE_SYS_PARAM_H=0; | |
16286 | REPLACE_CHOWN=0; | |
16287 | REPLACE_CLOSE=0; | |
16288 | REPLACE_DUP=0; | |
16289 | REPLACE_DUP2=0; | |
16290 | REPLACE_FCHOWNAT=0; | |
16291 | REPLACE_GETCWD=0; | |
16292 | REPLACE_GETDOMAINNAME=0; | |
16293 | REPLACE_GETLOGIN_R=0; | |
16294 | REPLACE_GETGROUPS=0; | |
16295 | REPLACE_GETPAGESIZE=0; | |
16296 | REPLACE_LCHOWN=0; | |
16297 | REPLACE_LINK=0; | |
16298 | REPLACE_LINKAT=0; | |
16299 | REPLACE_LSEEK=0; | |
16300 | REPLACE_PREAD=0; | |
16301 | REPLACE_PWRITE=0; | |
16302 | REPLACE_READ=0; | |
16303 | REPLACE_READLINK=0; | |
16304 | REPLACE_RMDIR=0; | |
16305 | REPLACE_SLEEP=0; | |
16306 | REPLACE_SYMLINK=0; | |
16307 | REPLACE_TTYNAME_R=0; | |
16308 | REPLACE_UNLINK=0; | |
16309 | REPLACE_UNLINKAT=0; | |
16310 | REPLACE_USLEEP=0; | |
16311 | REPLACE_WRITE=0; | |
16312 | UNISTD_H_HAVE_WINSOCK2_H=0; | |
16313 | UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0; | |
16314 | ||
16315 | ||
16316 | ||
16317 | ||
16318 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for st_dm_mode in struct stat" >&5 | |
16319 | $as_echo_n "checking for st_dm_mode in struct stat... " >&6; } | |
16320 | if test "${ac_cv_struct_st_dm_mode+set}" = set; then : | |
16321 | $as_echo_n "(cached) " >&6 | |
16322 | else | |
16323 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16324 | /* end confdefs.h. */ | |
16325 | ||
16326 | #include <sys/types.h> | |
16327 | #include <sys/stat.h> | |
16328 | int | |
16329 | main () | |
16330 | { | |
16331 | struct stat s; s.st_dm_mode; | |
16332 | ; | |
16333 | return 0; | |
16334 | } | |
16335 | _ACEOF | |
16336 | if ac_fn_c_try_compile "$LINENO"; then : | |
16337 | ac_cv_struct_st_dm_mode=yes | |
16338 | else | |
16339 | ac_cv_struct_st_dm_mode=no | |
16340 | fi | |
16341 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
16342 | fi | |
16343 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_st_dm_mode" >&5 | |
16344 | $as_echo "$ac_cv_struct_st_dm_mode" >&6; } | |
16345 | ||
16346 | if test $ac_cv_struct_st_dm_mode = yes; then | |
16347 | ||
16348 | $as_echo "#define HAVE_ST_DM_MODE 1" >>confdefs.h | |
16349 | ||
16350 | fi | |
16351 | ||
16352 | ||
16353 | ac_fn_c_check_decl "$LINENO" "strmode" "ac_cv_have_decl_strmode" "$ac_includes_default" | |
16354 | if test "x$ac_cv_have_decl_strmode" = x""yes; then : | |
16355 | ac_have_decl=1 | |
16356 | else | |
16357 | ac_have_decl=0 | |
16358 | fi | |
16359 | ||
16360 | cat >>confdefs.h <<_ACEOF | |
16361 | #define HAVE_DECL_STRMODE $ac_have_decl | |
16362 | _ACEOF | |
16363 | ||
16364 | ||
16365 | GNULIB__EXIT=0; | |
16366 | GNULIB_ATOLL=0; | |
16367 | GNULIB_CALLOC_POSIX=0; | |
16368 | GNULIB_CANONICALIZE_FILE_NAME=0; | |
16369 | GNULIB_GETLOADAVG=0; | |
16370 | GNULIB_GETSUBOPT=0; | |
16371 | GNULIB_GRANTPT=0; | |
16372 | GNULIB_MALLOC_POSIX=0; | |
16373 | GNULIB_MBTOWC=0; | |
16374 | GNULIB_MKDTEMP=0; | |
16375 | GNULIB_MKOSTEMP=0; | |
16376 | GNULIB_MKOSTEMPS=0; | |
16377 | GNULIB_MKSTEMP=0; | |
16378 | GNULIB_MKSTEMPS=0; | |
16379 | GNULIB_PTSNAME=0; | |
16380 | GNULIB_PUTENV=0; | |
16381 | GNULIB_RANDOM_R=0; | |
16382 | GNULIB_REALLOC_POSIX=0; | |
16383 | GNULIB_REALPATH=0; | |
16384 | GNULIB_RPMATCH=0; | |
16385 | GNULIB_SETENV=0; | |
16386 | GNULIB_STRTOD=0; | |
16387 | GNULIB_STRTOLL=0; | |
16388 | GNULIB_STRTOULL=0; | |
16389 | GNULIB_SYSTEM_POSIX=0; | |
16390 | GNULIB_UNLOCKPT=0; | |
16391 | GNULIB_UNSETENV=0; | |
16392 | GNULIB_WCTOMB=0; | |
16393 | HAVE__EXIT=1; | |
16394 | HAVE_ATOLL=1; | |
16395 | HAVE_CANONICALIZE_FILE_NAME=1; | |
16396 | HAVE_DECL_GETLOADAVG=1; | |
16397 | HAVE_GETSUBOPT=1; | |
16398 | HAVE_GRANTPT=1; | |
16399 | HAVE_MKDTEMP=1; | |
16400 | HAVE_MKOSTEMP=1; | |
16401 | HAVE_MKOSTEMPS=1; | |
16402 | HAVE_MKSTEMP=1; | |
16403 | HAVE_MKSTEMPS=1; | |
16404 | HAVE_PTSNAME=1; | |
16405 | HAVE_RANDOM_H=1; | |
16406 | HAVE_RANDOM_R=1; | |
16407 | HAVE_REALPATH=1; | |
16408 | HAVE_RPMATCH=1; | |
16409 | HAVE_SETENV=1; | |
16410 | HAVE_DECL_SETENV=1; | |
16411 | HAVE_STRTOD=1; | |
16412 | HAVE_STRTOLL=1; | |
16413 | HAVE_STRTOULL=1; | |
16414 | HAVE_STRUCT_RANDOM_DATA=1; | |
16415 | HAVE_SYS_LOADAVG_H=0; | |
16416 | HAVE_UNLOCKPT=1; | |
16417 | HAVE_DECL_UNSETENV=1; | |
16418 | REPLACE_CALLOC=0; | |
16419 | REPLACE_CANONICALIZE_FILE_NAME=0; | |
16420 | REPLACE_MALLOC=0; | |
16421 | REPLACE_MBTOWC=0; | |
16422 | REPLACE_MKSTEMP=0; | |
16423 | REPLACE_PUTENV=0; | |
16424 | REPLACE_REALLOC=0; | |
16425 | REPLACE_REALPATH=0; | |
16426 | REPLACE_SETENV=0; | |
16427 | REPLACE_STRTOD=0; | |
16428 | REPLACE_UNSETENV=0; | |
16429 | REPLACE_WCTOMB=0; | |
16430 | ||
16431 | ||
16432 | ||
16433 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5 | |
16434 | $as_echo_n "checking whether the preprocessor supports include_next... " >&6; } | |
16435 | if test "${gl_cv_have_include_next+set}" = set; then : | |
16436 | $as_echo_n "(cached) " >&6 | |
16437 | else | |
16438 | rm -rf conftestd1a conftestd1b conftestd2 | |
16439 | mkdir conftestd1a conftestd1b conftestd2 | |
16440 | cat <<EOF > conftestd1a/conftest.h | |
16441 | #define DEFINED_IN_CONFTESTD1 | |
16442 | #include_next <conftest.h> | |
16443 | #ifdef DEFINED_IN_CONFTESTD2 | |
16444 | int foo; | |
16445 | #else | |
16446 | #error "include_next doesn't work" | |
16447 | #endif | |
16448 | EOF | |
16449 | cat <<EOF > conftestd1b/conftest.h | |
16450 | #define DEFINED_IN_CONFTESTD1 | |
16451 | #include <stdio.h> | |
16452 | #include_next <conftest.h> | |
16453 | #ifdef DEFINED_IN_CONFTESTD2 | |
16454 | int foo; | |
16455 | #else | |
16456 | #error "include_next doesn't work" | |
16457 | #endif | |
16458 | EOF | |
16459 | cat <<EOF > conftestd2/conftest.h | |
16460 | #ifndef DEFINED_IN_CONFTESTD1 | |
16461 | #error "include_next test doesn't work" | |
16462 | #endif | |
16463 | #define DEFINED_IN_CONFTESTD2 | |
16464 | EOF | |
16465 | gl_save_CPPFLAGS="$CPPFLAGS" | |
16466 | CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2" | |
16467 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16468 | /* end confdefs.h. */ | |
16469 | #include <conftest.h> | |
16470 | _ACEOF | |
16471 | if ac_fn_c_try_compile "$LINENO"; then : | |
16472 | gl_cv_have_include_next=yes | |
16473 | else | |
16474 | CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2" | |
16475 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16476 | /* end confdefs.h. */ | |
16477 | #include <conftest.h> | |
16478 | _ACEOF | |
16479 | if ac_fn_c_try_compile "$LINENO"; then : | |
16480 | gl_cv_have_include_next=buggy | |
16481 | else | |
16482 | gl_cv_have_include_next=no | |
16483 | fi | |
16484 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
16485 | ||
16486 | fi | |
16487 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
16488 | CPPFLAGS="$gl_save_CPPFLAGS" | |
16489 | rm -rf conftestd1a conftestd1b conftestd2 | |
16490 | ||
16491 | fi | |
16492 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5 | |
16493 | $as_echo "$gl_cv_have_include_next" >&6; } | |
16494 | PRAGMA_SYSTEM_HEADER= | |
16495 | if test $gl_cv_have_include_next = yes; then | |
16496 | INCLUDE_NEXT=include_next | |
16497 | INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next | |
16498 | if test -n "$GCC"; then | |
16499 | PRAGMA_SYSTEM_HEADER='#pragma GCC system_header' | |
16500 | fi | |
16501 | else | |
16502 | if test $gl_cv_have_include_next = buggy; then | |
16503 | INCLUDE_NEXT=include | |
16504 | INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next | |
16505 | else | |
16506 | INCLUDE_NEXT=include | |
16507 | INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include | |
16508 | fi | |
16509 | fi | |
16510 | ||
16511 | ||
16512 | ||
16513 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5 | |
16514 | $as_echo_n "checking whether system header files limit the line length... " >&6; } | |
16515 | if test "${gl_cv_pragma_columns+set}" = set; then : | |
16516 | $as_echo_n "(cached) " >&6 | |
16517 | else | |
16518 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16519 | /* end confdefs.h. */ | |
16520 | ||
16521 | #ifdef __TANDEM | |
16522 | choke me | |
16523 | #endif | |
16524 | ||
16525 | _ACEOF | |
16526 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
16527 | $EGREP "choke me" >/dev/null 2>&1; then : | |
16528 | gl_cv_pragma_columns=yes | |
16529 | else | |
16530 | gl_cv_pragma_columns=no | |
16531 | fi | |
16532 | rm -f conftest* | |
16533 | ||
16534 | ||
16535 | fi | |
16536 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5 | |
16537 | $as_echo "$gl_cv_pragma_columns" >&6; } | |
16538 | if test $gl_cv_pragma_columns = yes; then | |
16539 | PRAGMA_COLUMNS="#pragma COLUMNS 10000" | |
16540 | else | |
16541 | PRAGMA_COLUMNS= | |
16542 | fi | |
16543 | ||
16544 | ||
16545 | ||
16546 | ||
16547 | ||
16548 | ||
16549 | ||
16550 | ||
16551 | ||
16552 | ||
16553 | ||
16554 | ||
16555 | ||
16556 | ||
16557 | ||
16558 | ||
16559 | ||
16560 | if test $gl_cv_have_include_next = yes; then | |
16561 | gl_cv_next_getopt_h='<'getopt.h'>' | |
16562 | else | |
16563 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <getopt.h>" >&5 | |
16564 | $as_echo_n "checking absolute name of <getopt.h>... " >&6; } | |
16565 | if test "${gl_cv_next_getopt_h+set}" = set; then : | |
16566 | $as_echo_n "(cached) " >&6 | |
16567 | else | |
16568 | ||
16569 | if test $ac_cv_header_getopt_h = yes; then | |
16570 | ||
16571 | ||
16572 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16573 | /* end confdefs.h. */ | |
16574 | #include <getopt.h> | |
16575 | ||
16576 | _ACEOF | |
16577 | case "$host_os" in | |
16578 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
16579 | *) gl_absname_cpp="$ac_cpp" ;; | |
16580 | esac | |
16581 | gl_cv_next_getopt_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
16582 | sed -n '\#/getopt.h#{ | |
16583 | s#.*"\(.*/getopt.h\)".*#\1# | |
16584 | s#^/[^/]#//&# | |
16585 | p | |
16586 | q | |
16587 | }'`'"' | |
16588 | else | |
16589 | gl_cv_next_getopt_h='<'getopt.h'>' | |
16590 | fi | |
16591 | ||
16592 | ||
16593 | fi | |
16594 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5 | |
16595 | $as_echo "$gl_cv_next_getopt_h" >&6; } | |
16596 | fi | |
16597 | NEXT_GETOPT_H=$gl_cv_next_getopt_h | |
16598 | ||
16599 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then | |
16600 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
16601 | gl_next_as_first_directive='<'getopt.h'>' | |
16602 | else | |
16603 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
16604 | gl_next_as_first_directive=$gl_cv_next_getopt_h | |
16605 | fi | |
16606 | NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive | |
16607 | ||
16608 | ||
16609 | ||
16610 | ||
16611 | if test $ac_cv_header_getopt_h = yes; then | |
16612 | HAVE_GETOPT_H=1 | |
16613 | else | |
16614 | HAVE_GETOPT_H=0 | |
16615 | fi | |
16616 | ||
16617 | ||
16618 | gl_replace_getopt= | |
16619 | ||
16620 | if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then | |
16621 | for ac_header in getopt.h | |
16622 | do : | |
16623 | ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default" | |
16624 | if test "x$ac_cv_header_getopt_h" = x""yes; then : | |
16625 | cat >>confdefs.h <<_ACEOF | |
16626 | #define HAVE_GETOPT_H 1 | |
16627 | _ACEOF | |
16628 | ||
16629 | else | |
16630 | gl_replace_getopt=yes | |
16631 | fi | |
16632 | ||
16633 | done | |
16634 | ||
16635 | fi | |
16636 | ||
16637 | if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then | |
16638 | for ac_func in getopt_long_only | |
16639 | do : | |
16640 | ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only" | |
16641 | if test "x$ac_cv_func_getopt_long_only" = x""yes; then : | |
16642 | cat >>confdefs.h <<_ACEOF | |
16643 | #define HAVE_GETOPT_LONG_ONLY 1 | |
16644 | _ACEOF | |
16645 | ||
16646 | else | |
16647 | gl_replace_getopt=yes | |
16648 | fi | |
16649 | done | |
16650 | ||
16651 | fi | |
16652 | ||
16653 | if test -z "$gl_replace_getopt"; then | |
16654 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5 | |
16655 | $as_echo_n "checking whether getopt is POSIX compatible... " >&6; } | |
16656 | if test "${gl_cv_func_getopt_posix+set}" = set; then : | |
16657 | $as_echo_n "(cached) " >&6 | |
16658 | else | |
16659 | ||
16660 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16661 | /* end confdefs.h. */ | |
16662 | #include <unistd.h> | |
16663 | int | |
16664 | main () | |
16665 | { | |
16666 | int *p = &optreset; return optreset; | |
16667 | ; | |
16668 | return 0; | |
16669 | } | |
16670 | _ACEOF | |
16671 | if ac_fn_c_try_link "$LINENO"; then : | |
16672 | gl_optind_min=1 | |
16673 | else | |
16674 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16675 | /* end confdefs.h. */ | |
16676 | #include <getopt.h> | |
16677 | int | |
16678 | main () | |
16679 | { | |
16680 | return !getopt_clip; | |
16681 | ; | |
16682 | return 0; | |
16683 | } | |
16684 | _ACEOF | |
16685 | if ac_fn_c_try_compile "$LINENO"; then : | |
16686 | gl_optind_min=1 | |
16687 | else | |
16688 | gl_optind_min=0 | |
16689 | fi | |
16690 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
16691 | fi | |
16692 | rm -f core conftest.err conftest.$ac_objext \ | |
16693 | conftest$ac_exeext conftest.$ac_ext | |
16694 | ||
16695 | gl_save_CPPFLAGS=$CPPFLAGS | |
16696 | CPPFLAGS="$CPPFLAGS -DOPTIND_MIN=$gl_optind_min" | |
16697 | if test "$cross_compiling" = yes; then : | |
16698 | case "$host_os" in | |
16699 | mingw*) gl_cv_func_getopt_posix="guessing no";; | |
16700 | darwin* | aix*) gl_cv_func_getopt_posix="guessing no";; | |
16701 | *) gl_cv_func_getopt_posix="guessing yes";; | |
16702 | esac | |
16703 | ||
16704 | else | |
16705 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16706 | /* end confdefs.h. */ | |
16707 | ||
16708 | #include <unistd.h> | |
16709 | #include <stdlib.h> | |
16710 | #include <string.h> | |
16711 | ||
16712 | int | |
16713 | main () | |
16714 | { | |
16715 | { | |
16716 | static char program[] = "program"; | |
16717 | static char a[] = "-a"; | |
16718 | static char foo[] = "foo"; | |
16719 | static char bar[] = "bar"; | |
16720 | char *argv[] = { program, a, foo, bar, NULL }; | |
16721 | int c; | |
16722 | ||
16723 | optind = OPTIND_MIN; | |
16724 | opterr = 0; | |
16725 | ||
16726 | c = getopt (4, argv, "ab"); | |
16727 | if (!(c == 'a')) | |
16728 | return 1; | |
16729 | c = getopt (4, argv, "ab"); | |
16730 | if (!(c == -1)) | |
16731 | return 2; | |
16732 | if (!(optind == 2)) | |
16733 | return 3; | |
16734 | } | |
16735 | /* Some internal state exists at this point. */ | |
16736 | { | |
16737 | static char program[] = "program"; | |
16738 | static char donald[] = "donald"; | |
16739 | static char p[] = "-p"; | |
16740 | static char billy[] = "billy"; | |
16741 | static char duck[] = "duck"; | |
16742 | static char a[] = "-a"; | |
16743 | static char bar[] = "bar"; | |
16744 | char *argv[] = { program, donald, p, billy, duck, a, bar, NULL }; | |
16745 | int c; | |
16746 | ||
16747 | optind = OPTIND_MIN; | |
16748 | opterr = 0; | |
16749 | ||
16750 | c = getopt (7, argv, "+abp:q:"); | |
16751 | if (!(c == -1)) | |
16752 | return 4; | |
16753 | if (!(strcmp (argv[0], "program") == 0)) | |
16754 | return 5; | |
16755 | if (!(strcmp (argv[1], "donald") == 0)) | |
16756 | return 6; | |
16757 | if (!(strcmp (argv[2], "-p") == 0)) | |
16758 | return 7; | |
16759 | if (!(strcmp (argv[3], "billy") == 0)) | |
16760 | return 8; | |
16761 | if (!(strcmp (argv[4], "duck") == 0)) | |
16762 | return 9; | |
16763 | if (!(strcmp (argv[5], "-a") == 0)) | |
16764 | return 10; | |
16765 | if (!(strcmp (argv[6], "bar") == 0)) | |
16766 | return 11; | |
16767 | if (!(optind == 1)) | |
16768 | return 12; | |
16769 | } | |
16770 | /* Detect MacOS 10.5, AIX 7.1 bug. */ | |
16771 | { | |
16772 | static char program[] = "program"; | |
16773 | static char ab[] = "-ab"; | |
16774 | char *argv[3] = { program, ab, NULL }; | |
16775 | optind = OPTIND_MIN; | |
16776 | opterr = 0; | |
16777 | if (getopt (2, argv, "ab:") != 'a') | |
16778 | return 13; | |
16779 | if (getopt (2, argv, "ab:") != '?') | |
16780 | return 14; | |
16781 | if (optopt != 'b') | |
16782 | return 15; | |
16783 | if (optind != 2) | |
16784 | return 16; | |
16785 | } | |
16786 | ||
16787 | return 0; | |
16788 | } | |
16789 | ||
16790 | _ACEOF | |
16791 | if ac_fn_c_try_run "$LINENO"; then : | |
16792 | gl_cv_func_getopt_posix=yes | |
16793 | else | |
16794 | gl_cv_func_getopt_posix=no | |
16795 | fi | |
16796 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
16797 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
16798 | fi | |
16799 | ||
16800 | CPPFLAGS=$gl_save_CPPFLAGS | |
16801 | ||
16802 | fi | |
16803 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5 | |
16804 | $as_echo "$gl_cv_func_getopt_posix" >&6; } | |
16805 | case "$gl_cv_func_getopt_posix" in | |
16806 | *no) gl_replace_getopt=yes ;; | |
16807 | esac | |
16808 | fi | |
16809 | ||
16810 | if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then | |
16811 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5 | |
16812 | $as_echo_n "checking for working GNU getopt function... " >&6; } | |
16813 | if test "${gl_cv_func_getopt_gnu+set}" = set; then : | |
16814 | $as_echo_n "(cached) " >&6 | |
16815 | else | |
16816 | # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the | |
16817 | # optstring is necessary for programs like m4 that have POSIX-mandated | |
16818 | # semantics for supporting options interspersed with files. | |
16819 | # Also, since getopt_long is a GNU extension, we require optind=0. | |
16820 | # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT; | |
16821 | # so take care to revert to the correct (non-)export state. | |
16822 | gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }' | |
16823 | case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" </dev/null` in | |
16824 | xx) gl_had_POSIXLY_CORRECT=exported ;; | |
16825 | x) gl_had_POSIXLY_CORRECT=yes ;; | |
16826 | *) gl_had_POSIXLY_CORRECT= ;; | |
16827 | esac | |
16828 | POSIXLY_CORRECT=1 | |
16829 | export POSIXLY_CORRECT | |
16830 | if test "$cross_compiling" = yes; then : | |
16831 | case $host_os:$ac_cv_have_decl_optreset in | |
16832 | *-gnu*:* | mingw*:*) gl_cv_func_getopt_gnu=no;; | |
16833 | *:yes) gl_cv_func_getopt_gnu=no;; | |
16834 | *) gl_cv_func_getopt_gnu=yes;; | |
16835 | esac | |
16836 | ||
16837 | else | |
16838 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16839 | /* end confdefs.h. */ | |
16840 | #include <getopt.h> | |
16841 | #include <stddef.h> | |
16842 | #include <string.h> | |
16843 | ||
16844 | int | |
16845 | main () | |
16846 | { | |
16847 | ||
16848 | int result = 0; | |
16849 | /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw, | |
16850 | and fails on MacOS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5, | |
16851 | OSF/1 5.1, Solaris 10. */ | |
16852 | { | |
16853 | static char conftest[] = "conftest"; | |
16854 | static char plus[] = "-+"; | |
16855 | char *argv[3] = { conftest, plus, NULL }; | |
16856 | opterr = 0; | |
16857 | if (getopt (2, argv, "+a") != '?') | |
16858 | result |= 1; | |
16859 | } | |
16860 | /* This code succeeds on glibc 2.8, mingw, | |
16861 | and fails on MacOS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11, | |
16862 | IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */ | |
16863 | { | |
16864 | static char program[] = "program"; | |
16865 | static char p[] = "-p"; | |
16866 | static char foo[] = "foo"; | |
16867 | static char bar[] = "bar"; | |
16868 | char *argv[] = { program, p, foo, bar, NULL }; | |
6ad6792b | 16869 | |
3e0be4ab GM |
16870 | optind = 1; |
16871 | if (getopt (4, argv, "p::") != 'p') | |
16872 | result |= 2; | |
16873 | else if (optarg != NULL) | |
16874 | result |= 4; | |
16875 | else if (getopt (4, argv, "p::") != -1) | |
16876 | result |= 6; | |
16877 | else if (optind != 2) | |
16878 | result |= 8; | |
16879 | } | |
16880 | /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */ | |
16881 | { | |
16882 | static char program[] = "program"; | |
16883 | static char foo[] = "foo"; | |
16884 | static char p[] = "-p"; | |
16885 | char *argv[] = { program, foo, p, NULL }; | |
16886 | optind = 0; | |
16887 | if (getopt (3, argv, "-p") != 1) | |
16888 | result |= 16; | |
16889 | else if (getopt (3, argv, "-p") != 'p') | |
16890 | result |= 32; | |
16891 | } | |
16892 | /* This code fails on glibc 2.11. */ | |
16893 | { | |
16894 | static char program[] = "program"; | |
16895 | static char b[] = "-b"; | |
16896 | static char a[] = "-a"; | |
16897 | char *argv[] = { program, b, a, NULL }; | |
16898 | optind = opterr = 0; | |
16899 | if (getopt (3, argv, "+:a:b") != 'b') | |
16900 | result |= 64; | |
16901 | else if (getopt (3, argv, "+:a:b") != ':') | |
16902 | result |= 64; | |
16903 | } | |
16904 | /* This code dumps core on glibc 2.14. */ | |
16905 | { | |
16906 | static char program[] = "program"; | |
16907 | static char w[] = "-W"; | |
16908 | static char dummy[] = "dummy"; | |
16909 | char *argv[] = { program, w, dummy, NULL }; | |
16910 | optind = opterr = 1; | |
16911 | if (getopt (3, argv, "W;") != 'W') | |
16912 | result |= 128; | |
16913 | } | |
16914 | return result; | |
6ad6792b | 16915 | |
3e0be4ab GM |
16916 | ; |
16917 | return 0; | |
16918 | } | |
16919 | _ACEOF | |
16920 | if ac_fn_c_try_run "$LINENO"; then : | |
16921 | gl_cv_func_getopt_gnu=yes | |
16922 | else | |
16923 | gl_cv_func_getopt_gnu=no | |
16924 | fi | |
16925 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
16926 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
16927 | fi | |
e275c824 | 16928 | |
3e0be4ab GM |
16929 | case $gl_had_POSIXLY_CORRECT in |
16930 | exported) ;; | |
16931 | yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;; | |
16932 | *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;; | |
16933 | esac | |
e275c824 | 16934 | |
e275c824 | 16935 | fi |
3e0be4ab GM |
16936 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5 |
16937 | $as_echo "$gl_cv_func_getopt_gnu" >&6; } | |
16938 | if test "$gl_cv_func_getopt_gnu" = "no"; then | |
16939 | gl_replace_getopt=yes | |
16940 | fi | |
16941 | fi | |
e275c824 | 16942 | |
e275c824 | 16943 | |
e275c824 | 16944 | |
e275c824 | 16945 | |
4fda9c95 | 16946 | |
3e0be4ab | 16947 | REPLACE_GETOPT=0 |
5fa4ac76 | 16948 | |
5fa4ac76 | 16949 | |
3e0be4ab | 16950 | if test -n "$gl_replace_getopt"; then : |
5fa4ac76 | 16951 | |
3e0be4ab | 16952 | REPLACE_GETOPT=1 |
5fa4ac76 | 16953 | |
3e0be4ab | 16954 | fi |
5fa4ac76 | 16955 | |
5fa4ac76 | 16956 | |
3e0be4ab | 16957 | if test $REPLACE_GETOPT = 1; then |
5fa4ac76 | 16958 | |
3e0be4ab | 16959 | GETOPT_H=getopt.h |
5fa4ac76 | 16960 | |
3e0be4ab | 16961 | $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h |
5fa4ac76 | 16962 | |
5fa4ac76 PE |
16963 | |
16964 | ||
3e0be4ab GM |
16965 | GNULIB_UNISTD_H_GETOPT=1 |
16966 | fi | |
5fa4ac76 | 16967 | |
3e0be4ab GM |
16968 | ac_fn_c_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default" |
16969 | if test "x$ac_cv_have_decl_getenv" = x""yes; then : | |
16970 | ac_have_decl=1 | |
e275c824 | 16971 | else |
3e0be4ab | 16972 | ac_have_decl=0 |
1f5d53eb | 16973 | fi |
1f5d53eb | 16974 | |
3e0be4ab GM |
16975 | cat >>confdefs.h <<_ACEOF |
16976 | #define HAVE_DECL_GETENV $ac_have_decl | |
1f5d53eb | 16977 | _ACEOF |
1f5d53eb PE |
16978 | |
16979 | ||
3e0be4ab GM |
16980 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5 |
16981 | $as_echo_n "checking for unsigned long long int... " >&6; } | |
16982 | if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then : | |
1f5d53eb | 16983 | $as_echo_n "(cached) " >&6 |
e275c824 | 16984 | else |
3e0be4ab GM |
16985 | ac_cv_type_unsigned_long_long_int=yes |
16986 | if test "x${ac_cv_prog_cc_c99-no}" = xno; then | |
16987 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
d6974efa | 16988 | /* end confdefs.h. */ |
1f5d53eb | 16989 | |
3e0be4ab GM |
16990 | /* For now, do not test the preprocessor; as of 2007 there are too many |
16991 | implementations with broken preprocessors. Perhaps this can | |
16992 | be revisited in 2012. In the meantime, code should not expect | |
16993 | #if to work with literals wider than 32 bits. */ | |
16994 | /* Test literals. */ | |
16995 | long long int ll = 9223372036854775807ll; | |
16996 | long long int nll = -9223372036854775807LL; | |
16997 | unsigned long long int ull = 18446744073709551615ULL; | |
16998 | /* Test constant expressions. */ | |
16999 | typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) | |
17000 | ? 1 : -1)]; | |
17001 | typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 | |
17002 | ? 1 : -1)]; | |
17003 | int i = 63; | |
d6974efa PE |
17004 | int |
17005 | main () | |
17006 | { | |
3e0be4ab GM |
17007 | /* Test availability of runtime routines for shift and division. */ |
17008 | long long int llmax = 9223372036854775807ll; | |
17009 | unsigned long long int ullmax = 18446744073709551615ull; | |
17010 | return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) | |
17011 | | (llmax / ll) | (llmax % ll) | |
17012 | | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) | |
17013 | | (ullmax / ull) | (ullmax % ull)); | |
d6974efa PE |
17014 | ; |
17015 | return 0; | |
17016 | } | |
3e0be4ab | 17017 | |
d6974efa | 17018 | _ACEOF |
3e0be4ab GM |
17019 | if ac_fn_c_try_link "$LINENO"; then : |
17020 | ||
e275c824 | 17021 | else |
3e0be4ab | 17022 | ac_cv_type_unsigned_long_long_int=no |
e275c824 | 17023 | fi |
3e0be4ab GM |
17024 | rm -f core conftest.err conftest.$ac_objext \ |
17025 | conftest$ac_exeext conftest.$ac_ext | |
17026 | fi | |
e275c824 | 17027 | fi |
3e0be4ab GM |
17028 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5 |
17029 | $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; } | |
17030 | if test $ac_cv_type_unsigned_long_long_int = yes; then | |
e275c824 | 17031 | |
3e0be4ab | 17032 | $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h |
e275c824 | 17033 | |
3e0be4ab GM |
17034 | fi |
17035 | ||
17036 | ||
17037 | ||
17038 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5 | |
17039 | $as_echo_n "checking for long long int... " >&6; } | |
17040 | if test "${ac_cv_type_long_long_int+set}" = set; then : | |
e275c824 | 17041 | $as_echo_n "(cached) " >&6 |
3e0be4ab GM |
17042 | else |
17043 | ac_cv_type_long_long_int=yes | |
17044 | if test "x${ac_cv_prog_cc_c99-no}" = xno; then | |
17045 | ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int | |
17046 | if test $ac_cv_type_long_long_int = yes; then | |
17047 | if test "$cross_compiling" = yes; then : | |
17048 | : | |
e275c824 PE |
17049 | else |
17050 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
17051 | /* end confdefs.h. */ | |
3e0be4ab GM |
17052 | #include <limits.h> |
17053 | #ifndef LLONG_MAX | |
17054 | # define HALF \ | |
17055 | (1LL << (sizeof (long long int) * CHAR_BIT - 2)) | |
17056 | # define LLONG_MAX (HALF - 1 + HALF) | |
17057 | #endif | |
e275c824 PE |
17058 | int |
17059 | main () | |
17060 | { | |
3e0be4ab GM |
17061 | long long int n = 1; |
17062 | int i; | |
17063 | for (i = 0; ; i++) | |
17064 | { | |
17065 | long long int m = n << i; | |
17066 | if (m >> i != n) | |
17067 | return 1; | |
17068 | if (LLONG_MAX / 2 < m) | |
17069 | break; | |
17070 | } | |
17071 | return 0; | |
e275c824 PE |
17072 | ; |
17073 | return 0; | |
17074 | } | |
17075 | _ACEOF | |
3e0be4ab GM |
17076 | if ac_fn_c_try_run "$LINENO"; then : |
17077 | ||
e275c824 | 17078 | else |
3e0be4ab | 17079 | ac_cv_type_long_long_int=no |
e275c824 | 17080 | fi |
3e0be4ab GM |
17081 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
17082 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
e275c824 | 17083 | fi |
e275c824 | 17084 | |
3e0be4ab GM |
17085 | fi |
17086 | fi | |
17087 | fi | |
17088 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5 | |
17089 | $as_echo "$ac_cv_type_long_long_int" >&6; } | |
17090 | if test $ac_cv_type_long_long_int = yes; then | |
e275c824 | 17091 | |
3e0be4ab | 17092 | $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h |
e275c824 | 17093 | |
3e0be4ab | 17094 | fi |
e275c824 PE |
17095 | |
17096 | ||
17097 | ||
17098 | ||
e275c824 PE |
17099 | |
17100 | ||
3e0be4ab GM |
17101 | gl_cv_c_multiarch=no |
17102 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1f5d53eb | 17103 | /* end confdefs.h. */ |
3e0be4ab GM |
17104 | #ifndef __APPLE_CC__ |
17105 | not a universal capable compiler | |
17106 | #endif | |
17107 | typedef int dummy; | |
e275c824 | 17108 | |
1f5d53eb | 17109 | _ACEOF |
3e0be4ab | 17110 | if ac_fn_c_try_compile "$LINENO"; then : |
e275c824 | 17111 | |
3e0be4ab GM |
17112 | arch= |
17113 | prev= | |
17114 | for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do | |
17115 | if test -n "$prev"; then | |
17116 | case $word in | |
17117 | i?86 | x86_64 | ppc | ppc64) | |
17118 | if test -z "$arch" || test "$arch" = "$word"; then | |
17119 | arch="$word" | |
17120 | else | |
17121 | gl_cv_c_multiarch=yes | |
17122 | fi | |
17123 | ;; | |
17124 | esac | |
17125 | prev= | |
17126 | else | |
17127 | if test "x$word" = "x-arch"; then | |
17128 | prev=arch | |
17129 | fi | |
17130 | fi | |
17131 | done | |
e275c824 | 17132 | |
1f5d53eb | 17133 | fi |
3e0be4ab GM |
17134 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
17135 | if test $gl_cv_c_multiarch = yes; then | |
17136 | APPLE_UNIVERSAL_BUILD=1 | |
17137 | else | |
17138 | APPLE_UNIVERSAL_BUILD=0 | |
17139 | fi | |
e275c824 PE |
17140 | |
17141 | ||
17142 | ||
17143 | ||
e275c824 | 17144 | |
3e0be4ab GM |
17145 | if test $ac_cv_type_long_long_int = yes; then |
17146 | HAVE_LONG_LONG_INT=1 | |
17147 | else | |
17148 | HAVE_LONG_LONG_INT=0 | |
17149 | fi | |
e275c824 PE |
17150 | |
17151 | ||
3e0be4ab GM |
17152 | if test $ac_cv_type_unsigned_long_long_int = yes; then |
17153 | HAVE_UNSIGNED_LONG_LONG_INT=1 | |
17154 | else | |
17155 | HAVE_UNSIGNED_LONG_LONG_INT=0 | |
17156 | fi | |
e275c824 PE |
17157 | |
17158 | ||
17159 | ||
3e0be4ab GM |
17160 | if test $ac_cv_header_wchar_h = yes; then |
17161 | HAVE_WCHAR_H=1 | |
17162 | else | |
17163 | HAVE_WCHAR_H=0 | |
17164 | fi | |
e275c824 PE |
17165 | |
17166 | ||
3e0be4ab GM |
17167 | if test $ac_cv_header_inttypes_h = yes; then |
17168 | HAVE_INTTYPES_H=1 | |
17169 | else | |
17170 | HAVE_INTTYPES_H=0 | |
17171 | fi | |
67342916 | 17172 | |
67342916 | 17173 | |
3e0be4ab GM |
17174 | if test $ac_cv_header_sys_types_h = yes; then |
17175 | HAVE_SYS_TYPES_H=1 | |
17176 | else | |
17177 | HAVE_SYS_TYPES_H=0 | |
17178 | fi | |
67342916 | 17179 | |
e275c824 | 17180 | |
e275c824 PE |
17181 | |
17182 | ||
17183 | ||
17184 | ||
e275c824 | 17185 | |
e275c824 | 17186 | |
6c051bab | 17187 | |
942f733f | 17188 | |
4fc2b746 | 17189 | |
3e0be4ab GM |
17190 | if test $gl_cv_have_include_next = yes; then |
17191 | gl_cv_next_stdint_h='<'stdint.h'>' | |
17192 | else | |
17193 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5 | |
17194 | $as_echo_n "checking absolute name of <stdint.h>... " >&6; } | |
17195 | if test "${gl_cv_next_stdint_h+set}" = set; then : | |
4fc2b746 GM |
17196 | $as_echo_n "(cached) " >&6 |
17197 | else | |
17198 | ||
3e0be4ab | 17199 | if test $ac_cv_header_stdint_h = yes; then |
4fc2b746 GM |
17200 | |
17201 | ||
3e0be4ab GM |
17202 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
17203 | /* end confdefs.h. */ | |
17204 | #include <stdint.h> | |
4fc2b746 | 17205 | |
3e0be4ab GM |
17206 | _ACEOF |
17207 | case "$host_os" in | |
17208 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
17209 | *) gl_absname_cpp="$ac_cpp" ;; | |
17210 | esac | |
17211 | gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
17212 | sed -n '\#/stdint.h#{ | |
17213 | s#.*"\(.*/stdint.h\)".*#\1# | |
17214 | s#^/[^/]#//&# | |
17215 | p | |
17216 | q | |
17217 | }'`'"' | |
17218 | else | |
17219 | gl_cv_next_stdint_h='<'stdint.h'>' | |
17220 | fi | |
4fc2b746 | 17221 | |
4fc2b746 | 17222 | |
4fc2b746 | 17223 | fi |
3e0be4ab GM |
17224 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5 |
17225 | $as_echo "$gl_cv_next_stdint_h" >&6; } | |
17226 | fi | |
17227 | NEXT_STDINT_H=$gl_cv_next_stdint_h | |
4fc2b746 | 17228 | |
3e0be4ab GM |
17229 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then |
17230 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
17231 | gl_next_as_first_directive='<'stdint.h'>' | |
17232 | else | |
17233 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
17234 | gl_next_as_first_directive=$gl_cv_next_stdint_h | |
17235 | fi | |
17236 | NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive | |
4fc2b746 GM |
17237 | |
17238 | ||
17239 | ||
942f733f | 17240 | |
3e0be4ab GM |
17241 | if test $ac_cv_header_stdint_h = yes; then |
17242 | HAVE_STDINT_H=1 | |
17243 | else | |
17244 | HAVE_STDINT_H=0 | |
17245 | fi | |
e275c824 | 17246 | |
5fa4ac76 | 17247 | |
3e0be4ab GM |
17248 | if test $ac_cv_header_stdint_h = yes; then |
17249 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5 | |
17250 | $as_echo_n "checking whether stdint.h conforms to C99... " >&6; } | |
17251 | if test "${gl_cv_header_working_stdint_h+set}" = set; then : | |
17252 | $as_echo_n "(cached) " >&6 | |
17253 | else | |
17254 | gl_cv_header_working_stdint_h=no | |
17255 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
17256 | /* end confdefs.h. */ | |
5fa4ac76 | 17257 | |
40e27e7f | 17258 | |
3e0be4ab GM |
17259 | #define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ |
17260 | #define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */ | |
17261 | #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ | |
17262 | #include <stdint.h> | |
17263 | /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */ | |
17264 | #if !(defined WCHAR_MIN && defined WCHAR_MAX) | |
17265 | #error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>" | |
17266 | #endif | |
40e27e7f GM |
17267 | |
17268 | ||
3e0be4ab GM |
17269 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be |
17270 | included before <wchar.h>. */ | |
17271 | #include <stddef.h> | |
17272 | #include <signal.h> | |
17273 | #if HAVE_WCHAR_H | |
17274 | # include <stdio.h> | |
17275 | # include <time.h> | |
17276 | # include <wchar.h> | |
17277 | #endif | |
40e27e7f GM |
17278 | |
17279 | ||
3e0be4ab GM |
17280 | #ifdef INT8_MAX |
17281 | int8_t a1 = INT8_MAX; | |
17282 | int8_t a1min = INT8_MIN; | |
17283 | #endif | |
17284 | #ifdef INT16_MAX | |
17285 | int16_t a2 = INT16_MAX; | |
17286 | int16_t a2min = INT16_MIN; | |
17287 | #endif | |
17288 | #ifdef INT32_MAX | |
17289 | int32_t a3 = INT32_MAX; | |
17290 | int32_t a3min = INT32_MIN; | |
17291 | #endif | |
17292 | #ifdef INT64_MAX | |
17293 | int64_t a4 = INT64_MAX; | |
17294 | int64_t a4min = INT64_MIN; | |
17295 | #endif | |
17296 | #ifdef UINT8_MAX | |
17297 | uint8_t b1 = UINT8_MAX; | |
17298 | #else | |
17299 | typedef int b1[(unsigned char) -1 != 255 ? 1 : -1]; | |
17300 | #endif | |
17301 | #ifdef UINT16_MAX | |
17302 | uint16_t b2 = UINT16_MAX; | |
17303 | #endif | |
17304 | #ifdef UINT32_MAX | |
17305 | uint32_t b3 = UINT32_MAX; | |
17306 | #endif | |
17307 | #ifdef UINT64_MAX | |
17308 | uint64_t b4 = UINT64_MAX; | |
17309 | #endif | |
17310 | int_least8_t c1 = INT8_C (0x7f); | |
17311 | int_least8_t c1max = INT_LEAST8_MAX; | |
17312 | int_least8_t c1min = INT_LEAST8_MIN; | |
17313 | int_least16_t c2 = INT16_C (0x7fff); | |
17314 | int_least16_t c2max = INT_LEAST16_MAX; | |
17315 | int_least16_t c2min = INT_LEAST16_MIN; | |
17316 | int_least32_t c3 = INT32_C (0x7fffffff); | |
17317 | int_least32_t c3max = INT_LEAST32_MAX; | |
17318 | int_least32_t c3min = INT_LEAST32_MIN; | |
17319 | int_least64_t c4 = INT64_C (0x7fffffffffffffff); | |
17320 | int_least64_t c4max = INT_LEAST64_MAX; | |
17321 | int_least64_t c4min = INT_LEAST64_MIN; | |
17322 | uint_least8_t d1 = UINT8_C (0xff); | |
17323 | uint_least8_t d1max = UINT_LEAST8_MAX; | |
17324 | uint_least16_t d2 = UINT16_C (0xffff); | |
17325 | uint_least16_t d2max = UINT_LEAST16_MAX; | |
17326 | uint_least32_t d3 = UINT32_C (0xffffffff); | |
17327 | uint_least32_t d3max = UINT_LEAST32_MAX; | |
17328 | uint_least64_t d4 = UINT64_C (0xffffffffffffffff); | |
17329 | uint_least64_t d4max = UINT_LEAST64_MAX; | |
17330 | int_fast8_t e1 = INT_FAST8_MAX; | |
17331 | int_fast8_t e1min = INT_FAST8_MIN; | |
17332 | int_fast16_t e2 = INT_FAST16_MAX; | |
17333 | int_fast16_t e2min = INT_FAST16_MIN; | |
17334 | int_fast32_t e3 = INT_FAST32_MAX; | |
17335 | int_fast32_t e3min = INT_FAST32_MIN; | |
17336 | int_fast64_t e4 = INT_FAST64_MAX; | |
17337 | int_fast64_t e4min = INT_FAST64_MIN; | |
17338 | uint_fast8_t f1 = UINT_FAST8_MAX; | |
17339 | uint_fast16_t f2 = UINT_FAST16_MAX; | |
17340 | uint_fast32_t f3 = UINT_FAST32_MAX; | |
17341 | uint_fast64_t f4 = UINT_FAST64_MAX; | |
17342 | #ifdef INTPTR_MAX | |
17343 | intptr_t g = INTPTR_MAX; | |
17344 | intptr_t gmin = INTPTR_MIN; | |
17345 | #endif | |
17346 | #ifdef UINTPTR_MAX | |
17347 | uintptr_t h = UINTPTR_MAX; | |
17348 | #endif | |
17349 | intmax_t i = INTMAX_MAX; | |
17350 | uintmax_t j = UINTMAX_MAX; | |
40e27e7f | 17351 | |
3e0be4ab GM |
17352 | #include <limits.h> /* for CHAR_BIT */ |
17353 | #define TYPE_MINIMUM(t) \ | |
17354 | ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t))) | |
17355 | #define TYPE_MAXIMUM(t) \ | |
17356 | ((t) ((t) 0 < (t) -1 \ | |
17357 | ? (t) -1 \ | |
17358 | : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1))) | |
17359 | struct s { | |
17360 | int check_PTRDIFF: | |
17361 | PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t) | |
17362 | && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t) | |
17363 | ? 1 : -1; | |
17364 | /* Detect bug in FreeBSD 6.0 / ia64. */ | |
17365 | int check_SIG_ATOMIC: | |
17366 | SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t) | |
17367 | && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t) | |
17368 | ? 1 : -1; | |
17369 | int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1; | |
17370 | int check_WCHAR: | |
17371 | WCHAR_MIN == TYPE_MINIMUM (wchar_t) | |
17372 | && WCHAR_MAX == TYPE_MAXIMUM (wchar_t) | |
17373 | ? 1 : -1; | |
17374 | /* Detect bug in mingw. */ | |
17375 | int check_WINT: | |
17376 | WINT_MIN == TYPE_MINIMUM (wint_t) | |
17377 | && WINT_MAX == TYPE_MAXIMUM (wint_t) | |
17378 | ? 1 : -1; | |
40e27e7f | 17379 | |
3e0be4ab GM |
17380 | /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */ |
17381 | int check_UINT8_C: | |
17382 | (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1; | |
17383 | int check_UINT16_C: | |
17384 | (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1; | |
40e27e7f | 17385 | |
3e0be4ab GM |
17386 | /* Detect bugs in OpenBSD 3.9 stdint.h. */ |
17387 | #ifdef UINT8_MAX | |
17388 | int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1; | |
17389 | #endif | |
17390 | #ifdef UINT16_MAX | |
17391 | int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1; | |
17392 | #endif | |
17393 | #ifdef UINT32_MAX | |
17394 | int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1; | |
17395 | #endif | |
17396 | #ifdef UINT64_MAX | |
17397 | int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1; | |
17398 | #endif | |
17399 | int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1; | |
17400 | int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1; | |
17401 | int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1; | |
17402 | int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1; | |
17403 | int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1; | |
17404 | int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1; | |
17405 | int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1; | |
17406 | int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1; | |
17407 | int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1; | |
17408 | int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1; | |
17409 | int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1; | |
17410 | }; | |
d87ffdb7 | 17411 | |
3e0be4ab GM |
17412 | int |
17413 | main () | |
17414 | { | |
d87ffdb7 | 17415 | |
3e0be4ab GM |
17416 | ; |
17417 | return 0; | |
17418 | } | |
17419 | _ACEOF | |
17420 | if ac_fn_c_try_compile "$LINENO"; then : | |
17421 | if test "$cross_compiling" = yes; then : | |
17422 | gl_cv_header_working_stdint_h=yes | |
d87ffdb7 | 17423 | |
3e0be4ab GM |
17424 | else |
17425 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
17426 | /* end confdefs.h. */ | |
d87ffdb7 GM |
17427 | |
17428 | ||
3e0be4ab GM |
17429 | #define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ |
17430 | #define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */ | |
17431 | #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ | |
17432 | #include <stdint.h> | |
d87ffdb7 GM |
17433 | |
17434 | ||
3e0be4ab GM |
17435 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be |
17436 | included before <wchar.h>. */ | |
17437 | #include <stddef.h> | |
17438 | #include <signal.h> | |
17439 | #if HAVE_WCHAR_H | |
17440 | # include <stdio.h> | |
17441 | # include <time.h> | |
17442 | # include <wchar.h> | |
17443 | #endif | |
7d2a1c5e GM |
17444 | |
17445 | ||
3e0be4ab GM |
17446 | #include <stdio.h> |
17447 | #include <string.h> | |
17448 | #define MVAL(macro) MVAL1(macro) | |
17449 | #define MVAL1(expression) #expression | |
17450 | static const char *macro_values[] = | |
17451 | { | |
17452 | #ifdef INT8_MAX | |
17453 | MVAL (INT8_MAX), | |
17454 | #endif | |
17455 | #ifdef INT16_MAX | |
17456 | MVAL (INT16_MAX), | |
17457 | #endif | |
17458 | #ifdef INT32_MAX | |
17459 | MVAL (INT32_MAX), | |
17460 | #endif | |
17461 | #ifdef INT64_MAX | |
17462 | MVAL (INT64_MAX), | |
17463 | #endif | |
17464 | #ifdef UINT8_MAX | |
17465 | MVAL (UINT8_MAX), | |
17466 | #endif | |
17467 | #ifdef UINT16_MAX | |
17468 | MVAL (UINT16_MAX), | |
17469 | #endif | |
17470 | #ifdef UINT32_MAX | |
17471 | MVAL (UINT32_MAX), | |
17472 | #endif | |
17473 | #ifdef UINT64_MAX | |
17474 | MVAL (UINT64_MAX), | |
17475 | #endif | |
17476 | NULL | |
17477 | }; | |
7d2a1c5e | 17478 | |
7d2a1c5e GM |
17479 | int |
17480 | main () | |
17481 | { | |
3e0be4ab GM |
17482 | |
17483 | const char **mv; | |
17484 | for (mv = macro_values; *mv != NULL; mv++) | |
17485 | { | |
17486 | const char *value = *mv; | |
17487 | /* Test whether it looks like a cast expression. */ | |
17488 | if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0 | |
17489 | || strncmp (value, "((unsigned short)"/*)*/, 17) == 0 | |
17490 | || strncmp (value, "((unsigned char)"/*)*/, 16) == 0 | |
17491 | || strncmp (value, "((int)"/*)*/, 6) == 0 | |
17492 | || strncmp (value, "((signed short)"/*)*/, 15) == 0 | |
17493 | || strncmp (value, "((signed char)"/*)*/, 14) == 0) | |
17494 | return mv - macro_values + 1; | |
17495 | } | |
17496 | return 0; | |
7d2a1c5e GM |
17497 | |
17498 | ; | |
17499 | return 0; | |
17500 | } | |
7d2a1c5e GM |
17501 | _ACEOF |
17502 | if ac_fn_c_try_run "$LINENO"; then : | |
3e0be4ab | 17503 | gl_cv_header_working_stdint_h=yes |
7d2a1c5e GM |
17504 | fi |
17505 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
17506 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
17507 | fi | |
17508 | ||
17509 | ||
17510 | fi | |
3e0be4ab | 17511 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
7d2a1c5e | 17512 | |
3e0be4ab GM |
17513 | fi |
17514 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5 | |
17515 | $as_echo "$gl_cv_header_working_stdint_h" >&6; } | |
7d2a1c5e | 17516 | fi |
3e0be4ab GM |
17517 | if test "$gl_cv_header_working_stdint_h" = yes; then |
17518 | STDINT_H= | |
17519 | else | |
17520 | for ac_header in sys/inttypes.h sys/bitypes.h | |
17521 | do : | |
17522 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
17523 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
17524 | eval as_val=\$$as_ac_Header | |
17525 | if test "x$as_val" = x""yes; then : | |
17526 | cat >>confdefs.h <<_ACEOF | |
17527 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
17528 | _ACEOF | |
7d2a1c5e | 17529 | |
3e0be4ab | 17530 | fi |
7d2a1c5e | 17531 | |
3e0be4ab | 17532 | done |
7d2a1c5e | 17533 | |
3e0be4ab GM |
17534 | if test $ac_cv_header_sys_inttypes_h = yes; then |
17535 | HAVE_SYS_INTTYPES_H=1 | |
17536 | else | |
17537 | HAVE_SYS_INTTYPES_H=0 | |
7d2a1c5e | 17538 | fi |
7d2a1c5e | 17539 | |
3e0be4ab GM |
17540 | if test $ac_cv_header_sys_bitypes_h = yes; then |
17541 | HAVE_SYS_BITYPES_H=1 | |
17542 | else | |
17543 | HAVE_SYS_BITYPES_H=0 | |
17544 | fi | |
7d2a1c5e GM |
17545 | |
17546 | ||
17547 | ||
17548 | ||
3e0be4ab | 17549 | if test $APPLE_UNIVERSAL_BUILD = 0; then |
7d2a1c5e GM |
17550 | |
17551 | ||
3e0be4ab GM |
17552 | for gltype in ptrdiff_t size_t ; do |
17553 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5 | |
17554 | $as_echo_n "checking for bit size of $gltype... " >&6; } | |
17555 | if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then : | |
17556 | $as_echo_n "(cached) " >&6 | |
17557 | else | |
17558 | if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" " | |
17559 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
17560 | included before <wchar.h>. */ | |
17561 | #include <stddef.h> | |
17562 | #include <signal.h> | |
17563 | #if HAVE_WCHAR_H | |
17564 | # include <stdio.h> | |
17565 | # include <time.h> | |
17566 | # include <wchar.h> | |
17567 | #endif | |
7d2a1c5e | 17568 | |
3e0be4ab | 17569 | #include <limits.h>"; then : |
7d2a1c5e | 17570 | |
3e0be4ab GM |
17571 | else |
17572 | result=unknown | |
17573 | fi | |
7d2a1c5e | 17574 | |
3e0be4ab | 17575 | eval gl_cv_bitsizeof_${gltype}=\$result |
d87ffdb7 | 17576 | |
3e0be4ab GM |
17577 | fi |
17578 | eval ac_res=\$gl_cv_bitsizeof_${gltype} | |
17579 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
17580 | $as_echo "$ac_res" >&6; } | |
17581 | eval result=\$gl_cv_bitsizeof_${gltype} | |
17582 | if test $result = unknown; then | |
17583 | result=0 | |
17584 | fi | |
17585 | GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` | |
17586 | cat >>confdefs.h <<_ACEOF | |
17587 | #define BITSIZEOF_${GLTYPE} $result | |
17588 | _ACEOF | |
e275c824 | 17589 | |
3e0be4ab GM |
17590 | eval BITSIZEOF_${GLTYPE}=\$result |
17591 | done | |
e275c824 | 17592 | |
e275c824 | 17593 | |
3e0be4ab | 17594 | fi |
e275c824 | 17595 | |
1f5d53eb | 17596 | |
3e0be4ab GM |
17597 | for gltype in sig_atomic_t wchar_t wint_t ; do |
17598 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5 | |
17599 | $as_echo_n "checking for bit size of $gltype... " >&6; } | |
17600 | if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then : | |
16c3e636 PE |
17601 | $as_echo_n "(cached) " >&6 |
17602 | else | |
3e0be4ab GM |
17603 | if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" " |
17604 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
17605 | included before <wchar.h>. */ | |
17606 | #include <stddef.h> | |
17607 | #include <signal.h> | |
17608 | #if HAVE_WCHAR_H | |
17609 | # include <stdio.h> | |
17610 | # include <time.h> | |
17611 | # include <wchar.h> | |
17612 | #endif | |
17613 | ||
17614 | #include <limits.h>"; then : | |
16c3e636 | 17615 | |
1f5d53eb | 17616 | else |
3e0be4ab | 17617 | result=unknown |
1f5d53eb PE |
17618 | fi |
17619 | ||
3e0be4ab | 17620 | eval gl_cv_bitsizeof_${gltype}=\$result |
16c3e636 | 17621 | |
16c3e636 | 17622 | fi |
3e0be4ab GM |
17623 | eval ac_res=\$gl_cv_bitsizeof_${gltype} |
17624 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
17625 | $as_echo "$ac_res" >&6; } | |
17626 | eval result=\$gl_cv_bitsizeof_${gltype} | |
17627 | if test $result = unknown; then | |
17628 | result=0 | |
17629 | fi | |
17630 | GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` | |
17631 | cat >>confdefs.h <<_ACEOF | |
17632 | #define BITSIZEOF_${GLTYPE} $result | |
17633 | _ACEOF | |
16c3e636 | 17634 | |
3e0be4ab GM |
17635 | eval BITSIZEOF_${GLTYPE}=\$result |
17636 | done | |
1f5d53eb | 17637 | |
16c3e636 PE |
17638 | |
17639 | ||
3e0be4ab GM |
17640 | |
17641 | for gltype in sig_atomic_t wchar_t wint_t ; do | |
17642 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5 | |
17643 | $as_echo_n "checking whether $gltype is signed... " >&6; } | |
17644 | if { as_var=gl_cv_type_${gltype}_signed; eval "test \"\${$as_var+set}\" = set"; }; then : | |
1fd182f0 PE |
17645 | $as_echo_n "(cached) " >&6 |
17646 | else | |
3e0be4ab | 17647 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
1fd182f0 | 17648 | /* end confdefs.h. */ |
1f5d53eb | 17649 | |
3e0be4ab GM |
17650 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be |
17651 | included before <wchar.h>. */ | |
17652 | #include <stddef.h> | |
17653 | #include <signal.h> | |
17654 | #if HAVE_WCHAR_H | |
17655 | # include <stdio.h> | |
17656 | # include <time.h> | |
17657 | # include <wchar.h> | |
17658 | #endif | |
17659 | ||
17660 | int verify[2 * (($gltype) -1 < ($gltype) 0) - 1]; | |
1fd182f0 PE |
17661 | int |
17662 | main () | |
17663 | { | |
3e0be4ab | 17664 | |
1fd182f0 PE |
17665 | ; |
17666 | return 0; | |
17667 | } | |
17668 | _ACEOF | |
3e0be4ab GM |
17669 | if ac_fn_c_try_compile "$LINENO"; then : |
17670 | result=yes | |
1f5d53eb | 17671 | else |
3e0be4ab | 17672 | result=no |
1f5d53eb | 17673 | fi |
3e0be4ab GM |
17674 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
17675 | eval gl_cv_type_${gltype}_signed=\$result | |
17676 | ||
1fd182f0 | 17677 | fi |
3e0be4ab GM |
17678 | eval ac_res=\$gl_cv_type_${gltype}_signed |
17679 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
17680 | $as_echo "$ac_res" >&6; } | |
17681 | eval result=\$gl_cv_type_${gltype}_signed | |
17682 | GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` | |
17683 | if test "$result" = yes; then | |
17684 | cat >>confdefs.h <<_ACEOF | |
17685 | #define HAVE_SIGNED_${GLTYPE} 1 | |
17686 | _ACEOF | |
1fd182f0 | 17687 | |
3e0be4ab GM |
17688 | eval HAVE_SIGNED_${GLTYPE}=1 |
17689 | else | |
17690 | eval HAVE_SIGNED_${GLTYPE}=0 | |
17691 | fi | |
17692 | done | |
1fd182f0 | 17693 | |
1f5d53eb | 17694 | |
3e0be4ab GM |
17695 | gl_cv_type_ptrdiff_t_signed=yes |
17696 | gl_cv_type_size_t_signed=no | |
17697 | if test $APPLE_UNIVERSAL_BUILD = 0; then | |
17698 | ||
17699 | ||
17700 | for gltype in ptrdiff_t size_t ; do | |
17701 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5 | |
17702 | $as_echo_n "checking for $gltype integer literal suffix... " >&6; } | |
17703 | if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then : | |
1fd182f0 PE |
17704 | $as_echo_n "(cached) " >&6 |
17705 | else | |
3e0be4ab GM |
17706 | eval gl_cv_type_${gltype}_suffix=no |
17707 | eval result=\$gl_cv_type_${gltype}_signed | |
17708 | if test "$result" = yes; then | |
17709 | glsufu= | |
17710 | else | |
17711 | glsufu=u | |
17712 | fi | |
17713 | for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do | |
17714 | case $glsuf in | |
17715 | '') gltype1='int';; | |
17716 | l) gltype1='long int';; | |
17717 | ll) gltype1='long long int';; | |
17718 | i64) gltype1='__int64';; | |
17719 | u) gltype1='unsigned int';; | |
17720 | ul) gltype1='unsigned long int';; | |
17721 | ull) gltype1='unsigned long long int';; | |
17722 | ui64)gltype1='unsigned __int64';; | |
17723 | esac | |
17724 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1fd182f0 | 17725 | /* end confdefs.h. */ |
1fd182f0 | 17726 | |
3e0be4ab GM |
17727 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be |
17728 | included before <wchar.h>. */ | |
17729 | #include <stddef.h> | |
17730 | #include <signal.h> | |
17731 | #if HAVE_WCHAR_H | |
17732 | # include <stdio.h> | |
17733 | # include <time.h> | |
17734 | # include <wchar.h> | |
17735 | #endif | |
17736 | ||
17737 | extern $gltype foo; | |
17738 | extern $gltype1 foo; | |
1fd182f0 PE |
17739 | int |
17740 | main () | |
17741 | { | |
3e0be4ab | 17742 | |
1fd182f0 PE |
17743 | ; |
17744 | return 0; | |
17745 | } | |
17746 | _ACEOF | |
3e0be4ab GM |
17747 | if ac_fn_c_try_compile "$LINENO"; then : |
17748 | eval gl_cv_type_${gltype}_suffix=\$glsuf | |
1fd182f0 | 17749 | fi |
3e0be4ab GM |
17750 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
17751 | eval result=\$gl_cv_type_${gltype}_suffix | |
17752 | test "$result" != no && break | |
17753 | done | |
1fd182f0 | 17754 | fi |
3e0be4ab GM |
17755 | eval ac_res=\$gl_cv_type_${gltype}_suffix |
17756 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
17757 | $as_echo "$ac_res" >&6; } | |
17758 | GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` | |
17759 | eval result=\$gl_cv_type_${gltype}_suffix | |
17760 | test "$result" = no && result= | |
17761 | eval ${GLTYPE}_SUFFIX=\$result | |
17762 | cat >>confdefs.h <<_ACEOF | |
17763 | #define ${GLTYPE}_SUFFIX $result | |
1f5d53eb | 17764 | _ACEOF |
1fd182f0 | 17765 | |
3e0be4ab | 17766 | done |
1f5d53eb | 17767 | |
1f5d53eb | 17768 | |
3e0be4ab | 17769 | fi |
1f5d53eb | 17770 | |
3e0be4ab GM |
17771 | |
17772 | for gltype in sig_atomic_t wchar_t wint_t ; do | |
17773 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5 | |
17774 | $as_echo_n "checking for $gltype integer literal suffix... " >&6; } | |
17775 | if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then : | |
1fd182f0 PE |
17776 | $as_echo_n "(cached) " >&6 |
17777 | else | |
3e0be4ab GM |
17778 | eval gl_cv_type_${gltype}_suffix=no |
17779 | eval result=\$gl_cv_type_${gltype}_signed | |
17780 | if test "$result" = yes; then | |
17781 | glsufu= | |
17782 | else | |
17783 | glsufu=u | |
17784 | fi | |
17785 | for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do | |
17786 | case $glsuf in | |
17787 | '') gltype1='int';; | |
17788 | l) gltype1='long int';; | |
17789 | ll) gltype1='long long int';; | |
17790 | i64) gltype1='__int64';; | |
17791 | u) gltype1='unsigned int';; | |
17792 | ul) gltype1='unsigned long int';; | |
17793 | ull) gltype1='unsigned long long int';; | |
17794 | ui64)gltype1='unsigned __int64';; | |
17795 | esac | |
17796 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1fd182f0 | 17797 | /* end confdefs.h. */ |
1fd182f0 | 17798 | |
3e0be4ab GM |
17799 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be |
17800 | included before <wchar.h>. */ | |
17801 | #include <stddef.h> | |
17802 | #include <signal.h> | |
17803 | #if HAVE_WCHAR_H | |
17804 | # include <stdio.h> | |
17805 | # include <time.h> | |
17806 | # include <wchar.h> | |
17807 | #endif | |
17808 | ||
17809 | extern $gltype foo; | |
17810 | extern $gltype1 foo; | |
1fd182f0 PE |
17811 | int |
17812 | main () | |
17813 | { | |
3e0be4ab | 17814 | |
1fd182f0 PE |
17815 | ; |
17816 | return 0; | |
17817 | } | |
17818 | _ACEOF | |
3e0be4ab GM |
17819 | if ac_fn_c_try_compile "$LINENO"; then : |
17820 | eval gl_cv_type_${gltype}_suffix=\$glsuf | |
1fd182f0 | 17821 | fi |
3e0be4ab GM |
17822 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
17823 | eval result=\$gl_cv_type_${gltype}_suffix | |
17824 | test "$result" != no && break | |
17825 | done | |
1fd182f0 | 17826 | fi |
3e0be4ab GM |
17827 | eval ac_res=\$gl_cv_type_${gltype}_suffix |
17828 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
17829 | $as_echo "$ac_res" >&6; } | |
17830 | GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` | |
17831 | eval result=\$gl_cv_type_${gltype}_suffix | |
17832 | test "$result" = no && result= | |
17833 | eval ${GLTYPE}_SUFFIX=\$result | |
17834 | cat >>confdefs.h <<_ACEOF | |
17835 | #define ${GLTYPE}_SUFFIX $result | |
1f5d53eb PE |
17836 | _ACEOF |
17837 | ||
3e0be4ab GM |
17838 | done |
17839 | ||
17840 | ||
17841 | ||
17842 | STDINT_H=stdint.h | |
17843 | fi | |
17844 | ||
17845 | if test -n "$STDINT_H"; then | |
17846 | GL_GENERATE_STDINT_H_TRUE= | |
17847 | GL_GENERATE_STDINT_H_FALSE='#' | |
17848 | else | |
17849 | GL_GENERATE_STDINT_H_TRUE='#' | |
17850 | GL_GENERATE_STDINT_H_FALSE= | |
17851 | fi | |
17852 | ||
17853 | ||
17854 | ||
17855 | ||
17856 | ||
17857 | GNULIB_IMAXABS=0; | |
17858 | GNULIB_IMAXDIV=0; | |
17859 | GNULIB_STRTOIMAX=0; | |
17860 | GNULIB_STRTOUMAX=0; | |
17861 | HAVE_DECL_IMAXABS=1; | |
17862 | HAVE_DECL_IMAXDIV=1; | |
17863 | HAVE_DECL_STRTOIMAX=1; | |
17864 | HAVE_DECL_STRTOUMAX=1; | |
17865 | INT32_MAX_LT_INTMAX_MAX=1; | |
17866 | INT64_MAX_EQ_LONG_MAX='defined _LP64'; | |
17867 | PRI_MACROS_BROKEN=0; | |
17868 | PRIPTR_PREFIX=__PRIPTR_PREFIX; | |
17869 | UINT32_MAX_LT_UINTMAX_MAX=1; | |
17870 | UINT64_MAX_EQ_ULONG_MAX='defined _LP64'; | |
17871 | ||
1f5d53eb | 17872 | |
1f5d53eb | 17873 | |
1f5d53eb | 17874 | |
1f5d53eb | 17875 | |
1f5d53eb | 17876 | |
1fd182f0 | 17877 | |
1fd182f0 PE |
17878 | |
17879 | ||
17880 | ||
17881 | ||
17882 | ||
34119902 GM |
17883 | |
17884 | ||
3e0be4ab GM |
17885 | |
17886 | if test $gl_cv_have_include_next = yes; then | |
17887 | gl_cv_next_inttypes_h='<'inttypes.h'>' | |
17888 | else | |
17889 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5 | |
17890 | $as_echo_n "checking absolute name of <inttypes.h>... " >&6; } | |
17891 | if test "${gl_cv_next_inttypes_h+set}" = set; then : | |
17892 | $as_echo_n "(cached) " >&6 | |
34119902 | 17893 | else |
34119902 | 17894 | |
3e0be4ab GM |
17895 | if test $ac_cv_header_inttypes_h = yes; then |
17896 | ||
17897 | ||
17898 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
17899 | /* end confdefs.h. */ | |
17900 | #include <inttypes.h> | |
34119902 | 17901 | |
34119902 | 17902 | _ACEOF |
3e0be4ab GM |
17903 | case "$host_os" in |
17904 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
17905 | *) gl_absname_cpp="$ac_cpp" ;; | |
17906 | esac | |
17907 | gl_cv_next_inttypes_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
17908 | sed -n '\#/inttypes.h#{ | |
17909 | s#.*"\(.*/inttypes.h\)".*#\1# | |
17910 | s#^/[^/]#//&# | |
17911 | p | |
17912 | q | |
17913 | }'`'"' | |
17914 | else | |
17915 | gl_cv_next_inttypes_h='<'inttypes.h'>' | |
17916 | fi | |
17917 | ||
34119902 GM |
17918 | |
17919 | fi | |
3e0be4ab GM |
17920 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5 |
17921 | $as_echo "$gl_cv_next_inttypes_h" >&6; } | |
17922 | fi | |
17923 | NEXT_INTTYPES_H=$gl_cv_next_inttypes_h | |
34119902 | 17924 | |
3e0be4ab GM |
17925 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then |
17926 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
17927 | gl_next_as_first_directive='<'inttypes.h'>' | |
17928 | else | |
17929 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
17930 | gl_next_as_first_directive=$gl_cv_next_inttypes_h | |
17931 | fi | |
17932 | NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive | |
34119902 | 17933 | |
34119902 | 17934 | |
34119902 GM |
17935 | |
17936 | ||
34119902 GM |
17937 | |
17938 | ||
17939 | ||
17940 | ||
3e0be4ab | 17941 | $as_echo "#define GL_TRIGGER_STDC_LIMIT_MACROS 1" >>confdefs.h |
34119902 GM |
17942 | |
17943 | ||
17944 | ||
17945 | ||
34119902 GM |
17946 | |
17947 | ||
3e0be4ab GM |
17948 | GNULIB_FCHMODAT=0; |
17949 | GNULIB_FSTATAT=0; | |
17950 | GNULIB_FUTIMENS=0; | |
17951 | GNULIB_LCHMOD=0; | |
17952 | GNULIB_LSTAT=0; | |
17953 | GNULIB_MKDIRAT=0; | |
17954 | GNULIB_MKFIFO=0; | |
17955 | GNULIB_MKFIFOAT=0; | |
17956 | GNULIB_MKNOD=0; | |
17957 | GNULIB_MKNODAT=0; | |
17958 | GNULIB_STAT=0; | |
17959 | GNULIB_UTIMENSAT=0; | |
17960 | HAVE_FCHMODAT=1; | |
17961 | HAVE_FSTATAT=1; | |
17962 | HAVE_FUTIMENS=1; | |
17963 | HAVE_LCHMOD=1; | |
17964 | HAVE_LSTAT=1; | |
17965 | HAVE_MKDIRAT=1; | |
17966 | HAVE_MKFIFO=1; | |
17967 | HAVE_MKFIFOAT=1; | |
17968 | HAVE_MKNOD=1; | |
17969 | HAVE_MKNODAT=1; | |
17970 | HAVE_UTIMENSAT=1; | |
17971 | REPLACE_FSTAT=0; | |
17972 | REPLACE_FSTATAT=0; | |
17973 | REPLACE_FUTIMENS=0; | |
17974 | REPLACE_LSTAT=0; | |
17975 | REPLACE_MKDIR=0; | |
17976 | REPLACE_MKFIFO=0; | |
17977 | REPLACE_MKNOD=0; | |
17978 | REPLACE_STAT=0; | |
17979 | REPLACE_UTIMENSAT=0; | |
34119902 | 17980 | |
3e0be4ab GM |
17981 | |
17982 | ||
17983 | ||
17984 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5 | |
17985 | $as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; } | |
17986 | if test "${gl_cv_func_lstat_dereferences_slashed_symlink+set}" = set; then : | |
17987 | $as_echo_n "(cached) " >&6 | |
17988 | else | |
17989 | rm -f conftest.sym conftest.file | |
17990 | echo >conftest.file | |
17991 | if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then | |
17992 | if test "$cross_compiling" = yes; then : | |
17993 | # When cross-compiling, be pessimistic so we will end up using the | |
17994 | # replacement version of lstat that checks for trailing slashes and | |
17995 | # calls lstat a second time when necessary. | |
17996 | gl_cv_func_lstat_dereferences_slashed_symlink=no | |
17997 | ||
17998 | else | |
17999 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
18000 | /* end confdefs.h. */ | |
18001 | $ac_includes_default | |
18002 | int | |
18003 | main () | |
18004 | { | |
18005 | struct stat sbuf; | |
18006 | /* Linux will dereference the symlink and fail, as required by | |
18007 | POSIX. That is better in the sense that it means we will not | |
18008 | have to compile and use the lstat wrapper. */ | |
18009 | return lstat ("conftest.sym/", &sbuf) == 0; | |
18010 | ||
18011 | ; | |
18012 | return 0; | |
18013 | } | |
34119902 | 18014 | _ACEOF |
3e0be4ab GM |
18015 | if ac_fn_c_try_run "$LINENO"; then : |
18016 | gl_cv_func_lstat_dereferences_slashed_symlink=yes | |
18017 | else | |
18018 | gl_cv_func_lstat_dereferences_slashed_symlink=no | |
34119902 | 18019 | fi |
3e0be4ab GM |
18020 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
18021 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
18022 | fi | |
18023 | ||
18024 | else | |
18025 | # If the 'ln -s' command failed, then we probably don't even | |
18026 | # have an lstat function. | |
18027 | gl_cv_func_lstat_dereferences_slashed_symlink=no | |
18028 | fi | |
18029 | rm -f conftest.sym conftest.file | |
34119902 | 18030 | |
1f5d53eb | 18031 | fi |
3e0be4ab GM |
18032 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5 |
18033 | $as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; } | |
18034 | test $gl_cv_func_lstat_dereferences_slashed_symlink = yes && | |
18035 | ||
18036 | cat >>confdefs.h <<_ACEOF | |
18037 | #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 | |
18038 | _ACEOF | |
18039 | ||
18040 | ||
18041 | ||
18042 | GNULIB_MKTIME=0; | |
18043 | GNULIB_NANOSLEEP=0; | |
18044 | GNULIB_STRPTIME=0; | |
18045 | GNULIB_TIMEGM=0; | |
18046 | GNULIB_TIME_R=0; | |
18047 | HAVE_DECL_LOCALTIME_R=1; | |
18048 | HAVE_NANOSLEEP=1; | |
18049 | HAVE_STRPTIME=1; | |
18050 | HAVE_TIMEGM=1; | |
18051 | REPLACE_LOCALTIME_R=GNULIB_PORTCHECK; | |
18052 | REPLACE_MKTIME=GNULIB_PORTCHECK; | |
18053 | REPLACE_NANOSLEEP=GNULIB_PORTCHECK; | |
18054 | REPLACE_TIMEGM=GNULIB_PORTCHECK; | |
18055 | ||
18056 | ||
18057 | ||
1fd182f0 PE |
18058 | |
18059 | ||
18060 | ||
3e0be4ab GM |
18061 | GNULIB_PTHREAD_SIGMASK=0; |
18062 | GNULIB_SIGNAL_H_SIGPIPE=0; | |
18063 | GNULIB_SIGPROCMASK=0; | |
18064 | GNULIB_SIGACTION=0; | |
18065 | HAVE_POSIX_SIGNALBLOCKING=1; | |
18066 | HAVE_PTHREAD_SIGMASK=1; | |
18067 | HAVE_SIGSET_T=1; | |
18068 | HAVE_SIGINFO_T=1; | |
18069 | HAVE_SIGACTION=1; | |
18070 | HAVE_STRUCT_SIGACTION_SA_SIGACTION=1; | |
1fd182f0 | 18071 | |
3e0be4ab | 18072 | HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1; |
1fd182f0 | 18073 | |
3e0be4ab GM |
18074 | HAVE_SIGHANDLER_T=1; |
18075 | REPLACE_PTHREAD_SIGMASK=0; | |
1fd182f0 PE |
18076 | |
18077 | ||
18078 | ||
b06b1098 | 18079 | |
3e0be4ab GM |
18080 | ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" " |
18081 | #include <signal.h> | |
18082 | /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */ | |
18083 | #include <sys/types.h> | |
b06b1098 | 18084 | |
3e0be4ab GM |
18085 | " |
18086 | if test "x$ac_cv_type_sigset_t" = x""yes; then : | |
1fd182f0 | 18087 | |
3e0be4ab GM |
18088 | cat >>confdefs.h <<_ACEOF |
18089 | #define HAVE_SIGSET_T 1 | |
18090 | _ACEOF | |
1fd182f0 | 18091 | |
3e0be4ab GM |
18092 | gl_cv_type_sigset_t=yes |
18093 | else | |
18094 | gl_cv_type_sigset_t=no | |
1f5d53eb | 18095 | fi |
b06b1098 | 18096 | |
3e0be4ab GM |
18097 | if test $gl_cv_type_sigset_t != yes; then |
18098 | HAVE_SIGSET_T=0 | |
18099 | fi | |
1fd182f0 | 18100 | |
1fd182f0 | 18101 | |
3e0be4ab GM |
18102 | |
18103 | ||
18104 | ||
18105 | if test $ac_cv_header_sys_socket_h = no; then | |
18106 | for ac_header in ws2tcpip.h | |
1f5d53eb | 18107 | do : |
3e0be4ab GM |
18108 | ac_fn_c_check_header_mongrel "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default" |
18109 | if test "x$ac_cv_header_ws2tcpip_h" = x""yes; then : | |
1f5d53eb | 18110 | cat >>confdefs.h <<_ACEOF |
3e0be4ab | 18111 | #define HAVE_WS2TCPIP_H 1 |
1f5d53eb | 18112 | _ACEOF |
1fd182f0 | 18113 | |
1f5d53eb | 18114 | fi |
1fd182f0 | 18115 | |
1f5d53eb | 18116 | done |
1fd182f0 | 18117 | |
3e0be4ab | 18118 | fi |
1fd182f0 | 18119 | |
3e0be4ab GM |
18120 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5 |
18121 | $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; } | |
18122 | if test "${ac_cv_header_stdbool_h+set}" = set; then : | |
18123 | $as_echo_n "(cached) " >&6 | |
18124 | else | |
18125 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
18126 | /* end confdefs.h. */ | |
18127 | ||
18128 | #include <stdbool.h> | |
18129 | #ifndef bool | |
18130 | "error: bool is not defined" | |
18131 | #endif | |
18132 | #ifndef false | |
18133 | "error: false is not defined" | |
18134 | #endif | |
18135 | #if false | |
18136 | "error: false is not 0" | |
18137 | #endif | |
18138 | #ifndef true | |
18139 | "error: true is not defined" | |
18140 | #endif | |
18141 | #if true != 1 | |
18142 | "error: true is not 1" | |
18143 | #endif | |
18144 | #ifndef __bool_true_false_are_defined | |
18145 | "error: __bool_true_false_are_defined is not defined" | |
18146 | #endif | |
18147 | ||
18148 | struct s { _Bool s: 1; _Bool t; } s; | |
18149 | ||
18150 | char a[true == 1 ? 1 : -1]; | |
18151 | char b[false == 0 ? 1 : -1]; | |
18152 | char c[__bool_true_false_are_defined == 1 ? 1 : -1]; | |
18153 | char d[(bool) 0.5 == true ? 1 : -1]; | |
18154 | /* See body of main program for 'e'. */ | |
18155 | char f[(_Bool) 0.0 == false ? 1 : -1]; | |
18156 | char g[true]; | |
18157 | char h[sizeof (_Bool)]; | |
18158 | char i[sizeof s.t]; | |
18159 | enum { j = false, k = true, l = false * true, m = true * 256 }; | |
18160 | /* The following fails for | |
18161 | HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */ | |
18162 | _Bool n[m]; | |
18163 | char o[sizeof n == m * sizeof n[0] ? 1 : -1]; | |
18164 | char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; | |
18165 | /* Catch a bug in an HP-UX C compiler. See | |
18166 | http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html | |
18167 | http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html | |
18168 | */ | |
18169 | _Bool q = true; | |
18170 | _Bool *pq = &q; | |
18171 | ||
18172 | int | |
18173 | main () | |
18174 | { | |
18175 | ||
18176 | bool e = &s; | |
18177 | *pq |= q; | |
18178 | *pq |= ! q; | |
18179 | /* Refer to every declared value, to avoid compiler optimizations. */ | |
18180 | return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l | |
18181 | + !m + !n + !o + !p + !q + !pq); | |
18182 | ||
18183 | ; | |
18184 | return 0; | |
18185 | } | |
1f5d53eb | 18186 | _ACEOF |
3e0be4ab GM |
18187 | if ac_fn_c_try_compile "$LINENO"; then : |
18188 | ac_cv_header_stdbool_h=yes | |
18189 | else | |
18190 | ac_cv_header_stdbool_h=no | |
18191 | fi | |
18192 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
18193 | fi | |
18194 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5 | |
18195 | $as_echo "$ac_cv_header_stdbool_h" >&6; } | |
18196 | ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default" | |
18197 | if test "x$ac_cv_type__Bool" = x""yes; then : | |
1f5d53eb PE |
18198 | |
18199 | cat >>confdefs.h <<_ACEOF | |
3e0be4ab | 18200 | #define HAVE__BOOL 1 |
1f5d53eb | 18201 | _ACEOF |
1fd182f0 | 18202 | |
b06b1098 | 18203 | |
1fd182f0 PE |
18204 | fi |
18205 | ||
3e0be4ab GM |
18206 | |
18207 | ||
18208 | REPLACE_NULL=0; | |
18209 | HAVE_WCHAR_T=1; | |
18210 | ||
18211 | ||
18212 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5 | |
18213 | $as_echo_n "checking for wchar_t... " >&6; } | |
18214 | if test "${gt_cv_c_wchar_t+set}" = set; then : | |
18215 | $as_echo_n "(cached) " >&6 | |
18216 | else | |
18217 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1f5d53eb | 18218 | /* end confdefs.h. */ |
3e0be4ab GM |
18219 | #include <stddef.h> |
18220 | wchar_t foo = (wchar_t)'\0'; | |
1f5d53eb PE |
18221 | int |
18222 | main () | |
18223 | { | |
3e0be4ab | 18224 | |
1f5d53eb PE |
18225 | ; |
18226 | return 0; | |
18227 | } | |
1fd182f0 | 18228 | _ACEOF |
3e0be4ab GM |
18229 | if ac_fn_c_try_compile "$LINENO"; then : |
18230 | gt_cv_c_wchar_t=yes | |
18231 | else | |
18232 | gt_cv_c_wchar_t=no | |
18233 | fi | |
18234 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
18235 | fi | |
18236 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5 | |
18237 | $as_echo "$gt_cv_c_wchar_t" >&6; } | |
18238 | if test $gt_cv_c_wchar_t = yes; then | |
1f5d53eb | 18239 | |
3e0be4ab GM |
18240 | $as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h |
18241 | ||
18242 | fi | |
18243 | ||
18244 | ||
18245 | GNULIB_DPRINTF=0; | |
18246 | GNULIB_FCLOSE=0; | |
18247 | GNULIB_FFLUSH=0; | |
18248 | GNULIB_FGETC=0; | |
18249 | GNULIB_FGETS=0; | |
18250 | GNULIB_FOPEN=0; | |
18251 | GNULIB_FPRINTF=0; | |
18252 | GNULIB_FPRINTF_POSIX=0; | |
18253 | GNULIB_FPURGE=0; | |
18254 | GNULIB_FPUTC=0; | |
18255 | GNULIB_FPUTS=0; | |
18256 | GNULIB_FREAD=0; | |
18257 | GNULIB_FREOPEN=0; | |
18258 | GNULIB_FSCANF=0; | |
18259 | GNULIB_FSEEK=0; | |
18260 | GNULIB_FSEEKO=0; | |
18261 | GNULIB_FTELL=0; | |
18262 | GNULIB_FTELLO=0; | |
18263 | GNULIB_FWRITE=0; | |
18264 | GNULIB_GETC=0; | |
18265 | GNULIB_GETCHAR=0; | |
18266 | GNULIB_GETDELIM=0; | |
18267 | GNULIB_GETLINE=0; | |
18268 | GNULIB_GETS=0; | |
18269 | GNULIB_OBSTACK_PRINTF=0; | |
18270 | GNULIB_OBSTACK_PRINTF_POSIX=0; | |
18271 | GNULIB_PERROR=0; | |
18272 | GNULIB_POPEN=0; | |
18273 | GNULIB_PRINTF=0; | |
18274 | GNULIB_PRINTF_POSIX=0; | |
18275 | GNULIB_PUTC=0; | |
18276 | GNULIB_PUTCHAR=0; | |
18277 | GNULIB_PUTS=0; | |
18278 | GNULIB_REMOVE=0; | |
18279 | GNULIB_RENAME=0; | |
18280 | GNULIB_RENAMEAT=0; | |
18281 | GNULIB_SCANF=0; | |
18282 | GNULIB_SNPRINTF=0; | |
18283 | GNULIB_SPRINTF_POSIX=0; | |
18284 | GNULIB_STDIO_H_NONBLOCKING=0; | |
18285 | GNULIB_STDIO_H_SIGPIPE=0; | |
18286 | GNULIB_TMPFILE=0; | |
18287 | GNULIB_VASPRINTF=0; | |
18288 | GNULIB_VFSCANF=0; | |
18289 | GNULIB_VSCANF=0; | |
18290 | GNULIB_VDPRINTF=0; | |
18291 | GNULIB_VFPRINTF=0; | |
18292 | GNULIB_VFPRINTF_POSIX=0; | |
18293 | GNULIB_VPRINTF=0; | |
18294 | GNULIB_VPRINTF_POSIX=0; | |
18295 | GNULIB_VSNPRINTF=0; | |
18296 | GNULIB_VSPRINTF_POSIX=0; | |
18297 | HAVE_DECL_FPURGE=1; | |
18298 | HAVE_DECL_FSEEKO=1; | |
18299 | HAVE_DECL_FTELLO=1; | |
18300 | HAVE_DECL_GETDELIM=1; | |
18301 | HAVE_DECL_GETLINE=1; | |
18302 | HAVE_DECL_OBSTACK_PRINTF=1; | |
18303 | HAVE_DECL_SNPRINTF=1; | |
18304 | HAVE_DECL_VSNPRINTF=1; | |
18305 | HAVE_DPRINTF=1; | |
18306 | HAVE_FSEEKO=1; | |
18307 | HAVE_FTELLO=1; | |
18308 | HAVE_RENAMEAT=1; | |
18309 | HAVE_VASPRINTF=1; | |
18310 | HAVE_VDPRINTF=1; | |
18311 | REPLACE_DPRINTF=0; | |
18312 | REPLACE_FCLOSE=0; | |
18313 | REPLACE_FFLUSH=0; | |
18314 | REPLACE_FOPEN=0; | |
18315 | REPLACE_FPRINTF=0; | |
18316 | REPLACE_FPURGE=0; | |
18317 | REPLACE_FREOPEN=0; | |
18318 | REPLACE_FSEEK=0; | |
18319 | REPLACE_FSEEKO=0; | |
18320 | REPLACE_FTELL=0; | |
18321 | REPLACE_FTELLO=0; | |
18322 | REPLACE_GETDELIM=0; | |
18323 | REPLACE_GETLINE=0; | |
18324 | REPLACE_OBSTACK_PRINTF=0; | |
18325 | REPLACE_PERROR=0; | |
18326 | REPLACE_POPEN=0; | |
18327 | REPLACE_PRINTF=0; | |
18328 | REPLACE_REMOVE=0; | |
18329 | REPLACE_RENAME=0; | |
18330 | REPLACE_RENAMEAT=0; | |
18331 | REPLACE_SNPRINTF=0; | |
18332 | REPLACE_SPRINTF=0; | |
18333 | REPLACE_STDIO_READ_FUNCS=0; | |
18334 | REPLACE_STDIO_WRITE_FUNCS=0; | |
18335 | REPLACE_TMPFILE=0; | |
18336 | REPLACE_VASPRINTF=0; | |
18337 | REPLACE_VDPRINTF=0; | |
18338 | REPLACE_VFPRINTF=0; | |
18339 | REPLACE_VPRINTF=0; | |
18340 | REPLACE_VSNPRINTF=0; | |
18341 | REPLACE_VSPRINTF=0; | |
1f5d53eb | 18342 | |
1fd182f0 | 18343 | |
3e0be4ab GM |
18344 | ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include <time.h> |
18345 | " | |
18346 | if test "x$ac_cv_member_struct_tm_tm_gmtoff" = x""yes; then : | |
1fd182f0 | 18347 | |
3e0be4ab | 18348 | $as_echo "#define HAVE_TM_GMTOFF 1" >>confdefs.h |
1fd182f0 | 18349 | |
1f5d53eb | 18350 | fi |
1fd182f0 | 18351 | |
1f5d53eb | 18352 | |
1fd182f0 | 18353 | |
1fd182f0 | 18354 | |
3e0be4ab GM |
18355 | ac_fn_c_check_decl "$LINENO" "strtoimax" "ac_cv_have_decl_strtoimax" "$ac_includes_default" |
18356 | if test "x$ac_cv_have_decl_strtoimax" = x""yes; then : | |
18357 | ac_have_decl=1 | |
18358 | else | |
18359 | ac_have_decl=0 | |
18360 | fi | |
1f5d53eb | 18361 | |
3e0be4ab GM |
18362 | cat >>confdefs.h <<_ACEOF |
18363 | #define HAVE_DECL_STRTOIMAX $ac_have_decl | |
18364 | _ACEOF | |
cc322c06 | 18365 | |
3e0be4ab GM |
18366 | ac_fn_c_check_decl "$LINENO" "strtoumax" "ac_cv_have_decl_strtoumax" "$ac_includes_default" |
18367 | if test "x$ac_cv_have_decl_strtoumax" = x""yes; then : | |
18368 | ac_have_decl=1 | |
18369 | else | |
18370 | ac_have_decl=0 | |
18371 | fi | |
cc322c06 | 18372 | |
3e0be4ab GM |
18373 | cat >>confdefs.h <<_ACEOF |
18374 | #define HAVE_DECL_STRTOUMAX $ac_have_decl | |
18375 | _ACEOF | |
cc322c06 GM |
18376 | |
18377 | ||
1f5d53eb | 18378 | |
3e0be4ab GM |
18379 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5 |
18380 | $as_echo_n "checking whether stat file-mode macros are broken... " >&6; } | |
18381 | if test "${ac_cv_header_stat_broken+set}" = set; then : | |
18382 | $as_echo_n "(cached) " >&6 | |
18383 | else | |
18384 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
18385 | /* end confdefs.h. */ | |
18386 | #include <sys/types.h> | |
18387 | #include <sys/stat.h> | |
1f5d53eb | 18388 | |
3e0be4ab GM |
18389 | #if defined S_ISBLK && defined S_IFDIR |
18390 | extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1]; | |
18391 | #endif | |
1fd182f0 | 18392 | |
3e0be4ab GM |
18393 | #if defined S_ISBLK && defined S_IFCHR |
18394 | extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1]; | |
18395 | #endif | |
e275c824 | 18396 | |
3e0be4ab GM |
18397 | #if defined S_ISLNK && defined S_IFREG |
18398 | extern char c3[S_ISLNK (S_IFREG) ? -1 : 1]; | |
18399 | #endif | |
e275c824 | 18400 | |
3e0be4ab GM |
18401 | #if defined S_ISSOCK && defined S_IFREG |
18402 | extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1]; | |
18403 | #endif | |
e275c824 | 18404 | |
3e0be4ab GM |
18405 | _ACEOF |
18406 | if ac_fn_c_try_compile "$LINENO"; then : | |
18407 | ac_cv_header_stat_broken=no | |
18408 | else | |
18409 | ac_cv_header_stat_broken=yes | |
18410 | fi | |
18411 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
18412 | fi | |
18413 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5 | |
18414 | $as_echo "$ac_cv_header_stat_broken" >&6; } | |
18415 | if test $ac_cv_header_stat_broken = yes; then | |
e275c824 | 18416 | |
3e0be4ab | 18417 | $as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h |
e275c824 | 18418 | |
3e0be4ab | 18419 | fi |
e275c824 | 18420 | |
e275c824 PE |
18421 | |
18422 | ||
3e0be4ab GM |
18423 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5 |
18424 | $as_echo_n "checking for C/C++ restrict keyword... " >&6; } | |
18425 | if test "${ac_cv_c_restrict+set}" = set; then : | |
18426 | $as_echo_n "(cached) " >&6 | |
18427 | else | |
18428 | ac_cv_c_restrict=no | |
18429 | # The order here caters to the fact that C++ does not require restrict. | |
18430 | for ac_kw in __restrict __restrict__ _Restrict restrict; do | |
18431 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
18432 | /* end confdefs.h. */ | |
18433 | typedef int * int_ptr; | |
18434 | int foo (int_ptr $ac_kw ip) { | |
18435 | return ip[0]; | |
18436 | } | |
18437 | int | |
18438 | main () | |
18439 | { | |
18440 | int s[1]; | |
18441 | int * $ac_kw t = s; | |
18442 | t[0] = 0; | |
18443 | return foo(t) | |
18444 | ; | |
18445 | return 0; | |
18446 | } | |
18447 | _ACEOF | |
18448 | if ac_fn_c_try_compile "$LINENO"; then : | |
18449 | ac_cv_c_restrict=$ac_kw | |
18450 | fi | |
18451 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
18452 | test "$ac_cv_c_restrict" != no && break | |
18453 | done | |
e275c824 | 18454 | |
3e0be4ab GM |
18455 | fi |
18456 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5 | |
18457 | $as_echo "$ac_cv_c_restrict" >&6; } | |
e275c824 | 18458 | |
3e0be4ab GM |
18459 | case $ac_cv_c_restrict in |
18460 | restrict) ;; | |
18461 | no) $as_echo "#define restrict /**/" >>confdefs.h | |
18462 | ;; | |
18463 | *) cat >>confdefs.h <<_ACEOF | |
18464 | #define restrict $ac_cv_c_restrict | |
18465 | _ACEOF | |
18466 | ;; | |
18467 | esac | |
e275c824 | 18468 | |
52724a05 | 18469 | |
52724a05 GM |
18470 | |
18471 | ||
18472 | ||
3e0be4ab GM |
18473 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5 |
18474 | $as_echo_n "checking for struct timespec in <time.h>... " >&6; } | |
18475 | if test "${gl_cv_sys_struct_timespec_in_time_h+set}" = set; then : | |
18476 | $as_echo_n "(cached) " >&6 | |
18477 | else | |
18478 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
18479 | /* end confdefs.h. */ | |
18480 | #include <time.h> | |
52724a05 | 18481 | |
3e0be4ab GM |
18482 | int |
18483 | main () | |
18484 | { | |
18485 | static struct timespec x; x.tv_sec = x.tv_nsec; | |
18486 | ; | |
18487 | return 0; | |
18488 | } | |
18489 | _ACEOF | |
18490 | if ac_fn_c_try_compile "$LINENO"; then : | |
18491 | gl_cv_sys_struct_timespec_in_time_h=yes | |
18492 | else | |
18493 | gl_cv_sys_struct_timespec_in_time_h=no | |
52724a05 | 18494 | fi |
3e0be4ab GM |
18495 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
18496 | fi | |
18497 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5 | |
18498 | $as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; } | |
52724a05 | 18499 | |
3e0be4ab GM |
18500 | TIME_H_DEFINES_STRUCT_TIMESPEC=0 |
18501 | SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0 | |
18502 | PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0 | |
18503 | if test $gl_cv_sys_struct_timespec_in_time_h = yes; then | |
18504 | TIME_H_DEFINES_STRUCT_TIMESPEC=1 | |
18505 | else | |
18506 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5 | |
18507 | $as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; } | |
18508 | if test "${gl_cv_sys_struct_timespec_in_sys_time_h+set}" = set; then : | |
18509 | $as_echo_n "(cached) " >&6 | |
18510 | else | |
18511 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
18512 | /* end confdefs.h. */ | |
18513 | #include <sys/time.h> | |
52724a05 | 18514 | |
3e0be4ab GM |
18515 | int |
18516 | main () | |
18517 | { | |
18518 | static struct timespec x; x.tv_sec = x.tv_nsec; | |
18519 | ; | |
18520 | return 0; | |
18521 | } | |
18522 | _ACEOF | |
18523 | if ac_fn_c_try_compile "$LINENO"; then : | |
18524 | gl_cv_sys_struct_timespec_in_sys_time_h=yes | |
18525 | else | |
18526 | gl_cv_sys_struct_timespec_in_sys_time_h=no | |
18527 | fi | |
18528 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
18529 | fi | |
18530 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5 | |
18531 | $as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; } | |
18532 | if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then | |
18533 | SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1 | |
18534 | else | |
18535 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5 | |
18536 | $as_echo_n "checking for struct timespec in <pthread.h>... " >&6; } | |
18537 | if test "${gl_cv_sys_struct_timespec_in_pthread_h+set}" = set; then : | |
18538 | $as_echo_n "(cached) " >&6 | |
18539 | else | |
18540 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
18541 | /* end confdefs.h. */ | |
18542 | #include <pthread.h> | |
52724a05 | 18543 | |
3e0be4ab GM |
18544 | int |
18545 | main () | |
18546 | { | |
18547 | static struct timespec x; x.tv_sec = x.tv_nsec; | |
18548 | ; | |
18549 | return 0; | |
18550 | } | |
18551 | _ACEOF | |
18552 | if ac_fn_c_try_compile "$LINENO"; then : | |
18553 | gl_cv_sys_struct_timespec_in_pthread_h=yes | |
18554 | else | |
18555 | gl_cv_sys_struct_timespec_in_pthread_h=no | |
18556 | fi | |
18557 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
18558 | fi | |
18559 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5 | |
18560 | $as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; } | |
18561 | if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then | |
18562 | PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1 | |
18563 | fi | |
18564 | fi | |
18565 | fi | |
52724a05 GM |
18566 | |
18567 | ||
52724a05 | 18568 | |
e275c824 PE |
18569 | |
18570 | ||
e275c824 | 18571 | |
e275c824 PE |
18572 | |
18573 | ||
18574 | ||
52724a05 | 18575 | |
e275c824 PE |
18576 | |
18577 | ||
18578 | ||
18579 | ||
18580 | ||
3e0be4ab GM |
18581 | if test $gl_cv_have_include_next = yes; then |
18582 | gl_cv_next_time_h='<'time.h'>' | |
18583 | else | |
18584 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5 | |
18585 | $as_echo_n "checking absolute name of <time.h>... " >&6; } | |
18586 | if test "${gl_cv_next_time_h+set}" = set; then : | |
18587 | $as_echo_n "(cached) " >&6 | |
18588 | else | |
e275c824 | 18589 | |
3e0be4ab GM |
18590 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
18591 | /* end confdefs.h. */ | |
18592 | #include <time.h> | |
e275c824 | 18593 | |
3e0be4ab GM |
18594 | _ACEOF |
18595 | case "$host_os" in | |
18596 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
18597 | *) gl_absname_cpp="$ac_cpp" ;; | |
18598 | esac | |
18599 | gl_cv_next_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
18600 | sed -n '\#/time.h#{ | |
18601 | s#.*"\(.*/time.h\)".*#\1# | |
18602 | s#^/[^/]#//&# | |
18603 | p | |
18604 | q | |
18605 | }'`'"' | |
e275c824 | 18606 | |
e275c824 | 18607 | |
3e0be4ab GM |
18608 | fi |
18609 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5 | |
18610 | $as_echo "$gl_cv_next_time_h" >&6; } | |
18611 | fi | |
18612 | NEXT_TIME_H=$gl_cv_next_time_h | |
e275c824 | 18613 | |
3e0be4ab GM |
18614 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then |
18615 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
18616 | gl_next_as_first_directive='<'time.h'>' | |
18617 | else | |
18618 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
18619 | gl_next_as_first_directive=$gl_cv_next_time_h | |
18620 | fi | |
18621 | NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive | |
e275c824 PE |
18622 | |
18623 | ||
18624 | ||
18625 | ||
18626 | ||
18627 | ||
3e0be4ab GM |
18628 | ac_fn_c_check_decl "$LINENO" "localtime_r" "ac_cv_have_decl_localtime_r" "$ac_includes_default" |
18629 | if test "x$ac_cv_have_decl_localtime_r" = x""yes; then : | |
18630 | ac_have_decl=1 | |
18631 | else | |
18632 | ac_have_decl=0 | |
18633 | fi | |
e275c824 | 18634 | |
3e0be4ab GM |
18635 | cat >>confdefs.h <<_ACEOF |
18636 | #define HAVE_DECL_LOCALTIME_R $ac_have_decl | |
18637 | _ACEOF | |
e275c824 PE |
18638 | |
18639 | ||
18640 | ||
18641 | ||
3e0be4ab GM |
18642 | if false; then |
18643 | GL_COND_LIBTOOL_TRUE= | |
18644 | GL_COND_LIBTOOL_FALSE='#' | |
18645 | else | |
18646 | GL_COND_LIBTOOL_TRUE='#' | |
18647 | GL_COND_LIBTOOL_FALSE= | |
e275c824 PE |
18648 | fi |
18649 | ||
3e0be4ab GM |
18650 | gl_cond_libtool=false |
18651 | gl_libdeps= | |
18652 | gl_ltlibdeps= | |
18653 | gl_m4_base='m4' | |
e275c824 | 18654 | |
67342916 | 18655 | |
4fda9c95 GM |
18656 | |
18657 | ||
52724a05 GM |
18658 | |
18659 | ||
18660 | ||
18661 | ||
18662 | ||
3e0be4ab | 18663 | gl_source_base='lib' |
52724a05 GM |
18664 | |
18665 | ||
3e0be4ab GM |
18666 | if test $ac_cv_func_alloca_works = no; then |
18667 | : | |
18668 | fi | |
52724a05 | 18669 | |
3e0be4ab GM |
18670 | # Define an additional variable used in the Makefile substitution. |
18671 | if test $ac_cv_working_alloca_h = yes; then | |
18672 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5 | |
18673 | $as_echo_n "checking for alloca as a compiler built-in... " >&6; } | |
18674 | if test "${gl_cv_rpl_alloca+set}" = set; then : | |
18675 | $as_echo_n "(cached) " >&6 | |
18676 | else | |
52724a05 | 18677 | |
3e0be4ab GM |
18678 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
18679 | /* end confdefs.h. */ | |
52724a05 | 18680 | |
3e0be4ab GM |
18681 | #if defined __GNUC__ || defined _AIX || defined _MSC_VER |
18682 | Need own alloca | |
18683 | #endif | |
52724a05 | 18684 | |
3e0be4ab GM |
18685 | _ACEOF |
18686 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
18687 | $EGREP "Need own alloca" >/dev/null 2>&1; then : | |
18688 | gl_cv_rpl_alloca=yes | |
18689 | else | |
18690 | gl_cv_rpl_alloca=no | |
52724a05 | 18691 | fi |
3e0be4ab | 18692 | rm -f conftest* |
ae0d7250 PE |
18693 | |
18694 | ||
3e0be4ab GM |
18695 | fi |
18696 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5 | |
18697 | $as_echo "$gl_cv_rpl_alloca" >&6; } | |
18698 | if test $gl_cv_rpl_alloca = yes; then | |
ae0d7250 | 18699 | |
3e0be4ab | 18700 | $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h |
cc322c06 | 18701 | |
3e0be4ab GM |
18702 | ALLOCA_H=alloca.h |
18703 | else | |
18704 | ALLOCA_H= | |
18705 | fi | |
18706 | else | |
18707 | ALLOCA_H=alloca.h | |
18708 | fi | |
cc322c06 | 18709 | |
3e0be4ab GM |
18710 | if test -n "$ALLOCA_H"; then |
18711 | GL_GENERATE_ALLOCA_H_TRUE= | |
18712 | GL_GENERATE_ALLOCA_H_FALSE='#' | |
18713 | else | |
18714 | GL_GENERATE_ALLOCA_H_TRUE='#' | |
18715 | GL_GENERATE_ALLOCA_H_FALSE= | |
18716 | fi | |
1fd182f0 PE |
18717 | |
18718 | ||
18719 | ||
18720 | ||
18721 | ||
52724a05 | 18722 | |
3e0be4ab | 18723 | : |
1fd182f0 | 18724 | |
1fd182f0 | 18725 | |
1fd182f0 | 18726 | |
1fd182f0 | 18727 | |
3e0be4ab | 18728 | : |
1fd182f0 | 18729 | |
1fd182f0 | 18730 | |
1fd182f0 | 18731 | |
1fd182f0 | 18732 | |
1fd182f0 | 18733 | |
1fd182f0 | 18734 | |
1fd182f0 | 18735 | |
1fd182f0 | 18736 | |
1fd182f0 | 18737 | |
1fd182f0 | 18738 | |
1fd182f0 | 18739 | |
1fd182f0 | 18740 | |
1fd182f0 | 18741 | |
1fd182f0 | 18742 | |
1fd182f0 | 18743 | |
3e0be4ab | 18744 | $as_echo "#define HAVE_DUP2 1" >>confdefs.h |
1fd182f0 | 18745 | |
1fd182f0 | 18746 | |
3e0be4ab GM |
18747 | if test $HAVE_DUP2 = 1; then |
18748 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5 | |
18749 | $as_echo_n "checking whether dup2 works... " >&6; } | |
18750 | if test "${gl_cv_func_dup2_works+set}" = set; then : | |
18751 | $as_echo_n "(cached) " >&6 | |
18752 | else | |
18753 | if test "$cross_compiling" = yes; then : | |
18754 | case "$host_os" in | |
18755 | mingw*) # on this platform, dup2 always returns 0 for success | |
18756 | gl_cv_func_dup2_works=no;; | |
18757 | cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0 | |
18758 | gl_cv_func_dup2_works=no;; | |
18759 | linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a | |
18760 | # closed fd may yield -EBADF instead of -1 / errno=EBADF. | |
18761 | gl_cv_func_dup2_works=no;; | |
18762 | freebsd*) # on FreeBSD 6.1, dup2(1,1000000) gives EMFILE, not EBADF. | |
18763 | gl_cv_func_dup2_works=no;; | |
18764 | haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC. | |
18765 | gl_cv_func_dup2_works=no;; | |
18766 | *) gl_cv_func_dup2_works=yes;; | |
18767 | esac | |
18768 | else | |
18769 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
18770 | /* end confdefs.h. */ | |
1fd182f0 | 18771 | |
3e0be4ab GM |
18772 | #include <unistd.h> |
18773 | #include <fcntl.h> | |
18774 | #include <errno.h> | |
18775 | int | |
18776 | main () | |
18777 | { | |
18778 | int result = 0; | |
18779 | #ifdef FD_CLOEXEC | |
18780 | if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1) | |
18781 | result |= 1; | |
18782 | #endif | |
18783 | if (dup2 (1, 1) == 0) | |
18784 | result |= 2; | |
18785 | #ifdef FD_CLOEXEC | |
18786 | if (fcntl (1, F_GETFD) != FD_CLOEXEC) | |
18787 | result |= 4; | |
18788 | #endif | |
18789 | close (0); | |
18790 | if (dup2 (0, 0) != -1) | |
18791 | result |= 8; | |
18792 | /* Many gnulib modules require POSIX conformance of EBADF. */ | |
18793 | if (dup2 (2, 1000000) == -1 && errno != EBADF) | |
18794 | result |= 16; | |
18795 | return result; | |
1fd182f0 | 18796 | |
3e0be4ab GM |
18797 | ; |
18798 | return 0; | |
1fd182f0 | 18799 | } |
3e0be4ab | 18800 | |
1fd182f0 PE |
18801 | _ACEOF |
18802 | if ac_fn_c_try_run "$LINENO"; then : | |
3e0be4ab | 18803 | gl_cv_func_dup2_works=yes |
1fd182f0 | 18804 | else |
3e0be4ab | 18805 | gl_cv_func_dup2_works=no |
1fd182f0 PE |
18806 | fi |
18807 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
18808 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
067d23c9 | 18809 | fi |
067d23c9 | 18810 | |
067d23c9 | 18811 | |
1fd182f0 | 18812 | fi |
3e0be4ab GM |
18813 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5 |
18814 | $as_echo "$gl_cv_func_dup2_works" >&6; } | |
18815 | if test "$gl_cv_func_dup2_works" = no; then | |
067d23c9 | 18816 | |
3e0be4ab GM |
18817 | |
18818 | ||
18819 | if test $ac_cv_func_dup2 = yes; then | |
18820 | REPLACE_DUP2=1 | |
1fd182f0 | 18821 | fi |
067d23c9 KY |
18822 | |
18823 | ||
18824 | ||
067d23c9 | 18825 | |
cc322c06 GM |
18826 | |
18827 | ||
cc322c06 GM |
18828 | |
18829 | ||
3e0be4ab | 18830 | gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext" |
067d23c9 KY |
18831 | |
18832 | ||
3e0be4ab GM |
18833 | fi |
18834 | fi | |
067d23c9 | 18835 | |
067d23c9 | 18836 | |
ae0d7250 | 18837 | |
52724a05 | 18838 | |
ae0d7250 PE |
18839 | |
18840 | ||
3e0be4ab | 18841 | GNULIB_DUP2=1 |
ae0d7250 PE |
18842 | |
18843 | ||
18844 | ||
18845 | ||
18846 | ||
18847 | ||
18848 | ||
18849 | ||
ae0d7250 PE |
18850 | |
18851 | ||
ae0d7250 | 18852 | |
3e0be4ab GM |
18853 | # Persuade glibc <stdlib.h> to declare getloadavg(). |
18854 | ||
18855 | ||
18856 | gl_save_LIBS=$LIBS | |
18857 | ||
18858 | # getloadvg is present in libc on glibc >= 2.2, MacOS X, FreeBSD >= 2.0, | |
18859 | # NetBSD >= 0.9, OpenBSD >= 2.0, Solaris >= 7. | |
18860 | HAVE_GETLOADAVG=1 | |
18861 | ac_fn_c_check_func "$LINENO" "getloadavg" "ac_cv_func_getloadavg" | |
18862 | if test "x$ac_cv_func_getloadavg" = x""yes; then : | |
18863 | ||
18864 | else | |
18865 | gl_func_getloadavg_done=no | |
18866 | ||
18867 | # Some systems with -lutil have (and need) -lkvm as well, some do not. | |
18868 | # On Solaris, -lkvm requires nlist from -lelf, so check that first | |
18869 | # to get the right answer into the cache. | |
18870 | # For kstat on solaris, we need to test for libelf and libkvm to force the | |
18871 | # definition of SVR4 below. | |
18872 | if test $gl_func_getloadavg_done = no; then | |
18873 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_begin in -lelf" >&5 | |
18874 | $as_echo_n "checking for elf_begin in -lelf... " >&6; } | |
18875 | if test "${ac_cv_lib_elf_elf_begin+set}" = set; then : | |
ae0d7250 PE |
18876 | $as_echo_n "(cached) " >&6 |
18877 | else | |
3e0be4ab GM |
18878 | ac_check_lib_save_LIBS=$LIBS |
18879 | LIBS="-lelf $LIBS" | |
18880 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
ae0d7250 | 18881 | /* end confdefs.h. */ |
3e0be4ab GM |
18882 | |
18883 | /* Override any GCC internal prototype to avoid an error. | |
18884 | Use char because int might match the return type of a GCC | |
18885 | builtin and then its argument prototype would still apply. */ | |
18886 | #ifdef __cplusplus | |
18887 | extern "C" | |
18888 | #endif | |
18889 | char elf_begin (); | |
ae0d7250 PE |
18890 | int |
18891 | main () | |
18892 | { | |
3e0be4ab GM |
18893 | return elf_begin (); |
18894 | ; | |
18895 | return 0; | |
18896 | } | |
18897 | _ACEOF | |
18898 | if ac_fn_c_try_link "$LINENO"; then : | |
18899 | ac_cv_lib_elf_elf_begin=yes | |
18900 | else | |
18901 | ac_cv_lib_elf_elf_begin=no | |
18902 | fi | |
18903 | rm -f core conftest.err conftest.$ac_objext \ | |
18904 | conftest$ac_exeext conftest.$ac_ext | |
18905 | LIBS=$ac_check_lib_save_LIBS | |
18906 | fi | |
18907 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_elf_elf_begin" >&5 | |
18908 | $as_echo "$ac_cv_lib_elf_elf_begin" >&6; } | |
18909 | if test "x$ac_cv_lib_elf_elf_begin" = x""yes; then : | |
18910 | LIBS="-lelf $LIBS" | |
18911 | fi | |
18912 | ||
18913 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kvm_open in -lkvm" >&5 | |
18914 | $as_echo_n "checking for kvm_open in -lkvm... " >&6; } | |
18915 | if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then : | |
18916 | $as_echo_n "(cached) " >&6 | |
18917 | else | |
18918 | ac_check_lib_save_LIBS=$LIBS | |
18919 | LIBS="-lkvm $LIBS" | |
18920 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
18921 | /* end confdefs.h. */ | |
ae0d7250 | 18922 | |
3e0be4ab GM |
18923 | /* Override any GCC internal prototype to avoid an error. |
18924 | Use char because int might match the return type of a GCC | |
18925 | builtin and then its argument prototype would still apply. */ | |
18926 | #ifdef __cplusplus | |
18927 | extern "C" | |
18928 | #endif | |
18929 | char kvm_open (); | |
18930 | int | |
18931 | main () | |
18932 | { | |
18933 | return kvm_open (); | |
ae0d7250 PE |
18934 | ; |
18935 | return 0; | |
18936 | } | |
18937 | _ACEOF | |
3e0be4ab GM |
18938 | if ac_fn_c_try_link "$LINENO"; then : |
18939 | ac_cv_lib_kvm_kvm_open=yes | |
ae0d7250 | 18940 | else |
3e0be4ab | 18941 | ac_cv_lib_kvm_kvm_open=no |
ae0d7250 | 18942 | fi |
3e0be4ab GM |
18943 | rm -f core conftest.err conftest.$ac_objext \ |
18944 | conftest$ac_exeext conftest.$ac_ext | |
18945 | LIBS=$ac_check_lib_save_LIBS | |
ae0d7250 | 18946 | fi |
3e0be4ab GM |
18947 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kvm_kvm_open" >&5 |
18948 | $as_echo "$ac_cv_lib_kvm_kvm_open" >&6; } | |
18949 | if test "x$ac_cv_lib_kvm_kvm_open" = x""yes; then : | |
18950 | LIBS="-lkvm $LIBS" | |
18951 | fi | |
18952 | ||
18953 | # Check for the 4.4BSD definition of getloadavg. | |
18954 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lutil" >&5 | |
18955 | $as_echo_n "checking for getloadavg in -lutil... " >&6; } | |
18956 | if test "${ac_cv_lib_util_getloadavg+set}" = set; then : | |
ae0d7250 PE |
18957 | $as_echo_n "(cached) " >&6 |
18958 | else | |
3e0be4ab GM |
18959 | ac_check_lib_save_LIBS=$LIBS |
18960 | LIBS="-lutil $LIBS" | |
18961 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
18962 | /* end confdefs.h. */ | |
18963 | ||
18964 | /* Override any GCC internal prototype to avoid an error. | |
18965 | Use char because int might match the return type of a GCC | |
18966 | builtin and then its argument prototype would still apply. */ | |
18967 | #ifdef __cplusplus | |
18968 | extern "C" | |
18969 | #endif | |
18970 | char getloadavg (); | |
18971 | int | |
18972 | main () | |
18973 | { | |
18974 | return getloadavg (); | |
18975 | ; | |
18976 | return 0; | |
18977 | } | |
18978 | _ACEOF | |
18979 | if ac_fn_c_try_link "$LINENO"; then : | |
18980 | ac_cv_lib_util_getloadavg=yes | |
ae0d7250 | 18981 | else |
3e0be4ab GM |
18982 | ac_cv_lib_util_getloadavg=no |
18983 | fi | |
18984 | rm -f core conftest.err conftest.$ac_objext \ | |
18985 | conftest$ac_exeext conftest.$ac_ext | |
18986 | LIBS=$ac_check_lib_save_LIBS | |
18987 | fi | |
18988 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_getloadavg" >&5 | |
18989 | $as_echo "$ac_cv_lib_util_getloadavg" >&6; } | |
18990 | if test "x$ac_cv_lib_util_getloadavg" = x""yes; then : | |
18991 | LIBS="-lutil $LIBS" gl_func_getloadavg_done=yes | |
18992 | fi | |
18993 | ||
18994 | fi | |
18995 | ||
18996 | if test $gl_func_getloadavg_done = no; then | |
18997 | # There is a commonly available library for RS/6000 AIX. | |
18998 | # Since it is not a standard part of AIX, it might be installed locally. | |
18999 | gl_getloadavg_LIBS=$LIBS | |
19000 | LIBS="-L/usr/local/lib $LIBS" | |
19001 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lgetloadavg" >&5 | |
19002 | $as_echo_n "checking for getloadavg in -lgetloadavg... " >&6; } | |
19003 | if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then : | |
19004 | $as_echo_n "(cached) " >&6 | |
19005 | else | |
19006 | ac_check_lib_save_LIBS=$LIBS | |
19007 | LIBS="-lgetloadavg $LIBS" | |
19008 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
ae0d7250 | 19009 | /* end confdefs.h. */ |
ae0d7250 | 19010 | |
3e0be4ab GM |
19011 | /* Override any GCC internal prototype to avoid an error. |
19012 | Use char because int might match the return type of a GCC | |
19013 | builtin and then its argument prototype would still apply. */ | |
19014 | #ifdef __cplusplus | |
19015 | extern "C" | |
19016 | #endif | |
19017 | char getloadavg (); | |
ae0d7250 PE |
19018 | int |
19019 | main () | |
19020 | { | |
3e0be4ab | 19021 | return getloadavg (); |
ae0d7250 PE |
19022 | ; |
19023 | return 0; | |
19024 | } | |
19025 | _ACEOF | |
3e0be4ab GM |
19026 | if ac_fn_c_try_link "$LINENO"; then : |
19027 | ac_cv_lib_getloadavg_getloadavg=yes | |
ae0d7250 | 19028 | else |
3e0be4ab | 19029 | ac_cv_lib_getloadavg_getloadavg=no |
ae0d7250 | 19030 | fi |
3e0be4ab GM |
19031 | rm -f core conftest.err conftest.$ac_objext \ |
19032 | conftest$ac_exeext conftest.$ac_ext | |
19033 | LIBS=$ac_check_lib_save_LIBS | |
ae0d7250 | 19034 | fi |
3e0be4ab GM |
19035 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_getloadavg_getloadavg" >&5 |
19036 | $as_echo "$ac_cv_lib_getloadavg_getloadavg" >&6; } | |
19037 | if test "x$ac_cv_lib_getloadavg_getloadavg" = x""yes; then : | |
19038 | LIBS="-lgetloadavg $LIBS" gl_func_getloadavg_done=yes | |
19039 | else | |
19040 | LIBS=$gl_getloadavg_LIBS | |
52724a05 | 19041 | fi |
ae0d7250 | 19042 | |
3e0be4ab | 19043 | fi |
ae0d7250 | 19044 | |
3e0be4ab GM |
19045 | # Set up the replacement function if necessary. |
19046 | if test $gl_func_getloadavg_done = no; then | |
19047 | HAVE_GETLOADAVG=0 | |
ae0d7250 | 19048 | |
3e0be4ab GM |
19049 | # Solaris has libkstat which does not require root. |
19050 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kstat_open in -lkstat" >&5 | |
19051 | $as_echo_n "checking for kstat_open in -lkstat... " >&6; } | |
19052 | if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then : | |
6ad6792b GM |
19053 | $as_echo_n "(cached) " >&6 |
19054 | else | |
3e0be4ab GM |
19055 | ac_check_lib_save_LIBS=$LIBS |
19056 | LIBS="-lkstat $LIBS" | |
19057 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6ad6792b | 19058 | /* end confdefs.h. */ |
6ad6792b | 19059 | |
3e0be4ab GM |
19060 | /* Override any GCC internal prototype to avoid an error. |
19061 | Use char because int might match the return type of a GCC | |
19062 | builtin and then its argument prototype would still apply. */ | |
19063 | #ifdef __cplusplus | |
19064 | extern "C" | |
19065 | #endif | |
19066 | char kstat_open (); | |
6ad6792b GM |
19067 | int |
19068 | main () | |
19069 | { | |
3e0be4ab | 19070 | return kstat_open (); |
6ad6792b GM |
19071 | ; |
19072 | return 0; | |
19073 | } | |
19074 | _ACEOF | |
3e0be4ab GM |
19075 | if ac_fn_c_try_link "$LINENO"; then : |
19076 | ac_cv_lib_kstat_kstat_open=yes | |
19077 | else | |
19078 | ac_cv_lib_kstat_kstat_open=no | |
6ad6792b | 19079 | fi |
3e0be4ab GM |
19080 | rm -f core conftest.err conftest.$ac_objext \ |
19081 | conftest$ac_exeext conftest.$ac_ext | |
19082 | LIBS=$ac_check_lib_save_LIBS | |
6ad6792b | 19083 | fi |
3e0be4ab GM |
19084 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kstat_kstat_open" >&5 |
19085 | $as_echo "$ac_cv_lib_kstat_kstat_open" >&6; } | |
19086 | if test "x$ac_cv_lib_kstat_kstat_open" = x""yes; then : | |
19087 | cat >>confdefs.h <<_ACEOF | |
19088 | #define HAVE_LIBKSTAT 1 | |
6ad6792b GM |
19089 | _ACEOF |
19090 | ||
3e0be4ab GM |
19091 | LIBS="-lkstat $LIBS" |
19092 | ||
6ad6792b GM |
19093 | fi |
19094 | ||
3e0be4ab | 19095 | test $ac_cv_lib_kstat_kstat_open = yes && gl_func_getloadavg_done=yes |
6c051bab | 19096 | |
3e0be4ab GM |
19097 | # AIX has libperfstat which does not require root |
19098 | if test $gl_func_getloadavg_done = no; then | |
19099 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for perfstat_cpu_total in -lperfstat" >&5 | |
19100 | $as_echo_n "checking for perfstat_cpu_total in -lperfstat... " >&6; } | |
19101 | if test "${ac_cv_lib_perfstat_perfstat_cpu_total+set}" = set; then : | |
6c051bab GM |
19102 | $as_echo_n "(cached) " >&6 |
19103 | else | |
3e0be4ab GM |
19104 | ac_check_lib_save_LIBS=$LIBS |
19105 | LIBS="-lperfstat $LIBS" | |
19106 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6c051bab | 19107 | /* end confdefs.h. */ |
3e0be4ab GM |
19108 | |
19109 | /* Override any GCC internal prototype to avoid an error. | |
19110 | Use char because int might match the return type of a GCC | |
19111 | builtin and then its argument prototype would still apply. */ | |
19112 | #ifdef __cplusplus | |
19113 | extern "C" | |
19114 | #endif | |
19115 | char perfstat_cpu_total (); | |
6c051bab GM |
19116 | int |
19117 | main () | |
19118 | { | |
3e0be4ab | 19119 | return perfstat_cpu_total (); |
6c051bab GM |
19120 | ; |
19121 | return 0; | |
19122 | } | |
19123 | _ACEOF | |
3e0be4ab GM |
19124 | if ac_fn_c_try_link "$LINENO"; then : |
19125 | ac_cv_lib_perfstat_perfstat_cpu_total=yes | |
6c051bab | 19126 | else |
3e0be4ab | 19127 | ac_cv_lib_perfstat_perfstat_cpu_total=no |
6c051bab | 19128 | fi |
3e0be4ab GM |
19129 | rm -f core conftest.err conftest.$ac_objext \ |
19130 | conftest$ac_exeext conftest.$ac_ext | |
19131 | LIBS=$ac_check_lib_save_LIBS | |
6c051bab | 19132 | fi |
3e0be4ab GM |
19133 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_perfstat_perfstat_cpu_total" >&5 |
19134 | $as_echo "$ac_cv_lib_perfstat_perfstat_cpu_total" >&6; } | |
19135 | if test "x$ac_cv_lib_perfstat_perfstat_cpu_total" = x""yes; then : | |
19136 | cat >>confdefs.h <<_ACEOF | |
19137 | #define HAVE_LIBPERFSTAT 1 | |
19138 | _ACEOF | |
6c051bab | 19139 | |
3e0be4ab | 19140 | LIBS="-lperfstat $LIBS" |
6c051bab | 19141 | |
3e0be4ab | 19142 | fi |
6c051bab | 19143 | |
3e0be4ab GM |
19144 | test $ac_cv_lib_perfstat_perfstat_cpu_total = yes && gl_func_getloadavg_done=yes |
19145 | fi | |
ae0d7250 | 19146 | |
3e0be4ab GM |
19147 | if test $gl_func_getloadavg_done = no; then |
19148 | ac_fn_c_check_header_mongrel "$LINENO" "sys/dg_sys_info.h" "ac_cv_header_sys_dg_sys_info_h" "$ac_includes_default" | |
19149 | if test "x$ac_cv_header_sys_dg_sys_info_h" = x""yes; then : | |
19150 | gl_func_getloadavg_done=yes | |
19151 | ||
19152 | $as_echo "#define DGUX 1" >>confdefs.h | |
19153 | ||
19154 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dg_sys_info in -ldgc" >&5 | |
19155 | $as_echo_n "checking for dg_sys_info in -ldgc... " >&6; } | |
19156 | if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then : | |
ae0d7250 PE |
19157 | $as_echo_n "(cached) " >&6 |
19158 | else | |
3e0be4ab GM |
19159 | ac_check_lib_save_LIBS=$LIBS |
19160 | LIBS="-ldgc $LIBS" | |
19161 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6d153f56 | 19162 | /* end confdefs.h. */ |
3e0be4ab GM |
19163 | |
19164 | /* Override any GCC internal prototype to avoid an error. | |
19165 | Use char because int might match the return type of a GCC | |
19166 | builtin and then its argument prototype would still apply. */ | |
19167 | #ifdef __cplusplus | |
19168 | extern "C" | |
19169 | #endif | |
19170 | char dg_sys_info (); | |
ae0d7250 PE |
19171 | int |
19172 | main () | |
19173 | { | |
3e0be4ab | 19174 | return dg_sys_info (); |
ae0d7250 PE |
19175 | ; |
19176 | return 0; | |
19177 | } | |
19178 | _ACEOF | |
3e0be4ab GM |
19179 | if ac_fn_c_try_link "$LINENO"; then : |
19180 | ac_cv_lib_dgc_dg_sys_info=yes | |
ae0d7250 | 19181 | else |
3e0be4ab | 19182 | ac_cv_lib_dgc_dg_sys_info=no |
ae0d7250 | 19183 | fi |
3e0be4ab GM |
19184 | rm -f core conftest.err conftest.$ac_objext \ |
19185 | conftest$ac_exeext conftest.$ac_ext | |
19186 | LIBS=$ac_check_lib_save_LIBS | |
ae0d7250 | 19187 | fi |
3e0be4ab GM |
19188 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dgc_dg_sys_info" >&5 |
19189 | $as_echo "$ac_cv_lib_dgc_dg_sys_info" >&6; } | |
19190 | if test "x$ac_cv_lib_dgc_dg_sys_info" = x""yes; then : | |
19191 | cat >>confdefs.h <<_ACEOF | |
19192 | #define HAVE_LIBDGC 1 | |
19193 | _ACEOF | |
ae0d7250 | 19194 | |
3e0be4ab GM |
19195 | LIBS="-ldgc $LIBS" |
19196 | ||
19197 | fi | |
6d153f56 | 19198 | |
ae0d7250 | 19199 | fi |
6d153f56 | 19200 | |
6d153f56 | 19201 | |
3e0be4ab GM |
19202 | fi |
19203 | fi | |
19204 | fi | |
6d153f56 GM |
19205 | |
19206 | ||
3e0be4ab GM |
19207 | if test "x$gl_save_LIBS" = x; then |
19208 | GETLOADAVG_LIBS=$LIBS | |
19209 | else | |
19210 | GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$gl_save_LIBS!!"` | |
19211 | fi | |
19212 | LIBS=$gl_save_LIBS | |
6d153f56 GM |
19213 | |
19214 | ||
3e0be4ab GM |
19215 | # Test whether the system declares getloadavg. Solaris has the function |
19216 | # but declares it in <sys/loadavg.h>, not <stdlib.h>. | |
19217 | for ac_header in sys/loadavg.h | |
19218 | do : | |
19219 | ac_fn_c_check_header_mongrel "$LINENO" "sys/loadavg.h" "ac_cv_header_sys_loadavg_h" "$ac_includes_default" | |
19220 | if test "x$ac_cv_header_sys_loadavg_h" = x""yes; then : | |
19221 | cat >>confdefs.h <<_ACEOF | |
19222 | #define HAVE_SYS_LOADAVG_H 1 | |
19223 | _ACEOF | |
6d153f56 | 19224 | |
3e0be4ab | 19225 | fi |
6d153f56 | 19226 | |
3e0be4ab | 19227 | done |
6d153f56 | 19228 | |
3e0be4ab GM |
19229 | if test $ac_cv_header_sys_loadavg_h = yes; then |
19230 | HAVE_SYS_LOADAVG_H=1 | |
ae0d7250 | 19231 | else |
3e0be4ab GM |
19232 | HAVE_SYS_LOADAVG_H=0 |
19233 | fi | |
19234 | ac_fn_c_check_decl "$LINENO" "getloadavg" "ac_cv_have_decl_getloadavg" "#if HAVE_SYS_LOADAVG_H | |
19235 | # include <sys/loadavg.h> | |
19236 | #endif | |
19237 | #include <stdlib.h> | |
19238 | " | |
19239 | if test "x$ac_cv_have_decl_getloadavg" = x""yes; then : | |
6d153f56 | 19240 | |
3e0be4ab GM |
19241 | else |
19242 | HAVE_DECL_GETLOADAVG=0 | |
19243 | fi | |
ae0d7250 | 19244 | |
6d153f56 | 19245 | |
3e0be4ab | 19246 | if test $HAVE_GETLOADAVG = 0; then |
6d153f56 | 19247 | |
6d153f56 | 19248 | |
6d153f56 GM |
19249 | |
19250 | ||
19251 | ||
19252 | ||
6d153f56 | 19253 | |
6d153f56 | 19254 | |
3e0be4ab | 19255 | gl_LIBOBJS="$gl_LIBOBJS getloadavg.$ac_objext" |
6d153f56 | 19256 | |
ae0d7250 | 19257 | |
3e0be4ab GM |
19258 | # Figure out what our getloadavg.c needs. |
19259 | ||
19260 | # On HPUX9, an unprivileged user can get load averages this way. | |
19261 | if test $gl_func_getloadavg_done = no; then | |
19262 | for ac_func in pstat_getdynamic | |
19263 | do : | |
19264 | ac_fn_c_check_func "$LINENO" "pstat_getdynamic" "ac_cv_func_pstat_getdynamic" | |
19265 | if test "x$ac_cv_func_pstat_getdynamic" = x""yes; then : | |
19266 | cat >>confdefs.h <<_ACEOF | |
19267 | #define HAVE_PSTAT_GETDYNAMIC 1 | |
ae0d7250 | 19268 | _ACEOF |
3e0be4ab | 19269 | gl_func_getloadavg_done=yes |
ae0d7250 | 19270 | fi |
3e0be4ab GM |
19271 | done |
19272 | ||
ae0d7250 PE |
19273 | fi |
19274 | ||
3e0be4ab GM |
19275 | # We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it |
19276 | # uses stabs), but it is still SVR4. We cannot check for <elf.h> because | |
19277 | # Irix 4.0.5F has the header but not the library. | |
19278 | if test $gl_func_getloadavg_done = no && test "$ac_cv_lib_elf_elf_begin" = yes \ | |
19279 | && test "$ac_cv_lib_kvm_kvm_open" = yes; then | |
19280 | gl_func_getloadavg_done=yes | |
ae0d7250 | 19281 | |
3e0be4ab | 19282 | $as_echo "#define SVR4 1" >>confdefs.h |
ae0d7250 | 19283 | |
3e0be4ab | 19284 | fi |
ae0d7250 | 19285 | |
3e0be4ab GM |
19286 | if test $gl_func_getloadavg_done = no; then |
19287 | ac_fn_c_check_header_mongrel "$LINENO" "inq_stats/cpustats.h" "ac_cv_header_inq_stats_cpustats_h" "$ac_includes_default" | |
19288 | if test "x$ac_cv_header_inq_stats_cpustats_h" = x""yes; then : | |
19289 | gl_func_getloadavg_done=yes | |
ae0d7250 | 19290 | |
3e0be4ab | 19291 | $as_echo "#define UMAX 1" >>confdefs.h |
ae0d7250 PE |
19292 | |
19293 | ||
3e0be4ab | 19294 | $as_echo "#define UMAX4_3 1" >>confdefs.h |
ae0d7250 | 19295 | |
6d153f56 | 19296 | fi |
ae0d7250 PE |
19297 | |
19298 | ||
3e0be4ab | 19299 | fi |
ae0d7250 | 19300 | |
3e0be4ab GM |
19301 | if test $gl_func_getloadavg_done = no; then |
19302 | ac_fn_c_check_header_mongrel "$LINENO" "sys/cpustats.h" "ac_cv_header_sys_cpustats_h" "$ac_includes_default" | |
19303 | if test "x$ac_cv_header_sys_cpustats_h" = x""yes; then : | |
19304 | gl_func_getloadavg_done=yes; $as_echo "#define UMAX 1" >>confdefs.h | |
16c3e636 | 19305 | |
3e0be4ab | 19306 | fi |
16c3e636 PE |
19307 | |
19308 | ||
3e0be4ab | 19309 | fi |
5f90be1b | 19310 | |
3e0be4ab GM |
19311 | if test $gl_func_getloadavg_done = no; then |
19312 | for ac_header in mach/mach.h | |
19313 | do : | |
19314 | ac_fn_c_check_header_mongrel "$LINENO" "mach/mach.h" "ac_cv_header_mach_mach_h" "$ac_includes_default" | |
19315 | if test "x$ac_cv_header_mach_mach_h" = x""yes; then : | |
19316 | cat >>confdefs.h <<_ACEOF | |
19317 | #define HAVE_MACH_MACH_H 1 | |
19318 | _ACEOF | |
da6c8463 | 19319 | |
5f90be1b | 19320 | fi |
5f90be1b | 19321 | |
3e0be4ab | 19322 | done |
5f90be1b | 19323 | |
3e0be4ab | 19324 | fi |
5f90be1b | 19325 | |
3e0be4ab GM |
19326 | for ac_header in nlist.h |
19327 | do : | |
19328 | ac_fn_c_check_header_mongrel "$LINENO" "nlist.h" "ac_cv_header_nlist_h" "$ac_includes_default" | |
19329 | if test "x$ac_cv_header_nlist_h" = x""yes; then : | |
19330 | cat >>confdefs.h <<_ACEOF | |
19331 | #define HAVE_NLIST_H 1 | |
19332 | _ACEOF | |
19333 | ac_fn_c_check_member "$LINENO" "struct nlist" "n_un.n_name" "ac_cv_member_struct_nlist_n_un_n_name" "#include <nlist.h> | |
19334 | " | |
19335 | if test "x$ac_cv_member_struct_nlist_n_un_n_name" = x""yes; then : | |
5f90be1b | 19336 | |
3e0be4ab GM |
19337 | cat >>confdefs.h <<_ACEOF |
19338 | #define HAVE_STRUCT_NLIST_N_UN_N_NAME 1 | |
19339 | _ACEOF | |
5f90be1b PE |
19340 | |
19341 | ||
3e0be4ab | 19342 | fi |
da6c8463 | 19343 | |
3e0be4ab | 19344 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5f90be1b | 19345 | /* end confdefs.h. */ |
3e0be4ab | 19346 | #include <nlist.h> |
5f90be1b PE |
19347 | int |
19348 | main () | |
19349 | { | |
3e0be4ab GM |
19350 | struct nlist x; |
19351 | #ifdef HAVE_STRUCT_NLIST_N_UN_N_NAME | |
19352 | x.n_un.n_name = ""; | |
19353 | #else | |
19354 | x.n_name = ""; | |
19355 | #endif | |
5f90be1b PE |
19356 | ; |
19357 | return 0; | |
19358 | } | |
19359 | _ACEOF | |
3e0be4ab GM |
19360 | if ac_fn_c_try_link "$LINENO"; then : |
19361 | ||
19362 | $as_echo "#define N_NAME_POINTER 1" >>confdefs.h | |
19363 | ||
5f90be1b | 19364 | fi |
3e0be4ab GM |
19365 | rm -f core conftest.err conftest.$ac_objext \ |
19366 | conftest$ac_exeext conftest.$ac_ext | |
19367 | ||
5f90be1b | 19368 | fi |
5f90be1b | 19369 | |
3e0be4ab GM |
19370 | done |
19371 | ||
da6c8463 GM |
19372 | fi |
19373 | ||
5f90be1b PE |
19374 | |
19375 | ||
5f90be1b PE |
19376 | |
19377 | ||
3e0be4ab | 19378 | GNULIB_GETLOADAVG=1 |
da6c8463 GM |
19379 | |
19380 | ||
19381 | ||
19382 | ||
da6c8463 | 19383 | |
5f90be1b | 19384 | |
5f90be1b | 19385 | |
5f90be1b | 19386 | |
5f90be1b | 19387 | |
3e0be4ab GM |
19388 | |
19389 | if test $REPLACE_GETOPT = 1; then | |
19390 | ||
19391 | ||
19392 | ||
19393 | ||
19394 | ||
5f90be1b PE |
19395 | |
19396 | ||
19397 | ||
3e0be4ab GM |
19398 | gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext" |
19399 | ||
19400 | ||
5f90be1b | 19401 | |
6c051bab | 19402 | |
5f90be1b | 19403 | |
6ad6792b GM |
19404 | |
19405 | ||
19406 | ||
19407 | ||
3e0be4ab | 19408 | gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext" |
6ad6792b GM |
19409 | |
19410 | ||
19411 | ||
19412 | ||
3e0be4ab | 19413 | fi |
6ad6792b GM |
19414 | |
19415 | ||
19416 | ||
6ad6792b | 19417 | |
6ad6792b | 19418 | |
3e0be4ab GM |
19419 | REPLACE_GETOPT=0 |
19420 | ||
19421 | ||
19422 | if test -n "$gl_replace_getopt"; then : | |
6ad6792b | 19423 | |
3e0be4ab | 19424 | REPLACE_GETOPT=1 |
6ad6792b GM |
19425 | |
19426 | fi | |
6ad6792b | 19427 | |
6ad6792b | 19428 | |
3e0be4ab | 19429 | if test $REPLACE_GETOPT = 1; then |
6ad6792b | 19430 | |
3e0be4ab | 19431 | GETOPT_H=getopt.h |
6ad6792b | 19432 | |
3e0be4ab | 19433 | $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h |
6ad6792b | 19434 | |
ca36e0ff | 19435 | |
ca36e0ff | 19436 | |
3e0be4ab GM |
19437 | GNULIB_UNISTD_H_GETOPT=1 |
19438 | fi | |
ca36e0ff | 19439 | |
3e0be4ab | 19440 | if test $REPLACE_GETOPT = 1; then |
6ad6792b GM |
19441 | |
19442 | ||
19443 | ||
19444 | ||
ca36e0ff | 19445 | |
1f5d53eb PE |
19446 | |
19447 | ||
19448 | ||
3e0be4ab | 19449 | gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext" |
1f5d53eb PE |
19450 | |
19451 | ||
19452 | ||
19453 | ||
19454 | ||
19455 | ||
19456 | ||
1f5d53eb | 19457 | |
1f5d53eb | 19458 | |
3e0be4ab GM |
19459 | gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext" |
19460 | ||
19461 | ||
1f5d53eb PE |
19462 | |
19463 | ||
19464 | fi | |
1f5d53eb | 19465 | |
1f5d53eb PE |
19466 | |
19467 | ||
19468 | ||
19469 | ||
3e0be4ab | 19470 | if test $ac_cv_func_lstat = yes; then |
1f5d53eb | 19471 | |
3e0be4ab GM |
19472 | if test $gl_cv_func_lstat_dereferences_slashed_symlink = no; then |
19473 | REPLACE_LSTAT=1 | |
19474 | fi | |
19475 | else | |
19476 | HAVE_LSTAT=0 | |
19477 | fi | |
1f5d53eb | 19478 | |
3e0be4ab | 19479 | if test $REPLACE_LSTAT = 1; then |
1f5d53eb | 19480 | |
16c3e636 PE |
19481 | |
19482 | ||
16c3e636 PE |
19483 | |
19484 | ||
19485 | ||
19486 | ||
19487 | ||
3e0be4ab | 19488 | gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext" |
16c3e636 PE |
19489 | |
19490 | ||
16c3e636 | 19491 | |
3e0be4ab | 19492 | : |
16c3e636 | 19493 | |
3e0be4ab | 19494 | fi |
16c3e636 | 19495 | |
4fda9c95 GM |
19496 | |
19497 | ||
19498 | ||
19499 | ||
3e0be4ab | 19500 | GNULIB_LSTAT=1 |
4fda9c95 GM |
19501 | |
19502 | ||
19503 | ||
19504 | ||
19505 | ||
19506 | ||
19507 | ||
19508 | ||
19509 | ||
4fda9c95 | 19510 | |
4fda9c95 | 19511 | |
3e0be4ab GM |
19512 | if test $APPLE_UNIVERSAL_BUILD = 1; then |
19513 | # A universal build on Apple MacOS X platforms. | |
19514 | # The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode. | |
19515 | # But we need a configuration result that is valid in both modes. | |
19516 | gl_cv_func_working_mktime=no | |
19517 | fi | |
19518 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5 | |
19519 | $as_echo_n "checking for working mktime... " >&6; } | |
19520 | if test "${gl_cv_func_working_mktime+set}" = set; then : | |
19521 | $as_echo_n "(cached) " >&6 | |
19522 | else | |
19523 | if test "$cross_compiling" = yes; then : | |
19524 | gl_cv_func_working_mktime=no | |
19525 | else | |
19526 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
19527 | /* end confdefs.h. */ | |
19528 | /* Test program from Paul Eggert and Tony Leneis. */ | |
19529 | #include <limits.h> | |
19530 | #include <stdlib.h> | |
19531 | #include <time.h> | |
4fda9c95 | 19532 | |
3e0be4ab GM |
19533 | #ifdef HAVE_UNISTD_H |
19534 | # include <unistd.h> | |
19535 | #endif | |
4fda9c95 | 19536 | |
3e0be4ab GM |
19537 | #ifndef HAVE_ALARM |
19538 | # define alarm(X) /* empty */ | |
19539 | #endif | |
4fda9c95 | 19540 | |
3e0be4ab GM |
19541 | /* Work around redefinition to rpl_putenv by other config tests. */ |
19542 | #undef putenv | |
4fda9c95 | 19543 | |
3e0be4ab GM |
19544 | static time_t time_t_max; |
19545 | static time_t time_t_min; | |
19546 | ||
19547 | /* Values we'll use to set the TZ environment variable. */ | |
19548 | static char *tz_strings[] = { | |
19549 | (char *) 0, "TZ=GMT0", "TZ=JST-9", | |
19550 | "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00" | |
19551 | }; | |
19552 | #define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0])) | |
4fda9c95 | 19553 | |
3e0be4ab GM |
19554 | /* Return 0 if mktime fails to convert a date in the spring-forward gap. |
19555 | Based on a problem report from Andreas Jaeger. */ | |
19556 | static int | |
19557 | spring_forward_gap () | |
19558 | { | |
19559 | /* glibc (up to about 1998-10-07) failed this test. */ | |
19560 | struct tm tm; | |
4fda9c95 | 19561 | |
3e0be4ab GM |
19562 | /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0" |
19563 | instead of "TZ=America/Vancouver" in order to detect the bug even | |
19564 | on systems that don't support the Olson extension, or don't have the | |
19565 | full zoneinfo tables installed. */ | |
19566 | putenv ("TZ=PST8PDT,M4.1.0,M10.5.0"); | |
4fda9c95 | 19567 | |
3e0be4ab GM |
19568 | tm.tm_year = 98; |
19569 | tm.tm_mon = 3; | |
19570 | tm.tm_mday = 5; | |
19571 | tm.tm_hour = 2; | |
19572 | tm.tm_min = 0; | |
19573 | tm.tm_sec = 0; | |
19574 | tm.tm_isdst = -1; | |
19575 | return mktime (&tm) != (time_t) -1; | |
19576 | } | |
19577 | ||
19578 | static int | |
19579 | mktime_test1 (time_t now) | |
19580 | { | |
19581 | struct tm *lt; | |
19582 | return ! (lt = localtime (&now)) || mktime (lt) == now; | |
19583 | } | |
4fda9c95 | 19584 | |
3e0be4ab GM |
19585 | static int |
19586 | mktime_test (time_t now) | |
19587 | { | |
19588 | return (mktime_test1 (now) | |
19589 | && mktime_test1 ((time_t) (time_t_max - now)) | |
19590 | && mktime_test1 ((time_t) (time_t_min + now))); | |
19591 | } | |
4fda9c95 | 19592 | |
3e0be4ab GM |
19593 | static int |
19594 | irix_6_4_bug () | |
19595 | { | |
19596 | /* Based on code from Ariel Faigon. */ | |
19597 | struct tm tm; | |
19598 | tm.tm_year = 96; | |
19599 | tm.tm_mon = 3; | |
19600 | tm.tm_mday = 0; | |
19601 | tm.tm_hour = 0; | |
19602 | tm.tm_min = 0; | |
19603 | tm.tm_sec = 0; | |
19604 | tm.tm_isdst = -1; | |
19605 | mktime (&tm); | |
19606 | return tm.tm_mon == 2 && tm.tm_mday == 31; | |
19607 | } | |
4fda9c95 | 19608 | |
3e0be4ab GM |
19609 | static int |
19610 | bigtime_test (int j) | |
19611 | { | |
19612 | struct tm tm; | |
19613 | time_t now; | |
19614 | tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j; | |
19615 | now = mktime (&tm); | |
19616 | if (now != (time_t) -1) | |
19617 | { | |
19618 | struct tm *lt = localtime (&now); | |
19619 | if (! (lt | |
19620 | && lt->tm_year == tm.tm_year | |
19621 | && lt->tm_mon == tm.tm_mon | |
19622 | && lt->tm_mday == tm.tm_mday | |
19623 | && lt->tm_hour == tm.tm_hour | |
19624 | && lt->tm_min == tm.tm_min | |
19625 | && lt->tm_sec == tm.tm_sec | |
19626 | && lt->tm_yday == tm.tm_yday | |
19627 | && lt->tm_wday == tm.tm_wday | |
19628 | && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst) | |
19629 | == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst)))) | |
19630 | return 0; | |
19631 | } | |
19632 | return 1; | |
19633 | } | |
cc322c06 | 19634 | |
3e0be4ab GM |
19635 | static int |
19636 | year_2050_test () | |
19637 | { | |
19638 | /* The correct answer for 2050-02-01 00:00:00 in Pacific time, | |
19639 | ignoring leap seconds. */ | |
19640 | unsigned long int answer = 2527315200UL; | |
cc322c06 | 19641 | |
3e0be4ab GM |
19642 | struct tm tm; |
19643 | time_t t; | |
19644 | tm.tm_year = 2050 - 1900; | |
19645 | tm.tm_mon = 2 - 1; | |
19646 | tm.tm_mday = 1; | |
19647 | tm.tm_hour = tm.tm_min = tm.tm_sec = 0; | |
19648 | tm.tm_isdst = -1; | |
cc322c06 | 19649 | |
3e0be4ab GM |
19650 | /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0" |
19651 | instead of "TZ=America/Vancouver" in order to detect the bug even | |
19652 | on systems that don't support the Olson extension, or don't have the | |
19653 | full zoneinfo tables installed. */ | |
19654 | putenv ("TZ=PST8PDT,M4.1.0,M10.5.0"); | |
cc322c06 | 19655 | |
3e0be4ab | 19656 | t = mktime (&tm); |
4fda9c95 | 19657 | |
3e0be4ab GM |
19658 | /* Check that the result is either a failure, or close enough |
19659 | to the correct answer that we can assume the discrepancy is | |
19660 | due to leap seconds. */ | |
19661 | return (t == (time_t) -1 | |
19662 | || (0 < t && answer - 120 <= t && t <= answer + 120)); | |
19663 | } | |
4fda9c95 | 19664 | |
3e0be4ab GM |
19665 | int |
19666 | main () | |
19667 | { | |
19668 | int result = 0; | |
19669 | time_t t, delta; | |
19670 | int i, j; | |
19671 | int time_t_signed_magnitude = (time_t) ~ (time_t) 0 < (time_t) -1; | |
19672 | int time_t_signed = ! ((time_t) 0 < (time_t) -1); | |
ae0d7250 | 19673 | |
3e0be4ab GM |
19674 | /* This test makes some buggy mktime implementations loop. |
19675 | Give up after 60 seconds; a mktime slower than that | |
19676 | isn't worth using anyway. */ | |
19677 | alarm (60); | |
ae0d7250 | 19678 | |
3e0be4ab GM |
19679 | time_t_max = (! time_t_signed |
19680 | ? (time_t) -1 | |
19681 | : ((((time_t) 1 << (sizeof (time_t) * CHAR_BIT - 2)) - 1) | |
19682 | * 2 + 1)); | |
19683 | time_t_min = (! time_t_signed | |
19684 | ? (time_t) 0 | |
19685 | : time_t_signed_magnitude | |
19686 | ? ~ (time_t) 0 | |
19687 | : ~ time_t_max); | |
ae0d7250 | 19688 | |
3e0be4ab GM |
19689 | delta = time_t_max / 997; /* a suitable prime number */ |
19690 | for (i = 0; i < N_STRINGS; i++) | |
19691 | { | |
19692 | if (tz_strings[i]) | |
19693 | putenv (tz_strings[i]); | |
ae0d7250 | 19694 | |
3e0be4ab GM |
19695 | for (t = 0; t <= time_t_max - delta; t += delta) |
19696 | if (! mktime_test (t)) | |
19697 | result |= 1; | |
19698 | if (! (mktime_test ((time_t) 1) | |
19699 | && mktime_test ((time_t) (60 * 60)) | |
19700 | && mktime_test ((time_t) (60 * 60 * 24)))) | |
19701 | result |= 2; | |
ae0d7250 | 19702 | |
3e0be4ab GM |
19703 | for (j = 1; ; j <<= 1) |
19704 | if (! bigtime_test (j)) | |
19705 | result |= 4; | |
19706 | else if (INT_MAX / 2 < j) | |
19707 | break; | |
19708 | if (! bigtime_test (INT_MAX)) | |
19709 | result |= 8; | |
19710 | } | |
19711 | if (! irix_6_4_bug ()) | |
19712 | result |= 16; | |
19713 | if (! spring_forward_gap ()) | |
19714 | result |= 32; | |
19715 | if (! year_2050_test ()) | |
19716 | result |= 64; | |
19717 | return result; | |
ae0d7250 PE |
19718 | } |
19719 | _ACEOF | |
19720 | if ac_fn_c_try_run "$LINENO"; then : | |
3e0be4ab | 19721 | gl_cv_func_working_mktime=yes |
ae0d7250 | 19722 | else |
3e0be4ab | 19723 | gl_cv_func_working_mktime=no |
ae0d7250 PE |
19724 | fi |
19725 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
19726 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
19727 | fi | |
19728 | ||
ae0d7250 | 19729 | |
52724a05 | 19730 | fi |
3e0be4ab GM |
19731 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_mktime" >&5 |
19732 | $as_echo "$gl_cv_func_working_mktime" >&6; } | |
19733 | ||
19734 | if test $gl_cv_func_working_mktime = no; then | |
19735 | REPLACE_MKTIME=1 | |
19736 | else | |
19737 | REPLACE_MKTIME=0 | |
19738 | fi | |
ae0d7250 | 19739 | |
3e0be4ab | 19740 | if test $REPLACE_MKTIME = 1; then |
ae0d7250 PE |
19741 | |
19742 | ||
cc322c06 GM |
19743 | |
19744 | ||
cc322c06 GM |
19745 | |
19746 | ||
ae0d7250 PE |
19747 | |
19748 | ||
3e0be4ab | 19749 | gl_LIBOBJS="$gl_LIBOBJS mktime.$ac_objext" |
ae0d7250 | 19750 | |
5fa4ac76 PE |
19751 | |
19752 | ||
19753 | ||
3e0be4ab | 19754 | fi |
5fa4ac76 PE |
19755 | |
19756 | ||
19757 | ||
19758 | ||
19759 | ||
3e0be4ab | 19760 | GNULIB_MKTIME=1 |
5fa4ac76 PE |
19761 | |
19762 | ||
19763 | ||
19764 | ||
19765 | ||
19766 | ||
19767 | ||
19768 | ||
3e0be4ab GM |
19769 | LIB_PTHREAD_SIGMASK= |
19770 | if test $ac_cv_func_pthread_sigmask != yes; then | |
19771 | gl_save_LIBS=$LIBS | |
19772 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_sigmask" >&5 | |
19773 | $as_echo_n "checking for library containing pthread_sigmask... " >&6; } | |
19774 | if test "${ac_cv_search_pthread_sigmask+set}" = set; then : | |
5fa4ac76 PE |
19775 | $as_echo_n "(cached) " >&6 |
19776 | else | |
3e0be4ab GM |
19777 | ac_func_search_save_LIBS=$LIBS |
19778 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5fa4ac76 | 19779 | /* end confdefs.h. */ |
5fa4ac76 | 19780 | |
3e0be4ab GM |
19781 | /* Override any GCC internal prototype to avoid an error. |
19782 | Use char because int might match the return type of a GCC | |
19783 | builtin and then its argument prototype would still apply. */ | |
19784 | #ifdef __cplusplus | |
19785 | extern "C" | |
19786 | #endif | |
19787 | char pthread_sigmask (); | |
19788 | int | |
19789 | main () | |
19790 | { | |
19791 | return pthread_sigmask (); | |
19792 | ; | |
19793 | return 0; | |
19794 | } | |
5fa4ac76 | 19795 | _ACEOF |
3e0be4ab GM |
19796 | for ac_lib in '' pthread c_r; do |
19797 | if test -z "$ac_lib"; then | |
19798 | ac_res="none required" | |
19799 | else | |
19800 | ac_res=-l$ac_lib | |
19801 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
19802 | fi | |
19803 | if ac_fn_c_try_link "$LINENO"; then : | |
19804 | ac_cv_search_pthread_sigmask=$ac_res | |
5fa4ac76 | 19805 | fi |
3e0be4ab GM |
19806 | rm -f core conftest.err conftest.$ac_objext \ |
19807 | conftest$ac_exeext | |
19808 | if test "${ac_cv_search_pthread_sigmask+set}" = set; then : | |
19809 | break | |
19810 | fi | |
19811 | done | |
19812 | if test "${ac_cv_search_pthread_sigmask+set}" = set; then : | |
5fa4ac76 | 19813 | |
3e0be4ab GM |
19814 | else |
19815 | ac_cv_search_pthread_sigmask=no | |
19816 | fi | |
19817 | rm conftest.$ac_ext | |
19818 | LIBS=$ac_func_search_save_LIBS | |
19819 | fi | |
19820 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_sigmask" >&5 | |
19821 | $as_echo "$ac_cv_search_pthread_sigmask" >&6; } | |
19822 | ac_res=$ac_cv_search_pthread_sigmask | |
19823 | if test "$ac_res" != no; then : | |
19824 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
5fa4ac76 | 19825 | |
3e0be4ab | 19826 | fi |
5fa4ac76 | 19827 | |
3e0be4ab GM |
19828 | LIBS=$gl_save_LIBS |
19829 | if test "$ac_cv_search_pthread_sigmask" = no; then | |
19830 | HAVE_PTHREAD_SIGMASK=0 | |
19831 | elif test "$ac_cv_search_pthread_sigmask" != 'none required'; then | |
19832 | LIB_PTHREAD_SIGMASK=$ac_cv_search_pthread_sigmask | |
19833 | fi | |
19834 | fi | |
5fa4ac76 PE |
19835 | |
19836 | ||
3e0be4ab | 19837 | if test $HAVE_PTHREAD_SIGMASK = 0 || test $REPLACE_PTHREAD_SIGMASK = 1; then |
5fa4ac76 | 19838 | |
5fa4ac76 | 19839 | |
5fa4ac76 | 19840 | |
5fa4ac76 PE |
19841 | |
19842 | ||
19843 | ||
19844 | ||
19845 | ||
3e0be4ab | 19846 | gl_LIBOBJS="$gl_LIBOBJS pthread_sigmask.$ac_objext" |
067d23c9 | 19847 | |
3e0be4ab | 19848 | fi |
067d23c9 | 19849 | |
067d23c9 KY |
19850 | |
19851 | ||
067d23c9 | 19852 | |
067d23c9 | 19853 | |
3e0be4ab | 19854 | GNULIB_PTHREAD_SIGMASK=1 |
067d23c9 KY |
19855 | |
19856 | ||
067d23c9 | 19857 | |
067d23c9 KY |
19858 | |
19859 | ||
19860 | ||
3e0be4ab GM |
19861 | |
19862 | ||
19863 | if test $ac_cv_func_readlink = no; then | |
19864 | HAVE_READLINK=0 | |
19865 | else | |
19866 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5 | |
19867 | $as_echo_n "checking whether readlink signature is correct... " >&6; } | |
19868 | if test "${gl_cv_decl_readlink_works+set}" = set; then : | |
067d23c9 KY |
19869 | $as_echo_n "(cached) " >&6 |
19870 | else | |
1fd182f0 | 19871 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
067d23c9 | 19872 | /* end confdefs.h. */ |
3e0be4ab GM |
19873 | #include <unistd.h> |
19874 | /* Cause compilation failure if original declaration has wrong type. */ | |
19875 | ssize_t readlink (const char *, char *, size_t); | |
067d23c9 KY |
19876 | int |
19877 | main () | |
19878 | { | |
3e0be4ab | 19879 | |
067d23c9 KY |
19880 | ; |
19881 | return 0; | |
19882 | } | |
19883 | _ACEOF | |
19884 | if ac_fn_c_try_compile "$LINENO"; then : | |
3e0be4ab | 19885 | gl_cv_decl_readlink_works=yes |
067d23c9 | 19886 | else |
3e0be4ab | 19887 | gl_cv_decl_readlink_works=no |
067d23c9 KY |
19888 | fi |
19889 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3e0be4ab GM |
19890 | fi |
19891 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5 | |
19892 | $as_echo "$gl_cv_decl_readlink_works" >&6; } | |
19893 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5 | |
19894 | $as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; } | |
19895 | if test "${gl_cv_func_readlink_works+set}" = set; then : | |
19896 | $as_echo_n "(cached) " >&6 | |
19897 | else | |
19898 | # We have readlink, so assume ln -s works. | |
19899 | ln -s conftest.no-such conftest.link | |
19900 | ln -s conftest.link conftest.lnk2 | |
19901 | if test "$cross_compiling" = yes; then : | |
19902 | gl_cv_func_readlink_works="guessing no" | |
19903 | else | |
19904 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
19905 | /* end confdefs.h. */ | |
19906 | #include <unistd.h> | |
067d23c9 | 19907 | |
3e0be4ab GM |
19908 | int |
19909 | main () | |
19910 | { | |
19911 | char buf[20]; | |
19912 | return readlink ("conftest.lnk2/", buf, sizeof buf) != -1; | |
19913 | ; | |
19914 | return 0; | |
19915 | } | |
19916 | _ACEOF | |
19917 | if ac_fn_c_try_run "$LINENO"; then : | |
19918 | gl_cv_func_readlink_works=yes | |
19919 | else | |
19920 | gl_cv_func_readlink_works=no | |
067d23c9 | 19921 | fi |
3e0be4ab GM |
19922 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
19923 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
19924 | fi | |
19925 | ||
19926 | rm -f conftest.link conftest.lnk2 | |
19927 | fi | |
19928 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_works" >&5 | |
19929 | $as_echo "$gl_cv_func_readlink_works" >&6; } | |
19930 | if test "$gl_cv_func_readlink_works" != yes; then | |
19931 | ||
19932 | $as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h | |
19933 | ||
19934 | REPLACE_READLINK=1 | |
19935 | elif test "$gl_cv_decl_readlink_works" != yes; then | |
19936 | REPLACE_READLINK=1 | |
1fd182f0 | 19937 | fi |
1fd182f0 | 19938 | fi |
52724a05 | 19939 | |
3e0be4ab | 19940 | if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then |
067d23c9 | 19941 | |
067d23c9 KY |
19942 | |
19943 | ||
743c80a7 | 19944 | |
a451f14b PE |
19945 | |
19946 | ||
19947 | ||
a451f14b | 19948 | |
3e0be4ab | 19949 | gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext" |
a451f14b | 19950 | |
a451f14b | 19951 | |
1fd182f0 | 19952 | : |
a451f14b | 19953 | |
52724a05 | 19954 | fi |
a451f14b | 19955 | |
743c80a7 PE |
19956 | |
19957 | ||
cc322c06 GM |
19958 | |
19959 | ||
3e0be4ab | 19960 | GNULIB_READLINK=1 |
743c80a7 PE |
19961 | |
19962 | ||
a451f14b PE |
19963 | |
19964 | ||
19965 | ||
e275c824 PE |
19966 | |
19967 | ||
19968 | ||
19969 | ||
19970 | ||
19971 | ||
19972 | ||
19973 | ||
19974 | ||
19975 | ||
d87ffdb7 | 19976 | |
e275c824 | 19977 | if test $gl_cv_have_include_next = yes; then |
3e0be4ab | 19978 | gl_cv_next_signal_h='<'signal.h'>' |
e275c824 | 19979 | else |
3e0be4ab GM |
19980 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5 |
19981 | $as_echo_n "checking absolute name of <signal.h>... " >&6; } | |
19982 | if test "${gl_cv_next_signal_h+set}" = set; then : | |
e275c824 PE |
19983 | $as_echo_n "(cached) " >&6 |
19984 | else | |
19985 | ||
b06b1098 | 19986 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
e275c824 | 19987 | /* end confdefs.h. */ |
3e0be4ab | 19988 | #include <signal.h> |
e275c824 PE |
19989 | |
19990 | _ACEOF | |
b06b1098 PE |
19991 | case "$host_os" in |
19992 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
19993 | *) gl_absname_cpp="$ac_cpp" ;; | |
19994 | esac | |
3e0be4ab GM |
19995 | gl_cv_next_signal_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | |
19996 | sed -n '\#/signal.h#{ | |
19997 | s#.*"\(.*/signal.h\)".*#\1# | |
b06b1098 PE |
19998 | s#^/[^/]#//&# |
19999 | p | |
20000 | q | |
20001 | }'`'"' | |
b06b1098 | 20002 | |
e275c824 PE |
20003 | |
20004 | fi | |
3e0be4ab GM |
20005 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5 |
20006 | $as_echo "$gl_cv_next_signal_h" >&6; } | |
e275c824 | 20007 | fi |
3e0be4ab | 20008 | NEXT_SIGNAL_H=$gl_cv_next_signal_h |
e275c824 PE |
20009 | |
20010 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then | |
20011 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
3e0be4ab | 20012 | gl_next_as_first_directive='<'signal.h'>' |
e275c824 PE |
20013 | else |
20014 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
3e0be4ab | 20015 | gl_next_as_first_directive=$gl_cv_next_signal_h |
e275c824 | 20016 | fi |
3e0be4ab | 20017 | NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive |
e275c824 PE |
20018 | |
20019 | ||
20020 | ||
20021 | ||
e275c824 | 20022 | |
3e0be4ab GM |
20023 | # AIX declares sig_atomic_t to already include volatile, and C89 compilers |
20024 | # then choke on 'volatile sig_atomic_t'. C99 requires that it compile. | |
20025 | ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" " | |
20026 | #include <signal.h> | |
e275c824 | 20027 | |
3e0be4ab GM |
20028 | " |
20029 | if test "x$ac_cv_type_volatile_sig_atomic_t" = x""yes; then : | |
e275c824 | 20030 | |
3e0be4ab GM |
20031 | else |
20032 | HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0 | |
20033 | fi | |
e275c824 | 20034 | |
6d153f56 GM |
20035 | |
20036 | ||
6d153f56 GM |
20037 | |
20038 | ||
3e0be4ab GM |
20039 | ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" " |
20040 | #include <signal.h> | |
6d153f56 | 20041 | |
3e0be4ab GM |
20042 | " |
20043 | if test "x$ac_cv_type_sighandler_t" = x""yes; then : | |
20044 | ||
20045 | else | |
20046 | HAVE_SIGHANDLER_T=0 | |
20047 | fi | |
20048 | ||
20049 | ||
20050 | ||
20051 | ||
20052 | ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" " | |
20053 | /* <sys/types.h> is not needed according to POSIX, but the | |
20054 | <sys/socket.h> in i386-unknown-freebsd4.10 and | |
20055 | powerpc-apple-darwin5.5 required it. */ | |
20056 | #include <sys/types.h> | |
20057 | #if HAVE_SYS_SOCKET_H | |
20058 | # include <sys/socket.h> | |
20059 | #elif HAVE_WS2TCPIP_H | |
20060 | # include <ws2tcpip.h> | |
20061 | #endif | |
20062 | ||
20063 | " | |
20064 | if test "x$ac_cv_type_socklen_t" = x""yes; then : | |
20065 | ||
20066 | else | |
20067 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5 | |
20068 | $as_echo_n "checking for socklen_t equivalent... " >&6; } | |
20069 | if test "${gl_cv_socklen_t_equiv+set}" = set; then : | |
6d153f56 GM |
20070 | $as_echo_n "(cached) " >&6 |
20071 | else | |
3e0be4ab GM |
20072 | # Systems have either "struct sockaddr *" or |
20073 | # "void *" as the second argument to getpeername | |
20074 | gl_cv_socklen_t_equiv= | |
20075 | for arg2 in "struct sockaddr" void; do | |
20076 | for t in int size_t "unsigned int" "long int" "unsigned long int"; do | |
20077 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
20078 | /* end confdefs.h. */ | |
20079 | #include <sys/types.h> | |
20080 | #include <sys/socket.h> | |
20081 | ||
20082 | int getpeername (int, $arg2 *, $t *); | |
20083 | int | |
20084 | main () | |
20085 | { | |
20086 | $t len; | |
20087 | getpeername (0, 0, &len); | |
20088 | ; | |
20089 | return 0; | |
20090 | } | |
20091 | _ACEOF | |
20092 | if ac_fn_c_try_compile "$LINENO"; then : | |
20093 | gl_cv_socklen_t_equiv="$t" | |
20094 | fi | |
20095 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
20096 | test "$gl_cv_socklen_t_equiv" != "" && break | |
20097 | done | |
20098 | test "$gl_cv_socklen_t_equiv" != "" && break | |
20099 | done | |
20100 | ||
20101 | fi | |
20102 | ||
20103 | if test "$gl_cv_socklen_t_equiv" = ""; then | |
20104 | as_fn_error "Cannot find a type to use in place of socklen_t" "$LINENO" 5 | |
20105 | fi | |
20106 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socklen_t_equiv" >&5 | |
20107 | $as_echo "$gl_cv_socklen_t_equiv" >&6; } | |
20108 | ||
20109 | cat >>confdefs.h <<_ACEOF | |
20110 | #define socklen_t $gl_cv_socklen_t_equiv | |
20111 | _ACEOF | |
20112 | ||
20113 | fi | |
20114 | ||
20115 | ||
20116 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5 | |
20117 | $as_echo_n "checking for ssize_t... " >&6; } | |
20118 | if test "${gt_cv_ssize_t+set}" = set; then : | |
20119 | $as_echo_n "(cached) " >&6 | |
6d153f56 GM |
20120 | else |
20121 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
20122 | /* end confdefs.h. */ | |
3e0be4ab | 20123 | #include <sys/types.h> |
6d153f56 GM |
20124 | int |
20125 | main () | |
20126 | { | |
3e0be4ab GM |
20127 | int x = sizeof (ssize_t *) + sizeof (ssize_t); |
20128 | return !x; | |
6d153f56 GM |
20129 | ; |
20130 | return 0; | |
20131 | } | |
20132 | _ACEOF | |
3e0be4ab GM |
20133 | if ac_fn_c_try_compile "$LINENO"; then : |
20134 | gt_cv_ssize_t=yes | |
6d153f56 | 20135 | else |
3e0be4ab | 20136 | gt_cv_ssize_t=no |
6d153f56 | 20137 | fi |
3e0be4ab | 20138 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
6d153f56 | 20139 | fi |
3e0be4ab GM |
20140 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5 |
20141 | $as_echo "$gt_cv_ssize_t" >&6; } | |
20142 | if test $gt_cv_ssize_t = no; then | |
6d153f56 | 20143 | |
3e0be4ab GM |
20144 | $as_echo "#define ssize_t int" >>confdefs.h |
20145 | ||
20146 | fi | |
20147 | ||
20148 | ||
20149 | STDARG_H='' | |
20150 | NEXT_STDARG_H='<stdarg.h>' | |
20151 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5 | |
20152 | $as_echo_n "checking for va_copy... " >&6; } | |
20153 | if test "${gl_cv_func_va_copy+set}" = set; then : | |
6d153f56 GM |
20154 | $as_echo_n "(cached) " >&6 |
20155 | else | |
6d153f56 | 20156 | |
3e0be4ab GM |
20157 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
20158 | /* end confdefs.h. */ | |
20159 | #include <stdarg.h> | |
6d153f56 GM |
20160 | int |
20161 | main () | |
20162 | { | |
3e0be4ab GM |
20163 | |
20164 | #ifndef va_copy | |
20165 | void (*func) (va_list, va_list) = va_copy; | |
6d153f56 | 20166 | #endif |
6d153f56 GM |
20167 | |
20168 | ; | |
20169 | return 0; | |
20170 | } | |
20171 | _ACEOF | |
3e0be4ab GM |
20172 | if ac_fn_c_try_compile "$LINENO"; then : |
20173 | gl_cv_func_va_copy=yes | |
6d153f56 | 20174 | else |
3e0be4ab | 20175 | gl_cv_func_va_copy=no |
6d153f56 | 20176 | fi |
3e0be4ab | 20177 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
6d153f56 | 20178 | fi |
6d153f56 | 20179 | |
3e0be4ab GM |
20180 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_va_copy" >&5 |
20181 | $as_echo "$gl_cv_func_va_copy" >&6; } | |
20182 | if test $gl_cv_func_va_copy = no; then | |
20183 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
20184 | /* end confdefs.h. */ | |
20185 | #if defined _AIX && !defined __GNUC__ | |
20186 | AIX vaccine | |
20187 | #endif | |
6d153f56 | 20188 | |
3e0be4ab GM |
20189 | _ACEOF |
20190 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
20191 | $EGREP "vaccine" >/dev/null 2>&1; then : | |
20192 | gl_aixcc=yes | |
20193 | else | |
20194 | gl_aixcc=no | |
20195 | fi | |
20196 | rm -f conftest* | |
52724a05 | 20197 | |
3e0be4ab GM |
20198 | if test $gl_aixcc = yes; then |
20199 | STDARG_H=stdarg.h | |
6d153f56 GM |
20200 | |
20201 | ||
20202 | ||
20203 | ||
20204 | ||
20205 | ||
20206 | ||
20207 | ||
3e0be4ab GM |
20208 | if test $gl_cv_have_include_next = yes; then |
20209 | gl_cv_next_stdarg_h='<'stdarg.h'>' | |
20210 | else | |
20211 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdarg.h>" >&5 | |
20212 | $as_echo_n "checking absolute name of <stdarg.h>... " >&6; } | |
20213 | if test "${gl_cv_next_stdarg_h+set}" = set; then : | |
20214 | $as_echo_n "(cached) " >&6 | |
20215 | else | |
6d153f56 | 20216 | |
3e0be4ab GM |
20217 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
20218 | /* end confdefs.h. */ | |
20219 | #include <stdarg.h> | |
6d153f56 | 20220 | |
3e0be4ab GM |
20221 | _ACEOF |
20222 | case "$host_os" in | |
20223 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
20224 | *) gl_absname_cpp="$ac_cpp" ;; | |
20225 | esac | |
20226 | gl_cv_next_stdarg_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
20227 | sed -n '\#/stdarg.h#{ | |
20228 | s#.*"\(.*/stdarg.h\)".*#\1# | |
20229 | s#^/[^/]#//&# | |
20230 | p | |
20231 | q | |
20232 | }'`'"' | |
6d153f56 | 20233 | |
52724a05 GM |
20234 | |
20235 | fi | |
3e0be4ab GM |
20236 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdarg_h" >&5 |
20237 | $as_echo "$gl_cv_next_stdarg_h" >&6; } | |
20238 | fi | |
20239 | NEXT_STDARG_H=$gl_cv_next_stdarg_h | |
6d153f56 | 20240 | |
3e0be4ab GM |
20241 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then |
20242 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
20243 | gl_next_as_first_directive='<'stdarg.h'>' | |
20244 | else | |
20245 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
20246 | gl_next_as_first_directive=$gl_cv_next_stdarg_h | |
20247 | fi | |
20248 | NEXT_AS_FIRST_DIRECTIVE_STDARG_H=$gl_next_as_first_directive | |
6d153f56 GM |
20249 | |
20250 | ||
cc322c06 GM |
20251 | |
20252 | ||
3e0be4ab GM |
20253 | if test "$gl_cv_next_stdarg_h" = '""'; then |
20254 | gl_cv_next_stdarg_h='"///usr/include/stdarg.h"' | |
20255 | NEXT_STDARG_H="$gl_cv_next_stdarg_h" | |
4fc2b746 | 20256 | fi |
3e0be4ab GM |
20257 | else |
20258 | ||
20259 | saved_as_echo_n="$as_echo_n" | |
20260 | as_echo_n=':' | |
20261 | if test "${gl_cv_func___va_copy+set}" = set; then : | |
20262 | $as_echo_n "(cached) " >&6 | |
20263 | else | |
6d153f56 | 20264 | |
3e0be4ab GM |
20265 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
20266 | /* end confdefs.h. */ | |
20267 | #include <stdarg.h> | |
20268 | int | |
20269 | main () | |
20270 | { | |
6d153f56 | 20271 | |
3e0be4ab GM |
20272 | #ifndef __va_copy |
20273 | error, bail out | |
20274 | #endif | |
6d153f56 | 20275 | |
3e0be4ab GM |
20276 | ; |
20277 | return 0; | |
20278 | } | |
6d153f56 | 20279 | _ACEOF |
3e0be4ab GM |
20280 | if ac_fn_c_try_compile "$LINENO"; then : |
20281 | gl_cv_func___va_copy=yes | |
20282 | else | |
20283 | gl_cv_func___va_copy=no | |
6d153f56 | 20284 | fi |
3e0be4ab | 20285 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
52724a05 | 20286 | fi |
6d153f56 | 20287 | |
3e0be4ab | 20288 | as_echo_n="$saved_as_echo_n" |
6d153f56 | 20289 | |
3e0be4ab | 20290 | if test $gl_cv_func___va_copy = yes; then |
6d153f56 | 20291 | |
3e0be4ab | 20292 | $as_echo "#define va_copy __va_copy" >>confdefs.h |
cc322c06 | 20293 | |
3e0be4ab | 20294 | else |
6d153f56 GM |
20295 | |
20296 | ||
3e0be4ab | 20297 | $as_echo "#define va_copy gl_va_copy" >>confdefs.h |
6d153f56 | 20298 | |
3e0be4ab | 20299 | fi |
6d153f56 | 20300 | fi |
6d153f56 | 20301 | fi |
6d153f56 | 20302 | |
3e0be4ab GM |
20303 | if test -n "$STDARG_H"; then |
20304 | GL_GENERATE_STDARG_H_TRUE= | |
20305 | GL_GENERATE_STDARG_H_FALSE='#' | |
6d153f56 | 20306 | else |
3e0be4ab GM |
20307 | GL_GENERATE_STDARG_H_TRUE='#' |
20308 | GL_GENERATE_STDARG_H_FALSE= | |
6d153f56 GM |
20309 | fi |
20310 | ||
a451f14b | 20311 | |
a451f14b | 20312 | |
743c80a7 PE |
20313 | |
20314 | ||
20315 | ||
3e0be4ab | 20316 | # Define two additional variables used in the Makefile substitution. |
743c80a7 | 20317 | |
3e0be4ab GM |
20318 | if test "$ac_cv_header_stdbool_h" = yes; then |
20319 | STDBOOL_H='' | |
20320 | else | |
20321 | STDBOOL_H='stdbool.h' | |
20322 | fi | |
743c80a7 | 20323 | |
3e0be4ab GM |
20324 | if test -n "$STDBOOL_H"; then |
20325 | GL_GENERATE_STDBOOL_H_TRUE= | |
20326 | GL_GENERATE_STDBOOL_H_FALSE='#' | |
20327 | else | |
20328 | GL_GENERATE_STDBOOL_H_TRUE='#' | |
20329 | GL_GENERATE_STDBOOL_H_FALSE= | |
20330 | fi | |
743c80a7 PE |
20331 | |
20332 | ||
3e0be4ab GM |
20333 | if test "$ac_cv_type__Bool" = yes; then |
20334 | HAVE__BOOL=1 | |
20335 | else | |
20336 | HAVE__BOOL=0 | |
20337 | fi | |
743c80a7 PE |
20338 | |
20339 | ||
20340 | ||
20341 | ||
20342 | ||
3e0be4ab GM |
20343 | STDDEF_H= |
20344 | if test $gt_cv_c_wchar_t = no; then | |
20345 | HAVE_WCHAR_T=0 | |
20346 | STDDEF_H=stddef.h | |
20347 | fi | |
20348 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5 | |
20349 | $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; } | |
20350 | if test "${gl_cv_decl_null_works+set}" = set; then : | |
20351 | $as_echo_n "(cached) " >&6 | |
20352 | else | |
20353 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
20354 | /* end confdefs.h. */ | |
20355 | #include <stddef.h> | |
20356 | int test[2 * (sizeof NULL == sizeof (void *)) -1]; | |
a451f14b | 20357 | |
3e0be4ab GM |
20358 | int |
20359 | main () | |
20360 | { | |
a451f14b | 20361 | |
3e0be4ab GM |
20362 | ; |
20363 | return 0; | |
20364 | } | |
20365 | _ACEOF | |
20366 | if ac_fn_c_try_compile "$LINENO"; then : | |
20367 | gl_cv_decl_null_works=yes | |
20368 | else | |
20369 | gl_cv_decl_null_works=no | |
20370 | fi | |
20371 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
20372 | fi | |
20373 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5 | |
20374 | $as_echo "$gl_cv_decl_null_works" >&6; } | |
20375 | if test $gl_cv_decl_null_works = no; then | |
20376 | REPLACE_NULL=1 | |
20377 | STDDEF_H=stddef.h | |
20378 | fi | |
a451f14b | 20379 | |
3e0be4ab GM |
20380 | if test -n "$STDDEF_H"; then |
20381 | GL_GENERATE_STDDEF_H_TRUE= | |
20382 | GL_GENERATE_STDDEF_H_FALSE='#' | |
20383 | else | |
20384 | GL_GENERATE_STDDEF_H_TRUE='#' | |
20385 | GL_GENERATE_STDDEF_H_FALSE= | |
20386 | fi | |
a451f14b | 20387 | |
3e0be4ab | 20388 | if test -n "$STDDEF_H"; then |
743c80a7 | 20389 | |
743c80a7 PE |
20390 | |
20391 | ||
20392 | ||
20393 | ||
20394 | ||
20395 | ||
20396 | ||
3e0be4ab GM |
20397 | if test $gl_cv_have_include_next = yes; then |
20398 | gl_cv_next_stddef_h='<'stddef.h'>' | |
20399 | else | |
20400 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5 | |
20401 | $as_echo_n "checking absolute name of <stddef.h>... " >&6; } | |
20402 | if test "${gl_cv_next_stddef_h+set}" = set; then : | |
20403 | $as_echo_n "(cached) " >&6 | |
20404 | else | |
743c80a7 | 20405 | |
3e0be4ab GM |
20406 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
20407 | /* end confdefs.h. */ | |
20408 | #include <stddef.h> | |
743c80a7 | 20409 | |
3e0be4ab GM |
20410 | _ACEOF |
20411 | case "$host_os" in | |
20412 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
20413 | *) gl_absname_cpp="$ac_cpp" ;; | |
20414 | esac | |
20415 | gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
20416 | sed -n '\#/stddef.h#{ | |
20417 | s#.*"\(.*/stddef.h\)".*#\1# | |
20418 | s#^/[^/]#//&# | |
20419 | p | |
20420 | q | |
20421 | }'`'"' | |
6d153f56 | 20422 | |
743c80a7 | 20423 | |
3e0be4ab GM |
20424 | fi |
20425 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5 | |
20426 | $as_echo "$gl_cv_next_stddef_h" >&6; } | |
20427 | fi | |
20428 | NEXT_STDDEF_H=$gl_cv_next_stddef_h | |
743c80a7 | 20429 | |
3e0be4ab GM |
20430 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then |
20431 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
20432 | gl_next_as_first_directive='<'stddef.h'>' | |
20433 | else | |
20434 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
20435 | gl_next_as_first_directive=$gl_cv_next_stddef_h | |
20436 | fi | |
20437 | NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive | |
743c80a7 PE |
20438 | |
20439 | ||
067d23c9 | 20440 | |
067d23c9 | 20441 | |
3e0be4ab | 20442 | fi |
067d23c9 | 20443 | |
067d23c9 | 20444 | |
067d23c9 KY |
20445 | |
20446 | ||
067d23c9 | 20447 | |
067d23c9 | 20448 | |
067d23c9 | 20449 | |
067d23c9 | 20450 | |
067d23c9 | 20451 | |
067d23c9 | 20452 | |
067d23c9 | 20453 | |
067d23c9 | 20454 | |
067d23c9 | 20455 | |
3e0be4ab GM |
20456 | if test $gl_cv_have_include_next = yes; then |
20457 | gl_cv_next_stdio_h='<'stdio.h'>' | |
20458 | else | |
20459 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5 | |
20460 | $as_echo_n "checking absolute name of <stdio.h>... " >&6; } | |
20461 | if test "${gl_cv_next_stdio_h+set}" = set; then : | |
067d23c9 KY |
20462 | $as_echo_n "(cached) " >&6 |
20463 | else | |
3e0be4ab GM |
20464 | |
20465 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
067d23c9 | 20466 | /* end confdefs.h. */ |
3e0be4ab | 20467 | #include <stdio.h> |
067d23c9 | 20468 | |
067d23c9 | 20469 | _ACEOF |
3e0be4ab GM |
20470 | case "$host_os" in |
20471 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
20472 | *) gl_absname_cpp="$ac_cpp" ;; | |
20473 | esac | |
20474 | gl_cv_next_stdio_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
20475 | sed -n '\#/stdio.h#{ | |
20476 | s#.*"\(.*/stdio.h\)".*#\1# | |
20477 | s#^/[^/]#//&# | |
20478 | p | |
20479 | q | |
20480 | }'`'"' | |
20481 | ||
20482 | ||
067d23c9 | 20483 | fi |
3e0be4ab GM |
20484 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5 |
20485 | $as_echo "$gl_cv_next_stdio_h" >&6; } | |
20486 | fi | |
20487 | NEXT_STDIO_H=$gl_cv_next_stdio_h | |
067d23c9 | 20488 | |
3e0be4ab GM |
20489 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then |
20490 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
20491 | gl_next_as_first_directive='<'stdio.h'>' | |
20492 | else | |
20493 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
20494 | gl_next_as_first_directive=$gl_cv_next_stdio_h | |
20495 | fi | |
20496 | NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive | |
067d23c9 | 20497 | |
067d23c9 | 20498 | |
067d23c9 | 20499 | |
067d23c9 | 20500 | |
067d23c9 | 20501 | |
3e0be4ab GM |
20502 | GNULIB_FSCANF=1 |
20503 | GNULIB_SCANF=1 | |
20504 | GNULIB_FGETC=1 | |
20505 | GNULIB_GETC=1 | |
20506 | GNULIB_GETCHAR=1 | |
20507 | GNULIB_FGETS=1 | |
20508 | GNULIB_GETS=1 | |
20509 | GNULIB_FREAD=1 | |
067d23c9 | 20510 | |
067d23c9 | 20511 | |
3e0be4ab GM |
20512 | GNULIB_FPRINTF=1 |
20513 | GNULIB_PRINTF=1 | |
20514 | GNULIB_VFPRINTF=1 | |
20515 | GNULIB_VPRINTF=1 | |
20516 | GNULIB_FPUTC=1 | |
20517 | GNULIB_PUTC=1 | |
20518 | GNULIB_PUTCHAR=1 | |
20519 | GNULIB_FPUTS=1 | |
20520 | GNULIB_PUTS=1 | |
20521 | GNULIB_FWRITE=1 | |
067d23c9 | 20522 | |
067d23c9 | 20523 | |
067d23c9 KY |
20524 | |
20525 | ||
067d23c9 | 20526 | |
067d23c9 KY |
20527 | |
20528 | ||
20529 | ||
20530 | ||
067d23c9 | 20531 | |
067d23c9 | 20532 | |
067d23c9 | 20533 | |
067d23c9 | 20534 | |
067d23c9 | 20535 | |
067d23c9 | 20536 | |
3e0be4ab GM |
20537 | if test $gl_cv_have_include_next = yes; then |
20538 | gl_cv_next_stdlib_h='<'stdlib.h'>' | |
20539 | else | |
20540 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5 | |
20541 | $as_echo_n "checking absolute name of <stdlib.h>... " >&6; } | |
20542 | if test "${gl_cv_next_stdlib_h+set}" = set; then : | |
067d23c9 KY |
20543 | $as_echo_n "(cached) " >&6 |
20544 | else | |
067d23c9 | 20545 | |
3e0be4ab | 20546 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
067d23c9 | 20547 | /* end confdefs.h. */ |
3e0be4ab | 20548 | #include <stdlib.h> |
067d23c9 | 20549 | |
067d23c9 | 20550 | _ACEOF |
3e0be4ab GM |
20551 | case "$host_os" in |
20552 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
20553 | *) gl_absname_cpp="$ac_cpp" ;; | |
20554 | esac | |
20555 | gl_cv_next_stdlib_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
20556 | sed -n '\#/stdlib.h#{ | |
20557 | s#.*"\(.*/stdlib.h\)".*#\1# | |
20558 | s#^/[^/]#//&# | |
20559 | p | |
20560 | q | |
20561 | }'`'"' | |
20562 | ||
20563 | ||
067d23c9 | 20564 | fi |
3e0be4ab GM |
20565 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5 |
20566 | $as_echo "$gl_cv_next_stdlib_h" >&6; } | |
20567 | fi | |
20568 | NEXT_STDLIB_H=$gl_cv_next_stdlib_h | |
20569 | ||
20570 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then | |
20571 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
20572 | gl_next_as_first_directive='<'stdlib.h'>' | |
20573 | else | |
20574 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
20575 | gl_next_as_first_directive=$gl_cv_next_stdlib_h | |
20576 | fi | |
20577 | NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive | |
20578 | ||
20579 | ||
20580 | ||
20581 | ||
20582 | ||
20583 | ||
20584 | ||
20585 | ||
20586 | ||
20587 | # This defines (or not) HAVE_TZNAME and HAVE_TM_ZONE. | |
20588 | ||
20589 | ||
20590 | ||
20591 | ||
067d23c9 | 20592 | |
067d23c9 | 20593 | |
067d23c9 | 20594 | |
3e0be4ab | 20595 | $as_echo "#define my_strftime nstrftime" >>confdefs.h |
067d23c9 | 20596 | |
067d23c9 | 20597 | |
067d23c9 | 20598 | |
067d23c9 | 20599 | |
067d23c9 KY |
20600 | |
20601 | ||
067d23c9 | 20602 | |
3e0be4ab GM |
20603 | if test "$ac_cv_have_decl_strtoimax" != yes; then |
20604 | HAVE_DECL_STRTOIMAX=0 | |
20605 | ||
20606 | for ac_func in strtoimax | |
20607 | do : | |
20608 | ac_fn_c_check_func "$LINENO" "strtoimax" "ac_cv_func_strtoimax" | |
20609 | if test "x$ac_cv_func_strtoimax" = x""yes; then : | |
20610 | cat >>confdefs.h <<_ACEOF | |
20611 | #define HAVE_STRTOIMAX 1 | |
20612 | _ACEOF | |
067d23c9 | 20613 | |
067d23c9 | 20614 | fi |
3e0be4ab | 20615 | done |
067d23c9 | 20616 | |
3e0be4ab | 20617 | fi |
067d23c9 | 20618 | |
3e0be4ab | 20619 | if test "$ac_cv_have_decl_strtoimax" != yes && test $ac_cv_func_strtoimax = no; then |
067d23c9 | 20620 | |
067d23c9 | 20621 | |
067d23c9 KY |
20622 | |
20623 | ||
067d23c9 | 20624 | |
067d23c9 | 20625 | |
067d23c9 | 20626 | |
067d23c9 | 20627 | |
3e0be4ab | 20628 | gl_LIBOBJS="$gl_LIBOBJS strtoimax.$ac_objext" |
067d23c9 | 20629 | |
067d23c9 | 20630 | |
3e0be4ab GM |
20631 | ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default" |
20632 | if test "x$ac_cv_have_decl_strtoll" = x""yes; then : | |
20633 | ac_have_decl=1 | |
067d23c9 | 20634 | else |
3e0be4ab | 20635 | ac_have_decl=0 |
067d23c9 KY |
20636 | fi |
20637 | ||
3e0be4ab GM |
20638 | cat >>confdefs.h <<_ACEOF |
20639 | #define HAVE_DECL_STRTOLL $ac_have_decl | |
20640 | _ACEOF | |
067d23c9 | 20641 | |
067d23c9 | 20642 | |
067d23c9 | 20643 | |
067d23c9 KY |
20644 | fi |
20645 | ||
067d23c9 | 20646 | |
067d23c9 | 20647 | |
067d23c9 | 20648 | |
067d23c9 | 20649 | |
3e0be4ab GM |
20650 | GNULIB_STRTOIMAX=1 |
20651 | ||
20652 | ||
20653 | ||
067d23c9 | 20654 | |
067d23c9 | 20655 | |
067d23c9 | 20656 | |
3e0be4ab GM |
20657 | |
20658 | ||
20659 | if test "$ac_cv_have_decl_strtoumax" != yes; then | |
20660 | HAVE_DECL_STRTOUMAX=0 | |
20661 | ||
20662 | for ac_func in strtoumax | |
20663 | do : | |
20664 | ac_fn_c_check_func "$LINENO" "strtoumax" "ac_cv_func_strtoumax" | |
20665 | if test "x$ac_cv_func_strtoumax" = x""yes; then : | |
20666 | cat >>confdefs.h <<_ACEOF | |
20667 | #define HAVE_STRTOUMAX 1 | |
067d23c9 | 20668 | _ACEOF |
3e0be4ab | 20669 | |
067d23c9 | 20670 | fi |
3e0be4ab | 20671 | done |
067d23c9 | 20672 | |
3e0be4ab | 20673 | fi |
067d23c9 | 20674 | |
3e0be4ab | 20675 | if test "$ac_cv_have_decl_strtoumax" != yes && test $ac_cv_func_strtoumax = no; then |
067d23c9 | 20676 | |
067d23c9 | 20677 | |
067d23c9 | 20678 | |
067d23c9 | 20679 | |
067d23c9 | 20680 | |
067d23c9 | 20681 | |
3e0be4ab GM |
20682 | |
20683 | ||
20684 | gl_LIBOBJS="$gl_LIBOBJS strtoumax.$ac_objext" | |
20685 | ||
20686 | ||
20687 | ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default" | |
20688 | if test "x$ac_cv_have_decl_strtoull" = x""yes; then : | |
20689 | ac_have_decl=1 | |
067d23c9 | 20690 | else |
3e0be4ab | 20691 | ac_have_decl=0 |
067d23c9 | 20692 | fi |
3e0be4ab GM |
20693 | |
20694 | cat >>confdefs.h <<_ACEOF | |
20695 | #define HAVE_DECL_STRTOULL $ac_have_decl | |
20696 | _ACEOF | |
20697 | ||
20698 | ||
20699 | ||
067d23c9 KY |
20700 | fi |
20701 | ||
067d23c9 | 20702 | |
067d23c9 | 20703 | |
3e0be4ab GM |
20704 | |
20705 | ||
20706 | GNULIB_STRTOUMAX=1 | |
20707 | ||
20708 | ||
20709 | ||
20710 | ||
20711 | ||
20712 | ||
20713 | ||
20714 | if test $ac_cv_func_symlink = no; then | |
20715 | HAVE_SYMLINK=0 | |
20716 | else | |
20717 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether symlink handles trailing slash correctly" >&5 | |
20718 | $as_echo_n "checking whether symlink handles trailing slash correctly... " >&6; } | |
20719 | if test "${gl_cv_func_symlink_works+set}" = set; then : | |
067d23c9 KY |
20720 | $as_echo_n "(cached) " >&6 |
20721 | else | |
3e0be4ab GM |
20722 | if test "$cross_compiling" = yes; then : |
20723 | gl_cv_func_symlink_works="guessing no" | |
20724 | else | |
20725 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
067d23c9 | 20726 | /* end confdefs.h. */ |
3e0be4ab | 20727 | #include <unistd.h> |
067d23c9 | 20728 | |
067d23c9 KY |
20729 | int |
20730 | main () | |
20731 | { | |
3e0be4ab GM |
20732 | int result = 0; |
20733 | if (!symlink ("a", "conftest.link/")) | |
20734 | result |= 1; | |
20735 | if (symlink ("conftest.f", "conftest.lnk2")) | |
20736 | result |= 2; | |
20737 | else if (!symlink ("a", "conftest.lnk2/")) | |
20738 | result |= 4; | |
20739 | return result; | |
20740 | ||
067d23c9 KY |
20741 | ; |
20742 | return 0; | |
20743 | } | |
20744 | _ACEOF | |
3e0be4ab GM |
20745 | if ac_fn_c_try_run "$LINENO"; then : |
20746 | gl_cv_func_symlink_works=yes | |
067d23c9 | 20747 | else |
3e0be4ab GM |
20748 | gl_cv_func_symlink_works=no |
20749 | fi | |
20750 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
20751 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
067d23c9 KY |
20752 | fi |
20753 | ||
3e0be4ab | 20754 | rm -f conftest.f conftest.link conftest.lnk2 |
067d23c9 | 20755 | fi |
3e0be4ab GM |
20756 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_symlink_works" >&5 |
20757 | $as_echo "$gl_cv_func_symlink_works" >&6; } | |
20758 | if test "$gl_cv_func_symlink_works" != yes; then | |
20759 | REPLACE_SYMLINK=1 | |
20760 | fi | |
20761 | fi | |
067d23c9 | 20762 | |
3e0be4ab | 20763 | if test $HAVE_SYMLINK = 0 || test $REPLACE_SYMLINK = 1; then |
067d23c9 KY |
20764 | |
20765 | ||
067d23c9 | 20766 | |
067d23c9 | 20767 | |
067d23c9 | 20768 | |
067d23c9 | 20769 | |
067d23c9 | 20770 | |
3e0be4ab GM |
20771 | |
20772 | gl_LIBOBJS="$gl_LIBOBJS symlink.$ac_objext" | |
067d23c9 KY |
20773 | |
20774 | fi | |
20775 | ||
067d23c9 | 20776 | |
067d23c9 | 20777 | |
067d23c9 | 20778 | |
067d23c9 | 20779 | |
3e0be4ab | 20780 | GNULIB_SYMLINK=1 |
067d23c9 | 20781 | |
067d23c9 | 20782 | |
067d23c9 | 20783 | |
067d23c9 | 20784 | |
067d23c9 | 20785 | |
067d23c9 | 20786 | |
067d23c9 | 20787 | |
067d23c9 | 20788 | |
067d23c9 | 20789 | |
067d23c9 | 20790 | |
067d23c9 | 20791 | |
067d23c9 | 20792 | |
067d23c9 | 20793 | |
067d23c9 KY |
20794 | |
20795 | ||
20796 | ||
20797 | ||
20798 | ||
20799 | ||
20800 | ||
3e0be4ab GM |
20801 | |
20802 | if test $gl_cv_have_include_next = yes; then | |
20803 | gl_cv_next_sys_stat_h='<'sys/stat.h'>' | |
20804 | else | |
20805 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5 | |
20806 | $as_echo_n "checking absolute name of <sys/stat.h>... " >&6; } | |
20807 | if test "${gl_cv_next_sys_stat_h+set}" = set; then : | |
067d23c9 KY |
20808 | $as_echo_n "(cached) " >&6 |
20809 | else | |
3e0be4ab GM |
20810 | |
20811 | if test $ac_cv_header_sys_stat_h = yes; then | |
20812 | ||
20813 | ||
20814 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
067d23c9 | 20815 | /* end confdefs.h. */ |
3e0be4ab | 20816 | #include <sys/stat.h> |
067d23c9 | 20817 | |
067d23c9 | 20818 | _ACEOF |
3e0be4ab GM |
20819 | case "$host_os" in |
20820 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
20821 | *) gl_absname_cpp="$ac_cpp" ;; | |
20822 | esac | |
20823 | gl_cv_next_sys_stat_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
20824 | sed -n '\#/sys/stat.h#{ | |
20825 | s#.*"\(.*/sys/stat.h\)".*#\1# | |
20826 | s#^/[^/]#//&# | |
20827 | p | |
20828 | q | |
20829 | }'`'"' | |
20830 | else | |
20831 | gl_cv_next_sys_stat_h='<'sys/stat.h'>' | |
20832 | fi | |
067d23c9 | 20833 | |
067d23c9 KY |
20834 | |
20835 | fi | |
3e0be4ab GM |
20836 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5 |
20837 | $as_echo "$gl_cv_next_sys_stat_h" >&6; } | |
20838 | fi | |
20839 | NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h | |
067d23c9 | 20840 | |
3e0be4ab GM |
20841 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then |
20842 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
20843 | gl_next_as_first_directive='<'sys/stat.h'>' | |
20844 | else | |
20845 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
20846 | gl_next_as_first_directive=$gl_cv_next_sys_stat_h | |
20847 | fi | |
20848 | NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive | |
067d23c9 | 20849 | |
3e0be4ab GM |
20850 | |
20851 | ||
20852 | ||
20853 | ||
20854 | ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h> | |
20855 | #include <sys/stat.h> | |
20856 | " | |
20857 | if test "x$ac_cv_type_nlink_t" = x""yes; then : | |
067d23c9 KY |
20858 | |
20859 | else | |
067d23c9 | 20860 | |
3e0be4ab | 20861 | $as_echo "#define nlink_t int" >>confdefs.h |
067d23c9 KY |
20862 | |
20863 | fi | |
20864 | ||
067d23c9 | 20865 | |
067d23c9 | 20866 | |
3e0be4ab GM |
20867 | |
20868 | ||
20869 | ||
20870 | ||
20871 | ||
20872 | ||
20873 | ||
20874 | ||
20875 | ||
20876 | ||
20877 | ||
20878 | ||
20879 | if test $ac_cv_have_decl_localtime_r = no; then | |
20880 | HAVE_DECL_LOCALTIME_R=0 | |
20881 | fi | |
20882 | ||
20883 | ||
20884 | if test $ac_cv_func_localtime_r = yes; then | |
20885 | HAVE_LOCALTIME_R=1 | |
20886 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime_r is compatible with its POSIX signature" >&5 | |
20887 | $as_echo_n "checking whether localtime_r is compatible with its POSIX signature... " >&6; } | |
20888 | if test "${gl_cv_time_r_posix+set}" = set; then : | |
067d23c9 KY |
20889 | $as_echo_n "(cached) " >&6 |
20890 | else | |
20891 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
20892 | /* end confdefs.h. */ | |
067d23c9 | 20893 | #include <time.h> |
067d23c9 KY |
20894 | int |
20895 | main () | |
20896 | { | |
3e0be4ab GM |
20897 | /* We don't need to append 'restrict's to the argument types, |
20898 | even though the POSIX signature has the 'restrict's, | |
20899 | since C99 says they can't affect type compatibility. */ | |
20900 | struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r; | |
20901 | if (ptr) return 0; | |
20902 | /* Check the return type is a pointer. | |
20903 | On HP-UX 10 it is 'int'. */ | |
20904 | *localtime_r (0, 0); | |
067d23c9 KY |
20905 | ; |
20906 | return 0; | |
20907 | } | |
3e0be4ab | 20908 | |
067d23c9 KY |
20909 | _ACEOF |
20910 | if ac_fn_c_try_compile "$LINENO"; then : | |
3e0be4ab | 20911 | gl_cv_time_r_posix=yes |
067d23c9 | 20912 | else |
3e0be4ab | 20913 | gl_cv_time_r_posix=no |
067d23c9 KY |
20914 | fi |
20915 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
067d23c9 | 20916 | |
3e0be4ab GM |
20917 | fi |
20918 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_r_posix" >&5 | |
20919 | $as_echo "$gl_cv_time_r_posix" >&6; } | |
20920 | if test $gl_cv_time_r_posix = yes; then | |
20921 | REPLACE_LOCALTIME_R=0 | |
20922 | else | |
20923 | REPLACE_LOCALTIME_R=1 | |
067d23c9 | 20924 | fi |
3e0be4ab GM |
20925 | else |
20926 | HAVE_LOCALTIME_R=0 | |
067d23c9 | 20927 | fi |
067d23c9 | 20928 | |
3e0be4ab | 20929 | if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then |
067d23c9 | 20930 | |
067d23c9 | 20931 | |
067d23c9 | 20932 | |
067d23c9 KY |
20933 | |
20934 | ||
067d23c9 | 20935 | |
067d23c9 KY |
20936 | |
20937 | ||
3e0be4ab | 20938 | gl_LIBOBJS="$gl_LIBOBJS time_r.$ac_objext" |
067d23c9 | 20939 | |
3e0be4ab GM |
20940 | |
20941 | : | |
067d23c9 KY |
20942 | |
20943 | fi | |
20944 | ||
067d23c9 | 20945 | |
067d23c9 | 20946 | |
067d23c9 | 20947 | |
067d23c9 | 20948 | |
3e0be4ab | 20949 | GNULIB_TIME_R=1 |
067d23c9 | 20950 | |
067d23c9 | 20951 | |
067d23c9 | 20952 | |
067d23c9 | 20953 | |
067d23c9 | 20954 | |
067d23c9 | 20955 | |
067d23c9 | 20956 | |
067d23c9 | 20957 | |
067d23c9 | 20958 | |
067d23c9 | 20959 | |
067d23c9 | 20960 | |
3e0be4ab GM |
20961 | |
20962 | ||
20963 | ||
20964 | ||
20965 | ||
20966 | ||
20967 | ||
20968 | ||
20969 | if test $gl_cv_have_include_next = yes; then | |
20970 | gl_cv_next_unistd_h='<'unistd.h'>' | |
20971 | else | |
20972 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5 | |
20973 | $as_echo_n "checking absolute name of <unistd.h>... " >&6; } | |
20974 | if test "${gl_cv_next_unistd_h+set}" = set; then : | |
067d23c9 KY |
20975 | $as_echo_n "(cached) " >&6 |
20976 | else | |
067d23c9 | 20977 | |
3e0be4ab GM |
20978 | if test $ac_cv_header_unistd_h = yes; then |
20979 | ||
20980 | ||
20981 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
20982 | /* end confdefs.h. */ | |
20983 | #include <unistd.h> | |
067d23c9 | 20984 | |
067d23c9 | 20985 | _ACEOF |
3e0be4ab GM |
20986 | case "$host_os" in |
20987 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
20988 | *) gl_absname_cpp="$ac_cpp" ;; | |
20989 | esac | |
20990 | gl_cv_next_unistd_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
20991 | sed -n '\#/unistd.h#{ | |
20992 | s#.*"\(.*/unistd.h\)".*#\1# | |
20993 | s#^/[^/]#//&# | |
20994 | p | |
20995 | q | |
20996 | }'`'"' | |
20997 | else | |
20998 | gl_cv_next_unistd_h='<'unistd.h'>' | |
20999 | fi | |
067d23c9 | 21000 | |
067d23c9 | 21001 | |
067d23c9 | 21002 | fi |
3e0be4ab GM |
21003 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5 |
21004 | $as_echo "$gl_cv_next_unistd_h" >&6; } | |
21005 | fi | |
21006 | NEXT_UNISTD_H=$gl_cv_next_unistd_h | |
067d23c9 | 21007 | |
3e0be4ab GM |
21008 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then |
21009 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
21010 | gl_next_as_first_directive='<'unistd.h'>' | |
21011 | else | |
21012 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
21013 | gl_next_as_first_directive=$gl_cv_next_unistd_h | |
21014 | fi | |
21015 | NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive | |
067d23c9 | 21016 | |
067d23c9 | 21017 | |
067d23c9 | 21018 | |
067d23c9 | 21019 | |
3e0be4ab GM |
21020 | if test $ac_cv_header_unistd_h = yes; then |
21021 | HAVE_UNISTD_H=1 | |
21022 | else | |
21023 | HAVE_UNISTD_H=0 | |
21024 | fi | |
067d23c9 | 21025 | |
067d23c9 | 21026 | |
067d23c9 | 21027 | |
067d23c9 | 21028 | |
3e0be4ab GM |
21029 | gl_gnulib_enabled_dosname=false |
21030 | gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=false | |
21031 | gl_gnulib_enabled_sigprocmask=false | |
21032 | gl_gnulib_enabled_stat=false | |
21033 | gl_gnulib_enabled_strtoll=false | |
21034 | gl_gnulib_enabled_strtoull=false | |
21035 | gl_gnulib_enabled_verify=false | |
21036 | func_gl_gnulib_m4code_dosname () | |
21037 | { | |
21038 | if ! $gl_gnulib_enabled_dosname; then | |
21039 | gl_gnulib_enabled_dosname=true | |
21040 | fi | |
067d23c9 | 21041 | } |
3e0be4ab GM |
21042 | func_gl_gnulib_m4code_be453cec5eecf5731a274f2de7f2db36 () |
21043 | { | |
21044 | if ! $gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36; then | |
067d23c9 | 21045 | |
067d23c9 | 21046 | |
3e0be4ab GM |
21047 | gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=true |
21048 | fi | |
21049 | } | |
21050 | func_gl_gnulib_m4code_sigprocmask () | |
21051 | { | |
21052 | if ! $gl_gnulib_enabled_sigprocmask; then | |
21053 | ||
21054 | ||
21055 | ||
21056 | if test $gl_cv_type_sigset_t = yes; then | |
21057 | ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask" | |
21058 | if test "x$ac_cv_func_sigprocmask" = x""yes; then : | |
21059 | gl_cv_func_sigprocmask=1 | |
067d23c9 KY |
21060 | fi |
21061 | ||
3e0be4ab GM |
21062 | fi |
21063 | if test -z "$gl_cv_func_sigprocmask"; then | |
21064 | HAVE_POSIX_SIGNALBLOCKING=0 | |
21065 | fi | |
21066 | ||
21067 | if test $HAVE_POSIX_SIGNALBLOCKING = 0; then | |
21068 | ||
21069 | ||
067d23c9 | 21070 | |
067d23c9 | 21071 | |
067d23c9 | 21072 | |
067d23c9 | 21073 | |
067d23c9 | 21074 | |
067d23c9 | 21075 | |
3e0be4ab GM |
21076 | gl_LIBOBJS="$gl_LIBOBJS sigprocmask.$ac_objext" |
21077 | ||
21078 | : | |
067d23c9 KY |
21079 | fi |
21080 | ||
21081 | ||
3e0be4ab GM |
21082 | |
21083 | ||
21084 | ||
21085 | GNULIB_SIGPROCMASK=1 | |
21086 | ||
21087 | ||
21088 | ||
21089 | ||
21090 | ||
21091 | gl_gnulib_enabled_sigprocmask=true | |
21092 | fi | |
21093 | } | |
21094 | func_gl_gnulib_m4code_stat () | |
21095 | { | |
21096 | if ! $gl_gnulib_enabled_stat; then | |
21097 | ||
21098 | ||
21099 | ||
21100 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5 | |
21101 | $as_echo_n "checking whether stat handles trailing slashes on directories... " >&6; } | |
21102 | if test "${gl_cv_func_stat_dir_slash+set}" = set; then : | |
067d23c9 | 21103 | $as_echo_n "(cached) " >&6 |
3e0be4ab GM |
21104 | else |
21105 | if test "$cross_compiling" = yes; then : | |
21106 | case $host_os in | |
21107 | mingw*) gl_cv_func_stat_dir_slash="guessing no";; | |
21108 | *) gl_cv_func_stat_dir_slash="guessing yes";; | |
21109 | esac | |
067d23c9 KY |
21110 | else |
21111 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
21112 | /* end confdefs.h. */ | |
3e0be4ab GM |
21113 | #include <sys/stat.h> |
21114 | ||
067d23c9 KY |
21115 | int |
21116 | main () | |
21117 | { | |
3e0be4ab | 21118 | struct stat st; return stat (".", &st) != stat ("./", &st); |
067d23c9 KY |
21119 | ; |
21120 | return 0; | |
21121 | } | |
21122 | _ACEOF | |
3e0be4ab GM |
21123 | if ac_fn_c_try_run "$LINENO"; then : |
21124 | gl_cv_func_stat_dir_slash=yes | |
067d23c9 | 21125 | else |
3e0be4ab | 21126 | gl_cv_func_stat_dir_slash=no |
067d23c9 | 21127 | fi |
3e0be4ab GM |
21128 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
21129 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
067d23c9 | 21130 | fi |
067d23c9 KY |
21131 | |
21132 | fi | |
3e0be4ab GM |
21133 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5 |
21134 | $as_echo "$gl_cv_func_stat_dir_slash" >&6; } | |
21135 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5 | |
21136 | $as_echo_n "checking whether stat handles trailing slashes on files... " >&6; } | |
21137 | if test "${gl_cv_func_stat_file_slash+set}" = set; then : | |
067d23c9 | 21138 | $as_echo_n "(cached) " >&6 |
3e0be4ab GM |
21139 | else |
21140 | touch conftest.tmp | |
21141 | # Assume that if we have lstat, we can also check symlinks. | |
21142 | if test $ac_cv_func_lstat = yes; then | |
21143 | ln -s conftest.tmp conftest.lnk | |
21144 | fi | |
21145 | if test "$cross_compiling" = yes; then : | |
21146 | gl_cv_func_stat_file_slash="guessing no" | |
067d23c9 KY |
21147 | else |
21148 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
21149 | /* end confdefs.h. */ | |
3e0be4ab GM |
21150 | #include <sys/stat.h> |
21151 | ||
067d23c9 KY |
21152 | int |
21153 | main () | |
21154 | { | |
3e0be4ab GM |
21155 | int result = 0; |
21156 | struct stat st; | |
21157 | if (!stat ("conftest.tmp/", &st)) | |
21158 | result |= 1; | |
21159 | #if HAVE_LSTAT | |
21160 | if (!stat ("conftest.lnk/", &st)) | |
21161 | result |= 2; | |
21162 | #endif | |
21163 | return result; | |
21164 | ||
067d23c9 KY |
21165 | ; |
21166 | return 0; | |
21167 | } | |
21168 | _ACEOF | |
3e0be4ab GM |
21169 | if ac_fn_c_try_run "$LINENO"; then : |
21170 | gl_cv_func_stat_file_slash=yes | |
067d23c9 | 21171 | else |
3e0be4ab | 21172 | gl_cv_func_stat_file_slash=no |
067d23c9 | 21173 | fi |
3e0be4ab GM |
21174 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
21175 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
067d23c9 | 21176 | fi |
067d23c9 | 21177 | |
3e0be4ab GM |
21178 | rm -f conftest.tmp conftest.lnk |
21179 | fi | |
21180 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5 | |
21181 | $as_echo "$gl_cv_func_stat_file_slash" >&6; } | |
21182 | case $gl_cv_func_stat_dir_slash in | |
21183 | *no) REPLACE_STAT=1 | |
067d23c9 | 21184 | |
3e0be4ab GM |
21185 | $as_echo "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h |
21186 | ;; | |
21187 | esac | |
21188 | case $gl_cv_func_stat_file_slash in | |
21189 | *no) REPLACE_STAT=1 | |
067d23c9 | 21190 | |
3e0be4ab GM |
21191 | $as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h |
21192 | ;; | |
21193 | esac | |
067d23c9 | 21194 | |
3e0be4ab | 21195 | if test $REPLACE_STAT = 1; then |
067d23c9 | 21196 | |
067d23c9 | 21197 | |
067d23c9 | 21198 | |
067d23c9 | 21199 | |
067d23c9 KY |
21200 | |
21201 | ||
21202 | ||
067d23c9 | 21203 | |
3e0be4ab | 21204 | gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext" |
067d23c9 | 21205 | |
067d23c9 | 21206 | |
3e0be4ab GM |
21207 | |
21208 | : | |
21209 | ||
21210 | fi | |
067d23c9 KY |
21211 | |
21212 | ||
067d23c9 KY |
21213 | |
21214 | ||
21215 | ||
3e0be4ab | 21216 | GNULIB_STAT=1 |
067d23c9 KY |
21217 | |
21218 | ||
21219 | ||
21220 | ||
21221 | ||
3e0be4ab GM |
21222 | gl_gnulib_enabled_stat=true |
21223 | if $condition; then | |
21224 | func_gl_gnulib_m4code_dosname | |
21225 | fi | |
21226 | if $condition; then | |
21227 | func_gl_gnulib_m4code_verify | |
21228 | fi | |
21229 | fi | |
21230 | } | |
21231 | func_gl_gnulib_m4code_strtoll () | |
21232 | { | |
21233 | if ! $gl_gnulib_enabled_strtoll; then | |
067d23c9 KY |
21234 | |
21235 | ||
21236 | ||
3e0be4ab GM |
21237 | if test "$ac_cv_type_long_long_int" = yes; then |
21238 | for ac_func in strtoll | |
21239 | do : | |
21240 | ac_fn_c_check_func "$LINENO" "strtoll" "ac_cv_func_strtoll" | |
21241 | if test "x$ac_cv_func_strtoll" = x""yes; then : | |
21242 | cat >>confdefs.h <<_ACEOF | |
21243 | #define HAVE_STRTOLL 1 | |
21244 | _ACEOF | |
067d23c9 | 21245 | |
3e0be4ab GM |
21246 | fi |
21247 | done | |
067d23c9 | 21248 | |
3e0be4ab GM |
21249 | if test $ac_cv_func_strtoll = no; then |
21250 | HAVE_STRTOLL=0 | |
21251 | fi | |
21252 | fi | |
067d23c9 | 21253 | |
3e0be4ab | 21254 | if test $HAVE_STRTOLL = 0; then |
067d23c9 KY |
21255 | |
21256 | ||
21257 | ||
21258 | ||
21259 | ||
21260 | ||
067d23c9 KY |
21261 | |
21262 | ||
3e0be4ab | 21263 | gl_LIBOBJS="$gl_LIBOBJS strtoll.$ac_objext" |
067d23c9 KY |
21264 | |
21265 | ||
3e0be4ab | 21266 | : |
067d23c9 | 21267 | |
d6a003a8 | 21268 | fi |
067d23c9 KY |
21269 | |
21270 | ||
21271 | ||
21272 | ||
21273 | ||
3e0be4ab | 21274 | GNULIB_STRTOLL=1 |
067d23c9 KY |
21275 | |
21276 | ||
21277 | ||
21278 | ||
21279 | ||
3e0be4ab GM |
21280 | gl_gnulib_enabled_strtoll=true |
21281 | fi | |
21282 | } | |
21283 | func_gl_gnulib_m4code_strtoull () | |
21284 | { | |
21285 | if ! $gl_gnulib_enabled_strtoull; then | |
067d23c9 | 21286 | |
067d23c9 KY |
21287 | |
21288 | ||
3e0be4ab GM |
21289 | if test "$ac_cv_type_unsigned_long_long_int" = yes; then |
21290 | for ac_func in strtoull | |
21291 | do : | |
21292 | ac_fn_c_check_func "$LINENO" "strtoull" "ac_cv_func_strtoull" | |
21293 | if test "x$ac_cv_func_strtoull" = x""yes; then : | |
21294 | cat >>confdefs.h <<_ACEOF | |
21295 | #define HAVE_STRTOULL 1 | |
067d23c9 KY |
21296 | _ACEOF |
21297 | ||
d6a003a8 | 21298 | fi |
3e0be4ab | 21299 | done |
067d23c9 | 21300 | |
3e0be4ab GM |
21301 | if test $ac_cv_func_strtoull = no; then |
21302 | HAVE_STRTOULL=0 | |
21303 | fi | |
21304 | fi | |
067d23c9 | 21305 | |
3e0be4ab | 21306 | if test $HAVE_STRTOULL = 0; then |
067d23c9 | 21307 | |
067d23c9 | 21308 | |
067d23c9 | 21309 | |
067d23c9 | 21310 | |
067d23c9 KY |
21311 | |
21312 | ||
21313 | ||
21314 | ||
3e0be4ab | 21315 | gl_LIBOBJS="$gl_LIBOBJS strtoull.$ac_objext" |
067d23c9 | 21316 | |
067d23c9 | 21317 | |
3e0be4ab | 21318 | : |
067d23c9 | 21319 | |
3e0be4ab | 21320 | fi |
067d23c9 | 21321 | |
067d23c9 | 21322 | |
067d23c9 | 21323 | |
067d23c9 | 21324 | |
067d23c9 | 21325 | |
3e0be4ab | 21326 | GNULIB_STRTOULL=1 |
067d23c9 KY |
21327 | |
21328 | ||
067d23c9 KY |
21329 | |
21330 | ||
3e0be4ab GM |
21331 | |
21332 | gl_gnulib_enabled_strtoull=true | |
21333 | fi | |
21334 | } | |
21335 | func_gl_gnulib_m4code_verify () | |
21336 | { | |
21337 | if ! $gl_gnulib_enabled_verify; then | |
21338 | gl_gnulib_enabled_verify=true | |
21339 | fi | |
21340 | } | |
21341 | if test $REPLACE_GETOPT = 1; then | |
21342 | func_gl_gnulib_m4code_be453cec5eecf5731a274f2de7f2db36 | |
21343 | fi | |
21344 | if test $REPLACE_LSTAT = 1; then | |
21345 | func_gl_gnulib_m4code_dosname | |
21346 | fi | |
21347 | if test $REPLACE_LSTAT = 1; then | |
21348 | func_gl_gnulib_m4code_stat | |
21349 | fi | |
21350 | if test $HAVE_PTHREAD_SIGMASK = 0 || test $REPLACE_PTHREAD_SIGMASK = 1; then | |
21351 | func_gl_gnulib_m4code_sigprocmask | |
21352 | fi | |
21353 | if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then | |
21354 | func_gl_gnulib_m4code_stat | |
21355 | fi | |
21356 | if test "$ac_cv_have_decl_strtoimax" != yes && test $ac_cv_func_strtoimax = no; then | |
21357 | func_gl_gnulib_m4code_verify | |
21358 | fi | |
21359 | if test "$ac_cv_have_decl_strtoimax" != yes && test $ac_cv_func_strtoimax = no && test $ac_cv_type_long_long_int = yes; then | |
21360 | func_gl_gnulib_m4code_strtoll | |
21361 | fi | |
21362 | if test "$ac_cv_have_decl_strtoumax" != yes && test $ac_cv_func_strtoumax = no; then | |
21363 | func_gl_gnulib_m4code_verify | |
21364 | fi | |
21365 | if test "$ac_cv_have_decl_strtoumax" != yes && test $ac_cv_func_strtoumax = no && test $ac_cv_type_unsigned_long_long_int = yes; then | |
21366 | func_gl_gnulib_m4code_strtoull | |
21367 | fi | |
21368 | ||
21369 | if $gl_gnulib_enabled_dosname; then | |
21370 | gl_GNULIB_ENABLED_dosname_TRUE= | |
21371 | gl_GNULIB_ENABLED_dosname_FALSE='#' | |
067d23c9 | 21372 | else |
3e0be4ab GM |
21373 | gl_GNULIB_ENABLED_dosname_TRUE='#' |
21374 | gl_GNULIB_ENABLED_dosname_FALSE= | |
067d23c9 KY |
21375 | fi |
21376 | ||
3e0be4ab GM |
21377 | if $gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36; then |
21378 | gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE= | |
21379 | gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE='#' | |
21380 | else | |
21381 | gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE='#' | |
21382 | gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE= | |
21383 | fi | |
067d23c9 | 21384 | |
3e0be4ab GM |
21385 | if $gl_gnulib_enabled_sigprocmask; then |
21386 | gl_GNULIB_ENABLED_sigprocmask_TRUE= | |
21387 | gl_GNULIB_ENABLED_sigprocmask_FALSE='#' | |
21388 | else | |
21389 | gl_GNULIB_ENABLED_sigprocmask_TRUE='#' | |
21390 | gl_GNULIB_ENABLED_sigprocmask_FALSE= | |
21391 | fi | |
067d23c9 | 21392 | |
3e0be4ab GM |
21393 | if $gl_gnulib_enabled_stat; then |
21394 | gl_GNULIB_ENABLED_stat_TRUE= | |
21395 | gl_GNULIB_ENABLED_stat_FALSE='#' | |
21396 | else | |
21397 | gl_GNULIB_ENABLED_stat_TRUE='#' | |
21398 | gl_GNULIB_ENABLED_stat_FALSE= | |
21399 | fi | |
067d23c9 | 21400 | |
3e0be4ab GM |
21401 | if $gl_gnulib_enabled_strtoll; then |
21402 | gl_GNULIB_ENABLED_strtoll_TRUE= | |
21403 | gl_GNULIB_ENABLED_strtoll_FALSE='#' | |
21404 | else | |
21405 | gl_GNULIB_ENABLED_strtoll_TRUE='#' | |
21406 | gl_GNULIB_ENABLED_strtoll_FALSE= | |
21407 | fi | |
067d23c9 | 21408 | |
3e0be4ab GM |
21409 | if $gl_gnulib_enabled_strtoull; then |
21410 | gl_GNULIB_ENABLED_strtoull_TRUE= | |
21411 | gl_GNULIB_ENABLED_strtoull_FALSE='#' | |
067d23c9 | 21412 | else |
3e0be4ab GM |
21413 | gl_GNULIB_ENABLED_strtoull_TRUE='#' |
21414 | gl_GNULIB_ENABLED_strtoull_FALSE= | |
067d23c9 KY |
21415 | fi |
21416 | ||
3e0be4ab GM |
21417 | if $gl_gnulib_enabled_verify; then |
21418 | gl_GNULIB_ENABLED_verify_TRUE= | |
21419 | gl_GNULIB_ENABLED_verify_FALSE='#' | |
21420 | else | |
21421 | gl_GNULIB_ENABLED_verify_TRUE='#' | |
21422 | gl_GNULIB_ENABLED_verify_FALSE= | |
067d23c9 KY |
21423 | fi |
21424 | ||
3e0be4ab | 21425 | # End of code from modules |
067d23c9 KY |
21426 | |
21427 | ||
21428 | ||
21429 | ||
21430 | ||
21431 | ||
067d23c9 | 21432 | |
067d23c9 | 21433 | |
067d23c9 | 21434 | |
3e0be4ab GM |
21435 | gltests_libdeps= |
21436 | gltests_ltlibdeps= | |
067d23c9 | 21437 | |
067d23c9 | 21438 | |
067d23c9 | 21439 | |
067d23c9 | 21440 | |
067d23c9 KY |
21441 | |
21442 | ||
067d23c9 KY |
21443 | |
21444 | ||
3e0be4ab GM |
21445 | |
21446 | gl_source_base='tests' | |
21447 | 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 | |
21448 | ||
21449 | gl_module_indicator_condition=$gltests_WITNESS | |
21450 | ||
21451 | ||
21452 | ||
21453 | ||
21454 | ||
21455 | ||
21456 | ||
067d23c9 KY |
21457 | |
21458 | ||
21459 | ||
3e0be4ab GM |
21460 | LIBGNU_LIBDEPS="$gl_libdeps" |
21461 | ||
21462 | LIBGNU_LTLIBDEPS="$gl_ltlibdeps" | |
21463 | ||
067d23c9 KY |
21464 | |
21465 | ||
21466 | case "$opsys" in | |
21467 | aix4-2) LD_SWITCH_SYSTEM_TEMACS="-Wl,-bnodelcsect" ;; | |
21468 | ||
21469 | darwin) | |
21470 | ## The -headerpad option tells ld (see man page) to leave room at the | |
21471 | ## end of the header for adding load commands. Needed for dumping. | |
21472 | ## 0x690 is the total size of 30 segment load commands (at 56 | |
21473 | ## each); under Cocoa 31 commands are required. | |
21474 | if test "$HAVE_NS" = "yes"; then | |
21475 | libs_nsgui="-framework AppKit" | |
21476 | headerpad_extra=6C8 | |
21477 | else | |
21478 | libs_nsgui= | |
21479 | headerpad_extra=690 | |
21480 | fi | |
85cf5029 | 21481 | LD_SWITCH_SYSTEM_TEMACS="-fno-pie -prebind $libs_nsgui -Xlinker -headerpad -Xlinker $headerpad_extra" |
067d23c9 KY |
21482 | |
21483 | ## This is here because src/Makefile.in did some extra fiddling around | |
21484 | ## with LD_SWITCH_SYSTEM. The cpp logic was: | |
21485 | ## #ifndef LD_SWITCH_SYSTEM | |
21486 | ## #if !defined (__GNUC__) && ((defined (BSD_SYSTEM) && !defined (COFF))) | |
21487 | ## Since all the *bsds define LD_SWITCH_SYSTEM, this simplifies to: | |
21488 | ## not using gcc, darwin system not on an alpha (ie darwin, since | |
21489 | ## darwin + alpha does not occur). | |
21490 | ## Because this was done in src/Makefile.in, the resulting part of | |
21491 | ## LD_SWITCH_SYSTEM was not used in configure (ie, in ac_link). | |
21492 | ## It therefore seems cleaner to put this in LD_SWITCH_SYSTEM_TEMACS, | |
21493 | ## rather than LD_SWITCH_SYSTEM. | |
21494 | test "x$LD_SWITCH_SYSTEM" = "x" && test "x$GCC" != "xyes" && \ | |
21495 | LD_SWITCH_SYSTEM_TEMACS="-X $LD_SWITCH_SYSTEM_TEMACS" | |
21496 | ;; | |
21497 | ||
21498 | ## LD_SWITCH_X_SITE_AUX is a -R option saying where to find X at run-time. | |
21499 | ## When handled by cpp, this was in LD_SWITCH_SYSTEM. However, at | |
21500 | ## the point where configure sourced the s/*.h file, LD_SWITCH_X_SITE_AUX | |
21501 | ## had not yet been defined and was expanded to null. Hence LD_SWITCH_SYSTEM | |
21502 | ## had different values in configure (in ac_link) and src/Makefile.in. | |
21503 | ## It seems clearer therefore to put this piece in LD_SWITCH_SYSTEM_TEMACS. | |
21504 | gnu-linux) LD_SWITCH_SYSTEM_TEMACS="\$(LD_SWITCH_X_SITE_AUX)" ;; | |
21505 | ||
21506 | *) LD_SWITCH_SYSTEM_TEMACS= ;; | |
21507 | esac | |
21508 | ||
21509 | if test "$NS_IMPL_GNUSTEP" = "yes"; then | |
21510 | LD_SWITCH_SYSTEM_TEMACS="${LD_SWITCH_SYSTEM_TEMACS} -L${GNUSTEP_SYSTEM_LIBRARIES} ${GNUSTEP_LOCAL_LIBRARIES} -lgnustep-gui -lgnustep-base -lobjc -lpthread" | |
21511 | fi | |
21512 | ||
21513 | ||
21514 | ||
21515 | ||
21516 | LD_FIRSTFLAG= | |
21517 | ORDINARY_LINK= | |
21518 | case "$opsys" in | |
21519 | ## gnu: GNU needs its own crt0. | |
21520 | aix4-2|cygwin|darwin|gnu|hpux*|irix6-5|sol2*|unixware) ORDINARY_LINK=yes ;; | |
21521 | ||
21522 | ## On post 1.3 releases of NetBSD, gcc -nostdlib also clears the | |
21523 | ## library search parth, i.e. it won't search /usr/lib for libc and | |
21524 | ## friends. Using -nostartfiles instead avoids this problem, and | |
21525 | ## will also work on earlier NetBSD releases. | |
21526 | netbsd|openbsd) LD_FIRSTFLAG="-nostartfiles" ;; | |
21527 | ||
21528 | ## macpcc: NAKAJI Hiroyuki <nakaji@tutrp.tut.ac.jp> says | |
21529 | ## MkLinux/LinuxPPC needs this. | |
21530 | ## ibms390x only supports opsys = gnu-linux so it can be added here. | |
21531 | gnu-*) | |
21532 | case "$machine" in | |
21533 | macppc|ibms390x) LD_FIRSTFLAG="-nostdlib" ;; | |
21534 | esac | |
21535 | ;; | |
21536 | esac | |
21537 | ||
21538 | ||
21539 | if test "x$ORDINARY_LINK" = "xyes"; then | |
21540 | ||
21541 | LD_FIRSTFLAG="" | |
21542 | ||
21543 | $as_echo "#define ORDINARY_LINK 1" >>confdefs.h | |
21544 | ||
21545 | ||
21546 | ## The system files defining neither ORDINARY_LINK nor LD_FIRSTFLAG are: | |
21547 | ## freebsd, gnu-* not on macppc|ibms390x. | |
21548 | elif test "x$GCC" = "xyes" && test "x$LD_FIRSTFLAG" = "x"; then | |
21549 | ||
21550 | ## Versions of GCC >= 2.0 put their library, libgcc.a, in obscure | |
21551 | ## places that are difficult to figure out at make time. Fortunately, | |
21552 | ## these same versions allow you to pass arbitrary flags on to the | |
21553 | ## linker, so there is no reason not to use it as a linker. | |
21554 | ## | |
21555 | ## Well, it is not quite perfect. The "-nostdlib" keeps GCC from | |
21556 | ## searching for libraries in its internal directories, so we have to | |
21557 | ## ask GCC explicitly where to find libgcc.a (LIB_GCC below). | |
21558 | LD_FIRSTFLAG="-nostdlib" | |
21559 | fi | |
21560 | ||
21561 | ## FIXME? What setting of EDIT_LDFLAGS should this have? | |
21562 | test "$NS_IMPL_GNUSTEP" = "yes" && LD_FIRSTFLAG="-rdynamic" | |
21563 | ||
21564 | ||
21565 | ||
21566 | ||
21567 | ## FIXME? The logic here is not precisely the same as that above. | |
21568 | ## There is no check here for a pre-defined LD_FIRSTFLAG. | |
21569 | ## Should we only be setting LIB_GCC if LD ~ -nostdlib? | |
21570 | LIB_GCC= | |
21571 | if test "x$GCC" = "xyes" && test "x$ORDINARY_LINK" != "xyes"; then | |
21572 | ||
21573 | case "$opsys" in | |
21574 | freebsd|netbsd|openbsd) LIB_GCC= ;; | |
21575 | ||
21576 | gnu-*) | |
21577 | ## armin76@gentoo.org reported that the lgcc_s flag is necessary to | |
21578 | ## build on ARM EABI under GNU/Linux. (Bug#5518) | |
d6a003a8 AS |
21579 | case $host_cpu in |
21580 | arm*) | |
067d23c9 | 21581 | LIB_GCC="-lgcc_s" |
d6a003a8 AS |
21582 | ;; |
21583 | *) | |
067d23c9 KY |
21584 | ## FIXME? s/gnu-linux.h used to define LIB_GCC as below, then |
21585 | ## immediately undefine it again and redefine it to empty. | |
21586 | ## Was the C_SWITCH_X_SITE part really necessary? | |
21587 | ## LIB_GCC=`$CC $C_SWITCH_X_SITE -print-libgcc-file-name` | |
21588 | LIB_GCC= | |
d6a003a8 AS |
21589 | ;; |
21590 | esac | |
067d23c9 KY |
21591 | ;; |
21592 | ||
21593 | ## Ask GCC where to find libgcc.a. | |
21594 | *) LIB_GCC=`$CC -print-libgcc-file-name 2> /dev/null` ;; | |
21595 | esac | |
21596 | fi | |
21597 | ||
21598 | ||
067d23c9 KY |
21599 | ## If we're using X11/GNUstep, define some consequences. |
21600 | if test "$HAVE_X_WINDOWS" = "yes" || test "$HAVE_NS" = "yes"; then | |
21601 | ||
21602 | $as_echo "#define HAVE_WINDOW_SYSTEM 1" >>confdefs.h | |
21603 | ||
21604 | ||
21605 | $as_echo "#define HAVE_MOUSE 1" >>confdefs.h | |
21606 | ||
067d23c9 KY |
21607 | fi |
21608 | ||
21609 | ||
21610 | ||
21611 | ||
067d23c9 KY |
21612 | #### Report on what we decided to do. |
21613 | #### Report GTK as a toolkit, even if it doesn't use Xt. | |
21614 | #### It makes printing result more understandable as using GTK sets | |
21615 | #### toolkit_scroll_bars to yes by default. | |
21616 | if test "${HAVE_GTK}" = "yes"; then | |
21617 | USE_X_TOOLKIT=GTK | |
21618 | fi | |
21619 | ||
2b7f50d8 AS |
21620 | and_machfile= |
21621 | if test -n "$machfile"; then | |
21622 | and_machfile=" and \`${machfile}'" | |
21623 | fi | |
21624 | ||
067d23c9 KY |
21625 | echo " |
21626 | Configured for \`${canonical}'. | |
21627 | ||
21628 | Where should the build process find the source code? ${srcdir} | |
21629 | What operating system and machine description files should Emacs use? | |
2b7f50d8 | 21630 | \`${opsysfile}'${and_machfile} |
067d23c9 KY |
21631 | What compiler should emacs be built with? ${CC} ${CFLAGS} |
21632 | Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason} | |
21633 | Should Emacs use a relocating allocator for buffers? ${REL_ALLOC} | |
21634 | Should Emacs use mmap(2) for buffer allocation? $use_mmap_for_buffers | |
21635 | What window system should Emacs use? ${window_system} | |
21636 | What toolkit should Emacs use? ${USE_X_TOOLKIT}" | |
21637 | ||
21638 | if test -n "${x_includes}"; then | |
21639 | echo " Where do we find X Windows header files? ${x_includes}" | |
21640 | else | |
21641 | echo " Where do we find X Windows header files? Standard dirs" | |
21642 | fi | |
21643 | if test -n "${x_libraries}"; then | |
21644 | echo " Where do we find X Windows libraries? ${x_libraries}" | |
21645 | else | |
21646 | echo " Where do we find X Windows libraries? Standard dirs" | |
21647 | fi | |
21648 | ||
21649 | echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}" | |
21650 | echo " Does Emacs use -lXpm? ${HAVE_XPM}" | |
21651 | echo " Does Emacs use -ljpeg? ${HAVE_JPEG}" | |
21652 | echo " Does Emacs use -ltiff? ${HAVE_TIFF}" | |
21653 | echo " Does Emacs use a gif library? ${HAVE_GIF} $LIBGIF" | |
21654 | echo " Does Emacs use -lpng? ${HAVE_PNG}" | |
21655 | echo " Does Emacs use -lrsvg-2? ${HAVE_RSVG}" | |
21656 | echo " Does Emacs use imagemagick? ${HAVE_IMAGEMAGICK}" | |
21657 | ||
21658 | echo " Does Emacs use -lgpm? ${HAVE_GPM}" | |
21659 | echo " Does Emacs use -ldbus? ${HAVE_DBUS}" | |
21660 | echo " Does Emacs use -lgconf? ${HAVE_GCONF}" | |
f527bd02 | 21661 | echo " Does Emacs use GSettings? ${HAVE_GSETTINGS}" |
067d23c9 | 21662 | echo " Does Emacs use -lselinux? ${HAVE_LIBSELINUX}" |
b8bd6c8d | 21663 | echo " Does Emacs use -lgnutls (2.6.x or higher)? ${HAVE_GNUTLS}" |
067d23c9 KY |
21664 | echo " Does Emacs use -lxml2? ${HAVE_LIBXML2}" |
21665 | ||
21666 | echo " Does Emacs use -lfreetype? ${HAVE_FREETYPE}" | |
21667 | echo " Does Emacs use -lm17n-flt? ${HAVE_M17N_FLT}" | |
21668 | echo " Does Emacs use -lotf? ${HAVE_LIBOTF}" | |
21669 | echo " Does Emacs use -lxft? ${HAVE_XFT}" | |
21670 | ||
21671 | echo " Does Emacs use toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}" | |
21672 | echo | |
21673 | ||
21674 | if test $USE_XASSERTS = yes; then | |
21675 | echo " Compiling with asserts turned on." | |
21676 | CPPFLAGS="$CPPFLAGS -DXASSERTS=1" | |
21677 | fi | |
21678 | ||
21679 | echo | |
21680 | ||
21681 | if test "$HAVE_NS" = "yes"; then | |
21682 | echo | |
21683 | echo "You must run \"make install\" in order to test the built application. | |
21684 | The installed application will go to nextstep/Emacs.app and can be | |
21685 | run or moved from there." | |
21686 | if test "$EN_NS_SELF_CONTAINED" = "yes"; then | |
21687 | echo "The application will be fully self-contained." | |
21688 | else | |
21689 | echo "The lisp resources for the application will be installed under ${prefix}. | |
21690 | You may need to run \"make install\" with sudo. The application will fail | |
21691 | to run if these resources are not installed." | |
21692 | fi | |
21693 | echo | |
21694 | fi | |
21695 | ||
21696 | ||
21697 | # Remove any trailing slashes in these variables. | |
21698 | test "${prefix}" != NONE && | |
21699 | prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'` | |
21700 | test "${exec_prefix}" != NONE && | |
21701 | exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'` | |
21702 | ||
56ade35c GM |
21703 | 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" |
21704 | ||
21705 | 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" | |
21706 | ||
a877df06 | 21707 | |
73b78882 | 21708 | opt_makefile=test/automated/Makefile |
a877df06 | 21709 | |
56ade35c | 21710 | if test -f $srcdir/${opt_makefile}.in; then |
73b78882 | 21711 | SUBDIR_MAKEFILES="$SUBDIR_MAKEFILES $opt_makefile" |
56ade35c | 21712 | ac_config_files="$ac_config_files test/automated/Makefile" |
a877df06 | 21713 | |
56ade35c | 21714 | fi |
73b78882 | 21715 | |
56ade35c | 21716 | SUBDIR_MAKEFILES_IN=`echo " ${SUBDIR_MAKEFILES}" | sed -e 's| | $(srcdir)/|g' -e 's|Makefile|Makefile.in|g'` |
73b78882 | 21717 | |
067d23c9 | 21718 | |
9411886d PE |
21719 | |
21720 | ac_config_commands="$ac_config_commands mkdirs" | |
21721 | ||
21722 | ||
21723 | ac_config_commands="$ac_config_commands epaths" | |
21724 | ||
21725 | ||
21726 | ac_config_commands="$ac_config_commands gdbinit" | |
21727 | ||
067d23c9 KY |
21728 | |
21729 | cat >confcache <<\_ACEOF | |
21730 | # This file is a shell script that caches the results of configure | |
21731 | # tests run on this system so they can be shared between configure | |
21732 | # scripts and configure runs, see configure's option --config-cache. | |
21733 | # It is not useful on other systems. If it contains results you don't | |
21734 | # want to keep, you may remove or edit it. | |
21735 | # | |
21736 | # config.status only pays attention to the cache file if you give it | |
21737 | # the --recheck option to rerun configure. | |
21738 | # | |
21739 | # `ac_cv_env_foo' variables (set or unset) will be overridden when | |
21740 | # loading this file, other *unset* `ac_cv_foo' will be assigned the | |
21741 | # following values. | |
21742 | ||
21743 | _ACEOF | |
21744 | ||
21745 | # The following way of writing the cache mishandles newlines in values, | |
21746 | # but we know of no workaround that is simple, portable, and efficient. | |
21747 | # So, we kill variables containing newlines. | |
21748 | # Ultrix sh set writes to stderr and can't be redirected directly, | |
21749 | # and sets the high bit in the cache file unless we assign to the vars. | |
21750 | ( | |
21751 | for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do | |
21752 | eval ac_val=\$$ac_var | |
21753 | case $ac_val in #( | |
21754 | *${as_nl}*) | |
21755 | case $ac_var in #( | |
21756 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
21757 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
21758 | esac | |
21759 | case $ac_var in #( | |
21760 | _ | IFS | as_nl) ;; #( | |
21761 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
21762 | *) { eval $ac_var=; unset $ac_var;} ;; | |
21763 | esac ;; | |
21764 | esac | |
21765 | done | |
21766 | ||
21767 | (set) 2>&1 | | |
21768 | case $as_nl`(ac_space=' '; set) 2>&1` in #( | |
21769 | *${as_nl}ac_space=\ *) | |
21770 | # `set' does not quote correctly, so add quotes: double-quote | |
21771 | # substitution turns \\\\ into \\, and sed turns \\ into \. | |
21772 | sed -n \ | |
21773 | "s/'/'\\\\''/g; | |
21774 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" | |
21775 | ;; #( | |
21776 | *) | |
21777 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
21778 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" | |
21779 | ;; | |
21780 | esac | | |
21781 | sort | |
21782 | ) | | |
21783 | sed ' | |
21784 | /^ac_cv_env_/b end | |
21785 | t clear | |
21786 | :clear | |
21787 | s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ | |
21788 | t end | |
21789 | s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ | |
21790 | :end' >>confcache | |
21791 | if diff "$cache_file" confcache >/dev/null 2>&1; then :; else | |
21792 | if test -w "$cache_file"; then | |
5f64f7bd | 21793 | test "x$cache_file" != "x/dev/null" && |
067d23c9 KY |
21794 | { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 |
21795 | $as_echo "$as_me: updating cache $cache_file" >&6;} | |
5f64f7bd | 21796 | cat confcache >$cache_file |
067d23c9 KY |
21797 | else |
21798 | { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 | |
21799 | $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} | |
21800 | fi | |
21801 | fi | |
21802 | rm -f confcache | |
21803 | ||
21804 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
21805 | # Let make expand exec_prefix. | |
21806 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
21807 | ||
21808 | DEFS=-DHAVE_CONFIG_H | |
21809 | ||
21810 | ac_libobjs= | |
21811 | ac_ltlibobjs= | |
21812 | for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue | |
21813 | # 1. Remove the extension, and $U if already installed. | |
21814 | ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' | |
21815 | ac_i=`$as_echo "$ac_i" | sed "$ac_script"` | |
21816 | # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR | |
21817 | # will be set to the directory where LIBOBJS objects are built. | |
21818 | as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" | |
21819 | as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' | |
21820 | done | |
21821 | LIBOBJS=$ac_libobjs | |
21822 | ||
21823 | LTLIBOBJS=$ac_ltlibobjs | |
21824 | ||
21825 | ||
743c80a7 PE |
21826 | if test -n "$EXEEXT"; then |
21827 | am__EXEEXT_TRUE= | |
21828 | am__EXEEXT_FALSE='#' | |
21829 | else | |
21830 | am__EXEEXT_TRUE='#' | |
21831 | am__EXEEXT_FALSE= | |
21832 | fi | |
21833 | ||
21834 | if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then | |
5f64f7bd | 21835 | as_fn_error "conditional \"AMDEP\" was never defined. |
743c80a7 PE |
21836 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
21837 | fi | |
21838 | if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then | |
5f64f7bd | 21839 | as_fn_error "conditional \"am__fastdepCC\" was never defined. |
743c80a7 PE |
21840 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
21841 | fi | |
21842 | ||
21843 | if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then | |
5f64f7bd | 21844 | as_fn_error "conditional \"GL_COND_LIBTOOL\" was never defined. |
743c80a7 PE |
21845 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
21846 | fi | |
4fc2b746 GM |
21847 | if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then |
21848 | as_fn_error "conditional \"GL_GENERATE_ALLOCA_H\" was never defined. | |
21849 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
21850 | fi | |
743c80a7 | 21851 | |
4fda9c95 GM |
21852 | if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then |
21853 | as_fn_error "conditional \"GL_GENERATE_STDINT_H\" was never defined. | |
21854 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
21855 | fi | |
6d153f56 GM |
21856 | if test -z "${GL_GENERATE_STDARG_H_TRUE}" && test -z "${GL_GENERATE_STDARG_H_FALSE}"; then |
21857 | as_fn_error "conditional \"GL_GENERATE_STDARG_H\" was never defined. | |
21858 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
21859 | fi | |
6c051bab | 21860 | if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then |
5f64f7bd | 21861 | as_fn_error "conditional \"GL_GENERATE_STDBOOL_H\" was never defined. |
6c051bab GM |
21862 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
21863 | fi | |
21864 | if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then | |
5f64f7bd | 21865 | as_fn_error "conditional \"GL_GENERATE_STDDEF_H\" was never defined. |
6c051bab GM |
21866 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
21867 | fi | |
6d153f56 GM |
21868 | if test -z "${gl_GNULIB_ENABLED_dosname_TRUE}" && test -z "${gl_GNULIB_ENABLED_dosname_FALSE}"; then |
21869 | as_fn_error "conditional \"gl_GNULIB_ENABLED_dosname\" was never defined. | |
21870 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
21871 | fi | |
21872 | if test -z "${gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE}" && test -z "${gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE}"; then | |
21873 | as_fn_error "conditional \"gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36\" was never defined. | |
21874 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
21875 | fi | |
3e0be4ab GM |
21876 | if test -z "${gl_GNULIB_ENABLED_sigprocmask_TRUE}" && test -z "${gl_GNULIB_ENABLED_sigprocmask_FALSE}"; then |
21877 | as_fn_error "conditional \"gl_GNULIB_ENABLED_sigprocmask\" was never defined. | |
21878 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
21879 | fi | |
6d153f56 GM |
21880 | if test -z "${gl_GNULIB_ENABLED_stat_TRUE}" && test -z "${gl_GNULIB_ENABLED_stat_FALSE}"; then |
21881 | as_fn_error "conditional \"gl_GNULIB_ENABLED_stat\" was never defined. | |
21882 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
21883 | fi | |
3e0be4ab GM |
21884 | if test -z "${gl_GNULIB_ENABLED_strtoll_TRUE}" && test -z "${gl_GNULIB_ENABLED_strtoll_FALSE}"; then |
21885 | as_fn_error "conditional \"gl_GNULIB_ENABLED_strtoll\" was never defined. | |
21886 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
21887 | fi | |
6d153f56 GM |
21888 | if test -z "${gl_GNULIB_ENABLED_strtoull_TRUE}" && test -z "${gl_GNULIB_ENABLED_strtoull_FALSE}"; then |
21889 | as_fn_error "conditional \"gl_GNULIB_ENABLED_strtoull\" was never defined. | |
21890 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
21891 | fi | |
21892 | if test -z "${gl_GNULIB_ENABLED_verify_TRUE}" && test -z "${gl_GNULIB_ENABLED_verify_FALSE}"; then | |
21893 | as_fn_error "conditional \"gl_GNULIB_ENABLED_verify\" was never defined. | |
21894 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
6c051bab | 21895 | fi |
942f733f | 21896 | |
743c80a7 PE |
21897 | gl_libobjs= |
21898 | gl_ltlibobjs= | |
21899 | if test -n "$gl_LIBOBJS"; then | |
21900 | # Remove the extension. | |
21901 | sed_drop_objext='s/\.o$//;s/\.obj$//' | |
21902 | for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do | |
21903 | gl_libobjs="$gl_libobjs $i.$ac_objext" | |
21904 | gl_ltlibobjs="$gl_ltlibobjs $i.lo" | |
21905 | done | |
21906 | fi | |
21907 | gl_LIBOBJS=$gl_libobjs | |
21908 | ||
21909 | gl_LTLIBOBJS=$gl_ltlibobjs | |
21910 | ||
21911 | ||
21912 | ||
21913 | gltests_libobjs= | |
21914 | gltests_ltlibobjs= | |
21915 | if test -n "$gltests_LIBOBJS"; then | |
21916 | # Remove the extension. | |
21917 | sed_drop_objext='s/\.o$//;s/\.obj$//' | |
21918 | for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do | |
21919 | gltests_libobjs="$gltests_libobjs $i.$ac_objext" | |
21920 | gltests_ltlibobjs="$gltests_ltlibobjs $i.lo" | |
21921 | done | |
21922 | fi | |
21923 | gltests_LIBOBJS=$gltests_libobjs | |
21924 | ||
21925 | gltests_LTLIBOBJS=$gltests_ltlibobjs | |
21926 | ||
067d23c9 KY |
21927 | |
21928 | ||
5f64f7bd | 21929 | : ${CONFIG_STATUS=./config.status} |
067d23c9 KY |
21930 | ac_write_fail=0 |
21931 | ac_clean_files_save=$ac_clean_files | |
21932 | ac_clean_files="$ac_clean_files $CONFIG_STATUS" | |
21933 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 | |
21934 | $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} | |
21935 | as_write_fail=0 | |
21936 | cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 | |
21937 | #! $SHELL | |
21938 | # Generated by $as_me. | |
21939 | # Run this file to recreate the current configuration. | |
21940 | # Compiler output produced by configure, useful for debugging | |
21941 | # configure, is in config.log if it exists. | |
21942 | ||
21943 | debug=false | |
21944 | ac_cs_recheck=false | |
21945 | ac_cs_silent=false | |
21946 | ||
21947 | SHELL=\${CONFIG_SHELL-$SHELL} | |
21948 | export SHELL | |
21949 | _ASEOF | |
21950 | cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 | |
21951 | ## -------------------- ## | |
21952 | ## M4sh Initialization. ## | |
21953 | ## -------------------- ## | |
21954 | ||
21955 | # Be more Bourne compatible | |
21956 | DUALCASE=1; export DUALCASE # for MKS sh | |
21957 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : | |
21958 | emulate sh | |
21959 | NULLCMD=: | |
21960 | # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which | |
21961 | # is contrary to our usage. Disable this feature. | |
21962 | alias -g '${1+"$@"}'='"$@"' | |
21963 | setopt NO_GLOB_SUBST | |
21964 | else | |
21965 | case `(set -o) 2>/dev/null` in #( | |
21966 | *posix*) : | |
21967 | set -o posix ;; #( | |
21968 | *) : | |
21969 | ;; | |
21970 | esac | |
21971 | fi | |
21972 | ||
21973 | ||
21974 | as_nl=' | |
21975 | ' | |
21976 | export as_nl | |
21977 | # Printing a long string crashes Solaris 7 /usr/bin/printf. | |
21978 | as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' | |
21979 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo | |
21980 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo | |
21981 | # Prefer a ksh shell builtin over an external printf program on Solaris, | |
21982 | # but without wasting forks for bash or zsh. | |
21983 | if test -z "$BASH_VERSION$ZSH_VERSION" \ | |
21984 | && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then | |
21985 | as_echo='print -r --' | |
21986 | as_echo_n='print -rn --' | |
21987 | elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then | |
21988 | as_echo='printf %s\n' | |
21989 | as_echo_n='printf %s' | |
21990 | else | |
21991 | if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then | |
21992 | as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' | |
21993 | as_echo_n='/usr/ucb/echo -n' | |
21994 | else | |
21995 | as_echo_body='eval expr "X$1" : "X\\(.*\\)"' | |
21996 | as_echo_n_body='eval | |
21997 | arg=$1; | |
21998 | case $arg in #( | |
21999 | *"$as_nl"*) | |
22000 | expr "X$arg" : "X\\(.*\\)$as_nl"; | |
22001 | arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; | |
22002 | esac; | |
22003 | expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" | |
22004 | ' | |
22005 | export as_echo_n_body | |
22006 | as_echo_n='sh -c $as_echo_n_body as_echo' | |
22007 | fi | |
22008 | export as_echo_body | |
22009 | as_echo='sh -c $as_echo_body as_echo' | |
22010 | fi | |
22011 | ||
22012 | # The user is always right. | |
22013 | if test "${PATH_SEPARATOR+set}" != set; then | |
22014 | PATH_SEPARATOR=: | |
22015 | (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { | |
22016 | (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || | |
22017 | PATH_SEPARATOR=';' | |
22018 | } | |
22019 | fi | |
22020 | ||
22021 | ||
22022 | # IFS | |
22023 | # We need space, tab and new line, in precisely that order. Quoting is | |
22024 | # there to prevent editors from complaining about space-tab. | |
22025 | # (If _AS_PATH_WALK were called with IFS unset, it would disable word | |
22026 | # splitting by setting IFS to empty value.) | |
22027 | IFS=" "" $as_nl" | |
22028 | ||
22029 | # Find who we are. Look in the path if we contain no directory separator. | |
22030 | case $0 in #(( | |
22031 | *[\\/]* ) as_myself=$0 ;; | |
22032 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
22033 | for as_dir in $PATH | |
22034 | do | |
22035 | IFS=$as_save_IFS | |
22036 | test -z "$as_dir" && as_dir=. | |
22037 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | |
22038 | done | |
22039 | IFS=$as_save_IFS | |
22040 | ||
22041 | ;; | |
22042 | esac | |
22043 | # We did not find ourselves, most probably we were run as `sh COMMAND' | |
22044 | # in which case we are not to be found in the path. | |
22045 | if test "x$as_myself" = x; then | |
22046 | as_myself=$0 | |
22047 | fi | |
22048 | if test ! -f "$as_myself"; then | |
22049 | $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 | |
22050 | exit 1 | |
22051 | fi | |
22052 | ||
22053 | # Unset variables that we do not need and which cause bugs (e.g. in | |
22054 | # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" | |
22055 | # suppresses any "Segmentation fault" message there. '((' could | |
22056 | # trigger a bug in pdksh 5.2.14. | |
22057 | for as_var in BASH_ENV ENV MAIL MAILPATH | |
22058 | do eval test x\${$as_var+set} = xset \ | |
22059 | && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : | |
22060 | done | |
22061 | PS1='$ ' | |
22062 | PS2='> ' | |
22063 | PS4='+ ' | |
22064 | ||
22065 | # NLS nuisances. | |
22066 | LC_ALL=C | |
22067 | export LC_ALL | |
22068 | LANGUAGE=C | |
22069 | export LANGUAGE | |
22070 | ||
22071 | # CDPATH. | |
22072 | (unset CDPATH) >/dev/null 2>&1 && unset CDPATH | |
22073 | ||
22074 | ||
5f64f7bd GM |
22075 | # as_fn_error ERROR [LINENO LOG_FD] |
22076 | # --------------------------------- | |
067d23c9 KY |
22077 | # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are |
22078 | # provided, also output the error to LOG_FD, referencing LINENO. Then exit the | |
5f64f7bd | 22079 | # script with status $?, using 1 if that was 0. |
067d23c9 KY |
22080 | as_fn_error () |
22081 | { | |
5f64f7bd GM |
22082 | as_status=$?; test $as_status -eq 0 && as_status=1 |
22083 | if test "$3"; then | |
22084 | as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
22085 | $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 | |
067d23c9 | 22086 | fi |
5f64f7bd | 22087 | $as_echo "$as_me: error: $1" >&2 |
067d23c9 KY |
22088 | as_fn_exit $as_status |
22089 | } # as_fn_error | |
22090 | ||
22091 | ||
22092 | # as_fn_set_status STATUS | |
22093 | # ----------------------- | |
22094 | # Set $? to STATUS, without forking. | |
22095 | as_fn_set_status () | |
22096 | { | |
22097 | return $1 | |
22098 | } # as_fn_set_status | |
22099 | ||
22100 | # as_fn_exit STATUS | |
22101 | # ----------------- | |
22102 | # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. | |
22103 | as_fn_exit () | |
22104 | { | |
22105 | set +e | |
22106 | as_fn_set_status $1 | |
22107 | exit $1 | |
22108 | } # as_fn_exit | |
22109 | ||
22110 | # as_fn_unset VAR | |
22111 | # --------------- | |
22112 | # Portably unset VAR. | |
22113 | as_fn_unset () | |
22114 | { | |
22115 | { eval $1=; unset $1;} | |
22116 | } | |
22117 | as_unset=as_fn_unset | |
22118 | # as_fn_append VAR VALUE | |
22119 | # ---------------------- | |
22120 | # Append the text in VALUE to the end of the definition contained in VAR. Take | |
22121 | # advantage of any shell optimizations that allow amortized linear growth over | |
22122 | # repeated appends, instead of the typical quadratic growth present in naive | |
22123 | # implementations. | |
22124 | if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : | |
22125 | eval 'as_fn_append () | |
22126 | { | |
22127 | eval $1+=\$2 | |
22128 | }' | |
22129 | else | |
22130 | as_fn_append () | |
22131 | { | |
22132 | eval $1=\$$1\$2 | |
22133 | } | |
22134 | fi # as_fn_append | |
22135 | ||
22136 | # as_fn_arith ARG... | |
22137 | # ------------------ | |
22138 | # Perform arithmetic evaluation on the ARGs, and store the result in the | |
22139 | # global $as_val. Take advantage of shells that can avoid forks. The arguments | |
22140 | # must be portable across $(()) and expr. | |
22141 | if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : | |
22142 | eval 'as_fn_arith () | |
22143 | { | |
22144 | as_val=$(( $* )) | |
22145 | }' | |
22146 | else | |
22147 | as_fn_arith () | |
22148 | { | |
22149 | as_val=`expr "$@" || test $? -eq 1` | |
22150 | } | |
22151 | fi # as_fn_arith | |
22152 | ||
22153 | ||
22154 | if expr a : '\(a\)' >/dev/null 2>&1 && | |
22155 | test "X`expr 00001 : '.*\(...\)'`" = X001; then | |
22156 | as_expr=expr | |
22157 | else | |
22158 | as_expr=false | |
22159 | fi | |
22160 | ||
22161 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then | |
22162 | as_basename=basename | |
22163 | else | |
22164 | as_basename=false | |
22165 | fi | |
22166 | ||
22167 | if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then | |
22168 | as_dirname=dirname | |
22169 | else | |
22170 | as_dirname=false | |
22171 | fi | |
22172 | ||
22173 | as_me=`$as_basename -- "$0" || | |
22174 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ | |
22175 | X"$0" : 'X\(//\)$' \| \ | |
22176 | X"$0" : 'X\(/\)' \| . 2>/dev/null || | |
22177 | $as_echo X/"$0" | | |
22178 | sed '/^.*\/\([^/][^/]*\)\/*$/{ | |
22179 | s//\1/ | |
22180 | q | |
22181 | } | |
22182 | /^X\/\(\/\/\)$/{ | |
22183 | s//\1/ | |
22184 | q | |
22185 | } | |
22186 | /^X\/\(\/\).*/{ | |
22187 | s//\1/ | |
22188 | q | |
22189 | } | |
22190 | s/.*/./; q'` | |
22191 | ||
22192 | # Avoid depending upon Character Ranges. | |
22193 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
22194 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
22195 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
22196 | as_cr_digits='0123456789' | |
22197 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
22198 | ||
22199 | ECHO_C= ECHO_N= ECHO_T= | |
22200 | case `echo -n x` in #((((( | |
22201 | -n*) | |
22202 | case `echo 'xy\c'` in | |
22203 | *c*) ECHO_T=' ';; # ECHO_T is single tab character. | |
22204 | xy) ECHO_C='\c';; | |
22205 | *) echo `echo ksh88 bug on AIX 6.1` > /dev/null | |
22206 | ECHO_T=' ';; | |
22207 | esac;; | |
22208 | *) | |
22209 | ECHO_N='-n';; | |
22210 | esac | |
22211 | ||
22212 | rm -f conf$$ conf$$.exe conf$$.file | |
22213 | if test -d conf$$.dir; then | |
22214 | rm -f conf$$.dir/conf$$.file | |
22215 | else | |
22216 | rm -f conf$$.dir | |
22217 | mkdir conf$$.dir 2>/dev/null | |
22218 | fi | |
22219 | if (echo >conf$$.file) 2>/dev/null; then | |
22220 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
22221 | as_ln_s='ln -s' | |
22222 | # ... but there are two gotchas: | |
22223 | # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. | |
22224 | # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. | |
22225 | # In both cases, we have to default to `cp -p'. | |
22226 | ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || | |
22227 | as_ln_s='cp -p' | |
22228 | elif ln conf$$.file conf$$ 2>/dev/null; then | |
22229 | as_ln_s=ln | |
22230 | else | |
22231 | as_ln_s='cp -p' | |
22232 | fi | |
22233 | else | |
22234 | as_ln_s='cp -p' | |
22235 | fi | |
22236 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file | |
22237 | rmdir conf$$.dir 2>/dev/null | |
22238 | ||
22239 | ||
22240 | # as_fn_mkdir_p | |
22241 | # ------------- | |
22242 | # Create "$as_dir" as a directory, including parents if necessary. | |
22243 | as_fn_mkdir_p () | |
22244 | { | |
22245 | ||
22246 | case $as_dir in #( | |
22247 | -*) as_dir=./$as_dir;; | |
22248 | esac | |
22249 | test -d "$as_dir" || eval $as_mkdir_p || { | |
22250 | as_dirs= | |
22251 | while :; do | |
22252 | case $as_dir in #( | |
22253 | *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( | |
22254 | *) as_qdir=$as_dir;; | |
22255 | esac | |
22256 | as_dirs="'$as_qdir' $as_dirs" | |
22257 | as_dir=`$as_dirname -- "$as_dir" || | |
22258 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
22259 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
22260 | X"$as_dir" : 'X\(//\)$' \| \ | |
22261 | X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || | |
22262 | $as_echo X"$as_dir" | | |
22263 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
22264 | s//\1/ | |
22265 | q | |
22266 | } | |
22267 | /^X\(\/\/\)[^/].*/{ | |
22268 | s//\1/ | |
22269 | q | |
22270 | } | |
22271 | /^X\(\/\/\)$/{ | |
22272 | s//\1/ | |
22273 | q | |
22274 | } | |
22275 | /^X\(\/\).*/{ | |
22276 | s//\1/ | |
22277 | q | |
22278 | } | |
22279 | s/.*/./; q'` | |
22280 | test -d "$as_dir" && break | |
22281 | done | |
22282 | test -z "$as_dirs" || eval "mkdir $as_dirs" | |
5f64f7bd | 22283 | } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" |
067d23c9 KY |
22284 | |
22285 | ||
22286 | } # as_fn_mkdir_p | |
22287 | if mkdir -p . 2>/dev/null; then | |
22288 | as_mkdir_p='mkdir -p "$as_dir"' | |
22289 | else | |
22290 | test -d ./-p && rmdir ./-p | |
22291 | as_mkdir_p=false | |
22292 | fi | |
22293 | ||
22294 | if test -x / >/dev/null 2>&1; then | |
22295 | as_test_x='test -x' | |
22296 | else | |
22297 | if ls -dL / >/dev/null 2>&1; then | |
22298 | as_ls_L_option=L | |
22299 | else | |
22300 | as_ls_L_option= | |
22301 | fi | |
22302 | as_test_x=' | |
22303 | eval sh -c '\'' | |
22304 | if test -d "$1"; then | |
22305 | test -d "$1/."; | |
22306 | else | |
22307 | case $1 in #( | |
22308 | -*)set "./$1";; | |
22309 | esac; | |
22310 | case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( | |
22311 | ???[sx]*):;;*)false;;esac;fi | |
22312 | '\'' sh | |
22313 | ' | |
22314 | fi | |
22315 | as_executable_p=$as_test_x | |
22316 | ||
22317 | # Sed expression to map a string onto a valid CPP name. | |
22318 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" | |
22319 | ||
22320 | # Sed expression to map a string onto a valid variable name. | |
22321 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" | |
22322 | ||
22323 | ||
22324 | exec 6>&1 | |
22325 | ## ----------------------------------- ## | |
22326 | ## Main body of $CONFIG_STATUS script. ## | |
22327 | ## ----------------------------------- ## | |
22328 | _ASEOF | |
22329 | test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 | |
22330 | ||
22331 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
22332 | # Save the log message, to keep $0 and so on meaningful, and to | |
22333 | # report actual input values of CONFIG_FILES etc. instead of their | |
22334 | # values after options handling. | |
22335 | ac_log=" | |
22336 | This file was extended by emacs $as_me 24.0.50, which was | |
5f64f7bd | 22337 | generated by GNU Autoconf 2.65. Invocation command line was |
067d23c9 KY |
22338 | |
22339 | CONFIG_FILES = $CONFIG_FILES | |
22340 | CONFIG_HEADERS = $CONFIG_HEADERS | |
22341 | CONFIG_LINKS = $CONFIG_LINKS | |
22342 | CONFIG_COMMANDS = $CONFIG_COMMANDS | |
22343 | $ $0 $@ | |
22344 | ||
22345 | on `(hostname || uname -n) 2>/dev/null | sed 1q` | |
22346 | " | |
22347 | ||
22348 | _ACEOF | |
22349 | ||
22350 | case $ac_config_files in *" | |
22351 | "*) set x $ac_config_files; shift; ac_config_files=$*;; | |
22352 | esac | |
22353 | ||
22354 | case $ac_config_headers in *" | |
22355 | "*) set x $ac_config_headers; shift; ac_config_headers=$*;; | |
22356 | esac | |
22357 | ||
22358 | ||
22359 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
22360 | # Files that config.status was made for. | |
22361 | config_files="$ac_config_files" | |
22362 | config_headers="$ac_config_headers" | |
22363 | config_commands="$ac_config_commands" | |
22364 | ||
22365 | _ACEOF | |
22366 | ||
22367 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
22368 | ac_cs_usage="\ | |
22369 | \`$as_me' instantiates files and other configuration actions | |
22370 | from templates according to the current configuration. Unless the files | |
22371 | and actions are specified as TAGs, all are instantiated by default. | |
22372 | ||
22373 | Usage: $0 [OPTION]... [TAG]... | |
22374 | ||
22375 | -h, --help print this help, then exit | |
22376 | -V, --version print version number and configuration settings, then exit | |
22377 | --config print configuration, then exit | |
22378 | -q, --quiet, --silent | |
22379 | do not print progress messages | |
22380 | -d, --debug don't remove temporary files | |
22381 | --recheck update $as_me by reconfiguring in the same conditions | |
22382 | --file=FILE[:TEMPLATE] | |
22383 | instantiate the configuration file FILE | |
22384 | --header=FILE[:TEMPLATE] | |
22385 | instantiate the configuration header FILE | |
22386 | ||
22387 | Configuration files: | |
22388 | $config_files | |
22389 | ||
22390 | Configuration headers: | |
22391 | $config_headers | |
22392 | ||
22393 | Configuration commands: | |
22394 | $config_commands | |
22395 | ||
22396 | Report bugs to the package provider." | |
22397 | ||
22398 | _ACEOF | |
22399 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
22400 | ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" | |
22401 | ac_cs_version="\\ | |
22402 | emacs config.status 24.0.50 | |
5f64f7bd | 22403 | configured by $0, generated by GNU Autoconf 2.65, |
067d23c9 KY |
22404 | with options \\"\$ac_cs_config\\" |
22405 | ||
5f64f7bd | 22406 | Copyright (C) 2009 Free Software Foundation, Inc. |
067d23c9 KY |
22407 | This config.status script is free software; the Free Software Foundation |
22408 | gives unlimited permission to copy, distribute and modify it." | |
22409 | ||
22410 | ac_pwd='$ac_pwd' | |
22411 | srcdir='$srcdir' | |
22412 | INSTALL='$INSTALL' | |
743c80a7 PE |
22413 | MKDIR_P='$MKDIR_P' |
22414 | AWK='$AWK' | |
067d23c9 KY |
22415 | test -n "\$AWK" || AWK=awk |
22416 | _ACEOF | |
22417 | ||
22418 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
22419 | # The default lists apply if the user does not specify any file. | |
22420 | ac_need_defaults=: | |
22421 | while test $# != 0 | |
22422 | do | |
22423 | case $1 in | |
5f64f7bd | 22424 | --*=*) |
067d23c9 KY |
22425 | ac_option=`expr "X$1" : 'X\([^=]*\)='` |
22426 | ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` | |
22427 | ac_shift=: | |
22428 | ;; | |
22429 | *) | |
22430 | ac_option=$1 | |
22431 | ac_optarg=$2 | |
22432 | ac_shift=shift | |
22433 | ;; | |
22434 | esac | |
22435 | ||
22436 | case $ac_option in | |
22437 | # Handling of the options. | |
22438 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) | |
22439 | ac_cs_recheck=: ;; | |
22440 | --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) | |
22441 | $as_echo "$ac_cs_version"; exit ;; | |
22442 | --config | --confi | --conf | --con | --co | --c ) | |
22443 | $as_echo "$ac_cs_config"; exit ;; | |
22444 | --debug | --debu | --deb | --de | --d | -d ) | |
22445 | debug=: ;; | |
22446 | --file | --fil | --fi | --f ) | |
22447 | $ac_shift | |
22448 | case $ac_optarg in | |
22449 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
22450 | esac | |
22451 | as_fn_append CONFIG_FILES " '$ac_optarg'" | |
22452 | ac_need_defaults=false;; | |
22453 | --header | --heade | --head | --hea ) | |
22454 | $ac_shift | |
22455 | case $ac_optarg in | |
22456 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
22457 | esac | |
22458 | as_fn_append CONFIG_HEADERS " '$ac_optarg'" | |
22459 | ac_need_defaults=false;; | |
22460 | --he | --h) | |
22461 | # Conflict between --help and --header | |
5f64f7bd | 22462 | as_fn_error "ambiguous option: \`$1' |
067d23c9 KY |
22463 | Try \`$0 --help' for more information.";; |
22464 | --help | --hel | -h ) | |
22465 | $as_echo "$ac_cs_usage"; exit ;; | |
22466 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
22467 | | -silent | --silent | --silen | --sile | --sil | --si | --s) | |
22468 | ac_cs_silent=: ;; | |
22469 | ||
22470 | # This is an error. | |
5f64f7bd | 22471 | -*) as_fn_error "unrecognized option: \`$1' |
067d23c9 KY |
22472 | Try \`$0 --help' for more information." ;; |
22473 | ||
22474 | *) as_fn_append ac_config_targets " $1" | |
22475 | ac_need_defaults=false ;; | |
22476 | ||
22477 | esac | |
22478 | shift | |
22479 | done | |
22480 | ||
22481 | ac_configure_extra_args= | |
22482 | ||
22483 | if $ac_cs_silent; then | |
22484 | exec 6>/dev/null | |
22485 | ac_configure_extra_args="$ac_configure_extra_args --silent" | |
22486 | fi | |
22487 | ||
22488 | _ACEOF | |
22489 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
22490 | if \$ac_cs_recheck; then | |
22491 | set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion | |
22492 | shift | |
22493 | \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 | |
22494 | CONFIG_SHELL='$SHELL' | |
22495 | export CONFIG_SHELL | |
22496 | exec "\$@" | |
22497 | fi | |
22498 | ||
22499 | _ACEOF | |
22500 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
22501 | exec 5>>config.log | |
22502 | { | |
22503 | echo | |
22504 | sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX | |
22505 | ## Running $as_me. ## | |
22506 | _ASBOX | |
22507 | $as_echo "$ac_log" | |
22508 | } >&5 | |
22509 | ||
22510 | _ACEOF | |
22511 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
22512 | # | |
22513 | # INIT-COMMANDS | |
22514 | # | |
743c80a7 | 22515 | AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" |
067d23c9 KY |
22516 | GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPPFLAGS="$CPPFLAGS" |
22517 | ||
22518 | _ACEOF | |
22519 | ||
22520 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
22521 | ||
22522 | # Handling of arguments. | |
22523 | for ac_config_target in $ac_config_targets | |
22524 | do | |
22525 | case $ac_config_target in | |
22526 | "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:src/config.in" ;; | |
743c80a7 | 22527 | "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; |
067d23c9 | 22528 | "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; |
743c80a7 | 22529 | "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;; |
56ade35c GM |
22530 | "lib-src/Makefile") CONFIG_FILES="$CONFIG_FILES lib-src/Makefile" ;; |
22531 | "oldXMenu/Makefile") CONFIG_FILES="$CONFIG_FILES oldXMenu/Makefile" ;; | |
22532 | "doc/emacs/Makefile") CONFIG_FILES="$CONFIG_FILES doc/emacs/Makefile" ;; | |
22533 | "doc/misc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/misc/Makefile" ;; | |
22534 | "doc/lispintro/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispintro/Makefile" ;; | |
22535 | "doc/lispref/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispref/Makefile" ;; | |
22536 | "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; | |
22537 | "lwlib/Makefile") CONFIG_FILES="$CONFIG_FILES lwlib/Makefile" ;; | |
22538 | "lisp/Makefile") CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;; | |
22539 | "leim/Makefile") CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;; | |
22540 | "test/automated/Makefile") CONFIG_FILES="$CONFIG_FILES test/automated/Makefile" ;; | |
9411886d PE |
22541 | "mkdirs") CONFIG_COMMANDS="$CONFIG_COMMANDS mkdirs" ;; |
22542 | "epaths") CONFIG_COMMANDS="$CONFIG_COMMANDS epaths" ;; | |
22543 | "gdbinit") CONFIG_COMMANDS="$CONFIG_COMMANDS gdbinit" ;; | |
067d23c9 | 22544 | |
5f64f7bd | 22545 | *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; |
067d23c9 KY |
22546 | esac |
22547 | done | |
22548 | ||
22549 | ||
22550 | # If the user did not use the arguments to specify the items to instantiate, | |
22551 | # then the envvar interface is used. Set only those that are not. | |
22552 | # We use the long form for the default assignment because of an extremely | |
22553 | # bizarre bug on SunOS 4.1.3. | |
22554 | if $ac_need_defaults; then | |
22555 | test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files | |
22556 | test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers | |
22557 | test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands | |
22558 | fi | |
22559 | ||
22560 | # Have a temporary directory for convenience. Make it in the build tree | |
22561 | # simply because there is no reason against having it here, and in addition, | |
22562 | # creating and moving files from /tmp can sometimes cause problems. | |
22563 | # Hook for its removal unless debugging. | |
22564 | # Note that there is a small window in which the directory will not be cleaned: | |
22565 | # after its creation but before its name has been assigned to `$tmp'. | |
22566 | $debug || | |
22567 | { | |
5f64f7bd | 22568 | tmp= |
067d23c9 | 22569 | trap 'exit_status=$? |
5f64f7bd | 22570 | { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status |
067d23c9 KY |
22571 | ' 0 |
22572 | trap 'as_fn_exit 1' 1 2 13 15 | |
22573 | } | |
22574 | # Create a (secure) tmp directory for tmp files. | |
22575 | ||
22576 | { | |
22577 | tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && | |
5f64f7bd | 22578 | test -n "$tmp" && test -d "$tmp" |
067d23c9 KY |
22579 | } || |
22580 | { | |
22581 | tmp=./conf$$-$RANDOM | |
22582 | (umask 077 && mkdir "$tmp") | |
5f64f7bd | 22583 | } || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 |
067d23c9 KY |
22584 | |
22585 | # Set up the scripts for CONFIG_FILES section. | |
22586 | # No need to generate them if there are no CONFIG_FILES. | |
22587 | # This happens for instance with `./config.status config.h'. | |
22588 | if test -n "$CONFIG_FILES"; then | |
22589 | ||
22590 | if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then | |
22591 | ac_cs_awk_getline=: | |
22592 | ac_cs_awk_pipe_init= | |
22593 | ac_cs_awk_read_file=' | |
22594 | while ((getline aline < (F[key])) > 0) | |
22595 | print(aline) | |
22596 | close(F[key])' | |
22597 | ac_cs_awk_pipe_fini= | |
22598 | else | |
22599 | ac_cs_awk_getline=false | |
22600 | ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\"" | |
22601 | ac_cs_awk_read_file=' | |
22602 | print "|#_!!_#|" | |
22603 | print "cat " F[key] " &&" | |
22604 | '$ac_cs_awk_pipe_init | |
22605 | # The final `:' finishes the AND list. | |
22606 | ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }' | |
22607 | fi | |
22608 | ac_cr=`echo X | tr X '\015'` | |
22609 | # On cygwin, bash can eat \r inside `` if the user requested igncr. | |
22610 | # But we know of no other shell where ac_cr would be empty at this | |
22611 | # point, so we can use a bashism as a fallback. | |
22612 | if test "x$ac_cr" = x; then | |
22613 | eval ac_cr=\$\'\\r\' | |
22614 | fi | |
22615 | ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` | |
22616 | if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then | |
5f64f7bd | 22617 | ac_cs_awk_cr='\r' |
067d23c9 KY |
22618 | else |
22619 | ac_cs_awk_cr=$ac_cr | |
22620 | fi | |
22621 | ||
5f64f7bd | 22622 | echo 'BEGIN {' >"$tmp/subs1.awk" && |
067d23c9 KY |
22623 | _ACEOF |
22624 | ||
22625 | # Create commands to substitute file output variables. | |
22626 | { | |
22627 | echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" && | |
5f64f7bd | 22628 | echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' && |
067d23c9 KY |
22629 | echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' && |
22630 | echo "_ACAWK" && | |
22631 | echo "_ACEOF" | |
22632 | } >conf$$files.sh && | |
22633 | . ./conf$$files.sh || | |
5f64f7bd | 22634 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 |
067d23c9 KY |
22635 | rm -f conf$$files.sh |
22636 | ||
22637 | { | |
22638 | echo "cat >conf$$subs.awk <<_ACEOF" && | |
22639 | echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && | |
22640 | echo "_ACEOF" | |
22641 | } >conf$$subs.sh || | |
5f64f7bd GM |
22642 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 |
22643 | ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` | |
067d23c9 KY |
22644 | ac_delim='%!_!# ' |
22645 | for ac_last_try in false false false false false :; do | |
22646 | . ./conf$$subs.sh || | |
5f64f7bd | 22647 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 |
067d23c9 KY |
22648 | |
22649 | ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` | |
22650 | if test $ac_delim_n = $ac_delim_num; then | |
22651 | break | |
22652 | elif $ac_last_try; then | |
5f64f7bd | 22653 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 |
067d23c9 KY |
22654 | else |
22655 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
22656 | fi | |
22657 | done | |
22658 | rm -f conf$$subs.sh | |
22659 | ||
22660 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
5f64f7bd | 22661 | cat >>"\$tmp/subs1.awk" <<\\_ACAWK && |
067d23c9 KY |
22662 | _ACEOF |
22663 | sed -n ' | |
22664 | h | |
22665 | s/^/S["/; s/!.*/"]=/ | |
22666 | p | |
22667 | g | |
22668 | s/^[^!]*!// | |
22669 | :repl | |
22670 | t repl | |
22671 | s/'"$ac_delim"'$// | |
22672 | t delim | |
22673 | :nl | |
22674 | h | |
22675 | s/\(.\{148\}\)..*/\1/ | |
22676 | t more1 | |
22677 | s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ | |
22678 | p | |
22679 | n | |
22680 | b repl | |
22681 | :more1 | |
22682 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
22683 | p | |
22684 | g | |
22685 | s/.\{148\}// | |
22686 | t nl | |
22687 | :delim | |
22688 | h | |
22689 | s/\(.\{148\}\)..*/\1/ | |
22690 | t more2 | |
22691 | s/["\\]/\\&/g; s/^/"/; s/$/"/ | |
22692 | p | |
22693 | b | |
22694 | :more2 | |
22695 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
22696 | p | |
22697 | g | |
22698 | s/.\{148\}// | |
22699 | t delim | |
22700 | ' <conf$$subs.awk | sed ' | |
22701 | /^[^""]/{ | |
22702 | N | |
22703 | s/\n// | |
22704 | } | |
22705 | ' >>$CONFIG_STATUS || ac_write_fail=1 | |
22706 | rm -f conf$$subs.awk | |
22707 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
22708 | _ACAWK | |
5f64f7bd | 22709 | cat >>"\$tmp/subs1.awk" <<_ACAWK && |
067d23c9 KY |
22710 | for (key in S) S_is_set[key] = 1 |
22711 | FS = "\a" | |
22712 | \$ac_cs_awk_pipe_init | |
22713 | } | |
22714 | { | |
22715 | line = $ 0 | |
22716 | nfields = split(line, field, "@") | |
22717 | substed = 0 | |
22718 | len = length(field[1]) | |
22719 | for (i = 2; i < nfields; i++) { | |
22720 | key = field[i] | |
22721 | keylen = length(key) | |
22722 | if (S_is_set[key]) { | |
22723 | value = S[key] | |
22724 | line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) | |
22725 | len += length(value) + length(field[++i]) | |
22726 | substed = 1 | |
22727 | } else | |
22728 | len += 1 + keylen | |
22729 | } | |
22730 | if (nfields == 3 && !substed) { | |
22731 | key = field[2] | |
22732 | if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) { | |
22733 | \$ac_cs_awk_read_file | |
22734 | next | |
22735 | } | |
22736 | } | |
22737 | print line | |
22738 | } | |
22739 | \$ac_cs_awk_pipe_fini | |
22740 | _ACAWK | |
22741 | _ACEOF | |
22742 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
22743 | if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then | |
22744 | sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" | |
22745 | else | |
22746 | cat | |
5f64f7bd GM |
22747 | fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ |
22748 | || as_fn_error "could not setup config files machinery" "$LINENO" 5 | |
067d23c9 KY |
22749 | _ACEOF |
22750 | ||
5f64f7bd GM |
22751 | # VPATH may cause trouble with some makes, so we remove $(srcdir), |
22752 | # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and | |
067d23c9 KY |
22753 | # trailing colons and then remove the whole line if VPATH becomes empty |
22754 | # (actually we leave an empty line to preserve line numbers). | |
22755 | if test "x$srcdir" = x.; then | |
5f64f7bd GM |
22756 | ac_vpsub='/^[ ]*VPATH[ ]*=/{ |
22757 | s/:*\$(srcdir):*/:/ | |
22758 | s/:*\${srcdir}:*/:/ | |
22759 | s/:*@srcdir@:*/:/ | |
22760 | s/^\([^=]*=[ ]*\):*/\1/ | |
067d23c9 KY |
22761 | s/:*$// |
22762 | s/^[^=]*=[ ]*$// | |
22763 | }' | |
22764 | fi | |
22765 | ||
22766 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
22767 | fi # test -n "$CONFIG_FILES" | |
22768 | ||
22769 | # Set up the scripts for CONFIG_HEADERS section. | |
22770 | # No need to generate them if there are no CONFIG_HEADERS. | |
22771 | # This happens for instance with `./config.status Makefile'. | |
22772 | if test -n "$CONFIG_HEADERS"; then | |
5f64f7bd | 22773 | cat >"$tmp/defines.awk" <<\_ACAWK || |
067d23c9 KY |
22774 | BEGIN { |
22775 | _ACEOF | |
22776 | ||
22777 | # Transform confdefs.h into an awk script `defines.awk', embedded as | |
22778 | # here-document in config.status, that substitutes the proper values into | |
22779 | # config.h.in to produce config.h. | |
22780 | ||
22781 | # Create a delimiter string that does not exist in confdefs.h, to ease | |
22782 | # handling of long lines. | |
22783 | ac_delim='%!_!# ' | |
22784 | for ac_last_try in false false :; do | |
5f64f7bd GM |
22785 | ac_t=`sed -n "/$ac_delim/p" confdefs.h` |
22786 | if test -z "$ac_t"; then | |
067d23c9 KY |
22787 | break |
22788 | elif $ac_last_try; then | |
5f64f7bd | 22789 | as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5 |
067d23c9 KY |
22790 | else |
22791 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
22792 | fi | |
22793 | done | |
22794 | ||
22795 | # For the awk script, D is an array of macro values keyed by name, | |
22796 | # likewise P contains macro parameters if any. Preserve backslash | |
22797 | # newline sequences. | |
22798 | ||
22799 | ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* | |
22800 | sed -n ' | |
22801 | s/.\{148\}/&'"$ac_delim"'/g | |
22802 | t rset | |
22803 | :rset | |
22804 | s/^[ ]*#[ ]*define[ ][ ]*/ / | |
22805 | t def | |
22806 | d | |
22807 | :def | |
22808 | s/\\$// | |
22809 | t bsnl | |
22810 | s/["\\]/\\&/g | |
22811 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
22812 | D["\1"]=" \3"/p | |
22813 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p | |
22814 | d | |
22815 | :bsnl | |
22816 | s/["\\]/\\&/g | |
22817 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
22818 | D["\1"]=" \3\\\\\\n"\\/p | |
22819 | t cont | |
22820 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p | |
22821 | t cont | |
22822 | d | |
22823 | :cont | |
22824 | n | |
22825 | s/.\{148\}/&'"$ac_delim"'/g | |
22826 | t clear | |
22827 | :clear | |
22828 | s/\\$// | |
22829 | t bsnlc | |
22830 | s/["\\]/\\&/g; s/^/"/; s/$/"/p | |
22831 | d | |
22832 | :bsnlc | |
22833 | s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p | |
22834 | b cont | |
22835 | ' <confdefs.h | sed ' | |
22836 | s/'"$ac_delim"'/"\\\ | |
22837 | "/g' >>$CONFIG_STATUS || ac_write_fail=1 | |
22838 | ||
22839 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
22840 | for (key in D) D_is_set[key] = 1 | |
22841 | FS = "\a" | |
22842 | } | |
22843 | /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { | |
22844 | line = \$ 0 | |
22845 | split(line, arg, " ") | |
22846 | if (arg[1] == "#") { | |
22847 | defundef = arg[2] | |
22848 | mac1 = arg[3] | |
22849 | } else { | |
22850 | defundef = substr(arg[1], 2) | |
22851 | mac1 = arg[2] | |
22852 | } | |
22853 | split(mac1, mac2, "(") #) | |
22854 | macro = mac2[1] | |
22855 | prefix = substr(line, 1, index(line, defundef) - 1) | |
22856 | if (D_is_set[macro]) { | |
22857 | # Preserve the white space surrounding the "#". | |
22858 | print prefix "define", macro P[macro] D[macro] | |
22859 | next | |
22860 | } else { | |
22861 | # Replace #undef with comments. This is necessary, for example, | |
22862 | # in the case of _POSIX_SOURCE, which is predefined and required | |
22863 | # on some systems where configure will not decide to define it. | |
22864 | if (defundef == "undef") { | |
22865 | print "/*", prefix defundef, macro, "*/" | |
22866 | next | |
22867 | } | |
22868 | } | |
22869 | } | |
22870 | { print } | |
22871 | _ACAWK | |
22872 | _ACEOF | |
22873 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
5f64f7bd | 22874 | as_fn_error "could not setup config headers machinery" "$LINENO" 5 |
067d23c9 KY |
22875 | fi # test -n "$CONFIG_HEADERS" |
22876 | ||
22877 | ||
22878 | eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" | |
22879 | shift | |
22880 | for ac_tag | |
22881 | do | |
22882 | case $ac_tag in | |
22883 | :[FHLC]) ac_mode=$ac_tag; continue;; | |
22884 | esac | |
22885 | case $ac_mode$ac_tag in | |
22886 | :[FHL]*:*);; | |
5f64f7bd | 22887 | :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; |
067d23c9 KY |
22888 | :[FH]-) ac_tag=-:-;; |
22889 | :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; | |
22890 | esac | |
22891 | ac_save_IFS=$IFS | |
22892 | IFS=: | |
22893 | set x $ac_tag | |
22894 | IFS=$ac_save_IFS | |
22895 | shift | |
22896 | ac_file=$1 | |
22897 | shift | |
22898 | ||
22899 | case $ac_mode in | |
22900 | :L) ac_source=$1;; | |
22901 | :[FH]) | |
22902 | ac_file_inputs= | |
22903 | for ac_f | |
22904 | do | |
22905 | case $ac_f in | |
5f64f7bd | 22906 | -) ac_f="$tmp/stdin";; |
067d23c9 KY |
22907 | *) # Look for the file first in the build tree, then in the source tree |
22908 | # (if the path is not absolute). The absolute path cannot be DOS-style, | |
22909 | # because $ac_f cannot contain `:'. | |
22910 | test -f "$ac_f" || | |
22911 | case $ac_f in | |
22912 | [\\/$]*) false;; | |
22913 | *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; | |
22914 | esac || | |
5f64f7bd | 22915 | as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; |
067d23c9 KY |
22916 | esac |
22917 | case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac | |
22918 | as_fn_append ac_file_inputs " '$ac_f'" | |
22919 | done | |
22920 | ||
22921 | # Let's still pretend it is `configure' which instantiates (i.e., don't | |
22922 | # use $as_me), people would be surprised to read: | |
22923 | # /* config.h. Generated by config.status. */ | |
22924 | configure_input='Generated from '` | |
22925 | $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' | |
22926 | `' by configure.' | |
22927 | if test x"$ac_file" != x-; then | |
22928 | configure_input="$ac_file. $configure_input" | |
22929 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 | |
22930 | $as_echo "$as_me: creating $ac_file" >&6;} | |
22931 | fi | |
22932 | # Neutralize special characters interpreted by sed in replacement strings. | |
22933 | case $configure_input in #( | |
22934 | *\&* | *\|* | *\\* ) | |
22935 | ac_sed_conf_input=`$as_echo "$configure_input" | | |
22936 | sed 's/[\\\\&|]/\\\\&/g'`;; #( | |
22937 | *) ac_sed_conf_input=$configure_input;; | |
22938 | esac | |
22939 | ||
22940 | case $ac_tag in | |
5f64f7bd GM |
22941 | *:-:* | *:-) cat >"$tmp/stdin" \ |
22942 | || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; | |
067d23c9 KY |
22943 | esac |
22944 | ;; | |
22945 | esac | |
22946 | ||
22947 | ac_dir=`$as_dirname -- "$ac_file" || | |
22948 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
22949 | X"$ac_file" : 'X\(//\)[^/]' \| \ | |
22950 | X"$ac_file" : 'X\(//\)$' \| \ | |
22951 | X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || | |
22952 | $as_echo X"$ac_file" | | |
22953 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
22954 | s//\1/ | |
22955 | q | |
22956 | } | |
22957 | /^X\(\/\/\)[^/].*/{ | |
22958 | s//\1/ | |
22959 | q | |
22960 | } | |
22961 | /^X\(\/\/\)$/{ | |
22962 | s//\1/ | |
22963 | q | |
22964 | } | |
22965 | /^X\(\/\).*/{ | |
22966 | s//\1/ | |
22967 | q | |
22968 | } | |
22969 | s/.*/./; q'` | |
22970 | as_dir="$ac_dir"; as_fn_mkdir_p | |
22971 | ac_builddir=. | |
22972 | ||
22973 | case "$ac_dir" in | |
22974 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
22975 | *) | |
22976 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
22977 | # A ".." for each directory in $ac_dir_suffix. | |
22978 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
22979 | case $ac_top_builddir_sub in | |
22980 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
22981 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
22982 | esac ;; | |
22983 | esac | |
22984 | ac_abs_top_builddir=$ac_pwd | |
22985 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
22986 | # for backward compatibility: | |
22987 | ac_top_builddir=$ac_top_build_prefix | |
22988 | ||
22989 | case $srcdir in | |
22990 | .) # We are building in place. | |
22991 | ac_srcdir=. | |
22992 | ac_top_srcdir=$ac_top_builddir_sub | |
22993 | ac_abs_top_srcdir=$ac_pwd ;; | |
22994 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
22995 | ac_srcdir=$srcdir$ac_dir_suffix; | |
22996 | ac_top_srcdir=$srcdir | |
22997 | ac_abs_top_srcdir=$srcdir ;; | |
22998 | *) # Relative name. | |
22999 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
23000 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
23001 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
23002 | esac | |
23003 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix | |
23004 | ||
23005 | ||
23006 | case $ac_mode in | |
23007 | :F) | |
23008 | # | |
23009 | # CONFIG_FILE | |
23010 | # | |
23011 | ||
23012 | case $INSTALL in | |
23013 | [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; | |
23014 | *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; | |
23015 | esac | |
743c80a7 PE |
23016 | ac_MKDIR_P=$MKDIR_P |
23017 | case $MKDIR_P in | |
23018 | [\\/$]* | ?:[\\/]* ) ;; | |
23019 | */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; | |
23020 | esac | |
067d23c9 KY |
23021 | _ACEOF |
23022 | ||
23023 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
23024 | # If the template does not know about datarootdir, expand it. | |
23025 | # FIXME: This hack should be removed a few years after 2.60. | |
23026 | ac_datarootdir_hack=; ac_datarootdir_seen= | |
23027 | ac_sed_dataroot=' | |
23028 | /datarootdir/ { | |
23029 | p | |
23030 | q | |
23031 | } | |
23032 | /@datadir@/p | |
23033 | /@docdir@/p | |
23034 | /@infodir@/p | |
23035 | /@localedir@/p | |
23036 | /@mandir@/p' | |
23037 | case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in | |
23038 | *datarootdir*) ac_datarootdir_seen=yes;; | |
23039 | *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) | |
23040 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 | |
23041 | $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} | |
23042 | _ACEOF | |
23043 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
23044 | ac_datarootdir_hack=' | |
23045 | s&@datadir@&$datadir&g | |
23046 | s&@docdir@&$docdir&g | |
23047 | s&@infodir@&$infodir&g | |
23048 | s&@localedir@&$localedir&g | |
23049 | s&@mandir@&$mandir&g | |
23050 | s&\\\${datarootdir}&$datarootdir&g' ;; | |
23051 | esac | |
23052 | _ACEOF | |
23053 | ||
23054 | # Neutralize VPATH when `$srcdir' = `.'. | |
23055 | # Shell code in configure.ac might set extrasub. | |
23056 | # FIXME: do we really want to maintain this feature? | |
23057 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
23058 | ac_sed_extra="$ac_vpsub | |
23059 | $extrasub | |
23060 | _ACEOF | |
23061 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
23062 | :t | |
23063 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b | |
23064 | s|@configure_input@|$ac_sed_conf_input|;t t | |
23065 | s&@top_builddir@&$ac_top_builddir_sub&;t t | |
23066 | s&@top_build_prefix@&$ac_top_build_prefix&;t t | |
23067 | s&@srcdir@&$ac_srcdir&;t t | |
23068 | s&@abs_srcdir@&$ac_abs_srcdir&;t t | |
23069 | s&@top_srcdir@&$ac_top_srcdir&;t t | |
23070 | s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t | |
23071 | s&@builddir@&$ac_builddir&;t t | |
23072 | s&@abs_builddir@&$ac_abs_builddir&;t t | |
23073 | s&@abs_top_builddir@&$ac_abs_top_builddir&;t t | |
23074 | s&@INSTALL@&$ac_INSTALL&;t t | |
743c80a7 | 23075 | s&@MKDIR_P@&$ac_MKDIR_P&;t t |
067d23c9 KY |
23076 | $ac_datarootdir_hack |
23077 | " | |
23078 | eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | | |
23079 | if $ac_cs_awk_getline; then | |
5f64f7bd | 23080 | $AWK -f "$tmp/subs.awk" |
067d23c9 | 23081 | else |
5f64f7bd GM |
23082 | $AWK -f "$tmp/subs.awk" | $SHELL |
23083 | fi >$tmp/out \ | |
23084 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
067d23c9 KY |
23085 | |
23086 | test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && | |
5f64f7bd GM |
23087 | { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && |
23088 | { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && | |
067d23c9 | 23089 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' |
5f64f7bd | 23090 | which seems to be undefined. Please make sure it is defined." >&5 |
067d23c9 | 23091 | $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' |
5f64f7bd | 23092 | which seems to be undefined. Please make sure it is defined." >&2;} |
067d23c9 | 23093 | |
5f64f7bd | 23094 | rm -f "$tmp/stdin" |
067d23c9 | 23095 | case $ac_file in |
5f64f7bd GM |
23096 | -) cat "$tmp/out" && rm -f "$tmp/out";; |
23097 | *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; | |
067d23c9 | 23098 | esac \ |
5f64f7bd | 23099 | || as_fn_error "could not create $ac_file" "$LINENO" 5 |
067d23c9 KY |
23100 | ;; |
23101 | :H) | |
23102 | # | |
23103 | # CONFIG_HEADER | |
23104 | # | |
23105 | if test x"$ac_file" != x-; then | |
23106 | { | |
23107 | $as_echo "/* $configure_input */" \ | |
5f64f7bd GM |
23108 | && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" |
23109 | } >"$tmp/config.h" \ | |
23110 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
23111 | if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then | |
067d23c9 KY |
23112 | { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 |
23113 | $as_echo "$as_me: $ac_file is unchanged" >&6;} | |
23114 | else | |
23115 | rm -f "$ac_file" | |
5f64f7bd GM |
23116 | mv "$tmp/config.h" "$ac_file" \ |
23117 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
067d23c9 KY |
23118 | fi |
23119 | else | |
23120 | $as_echo "/* $configure_input */" \ | |
5f64f7bd GM |
23121 | && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ |
23122 | || as_fn_error "could not create -" "$LINENO" 5 | |
067d23c9 | 23123 | fi |
743c80a7 PE |
23124 | # Compute "$ac_file"'s index in $config_headers. |
23125 | _am_arg="$ac_file" | |
23126 | _am_stamp_count=1 | |
23127 | for _am_header in $config_headers :; do | |
23128 | case $_am_header in | |
23129 | $_am_arg | $_am_arg:* ) | |
23130 | break ;; | |
23131 | * ) | |
23132 | _am_stamp_count=`expr $_am_stamp_count + 1` ;; | |
23133 | esac | |
23134 | done | |
23135 | echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || | |
23136 | $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
23137 | X"$_am_arg" : 'X\(//\)[^/]' \| \ | |
23138 | X"$_am_arg" : 'X\(//\)$' \| \ | |
23139 | X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || | |
23140 | $as_echo X"$_am_arg" | | |
23141 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
23142 | s//\1/ | |
23143 | q | |
23144 | } | |
23145 | /^X\(\/\/\)[^/].*/{ | |
23146 | s//\1/ | |
23147 | q | |
23148 | } | |
23149 | /^X\(\/\/\)$/{ | |
23150 | s//\1/ | |
23151 | q | |
23152 | } | |
23153 | /^X\(\/\).*/{ | |
23154 | s//\1/ | |
23155 | q | |
23156 | } | |
23157 | s/.*/./; q'`/stamp-h$_am_stamp_count | |
067d23c9 KY |
23158 | ;; |
23159 | ||
23160 | :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 | |
23161 | $as_echo "$as_me: executing $ac_file commands" >&6;} | |
23162 | ;; | |
23163 | esac | |
23164 | ||
23165 | ||
23166 | case $ac_file$ac_mode in | |
743c80a7 PE |
23167 | "depfiles":C) test x"$AMDEP_TRUE" != x"" || { |
23168 | # Autoconf 2.62 quotes --file arguments for eval, but not when files | |
23169 | # are listed without --file. Let's play safe and only enable the eval | |
23170 | # if we detect the quoting. | |
23171 | case $CONFIG_FILES in | |
23172 | *\'*) eval set x "$CONFIG_FILES" ;; | |
23173 | *) set x $CONFIG_FILES ;; | |
23174 | esac | |
23175 | shift | |
23176 | for mf | |
23177 | do | |
23178 | # Strip MF so we end up with the name of the file. | |
23179 | mf=`echo "$mf" | sed -e 's/:.*$//'` | |
23180 | # Check whether this is an Automake generated Makefile or not. | |
23181 | # We used to match only the files named `Makefile.in', but | |
23182 | # some people rename them; so instead we look at the file content. | |
23183 | # Grep'ing the first line is not enough: some people post-process | |
23184 | # each Makefile.in and add a new line on top of each file to say so. | |
23185 | # Grep'ing the whole file is not good either: AIX grep has a line | |
23186 | # limit of 2048, but all sed's we know have understand at least 4000. | |
23187 | if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then | |
23188 | dirpart=`$as_dirname -- "$mf" || | |
23189 | $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
23190 | X"$mf" : 'X\(//\)[^/]' \| \ | |
23191 | X"$mf" : 'X\(//\)$' \| \ | |
23192 | X"$mf" : 'X\(/\)' \| . 2>/dev/null || | |
23193 | $as_echo X"$mf" | | |
23194 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
23195 | s//\1/ | |
23196 | q | |
23197 | } | |
23198 | /^X\(\/\/\)[^/].*/{ | |
23199 | s//\1/ | |
23200 | q | |
23201 | } | |
23202 | /^X\(\/\/\)$/{ | |
23203 | s//\1/ | |
23204 | q | |
23205 | } | |
23206 | /^X\(\/\).*/{ | |
23207 | s//\1/ | |
23208 | q | |
23209 | } | |
23210 | s/.*/./; q'` | |
23211 | else | |
23212 | continue | |
23213 | fi | |
23214 | # Extract the definition of DEPDIR, am__include, and am__quote | |
23215 | # from the Makefile without running `make'. | |
23216 | DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` | |
23217 | test -z "$DEPDIR" && continue | |
23218 | am__include=`sed -n 's/^am__include = //p' < "$mf"` | |
23219 | test -z "am__include" && continue | |
23220 | am__quote=`sed -n 's/^am__quote = //p' < "$mf"` | |
23221 | # When using ansi2knr, U may be empty or an underscore; expand it | |
23222 | U=`sed -n 's/^U = //p' < "$mf"` | |
23223 | # Find all dependency output files, they are included files with | |
23224 | # $(DEPDIR) in their names. We invoke sed twice because it is the | |
23225 | # simplest approach to changing $(DEPDIR) to its actual value in the | |
23226 | # expansion. | |
23227 | for file in `sed -n " | |
23228 | s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ | |
23229 | sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do | |
23230 | # Make sure the directory exists. | |
23231 | test -f "$dirpart/$file" && continue | |
23232 | fdir=`$as_dirname -- "$file" || | |
23233 | $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
23234 | X"$file" : 'X\(//\)[^/]' \| \ | |
23235 | X"$file" : 'X\(//\)$' \| \ | |
23236 | X"$file" : 'X\(/\)' \| . 2>/dev/null || | |
23237 | $as_echo X"$file" | | |
23238 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
23239 | s//\1/ | |
23240 | q | |
23241 | } | |
23242 | /^X\(\/\/\)[^/].*/{ | |
23243 | s//\1/ | |
23244 | q | |
23245 | } | |
23246 | /^X\(\/\/\)$/{ | |
23247 | s//\1/ | |
23248 | q | |
23249 | } | |
23250 | /^X\(\/\).*/{ | |
23251 | s//\1/ | |
23252 | q | |
23253 | } | |
23254 | s/.*/./; q'` | |
23255 | as_dir=$dirpart/$fdir; as_fn_mkdir_p | |
23256 | # echo "creating $dirpart/$file" | |
23257 | echo '# dummy' > "$dirpart/$file" | |
23258 | done | |
23259 | done | |
23260 | } | |
23261 | ;; | |
9411886d | 23262 | "mkdirs":C) |
067d23c9 KY |
23263 | for dir in etc lisp ; do |
23264 | test -d ${dir} || mkdir ${dir} | |
23265 | done | |
9411886d PE |
23266 | ;; |
23267 | "epaths":C) | |
067d23c9 KY |
23268 | echo creating src/epaths.h |
23269 | ${MAKE-make} epaths-force | |
9411886d PE |
23270 | ;; |
23271 | "gdbinit":C) | |
067d23c9 KY |
23272 | if test ! -f src/.gdbinit && test -f $srcdir/src/.gdbinit; then |
23273 | echo creating src/.gdbinit | |
23274 | echo source $srcdir/src/.gdbinit > src/.gdbinit | |
23275 | fi | |
067d23c9 KY |
23276 | ;; |
23277 | ||
23278 | esac | |
23279 | done # for ac_tag | |
23280 | ||
23281 | ||
23282 | as_fn_exit 0 | |
23283 | _ACEOF | |
23284 | ac_clean_files=$ac_clean_files_save | |
23285 | ||
23286 | test $ac_write_fail = 0 || | |
5f64f7bd | 23287 | as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 |
067d23c9 KY |
23288 | |
23289 | ||
23290 | # configure is writing to config.log, and then calls config.status. | |
23291 | # config.status does its own redirection, appending to config.log. | |
23292 | # Unfortunately, on DOS this fails, as config.log is still kept open | |
23293 | # by configure, so config.status won't be able to write to it; its | |
23294 | # output is simply discarded. So we exec the FD to /dev/null, | |
23295 | # effectively closing config.log, so it can be properly (re)opened and | |
23296 | # appended to by config.status. When coming back to configure, we | |
23297 | # need to make the FD available again. | |
23298 | if test "$no_create" != yes; then | |
23299 | ac_cs_success=: | |
23300 | ac_config_status_args= | |
23301 | test "$silent" = yes && | |
23302 | ac_config_status_args="$ac_config_status_args --quiet" | |
23303 | exec 5>/dev/null | |
23304 | $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false | |
23305 | exec 5>>config.log | |
23306 | # Use ||, not &&, to avoid exiting from the if with $? = 1, which | |
23307 | # would make configure fail if this is the last instruction. | |
5f64f7bd | 23308 | $ac_cs_success || as_fn_exit $? |
067d23c9 KY |
23309 | fi |
23310 | if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then | |
23311 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 | |
23312 | $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} | |
23313 | fi | |
23314 | ||
9411886d | 23315 |