Commit | Line | Data |
---|---|---|
067d23c9 KY |
1 | #! /bin/sh |
2 | # Guess values for system-dependent variables and create Makefiles. | |
9ba41eb9 | 3 | # Generated by GNU Autoconf 2.67 for emacs 24.0.50. |
067d23c9 KY |
4 | # |
5 | # | |
6 | # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, | |
2018939f AS |
7 | # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software |
8 | # Foundation, Inc. | |
067d23c9 KY |
9 | # |
10 | # | |
11 | # This configure script is free software; the Free Software Foundation | |
12 | # gives unlimited permission to copy, distribute and modify it. | |
13 | ## -------------------- ## | |
14 | ## M4sh Initialization. ## | |
15 | ## -------------------- ## | |
16 | ||
17 | # Be more Bourne compatible | |
18 | DUALCASE=1; export DUALCASE # for MKS sh | |
19 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : | |
20 | emulate sh | |
21 | NULLCMD=: | |
22 | # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which | |
23 | # is contrary to our usage. Disable this feature. | |
24 | alias -g '${1+"$@"}'='"$@"' | |
25 | setopt NO_GLOB_SUBST | |
26 | else | |
27 | case `(set -o) 2>/dev/null` in #( | |
28 | *posix*) : | |
29 | set -o posix ;; #( | |
30 | *) : | |
31 | ;; | |
32 | esac | |
33 | fi | |
34 | ||
35 | ||
36 | as_nl=' | |
37 | ' | |
38 | export as_nl | |
39 | # Printing a long string crashes Solaris 7 /usr/bin/printf. | |
40 | as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' | |
41 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo | |
42 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo | |
43 | # Prefer a ksh shell builtin over an external printf program on Solaris, | |
44 | # but without wasting forks for bash or zsh. | |
45 | if test -z "$BASH_VERSION$ZSH_VERSION" \ | |
46 | && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then | |
47 | as_echo='print -r --' | |
48 | as_echo_n='print -rn --' | |
49 | elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then | |
50 | as_echo='printf %s\n' | |
51 | as_echo_n='printf %s' | |
52 | else | |
53 | if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then | |
54 | as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' | |
55 | as_echo_n='/usr/ucb/echo -n' | |
56 | else | |
57 | as_echo_body='eval expr "X$1" : "X\\(.*\\)"' | |
58 | as_echo_n_body='eval | |
59 | arg=$1; | |
60 | case $arg in #( | |
61 | *"$as_nl"*) | |
62 | expr "X$arg" : "X\\(.*\\)$as_nl"; | |
63 | arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; | |
64 | esac; | |
65 | expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" | |
66 | ' | |
67 | export as_echo_n_body | |
68 | as_echo_n='sh -c $as_echo_n_body as_echo' | |
69 | fi | |
70 | export as_echo_body | |
71 | as_echo='sh -c $as_echo_body as_echo' | |
72 | fi | |
73 | ||
74 | # The user is always right. | |
75 | if test "${PATH_SEPARATOR+set}" != set; then | |
76 | PATH_SEPARATOR=: | |
77 | (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { | |
78 | (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || | |
79 | PATH_SEPARATOR=';' | |
80 | } | |
81 | fi | |
82 | ||
83 | ||
84 | # IFS | |
85 | # We need space, tab and new line, in precisely that order. Quoting is | |
86 | # there to prevent editors from complaining about space-tab. | |
87 | # (If _AS_PATH_WALK were called with IFS unset, it would disable word | |
88 | # splitting by setting IFS to empty value.) | |
89 | IFS=" "" $as_nl" | |
90 | ||
91 | # Find who we are. Look in the path if we contain no directory separator. | |
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 | |
9ba41eb9 | 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" | |
2018939f | 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 | ||
2018939f AS |
359 | # as_fn_error STATUS 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 | |
2018939f | 363 | # script with STATUS, using 1 if that was 0. |
067d23c9 KY |
364 | as_fn_error () |
365 | { | |
2018939f AS |
366 | as_status=$1; test $as_status -eq 0 && as_status=1 |
367 | if test "$4"; then | |
368 | as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
369 | $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 | |
067d23c9 | 370 | fi |
2018939f | 371 | $as_echo "$as_me: error: $2" >&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. | |
2018939f | 533 | # hostname on some systems (SVR3.2, old GNU/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 | ||
594 | ac_config_libobj_dir=src | |
595 | ac_header_list= | |
e275c824 PE |
596 | gl_getopt_required=POSIX |
597 | gl_getopt_required=POSIX | |
067d23c9 | 598 | ac_func_list= |
743c80a7 PE |
599 | ac_subst_vars='gltests_LTLIBOBJS |
600 | gltests_LIBOBJS | |
601 | gl_LTLIBOBJS | |
602 | gl_LIBOBJS | |
603 | am__EXEEXT_FALSE | |
604 | am__EXEEXT_TRUE | |
605 | LTLIBOBJS | |
067d23c9 KY |
606 | WINDOW_SUPPORT |
607 | TOOLTIP_SUPPORT | |
608 | MOUSE_SUPPORT | |
609 | LIB_GCC | |
610 | LD_FIRSTFLAG | |
611 | LD_SWITCH_SYSTEM_TEMACS | |
612 | POST_ALLOC_OBJ | |
613 | PRE_ALLOC_OBJ | |
614 | CYGWIN_OBJ | |
615 | RALLOC_OBJ | |
616 | OLDXMENU_DEPS | |
617 | LIBX_OTHER | |
618 | LIBXMENU | |
619 | OLDXMENU | |
620 | OLDXMENU_TARGET | |
621 | LIBXT_OTHER | |
622 | TOOLKIT_LIBW | |
623 | WIDGET_OBJ | |
624 | XOBJ | |
625 | XMENU_OBJ | |
626 | FONT_OBJ | |
627 | OTHER_FILES | |
628 | GNU_OBJC_CFLAGS | |
629 | ns_appsrc | |
630 | ns_appresdir | |
631 | ns_appbindir | |
632 | ns_appdir | |
d6a003a8 AS |
633 | S_FILE |
634 | M_FILE | |
067d23c9 KY |
635 | X_TOOLKIT_TYPE |
636 | C_SWITCH_X_SYSTEM | |
637 | C_SWITCH_X_SITE | |
638 | LD_SWITCH_X_SITE | |
639 | gameuser | |
640 | gamedir | |
641 | bitmapdir | |
642 | archlibdir | |
643 | etcdir | |
644 | x_default_search_path | |
645 | lisppath | |
646 | locallisppath | |
647 | lispdir | |
648 | srcdir | |
649 | canonical | |
650 | configuration | |
651 | version | |
652 | KRB4LIB | |
653 | DESLIB | |
654 | KRB5LIB | |
655 | CRYPTOLIB | |
656 | COM_ERRLIB | |
657 | LIBRESOLV | |
658 | LIBHESIOD | |
659 | TERMCAP_OBJ | |
660 | LIBS_TERMCAP | |
743c80a7 PE |
661 | LIBGNU_LTLIBDEPS |
662 | LIBGNU_LIBDEPS | |
663 | gltests_WITNESS | |
e275c824 PE |
664 | HAVE_UNISTD_H |
665 | NEXT_AS_FIRST_DIRECTIVE_UNISTD_H | |
666 | NEXT_UNISTD_H | |
1fd182f0 PE |
667 | PTHREAD_H_DEFINES_STRUCT_TIMESPEC |
668 | SYS_TIME_H_DEFINES_STRUCT_TIMESPEC | |
669 | TIME_H_DEFINES_STRUCT_TIMESPEC | |
670 | NEXT_AS_FIRST_DIRECTIVE_TIME_H | |
671 | NEXT_TIME_H | |
672 | NEXT_AS_FIRST_DIRECTIVE_STDDEF_H | |
673 | NEXT_STDDEF_H | |
1fd182f0 PE |
674 | STDDEF_H |
675 | HAVE_WCHAR_T | |
676 | REPLACE_NULL | |
677 | APPLE_UNIVERSAL_BUILD | |
678 | REPLACE_TIMEGM | |
679 | REPLACE_NANOSLEEP | |
680 | REPLACE_MKTIME | |
681 | REPLACE_LOCALTIME_R | |
682 | HAVE_TIMEGM | |
683 | HAVE_STRPTIME | |
684 | HAVE_NANOSLEEP | |
685 | HAVE_DECL_LOCALTIME_R | |
686 | GNULIB_TIME_R | |
687 | GNULIB_TIMEGM | |
688 | GNULIB_STRPTIME | |
689 | GNULIB_NANOSLEEP | |
690 | GNULIB_MKTIME | |
e275c824 PE |
691 | LTLIBINTL |
692 | LIBINTL | |
693 | GETOPT_H | |
694 | HAVE_GETOPT_H | |
695 | NEXT_AS_FIRST_DIRECTIVE_GETOPT_H | |
696 | NEXT_GETOPT_H | |
697 | PRAGMA_COLUMNS | |
698 | PRAGMA_SYSTEM_HEADER | |
699 | INCLUDE_NEXT_AS_FIRST_DIRECTIVE | |
700 | INCLUDE_NEXT | |
701 | UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS | |
702 | UNISTD_H_HAVE_WINSOCK2_H | |
703 | REPLACE_WRITE | |
704 | REPLACE_USLEEP | |
705 | REPLACE_UNLINKAT | |
706 | REPLACE_UNLINK | |
707 | REPLACE_TTYNAME_R | |
708 | REPLACE_SYMLINK | |
709 | REPLACE_SLEEP | |
710 | REPLACE_RMDIR | |
711 | REPLACE_READLINK | |
712 | REPLACE_PWRITE | |
713 | REPLACE_PREAD | |
714 | REPLACE_LSEEK | |
715 | REPLACE_LINKAT | |
716 | REPLACE_LINK | |
717 | REPLACE_LCHOWN | |
718 | REPLACE_GETPAGESIZE | |
719 | REPLACE_GETGROUPS | |
720 | REPLACE_GETLOGIN_R | |
721 | REPLACE_GETDOMAINNAME | |
722 | REPLACE_GETCWD | |
723 | REPLACE_FCHOWNAT | |
724 | REPLACE_DUP2 | |
725 | REPLACE_DUP | |
726 | REPLACE_CLOSE | |
727 | REPLACE_CHOWN | |
728 | HAVE_SYS_PARAM_H | |
729 | HAVE_OS_H | |
730 | HAVE_DECL_TTYNAME_R | |
731 | HAVE_DECL_GETUSERSHELL | |
732 | HAVE_DECL_GETPAGESIZE | |
733 | HAVE_DECL_GETLOGIN_R | |
734 | HAVE_DECL_GETDOMAINNAME | |
735 | HAVE_DECL_FCHDIR | |
736 | HAVE_DECL_ENVIRON | |
737 | HAVE_USLEEP | |
738 | HAVE_UNLINKAT | |
739 | HAVE_SYMLINKAT | |
740 | HAVE_SYMLINK | |
741 | HAVE_SLEEP | |
742 | HAVE_READLINKAT | |
743 | HAVE_READLINK | |
744 | HAVE_PWRITE | |
745 | HAVE_PREAD | |
746 | HAVE_PIPE2 | |
747 | HAVE_PIPE | |
748 | HAVE_LINKAT | |
749 | HAVE_LINK | |
750 | HAVE_LCHOWN | |
751 | HAVE_GETPAGESIZE | |
752 | HAVE_GETLOGIN | |
753 | HAVE_GETHOSTNAME | |
754 | HAVE_GETGROUPS | |
755 | HAVE_GETDTABLESIZE | |
756 | HAVE_FTRUNCATE | |
757 | HAVE_FSYNC | |
758 | HAVE_FCHOWNAT | |
759 | HAVE_FCHDIR | |
760 | HAVE_FACCESSAT | |
761 | HAVE_EUIDACCESS | |
762 | HAVE_DUP3 | |
763 | HAVE_DUP2 | |
764 | HAVE_CHOWN | |
765 | GNULIB_WRITE | |
766 | GNULIB_USLEEP | |
767 | GNULIB_UNLINKAT | |
768 | GNULIB_UNLINK | |
769 | GNULIB_UNISTD_H_SIGPIPE | |
770 | GNULIB_UNISTD_H_GETOPT | |
771 | GNULIB_TTYNAME_R | |
772 | GNULIB_SYMLINKAT | |
773 | GNULIB_SYMLINK | |
774 | GNULIB_SLEEP | |
775 | GNULIB_RMDIR | |
776 | GNULIB_READLINKAT | |
777 | GNULIB_READLINK | |
778 | GNULIB_PWRITE | |
779 | GNULIB_PREAD | |
780 | GNULIB_PIPE2 | |
781 | GNULIB_PIPE | |
782 | GNULIB_LSEEK | |
783 | GNULIB_LINKAT | |
784 | GNULIB_LINK | |
785 | GNULIB_LCHOWN | |
786 | GNULIB_GETUSERSHELL | |
787 | GNULIB_GETPAGESIZE | |
788 | GNULIB_GETLOGIN_R | |
789 | GNULIB_GETLOGIN | |
790 | GNULIB_GETHOSTNAME | |
791 | GNULIB_GETGROUPS | |
792 | GNULIB_GETDTABLESIZE | |
793 | GNULIB_GETDOMAINNAME | |
794 | GNULIB_GETCWD | |
795 | GNULIB_FTRUNCATE | |
796 | GNULIB_FSYNC | |
797 | GNULIB_FCHOWNAT | |
798 | GNULIB_FCHDIR | |
799 | GNULIB_FACCESSAT | |
800 | GNULIB_EUIDACCESS | |
801 | GNULIB_ENVIRON | |
802 | GNULIB_DUP3 | |
803 | GNULIB_DUP2 | |
804 | GNULIB_CLOSE | |
805 | GNULIB_CHOWN | |
743c80a7 PE |
806 | GL_COND_LIBTOOL_FALSE |
807 | GL_COND_LIBTOOL_TRUE | |
067d23c9 KY |
808 | GETLOADAVG_LIBS |
809 | KMEM_GROUP | |
810 | NEED_SETGID | |
811 | LIBOBJS | |
812 | BLESSMAIL_TARGET | |
813 | LIBS_MAIL | |
814 | liblockfile | |
815 | ALLOCA | |
816 | LIBXML2_LIBS | |
817 | LIBXML2_CFLAGS | |
818 | LIBXSM | |
819 | LIBGPM | |
820 | LIBGIF | |
821 | LIBTIFF | |
822 | LIBPNG | |
823 | LIBJPEG | |
824 | LIBXPM | |
825 | FREETYPE_LIBS | |
826 | FREETYPE_CFLAGS | |
827 | M17N_FLT_LIBS | |
828 | M17N_FLT_CFLAGS | |
829 | LIBOTF_LIBS | |
830 | LIBOTF_CFLAGS | |
831 | XFT_LIBS | |
832 | XFT_CFLAGS | |
833 | FONTCONFIG_LIBS | |
834 | FONTCONFIG_CFLAGS | |
835 | LIBXMU | |
836 | LIBXTR6 | |
837 | LIBGNUTLS_LIBS | |
838 | LIBGNUTLS_CFLAGS | |
839 | LIBSELINUX_LIBS | |
840 | GCONF_LIBS | |
841 | GCONF_CFLAGS | |
842 | DBUS_OBJ | |
843 | DBUS_LIBS | |
844 | DBUS_CFLAGS | |
845 | GTK_OBJ | |
846 | GTK_LIBS | |
847 | GTK_CFLAGS | |
848 | IMAGEMAGICK_LIBS | |
849 | IMAGEMAGICK_CFLAGS | |
850 | RSVG_LIBS | |
851 | RSVG_CFLAGS | |
852 | VMLIMIT_OBJ | |
853 | GMALLOC_OBJ | |
854 | HAVE_XSERVER | |
855 | LIB_STANDARD | |
856 | NS_SUPPORT | |
857 | NS_OBJ | |
858 | TEMACS_LDFLAGS2 | |
859 | LD_SWITCH_X_SITE_AUX_RPATH | |
860 | LD_SWITCH_X_SITE_AUX | |
861 | XMKMF | |
862 | DEPFLAGS | |
863 | MKDEPDIR | |
067d23c9 KY |
864 | CFLAGS_SOUND |
865 | ALSA_LIBS | |
866 | ALSA_CFLAGS | |
867 | PKG_CONFIG | |
868 | LIBSOUND | |
869 | START_FILES | |
870 | LIB_MATH | |
871 | CRT_DIR | |
872 | LIBS_SYSTEM | |
873 | C_SWITCH_SYSTEM | |
874 | UNEXEC_OBJ | |
875 | C_SWITCH_MACHINE | |
876 | LD_SWITCH_SYSTEM | |
877 | CANNOT_DUMP | |
96f129d5 | 878 | HAVE_MAKEINFO |
067d23c9 KY |
879 | GZIP_PROG |
880 | INSTALL_INFO | |
067d23c9 KY |
881 | C_WARNINGS_SWITCH |
882 | EGREP | |
883 | GREP | |
884 | CPP | |
743c80a7 PE |
885 | RANLIB |
886 | am__fastdepCC_FALSE | |
887 | am__fastdepCC_TRUE | |
888 | CCDEPMODE | |
889 | AMDEPBACKSLASH | |
890 | AMDEP_FALSE | |
891 | AMDEP_TRUE | |
892 | am__quote | |
893 | am__include | |
894 | DEPDIR | |
067d23c9 KY |
895 | OBJEXT |
896 | EXEEXT | |
897 | ac_ct_CC | |
898 | CPPFLAGS | |
899 | LDFLAGS | |
900 | CFLAGS | |
901 | CC | |
902 | host_os | |
903 | host_vendor | |
904 | host_cpu | |
905 | host | |
906 | build_os | |
907 | build_vendor | |
908 | build_cpu | |
909 | build | |
910 | PROFILING_CFLAGS | |
911 | MAINT | |
912 | GZIP_INFO | |
743c80a7 PE |
913 | am__untar |
914 | am__tar | |
915 | AMTAR | |
916 | am__leading_dot | |
917 | SET_MAKE | |
918 | AWK | |
919 | mkdir_p | |
920 | MKDIR_P | |
921 | INSTALL_STRIP_PROGRAM | |
922 | STRIP | |
923 | install_sh | |
924 | MAKEINFO | |
925 | AUTOHEADER | |
926 | AUTOMAKE | |
927 | AUTOCONF | |
928 | ACLOCAL | |
929 | VERSION | |
930 | PACKAGE | |
931 | CYGPATH_W | |
932 | am__isrc | |
933 | INSTALL_DATA | |
934 | INSTALL_SCRIPT | |
935 | INSTALL_PROGRAM | |
067d23c9 KY |
936 | target_alias |
937 | host_alias | |
938 | build_alias | |
939 | LIBS | |
940 | ECHO_T | |
941 | ECHO_N | |
942 | ECHO_C | |
943 | DEFS | |
944 | mandir | |
945 | localedir | |
946 | libdir | |
947 | psdir | |
948 | pdfdir | |
949 | dvidir | |
950 | htmldir | |
951 | infodir | |
952 | docdir | |
953 | oldincludedir | |
954 | includedir | |
955 | localstatedir | |
956 | sharedstatedir | |
957 | sysconfdir | |
958 | datadir | |
959 | datarootdir | |
960 | libexecdir | |
961 | sbindir | |
962 | bindir | |
963 | program_transform_name | |
964 | prefix | |
965 | exec_prefix | |
966 | PACKAGE_URL | |
967 | PACKAGE_BUGREPORT | |
968 | PACKAGE_STRING | |
969 | PACKAGE_VERSION | |
970 | PACKAGE_TARNAME | |
971 | PACKAGE_NAME | |
972 | PATH_SEPARATOR | |
973 | SHELL' | |
974 | ac_subst_files='deps_frag | |
975 | ns_frag' | |
976 | ac_user_opts=' | |
977 | enable_option_checking | |
978 | with_pop | |
979 | with_kerberos | |
980 | with_kerberos5 | |
981 | with_hesiod | |
982 | with_mmdf | |
983 | with_mail_unlink | |
984 | with_mailhost | |
985 | with_sound | |
986 | with_sync_input | |
987 | with_x_toolkit | |
988 | with_xpm | |
989 | with_jpeg | |
990 | with_tiff | |
991 | with_gif | |
992 | with_png | |
993 | with_rsvg | |
994 | with_xml2 | |
995 | with_imagemagick | |
996 | with_xft | |
997 | with_libotf | |
998 | with_m17n_flt | |
999 | with_toolkit_scroll_bars | |
1000 | with_xaw3d | |
1001 | with_xim | |
1002 | with_ns | |
1003 | with_gpm | |
1004 | with_dbus | |
1005 | with_gconf | |
1006 | with_selinux | |
1007 | with_gnutls | |
1008 | with_makeinfo | |
1009 | with_compress_info | |
1010 | with_pkg_config_prog | |
1011 | with_crt_dir | |
4fc5868a | 1012 | with_gameuser |
067d23c9 KY |
1013 | with_gnustep_conf |
1014 | enable_ns_self_contained | |
1015 | enable_asserts | |
1016 | enable_maintainer_mode | |
1017 | enable_locallisppath | |
1018 | enable_checking | |
1019 | enable_use_lisp_union_type | |
1020 | enable_profiling | |
1021 | enable_autodepend | |
743c80a7 | 1022 | enable_dependency_tracking |
067d23c9 KY |
1023 | enable_largefile |
1024 | with_x | |
1025 | ' | |
1026 | ac_precious_vars='build_alias | |
1027 | host_alias | |
1028 | target_alias | |
1029 | CC | |
1030 | CFLAGS | |
1031 | LDFLAGS | |
1032 | LIBS | |
1033 | CPPFLAGS | |
1034 | CPP | |
1035 | XMKMF' | |
1036 | ||
1037 | ||
1038 | # Initialize some variables set by options. | |
1039 | ac_init_help= | |
1040 | ac_init_version=false | |
1041 | ac_unrecognized_opts= | |
1042 | ac_unrecognized_sep= | |
1043 | # The variables have the same names as the options, with | |
1044 | # dashes changed to underlines. | |
1045 | cache_file=/dev/null | |
1046 | exec_prefix=NONE | |
1047 | no_create= | |
1048 | no_recursion= | |
1049 | prefix=NONE | |
1050 | program_prefix=NONE | |
1051 | program_suffix=NONE | |
1052 | program_transform_name=s,x,x, | |
1053 | silent= | |
1054 | site= | |
1055 | srcdir= | |
1056 | verbose= | |
1057 | x_includes=NONE | |
1058 | x_libraries=NONE | |
1059 | ||
1060 | # Installation directory options. | |
1061 | # These are left unexpanded so users can "make install exec_prefix=/foo" | |
1062 | # and all the variables that are supposed to be based on exec_prefix | |
1063 | # by default will actually change. | |
1064 | # Use braces instead of parens because sh, perl, etc. also accept them. | |
1065 | # (The list follows the same order as the GNU Coding Standards.) | |
1066 | bindir='${exec_prefix}/bin' | |
1067 | sbindir='${exec_prefix}/sbin' | |
1068 | libexecdir='${exec_prefix}/libexec' | |
1069 | datarootdir='${prefix}/share' | |
1070 | datadir='${datarootdir}' | |
1071 | sysconfdir='${prefix}/etc' | |
1072 | sharedstatedir='${prefix}/com' | |
1073 | localstatedir='${prefix}/var' | |
1074 | includedir='${prefix}/include' | |
1075 | oldincludedir='/usr/include' | |
1076 | docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' | |
1077 | infodir='${datarootdir}/info' | |
1078 | htmldir='${docdir}' | |
1079 | dvidir='${docdir}' | |
1080 | pdfdir='${docdir}' | |
1081 | psdir='${docdir}' | |
1082 | libdir='${exec_prefix}/lib' | |
1083 | localedir='${datarootdir}/locale' | |
1084 | mandir='${datarootdir}/man' | |
1085 | ||
1086 | ac_prev= | |
1087 | ac_dashdash= | |
1088 | for ac_option | |
1089 | do | |
1090 | # If the previous option needs an argument, assign it. | |
1091 | if test -n "$ac_prev"; then | |
1092 | eval $ac_prev=\$ac_option | |
1093 | ac_prev= | |
1094 | continue | |
1095 | fi | |
1096 | ||
1097 | case $ac_option in | |
2018939f AS |
1098 | *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; |
1099 | *=) ac_optarg= ;; | |
1100 | *) ac_optarg=yes ;; | |
067d23c9 KY |
1101 | esac |
1102 | ||
1103 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
1104 | ||
1105 | case $ac_dashdash$ac_option in | |
1106 | --) | |
1107 | ac_dashdash=yes ;; | |
1108 | ||
1109 | -bindir | --bindir | --bindi | --bind | --bin | --bi) | |
1110 | ac_prev=bindir ;; | |
1111 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
1112 | bindir=$ac_optarg ;; | |
1113 | ||
1114 | -build | --build | --buil | --bui | --bu) | |
1115 | ac_prev=build_alias ;; | |
1116 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) | |
1117 | build_alias=$ac_optarg ;; | |
1118 | ||
1119 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
1120 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
1121 | ac_prev=cache_file ;; | |
1122 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
1123 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
1124 | cache_file=$ac_optarg ;; | |
1125 | ||
1126 | --config-cache | -C) | |
1127 | cache_file=config.cache ;; | |
1128 | ||
1129 | -datadir | --datadir | --datadi | --datad) | |
1130 | ac_prev=datadir ;; | |
1131 | -datadir=* | --datadir=* | --datadi=* | --datad=*) | |
1132 | datadir=$ac_optarg ;; | |
1133 | ||
1134 | -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | |
1135 | | --dataroo | --dataro | --datar) | |
1136 | ac_prev=datarootdir ;; | |
1137 | -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | |
1138 | | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) | |
1139 | datarootdir=$ac_optarg ;; | |
1140 | ||
1141 | -disable-* | --disable-*) | |
1142 | ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` | |
1143 | # Reject names that are not valid shell variable names. | |
1144 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && | |
2018939f | 1145 | as_fn_error $? "invalid feature name: $ac_useropt" |
067d23c9 KY |
1146 | ac_useropt_orig=$ac_useropt |
1147 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1148 | case $ac_user_opts in | |
1149 | *" | |
1150 | "enable_$ac_useropt" | |
1151 | "*) ;; | |
1152 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" | |
1153 | ac_unrecognized_sep=', ';; | |
1154 | esac | |
1155 | eval enable_$ac_useropt=no ;; | |
1156 | ||
1157 | -docdir | --docdir | --docdi | --doc | --do) | |
1158 | ac_prev=docdir ;; | |
1159 | -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) | |
1160 | docdir=$ac_optarg ;; | |
1161 | ||
1162 | -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) | |
1163 | ac_prev=dvidir ;; | |
1164 | -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) | |
1165 | dvidir=$ac_optarg ;; | |
1166 | ||
1167 | -enable-* | --enable-*) | |
1168 | ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` | |
1169 | # Reject names that are not valid shell variable names. | |
1170 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && | |
2018939f | 1171 | as_fn_error $? "invalid feature name: $ac_useropt" |
067d23c9 KY |
1172 | ac_useropt_orig=$ac_useropt |
1173 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1174 | case $ac_user_opts in | |
1175 | *" | |
1176 | "enable_$ac_useropt" | |
1177 | "*) ;; | |
1178 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" | |
1179 | ac_unrecognized_sep=', ';; | |
1180 | esac | |
1181 | eval enable_$ac_useropt=\$ac_optarg ;; | |
1182 | ||
1183 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
1184 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
1185 | | --exec | --exe | --ex) | |
1186 | ac_prev=exec_prefix ;; | |
1187 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
1188 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
1189 | | --exec=* | --exe=* | --ex=*) | |
1190 | exec_prefix=$ac_optarg ;; | |
1191 | ||
1192 | -gas | --gas | --ga | --g) | |
1193 | # Obsolete; use --with-gas. | |
1194 | with_gas=yes ;; | |
1195 | ||
1196 | -help | --help | --hel | --he | -h) | |
1197 | ac_init_help=long ;; | |
1198 | -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) | |
1199 | ac_init_help=recursive ;; | |
1200 | -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) | |
1201 | ac_init_help=short ;; | |
1202 | ||
1203 | -host | --host | --hos | --ho) | |
1204 | ac_prev=host_alias ;; | |
1205 | -host=* | --host=* | --hos=* | --ho=*) | |
1206 | host_alias=$ac_optarg ;; | |
1207 | ||
1208 | -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) | |
1209 | ac_prev=htmldir ;; | |
1210 | -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | |
1211 | | --ht=*) | |
1212 | htmldir=$ac_optarg ;; | |
1213 | ||
1214 | -includedir | --includedir | --includedi | --included | --include \ | |
1215 | | --includ | --inclu | --incl | --inc) | |
1216 | ac_prev=includedir ;; | |
1217 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
1218 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
1219 | includedir=$ac_optarg ;; | |
1220 | ||
1221 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
1222 | ac_prev=infodir ;; | |
1223 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
1224 | infodir=$ac_optarg ;; | |
1225 | ||
1226 | -libdir | --libdir | --libdi | --libd) | |
1227 | ac_prev=libdir ;; | |
1228 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
1229 | libdir=$ac_optarg ;; | |
1230 | ||
1231 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
1232 | | --libexe | --libex | --libe) | |
1233 | ac_prev=libexecdir ;; | |
1234 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
1235 | | --libexe=* | --libex=* | --libe=*) | |
1236 | libexecdir=$ac_optarg ;; | |
1237 | ||
1238 | -localedir | --localedir | --localedi | --localed | --locale) | |
1239 | ac_prev=localedir ;; | |
1240 | -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) | |
1241 | localedir=$ac_optarg ;; | |
1242 | ||
1243 | -localstatedir | --localstatedir | --localstatedi | --localstated \ | |
1244 | | --localstate | --localstat | --localsta | --localst | --locals) | |
1245 | ac_prev=localstatedir ;; | |
1246 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
1247 | | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) | |
1248 | localstatedir=$ac_optarg ;; | |
1249 | ||
1250 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
1251 | ac_prev=mandir ;; | |
1252 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
1253 | mandir=$ac_optarg ;; | |
1254 | ||
1255 | -nfp | --nfp | --nf) | |
1256 | # Obsolete; use --without-fp. | |
1257 | with_fp=no ;; | |
1258 | ||
1259 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
1260 | | --no-cr | --no-c | -n) | |
1261 | no_create=yes ;; | |
1262 | ||
1263 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
1264 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
1265 | no_recursion=yes ;; | |
1266 | ||
1267 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | |
1268 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
1269 | | --oldin | --oldi | --old | --ol | --o) | |
1270 | ac_prev=oldincludedir ;; | |
1271 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
1272 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
1273 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
1274 | oldincludedir=$ac_optarg ;; | |
1275 | ||
1276 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
1277 | ac_prev=prefix ;; | |
1278 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
1279 | prefix=$ac_optarg ;; | |
1280 | ||
1281 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
1282 | | --program-pre | --program-pr | --program-p) | |
1283 | ac_prev=program_prefix ;; | |
1284 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
1285 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
1286 | program_prefix=$ac_optarg ;; | |
1287 | ||
1288 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
1289 | | --program-suf | --program-su | --program-s) | |
1290 | ac_prev=program_suffix ;; | |
1291 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
1292 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
1293 | program_suffix=$ac_optarg ;; | |
1294 | ||
1295 | -program-transform-name | --program-transform-name \ | |
1296 | | --program-transform-nam | --program-transform-na \ | |
1297 | | --program-transform-n | --program-transform- \ | |
1298 | | --program-transform | --program-transfor \ | |
1299 | | --program-transfo | --program-transf \ | |
1300 | | --program-trans | --program-tran \ | |
1301 | | --progr-tra | --program-tr | --program-t) | |
1302 | ac_prev=program_transform_name ;; | |
1303 | -program-transform-name=* | --program-transform-name=* \ | |
1304 | | --program-transform-nam=* | --program-transform-na=* \ | |
1305 | | --program-transform-n=* | --program-transform-=* \ | |
1306 | | --program-transform=* | --program-transfor=* \ | |
1307 | | --program-transfo=* | --program-transf=* \ | |
1308 | | --program-trans=* | --program-tran=* \ | |
1309 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
1310 | program_transform_name=$ac_optarg ;; | |
1311 | ||
1312 | -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) | |
1313 | ac_prev=pdfdir ;; | |
1314 | -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) | |
1315 | pdfdir=$ac_optarg ;; | |
1316 | ||
1317 | -psdir | --psdir | --psdi | --psd | --ps) | |
1318 | ac_prev=psdir ;; | |
1319 | -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) | |
1320 | psdir=$ac_optarg ;; | |
1321 | ||
1322 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
1323 | | -silent | --silent | --silen | --sile | --sil) | |
1324 | silent=yes ;; | |
1325 | ||
1326 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | |
1327 | ac_prev=sbindir ;; | |
1328 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
1329 | | --sbi=* | --sb=*) | |
1330 | sbindir=$ac_optarg ;; | |
1331 | ||
1332 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
1333 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
1334 | | --sharedst | --shareds | --shared | --share | --shar \ | |
1335 | | --sha | --sh) | |
1336 | ac_prev=sharedstatedir ;; | |
1337 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
1338 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
1339 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
1340 | | --sha=* | --sh=*) | |
1341 | sharedstatedir=$ac_optarg ;; | |
1342 | ||
1343 | -site | --site | --sit) | |
1344 | ac_prev=site ;; | |
1345 | -site=* | --site=* | --sit=*) | |
1346 | site=$ac_optarg ;; | |
1347 | ||
1348 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
1349 | ac_prev=srcdir ;; | |
1350 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
1351 | srcdir=$ac_optarg ;; | |
1352 | ||
1353 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | |
1354 | | --syscon | --sysco | --sysc | --sys | --sy) | |
1355 | ac_prev=sysconfdir ;; | |
1356 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
1357 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
1358 | sysconfdir=$ac_optarg ;; | |
1359 | ||
1360 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
1361 | ac_prev=target_alias ;; | |
1362 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) | |
1363 | target_alias=$ac_optarg ;; | |
1364 | ||
1365 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
1366 | verbose=yes ;; | |
1367 | ||
1368 | -version | --version | --versio | --versi | --vers | -V) | |
1369 | ac_init_version=: ;; | |
1370 | ||
1371 | -with-* | --with-*) | |
1372 | ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` | |
1373 | # Reject names that are not valid shell variable names. | |
1374 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && | |
2018939f | 1375 | as_fn_error $? "invalid package name: $ac_useropt" |
067d23c9 KY |
1376 | ac_useropt_orig=$ac_useropt |
1377 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1378 | case $ac_user_opts in | |
1379 | *" | |
1380 | "with_$ac_useropt" | |
1381 | "*) ;; | |
1382 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" | |
1383 | ac_unrecognized_sep=', ';; | |
1384 | esac | |
1385 | eval with_$ac_useropt=\$ac_optarg ;; | |
1386 | ||
1387 | -without-* | --without-*) | |
1388 | ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` | |
1389 | # Reject names that are not valid shell variable names. | |
1390 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && | |
2018939f | 1391 | as_fn_error $? "invalid package name: $ac_useropt" |
067d23c9 KY |
1392 | ac_useropt_orig=$ac_useropt |
1393 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1394 | case $ac_user_opts in | |
1395 | *" | |
1396 | "with_$ac_useropt" | |
1397 | "*) ;; | |
1398 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" | |
1399 | ac_unrecognized_sep=', ';; | |
1400 | esac | |
1401 | eval with_$ac_useropt=no ;; | |
1402 | ||
1403 | --x) | |
1404 | # Obsolete; use --with-x. | |
1405 | with_x=yes ;; | |
1406 | ||
1407 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
1408 | | --x-incl | --x-inc | --x-in | --x-i) | |
1409 | ac_prev=x_includes ;; | |
1410 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
1411 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
1412 | x_includes=$ac_optarg ;; | |
1413 | ||
1414 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
1415 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
1416 | ac_prev=x_libraries ;; | |
1417 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
1418 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
1419 | x_libraries=$ac_optarg ;; | |
1420 | ||
2018939f AS |
1421 | -*) as_fn_error $? "unrecognized option: \`$ac_option' |
1422 | Try \`$0 --help' for more information" | |
067d23c9 KY |
1423 | ;; |
1424 | ||
1425 | *=*) | |
1426 | ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` | |
1427 | # Reject names that are not valid shell variable names. | |
1428 | case $ac_envvar in #( | |
1429 | '' | [0-9]* | *[!_$as_cr_alnum]* ) | |
2018939f | 1430 | as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; |
067d23c9 KY |
1431 | esac |
1432 | eval $ac_envvar=\$ac_optarg | |
1433 | export $ac_envvar ;; | |
1434 | ||
1435 | *) | |
1436 | # FIXME: should be removed in autoconf 3.0. | |
1437 | $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 | |
1438 | expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && | |
1439 | $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 | |
9ba41eb9 | 1440 | : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} |
067d23c9 KY |
1441 | ;; |
1442 | ||
1443 | esac | |
1444 | done | |
1445 | ||
1446 | if test -n "$ac_prev"; then | |
1447 | ac_option=--`echo $ac_prev | sed 's/_/-/g'` | |
2018939f | 1448 | as_fn_error $? "missing argument to $ac_option" |
067d23c9 KY |
1449 | fi |
1450 | ||
1451 | if test -n "$ac_unrecognized_opts"; then | |
1452 | case $enable_option_checking in | |
1453 | no) ;; | |
2018939f | 1454 | fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; |
067d23c9 KY |
1455 | *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; |
1456 | esac | |
1457 | fi | |
1458 | ||
1459 | # Check all directory arguments for consistency. | |
1460 | for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ | |
1461 | datadir sysconfdir sharedstatedir localstatedir includedir \ | |
1462 | oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ | |
1463 | libdir localedir mandir | |
1464 | do | |
1465 | eval ac_val=\$$ac_var | |
1466 | # Remove trailing slashes. | |
1467 | case $ac_val in | |
1468 | */ ) | |
1469 | ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` | |
1470 | eval $ac_var=\$ac_val;; | |
1471 | esac | |
1472 | # Be sure to have absolute directory names. | |
1473 | case $ac_val in | |
1474 | [\\/$]* | ?:[\\/]* ) continue;; | |
1475 | NONE | '' ) case $ac_var in *prefix ) continue;; esac;; | |
1476 | esac | |
2018939f | 1477 | as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" |
067d23c9 KY |
1478 | done |
1479 | ||
1480 | # There might be people who depend on the old broken behavior: `$host' | |
1481 | # used to hold the argument of --host etc. | |
1482 | # FIXME: To remove some day. | |
1483 | build=$build_alias | |
1484 | host=$host_alias | |
1485 | target=$target_alias | |
1486 | ||
1487 | # FIXME: To remove some day. | |
1488 | if test "x$host_alias" != x; then | |
1489 | if test "x$build_alias" = x; then | |
1490 | cross_compiling=maybe | |
2018939f AS |
1491 | $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. |
1492 | If a cross compiler is detected then cross compile mode will be used" >&2 | |
067d23c9 KY |
1493 | elif test "x$build_alias" != "x$host_alias"; then |
1494 | cross_compiling=yes | |
1495 | fi | |
1496 | fi | |
1497 | ||
1498 | ac_tool_prefix= | |
1499 | test -n "$host_alias" && ac_tool_prefix=$host_alias- | |
1500 | ||
1501 | test "$silent" = yes && exec 6>/dev/null | |
1502 | ||
1503 | ||
1504 | ac_pwd=`pwd` && test -n "$ac_pwd" && | |
1505 | ac_ls_di=`ls -di .` && | |
1506 | ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || | |
2018939f | 1507 | as_fn_error $? "working directory cannot be determined" |
067d23c9 | 1508 | test "X$ac_ls_di" = "X$ac_pwd_ls_di" || |
2018939f | 1509 | as_fn_error $? "pwd does not report name of working directory" |
067d23c9 KY |
1510 | |
1511 | ||
1512 | # Find the source files, if location was not specified. | |
1513 | if test -z "$srcdir"; then | |
1514 | ac_srcdir_defaulted=yes | |
1515 | # Try the directory containing this script, then the parent directory. | |
1516 | ac_confdir=`$as_dirname -- "$as_myself" || | |
1517 | $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
1518 | X"$as_myself" : 'X\(//\)[^/]' \| \ | |
1519 | X"$as_myself" : 'X\(//\)$' \| \ | |
1520 | X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || | |
1521 | $as_echo X"$as_myself" | | |
1522 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
1523 | s//\1/ | |
1524 | q | |
1525 | } | |
1526 | /^X\(\/\/\)[^/].*/{ | |
1527 | s//\1/ | |
1528 | q | |
1529 | } | |
1530 | /^X\(\/\/\)$/{ | |
1531 | s//\1/ | |
1532 | q | |
1533 | } | |
1534 | /^X\(\/\).*/{ | |
1535 | s//\1/ | |
1536 | q | |
1537 | } | |
1538 | s/.*/./; q'` | |
1539 | srcdir=$ac_confdir | |
1540 | if test ! -r "$srcdir/$ac_unique_file"; then | |
1541 | srcdir=.. | |
1542 | fi | |
1543 | else | |
1544 | ac_srcdir_defaulted=no | |
1545 | fi | |
1546 | if test ! -r "$srcdir/$ac_unique_file"; then | |
1547 | test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." | |
2018939f | 1548 | as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" |
067d23c9 KY |
1549 | fi |
1550 | ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" | |
1551 | ac_abs_confdir=`( | |
2018939f | 1552 | cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" |
067d23c9 KY |
1553 | pwd)` |
1554 | # When building in place, set srcdir=. | |
1555 | if test "$ac_abs_confdir" = "$ac_pwd"; then | |
1556 | srcdir=. | |
1557 | fi | |
1558 | # Remove unnecessary trailing slashes from srcdir. | |
1559 | # Double slashes in file names in object file debugging info | |
1560 | # mess up M-x gdb in Emacs. | |
1561 | case $srcdir in | |
1562 | */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; | |
1563 | esac | |
1564 | for ac_var in $ac_precious_vars; do | |
1565 | eval ac_env_${ac_var}_set=\${${ac_var}+set} | |
1566 | eval ac_env_${ac_var}_value=\$${ac_var} | |
1567 | eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} | |
1568 | eval ac_cv_env_${ac_var}_value=\$${ac_var} | |
1569 | done | |
1570 | ||
1571 | # | |
1572 | # Report the --help message. | |
1573 | # | |
1574 | if test "$ac_init_help" = "long"; then | |
1575 | # Omit some internal or obsolete options to make the list less imposing. | |
1576 | # This message is too long to be a string in the A/UX 3.1 sh. | |
1577 | cat <<_ACEOF | |
1578 | \`configure' configures emacs 24.0.50 to adapt to many kinds of systems. | |
1579 | ||
1580 | Usage: $0 [OPTION]... [VAR=VALUE]... | |
1581 | ||
1582 | To assign environment variables (e.g., CC, CFLAGS...), specify them as | |
1583 | VAR=VALUE. See below for descriptions of some of the useful variables. | |
1584 | ||
1585 | Defaults for the options are specified in brackets. | |
1586 | ||
1587 | Configuration: | |
1588 | -h, --help display this help and exit | |
1589 | --help=short display options specific to this package | |
1590 | --help=recursive display the short help of all the included packages | |
1591 | -V, --version display version information and exit | |
2018939f | 1592 | -q, --quiet, --silent do not print \`checking ...' messages |
067d23c9 KY |
1593 | --cache-file=FILE cache test results in FILE [disabled] |
1594 | -C, --config-cache alias for \`--cache-file=config.cache' | |
1595 | -n, --no-create do not create output files | |
1596 | --srcdir=DIR find the sources in DIR [configure dir or \`..'] | |
1597 | ||
1598 | Installation directories: | |
1599 | --prefix=PREFIX install architecture-independent files in PREFIX | |
1600 | [$ac_default_prefix] | |
1601 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX | |
1602 | [PREFIX] | |
1603 | ||
1604 | By default, \`make install' will install all the files in | |
1605 | \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify | |
1606 | an installation prefix other than \`$ac_default_prefix' using \`--prefix', | |
1607 | for instance \`--prefix=\$HOME'. | |
1608 | ||
1609 | For better control, use the options below. | |
1610 | ||
1611 | Fine tuning of the installation directories: | |
1612 | --bindir=DIR user executables [EPREFIX/bin] | |
1613 | --sbindir=DIR system admin executables [EPREFIX/sbin] | |
1614 | --libexecdir=DIR program executables [EPREFIX/libexec] | |
1615 | --sysconfdir=DIR read-only single-machine data [PREFIX/etc] | |
1616 | --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] | |
1617 | --localstatedir=DIR modifiable single-machine data [PREFIX/var] | |
1618 | --libdir=DIR object code libraries [EPREFIX/lib] | |
1619 | --includedir=DIR C header files [PREFIX/include] | |
1620 | --oldincludedir=DIR C header files for non-gcc [/usr/include] | |
1621 | --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] | |
1622 | --datadir=DIR read-only architecture-independent data [DATAROOTDIR] | |
1623 | --infodir=DIR info documentation [DATAROOTDIR/info] | |
1624 | --localedir=DIR locale-dependent data [DATAROOTDIR/locale] | |
1625 | --mandir=DIR man documentation [DATAROOTDIR/man] | |
1626 | --docdir=DIR documentation root [DATAROOTDIR/doc/emacs] | |
1627 | --htmldir=DIR html documentation [DOCDIR] | |
1628 | --dvidir=DIR dvi documentation [DOCDIR] | |
1629 | --pdfdir=DIR pdf documentation [DOCDIR] | |
1630 | --psdir=DIR ps documentation [DOCDIR] | |
1631 | _ACEOF | |
1632 | ||
1633 | cat <<\_ACEOF | |
1634 | ||
1635 | Program names: | |
1636 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
1637 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
1638 | --program-transform-name=PROGRAM run sed PROGRAM on installed program names | |
1639 | ||
1640 | X features: | |
1641 | --x-includes=DIR X include files are in DIR | |
1642 | --x-libraries=DIR X library files are in DIR | |
1643 | ||
1644 | System types: | |
1645 | --build=BUILD configure for building on BUILD [guessed] | |
1646 | --host=HOST cross-compile to build programs to run on HOST [BUILD] | |
1647 | _ACEOF | |
1648 | fi | |
1649 | ||
1650 | if test -n "$ac_init_help"; then | |
1651 | case $ac_init_help in | |
1652 | short | recursive ) echo "Configuration of emacs 24.0.50:";; | |
1653 | esac | |
1654 | cat <<\_ACEOF | |
1655 | ||
1656 | Optional Features: | |
1657 | --disable-option-checking ignore unrecognized --enable/--with options | |
1658 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) | |
1659 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
1660 | --disable-ns-self-contained | |
1661 | disable self contained build under NeXTstep | |
1662 | --enable-asserts compile code with asserts enabled | |
1663 | --enable-maintainer-mode | |
1664 | enable make rules and dependencies not useful (and | |
1665 | sometimes confusing) to the casual installer | |
1666 | --enable-locallisppath=PATH | |
1667 | directories Emacs should search for lisp files | |
1668 | specific to this site | |
1669 | --enable-checking[=LIST] | |
1670 | enable expensive run-time checks. With LIST, enable | |
1671 | only specific categories of checks. Categories are: | |
1672 | all,yes,no. Flags are: stringbytes, stringoverrun, | |
1673 | stringfreelist, xmallocoverrun, conslist | |
1674 | --enable-use-lisp-union-type | |
1675 | use a union for the Lisp_Object data type. This is | |
1676 | only useful for development for catching certain | |
1677 | types of bugs. | |
1678 | --enable-profiling build emacs with profiling support. This might not | |
1679 | work on all platforms | |
1680 | --enable-autodepend automatically generate dependencies to .h-files. | |
1681 | Requires GNU Make and Gcc. Enabled if GNU Make and | |
1682 | Gcc is found | |
743c80a7 PE |
1683 | --disable-dependency-tracking speeds up one-time build |
1684 | --enable-dependency-tracking do not reject slow dependency extractors | |
067d23c9 KY |
1685 | --disable-largefile omit support for large files |
1686 | ||
1687 | Optional Packages: | |
1688 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
1689 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
1690 | --without-pop don't support POP mail retrieval with movemail | |
1691 | --with-kerberos support Kerberos-authenticated POP | |
1692 | --with-kerberos5 support Kerberos version 5 authenticated POP | |
1693 | --with-hesiod support Hesiod to get the POP server host | |
1694 | --with-mmdf support MMDF mailboxes | |
1695 | --with-mail-unlink unlink, rather than empty, mail spool after reading | |
1696 | --with-mailhost=HOSTNAME | |
1697 | string giving default POP mail host | |
1698 | --without-sound don't compile with sound support | |
1699 | --without-sync-input process async input synchronously | |
1700 | --with-x-toolkit=KIT use an X toolkit (KIT one of: yes or gtk, gtk3, | |
1701 | lucid or athena, motif, no) | |
1702 | --without-xpm don't compile with XPM image support | |
1703 | --without-jpeg don't compile with JPEG image support | |
1704 | --without-tiff don't compile with TIFF image support | |
1705 | --without-gif don't compile with GIF image support | |
1706 | --without-png don't compile with PNG image support | |
1707 | --without-rsvg don't compile with SVG image support | |
1708 | --without-xml2 don't compile with XML parsing support | |
1709 | --without-imagemagick don't compile with ImageMagick image support | |
1710 | --without-xft don't use XFT for anti aliased fonts | |
1711 | --without-libotf don't use libotf for OpenType font support | |
1712 | --without-m17n-flt don't use m17n-flt for text shaping | |
1713 | --without-toolkit-scroll-bars | |
1714 | don't use Motif or Xaw3d scroll bars | |
1715 | --without-xaw3d don't use Xaw3d | |
1716 | --without-xim don't use X11 XIM | |
1717 | --with-ns use nextstep (Cocoa or GNUstep) windowing system | |
1718 | --without-gpm don't use -lgpm for mouse support on a GNU/Linux | |
1719 | console | |
1720 | --without-dbus don't compile with D-Bus support | |
1721 | --without-gconf don't compile with GConf support | |
1722 | --without-selinux don't compile with SELinux support | |
1723 | --without-gnutls don't use -lgnutls for SSL/TLS support | |
1724 | --without-makeinfo don't require makeinfo for building manuals | |
1725 | --without-compress-info don't compress the installed Info pages | |
1726 | --with-pkg-config-prog=PATH | |
1727 | path to pkg-config for finding GTK and librsvg | |
1728 | --with-crt-dir=DIR directory containing crtn.o etc. The default is | |
1729 | /usr/lib, or /usr/lib64 on some platforms. | |
4fc5868a | 1730 | --with-gameuser=USER user for shared game score files |
067d23c9 KY |
1731 | --with-gnustep-conf=PATH |
1732 | path to GNUstep.conf; default $GNUSTEP_CONFIG_FILE, | |
1733 | or /etc/GNUstep/GNUstep.conf | |
1734 | --with-x use the X Window System | |
1735 | ||
1736 | Some influential environment variables: | |
1737 | CC C compiler command | |
1738 | CFLAGS C compiler flags | |
1739 | LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a | |
1740 | nonstandard directory <lib dir> | |
1741 | LIBS libraries to pass to the linker, e.g. -l<library> | |
1742 | CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if | |
1743 | you have headers in a nonstandard directory <include dir> | |
1744 | CPP C preprocessor | |
1745 | XMKMF Path to xmkmf, Makefile generator for X Window System | |
1746 | ||
1747 | Use these variables to override the choices made by `configure' or to help | |
1748 | it to find libraries and programs with nonstandard names/locations. | |
1749 | ||
1750 | Report bugs to the package provider. | |
1751 | _ACEOF | |
1752 | ac_status=$? | |
1753 | fi | |
1754 | ||
1755 | if test "$ac_init_help" = "recursive"; then | |
1756 | # If there are subdirs, report their specific --help. | |
1757 | for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue | |
1758 | test -d "$ac_dir" || | |
1759 | { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || | |
1760 | continue | |
1761 | ac_builddir=. | |
1762 | ||
1763 | case "$ac_dir" in | |
1764 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
1765 | *) | |
1766 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
1767 | # A ".." for each directory in $ac_dir_suffix. | |
1768 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
1769 | case $ac_top_builddir_sub in | |
1770 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
1771 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
1772 | esac ;; | |
1773 | esac | |
1774 | ac_abs_top_builddir=$ac_pwd | |
1775 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
1776 | # for backward compatibility: | |
1777 | ac_top_builddir=$ac_top_build_prefix | |
1778 | ||
1779 | case $srcdir in | |
1780 | .) # We are building in place. | |
1781 | ac_srcdir=. | |
1782 | ac_top_srcdir=$ac_top_builddir_sub | |
1783 | ac_abs_top_srcdir=$ac_pwd ;; | |
1784 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
1785 | ac_srcdir=$srcdir$ac_dir_suffix; | |
1786 | ac_top_srcdir=$srcdir | |
1787 | ac_abs_top_srcdir=$srcdir ;; | |
1788 | *) # Relative name. | |
1789 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
1790 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
1791 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
1792 | esac | |
1793 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix | |
1794 | ||
1795 | cd "$ac_dir" || { ac_status=$?; continue; } | |
1796 | # Check for guested configure. | |
1797 | if test -f "$ac_srcdir/configure.gnu"; then | |
1798 | echo && | |
1799 | $SHELL "$ac_srcdir/configure.gnu" --help=recursive | |
1800 | elif test -f "$ac_srcdir/configure"; then | |
1801 | echo && | |
1802 | $SHELL "$ac_srcdir/configure" --help=recursive | |
1803 | else | |
1804 | $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 | |
1805 | fi || ac_status=$? | |
1806 | cd "$ac_pwd" || { ac_status=$?; break; } | |
1807 | done | |
1808 | fi | |
1809 | ||
1810 | test -n "$ac_init_help" && exit $ac_status | |
1811 | if $ac_init_version; then | |
1812 | cat <<\_ACEOF | |
1813 | emacs configure 24.0.50 | |
9ba41eb9 | 1814 | generated by GNU Autoconf 2.67 |
067d23c9 | 1815 | |
2018939f | 1816 | Copyright (C) 2010 Free Software Foundation, Inc. |
067d23c9 KY |
1817 | This configure script is free software; the Free Software Foundation |
1818 | gives unlimited permission to copy, distribute and modify it. | |
1819 | _ACEOF | |
1820 | exit | |
1821 | fi | |
1822 | ||
1823 | ## ------------------------ ## | |
1824 | ## Autoconf initialization. ## | |
1825 | ## ------------------------ ## | |
1826 | ||
1827 | # ac_fn_c_try_compile LINENO | |
1828 | # -------------------------- | |
1829 | # Try to compile conftest.$ac_ext, and return whether this succeeded. | |
1830 | ac_fn_c_try_compile () | |
1831 | { | |
1832 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1833 | rm -f conftest.$ac_objext | |
1834 | if { { ac_try="$ac_compile" | |
1835 | case "(($ac_try" in | |
1836 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1837 | *) ac_try_echo=$ac_try;; | |
1838 | esac | |
1839 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1840 | $as_echo "$ac_try_echo"; } >&5 | |
1841 | (eval "$ac_compile") 2>conftest.err | |
1842 | ac_status=$? | |
1843 | if test -s conftest.err; then | |
1844 | grep -v '^ *+' conftest.err >conftest.er1 | |
1845 | cat conftest.er1 >&5 | |
1846 | mv -f conftest.er1 conftest.err | |
1847 | fi | |
1848 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1849 | test $ac_status = 0; } && { | |
1850 | test -z "$ac_c_werror_flag" || | |
1851 | test ! -s conftest.err | |
1852 | } && test -s conftest.$ac_objext; then : | |
1853 | ac_retval=0 | |
1854 | else | |
1855 | $as_echo "$as_me: failed program was:" >&5 | |
1856 | sed 's/^/| /' conftest.$ac_ext >&5 | |
1857 | ||
1858 | ac_retval=1 | |
1859 | fi | |
9ba41eb9 | 1860 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} |
067d23c9 KY |
1861 | as_fn_set_status $ac_retval |
1862 | ||
1863 | } # ac_fn_c_try_compile | |
1864 | ||
067d23c9 KY |
1865 | # ac_fn_c_try_cpp LINENO |
1866 | # ---------------------- | |
1867 | # Try to preprocess conftest.$ac_ext, and return whether this succeeded. | |
1868 | ac_fn_c_try_cpp () | |
1869 | { | |
1870 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1871 | if { { ac_try="$ac_cpp conftest.$ac_ext" | |
1872 | case "(($ac_try" in | |
1873 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1874 | *) ac_try_echo=$ac_try;; | |
1875 | esac | |
1876 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1877 | $as_echo "$ac_try_echo"; } >&5 | |
1878 | (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err | |
1879 | ac_status=$? | |
1880 | if test -s conftest.err; then | |
1881 | grep -v '^ *+' conftest.err >conftest.er1 | |
1882 | cat conftest.er1 >&5 | |
1883 | mv -f conftest.er1 conftest.err | |
1884 | fi | |
1885 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
2018939f | 1886 | test $ac_status = 0; } > conftest.i && { |
067d23c9 KY |
1887 | test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || |
1888 | test ! -s conftest.err | |
1889 | }; then : | |
1890 | ac_retval=0 | |
1891 | else | |
1892 | $as_echo "$as_me: failed program was:" >&5 | |
1893 | sed 's/^/| /' conftest.$ac_ext >&5 | |
1894 | ||
1895 | ac_retval=1 | |
1896 | fi | |
9ba41eb9 | 1897 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} |
067d23c9 KY |
1898 | as_fn_set_status $ac_retval |
1899 | ||
1900 | } # ac_fn_c_try_cpp | |
1901 | ||
1902 | # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES | |
1903 | # ------------------------------------------------------- | |
1904 | # Tests whether HEADER exists, giving a warning if it cannot be compiled using | |
1905 | # the include files in INCLUDES and setting the cache variable VAR | |
1906 | # accordingly. | |
1907 | ac_fn_c_check_header_mongrel () | |
1908 | { | |
1909 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
9ba41eb9 | 1910 | if eval "test \"\${$3+set}\"" = set; then : |
067d23c9 KY |
1911 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 |
1912 | $as_echo_n "checking for $2... " >&6; } | |
9ba41eb9 | 1913 | if eval "test \"\${$3+set}\"" = set; then : |
067d23c9 KY |
1914 | $as_echo_n "(cached) " >&6 |
1915 | fi | |
1916 | eval ac_res=\$$3 | |
1917 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1918 | $as_echo "$ac_res" >&6; } | |
1919 | else | |
1920 | # Is the header compilable? | |
1921 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 | |
1922 | $as_echo_n "checking $2 usability... " >&6; } | |
1923 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1924 | /* end confdefs.h. */ | |
1925 | $4 | |
1926 | #include <$2> | |
1927 | _ACEOF | |
1928 | if ac_fn_c_try_compile "$LINENO"; then : | |
1929 | ac_header_compiler=yes | |
1930 | else | |
1931 | ac_header_compiler=no | |
1932 | fi | |
1933 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1934 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 | |
1935 | $as_echo "$ac_header_compiler" >&6; } | |
1936 | ||
1937 | # Is the header present? | |
1938 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 | |
1939 | $as_echo_n "checking $2 presence... " >&6; } | |
1940 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1941 | /* end confdefs.h. */ | |
1942 | #include <$2> | |
1943 | _ACEOF | |
1944 | if ac_fn_c_try_cpp "$LINENO"; then : | |
1945 | ac_header_preproc=yes | |
1946 | else | |
1947 | ac_header_preproc=no | |
1948 | fi | |
2018939f | 1949 | rm -f conftest.err conftest.i conftest.$ac_ext |
067d23c9 KY |
1950 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 |
1951 | $as_echo "$ac_header_preproc" >&6; } | |
1952 | ||
1953 | # So? What about this header? | |
1954 | case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( | |
1955 | yes:no: ) | |
1956 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 | |
1957 | $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} | |
1958 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
1959 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
1960 | ;; | |
1961 | no:yes:* ) | |
1962 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 | |
1963 | $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} | |
1964 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 | |
1965 | $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} | |
1966 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 | |
1967 | $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} | |
1968 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 | |
1969 | $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} | |
1970 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
1971 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
1972 | ;; | |
1973 | esac | |
1974 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1975 | $as_echo_n "checking for $2... " >&6; } | |
9ba41eb9 | 1976 | if eval "test \"\${$3+set}\"" = set; then : |
067d23c9 KY |
1977 | $as_echo_n "(cached) " >&6 |
1978 | else | |
1979 | eval "$3=\$ac_header_compiler" | |
1980 | fi | |
1981 | eval ac_res=\$$3 | |
1982 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1983 | $as_echo "$ac_res" >&6; } | |
1984 | fi | |
9ba41eb9 | 1985 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} |
067d23c9 KY |
1986 | |
1987 | } # ac_fn_c_check_header_mongrel | |
1988 | ||
1989 | # ac_fn_c_try_run LINENO | |
1990 | # ---------------------- | |
1991 | # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes | |
1992 | # that executables *can* be run. | |
1993 | ac_fn_c_try_run () | |
1994 | { | |
1995 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1996 | if { { ac_try="$ac_link" | |
1997 | case "(($ac_try" in | |
1998 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1999 | *) ac_try_echo=$ac_try;; | |
2000 | esac | |
2001 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
2002 | $as_echo "$ac_try_echo"; } >&5 | |
2003 | (eval "$ac_link") 2>&5 | |
2004 | ac_status=$? | |
2005 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
2006 | test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' | |
2007 | { { case "(($ac_try" in | |
2008 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2009 | *) ac_try_echo=$ac_try;; | |
2010 | esac | |
2011 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
2012 | $as_echo "$ac_try_echo"; } >&5 | |
2013 | (eval "$ac_try") 2>&5 | |
2014 | ac_status=$? | |
2015 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
2016 | test $ac_status = 0; }; }; then : | |
2017 | ac_retval=0 | |
2018 | else | |
2019 | $as_echo "$as_me: program exited with status $ac_status" >&5 | |
2020 | $as_echo "$as_me: failed program was:" >&5 | |
2021 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2022 | ||
2023 | ac_retval=$ac_status | |
2024 | fi | |
2025 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
9ba41eb9 | 2026 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} |
067d23c9 KY |
2027 | as_fn_set_status $ac_retval |
2028 | ||
2029 | } # ac_fn_c_try_run | |
2030 | ||
2031 | # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES | |
2032 | # ------------------------------------------------------- | |
2033 | # Tests whether HEADER exists and can be compiled using the include files in | |
2034 | # INCLUDES, setting the cache variable VAR accordingly. | |
2035 | ac_fn_c_check_header_compile () | |
2036 | { | |
2037 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2038 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2039 | $as_echo_n "checking for $2... " >&6; } | |
9ba41eb9 | 2040 | if eval "test \"\${$3+set}\"" = set; then : |
067d23c9 KY |
2041 | $as_echo_n "(cached) " >&6 |
2042 | else | |
2043 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2044 | /* end confdefs.h. */ | |
2045 | $4 | |
2046 | #include <$2> | |
2047 | _ACEOF | |
2048 | if ac_fn_c_try_compile "$LINENO"; then : | |
2049 | eval "$3=yes" | |
2050 | else | |
2051 | eval "$3=no" | |
2052 | fi | |
2053 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2054 | fi | |
2055 | eval ac_res=\$$3 | |
2056 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2057 | $as_echo "$ac_res" >&6; } | |
9ba41eb9 | 2058 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} |
067d23c9 KY |
2059 | |
2060 | } # ac_fn_c_check_header_compile | |
2061 | ||
1fd182f0 PE |
2062 | # ac_fn_c_try_link LINENO |
2063 | # ----------------------- | |
2064 | # Try to link conftest.$ac_ext, and return whether this succeeded. | |
2065 | ac_fn_c_try_link () | |
2066 | { | |
2067 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2068 | rm -f conftest.$ac_objext conftest$ac_exeext | |
2069 | if { { ac_try="$ac_link" | |
2070 | case "(($ac_try" in | |
2071 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2072 | *) ac_try_echo=$ac_try;; | |
2073 | esac | |
2074 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
2075 | $as_echo "$ac_try_echo"; } >&5 | |
2076 | (eval "$ac_link") 2>conftest.err | |
2077 | ac_status=$? | |
2078 | if test -s conftest.err; then | |
2079 | grep -v '^ *+' conftest.err >conftest.er1 | |
2080 | cat conftest.er1 >&5 | |
2081 | mv -f conftest.er1 conftest.err | |
2082 | fi | |
2083 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
2084 | test $ac_status = 0; } && { | |
2085 | test -z "$ac_c_werror_flag" || | |
2086 | test ! -s conftest.err | |
2087 | } && test -s conftest$ac_exeext && { | |
2088 | test "$cross_compiling" = yes || | |
2089 | $as_test_x conftest$ac_exeext | |
2090 | }; then : | |
2091 | ac_retval=0 | |
2092 | else | |
2093 | $as_echo "$as_me: failed program was:" >&5 | |
2094 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2095 | ||
2096 | ac_retval=1 | |
2097 | fi | |
2098 | # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information | |
2099 | # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would | |
2100 | # interfere with the next link command; also delete a directory that is | |
2101 | # left behind by Apple's compiler. We do this before executing the actions. | |
2102 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
9ba41eb9 | 2103 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} |
1fd182f0 PE |
2104 | as_fn_set_status $ac_retval |
2105 | ||
2106 | } # ac_fn_c_try_link | |
2107 | ||
2018939f AS |
2108 | # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES |
2109 | # --------------------------------------------- | |
2110 | # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR | |
2111 | # accordingly. | |
067d23c9 KY |
2112 | ac_fn_c_check_decl () |
2113 | { | |
2114 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2018939f AS |
2115 | as_decl_name=`echo $2|sed 's/ *(.*//'` |
2116 | as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` | |
2117 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 | |
2118 | $as_echo_n "checking whether $as_decl_name is declared... " >&6; } | |
9ba41eb9 | 2119 | if eval "test \"\${$3+set}\"" = set; then : |
067d23c9 KY |
2120 | $as_echo_n "(cached) " >&6 |
2121 | else | |
2122 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2123 | /* end confdefs.h. */ | |
2124 | $4 | |
2125 | int | |
2126 | main () | |
2127 | { | |
2018939f AS |
2128 | #ifndef $as_decl_name |
2129 | #ifdef __cplusplus | |
2130 | (void) $as_decl_use; | |
2131 | #else | |
2132 | (void) $as_decl_name; | |
2133 | #endif | |
067d23c9 KY |
2134 | #endif |
2135 | ||
2136 | ; | |
2137 | return 0; | |
2138 | } | |
2139 | _ACEOF | |
2140 | if ac_fn_c_try_compile "$LINENO"; then : | |
2141 | eval "$3=yes" | |
2142 | else | |
2143 | eval "$3=no" | |
2144 | fi | |
2145 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2146 | fi | |
2147 | eval ac_res=\$$3 | |
2148 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2149 | $as_echo "$ac_res" >&6; } | |
9ba41eb9 | 2150 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} |
067d23c9 KY |
2151 | |
2152 | } # ac_fn_c_check_decl | |
2153 | ||
2154 | # ac_fn_c_check_header_preproc LINENO HEADER VAR | |
2155 | # ---------------------------------------------- | |
2156 | # Tests whether HEADER is present, setting the cache variable VAR accordingly. | |
2157 | ac_fn_c_check_header_preproc () | |
2158 | { | |
2159 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2160 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2161 | $as_echo_n "checking for $2... " >&6; } | |
9ba41eb9 | 2162 | if eval "test \"\${$3+set}\"" = set; then : |
067d23c9 KY |
2163 | $as_echo_n "(cached) " >&6 |
2164 | else | |
2165 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2166 | /* end confdefs.h. */ | |
2167 | #include <$2> | |
2168 | _ACEOF | |
2169 | if ac_fn_c_try_cpp "$LINENO"; then : | |
2170 | eval "$3=yes" | |
2171 | else | |
2172 | eval "$3=no" | |
2173 | fi | |
2018939f | 2174 | rm -f conftest.err conftest.i conftest.$ac_ext |
067d23c9 KY |
2175 | fi |
2176 | eval ac_res=\$$3 | |
2177 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2178 | $as_echo "$ac_res" >&6; } | |
9ba41eb9 | 2179 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} |
067d23c9 KY |
2180 | |
2181 | } # ac_fn_c_check_header_preproc | |
2182 | ||
2183 | # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES | |
2184 | # ---------------------------------------------------- | |
2185 | # Tries to find if the field MEMBER exists in type AGGR, after including | |
2186 | # INCLUDES, setting cache variable VAR accordingly. | |
2187 | ac_fn_c_check_member () | |
2188 | { | |
2189 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2190 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 | |
2191 | $as_echo_n "checking for $2.$3... " >&6; } | |
9ba41eb9 | 2192 | if eval "test \"\${$4+set}\"" = set; then : |
067d23c9 KY |
2193 | $as_echo_n "(cached) " >&6 |
2194 | else | |
2195 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2196 | /* end confdefs.h. */ | |
2197 | $5 | |
2198 | int | |
2199 | main () | |
2200 | { | |
2201 | static $2 ac_aggr; | |
2202 | if (ac_aggr.$3) | |
2203 | return 0; | |
2204 | ; | |
2205 | return 0; | |
2206 | } | |
2207 | _ACEOF | |
2208 | if ac_fn_c_try_compile "$LINENO"; then : | |
2209 | eval "$4=yes" | |
2210 | else | |
2211 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2212 | /* end confdefs.h. */ | |
2213 | $5 | |
2214 | int | |
2215 | main () | |
2216 | { | |
2217 | static $2 ac_aggr; | |
2218 | if (sizeof ac_aggr.$3) | |
2219 | return 0; | |
2220 | ; | |
2221 | return 0; | |
2222 | } | |
2223 | _ACEOF | |
2224 | if ac_fn_c_try_compile "$LINENO"; then : | |
2225 | eval "$4=yes" | |
2226 | else | |
2227 | eval "$4=no" | |
2228 | fi | |
2229 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2230 | fi | |
2231 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2232 | fi | |
2233 | eval ac_res=\$$4 | |
2234 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2235 | $as_echo "$ac_res" >&6; } | |
9ba41eb9 | 2236 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} |
067d23c9 KY |
2237 | |
2238 | } # ac_fn_c_check_member | |
2239 | ||
2240 | # ac_fn_c_check_func LINENO FUNC VAR | |
2241 | # ---------------------------------- | |
2242 | # Tests whether FUNC exists, setting the cache variable VAR accordingly | |
2243 | ac_fn_c_check_func () | |
2244 | { | |
2245 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2246 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2247 | $as_echo_n "checking for $2... " >&6; } | |
9ba41eb9 | 2248 | if eval "test \"\${$3+set}\"" = set; then : |
067d23c9 KY |
2249 | $as_echo_n "(cached) " >&6 |
2250 | else | |
2251 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2252 | /* end confdefs.h. */ | |
2253 | /* Define $2 to an innocuous variant, in case <limits.h> declares $2. | |
2254 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
2255 | #define $2 innocuous_$2 | |
2256 | ||
2257 | /* System header to define __stub macros and hopefully few prototypes, | |
2258 | which can conflict with char $2 (); below. | |
2259 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
2260 | <limits.h> exists even on freestanding compilers. */ | |
2261 | ||
2262 | #ifdef __STDC__ | |
2263 | # include <limits.h> | |
2264 | #else | |
2265 | # include <assert.h> | |
2266 | #endif | |
2267 | ||
2268 | #undef $2 | |
2269 | ||
2270 | /* Override any GCC internal prototype to avoid an error. | |
2271 | Use char because int might match the return type of a GCC | |
2272 | builtin and then its argument prototype would still apply. */ | |
2273 | #ifdef __cplusplus | |
2274 | extern "C" | |
2275 | #endif | |
2276 | char $2 (); | |
2277 | /* The GNU C library defines this for functions which it implements | |
2278 | to always fail with ENOSYS. Some functions are actually named | |
2279 | something starting with __ and the normal name is an alias. */ | |
2280 | #if defined __stub_$2 || defined __stub___$2 | |
2281 | choke me | |
2282 | #endif | |
2283 | ||
2284 | int | |
2285 | main () | |
2286 | { | |
2287 | return $2 (); | |
2288 | ; | |
2289 | return 0; | |
2290 | } | |
2291 | _ACEOF | |
2292 | if ac_fn_c_try_link "$LINENO"; then : | |
2293 | eval "$3=yes" | |
2294 | else | |
2295 | eval "$3=no" | |
2296 | fi | |
2297 | rm -f core conftest.err conftest.$ac_objext \ | |
2298 | conftest$ac_exeext conftest.$ac_ext | |
2299 | fi | |
2300 | eval ac_res=\$$3 | |
2301 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2302 | $as_echo "$ac_res" >&6; } | |
9ba41eb9 | 2303 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} |
067d23c9 KY |
2304 | |
2305 | } # ac_fn_c_check_func | |
2306 | ||
2307 | # ac_fn_c_check_type LINENO TYPE VAR INCLUDES | |
2308 | # ------------------------------------------- | |
2309 | # Tests whether TYPE exists after having included INCLUDES, setting cache | |
2310 | # variable VAR accordingly. | |
2311 | ac_fn_c_check_type () | |
2312 | { | |
2313 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2314 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2315 | $as_echo_n "checking for $2... " >&6; } | |
9ba41eb9 | 2316 | if eval "test \"\${$3+set}\"" = set; then : |
067d23c9 KY |
2317 | $as_echo_n "(cached) " >&6 |
2318 | else | |
2319 | eval "$3=no" | |
2320 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2321 | /* end confdefs.h. */ | |
2322 | $4 | |
2323 | int | |
2324 | main () | |
2325 | { | |
2326 | if (sizeof ($2)) | |
2327 | return 0; | |
2328 | ; | |
2329 | return 0; | |
2330 | } | |
2331 | _ACEOF | |
2332 | if ac_fn_c_try_compile "$LINENO"; then : | |
2333 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2334 | /* end confdefs.h. */ | |
2335 | $4 | |
2336 | int | |
2337 | main () | |
2338 | { | |
2339 | if (sizeof (($2))) | |
2340 | return 0; | |
2341 | ; | |
2342 | return 0; | |
2343 | } | |
2344 | _ACEOF | |
2345 | if ac_fn_c_try_compile "$LINENO"; then : | |
2346 | ||
2347 | else | |
2348 | eval "$3=yes" | |
2349 | fi | |
2350 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2351 | fi | |
2352 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2353 | fi | |
2354 | eval ac_res=\$$3 | |
2355 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2356 | $as_echo "$ac_res" >&6; } | |
9ba41eb9 | 2357 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} |
067d23c9 KY |
2358 | |
2359 | } # ac_fn_c_check_type | |
2360 | cat >config.log <<_ACEOF | |
2361 | This file contains any messages produced by compilers while | |
2362 | running configure, to aid debugging if configure makes a mistake. | |
2363 | ||
2364 | It was created by emacs $as_me 24.0.50, which was | |
9ba41eb9 | 2365 | generated by GNU Autoconf 2.67. Invocation command line was |
067d23c9 KY |
2366 | |
2367 | $ $0 $@ | |
2368 | ||
2369 | _ACEOF | |
2370 | exec 5>>config.log | |
2371 | { | |
2372 | cat <<_ASUNAME | |
2373 | ## --------- ## | |
2374 | ## Platform. ## | |
2375 | ## --------- ## | |
2376 | ||
2377 | hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` | |
2378 | uname -m = `(uname -m) 2>/dev/null || echo unknown` | |
2379 | uname -r = `(uname -r) 2>/dev/null || echo unknown` | |
2380 | uname -s = `(uname -s) 2>/dev/null || echo unknown` | |
2381 | uname -v = `(uname -v) 2>/dev/null || echo unknown` | |
2382 | ||
2383 | /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` | |
2384 | /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` | |
2385 | ||
2386 | /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` | |
2387 | /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` | |
2388 | /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` | |
2389 | /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` | |
2390 | /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` | |
2391 | /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` | |
2392 | /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` | |
2393 | ||
2394 | _ASUNAME | |
2395 | ||
2396 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2397 | for as_dir in $PATH | |
2398 | do | |
2399 | IFS=$as_save_IFS | |
2400 | test -z "$as_dir" && as_dir=. | |
2401 | $as_echo "PATH: $as_dir" | |
2402 | done | |
2403 | IFS=$as_save_IFS | |
2404 | ||
2405 | } >&5 | |
2406 | ||
2407 | cat >&5 <<_ACEOF | |
2408 | ||
2409 | ||
2410 | ## ----------- ## | |
2411 | ## Core tests. ## | |
2412 | ## ----------- ## | |
2413 | ||
2414 | _ACEOF | |
2415 | ||
2416 | ||
2417 | # Keep a trace of the command line. | |
2418 | # Strip out --no-create and --no-recursion so they do not pile up. | |
2419 | # Strip out --silent because we don't want to record it for future runs. | |
2420 | # Also quote any args containing shell meta-characters. | |
2421 | # Make two passes to allow for proper duplicate-argument suppression. | |
2422 | ac_configure_args= | |
2423 | ac_configure_args0= | |
2424 | ac_configure_args1= | |
2425 | ac_must_keep_next=false | |
2426 | for ac_pass in 1 2 | |
2427 | do | |
2428 | for ac_arg | |
2429 | do | |
2430 | case $ac_arg in | |
2431 | -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; | |
2432 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
2433 | | -silent | --silent | --silen | --sile | --sil) | |
2434 | continue ;; | |
2435 | *\'*) | |
2436 | ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
2437 | esac | |
2438 | case $ac_pass in | |
2439 | 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; | |
2440 | 2) | |
2441 | as_fn_append ac_configure_args1 " '$ac_arg'" | |
2442 | if test $ac_must_keep_next = true; then | |
2443 | ac_must_keep_next=false # Got value, back to normal. | |
2444 | else | |
2445 | case $ac_arg in | |
2446 | *=* | --config-cache | -C | -disable-* | --disable-* \ | |
2447 | | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | |
2448 | | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | |
2449 | | -with-* | --with-* | -without-* | --without-* | --x) | |
2450 | case "$ac_configure_args0 " in | |
2451 | "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; | |
2452 | esac | |
2453 | ;; | |
2454 | -* ) ac_must_keep_next=true ;; | |
2455 | esac | |
2456 | fi | |
2457 | as_fn_append ac_configure_args " '$ac_arg'" | |
2458 | ;; | |
2459 | esac | |
2460 | done | |
2461 | done | |
2462 | { ac_configure_args0=; unset ac_configure_args0;} | |
2463 | { ac_configure_args1=; unset ac_configure_args1;} | |
2464 | ||
2465 | # When interrupted or exit'd, cleanup temporary files, and complete | |
2466 | # config.log. We remove comments because anyway the quotes in there | |
2467 | # would cause problems or look ugly. | |
2468 | # WARNING: Use '\'' to represent an apostrophe within the trap. | |
2469 | # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. | |
2470 | trap 'exit_status=$? | |
2471 | # Save into config.log some information that might help in debugging. | |
2472 | { | |
2473 | echo | |
2474 | ||
2018939f | 2475 | $as_echo "## ---------------- ## |
067d23c9 | 2476 | ## Cache variables. ## |
2018939f | 2477 | ## ---------------- ##" |
067d23c9 KY |
2478 | echo |
2479 | # The following way of writing the cache mishandles newlines in values, | |
2480 | ( | |
2481 | for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do | |
2482 | eval ac_val=\$$ac_var | |
2483 | case $ac_val in #( | |
2484 | *${as_nl}*) | |
2485 | case $ac_var in #( | |
2486 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
2487 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
2488 | esac | |
2489 | case $ac_var in #( | |
2490 | _ | IFS | as_nl) ;; #( | |
2491 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
2492 | *) { eval $ac_var=; unset $ac_var;} ;; | |
2493 | esac ;; | |
2494 | esac | |
2495 | done | |
2496 | (set) 2>&1 | | |
2497 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( | |
2498 | *${as_nl}ac_space=\ *) | |
2499 | sed -n \ | |
2500 | "s/'\''/'\''\\\\'\'''\''/g; | |
2501 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" | |
2502 | ;; #( | |
2503 | *) | |
2504 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" | |
2505 | ;; | |
2506 | esac | | |
2507 | sort | |
2508 | ) | |
2509 | echo | |
2510 | ||
2018939f | 2511 | $as_echo "## ----------------- ## |
067d23c9 | 2512 | ## Output variables. ## |
2018939f | 2513 | ## ----------------- ##" |
067d23c9 KY |
2514 | echo |
2515 | for ac_var in $ac_subst_vars | |
2516 | do | |
2517 | eval ac_val=\$$ac_var | |
2518 | case $ac_val in | |
2519 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
2520 | esac | |
2521 | $as_echo "$ac_var='\''$ac_val'\''" | |
2522 | done | sort | |
2523 | echo | |
2524 | ||
2525 | if test -n "$ac_subst_files"; then | |
2018939f | 2526 | $as_echo "## ------------------- ## |
067d23c9 | 2527 | ## File substitutions. ## |
2018939f | 2528 | ## ------------------- ##" |
067d23c9 KY |
2529 | echo |
2530 | for ac_var in $ac_subst_files | |
2531 | do | |
2532 | eval ac_val=\$$ac_var | |
2533 | case $ac_val in | |
2534 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
2535 | esac | |
2536 | $as_echo "$ac_var='\''$ac_val'\''" | |
2537 | done | sort | |
2538 | echo | |
2539 | fi | |
2540 | ||
2541 | if test -s confdefs.h; then | |
2018939f | 2542 | $as_echo "## ----------- ## |
067d23c9 | 2543 | ## confdefs.h. ## |
2018939f | 2544 | ## ----------- ##" |
067d23c9 KY |
2545 | echo |
2546 | cat confdefs.h | |
2547 | echo | |
2548 | fi | |
2549 | test "$ac_signal" != 0 && | |
2550 | $as_echo "$as_me: caught signal $ac_signal" | |
2551 | $as_echo "$as_me: exit $exit_status" | |
2552 | } >&5 | |
2553 | rm -f core *.core core.conftest.* && | |
2554 | rm -f -r conftest* confdefs* conf$$* $ac_clean_files && | |
2555 | exit $exit_status | |
2556 | ' 0 | |
2557 | for ac_signal in 1 2 13 15; do | |
2558 | trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal | |
2559 | done | |
2560 | ac_signal=0 | |
2561 | ||
2562 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
2563 | rm -f -r conftest* confdefs.h | |
2564 | ||
2565 | $as_echo "/* confdefs.h */" > confdefs.h | |
2566 | ||
2567 | # Predefined preprocessor variables. | |
2568 | ||
2569 | cat >>confdefs.h <<_ACEOF | |
2570 | #define PACKAGE_NAME "$PACKAGE_NAME" | |
2571 | _ACEOF | |
2572 | ||
2573 | cat >>confdefs.h <<_ACEOF | |
2574 | #define PACKAGE_TARNAME "$PACKAGE_TARNAME" | |
2575 | _ACEOF | |
2576 | ||
2577 | cat >>confdefs.h <<_ACEOF | |
2578 | #define PACKAGE_VERSION "$PACKAGE_VERSION" | |
2579 | _ACEOF | |
2580 | ||
2581 | cat >>confdefs.h <<_ACEOF | |
2582 | #define PACKAGE_STRING "$PACKAGE_STRING" | |
2583 | _ACEOF | |
2584 | ||
2585 | cat >>confdefs.h <<_ACEOF | |
2586 | #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" | |
2587 | _ACEOF | |
2588 | ||
2589 | cat >>confdefs.h <<_ACEOF | |
2590 | #define PACKAGE_URL "$PACKAGE_URL" | |
2591 | _ACEOF | |
2592 | ||
2593 | ||
2594 | # Let the site file select an alternate cache file if it wants to. | |
2595 | # Prefer an explicitly selected file to automatically selected ones. | |
2596 | ac_site_file1=NONE | |
2597 | ac_site_file2=NONE | |
2598 | if test -n "$CONFIG_SITE"; then | |
2018939f AS |
2599 | # We do not want a PATH search for config.site. |
2600 | case $CONFIG_SITE in #(( | |
2601 | -*) ac_site_file1=./$CONFIG_SITE;; | |
2602 | */*) ac_site_file1=$CONFIG_SITE;; | |
2603 | *) ac_site_file1=./$CONFIG_SITE;; | |
2604 | esac | |
067d23c9 KY |
2605 | elif test "x$prefix" != xNONE; then |
2606 | ac_site_file1=$prefix/share/config.site | |
2607 | ac_site_file2=$prefix/etc/config.site | |
2608 | else | |
2609 | ac_site_file1=$ac_default_prefix/share/config.site | |
2610 | ac_site_file2=$ac_default_prefix/etc/config.site | |
2611 | fi | |
2612 | for ac_site_file in "$ac_site_file1" "$ac_site_file2" | |
2613 | do | |
2614 | test "x$ac_site_file" = xNONE && continue | |
2615 | if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then | |
2616 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 | |
2617 | $as_echo "$as_me: loading site script $ac_site_file" >&6;} | |
2618 | sed 's/^/| /' "$ac_site_file" >&5 | |
2018939f AS |
2619 | . "$ac_site_file" \ |
2620 | || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
2621 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
2622 | as_fn_error $? "failed to load site script $ac_site_file | |
9ba41eb9 | 2623 | See \`config.log' for more details" "$LINENO" 5 ; } |
067d23c9 KY |
2624 | fi |
2625 | done | |
2626 | ||
2627 | if test -r "$cache_file"; then | |
2628 | # Some versions of bash will fail to source /dev/null (special files | |
2629 | # actually), so we avoid doing that. DJGPP emulates it as a regular file. | |
2630 | if test /dev/null != "$cache_file" && test -f "$cache_file"; then | |
2631 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 | |
2632 | $as_echo "$as_me: loading cache $cache_file" >&6;} | |
2633 | case $cache_file in | |
2634 | [\\/]* | ?:[\\/]* ) . "$cache_file";; | |
2635 | *) . "./$cache_file";; | |
2636 | esac | |
2637 | fi | |
2638 | else | |
2639 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 | |
2640 | $as_echo "$as_me: creating cache $cache_file" >&6;} | |
2641 | >$cache_file | |
2642 | fi | |
2643 | ||
2644 | as_fn_append ac_header_list " stdlib.h" | |
2645 | as_fn_append ac_header_list " unistd.h" | |
2646 | as_fn_append ac_header_list " sys/param.h" | |
e275c824 PE |
2647 | gl_getopt_required=GNU |
2648 | as_fn_append ac_header_list " getopt.h" | |
067d23c9 | 2649 | as_fn_append ac_func_list " alarm" |
1fd182f0 PE |
2650 | as_fn_append ac_header_list " sys/time.h" |
2651 | as_fn_append ac_func_list " localtime_r" | |
067d23c9 KY |
2652 | # Check that the precious variables saved in the cache have kept the same |
2653 | # value. | |
2654 | ac_cache_corrupted=false | |
2655 | for ac_var in $ac_precious_vars; do | |
2656 | eval ac_old_set=\$ac_cv_env_${ac_var}_set | |
2657 | eval ac_new_set=\$ac_env_${ac_var}_set | |
2658 | eval ac_old_val=\$ac_cv_env_${ac_var}_value | |
2659 | eval ac_new_val=\$ac_env_${ac_var}_value | |
2660 | case $ac_old_set,$ac_new_set in | |
2661 | set,) | |
2662 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 | |
2663 | $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} | |
2664 | ac_cache_corrupted=: ;; | |
2665 | ,set) | |
2666 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 | |
2667 | $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} | |
2668 | ac_cache_corrupted=: ;; | |
2669 | ,);; | |
2670 | *) | |
2671 | if test "x$ac_old_val" != "x$ac_new_val"; then | |
2672 | # differences in whitespace do not lead to failure. | |
2673 | ac_old_val_w=`echo x $ac_old_val` | |
2674 | ac_new_val_w=`echo x $ac_new_val` | |
2675 | if test "$ac_old_val_w" != "$ac_new_val_w"; then | |
2676 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 | |
2677 | $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} | |
2678 | ac_cache_corrupted=: | |
2679 | else | |
2680 | { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 | |
2681 | $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} | |
2682 | eval $ac_var=\$ac_old_val | |
2683 | fi | |
2684 | { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 | |
2685 | $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} | |
2686 | { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 | |
2687 | $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} | |
2688 | fi;; | |
2689 | esac | |
2690 | # Pass precious variables to config.status. | |
2691 | if test "$ac_new_set" = set; then | |
2692 | case $ac_new_val in | |
2693 | *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; | |
2694 | *) ac_arg=$ac_var=$ac_new_val ;; | |
2695 | esac | |
2696 | case " $ac_configure_args " in | |
2697 | *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. | |
2698 | *) as_fn_append ac_configure_args " '$ac_arg'" ;; | |
2699 | esac | |
2700 | fi | |
2701 | done | |
2702 | if $ac_cache_corrupted; then | |
2703 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
2704 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
2705 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 | |
2706 | $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} | |
2018939f | 2707 | as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 |
067d23c9 KY |
2708 | fi |
2709 | ## -------------------- ## | |
2710 | ## Main body of script. ## | |
2711 | ## -------------------- ## | |
2712 | ||
2713 | ac_ext=c | |
2714 | ac_cpp='$CPP $CPPFLAGS' | |
2715 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2716 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2717 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2718 | ||
2719 | ||
2720 | ac_config_headers="$ac_config_headers src/config.h:src/config.in" | |
2721 | ||
2722 | ||
743c80a7 | 2723 | am__api_version='1.11' |
067d23c9 | 2724 | |
743c80a7 PE |
2725 | ac_aux_dir= |
2726 | for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do | |
2727 | if test -f "$ac_dir/install-sh"; then | |
2728 | ac_aux_dir=$ac_dir | |
2729 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
2730 | break | |
2731 | elif test -f "$ac_dir/install.sh"; then | |
2732 | ac_aux_dir=$ac_dir | |
2733 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
2734 | break | |
2735 | elif test -f "$ac_dir/shtool"; then | |
2736 | ac_aux_dir=$ac_dir | |
2737 | ac_install_sh="$ac_aux_dir/shtool install -c" | |
2738 | break | |
2739 | fi | |
2740 | done | |
2741 | if test -z "$ac_aux_dir"; then | |
2742 | as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 | |
2743 | fi | |
067d23c9 | 2744 | |
743c80a7 PE |
2745 | # These three variables are undocumented and unsupported, |
2746 | # and are intended to be withdrawn in a future Autoconf release. | |
2747 | # They can cause serious problems if a builder's source tree is in a directory | |
2748 | # whose full name contains unusual characters. | |
2749 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. | |
2750 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. | |
2751 | ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. | |
067d23c9 | 2752 | |
067d23c9 | 2753 | |
743c80a7 PE |
2754 | # Find a good install program. We prefer a C program (faster), |
2755 | # so one script is as good as another. But avoid the broken or | |
2756 | # incompatible versions: | |
2757 | # SysV /etc/install, /usr/sbin/install | |
2758 | # SunOS /usr/etc/install | |
2759 | # IRIX /sbin/install | |
2760 | # AIX /bin/install | |
2761 | # AmigaOS /C/install, which installs bootblocks on floppy discs | |
2762 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag | |
2763 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
2764 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
2765 | # OS/2's system install, which has a completely different semantic | |
2766 | # ./install, which can be erroneously created by make from ./install.sh. | |
2767 | # Reject install programs that cannot install multiple files. | |
2768 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 | |
2769 | $as_echo_n "checking for a BSD-compatible install... " >&6; } | |
2770 | if test -z "$INSTALL"; then | |
9ba41eb9 | 2771 | if test "${ac_cv_path_install+set}" = set; then : |
743c80a7 PE |
2772 | $as_echo_n "(cached) " >&6 |
2773 | else | |
2774 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2775 | for as_dir in $PATH | |
2776 | do | |
2777 | IFS=$as_save_IFS | |
2778 | test -z "$as_dir" && as_dir=. | |
2779 | # Account for people who put trailing slashes in PATH elements. | |
2780 | case $as_dir/ in #(( | |
2781 | ./ | .// | /[cC]/* | \ | |
2782 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ | |
2783 | ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ | |
2784 | /usr/ucb/* ) ;; | |
2785 | *) | |
2786 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
2787 | # Don't use installbsd from OSF since it installs stuff as root | |
2788 | # by default. | |
2789 | for ac_prog in ginstall scoinst install; do | |
2790 | for ac_exec_ext in '' $ac_executable_extensions; do | |
2791 | if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then | |
2792 | if test $ac_prog = install && | |
2793 | grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
2794 | # AIX install. It has an incompatible calling convention. | |
2795 | : | |
2796 | elif test $ac_prog = install && | |
2797 | grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
2798 | # program-specific install script used by HP pwplus--don't use. | |
2799 | : | |
2800 | else | |
2801 | rm -rf conftest.one conftest.two conftest.dir | |
2802 | echo one > conftest.one | |
2803 | echo two > conftest.two | |
2804 | mkdir conftest.dir | |
2805 | if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && | |
2806 | test -s conftest.one && test -s conftest.two && | |
2807 | test -s conftest.dir/conftest.one && | |
2808 | test -s conftest.dir/conftest.two | |
2809 | then | |
2810 | ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" | |
2811 | break 3 | |
2812 | fi | |
2813 | fi | |
2814 | fi | |
2815 | done | |
2816 | done | |
2817 | ;; | |
2818 | esac | |
067d23c9 | 2819 | |
743c80a7 PE |
2820 | done |
2821 | IFS=$as_save_IFS | |
067d23c9 | 2822 | |
743c80a7 | 2823 | rm -rf conftest.one conftest.two conftest.dir |
067d23c9 | 2824 | |
067d23c9 | 2825 | fi |
743c80a7 PE |
2826 | if test "${ac_cv_path_install+set}" = set; then |
2827 | INSTALL=$ac_cv_path_install | |
2828 | else | |
2829 | # As a last resort, use the slow shell script. Don't cache a | |
2830 | # value for INSTALL within a source directory, because that will | |
2831 | # break other packages using the cache if that directory is | |
2832 | # removed, or if the value is a relative name. | |
2833 | INSTALL=$ac_install_sh | |
2834 | fi | |
067d23c9 | 2835 | fi |
743c80a7 PE |
2836 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 |
2837 | $as_echo "$INSTALL" >&6; } | |
067d23c9 | 2838 | |
743c80a7 PE |
2839 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. |
2840 | # It thinks the first close brace ends the variable substitution. | |
2841 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
067d23c9 | 2842 | |
743c80a7 | 2843 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' |
067d23c9 | 2844 | |
743c80a7 | 2845 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' |
067d23c9 | 2846 | |
743c80a7 PE |
2847 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 |
2848 | $as_echo_n "checking whether build environment is sane... " >&6; } | |
2849 | # Just in case | |
2850 | sleep 1 | |
2851 | echo timestamp > conftest.file | |
2852 | # Reject unsafe characters in $srcdir or the absolute working directory | |
2853 | # name. Accept space and tab only in the latter. | |
2854 | am_lf=' | |
2855 | ' | |
2856 | case `pwd` in | |
2857 | *[\\\"\#\$\&\'\`$am_lf]*) | |
9ba41eb9 | 2858 | as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5 ;; |
743c80a7 PE |
2859 | esac |
2860 | case $srcdir in | |
2861 | *[\\\"\#\$\&\'\`$am_lf\ \ ]*) | |
9ba41eb9 | 2862 | as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5 ;; |
743c80a7 | 2863 | esac |
067d23c9 | 2864 | |
743c80a7 PE |
2865 | # Do `set' in a subshell so we don't clobber the current shell's |
2866 | # arguments. Must try -L first in case configure is actually a | |
2867 | # symlink; some systems play weird games with the mod time of symlinks | |
2868 | # (eg FreeBSD returns the mod time of the symlink's containing | |
2869 | # directory). | |
2870 | if ( | |
2871 | set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` | |
2872 | if test "$*" = "X"; then | |
2873 | # -L didn't work. | |
2874 | set X `ls -t "$srcdir/configure" conftest.file` | |
2875 | fi | |
2876 | rm -f conftest.file | |
2877 | if test "$*" != "X $srcdir/configure conftest.file" \ | |
2878 | && test "$*" != "X conftest.file $srcdir/configure"; then | |
2879 | ||
2880 | # If neither matched, then we have a broken ls. This can happen | |
2881 | # if, for instance, CONFIG_SHELL is bash and it inherits a | |
2882 | # broken ls alias from the environment. This has actually | |
2883 | # happened. Such a system could not be considered "sane". | |
2884 | as_fn_error $? "ls -t appears to fail. Make sure there is not a broken | |
2885 | alias in your environment" "$LINENO" 5 | |
2886 | fi | |
067d23c9 | 2887 | |
743c80a7 PE |
2888 | test "$2" = conftest.file |
2889 | ) | |
2890 | then | |
2891 | # Ok. | |
2892 | : | |
067d23c9 | 2893 | else |
743c80a7 PE |
2894 | as_fn_error $? "newly created file is older than distributed files! |
2895 | Check your system clock" "$LINENO" 5 | |
067d23c9 | 2896 | fi |
743c80a7 PE |
2897 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
2898 | $as_echo "yes" >&6; } | |
2899 | test "$program_prefix" != NONE && | |
2900 | program_transform_name="s&^&$program_prefix&;$program_transform_name" | |
2901 | # Use a double $ so make ignores it. | |
2902 | test "$program_suffix" != NONE && | |
2903 | program_transform_name="s&\$&$program_suffix&;$program_transform_name" | |
2904 | # Double any \ or $. | |
2905 | # By default was `s,x,x', remove it if useless. | |
2906 | ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' | |
2907 | program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` | |
067d23c9 | 2908 | |
743c80a7 PE |
2909 | # expand $ac_aux_dir to an absolute path |
2910 | am_aux_dir=`cd $ac_aux_dir && pwd` | |
067d23c9 | 2911 | |
743c80a7 PE |
2912 | if test x"${MISSING+set}" != xset; then |
2913 | case $am_aux_dir in | |
2914 | *\ * | *\ *) | |
2915 | MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; | |
2916 | *) | |
2917 | MISSING="\${SHELL} $am_aux_dir/missing" ;; | |
2918 | esac | |
067d23c9 | 2919 | fi |
743c80a7 PE |
2920 | # Use eval to expand $SHELL |
2921 | if eval "$MISSING --run true"; then | |
2922 | am_missing_run="$MISSING --run " | |
067d23c9 | 2923 | else |
743c80a7 PE |
2924 | am_missing_run= |
2925 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 | |
2926 | $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} | |
067d23c9 KY |
2927 | fi |
2928 | ||
743c80a7 PE |
2929 | if test x"${install_sh}" != xset; then |
2930 | case $am_aux_dir in | |
2931 | *\ * | *\ *) | |
2932 | install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; | |
2933 | *) | |
2934 | install_sh="\${SHELL} $am_aux_dir/install-sh" | |
2935 | esac | |
067d23c9 KY |
2936 | fi |
2937 | ||
743c80a7 PE |
2938 | # Installed binaries are usually stripped using `strip' when the user |
2939 | # run `make install-strip'. However `strip' might not be the right | |
2940 | # tool to use in cross-compilation environments, therefore Automake | |
2941 | # will honor the `STRIP' environment variable to overrule this program. | |
2942 | if test "$cross_compiling" != no; then | |
2943 | if test -n "$ac_tool_prefix"; then | |
2944 | # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. | |
2945 | set dummy ${ac_tool_prefix}strip; ac_word=$2 | |
2946 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2947 | $as_echo_n "checking for $ac_word... " >&6; } | |
9ba41eb9 | 2948 | if test "${ac_cv_prog_STRIP+set}" = set; then : |
743c80a7 | 2949 | $as_echo_n "(cached) " >&6 |
067d23c9 | 2950 | else |
743c80a7 PE |
2951 | if test -n "$STRIP"; then |
2952 | ac_cv_prog_STRIP="$STRIP" # Let the user override the test. | |
2953 | else | |
2954 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2955 | for as_dir in $PATH | |
2956 | do | |
2957 | IFS=$as_save_IFS | |
2958 | test -z "$as_dir" && as_dir=. | |
2959 | for ac_exec_ext in '' $ac_executable_extensions; do | |
2960 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
2961 | ac_cv_prog_STRIP="${ac_tool_prefix}strip" | |
2962 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
2963 | break 2 | |
2964 | fi | |
2965 | done | |
2966 | done | |
2967 | IFS=$as_save_IFS | |
067d23c9 KY |
2968 | |
2969 | fi | |
067d23c9 | 2970 | fi |
743c80a7 PE |
2971 | STRIP=$ac_cv_prog_STRIP |
2972 | if test -n "$STRIP"; then | |
2973 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 | |
2974 | $as_echo "$STRIP" >&6; } | |
2975 | else | |
2976 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
2977 | $as_echo "no" >&6; } | |
067d23c9 KY |
2978 | fi |
2979 | ||
2980 | ||
067d23c9 | 2981 | fi |
743c80a7 PE |
2982 | if test -z "$ac_cv_prog_STRIP"; then |
2983 | ac_ct_STRIP=$STRIP | |
2984 | # Extract the first word of "strip", so it can be a program name with args. | |
2985 | set dummy strip; ac_word=$2 | |
2986 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2987 | $as_echo_n "checking for $ac_word... " >&6; } | |
9ba41eb9 | 2988 | if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : |
743c80a7 PE |
2989 | $as_echo_n "(cached) " >&6 |
2990 | else | |
2991 | if test -n "$ac_ct_STRIP"; then | |
2992 | ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. | |
2993 | else | |
2994 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2995 | for as_dir in $PATH | |
2996 | do | |
2997 | IFS=$as_save_IFS | |
2998 | test -z "$as_dir" && as_dir=. | |
2999 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3000 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
3001 | ac_cv_prog_ac_ct_STRIP="strip" | |
3002 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3003 | break 2 | |
3004 | fi | |
3005 | done | |
3006 | done | |
3007 | IFS=$as_save_IFS | |
3008 | ||
3009 | fi | |
3010 | fi | |
3011 | ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP | |
3012 | if test -n "$ac_ct_STRIP"; then | |
3013 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 | |
3014 | $as_echo "$ac_ct_STRIP" >&6; } | |
3015 | else | |
3016 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3017 | $as_echo "no" >&6; } | |
3018 | fi | |
3019 | ||
3020 | if test "x$ac_ct_STRIP" = x; then | |
3021 | STRIP=":" | |
3022 | else | |
3023 | case $cross_compiling:$ac_tool_warned in | |
3024 | yes:) | |
3025 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
3026 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
3027 | ac_tool_warned=yes ;; | |
3028 | esac | |
3029 | STRIP=$ac_ct_STRIP | |
3030 | fi | |
3031 | else | |
3032 | STRIP="$ac_cv_prog_STRIP" | |
3033 | fi | |
3034 | ||
3035 | fi | |
3036 | INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" | |
3037 | ||
3038 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 | |
3039 | $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } | |
3040 | if test -z "$MKDIR_P"; then | |
9ba41eb9 | 3041 | if test "${ac_cv_path_mkdir+set}" = set; then : |
743c80a7 PE |
3042 | $as_echo_n "(cached) " >&6 |
3043 | else | |
3044 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3045 | for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin | |
3046 | do | |
3047 | IFS=$as_save_IFS | |
3048 | test -z "$as_dir" && as_dir=. | |
3049 | for ac_prog in mkdir gmkdir; do | |
3050 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3051 | { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue | |
3052 | case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( | |
3053 | 'mkdir (GNU coreutils) '* | \ | |
3054 | 'mkdir (coreutils) '* | \ | |
3055 | 'mkdir (fileutils) '4.1*) | |
3056 | ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext | |
3057 | break 3;; | |
3058 | esac | |
3059 | done | |
3060 | done | |
3061 | done | |
3062 | IFS=$as_save_IFS | |
3063 | ||
3064 | fi | |
3065 | ||
3066 | test -d ./--version && rmdir ./--version | |
3067 | if test "${ac_cv_path_mkdir+set}" = set; then | |
3068 | MKDIR_P="$ac_cv_path_mkdir -p" | |
3069 | else | |
3070 | # As a last resort, use the slow shell script. Don't cache a | |
3071 | # value for MKDIR_P within a source directory, because that will | |
3072 | # break other packages using the cache if that directory is | |
3073 | # removed, or if the value is a relative name. | |
3074 | MKDIR_P="$ac_install_sh -d" | |
3075 | fi | |
3076 | fi | |
3077 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 | |
3078 | $as_echo "$MKDIR_P" >&6; } | |
3079 | ||
a451f14b | 3080 | |
743c80a7 PE |
3081 | mkdir_p="$MKDIR_P" |
3082 | case $mkdir_p in | |
3083 | [\\/$]* | ?:[\\/]*) ;; | |
3084 | */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; | |
3085 | esac | |
3086 | ||
3087 | for ac_prog in gawk mawk nawk awk | |
3088 | do | |
3089 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
3090 | set dummy $ac_prog; ac_word=$2 | |
3091 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3092 | $as_echo_n "checking for $ac_word... " >&6; } | |
9ba41eb9 | 3093 | if test "${ac_cv_prog_AWK+set}" = set; then : |
743c80a7 PE |
3094 | $as_echo_n "(cached) " >&6 |
3095 | else | |
3096 | if test -n "$AWK"; then | |
3097 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
3098 | else | |
3099 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3100 | for as_dir in $PATH | |
3101 | do | |
3102 | IFS=$as_save_IFS | |
3103 | test -z "$as_dir" && as_dir=. | |
3104 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3105 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
3106 | ac_cv_prog_AWK="$ac_prog" | |
3107 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3108 | break 2 | |
3109 | fi | |
3110 | done | |
3111 | done | |
3112 | IFS=$as_save_IFS | |
3113 | ||
3114 | fi | |
3115 | fi | |
3116 | AWK=$ac_cv_prog_AWK | |
3117 | if test -n "$AWK"; then | |
3118 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 | |
3119 | $as_echo "$AWK" >&6; } | |
3120 | else | |
3121 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3122 | $as_echo "no" >&6; } | |
3123 | fi | |
3124 | ||
3125 | ||
3126 | test -n "$AWK" && break | |
3127 | done | |
3128 | ||
3129 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 | |
3130 | $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } | |
3131 | set x ${MAKE-make} | |
3132 | ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` | |
9ba41eb9 | 3133 | if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then : |
743c80a7 PE |
3134 | $as_echo_n "(cached) " >&6 |
3135 | else | |
3136 | cat >conftest.make <<\_ACEOF | |
3137 | SHELL = /bin/sh | |
3138 | all: | |
3139 | @echo '@@@%%%=$(MAKE)=@@@%%%' | |
3140 | _ACEOF | |
3141 | # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. | |
3142 | case `${MAKE-make} -f conftest.make 2>/dev/null` in | |
3143 | *@@@%%%=?*=@@@%%%*) | |
3144 | eval ac_cv_prog_make_${ac_make}_set=yes;; | |
3145 | *) | |
3146 | eval ac_cv_prog_make_${ac_make}_set=no;; | |
3147 | esac | |
3148 | rm -f conftest.make | |
3149 | fi | |
3150 | if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then | |
3151 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
3152 | $as_echo "yes" >&6; } | |
3153 | SET_MAKE= | |
3154 | else | |
3155 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3156 | $as_echo "no" >&6; } | |
3157 | SET_MAKE="MAKE=${MAKE-make}" | |
3158 | fi | |
3159 | ||
3160 | rm -rf .tst 2>/dev/null | |
3161 | mkdir .tst 2>/dev/null | |
3162 | if test -d .tst; then | |
3163 | am__leading_dot=. | |
3164 | else | |
3165 | am__leading_dot=_ | |
3166 | fi | |
3167 | rmdir .tst 2>/dev/null | |
3168 | ||
3169 | if test "`cd $srcdir && pwd`" != "`pwd`"; then | |
3170 | # Use -I$(srcdir) only when $(srcdir) != ., so that make's output | |
3171 | # is not polluted with repeated "-I." | |
3172 | am__isrc=' -I$(srcdir)' | |
3173 | # test to see if srcdir already configured | |
3174 | if test -f $srcdir/config.status; then | |
3175 | as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 | |
3176 | fi | |
3177 | fi | |
3178 | ||
3179 | # test whether we have cygpath | |
3180 | if test -z "$CYGPATH_W"; then | |
3181 | if (cygpath --version) >/dev/null 2>/dev/null; then | |
3182 | CYGPATH_W='cygpath -w' | |
3183 | else | |
3184 | CYGPATH_W=echo | |
3185 | fi | |
3186 | fi | |
3187 | ||
3188 | ||
3189 | # Define the identity of the package. | |
3190 | PACKAGE='emacs' | |
3191 | VERSION='24.0.50' | |
3192 | ||
3193 | ||
3194 | cat >>confdefs.h <<_ACEOF | |
3195 | #define PACKAGE "$PACKAGE" | |
3196 | _ACEOF | |
3197 | ||
3198 | ||
3199 | cat >>confdefs.h <<_ACEOF | |
3200 | #define VERSION "$VERSION" | |
3201 | _ACEOF | |
3202 | ||
3203 | # Some tools Automake needs. | |
3204 | ||
3205 | ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} | |
3206 | ||
3207 | ||
3208 | AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} | |
3209 | ||
3210 | ||
3211 | AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} | |
3212 | ||
3213 | ||
3214 | AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} | |
3215 | ||
3216 | ||
3217 | MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} | |
3218 | ||
3219 | # We need awk for the "check" target. The system "awk" is bad on | |
3220 | # some platforms. | |
3221 | # Always define AMTAR for backward compatibility. | |
3222 | ||
3223 | AMTAR=${AMTAR-"${am_missing_run}tar"} | |
3224 | ||
3225 | am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' | |
3226 | ||
3227 | ||
3228 | ||
3229 | ||
3230 | ||
3231 | ||
3232 | ||
3233 | ||
3234 | lispdir='${datadir}/emacs/${version}/lisp' | |
3235 | locallisppath='${datadir}/emacs/${version}/site-lisp:'\ | |
3236 | '${datadir}/emacs/site-lisp' | |
3237 | lisppath='${locallisppath}:${lispdir}:${datadir}/emacs/${version}/leim' | |
3238 | etcdir='${datadir}/emacs/${version}/etc' | |
3239 | archlibdir='${libexecdir}/emacs/${version}/${configuration}' | |
3240 | docdir='${datadir}/emacs/${version}/etc' | |
3241 | gamedir='${localstatedir}/games/emacs' | |
3242 | ||
3243 | ||
3244 | ||
3245 | ||
3246 | # Check whether --with-pop was given. | |
3247 | if test "${with_pop+set}" = set; then : | |
3248 | withval=$with_pop; | |
3249 | else | |
3250 | with_pop=yes | |
3251 | fi | |
3252 | ||
3253 | if test "$with_pop" = yes; then | |
3254 | $as_echo "#define MAIL_USE_POP 1" >>confdefs.h | |
3255 | ||
3256 | fi | |
3257 | ||
3258 | ||
3259 | # Check whether --with-kerberos was given. | |
3260 | if test "${with_kerberos+set}" = set; then : | |
3261 | withval=$with_kerberos; | |
3262 | else | |
3263 | with_kerberos=no | |
3264 | fi | |
3265 | ||
3266 | if test "$with_kerberos" != no; then | |
3267 | $as_echo "#define KERBEROS 1" >>confdefs.h | |
3268 | ||
3269 | fi | |
3270 | ||
3271 | ||
3272 | # Check whether --with-kerberos5 was given. | |
3273 | if test "${with_kerberos5+set}" = set; then : | |
3274 | withval=$with_kerberos5; | |
3275 | else | |
3276 | with_kerberos5=no | |
3277 | fi | |
3278 | ||
3279 | if test "${with_kerberos5}" != no; then | |
3280 | if test "${with_kerberos}" = no; then | |
3281 | with_kerberos=yes | |
3282 | $as_echo "#define KERBEROS 1" >>confdefs.h | |
3283 | ||
3284 | fi | |
3285 | ||
3286 | $as_echo "#define KERBEROS5 1" >>confdefs.h | |
3287 | ||
3288 | fi | |
3289 | ||
3290 | ||
3291 | # Check whether --with-hesiod was given. | |
3292 | if test "${with_hesiod+set}" = set; then : | |
3293 | withval=$with_hesiod; | |
3294 | else | |
3295 | with_hesiod=no | |
3296 | fi | |
3297 | ||
3298 | if test "$with_hesiod" != no; then | |
3299 | ||
3300 | $as_echo "#define HESIOD 1" >>confdefs.h | |
3301 | ||
3302 | fi | |
3303 | ||
3304 | ||
3305 | # Check whether --with-mmdf was given. | |
3306 | if test "${with_mmdf+set}" = set; then : | |
3307 | withval=$with_mmdf; | |
3308 | else | |
3309 | with_mmdf=no | |
3310 | fi | |
3311 | ||
3312 | if test "$with_mmdf" != no; then | |
3313 | ||
3314 | $as_echo "#define MAIL_USE_MMDF 1" >>confdefs.h | |
3315 | ||
3316 | fi | |
3317 | ||
3318 | ||
3319 | # Check whether --with-mail-unlink was given. | |
3320 | if test "${with_mail_unlink+set}" = set; then : | |
3321 | withval=$with_mail_unlink; | |
3322 | else | |
3323 | with_mail_unlink=no | |
3324 | fi | |
3325 | ||
3326 | if test "$with_mail_unlink" != no; then | |
3327 | ||
3328 | $as_echo "#define MAIL_UNLINK_SPOOL 1" >>confdefs.h | |
3329 | ||
3330 | fi | |
3331 | ||
3332 | ||
3333 | # Check whether --with-mailhost was given. | |
3334 | if test "${with_mailhost+set}" = set; then : | |
3335 | withval=$with_mailhost; | |
3336 | cat >>confdefs.h <<_ACEOF | |
3337 | #define MAILHOST "$withval" | |
3338 | _ACEOF | |
3339 | ||
3340 | fi | |
3341 | ||
3342 | ||
3343 | ||
067d23c9 KY |
3344 | # Check whether --with-sound was given. |
3345 | if test "${with_sound+set}" = set; then : | |
3346 | withval=$with_sound; | |
3347 | else | |
3348 | with_sound=yes | |
3349 | fi | |
3350 | ||
3351 | ||
3352 | ||
3353 | # Check whether --with-sync-input was given. | |
3354 | if test "${with_sync_input+set}" = set; then : | |
3355 | withval=$with_sync_input; | |
3356 | else | |
3357 | with_sync_input=yes | |
3358 | fi | |
3359 | ||
3360 | if test "$with_sync_input" = yes; then | |
3361 | ||
3362 | $as_echo "#define SYNC_INPUT 1" >>confdefs.h | |
3363 | ||
3364 | fi | |
3365 | ||
3366 | ||
3367 | # Check whether --with-x-toolkit was given. | |
3368 | if test "${with_x_toolkit+set}" = set; then : | |
3369 | withval=$with_x_toolkit; case "${withval}" in | |
3370 | y | ye | yes ) val=gtk ;; | |
3371 | n | no ) val=no ;; | |
3372 | l | lu | luc | luci | lucid ) val=lucid ;; | |
3373 | a | at | ath | athe | athen | athena ) val=athena ;; | |
3374 | m | mo | mot | moti | motif ) val=motif ;; | |
3375 | g | gt | gtk ) val=gtk ;; | |
3376 | gtk3 ) val=gtk3 ;; | |
3377 | * ) | |
2018939f | 3378 | as_fn_error $? "\`--with-x-toolkit=$withval' is invalid; |
067d23c9 KY |
3379 | this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif', \`gtk' or |
3380 | \`gtk3'. \`yes' and \`gtk' are synonyms. \`athena' and \`lucid' are synonyms." "$LINENO" 5 | |
3381 | ;; | |
3382 | esac | |
3383 | with_x_toolkit=$val | |
3384 | ||
3385 | fi | |
3386 | ||
3387 | ||
3388 | ||
3389 | # Check whether --with-xpm was given. | |
3390 | if test "${with_xpm+set}" = set; then : | |
3391 | withval=$with_xpm; | |
3392 | else | |
3393 | with_xpm=yes | |
3394 | fi | |
3395 | ||
3396 | ||
3397 | # Check whether --with-jpeg was given. | |
3398 | if test "${with_jpeg+set}" = set; then : | |
3399 | withval=$with_jpeg; | |
3400 | else | |
3401 | with_jpeg=yes | |
3402 | fi | |
3403 | ||
3404 | ||
3405 | # Check whether --with-tiff was given. | |
3406 | if test "${with_tiff+set}" = set; then : | |
3407 | withval=$with_tiff; | |
3408 | else | |
3409 | with_tiff=yes | |
3410 | fi | |
3411 | ||
3412 | ||
3413 | # Check whether --with-gif was given. | |
3414 | if test "${with_gif+set}" = set; then : | |
3415 | withval=$with_gif; | |
3416 | else | |
3417 | with_gif=yes | |
3418 | fi | |
3419 | ||
3420 | ||
3421 | # Check whether --with-png was given. | |
3422 | if test "${with_png+set}" = set; then : | |
3423 | withval=$with_png; | |
3424 | else | |
3425 | with_png=yes | |
3426 | fi | |
3427 | ||
3428 | ||
3429 | # Check whether --with-rsvg was given. | |
3430 | if test "${with_rsvg+set}" = set; then : | |
3431 | withval=$with_rsvg; | |
3432 | else | |
3433 | with_rsvg=yes | |
3434 | fi | |
3435 | ||
3436 | ||
3437 | # Check whether --with-xml2 was given. | |
3438 | if test "${with_xml2+set}" = set; then : | |
3439 | withval=$with_xml2; | |
3440 | else | |
3441 | with_xml2=yes | |
3442 | fi | |
3443 | ||
3444 | ||
3445 | # Check whether --with-imagemagick was given. | |
3446 | if test "${with_imagemagick+set}" = set; then : | |
3447 | withval=$with_imagemagick; | |
3448 | else | |
3449 | with_imagemagick=yes | |
3450 | fi | |
3451 | ||
3452 | ||
3453 | ||
3454 | # Check whether --with-xft was given. | |
3455 | if test "${with_xft+set}" = set; then : | |
3456 | withval=$with_xft; | |
3457 | else | |
3458 | with_xft=yes | |
3459 | fi | |
3460 | ||
3461 | ||
3462 | # Check whether --with-libotf was given. | |
3463 | if test "${with_libotf+set}" = set; then : | |
3464 | withval=$with_libotf; | |
3465 | else | |
3466 | with_libotf=yes | |
3467 | fi | |
3468 | ||
3469 | ||
3470 | # Check whether --with-m17n-flt was given. | |
3471 | if test "${with_m17n_flt+set}" = set; then : | |
3472 | withval=$with_m17n_flt; | |
3473 | else | |
3474 | with_m17n_flt=yes | |
3475 | fi | |
3476 | ||
3477 | ||
3478 | ||
3479 | # Check whether --with-toolkit-scroll-bars was given. | |
3480 | if test "${with_toolkit_scroll_bars+set}" = set; then : | |
3481 | withval=$with_toolkit_scroll_bars; | |
3482 | else | |
3483 | with_toolkit_scroll_bars=yes | |
3484 | fi | |
3485 | ||
3486 | ||
3487 | # Check whether --with-xaw3d was given. | |
3488 | if test "${with_xaw3d+set}" = set; then : | |
3489 | withval=$with_xaw3d; | |
3490 | else | |
3491 | with_xaw3d=yes | |
3492 | fi | |
3493 | ||
3494 | ||
3495 | # Check whether --with-xim was given. | |
3496 | if test "${with_xim+set}" = set; then : | |
3497 | withval=$with_xim; | |
3498 | else | |
3499 | with_xim=yes | |
3500 | fi | |
3501 | ||
3502 | ||
3503 | # Check whether --with-ns was given. | |
3504 | if test "${with_ns+set}" = set; then : | |
3505 | withval=$with_ns; | |
3506 | else | |
3507 | with_ns=no | |
3508 | fi | |
3509 | ||
3510 | ||
3511 | ||
3512 | # Check whether --with-gpm was given. | |
3513 | if test "${with_gpm+set}" = set; then : | |
3514 | withval=$with_gpm; | |
3515 | else | |
3516 | with_gpm=yes | |
3517 | fi | |
3518 | ||
3519 | ||
3520 | # Check whether --with-dbus was given. | |
3521 | if test "${with_dbus+set}" = set; then : | |
3522 | withval=$with_dbus; | |
3523 | else | |
3524 | with_dbus=yes | |
3525 | fi | |
3526 | ||
3527 | ||
3528 | # Check whether --with-gconf was given. | |
3529 | if test "${with_gconf+set}" = set; then : | |
3530 | withval=$with_gconf; | |
3531 | else | |
3532 | with_gconf=yes | |
3533 | fi | |
3534 | ||
3535 | ||
3536 | # Check whether --with-selinux was given. | |
3537 | if test "${with_selinux+set}" = set; then : | |
3538 | withval=$with_selinux; | |
3539 | else | |
3540 | with_selinux=yes | |
3541 | fi | |
3542 | ||
3543 | ||
3544 | # Check whether --with-gnutls was given. | |
3545 | if test "${with_gnutls+set}" = set; then : | |
3546 | withval=$with_gnutls; | |
3547 | else | |
3548 | with_gnutls=yes | |
3549 | fi | |
3550 | ||
3551 | ||
3552 | ## For the times when you want to build Emacs but don't have | |
3553 | ## a suitable makeinfo, and can live without the manuals. | |
3554 | ||
3555 | # Check whether --with-makeinfo was given. | |
3556 | if test "${with_makeinfo+set}" = set; then : | |
3557 | withval=$with_makeinfo; | |
3558 | else | |
3559 | with_makeinfo=yes | |
3560 | fi | |
3561 | ||
3562 | ||
3563 | ## This is an option because I do not know if all info/man support | |
3564 | ## compressed files, nor how to test if they do so. | |
3565 | ||
3566 | # Check whether --with-compress-info was given. | |
3567 | if test "${with_compress_info+set}" = set; then : | |
3568 | withval=$with_compress_info; | |
3569 | else | |
3570 | with_compress_info=yes | |
3571 | fi | |
3572 | ||
3573 | if test $with_compress_info = yes; then | |
3574 | GZIP_INFO=yes | |
3575 | else | |
3576 | GZIP_INFO= | |
3577 | fi | |
3578 | ||
3579 | ||
3580 | ||
3581 | # Check whether --with-pkg-config-prog was given. | |
3582 | if test "${with_pkg_config_prog+set}" = set; then : | |
3583 | withval=$with_pkg_config_prog; | |
3584 | fi | |
3585 | ||
3586 | if test "X${with_pkg_config_prog}" != X; then | |
3587 | if test "${with_pkg_config_prog}" != yes; then | |
3588 | PKG_CONFIG="${with_pkg_config_prog}" | |
3589 | fi | |
3590 | fi | |
3591 | ||
3592 | CRT_DIR= | |
3593 | ||
3594 | # Check whether --with-crt-dir was given. | |
3595 | if test "${with_crt_dir+set}" = set; then : | |
3596 | withval=$with_crt_dir; | |
3597 | fi | |
3598 | ||
3599 | CRT_DIR="${with_crt_dir}" | |
3600 | ||
3601 | ||
4fc5868a UM |
3602 | # Check whether --with-gameuser was given. |
3603 | if test "${with_gameuser+set}" = set; then : | |
3604 | withval=$with_gameuser; | |
3605 | fi | |
3606 | ||
3607 | test "X${with_gameuser}" != X && test "${with_gameuser}" != yes \ | |
3608 | && gameuser="${with_gameuser}" | |
3609 | test "X$gameuser" = X && gameuser=games | |
3610 | ||
3611 | ||
067d23c9 KY |
3612 | # Check whether --with-gnustep-conf was given. |
3613 | if test "${with_gnustep_conf+set}" = set; then : | |
3614 | withval=$with_gnustep_conf; | |
3615 | fi | |
3616 | ||
3617 | test "X${with_gnustep_conf}" != X && test "${with_gnustep_conf}" != yes && \ | |
3618 | GNUSTEP_CONFIG_FILE="${with_gnustep_conf}" | |
3619 | test "X$GNUSTEP_CONFIG_FILE" = "X" && \ | |
3620 | GNUSTEP_CONFIG_FILE=/etc/GNUstep/GNUstep.conf | |
3621 | ||
3622 | # Check whether --enable-ns-self-contained was given. | |
3623 | if test "${enable_ns_self_contained+set}" = set; then : | |
3624 | enableval=$enable_ns_self_contained; EN_NS_SELF_CONTAINED=$enableval | |
3625 | else | |
3626 | EN_NS_SELF_CONTAINED=yes | |
3627 | fi | |
3628 | ||
3629 | ||
3630 | # Check whether --enable-asserts was given. | |
3631 | if test "${enable_asserts+set}" = set; then : | |
3632 | enableval=$enable_asserts; USE_XASSERTS=$enableval | |
3633 | else | |
3634 | USE_XASSERTS=no | |
3635 | fi | |
3636 | ||
3637 | ||
3638 | # Check whether --enable-maintainer-mode was given. | |
3639 | if test "${enable_maintainer_mode+set}" = set; then : | |
3640 | enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval | |
3641 | else | |
3642 | USE_MAINTAINER_MODE=no | |
3643 | fi | |
3644 | ||
3645 | if test $USE_MAINTAINER_MODE = yes; then | |
3646 | MAINT= | |
3647 | else | |
3648 | MAINT=# | |
3649 | fi | |
3650 | ||
3651 | ||
3652 | # Check whether --enable-locallisppath was given. | |
3653 | if test "${enable_locallisppath+set}" = set; then : | |
3654 | enableval=$enable_locallisppath; if test "${enableval}" = "no"; then | |
3655 | locallisppath= | |
3656 | elif test "${enableval}" != "yes"; then | |
3657 | locallisppath=${enableval} | |
3658 | fi | |
3659 | fi | |
3660 | ||
3661 | ||
3662 | # Check whether --enable-checking was given. | |
3663 | if test "${enable_checking+set}" = set; then : | |
3664 | enableval=$enable_checking; ac_checking_flags="${enableval}" | |
3665 | fi | |
3666 | ||
3667 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS," | |
3668 | for check in $ac_checking_flags | |
3669 | do | |
3670 | case $check in | |
3671 | # these set all the flags to specific states | |
3672 | yes) ac_enable_checking=1 ;; | |
3673 | no) ac_enable_checking= ; | |
3674 | ac_gc_check_stringbytes= ; | |
3675 | ac_gc_check_string_overrun= ; | |
3676 | ac_gc_check_string_free_list= ; | |
3677 | ac_xmalloc_overrun= ; | |
3678 | ac_gc_check_cons_list= ;; | |
3679 | all) ac_enable_checking=1 ; | |
3680 | ac_gc_check_stringbytes=1 ; | |
3681 | ac_gc_check_string_overrun=1 ; | |
3682 | ac_gc_check_string_free_list=1 ; | |
3683 | ac_xmalloc_overrun=1 ; | |
3684 | ac_gc_check_cons_list=1 ;; | |
3685 | # these enable particular checks | |
3686 | stringbytes) ac_gc_check_stringbytes=1 ;; | |
3687 | stringoverrun) ac_gc_check_string_overrun=1 ;; | |
3688 | stringfreelist) ac_gc_check_string_free_list=1 ;; | |
3689 | xmallocoverrun) ac_xmalloc_overrun=1 ;; | |
3690 | conslist) ac_gc_check_cons_list=1 ;; | |
9ba41eb9 | 3691 | *) as_fn_error $? "unknown check category $check" "$LINENO" 5 ;; |
067d23c9 KY |
3692 | esac |
3693 | done | |
3694 | IFS="$ac_save_IFS" | |
3695 | ||
3696 | if test x$ac_enable_checking != x ; then | |
3697 | ||
3698 | $as_echo "#define ENABLE_CHECKING 1" >>confdefs.h | |
3699 | ||
3700 | fi | |
3701 | if test x$ac_gc_check_stringbytes != x ; then | |
3702 | ||
3703 | $as_echo "#define GC_CHECK_STRING_BYTES 1" >>confdefs.h | |
3704 | ||
3705 | fi | |
3706 | if test x$ac_gc_check_stringoverrun != x ; then | |
3707 | ||
3708 | $as_echo "#define GC_CHECK_STRING_OVERRUN 1" >>confdefs.h | |
3709 | ||
3710 | fi | |
3711 | if test x$ac_gc_check_string_free_list != x ; then | |
3712 | ||
3713 | $as_echo "#define GC_CHECK_STRING_FREE_LIST 1" >>confdefs.h | |
3714 | ||
3715 | fi | |
3716 | if test x$ac_xmalloc_overrun != x ; then | |
3717 | ||
3718 | $as_echo "#define XMALLOC_OVERRUN_CHECK 1" >>confdefs.h | |
3719 | ||
3720 | fi | |
3721 | if test x$ac_gc_check_cons_list != x ; then | |
3722 | ||
3723 | $as_echo "#define GC_CHECK_CONS_LIST 1" >>confdefs.h | |
3724 | ||
3725 | fi | |
3726 | ||
3727 | # Check whether --enable-use-lisp-union-type was given. | |
3728 | if test "${enable_use_lisp_union_type+set}" = set; then : | |
3729 | enableval=$enable_use_lisp_union_type; if test "${enableval}" != "no"; then | |
3730 | ||
3731 | $as_echo "#define USE_LISP_UNION_TYPE 1" >>confdefs.h | |
3732 | ||
3733 | fi | |
3734 | fi | |
3735 | ||
3736 | ||
3737 | ||
3738 | # Check whether --enable-profiling was given. | |
3739 | if test "${enable_profiling+set}" = set; then : | |
3740 | enableval=$enable_profiling; ac_enable_profiling="${enableval}" | |
3741 | fi | |
3742 | ||
3743 | if test x$ac_enable_profiling != x ; then | |
3744 | PROFILING_CFLAGS="-DPROFILING=1 -pg" | |
3745 | else | |
3746 | PROFILING_CFLAGS= | |
3747 | fi | |
3748 | ||
3749 | ||
3750 | # Check whether --enable-autodepend was given. | |
3751 | if test "${enable_autodepend+set}" = set; then : | |
3752 | enableval=$enable_autodepend; ac_enable_autodepend="${enableval}" | |
3753 | else | |
3754 | ac_enable_autodepend=yes | |
3755 | fi | |
3756 | ||
3757 | ||
3758 | #### Make srcdir absolute, if it isn't already. It's important to | |
3759 | #### avoid running the path through pwd unnecessarily, since pwd can | |
3760 | #### give you automounter prefixes, which can go away. We do all this | |
3761 | #### so Emacs can find its files when run uninstalled. | |
3762 | ## Make sure CDPATH doesn't affect cd (in case PWD is relative). | |
3763 | unset CDPATH | |
3764 | case "${srcdir}" in | |
3765 | /* ) ;; | |
3766 | . ) | |
3767 | ## We may be able to use the $PWD environment variable to make this | |
3768 | ## absolute. But sometimes PWD is inaccurate. | |
3769 | ## Note: we used to use ${PWD} at the end instead of `pwd`, | |
3770 | ## but that tested only for a well-formed and valid PWD, | |
3771 | ## it did not object when PWD was well-formed and valid but just wrong. | |
3772 | if test ".${PWD}" != "." && test ".`(cd ${PWD} ; sh -c pwd)`" = ".`pwd`" ; | |
3773 | then | |
3774 | srcdir="$PWD" | |
3775 | else | |
3776 | srcdir="`(cd ${srcdir}; pwd)`" | |
3777 | fi | |
3778 | ;; | |
3779 | * ) srcdir="`(cd ${srcdir}; pwd)`" ;; | |
3780 | esac | |
3781 | ||
3782 | #### Check if the source directory already has a configured system in it. | |
3783 | if test `pwd` != `(cd ${srcdir} && pwd)` \ | |
3784 | && test -f "${srcdir}/src/config.h" ; then | |
3785 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The directory tree \`${srcdir}' is being used | |
3786 | as a build directory right now; it has been configured in its own | |
3787 | right. To configure in another directory as well, you MUST | |
3788 | use GNU make. If you do not have GNU make, then you must | |
3789 | now do \`make distclean' in ${srcdir}, | |
3790 | and then run $0 again." >&5 | |
3791 | $as_echo "$as_me: WARNING: The directory tree \`${srcdir}' is being used | |
3792 | as a build directory right now; it has been configured in its own | |
3793 | right. To configure in another directory as well, you MUST | |
3794 | use GNU make. If you do not have GNU make, then you must | |
3795 | now do \`make distclean' in ${srcdir}, | |
3796 | and then run $0 again." >&2;} | |
3797 | fi | |
3798 | ||
3799 | #### Given the configuration name, set machfile and opsysfile to the | |
3800 | #### names of the m/*.h and s/*.h files we should use. | |
3801 | ||
3802 | ### Canonicalize the configuration name. | |
3803 | ||
067d23c9 KY |
3804 | # Make sure we can run config.sub. |
3805 | $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || | |
2018939f | 3806 | as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 |
067d23c9 KY |
3807 | |
3808 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 | |
3809 | $as_echo_n "checking build system type... " >&6; } | |
9ba41eb9 | 3810 | if test "${ac_cv_build+set}" = set; then : |
067d23c9 KY |
3811 | $as_echo_n "(cached) " >&6 |
3812 | else | |
3813 | ac_build_alias=$build_alias | |
3814 | test "x$ac_build_alias" = x && | |
3815 | ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` | |
3816 | test "x$ac_build_alias" = x && | |
2018939f | 3817 | as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 |
067d23c9 | 3818 | ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || |
2018939f | 3819 | as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 |
067d23c9 KY |
3820 | |
3821 | fi | |
3822 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 | |
3823 | $as_echo "$ac_cv_build" >&6; } | |
3824 | case $ac_cv_build in | |
3825 | *-*-*) ;; | |
9ba41eb9 | 3826 | *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;; |
067d23c9 KY |
3827 | esac |
3828 | build=$ac_cv_build | |
3829 | ac_save_IFS=$IFS; IFS='-' | |
3830 | set x $ac_cv_build | |
3831 | shift | |
3832 | build_cpu=$1 | |
3833 | build_vendor=$2 | |
3834 | shift; shift | |
3835 | # Remember, the first character of IFS is used to create $*, | |
3836 | # except with old shells: | |
3837 | build_os=$* | |
3838 | IFS=$ac_save_IFS | |
3839 | case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac | |
3840 | ||
3841 | ||
3842 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 | |
3843 | $as_echo_n "checking host system type... " >&6; } | |
9ba41eb9 | 3844 | if test "${ac_cv_host+set}" = set; then : |
067d23c9 KY |
3845 | $as_echo_n "(cached) " >&6 |
3846 | else | |
3847 | if test "x$host_alias" = x; then | |
3848 | ac_cv_host=$ac_cv_build | |
3849 | else | |
3850 | ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || | |
2018939f | 3851 | as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 |
067d23c9 KY |
3852 | fi |
3853 | ||
3854 | fi | |
3855 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 | |
3856 | $as_echo "$ac_cv_host" >&6; } | |
3857 | case $ac_cv_host in | |
3858 | *-*-*) ;; | |
9ba41eb9 | 3859 | *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;; |
067d23c9 KY |
3860 | esac |
3861 | host=$ac_cv_host | |
3862 | ac_save_IFS=$IFS; IFS='-' | |
3863 | set x $ac_cv_host | |
3864 | shift | |
3865 | host_cpu=$1 | |
3866 | host_vendor=$2 | |
3867 | shift; shift | |
3868 | # Remember, the first character of IFS is used to create $*, | |
3869 | # except with old shells: | |
3870 | host_os=$* | |
3871 | IFS=$ac_save_IFS | |
3872 | case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac | |
3873 | ||
3874 | ||
3875 | canonical=$host | |
3876 | configuration=${host_alias-${build_alias-$host}} | |
3877 | ||
3878 | ||
3879 | ||
3880 | ### If you add support for a new configuration, add code to this | |
3881 | ### switch statement to recognize your configuration name and select | |
3882 | ### the appropriate operating system and machine description files. | |
3883 | ||
3884 | ### You would hope that you could choose an m/*.h file pretty much | |
3885 | ### based on the machine portion of the configuration name, and an s/*.h | |
3886 | ### file based on the operating system portion. However, it turns out | |
3887 | ### that each m/*.h file is pretty manufacturer-specific - for | |
3888 | ### example mips.h is MIPS | |
3889 | ### So we basically have to have a special case for each | |
3890 | ### configuration name. | |
3891 | ### | |
3892 | ### As far as handling version numbers on operating systems is | |
3893 | ### concerned, make sure things will fail in a fixable way. If | |
3894 | ### /etc/MACHINES doesn't say anything about version numbers, be | |
3895 | ### prepared to handle anything reasonably. If version numbers | |
3896 | ### matter, be sure /etc/MACHINES says something about it. | |
3897 | ||
3898 | machine='' opsys='' unported=no | |
3899 | case "${canonical}" in | |
3900 | ||
d6a003a8 AS |
3901 | ## GNU/Linux ports |
3902 | *-*-linux-gnu*) | |
3903 | opsys=gnu-linux | |
3904 | case ${canonical} in | |
3905 | alpha*) machine=alpha ;; | |
3906 | s390-*) machine=ibms390 ;; | |
3907 | s390x-*) machine=ibms390x ;; | |
3908 | powerpc*) machine=macppc ;; | |
3909 | sparc*) machine=sparc ;; | |
3910 | ia64*) machine=ia64 ;; | |
3911 | m68k*) machine=m68k ;; | |
3912 | x86_64*) machine=amdx86-64 ;; | |
3913 | esac | |
3914 | ;; | |
3915 | ||
067d23c9 KY |
3916 | ## FreeBSD ports |
3917 | *-*-freebsd* ) | |
3918 | opsys=freebsd | |
3919 | case "${canonical}" in | |
3920 | alpha*) machine=alpha ;; | |
3921 | amd64-*|x86_64-*) machine=amdx86-64 ;; | |
067d23c9 KY |
3922 | ia64-*) machine=ia64 ;; |
3923 | i[3456]86-*) machine=intel386 ;; | |
3924 | powerpc-*) machine=macppc ;; | |
3925 | sparc-*) machine=sparc ;; | |
3926 | sparc64-*) machine=sparc ;; | |
3927 | esac | |
3928 | ;; | |
3929 | ||
3930 | ## FreeBSD kernel + glibc based userland | |
3931 | *-*-kfreebsd*gnu* ) | |
3932 | opsys=gnu-kfreebsd | |
3933 | case "${canonical}" in | |
3934 | alpha*) machine=alpha ;; | |
3935 | amd64-*|x86_64-*) machine=amdx86-64 ;; | |
3936 | ia64-*) machine=ia64 ;; | |
3937 | i[3456]86-*) machine=intel386 ;; | |
3938 | powerpc-*) machine=macppc ;; | |
3939 | sparc-*) machine=sparc ;; | |
3940 | sparc64-*) machine=sparc ;; | |
3941 | esac | |
3942 | ;; | |
3943 | ||
3944 | ## NetBSD ports | |
3945 | *-*-netbsd* ) | |
3946 | opsys=netbsd | |
3947 | case "${canonical}" in | |
3948 | alpha*) machine=alpha ;; | |
3949 | x86_64-*) machine=amdx86-64 ;; | |
067d23c9 KY |
3950 | i[3456]86-*) machine=intel386 ;; |
3951 | m68k-*) machine=m68k ;; | |
3952 | powerpc-*) machine=macppc ;; | |
067d23c9 KY |
3953 | sparc*-) machine=sparc ;; |
3954 | vax-*) machine=vax ;; | |
3955 | esac | |
3956 | ;; | |
3957 | ||
3958 | ## OpenBSD ports | |
3959 | *-*-openbsd* ) | |
3960 | opsys=openbsd | |
3961 | case "${canonical}" in | |
3962 | alpha*) machine=alpha ;; | |
3963 | x86_64-*) machine=amdx86-64 ;; | |
067d23c9 KY |
3964 | i386-*) machine=intel386 ;; |
3965 | powerpc-*) machine=macppc ;; | |
3966 | sparc*) machine=sparc ;; | |
3967 | vax-*) machine=vax ;; | |
3968 | esac | |
3969 | ;; | |
3970 | ||
067d23c9 KY |
3971 | ## Apple Darwin / Mac OS X |
3972 | *-apple-darwin* ) | |
3973 | case "${canonical}" in | |
3974 | i[3456]86-* ) machine=intel386 ;; | |
3975 | powerpc-* ) machine=macppc ;; | |
3976 | x86_64-* ) machine=amdx86-64 ;; | |
3977 | * ) unported=yes ;; | |
3978 | esac | |
3979 | opsys=darwin | |
3980 | # Define CPP as follows to make autoconf work correctly. | |
3981 | CPP="${CC-cc} -E -no-cpp-precomp" | |
3982 | # Use fink packages if available. | |
3983 | if test -d /sw/include && test -d /sw/lib; then | |
3984 | GCC_TEST_OPTIONS="-I/sw/include -L/sw/lib" | |
3985 | CPP="${CPP} ${GCC_TEST_OPTIONS}" | |
3986 | NON_GCC_TEST_OPTIONS=${GCC_TEST_OPTIONS} | |
3987 | fi | |
3988 | ;; | |
3989 | ||
3990 | ## HP 9000 series 700 and 800, running HP/UX | |
3991 | hppa*-hp-hpux10.2* ) | |
d6a003a8 | 3992 | opsys=hpux10-20 |
067d23c9 KY |
3993 | ;; |
3994 | hppa*-hp-hpux1[1-9]* ) | |
d6a003a8 | 3995 | opsys=hpux11 |
067d23c9 KY |
3996 | CFLAGS="-D_INCLUDE__STDC_A1_SOURCE $CFLAGS" |
3997 | ;; | |
3998 | ||
067d23c9 | 3999 | ## IBM machines |
067d23c9 KY |
4000 | rs6000-ibm-aix4.[23]* ) |
4001 | machine=ibmrs6000 opsys=aix4-2 | |
4002 | ;; | |
4003 | powerpc-ibm-aix4.[23]* ) | |
4004 | machine=ibmrs6000 opsys=aix4-2 | |
4005 | ;; | |
4006 | rs6000-ibm-aix[56]* ) | |
4007 | machine=ibmrs6000 opsys=aix4-2 | |
4008 | ;; | |
4009 | powerpc-ibm-aix[56]* ) | |
4010 | machine=ibmrs6000 opsys=aix4-2 | |
4011 | ;; | |
4012 | ||
067d23c9 KY |
4013 | ## Silicon Graphics machines |
4014 | ## Iris 4D | |
4015 | mips-sgi-irix6.5 ) | |
4016 | machine=iris4d opsys=irix6-5 | |
4017 | # Without defining _LANGUAGE_C, things get masked out in the headers | |
4018 | # so that, for instance, grepping for `free' in stdlib.h fails and | |
4019 | # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m). | |
4020 | NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C" | |
4021 | NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C" | |
4022 | ;; | |
4023 | ||
4024 | ## Suns | |
067d23c9 KY |
4025 | *-sun-solaris* \ |
4026 | | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* \ | |
4027 | | x86_64-*-solaris2* | x86_64-*-sunos5*) | |
4028 | case "${canonical}" in | |
4029 | i[3456]86-*-* ) machine=intel386 ;; | |
4030 | amd64-*-*|x86_64-*-*) machine=amdx86-64 ;; | |
4031 | sparc* ) machine=sparc ;; | |
4032 | * ) unported=yes ;; | |
4033 | esac | |
4034 | case "${canonical}" in | |
4035 | *-sunos5.6* | *-solaris2.6* ) | |
4036 | opsys=sol2-6 | |
4037 | NON_GNU_CPP=/usr/ccs/lib/cpp | |
4038 | RANLIB="ar -ts" | |
4039 | ;; | |
4040 | *-sunos5.[7-9]* | *-solaris2.[7-9]* ) | |
4041 | opsys=sol2-6 | |
4042 | emacs_check_sunpro_c=yes | |
4043 | NON_GNU_CPP=/usr/ccs/lib/cpp | |
4044 | ;; | |
4045 | *-sunos5* | *-solaris* ) | |
4046 | opsys=sol2-10 | |
4047 | emacs_check_sunpro_c=yes | |
4048 | NON_GNU_CPP=/usr/ccs/lib/cpp | |
4049 | ;; | |
4050 | esac | |
4051 | ## Watch out for a compiler that we know will not work. | |
4052 | case "${canonical}" in | |
4053 | *-solaris* | *-sunos5* ) | |
4054 | if [ "x$CC" = x/usr/ucb/cc ]; then | |
4055 | ## /usr/ucb/cc doesn't work; | |
4056 | ## we should find some other compiler that does work. | |
4057 | unset CC | |
4058 | fi | |
4059 | ;; | |
4060 | *) ;; | |
4061 | esac | |
4062 | ;; | |
4063 | ||
067d23c9 KY |
4064 | ## Intel 386 machines where we don't care about the manufacturer. |
4065 | i[3456]86-*-* ) | |
4066 | machine=intel386 | |
4067 | case "${canonical}" in | |
4068 | *-cygwin ) opsys=cygwin ;; | |
4069 | *-darwin* ) opsys=darwin | |
4070 | CPP="${CC-cc} -E -no-cpp-precomp" | |
4071 | ;; | |
067d23c9 KY |
4072 | *-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;; |
4073 | *-sysv5uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;; | |
4074 | *-sysv5OpenUNIX* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;; | |
4075 | ## Otherwise, we'll fall through to the generic opsys code at the bottom. | |
4076 | esac | |
4077 | ;; | |
4078 | ||
067d23c9 KY |
4079 | * ) |
4080 | unported=yes | |
4081 | ;; | |
4082 | esac | |
4083 | ||
4084 | ### If the code above didn't choose an operating system, just choose | |
4085 | ### an operating system based on the configuration name. You really | |
4086 | ### only want to use this when you have no idea what the right | |
4087 | ### operating system is; if you know what operating systems a machine | |
4088 | ### runs, it's cleaner to make it explicit in the case statement | |
4089 | ### above. | |
4090 | if test x"${opsys}" = x; then | |
4091 | case "${canonical}" in | |
4092 | *-gnu* ) opsys=gnu ;; | |
4093 | * ) | |
4094 | unported=yes | |
4095 | ;; | |
4096 | esac | |
4097 | fi | |
4098 | ||
4099 | ||
4100 | ||
4101 | if test $unported = yes; then | |
2018939f | 4102 | as_fn_error $? "Emacs hasn't been ported to \`${canonical}' systems. |
067d23c9 KY |
4103 | Check \`etc/MACHINES' for recognized configuration names." "$LINENO" 5 |
4104 | fi | |
4105 | ||
d6a003a8 AS |
4106 | if test -n "$machine"; then |
4107 | machfile="m/${machine}.h" | |
4108 | else | |
4109 | machfile= | |
4110 | fi | |
067d23c9 KY |
4111 | opsysfile="s/${opsys}.h" |
4112 | ||
4113 | ||
4114 | #### Choose a compiler. | |
4115 | test -n "$CC" && cc_specified=yes | |
4116 | ||
4117 | # Save the value of CFLAGS that the user specified. | |
4118 | SPECIFIED_CFLAGS="$CFLAGS" | |
4119 | ||
4120 | ac_ext=c | |
4121 | ac_cpp='$CPP $CPPFLAGS' | |
4122 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
4123 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
4124 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
4125 | if test -n "$ac_tool_prefix"; then | |
4126 | # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. | |
4127 | set dummy ${ac_tool_prefix}gcc; ac_word=$2 | |
4128 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4129 | $as_echo_n "checking for $ac_word... " >&6; } | |
9ba41eb9 | 4130 | if test "${ac_cv_prog_CC+set}" = set; then : |
067d23c9 KY |
4131 | $as_echo_n "(cached) " >&6 |
4132 | else | |
4133 | if test -n "$CC"; then | |
4134 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
4135 | else | |
4136 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4137 | for as_dir in $PATH | |
4138 | do | |
4139 | IFS=$as_save_IFS | |
4140 | test -z "$as_dir" && as_dir=. | |
4141 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4142 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
4143 | ac_cv_prog_CC="${ac_tool_prefix}gcc" | |
4144 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4145 | break 2 | |
4146 | fi | |
4147 | done | |
4148 | done | |
4149 | IFS=$as_save_IFS | |
4150 | ||
4151 | fi | |
4152 | fi | |
4153 | CC=$ac_cv_prog_CC | |
4154 | if test -n "$CC"; then | |
4155 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
4156 | $as_echo "$CC" >&6; } | |
4157 | else | |
4158 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4159 | $as_echo "no" >&6; } | |
4160 | fi | |
4161 | ||
4162 | ||
4163 | fi | |
4164 | if test -z "$ac_cv_prog_CC"; then | |
4165 | ac_ct_CC=$CC | |
4166 | # Extract the first word of "gcc", so it can be a program name with args. | |
4167 | set dummy gcc; ac_word=$2 | |
4168 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4169 | $as_echo_n "checking for $ac_word... " >&6; } | |
9ba41eb9 | 4170 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : |
067d23c9 KY |
4171 | $as_echo_n "(cached) " >&6 |
4172 | else | |
4173 | if test -n "$ac_ct_CC"; then | |
4174 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
4175 | else | |
4176 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4177 | for as_dir in $PATH | |
4178 | do | |
4179 | IFS=$as_save_IFS | |
4180 | test -z "$as_dir" && as_dir=. | |
4181 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4182 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
4183 | ac_cv_prog_ac_ct_CC="gcc" | |
4184 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4185 | break 2 | |
4186 | fi | |
4187 | done | |
4188 | done | |
4189 | IFS=$as_save_IFS | |
4190 | ||
4191 | fi | |
4192 | fi | |
4193 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
4194 | if test -n "$ac_ct_CC"; then | |
4195 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 | |
4196 | $as_echo "$ac_ct_CC" >&6; } | |
4197 | else | |
4198 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4199 | $as_echo "no" >&6; } | |
4200 | fi | |
4201 | ||
4202 | if test "x$ac_ct_CC" = x; then | |
4203 | CC="" | |
4204 | else | |
4205 | case $cross_compiling:$ac_tool_warned in | |
4206 | yes:) | |
4207 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
4208 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
4209 | ac_tool_warned=yes ;; | |
4210 | esac | |
4211 | CC=$ac_ct_CC | |
4212 | fi | |
4213 | else | |
4214 | CC="$ac_cv_prog_CC" | |
4215 | fi | |
4216 | ||
4217 | if test -z "$CC"; then | |
4218 | if test -n "$ac_tool_prefix"; then | |
4219 | # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. | |
4220 | set dummy ${ac_tool_prefix}cc; ac_word=$2 | |
4221 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4222 | $as_echo_n "checking for $ac_word... " >&6; } | |
9ba41eb9 | 4223 | if test "${ac_cv_prog_CC+set}" = set; then : |
067d23c9 KY |
4224 | $as_echo_n "(cached) " >&6 |
4225 | else | |
4226 | if test -n "$CC"; then | |
4227 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
4228 | else | |
4229 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4230 | for as_dir in $PATH | |
4231 | do | |
4232 | IFS=$as_save_IFS | |
4233 | test -z "$as_dir" && as_dir=. | |
4234 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4235 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
4236 | ac_cv_prog_CC="${ac_tool_prefix}cc" | |
4237 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4238 | break 2 | |
4239 | fi | |
4240 | done | |
4241 | done | |
4242 | IFS=$as_save_IFS | |
4243 | ||
4244 | fi | |
4245 | fi | |
4246 | CC=$ac_cv_prog_CC | |
4247 | if test -n "$CC"; then | |
4248 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
4249 | $as_echo "$CC" >&6; } | |
4250 | else | |
4251 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4252 | $as_echo "no" >&6; } | |
4253 | fi | |
4254 | ||
4255 | ||
4256 | fi | |
4257 | fi | |
4258 | if test -z "$CC"; then | |
4259 | # Extract the first word of "cc", so it can be a program name with args. | |
4260 | set dummy cc; ac_word=$2 | |
4261 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4262 | $as_echo_n "checking for $ac_word... " >&6; } | |
9ba41eb9 | 4263 | if test "${ac_cv_prog_CC+set}" = set; then : |
067d23c9 KY |
4264 | $as_echo_n "(cached) " >&6 |
4265 | else | |
4266 | if test -n "$CC"; then | |
4267 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
4268 | else | |
4269 | ac_prog_rejected=no | |
4270 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4271 | for as_dir in $PATH | |
4272 | do | |
4273 | IFS=$as_save_IFS | |
4274 | test -z "$as_dir" && as_dir=. | |
4275 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4276 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
4277 | if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then | |
4278 | ac_prog_rejected=yes | |
4279 | continue | |
4280 | fi | |
4281 | ac_cv_prog_CC="cc" | |
4282 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4283 | break 2 | |
4284 | fi | |
4285 | done | |
4286 | done | |
4287 | IFS=$as_save_IFS | |
4288 | ||
4289 | if test $ac_prog_rejected = yes; then | |
4290 | # We found a bogon in the path, so make sure we never use it. | |
4291 | set dummy $ac_cv_prog_CC | |
4292 | shift | |
4293 | if test $# != 0; then | |
4294 | # We chose a different compiler from the bogus one. | |
4295 | # However, it has the same basename, so the bogon will be chosen | |
4296 | # first if we set CC to just the basename; use the full file name. | |
4297 | shift | |
4298 | ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" | |
4299 | fi | |
4300 | fi | |
4301 | fi | |
4302 | fi | |
4303 | CC=$ac_cv_prog_CC | |
4304 | if test -n "$CC"; then | |
4305 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
4306 | $as_echo "$CC" >&6; } | |
4307 | else | |
4308 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4309 | $as_echo "no" >&6; } | |
4310 | fi | |
4311 | ||
4312 | ||
4313 | fi | |
4314 | if test -z "$CC"; then | |
4315 | if test -n "$ac_tool_prefix"; then | |
4316 | for ac_prog in cl.exe | |
4317 | do | |
4318 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | |
4319 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | |
4320 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4321 | $as_echo_n "checking for $ac_word... " >&6; } | |
9ba41eb9 | 4322 | if test "${ac_cv_prog_CC+set}" = set; then : |
067d23c9 KY |
4323 | $as_echo_n "(cached) " >&6 |
4324 | else | |
4325 | if test -n "$CC"; then | |
4326 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
4327 | else | |
4328 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4329 | for as_dir in $PATH | |
4330 | do | |
4331 | IFS=$as_save_IFS | |
4332 | test -z "$as_dir" && as_dir=. | |
4333 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4334 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
4335 | ac_cv_prog_CC="$ac_tool_prefix$ac_prog" | |
4336 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4337 | break 2 | |
4338 | fi | |
4339 | done | |
4340 | done | |
4341 | IFS=$as_save_IFS | |
4342 | ||
4343 | fi | |
4344 | fi | |
4345 | CC=$ac_cv_prog_CC | |
4346 | if test -n "$CC"; then | |
4347 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
4348 | $as_echo "$CC" >&6; } | |
4349 | else | |
4350 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4351 | $as_echo "no" >&6; } | |
4352 | fi | |
4353 | ||
4354 | ||
4355 | test -n "$CC" && break | |
4356 | done | |
4357 | fi | |
4358 | if test -z "$CC"; then | |
4359 | ac_ct_CC=$CC | |
4360 | for ac_prog in cl.exe | |
4361 | do | |
4362 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
4363 | set dummy $ac_prog; ac_word=$2 | |
4364 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4365 | $as_echo_n "checking for $ac_word... " >&6; } | |
9ba41eb9 | 4366 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : |
067d23c9 KY |
4367 | $as_echo_n "(cached) " >&6 |
4368 | else | |
4369 | if test -n "$ac_ct_CC"; then | |
4370 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
4371 | else | |
4372 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4373 | for as_dir in $PATH | |
4374 | do | |
4375 | IFS=$as_save_IFS | |
4376 | test -z "$as_dir" && as_dir=. | |
4377 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4378 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
4379 | ac_cv_prog_ac_ct_CC="$ac_prog" | |
4380 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4381 | break 2 | |
4382 | fi | |
4383 | done | |
4384 | done | |
4385 | IFS=$as_save_IFS | |
4386 | ||
4387 | fi | |
4388 | fi | |
4389 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
4390 | if test -n "$ac_ct_CC"; then | |
4391 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 | |
4392 | $as_echo "$ac_ct_CC" >&6; } | |
4393 | else | |
4394 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4395 | $as_echo "no" >&6; } | |
4396 | fi | |
4397 | ||
4398 | ||
4399 | test -n "$ac_ct_CC" && break | |
4400 | done | |
4401 | ||
4402 | if test "x$ac_ct_CC" = x; then | |
4403 | CC="" | |
4404 | else | |
4405 | case $cross_compiling:$ac_tool_warned in | |
4406 | yes:) | |
4407 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
4408 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
4409 | ac_tool_warned=yes ;; | |
4410 | esac | |
4411 | CC=$ac_ct_CC | |
4412 | fi | |
4413 | fi | |
4414 | ||
4415 | fi | |
4416 | ||
4417 | ||
4418 | test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
4419 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
2018939f | 4420 | as_fn_error $? "no acceptable C compiler found in \$PATH |
9ba41eb9 | 4421 | See \`config.log' for more details" "$LINENO" 5 ; } |
067d23c9 KY |
4422 | |
4423 | # Provide some information about the compiler. | |
4424 | $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 | |
4425 | set X $ac_compile | |
4426 | ac_compiler=$2 | |
4427 | for ac_option in --version -v -V -qversion; do | |
4428 | { { ac_try="$ac_compiler $ac_option >&5" | |
4429 | case "(($ac_try" in | |
4430 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4431 | *) ac_try_echo=$ac_try;; | |
4432 | esac | |
4433 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
4434 | $as_echo "$ac_try_echo"; } >&5 | |
4435 | (eval "$ac_compiler $ac_option >&5") 2>conftest.err | |
4436 | ac_status=$? | |
4437 | if test -s conftest.err; then | |
4438 | sed '10a\ | |
4439 | ... rest of stderr output deleted ... | |
4440 | 10q' conftest.err >conftest.er1 | |
4441 | cat conftest.er1 >&5 | |
4442 | fi | |
4443 | rm -f conftest.er1 conftest.err | |
4444 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
4445 | test $ac_status = 0; } | |
4446 | done | |
4447 | ||
4448 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4449 | /* end confdefs.h. */ | |
4450 | ||
4451 | int | |
4452 | main () | |
4453 | { | |
4454 | ||
4455 | ; | |
4456 | return 0; | |
4457 | } | |
4458 | _ACEOF | |
4459 | ac_clean_files_save=$ac_clean_files | |
4460 | ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" | |
4461 | # Try to create an executable without -o first, disregard a.out. | |
4462 | # It will help us diagnose broken compilers, and finding out an intuition | |
4463 | # of exeext. | |
4464 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 | |
4465 | $as_echo_n "checking whether the C compiler works... " >&6; } | |
4466 | ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` | |
4467 | ||
4468 | # The possible output files: | |
4469 | ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" | |
4470 | ||
4471 | ac_rmfiles= | |
4472 | for ac_file in $ac_files | |
4473 | do | |
4474 | case $ac_file in | |
4475 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; | |
4476 | * ) ac_rmfiles="$ac_rmfiles $ac_file";; | |
4477 | esac | |
4478 | done | |
4479 | rm -f $ac_rmfiles | |
4480 | ||
4481 | if { { ac_try="$ac_link_default" | |
4482 | case "(($ac_try" in | |
4483 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4484 | *) ac_try_echo=$ac_try;; | |
4485 | esac | |
4486 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
4487 | $as_echo "$ac_try_echo"; } >&5 | |
4488 | (eval "$ac_link_default") 2>&5 | |
4489 | ac_status=$? | |
4490 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
4491 | test $ac_status = 0; }; then : | |
4492 | # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. | |
4493 | # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' | |
4494 | # in a Makefile. We should not override ac_cv_exeext if it was cached, | |
4495 | # so that the user can short-circuit this test for compilers unknown to | |
4496 | # Autoconf. | |
4497 | for ac_file in $ac_files '' | |
4498 | do | |
4499 | test -f "$ac_file" || continue | |
4500 | case $ac_file in | |
4501 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) | |
4502 | ;; | |
4503 | [ab].out ) | |
4504 | # We found the default executable, but exeext='' is most | |
4505 | # certainly right. | |
4506 | break;; | |
4507 | *.* ) | |
4508 | if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; | |
4509 | then :; else | |
4510 | ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` | |
4511 | fi | |
4512 | # We set ac_cv_exeext here because the later test for it is not | |
4513 | # safe: cross compilers may not add the suffix if given an `-o' | |
4514 | # argument, so we may need to know it at that point already. | |
4515 | # Even if this section looks crufty: it has the advantage of | |
4516 | # actually working. | |
4517 | break;; | |
4518 | * ) | |
4519 | break;; | |
4520 | esac | |
4521 | done | |
4522 | test "$ac_cv_exeext" = no && ac_cv_exeext= | |
4523 | ||
4524 | else | |
4525 | ac_file='' | |
4526 | fi | |
4527 | if test -z "$ac_file"; then : | |
4528 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4529 | $as_echo "no" >&6; } | |
4530 | $as_echo "$as_me: failed program was:" >&5 | |
4531 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4532 | ||
4533 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
4534 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
2018939f | 4535 | as_fn_error 77 "C compiler cannot create executables |
9ba41eb9 | 4536 | See \`config.log' for more details" "$LINENO" 5 ; } |
067d23c9 KY |
4537 | else |
4538 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
4539 | $as_echo "yes" >&6; } | |
4540 | fi | |
4541 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 | |
4542 | $as_echo_n "checking for C compiler default output file name... " >&6; } | |
4543 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 | |
4544 | $as_echo "$ac_file" >&6; } | |
4545 | ac_exeext=$ac_cv_exeext | |
4546 | ||
4547 | rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out | |
4548 | ac_clean_files=$ac_clean_files_save | |
4549 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 | |
4550 | $as_echo_n "checking for suffix of executables... " >&6; } | |
4551 | if { { ac_try="$ac_link" | |
4552 | case "(($ac_try" in | |
4553 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4554 | *) ac_try_echo=$ac_try;; | |
4555 | esac | |
4556 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
4557 | $as_echo "$ac_try_echo"; } >&5 | |
4558 | (eval "$ac_link") 2>&5 | |
4559 | ac_status=$? | |
4560 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
4561 | test $ac_status = 0; }; then : | |
4562 | # If both `conftest.exe' and `conftest' are `present' (well, observable) | |
4563 | # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will | |
4564 | # work properly (i.e., refer to `conftest.exe'), while it won't with | |
4565 | # `rm'. | |
4566 | for ac_file in conftest.exe conftest conftest.*; do | |
4567 | test -f "$ac_file" || continue | |
4568 | case $ac_file in | |
4569 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; | |
4570 | *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` | |
4571 | break;; | |
4572 | * ) break;; | |
4573 | esac | |
4574 | done | |
4575 | else | |
4576 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
4577 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
2018939f | 4578 | as_fn_error $? "cannot compute suffix of executables: cannot compile and link |
9ba41eb9 | 4579 | See \`config.log' for more details" "$LINENO" 5 ; } |
067d23c9 KY |
4580 | fi |
4581 | rm -f conftest conftest$ac_cv_exeext | |
4582 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 | |
4583 | $as_echo "$ac_cv_exeext" >&6; } | |
4584 | ||
4585 | rm -f conftest.$ac_ext | |
4586 | EXEEXT=$ac_cv_exeext | |
4587 | ac_exeext=$EXEEXT | |
4588 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4589 | /* end confdefs.h. */ | |
4590 | #include <stdio.h> | |
4591 | int | |
4592 | main () | |
4593 | { | |
4594 | FILE *f = fopen ("conftest.out", "w"); | |
4595 | return ferror (f) || fclose (f) != 0; | |
4596 | ||
4597 | ; | |
4598 | return 0; | |
4599 | } | |
4600 | _ACEOF | |
4601 | ac_clean_files="$ac_clean_files conftest.out" | |
4602 | # Check that the compiler produces executables we can run. If not, either | |
4603 | # the compiler is broken, or we cross compile. | |
4604 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 | |
4605 | $as_echo_n "checking whether we are cross compiling... " >&6; } | |
4606 | if test "$cross_compiling" != yes; then | |
4607 | { { ac_try="$ac_link" | |
4608 | case "(($ac_try" in | |
4609 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4610 | *) ac_try_echo=$ac_try;; | |
4611 | esac | |
4612 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
4613 | $as_echo "$ac_try_echo"; } >&5 | |
4614 | (eval "$ac_link") 2>&5 | |
4615 | ac_status=$? | |
4616 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
4617 | test $ac_status = 0; } | |
4618 | if { ac_try='./conftest$ac_cv_exeext' | |
4619 | { { case "(($ac_try" in | |
4620 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4621 | *) ac_try_echo=$ac_try;; | |
4622 | esac | |
4623 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
4624 | $as_echo "$ac_try_echo"; } >&5 | |
4625 | (eval "$ac_try") 2>&5 | |
4626 | ac_status=$? | |
4627 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
4628 | test $ac_status = 0; }; }; then | |
4629 | cross_compiling=no | |
4630 | else | |
4631 | if test "$cross_compiling" = maybe; then | |
4632 | cross_compiling=yes | |
4633 | else | |
4634 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
4635 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
2018939f | 4636 | as_fn_error $? "cannot run C compiled programs. |
067d23c9 | 4637 | If you meant to cross compile, use \`--host'. |
9ba41eb9 | 4638 | See \`config.log' for more details" "$LINENO" 5 ; } |
067d23c9 KY |
4639 | fi |
4640 | fi | |
4641 | fi | |
4642 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 | |
4643 | $as_echo "$cross_compiling" >&6; } | |
4644 | ||
4645 | rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out | |
4646 | ac_clean_files=$ac_clean_files_save | |
4647 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 | |
4648 | $as_echo_n "checking for suffix of object files... " >&6; } | |
9ba41eb9 | 4649 | if test "${ac_cv_objext+set}" = set; then : |
067d23c9 KY |
4650 | $as_echo_n "(cached) " >&6 |
4651 | else | |
4652 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4653 | /* end confdefs.h. */ | |
4654 | ||
4655 | int | |
4656 | main () | |
4657 | { | |
4658 | ||
4659 | ; | |
4660 | return 0; | |
4661 | } | |
4662 | _ACEOF | |
4663 | rm -f conftest.o conftest.obj | |
4664 | if { { ac_try="$ac_compile" | |
4665 | case "(($ac_try" in | |
4666 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4667 | *) ac_try_echo=$ac_try;; | |
4668 | esac | |
4669 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
4670 | $as_echo "$ac_try_echo"; } >&5 | |
4671 | (eval "$ac_compile") 2>&5 | |
4672 | ac_status=$? | |
4673 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
4674 | test $ac_status = 0; }; then : | |
4675 | for ac_file in conftest.o conftest.obj conftest.*; do | |
4676 | test -f "$ac_file" || continue; | |
4677 | case $ac_file in | |
4678 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; | |
4679 | *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` | |
4680 | break;; | |
4681 | esac | |
4682 | done | |
4683 | else | |
4684 | $as_echo "$as_me: failed program was:" >&5 | |
4685 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4686 | ||
4687 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
4688 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
2018939f | 4689 | as_fn_error $? "cannot compute suffix of object files: cannot compile |
9ba41eb9 | 4690 | See \`config.log' for more details" "$LINENO" 5 ; } |
067d23c9 KY |
4691 | fi |
4692 | rm -f conftest.$ac_cv_objext conftest.$ac_ext | |
4693 | fi | |
4694 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 | |
4695 | $as_echo "$ac_cv_objext" >&6; } | |
4696 | OBJEXT=$ac_cv_objext | |
4697 | ac_objext=$OBJEXT | |
4698 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 | |
4699 | $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } | |
9ba41eb9 | 4700 | if test "${ac_cv_c_compiler_gnu+set}" = set; then : |
067d23c9 KY |
4701 | $as_echo_n "(cached) " >&6 |
4702 | else | |
4703 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4704 | /* end confdefs.h. */ | |
4705 | ||
4706 | int | |
4707 | main () | |
4708 | { | |
4709 | #ifndef __GNUC__ | |
4710 | choke me | |
4711 | #endif | |
4712 | ||
4713 | ; | |
4714 | return 0; | |
4715 | } | |
4716 | _ACEOF | |
4717 | if ac_fn_c_try_compile "$LINENO"; then : | |
4718 | ac_compiler_gnu=yes | |
4719 | else | |
4720 | ac_compiler_gnu=no | |
4721 | fi | |
4722 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4723 | ac_cv_c_compiler_gnu=$ac_compiler_gnu | |
4724 | ||
4725 | fi | |
4726 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 | |
4727 | $as_echo "$ac_cv_c_compiler_gnu" >&6; } | |
4728 | if test $ac_compiler_gnu = yes; then | |
4729 | GCC=yes | |
4730 | else | |
4731 | GCC= | |
4732 | fi | |
4733 | ac_test_CFLAGS=${CFLAGS+set} | |
4734 | ac_save_CFLAGS=$CFLAGS | |
4735 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 | |
4736 | $as_echo_n "checking whether $CC accepts -g... " >&6; } | |
9ba41eb9 | 4737 | if test "${ac_cv_prog_cc_g+set}" = set; then : |
067d23c9 KY |
4738 | $as_echo_n "(cached) " >&6 |
4739 | else | |
4740 | ac_save_c_werror_flag=$ac_c_werror_flag | |
4741 | ac_c_werror_flag=yes | |
4742 | ac_cv_prog_cc_g=no | |
4743 | CFLAGS="-g" | |
4744 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4745 | /* end confdefs.h. */ | |
4746 | ||
4747 | int | |
4748 | main () | |
4749 | { | |
4750 | ||
4751 | ; | |
4752 | return 0; | |
4753 | } | |
4754 | _ACEOF | |
4755 | if ac_fn_c_try_compile "$LINENO"; then : | |
4756 | ac_cv_prog_cc_g=yes | |
4757 | else | |
4758 | CFLAGS="" | |
4759 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4760 | /* end confdefs.h. */ | |
4761 | ||
4762 | int | |
4763 | main () | |
4764 | { | |
4765 | ||
4766 | ; | |
4767 | return 0; | |
4768 | } | |
4769 | _ACEOF | |
4770 | if ac_fn_c_try_compile "$LINENO"; then : | |
4771 | ||
4772 | else | |
4773 | ac_c_werror_flag=$ac_save_c_werror_flag | |
4774 | CFLAGS="-g" | |
4775 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4776 | /* end confdefs.h. */ | |
4777 | ||
4778 | int | |
4779 | main () | |
4780 | { | |
4781 | ||
4782 | ; | |
4783 | return 0; | |
4784 | } | |
4785 | _ACEOF | |
4786 | if ac_fn_c_try_compile "$LINENO"; then : | |
4787 | ac_cv_prog_cc_g=yes | |
4788 | fi | |
4789 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4790 | fi | |
4791 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4792 | fi | |
4793 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4794 | ac_c_werror_flag=$ac_save_c_werror_flag | |
4795 | fi | |
4796 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 | |
4797 | $as_echo "$ac_cv_prog_cc_g" >&6; } | |
4798 | if test "$ac_test_CFLAGS" = set; then | |
4799 | CFLAGS=$ac_save_CFLAGS | |
4800 | elif test $ac_cv_prog_cc_g = yes; then | |
4801 | if test "$GCC" = yes; then | |
4802 | CFLAGS="-g -O2" | |
4803 | else | |
4804 | CFLAGS="-g" | |
4805 | fi | |
4806 | else | |
4807 | if test "$GCC" = yes; then | |
4808 | CFLAGS="-O2" | |
4809 | else | |
4810 | CFLAGS= | |
4811 | fi | |
4812 | fi | |
4813 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 | |
4814 | $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } | |
9ba41eb9 | 4815 | if test "${ac_cv_prog_cc_c89+set}" = set; then : |
067d23c9 KY |
4816 | $as_echo_n "(cached) " >&6 |
4817 | else | |
4818 | ac_cv_prog_cc_c89=no | |
4819 | ac_save_CC=$CC | |
4820 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4821 | /* end confdefs.h. */ | |
4822 | #include <stdarg.h> | |
4823 | #include <stdio.h> | |
4824 | #include <sys/types.h> | |
4825 | #include <sys/stat.h> | |
4826 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
4827 | struct buf { int x; }; | |
4828 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
4829 | static char *e (p, i) | |
4830 | char **p; | |
4831 | int i; | |
4832 | { | |
4833 | return p[i]; | |
4834 | } | |
4835 | static char *f (char * (*g) (char **, int), char **p, ...) | |
4836 | { | |
4837 | char *s; | |
4838 | va_list v; | |
4839 | va_start (v,p); | |
4840 | s = g (p, va_arg (v,int)); | |
4841 | va_end (v); | |
4842 | return s; | |
4843 | } | |
4844 | ||
4845 | /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has | |
4846 | function prototypes and stuff, but not '\xHH' hex character constants. | |
4847 | These don't provoke an error unfortunately, instead are silently treated | |
4848 | as 'x'. The following induces an error, until -std is added to get | |
4849 | proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an | |
4850 | array size at least. It's necessary to write '\x00'==0 to get something | |
4851 | that's true only with -std. */ | |
4852 | int osf4_cc_array ['\x00' == 0 ? 1 : -1]; | |
4853 | ||
4854 | /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters | |
4855 | inside strings and character constants. */ | |
4856 | #define FOO(x) 'x' | |
4857 | int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; | |
4858 | ||
4859 | int test (int i, double x); | |
4860 | struct s1 {int (*f) (int a);}; | |
4861 | struct s2 {int (*f) (double a);}; | |
4862 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
4863 | int argc; | |
4864 | char **argv; | |
4865 | int | |
4866 | main () | |
4867 | { | |
4868 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; | |
4869 | ; | |
4870 | return 0; | |
4871 | } | |
4872 | _ACEOF | |
4873 | for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ | |
4874 | -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
4875 | do | |
4876 | CC="$ac_save_CC $ac_arg" | |
4877 | if ac_fn_c_try_compile "$LINENO"; then : | |
4878 | ac_cv_prog_cc_c89=$ac_arg | |
4879 | fi | |
4880 | rm -f core conftest.err conftest.$ac_objext | |
4881 | test "x$ac_cv_prog_cc_c89" != "xno" && break | |
4882 | done | |
743c80a7 PE |
4883 | rm -f conftest.$ac_ext |
4884 | CC=$ac_save_CC | |
4885 | ||
4886 | fi | |
4887 | # AC_CACHE_VAL | |
4888 | case "x$ac_cv_prog_cc_c89" in | |
4889 | x) | |
4890 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 | |
4891 | $as_echo "none needed" >&6; } ;; | |
4892 | xno) | |
4893 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 | |
4894 | $as_echo "unsupported" >&6; } ;; | |
4895 | *) | |
4896 | CC="$CC $ac_cv_prog_cc_c89" | |
4897 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 | |
4898 | $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; | |
4899 | esac | |
4900 | if test "x$ac_cv_prog_cc_c89" != xno; then : | |
4901 | ||
4902 | fi | |
4903 | ||
4904 | ac_ext=c | |
4905 | ac_cpp='$CPP $CPPFLAGS' | |
4906 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
4907 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
4908 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
4909 | DEPDIR="${am__leading_dot}deps" | |
4910 | ||
4911 | ac_config_commands="$ac_config_commands depfiles" | |
4912 | ||
4913 | ||
4914 | am_make=${MAKE-make} | |
4915 | cat > confinc << 'END' | |
4916 | am__doit: | |
4917 | @echo this is the am__doit target | |
4918 | .PHONY: am__doit | |
4919 | END | |
4920 | # If we don't find an include directive, just comment out the code. | |
4921 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 | |
4922 | $as_echo_n "checking for style of include used by $am_make... " >&6; } | |
4923 | am__include="#" | |
4924 | am__quote= | |
4925 | _am_result=none | |
4926 | # First try GNU make style include. | |
4927 | echo "include confinc" > confmf | |
4928 | # Ignore all kinds of additional output from `make'. | |
4929 | case `$am_make -s -f confmf 2> /dev/null` in #( | |
4930 | *the\ am__doit\ target*) | |
4931 | am__include=include | |
4932 | am__quote= | |
4933 | _am_result=GNU | |
4934 | ;; | |
4935 | esac | |
4936 | # Now try BSD make style include. | |
4937 | if test "$am__include" = "#"; then | |
4938 | echo '.include "confinc"' > confmf | |
4939 | case `$am_make -s -f confmf 2> /dev/null` in #( | |
4940 | *the\ am__doit\ target*) | |
4941 | am__include=.include | |
4942 | am__quote="\"" | |
4943 | _am_result=BSD | |
4944 | ;; | |
4945 | esac | |
4946 | fi | |
4947 | ||
4948 | ||
4949 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 | |
4950 | $as_echo "$_am_result" >&6; } | |
4951 | rm -f confinc confmf | |
4952 | ||
4953 | # Check whether --enable-dependency-tracking was given. | |
4954 | if test "${enable_dependency_tracking+set}" = set; then : | |
4955 | enableval=$enable_dependency_tracking; | |
4956 | fi | |
4957 | ||
4958 | if test "x$enable_dependency_tracking" != xno; then | |
4959 | am_depcomp="$ac_aux_dir/depcomp" | |
4960 | AMDEPBACKSLASH='\' | |
4961 | fi | |
4962 | if test "x$enable_dependency_tracking" != xno; then | |
4963 | AMDEP_TRUE= | |
4964 | AMDEP_FALSE='#' | |
4965 | else | |
4966 | AMDEP_TRUE='#' | |
4967 | AMDEP_FALSE= | |
4968 | fi | |
4969 | ||
4970 | ||
4971 | ||
4972 | depcc="$CC" am_compiler_list= | |
4973 | ||
4974 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 | |
4975 | $as_echo_n "checking dependency style of $depcc... " >&6; } | |
9ba41eb9 | 4976 | if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : |
743c80a7 PE |
4977 | $as_echo_n "(cached) " >&6 |
4978 | else | |
4979 | if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then | |
4980 | # We make a subdir and do the tests there. Otherwise we can end up | |
4981 | # making bogus files that we don't know about and never remove. For | |
4982 | # instance it was reported that on HP-UX the gcc test will end up | |
4983 | # making a dummy file named `D' -- because `-MD' means `put the output | |
4984 | # in D'. | |
4985 | mkdir conftest.dir | |
4986 | # Copy depcomp to subdir because otherwise we won't find it if we're | |
4987 | # using a relative directory. | |
4988 | cp "$am_depcomp" conftest.dir | |
4989 | cd conftest.dir | |
4990 | # We will build objects and dependencies in a subdirectory because | |
4991 | # it helps to detect inapplicable dependency modes. For instance | |
4992 | # both Tru64's cc and ICC support -MD to output dependencies as a | |
4993 | # side effect of compilation, but ICC will put the dependencies in | |
4994 | # the current directory while Tru64 will put them in the object | |
4995 | # directory. | |
4996 | mkdir sub | |
4997 | ||
4998 | am_cv_CC_dependencies_compiler_type=none | |
4999 | if test "$am_compiler_list" = ""; then | |
5000 | am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` | |
5001 | fi | |
5002 | am__universal=false | |
5003 | case " $depcc " in #( | |
5004 | *\ -arch\ *\ -arch\ *) am__universal=true ;; | |
5005 | esac | |
5006 | ||
5007 | for depmode in $am_compiler_list; do | |
5008 | # Setup a source with many dependencies, because some compilers | |
5009 | # like to wrap large dependency lists on column 80 (with \), and | |
5010 | # we should not choose a depcomp mode which is confused by this. | |
5011 | # | |
5012 | # We need to recreate these files for each test, as the compiler may | |
5013 | # overwrite some of them when testing with obscure command lines. | |
5014 | # This happens at least with the AIX C compiler. | |
5015 | : > sub/conftest.c | |
5016 | for i in 1 2 3 4 5 6; do | |
5017 | echo '#include "conftst'$i'.h"' >> sub/conftest.c | |
5018 | # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with | |
5019 | # Solaris 8's {/usr,}/bin/sh. | |
5020 | touch sub/conftst$i.h | |
5021 | done | |
5022 | echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf | |
5023 | ||
5024 | # We check with `-c' and `-o' for the sake of the "dashmstdout" | |
5025 | # mode. It turns out that the SunPro C++ compiler does not properly | |
5026 | # handle `-M -o', and we need to detect this. Also, some Intel | |
5027 | # versions had trouble with output in subdirs | |
5028 | am__obj=sub/conftest.${OBJEXT-o} | |
5029 | am__minus_obj="-o $am__obj" | |
5030 | case $depmode in | |
5031 | gcc) | |
5032 | # This depmode causes a compiler race in universal mode. | |
5033 | test "$am__universal" = false || continue | |
5034 | ;; | |
5035 | nosideeffect) | |
5036 | # after this tag, mechanisms are not by side-effect, so they'll | |
5037 | # only be used when explicitly requested | |
5038 | if test "x$enable_dependency_tracking" = xyes; then | |
5039 | continue | |
5040 | else | |
5041 | break | |
5042 | fi | |
5043 | ;; | |
5044 | msvisualcpp | msvcmsys) | |
5045 | # This compiler won't grok `-c -o', but also, the minuso test has | |
5046 | # not run yet. These depmodes are late enough in the game, and | |
5047 | # so weak that their functioning should not be impacted. | |
5048 | am__obj=conftest.${OBJEXT-o} | |
5049 | am__minus_obj= | |
5050 | ;; | |
5051 | none) break ;; | |
5052 | esac | |
5053 | if depmode=$depmode \ | |
5054 | source=sub/conftest.c object=$am__obj \ | |
5055 | depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ | |
5056 | $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ | |
5057 | >/dev/null 2>conftest.err && | |
5058 | grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && | |
5059 | grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && | |
5060 | grep $am__obj sub/conftest.Po > /dev/null 2>&1 && | |
5061 | ${MAKE-make} -s -f confmf > /dev/null 2>&1; then | |
5062 | # icc doesn't choke on unknown options, it will just issue warnings | |
5063 | # or remarks (even with -Werror). So we grep stderr for any message | |
5064 | # that says an option was ignored or not supported. | |
5065 | # When given -MP, icc 7.0 and 7.1 complain thusly: | |
5066 | # icc: Command line warning: ignoring option '-M'; no argument required | |
5067 | # The diagnosis changed in icc 8.0: | |
5068 | # icc: Command line remark: option '-MP' not supported | |
5069 | if (grep 'ignoring option' conftest.err || | |
5070 | grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else | |
5071 | am_cv_CC_dependencies_compiler_type=$depmode | |
5072 | break | |
5073 | fi | |
5074 | fi | |
5075 | done | |
5076 | ||
5077 | cd .. | |
5078 | rm -rf conftest.dir | |
5079 | else | |
5080 | am_cv_CC_dependencies_compiler_type=none | |
5081 | fi | |
5082 | ||
5083 | fi | |
5084 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 | |
5085 | $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } | |
5086 | CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type | |
5087 | ||
5088 | if | |
5089 | test "x$enable_dependency_tracking" != xno \ | |
5090 | && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then | |
5091 | am__fastdepCC_TRUE= | |
5092 | am__fastdepCC_FALSE='#' | |
5093 | else | |
5094 | am__fastdepCC_TRUE='#' | |
5095 | am__fastdepCC_FALSE= | |
5096 | fi | |
5097 | ||
5098 | ||
5099 | if test "x$CC" != xcc; then | |
5100 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5 | |
5101 | $as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; } | |
5102 | else | |
5103 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5 | |
5104 | $as_echo_n "checking whether cc understands -c and -o together... " >&6; } | |
5105 | fi | |
5106 | set dummy $CC; ac_cc=`$as_echo "$2" | | |
5107 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` | |
9ba41eb9 | 5108 | if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\"" = set; then : |
743c80a7 PE |
5109 | $as_echo_n "(cached) " >&6 |
5110 | else | |
5111 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5112 | /* end confdefs.h. */ | |
5113 | ||
5114 | int | |
5115 | main () | |
5116 | { | |
5117 | ||
5118 | ; | |
5119 | return 0; | |
5120 | } | |
5121 | _ACEOF | |
5122 | # Make sure it works both with $CC and with simple cc. | |
5123 | # We do the test twice because some compilers refuse to overwrite an | |
5124 | # existing .o file with -o, though they will create one. | |
5125 | ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5' | |
5126 | rm -f conftest2.* | |
5127 | if { { case "(($ac_try" in | |
5128 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5129 | *) ac_try_echo=$ac_try;; | |
5130 | esac | |
5131 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
5132 | $as_echo "$ac_try_echo"; } >&5 | |
5133 | (eval "$ac_try") 2>&5 | |
5134 | ac_status=$? | |
5135 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
5136 | test $ac_status = 0; } && | |
5137 | test -f conftest2.$ac_objext && { { case "(($ac_try" in | |
5138 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5139 | *) ac_try_echo=$ac_try;; | |
5140 | esac | |
5141 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
5142 | $as_echo "$ac_try_echo"; } >&5 | |
5143 | (eval "$ac_try") 2>&5 | |
5144 | ac_status=$? | |
5145 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
5146 | test $ac_status = 0; }; | |
5147 | then | |
5148 | eval ac_cv_prog_cc_${ac_cc}_c_o=yes | |
5149 | if test "x$CC" != xcc; then | |
5150 | # Test first that cc exists at all. | |
5151 | if { ac_try='cc -c conftest.$ac_ext >&5' | |
5152 | { { case "(($ac_try" in | |
5153 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5154 | *) ac_try_echo=$ac_try;; | |
5155 | esac | |
5156 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
5157 | $as_echo "$ac_try_echo"; } >&5 | |
5158 | (eval "$ac_try") 2>&5 | |
5159 | ac_status=$? | |
5160 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
5161 | test $ac_status = 0; }; }; then | |
5162 | ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5' | |
5163 | rm -f conftest2.* | |
5164 | if { { case "(($ac_try" in | |
5165 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5166 | *) ac_try_echo=$ac_try;; | |
5167 | esac | |
5168 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
5169 | $as_echo "$ac_try_echo"; } >&5 | |
5170 | (eval "$ac_try") 2>&5 | |
5171 | ac_status=$? | |
5172 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
5173 | test $ac_status = 0; } && | |
5174 | test -f conftest2.$ac_objext && { { case "(($ac_try" in | |
5175 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5176 | *) ac_try_echo=$ac_try;; | |
5177 | esac | |
5178 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
5179 | $as_echo "$ac_try_echo"; } >&5 | |
5180 | (eval "$ac_try") 2>&5 | |
5181 | ac_status=$? | |
5182 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
5183 | test $ac_status = 0; }; | |
5184 | then | |
5185 | # cc works too. | |
5186 | : | |
5187 | else | |
5188 | # cc exists but doesn't like -o. | |
5189 | eval ac_cv_prog_cc_${ac_cc}_c_o=no | |
5190 | fi | |
5191 | fi | |
5192 | fi | |
5193 | else | |
5194 | eval ac_cv_prog_cc_${ac_cc}_c_o=no | |
5195 | fi | |
5196 | rm -f core conftest* | |
5197 | ||
5198 | fi | |
5199 | if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then | |
5200 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
5201 | $as_echo "yes" >&6; } | |
5202 | else | |
5203 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
5204 | $as_echo "no" >&6; } | |
5205 | ||
5206 | $as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h | |
5207 | ||
5208 | fi | |
5209 | ||
5210 | # FIXME: we rely on the cache variable name because | |
5211 | # there is no other way. | |
5212 | set dummy $CC | |
5213 | am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` | |
5214 | eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o | |
5215 | if test "$am_t" != yes; then | |
5216 | # Losing compiler, so override with the script. | |
5217 | # FIXME: It is wrong to rewrite CC. | |
5218 | # But if we don't then we get into trouble of one sort or another. | |
5219 | # A longer-term fix would be to have automake use am__CC in this case, | |
5220 | # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" | |
5221 | CC="$am_aux_dir/compile $CC" | |
5222 | fi | |
5223 | ||
5224 | ||
5225 | ||
5226 | # Initialize gnulib right after verifying that the C compiler works. | |
5227 | if test -n "$ac_tool_prefix"; then | |
5228 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
5229 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
5230 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
5231 | $as_echo_n "checking for $ac_word... " >&6; } | |
9ba41eb9 | 5232 | if test "${ac_cv_prog_RANLIB+set}" = set; then : |
743c80a7 PE |
5233 | $as_echo_n "(cached) " >&6 |
5234 | else | |
5235 | if test -n "$RANLIB"; then | |
5236 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
5237 | else | |
5238 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5239 | for as_dir in $PATH | |
5240 | do | |
5241 | IFS=$as_save_IFS | |
5242 | test -z "$as_dir" && as_dir=. | |
5243 | for ac_exec_ext in '' $ac_executable_extensions; do | |
5244 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
5245 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" | |
5246 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
5247 | break 2 | |
5248 | fi | |
5249 | done | |
5250 | done | |
5251 | IFS=$as_save_IFS | |
5252 | ||
5253 | fi | |
5254 | fi | |
5255 | RANLIB=$ac_cv_prog_RANLIB | |
5256 | if test -n "$RANLIB"; then | |
5257 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 | |
5258 | $as_echo "$RANLIB" >&6; } | |
5259 | else | |
5260 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
5261 | $as_echo "no" >&6; } | |
5262 | fi | |
5263 | ||
5264 | ||
5265 | fi | |
5266 | if test -z "$ac_cv_prog_RANLIB"; then | |
5267 | ac_ct_RANLIB=$RANLIB | |
5268 | # Extract the first word of "ranlib", so it can be a program name with args. | |
5269 | set dummy ranlib; ac_word=$2 | |
5270 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
5271 | $as_echo_n "checking for $ac_word... " >&6; } | |
9ba41eb9 | 5272 | if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : |
743c80a7 PE |
5273 | $as_echo_n "(cached) " >&6 |
5274 | else | |
5275 | if test -n "$ac_ct_RANLIB"; then | |
5276 | ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. | |
5277 | else | |
5278 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5279 | for as_dir in $PATH | |
5280 | do | |
5281 | IFS=$as_save_IFS | |
5282 | test -z "$as_dir" && as_dir=. | |
5283 | for ac_exec_ext in '' $ac_executable_extensions; do | |
5284 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
5285 | ac_cv_prog_ac_ct_RANLIB="ranlib" | |
5286 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
5287 | break 2 | |
5288 | fi | |
5289 | done | |
5290 | done | |
5291 | IFS=$as_save_IFS | |
067d23c9 KY |
5292 | |
5293 | fi | |
743c80a7 PE |
5294 | fi |
5295 | ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB | |
5296 | if test -n "$ac_ct_RANLIB"; then | |
5297 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 | |
5298 | $as_echo "$ac_ct_RANLIB" >&6; } | |
5299 | else | |
5300 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
5301 | $as_echo "no" >&6; } | |
5302 | fi | |
067d23c9 | 5303 | |
743c80a7 PE |
5304 | if test "x$ac_ct_RANLIB" = x; then |
5305 | RANLIB=":" | |
5306 | else | |
5307 | case $cross_compiling:$ac_tool_warned in | |
5308 | yes:) | |
5309 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
5310 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
5311 | ac_tool_warned=yes ;; | |
5312 | esac | |
5313 | RANLIB=$ac_ct_RANLIB | |
5314 | fi | |
5315 | else | |
5316 | RANLIB="$ac_cv_prog_RANLIB" | |
067d23c9 KY |
5317 | fi |
5318 | ||
743c80a7 | 5319 | |
067d23c9 KY |
5320 | ac_ext=c |
5321 | ac_cpp='$CPP $CPPFLAGS' | |
5322 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
5323 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
5324 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
5325 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 | |
5326 | $as_echo_n "checking how to run the C preprocessor... " >&6; } | |
5327 | # On Suns, sometimes $CPP names a directory. | |
5328 | if test -n "$CPP" && test -d "$CPP"; then | |
5329 | CPP= | |
5330 | fi | |
5331 | if test -z "$CPP"; then | |
9ba41eb9 | 5332 | if test "${ac_cv_prog_CPP+set}" = set; then : |
067d23c9 KY |
5333 | $as_echo_n "(cached) " >&6 |
5334 | else | |
5335 | # Double quotes because CPP needs to be expanded | |
5336 | for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" | |
5337 | do | |
5338 | ac_preproc_ok=false | |
5339 | for ac_c_preproc_warn_flag in '' yes | |
5340 | do | |
5341 | # Use a header file that comes with gcc, so configuring glibc | |
5342 | # with a fresh cross-compiler works. | |
5343 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
5344 | # <limits.h> exists even on freestanding compilers. | |
5345 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
5346 | # not just through cpp. "Syntax error" is here to catch this case. | |
5347 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5348 | /* end confdefs.h. */ | |
5349 | #ifdef __STDC__ | |
5350 | # include <limits.h> | |
5351 | #else | |
5352 | # include <assert.h> | |
5353 | #endif | |
5354 | Syntax error | |
5355 | _ACEOF | |
5356 | if ac_fn_c_try_cpp "$LINENO"; then : | |
5357 | ||
5358 | else | |
5359 | # Broken: fails on valid input. | |
5360 | continue | |
5361 | fi | |
2018939f | 5362 | rm -f conftest.err conftest.i conftest.$ac_ext |
067d23c9 KY |
5363 | |
5364 | # OK, works on sane cases. Now check whether nonexistent headers | |
5365 | # can be detected and how. | |
5366 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5367 | /* end confdefs.h. */ | |
5368 | #include <ac_nonexistent.h> | |
5369 | _ACEOF | |
5370 | if ac_fn_c_try_cpp "$LINENO"; then : | |
5371 | # Broken: success on invalid input. | |
5372 | continue | |
5373 | else | |
5374 | # Passes both tests. | |
5375 | ac_preproc_ok=: | |
5376 | break | |
5377 | fi | |
2018939f | 5378 | rm -f conftest.err conftest.i conftest.$ac_ext |
067d23c9 KY |
5379 | |
5380 | done | |
5381 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
2018939f | 5382 | rm -f conftest.i conftest.err conftest.$ac_ext |
067d23c9 KY |
5383 | if $ac_preproc_ok; then : |
5384 | break | |
5385 | fi | |
5386 | ||
5387 | done | |
5388 | ac_cv_prog_CPP=$CPP | |
5389 | ||
5390 | fi | |
5391 | CPP=$ac_cv_prog_CPP | |
5392 | else | |
5393 | ac_cv_prog_CPP=$CPP | |
5394 | fi | |
5395 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 | |
5396 | $as_echo "$CPP" >&6; } | |
5397 | ac_preproc_ok=false | |
5398 | for ac_c_preproc_warn_flag in '' yes | |
5399 | do | |
5400 | # Use a header file that comes with gcc, so configuring glibc | |
5401 | # with a fresh cross-compiler works. | |
5402 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
5403 | # <limits.h> exists even on freestanding compilers. | |
5404 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
5405 | # not just through cpp. "Syntax error" is here to catch this case. | |
5406 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5407 | /* end confdefs.h. */ | |
5408 | #ifdef __STDC__ | |
5409 | # include <limits.h> | |
5410 | #else | |
5411 | # include <assert.h> | |
5412 | #endif | |
5413 | Syntax error | |
5414 | _ACEOF | |
5415 | if ac_fn_c_try_cpp "$LINENO"; then : | |
5416 | ||
5417 | else | |
5418 | # Broken: fails on valid input. | |
5419 | continue | |
5420 | fi | |
2018939f | 5421 | rm -f conftest.err conftest.i conftest.$ac_ext |
067d23c9 KY |
5422 | |
5423 | # OK, works on sane cases. Now check whether nonexistent headers | |
5424 | # can be detected and how. | |
5425 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5426 | /* end confdefs.h. */ | |
5427 | #include <ac_nonexistent.h> | |
5428 | _ACEOF | |
5429 | if ac_fn_c_try_cpp "$LINENO"; then : | |
5430 | # Broken: success on invalid input. | |
5431 | continue | |
5432 | else | |
5433 | # Passes both tests. | |
5434 | ac_preproc_ok=: | |
5435 | break | |
5436 | fi | |
2018939f | 5437 | rm -f conftest.err conftest.i conftest.$ac_ext |
067d23c9 KY |
5438 | |
5439 | done | |
5440 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
2018939f | 5441 | rm -f conftest.i conftest.err conftest.$ac_ext |
067d23c9 KY |
5442 | if $ac_preproc_ok; then : |
5443 | ||
5444 | else | |
5445 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
5446 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
2018939f | 5447 | as_fn_error $? "C preprocessor \"$CPP\" fails sanity check |
9ba41eb9 | 5448 | See \`config.log' for more details" "$LINENO" 5 ; } |
067d23c9 KY |
5449 | fi |
5450 | ||
5451 | ac_ext=c | |
5452 | ac_cpp='$CPP $CPPFLAGS' | |
5453 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
5454 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
5455 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
5456 | ||
5457 | ||
5458 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 | |
5459 | $as_echo_n "checking for grep that handles long lines and -e... " >&6; } | |
9ba41eb9 | 5460 | if test "${ac_cv_path_GREP+set}" = set; then : |
067d23c9 KY |
5461 | $as_echo_n "(cached) " >&6 |
5462 | else | |
5463 | if test -z "$GREP"; then | |
5464 | ac_path_GREP_found=false | |
5465 | # Loop through the user's path and test for each of PROGNAME-LIST | |
5466 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5467 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
5468 | do | |
5469 | IFS=$as_save_IFS | |
5470 | test -z "$as_dir" && as_dir=. | |
5471 | for ac_prog in grep ggrep; do | |
5472 | for ac_exec_ext in '' $ac_executable_extensions; do | |
5473 | ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" | |
5474 | { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue | |
5475 | # Check for GNU ac_path_GREP and select it if it is found. | |
5476 | # Check for GNU $ac_path_GREP | |
5477 | case `"$ac_path_GREP" --version 2>&1` in | |
5478 | *GNU*) | |
5479 | ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; | |
5480 | *) | |
5481 | ac_count=0 | |
5482 | $as_echo_n 0123456789 >"conftest.in" | |
5483 | while : | |
5484 | do | |
5485 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
5486 | mv "conftest.tmp" "conftest.in" | |
5487 | cp "conftest.in" "conftest.nl" | |
5488 | $as_echo 'GREP' >> "conftest.nl" | |
5489 | "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
5490 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
5491 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
5492 | if test $ac_count -gt ${ac_path_GREP_max-0}; then | |
5493 | # Best one so far, save it but keep looking for a better one | |
5494 | ac_cv_path_GREP="$ac_path_GREP" | |
5495 | ac_path_GREP_max=$ac_count | |
5496 | fi | |
5497 | # 10*(2^10) chars as input seems more than enough | |
5498 | test $ac_count -gt 10 && break | |
5499 | done | |
5500 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
5501 | esac | |
5502 | ||
5503 | $ac_path_GREP_found && break 3 | |
5504 | done | |
5505 | done | |
5506 | done | |
5507 | IFS=$as_save_IFS | |
5508 | if test -z "$ac_cv_path_GREP"; then | |
2018939f | 5509 | as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 |
067d23c9 KY |
5510 | fi |
5511 | else | |
5512 | ac_cv_path_GREP=$GREP | |
5513 | fi | |
5514 | ||
5515 | fi | |
5516 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 | |
5517 | $as_echo "$ac_cv_path_GREP" >&6; } | |
5518 | GREP="$ac_cv_path_GREP" | |
5519 | ||
5520 | ||
5521 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 | |
5522 | $as_echo_n "checking for egrep... " >&6; } | |
9ba41eb9 | 5523 | if test "${ac_cv_path_EGREP+set}" = set; then : |
067d23c9 KY |
5524 | $as_echo_n "(cached) " >&6 |
5525 | else | |
5526 | if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 | |
5527 | then ac_cv_path_EGREP="$GREP -E" | |
5528 | else | |
5529 | if test -z "$EGREP"; then | |
5530 | ac_path_EGREP_found=false | |
5531 | # Loop through the user's path and test for each of PROGNAME-LIST | |
5532 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5533 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
5534 | do | |
5535 | IFS=$as_save_IFS | |
5536 | test -z "$as_dir" && as_dir=. | |
5537 | for ac_prog in egrep; do | |
5538 | for ac_exec_ext in '' $ac_executable_extensions; do | |
5539 | ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" | |
5540 | { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue | |
5541 | # Check for GNU ac_path_EGREP and select it if it is found. | |
5542 | # Check for GNU $ac_path_EGREP | |
5543 | case `"$ac_path_EGREP" --version 2>&1` in | |
5544 | *GNU*) | |
5545 | ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; | |
5546 | *) | |
5547 | ac_count=0 | |
5548 | $as_echo_n 0123456789 >"conftest.in" | |
5549 | while : | |
5550 | do | |
5551 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
5552 | mv "conftest.tmp" "conftest.in" | |
5553 | cp "conftest.in" "conftest.nl" | |
5554 | $as_echo 'EGREP' >> "conftest.nl" | |
5555 | "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
5556 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
5557 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
5558 | if test $ac_count -gt ${ac_path_EGREP_max-0}; then | |
5559 | # Best one so far, save it but keep looking for a better one | |
5560 | ac_cv_path_EGREP="$ac_path_EGREP" | |
5561 | ac_path_EGREP_max=$ac_count | |
5562 | fi | |
5563 | # 10*(2^10) chars as input seems more than enough | |
5564 | test $ac_count -gt 10 && break | |
5565 | done | |
5566 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
5567 | esac | |
5568 | ||
5569 | $ac_path_EGREP_found && break 3 | |
5570 | done | |
5571 | done | |
5572 | done | |
5573 | IFS=$as_save_IFS | |
5574 | if test -z "$ac_cv_path_EGREP"; then | |
2018939f | 5575 | as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 |
067d23c9 KY |
5576 | fi |
5577 | else | |
5578 | ac_cv_path_EGREP=$EGREP | |
5579 | fi | |
5580 | ||
5581 | fi | |
5582 | fi | |
5583 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 | |
5584 | $as_echo "$ac_cv_path_EGREP" >&6; } | |
5585 | EGREP="$ac_cv_path_EGREP" | |
5586 | ||
5587 | ||
5588 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 | |
5589 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
9ba41eb9 | 5590 | if test "${ac_cv_header_stdc+set}" = set; then : |
067d23c9 KY |
5591 | $as_echo_n "(cached) " >&6 |
5592 | else | |
5593 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5594 | /* end confdefs.h. */ | |
5595 | #include <stdlib.h> | |
5596 | #include <stdarg.h> | |
5597 | #include <string.h> | |
5598 | #include <float.h> | |
5599 | ||
5600 | int | |
5601 | main () | |
5602 | { | |
5603 | ||
5604 | ; | |
5605 | return 0; | |
5606 | } | |
5607 | _ACEOF | |
5608 | if ac_fn_c_try_compile "$LINENO"; then : | |
5609 | ac_cv_header_stdc=yes | |
5610 | else | |
5611 | ac_cv_header_stdc=no | |
5612 | fi | |
5613 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5614 | ||
5615 | if test $ac_cv_header_stdc = yes; then | |
5616 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
5617 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5618 | /* end confdefs.h. */ | |
5619 | #include <string.h> | |
5620 | ||
5621 | _ACEOF | |
5622 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
5623 | $EGREP "memchr" >/dev/null 2>&1; then : | |
5624 | ||
5625 | else | |
5626 | ac_cv_header_stdc=no | |
5627 | fi | |
5628 | rm -f conftest* | |
5629 | ||
5630 | fi | |
5631 | ||
5632 | if test $ac_cv_header_stdc = yes; then | |
5633 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
5634 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5635 | /* end confdefs.h. */ | |
5636 | #include <stdlib.h> | |
5637 | ||
5638 | _ACEOF | |
5639 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
5640 | $EGREP "free" >/dev/null 2>&1; then : | |
5641 | ||
5642 | else | |
5643 | ac_cv_header_stdc=no | |
5644 | fi | |
5645 | rm -f conftest* | |
5646 | ||
5647 | fi | |
5648 | ||
5649 | if test $ac_cv_header_stdc = yes; then | |
5650 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
5651 | if test "$cross_compiling" = yes; then : | |
5652 | : | |
5653 | else | |
5654 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5655 | /* end confdefs.h. */ | |
5656 | #include <ctype.h> | |
5657 | #include <stdlib.h> | |
5658 | #if ((' ' & 0x0FF) == 0x020) | |
5659 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
5660 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
5661 | #else | |
5662 | # define ISLOWER(c) \ | |
5663 | (('a' <= (c) && (c) <= 'i') \ | |
5664 | || ('j' <= (c) && (c) <= 'r') \ | |
5665 | || ('s' <= (c) && (c) <= 'z')) | |
5666 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
5667 | #endif | |
5668 | ||
5669 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
5670 | int | |
5671 | main () | |
5672 | { | |
5673 | int i; | |
5674 | for (i = 0; i < 256; i++) | |
5675 | if (XOR (islower (i), ISLOWER (i)) | |
5676 | || toupper (i) != TOUPPER (i)) | |
5677 | return 2; | |
5678 | return 0; | |
5679 | } | |
5680 | _ACEOF | |
5681 | if ac_fn_c_try_run "$LINENO"; then : | |
5682 | ||
5683 | else | |
5684 | ac_cv_header_stdc=no | |
5685 | fi | |
5686 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
5687 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
5688 | fi | |
5689 | ||
5690 | fi | |
5691 | fi | |
5692 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 | |
5693 | $as_echo "$ac_cv_header_stdc" >&6; } | |
5694 | if test $ac_cv_header_stdc = yes; then | |
5695 | ||
5696 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h | |
5697 | ||
5698 | fi | |
5699 | ||
5700 | # On IRIX 5.3, sys/types and inttypes.h are conflicting. | |
5701 | for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ | |
5702 | inttypes.h stdint.h unistd.h | |
5703 | do : | |
5704 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
5705 | ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default | |
5706 | " | |
2018939f | 5707 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : |
067d23c9 KY |
5708 | cat >>confdefs.h <<_ACEOF |
5709 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
5710 | _ACEOF | |
5711 | ||
5712 | fi | |
5713 | ||
5714 | done | |
5715 | ||
5716 | ||
5717 | ||
1fd182f0 PE |
5718 | |
5719 | ||
067d23c9 | 5720 | ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" |
9ba41eb9 | 5721 | if test "x$ac_cv_header_minix_config_h" = x""yes; then : |
067d23c9 KY |
5722 | MINIX=yes |
5723 | else | |
5724 | MINIX= | |
5725 | fi | |
5726 | ||
5727 | ||
5728 | if test "$MINIX" = yes; then | |
5729 | ||
5730 | $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h | |
5731 | ||
5732 | ||
5733 | $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h | |
5734 | ||
5735 | ||
5736 | $as_echo "#define _MINIX 1" >>confdefs.h | |
5737 | ||
5738 | fi | |
5739 | ||
1fd182f0 PE |
5740 | case "$host_os" in |
5741 | hpux*) | |
5742 | ||
5743 | $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h | |
5744 | ||
5745 | ;; | |
5746 | esac | |
5747 | ||
067d23c9 KY |
5748 | |
5749 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 | |
5750 | $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } | |
9ba41eb9 | 5751 | if test "${ac_cv_safe_to_define___extensions__+set}" = set; then : |
067d23c9 KY |
5752 | $as_echo_n "(cached) " >&6 |
5753 | else | |
5754 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5755 | /* end confdefs.h. */ | |
5756 | ||
1fd182f0 PE |
5757 | # define __EXTENSIONS__ 1 |
5758 | $ac_includes_default | |
067d23c9 KY |
5759 | int |
5760 | main () | |
5761 | { | |
5762 | ||
5763 | ; | |
5764 | return 0; | |
5765 | } | |
5766 | _ACEOF | |
5767 | if ac_fn_c_try_compile "$LINENO"; then : | |
5768 | ac_cv_safe_to_define___extensions__=yes | |
5769 | else | |
5770 | ac_cv_safe_to_define___extensions__=no | |
5771 | fi | |
5772 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5773 | fi | |
5774 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 | |
5775 | $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } | |
5776 | test $ac_cv_safe_to_define___extensions__ = yes && | |
5777 | $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h | |
5778 | ||
5779 | $as_echo "#define _ALL_SOURCE 1" >>confdefs.h | |
5780 | ||
5781 | $as_echo "#define _GNU_SOURCE 1" >>confdefs.h | |
5782 | ||
5783 | $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h | |
5784 | ||
5785 | $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h | |
5786 | ||
5787 | ||
5788 | ||
1fd182f0 PE |
5789 | |
5790 | ||
5791 | ||
5792 | ||
5793 | ||
5794 | ||
5795 | ||
5796 | # Code from module arg-nonnull: | |
5797 | # Code from module c++defs: | |
f737437b | 5798 | # Code from module dtoastr: |
1fd182f0 PE |
5799 | # Code from module extensions: |
5800 | ||
e275c824 PE |
5801 | # Code from module getopt-gnu: |
5802 | # Code from module getopt-posix: | |
5803 | # Code from module gettext-h: | |
1fd182f0 PE |
5804 | # Code from module include_next: |
5805 | # Code from module intprops: | |
5806 | # Code from module mktime: | |
5807 | # Code from module multiarch: | |
5808 | # Code from module stddef: | |
5809 | # Code from module time: | |
5810 | # Code from module time_r: | |
e275c824 | 5811 | # Code from module unistd: |
1fd182f0 PE |
5812 | # Code from module warn-on-use: |
5813 | ||
5814 | ||
5815 | # On Suns, sometimes $CPP names a directory. | |
5816 | if test -n "$CPP" && test -d "$CPP"; then | |
5817 | CPP= | |
5818 | fi | |
5819 | ||
5820 | ## If not using gcc, and on Solaris, and no CPP specified, see if | |
5821 | ## using a Sun compiler, which needs -Xs to prevent whitespace. | |
5822 | if test x"$GCC" != xyes && test x"$emacs_check_sunpro_c" = xyes && \ | |
5823 | test x"$CPP" = x; then | |
5824 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using a Sun C compiler" >&5 | |
5825 | $as_echo_n "checking whether we are using a Sun C compiler... " >&6; } | |
9ba41eb9 | 5826 | if test "${emacs_cv_sunpro_c+set}" = set; then : |
1fd182f0 PE |
5827 | $as_echo_n "(cached) " >&6 |
5828 | else | |
5829 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5830 | /* end confdefs.h. */ | |
5831 | ||
5832 | int | |
5833 | main () | |
5834 | { | |
5835 | #ifndef __SUNPRO_C | |
5836 | fail; | |
5837 | #endif | |
5838 | ||
5839 | ; | |
5840 | return 0; | |
5841 | } | |
5842 | _ACEOF | |
5843 | if ac_fn_c_try_link "$LINENO"; then : | |
5844 | emacs_cv_sunpro_c=yes | |
5845 | else | |
5846 | emacs_cv_sunpro_c=no | |
5847 | fi | |
5848 | rm -f core conftest.err conftest.$ac_objext \ | |
5849 | conftest$ac_exeext conftest.$ac_ext | |
5850 | fi | |
5851 | ||
5852 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_sunpro_c" >&5 | |
5853 | $as_echo "$emacs_cv_sunpro_c" >&6; } | |
5854 | ||
5855 | if test x"$emacs_cv_sunpro_c" = xyes; then | |
5856 | NON_GNU_CPP="$CC -E -Xs" | |
5857 | fi | |
5858 | fi | |
5859 | ||
5860 | #### Some systems specify a CPP to use unless we are using GCC. | |
5861 | #### Now that we know whether we are using GCC, we can decide whether | |
5862 | #### to use that one. | |
5863 | if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x | |
5864 | then | |
5865 | CPP="$NON_GNU_CPP" | |
5866 | fi | |
5867 | ||
5868 | #### Some systems specify a CC to use unless we are using GCC. | |
5869 | #### Now that we know whether we are using GCC, we can decide whether | |
5870 | #### to use that one. | |
5871 | if test "x$NON_GNU_CC" != x && test x$GCC != xyes && | |
5872 | test x$cc_specified != xyes | |
5873 | then | |
5874 | CC="$NON_GNU_CC" | |
5875 | fi | |
5876 | ||
5877 | if test x$GCC = xyes; then | |
5878 | test "x$GCC_TEST_OPTIONS" != x && CC="$CC $GCC_TEST_OPTIONS" | |
5879 | else | |
5880 | test "x$NON_GCC_TEST_OPTIONS" != x && CC="$CC $NON_GCC_TEST_OPTIONS" | |
5881 | fi | |
5882 | ||
067d23c9 KY |
5883 | ### Use -Wno-pointer-sign if the compiler supports it |
5884 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -Wno-pointer-sign" >&5 | |
5885 | $as_echo_n "checking whether gcc understands -Wno-pointer-sign... " >&6; } | |
5886 | SAVE_CFLAGS="$CFLAGS" | |
5887 | CFLAGS="$CFLAGS -Wno-pointer-sign" | |
5888 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5889 | /* end confdefs.h. */ | |
5890 | ||
5891 | int | |
5892 | main () | |
5893 | { | |
5894 | ||
5895 | ; | |
5896 | return 0; | |
5897 | } | |
5898 | _ACEOF | |
5899 | if ac_fn_c_try_compile "$LINENO"; then : | |
5900 | has_option=yes | |
5901 | else | |
5902 | has_option=no | |
5903 | fi | |
5904 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5905 | if test $has_option = yes; then | |
5906 | C_WARNINGS_SWITCH="-Wno-pointer-sign $C_WARNINGS_SWITCH" | |
5907 | fi | |
5908 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_option" >&5 | |
5909 | $as_echo "$has_option" >&6; } | |
5910 | CFLAGS="$SAVE_CFLAGS" | |
5911 | unset has_option | |
5912 | unset SAVE_CFLAGS | |
5913 | ||
5914 | ### Use -Wdeclaration-after-statement if the compiler supports it | |
5915 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -Wdeclaration-after-statement" >&5 | |
5916 | $as_echo_n "checking whether gcc understands -Wdeclaration-after-statement... " >&6; } | |
5917 | SAVE_CFLAGS="$CFLAGS" | |
5918 | CFLAGS="$CFLAGS -Wdeclaration-after-statement" | |
5919 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5920 | /* end confdefs.h. */ | |
5921 | ||
5922 | int | |
5923 | main () | |
5924 | { | |
5925 | ||
5926 | ; | |
5927 | return 0; | |
5928 | } | |
5929 | _ACEOF | |
5930 | if ac_fn_c_try_compile "$LINENO"; then : | |
5931 | has_option=yes | |
5932 | else | |
5933 | has_option=no | |
5934 | fi | |
5935 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5936 | if test $has_option = yes; then | |
5937 | C_WARNINGS_SWITCH="-Wdeclaration-after-statement $C_WARNINGS_SWITCH" | |
5938 | fi | |
5939 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_option" >&5 | |
5940 | $as_echo "$has_option" >&6; } | |
5941 | CFLAGS="$SAVE_CFLAGS" | |
5942 | unset has_option | |
5943 | unset SAVE_CFLAGS | |
5944 | ||
5945 | ### Use -Wold-style-definition if the compiler supports it | |
5946 | # This can be removed when conversion to standard C is finished. | |
5947 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -Wold-style-definition" >&5 | |
5948 | $as_echo_n "checking whether gcc understands -Wold-style-definition... " >&6; } | |
5949 | SAVE_CFLAGS="$CFLAGS" | |
5950 | CFLAGS="$CFLAGS -Wold-style-definition" | |
5951 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5952 | /* end confdefs.h. */ | |
5953 | ||
5954 | int | |
5955 | main () | |
5956 | { | |
5957 | ||
5958 | ; | |
5959 | return 0; | |
5960 | } | |
5961 | _ACEOF | |
5962 | if ac_fn_c_try_compile "$LINENO"; then : | |
5963 | has_option=yes | |
5964 | else | |
5965 | has_option=no | |
5966 | fi | |
5967 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5968 | if test $has_option = yes; then | |
5969 | C_WARNINGS_SWITCH="-Wold-style-definition $C_WARNINGS_SWITCH" | |
5970 | fi | |
5971 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_option" >&5 | |
5972 | $as_echo "$has_option" >&6; } | |
5973 | CFLAGS="$SAVE_CFLAGS" | |
5974 | unset has_option | |
5975 | unset SAVE_CFLAGS | |
5976 | ||
5977 | ### Use -Wimplicit-function-declaration if the compiler supports it | |
5978 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -Wimplicit-function-declaration" >&5 | |
5979 | $as_echo_n "checking whether gcc understands -Wimplicit-function-declaration... " >&6; } | |
5980 | SAVE_CFLAGS="$CFLAGS" | |
5981 | CFLAGS="$CFLAGS -Wimplicit-function-declaration" | |
5982 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5983 | /* end confdefs.h. */ | |
5984 | ||
5985 | int | |
5986 | main () | |
5987 | { | |
5988 | ||
5989 | ; | |
5990 | return 0; | |
5991 | } | |
5992 | _ACEOF | |
5993 | if ac_fn_c_try_compile "$LINENO"; then : | |
5994 | has_option=yes | |
5995 | else | |
5996 | has_option=no | |
5997 | fi | |
5998 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5999 | if test $has_option = yes; then | |
6000 | C_WARNINGS_SWITCH="-Wimplicit-function-declaration $C_WARNINGS_SWITCH" | |
6001 | fi | |
6002 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_option" >&5 | |
6003 | $as_echo "$has_option" >&6; } | |
6004 | CFLAGS="$SAVE_CFLAGS" | |
6005 | unset has_option | |
6006 | unset SAVE_CFLAGS | |
6007 | ||
6008 | ||
6009 | ||
6010 | ||
6011 | #### Some other nice autoconf tests. | |
6012 | ||
6013 | ac_ext=c | |
6014 | ac_cpp='$CPP $CPPFLAGS' | |
6015 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
6016 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
6017 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
6018 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 | |
6019 | $as_echo_n "checking how to run the C preprocessor... " >&6; } | |
6020 | # On Suns, sometimes $CPP names a directory. | |
6021 | if test -n "$CPP" && test -d "$CPP"; then | |
6022 | CPP= | |
6023 | fi | |
6024 | if test -z "$CPP"; then | |
9ba41eb9 | 6025 | if test "${ac_cv_prog_CPP+set}" = set; then : |
067d23c9 KY |
6026 | $as_echo_n "(cached) " >&6 |
6027 | else | |
6028 | # Double quotes because CPP needs to be expanded | |
6029 | for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" | |
6030 | do | |
6031 | ac_preproc_ok=false | |
6032 | for ac_c_preproc_warn_flag in '' yes | |
6033 | do | |
6034 | # Use a header file that comes with gcc, so configuring glibc | |
6035 | # with a fresh cross-compiler works. | |
6036 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
6037 | # <limits.h> exists even on freestanding compilers. | |
6038 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
6039 | # not just through cpp. "Syntax error" is here to catch this case. | |
6040 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6041 | /* end confdefs.h. */ | |
6042 | #ifdef __STDC__ | |
6043 | # include <limits.h> | |
6044 | #else | |
6045 | # include <assert.h> | |
6046 | #endif | |
6047 | Syntax error | |
6048 | _ACEOF | |
6049 | if ac_fn_c_try_cpp "$LINENO"; then : | |
6050 | ||
6051 | else | |
6052 | # Broken: fails on valid input. | |
6053 | continue | |
6054 | fi | |
2018939f | 6055 | rm -f conftest.err conftest.i conftest.$ac_ext |
067d23c9 KY |
6056 | |
6057 | # OK, works on sane cases. Now check whether nonexistent headers | |
6058 | # can be detected and how. | |
6059 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6060 | /* end confdefs.h. */ | |
6061 | #include <ac_nonexistent.h> | |
6062 | _ACEOF | |
6063 | if ac_fn_c_try_cpp "$LINENO"; then : | |
6064 | # Broken: success on invalid input. | |
6065 | continue | |
6066 | else | |
6067 | # Passes both tests. | |
6068 | ac_preproc_ok=: | |
6069 | break | |
6070 | fi | |
2018939f | 6071 | rm -f conftest.err conftest.i conftest.$ac_ext |
067d23c9 KY |
6072 | |
6073 | done | |
6074 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
2018939f | 6075 | rm -f conftest.i conftest.err conftest.$ac_ext |
067d23c9 KY |
6076 | if $ac_preproc_ok; then : |
6077 | break | |
6078 | fi | |
6079 | ||
6080 | done | |
6081 | ac_cv_prog_CPP=$CPP | |
6082 | ||
6083 | fi | |
6084 | CPP=$ac_cv_prog_CPP | |
6085 | else | |
6086 | ac_cv_prog_CPP=$CPP | |
6087 | fi | |
6088 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 | |
6089 | $as_echo "$CPP" >&6; } | |
6090 | ac_preproc_ok=false | |
6091 | for ac_c_preproc_warn_flag in '' yes | |
6092 | do | |
6093 | # Use a header file that comes with gcc, so configuring glibc | |
6094 | # with a fresh cross-compiler works. | |
6095 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
6096 | # <limits.h> exists even on freestanding compilers. | |
6097 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
6098 | # not just through cpp. "Syntax error" is here to catch this case. | |
6099 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6100 | /* end confdefs.h. */ | |
6101 | #ifdef __STDC__ | |
6102 | # include <limits.h> | |
6103 | #else | |
6104 | # include <assert.h> | |
6105 | #endif | |
6106 | Syntax error | |
6107 | _ACEOF | |
6108 | if ac_fn_c_try_cpp "$LINENO"; then : | |
6109 | ||
6110 | else | |
6111 | # Broken: fails on valid input. | |
6112 | continue | |
6113 | fi | |
2018939f | 6114 | rm -f conftest.err conftest.i conftest.$ac_ext |
067d23c9 KY |
6115 | |
6116 | # OK, works on sane cases. Now check whether nonexistent headers | |
6117 | # can be detected and how. | |
6118 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6119 | /* end confdefs.h. */ | |
6120 | #include <ac_nonexistent.h> | |
6121 | _ACEOF | |
6122 | if ac_fn_c_try_cpp "$LINENO"; then : | |
6123 | # Broken: success on invalid input. | |
6124 | continue | |
6125 | else | |
6126 | # Passes both tests. | |
6127 | ac_preproc_ok=: | |
6128 | break | |
6129 | fi | |
2018939f | 6130 | rm -f conftest.err conftest.i conftest.$ac_ext |
067d23c9 KY |
6131 | |
6132 | done | |
6133 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
2018939f | 6134 | rm -f conftest.i conftest.err conftest.$ac_ext |
067d23c9 KY |
6135 | if $ac_preproc_ok; then : |
6136 | ||
6137 | else | |
6138 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
6139 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
2018939f | 6140 | as_fn_error $? "C preprocessor \"$CPP\" fails sanity check |
9ba41eb9 | 6141 | See \`config.log' for more details" "$LINENO" 5 ; } |
067d23c9 KY |
6142 | fi |
6143 | ||
6144 | ac_ext=c | |
6145 | ac_cpp='$CPP $CPPFLAGS' | |
6146 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
6147 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
6148 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
6149 | ||
067d23c9 KY |
6150 | |
6151 | if test "x$RANLIB" = x; then | |
6152 | if test -n "$ac_tool_prefix"; then | |
6153 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
6154 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
6155 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
6156 | $as_echo_n "checking for $ac_word... " >&6; } | |
9ba41eb9 | 6157 | if test "${ac_cv_prog_RANLIB+set}" = set; then : |
067d23c9 KY |
6158 | $as_echo_n "(cached) " >&6 |
6159 | else | |
6160 | if test -n "$RANLIB"; then | |
6161 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
6162 | else | |
6163 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6164 | for as_dir in $PATH | |
6165 | do | |
6166 | IFS=$as_save_IFS | |
6167 | test -z "$as_dir" && as_dir=. | |
6168 | for ac_exec_ext in '' $ac_executable_extensions; do | |
6169 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
6170 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" | |
6171 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
6172 | break 2 | |
6173 | fi | |
6174 | done | |
6175 | done | |
6176 | IFS=$as_save_IFS | |
6177 | ||
6178 | fi | |
6179 | fi | |
6180 | RANLIB=$ac_cv_prog_RANLIB | |
6181 | if test -n "$RANLIB"; then | |
6182 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 | |
6183 | $as_echo "$RANLIB" >&6; } | |
6184 | else | |
6185 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
6186 | $as_echo "no" >&6; } | |
6187 | fi | |
6188 | ||
6189 | ||
6190 | fi | |
6191 | if test -z "$ac_cv_prog_RANLIB"; then | |
6192 | ac_ct_RANLIB=$RANLIB | |
6193 | # Extract the first word of "ranlib", so it can be a program name with args. | |
6194 | set dummy ranlib; ac_word=$2 | |
6195 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
6196 | $as_echo_n "checking for $ac_word... " >&6; } | |
9ba41eb9 | 6197 | if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : |
067d23c9 KY |
6198 | $as_echo_n "(cached) " >&6 |
6199 | else | |
6200 | if test -n "$ac_ct_RANLIB"; then | |
6201 | ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. | |
6202 | else | |
6203 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6204 | for as_dir in $PATH | |
6205 | do | |
6206 | IFS=$as_save_IFS | |
6207 | test -z "$as_dir" && as_dir=. | |
6208 | for ac_exec_ext in '' $ac_executable_extensions; do | |
6209 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
6210 | ac_cv_prog_ac_ct_RANLIB="ranlib" | |
6211 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
6212 | break 2 | |
6213 | fi | |
6214 | done | |
6215 | done | |
6216 | IFS=$as_save_IFS | |
6217 | ||
6218 | fi | |
6219 | fi | |
6220 | ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB | |
6221 | if test -n "$ac_ct_RANLIB"; then | |
6222 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 | |
6223 | $as_echo "$ac_ct_RANLIB" >&6; } | |
6224 | else | |
6225 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
6226 | $as_echo "no" >&6; } | |
6227 | fi | |
6228 | ||
6229 | if test "x$ac_ct_RANLIB" = x; then | |
6230 | RANLIB=":" | |
6231 | else | |
6232 | case $cross_compiling:$ac_tool_warned in | |
6233 | yes:) | |
6234 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
6235 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
6236 | ac_tool_warned=yes ;; | |
6237 | esac | |
6238 | RANLIB=$ac_ct_RANLIB | |
6239 | fi | |
6240 | else | |
6241 | RANLIB="$ac_cv_prog_RANLIB" | |
6242 | fi | |
6243 | ||
6244 | fi | |
6245 | ||
6246 | ## Although we're running on an amd64 kernel, we're actually compiling for | |
6247 | ## the x86 architecture. The user should probably have provided an | |
6248 | ## explicit --build to `configure', but if everything else than the kernel | |
6249 | ## is running in i386 mode, we can help them out. | |
6250 | if test "$machine" = "amdx86-64"; then | |
6251 | ac_fn_c_check_decl "$LINENO" "i386" "ac_cv_have_decl_i386" "$ac_includes_default" | |
9ba41eb9 | 6252 | if test "x$ac_cv_have_decl_i386" = x""yes; then : |
067d23c9 KY |
6253 | |
6254 | fi | |
6255 | ||
6256 | if test "$ac_cv_have_decl_i386" = "yes"; then | |
6257 | canonical=`echo "$canonical" | sed -e 's/^amd64/i386/' -e 's/^x86_64/i386/'` | |
6258 | machine=intel386 | |
6259 | machfile="m/${machine}.h" | |
6260 | fi | |
6261 | fi | |
6262 | ||
6263 | # Extract the first word of "install-info", so it can be a program name with args. | |
6264 | set dummy install-info; ac_word=$2 | |
6265 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
6266 | $as_echo_n "checking for $ac_word... " >&6; } | |
9ba41eb9 | 6267 | if test "${ac_cv_path_INSTALL_INFO+set}" = set; then : |
067d23c9 KY |
6268 | $as_echo_n "(cached) " >&6 |
6269 | else | |
6270 | case $INSTALL_INFO in | |
6271 | [\\/]* | ?:[\\/]*) | |
6272 | ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path. | |
6273 | ;; | |
6274 | *) | |
6275 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6276 | for as_dir in $PATH | |
6277 | do | |
6278 | IFS=$as_save_IFS | |
6279 | test -z "$as_dir" && as_dir=. | |
6280 | for ac_exec_ext in '' $ac_executable_extensions; do | |
6281 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
6282 | ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext" | |
6283 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
6284 | break 2 | |
6285 | fi | |
6286 | done | |
6287 | done | |
6288 | IFS=$as_save_IFS | |
6289 | ||
6290 | ;; | |
6291 | esac | |
6292 | fi | |
6293 | INSTALL_INFO=$ac_cv_path_INSTALL_INFO | |
6294 | if test -n "$INSTALL_INFO"; then | |
6295 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_INFO" >&5 | |
6296 | $as_echo "$INSTALL_INFO" >&6; } | |
6297 | else | |
6298 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
6299 | $as_echo "no" >&6; } | |
6300 | fi | |
6301 | ||
6302 | ||
6303 | # Extract the first word of "install-info", so it can be a program name with args. | |
6304 | set dummy install-info; ac_word=$2 | |
6305 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
6306 | $as_echo_n "checking for $ac_word... " >&6; } | |
9ba41eb9 | 6307 | if test "${ac_cv_path_INSTALL_INFO+set}" = set; then : |
067d23c9 KY |
6308 | $as_echo_n "(cached) " >&6 |
6309 | else | |
6310 | case $INSTALL_INFO in | |
6311 | [\\/]* | ?:[\\/]*) | |
6312 | ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path. | |
6313 | ;; | |
6314 | *) | |
6315 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6316 | for as_dir in /usr/sbin | |
6317 | do | |
6318 | IFS=$as_save_IFS | |
6319 | test -z "$as_dir" && as_dir=. | |
6320 | for ac_exec_ext in '' $ac_executable_extensions; do | |
6321 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
6322 | ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext" | |
6323 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
6324 | break 2 | |
6325 | fi | |
6326 | done | |
6327 | done | |
6328 | IFS=$as_save_IFS | |
6329 | ||
6330 | ;; | |
6331 | esac | |
6332 | fi | |
6333 | INSTALL_INFO=$ac_cv_path_INSTALL_INFO | |
6334 | if test -n "$INSTALL_INFO"; then | |
6335 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_INFO" >&5 | |
6336 | $as_echo "$INSTALL_INFO" >&6; } | |
6337 | else | |
6338 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
6339 | $as_echo "no" >&6; } | |
6340 | fi | |
6341 | ||
6342 | ||
6343 | # Extract the first word of "install-info", so it can be a program name with args. | |
6344 | set dummy install-info; ac_word=$2 | |
6345 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
6346 | $as_echo_n "checking for $ac_word... " >&6; } | |
9ba41eb9 | 6347 | if test "${ac_cv_path_INSTALL_INFO+set}" = set; then : |
067d23c9 KY |
6348 | $as_echo_n "(cached) " >&6 |
6349 | else | |
6350 | case $INSTALL_INFO in | |
6351 | [\\/]* | ?:[\\/]*) | |
6352 | ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path. | |
6353 | ;; | |
6354 | *) | |
6355 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6356 | for as_dir in /sbin | |
6357 | do | |
6358 | IFS=$as_save_IFS | |
6359 | test -z "$as_dir" && as_dir=. | |
6360 | for ac_exec_ext in '' $ac_executable_extensions; do | |
6361 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
6362 | ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext" | |
6363 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
6364 | break 2 | |
6365 | fi | |
6366 | done | |
6367 | done | |
6368 | IFS=$as_save_IFS | |
6369 | ||
6370 | test -z "$ac_cv_path_INSTALL_INFO" && ac_cv_path_INSTALL_INFO=":" | |
6371 | ;; | |
6372 | esac | |
6373 | fi | |
6374 | INSTALL_INFO=$ac_cv_path_INSTALL_INFO | |
6375 | if test -n "$INSTALL_INFO"; then | |
6376 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_INFO" >&5 | |
6377 | $as_echo "$INSTALL_INFO" >&6; } | |
6378 | else | |
6379 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
6380 | $as_echo "no" >&6; } | |
6381 | fi | |
6382 | ||
6383 | ||
6384 | # Extract the first word of "gzip", so it can be a program name with args. | |
6385 | set dummy gzip; ac_word=$2 | |
6386 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
6387 | $as_echo_n "checking for $ac_word... " >&6; } | |
9ba41eb9 | 6388 | if test "${ac_cv_path_GZIP_PROG+set}" = set; then : |
067d23c9 KY |
6389 | $as_echo_n "(cached) " >&6 |
6390 | else | |
6391 | case $GZIP_PROG in | |
6392 | [\\/]* | ?:[\\/]*) | |
6393 | ac_cv_path_GZIP_PROG="$GZIP_PROG" # Let the user override the test with a path. | |
6394 | ;; | |
6395 | *) | |
6396 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6397 | for as_dir in $PATH | |
6398 | do | |
6399 | IFS=$as_save_IFS | |
6400 | test -z "$as_dir" && as_dir=. | |
6401 | for ac_exec_ext in '' $ac_executable_extensions; do | |
6402 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
6403 | ac_cv_path_GZIP_PROG="$as_dir/$ac_word$ac_exec_ext" | |
6404 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
6405 | break 2 | |
6406 | fi | |
6407 | done | |
6408 | done | |
6409 | IFS=$as_save_IFS | |
6410 | ||
6411 | ;; | |
6412 | esac | |
6413 | fi | |
6414 | GZIP_PROG=$ac_cv_path_GZIP_PROG | |
6415 | if test -n "$GZIP_PROG"; then | |
6416 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP_PROG" >&5 | |
6417 | $as_echo "$GZIP_PROG" >&6; } | |
6418 | else | |
6419 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
6420 | $as_echo "no" >&6; } | |
6421 | fi | |
6422 | ||
6423 | ||
6424 | ||
6425 | ||
6426 | ## Need makeinfo >= 4.6 (?) to build the manuals. | |
6427 | # Extract the first word of "makeinfo", so it can be a program name with args. | |
6428 | set dummy makeinfo; ac_word=$2 | |
6429 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
6430 | $as_echo_n "checking for $ac_word... " >&6; } | |
9ba41eb9 | 6431 | if test "${ac_cv_path_MAKEINFO+set}" = set; then : |
067d23c9 KY |
6432 | $as_echo_n "(cached) " >&6 |
6433 | else | |
6434 | case $MAKEINFO in | |
6435 | [\\/]* | ?:[\\/]*) | |
6436 | ac_cv_path_MAKEINFO="$MAKEINFO" # Let the user override the test with a path. | |
6437 | ;; | |
6438 | *) | |
6439 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6440 | for as_dir in $PATH | |
6441 | do | |
6442 | IFS=$as_save_IFS | |
6443 | test -z "$as_dir" && as_dir=. | |
6444 | for ac_exec_ext in '' $ac_executable_extensions; do | |
6445 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
6446 | ac_cv_path_MAKEINFO="$as_dir/$ac_word$ac_exec_ext" | |
6447 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
6448 | break 2 | |
6449 | fi | |
6450 | done | |
6451 | done | |
6452 | IFS=$as_save_IFS | |
6453 | ||
6454 | test -z "$ac_cv_path_MAKEINFO" && ac_cv_path_MAKEINFO="no" | |
6455 | ;; | |
6456 | esac | |
6457 | fi | |
6458 | MAKEINFO=$ac_cv_path_MAKEINFO | |
6459 | if test -n "$MAKEINFO"; then | |
6460 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKEINFO" >&5 | |
6461 | $as_echo "$MAKEINFO" >&6; } | |
6462 | else | |
6463 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
6464 | $as_echo "no" >&6; } | |
6465 | fi | |
6466 | ||
6467 | ||
6468 | if test "$MAKEINFO" != "no" && \ | |
6469 | 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 | |
6470 | MAKEINFO=no | |
6471 | fi | |
6472 | ||
6473 | ## Makeinfo is unusual. For a released Emacs, the manuals are | |
6474 | ## pre-built, and not deleted by the normal clean rules. makeinfo is | |
6475 | ## therefore in the category of "special tools" not normally required, which | |
6476 | ## configure does not have to check for (eg autoconf itself). | |
6477 | ## In a Bazaar checkout on the other hand, the manuals are not included. | |
6478 | ## So makeinfo is a requirement to build from Bazaar, and configure | |
6479 | ## should test for it as it does for any other build requirement. | |
6480 | ## We use the presence of $srcdir/info/emacs to distinguish a release, | |
6481 | ## with pre-built manuals, from a Bazaar checkout. | |
96f129d5 GM |
6482 | HAVE_MAKEINFO=yes |
6483 | ||
067d23c9 | 6484 | if test "$MAKEINFO" = "no"; then |
96f129d5 | 6485 | MAKEINFO=makeinfo |
067d23c9 | 6486 | if test "x${with_makeinfo}" = "xno"; then |
96f129d5 | 6487 | HAVE_MAKEINFO=no |
067d23c9 | 6488 | elif test ! -e $srcdir/info/emacs; then |
2018939f | 6489 | as_fn_error $? "You do not seem to have makeinfo >= 4.6, and your |
067d23c9 KY |
6490 | source tree does not seem to have pre-built manuals in the \`info' directory. |
6491 | Either install a suitable version of makeinfo, or re-run configure | |
6492 | with the \`--without-makeinfo' option to build without the manuals. " "$LINENO" 5 | |
6493 | fi | |
6494 | fi | |
6495 | ||
6496 | ||
96f129d5 | 6497 | |
067d23c9 KY |
6498 | if test x$GCC = xyes; then |
6499 | test "x$GCC_LINK_TEST_OPTIONS" != x && \ | |
6500 | ac_link="$ac_link $GCC_LINK_TEST_OPTIONS" | |
6501 | else | |
6502 | test "x$NON_GCC_LINK_TEST_OPTIONS" != x && \ | |
6503 | ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS" | |
6504 | fi | |
6505 | ||
6506 | ||
6507 | late_LDFLAGS=$LDFLAGS | |
6508 | if test x$GCC = xyes; then | |
6509 | LDFLAGS="$LDFLAGS -Wl,-znocombreloc" | |
6510 | else | |
6511 | LDFLAGS="$LDFLAGS -znocombreloc" | |
6512 | fi | |
6513 | ||
6514 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -znocombreloc" >&5 | |
6515 | $as_echo_n "checking for -znocombreloc... " >&6; } | |
6516 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6517 | /* end confdefs.h. */ | |
6518 | ||
6519 | int | |
6520 | main () | |
6521 | { | |
6522 | ||
6523 | ; | |
6524 | return 0; | |
6525 | } | |
6526 | _ACEOF | |
6527 | if ac_fn_c_try_link "$LINENO"; then : | |
6528 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
6529 | $as_echo "yes" >&6; } | |
6530 | else | |
6531 | LDFLAGS=$late_LDFLAGS | |
6532 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
6533 | $as_echo "no" >&6; } | |
6534 | fi | |
6535 | rm -f core conftest.err conftest.$ac_objext \ | |
6536 | conftest$ac_exeext conftest.$ac_ext | |
6537 | ||
6538 | ||
6539 | # The value of CPP is a quoted variable reference, so we need to do this | |
6540 | # to get its actual value... | |
6541 | CPP=`eval "echo $CPP"` | |
6542 | ||
6543 | ||
6544 | CANNOT_DUMP=no | |
6545 | case "$opsys" in | |
6546 | your-opsys-here) | |
6547 | CANNOT_DUMP=yes | |
6548 | ||
6549 | $as_echo "#define CANNOT_DUMP 1" >>confdefs.h | |
6550 | ||
6551 | ;; | |
6552 | esac | |
6553 | ||
6554 | ||
6555 | ||
6556 | UNEXEC_OBJ=unexelf.o | |
6557 | case "$opsys" in | |
6558 | # MSDOS uses unexcoff.o | |
6559 | # MSWindows uses unexw32.o | |
6560 | aix4-2) | |
6561 | UNEXEC_OBJ=unexaix.o | |
6562 | ;; | |
6563 | cygwin) | |
6564 | UNEXEC_OBJ=unexcw.o | |
6565 | ;; | |
6566 | darwin) | |
6567 | UNEXEC_OBJ=unexmacosx.o | |
6568 | ;; | |
6569 | hpux10-20 | hpux11) | |
6570 | UNEXEC_OBJ=unexhp9k800.o | |
6571 | ;; | |
6572 | sol2-10) | |
6573 | # Use the Solaris dldump() function, called from unexsol.c, to dump | |
6574 | # emacs, instead of the generic ELF dump code found in unexelf.c. | |
6575 | # The resulting binary has a complete symbol table, and is better | |
6576 | # for debugging and other observability tools (debuggers, pstack, etc). | |
6577 | # | |
6578 | # If you encounter a problem using dldump(), please consider sending | |
6579 | # a message to the OpenSolaris tools-linking mailing list: | |
6580 | # http://mail.opensolaris.org/mailman/listinfo/tools-linking | |
6581 | # | |
6582 | # It is likely that dldump() works with older Solaris too, but this has | |
6583 | # not been tested, so for now this change is for Solaris 10 or newer. | |
6584 | UNEXEC_OBJ=unexsol.o | |
6585 | ;; | |
6586 | esac | |
6587 | ||
6588 | LD_SWITCH_SYSTEM= | |
6589 | case "$opsys" in | |
6590 | freebsd) | |
6591 | ## Let `ld' find image libs and similar things in /usr/local/lib. | |
6592 | ## The system compiler, GCC, has apparently been modified to not | |
6593 | ## look there, contrary to what a stock GCC would do. | |
6594 | LD_SWITCH_SYSTEM=-L/usr/local/lib | |
6595 | ;; | |
6596 | ||
6597 | gnu-linux) | |
6598 | ## cpp test was "ifdef __mips__", but presumably this is equivalent... | |
d6a003a8 | 6599 | case $host_cpu in mips*) LD_SWITCH_SYSTEM="-G 0";; esac |
067d23c9 KY |
6600 | ;; |
6601 | ||
6602 | netbsd) | |
6603 | LD_SWITCH_SYSTEM="-Wl,-rpath,/usr/pkg/lib -L/usr/pkg/lib -Wl,-rpath,/usr/local/lib -L/usr/local/lib" | |
6604 | ;; | |
6605 | ||
6606 | openbsd) | |
6607 | ## Han Boetes <han@mijncomputer.nl> says this is necessary, | |
6608 | ## otherwise Emacs dumps core on elf systems. | |
6609 | LD_SWITCH_SYSTEM="-Z" | |
6610 | ;; | |
6611 | esac | |
6612 | ||
6613 | ||
6614 | ac_link="$ac_link $LD_SWITCH_SYSTEM" | |
6615 | ||
6616 | ## This setting of LD_SWITCH_SYSTEM references LD_SWITCH_X_SITE_AUX, | |
6617 | ## which has not been defined yet. When this was handled with cpp, | |
6618 | ## it was expanded to null when configure sourced the s/*.h file. | |
6619 | ## Thus LD_SWITCH_SYSTEM had different values in configure and the Makefiles. | |
6620 | ## FIXME it would be cleaner to put this in LD_SWITCH_SYSTEM_TEMACS | |
6621 | ## (or somesuch), but because it is supposed to go at the _front_ | |
6622 | ## of LD_SWITCH_SYSTEM, we cannot do that in exactly the same way. | |
6623 | ## Compare with the gnu-linux case below, which added to the end | |
6624 | ## of LD_SWITCH_SYSTEM, and so can instead go at the front of | |
6625 | ## LD_SWITCH_SYSTEM_TEMACS. | |
6626 | case "$opsys" in | |
6627 | netbsd|openbsd) | |
6628 | ## _AUX_RPATH is like _AUX, but uses -rpath instead of -R. | |
6629 | LD_SWITCH_SYSTEM="\$(LD_SWITCH_X_SITE_AUX_RPATH) $LD_SWITCH_SYSTEM" ;; | |
6630 | esac | |
6631 | ||
6632 | ||
6633 | C_SWITCH_MACHINE= | |
6634 | if test "$machine" = "alpha"; then | |
6635 | ac_fn_c_check_decl "$LINENO" "__ELF__" "ac_cv_have_decl___ELF__" "$ac_includes_default" | |
9ba41eb9 | 6636 | if test "x$ac_cv_have_decl___ELF__" = x""yes; then : |
067d23c9 KY |
6637 | |
6638 | fi | |
6639 | ||
6640 | if test "$ac_cv_have_decl___ELF__" = "yes"; then | |
6641 | ## With ELF, make sure that all common symbols get allocated to in the | |
6642 | ## data section. Otherwise, the dump of temacs may miss variables in | |
6643 | ## the shared library that have been initialized. For example, with | |
6644 | ## GNU libc, __malloc_initialized would normally be resolved to the | |
6645 | ## shared library's .bss section, which is fatal. | |
6646 | if test "x$GCC" = "xyes"; then | |
6647 | C_SWITCH_MACHINE="-fno-common" | |
6648 | else | |
2018939f | 6649 | as_fn_error $? "What gives? Fix me if DEC Unix supports ELF now." "$LINENO" 5 |
067d23c9 KY |
6650 | fi |
6651 | else | |
6652 | UNEXEC_OBJ=unexalpha.o | |
6653 | fi | |
6654 | fi | |
6655 | ||
6656 | ||
6657 | ||
6658 | ||
6659 | C_SWITCH_SYSTEM= | |
6660 | ## Some programs in src produce warnings saying certain subprograms | |
6661 | ## are too complex and need a MAXMEM value greater than 2000 for | |
6662 | ## additional optimization. --nils@exp-math.uni-essen.de | |
6663 | test "$opsys" = "aix4.2" && test "x$GCC" != "xyes" && \ | |
6664 | C_SWITCH_SYSTEM="-ma -qmaxmem=4000" | |
6665 | ## gnu-linux might need -D_BSD_SOURCE on old libc5 systems. | |
6666 | ## It is redundant in glibc2, since we define _GNU_SOURCE. | |
6667 | ||
6668 | ||
6669 | ||
6670 | LIBS_SYSTEM= | |
6671 | case "$opsys" in | |
6672 | ## IBM's X11R5 uses -lIM and -liconv in AIX 3.2.2. | |
6673 | aix4-2) LIBS_SYSTEM="-lrts -lIM -liconv" ;; | |
6674 | ||
6675 | freebsd) LIBS_SYSTEM="-lutil" ;; | |
6676 | ||
6677 | hpux*) LIBS_SYSTEM="-l:libdld.sl" ;; | |
6678 | ||
6679 | sol2*) LIBS_SYSTEM="-lsocket -lnsl -lkstat" ;; | |
6680 | ||
6681 | ## Motif needs -lgen. | |
6682 | unixware) LIBS_SYSTEM="-lsocket -lnsl -lelf -lgen" ;; | |
6683 | esac | |
6684 | ||
6685 | ||
6686 | ||
6687 | ### Make sure subsequent tests use flags consistent with the build flags. | |
6688 | ||
6689 | if test x"${OVERRIDE_CPPFLAGS}" != x; then | |
6690 | CPPFLAGS="${OVERRIDE_CPPFLAGS}" | |
6691 | else | |
6692 | CPPFLAGS="$C_SWITCH_SYSTEM $C_SWITCH_MACHINE $CPPFLAGS" | |
6693 | fi | |
6694 | ||
6695 | ||
6696 | ||
6697 | # Check whether --enable-largefile was given. | |
6698 | if test "${enable_largefile+set}" = set; then : | |
6699 | enableval=$enable_largefile; | |
6700 | fi | |
6701 | ||
6702 | if test "$enable_largefile" != no; then | |
6703 | ||
6704 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 | |
6705 | $as_echo_n "checking for special C compiler options needed for large files... " >&6; } | |
9ba41eb9 | 6706 | if test "${ac_cv_sys_largefile_CC+set}" = set; then : |
067d23c9 KY |
6707 | $as_echo_n "(cached) " >&6 |
6708 | else | |
6709 | ac_cv_sys_largefile_CC=no | |
6710 | if test "$GCC" != yes; then | |
6711 | ac_save_CC=$CC | |
6712 | while :; do | |
6713 | # IRIX 6.2 and later do not support large files by default, | |
6714 | # so use the C compiler's -n32 option if that helps. | |
6715 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6716 | /* end confdefs.h. */ | |
6717 | #include <sys/types.h> | |
6718 | /* Check that off_t can represent 2**63 - 1 correctly. | |
6719 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
6720 | since some C++ compilers masquerading as C compilers | |
6721 | incorrectly reject 9223372036854775807. */ | |
6722 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
6723 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
6724 | && LARGE_OFF_T % 2147483647 == 1) | |
6725 | ? 1 : -1]; | |
6726 | int | |
6727 | main () | |
6728 | { | |
6729 | ||
6730 | ; | |
6731 | return 0; | |
6732 | } | |
6733 | _ACEOF | |
6734 | if ac_fn_c_try_compile "$LINENO"; then : | |
6735 | break | |
6736 | fi | |
6737 | rm -f core conftest.err conftest.$ac_objext | |
6738 | CC="$CC -n32" | |
6739 | if ac_fn_c_try_compile "$LINENO"; then : | |
6740 | ac_cv_sys_largefile_CC=' -n32'; break | |
6741 | fi | |
6742 | rm -f core conftest.err conftest.$ac_objext | |
6743 | break | |
6744 | done | |
6745 | CC=$ac_save_CC | |
6746 | rm -f conftest.$ac_ext | |
6747 | fi | |
6748 | fi | |
6749 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 | |
6750 | $as_echo "$ac_cv_sys_largefile_CC" >&6; } | |
6751 | if test "$ac_cv_sys_largefile_CC" != no; then | |
6752 | CC=$CC$ac_cv_sys_largefile_CC | |
6753 | fi | |
6754 | ||
6755 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 | |
6756 | $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } | |
9ba41eb9 | 6757 | if test "${ac_cv_sys_file_offset_bits+set}" = set; then : |
067d23c9 KY |
6758 | $as_echo_n "(cached) " >&6 |
6759 | else | |
6760 | while :; do | |
6761 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6762 | /* end confdefs.h. */ | |
6763 | #include <sys/types.h> | |
6764 | /* Check that off_t can represent 2**63 - 1 correctly. | |
6765 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
6766 | since some C++ compilers masquerading as C compilers | |
6767 | incorrectly reject 9223372036854775807. */ | |
6768 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
6769 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
6770 | && LARGE_OFF_T % 2147483647 == 1) | |
6771 | ? 1 : -1]; | |
6772 | int | |
6773 | main () | |
6774 | { | |
6775 | ||
6776 | ; | |
6777 | return 0; | |
6778 | } | |
6779 | _ACEOF | |
6780 | if ac_fn_c_try_compile "$LINENO"; then : | |
6781 | ac_cv_sys_file_offset_bits=no; break | |
6782 | fi | |
6783 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
6784 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6785 | /* end confdefs.h. */ | |
6786 | #define _FILE_OFFSET_BITS 64 | |
6787 | #include <sys/types.h> | |
6788 | /* Check that off_t can represent 2**63 - 1 correctly. | |
6789 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
6790 | since some C++ compilers masquerading as C compilers | |
6791 | incorrectly reject 9223372036854775807. */ | |
6792 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
6793 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
6794 | && LARGE_OFF_T % 2147483647 == 1) | |
6795 | ? 1 : -1]; | |
6796 | int | |
6797 | main () | |
6798 | { | |
6799 | ||
6800 | ; | |
6801 | return 0; | |
6802 | } | |
6803 | _ACEOF | |
6804 | if ac_fn_c_try_compile "$LINENO"; then : | |
6805 | ac_cv_sys_file_offset_bits=64; break | |
6806 | fi | |
6807 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
6808 | ac_cv_sys_file_offset_bits=unknown | |
6809 | break | |
6810 | done | |
6811 | fi | |
6812 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 | |
6813 | $as_echo "$ac_cv_sys_file_offset_bits" >&6; } | |
6814 | case $ac_cv_sys_file_offset_bits in #( | |
6815 | no | unknown) ;; | |
6816 | *) | |
6817 | cat >>confdefs.h <<_ACEOF | |
6818 | #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits | |
6819 | _ACEOF | |
6820 | ;; | |
6821 | esac | |
6822 | rm -rf conftest* | |
6823 | if test $ac_cv_sys_file_offset_bits = unknown; then | |
6824 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 | |
6825 | $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } | |
9ba41eb9 | 6826 | if test "${ac_cv_sys_large_files+set}" = set; then : |
067d23c9 KY |
6827 | $as_echo_n "(cached) " >&6 |
6828 | else | |
6829 | while :; do | |
6830 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6831 | /* end confdefs.h. */ | |
6832 | #include <sys/types.h> | |
6833 | /* Check that off_t can represent 2**63 - 1 correctly. | |
6834 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
6835 | since some C++ compilers masquerading as C compilers | |
6836 | incorrectly reject 9223372036854775807. */ | |
6837 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
6838 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
6839 | && LARGE_OFF_T % 2147483647 == 1) | |
6840 | ? 1 : -1]; | |
6841 | int | |
6842 | main () | |
6843 | { | |
6844 | ||
6845 | ; | |
6846 | return 0; | |
6847 | } | |
6848 | _ACEOF | |
6849 | if ac_fn_c_try_compile "$LINENO"; then : | |
6850 | ac_cv_sys_large_files=no; break | |
6851 | fi | |
6852 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
6853 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6854 | /* end confdefs.h. */ | |
6855 | #define _LARGE_FILES 1 | |
6856 | #include <sys/types.h> | |
6857 | /* Check that off_t can represent 2**63 - 1 correctly. | |
6858 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
6859 | since some C++ compilers masquerading as C compilers | |
6860 | incorrectly reject 9223372036854775807. */ | |
6861 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
6862 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
6863 | && LARGE_OFF_T % 2147483647 == 1) | |
6864 | ? 1 : -1]; | |
6865 | int | |
6866 | main () | |
6867 | { | |
6868 | ||
6869 | ; | |
6870 | return 0; | |
6871 | } | |
6872 | _ACEOF | |
6873 | if ac_fn_c_try_compile "$LINENO"; then : | |
6874 | ac_cv_sys_large_files=1; break | |
6875 | fi | |
6876 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
6877 | ac_cv_sys_large_files=unknown | |
6878 | break | |
6879 | done | |
6880 | fi | |
6881 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 | |
6882 | $as_echo "$ac_cv_sys_large_files" >&6; } | |
6883 | case $ac_cv_sys_large_files in #( | |
6884 | no | unknown) ;; | |
6885 | *) | |
6886 | cat >>confdefs.h <<_ACEOF | |
6887 | #define _LARGE_FILES $ac_cv_sys_large_files | |
6888 | _ACEOF | |
6889 | ;; | |
6890 | esac | |
6891 | rm -rf conftest* | |
6892 | fi | |
6893 | fi | |
6894 | ||
6895 | ||
6896 | ||
6897 | ## If user specified a crt-dir, use that unconditionally. | |
6898 | if test "X$CRT_DIR" = "X"; then | |
6899 | ||
6900 | case "$canonical" in | |
6901 | x86_64-*-linux-gnu* | s390x-*-linux-gnu*) | |
6902 | ## On x86-64 and s390x GNU/Linux distributions, the standard library | |
6903 | ## can be in a variety of places. We only try /usr/lib64 and /usr/lib. | |
6904 | ## For anything else (eg /usr/lib32), it is up the user to specify | |
6905 | ## the location (bug#5655). | |
6906 | ## Test for crtn.o, not just the directory, because sometimes the | |
6907 | ## directory exists but does not have the relevant files (bug#1287). | |
6908 | ## FIXME better to test for binary compatibility somehow. | |
6909 | test -e /usr/lib64/crtn.o && CRT_DIR=/usr/lib64 | |
6910 | ;; | |
6911 | ||
6912 | powerpc64-*-linux-gnu* | sparc64-*-linux-gnu*) CRT_DIR=/usr/lib64 ;; | |
6913 | esac | |
6914 | ||
6915 | case "$opsys" in | |
6916 | hpux10-20) CRT_DIR=/lib ;; | |
6917 | esac | |
6918 | ||
6919 | ## Default is /usr/lib. | |
6920 | test "X$CRT_DIR" = "X" && CRT_DIR=/usr/lib | |
6921 | ||
6922 | else | |
6923 | ||
6924 | ## Some platforms don't use any of these files, so it is not | |
6925 | ## appropriate to put this test outside the if block. | |
6926 | test -e $CRT_DIR/crtn.o || test -e $CRT_DIR/crt0.o || \ | |
2018939f | 6927 | as_fn_error $? "crt*.o not found in specified location." "$LINENO" 5 |
067d23c9 KY |
6928 | |
6929 | fi | |
6930 | ||
6931 | ||
6932 | ||
6933 | LIB_MATH=-lm | |
6934 | LIB_STANDARD= | |
6935 | START_FILES= | |
6936 | ||
6937 | case $opsys in | |
6938 | cygwin ) | |
6939 | LIB_MATH= | |
6940 | START_FILES='pre-crt0.o' | |
6941 | ;; | |
6942 | darwin ) | |
6943 | ## Adding -lm confuses the dynamic linker, so omit it. | |
6944 | LIB_MATH= | |
6945 | START_FILES='pre-crt0.o' | |
6946 | ;; | |
6947 | freebsd ) | |
6948 | LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o $(CRT_DIR)/crtn.o' | |
6949 | START_FILES='pre-crt0.o $(CRT_DIR)/crt1.o $(CRT_DIR)/crti.o $(CRT_DIR)/crtbegin.o' | |
6950 | ;; | |
6951 | gnu-linux | gnu-kfreebsd ) | |
6952 | LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtn.o' | |
6953 | START_FILES='pre-crt0.o $(CRT_DIR)/crt1.o $(CRT_DIR)/crti.o' | |
6954 | ;; | |
6955 | hpux10-20 | hpux11 ) | |
6956 | LIB_STANDARD=-lc | |
6957 | START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o' | |
6958 | ;; | |
6959 | netbsd | openbsd ) | |
6960 | if test -f $CRT_DIR/crti.o; then | |
6961 | LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o $(CRT_DIR)/crtn.o' | |
6962 | START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o $(CRT_DIR)/crti.o $(CRT_DIR)/crtbegin.o' | |
6963 | else | |
6964 | LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o' | |
6965 | START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o $(CRT_DIR)/crtbegin.o' | |
6966 | fi | |
6967 | ;; | |
6968 | esac | |
6969 | ||
6970 | ||
6971 | ||
6972 | ||
6973 | ||
6974 | ||
6975 | ||
6976 | if test "${with_sound}" != "no"; then | |
6977 | # Sound support for GNU/Linux and the free BSDs. | |
6978 | for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h | |
6979 | do : | |
6980 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
6981 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
2018939f | 6982 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : |
067d23c9 KY |
6983 | cat >>confdefs.h <<_ACEOF |
6984 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
6985 | _ACEOF | |
6986 | have_sound_header=yes | |
6987 | fi | |
6988 | ||
6989 | done | |
6990 | ||
6991 | # Emulation library used on NetBSD. | |
6992 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _oss_ioctl in -lossaudio" >&5 | |
6993 | $as_echo_n "checking for _oss_ioctl in -lossaudio... " >&6; } | |
9ba41eb9 | 6994 | if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then : |
067d23c9 KY |
6995 | $as_echo_n "(cached) " >&6 |
6996 | else | |
6997 | ac_check_lib_save_LIBS=$LIBS | |
6998 | LIBS="-lossaudio $LIBS" | |
6999 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7000 | /* end confdefs.h. */ | |
7001 | ||
7002 | /* Override any GCC internal prototype to avoid an error. | |
7003 | Use char because int might match the return type of a GCC | |
7004 | builtin and then its argument prototype would still apply. */ | |
7005 | #ifdef __cplusplus | |
7006 | extern "C" | |
7007 | #endif | |
7008 | char _oss_ioctl (); | |
7009 | int | |
7010 | main () | |
7011 | { | |
7012 | return _oss_ioctl (); | |
7013 | ; | |
7014 | return 0; | |
7015 | } | |
7016 | _ACEOF | |
7017 | if ac_fn_c_try_link "$LINENO"; then : | |
7018 | ac_cv_lib_ossaudio__oss_ioctl=yes | |
7019 | else | |
7020 | ac_cv_lib_ossaudio__oss_ioctl=no | |
7021 | fi | |
7022 | rm -f core conftest.err conftest.$ac_objext \ | |
7023 | conftest$ac_exeext conftest.$ac_ext | |
7024 | LIBS=$ac_check_lib_save_LIBS | |
7025 | fi | |
7026 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5 | |
7027 | $as_echo "$ac_cv_lib_ossaudio__oss_ioctl" >&6; } | |
9ba41eb9 | 7028 | if test "x$ac_cv_lib_ossaudio__oss_ioctl" = x""yes; then : |
067d23c9 KY |
7029 | LIBSOUND=-lossaudio |
7030 | else | |
7031 | LIBSOUND= | |
7032 | fi | |
7033 | ||
7034 | ||
7035 | ||
7036 | ALSA_REQUIRED=1.0.0 | |
7037 | ALSA_MODULES="alsa >= $ALSA_REQUIRED" | |
7038 | ||
7039 | succeeded=no | |
7040 | ||
7041 | # Extract the first word of "pkg-config", so it can be a program name with args. | |
7042 | set dummy pkg-config; ac_word=$2 | |
7043 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
7044 | $as_echo_n "checking for $ac_word... " >&6; } | |
9ba41eb9 | 7045 | if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : |
067d23c9 KY |
7046 | $as_echo_n "(cached) " >&6 |
7047 | else | |
7048 | case $PKG_CONFIG in | |
7049 | [\\/]* | ?:[\\/]*) | |
7050 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
7051 | ;; | |
7052 | *) | |
7053 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7054 | for as_dir in $PATH | |
7055 | do | |
7056 | IFS=$as_save_IFS | |
7057 | test -z "$as_dir" && as_dir=. | |
7058 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7059 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
7060 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
7061 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7062 | break 2 | |
7063 | fi | |
7064 | done | |
7065 | done | |
7066 | IFS=$as_save_IFS | |
7067 | ||
7068 | test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" | |
7069 | ;; | |
7070 | esac | |
7071 | fi | |
7072 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG | |
7073 | if test -n "$PKG_CONFIG"; then | |
7074 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
7075 | $as_echo "$PKG_CONFIG" >&6; } | |
7076 | else | |
7077 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
7078 | $as_echo "no" >&6; } | |
7079 | fi | |
7080 | ||
7081 | ||
7082 | ||
7083 | if test "$PKG_CONFIG" = "no" ; then | |
7084 | HAVE_ALSA=no | |
7085 | else | |
7086 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
7087 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
7088 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ALSA_MODULES" >&5 | |
7089 | $as_echo_n "checking for $ALSA_MODULES... " >&6; } | |
7090 | ||
7091 | if $PKG_CONFIG --exists "$ALSA_MODULES" 2>&5; then | |
7092 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
7093 | $as_echo "yes" >&6; } | |
7094 | succeeded=yes | |
7095 | ||
7096 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking ALSA_CFLAGS" >&5 | |
7097 | $as_echo_n "checking ALSA_CFLAGS... " >&6; } | |
7098 | ALSA_CFLAGS=`$PKG_CONFIG --cflags "$ALSA_MODULES"|sed -e 's,///*,/,g'` | |
7099 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ALSA_CFLAGS" >&5 | |
7100 | $as_echo "$ALSA_CFLAGS" >&6; } | |
7101 | ||
7102 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking ALSA_LIBS" >&5 | |
7103 | $as_echo_n "checking ALSA_LIBS... " >&6; } | |
7104 | ALSA_LIBS=`$PKG_CONFIG --libs "$ALSA_MODULES"|sed -e 's,///*,/,g'` | |
7105 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ALSA_LIBS" >&5 | |
7106 | $as_echo "$ALSA_LIBS" >&6; } | |
7107 | else | |
7108 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
7109 | $as_echo "no" >&6; } | |
7110 | ALSA_CFLAGS="" | |
7111 | ALSA_LIBS="" | |
7112 | ## If we have a custom action on failure, don't print errors, but | |
7113 | ## do set a variable so people can do so. | |
7114 | ALSA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$ALSA_MODULES"` | |
7115 | ||
7116 | fi | |
7117 | ||
7118 | ||
7119 | ||
7120 | else | |
7121 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
7122 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
7123 | fi | |
7124 | fi | |
7125 | ||
7126 | if test $succeeded = yes; then | |
7127 | HAVE_ALSA=yes | |
7128 | else | |
7129 | HAVE_ALSA=no | |
7130 | fi | |
7131 | ||
7132 | if test $HAVE_ALSA = yes; then | |
7133 | SAVE_CFLAGS="$CFLAGS" | |
7134 | SAVE_LDFLAGS="$LDFLAGS" | |
7135 | CFLAGS="$ALSA_CFLAGS $CFLAGS" | |
7136 | LDFLAGS="$ALSA_LIBS $LDFLAGS" | |
7137 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7138 | /* end confdefs.h. */ | |
7139 | #include <asoundlib.h> | |
7140 | int | |
7141 | main () | |
7142 | { | |
7143 | snd_lib_error_set_handler (0); | |
7144 | ; | |
7145 | return 0; | |
7146 | } | |
7147 | _ACEOF | |
7148 | if ac_fn_c_try_compile "$LINENO"; then : | |
7149 | emacs_alsa_normal=yes | |
7150 | else | |
7151 | emacs_alsa_normal=no | |
7152 | fi | |
7153 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7154 | if test "$emacs_alsa_normal" != yes; then | |
7155 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7156 | /* end confdefs.h. */ | |
7157 | #include <alsa/asoundlib.h> | |
7158 | int | |
7159 | main () | |
7160 | { | |
7161 | snd_lib_error_set_handler (0); | |
7162 | ; | |
7163 | return 0; | |
7164 | } | |
7165 | _ACEOF | |
7166 | if ac_fn_c_try_compile "$LINENO"; then : | |
7167 | emacs_alsa_subdir=yes | |
7168 | else | |
7169 | emacs_alsa_subdir=no | |
7170 | fi | |
7171 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7172 | if test "$emacs_alsa_subdir" != yes; then | |
2018939f | 7173 | as_fn_error $? "pkg-config found alsa, but it does not compile. See config.log for error messages." "$LINENO" 5 |
067d23c9 KY |
7174 | fi |
7175 | ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE" | |
7176 | fi | |
7177 | ||
7178 | CFLAGS="$SAVE_CFLAGS" | |
7179 | LDFLAGS="$SAVE_LDFLAGS" | |
7180 | LIBSOUND="$LIBSOUND $ALSA_LIBS" | |
7181 | CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS" | |
7182 | ||
7183 | $as_echo "#define HAVE_ALSA 1" >>confdefs.h | |
7184 | ||
7185 | fi | |
7186 | ||
7187 | if test x$have_sound_header = xyes || test $HAVE_ALSA = yes; then | |
7188 | case "$opsys" in | |
7189 | gnu-linux|freebsd|netbsd) | |
7190 | ||
7191 | $as_echo "#define HAVE_SOUND 1" >>confdefs.h | |
7192 | ||
7193 | ;; | |
7194 | esac | |
7195 | fi | |
7196 | ||
7197 | ||
7198 | fi | |
7199 | ||
7200 | for ac_header in sys/select.h sys/time.h unistd.h utime.h \ | |
7201 | linux/version.h sys/systeminfo.h limits.h \ | |
7202 | stdio_ext.h fcntl.h coff.h pty.h sys/mman.h \ | |
7203 | sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h \ | |
7204 | sys/utsname.h pwd.h utmp.h dirent.h util.h | |
7205 | do : | |
7206 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
7207 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
2018939f | 7208 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : |
067d23c9 KY |
7209 | cat >>confdefs.h <<_ACEOF |
7210 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
7211 | _ACEOF | |
7212 | ||
7213 | fi | |
7214 | ||
7215 | done | |
7216 | ||
7217 | ||
7218 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if personality LINUX32 can be set" >&5 | |
7219 | $as_echo_n "checking if personality LINUX32 can be set... " >&6; } | |
7220 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7221 | /* end confdefs.h. */ | |
7222 | #include <sys/personality.h> | |
7223 | int | |
7224 | main () | |
7225 | { | |
7226 | personality (PER_LINUX32) | |
7227 | ; | |
7228 | return 0; | |
7229 | } | |
7230 | _ACEOF | |
7231 | if ac_fn_c_try_compile "$LINENO"; then : | |
7232 | emacs_cv_personality_linux32=yes | |
7233 | else | |
7234 | emacs_cv_personality_linux32=no | |
7235 | fi | |
7236 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7237 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_personality_linux32" >&5 | |
7238 | $as_echo "$emacs_cv_personality_linux32" >&6; } | |
7239 | ||
7240 | if test $emacs_cv_personality_linux32 = yes; then | |
7241 | ||
7242 | $as_echo "#define HAVE_PERSONALITY_LINUX32 1" >>confdefs.h | |
7243 | ||
7244 | fi | |
7245 | ||
7246 | for ac_header in term.h | |
7247 | do : | |
7248 | ac_fn_c_check_header_preproc "$LINENO" "term.h" "ac_cv_header_term_h" | |
9ba41eb9 | 7249 | if test "x$ac_cv_header_term_h" = x""yes; then : |
067d23c9 KY |
7250 | cat >>confdefs.h <<_ACEOF |
7251 | #define HAVE_TERM_H 1 | |
7252 | _ACEOF | |
7253 | ||
7254 | fi | |
7255 | ||
7256 | done | |
7257 | ||
7258 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 | |
7259 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
9ba41eb9 | 7260 | if test "${ac_cv_header_stdc+set}" = set; then : |
067d23c9 KY |
7261 | $as_echo_n "(cached) " >&6 |
7262 | else | |
7263 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7264 | /* end confdefs.h. */ | |
7265 | #include <stdlib.h> | |
7266 | #include <stdarg.h> | |
7267 | #include <string.h> | |
7268 | #include <float.h> | |
7269 | ||
7270 | int | |
7271 | main () | |
7272 | { | |
7273 | ||
7274 | ; | |
7275 | return 0; | |
7276 | } | |
7277 | _ACEOF | |
7278 | if ac_fn_c_try_compile "$LINENO"; then : | |
7279 | ac_cv_header_stdc=yes | |
7280 | else | |
7281 | ac_cv_header_stdc=no | |
7282 | fi | |
7283 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7284 | ||
7285 | if test $ac_cv_header_stdc = yes; then | |
7286 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
7287 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7288 | /* end confdefs.h. */ | |
7289 | #include <string.h> | |
7290 | ||
7291 | _ACEOF | |
7292 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
7293 | $EGREP "memchr" >/dev/null 2>&1; then : | |
7294 | ||
7295 | else | |
7296 | ac_cv_header_stdc=no | |
7297 | fi | |
7298 | rm -f conftest* | |
7299 | ||
7300 | fi | |
7301 | ||
7302 | if test $ac_cv_header_stdc = yes; then | |
7303 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
7304 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7305 | /* end confdefs.h. */ | |
7306 | #include <stdlib.h> | |
7307 | ||
7308 | _ACEOF | |
7309 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
7310 | $EGREP "free" >/dev/null 2>&1; then : | |
7311 | ||
7312 | else | |
7313 | ac_cv_header_stdc=no | |
7314 | fi | |
7315 | rm -f conftest* | |
7316 | ||
7317 | fi | |
7318 | ||
7319 | if test $ac_cv_header_stdc = yes; then | |
7320 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
7321 | if test "$cross_compiling" = yes; then : | |
7322 | : | |
7323 | else | |
7324 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7325 | /* end confdefs.h. */ | |
7326 | #include <ctype.h> | |
7327 | #include <stdlib.h> | |
7328 | #if ((' ' & 0x0FF) == 0x020) | |
7329 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
7330 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
7331 | #else | |
7332 | # define ISLOWER(c) \ | |
7333 | (('a' <= (c) && (c) <= 'i') \ | |
7334 | || ('j' <= (c) && (c) <= 'r') \ | |
7335 | || ('s' <= (c) && (c) <= 'z')) | |
7336 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
7337 | #endif | |
7338 | ||
7339 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
7340 | int | |
7341 | main () | |
7342 | { | |
7343 | int i; | |
7344 | for (i = 0; i < 256; i++) | |
7345 | if (XOR (islower (i), ISLOWER (i)) | |
7346 | || toupper (i) != TOUPPER (i)) | |
7347 | return 2; | |
7348 | return 0; | |
7349 | } | |
7350 | _ACEOF | |
7351 | if ac_fn_c_try_run "$LINENO"; then : | |
7352 | ||
7353 | else | |
7354 | ac_cv_header_stdc=no | |
7355 | fi | |
7356 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
7357 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
7358 | fi | |
7359 | ||
7360 | fi | |
7361 | fi | |
7362 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 | |
7363 | $as_echo "$ac_cv_header_stdc" >&6; } | |
7364 | if test $ac_cv_header_stdc = yes; then | |
7365 | ||
7366 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h | |
7367 | ||
7368 | fi | |
7369 | ||
7370 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 | |
7371 | $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } | |
9ba41eb9 | 7372 | if test "${ac_cv_header_time+set}" = set; then : |
067d23c9 KY |
7373 | $as_echo_n "(cached) " >&6 |
7374 | else | |
7375 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7376 | /* end confdefs.h. */ | |
7377 | #include <sys/types.h> | |
7378 | #include <sys/time.h> | |
7379 | #include <time.h> | |
7380 | ||
7381 | int | |
7382 | main () | |
7383 | { | |
7384 | if ((struct tm *) 0) | |
7385 | return 0; | |
7386 | ; | |
7387 | return 0; | |
7388 | } | |
7389 | _ACEOF | |
7390 | if ac_fn_c_try_compile "$LINENO"; then : | |
7391 | ac_cv_header_time=yes | |
7392 | else | |
7393 | ac_cv_header_time=no | |
7394 | fi | |
7395 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7396 | fi | |
7397 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 | |
7398 | $as_echo "$ac_cv_header_time" >&6; } | |
7399 | if test $ac_cv_header_time = yes; then | |
7400 | ||
7401 | $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h | |
7402 | ||
7403 | fi | |
7404 | ||
7405 | ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "$ac_includes_default" | |
9ba41eb9 | 7406 | if test "x$ac_cv_have_decl_sys_siglist" = x""yes; then : |
067d23c9 KY |
7407 | ac_have_decl=1 |
7408 | else | |
7409 | ac_have_decl=0 | |
7410 | fi | |
7411 | ||
7412 | cat >>confdefs.h <<_ACEOF | |
7413 | #define HAVE_DECL_SYS_SIGLIST $ac_have_decl | |
7414 | _ACEOF | |
7415 | ||
7416 | if test $ac_cv_have_decl_sys_siglist != yes; then | |
7417 | # For Tru64, at least: | |
7418 | ac_fn_c_check_decl "$LINENO" "__sys_siglist" "ac_cv_have_decl___sys_siglist" "$ac_includes_default" | |
9ba41eb9 | 7419 | if test "x$ac_cv_have_decl___sys_siglist" = x""yes; then : |
067d23c9 KY |
7420 | ac_have_decl=1 |
7421 | else | |
7422 | ac_have_decl=0 | |
7423 | fi | |
7424 | ||
7425 | cat >>confdefs.h <<_ACEOF | |
7426 | #define HAVE_DECL___SYS_SIGLIST $ac_have_decl | |
7427 | _ACEOF | |
7428 | ||
7429 | if test $ac_cv_have_decl___sys_siglist = yes; then | |
7430 | ||
7431 | $as_echo "#define sys_siglist __sys_siglist" >>confdefs.h | |
7432 | ||
7433 | fi | |
7434 | fi | |
7435 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5 | |
7436 | $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; } | |
9ba41eb9 | 7437 | if test "${ac_cv_header_sys_wait_h+set}" = set; then : |
067d23c9 KY |
7438 | $as_echo_n "(cached) " >&6 |
7439 | else | |
7440 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7441 | /* end confdefs.h. */ | |
7442 | #include <sys/types.h> | |
7443 | #include <sys/wait.h> | |
7444 | #ifndef WEXITSTATUS | |
7445 | # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8) | |
7446 | #endif | |
7447 | #ifndef WIFEXITED | |
7448 | # define WIFEXITED(stat_val) (((stat_val) & 255) == 0) | |
7449 | #endif | |
7450 | ||
7451 | int | |
7452 | main () | |
7453 | { | |
7454 | int s; | |
7455 | wait (&s); | |
7456 | s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; | |
7457 | ; | |
7458 | return 0; | |
7459 | } | |
7460 | _ACEOF | |
7461 | if ac_fn_c_try_compile "$LINENO"; then : | |
7462 | ac_cv_header_sys_wait_h=yes | |
7463 | else | |
7464 | ac_cv_header_sys_wait_h=no | |
7465 | fi | |
7466 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7467 | fi | |
7468 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5 | |
7469 | $as_echo "$ac_cv_header_sys_wait_h" >&6; } | |
7470 | if test $ac_cv_header_sys_wait_h = yes; then | |
7471 | ||
7472 | $as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h | |
7473 | ||
7474 | fi | |
7475 | ||
7476 | ||
7477 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct utimbuf" >&5 | |
7478 | $as_echo_n "checking for struct utimbuf... " >&6; } | |
9ba41eb9 | 7479 | if test "${emacs_cv_struct_utimbuf+set}" = set; then : |
067d23c9 KY |
7480 | $as_echo_n "(cached) " >&6 |
7481 | else | |
7482 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7483 | /* end confdefs.h. */ | |
7484 | #ifdef TIME_WITH_SYS_TIME | |
7485 | #include <sys/time.h> | |
7486 | #include <time.h> | |
7487 | #else | |
7488 | #ifdef HAVE_SYS_TIME_H | |
7489 | #include <sys/time.h> | |
7490 | #else | |
7491 | #include <time.h> | |
7492 | #endif | |
7493 | #endif | |
7494 | #ifdef HAVE_UTIME_H | |
7495 | #include <utime.h> | |
7496 | #endif | |
7497 | int | |
7498 | main () | |
7499 | { | |
7500 | static struct utimbuf x; x.actime = x.modtime; | |
7501 | ; | |
7502 | return 0; | |
7503 | } | |
7504 | _ACEOF | |
7505 | if ac_fn_c_try_compile "$LINENO"; then : | |
7506 | emacs_cv_struct_utimbuf=yes | |
7507 | else | |
7508 | emacs_cv_struct_utimbuf=no | |
7509 | fi | |
7510 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7511 | fi | |
7512 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_struct_utimbuf" >&5 | |
7513 | $as_echo "$emacs_cv_struct_utimbuf" >&6; } | |
7514 | if test $emacs_cv_struct_utimbuf = yes; then | |
7515 | ||
7516 | $as_echo "#define HAVE_STRUCT_UTIMBUF 1" >>confdefs.h | |
7517 | ||
7518 | fi | |
7519 | ||
7520 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 | |
7521 | $as_echo_n "checking return type of signal handlers... " >&6; } | |
9ba41eb9 | 7522 | if test "${ac_cv_type_signal+set}" = set; then : |
067d23c9 KY |
7523 | $as_echo_n "(cached) " >&6 |
7524 | else | |
7525 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7526 | /* end confdefs.h. */ | |
7527 | #include <sys/types.h> | |
7528 | #include <signal.h> | |
7529 | ||
7530 | int | |
7531 | main () | |
7532 | { | |
7533 | return *(signal (0, 0)) (0) == 1; | |
7534 | ; | |
7535 | return 0; | |
7536 | } | |
7537 | _ACEOF | |
7538 | if ac_fn_c_try_compile "$LINENO"; then : | |
7539 | ac_cv_type_signal=int | |
7540 | else | |
7541 | ac_cv_type_signal=void | |
7542 | fi | |
7543 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7544 | fi | |
7545 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5 | |
7546 | $as_echo "$ac_cv_type_signal" >&6; } | |
7547 | ||
7548 | cat >>confdefs.h <<_ACEOF | |
7549 | #define RETSIGTYPE $ac_cv_type_signal | |
7550 | _ACEOF | |
7551 | ||
7552 | ||
7553 | ||
7554 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for speed_t" >&5 | |
7555 | $as_echo_n "checking for speed_t... " >&6; } | |
9ba41eb9 | 7556 | if test "${emacs_cv_speed_t+set}" = set; then : |
067d23c9 KY |
7557 | $as_echo_n "(cached) " >&6 |
7558 | else | |
7559 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7560 | /* end confdefs.h. */ | |
7561 | #include <termios.h> | |
7562 | int | |
7563 | main () | |
7564 | { | |
7565 | speed_t x = 1; | |
7566 | ; | |
7567 | return 0; | |
7568 | } | |
7569 | _ACEOF | |
7570 | if ac_fn_c_try_compile "$LINENO"; then : | |
7571 | emacs_cv_speed_t=yes | |
7572 | else | |
7573 | emacs_cv_speed_t=no | |
7574 | fi | |
7575 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7576 | fi | |
7577 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_speed_t" >&5 | |
7578 | $as_echo "$emacs_cv_speed_t" >&6; } | |
7579 | if test $emacs_cv_speed_t = yes; then | |
7580 | ||
7581 | $as_echo "#define HAVE_SPEED_T 1" >>confdefs.h | |
7582 | ||
7583 | fi | |
7584 | ||
7585 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5 | |
7586 | $as_echo_n "checking for struct timeval... " >&6; } | |
9ba41eb9 | 7587 | if test "${emacs_cv_struct_timeval+set}" = set; then : |
067d23c9 KY |
7588 | $as_echo_n "(cached) " >&6 |
7589 | else | |
7590 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7591 | /* end confdefs.h. */ | |
7592 | #ifdef TIME_WITH_SYS_TIME | |
7593 | #include <sys/time.h> | |
7594 | #include <time.h> | |
7595 | #else | |
7596 | #ifdef HAVE_SYS_TIME_H | |
7597 | #include <sys/time.h> | |
7598 | #else | |
7599 | #include <time.h> | |
7600 | #endif | |
7601 | #endif | |
7602 | int | |
7603 | main () | |
7604 | { | |
7605 | static struct timeval x; x.tv_sec = x.tv_usec; | |
7606 | ; | |
7607 | return 0; | |
7608 | } | |
7609 | _ACEOF | |
7610 | if ac_fn_c_try_compile "$LINENO"; then : | |
7611 | emacs_cv_struct_timeval=yes | |
7612 | else | |
7613 | emacs_cv_struct_timeval=no | |
7614 | fi | |
7615 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7616 | fi | |
7617 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_struct_timeval" >&5 | |
7618 | $as_echo "$emacs_cv_struct_timeval" >&6; } | |
7619 | HAVE_TIMEVAL=$emacs_cv_struct_timeval | |
7620 | if test $emacs_cv_struct_timeval = yes; then | |
7621 | ||
7622 | $as_echo "#define HAVE_TIMEVAL 1" >>confdefs.h | |
7623 | ||
7624 | fi | |
7625 | ||
7626 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct exception" >&5 | |
7627 | $as_echo_n "checking for struct exception... " >&6; } | |
9ba41eb9 | 7628 | if test "${emacs_cv_struct_exception+set}" = set; then : |
067d23c9 KY |
7629 | $as_echo_n "(cached) " >&6 |
7630 | else | |
7631 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7632 | /* end confdefs.h. */ | |
7633 | #include <math.h> | |
7634 | int | |
7635 | main () | |
7636 | { | |
7637 | static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1; | |
7638 | ; | |
7639 | return 0; | |
7640 | } | |
7641 | _ACEOF | |
7642 | if ac_fn_c_try_compile "$LINENO"; then : | |
7643 | emacs_cv_struct_exception=yes | |
7644 | else | |
7645 | emacs_cv_struct_exception=no | |
7646 | fi | |
7647 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7648 | fi | |
7649 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_struct_exception" >&5 | |
7650 | $as_echo "$emacs_cv_struct_exception" >&6; } | |
7651 | HAVE_EXCEPTION=$emacs_cv_struct_exception | |
7652 | if test $emacs_cv_struct_exception != yes; then | |
7653 | ||
7654 | $as_echo "#define NO_MATHERR 1" >>confdefs.h | |
7655 | ||
7656 | fi | |
7657 | ||
7658 | for ac_header in sys/socket.h | |
7659 | do : | |
7660 | ac_fn_c_check_header_mongrel "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default" | |
9ba41eb9 | 7661 | if test "x$ac_cv_header_sys_socket_h" = x""yes; then : |
067d23c9 KY |
7662 | cat >>confdefs.h <<_ACEOF |
7663 | #define HAVE_SYS_SOCKET_H 1 | |
7664 | _ACEOF | |
7665 | ||
7666 | fi | |
7667 | ||
7668 | done | |
7669 | ||
7670 | for ac_header in net/if.h | |
7671 | do : | |
7672 | ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default | |
7673 | #if HAVE_SYS_SOCKET_H | |
7674 | #include <sys/socket.h> | |
7675 | #endif | |
7676 | " | |
9ba41eb9 | 7677 | if test "x$ac_cv_header_net_if_h" = x""yes; then : |
067d23c9 KY |
7678 | cat >>confdefs.h <<_ACEOF |
7679 | #define HAVE_NET_IF_H 1 | |
7680 | _ACEOF | |
7681 | ||
7682 | fi | |
7683 | ||
7684 | done | |
7685 | ||
7686 | ||
7687 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 | |
7688 | $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; } | |
9ba41eb9 | 7689 | if test "${ac_cv_struct_tm+set}" = set; then : |
067d23c9 KY |
7690 | $as_echo_n "(cached) " >&6 |
7691 | else | |
7692 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7693 | /* end confdefs.h. */ | |
7694 | #include <sys/types.h> | |
7695 | #include <time.h> | |
7696 | ||
7697 | int | |
7698 | main () | |
7699 | { | |
7700 | struct tm tm; | |
7701 | int *p = &tm.tm_sec; | |
7702 | return !p; | |
7703 | ; | |
7704 | return 0; | |
7705 | } | |
7706 | _ACEOF | |
7707 | if ac_fn_c_try_compile "$LINENO"; then : | |
7708 | ac_cv_struct_tm=time.h | |
7709 | else | |
7710 | ac_cv_struct_tm=sys/time.h | |
7711 | fi | |
7712 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7713 | fi | |
7714 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5 | |
7715 | $as_echo "$ac_cv_struct_tm" >&6; } | |
7716 | if test $ac_cv_struct_tm = sys/time.h; then | |
7717 | ||
7718 | $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h | |
7719 | ||
7720 | fi | |
7721 | ||
7722 | ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h> | |
7723 | #include <$ac_cv_struct_tm> | |
7724 | ||
7725 | " | |
9ba41eb9 | 7726 | if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then : |
067d23c9 KY |
7727 | |
7728 | cat >>confdefs.h <<_ACEOF | |
7729 | #define HAVE_STRUCT_TM_TM_ZONE 1 | |
7730 | _ACEOF | |
7731 | ||
7732 | ||
7733 | fi | |
7734 | ||
7735 | if test "$ac_cv_member_struct_tm_tm_zone" = yes; then | |
7736 | ||
7737 | $as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h | |
7738 | ||
7739 | else | |
7740 | ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h> | |
7741 | " | |
9ba41eb9 | 7742 | if test "x$ac_cv_have_decl_tzname" = x""yes; then : |
067d23c9 KY |
7743 | ac_have_decl=1 |
7744 | else | |
7745 | ac_have_decl=0 | |
7746 | fi | |
7747 | ||
7748 | cat >>confdefs.h <<_ACEOF | |
7749 | #define HAVE_DECL_TZNAME $ac_have_decl | |
7750 | _ACEOF | |
7751 | ||
7752 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5 | |
7753 | $as_echo_n "checking for tzname... " >&6; } | |
9ba41eb9 | 7754 | if test "${ac_cv_var_tzname+set}" = set; then : |
067d23c9 KY |
7755 | $as_echo_n "(cached) " >&6 |
7756 | else | |
7757 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7758 | /* end confdefs.h. */ | |
7759 | #include <time.h> | |
7760 | #if !HAVE_DECL_TZNAME | |
7761 | extern char *tzname[]; | |
7762 | #endif | |
7763 | ||
7764 | int | |
7765 | main () | |
7766 | { | |
7767 | return tzname[0][0]; | |
7768 | ; | |
7769 | return 0; | |
7770 | } | |
7771 | _ACEOF | |
7772 | if ac_fn_c_try_link "$LINENO"; then : | |
7773 | ac_cv_var_tzname=yes | |
7774 | else | |
7775 | ac_cv_var_tzname=no | |
7776 | fi | |
7777 | rm -f core conftest.err conftest.$ac_objext \ | |
7778 | conftest$ac_exeext conftest.$ac_ext | |
7779 | fi | |
7780 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5 | |
7781 | $as_echo "$ac_cv_var_tzname" >&6; } | |
7782 | if test $ac_cv_var_tzname = yes; then | |
7783 | ||
7784 | $as_echo "#define HAVE_TZNAME 1" >>confdefs.h | |
7785 | ||
7786 | fi | |
7787 | fi | |
7788 | ||
7789 | ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include <time.h> | |
7790 | " | |
9ba41eb9 | 7791 | if test "x$ac_cv_member_struct_tm_tm_gmtoff" = x""yes; then : |
067d23c9 KY |
7792 | |
7793 | $as_echo "#define HAVE_TM_GMTOFF 1" >>confdefs.h | |
7794 | ||
7795 | fi | |
7796 | ||
7797 | ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_flags" "ac_cv_member_struct_ifreq_ifr_flags" "$ac_includes_default | |
7798 | #if HAVE_SYS_SOCKET_H | |
7799 | #include <sys/socket.h> | |
7800 | #endif | |
7801 | #if HAVE_NET_IF_H | |
7802 | #include <net/if.h> | |
7803 | #endif | |
7804 | " | |
9ba41eb9 | 7805 | if test "x$ac_cv_member_struct_ifreq_ifr_flags" = x""yes; then : |
067d23c9 KY |
7806 | |
7807 | cat >>confdefs.h <<_ACEOF | |
7808 | #define HAVE_STRUCT_IFREQ_IFR_FLAGS 1 | |
7809 | _ACEOF | |
7810 | ||
7811 | ||
7812 | fi | |
7813 | ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_hwaddr" "ac_cv_member_struct_ifreq_ifr_hwaddr" "$ac_includes_default | |
7814 | #if HAVE_SYS_SOCKET_H | |
7815 | #include <sys/socket.h> | |
7816 | #endif | |
7817 | #if HAVE_NET_IF_H | |
7818 | #include <net/if.h> | |
7819 | #endif | |
7820 | " | |
9ba41eb9 | 7821 | if test "x$ac_cv_member_struct_ifreq_ifr_hwaddr" = x""yes; then : |
067d23c9 KY |
7822 | |
7823 | cat >>confdefs.h <<_ACEOF | |
7824 | #define HAVE_STRUCT_IFREQ_IFR_HWADDR 1 | |
7825 | _ACEOF | |
7826 | ||
7827 | ||
7828 | fi | |
7829 | ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_netmask" "ac_cv_member_struct_ifreq_ifr_netmask" "$ac_includes_default | |
7830 | #if HAVE_SYS_SOCKET_H | |
7831 | #include <sys/socket.h> | |
7832 | #endif | |
7833 | #if HAVE_NET_IF_H | |
7834 | #include <net/if.h> | |
7835 | #endif | |
7836 | " | |
9ba41eb9 | 7837 | if test "x$ac_cv_member_struct_ifreq_ifr_netmask" = x""yes; then : |
067d23c9 KY |
7838 | |
7839 | cat >>confdefs.h <<_ACEOF | |
7840 | #define HAVE_STRUCT_IFREQ_IFR_NETMASK 1 | |
7841 | _ACEOF | |
7842 | ||
7843 | ||
7844 | fi | |
7845 | ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_broadaddr" "ac_cv_member_struct_ifreq_ifr_broadaddr" "$ac_includes_default | |
7846 | #if HAVE_SYS_SOCKET_H | |
7847 | #include <sys/socket.h> | |
7848 | #endif | |
7849 | #if HAVE_NET_IF_H | |
7850 | #include <net/if.h> | |
7851 | #endif | |
7852 | " | |
9ba41eb9 | 7853 | if test "x$ac_cv_member_struct_ifreq_ifr_broadaddr" = x""yes; then : |
067d23c9 KY |
7854 | |
7855 | cat >>confdefs.h <<_ACEOF | |
7856 | #define HAVE_STRUCT_IFREQ_IFR_BROADADDR 1 | |
7857 | _ACEOF | |
7858 | ||
7859 | ||
7860 | fi | |
7861 | ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_addr" "ac_cv_member_struct_ifreq_ifr_addr" "$ac_includes_default | |
7862 | #if HAVE_SYS_SOCKET_H | |
7863 | #include <sys/socket.h> | |
7864 | #endif | |
7865 | #if HAVE_NET_IF_H | |
7866 | #include <net/if.h> | |
7867 | #endif | |
7868 | " | |
9ba41eb9 | 7869 | if test "x$ac_cv_member_struct_ifreq_ifr_addr" = x""yes; then : |
067d23c9 KY |
7870 | |
7871 | cat >>confdefs.h <<_ACEOF | |
7872 | #define HAVE_STRUCT_IFREQ_IFR_ADDR 1 | |
7873 | _ACEOF | |
7874 | ||
7875 | ||
7876 | fi | |
7877 | ||
7878 | ||
7879 | ||
7880 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for function prototypes" >&5 | |
7881 | $as_echo_n "checking for function prototypes... " >&6; } | |
7882 | if test "$ac_cv_prog_cc_c89" != no; then | |
7883 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
7884 | $as_echo "yes" >&6; } | |
7885 | ||
7886 | $as_echo "#define PROTOTYPES 1" >>confdefs.h | |
7887 | ||
7888 | ||
7889 | $as_echo "#define __PROTOTYPES 1" >>confdefs.h | |
7890 | ||
7891 | else | |
7892 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
7893 | $as_echo "no" >&6; } | |
7894 | fi | |
7895 | ||
7896 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5 | |
7897 | $as_echo_n "checking for working volatile... " >&6; } | |
9ba41eb9 | 7898 | if test "${ac_cv_c_volatile+set}" = set; then : |
067d23c9 KY |
7899 | $as_echo_n "(cached) " >&6 |
7900 | else | |
7901 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7902 | /* end confdefs.h. */ | |
7903 | ||
7904 | int | |
7905 | main () | |
7906 | { | |
7907 | ||
7908 | volatile int x; | |
7909 | int * volatile y = (int *) 0; | |
7910 | return !x && !y; | |
7911 | ; | |
7912 | return 0; | |
7913 | } | |
7914 | _ACEOF | |
7915 | if ac_fn_c_try_compile "$LINENO"; then : | |
7916 | ac_cv_c_volatile=yes | |
7917 | else | |
7918 | ac_cv_c_volatile=no | |
7919 | fi | |
7920 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7921 | fi | |
7922 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5 | |
7923 | $as_echo "$ac_cv_c_volatile" >&6; } | |
7924 | if test $ac_cv_c_volatile = no; then | |
7925 | ||
7926 | $as_echo "#define volatile /**/" >>confdefs.h | |
7927 | ||
7928 | fi | |
7929 | ||
7930 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 | |
7931 | $as_echo_n "checking for an ANSI C-conforming const... " >&6; } | |
9ba41eb9 | 7932 | if test "${ac_cv_c_const+set}" = set; then : |
067d23c9 KY |
7933 | $as_echo_n "(cached) " >&6 |
7934 | else | |
7935 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7936 | /* end confdefs.h. */ | |
7937 | ||
7938 | int | |
7939 | main () | |
7940 | { | |
7941 | /* FIXME: Include the comments suggested by Paul. */ | |
7942 | #ifndef __cplusplus | |
7943 | /* Ultrix mips cc rejects this. */ | |
7944 | typedef int charset[2]; | |
7945 | const charset cs; | |
7946 | /* SunOS 4.1.1 cc rejects this. */ | |
7947 | char const *const *pcpcc; | |
7948 | char **ppc; | |
7949 | /* NEC SVR4.0.2 mips cc rejects this. */ | |
7950 | struct point {int x, y;}; | |
7951 | static struct point const zero = {0,0}; | |
7952 | /* AIX XL C 1.02.0.0 rejects this. | |
7953 | It does not let you subtract one const X* pointer from another in | |
7954 | an arm of an if-expression whose if-part is not a constant | |
7955 | expression */ | |
7956 | const char *g = "string"; | |
7957 | pcpcc = &g + (g ? g-g : 0); | |
7958 | /* HPUX 7.0 cc rejects these. */ | |
7959 | ++pcpcc; | |
7960 | ppc = (char**) pcpcc; | |
7961 | pcpcc = (char const *const *) ppc; | |
7962 | { /* SCO 3.2v4 cc rejects this. */ | |
7963 | char *t; | |
7964 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
7965 | ||
7966 | *t++ = 0; | |
7967 | if (s) return 0; | |
7968 | } | |
7969 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
7970 | int x[] = {25, 17}; | |
7971 | const int *foo = &x[0]; | |
7972 | ++foo; | |
7973 | } | |
7974 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
7975 | typedef const int *iptr; | |
7976 | iptr p = 0; | |
7977 | ++p; | |
7978 | } | |
7979 | { /* AIX XL C 1.02.0.0 rejects this saying | |
7980 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
7981 | struct s { int j; const int *ap[3]; }; | |
7982 | struct s *b; b->j = 5; | |
7983 | } | |
7984 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
7985 | const int foo = 10; | |
7986 | if (!foo) return 0; | |
7987 | } | |
7988 | return !cs[0] && !zero.x; | |
7989 | #endif | |
7990 | ||
7991 | ; | |
7992 | return 0; | |
7993 | } | |
7994 | _ACEOF | |
7995 | if ac_fn_c_try_compile "$LINENO"; then : | |
7996 | ac_cv_c_const=yes | |
7997 | else | |
7998 | ac_cv_c_const=no | |
7999 | fi | |
8000 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8001 | fi | |
8002 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 | |
8003 | $as_echo "$ac_cv_c_const" >&6; } | |
8004 | if test $ac_cv_c_const = no; then | |
8005 | ||
8006 | $as_echo "#define const /**/" >>confdefs.h | |
8007 | ||
8008 | fi | |
8009 | ||
8010 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for void * support" >&5 | |
8011 | $as_echo_n "checking for void * support... " >&6; } | |
9ba41eb9 | 8012 | if test "${emacs_cv_void_star+set}" = set; then : |
067d23c9 KY |
8013 | $as_echo_n "(cached) " >&6 |
8014 | else | |
8015 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8016 | /* end confdefs.h. */ | |
8017 | ||
8018 | int | |
8019 | main () | |
8020 | { | |
8021 | void * foo; | |
8022 | ; | |
8023 | return 0; | |
8024 | } | |
8025 | _ACEOF | |
8026 | if ac_fn_c_try_compile "$LINENO"; then : | |
8027 | emacs_cv_void_star=yes | |
8028 | else | |
8029 | emacs_cv_void_star=no | |
8030 | fi | |
8031 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8032 | fi | |
8033 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_void_star" >&5 | |
8034 | $as_echo "$emacs_cv_void_star" >&6; } | |
8035 | if test $emacs_cv_void_star = yes; then | |
8036 | $as_echo "#define POINTER_TYPE void" >>confdefs.h | |
8037 | ||
8038 | else | |
8039 | $as_echo "#define POINTER_TYPE char" >>confdefs.h | |
8040 | ||
8041 | fi | |
8042 | ||
8043 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 | |
8044 | $as_echo_n "checking whether byte ordering is bigendian... " >&6; } | |
9ba41eb9 | 8045 | if test "${ac_cv_c_bigendian+set}" = set; then : |
067d23c9 KY |
8046 | $as_echo_n "(cached) " >&6 |
8047 | else | |
8048 | ac_cv_c_bigendian=unknown | |
8049 | # See if we're dealing with a universal compiler. | |
8050 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8051 | /* end confdefs.h. */ | |
8052 | #ifndef __APPLE_CC__ | |
8053 | not a universal capable compiler | |
8054 | #endif | |
8055 | typedef int dummy; | |
8056 | ||
8057 | _ACEOF | |
8058 | if ac_fn_c_try_compile "$LINENO"; then : | |
8059 | ||
8060 | # Check for potential -arch flags. It is not universal unless | |
8061 | # there are at least two -arch flags with different values. | |
8062 | ac_arch= | |
8063 | ac_prev= | |
8064 | for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do | |
8065 | if test -n "$ac_prev"; then | |
8066 | case $ac_word in | |
8067 | i?86 | x86_64 | ppc | ppc64) | |
8068 | if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then | |
8069 | ac_arch=$ac_word | |
8070 | else | |
8071 | ac_cv_c_bigendian=universal | |
8072 | break | |
8073 | fi | |
8074 | ;; | |
8075 | esac | |
8076 | ac_prev= | |
8077 | elif test "x$ac_word" = "x-arch"; then | |
8078 | ac_prev=arch | |
8079 | fi | |
8080 | done | |
8081 | fi | |
8082 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8083 | if test $ac_cv_c_bigendian = unknown; then | |
8084 | # See if sys/param.h defines the BYTE_ORDER macro. | |
8085 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8086 | /* end confdefs.h. */ | |
8087 | #include <sys/types.h> | |
8088 | #include <sys/param.h> | |
8089 | ||
8090 | int | |
8091 | main () | |
8092 | { | |
8093 | #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ | |
8094 | && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ | |
8095 | && LITTLE_ENDIAN) | |
8096 | bogus endian macros | |
8097 | #endif | |
8098 | ||
8099 | ; | |
8100 | return 0; | |
8101 | } | |
8102 | _ACEOF | |
8103 | if ac_fn_c_try_compile "$LINENO"; then : | |
8104 | # It does; now see whether it defined to BIG_ENDIAN or not. | |
8105 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8106 | /* end confdefs.h. */ | |
8107 | #include <sys/types.h> | |
8108 | #include <sys/param.h> | |
8109 | ||
8110 | int | |
8111 | main () | |
8112 | { | |
8113 | #if BYTE_ORDER != BIG_ENDIAN | |
8114 | not big endian | |
8115 | #endif | |
8116 | ||
8117 | ; | |
8118 | return 0; | |
8119 | } | |
8120 | _ACEOF | |
8121 | if ac_fn_c_try_compile "$LINENO"; then : | |
8122 | ac_cv_c_bigendian=yes | |
8123 | else | |
8124 | ac_cv_c_bigendian=no | |
8125 | fi | |
8126 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8127 | fi | |
8128 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8129 | fi | |
8130 | if test $ac_cv_c_bigendian = unknown; then | |
8131 | # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). | |
8132 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8133 | /* end confdefs.h. */ | |
8134 | #include <limits.h> | |
8135 | ||
8136 | int | |
8137 | main () | |
8138 | { | |
8139 | #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) | |
8140 | bogus endian macros | |
8141 | #endif | |
8142 | ||
8143 | ; | |
8144 | return 0; | |
8145 | } | |
8146 | _ACEOF | |
8147 | if ac_fn_c_try_compile "$LINENO"; then : | |
8148 | # It does; now see whether it defined to _BIG_ENDIAN or not. | |
8149 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8150 | /* end confdefs.h. */ | |
8151 | #include <limits.h> | |
8152 | ||
8153 | int | |
8154 | main () | |
8155 | { | |
8156 | #ifndef _BIG_ENDIAN | |
8157 | not big endian | |
8158 | #endif | |
8159 | ||
8160 | ; | |
8161 | return 0; | |
8162 | } | |
8163 | _ACEOF | |
8164 | if ac_fn_c_try_compile "$LINENO"; then : | |
8165 | ac_cv_c_bigendian=yes | |
8166 | else | |
8167 | ac_cv_c_bigendian=no | |
8168 | fi | |
8169 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8170 | fi | |
8171 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8172 | fi | |
8173 | if test $ac_cv_c_bigendian = unknown; then | |
8174 | # Compile a test program. | |
8175 | if test "$cross_compiling" = yes; then : | |
8176 | # Try to guess by grepping values from an object file. | |
8177 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8178 | /* end confdefs.h. */ | |
8179 | short int ascii_mm[] = | |
8180 | { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; | |
8181 | short int ascii_ii[] = | |
8182 | { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; | |
8183 | int use_ascii (int i) { | |
8184 | return ascii_mm[i] + ascii_ii[i]; | |
8185 | } | |
8186 | short int ebcdic_ii[] = | |
8187 | { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; | |
8188 | short int ebcdic_mm[] = | |
8189 | { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; | |
8190 | int use_ebcdic (int i) { | |
8191 | return ebcdic_mm[i] + ebcdic_ii[i]; | |
8192 | } | |
8193 | extern int foo; | |
8194 | ||
8195 | int | |
8196 | main () | |
8197 | { | |
8198 | return use_ascii (foo) == use_ebcdic (foo); | |
8199 | ; | |
8200 | return 0; | |
8201 | } | |
8202 | _ACEOF | |
8203 | if ac_fn_c_try_compile "$LINENO"; then : | |
8204 | if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then | |
8205 | ac_cv_c_bigendian=yes | |
8206 | fi | |
8207 | if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then | |
8208 | if test "$ac_cv_c_bigendian" = unknown; then | |
8209 | ac_cv_c_bigendian=no | |
8210 | else | |
8211 | # finding both strings is unlikely to happen, but who knows? | |
8212 | ac_cv_c_bigendian=unknown | |
8213 | fi | |
8214 | fi | |
8215 | fi | |
8216 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8217 | else | |
8218 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8219 | /* end confdefs.h. */ | |
8220 | $ac_includes_default | |
8221 | int | |
8222 | main () | |
8223 | { | |
8224 | ||
8225 | /* Are we little or big endian? From Harbison&Steele. */ | |
8226 | union | |
8227 | { | |
8228 | long int l; | |
8229 | char c[sizeof (long int)]; | |
8230 | } u; | |
8231 | u.l = 1; | |
8232 | return u.c[sizeof (long int) - 1] == 1; | |
8233 | ||
8234 | ; | |
8235 | return 0; | |
8236 | } | |
8237 | _ACEOF | |
8238 | if ac_fn_c_try_run "$LINENO"; then : | |
8239 | ac_cv_c_bigendian=no | |
8240 | else | |
8241 | ac_cv_c_bigendian=yes | |
8242 | fi | |
8243 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
8244 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
8245 | fi | |
8246 | ||
8247 | fi | |
8248 | fi | |
8249 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 | |
8250 | $as_echo "$ac_cv_c_bigendian" >&6; } | |
8251 | case $ac_cv_c_bigendian in #( | |
8252 | yes) | |
8253 | $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h | |
8254 | ;; #( | |
8255 | no) | |
8256 | ;; #( | |
8257 | universal) | |
8258 | ||
8259 | $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h | |
8260 | ||
8261 | ;; #( | |
8262 | *) | |
2018939f | 8263 | as_fn_error $? "unknown endianness |
9ba41eb9 | 8264 | presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; |
067d23c9 KY |
8265 | esac |
8266 | ||
8267 | ||
7cae64b4 PE |
8268 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __attribute__ ((__aligned__ (expr)))" >&5 |
8269 | $as_echo_n "checking for __attribute__ ((__aligned__ (expr)))... " >&6; } | |
9ba41eb9 | 8270 | if test "${emacs_cv_attribute_aligned+set}" = set; then : |
7cae64b4 PE |
8271 | $as_echo_n "(cached) " >&6 |
8272 | else | |
8273 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8274 | /* end confdefs.h. */ | |
8275 | char __attribute__ ((__aligned__ (1 << 3))) c; | |
8276 | int | |
8277 | main () | |
8278 | { | |
8279 | ||
8280 | ; | |
8281 | return 0; | |
8282 | } | |
8283 | _ACEOF | |
8284 | if ac_fn_c_try_compile "$LINENO"; then : | |
8285 | emacs_cv_attribute_aligned=yes | |
8286 | else | |
8287 | emacs_cv_attribute_aligned=no | |
8288 | fi | |
8289 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8290 | fi | |
8291 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_attribute_aligned" >&5 | |
8292 | $as_echo "$emacs_cv_attribute_aligned" >&6; } | |
8293 | if test $emacs_cv_attribute_aligned = yes; then | |
8294 | ||
8295 | $as_echo "#define HAVE_ATTRIBUTE_ALIGNED 1" >>confdefs.h | |
8296 | ||
8297 | fi | |
8298 | ||
067d23c9 KY |
8299 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 |
8300 | $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } | |
8301 | set x ${MAKE-make} | |
8302 | ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` | |
9ba41eb9 | 8303 | if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then : |
067d23c9 KY |
8304 | $as_echo_n "(cached) " >&6 |
8305 | else | |
8306 | cat >conftest.make <<\_ACEOF | |
8307 | SHELL = /bin/sh | |
8308 | all: | |
8309 | @echo '@@@%%%=$(MAKE)=@@@%%%' | |
8310 | _ACEOF | |
2018939f | 8311 | # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. |
067d23c9 KY |
8312 | case `${MAKE-make} -f conftest.make 2>/dev/null` in |
8313 | *@@@%%%=?*=@@@%%%*) | |
8314 | eval ac_cv_prog_make_${ac_make}_set=yes;; | |
8315 | *) | |
8316 | eval ac_cv_prog_make_${ac_make}_set=no;; | |
8317 | esac | |
8318 | rm -f conftest.make | |
8319 | fi | |
8320 | if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then | |
8321 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
8322 | $as_echo "yes" >&6; } | |
8323 | SET_MAKE= | |
8324 | else | |
8325 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
8326 | $as_echo "no" >&6; } | |
8327 | SET_MAKE="MAKE=${MAKE-make}" | |
8328 | fi | |
8329 | ||
8330 | ||
8331 | DEPFLAGS= | |
8332 | MKDEPDIR=":" | |
8333 | deps_frag=deps.mk | |
8334 | if test "$GCC" = yes && test "$ac_enable_autodepend" = yes; then | |
8335 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using GNU Make" >&5 | |
8336 | $as_echo_n "checking whether we are using GNU Make... " >&6; } | |
8337 | HAVE_GNU_MAKE=no | |
8338 | testval=`make --version 2>/dev/null | grep 'GNU Make'` | |
8339 | if test "x$testval" != x; then | |
8340 | HAVE_GNU_MAKE=yes | |
8341 | else | |
8342 | ac_enable_autodepend=no | |
8343 | fi | |
8344 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_GNU_MAKE" >&5 | |
8345 | $as_echo "$HAVE_GNU_MAKE" >&6; } | |
8346 | if test $HAVE_GNU_MAKE = yes; then | |
8347 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -MMD -MF" >&5 | |
8348 | $as_echo_n "checking whether gcc understands -MMD -MF... " >&6; } | |
8349 | SAVE_CFLAGS="$CFLAGS" | |
8350 | CFLAGS="$CFLAGS -MMD -MF deps.d" | |
8351 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8352 | /* end confdefs.h. */ | |
8353 | ||
8354 | int | |
8355 | main () | |
8356 | { | |
8357 | ||
8358 | ; | |
8359 | return 0; | |
8360 | } | |
8361 | _ACEOF | |
8362 | if ac_fn_c_try_compile "$LINENO"; then : | |
8363 | ||
8364 | else | |
8365 | ac_enable_autodepend=no | |
8366 | fi | |
8367 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8368 | CFLAGS="$SAVE_CFLAGS" | |
8369 | test -f deps.d || ac_enable_autodepend=no | |
8370 | rm -rf deps.d | |
8371 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_autodepend" >&5 | |
8372 | $as_echo "$ac_enable_autodepend" >&6; } | |
8373 | fi | |
8374 | if test $ac_enable_autodepend = yes; then | |
8375 | DEPFLAGS='-MMD -MF ${DEPDIR}/$*.d' | |
8376 | ## In parallel builds, another make might create depdir between | |
8377 | ## the first test and mkdir, so stick another test on the end. | |
8378 | ## Or use mkinstalldirs? mkdir -p is not portable. | |
8379 | MKDEPDIR='test -d ${DEPDIR} || mkdir ${DEPDIR} || test -d ${DEPDIR}' | |
8380 | deps_frag=autodeps.mk | |
8381 | fi | |
8382 | fi | |
8383 | deps_frag=$srcdir/src/$deps_frag | |
8384 | ||
8385 | ||
8386 | ||
8387 | ||
8388 | ||
8389 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long file names" >&5 | |
8390 | $as_echo_n "checking for long file names... " >&6; } | |
9ba41eb9 | 8391 | if test "${ac_cv_sys_long_file_names+set}" = set; then : |
067d23c9 KY |
8392 | $as_echo_n "(cached) " >&6 |
8393 | else | |
8394 | ac_cv_sys_long_file_names=yes | |
8395 | # Test for long file names in all the places we know might matter: | |
8396 | # . the current directory, where building will happen | |
8397 | # $prefix/lib where we will be installing things | |
8398 | # $exec_prefix/lib likewise | |
8399 | # $TMPDIR if set, where it might want to write temporary files | |
8400 | # /tmp where it might want to write temporary files | |
8401 | # /var/tmp likewise | |
8402 | # /usr/tmp likewise | |
8403 | for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do | |
8404 | # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib | |
8405 | # in the usual case where exec_prefix is '${prefix}'. | |
8406 | case $ac_dir in #( | |
8407 | . | /* | ?:[\\/]*) ;; #( | |
8408 | *) continue;; | |
8409 | esac | |
8410 | test -w "$ac_dir/." || continue # It is less confusing to not echo anything here. | |
8411 | ac_xdir=$ac_dir/cf$$ | |
8412 | (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue | |
8413 | ac_tf1=$ac_xdir/conftest9012345 | |
8414 | ac_tf2=$ac_xdir/conftest9012346 | |
8415 | touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" || | |
8416 | ac_cv_sys_long_file_names=no | |
8417 | rm -f -r "$ac_xdir" 2>/dev/null | |
8418 | test $ac_cv_sys_long_file_names = no && break | |
8419 | done | |
8420 | fi | |
8421 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_long_file_names" >&5 | |
8422 | $as_echo "$ac_cv_sys_long_file_names" >&6; } | |
8423 | if test $ac_cv_sys_long_file_names = yes; then | |
8424 | ||
8425 | $as_echo "#define HAVE_LONG_FILE_NAMES 1" >>confdefs.h | |
8426 | ||
8427 | fi | |
8428 | ||
8429 | ||
8430 | #### Choose a window system. | |
8431 | ||
8432 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5 | |
8433 | $as_echo_n "checking for X... " >&6; } | |
8434 | ||
8435 | ||
8436 | # Check whether --with-x was given. | |
8437 | if test "${with_x+set}" = set; then : | |
8438 | withval=$with_x; | |
8439 | fi | |
8440 | ||
8441 | # $have_x is `yes', `no', `disabled', or empty when we do not yet know. | |
8442 | if test "x$with_x" = xno; then | |
8443 | # The user explicitly disabled X. | |
8444 | have_x=disabled | |
8445 | else | |
8446 | case $x_includes,$x_libraries in #( | |
9ba41eb9 MB |
8447 | *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5 ;; #( |
8448 | *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then : | |
067d23c9 KY |
8449 | $as_echo_n "(cached) " >&6 |
8450 | else | |
8451 | # One or both of the vars are not set, and there is no cached value. | |
8452 | ac_x_includes=no ac_x_libraries=no | |
8453 | rm -f -r conftest.dir | |
8454 | if mkdir conftest.dir; then | |
8455 | cd conftest.dir | |
8456 | cat >Imakefile <<'_ACEOF' | |
8457 | incroot: | |
8458 | @echo incroot='${INCROOT}' | |
8459 | usrlibdir: | |
8460 | @echo usrlibdir='${USRLIBDIR}' | |
8461 | libdir: | |
8462 | @echo libdir='${LIBDIR}' | |
8463 | _ACEOF | |
8464 | if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then | |
2018939f | 8465 | # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. |
067d23c9 KY |
8466 | for ac_var in incroot usrlibdir libdir; do |
8467 | eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" | |
8468 | done | |
8469 | # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. | |
8470 | for ac_extension in a so sl dylib la dll; do | |
8471 | if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && | |
8472 | test -f "$ac_im_libdir/libX11.$ac_extension"; then | |
8473 | ac_im_usrlibdir=$ac_im_libdir; break | |
8474 | fi | |
8475 | done | |
8476 | # Screen out bogus values from the imake configuration. They are | |
8477 | # bogus both because they are the default anyway, and because | |
8478 | # using them would break gcc on systems where it needs fixed includes. | |
8479 | case $ac_im_incroot in | |
8480 | /usr/include) ac_x_includes= ;; | |
8481 | *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; | |
8482 | esac | |
8483 | case $ac_im_usrlibdir in | |
8484 | /usr/lib | /usr/lib64 | /lib | /lib64) ;; | |
8485 | *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; | |
8486 | esac | |
8487 | fi | |
8488 | cd .. | |
8489 | rm -f -r conftest.dir | |
8490 | fi | |
8491 | ||
8492 | # Standard set of common directories for X headers. | |
8493 | # Check X11 before X11Rn because it is often a symlink to the current release. | |
8494 | ac_x_header_dirs=' | |
8495 | /usr/X11/include | |
8496 | /usr/X11R7/include | |
8497 | /usr/X11R6/include | |
8498 | /usr/X11R5/include | |
8499 | /usr/X11R4/include | |
8500 | ||
8501 | /usr/include/X11 | |
8502 | /usr/include/X11R7 | |
8503 | /usr/include/X11R6 | |
8504 | /usr/include/X11R5 | |
8505 | /usr/include/X11R4 | |
8506 | ||
8507 | /usr/local/X11/include | |
8508 | /usr/local/X11R7/include | |
8509 | /usr/local/X11R6/include | |
8510 | /usr/local/X11R5/include | |
8511 | /usr/local/X11R4/include | |
8512 | ||
8513 | /usr/local/include/X11 | |
8514 | /usr/local/include/X11R7 | |
8515 | /usr/local/include/X11R6 | |
8516 | /usr/local/include/X11R5 | |
8517 | /usr/local/include/X11R4 | |
8518 | ||
8519 | /usr/X386/include | |
8520 | /usr/x386/include | |
8521 | /usr/XFree86/include/X11 | |
8522 | ||
8523 | /usr/include | |
8524 | /usr/local/include | |
8525 | /usr/unsupported/include | |
8526 | /usr/athena/include | |
8527 | /usr/local/x11r5/include | |
8528 | /usr/lpp/Xamples/include | |
8529 | ||
8530 | /usr/openwin/include | |
8531 | /usr/openwin/share/include' | |
8532 | ||
8533 | if test "$ac_x_includes" = no; then | |
8534 | # Guess where to find include files, by looking for Xlib.h. | |
8535 | # First, try using that file with no special directory specified. | |
8536 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8537 | /* end confdefs.h. */ | |
8538 | #include <X11/Xlib.h> | |
8539 | _ACEOF | |
8540 | if ac_fn_c_try_cpp "$LINENO"; then : | |
8541 | # We can compile using X headers with no special include directory. | |
8542 | ac_x_includes= | |
8543 | else | |
8544 | for ac_dir in $ac_x_header_dirs; do | |
8545 | if test -r "$ac_dir/X11/Xlib.h"; then | |
8546 | ac_x_includes=$ac_dir | |
8547 | break | |
8548 | fi | |
8549 | done | |
8550 | fi | |
2018939f | 8551 | rm -f conftest.err conftest.i conftest.$ac_ext |
067d23c9 KY |
8552 | fi # $ac_x_includes = no |
8553 | ||
8554 | if test "$ac_x_libraries" = no; then | |
8555 | # Check for the libraries. | |
8556 | # See if we find them without any special options. | |
8557 | # Don't add to $LIBS permanently. | |
8558 | ac_save_LIBS=$LIBS | |
8559 | LIBS="-lX11 $LIBS" | |
8560 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8561 | /* end confdefs.h. */ | |
8562 | #include <X11/Xlib.h> | |
8563 | int | |
8564 | main () | |
8565 | { | |
8566 | XrmInitialize () | |
8567 | ; | |
8568 | return 0; | |
8569 | } | |
8570 | _ACEOF | |
8571 | if ac_fn_c_try_link "$LINENO"; then : | |
8572 | LIBS=$ac_save_LIBS | |
8573 | # We can link X programs with no special library path. | |
8574 | ac_x_libraries= | |
8575 | else | |
8576 | LIBS=$ac_save_LIBS | |
8577 | for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` | |
8578 | do | |
8579 | # Don't even attempt the hair of trying to link an X program! | |
8580 | for ac_extension in a so sl dylib la dll; do | |
8581 | if test -r "$ac_dir/libX11.$ac_extension"; then | |
8582 | ac_x_libraries=$ac_dir | |
8583 | break 2 | |
8584 | fi | |
8585 | done | |
8586 | done | |
8587 | fi | |
8588 | rm -f core conftest.err conftest.$ac_objext \ | |
8589 | conftest$ac_exeext conftest.$ac_ext | |
8590 | fi # $ac_x_libraries = no | |
8591 | ||
8592 | case $ac_x_includes,$ac_x_libraries in #( | |
8593 | no,* | *,no | *\'*) | |
8594 | # Didn't find X, or a directory has "'" in its name. | |
8595 | ac_cv_have_x="have_x=no";; #( | |
8596 | *) | |
8597 | # Record where we found X for the cache. | |
8598 | ac_cv_have_x="have_x=yes\ | |
8599 | ac_x_includes='$ac_x_includes'\ | |
8600 | ac_x_libraries='$ac_x_libraries'" | |
8601 | esac | |
8602 | fi | |
8603 | ;; #( | |
8604 | *) have_x=yes;; | |
8605 | esac | |
8606 | eval "$ac_cv_have_x" | |
8607 | fi # $with_x != no | |
8608 | ||
8609 | if test "$have_x" != yes; then | |
8610 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5 | |
8611 | $as_echo "$have_x" >&6; } | |
8612 | no_x=yes | |
8613 | else | |
8614 | # If each of the values was on the command line, it overrides each guess. | |
8615 | test "x$x_includes" = xNONE && x_includes=$ac_x_includes | |
8616 | test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries | |
8617 | # Update the cache value to reflect the command line values. | |
8618 | ac_cv_have_x="have_x=yes\ | |
8619 | ac_x_includes='$x_includes'\ | |
8620 | ac_x_libraries='$x_libraries'" | |
8621 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5 | |
8622 | $as_echo "libraries $x_libraries, headers $x_includes" >&6; } | |
8623 | fi | |
8624 | ||
8625 | if test "$no_x" = yes; then | |
8626 | window_system=none | |
8627 | else | |
8628 | window_system=x11 | |
8629 | fi | |
8630 | ||
8631 | ## Workaround for bug in autoconf <= 2.62. | |
8632 | ## http://lists.gnu.org/archive/html/emacs-devel/2008-04/msg01551.html | |
8633 | ## No need to do anything special for these standard directories. | |
8634 | if test -n "${x_libraries}" && test x"${x_libraries}" != xNONE; then | |
8635 | ||
8636 | x_libraries=`echo :${x_libraries}: | sed -e 's|:/usr/lib64:|:|g' -e 's|:/lib64:|:|g' -e 's|^:||' -e 's|:$||'` | |
8637 | ||
8638 | fi | |
8639 | ||
8640 | LD_SWITCH_X_SITE_AUX= | |
8641 | LD_SWITCH_X_SITE_AUX_RPATH= | |
8642 | if test "${x_libraries}" != NONE; then | |
8643 | if test -n "${x_libraries}"; then | |
8644 | LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"` | |
8645 | LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"` | |
8646 | LD_SWITCH_X_SITE_AUX_RPATH=`echo ${LD_SWITCH_X_SITE_AUX} | sed -e 's/-R/-Wl,-rpath,/'` | |
8647 | fi | |
8648 | x_default_search_path="" | |
8649 | x_search_path=${x_libraries} | |
8650 | if test -z "${x_search_path}"; then | |
8651 | x_search_path=/usr/lib | |
8652 | fi | |
8653 | for x_library in `echo ${x_search_path}: | \ | |
8654 | sed -e "s/:/ /g" -e p -e "s:/lib[^ /]* :/share :g"`; do | |
8655 | x_search_path="\ | |
8656 | ${x_library}/X11/%L/%T/%N%C%S:\ | |
8657 | ${x_library}/X11/%l/%T/%N%C%S:\ | |
8658 | ${x_library}/X11/%T/%N%C%S:\ | |
8659 | ${x_library}/X11/%L/%T/%N%S:\ | |
8660 | ${x_library}/X11/%l/%T/%N%S:\ | |
8661 | ${x_library}/X11/%T/%N%S" | |
8662 | if test x"${x_default_search_path}" = x; then | |
8663 | x_default_search_path=${x_search_path} | |
8664 | else | |
8665 | x_default_search_path="${x_search_path}:${x_default_search_path}" | |
8666 | fi | |
8667 | done | |
8668 | fi | |
8669 | ||
8670 | ||
8671 | ||
8672 | if test "${x_includes}" != NONE && test -n "${x_includes}"; then | |
8673 | C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"` | |
8674 | fi | |
8675 | ||
8676 | if test x"${x_includes}" = x; then | |
8677 | bitmapdir=/usr/include/X11/bitmaps | |
8678 | else | |
8679 | # accumulate include directories that have X11 bitmap subdirectories | |
8680 | bmd_acc="dummyval" | |
8681 | for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do | |
8682 | if test -d "${bmd}/X11/bitmaps"; then | |
8683 | bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps" | |
8684 | fi | |
8685 | if test -d "${bmd}/bitmaps"; then | |
8686 | bmd_acc="${bmd_acc}:${bmd}/bitmaps" | |
8687 | fi | |
8688 | done | |
8689 | if test ${bmd_acc} != "dummyval"; then | |
8690 | bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"` | |
8691 | fi | |
8692 | fi | |
8693 | ||
8694 | HAVE_NS=no | |
8695 | NS_IMPL_COCOA=no | |
8696 | NS_IMPL_GNUSTEP=no | |
8697 | tmp_CPPFLAGS="$CPPFLAGS" | |
8698 | tmp_CFLAGS="$CFLAGS" | |
8699 | CPPFLAGS="$CPPFLAGS -x objective-c" | |
8700 | CFLAGS="$CFLAGS -x objective-c" | |
8701 | TEMACS_LDFLAGS2="\${LDFLAGS}" | |
8702 | if test "${with_ns}" != no; then | |
8703 | if test "${opsys}" = darwin; then | |
8704 | NS_IMPL_COCOA=yes | |
8705 | ns_appdir=`pwd`/nextstep/Emacs.app | |
8706 | ns_appbindir=${ns_appdir}/Contents/MacOS/ | |
8707 | ns_appresdir=${ns_appdir}/Contents/Resources | |
8708 | ns_appsrc=${srcdir}/nextstep/Cocoa/Emacs.base | |
8709 | elif test -f $GNUSTEP_CONFIG_FILE; then | |
8710 | NS_IMPL_GNUSTEP=yes | |
8711 | ns_appdir=`pwd`/nextstep/Emacs.app | |
8712 | ns_appbindir=${ns_appdir}/ | |
8713 | ns_appresdir=${ns_appdir}/Resources | |
8714 | ns_appsrc=${srcdir}/nextstep/GNUstep/Emacs.base | |
8715 | GNUSTEP_SYSTEM_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_HEADERS)" | |
8716 | GNUSTEP_SYSTEM_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_LIBRARIES)" | |
8717 | GNUSTEP_LOCAL_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_HEADERS)" | |
8718 | GNUSTEP_LOCAL_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_LIBRARIES)" | |
8719 | test "x${GNUSTEP_LOCAL_HEADERS}" != "x" && \ | |
8720 | GNUSTEP_LOCAL_HEADERS="-I${GNUSTEP_LOCAL_HEADERS}" | |
8721 | test "x${GNUSTEP_LOCAL_LIBRARIES}" != "x" && \ | |
8722 | GNUSTEP_LOCAL_LIBRARIES="-L${GNUSTEP_LOCAL_LIBRARIES}" | |
8723 | CPPFLAGS="$CPPFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}" | |
8724 | CFLAGS="$CFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}" | |
8725 | LDFLAGS="$LDFLAGS -L${GNUSTEP_SYSTEM_LIBRARIES} ${GNUSTEP_LOCAL_LIBRARIES}" | |
8726 | LIB_STANDARD= | |
8727 | START_FILES= | |
8728 | TEMACS_LDFLAGS2= | |
8729 | fi | |
8730 | ac_fn_c_check_header_mongrel "$LINENO" "AppKit/AppKit.h" "ac_cv_header_AppKit_AppKit_h" "$ac_includes_default" | |
9ba41eb9 | 8731 | if test "x$ac_cv_header_AppKit_AppKit_h" = x""yes; then : |
067d23c9 KY |
8732 | HAVE_NS=yes |
8733 | else | |
2018939f | 8734 | as_fn_error $? "\`--with-ns' was specified, but the include |
067d23c9 KY |
8735 | files are missing or cannot be compiled." "$LINENO" 5 |
8736 | fi | |
8737 | ||
8738 | ||
8739 | NS_HAVE_NSINTEGER=yes | |
8740 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8741 | /* end confdefs.h. */ | |
8742 | #include <Foundation/NSObjCRuntime.h> | |
8743 | int | |
8744 | main () | |
8745 | { | |
8746 | NSInteger i; | |
8747 | ; | |
8748 | return 0; | |
8749 | } | |
8750 | _ACEOF | |
8751 | if ac_fn_c_try_compile "$LINENO"; then : | |
8752 | ns_have_nsinteger=yes | |
8753 | else | |
8754 | ns_have_nsinteger=no | |
8755 | fi | |
8756 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8757 | if test $ns_have_nsinteger = no; then | |
8758 | NS_HAVE_NSINTEGER=no | |
8759 | fi | |
8760 | fi | |
8761 | ||
8762 | ||
8763 | ns_frag=/dev/null | |
8764 | NS_OBJ= | |
8765 | NS_SUPPORT= | |
8766 | if test "${HAVE_NS}" = yes; then | |
8767 | window_system=nextstep | |
8768 | with_xft=no | |
8769 | # set up packaging dirs | |
8770 | exec_prefix=${ns_appbindir} | |
8771 | libexecdir=${ns_appbindir}/libexec | |
8772 | if test "${EN_NS_SELF_CONTAINED}" = yes; then | |
8773 | prefix=${ns_appresdir} | |
8774 | fi | |
8775 | ns_frag=$srcdir/src/ns.mk | |
8776 | NS_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o fontset.o fringe.o image.o" | |
8777 | NS_SUPPORT="\${lispsource}/emacs-lisp/easymenu.elc \${lispsource}/term/ns-win.elc" | |
8778 | fi | |
8779 | CFLAGS="$tmp_CFLAGS" | |
8780 | CPPFLAGS="$tmp_CPPFLAGS" | |
8781 | ||
8782 | ||
8783 | ||
8784 | ||
8785 | ||
8786 | case "${window_system}" in | |
8787 | x11 ) | |
8788 | HAVE_X_WINDOWS=yes | |
8789 | HAVE_X11=yes | |
8790 | case "${with_x_toolkit}" in | |
8791 | athena | lucid ) USE_X_TOOLKIT=LUCID ;; | |
8792 | motif ) USE_X_TOOLKIT=MOTIF ;; | |
8793 | gtk ) with_gtk=yes | |
8794 | USE_X_TOOLKIT=none ;; | |
8795 | gtk3 ) with_gtk3=yes | |
8796 | USE_X_TOOLKIT=none ;; | |
8797 | no ) USE_X_TOOLKIT=none ;; | |
8798 | * ) USE_X_TOOLKIT=maybe ;; | |
8799 | esac | |
8800 | ;; | |
8801 | nextstep | none ) | |
8802 | HAVE_X_WINDOWS=no | |
8803 | HAVE_X11=no | |
8804 | USE_X_TOOLKIT=none | |
8805 | ;; | |
8806 | esac | |
8807 | ||
8808 | if test "$window_system" = none && test "X$with_x" != "Xno"; then | |
8809 | # Extract the first word of "X", so it can be a program name with args. | |
8810 | set dummy X; ac_word=$2 | |
8811 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
8812 | $as_echo_n "checking for $ac_word... " >&6; } | |
9ba41eb9 | 8813 | if test "${ac_cv_prog_HAVE_XSERVER+set}" = set; then : |
067d23c9 KY |
8814 | $as_echo_n "(cached) " >&6 |
8815 | else | |
8816 | if test -n "$HAVE_XSERVER"; then | |
8817 | ac_cv_prog_HAVE_XSERVER="$HAVE_XSERVER" # Let the user override the test. | |
8818 | else | |
8819 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8820 | for as_dir in $PATH | |
8821 | do | |
8822 | IFS=$as_save_IFS | |
8823 | test -z "$as_dir" && as_dir=. | |
8824 | for ac_exec_ext in '' $ac_executable_extensions; do | |
8825 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
8826 | ac_cv_prog_HAVE_XSERVER="true" | |
8827 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
8828 | break 2 | |
8829 | fi | |
8830 | done | |
8831 | done | |
8832 | IFS=$as_save_IFS | |
8833 | ||
8834 | test -z "$ac_cv_prog_HAVE_XSERVER" && ac_cv_prog_HAVE_XSERVER="false" | |
8835 | fi | |
8836 | fi | |
8837 | HAVE_XSERVER=$ac_cv_prog_HAVE_XSERVER | |
8838 | if test -n "$HAVE_XSERVER"; then | |
8839 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_XSERVER" >&5 | |
8840 | $as_echo "$HAVE_XSERVER" >&6; } | |
8841 | else | |
8842 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
8843 | $as_echo "no" >&6; } | |
8844 | fi | |
8845 | ||
8846 | ||
8847 | if test "$HAVE_XSERVER" = true || | |
8848 | test -n "$DISPLAY" || | |
8849 | test "`echo /usr/lib/libX11.*`" != "/usr/lib/libX11.*"; then | |
2018939f | 8850 | as_fn_error $? "You seem to be running X, but no X development libraries |
067d23c9 KY |
8851 | were found. You should install the relevant development files for X |
8852 | and for the toolkit you want, such as Gtk+, Lesstif or Motif. Also make | |
8853 | sure you have development files for image handling, i.e. | |
8854 | tiff, gif, jpeg, png and xpm. | |
8855 | If you are sure you want Emacs compiled without X window support, pass | |
8856 | --without-x | |
8857 | to configure." "$LINENO" 5 | |
8858 | fi | |
8859 | fi | |
8860 | ||
8861 | ### If we're using X11, we should use the X menu package. | |
8862 | HAVE_MENUS=no | |
8863 | case ${HAVE_X11} in | |
8864 | yes ) HAVE_MENUS=yes ;; | |
8865 | esac | |
8866 | ||
8867 | # Do the opsystem or machine files prohibit the use of the GNU malloc? | |
8868 | # Assume not, until told otherwise. | |
8869 | GNU_MALLOC=yes | |
8870 | doug_lea_malloc=yes | |
8871 | ac_fn_c_check_func "$LINENO" "malloc_get_state" "ac_cv_func_malloc_get_state" | |
9ba41eb9 | 8872 | if test "x$ac_cv_func_malloc_get_state" = x""yes; then : |
067d23c9 KY |
8873 | |
8874 | else | |
8875 | doug_lea_malloc=no | |
8876 | fi | |
8877 | ||
8878 | ac_fn_c_check_func "$LINENO" "malloc_set_state" "ac_cv_func_malloc_set_state" | |
9ba41eb9 | 8879 | if test "x$ac_cv_func_malloc_set_state" = x""yes; then : |
067d23c9 KY |
8880 | |
8881 | else | |
8882 | doug_lea_malloc=no | |
8883 | fi | |
8884 | ||
8885 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __after_morecore_hook exists" >&5 | |
8886 | $as_echo_n "checking whether __after_morecore_hook exists... " >&6; } | |
9ba41eb9 | 8887 | if test "${emacs_cv_var___after_morecore_hook+set}" = set; then : |
067d23c9 KY |
8888 | $as_echo_n "(cached) " >&6 |
8889 | else | |
8890 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8891 | /* end confdefs.h. */ | |
8892 | extern void (* __after_morecore_hook)(); | |
8893 | int | |
8894 | main () | |
8895 | { | |
8896 | __after_morecore_hook = 0 | |
8897 | ; | |
8898 | return 0; | |
8899 | } | |
8900 | _ACEOF | |
8901 | if ac_fn_c_try_link "$LINENO"; then : | |
8902 | emacs_cv_var___after_morecore_hook=yes | |
8903 | else | |
8904 | emacs_cv_var___after_morecore_hook=no | |
8905 | fi | |
8906 | rm -f core conftest.err conftest.$ac_objext \ | |
8907 | conftest$ac_exeext conftest.$ac_ext | |
8908 | fi | |
8909 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_var___after_morecore_hook" >&5 | |
8910 | $as_echo "$emacs_cv_var___after_morecore_hook" >&6; } | |
8911 | if test $emacs_cv_var___after_morecore_hook = no; then | |
8912 | doug_lea_malloc=no | |
8913 | fi | |
8914 | ||
8915 | ||
8916 | system_malloc=no | |
8917 | case "$opsys" in | |
8918 | ## darwin ld insists on the use of malloc routines in the System framework. | |
8919 | darwin|sol2-10) system_malloc=yes ;; | |
8920 | esac | |
8921 | ||
8922 | if test "${system_malloc}" = "yes"; then | |
8923 | ||
8924 | $as_echo "#define SYSTEM_MALLOC 1" >>confdefs.h | |
8925 | ||
8926 | GNU_MALLOC=no | |
8927 | GNU_MALLOC_reason=" | |
8928 | (The GNU allocators don't work with this system configuration.)" | |
8929 | GMALLOC_OBJ= | |
8930 | VMLIMIT_OBJ= | |
8931 | else | |
8932 | test "$doug_lea_malloc" != "yes" && GMALLOC_OBJ=gmalloc.o | |
8933 | VMLIMIT_OBJ=vm-limit.o | |
8934 | fi | |
8935 | ||
8936 | ||
8937 | ||
8938 | if test "$doug_lea_malloc" = "yes" ; then | |
8939 | if test "$GNU_MALLOC" = yes ; then | |
8940 | GNU_MALLOC_reason=" | |
8941 | (Using Doug Lea's new malloc from the GNU C Library.)" | |
8942 | fi | |
8943 | ||
8944 | $as_echo "#define DOUG_LEA_MALLOC 1" >>confdefs.h | |
8945 | ||
8946 | ||
8947 | ## Use mmap directly for allocating larger buffers. | |
8948 | ## FIXME this comes from src/s/{gnu,gnu-linux}.h: | |
8949 | ## #ifdef DOUG_LEA_MALLOC; #undef REL_ALLOC; #endif | |
8950 | ## Does the AC_FUNC_MMAP test below make this check unecessary? | |
8951 | case "$opsys" in | |
8952 | gnu*) REL_ALLOC=no ;; | |
8953 | esac | |
8954 | fi | |
8955 | ||
8956 | if test x"${REL_ALLOC}" = x; then | |
8957 | REL_ALLOC=${GNU_MALLOC} | |
8958 | fi | |
8959 | ||
8960 | use_mmap_for_buffers=no | |
8961 | case "$opsys" in | |
8962 | freebsd|irix6-5) use_mmap_for_buffers=yes ;; | |
8963 | esac | |
8964 | ||
8965 | ||
8966 | ||
8967 | ||
8968 | for ac_header in $ac_header_list | |
8969 | do : | |
8970 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
8971 | ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default | |
8972 | " | |
2018939f | 8973 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : |
067d23c9 KY |
8974 | cat >>confdefs.h <<_ACEOF |
8975 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
8976 | _ACEOF | |
8977 | ||
8978 | fi | |
8979 | ||
8980 | done | |
8981 | ||
8982 | ||
8983 | ||
8984 | ||
8985 | ||
8986 | ||
8987 | ||
8988 | ||
8989 | for ac_func in getpagesize | |
8990 | do : | |
8991 | ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" | |
9ba41eb9 | 8992 | if test "x$ac_cv_func_getpagesize" = x""yes; then : |
067d23c9 KY |
8993 | cat >>confdefs.h <<_ACEOF |
8994 | #define HAVE_GETPAGESIZE 1 | |
8995 | _ACEOF | |
8996 | ||
8997 | fi | |
8998 | done | |
8999 | ||
9000 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 | |
9001 | $as_echo_n "checking for working mmap... " >&6; } | |
9ba41eb9 | 9002 | if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then : |
067d23c9 KY |
9003 | $as_echo_n "(cached) " >&6 |
9004 | else | |
9005 | if test "$cross_compiling" = yes; then : | |
9006 | ac_cv_func_mmap_fixed_mapped=no | |
9007 | else | |
9008 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9009 | /* end confdefs.h. */ | |
9010 | $ac_includes_default | |
9011 | /* malloc might have been renamed as rpl_malloc. */ | |
9012 | #undef malloc | |
9013 | ||
9014 | /* Thanks to Mike Haertel and Jim Avera for this test. | |
9015 | Here is a matrix of mmap possibilities: | |
9016 | mmap private not fixed | |
9017 | mmap private fixed at somewhere currently unmapped | |
9018 | mmap private fixed at somewhere already mapped | |
9019 | mmap shared not fixed | |
9020 | mmap shared fixed at somewhere currently unmapped | |
9021 | mmap shared fixed at somewhere already mapped | |
9022 | For private mappings, we should verify that changes cannot be read() | |
9023 | back from the file, nor mmap's back from the file at a different | |
9024 | address. (There have been systems where private was not correctly | |
9025 | implemented like the infamous i386 svr4.0, and systems where the | |
9026 | VM page cache was not coherent with the file system buffer cache | |
9027 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
9028 | For shared mappings, we should conversely verify that changes get | |
9029 | propagated back to all the places they're supposed to be. | |
9030 | ||
9031 | Grep wants private fixed already mapped. | |
9032 | The main things grep needs to know about mmap are: | |
9033 | * does it exist and is it safe to write into the mmap'd area | |
9034 | * how to use it (BSD variants) */ | |
9035 | ||
9036 | #include <fcntl.h> | |
9037 | #include <sys/mman.h> | |
9038 | ||
9039 | #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H | |
9040 | char *malloc (); | |
9041 | #endif | |
9042 | ||
9043 | /* This mess was copied from the GNU getpagesize.h. */ | |
9044 | #ifndef HAVE_GETPAGESIZE | |
9045 | # ifdef _SC_PAGESIZE | |
9046 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
9047 | # else /* no _SC_PAGESIZE */ | |
9048 | # ifdef HAVE_SYS_PARAM_H | |
9049 | # include <sys/param.h> | |
9050 | # ifdef EXEC_PAGESIZE | |
9051 | # define getpagesize() EXEC_PAGESIZE | |
9052 | # else /* no EXEC_PAGESIZE */ | |
9053 | # ifdef NBPG | |
9054 | # define getpagesize() NBPG * CLSIZE | |
9055 | # ifndef CLSIZE | |
9056 | # define CLSIZE 1 | |
9057 | # endif /* no CLSIZE */ | |
9058 | # else /* no NBPG */ | |
9059 | # ifdef NBPC | |
9060 | # define getpagesize() NBPC | |
9061 | # else /* no NBPC */ | |
9062 | # ifdef PAGESIZE | |
9063 | # define getpagesize() PAGESIZE | |
9064 | # endif /* PAGESIZE */ | |
9065 | # endif /* no NBPC */ | |
9066 | # endif /* no NBPG */ | |
9067 | # endif /* no EXEC_PAGESIZE */ | |
9068 | # else /* no HAVE_SYS_PARAM_H */ | |
9069 | # define getpagesize() 8192 /* punt totally */ | |
9070 | # endif /* no HAVE_SYS_PARAM_H */ | |
9071 | # endif /* no _SC_PAGESIZE */ | |
9072 | ||
9073 | #endif /* no HAVE_GETPAGESIZE */ | |
9074 | ||
9075 | int | |
9076 | main () | |
9077 | { | |
9078 | char *data, *data2, *data3; | |
2018939f | 9079 | const char *cdata2; |
067d23c9 KY |
9080 | int i, pagesize; |
9081 | int fd, fd2; | |
9082 | ||
9083 | pagesize = getpagesize (); | |
9084 | ||
9085 | /* First, make a file with some known garbage in it. */ | |
9086 | data = (char *) malloc (pagesize); | |
9087 | if (!data) | |
9088 | return 1; | |
9089 | for (i = 0; i < pagesize; ++i) | |
9090 | *(data + i) = rand (); | |
9091 | umask (0); | |
9092 | fd = creat ("conftest.mmap", 0600); | |
9093 | if (fd < 0) | |
9094 | return 2; | |
9095 | if (write (fd, data, pagesize) != pagesize) | |
9096 | return 3; | |
9097 | close (fd); | |
9098 | ||
9099 | /* Next, check that the tail of a page is zero-filled. File must have | |
9100 | non-zero length, otherwise we risk SIGBUS for entire page. */ | |
9101 | fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600); | |
9102 | if (fd2 < 0) | |
9103 | return 4; | |
2018939f AS |
9104 | cdata2 = ""; |
9105 | if (write (fd2, cdata2, 1) != 1) | |
067d23c9 | 9106 | return 5; |
2018939f | 9107 | data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L); |
067d23c9 KY |
9108 | if (data2 == MAP_FAILED) |
9109 | return 6; | |
9110 | for (i = 0; i < pagesize; ++i) | |
9111 | if (*(data2 + i)) | |
9112 | return 7; | |
9113 | close (fd2); | |
9114 | if (munmap (data2, pagesize)) | |
9115 | return 8; | |
9116 | ||
9117 | /* Next, try to mmap the file at a fixed address which already has | |
9118 | something else allocated at it. If we can, also make sure that | |
9119 | we see the same garbage. */ | |
9120 | fd = open ("conftest.mmap", O_RDWR); | |
9121 | if (fd < 0) | |
9122 | return 9; | |
9123 | if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, | |
9124 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
9125 | return 10; | |
9126 | for (i = 0; i < pagesize; ++i) | |
9127 | if (*(data + i) != *(data2 + i)) | |
9128 | return 11; | |
9129 | ||
9130 | /* Finally, make sure that changes to the mapped area do not | |
9131 | percolate back to the file as seen by read(). (This is a bug on | |
9132 | some variants of i386 svr4.0.) */ | |
9133 | for (i = 0; i < pagesize; ++i) | |
9134 | *(data2 + i) = *(data2 + i) + 1; | |
9135 | data3 = (char *) malloc (pagesize); | |
9136 | if (!data3) | |
9137 | return 12; | |
9138 | if (read (fd, data3, pagesize) != pagesize) | |
9139 | return 13; | |
9140 | for (i = 0; i < pagesize; ++i) | |
9141 | if (*(data + i) != *(data3 + i)) | |
9142 | return 14; | |
9143 | close (fd); | |
9144 | return 0; | |
9145 | } | |
9146 | _ACEOF | |
9147 | if ac_fn_c_try_run "$LINENO"; then : | |
9148 | ac_cv_func_mmap_fixed_mapped=yes | |
9149 | else | |
9150 | ac_cv_func_mmap_fixed_mapped=no | |
9151 | fi | |
9152 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
9153 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
9154 | fi | |
9155 | ||
9156 | fi | |
9157 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5 | |
9158 | $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; } | |
9159 | if test $ac_cv_func_mmap_fixed_mapped = yes; then | |
9160 | ||
9161 | $as_echo "#define HAVE_MMAP 1" >>confdefs.h | |
9162 | ||
9163 | fi | |
9164 | rm -f conftest.mmap conftest.txt | |
9165 | ||
9166 | if test $use_mmap_for_buffers = yes; then | |
9167 | ||
9168 | $as_echo "#define USE_MMAP_FOR_BUFFERS 1" >>confdefs.h | |
9169 | ||
9170 | REL_ALLOC=no | |
9171 | fi | |
9172 | ||
9173 | LIBS="$LIBS_SYSTEM $LIBS" | |
9174 | ||
9175 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5 | |
9176 | $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; } | |
9ba41eb9 | 9177 | if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then : |
067d23c9 KY |
9178 | $as_echo_n "(cached) " >&6 |
9179 | else | |
9180 | ac_check_lib_save_LIBS=$LIBS | |
9181 | LIBS="-ldnet $LIBS" | |
9182 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9183 | /* end confdefs.h. */ | |
9184 | ||
9185 | /* Override any GCC internal prototype to avoid an error. | |
9186 | Use char because int might match the return type of a GCC | |
9187 | builtin and then its argument prototype would still apply. */ | |
9188 | #ifdef __cplusplus | |
9189 | extern "C" | |
9190 | #endif | |
9191 | char dnet_ntoa (); | |
9192 | int | |
9193 | main () | |
9194 | { | |
9195 | return dnet_ntoa (); | |
9196 | ; | |
9197 | return 0; | |
9198 | } | |
9199 | _ACEOF | |
9200 | if ac_fn_c_try_link "$LINENO"; then : | |
9201 | ac_cv_lib_dnet_dnet_ntoa=yes | |
9202 | else | |
9203 | ac_cv_lib_dnet_dnet_ntoa=no | |
9204 | fi | |
9205 | rm -f core conftest.err conftest.$ac_objext \ | |
9206 | conftest$ac_exeext conftest.$ac_ext | |
9207 | LIBS=$ac_check_lib_save_LIBS | |
9208 | fi | |
9209 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 | |
9210 | $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; } | |
9ba41eb9 | 9211 | if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then : |
067d23c9 KY |
9212 | cat >>confdefs.h <<_ACEOF |
9213 | #define HAVE_LIBDNET 1 | |
9214 | _ACEOF | |
9215 | ||
9216 | LIBS="-ldnet $LIBS" | |
9217 | ||
9218 | fi | |
9219 | ||
9220 | ||
9221 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lXbsd" >&5 | |
9222 | $as_echo_n "checking for main in -lXbsd... " >&6; } | |
9ba41eb9 | 9223 | if test "${ac_cv_lib_Xbsd_main+set}" = set; then : |
067d23c9 KY |
9224 | $as_echo_n "(cached) " >&6 |
9225 | else | |
9226 | ac_check_lib_save_LIBS=$LIBS | |
9227 | LIBS="-lXbsd $LIBS" | |
9228 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9229 | /* end confdefs.h. */ | |
9230 | ||
9231 | ||
9232 | int | |
9233 | main () | |
9234 | { | |
9235 | return main (); | |
9236 | ; | |
9237 | return 0; | |
9238 | } | |
9239 | _ACEOF | |
9240 | if ac_fn_c_try_link "$LINENO"; then : | |
9241 | ac_cv_lib_Xbsd_main=yes | |
9242 | else | |
9243 | ac_cv_lib_Xbsd_main=no | |
9244 | fi | |
9245 | rm -f core conftest.err conftest.$ac_objext \ | |
9246 | conftest$ac_exeext conftest.$ac_ext | |
9247 | LIBS=$ac_check_lib_save_LIBS | |
9248 | fi | |
9249 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xbsd_main" >&5 | |
9250 | $as_echo "$ac_cv_lib_Xbsd_main" >&6; } | |
9ba41eb9 | 9251 | if test "x$ac_cv_lib_Xbsd_main" = x""yes; then : |
067d23c9 KY |
9252 | LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd" |
9253 | fi | |
9254 | ||
9255 | ||
9256 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cma_open in -lpthreads" >&5 | |
9257 | $as_echo_n "checking for cma_open in -lpthreads... " >&6; } | |
9ba41eb9 | 9258 | if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then : |
067d23c9 KY |
9259 | $as_echo_n "(cached) " >&6 |
9260 | else | |
9261 | ac_check_lib_save_LIBS=$LIBS | |
9262 | LIBS="-lpthreads $LIBS" | |
9263 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9264 | /* end confdefs.h. */ | |
9265 | ||
9266 | /* Override any GCC internal prototype to avoid an error. | |
9267 | Use char because int might match the return type of a GCC | |
9268 | builtin and then its argument prototype would still apply. */ | |
9269 | #ifdef __cplusplus | |
9270 | extern "C" | |
9271 | #endif | |
9272 | char cma_open (); | |
9273 | int | |
9274 | main () | |
9275 | { | |
9276 | return cma_open (); | |
9277 | ; | |
9278 | return 0; | |
9279 | } | |
9280 | _ACEOF | |
9281 | if ac_fn_c_try_link "$LINENO"; then : | |
9282 | ac_cv_lib_pthreads_cma_open=yes | |
9283 | else | |
9284 | ac_cv_lib_pthreads_cma_open=no | |
9285 | fi | |
9286 | rm -f core conftest.err conftest.$ac_objext \ | |
9287 | conftest$ac_exeext conftest.$ac_ext | |
9288 | LIBS=$ac_check_lib_save_LIBS | |
9289 | fi | |
9290 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_cma_open" >&5 | |
9291 | $as_echo "$ac_cv_lib_pthreads_cma_open" >&6; } | |
9ba41eb9 | 9292 | if test "x$ac_cv_lib_pthreads_cma_open" = x""yes; then : |
067d23c9 KY |
9293 | cat >>confdefs.h <<_ACEOF |
9294 | #define HAVE_LIBPTHREADS 1 | |
9295 | _ACEOF | |
9296 | ||
9297 | LIBS="-lpthreads $LIBS" | |
9298 | ||
9299 | fi | |
9300 | ||
9301 | ||
9302 | ## Note: when using cpp in s/aix4.2.h, this definition depended on | |
9303 | ## HAVE_LIBPTHREADS. That was not defined earlier in configure when | |
9304 | ## the system file was sourced. Hence the value of LIBS_SYSTEM | |
9305 | ## added to LIBS in configure would never contain the pthreads part, | |
9306 | ## but the value used in Makefiles might. FIXME? | |
9307 | ## | |
9308 | ## -lpthreads seems to be necessary for Xlib in X11R6, and should | |
9309 | ## be harmless on older versions of X where it happens to exist. | |
9310 | test "$opsys" = "aix4-2" && \ | |
9311 | test $ac_cv_lib_pthreads_cma_open = yes && \ | |
9312 | LIBS_SYSTEM="$LIBS_SYSTEM -lpthreads" | |
9313 | ||
9314 | ||
9315 | case ${host_os} in | |
9316 | aix*) | |
9317 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5 | |
9318 | $as_echo_n "checking for -bbigtoc option... " >&6; } | |
9ba41eb9 | 9319 | if test "${gdb_cv_bigtoc+set}" = set; then : |
067d23c9 KY |
9320 | $as_echo_n "(cached) " >&6 |
9321 | else | |
9322 | ||
9323 | case $GCC in | |
9324 | yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;; | |
9325 | *) gdb_cv_bigtoc=-bbigtoc ;; | |
9326 | esac | |
9327 | ||
9328 | LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc | |
9329 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9330 | /* end confdefs.h. */ | |
9331 | ||
9332 | int | |
9333 | main () | |
9334 | { | |
9335 | int i; | |
9336 | ; | |
9337 | return 0; | |
9338 | } | |
9339 | _ACEOF | |
9340 | if ac_fn_c_try_link "$LINENO"; then : | |
9341 | ||
9342 | else | |
9343 | gdb_cv_bigtoc= | |
9344 | fi | |
9345 | rm -f core conftest.err conftest.$ac_objext \ | |
9346 | conftest$ac_exeext conftest.$ac_ext | |
9347 | ||
9348 | fi | |
9349 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5 | |
9350 | $as_echo "$gdb_cv_bigtoc" >&6; } | |
9351 | ;; | |
9352 | esac | |
9353 | ||
9354 | # Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets | |
9355 | # used for the tests that follow. We set them back to REAL_CFLAGS and | |
9356 | # REAL_CPPFLAGS later on. | |
9357 | ||
9358 | REAL_CFLAGS="$CFLAGS" | |
9359 | REAL_CPPFLAGS="$CPPFLAGS" | |
9360 | ||
9361 | if test "${HAVE_X11}" = "yes"; then | |
9362 | DEFS="$C_SWITCH_X_SITE $DEFS" | |
9363 | LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE" | |
9364 | LIBS="-lX11 $LIBS" | |
9365 | CFLAGS="$C_SWITCH_X_SITE $CFLAGS" | |
9366 | CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS" | |
9367 | ||
9368 | # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests. | |
9369 | # This is handled by LD_SWITCH_X_SITE_AUX during the real build, | |
9370 | # but it's more convenient here to set LD_RUN_PATH | |
9371 | # since this also works on hosts that don't understand LD_SWITCH_X_SITE_AUX. | |
9372 | if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then | |
9373 | LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH | |
9374 | export LD_RUN_PATH | |
9375 | fi | |
9376 | ||
9377 | if test "${opsys}" = "gnu-linux"; then | |
9378 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether X on GNU/Linux needs -b to link" >&5 | |
9379 | $as_echo_n "checking whether X on GNU/Linux needs -b to link... " >&6; } | |
9380 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9381 | /* end confdefs.h. */ | |
9382 | ||
9383 | int | |
9384 | main () | |
9385 | { | |
9386 | XOpenDisplay ("foo"); | |
9387 | ; | |
9388 | return 0; | |
9389 | } | |
9390 | _ACEOF | |
9391 | if ac_fn_c_try_link "$LINENO"; then : | |
9392 | xlinux_first_failure=no | |
9393 | else | |
9394 | xlinux_first_failure=yes | |
9395 | fi | |
9396 | rm -f core conftest.err conftest.$ac_objext \ | |
9397 | conftest$ac_exeext conftest.$ac_ext | |
9398 | if test "${xlinux_first_failure}" = "yes"; then | |
9399 | OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE" | |
9400 | OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE" | |
9401 | OLD_CPPFLAGS="$CPPFLAGS" | |
9402 | OLD_LIBS="$LIBS" | |
9403 | LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout" | |
9404 | C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout" | |
9405 | CPPFLAGS="$CPPFLAGS -b i486-linuxaout" | |
9406 | LIBS="$LIBS -b i486-linuxaout" | |
9407 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9408 | /* end confdefs.h. */ | |
9409 | ||
9410 | int | |
9411 | main () | |
9412 | { | |
9413 | XOpenDisplay ("foo"); | |
9414 | ; | |
9415 | return 0; | |
9416 | } | |
9417 | _ACEOF | |
9418 | if ac_fn_c_try_link "$LINENO"; then : | |
9419 | xlinux_second_failure=no | |
9420 | else | |
9421 | xlinux_second_failure=yes | |
9422 | fi | |
9423 | rm -f core conftest.err conftest.$ac_objext \ | |
9424 | conftest$ac_exeext conftest.$ac_ext | |
9425 | if test "${xlinux_second_failure}" = "yes"; then | |
9426 | # If we get the same failure with -b, there is no use adding -b. | |
9427 | # So take it out. This plays safe. | |
9428 | LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE" | |
9429 | C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE" | |
9430 | CPPFLAGS="$OLD_CPPFLAGS" | |
9431 | LIBS="$OLD_LIBS" | |
9432 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
9433 | $as_echo "no" >&6; } | |
9434 | else | |
9435 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
9436 | $as_echo "yes" >&6; } | |
9437 | fi | |
9438 | else | |
9439 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
9440 | $as_echo "no" >&6; } | |
9441 | fi | |
9442 | fi | |
9443 | ||
9444 | # Reportedly, some broken Solaris systems have XKBlib.h but are missing | |
9445 | # header files included from there. | |
9446 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Xkb" >&5 | |
9447 | $as_echo_n "checking for Xkb... " >&6; } | |
9448 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9449 | /* end confdefs.h. */ | |
9450 | #include <X11/Xlib.h> | |
9451 | #include <X11/XKBlib.h> | |
9452 | int | |
9453 | main () | |
9454 | { | |
9455 | XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd); | |
9456 | ; | |
9457 | return 0; | |
9458 | } | |
9459 | _ACEOF | |
9460 | if ac_fn_c_try_link "$LINENO"; then : | |
9461 | emacs_xkb=yes | |
9462 | else | |
9463 | emacs_xkb=no | |
9464 | fi | |
9465 | rm -f core conftest.err conftest.$ac_objext \ | |
9466 | conftest$ac_exeext conftest.$ac_ext | |
9467 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_xkb" >&5 | |
9468 | $as_echo "$emacs_xkb" >&6; } | |
9469 | if test $emacs_xkb = yes; then | |
9470 | ||
9471 | $as_echo "#define HAVE_XKBGETKEYBOARD 1" >>confdefs.h | |
9472 | ||
9473 | fi | |
9474 | ||
9475 | for ac_func in XrmSetDatabase XScreenResourceString \ | |
9476 | XScreenNumberOfScreen XSetWMProtocols | |
9477 | do : | |
9478 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
9479 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
2018939f | 9480 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : |
067d23c9 KY |
9481 | cat >>confdefs.h <<_ACEOF |
9482 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
9483 | _ACEOF | |
9484 | ||
9485 | fi | |
9486 | done | |
9487 | ||
9488 | fi | |
9489 | ||
9490 | if test "${window_system}" = "x11"; then | |
9491 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 version 6" >&5 | |
9492 | $as_echo_n "checking X11 version 6... " >&6; } | |
9ba41eb9 | 9493 | if test "${emacs_cv_x11_version_6+set}" = set; then : |
067d23c9 KY |
9494 | $as_echo_n "(cached) " >&6 |
9495 | else | |
9496 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9497 | /* end confdefs.h. */ | |
9498 | #include <X11/Xlib.h> | |
9499 | int | |
9500 | main () | |
9501 | { | |
9502 | #if XlibSpecificationRelease < 6 | |
9503 | fail; | |
9504 | #endif | |
9505 | ||
9506 | ; | |
9507 | return 0; | |
9508 | } | |
9509 | _ACEOF | |
9510 | if ac_fn_c_try_link "$LINENO"; then : | |
9511 | emacs_cv_x11_version_6=yes | |
9512 | else | |
9513 | emacs_cv_x11_version_6=no | |
9514 | fi | |
9515 | rm -f core conftest.err conftest.$ac_objext \ | |
9516 | conftest$ac_exeext conftest.$ac_ext | |
9517 | fi | |
9518 | ||
9519 | if test $emacs_cv_x11_version_6 = yes; then | |
9520 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5 | |
9521 | $as_echo "6 or newer" >&6; } | |
9522 | ||
9523 | $as_echo "#define HAVE_X11R6 1" >>confdefs.h | |
9524 | ||
9525 | ||
9526 | $as_echo "#define HAVE_X_I18N 1" >>confdefs.h | |
9527 | ||
9528 | ## inoue@ainet.or.jp says Solaris has a bug related to X11R6-style | |
9529 | ## XIM support. | |
9530 | case "$opsys" in | |
9531 | sol2-*) : ;; | |
9532 | *) | |
9533 | $as_echo "#define HAVE_X11R6_XIM 1" >>confdefs.h | |
9534 | ||
9535 | ;; | |
9536 | esac | |
9537 | else | |
9538 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5 | |
9539 | $as_echo "before 6" >&6; } | |
9540 | fi | |
9541 | fi | |
9542 | ||
9543 | ||
9544 | ### Use -lrsvg-2 if available, unless `--with-rsvg=no' is specified. | |
9545 | HAVE_RSVG=no | |
9546 | if test "${HAVE_X11}" = "yes" || test "${NS_IMPL_GNUSTEP}" = "yes"; then | |
9547 | if test "${with_rsvg}" != "no"; then | |
9548 | RSVG_REQUIRED=2.11.0 | |
9549 | RSVG_MODULE="librsvg-2.0 >= $RSVG_REQUIRED" | |
9550 | ||
9551 | ||
9552 | succeeded=no | |
9553 | ||
9554 | # Extract the first word of "pkg-config", so it can be a program name with args. | |
9555 | set dummy pkg-config; ac_word=$2 | |
9556 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
9557 | $as_echo_n "checking for $ac_word... " >&6; } | |
9ba41eb9 | 9558 | if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : |
067d23c9 KY |
9559 | $as_echo_n "(cached) " >&6 |
9560 | else | |
9561 | case $PKG_CONFIG in | |
9562 | [\\/]* | ?:[\\/]*) | |
9563 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
9564 | ;; | |
9565 | *) | |
9566 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
9567 | for as_dir in $PATH | |
9568 | do | |
9569 | IFS=$as_save_IFS | |
9570 | test -z "$as_dir" && as_dir=. | |
9571 | for ac_exec_ext in '' $ac_executable_extensions; do | |
9572 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
9573 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
9574 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
9575 | break 2 | |
9576 | fi | |
9577 | done | |
9578 | done | |
9579 | IFS=$as_save_IFS | |
9580 | ||
9581 | test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" | |
9582 | ;; | |
9583 | esac | |
9584 | fi | |
9585 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG | |
9586 | if test -n "$PKG_CONFIG"; then | |
9587 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
9588 | $as_echo "$PKG_CONFIG" >&6; } | |
9589 | else | |
9590 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
9591 | $as_echo "no" >&6; } | |
9592 | fi | |
9593 | ||
9594 | ||
9595 | ||
9596 | if test "$PKG_CONFIG" = "no" ; then | |
9597 | : | |
9598 | else | |
9599 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
9600 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
9601 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $RSVG_MODULE" >&5 | |
9602 | $as_echo_n "checking for $RSVG_MODULE... " >&6; } | |
9603 | ||
9604 | if $PKG_CONFIG --exists "$RSVG_MODULE" 2>&5; then | |
9605 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
9606 | $as_echo "yes" >&6; } | |
9607 | succeeded=yes | |
9608 | ||
9609 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking RSVG_CFLAGS" >&5 | |
9610 | $as_echo_n "checking RSVG_CFLAGS... " >&6; } | |
9611 | RSVG_CFLAGS=`$PKG_CONFIG --cflags "$RSVG_MODULE"|sed -e 's,///*,/,g'` | |
9612 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RSVG_CFLAGS" >&5 | |
9613 | $as_echo "$RSVG_CFLAGS" >&6; } | |
9614 | ||
9615 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking RSVG_LIBS" >&5 | |
9616 | $as_echo_n "checking RSVG_LIBS... " >&6; } | |
9617 | RSVG_LIBS=`$PKG_CONFIG --libs "$RSVG_MODULE"|sed -e 's,///*,/,g'` | |
9618 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RSVG_LIBS" >&5 | |
9619 | $as_echo "$RSVG_LIBS" >&6; } | |
9620 | else | |
9621 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
9622 | $as_echo "no" >&6; } | |
9623 | RSVG_CFLAGS="" | |
9624 | RSVG_LIBS="" | |
9625 | ## If we have a custom action on failure, don't print errors, but | |
9626 | ## do set a variable so people can do so. | |
9627 | RSVG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$RSVG_MODULE"` | |
9628 | ||
9629 | fi | |
9630 | ||
9631 | ||
9632 | ||
9633 | else | |
9634 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
9635 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
9636 | fi | |
9637 | fi | |
9638 | ||
9639 | if test $succeeded = yes; then | |
9640 | HAVE_RSVG=yes | |
9641 | else | |
9642 | : | |
9643 | fi | |
9644 | ||
9645 | ||
9646 | ||
9647 | ||
9648 | if test $HAVE_RSVG = yes; then | |
9649 | ||
9650 | $as_echo "#define HAVE_RSVG 1" >>confdefs.h | |
9651 | ||
9652 | CFLAGS="$CFLAGS $RSVG_CFLAGS" | |
9653 | LIBS="$RSVG_LIBS $LIBS" | |
9654 | fi | |
9655 | fi | |
9656 | fi | |
9657 | ||
9658 | HAVE_IMAGEMAGICK=no | |
9659 | if test "${HAVE_X11}" = "yes"; then | |
9660 | if test "${with_imagemagick}" != "no"; then | |
9661 | IMAGEMAGICK_MODULE="Wand" | |
9662 | ||
9663 | succeeded=no | |
9664 | ||
9665 | # Extract the first word of "pkg-config", so it can be a program name with args. | |
9666 | set dummy pkg-config; ac_word=$2 | |
9667 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
9668 | $as_echo_n "checking for $ac_word... " >&6; } | |
9ba41eb9 | 9669 | if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : |
067d23c9 KY |
9670 | $as_echo_n "(cached) " >&6 |
9671 | else | |
9672 | case $PKG_CONFIG in | |
9673 | [\\/]* | ?:[\\/]*) | |
9674 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
9675 | ;; | |
9676 | *) | |
9677 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
9678 | for as_dir in $PATH | |
9679 | do | |
9680 | IFS=$as_save_IFS | |
9681 | test -z "$as_dir" && as_dir=. | |
9682 | for ac_exec_ext in '' $ac_executable_extensions; do | |
9683 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
9684 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
9685 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
9686 | break 2 | |
9687 | fi | |
9688 | done | |
9689 | done | |
9690 | IFS=$as_save_IFS | |
9691 | ||
9692 | test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" | |
9693 | ;; | |
9694 | esac | |
9695 | fi | |
9696 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG | |
9697 | if test -n "$PKG_CONFIG"; then | |
9698 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
9699 | $as_echo "$PKG_CONFIG" >&6; } | |
9700 | else | |
9701 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
9702 | $as_echo "no" >&6; } | |
9703 | fi | |
9704 | ||
9705 | ||
9706 | ||
9707 | if test "$PKG_CONFIG" = "no" ; then | |
9708 | : | |
9709 | else | |
9710 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
9711 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
9712 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $IMAGEMAGICK_MODULE" >&5 | |
9713 | $as_echo_n "checking for $IMAGEMAGICK_MODULE... " >&6; } | |
9714 | ||
9715 | if $PKG_CONFIG --exists "$IMAGEMAGICK_MODULE" 2>&5; then | |
9716 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
9717 | $as_echo "yes" >&6; } | |
9718 | succeeded=yes | |
9719 | ||
9720 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking IMAGEMAGICK_CFLAGS" >&5 | |
9721 | $as_echo_n "checking IMAGEMAGICK_CFLAGS... " >&6; } | |
9722 | IMAGEMAGICK_CFLAGS=`$PKG_CONFIG --cflags "$IMAGEMAGICK_MODULE"|sed -e 's,///*,/,g'` | |
9723 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $IMAGEMAGICK_CFLAGS" >&5 | |
9724 | $as_echo "$IMAGEMAGICK_CFLAGS" >&6; } | |
9725 | ||
9726 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking IMAGEMAGICK_LIBS" >&5 | |
9727 | $as_echo_n "checking IMAGEMAGICK_LIBS... " >&6; } | |
9728 | IMAGEMAGICK_LIBS=`$PKG_CONFIG --libs "$IMAGEMAGICK_MODULE"|sed -e 's,///*,/,g'` | |
9729 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $IMAGEMAGICK_LIBS" >&5 | |
9730 | $as_echo "$IMAGEMAGICK_LIBS" >&6; } | |
9731 | else | |
9732 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
9733 | $as_echo "no" >&6; } | |
9734 | IMAGEMAGICK_CFLAGS="" | |
9735 | IMAGEMAGICK_LIBS="" | |
9736 | ## If we have a custom action on failure, don't print errors, but | |
9737 | ## do set a variable so people can do so. | |
9738 | IMAGEMAGICK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$IMAGEMAGICK_MODULE"` | |
9739 | ||
9740 | fi | |
9741 | ||
9742 | ||
9743 | ||
9744 | else | |
9745 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
9746 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
9747 | fi | |
9748 | fi | |
9749 | ||
9750 | if test $succeeded = yes; then | |
9751 | HAVE_IMAGEMAGICK=yes | |
9752 | else | |
9753 | : | |
9754 | fi | |
9755 | ||
9756 | ||
9757 | ||
9758 | ||
9759 | if test $HAVE_IMAGEMAGICK = yes; then | |
9760 | ||
9761 | $as_echo "#define HAVE_IMAGEMAGICK 1" >>confdefs.h | |
9762 | ||
9763 | CFLAGS="$CFLAGS $IMAGEMAGICK_CFLAGS" | |
9764 | LIBS="$IMAGEMAGICK_LIBS $LIBS" | |
9765 | for ac_func in MagickExportImagePixels | |
9766 | do : | |
9767 | ac_fn_c_check_func "$LINENO" "MagickExportImagePixels" "ac_cv_func_MagickExportImagePixels" | |
9ba41eb9 | 9768 | if test "x$ac_cv_func_MagickExportImagePixels" = x""yes; then : |
067d23c9 KY |
9769 | cat >>confdefs.h <<_ACEOF |
9770 | #define HAVE_MAGICKEXPORTIMAGEPIXELS 1 | |
9771 | _ACEOF | |
9772 | ||
9773 | fi | |
9774 | done | |
9775 | ||
9776 | fi | |
9777 | fi | |
9778 | fi | |
9779 | ||
9780 | ||
9781 | HAVE_GTK=no | |
9782 | if test "${with_gtk3}" = "yes"; then | |
9783 | GLIB_REQUIRED=2.6 | |
9784 | GTK_REQUIRED=2.90 | |
9785 | GTK_MODULES="gtk+-3.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED" | |
9786 | ||
9787 | ||
9788 | succeeded=no | |
9789 | ||
9790 | # Extract the first word of "pkg-config", so it can be a program name with args. | |
9791 | set dummy pkg-config; ac_word=$2 | |
9792 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
9793 | $as_echo_n "checking for $ac_word... " >&6; } | |
9ba41eb9 | 9794 | if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : |
067d23c9 KY |
9795 | $as_echo_n "(cached) " >&6 |
9796 | else | |
9797 | case $PKG_CONFIG in | |
9798 | [\\/]* | ?:[\\/]*) | |
9799 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
9800 | ;; | |
9801 | *) | |
9802 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
9803 | for as_dir in $PATH | |
9804 | do | |
9805 | IFS=$as_save_IFS | |
9806 | test -z "$as_dir" && as_dir=. | |
9807 | for ac_exec_ext in '' $ac_executable_extensions; do | |
9808 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
9809 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
9810 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
9811 | break 2 | |
9812 | fi | |
9813 | done | |
9814 | done | |
9815 | IFS=$as_save_IFS | |
9816 | ||
9817 | test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" | |
9818 | ;; | |
9819 | esac | |
9820 | fi | |
9821 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG | |
9822 | if test -n "$PKG_CONFIG"; then | |
9823 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
9824 | $as_echo "$PKG_CONFIG" >&6; } | |
9825 | else | |
9826 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
9827 | $as_echo "no" >&6; } | |
9828 | fi | |
9829 | ||
9830 | ||
9831 | ||
9832 | if test "$PKG_CONFIG" = "no" ; then | |
9833 | pkg_check_gtk=no | |
9834 | else | |
9835 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
9836 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
9837 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTK_MODULES" >&5 | |
9838 | $as_echo_n "checking for $GTK_MODULES... " >&6; } | |
9839 | ||
9840 | if $PKG_CONFIG --exists "$GTK_MODULES" 2>&5; then | |
9841 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
9842 | $as_echo "yes" >&6; } | |
9843 | succeeded=yes | |
9844 | ||
9845 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking GTK_CFLAGS" >&5 | |
9846 | $as_echo_n "checking GTK_CFLAGS... " >&6; } | |
9847 | GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES"|sed -e 's,///*,/,g'` | |
9848 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_CFLAGS" >&5 | |
9849 | $as_echo "$GTK_CFLAGS" >&6; } | |
9850 | ||
9851 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking GTK_LIBS" >&5 | |
9852 | $as_echo_n "checking GTK_LIBS... " >&6; } | |
9853 | GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES"|sed -e 's,///*,/,g'` | |
9854 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_LIBS" >&5 | |
9855 | $as_echo "$GTK_LIBS" >&6; } | |
9856 | else | |
9857 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
9858 | $as_echo "no" >&6; } | |
9859 | GTK_CFLAGS="" | |
9860 | GTK_LIBS="" | |
9861 | ## If we have a custom action on failure, don't print errors, but | |
9862 | ## do set a variable so people can do so. | |
9863 | GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"` | |
9864 | ||
9865 | fi | |
9866 | ||
9867 | ||
9868 | ||
9869 | else | |
9870 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
9871 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
9872 | fi | |
9873 | fi | |
9874 | ||
9875 | if test $succeeded = yes; then | |
9876 | pkg_check_gtk=yes | |
9877 | else | |
9878 | pkg_check_gtk=no | |
9879 | fi | |
9880 | ||
9881 | if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then | |
2018939f | 9882 | as_fn_error $? "$GTK_PKG_ERRORS" "$LINENO" 5 |
067d23c9 KY |
9883 | fi |
9884 | fi | |
9885 | ||
9886 | if test "$pkg_check_gtk" != "yes"; then | |
9887 | HAVE_GTK=no | |
9888 | if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "maybe"; then | |
9889 | GLIB_REQUIRED=2.6 | |
9890 | GTK_REQUIRED=2.6 | |
9891 | GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED" | |
9892 | ||
9893 | ||
9894 | succeeded=no | |
9895 | ||
9896 | # Extract the first word of "pkg-config", so it can be a program name with args. | |
9897 | set dummy pkg-config; ac_word=$2 | |
9898 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
9899 | $as_echo_n "checking for $ac_word... " >&6; } | |
9ba41eb9 | 9900 | if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : |
067d23c9 KY |
9901 | $as_echo_n "(cached) " >&6 |
9902 | else | |
9903 | case $PKG_CONFIG in | |
9904 | [\\/]* | ?:[\\/]*) | |
9905 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
9906 | ;; | |
9907 | *) | |
9908 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
9909 | for as_dir in $PATH | |
9910 | do | |
9911 | IFS=$as_save_IFS | |
9912 | test -z "$as_dir" && as_dir=. | |
9913 | for ac_exec_ext in '' $ac_executable_extensions; do | |
9914 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
9915 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
9916 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
9917 | break 2 | |
9918 | fi | |
9919 | done | |
9920 | done | |
9921 | IFS=$as_save_IFS | |
9922 | ||
9923 | test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" | |
9924 | ;; | |
9925 | esac | |
9926 | fi | |
9927 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG | |
9928 | if test -n "$PKG_CONFIG"; then | |
9929 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
9930 | $as_echo "$PKG_CONFIG" >&6; } | |
9931 | else | |
9932 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
9933 | $as_echo "no" >&6; } | |
9934 | fi | |
9935 | ||
9936 | ||
9937 | ||
9938 | if test "$PKG_CONFIG" = "no" ; then | |
9939 | pkg_check_gtk=no | |
9940 | else | |
9941 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
9942 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
9943 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTK_MODULES" >&5 | |
9944 | $as_echo_n "checking for $GTK_MODULES... " >&6; } | |
9945 | ||
9946 | if $PKG_CONFIG --exists "$GTK_MODULES" 2>&5; then | |
9947 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
9948 | $as_echo "yes" >&6; } | |
9949 | succeeded=yes | |
9950 | ||
9951 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking GTK_CFLAGS" >&5 | |
9952 | $as_echo_n "checking GTK_CFLAGS... " >&6; } | |
9953 | GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES"|sed -e 's,///*,/,g'` | |
9954 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_CFLAGS" >&5 | |
9955 | $as_echo "$GTK_CFLAGS" >&6; } | |
9956 | ||
9957 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking GTK_LIBS" >&5 | |
9958 | $as_echo_n "checking GTK_LIBS... " >&6; } | |
9959 | GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES"|sed -e 's,///*,/,g'` | |
9960 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_LIBS" >&5 | |
9961 | $as_echo "$GTK_LIBS" >&6; } | |
9962 | else | |
9963 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
9964 | $as_echo "no" >&6; } | |
9965 | GTK_CFLAGS="" | |
9966 | GTK_LIBS="" | |
9967 | ## If we have a custom action on failure, don't print errors, but | |
9968 | ## do set a variable so people can do so. | |
9969 | GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"` | |
9970 | ||
9971 | fi | |
9972 | ||
9973 | ||
9974 | ||
9975 | else | |
9976 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
9977 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
9978 | fi | |
9979 | fi | |
9980 | ||
9981 | if test $succeeded = yes; then | |
9982 | pkg_check_gtk=yes | |
9983 | else | |
9984 | pkg_check_gtk=no | |
9985 | fi | |
9986 | ||
9987 | if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then | |
2018939f | 9988 | as_fn_error $? "$GTK_PKG_ERRORS" "$LINENO" 5 |
067d23c9 KY |
9989 | fi |
9990 | fi | |
9991 | fi | |
9992 | ||
9993 | GTK_OBJ= | |
9994 | if test x"$pkg_check_gtk" = xyes; then | |
9995 | ||
9996 | ||
9997 | ||
9998 | C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS" | |
9999 | CFLAGS="$CFLAGS $GTK_CFLAGS" | |
10000 | LIBS="$GTK_LIBS $LIBS" | |
10001 | GTK_COMPILES=no | |
10002 | for ac_func in gtk_main | |
10003 | do : | |
10004 | ac_fn_c_check_func "$LINENO" "gtk_main" "ac_cv_func_gtk_main" | |
9ba41eb9 | 10005 | if test "x$ac_cv_func_gtk_main" = x""yes; then : |
067d23c9 KY |
10006 | cat >>confdefs.h <<_ACEOF |
10007 | #define HAVE_GTK_MAIN 1 | |
10008 | _ACEOF | |
10009 | GTK_COMPILES=yes | |
10010 | fi | |
10011 | done | |
10012 | ||
10013 | if test "${GTK_COMPILES}" != "yes"; then | |
10014 | if test "$USE_X_TOOLKIT" != "maybe"; then | |
9ba41eb9 | 10015 | as_fn_error $? "Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" "$LINENO" 5 ; |
067d23c9 KY |
10016 | fi |
10017 | else | |
10018 | HAVE_GTK=yes | |
10019 | ||
10020 | $as_echo "#define USE_GTK 1" >>confdefs.h | |
10021 | ||
10022 | GTK_OBJ=gtkutil.o | |
10023 | USE_X_TOOLKIT=none | |
10024 | if $PKG_CONFIG --atleast-version=2.10 gtk+-2.0; then | |
10025 | : | |
10026 | else | |
10027 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your version of Gtk+ will have problems with | |
10028 | closing open displays. This is no problem if you just use | |
10029 | one display, but if you use more than one and close one of them | |
10030 | Emacs may crash." >&5 | |
10031 | $as_echo "$as_me: WARNING: Your version of Gtk+ will have problems with | |
10032 | closing open displays. This is no problem if you just use | |
10033 | one display, but if you use more than one and close one of them | |
10034 | Emacs may crash." >&2;} | |
10035 | sleep 3 | |
10036 | fi | |
10037 | fi | |
10038 | ||
10039 | fi | |
10040 | ||
10041 | ||
10042 | ||
10043 | if test "${HAVE_GTK}" = "yes"; then | |
10044 | ||
10045 | if test "$with_toolkit_scroll_bars" != no; then | |
10046 | with_toolkit_scroll_bars=yes | |
10047 | fi | |
10048 | ||
10049 | HAVE_GTK_FILE_SELECTION=no | |
10050 | ac_fn_c_check_decl "$LINENO" "GTK_TYPE_FILE_SELECTION" "ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" "$ac_includes_default | |
10051 | #include <gtk/gtk.h> | |
10052 | " | |
9ba41eb9 | 10053 | if test "x$ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" = x""yes; then : |
067d23c9 KY |
10054 | HAVE_GTK_FILE_SELECTION=yes |
10055 | else | |
10056 | HAVE_GTK_FILE_SELECTION=no | |
10057 | fi | |
10058 | ||
10059 | if test "$HAVE_GTK_FILE_SELECTION" = yes; then | |
10060 | for ac_func in gtk_file_selection_new | |
10061 | do : | |
10062 | ac_fn_c_check_func "$LINENO" "gtk_file_selection_new" "ac_cv_func_gtk_file_selection_new" | |
9ba41eb9 | 10063 | if test "x$ac_cv_func_gtk_file_selection_new" = x""yes; then : |
067d23c9 KY |
10064 | cat >>confdefs.h <<_ACEOF |
10065 | #define HAVE_GTK_FILE_SELECTION_NEW 1 | |
10066 | _ACEOF | |
10067 | ||
10068 | fi | |
10069 | done | |
10070 | ||
10071 | fi | |
10072 | ||
10073 | HAVE_GTK_AND_PTHREAD=no | |
10074 | for ac_header in pthread.h | |
10075 | do : | |
10076 | ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default" | |
9ba41eb9 | 10077 | if test "x$ac_cv_header_pthread_h" = x""yes; then : |
067d23c9 KY |
10078 | cat >>confdefs.h <<_ACEOF |
10079 | #define HAVE_PTHREAD_H 1 | |
10080 | _ACEOF | |
10081 | ||
10082 | fi | |
10083 | ||
10084 | done | |
10085 | ||
10086 | if test "$ac_cv_header_pthread_h"; then | |
10087 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_self in -lpthread" >&5 | |
10088 | $as_echo_n "checking for pthread_self in -lpthread... " >&6; } | |
9ba41eb9 | 10089 | if test "${ac_cv_lib_pthread_pthread_self+set}" = set; then : |
067d23c9 KY |
10090 | $as_echo_n "(cached) " >&6 |
10091 | else | |
10092 | ac_check_lib_save_LIBS=$LIBS | |
10093 | LIBS="-lpthread $LIBS" | |
10094 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10095 | /* end confdefs.h. */ | |
10096 | ||
10097 | /* Override any GCC internal prototype to avoid an error. | |
10098 | Use char because int might match the return type of a GCC | |
10099 | builtin and then its argument prototype would still apply. */ | |
10100 | #ifdef __cplusplus | |
10101 | extern "C" | |
10102 | #endif | |
10103 | char pthread_self (); | |
10104 | int | |
10105 | main () | |
10106 | { | |
10107 | return pthread_self (); | |
10108 | ; | |
10109 | return 0; | |
10110 | } | |
10111 | _ACEOF | |
10112 | if ac_fn_c_try_link "$LINENO"; then : | |
10113 | ac_cv_lib_pthread_pthread_self=yes | |
10114 | else | |
10115 | ac_cv_lib_pthread_pthread_self=no | |
10116 | fi | |
10117 | rm -f core conftest.err conftest.$ac_objext \ | |
10118 | conftest$ac_exeext conftest.$ac_ext | |
10119 | LIBS=$ac_check_lib_save_LIBS | |
10120 | fi | |
10121 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_self" >&5 | |
10122 | $as_echo "$ac_cv_lib_pthread_pthread_self" >&6; } | |
9ba41eb9 | 10123 | if test "x$ac_cv_lib_pthread_pthread_self" = x""yes; then : |
067d23c9 KY |
10124 | HAVE_GTK_AND_PTHREAD=yes |
10125 | fi | |
10126 | ||
10127 | fi | |
10128 | if test "$HAVE_GTK_AND_PTHREAD" = yes; then | |
10129 | case "${canonical}" in | |
10130 | *-hpux*) ;; | |
10131 | *) GTK_LIBS="$GTK_LIBS -lpthread" ;; | |
10132 | esac | |
10133 | ||
10134 | $as_echo "#define HAVE_GTK_AND_PTHREAD 1" >>confdefs.h | |
10135 | ||
10136 | fi | |
10137 | ||
10138 | for ac_func in gtk_widget_get_window gtk_widget_set_has_window \ | |
10139 | gtk_dialog_get_action_area gtk_widget_get_sensitive \ | |
10140 | gtk_widget_get_mapped gtk_adjustment_get_page_size \ | |
10141 | gtk_orientable_set_orientation | |
10142 | do : | |
10143 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
10144 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
2018939f | 10145 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : |
067d23c9 KY |
10146 | cat >>confdefs.h <<_ACEOF |
10147 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
10148 | _ACEOF | |
10149 | ||
10150 | fi | |
10151 | done | |
10152 | ||
10153 | ||
10154 | fi | |
10155 | ||
10156 | HAVE_DBUS=no | |
10157 | DBUS_OBJ= | |
10158 | if test "${with_dbus}" = "yes"; then | |
10159 | ||
10160 | succeeded=no | |
10161 | ||
10162 | # Extract the first word of "pkg-config", so it can be a program name with args. | |
10163 | set dummy pkg-config; ac_word=$2 | |
10164 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
10165 | $as_echo_n "checking for $ac_word... " >&6; } | |
9ba41eb9 | 10166 | if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : |
067d23c9 KY |
10167 | $as_echo_n "(cached) " >&6 |
10168 | else | |
10169 | case $PKG_CONFIG in | |
10170 | [\\/]* | ?:[\\/]*) | |
10171 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
10172 | ;; | |
10173 | *) | |
10174 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
10175 | for as_dir in $PATH | |
10176 | do | |
10177 | IFS=$as_save_IFS | |
10178 | test -z "$as_dir" && as_dir=. | |
10179 | for ac_exec_ext in '' $ac_executable_extensions; do | |
10180 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
10181 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
10182 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
10183 | break 2 | |
10184 | fi | |
10185 | done | |
10186 | done | |
10187 | IFS=$as_save_IFS | |
10188 | ||
10189 | test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" | |
10190 | ;; | |
10191 | esac | |
10192 | fi | |
10193 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG | |
10194 | if test -n "$PKG_CONFIG"; then | |
10195 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
10196 | $as_echo "$PKG_CONFIG" >&6; } | |
10197 | else | |
10198 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
10199 | $as_echo "no" >&6; } | |
10200 | fi | |
10201 | ||
10202 | ||
10203 | ||
10204 | if test "$PKG_CONFIG" = "no" ; then | |
10205 | HAVE_DBUS=no | |
10206 | else | |
10207 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
10208 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
10209 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbus-1 >= 1.0" >&5 | |
10210 | $as_echo_n "checking for dbus-1 >= 1.0... " >&6; } | |
10211 | ||
10212 | if $PKG_CONFIG --exists "dbus-1 >= 1.0" 2>&5; then | |
10213 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
10214 | $as_echo "yes" >&6; } | |
10215 | succeeded=yes | |
10216 | ||
10217 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking DBUS_CFLAGS" >&5 | |
10218 | $as_echo_n "checking DBUS_CFLAGS... " >&6; } | |
10219 | DBUS_CFLAGS=`$PKG_CONFIG --cflags "dbus-1 >= 1.0"|sed -e 's,///*,/,g'` | |
10220 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBUS_CFLAGS" >&5 | |
10221 | $as_echo "$DBUS_CFLAGS" >&6; } | |
10222 | ||
10223 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking DBUS_LIBS" >&5 | |
10224 | $as_echo_n "checking DBUS_LIBS... " >&6; } | |
10225 | DBUS_LIBS=`$PKG_CONFIG --libs "dbus-1 >= 1.0"|sed -e 's,///*,/,g'` | |
10226 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBUS_LIBS" >&5 | |
10227 | $as_echo "$DBUS_LIBS" >&6; } | |
10228 | else | |
10229 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
10230 | $as_echo "no" >&6; } | |
10231 | DBUS_CFLAGS="" | |
10232 | DBUS_LIBS="" | |
10233 | ## If we have a custom action on failure, don't print errors, but | |
10234 | ## do set a variable so people can do so. | |
10235 | DBUS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "dbus-1 >= 1.0"` | |
10236 | ||
10237 | fi | |
10238 | ||
10239 | ||
10240 | ||
10241 | else | |
10242 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
10243 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
10244 | fi | |
10245 | fi | |
10246 | ||
10247 | if test $succeeded = yes; then | |
10248 | HAVE_DBUS=yes | |
10249 | else | |
10250 | HAVE_DBUS=no | |
10251 | fi | |
10252 | ||
10253 | if test "$HAVE_DBUS" = yes; then | |
10254 | LIBS="$LIBS $DBUS_LIBS" | |
10255 | ||
10256 | $as_echo "#define HAVE_DBUS 1" >>confdefs.h | |
10257 | ||
10258 | for ac_func in dbus_watch_get_unix_fd | |
10259 | do : | |
10260 | ac_fn_c_check_func "$LINENO" "dbus_watch_get_unix_fd" "ac_cv_func_dbus_watch_get_unix_fd" | |
9ba41eb9 | 10261 | if test "x$ac_cv_func_dbus_watch_get_unix_fd" = x""yes; then : |
067d23c9 KY |
10262 | cat >>confdefs.h <<_ACEOF |
10263 | #define HAVE_DBUS_WATCH_GET_UNIX_FD 1 | |
10264 | _ACEOF | |
10265 | ||
10266 | fi | |
10267 | done | |
10268 | ||
10269 | DBUS_OBJ=dbusbind.o | |
10270 | fi | |
10271 | fi | |
10272 | ||
10273 | ||
10274 | HAVE_GCONF=no | |
10275 | if test "${HAVE_X11}" = "yes" && test "${with_gconf}" = "yes"; then | |
10276 | ||
10277 | succeeded=no | |
10278 | ||
10279 | # Extract the first word of "pkg-config", so it can be a program name with args. | |
10280 | set dummy pkg-config; ac_word=$2 | |
10281 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
10282 | $as_echo_n "checking for $ac_word... " >&6; } | |
9ba41eb9 | 10283 | if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : |
067d23c9 KY |
10284 | $as_echo_n "(cached) " >&6 |
10285 | else | |
10286 | case $PKG_CONFIG in | |
10287 | [\\/]* | ?:[\\/]*) | |
10288 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
10289 | ;; | |
10290 | *) | |
10291 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
10292 | for as_dir in $PATH | |
10293 | do | |
10294 | IFS=$as_save_IFS | |
10295 | test -z "$as_dir" && as_dir=. | |
10296 | for ac_exec_ext in '' $ac_executable_extensions; do | |
10297 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
10298 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
10299 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
10300 | break 2 | |
10301 | fi | |
10302 | done | |
10303 | done | |
10304 | IFS=$as_save_IFS | |
10305 | ||
10306 | test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" | |
10307 | ;; | |
10308 | esac | |
10309 | fi | |
10310 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG | |
10311 | if test -n "$PKG_CONFIG"; then | |
10312 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
10313 | $as_echo "$PKG_CONFIG" >&6; } | |
10314 | else | |
10315 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
10316 | $as_echo "no" >&6; } | |
10317 | fi | |
10318 | ||
10319 | ||
10320 | ||
10321 | if test "$PKG_CONFIG" = "no" ; then | |
10322 | HAVE_GCONF=no | |
10323 | else | |
10324 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
10325 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
10326 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gconf-2.0 >= 2.13" >&5 | |
10327 | $as_echo_n "checking for gconf-2.0 >= 2.13... " >&6; } | |
10328 | ||
10329 | if $PKG_CONFIG --exists "gconf-2.0 >= 2.13" 2>&5; then | |
10330 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
10331 | $as_echo "yes" >&6; } | |
10332 | succeeded=yes | |
10333 | ||
10334 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking GCONF_CFLAGS" >&5 | |
10335 | $as_echo_n "checking GCONF_CFLAGS... " >&6; } | |
10336 | GCONF_CFLAGS=`$PKG_CONFIG --cflags "gconf-2.0 >= 2.13"|sed -e 's,///*,/,g'` | |
10337 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCONF_CFLAGS" >&5 | |
10338 | $as_echo "$GCONF_CFLAGS" >&6; } | |
10339 | ||
10340 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking GCONF_LIBS" >&5 | |
10341 | $as_echo_n "checking GCONF_LIBS... " >&6; } | |
10342 | GCONF_LIBS=`$PKG_CONFIG --libs "gconf-2.0 >= 2.13"|sed -e 's,///*,/,g'` | |
10343 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCONF_LIBS" >&5 | |
10344 | $as_echo "$GCONF_LIBS" >&6; } | |
10345 | else | |
10346 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
10347 | $as_echo "no" >&6; } | |
10348 | GCONF_CFLAGS="" | |
10349 | GCONF_LIBS="" | |
10350 | ## If we have a custom action on failure, don't print errors, but | |
10351 | ## do set a variable so people can do so. | |
10352 | GCONF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gconf-2.0 >= 2.13"` | |
10353 | ||
10354 | fi | |
10355 | ||
10356 | ||
10357 | ||
10358 | else | |
10359 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
10360 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
10361 | fi | |
10362 | fi | |
10363 | ||
10364 | if test $succeeded = yes; then | |
10365 | HAVE_GCONF=yes | |
10366 | else | |
10367 | HAVE_GCONF=no | |
10368 | fi | |
10369 | ||
10370 | if test "$HAVE_GCONF" = yes; then | |
10371 | ||
10372 | $as_echo "#define HAVE_GCONF 1" >>confdefs.h | |
10373 | ||
10374 | for ac_func in g_type_init | |
10375 | do : | |
10376 | ac_fn_c_check_func "$LINENO" "g_type_init" "ac_cv_func_g_type_init" | |
9ba41eb9 | 10377 | if test "x$ac_cv_func_g_type_init" = x""yes; then : |
067d23c9 KY |
10378 | cat >>confdefs.h <<_ACEOF |
10379 | #define HAVE_G_TYPE_INIT 1 | |
10380 | _ACEOF | |
10381 | ||
10382 | fi | |
10383 | done | |
10384 | ||
10385 | fi | |
10386 | fi | |
10387 | ||
10388 | HAVE_LIBSELINUX=no | |
10389 | LIBSELINUX_LIBS= | |
10390 | if test "${with_selinux}" = "yes"; then | |
10391 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lgetfilecon in -lselinux" >&5 | |
10392 | $as_echo_n "checking for lgetfilecon in -lselinux... " >&6; } | |
9ba41eb9 | 10393 | if test "${ac_cv_lib_selinux_lgetfilecon+set}" = set; then : |
067d23c9 KY |
10394 | $as_echo_n "(cached) " >&6 |
10395 | else | |
10396 | ac_check_lib_save_LIBS=$LIBS | |
10397 | LIBS="-lselinux $LIBS" | |
10398 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10399 | /* end confdefs.h. */ | |
10400 | ||
10401 | /* Override any GCC internal prototype to avoid an error. | |
10402 | Use char because int might match the return type of a GCC | |
10403 | builtin and then its argument prototype would still apply. */ | |
10404 | #ifdef __cplusplus | |
10405 | extern "C" | |
10406 | #endif | |
10407 | char lgetfilecon (); | |
10408 | int | |
10409 | main () | |
10410 | { | |
10411 | return lgetfilecon (); | |
10412 | ; | |
10413 | return 0; | |
10414 | } | |
10415 | _ACEOF | |
10416 | if ac_fn_c_try_link "$LINENO"; then : | |
10417 | ac_cv_lib_selinux_lgetfilecon=yes | |
10418 | else | |
10419 | ac_cv_lib_selinux_lgetfilecon=no | |
10420 | fi | |
10421 | rm -f core conftest.err conftest.$ac_objext \ | |
10422 | conftest$ac_exeext conftest.$ac_ext | |
10423 | LIBS=$ac_check_lib_save_LIBS | |
10424 | fi | |
10425 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_lgetfilecon" >&5 | |
10426 | $as_echo "$ac_cv_lib_selinux_lgetfilecon" >&6; } | |
9ba41eb9 | 10427 | if test "x$ac_cv_lib_selinux_lgetfilecon" = x""yes; then : |
067d23c9 KY |
10428 | HAVE_LIBSELINUX=yes |
10429 | else | |
10430 | HAVE_LIBSELINUX=no | |
10431 | fi | |
10432 | ||
10433 | if test "$HAVE_LIBSELINUX" = yes; then | |
10434 | ||
10435 | $as_echo "#define HAVE_LIBSELINUX 1" >>confdefs.h | |
10436 | ||
10437 | LIBSELINUX_LIBS=-lselinux | |
10438 | fi | |
10439 | fi | |
10440 | ||
10441 | ||
10442 | HAVE_GNUTLS=no | |
10443 | if test "${with_gnutls}" = "yes" ; then | |
10444 | ||
10445 | succeeded=no | |
10446 | ||
10447 | # Extract the first word of "pkg-config", so it can be a program name with args. | |
10448 | set dummy pkg-config; ac_word=$2 | |
10449 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
10450 | $as_echo_n "checking for $ac_word... " >&6; } | |
9ba41eb9 | 10451 | if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : |
067d23c9 KY |
10452 | $as_echo_n "(cached) " >&6 |
10453 | else | |
10454 | case $PKG_CONFIG in | |
10455 | [\\/]* | ?:[\\/]*) | |
10456 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
10457 | ;; | |
10458 | *) | |
10459 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
10460 | for as_dir in $PATH | |
10461 | do | |
10462 | IFS=$as_save_IFS | |
10463 | test -z "$as_dir" && as_dir=. | |
10464 | for ac_exec_ext in '' $ac_executable_extensions; do | |
10465 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
10466 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
10467 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
10468 | break 2 | |
10469 | fi | |
10470 | done | |
10471 | done | |
10472 | IFS=$as_save_IFS | |
10473 | ||
10474 | test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" | |
10475 | ;; | |
10476 | esac | |
10477 | fi | |
10478 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG | |
10479 | if test -n "$PKG_CONFIG"; then | |
10480 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
10481 | $as_echo "$PKG_CONFIG" >&6; } | |
10482 | else | |
10483 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
10484 | $as_echo "no" >&6; } | |
10485 | fi | |
10486 | ||
10487 | ||
10488 | ||
10489 | if test "$PKG_CONFIG" = "no" ; then | |
10490 | HAVE_GNUTLS=no | |
10491 | else | |
10492 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
10493 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
10494 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gnutls >= 2.2.4" >&5 | |
10495 | $as_echo_n "checking for gnutls >= 2.2.4... " >&6; } | |
10496 | ||
10497 | if $PKG_CONFIG --exists "gnutls >= 2.2.4" 2>&5; then | |
10498 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
10499 | $as_echo "yes" >&6; } | |
10500 | succeeded=yes | |
10501 | ||
10502 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBGNUTLS_CFLAGS" >&5 | |
10503 | $as_echo_n "checking LIBGNUTLS_CFLAGS... " >&6; } | |
10504 | LIBGNUTLS_CFLAGS=`$PKG_CONFIG --cflags "gnutls >= 2.2.4"|sed -e 's,///*,/,g'` | |
10505 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBGNUTLS_CFLAGS" >&5 | |
10506 | $as_echo "$LIBGNUTLS_CFLAGS" >&6; } | |
10507 | ||
10508 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBGNUTLS_LIBS" >&5 | |
10509 | $as_echo_n "checking LIBGNUTLS_LIBS... " >&6; } | |
10510 | LIBGNUTLS_LIBS=`$PKG_CONFIG --libs "gnutls >= 2.2.4"|sed -e 's,///*,/,g'` | |
10511 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBGNUTLS_LIBS" >&5 | |
10512 | $as_echo "$LIBGNUTLS_LIBS" >&6; } | |
10513 | else | |
10514 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
10515 | $as_echo "no" >&6; } | |
10516 | LIBGNUTLS_CFLAGS="" | |
10517 | LIBGNUTLS_LIBS="" | |
10518 | ## If we have a custom action on failure, don't print errors, but | |
10519 | ## do set a variable so people can do so. | |
10520 | LIBGNUTLS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gnutls >= 2.2.4"` | |
10521 | ||
10522 | fi | |
10523 | ||
10524 | ||
10525 | ||
10526 | else | |
10527 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
10528 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
10529 | fi | |
10530 | fi | |
10531 | ||
10532 | if test $succeeded = yes; then | |
10533 | HAVE_GNUTLS=yes | |
10534 | else | |
10535 | HAVE_GNUTLS=no | |
10536 | fi | |
10537 | ||
10538 | if test "${HAVE_GNUTLS}" = "yes"; then | |
10539 | ||
10540 | $as_echo "#define HAVE_GNUTLS 1" >>confdefs.h | |
10541 | ||
10542 | fi | |
10543 | fi | |
10544 | ||
10545 | ||
10546 | ||
10547 | HAVE_XAW3D=no | |
10548 | LUCID_LIBW= | |
10549 | if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then | |
10550 | if test "$with_xaw3d" != no; then | |
10551 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xaw3d" >&5 | |
10552 | $as_echo_n "checking for xaw3d... " >&6; } | |
9ba41eb9 | 10553 | if test "${emacs_cv_xaw3d+set}" = set; then : |
067d23c9 KY |
10554 | $as_echo_n "(cached) " >&6 |
10555 | else | |
10556 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10557 | /* end confdefs.h. */ | |
10558 | ||
10559 | #include <X11/Intrinsic.h> | |
10560 | #include <X11/Xaw3d/Simple.h> | |
10561 | int | |
10562 | main () | |
10563 | { | |
10564 | ||
10565 | ; | |
10566 | return 0; | |
10567 | } | |
10568 | _ACEOF | |
10569 | if ac_fn_c_try_link "$LINENO"; then : | |
10570 | emacs_cv_xaw3d=yes | |
10571 | else | |
10572 | emacs_cv_xaw3d=no | |
10573 | fi | |
10574 | rm -f core conftest.err conftest.$ac_objext \ | |
10575 | conftest$ac_exeext conftest.$ac_ext | |
10576 | fi | |
10577 | ||
10578 | else | |
10579 | emacs_cv_xaw3d=no | |
10580 | fi | |
10581 | if test $emacs_cv_xaw3d = yes; then | |
10582 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5 | |
10583 | $as_echo "yes; using Lucid toolkit" >&6; } | |
10584 | USE_X_TOOLKIT=LUCID | |
10585 | HAVE_XAW3D=yes | |
10586 | LUCID_LIBW=-lXaw3d | |
10587 | ||
10588 | $as_echo "#define HAVE_XAW3D 1" >>confdefs.h | |
10589 | ||
10590 | else | |
10591 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
10592 | $as_echo "no" >&6; } | |
10593 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libXaw" >&5 | |
10594 | $as_echo_n "checking for libXaw... " >&6; } | |
9ba41eb9 | 10595 | if test "${emacs_cv_xaw+set}" = set; then : |
067d23c9 KY |
10596 | $as_echo_n "(cached) " >&6 |
10597 | else | |
10598 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10599 | /* end confdefs.h. */ | |
10600 | ||
10601 | #include <X11/Intrinsic.h> | |
10602 | #include <X11/Xaw/Simple.h> | |
10603 | int | |
10604 | main () | |
10605 | { | |
10606 | ||
10607 | ; | |
10608 | return 0; | |
10609 | } | |
10610 | _ACEOF | |
10611 | if ac_fn_c_try_link "$LINENO"; then : | |
10612 | emacs_cv_xaw=yes | |
10613 | else | |
10614 | emacs_cv_xaw=no | |
10615 | fi | |
10616 | rm -f core conftest.err conftest.$ac_objext \ | |
10617 | conftest$ac_exeext conftest.$ac_ext | |
10618 | fi | |
10619 | ||
10620 | if test $emacs_cv_xaw = yes; then | |
10621 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5 | |
10622 | $as_echo "yes; using Lucid toolkit" >&6; } | |
10623 | USE_X_TOOLKIT=LUCID | |
10624 | LUCID_LIBW=-lXaw | |
10625 | elif test x"${USE_X_TOOLKIT}" = xLUCID; then | |
2018939f | 10626 | as_fn_error $? "Lucid toolkit requires X11/Xaw include files" "$LINENO" 5 |
067d23c9 KY |
10627 | else |
10628 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no; do not use toolkit by default" >&5 | |
10629 | $as_echo "no; do not use toolkit by default" >&6; } | |
10630 | USE_X_TOOLKIT=none | |
10631 | fi | |
10632 | fi | |
10633 | fi | |
10634 | ||
10635 | X_TOOLKIT_TYPE=$USE_X_TOOLKIT | |
10636 | ||
10637 | LIBXTR6= | |
10638 | if test "${USE_X_TOOLKIT}" != "none"; then | |
10639 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 toolkit version" >&5 | |
10640 | $as_echo_n "checking X11 toolkit version... " >&6; } | |
9ba41eb9 | 10641 | if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then : |
067d23c9 KY |
10642 | $as_echo_n "(cached) " >&6 |
10643 | else | |
10644 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10645 | /* end confdefs.h. */ | |
10646 | #include <X11/Intrinsic.h> | |
10647 | int | |
10648 | main () | |
10649 | { | |
10650 | #if XtSpecificationRelease < 6 | |
10651 | fail; | |
10652 | #endif | |
10653 | ||
10654 | ; | |
10655 | return 0; | |
10656 | } | |
10657 | _ACEOF | |
10658 | if ac_fn_c_try_link "$LINENO"; then : | |
10659 | emacs_cv_x11_toolkit_version_6=yes | |
10660 | else | |
10661 | emacs_cv_x11_toolkit_version_6=no | |
10662 | fi | |
10663 | rm -f core conftest.err conftest.$ac_objext \ | |
10664 | conftest$ac_exeext conftest.$ac_ext | |
10665 | fi | |
10666 | ||
10667 | HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6 | |
10668 | if test $emacs_cv_x11_toolkit_version_6 = yes; then | |
10669 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5 | |
10670 | $as_echo "6 or newer" >&6; } | |
10671 | ||
10672 | $as_echo "#define HAVE_X11XTR6 1" >>confdefs.h | |
10673 | ||
10674 | LIBXTR6="-lSM -lICE" | |
10675 | case "$opsys" in | |
10676 | ## Use libw.a along with X11R6 Xt. | |
10677 | unixware) LIBXTR6="$LIBXTR6 -lw" ;; | |
10678 | esac | |
10679 | else | |
10680 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5 | |
10681 | $as_echo "before 6" >&6; } | |
10682 | fi | |
10683 | ||
10684 | OLDLIBS="$LIBS" | |
10685 | if test x$HAVE_X11XTR6 = xyes; then | |
10686 | LIBS="-lXt -lSM -lICE $LIBS" | |
10687 | else | |
10688 | LIBS="-lXt $LIBS" | |
10689 | fi | |
10690 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XmuConvertStandardSelection in -lXmu" >&5 | |
10691 | $as_echo_n "checking for XmuConvertStandardSelection in -lXmu... " >&6; } | |
9ba41eb9 | 10692 | if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then : |
067d23c9 KY |
10693 | $as_echo_n "(cached) " >&6 |
10694 | else | |
10695 | ac_check_lib_save_LIBS=$LIBS | |
10696 | LIBS="-lXmu $LIBS" | |
10697 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10698 | /* end confdefs.h. */ | |
10699 | ||
10700 | /* Override any GCC internal prototype to avoid an error. | |
10701 | Use char because int might match the return type of a GCC | |
10702 | builtin and then its argument prototype would still apply. */ | |
10703 | #ifdef __cplusplus | |
10704 | extern "C" | |
10705 | #endif | |
10706 | char XmuConvertStandardSelection (); | |
10707 | int | |
10708 | main () | |
10709 | { | |
10710 | return XmuConvertStandardSelection (); | |
10711 | ; | |
10712 | return 0; | |
10713 | } | |
10714 | _ACEOF | |
10715 | if ac_fn_c_try_link "$LINENO"; then : | |
10716 | ac_cv_lib_Xmu_XmuConvertStandardSelection=yes | |
10717 | else | |
10718 | ac_cv_lib_Xmu_XmuConvertStandardSelection=no | |
10719 | fi | |
10720 | rm -f core conftest.err conftest.$ac_objext \ | |
10721 | conftest$ac_exeext conftest.$ac_ext | |
10722 | LIBS=$ac_check_lib_save_LIBS | |
10723 | fi | |
10724 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5 | |
10725 | $as_echo "$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6; } | |
9ba41eb9 | 10726 | if test "x$ac_cv_lib_Xmu_XmuConvertStandardSelection" = x""yes; then : |
067d23c9 KY |
10727 | cat >>confdefs.h <<_ACEOF |
10728 | #define HAVE_LIBXMU 1 | |
10729 | _ACEOF | |
10730 | ||
10731 | LIBS="-lXmu $LIBS" | |
10732 | ||
10733 | fi | |
10734 | ||
10735 | test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS" | |
10736 | fi | |
10737 | ||
10738 | ||
10739 | LIBXMU=-lXmu | |
d6a003a8 AS |
10740 | case $opsys in |
10741 | ## These systems don't supply Xmu. | |
067d23c9 KY |
10742 | hpux* | aix4-2 ) |
10743 | test "X$ac_cv_lib_Xmu_XmuConvertStandardSelection" != "Xyes" && LIBXMU= | |
10744 | ;; | |
10745 | esac | |
10746 | ||
10747 | ||
10748 | # On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D. | |
10749 | if test "${HAVE_X11}" = "yes"; then | |
10750 | if test "${USE_X_TOOLKIT}" != "none"; then | |
10751 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XShapeQueryExtension in -lXext" >&5 | |
10752 | $as_echo_n "checking for XShapeQueryExtension in -lXext... " >&6; } | |
9ba41eb9 | 10753 | if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then : |
067d23c9 KY |
10754 | $as_echo_n "(cached) " >&6 |
10755 | else | |
10756 | ac_check_lib_save_LIBS=$LIBS | |
10757 | LIBS="-lXext $LIBS" | |
10758 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10759 | /* end confdefs.h. */ | |
10760 | ||
10761 | /* Override any GCC internal prototype to avoid an error. | |
10762 | Use char because int might match the return type of a GCC | |
10763 | builtin and then its argument prototype would still apply. */ | |
10764 | #ifdef __cplusplus | |
10765 | extern "C" | |
10766 | #endif | |
10767 | char XShapeQueryExtension (); | |
10768 | int | |
10769 | main () | |
10770 | { | |
10771 | return XShapeQueryExtension (); | |
10772 | ; | |
10773 | return 0; | |
10774 | } | |
10775 | _ACEOF | |
10776 | if ac_fn_c_try_link "$LINENO"; then : | |
10777 | ac_cv_lib_Xext_XShapeQueryExtension=yes | |
10778 | else | |
10779 | ac_cv_lib_Xext_XShapeQueryExtension=no | |
10780 | fi | |
10781 | rm -f core conftest.err conftest.$ac_objext \ | |
10782 | conftest$ac_exeext conftest.$ac_ext | |
10783 | LIBS=$ac_check_lib_save_LIBS | |
10784 | fi | |
10785 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5 | |
10786 | $as_echo "$ac_cv_lib_Xext_XShapeQueryExtension" >&6; } | |
9ba41eb9 | 10787 | if test "x$ac_cv_lib_Xext_XShapeQueryExtension" = x""yes; then : |
067d23c9 KY |
10788 | cat >>confdefs.h <<_ACEOF |
10789 | #define HAVE_LIBXEXT 1 | |
10790 | _ACEOF | |
10791 | ||
10792 | LIBS="-lXext $LIBS" | |
10793 | ||
10794 | fi | |
10795 | ||
10796 | fi | |
10797 | fi | |
10798 | ||
10799 | LIBXP= | |
10800 | if test "${USE_X_TOOLKIT}" = "MOTIF"; then | |
10801 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Motif version 2.1" >&5 | |
10802 | $as_echo_n "checking for Motif version 2.1... " >&6; } | |
9ba41eb9 | 10803 | if test "${emacs_cv_motif_version_2_1+set}" = set; then : |
067d23c9 KY |
10804 | $as_echo_n "(cached) " >&6 |
10805 | else | |
10806 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10807 | /* end confdefs.h. */ | |
10808 | #include <Xm/Xm.h> | |
10809 | int | |
10810 | main () | |
10811 | { | |
10812 | #if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1) | |
10813 | int x = 5; | |
10814 | #else | |
10815 | Motif version prior to 2.1. | |
10816 | #endif | |
10817 | ; | |
10818 | return 0; | |
10819 | } | |
10820 | _ACEOF | |
10821 | if ac_fn_c_try_compile "$LINENO"; then : | |
10822 | emacs_cv_motif_version_2_1=yes | |
10823 | else | |
10824 | emacs_cv_motif_version_2_1=no | |
10825 | fi | |
10826 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
10827 | fi | |
10828 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_motif_version_2_1" >&5 | |
10829 | $as_echo "$emacs_cv_motif_version_2_1" >&6; } | |
10830 | if test $emacs_cv_motif_version_2_1 = yes; then | |
10831 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpCreateContext in -lXp" >&5 | |
10832 | $as_echo_n "checking for XpCreateContext in -lXp... " >&6; } | |
9ba41eb9 | 10833 | if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then : |
067d23c9 KY |
10834 | $as_echo_n "(cached) " >&6 |
10835 | else | |
10836 | ac_check_lib_save_LIBS=$LIBS | |
10837 | LIBS="-lXp $LIBS" | |
10838 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10839 | /* end confdefs.h. */ | |
10840 | ||
10841 | /* Override any GCC internal prototype to avoid an error. | |
10842 | Use char because int might match the return type of a GCC | |
10843 | builtin and then its argument prototype would still apply. */ | |
10844 | #ifdef __cplusplus | |
10845 | extern "C" | |
10846 | #endif | |
10847 | char XpCreateContext (); | |
10848 | int | |
10849 | main () | |
10850 | { | |
10851 | return XpCreateContext (); | |
10852 | ; | |
10853 | return 0; | |
10854 | } | |
10855 | _ACEOF | |
10856 | if ac_fn_c_try_link "$LINENO"; then : | |
10857 | ac_cv_lib_Xp_XpCreateContext=yes | |
10858 | else | |
10859 | ac_cv_lib_Xp_XpCreateContext=no | |
10860 | fi | |
10861 | rm -f core conftest.err conftest.$ac_objext \ | |
10862 | conftest$ac_exeext conftest.$ac_ext | |
10863 | LIBS=$ac_check_lib_save_LIBS | |
10864 | fi | |
10865 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xp_XpCreateContext" >&5 | |
10866 | $as_echo "$ac_cv_lib_Xp_XpCreateContext" >&6; } | |
9ba41eb9 | 10867 | if test "x$ac_cv_lib_Xp_XpCreateContext" = x""yes; then : |
067d23c9 KY |
10868 | LIBXP=-lXp |
10869 | fi | |
10870 | ||
10871 | else | |
10872 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LessTif where some systems put it" >&5 | |
10873 | $as_echo_n "checking for LessTif where some systems put it... " >&6; } | |
9ba41eb9 | 10874 | if test "${emacs_cv_lesstif+set}" = set; then : |
067d23c9 KY |
10875 | $as_echo_n "(cached) " >&6 |
10876 | else | |
10877 | # We put this in CFLAGS temporarily to precede other -I options | |
10878 | # that might be in CFLAGS temporarily. | |
10879 | # We put this in CPPFLAGS where it precedes the other -I options. | |
10880 | OLD_CPPFLAGS=$CPPFLAGS | |
10881 | OLD_CFLAGS=$CFLAGS | |
10882 | CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS" | |
10883 | CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS" | |
10884 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10885 | /* end confdefs.h. */ | |
10886 | #include </usr/X11R6/LessTif/Motif1.2/include/Xm/Xm.h> | |
10887 | int | |
10888 | main () | |
10889 | { | |
10890 | int x = 5; | |
10891 | ; | |
10892 | return 0; | |
10893 | } | |
10894 | _ACEOF | |
10895 | if ac_fn_c_try_compile "$LINENO"; then : | |
10896 | emacs_cv_lesstif=yes | |
10897 | else | |
10898 | emacs_cv_lesstif=no | |
10899 | fi | |
10900 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
10901 | fi | |
10902 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_lesstif" >&5 | |
10903 | $as_echo "$emacs_cv_lesstif" >&6; } | |
10904 | if test $emacs_cv_lesstif = yes; then | |
10905 | # Make sure this -I option remains in CPPFLAGS after it is set | |
10906 | # back to REAL_CPPFLAGS. | |
10907 | # There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not | |
10908 | # have those other -I options anyway. Ultimately, having this | |
10909 | # directory ultimately in CPPFLAGS will be enough. | |
10910 | REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS" | |
10911 | LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS" | |
10912 | else | |
10913 | CFLAGS=$OLD_CFLAGS | |
10914 | CPPFLAGS=$OLD_CPPFLAGS | |
10915 | fi | |
10916 | fi | |
10917 | fi | |
10918 | ||
10919 | ||
10920 | USE_TOOLKIT_SCROLL_BARS=no | |
10921 | if test "${with_toolkit_scroll_bars}" != "no"; then | |
10922 | if test "${USE_X_TOOLKIT}" != "none"; then | |
10923 | if test "${USE_X_TOOLKIT}" = "MOTIF"; then | |
10924 | $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h | |
10925 | ||
10926 | HAVE_XAW3D=no | |
10927 | USE_TOOLKIT_SCROLL_BARS=yes | |
10928 | elif test "${HAVE_XAW3D}" = "yes"; then | |
10929 | $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h | |
10930 | ||
10931 | USE_TOOLKIT_SCROLL_BARS=yes | |
10932 | fi | |
10933 | elif test "${HAVE_GTK}" = "yes"; then | |
10934 | $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h | |
10935 | ||
10936 | USE_TOOLKIT_SCROLL_BARS=yes | |
10937 | elif test "${HAVE_NS}" = "yes"; then | |
10938 | $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h | |
10939 | ||
10940 | USE_TOOLKIT_SCROLL_BARS=yes | |
10941 | fi | |
10942 | fi | |
10943 | ||
10944 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10945 | /* end confdefs.h. */ | |
10946 | ||
10947 | #include <X11/Xlib.h> | |
10948 | #include <X11/Xresource.h> | |
10949 | int | |
10950 | main () | |
10951 | { | |
10952 | XIMProc callback; | |
10953 | ; | |
10954 | return 0; | |
10955 | } | |
10956 | _ACEOF | |
10957 | if ac_fn_c_try_compile "$LINENO"; then : | |
10958 | HAVE_XIM=yes | |
10959 | ||
10960 | $as_echo "#define HAVE_XIM 1" >>confdefs.h | |
10961 | ||
10962 | else | |
10963 | HAVE_XIM=no | |
10964 | fi | |
10965 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
10966 | ||
10967 | ||
10968 | if test "${with_xim}" != "no"; then | |
10969 | ||
10970 | $as_echo "#define USE_XIM 1" >>confdefs.h | |
10971 | ||
10972 | fi | |
10973 | ||
10974 | ||
10975 | if test "${HAVE_XIM}" != "no"; then | |
10976 | late_CFLAGS=$CFLAGS | |
10977 | if test "$GCC" = yes; then | |
10978 | CFLAGS="$CFLAGS --pedantic-errors" | |
10979 | fi | |
10980 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10981 | /* end confdefs.h. */ | |
10982 | ||
10983 | #include <X11/Xlib.h> | |
10984 | #include <X11/Xresource.h> | |
10985 | int | |
10986 | main () | |
10987 | { | |
10988 | Display *display; | |
10989 | XrmDatabase db; | |
10990 | char *res_name; | |
10991 | char *res_class; | |
10992 | XIMProc callback; | |
10993 | XPointer *client_data; | |
10994 | #ifndef __GNUC__ | |
10995 | /* If we're not using GCC, it's probably not XFree86, and this is | |
10996 | probably right, but we can't use something like --pedantic-errors. */ | |
10997 | extern Bool XRegisterIMInstantiateCallback(Display*, XrmDatabase, char*, | |
10998 | char*, XIMProc, XPointer*); | |
10999 | #endif | |
11000 | (void)XRegisterIMInstantiateCallback(display, db, res_name, res_class, callback, | |
11001 | client_data); | |
11002 | ; | |
11003 | return 0; | |
11004 | } | |
11005 | _ACEOF | |
11006 | if ac_fn_c_try_compile "$LINENO"; then : | |
11007 | emacs_cv_arg6_star=yes | |
11008 | fi | |
11009 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
11010 | if test "$emacs_cv_arg6_star" = yes; then | |
11011 | $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer*" >>confdefs.h | |
11012 | ||
11013 | else | |
11014 | $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer" >>confdefs.h | |
11015 | ||
11016 | fi | |
11017 | CFLAGS=$late_CFLAGS | |
11018 | fi | |
11019 | ||
11020 | ### Start of font-backend (under any platform) section. | |
11021 | # (nothing here yet -- this is a placeholder) | |
11022 | ### End of font-backend (under any platform) section. | |
11023 | ||
11024 | ### Start of font-backend (under X11) section. | |
11025 | if test "${HAVE_X11}" = "yes"; then | |
11026 | ||
11027 | succeeded=no | |
11028 | ||
11029 | # Extract the first word of "pkg-config", so it can be a program name with args. | |
11030 | set dummy pkg-config; ac_word=$2 | |
11031 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
11032 | $as_echo_n "checking for $ac_word... " >&6; } | |
9ba41eb9 | 11033 | if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : |
067d23c9 KY |
11034 | $as_echo_n "(cached) " >&6 |
11035 | else | |
11036 | case $PKG_CONFIG in | |
11037 | [\\/]* | ?:[\\/]*) | |
11038 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
11039 | ;; | |
11040 | *) | |
11041 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
11042 | for as_dir in $PATH | |
11043 | do | |
11044 | IFS=$as_save_IFS | |
11045 | test -z "$as_dir" && as_dir=. | |
11046 | for ac_exec_ext in '' $ac_executable_extensions; do | |
11047 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
11048 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
11049 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
11050 | break 2 | |
11051 | fi | |
11052 | done | |
11053 | done | |
11054 | IFS=$as_save_IFS | |
11055 | ||
11056 | test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" | |
11057 | ;; | |
11058 | esac | |
11059 | fi | |
11060 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG | |
11061 | if test -n "$PKG_CONFIG"; then | |
11062 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
11063 | $as_echo "$PKG_CONFIG" >&6; } | |
11064 | else | |
11065 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
11066 | $as_echo "no" >&6; } | |
11067 | fi | |
11068 | ||
11069 | ||
11070 | ||
11071 | if test "$PKG_CONFIG" = "no" ; then | |
11072 | HAVE_FC=no | |
11073 | else | |
11074 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
11075 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
11076 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fontconfig >= 2.2.0" >&5 | |
11077 | $as_echo_n "checking for fontconfig >= 2.2.0... " >&6; } | |
11078 | ||
11079 | if $PKG_CONFIG --exists "fontconfig >= 2.2.0" 2>&5; then | |
11080 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
11081 | $as_echo "yes" >&6; } | |
11082 | succeeded=yes | |
11083 | ||
11084 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking FONTCONFIG_CFLAGS" >&5 | |
11085 | $as_echo_n "checking FONTCONFIG_CFLAGS... " >&6; } | |
11086 | FONTCONFIG_CFLAGS=`$PKG_CONFIG --cflags "fontconfig >= 2.2.0"|sed -e 's,///*,/,g'` | |
11087 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FONTCONFIG_CFLAGS" >&5 | |
11088 | $as_echo "$FONTCONFIG_CFLAGS" >&6; } | |
11089 | ||
11090 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking FONTCONFIG_LIBS" >&5 | |
11091 | $as_echo_n "checking FONTCONFIG_LIBS... " >&6; } | |
11092 | FONTCONFIG_LIBS=`$PKG_CONFIG --libs "fontconfig >= 2.2.0"|sed -e 's,///*,/,g'` | |
11093 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FONTCONFIG_LIBS" >&5 | |
11094 | $as_echo "$FONTCONFIG_LIBS" >&6; } | |
11095 | else | |
11096 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
11097 | $as_echo "no" >&6; } | |
11098 | FONTCONFIG_CFLAGS="" | |
11099 | FONTCONFIG_LIBS="" | |
11100 | ## If we have a custom action on failure, don't print errors, but | |
11101 | ## do set a variable so people can do so. | |
11102 | FONTCONFIG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "fontconfig >= 2.2.0"` | |
11103 | ||
11104 | fi | |
11105 | ||
11106 | ||
11107 | ||
11108 | else | |
11109 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
11110 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
11111 | fi | |
11112 | fi | |
11113 | ||
11114 | if test $succeeded = yes; then | |
11115 | HAVE_FC=yes | |
11116 | else | |
11117 | HAVE_FC=no | |
11118 | fi | |
11119 | ||
11120 | ||
11121 | ## Use -lXft if available, unless `--with-xft=no'. | |
11122 | HAVE_XFT=maybe | |
11123 | if test "${HAVE_FC}" = "no" || test "x${with_x}" = "xno"; then | |
11124 | with_xft="no"; | |
11125 | fi | |
11126 | if test "x${with_xft}" != "xno"; then | |
11127 | ||
11128 | ||
11129 | succeeded=no | |
11130 | ||
11131 | # Extract the first word of "pkg-config", so it can be a program name with args. | |
11132 | set dummy pkg-config; ac_word=$2 | |
11133 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
11134 | $as_echo_n "checking for $ac_word... " >&6; } | |
9ba41eb9 | 11135 | if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : |
067d23c9 KY |
11136 | $as_echo_n "(cached) " >&6 |
11137 | else | |
11138 | case $PKG_CONFIG in | |
11139 | [\\/]* | ?:[\\/]*) | |
11140 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
11141 | ;; | |
11142 | *) | |
11143 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
11144 | for as_dir in $PATH | |
11145 | do | |
11146 | IFS=$as_save_IFS | |
11147 | test -z "$as_dir" && as_dir=. | |
11148 | for ac_exec_ext in '' $ac_executable_extensions; do | |
11149 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
11150 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
11151 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
11152 | break 2 | |
11153 | fi | |
11154 | done | |
11155 | done | |
11156 | IFS=$as_save_IFS | |
11157 | ||
11158 | test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" | |
11159 | ;; | |
11160 | esac | |
11161 | fi | |
11162 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG | |
11163 | if test -n "$PKG_CONFIG"; then | |
11164 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
11165 | $as_echo "$PKG_CONFIG" >&6; } | |
11166 | else | |
11167 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
11168 | $as_echo "no" >&6; } | |
11169 | fi | |
11170 | ||
11171 | ||
11172 | ||
11173 | if test "$PKG_CONFIG" = "no" ; then | |
11174 | HAVE_XFT=no | |
11175 | else | |
11176 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
11177 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
11178 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xft >= 0.13.0" >&5 | |
11179 | $as_echo_n "checking for xft >= 0.13.0... " >&6; } | |
11180 | ||
11181 | if $PKG_CONFIG --exists "xft >= 0.13.0" 2>&5; then | |
11182 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
11183 | $as_echo "yes" >&6; } | |
11184 | succeeded=yes | |
11185 | ||
11186 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking XFT_CFLAGS" >&5 | |
11187 | $as_echo_n "checking XFT_CFLAGS... " >&6; } | |
11188 | XFT_CFLAGS=`$PKG_CONFIG --cflags "xft >= 0.13.0"|sed -e 's,///*,/,g'` | |
11189 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XFT_CFLAGS" >&5 | |
11190 | $as_echo "$XFT_CFLAGS" >&6; } | |
11191 | ||
11192 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking XFT_LIBS" >&5 | |
11193 | $as_echo_n "checking XFT_LIBS... " >&6; } | |
11194 | XFT_LIBS=`$PKG_CONFIG --libs "xft >= 0.13.0"|sed -e 's,///*,/,g'` | |
11195 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XFT_LIBS" >&5 | |
11196 | $as_echo "$XFT_LIBS" >&6; } | |
11197 | else | |
11198 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
11199 | $as_echo "no" >&6; } | |
11200 | XFT_CFLAGS="" | |
11201 | XFT_LIBS="" | |
11202 | ## If we have a custom action on failure, don't print errors, but | |
11203 | ## do set a variable so people can do so. | |
11204 | XFT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xft >= 0.13.0"` | |
11205 | ||
11206 | fi | |
11207 | ||
11208 | ||
11209 | ||
11210 | else | |
11211 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
11212 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
11213 | fi | |
11214 | fi | |
11215 | ||
11216 | if test $succeeded = yes; then | |
11217 | : | |
11218 | else | |
11219 | HAVE_XFT=no | |
11220 | fi | |
11221 | ||
11222 | ## Because xftfont.c uses XRenderQueryExtension, we also | |
11223 | ## need to link to -lXrender. | |
11224 | HAVE_XRENDER=no | |
11225 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRenderQueryExtension in -lXrender" >&5 | |
11226 | $as_echo_n "checking for XRenderQueryExtension in -lXrender... " >&6; } | |
9ba41eb9 | 11227 | if test "${ac_cv_lib_Xrender_XRenderQueryExtension+set}" = set; then : |
067d23c9 KY |
11228 | $as_echo_n "(cached) " >&6 |
11229 | else | |
11230 | ac_check_lib_save_LIBS=$LIBS | |
11231 | LIBS="-lXrender $LIBS" | |
11232 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11233 | /* end confdefs.h. */ | |
11234 | ||
11235 | /* Override any GCC internal prototype to avoid an error. | |
11236 | Use char because int might match the return type of a GCC | |
11237 | builtin and then its argument prototype would still apply. */ | |
11238 | #ifdef __cplusplus | |
11239 | extern "C" | |
11240 | #endif | |
11241 | char XRenderQueryExtension (); | |
11242 | int | |
11243 | main () | |
11244 | { | |
11245 | return XRenderQueryExtension (); | |
11246 | ; | |
11247 | return 0; | |
11248 | } | |
11249 | _ACEOF | |
11250 | if ac_fn_c_try_link "$LINENO"; then : | |
11251 | ac_cv_lib_Xrender_XRenderQueryExtension=yes | |
11252 | else | |
11253 | ac_cv_lib_Xrender_XRenderQueryExtension=no | |
11254 | fi | |
11255 | rm -f core conftest.err conftest.$ac_objext \ | |
11256 | conftest$ac_exeext conftest.$ac_ext | |
11257 | LIBS=$ac_check_lib_save_LIBS | |
11258 | fi | |
11259 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrender_XRenderQueryExtension" >&5 | |
11260 | $as_echo "$ac_cv_lib_Xrender_XRenderQueryExtension" >&6; } | |
9ba41eb9 | 11261 | if test "x$ac_cv_lib_Xrender_XRenderQueryExtension" = x""yes; then : |
067d23c9 KY |
11262 | HAVE_XRENDER=yes |
11263 | fi | |
11264 | ||
11265 | if test "$HAVE_XFT" != no && test "$HAVE_XRENDER" != no; then | |
11266 | OLD_CPPFLAGS="$CPPFLAGS" | |
11267 | OLD_CFLAGS="$CFLAGS" | |
11268 | OLD_LIBS="$LIBS" | |
11269 | CPPFLAGS="$CPPFLAGS $XFT_CFLAGS" | |
11270 | CFLAGS="$CFLAGS $XFT_CFLAGS" | |
11271 | XFT_LIBS="-lXrender $XFT_LIBS" | |
11272 | LIBS="$XFT_LIBS $LIBS" | |
11273 | ac_fn_c_check_header_mongrel "$LINENO" "X11/Xft/Xft.h" "ac_cv_header_X11_Xft_Xft_h" "$ac_includes_default" | |
9ba41eb9 | 11274 | if test "x$ac_cv_header_X11_Xft_Xft_h" = x""yes; then : |
067d23c9 KY |
11275 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XftFontOpen in -lXft" >&5 |
11276 | $as_echo_n "checking for XftFontOpen in -lXft... " >&6; } | |
9ba41eb9 | 11277 | if test "${ac_cv_lib_Xft_XftFontOpen+set}" = set; then : |
067d23c9 KY |
11278 | $as_echo_n "(cached) " >&6 |
11279 | else | |
11280 | ac_check_lib_save_LIBS=$LIBS | |
11281 | LIBS="-lXft $XFT_LIBS $LIBS" | |
11282 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11283 | /* end confdefs.h. */ | |
11284 | ||
11285 | /* Override any GCC internal prototype to avoid an error. | |
11286 | Use char because int might match the return type of a GCC | |
11287 | builtin and then its argument prototype would still apply. */ | |
11288 | #ifdef __cplusplus | |
11289 | extern "C" | |
11290 | #endif | |
11291 | char XftFontOpen (); | |
11292 | int | |
11293 | main () | |
11294 | { | |
11295 | return XftFontOpen (); | |
11296 | ; | |
11297 | return 0; | |
11298 | } | |
11299 | _ACEOF | |
11300 | if ac_fn_c_try_link "$LINENO"; then : | |
11301 | ac_cv_lib_Xft_XftFontOpen=yes | |
11302 | else | |
11303 | ac_cv_lib_Xft_XftFontOpen=no | |
11304 | fi | |
11305 | rm -f core conftest.err conftest.$ac_objext \ | |
11306 | conftest$ac_exeext conftest.$ac_ext | |
11307 | LIBS=$ac_check_lib_save_LIBS | |
11308 | fi | |
11309 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xft_XftFontOpen" >&5 | |
11310 | $as_echo "$ac_cv_lib_Xft_XftFontOpen" >&6; } | |
9ba41eb9 | 11311 | if test "x$ac_cv_lib_Xft_XftFontOpen" = x""yes; then : |
067d23c9 KY |
11312 | HAVE_XFT=yes |
11313 | fi | |
11314 | ||
11315 | fi | |
11316 | ||
11317 | ||
11318 | ||
11319 | if test "${HAVE_XFT}" = "yes"; then | |
11320 | ||
11321 | $as_echo "#define HAVE_XFT 1" >>confdefs.h | |
11322 | ||
11323 | ||
11324 | C_SWITCH_X_SITE="$C_SWITCH_X_SITE $XFT_CFLAGS" | |
11325 | else | |
11326 | CPPFLAGS="$OLD_CPPFLAGS" | |
11327 | CFLAGS="$OLD_CFLAGS" | |
11328 | LIBS="$OLD_LIBS" | |
11329 | fi # "${HAVE_XFT}" = "yes" | |
11330 | fi # "$HAVE_XFT" != no | |
11331 | fi # "x${with_xft}" != "xno" | |
11332 | ||
11333 | if test "$HAVE_XFT" != "yes"; then | |
11334 | HAVE_XFT=no | |
11335 | fi | |
11336 | ||
067d23c9 KY |
11337 | ## We used to allow building with FreeType and without Xft. |
11338 | ## However, the ftx font backend driver is not in good shape. | |
9ba41eb9 | 11339 | HAVE_FREETYPE=$HAVE_XFT |
067d23c9 KY |
11340 | |
11341 | HAVE_LIBOTF=no | |
11342 | if test "${HAVE_FREETYPE}" = "yes"; then | |
11343 | ||
11344 | $as_echo "#define HAVE_FREETYPE 1" >>confdefs.h | |
11345 | ||
11346 | if test "${with_libotf}" != "no"; then | |
11347 | ||
11348 | succeeded=no | |
11349 | ||
11350 | # Extract the first word of "pkg-config", so it can be a program name with args. | |
11351 | set dummy pkg-config; ac_word=$2 | |
11352 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
11353 | $as_echo_n "checking for $ac_word... " >&6; } | |
9ba41eb9 | 11354 | if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : |
067d23c9 KY |
11355 | $as_echo_n "(cached) " >&6 |
11356 | else | |
11357 | case $PKG_CONFIG in | |
11358 | [\\/]* | ?:[\\/]*) | |
11359 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
11360 | ;; | |
11361 | *) | |
11362 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
11363 | for as_dir in $PATH | |
11364 | do | |
11365 | IFS=$as_save_IFS | |
11366 | test -z "$as_dir" && as_dir=. | |
11367 | for ac_exec_ext in '' $ac_executable_extensions; do | |
11368 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
11369 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
11370 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
11371 | break 2 | |
11372 | fi | |
11373 | done | |
11374 | done | |
11375 | IFS=$as_save_IFS | |
11376 | ||
11377 | test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" | |
11378 | ;; | |
11379 | esac | |
11380 | fi | |
11381 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG | |
11382 | if test -n "$PKG_CONFIG"; then | |
11383 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
11384 | $as_echo "$PKG_CONFIG" >&6; } | |
11385 | else | |
11386 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
11387 | $as_echo "no" >&6; } | |
11388 | fi | |
11389 | ||
11390 | ||
11391 | ||
11392 | if test "$PKG_CONFIG" = "no" ; then | |
11393 | HAVE_LIBOTF=no | |
11394 | else | |
11395 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
11396 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
11397 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libotf" >&5 | |
11398 | $as_echo_n "checking for libotf... " >&6; } | |
11399 | ||
11400 | if $PKG_CONFIG --exists "libotf" 2>&5; then | |
11401 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
11402 | $as_echo "yes" >&6; } | |
11403 | succeeded=yes | |
11404 | ||
11405 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBOTF_CFLAGS" >&5 | |
11406 | $as_echo_n "checking LIBOTF_CFLAGS... " >&6; } | |
11407 | LIBOTF_CFLAGS=`$PKG_CONFIG --cflags "libotf"|sed -e 's,///*,/,g'` | |
11408 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBOTF_CFLAGS" >&5 | |
11409 | $as_echo "$LIBOTF_CFLAGS" >&6; } | |
11410 | ||
11411 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBOTF_LIBS" >&5 | |
11412 | $as_echo_n "checking LIBOTF_LIBS... " >&6; } | |
11413 | LIBOTF_LIBS=`$PKG_CONFIG --libs "libotf"|sed -e 's,///*,/,g'` | |
11414 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBOTF_LIBS" >&5 | |
11415 | $as_echo "$LIBOTF_LIBS" >&6; } | |
11416 | else | |
11417 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
11418 | $as_echo "no" >&6; } | |
11419 | LIBOTF_CFLAGS="" | |
11420 | LIBOTF_LIBS="" | |
11421 | ## If we have a custom action on failure, don't print errors, but | |
11422 | ## do set a variable so people can do so. | |
11423 | LIBOTF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libotf"` | |
11424 | ||
11425 | fi | |
11426 | ||
11427 | ||
11428 | ||
11429 | else | |
11430 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
11431 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
11432 | fi | |
11433 | fi | |
11434 | ||
11435 | if test $succeeded = yes; then | |
11436 | HAVE_LIBOTF=yes | |
11437 | else | |
11438 | HAVE_LIBOTF=no | |
11439 | fi | |
11440 | ||
11441 | if test "$HAVE_LIBOTF" = "yes"; then | |
11442 | ||
11443 | $as_echo "#define HAVE_LIBOTF 1" >>confdefs.h | |
11444 | ||
11445 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTF_get_variation_glyphs in -lotf" >&5 | |
11446 | $as_echo_n "checking for OTF_get_variation_glyphs in -lotf... " >&6; } | |
9ba41eb9 | 11447 | if test "${ac_cv_lib_otf_OTF_get_variation_glyphs+set}" = set; then : |
067d23c9 KY |
11448 | $as_echo_n "(cached) " >&6 |
11449 | else | |
11450 | ac_check_lib_save_LIBS=$LIBS | |
11451 | LIBS="-lotf $LIBS" | |
11452 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11453 | /* end confdefs.h. */ | |
11454 | ||
11455 | /* Override any GCC internal prototype to avoid an error. | |
11456 | Use char because int might match the return type of a GCC | |
11457 | builtin and then its argument prototype would still apply. */ | |
11458 | #ifdef __cplusplus | |
11459 | extern "C" | |
11460 | #endif | |
11461 | char OTF_get_variation_glyphs (); | |
11462 | int | |
11463 | main () | |
11464 | { | |
11465 | return OTF_get_variation_glyphs (); | |
11466 | ; | |
11467 | return 0; | |
11468 | } | |
11469 | _ACEOF | |
11470 | if ac_fn_c_try_link "$LINENO"; then : | |
11471 | ac_cv_lib_otf_OTF_get_variation_glyphs=yes | |
11472 | else | |
11473 | ac_cv_lib_otf_OTF_get_variation_glyphs=no | |
11474 | fi | |
11475 | rm -f core conftest.err conftest.$ac_objext \ | |
11476 | conftest$ac_exeext conftest.$ac_ext | |
11477 | LIBS=$ac_check_lib_save_LIBS | |
11478 | fi | |
11479 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_otf_OTF_get_variation_glyphs" >&5 | |
11480 | $as_echo "$ac_cv_lib_otf_OTF_get_variation_glyphs" >&6; } | |
9ba41eb9 | 11481 | if test "x$ac_cv_lib_otf_OTF_get_variation_glyphs" = x""yes; then : |
067d23c9 KY |
11482 | HAVE_OTF_GET_VARIATION_GLYPHS=yes |
11483 | else | |
11484 | HAVE_OTF_GET_VARIATION_GLYPHS=no | |
11485 | fi | |
11486 | ||
11487 | if test "${HAVE_OTF_GET_VARIATION_GLYPHS}" = "yes"; then | |
11488 | ||
11489 | $as_echo "#define HAVE_OTF_GET_VARIATION_GLYPHS 1" >>confdefs.h | |
11490 | ||
11491 | fi | |
11492 | fi | |
11493 | fi | |
11494 | fi | |
11495 | ||
11496 | HAVE_M17N_FLT=no | |
11497 | if test "${HAVE_LIBOTF}" = yes; then | |
11498 | if test "${with_m17n_flt}" != "no"; then | |
11499 | ||
11500 | succeeded=no | |
11501 | ||
11502 | # Extract the first word of "pkg-config", so it can be a program name with args. | |
11503 | set dummy pkg-config; ac_word=$2 | |
11504 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
11505 | $as_echo_n "checking for $ac_word... " >&6; } | |
9ba41eb9 | 11506 | if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : |
067d23c9 KY |
11507 | $as_echo_n "(cached) " >&6 |
11508 | else | |
11509 | case $PKG_CONFIG in | |
11510 | [\\/]* | ?:[\\/]*) | |
11511 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
11512 | ;; | |
11513 | *) | |
11514 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
11515 | for as_dir in $PATH | |
11516 | do | |
11517 | IFS=$as_save_IFS | |
11518 | test -z "$as_dir" && as_dir=. | |
11519 | for ac_exec_ext in '' $ac_executable_extensions; do | |
11520 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
11521 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
11522 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
11523 | break 2 | |
11524 | fi | |
11525 | done | |
11526 | done | |
11527 | IFS=$as_save_IFS | |
11528 | ||
11529 | test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" | |
11530 | ;; | |
11531 | esac | |
11532 | fi | |
11533 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG | |
11534 | if test -n "$PKG_CONFIG"; then | |
11535 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
11536 | $as_echo "$PKG_CONFIG" >&6; } | |
11537 | else | |
11538 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
11539 | $as_echo "no" >&6; } | |
11540 | fi | |
11541 | ||
11542 | ||
11543 | ||
11544 | if test "$PKG_CONFIG" = "no" ; then | |
11545 | HAVE_M17N_FLT=no | |
11546 | else | |
11547 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
11548 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
11549 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for m17n-flt" >&5 | |
11550 | $as_echo_n "checking for m17n-flt... " >&6; } | |
11551 | ||
11552 | if $PKG_CONFIG --exists "m17n-flt" 2>&5; then | |
11553 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
11554 | $as_echo "yes" >&6; } | |
11555 | succeeded=yes | |
11556 | ||
11557 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking M17N_FLT_CFLAGS" >&5 | |
11558 | $as_echo_n "checking M17N_FLT_CFLAGS... " >&6; } | |
11559 | M17N_FLT_CFLAGS=`$PKG_CONFIG --cflags "m17n-flt"|sed -e 's,///*,/,g'` | |
11560 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $M17N_FLT_CFLAGS" >&5 | |
11561 | $as_echo "$M17N_FLT_CFLAGS" >&6; } | |
11562 | ||
11563 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking M17N_FLT_LIBS" >&5 | |
11564 | $as_echo_n "checking M17N_FLT_LIBS... " >&6; } | |
11565 | M17N_FLT_LIBS=`$PKG_CONFIG --libs "m17n-flt"|sed -e 's,///*,/,g'` | |
11566 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $M17N_FLT_LIBS" >&5 | |
11567 | $as_echo "$M17N_FLT_LIBS" >&6; } | |
11568 | else | |
11569 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
11570 | $as_echo "no" >&6; } | |
11571 | M17N_FLT_CFLAGS="" | |
11572 | M17N_FLT_LIBS="" | |
11573 | ## If we have a custom action on failure, don't print errors, but | |
11574 | ## do set a variable so people can do so. | |
11575 | M17N_FLT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "m17n-flt"` | |
11576 | ||
11577 | fi | |
11578 | ||
11579 | ||
11580 | ||
11581 | else | |
11582 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
11583 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
11584 | fi | |
11585 | fi | |
11586 | ||
11587 | if test $succeeded = yes; then | |
11588 | HAVE_M17N_FLT=yes | |
11589 | else | |
11590 | HAVE_M17N_FLT=no | |
11591 | fi | |
11592 | ||
11593 | if test "$HAVE_M17N_FLT" = "yes"; then | |
11594 | ||
11595 | $as_echo "#define HAVE_M17N_FLT 1" >>confdefs.h | |
11596 | ||
11597 | fi | |
11598 | fi | |
11599 | fi | |
11600 | else | |
11601 | HAVE_XFT=no | |
11602 | HAVE_FREETYPE=no | |
11603 | HAVE_LIBOTF=no | |
11604 | HAVE_M17N_FLT=no | |
11605 | fi | |
11606 | ||
11607 | ### End of font-backend (under X11) section. | |
11608 | ||
11609 | ||
11610 | ||
11611 | ||
11612 | ||
11613 | ||
11614 | ||
11615 | ||
11616 | ||
11617 | ||
11618 | ### Use -lXpm if available, unless `--with-xpm=no'. | |
11619 | HAVE_XPM=no | |
11620 | LIBXPM= | |
11621 | if test "${HAVE_X11}" = "yes"; then | |
11622 | if test "${with_xpm}" != "no"; then | |
11623 | ac_fn_c_check_header_mongrel "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "$ac_includes_default" | |
9ba41eb9 | 11624 | if test "x$ac_cv_header_X11_xpm_h" = x""yes; then : |
067d23c9 KY |
11625 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReadFileToPixmap in -lXpm" >&5 |
11626 | $as_echo_n "checking for XpmReadFileToPixmap in -lXpm... " >&6; } | |
9ba41eb9 | 11627 | if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then : |
067d23c9 KY |
11628 | $as_echo_n "(cached) " >&6 |
11629 | else | |
11630 | ac_check_lib_save_LIBS=$LIBS | |
11631 | LIBS="-lXpm -lX11 $LIBS" | |
11632 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11633 | /* end confdefs.h. */ | |
11634 | ||
11635 | /* Override any GCC internal prototype to avoid an error. | |
11636 | Use char because int might match the return type of a GCC | |
11637 | builtin and then its argument prototype would still apply. */ | |
11638 | #ifdef __cplusplus | |
11639 | extern "C" | |
11640 | #endif | |
11641 | char XpmReadFileToPixmap (); | |
11642 | int | |
11643 | main () | |
11644 | { | |
11645 | return XpmReadFileToPixmap (); | |
11646 | ; | |
11647 | return 0; | |
11648 | } | |
11649 | _ACEOF | |
11650 | if ac_fn_c_try_link "$LINENO"; then : | |
11651 | ac_cv_lib_Xpm_XpmReadFileToPixmap=yes | |
11652 | else | |
11653 | ac_cv_lib_Xpm_XpmReadFileToPixmap=no | |
11654 | fi | |
11655 | rm -f core conftest.err conftest.$ac_objext \ | |
11656 | conftest$ac_exeext conftest.$ac_ext | |
11657 | LIBS=$ac_check_lib_save_LIBS | |
11658 | fi | |
11659 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5 | |
11660 | $as_echo "$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6; } | |
9ba41eb9 | 11661 | if test "x$ac_cv_lib_Xpm_XpmReadFileToPixmap" = x""yes; then : |
067d23c9 KY |
11662 | HAVE_XPM=yes |
11663 | fi | |
11664 | ||
11665 | fi | |
11666 | ||
11667 | ||
11668 | if test "${HAVE_XPM}" = "yes"; then | |
11669 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReturnAllocPixels preprocessor define" >&5 | |
11670 | $as_echo_n "checking for XpmReturnAllocPixels preprocessor define... " >&6; } | |
11671 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11672 | /* end confdefs.h. */ | |
11673 | #include "X11/xpm.h" | |
11674 | #ifndef XpmReturnAllocPixels | |
11675 | no_return_alloc_pixels | |
11676 | #endif | |
11677 | ||
11678 | _ACEOF | |
11679 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
11680 | $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then : | |
11681 | HAVE_XPM=no | |
11682 | else | |
11683 | HAVE_XPM=yes | |
11684 | fi | |
11685 | rm -f conftest* | |
11686 | ||
11687 | ||
11688 | if test "${HAVE_XPM}" = "yes"; then | |
11689 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
11690 | $as_echo "yes" >&6; } | |
11691 | else | |
11692 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
11693 | $as_echo "no" >&6; } | |
11694 | fi | |
11695 | fi | |
11696 | fi | |
11697 | ||
11698 | if test "${HAVE_XPM}" = "yes"; then | |
11699 | ||
11700 | $as_echo "#define HAVE_XPM 1" >>confdefs.h | |
11701 | ||
11702 | LIBXPM=-lXpm | |
11703 | fi | |
11704 | fi | |
11705 | ||
11706 | ||
11707 | ### Use -ljpeg if available, unless `--with-jpeg=no'. | |
11708 | HAVE_JPEG=no | |
11709 | LIBJPEG= | |
11710 | if test "${HAVE_X11}" = "yes"; then | |
11711 | if test "${with_jpeg}" != "no"; then | |
11712 | ac_fn_c_check_header_mongrel "$LINENO" "jerror.h" "ac_cv_header_jerror_h" "$ac_includes_default" | |
9ba41eb9 | 11713 | if test "x$ac_cv_header_jerror_h" = x""yes; then : |
067d23c9 KY |
11714 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_destroy_compress in -ljpeg" >&5 |
11715 | $as_echo_n "checking for jpeg_destroy_compress in -ljpeg... " >&6; } | |
9ba41eb9 | 11716 | if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then : |
067d23c9 KY |
11717 | $as_echo_n "(cached) " >&6 |
11718 | else | |
11719 | ac_check_lib_save_LIBS=$LIBS | |
11720 | LIBS="-ljpeg $LIBS" | |
11721 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11722 | /* end confdefs.h. */ | |
11723 | ||
11724 | /* Override any GCC internal prototype to avoid an error. | |
11725 | Use char because int might match the return type of a GCC | |
11726 | builtin and then its argument prototype would still apply. */ | |
11727 | #ifdef __cplusplus | |
11728 | extern "C" | |
11729 | #endif | |
11730 | char jpeg_destroy_compress (); | |
11731 | int | |
11732 | main () | |
11733 | { | |
11734 | return jpeg_destroy_compress (); | |
11735 | ; | |
11736 | return 0; | |
11737 | } | |
11738 | _ACEOF | |
11739 | if ac_fn_c_try_link "$LINENO"; then : | |
11740 | ac_cv_lib_jpeg_jpeg_destroy_compress=yes | |
11741 | else | |
11742 | ac_cv_lib_jpeg_jpeg_destroy_compress=no | |
11743 | fi | |
11744 | rm -f core conftest.err conftest.$ac_objext \ | |
11745 | conftest$ac_exeext conftest.$ac_ext | |
11746 | LIBS=$ac_check_lib_save_LIBS | |
11747 | fi | |
11748 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5 | |
11749 | $as_echo "$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6; } | |
9ba41eb9 | 11750 | if test "x$ac_cv_lib_jpeg_jpeg_destroy_compress" = x""yes; then : |
067d23c9 KY |
11751 | HAVE_JPEG=yes |
11752 | fi | |
11753 | ||
11754 | fi | |
11755 | ||
11756 | ||
11757 | fi | |
11758 | ||
11759 | if test "${HAVE_JPEG}" = "yes"; then | |
11760 | $as_echo "#define HAVE_JPEG 1" >>confdefs.h | |
11761 | ||
11762 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11763 | /* end confdefs.h. */ | |
11764 | #include <jpeglib.h> | |
11765 | version=JPEG_LIB_VERSION | |
11766 | ||
11767 | _ACEOF | |
11768 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
11769 | $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then : | |
11770 | $as_echo "#define HAVE_JPEG 1" >>confdefs.h | |
11771 | ||
11772 | else | |
11773 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libjpeg found, but not version 6b or later" >&5 | |
11774 | $as_echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;} | |
11775 | HAVE_JPEG=no | |
11776 | fi | |
11777 | rm -f conftest* | |
11778 | ||
11779 | fi | |
11780 | if test "${HAVE_JPEG}" = "yes"; then | |
11781 | LIBJPEG=-ljpeg | |
11782 | fi | |
11783 | fi | |
11784 | ||
11785 | ||
11786 | ### Use -lpng if available, unless `--with-png=no'. | |
11787 | HAVE_PNG=no | |
11788 | LIBPNG= | |
11789 | if test "${HAVE_X11}" = "yes"; then | |
11790 | if test "${with_png}" != "no"; then | |
11791 | # Debian unstable as of July 2003 has multiple libpngs, and puts png.h | |
11792 | # in /usr/include/libpng. | |
11793 | for ac_header in png.h libpng/png.h | |
11794 | do : | |
11795 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
11796 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
2018939f | 11797 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : |
067d23c9 KY |
11798 | cat >>confdefs.h <<_ACEOF |
11799 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
11800 | _ACEOF | |
11801 | ||
11802 | fi | |
11803 | ||
11804 | done | |
11805 | ||
11806 | if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then | |
11807 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_get_channels in -lpng" >&5 | |
11808 | $as_echo_n "checking for png_get_channels in -lpng... " >&6; } | |
9ba41eb9 | 11809 | if test "${ac_cv_lib_png_png_get_channels+set}" = set; then : |
067d23c9 KY |
11810 | $as_echo_n "(cached) " >&6 |
11811 | else | |
11812 | ac_check_lib_save_LIBS=$LIBS | |
11813 | LIBS="-lpng -lz -lm $LIBS" | |
11814 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11815 | /* end confdefs.h. */ | |
11816 | ||
11817 | /* Override any GCC internal prototype to avoid an error. | |
11818 | Use char because int might match the return type of a GCC | |
11819 | builtin and then its argument prototype would still apply. */ | |
11820 | #ifdef __cplusplus | |
11821 | extern "C" | |
11822 | #endif | |
11823 | char png_get_channels (); | |
11824 | int | |
11825 | main () | |
11826 | { | |
11827 | return png_get_channels (); | |
11828 | ; | |
11829 | return 0; | |
11830 | } | |
11831 | _ACEOF | |
11832 | if ac_fn_c_try_link "$LINENO"; then : | |
11833 | ac_cv_lib_png_png_get_channels=yes | |
11834 | else | |
11835 | ac_cv_lib_png_png_get_channels=no | |
11836 | fi | |
11837 | rm -f core conftest.err conftest.$ac_objext \ | |
11838 | conftest$ac_exeext conftest.$ac_ext | |
11839 | LIBS=$ac_check_lib_save_LIBS | |
11840 | fi | |
11841 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_png_png_get_channels" >&5 | |
11842 | $as_echo "$ac_cv_lib_png_png_get_channels" >&6; } | |
9ba41eb9 | 11843 | if test "x$ac_cv_lib_png_png_get_channels" = x""yes; then : |
067d23c9 KY |
11844 | HAVE_PNG=yes |
11845 | fi | |
11846 | ||
11847 | fi | |
11848 | fi | |
11849 | ||
11850 | if test "${HAVE_PNG}" = "yes"; then | |
11851 | ||
11852 | $as_echo "#define HAVE_PNG 1" >>confdefs.h | |
11853 | ||
11854 | LIBPNG="-lpng -lz -lm" | |
11855 | fi | |
11856 | fi | |
11857 | ||
11858 | ||
11859 | ### Use -ltiff if available, unless `--with-tiff=no'. | |
11860 | HAVE_TIFF=no | |
11861 | LIBTIFF= | |
11862 | if test "${HAVE_X11}" = "yes"; then | |
11863 | if test "${with_tiff}" != "no"; then | |
11864 | ac_fn_c_check_header_mongrel "$LINENO" "tiffio.h" "ac_cv_header_tiffio_h" "$ac_includes_default" | |
9ba41eb9 | 11865 | if test "x$ac_cv_header_tiffio_h" = x""yes; then : |
067d23c9 KY |
11866 | tifflibs="-lz -lm" |
11867 | # At least one tiff package requires the jpeg library. | |
11868 | if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi | |
11869 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIFFGetVersion in -ltiff" >&5 | |
11870 | $as_echo_n "checking for TIFFGetVersion in -ltiff... " >&6; } | |
9ba41eb9 | 11871 | if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then : |
067d23c9 KY |
11872 | $as_echo_n "(cached) " >&6 |
11873 | else | |
11874 | ac_check_lib_save_LIBS=$LIBS | |
11875 | LIBS="-ltiff $tifflibs $LIBS" | |
11876 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11877 | /* end confdefs.h. */ | |
11878 | ||
11879 | /* Override any GCC internal prototype to avoid an error. | |
11880 | Use char because int might match the return type of a GCC | |
11881 | builtin and then its argument prototype would still apply. */ | |
11882 | #ifdef __cplusplus | |
11883 | extern "C" | |
11884 | #endif | |
11885 | char TIFFGetVersion (); | |
11886 | int | |
11887 | main () | |
11888 | { | |
11889 | return TIFFGetVersion (); | |
11890 | ; | |
11891 | return 0; | |
11892 | } | |
11893 | _ACEOF | |
11894 | if ac_fn_c_try_link "$LINENO"; then : | |
11895 | ac_cv_lib_tiff_TIFFGetVersion=yes | |
11896 | else | |
11897 | ac_cv_lib_tiff_TIFFGetVersion=no | |
11898 | fi | |
11899 | rm -f core conftest.err conftest.$ac_objext \ | |
11900 | conftest$ac_exeext conftest.$ac_ext | |
11901 | LIBS=$ac_check_lib_save_LIBS | |
11902 | fi | |
11903 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5 | |
11904 | $as_echo "$ac_cv_lib_tiff_TIFFGetVersion" >&6; } | |
9ba41eb9 | 11905 | if test "x$ac_cv_lib_tiff_TIFFGetVersion" = x""yes; then : |
067d23c9 KY |
11906 | HAVE_TIFF=yes |
11907 | fi | |
11908 | ||
11909 | fi | |
11910 | ||
11911 | ||
11912 | fi | |
11913 | ||
11914 | if test "${HAVE_TIFF}" = "yes"; then | |
11915 | ||
11916 | $as_echo "#define HAVE_TIFF 1" >>confdefs.h | |
11917 | ||
11918 | LIBTIFF=-ltiff | |
11919 | fi | |
11920 | fi | |
11921 | ||
11922 | ||
11923 | ### Use -lgif or -lungif if available, unless `--with-gif=no'. | |
11924 | HAVE_GIF=no | |
11925 | LIBGIF= | |
11926 | if test "${HAVE_X11}" = "yes" && test "${with_gif}" != "no"; then | |
11927 | ac_fn_c_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default" | |
9ba41eb9 | 11928 | if test "x$ac_cv_header_gif_lib_h" = x""yes; then : |
067d23c9 KY |
11929 | # EGifPutExtensionLast only exists from version libungif-4.1.0b1. |
11930 | # Earlier versions can crash Emacs. | |
11931 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lgif" >&5 | |
11932 | $as_echo_n "checking for EGifPutExtensionLast in -lgif... " >&6; } | |
9ba41eb9 | 11933 | if test "${ac_cv_lib_gif_EGifPutExtensionLast+set}" = set; then : |
067d23c9 KY |
11934 | $as_echo_n "(cached) " >&6 |
11935 | else | |
11936 | ac_check_lib_save_LIBS=$LIBS | |
11937 | LIBS="-lgif $LIBS" | |
11938 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11939 | /* end confdefs.h. */ | |
11940 | ||
11941 | /* Override any GCC internal prototype to avoid an error. | |
11942 | Use char because int might match the return type of a GCC | |
11943 | builtin and then its argument prototype would still apply. */ | |
11944 | #ifdef __cplusplus | |
11945 | extern "C" | |
11946 | #endif | |
11947 | char EGifPutExtensionLast (); | |
11948 | int | |
11949 | main () | |
11950 | { | |
11951 | return EGifPutExtensionLast (); | |
11952 | ; | |
11953 | return 0; | |
11954 | } | |
11955 | _ACEOF | |
11956 | if ac_fn_c_try_link "$LINENO"; then : | |
11957 | ac_cv_lib_gif_EGifPutExtensionLast=yes | |
11958 | else | |
11959 | ac_cv_lib_gif_EGifPutExtensionLast=no | |
11960 | fi | |
11961 | rm -f core conftest.err conftest.$ac_objext \ | |
11962 | conftest$ac_exeext conftest.$ac_ext | |
11963 | LIBS=$ac_check_lib_save_LIBS | |
11964 | fi | |
11965 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_EGifPutExtensionLast" >&5 | |
11966 | $as_echo "$ac_cv_lib_gif_EGifPutExtensionLast" >&6; } | |
9ba41eb9 | 11967 | if test "x$ac_cv_lib_gif_EGifPutExtensionLast" = x""yes; then : |
067d23c9 KY |
11968 | HAVE_GIF=yes |
11969 | else | |
11970 | HAVE_GIF=maybe | |
11971 | fi | |
11972 | ||
11973 | fi | |
11974 | ||
11975 | ||
11976 | ||
11977 | if test "$HAVE_GIF" = yes; then | |
11978 | LIBGIF=-lgif | |
11979 | elif test "$HAVE_GIF" = maybe; then | |
11980 | # If gif_lib.h but no libgif, try libungif. | |
11981 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lungif" >&5 | |
11982 | $as_echo_n "checking for EGifPutExtensionLast in -lungif... " >&6; } | |
9ba41eb9 | 11983 | if test "${ac_cv_lib_ungif_EGifPutExtensionLast+set}" = set; then : |
067d23c9 KY |
11984 | $as_echo_n "(cached) " >&6 |
11985 | else | |
11986 | ac_check_lib_save_LIBS=$LIBS | |
11987 | LIBS="-lungif $LIBS" | |
11988 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11989 | /* end confdefs.h. */ | |
11990 | ||
11991 | /* Override any GCC internal prototype to avoid an error. | |
11992 | Use char because int might match the return type of a GCC | |
11993 | builtin and then its argument prototype would still apply. */ | |
11994 | #ifdef __cplusplus | |
11995 | extern "C" | |
11996 | #endif | |
11997 | char EGifPutExtensionLast (); | |
11998 | int | |
11999 | main () | |
12000 | { | |
12001 | return EGifPutExtensionLast (); | |
12002 | ; | |
12003 | return 0; | |
12004 | } | |
12005 | _ACEOF | |
12006 | if ac_fn_c_try_link "$LINENO"; then : | |
12007 | ac_cv_lib_ungif_EGifPutExtensionLast=yes | |
12008 | else | |
12009 | ac_cv_lib_ungif_EGifPutExtensionLast=no | |
12010 | fi | |
12011 | rm -f core conftest.err conftest.$ac_objext \ | |
12012 | conftest$ac_exeext conftest.$ac_ext | |
12013 | LIBS=$ac_check_lib_save_LIBS | |
12014 | fi | |
12015 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5 | |
12016 | $as_echo "$ac_cv_lib_ungif_EGifPutExtensionLast" >&6; } | |
9ba41eb9 | 12017 | if test "x$ac_cv_lib_ungif_EGifPutExtensionLast" = x""yes; then : |
067d23c9 KY |
12018 | HAVE_GIF=yes |
12019 | else | |
12020 | HAVE_GIF=no | |
12021 | fi | |
12022 | ||
12023 | test "$HAVE_GIF" = yes && LIBGIF=-lungif | |
12024 | fi | |
12025 | ||
12026 | if test "${HAVE_GIF}" = "yes"; then | |
12027 | ||
12028 | $as_echo "#define HAVE_GIF 1" >>confdefs.h | |
12029 | ||
12030 | fi | |
12031 | fi | |
12032 | ||
12033 | ||
12034 | if test "${HAVE_X11}" = "yes"; then | |
12035 | MISSING="" | |
12036 | WITH_NO="" | |
12037 | test "${with_xpm}" != "no" && test "${HAVE_XPM}" != "yes" && | |
12038 | MISSING="libXpm" && WITH_NO="--with-xpm=no" | |
12039 | test "${with_jpeg}" != "no" && test "${HAVE_JPEG}" != "yes" && | |
12040 | MISSING="$MISSING libjpeg" && WITH_NO="$WITH_NO --with-jpeg=no" | |
12041 | test "${with_png}" != "no" && test "${HAVE_PNG}" != "yes" && | |
12042 | MISSING="$MISSING libpng" && WITH_NO="$WITH_NO --with-png=no" | |
12043 | test "${with_gif}" != "no" && test "${HAVE_GIF}" != "yes" && | |
12044 | MISSING="$MISSING libgif/libungif" && WITH_NO="$WITH_NO --with-gif=no" | |
12045 | test "${with_tiff}" != "no" && test "${HAVE_TIFF}" != "yes" && | |
12046 | MISSING="$MISSING libtiff" && WITH_NO="$WITH_NO --with-tiff=no" | |
12047 | ||
12048 | if test "X${MISSING}" != X; then | |
2018939f | 12049 | as_fn_error $? "The following required libraries were not found: |
067d23c9 KY |
12050 | $MISSING |
12051 | Maybe some development libraries/packages are missing? | |
12052 | If you don't want to link with them give | |
12053 | $WITH_NO | |
12054 | as options to configure" "$LINENO" 5 | |
12055 | fi | |
12056 | fi | |
12057 | ||
12058 | ### Use -lgpm if available, unless `--with-gpm=no'. | |
12059 | HAVE_GPM=no | |
12060 | LIBGPM= | |
12061 | MOUSE_SUPPORT= | |
12062 | if test "${with_gpm}" != "no"; then | |
12063 | ac_fn_c_check_header_mongrel "$LINENO" "gpm.h" "ac_cv_header_gpm_h" "$ac_includes_default" | |
9ba41eb9 | 12064 | if test "x$ac_cv_header_gpm_h" = x""yes; then : |
067d23c9 KY |
12065 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Gpm_Open in -lgpm" >&5 |
12066 | $as_echo_n "checking for Gpm_Open in -lgpm... " >&6; } | |
9ba41eb9 | 12067 | if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then : |
067d23c9 KY |
12068 | $as_echo_n "(cached) " >&6 |
12069 | else | |
12070 | ac_check_lib_save_LIBS=$LIBS | |
12071 | LIBS="-lgpm $LIBS" | |
12072 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12073 | /* end confdefs.h. */ | |
12074 | ||
12075 | /* Override any GCC internal prototype to avoid an error. | |
12076 | Use char because int might match the return type of a GCC | |
12077 | builtin and then its argument prototype would still apply. */ | |
12078 | #ifdef __cplusplus | |
12079 | extern "C" | |
12080 | #endif | |
12081 | char Gpm_Open (); | |
12082 | int | |
12083 | main () | |
12084 | { | |
12085 | return Gpm_Open (); | |
12086 | ; | |
12087 | return 0; | |
12088 | } | |
12089 | _ACEOF | |
12090 | if ac_fn_c_try_link "$LINENO"; then : | |
12091 | ac_cv_lib_gpm_Gpm_Open=yes | |
12092 | else | |
12093 | ac_cv_lib_gpm_Gpm_Open=no | |
12094 | fi | |
12095 | rm -f core conftest.err conftest.$ac_objext \ | |
12096 | conftest$ac_exeext conftest.$ac_ext | |
12097 | LIBS=$ac_check_lib_save_LIBS | |
12098 | fi | |
12099 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gpm_Gpm_Open" >&5 | |
12100 | $as_echo "$ac_cv_lib_gpm_Gpm_Open" >&6; } | |
9ba41eb9 | 12101 | if test "x$ac_cv_lib_gpm_Gpm_Open" = x""yes; then : |
067d23c9 KY |
12102 | HAVE_GPM=yes |
12103 | fi | |
12104 | ||
12105 | fi | |
12106 | ||
12107 | ||
12108 | ||
12109 | if test "${HAVE_GPM}" = "yes"; then | |
12110 | ||
12111 | $as_echo "#define HAVE_GPM 1" >>confdefs.h | |
12112 | ||
12113 | LIBGPM=-lgpm | |
12114 | ## May be reset below. | |
12115 | MOUSE_SUPPORT="\$(GPM_MOUSE_SUPPORT)" | |
12116 | fi | |
12117 | fi | |
12118 | ||
12119 | ||
12120 | ac_fn_c_check_header_mongrel "$LINENO" "malloc/malloc.h" "ac_cv_header_malloc_malloc_h" "$ac_includes_default" | |
9ba41eb9 | 12121 | if test "x$ac_cv_header_malloc_malloc_h" = x""yes; then : |
067d23c9 KY |
12122 | |
12123 | $as_echo "#define HAVE_MALLOC_MALLOC_H 1" >>confdefs.h | |
12124 | ||
12125 | fi | |
12126 | ||
12127 | ||
12128 | ||
12129 | C_SWITCH_X_SYSTEM= | |
12130 | ### Use NeXTstep API to implement GUI. | |
12131 | if test "${HAVE_NS}" = "yes"; then | |
12132 | ||
12133 | $as_echo "#define HAVE_NS 1" >>confdefs.h | |
12134 | ||
12135 | if test "${NS_IMPL_COCOA}" = "yes"; then | |
12136 | ||
12137 | $as_echo "#define NS_IMPL_COCOA 1" >>confdefs.h | |
12138 | ||
12139 | GNU_OBJC_CFLAGS= | |
12140 | fi | |
12141 | if test "${NS_IMPL_GNUSTEP}" = "yes"; then | |
12142 | ||
12143 | $as_echo "#define NS_IMPL_GNUSTEP 1" >>confdefs.h | |
12144 | ||
12145 | # See also .m.o rule in Makefile.in */ | |
12146 | # FIXME: are all these flags really needed? Document here why. */ | |
12147 | C_SWITCH_X_SYSTEM="-D_REENTRANT -fPIC -fno-strict-aliasing" | |
12148 | GNU_OBJC_CFLAGS="-fgnu-runtime -Wno-import -fconstant-string-class=NSConstantString -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGSWARN -DGSDIAGNOSE" | |
12149 | fi | |
12150 | if test "${NS_HAVE_NSINTEGER}" = "yes"; then | |
12151 | ||
12152 | $as_echo "#define NS_HAVE_NSINTEGER 1" >>confdefs.h | |
12153 | ||
12154 | fi | |
12155 | # We also have mouse menus. | |
12156 | HAVE_MENUS=yes | |
12157 | OTHER_FILES=ns-app | |
12158 | fi | |
12159 | ||
12160 | ||
12161 | ### Use session management (-lSM -lICE) if available | |
12162 | HAVE_X_SM=no | |
12163 | LIBXSM= | |
12164 | if test "${HAVE_X11}" = "yes"; then | |
12165 | ac_fn_c_check_header_mongrel "$LINENO" "X11/SM/SMlib.h" "ac_cv_header_X11_SM_SMlib_h" "$ac_includes_default" | |
9ba41eb9 | 12166 | if test "x$ac_cv_header_X11_SM_SMlib_h" = x""yes; then : |
067d23c9 KY |
12167 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SmcOpenConnection in -lSM" >&5 |
12168 | $as_echo_n "checking for SmcOpenConnection in -lSM... " >&6; } | |
9ba41eb9 | 12169 | if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then : |
067d23c9 KY |
12170 | $as_echo_n "(cached) " >&6 |
12171 | else | |
12172 | ac_check_lib_save_LIBS=$LIBS | |
12173 | LIBS="-lSM -lICE $LIBS" | |
12174 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12175 | /* end confdefs.h. */ | |
12176 | ||
12177 | /* Override any GCC internal prototype to avoid an error. | |
12178 | Use char because int might match the return type of a GCC | |
12179 | builtin and then its argument prototype would still apply. */ | |
12180 | #ifdef __cplusplus | |
12181 | extern "C" | |
12182 | #endif | |
12183 | char SmcOpenConnection (); | |
12184 | int | |
12185 | main () | |
12186 | { | |
12187 | return SmcOpenConnection (); | |
12188 | ; | |
12189 | return 0; | |
12190 | } | |
12191 | _ACEOF | |
12192 | if ac_fn_c_try_link "$LINENO"; then : | |
12193 | ac_cv_lib_SM_SmcOpenConnection=yes | |
12194 | else | |
12195 | ac_cv_lib_SM_SmcOpenConnection=no | |
12196 | fi | |
12197 | rm -f core conftest.err conftest.$ac_objext \ | |
12198 | conftest$ac_exeext conftest.$ac_ext | |
12199 | LIBS=$ac_check_lib_save_LIBS | |
12200 | fi | |
12201 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_SM_SmcOpenConnection" >&5 | |
12202 | $as_echo "$ac_cv_lib_SM_SmcOpenConnection" >&6; } | |
9ba41eb9 | 12203 | if test "x$ac_cv_lib_SM_SmcOpenConnection" = x""yes; then : |
067d23c9 KY |
12204 | HAVE_X_SM=yes |
12205 | fi | |
12206 | ||
12207 | fi | |
12208 | ||
12209 | ||
12210 | ||
12211 | if test "${HAVE_X_SM}" = "yes"; then | |
12212 | ||
12213 | $as_echo "#define HAVE_X_SM 1" >>confdefs.h | |
12214 | ||
12215 | LIBXSM="-lSM -lICE" | |
12216 | case "$LIBS" in | |
12217 | *-lSM*) ;; | |
12218 | *) LIBS="$LIBXSM $LIBS" ;; | |
12219 | esac | |
12220 | fi | |
12221 | fi | |
12222 | ||
12223 | ||
12224 | ### Use libxml (-lxml2) if available | |
12225 | if test "${with_xml2}" != "no"; then | |
12226 | ### I'm not sure what the version number should be, so I just guessed. | |
12227 | ||
12228 | succeeded=no | |
12229 | ||
12230 | # Extract the first word of "pkg-config", so it can be a program name with args. | |
12231 | set dummy pkg-config; ac_word=$2 | |
12232 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
12233 | $as_echo_n "checking for $ac_word... " >&6; } | |
9ba41eb9 | 12234 | if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : |
067d23c9 KY |
12235 | $as_echo_n "(cached) " >&6 |
12236 | else | |
12237 | case $PKG_CONFIG in | |
12238 | [\\/]* | ?:[\\/]*) | |
12239 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
12240 | ;; | |
12241 | *) | |
12242 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
12243 | for as_dir in $PATH | |
12244 | do | |
12245 | IFS=$as_save_IFS | |
12246 | test -z "$as_dir" && as_dir=. | |
12247 | for ac_exec_ext in '' $ac_executable_extensions; do | |
12248 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
12249 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
12250 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
12251 | break 2 | |
12252 | fi | |
12253 | done | |
12254 | done | |
12255 | IFS=$as_save_IFS | |
12256 | ||
12257 | test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" | |
12258 | ;; | |
12259 | esac | |
12260 | fi | |
12261 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG | |
12262 | if test -n "$PKG_CONFIG"; then | |
12263 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
12264 | $as_echo "$PKG_CONFIG" >&6; } | |
12265 | else | |
12266 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
12267 | $as_echo "no" >&6; } | |
12268 | fi | |
12269 | ||
12270 | ||
12271 | ||
12272 | if test "$PKG_CONFIG" = "no" ; then | |
12273 | HAVE_LIBXML2=no | |
12274 | else | |
12275 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
12276 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
dab73760 CY |
12277 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxml-2.0 > 2.6.17" >&5 |
12278 | $as_echo_n "checking for libxml-2.0 > 2.6.17... " >&6; } | |
067d23c9 | 12279 | |
dab73760 | 12280 | if $PKG_CONFIG --exists "libxml-2.0 > 2.6.17" 2>&5; then |
067d23c9 KY |
12281 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
12282 | $as_echo "yes" >&6; } | |
12283 | succeeded=yes | |
12284 | ||
12285 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBXML2_CFLAGS" >&5 | |
12286 | $as_echo_n "checking LIBXML2_CFLAGS... " >&6; } | |
dab73760 | 12287 | LIBXML2_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0 > 2.6.17"|sed -e 's,///*,/,g'` |
067d23c9 KY |
12288 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBXML2_CFLAGS" >&5 |
12289 | $as_echo "$LIBXML2_CFLAGS" >&6; } | |
12290 | ||
12291 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBXML2_LIBS" >&5 | |
12292 | $as_echo_n "checking LIBXML2_LIBS... " >&6; } | |
dab73760 | 12293 | LIBXML2_LIBS=`$PKG_CONFIG --libs "libxml-2.0 > 2.6.17"|sed -e 's,///*,/,g'` |
067d23c9 KY |
12294 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBXML2_LIBS" >&5 |
12295 | $as_echo "$LIBXML2_LIBS" >&6; } | |
12296 | else | |
12297 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
12298 | $as_echo "no" >&6; } | |
12299 | LIBXML2_CFLAGS="" | |
12300 | LIBXML2_LIBS="" | |
12301 | ## If we have a custom action on failure, don't print errors, but | |
12302 | ## do set a variable so people can do so. | |
dab73760 | 12303 | LIBXML2_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libxml-2.0 > 2.6.17"` |
067d23c9 KY |
12304 | |
12305 | fi | |
12306 | ||
12307 | ||
12308 | ||
12309 | else | |
12310 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
12311 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
12312 | fi | |
12313 | fi | |
12314 | ||
12315 | if test $succeeded = yes; then | |
12316 | HAVE_LIBXML2=yes | |
12317 | else | |
12318 | HAVE_LIBXML2=no | |
12319 | fi | |
12320 | ||
12321 | if test "${HAVE_LIBXML2}" = "yes"; then | |
12322 | LIBS="$LIBXML2_LIBS $LIBS" | |
12323 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for htmlReadMemory in -lxml2" >&5 | |
12324 | $as_echo_n "checking for htmlReadMemory in -lxml2... " >&6; } | |
9ba41eb9 | 12325 | if test "${ac_cv_lib_xml2_htmlReadMemory+set}" = set; then : |
067d23c9 KY |
12326 | $as_echo_n "(cached) " >&6 |
12327 | else | |
12328 | ac_check_lib_save_LIBS=$LIBS | |
12329 | LIBS="-lxml2 $LIBS" | |
12330 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12331 | /* end confdefs.h. */ | |
12332 | ||
12333 | /* Override any GCC internal prototype to avoid an error. | |
12334 | Use char because int might match the return type of a GCC | |
12335 | builtin and then its argument prototype would still apply. */ | |
12336 | #ifdef __cplusplus | |
12337 | extern "C" | |
12338 | #endif | |
12339 | char htmlReadMemory (); | |
12340 | int | |
12341 | main () | |
12342 | { | |
12343 | return htmlReadMemory (); | |
12344 | ; | |
12345 | return 0; | |
12346 | } | |
12347 | _ACEOF | |
12348 | if ac_fn_c_try_link "$LINENO"; then : | |
12349 | ac_cv_lib_xml2_htmlReadMemory=yes | |
12350 | else | |
12351 | ac_cv_lib_xml2_htmlReadMemory=no | |
12352 | fi | |
12353 | rm -f core conftest.err conftest.$ac_objext \ | |
12354 | conftest$ac_exeext conftest.$ac_ext | |
12355 | LIBS=$ac_check_lib_save_LIBS | |
12356 | fi | |
12357 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_htmlReadMemory" >&5 | |
12358 | $as_echo "$ac_cv_lib_xml2_htmlReadMemory" >&6; } | |
9ba41eb9 | 12359 | if test "x$ac_cv_lib_xml2_htmlReadMemory" = x""yes; then : |
067d23c9 KY |
12360 | HAVE_LIBXML2=yes |
12361 | else | |
12362 | HAVE_LIBXML2=no | |
12363 | fi | |
12364 | ||
12365 | if test "${HAVE_LIBXML2}" = "yes"; then | |
12366 | ||
12367 | $as_echo "#define HAVE_LIBXML2 1" >>confdefs.h | |
12368 | ||
12369 | else | |
12370 | LIBXML2_LIBS="" | |
12371 | LIBXML2_CFLAGS="" | |
12372 | fi | |
12373 | fi | |
12374 | fi | |
12375 | ||
12376 | ||
12377 | ||
12378 | # If netdb.h doesn't declare h_errno, we must declare it by hand. | |
12379 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether netdb declares h_errno" >&5 | |
12380 | $as_echo_n "checking whether netdb declares h_errno... " >&6; } | |
9ba41eb9 | 12381 | if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then : |
067d23c9 KY |
12382 | $as_echo_n "(cached) " >&6 |
12383 | else | |
12384 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12385 | /* end confdefs.h. */ | |
12386 | #include <netdb.h> | |
12387 | int | |
12388 | main () | |
12389 | { | |
12390 | return h_errno; | |
12391 | ; | |
12392 | return 0; | |
12393 | } | |
12394 | _ACEOF | |
12395 | if ac_fn_c_try_link "$LINENO"; then : | |
12396 | emacs_cv_netdb_declares_h_errno=yes | |
12397 | else | |
12398 | emacs_cv_netdb_declares_h_errno=no | |
12399 | fi | |
12400 | rm -f core conftest.err conftest.$ac_objext \ | |
12401 | conftest$ac_exeext conftest.$ac_ext | |
12402 | fi | |
12403 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_netdb_declares_h_errno" >&5 | |
12404 | $as_echo "$emacs_cv_netdb_declares_h_errno" >&6; } | |
12405 | if test $emacs_cv_netdb_declares_h_errno = yes; then | |
12406 | ||
12407 | $as_echo "#define HAVE_H_ERRNO 1" >>confdefs.h | |
12408 | ||
12409 | fi | |
12410 | ||
12411 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works | |
12412 | # for constant arguments. Useless! | |
12413 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 | |
12414 | $as_echo_n "checking for working alloca.h... " >&6; } | |
9ba41eb9 | 12415 | if test "${ac_cv_working_alloca_h+set}" = set; then : |
067d23c9 KY |
12416 | $as_echo_n "(cached) " >&6 |
12417 | else | |
12418 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12419 | /* end confdefs.h. */ | |
12420 | #include <alloca.h> | |
12421 | int | |
12422 | main () | |
12423 | { | |
12424 | char *p = (char *) alloca (2 * sizeof (int)); | |
12425 | if (p) return 0; | |
12426 | ; | |
12427 | return 0; | |
12428 | } | |
12429 | _ACEOF | |
12430 | if ac_fn_c_try_link "$LINENO"; then : | |
12431 | ac_cv_working_alloca_h=yes | |
12432 | else | |
12433 | ac_cv_working_alloca_h=no | |
12434 | fi | |
12435 | rm -f core conftest.err conftest.$ac_objext \ | |
12436 | conftest$ac_exeext conftest.$ac_ext | |
12437 | fi | |
12438 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 | |
12439 | $as_echo "$ac_cv_working_alloca_h" >&6; } | |
12440 | if test $ac_cv_working_alloca_h = yes; then | |
12441 | ||
12442 | $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h | |
12443 | ||
12444 | fi | |
12445 | ||
12446 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 | |
12447 | $as_echo_n "checking for alloca... " >&6; } | |
9ba41eb9 | 12448 | if test "${ac_cv_func_alloca_works+set}" = set; then : |
067d23c9 KY |
12449 | $as_echo_n "(cached) " >&6 |
12450 | else | |
12451 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12452 | /* end confdefs.h. */ | |
12453 | #ifdef __GNUC__ | |
12454 | # define alloca __builtin_alloca | |
12455 | #else | |
12456 | # ifdef _MSC_VER | |
12457 | # include <malloc.h> | |
12458 | # define alloca _alloca | |
12459 | # else | |
12460 | # ifdef HAVE_ALLOCA_H | |
12461 | # include <alloca.h> | |
12462 | # else | |
12463 | # ifdef _AIX | |
12464 | #pragma alloca | |
12465 | # else | |
12466 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
9ba41eb9 | 12467 | char *alloca (); |
067d23c9 KY |
12468 | # endif |
12469 | # endif | |
12470 | # endif | |
12471 | # endif | |
12472 | #endif | |
12473 | ||
12474 | int | |
12475 | main () | |
12476 | { | |
12477 | char *p = (char *) alloca (1); | |
12478 | if (p) return 0; | |
12479 | ; | |
12480 | return 0; | |
12481 | } | |
12482 | _ACEOF | |
12483 | if ac_fn_c_try_link "$LINENO"; then : | |
12484 | ac_cv_func_alloca_works=yes | |
12485 | else | |
12486 | ac_cv_func_alloca_works=no | |
12487 | fi | |
12488 | rm -f core conftest.err conftest.$ac_objext \ | |
12489 | conftest$ac_exeext conftest.$ac_ext | |
12490 | fi | |
12491 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 | |
12492 | $as_echo "$ac_cv_func_alloca_works" >&6; } | |
12493 | ||
12494 | if test $ac_cv_func_alloca_works = yes; then | |
12495 | ||
12496 | $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h | |
12497 | ||
12498 | else | |
12499 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
12500 | # that cause trouble. Some versions do not even contain alloca or | |
12501 | # contain a buggy version. If you still want to use their alloca, | |
12502 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
12503 | ||
12504 | ALLOCA=\${LIBOBJDIR}alloca.$ac_objext | |
12505 | ||
12506 | $as_echo "#define C_ALLOCA 1" >>confdefs.h | |
12507 | ||
12508 | ||
12509 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 | |
12510 | $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } | |
9ba41eb9 | 12511 | if test "${ac_cv_os_cray+set}" = set; then : |
067d23c9 KY |
12512 | $as_echo_n "(cached) " >&6 |
12513 | else | |
12514 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12515 | /* end confdefs.h. */ | |
12516 | #if defined CRAY && ! defined CRAY2 | |
12517 | webecray | |
12518 | #else | |
12519 | wenotbecray | |
12520 | #endif | |
12521 | ||
12522 | _ACEOF | |
12523 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
12524 | $EGREP "webecray" >/dev/null 2>&1; then : | |
12525 | ac_cv_os_cray=yes | |
12526 | else | |
12527 | ac_cv_os_cray=no | |
12528 | fi | |
12529 | rm -f conftest* | |
12530 | ||
12531 | fi | |
12532 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 | |
12533 | $as_echo "$ac_cv_os_cray" >&6; } | |
12534 | if test $ac_cv_os_cray = yes; then | |
12535 | for ac_func in _getb67 GETB67 getb67; do | |
12536 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
12537 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
2018939f | 12538 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : |
067d23c9 KY |
12539 | |
12540 | cat >>confdefs.h <<_ACEOF | |
12541 | #define CRAY_STACKSEG_END $ac_func | |
12542 | _ACEOF | |
12543 | ||
12544 | break | |
12545 | fi | |
12546 | ||
12547 | done | |
12548 | fi | |
12549 | ||
12550 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 | |
12551 | $as_echo_n "checking stack direction for C alloca... " >&6; } | |
9ba41eb9 | 12552 | if test "${ac_cv_c_stack_direction+set}" = set; then : |
067d23c9 KY |
12553 | $as_echo_n "(cached) " >&6 |
12554 | else | |
12555 | if test "$cross_compiling" = yes; then : | |
12556 | ac_cv_c_stack_direction=0 | |
12557 | else | |
12558 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12559 | /* end confdefs.h. */ | |
12560 | $ac_includes_default | |
12561 | int | |
12562 | find_stack_direction () | |
12563 | { | |
12564 | static char *addr = 0; | |
12565 | auto char dummy; | |
12566 | if (addr == 0) | |
12567 | { | |
12568 | addr = &dummy; | |
12569 | return find_stack_direction (); | |
12570 | } | |
12571 | else | |
12572 | return (&dummy > addr) ? 1 : -1; | |
12573 | } | |
12574 | ||
12575 | int | |
12576 | main () | |
12577 | { | |
12578 | return find_stack_direction () < 0; | |
12579 | } | |
12580 | _ACEOF | |
12581 | if ac_fn_c_try_run "$LINENO"; then : | |
12582 | ac_cv_c_stack_direction=1 | |
12583 | else | |
12584 | ac_cv_c_stack_direction=-1 | |
12585 | fi | |
12586 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
12587 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
12588 | fi | |
12589 | ||
12590 | fi | |
12591 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 | |
12592 | $as_echo "$ac_cv_c_stack_direction" >&6; } | |
12593 | cat >>confdefs.h <<_ACEOF | |
12594 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
12595 | _ACEOF | |
12596 | ||
12597 | ||
12598 | fi | |
12599 | ||
12600 | ||
12601 | if test x"$ac_cv_func_alloca_works" != xyes; then | |
2018939f | 12602 | as_fn_error $? "a system implementation of alloca is required " "$LINENO" 5 |
067d23c9 KY |
12603 | fi |
12604 | ||
12605 | # fmod, logb, and frexp are found in -lm on most systems. | |
12606 | # On HPUX 9.01, -lm does not contain logb, so check for sqrt. | |
12607 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5 | |
12608 | $as_echo_n "checking for sqrt in -lm... " >&6; } | |
9ba41eb9 | 12609 | if test "${ac_cv_lib_m_sqrt+set}" = set; then : |
067d23c9 KY |
12610 | $as_echo_n "(cached) " >&6 |
12611 | else | |
12612 | ac_check_lib_save_LIBS=$LIBS | |
12613 | LIBS="-lm $LIBS" | |
12614 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12615 | /* end confdefs.h. */ | |
12616 | ||
12617 | /* Override any GCC internal prototype to avoid an error. | |
12618 | Use char because int might match the return type of a GCC | |
12619 | builtin and then its argument prototype would still apply. */ | |
12620 | #ifdef __cplusplus | |
12621 | extern "C" | |
12622 | #endif | |
12623 | char sqrt (); | |
12624 | int | |
12625 | main () | |
12626 | { | |
12627 | return sqrt (); | |
12628 | ; | |
12629 | return 0; | |
12630 | } | |
12631 | _ACEOF | |
12632 | if ac_fn_c_try_link "$LINENO"; then : | |
12633 | ac_cv_lib_m_sqrt=yes | |
12634 | else | |
12635 | ac_cv_lib_m_sqrt=no | |
12636 | fi | |
12637 | rm -f core conftest.err conftest.$ac_objext \ | |
12638 | conftest$ac_exeext conftest.$ac_ext | |
12639 | LIBS=$ac_check_lib_save_LIBS | |
12640 | fi | |
12641 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sqrt" >&5 | |
12642 | $as_echo "$ac_cv_lib_m_sqrt" >&6; } | |
9ba41eb9 | 12643 | if test "x$ac_cv_lib_m_sqrt" = x""yes; then : |
067d23c9 KY |
12644 | cat >>confdefs.h <<_ACEOF |
12645 | #define HAVE_LIBM 1 | |
12646 | _ACEOF | |
12647 | ||
12648 | LIBS="-lm $LIBS" | |
12649 | ||
12650 | fi | |
12651 | ||
12652 | ||
12653 | # Check for mail-locking functions in a "mail" library. Probably this should | |
12654 | # have the same check as for liblockfile below. | |
12655 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -lmail" >&5 | |
12656 | $as_echo_n "checking for maillock in -lmail... " >&6; } | |
9ba41eb9 | 12657 | if test "${ac_cv_lib_mail_maillock+set}" = set; then : |
067d23c9 KY |
12658 | $as_echo_n "(cached) " >&6 |
12659 | else | |
12660 | ac_check_lib_save_LIBS=$LIBS | |
12661 | LIBS="-lmail $LIBS" | |
12662 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12663 | /* end confdefs.h. */ | |
12664 | ||
12665 | /* Override any GCC internal prototype to avoid an error. | |
12666 | Use char because int might match the return type of a GCC | |
12667 | builtin and then its argument prototype would still apply. */ | |
12668 | #ifdef __cplusplus | |
12669 | extern "C" | |
12670 | #endif | |
12671 | char maillock (); | |
12672 | int | |
12673 | main () | |
12674 | { | |
12675 | return maillock (); | |
12676 | ; | |
12677 | return 0; | |
12678 | } | |
12679 | _ACEOF | |
12680 | if ac_fn_c_try_link "$LINENO"; then : | |
12681 | ac_cv_lib_mail_maillock=yes | |
12682 | else | |
12683 | ac_cv_lib_mail_maillock=no | |
12684 | fi | |
12685 | rm -f core conftest.err conftest.$ac_objext \ | |
12686 | conftest$ac_exeext conftest.$ac_ext | |
12687 | LIBS=$ac_check_lib_save_LIBS | |
12688 | fi | |
12689 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mail_maillock" >&5 | |
12690 | $as_echo "$ac_cv_lib_mail_maillock" >&6; } | |
9ba41eb9 | 12691 | if test "x$ac_cv_lib_mail_maillock" = x""yes; then : |
067d23c9 KY |
12692 | have_mail=yes |
12693 | else | |
12694 | have_mail=no | |
12695 | fi | |
12696 | ||
12697 | if test $have_mail = yes; then | |
12698 | LIBS_MAIL=-lmail | |
12699 | LIBS="$LIBS_MAIL $LIBS" | |
12700 | ||
12701 | $as_echo "#define HAVE_LIBMAIL 1" >>confdefs.h | |
12702 | ||
12703 | else | |
12704 | LIBS_MAIL= | |
12705 | fi | |
12706 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -llockfile" >&5 | |
12707 | $as_echo_n "checking for maillock in -llockfile... " >&6; } | |
9ba41eb9 | 12708 | if test "${ac_cv_lib_lockfile_maillock+set}" = set; then : |
067d23c9 KY |
12709 | $as_echo_n "(cached) " >&6 |
12710 | else | |
12711 | ac_check_lib_save_LIBS=$LIBS | |
12712 | LIBS="-llockfile $LIBS" | |
12713 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12714 | /* end confdefs.h. */ | |
12715 | ||
12716 | /* Override any GCC internal prototype to avoid an error. | |
12717 | Use char because int might match the return type of a GCC | |
12718 | builtin and then its argument prototype would still apply. */ | |
12719 | #ifdef __cplusplus | |
12720 | extern "C" | |
12721 | #endif | |
12722 | char maillock (); | |
12723 | int | |
12724 | main () | |
12725 | { | |
12726 | return maillock (); | |
12727 | ; | |
12728 | return 0; | |
12729 | } | |
12730 | _ACEOF | |
12731 | if ac_fn_c_try_link "$LINENO"; then : | |
12732 | ac_cv_lib_lockfile_maillock=yes | |
12733 | else | |
12734 | ac_cv_lib_lockfile_maillock=no | |
12735 | fi | |
12736 | rm -f core conftest.err conftest.$ac_objext \ | |
12737 | conftest$ac_exeext conftest.$ac_ext | |
12738 | LIBS=$ac_check_lib_save_LIBS | |
12739 | fi | |
12740 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lockfile_maillock" >&5 | |
12741 | $as_echo "$ac_cv_lib_lockfile_maillock" >&6; } | |
9ba41eb9 | 12742 | if test "x$ac_cv_lib_lockfile_maillock" = x""yes; then : |
067d23c9 KY |
12743 | have_lockfile=yes |
12744 | else | |
12745 | have_lockfile=no | |
12746 | fi | |
12747 | ||
12748 | if test $have_lockfile = yes; then | |
12749 | LIBS_MAIL=-llockfile | |
12750 | LIBS="$LIBS_MAIL $LIBS" | |
12751 | ||
12752 | $as_echo "#define HAVE_LIBLOCKFILE 1" >>confdefs.h | |
12753 | ||
12754 | else | |
12755 | # If we have the shared liblockfile, assume we must use it for mail | |
12756 | # locking (e.g. Debian). If we couldn't link against liblockfile | |
12757 | # (no liblockfile.a installed), ensure that we don't need to. | |
12758 | # Extract the first word of "liblockfile.so", so it can be a program name with args. | |
12759 | set dummy liblockfile.so; ac_word=$2 | |
12760 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
12761 | $as_echo_n "checking for $ac_word... " >&6; } | |
9ba41eb9 | 12762 | if test "${ac_cv_prog_liblockfile+set}" = set; then : |
067d23c9 KY |
12763 | $as_echo_n "(cached) " >&6 |
12764 | else | |
12765 | if test -n "$liblockfile"; then | |
12766 | ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test. | |
12767 | else | |
12768 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
12769 | as_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH" | |
12770 | for as_dir in $as_dummy | |
12771 | do | |
12772 | IFS=$as_save_IFS | |
12773 | test -z "$as_dir" && as_dir=. | |
12774 | for ac_exec_ext in '' $ac_executable_extensions; do | |
12775 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
12776 | ac_cv_prog_liblockfile="yes" | |
12777 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
12778 | break 2 | |
12779 | fi | |
12780 | done | |
12781 | done | |
12782 | IFS=$as_save_IFS | |
12783 | ||
12784 | test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no" | |
12785 | fi | |
12786 | fi | |
12787 | liblockfile=$ac_cv_prog_liblockfile | |
12788 | if test -n "$liblockfile"; then | |
12789 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $liblockfile" >&5 | |
12790 | $as_echo "$liblockfile" >&6; } | |
12791 | else | |
12792 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
12793 | $as_echo "no" >&6; } | |
12794 | fi | |
12795 | ||
12796 | ||
12797 | if test $ac_cv_prog_liblockfile = yes; then | |
2018939f | 12798 | as_fn_error $? "Shared liblockfile found but can't link against it. |
067d23c9 KY |
12799 | This probably means that movemail could lose mail. |
12800 | There may be a \`development' package to install containing liblockfile." "$LINENO" 5 | |
12801 | fi | |
12802 | fi | |
12803 | for ac_func in touchlock | |
12804 | do : | |
12805 | ac_fn_c_check_func "$LINENO" "touchlock" "ac_cv_func_touchlock" | |
9ba41eb9 | 12806 | if test "x$ac_cv_func_touchlock" = x""yes; then : |
067d23c9 KY |
12807 | cat >>confdefs.h <<_ACEOF |
12808 | #define HAVE_TOUCHLOCK 1 | |
12809 | _ACEOF | |
12810 | ||
12811 | fi | |
12812 | done | |
12813 | ||
12814 | for ac_header in maillock.h | |
12815 | do : | |
12816 | ac_fn_c_check_header_mongrel "$LINENO" "maillock.h" "ac_cv_header_maillock_h" "$ac_includes_default" | |
9ba41eb9 | 12817 | if test "x$ac_cv_header_maillock_h" = x""yes; then : |
067d23c9 KY |
12818 | cat >>confdefs.h <<_ACEOF |
12819 | #define HAVE_MAILLOCK_H 1 | |
12820 | _ACEOF | |
12821 | ||
12822 | fi | |
12823 | ||
12824 | done | |
12825 | ||
12826 | ||
12827 | ||
12828 | ## Define MAIL_USE_FLOCK (or LOCKF) if the mailer uses flock (or lockf) to | |
12829 | ## interlock access to the mail spool. The alternative is a lock file named | |
12830 | ## /usr/spool/mail/$USER.lock. | |
12831 | mail_lock=no | |
12832 | case "$opsys" in | |
12833 | aix4-2) mail_lock="lockf" ;; | |
12834 | ||
12835 | gnu|freebsd|netbsd|openbsd|darwin|irix6-5) mail_lock="flock" ;; | |
12836 | ||
12837 | ## On GNU/Linux systems, both methods are used by various mail programs. | |
12838 | ## I assume most people are using newer mailers that have heard of flock. | |
12839 | ## Change this if you need to. | |
12840 | ## Debian contains a patch which says: ``On Debian/GNU/Linux systems, | |
12841 | ## configure gets the right answers, and that means *NOT* using flock. | |
12842 | ## Using flock is guaranteed to be the wrong thing. See Debian Policy | |
12843 | ## for details.'' and then uses `#ifdef DEBIAN'. Unfortunately the | |
12844 | ## Debian maintainer hasn't provided a clean fix for Emacs. | |
12845 | ## movemail.c will use `maillock' when MAILDIR, HAVE_LIBMAIL and | |
12846 | ## HAVE_MAILLOCK_H are defined, so the following appears to be the | |
12847 | ## correct logic. -- fx | |
12848 | ## We must check for HAVE_LIBLOCKFILE too, as movemail does. | |
12849 | ## liblockfile is a Free Software replacement for libmail, used on | |
12850 | ## Debian systems and elsewhere. -rfr. | |
12851 | gnu-*) | |
12852 | mail_lock="flock" | |
12853 | if test $have_mail = yes || test $have_lockfile = yes; then | |
12854 | test $ac_cv_header_maillock_h = yes && mail_lock=no | |
12855 | fi | |
12856 | ;; | |
12857 | esac | |
12858 | ||
12859 | BLESSMAIL_TARGET= | |
12860 | case "$mail_lock" in | |
12861 | flock) | |
12862 | $as_echo "#define MAIL_USE_FLOCK 1" >>confdefs.h | |
12863 | ;; | |
12864 | ||
12865 | lockf) | |
12866 | $as_echo "#define MAIL_USE_LOCKF 1" >>confdefs.h | |
12867 | ;; | |
12868 | ||
12869 | *) BLESSMAIL_TARGET="need-blessmail" ;; | |
12870 | esac | |
12871 | ||
12872 | ||
12873 | ||
12874 | for ac_func in gethostname getdomainname dup2 \ | |
12875 | rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \ | |
12876 | random lrand48 logb frexp fmod rint cbrt ftime setsid \ | |
1fd182f0 | 12877 | strerror fpathconf select euidaccess getpagesize tzset setlocale \ |
067d23c9 KY |
12878 | utimes getrlimit setrlimit setpgid getcwd getwd shutdown getaddrinfo \ |
12879 | __fpending mblen mbrlen mbsinit strsignal setitimer ualarm strchr strrchr \ | |
12880 | sendto recvfrom getsockopt setsockopt getsockname getpeername \ | |
12881 | gai_strerror mkstemp getline getdelim mremap memmove fsync sync \ | |
12882 | memset memcmp difftime memcpy mempcpy mblen mbrlen posix_memalign \ | |
12883 | cfmakeraw cfsetspeed isnan copysign __executable_start | |
12884 | do : | |
12885 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
12886 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
2018939f | 12887 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : |
067d23c9 KY |
12888 | cat >>confdefs.h <<_ACEOF |
12889 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
12890 | _ACEOF | |
12891 | ||
12892 | fi | |
12893 | done | |
12894 | ||
12895 | ||
2018939f AS |
12896 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unwind_init" >&5 |
12897 | $as_echo_n "checking for __builtin_unwind_init... " >&6; } | |
9ba41eb9 | 12898 | if test "${emacs_cv_func___builtin_unwind_init+set}" = set; then : |
2018939f AS |
12899 | $as_echo_n "(cached) " >&6 |
12900 | else | |
12901 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12902 | /* end confdefs.h. */ | |
12903 | ||
12904 | int | |
12905 | main () | |
12906 | { | |
12907 | __builtin_unwind_init (); | |
12908 | ; | |
12909 | return 0; | |
12910 | } | |
12911 | _ACEOF | |
12912 | if ac_fn_c_try_link "$LINENO"; then : | |
12913 | emacs_cv_func___builtin_unwind_init=yes | |
12914 | else | |
12915 | emacs_cv_func___builtin_unwind_init=no | |
12916 | fi | |
12917 | rm -f core conftest.err conftest.$ac_objext \ | |
12918 | conftest$ac_exeext conftest.$ac_ext | |
12919 | fi | |
12920 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_func___builtin_unwind_init" >&5 | |
12921 | $as_echo "$emacs_cv_func___builtin_unwind_init" >&6; } | |
12922 | if test $emacs_cv_func___builtin_unwind_init = yes; then | |
12923 | ||
12924 | $as_echo "#define HAVE___BUILTIN_UNWIND_INIT 1" >>confdefs.h | |
12925 | ||
12926 | fi | |
12927 | ||
067d23c9 KY |
12928 | for ac_header in sys/un.h |
12929 | do : | |
12930 | ac_fn_c_check_header_mongrel "$LINENO" "sys/un.h" "ac_cv_header_sys_un_h" "$ac_includes_default" | |
9ba41eb9 | 12931 | if test "x$ac_cv_header_sys_un_h" = x""yes; then : |
067d23c9 KY |
12932 | cat >>confdefs.h <<_ACEOF |
12933 | #define HAVE_SYS_UN_H 1 | |
12934 | _ACEOF | |
12935 | ||
12936 | fi | |
12937 | ||
12938 | done | |
12939 | ||
12940 | ||
1fd182f0 | 12941 | ac_have_func=no # yes means we've found a way to get the load average. |
067d23c9 KY |
12942 | |
12943 | # Make sure getloadavg.c is where it belongs, at configure-time. | |
12944 | test -f "$srcdir/$ac_config_libobj_dir/getloadavg.c" || | |
2018939f | 12945 | as_fn_error $? "$srcdir/$ac_config_libobj_dir/getloadavg.c is missing" "$LINENO" 5 |
067d23c9 KY |
12946 | |
12947 | ac_save_LIBS=$LIBS | |
12948 | ||
12949 | # Check for getloadavg, but be sure not to touch the cache variable. | |
12950 | (ac_fn_c_check_func "$LINENO" "getloadavg" "ac_cv_func_getloadavg" | |
9ba41eb9 | 12951 | if test "x$ac_cv_func_getloadavg" = x""yes; then : |
067d23c9 KY |
12952 | exit 0 |
12953 | else | |
12954 | exit 1 | |
12955 | fi | |
12956 | ) && ac_have_func=yes | |
12957 | ||
12958 | # On HPUX9, an unprivileged user can get load averages through this function. | |
12959 | for ac_func in pstat_getdynamic | |
12960 | do : | |
12961 | ac_fn_c_check_func "$LINENO" "pstat_getdynamic" "ac_cv_func_pstat_getdynamic" | |
9ba41eb9 | 12962 | if test "x$ac_cv_func_pstat_getdynamic" = x""yes; then : |
067d23c9 KY |
12963 | cat >>confdefs.h <<_ACEOF |
12964 | #define HAVE_PSTAT_GETDYNAMIC 1 | |
12965 | _ACEOF | |
12966 | ||
12967 | fi | |
12968 | done | |
12969 | ||
12970 | ||
12971 | # Solaris has libkstat which does not require root. | |
12972 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kstat_open in -lkstat" >&5 | |
12973 | $as_echo_n "checking for kstat_open in -lkstat... " >&6; } | |
9ba41eb9 | 12974 | if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then : |
067d23c9 KY |
12975 | $as_echo_n "(cached) " >&6 |
12976 | else | |
12977 | ac_check_lib_save_LIBS=$LIBS | |
12978 | LIBS="-lkstat $LIBS" | |
12979 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12980 | /* end confdefs.h. */ | |
12981 | ||
12982 | /* Override any GCC internal prototype to avoid an error. | |
12983 | Use char because int might match the return type of a GCC | |
12984 | builtin and then its argument prototype would still apply. */ | |
12985 | #ifdef __cplusplus | |
12986 | extern "C" | |
12987 | #endif | |
12988 | char kstat_open (); | |
12989 | int | |
12990 | main () | |
12991 | { | |
12992 | return kstat_open (); | |
12993 | ; | |
12994 | return 0; | |
12995 | } | |
12996 | _ACEOF | |
12997 | if ac_fn_c_try_link "$LINENO"; then : | |
12998 | ac_cv_lib_kstat_kstat_open=yes | |
12999 | else | |
13000 | ac_cv_lib_kstat_kstat_open=no | |
13001 | fi | |
13002 | rm -f core conftest.err conftest.$ac_objext \ | |
13003 | conftest$ac_exeext conftest.$ac_ext | |
13004 | LIBS=$ac_check_lib_save_LIBS | |
13005 | fi | |
13006 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kstat_kstat_open" >&5 | |
13007 | $as_echo "$ac_cv_lib_kstat_kstat_open" >&6; } | |
9ba41eb9 | 13008 | if test "x$ac_cv_lib_kstat_kstat_open" = x""yes; then : |
067d23c9 KY |
13009 | cat >>confdefs.h <<_ACEOF |
13010 | #define HAVE_LIBKSTAT 1 | |
13011 | _ACEOF | |
13012 | ||
13013 | LIBS="-lkstat $LIBS" | |
13014 | ||
13015 | fi | |
13016 | ||
13017 | test $ac_cv_lib_kstat_kstat_open = yes && ac_have_func=yes | |
13018 | ||
13019 | # Some systems with -lutil have (and need) -lkvm as well, some do not. | |
13020 | # On Solaris, -lkvm requires nlist from -lelf, so check that first | |
13021 | # to get the right answer into the cache. | |
13022 | # For kstat on solaris, we need libelf to force the definition of SVR4 below. | |
13023 | if test $ac_have_func = no; then | |
13024 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_begin in -lelf" >&5 | |
13025 | $as_echo_n "checking for elf_begin in -lelf... " >&6; } | |
9ba41eb9 | 13026 | if test "${ac_cv_lib_elf_elf_begin+set}" = set; then : |
067d23c9 KY |
13027 | $as_echo_n "(cached) " >&6 |
13028 | else | |
13029 | ac_check_lib_save_LIBS=$LIBS | |
13030 | LIBS="-lelf $LIBS" | |
13031 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13032 | /* end confdefs.h. */ | |
13033 | ||
13034 | /* Override any GCC internal prototype to avoid an error. | |
13035 | Use char because int might match the return type of a GCC | |
13036 | builtin and then its argument prototype would still apply. */ | |
13037 | #ifdef __cplusplus | |
13038 | extern "C" | |
13039 | #endif | |
13040 | char elf_begin (); | |
13041 | int | |
13042 | main () | |
13043 | { | |
13044 | return elf_begin (); | |
13045 | ; | |
13046 | return 0; | |
13047 | } | |
13048 | _ACEOF | |
13049 | if ac_fn_c_try_link "$LINENO"; then : | |
13050 | ac_cv_lib_elf_elf_begin=yes | |
13051 | else | |
13052 | ac_cv_lib_elf_elf_begin=no | |
13053 | fi | |
13054 | rm -f core conftest.err conftest.$ac_objext \ | |
13055 | conftest$ac_exeext conftest.$ac_ext | |
13056 | LIBS=$ac_check_lib_save_LIBS | |
13057 | fi | |
13058 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_elf_elf_begin" >&5 | |
13059 | $as_echo "$ac_cv_lib_elf_elf_begin" >&6; } | |
9ba41eb9 | 13060 | if test "x$ac_cv_lib_elf_elf_begin" = x""yes; then : |
067d23c9 KY |
13061 | LIBS="-lelf $LIBS" |
13062 | fi | |
13063 | ||
13064 | fi | |
13065 | if test $ac_have_func = no; then | |
13066 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kvm_open in -lkvm" >&5 | |
13067 | $as_echo_n "checking for kvm_open in -lkvm... " >&6; } | |
9ba41eb9 | 13068 | if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then : |
067d23c9 KY |
13069 | $as_echo_n "(cached) " >&6 |
13070 | else | |
13071 | ac_check_lib_save_LIBS=$LIBS | |
13072 | LIBS="-lkvm $LIBS" | |
13073 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13074 | /* end confdefs.h. */ | |
13075 | ||
13076 | /* Override any GCC internal prototype to avoid an error. | |
13077 | Use char because int might match the return type of a GCC | |
13078 | builtin and then its argument prototype would still apply. */ | |
13079 | #ifdef __cplusplus | |
13080 | extern "C" | |
13081 | #endif | |
13082 | char kvm_open (); | |
13083 | int | |
13084 | main () | |
13085 | { | |
13086 | return kvm_open (); | |
13087 | ; | |
13088 | return 0; | |
13089 | } | |
13090 | _ACEOF | |
13091 | if ac_fn_c_try_link "$LINENO"; then : | |
13092 | ac_cv_lib_kvm_kvm_open=yes | |
13093 | else | |
13094 | ac_cv_lib_kvm_kvm_open=no | |
13095 | fi | |
13096 | rm -f core conftest.err conftest.$ac_objext \ | |
13097 | conftest$ac_exeext conftest.$ac_ext | |
13098 | LIBS=$ac_check_lib_save_LIBS | |
13099 | fi | |
13100 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kvm_kvm_open" >&5 | |
13101 | $as_echo "$ac_cv_lib_kvm_kvm_open" >&6; } | |
9ba41eb9 | 13102 | if test "x$ac_cv_lib_kvm_kvm_open" = x""yes; then : |
067d23c9 KY |
13103 | LIBS="-lkvm $LIBS" |
13104 | fi | |
13105 | ||
13106 | # Check for the 4.4BSD definition of getloadavg. | |
13107 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lutil" >&5 | |
13108 | $as_echo_n "checking for getloadavg in -lutil... " >&6; } | |
9ba41eb9 | 13109 | if test "${ac_cv_lib_util_getloadavg+set}" = set; then : |
067d23c9 KY |
13110 | $as_echo_n "(cached) " >&6 |
13111 | else | |
13112 | ac_check_lib_save_LIBS=$LIBS | |
13113 | LIBS="-lutil $LIBS" | |
13114 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13115 | /* end confdefs.h. */ | |
13116 | ||
13117 | /* Override any GCC internal prototype to avoid an error. | |
13118 | Use char because int might match the return type of a GCC | |
13119 | builtin and then its argument prototype would still apply. */ | |
13120 | #ifdef __cplusplus | |
13121 | extern "C" | |
13122 | #endif | |
13123 | char getloadavg (); | |
13124 | int | |
13125 | main () | |
13126 | { | |
13127 | return getloadavg (); | |
13128 | ; | |
13129 | return 0; | |
13130 | } | |
13131 | _ACEOF | |
13132 | if ac_fn_c_try_link "$LINENO"; then : | |
13133 | ac_cv_lib_util_getloadavg=yes | |
13134 | else | |
13135 | ac_cv_lib_util_getloadavg=no | |
13136 | fi | |
13137 | rm -f core conftest.err conftest.$ac_objext \ | |
13138 | conftest$ac_exeext conftest.$ac_ext | |
13139 | LIBS=$ac_check_lib_save_LIBS | |
13140 | fi | |
13141 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_getloadavg" >&5 | |
13142 | $as_echo "$ac_cv_lib_util_getloadavg" >&6; } | |
9ba41eb9 | 13143 | if test "x$ac_cv_lib_util_getloadavg" = x""yes; then : |
067d23c9 KY |
13144 | LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes |
13145 | fi | |
13146 | ||
13147 | fi | |
13148 | ||
13149 | if test $ac_have_func = no; then | |
13150 | # There is a commonly available library for RS/6000 AIX. | |
13151 | # Since it is not a standard part of AIX, it might be installed locally. | |
13152 | ac_getloadavg_LIBS=$LIBS | |
13153 | LIBS="-L/usr/local/lib $LIBS" | |
13154 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lgetloadavg" >&5 | |
13155 | $as_echo_n "checking for getloadavg in -lgetloadavg... " >&6; } | |
9ba41eb9 | 13156 | if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then : |
067d23c9 KY |
13157 | $as_echo_n "(cached) " >&6 |
13158 | else | |
13159 | ac_check_lib_save_LIBS=$LIBS | |
13160 | LIBS="-lgetloadavg $LIBS" | |
13161 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13162 | /* end confdefs.h. */ | |
13163 | ||
13164 | /* Override any GCC internal prototype to avoid an error. | |
13165 | Use char because int might match the return type of a GCC | |
13166 | builtin and then its argument prototype would still apply. */ | |
13167 | #ifdef __cplusplus | |
13168 | extern "C" | |
13169 | #endif | |
13170 | char getloadavg (); | |
13171 | int | |
13172 | main () | |
13173 | { | |
13174 | return getloadavg (); | |
13175 | ; | |
13176 | return 0; | |
13177 | } | |
13178 | _ACEOF | |
13179 | if ac_fn_c_try_link "$LINENO"; then : | |
13180 | ac_cv_lib_getloadavg_getloadavg=yes | |
13181 | else | |
13182 | ac_cv_lib_getloadavg_getloadavg=no | |
13183 | fi | |
13184 | rm -f core conftest.err conftest.$ac_objext \ | |
13185 | conftest$ac_exeext conftest.$ac_ext | |
13186 | LIBS=$ac_check_lib_save_LIBS | |
13187 | fi | |
13188 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_getloadavg_getloadavg" >&5 | |
13189 | $as_echo "$ac_cv_lib_getloadavg_getloadavg" >&6; } | |
9ba41eb9 | 13190 | if test "x$ac_cv_lib_getloadavg_getloadavg" = x""yes; then : |
067d23c9 KY |
13191 | LIBS="-lgetloadavg $LIBS" |
13192 | else | |
13193 | LIBS=$ac_getloadavg_LIBS | |
13194 | fi | |
13195 | ||
13196 | fi | |
13197 | ||
13198 | # Make sure it is really in the library, if we think we found it, | |
13199 | # otherwise set up the replacement function. | |
13200 | for ac_func in getloadavg | |
13201 | do : | |
13202 | ac_fn_c_check_func "$LINENO" "getloadavg" "ac_cv_func_getloadavg" | |
9ba41eb9 | 13203 | if test "x$ac_cv_func_getloadavg" = x""yes; then : |
067d23c9 KY |
13204 | cat >>confdefs.h <<_ACEOF |
13205 | #define HAVE_GETLOADAVG 1 | |
13206 | _ACEOF | |
13207 | ||
13208 | else | |
13209 | case " $LIBOBJS " in | |
13210 | *" getloadavg.$ac_objext "* ) ;; | |
13211 | *) LIBOBJS="$LIBOBJS getloadavg.$ac_objext" | |
13212 | ;; | |
13213 | esac | |
13214 | ||
13215 | ||
13216 | $as_echo "#define C_GETLOADAVG 1" >>confdefs.h | |
13217 | ||
13218 | # Figure out what our getloadavg.c needs. | |
13219 | ac_have_func=no | |
13220 | ac_fn_c_check_header_mongrel "$LINENO" "sys/dg_sys_info.h" "ac_cv_header_sys_dg_sys_info_h" "$ac_includes_default" | |
9ba41eb9 | 13221 | if test "x$ac_cv_header_sys_dg_sys_info_h" = x""yes; then : |
067d23c9 KY |
13222 | ac_have_func=yes |
13223 | ||
13224 | $as_echo "#define DGUX 1" >>confdefs.h | |
13225 | ||
13226 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dg_sys_info in -ldgc" >&5 | |
13227 | $as_echo_n "checking for dg_sys_info in -ldgc... " >&6; } | |
9ba41eb9 | 13228 | if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then : |
067d23c9 KY |
13229 | $as_echo_n "(cached) " >&6 |
13230 | else | |
13231 | ac_check_lib_save_LIBS=$LIBS | |
13232 | LIBS="-ldgc $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 dg_sys_info (); | |
13243 | int | |
13244 | main () | |
13245 | { | |
13246 | return dg_sys_info (); | |
13247 | ; | |
13248 | return 0; | |
13249 | } | |
13250 | _ACEOF | |
13251 | if ac_fn_c_try_link "$LINENO"; then : | |
13252 | ac_cv_lib_dgc_dg_sys_info=yes | |
13253 | else | |
13254 | ac_cv_lib_dgc_dg_sys_info=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_dgc_dg_sys_info" >&5 | |
13261 | $as_echo "$ac_cv_lib_dgc_dg_sys_info" >&6; } | |
9ba41eb9 | 13262 | if test "x$ac_cv_lib_dgc_dg_sys_info" = x""yes; then : |
067d23c9 KY |
13263 | cat >>confdefs.h <<_ACEOF |
13264 | #define HAVE_LIBDGC 1 | |
13265 | _ACEOF | |
13266 | ||
13267 | LIBS="-ldgc $LIBS" | |
13268 | ||
13269 | fi | |
13270 | ||
13271 | fi | |
13272 | ||
13273 | ||
13274 | ||
13275 | ac_fn_c_check_header_mongrel "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default" | |
9ba41eb9 | 13276 | if test "x$ac_cv_header_locale_h" = x""yes; then : |
067d23c9 KY |
13277 | |
13278 | fi | |
13279 | ||
13280 | ||
13281 | for ac_func in setlocale | |
13282 | do : | |
13283 | ac_fn_c_check_func "$LINENO" "setlocale" "ac_cv_func_setlocale" | |
9ba41eb9 | 13284 | if test "x$ac_cv_func_setlocale" = x""yes; then : |
067d23c9 KY |
13285 | cat >>confdefs.h <<_ACEOF |
13286 | #define HAVE_SETLOCALE 1 | |
13287 | _ACEOF | |
13288 | ||
13289 | fi | |
13290 | done | |
13291 | ||
13292 | ||
13293 | # We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it | |
13294 | # uses stabs), but it is still SVR4. We cannot check for <elf.h> because | |
13295 | # Irix 4.0.5F has the header but not the library. | |
9ba41eb9 | 13296 | if test $ac_have_func = no && test "$ac_cv_lib_elf_elf_begin" = yes; then |
067d23c9 KY |
13297 | ac_have_func=yes |
13298 | ||
13299 | $as_echo "#define SVR4 1" >>confdefs.h | |
13300 | ||
13301 | fi | |
13302 | ||
13303 | if test $ac_have_func = no; then | |
13304 | ac_fn_c_check_header_mongrel "$LINENO" "inq_stats/cpustats.h" "ac_cv_header_inq_stats_cpustats_h" "$ac_includes_default" | |
9ba41eb9 | 13305 | if test "x$ac_cv_header_inq_stats_cpustats_h" = x""yes; then : |
067d23c9 KY |
13306 | ac_have_func=yes |
13307 | ||
13308 | $as_echo "#define UMAX 1" >>confdefs.h | |
13309 | ||
13310 | ||
13311 | $as_echo "#define UMAX4_3 1" >>confdefs.h | |
13312 | ||
13313 | fi | |
13314 | ||
13315 | ||
13316 | fi | |
13317 | ||
13318 | if test $ac_have_func = no; then | |
13319 | ac_fn_c_check_header_mongrel "$LINENO" "sys/cpustats.h" "ac_cv_header_sys_cpustats_h" "$ac_includes_default" | |
9ba41eb9 | 13320 | if test "x$ac_cv_header_sys_cpustats_h" = x""yes; then : |
067d23c9 KY |
13321 | ac_have_func=yes; $as_echo "#define UMAX 1" >>confdefs.h |
13322 | ||
13323 | fi | |
13324 | ||
13325 | ||
13326 | fi | |
13327 | ||
13328 | if test $ac_have_func = no; then | |
13329 | for ac_header in mach/mach.h | |
13330 | do : | |
13331 | ac_fn_c_check_header_mongrel "$LINENO" "mach/mach.h" "ac_cv_header_mach_mach_h" "$ac_includes_default" | |
9ba41eb9 | 13332 | if test "x$ac_cv_header_mach_mach_h" = x""yes; then : |
067d23c9 KY |
13333 | cat >>confdefs.h <<_ACEOF |
13334 | #define HAVE_MACH_MACH_H 1 | |
13335 | _ACEOF | |
13336 | ||
13337 | fi | |
13338 | ||
13339 | done | |
13340 | ||
13341 | fi | |
13342 | ||
13343 | for ac_header in nlist.h | |
13344 | do : | |
13345 | ac_fn_c_check_header_mongrel "$LINENO" "nlist.h" "ac_cv_header_nlist_h" "$ac_includes_default" | |
9ba41eb9 | 13346 | if test "x$ac_cv_header_nlist_h" = x""yes; then : |
067d23c9 KY |
13347 | cat >>confdefs.h <<_ACEOF |
13348 | #define HAVE_NLIST_H 1 | |
13349 | _ACEOF | |
13350 | ac_fn_c_check_member "$LINENO" "struct nlist" "n_un.n_name" "ac_cv_member_struct_nlist_n_un_n_name" "#include <nlist.h> | |
13351 | " | |
9ba41eb9 | 13352 | if test "x$ac_cv_member_struct_nlist_n_un_n_name" = x""yes; then : |
067d23c9 KY |
13353 | |
13354 | cat >>confdefs.h <<_ACEOF | |
13355 | #define HAVE_STRUCT_NLIST_N_UN_N_NAME 1 | |
13356 | _ACEOF | |
13357 | ||
13358 | ||
13359 | $as_echo "#define NLIST_NAME_UNION 1" >>confdefs.h | |
13360 | ||
13361 | fi | |
13362 | ||
13363 | ||
13364 | fi | |
13365 | ||
13366 | done | |
13367 | ||
13368 | fi | |
13369 | done | |
13370 | ||
13371 | ||
13372 | # Some definitions of getloadavg require that the program be installed setgid. | |
13373 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getloadavg requires setgid" >&5 | |
13374 | $as_echo_n "checking whether getloadavg requires setgid... " >&6; } | |
9ba41eb9 | 13375 | if test "${ac_cv_func_getloadavg_setgid+set}" = set; then : |
067d23c9 KY |
13376 | $as_echo_n "(cached) " >&6 |
13377 | else | |
13378 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13379 | /* end confdefs.h. */ | |
13380 | #include "$srcdir/$ac_config_libobj_dir/getloadavg.c" | |
13381 | #ifdef LDAV_PRIVILEGED | |
13382 | Yowza Am I SETGID yet | |
13383 | #endif | |
13384 | _ACEOF | |
13385 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
13386 | $EGREP "Yowza Am I SETGID yet" >/dev/null 2>&1; then : | |
13387 | ac_cv_func_getloadavg_setgid=yes | |
13388 | else | |
13389 | ac_cv_func_getloadavg_setgid=no | |
13390 | fi | |
13391 | rm -f conftest* | |
13392 | ||
13393 | fi | |
13394 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getloadavg_setgid" >&5 | |
13395 | $as_echo "$ac_cv_func_getloadavg_setgid" >&6; } | |
13396 | if test $ac_cv_func_getloadavg_setgid = yes; then | |
13397 | NEED_SETGID=true | |
13398 | ||
13399 | $as_echo "#define GETLOADAVG_PRIVILEGED 1" >>confdefs.h | |
13400 | ||
13401 | else | |
13402 | NEED_SETGID=false | |
13403 | fi | |
13404 | ||
13405 | if test $ac_cv_func_getloadavg_setgid = yes; then | |
13406 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking group of /dev/kmem" >&5 | |
13407 | $as_echo_n "checking group of /dev/kmem... " >&6; } | |
9ba41eb9 | 13408 | if test "${ac_cv_group_kmem+set}" = set; then : |
067d23c9 KY |
13409 | $as_echo_n "(cached) " >&6 |
13410 | else | |
13411 | # On Solaris, /dev/kmem is a symlink. Get info on the real file. | |
13412 | ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null` | |
13413 | # If we got an error (system does not support symlinks), try without -L. | |
13414 | test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem` | |
13415 | ac_cv_group_kmem=`$as_echo "$ac_ls_output" \ | |
13416 | | sed -ne 's/[ ][ ]*/ /g; | |
13417 | s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/; | |
13418 | / /s/.* //;p;'` | |
13419 | ||
13420 | fi | |
13421 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_group_kmem" >&5 | |
13422 | $as_echo "$ac_cv_group_kmem" >&6; } | |
13423 | KMEM_GROUP=$ac_cv_group_kmem | |
13424 | fi | |
13425 | if test "x$ac_save_LIBS" = x; then | |
13426 | GETLOADAVG_LIBS=$LIBS | |
13427 | else | |
13428 | GETLOADAVG_LIBS=`$as_echo "$LIBS" | sed "s|$ac_save_LIBS||"` | |
13429 | fi | |
13430 | LIBS=$ac_save_LIBS | |
13431 | ||
13432 | ||
13433 | ||
13434 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5 | |
13435 | $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; } | |
9ba41eb9 | 13436 | if test "${ac_cv_sys_largefile_source+set}" = set; then : |
067d23c9 KY |
13437 | $as_echo_n "(cached) " >&6 |
13438 | else | |
13439 | while :; do | |
13440 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13441 | /* end confdefs.h. */ | |
13442 | #include <sys/types.h> /* for off_t */ | |
13443 | #include <stdio.h> | |
13444 | int | |
13445 | main () | |
13446 | { | |
13447 | int (*fp) (FILE *, off_t, int) = fseeko; | |
13448 | return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); | |
13449 | ; | |
13450 | return 0; | |
13451 | } | |
13452 | _ACEOF | |
13453 | if ac_fn_c_try_link "$LINENO"; then : | |
13454 | ac_cv_sys_largefile_source=no; break | |
13455 | fi | |
13456 | rm -f core conftest.err conftest.$ac_objext \ | |
13457 | conftest$ac_exeext conftest.$ac_ext | |
13458 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13459 | /* end confdefs.h. */ | |
13460 | #define _LARGEFILE_SOURCE 1 | |
13461 | #include <sys/types.h> /* for off_t */ | |
13462 | #include <stdio.h> | |
13463 | int | |
13464 | main () | |
13465 | { | |
13466 | int (*fp) (FILE *, off_t, int) = fseeko; | |
13467 | return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); | |
13468 | ; | |
13469 | return 0; | |
13470 | } | |
13471 | _ACEOF | |
13472 | if ac_fn_c_try_link "$LINENO"; then : | |
13473 | ac_cv_sys_largefile_source=1; break | |
13474 | fi | |
1fd182f0 PE |
13475 | rm -f core conftest.err conftest.$ac_objext \ |
13476 | conftest$ac_exeext conftest.$ac_ext | |
13477 | ac_cv_sys_largefile_source=unknown | |
13478 | break | |
13479 | done | |
13480 | fi | |
13481 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5 | |
13482 | $as_echo "$ac_cv_sys_largefile_source" >&6; } | |
13483 | case $ac_cv_sys_largefile_source in #( | |
13484 | no | unknown) ;; | |
13485 | *) | |
13486 | cat >>confdefs.h <<_ACEOF | |
13487 | #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source | |
13488 | _ACEOF | |
13489 | ;; | |
13490 | esac | |
13491 | rm -rf conftest* | |
13492 | ||
13493 | # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug | |
13494 | # in glibc 2.1.3, but that breaks too many other things. | |
13495 | # If you want fseeko and ftello with glibc, upgrade to a fixed glibc. | |
13496 | if test $ac_cv_sys_largefile_source != unknown; then | |
13497 | ||
13498 | $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h | |
13499 | ||
13500 | fi | |
13501 | ||
13502 | ||
1fd182f0 PE |
13503 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getpgrp requires zero arguments" >&5 |
13504 | $as_echo_n "checking whether getpgrp requires zero arguments... " >&6; } | |
9ba41eb9 | 13505 | if test "${ac_cv_func_getpgrp_void+set}" = set; then : |
1fd182f0 PE |
13506 | $as_echo_n "(cached) " >&6 |
13507 | else | |
13508 | # Use it with a single arg. | |
13509 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13510 | /* end confdefs.h. */ | |
13511 | $ac_includes_default | |
13512 | int | |
13513 | main () | |
13514 | { | |
13515 | getpgrp (0); | |
13516 | ; | |
13517 | return 0; | |
13518 | } | |
13519 | _ACEOF | |
13520 | if ac_fn_c_try_compile "$LINENO"; then : | |
13521 | ac_cv_func_getpgrp_void=no | |
13522 | else | |
13523 | ac_cv_func_getpgrp_void=yes | |
13524 | fi | |
13525 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
13526 | ||
13527 | fi | |
13528 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getpgrp_void" >&5 | |
13529 | $as_echo "$ac_cv_func_getpgrp_void" >&6; } | |
13530 | if test $ac_cv_func_getpgrp_void = yes; then | |
13531 | ||
13532 | $as_echo "#define GETPGRP_VOID 1" >>confdefs.h | |
13533 | ||
13534 | fi | |
13535 | ||
13536 | ||
13537 | # Configure gnulib. | |
13538 | ||
13539 | ||
13540 | ||
13541 | ||
b06b1098 PE |
13542 | |
13543 | ||
13544 | ||
1fd182f0 PE |
13545 | LIBC_FATAL_STDERR_=1 |
13546 | export LIBC_FATAL_STDERR_ | |
13547 | ||
13548 | ||
13549 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtold conforms to C99" >&5 | |
13550 | $as_echo_n "checking whether strtold conforms to C99... " >&6; } | |
9ba41eb9 | 13551 | if test "${gl_cv_func_c99_strtold+set}" = set; then : |
1fd182f0 PE |
13552 | $as_echo_n "(cached) " >&6 |
13553 | else | |
13554 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13555 | /* end confdefs.h. */ | |
13556 | /* On HP-UX before 11.23, strtold returns a struct instead of | |
13557 | long double. Reject implementations like that, by requiring | |
13558 | compatibility with the C99 prototype. */ | |
13559 | #include <stdlib.h> | |
13560 | static long double (*p) (char const *, char **) = strtold; | |
13561 | static long double | |
13562 | test (char const *nptr, char **endptr) | |
13563 | { | |
13564 | long double r; | |
13565 | r = strtold (nptr, endptr); | |
13566 | return r; | |
13567 | } | |
13568 | int | |
13569 | main () | |
13570 | { | |
13571 | return test ("1.0", NULL) != 1 || p ("1.0", NULL) != 1; | |
13572 | ; | |
13573 | return 0; | |
13574 | } | |
13575 | _ACEOF | |
13576 | if ac_fn_c_try_link "$LINENO"; then : | |
13577 | gl_cv_func_c99_strtold=yes | |
13578 | else | |
13579 | gl_cv_func_c99_strtold=no | |
13580 | fi | |
13581 | rm -f core conftest.err conftest.$ac_objext \ | |
13582 | conftest$ac_exeext conftest.$ac_ext | |
13583 | fi | |
13584 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_c99_strtold" >&5 | |
13585 | $as_echo "$gl_cv_func_c99_strtold" >&6; } | |
13586 | if test $gl_cv_func_c99_strtold = yes; then | |
13587 | ||
13588 | $as_echo "#define HAVE_C99_STRTOLD 1" >>confdefs.h | |
13589 | ||
13590 | fi | |
13591 | ||
13592 | ||
e275c824 PE |
13593 | GNULIB_CHOWN=0; |
13594 | GNULIB_CLOSE=0; | |
13595 | GNULIB_DUP2=0; | |
13596 | GNULIB_DUP3=0; | |
13597 | GNULIB_ENVIRON=0; | |
13598 | GNULIB_EUIDACCESS=0; | |
13599 | GNULIB_FACCESSAT=0; | |
13600 | GNULIB_FCHDIR=0; | |
13601 | GNULIB_FCHOWNAT=0; | |
13602 | GNULIB_FSYNC=0; | |
13603 | GNULIB_FTRUNCATE=0; | |
13604 | GNULIB_GETCWD=0; | |
13605 | GNULIB_GETDOMAINNAME=0; | |
13606 | GNULIB_GETDTABLESIZE=0; | |
13607 | GNULIB_GETGROUPS=0; | |
13608 | GNULIB_GETHOSTNAME=0; | |
13609 | GNULIB_GETLOGIN=0; | |
13610 | GNULIB_GETLOGIN_R=0; | |
13611 | GNULIB_GETPAGESIZE=0; | |
13612 | GNULIB_GETUSERSHELL=0; | |
13613 | GNULIB_LCHOWN=0; | |
13614 | GNULIB_LINK=0; | |
13615 | GNULIB_LINKAT=0; | |
13616 | GNULIB_LSEEK=0; | |
13617 | GNULIB_PIPE=0; | |
13618 | GNULIB_PIPE2=0; | |
13619 | GNULIB_PREAD=0; | |
13620 | GNULIB_PWRITE=0; | |
13621 | GNULIB_READLINK=0; | |
13622 | GNULIB_READLINKAT=0; | |
13623 | GNULIB_RMDIR=0; | |
13624 | GNULIB_SLEEP=0; | |
13625 | GNULIB_SYMLINK=0; | |
13626 | GNULIB_SYMLINKAT=0; | |
13627 | GNULIB_TTYNAME_R=0; | |
13628 | GNULIB_UNISTD_H_GETOPT=0; | |
13629 | GNULIB_UNISTD_H_SIGPIPE=0; | |
13630 | GNULIB_UNLINK=0; | |
13631 | GNULIB_UNLINKAT=0; | |
13632 | GNULIB_USLEEP=0; | |
13633 | GNULIB_WRITE=0; | |
13634 | HAVE_CHOWN=1; | |
13635 | HAVE_DUP2=1; | |
13636 | HAVE_DUP3=1; | |
13637 | HAVE_EUIDACCESS=1; | |
13638 | HAVE_FACCESSAT=1; | |
13639 | HAVE_FCHDIR=1; | |
13640 | HAVE_FCHOWNAT=1; | |
13641 | HAVE_FSYNC=1; | |
13642 | HAVE_FTRUNCATE=1; | |
13643 | HAVE_GETDTABLESIZE=1; | |
13644 | HAVE_GETGROUPS=1; | |
13645 | HAVE_GETHOSTNAME=1; | |
13646 | HAVE_GETLOGIN=1; | |
13647 | HAVE_GETPAGESIZE=1; | |
13648 | HAVE_LCHOWN=1; | |
13649 | HAVE_LINK=1; | |
13650 | HAVE_LINKAT=1; | |
13651 | HAVE_PIPE=1; | |
13652 | HAVE_PIPE2=1; | |
13653 | HAVE_PREAD=1; | |
13654 | HAVE_PWRITE=1; | |
13655 | HAVE_READLINK=1; | |
13656 | HAVE_READLINKAT=1; | |
13657 | HAVE_SLEEP=1; | |
13658 | HAVE_SYMLINK=1; | |
13659 | HAVE_SYMLINKAT=1; | |
13660 | HAVE_UNLINKAT=1; | |
13661 | HAVE_USLEEP=1; | |
13662 | HAVE_DECL_ENVIRON=1; | |
13663 | HAVE_DECL_FCHDIR=1; | |
13664 | HAVE_DECL_GETDOMAINNAME=1; | |
13665 | HAVE_DECL_GETLOGIN_R=1; | |
13666 | HAVE_DECL_GETPAGESIZE=1; | |
13667 | HAVE_DECL_GETUSERSHELL=1; | |
13668 | HAVE_DECL_TTYNAME_R=1; | |
13669 | HAVE_OS_H=0; | |
13670 | HAVE_SYS_PARAM_H=0; | |
13671 | REPLACE_CHOWN=0; | |
13672 | REPLACE_CLOSE=0; | |
13673 | REPLACE_DUP=0; | |
13674 | REPLACE_DUP2=0; | |
13675 | REPLACE_FCHOWNAT=0; | |
13676 | REPLACE_GETCWD=0; | |
13677 | REPLACE_GETDOMAINNAME=0; | |
13678 | REPLACE_GETLOGIN_R=0; | |
13679 | REPLACE_GETGROUPS=0; | |
13680 | REPLACE_GETPAGESIZE=0; | |
13681 | REPLACE_LCHOWN=0; | |
13682 | REPLACE_LINK=0; | |
13683 | REPLACE_LINKAT=0; | |
13684 | REPLACE_LSEEK=0; | |
13685 | REPLACE_PREAD=0; | |
13686 | REPLACE_PWRITE=0; | |
13687 | REPLACE_READLINK=0; | |
13688 | REPLACE_RMDIR=0; | |
13689 | REPLACE_SLEEP=0; | |
13690 | REPLACE_SYMLINK=0; | |
13691 | REPLACE_TTYNAME_R=0; | |
13692 | REPLACE_UNLINK=0; | |
13693 | REPLACE_UNLINKAT=0; | |
13694 | REPLACE_USLEEP=0; | |
13695 | REPLACE_WRITE=0; | |
13696 | UNISTD_H_HAVE_WINSOCK2_H=0; | |
13697 | UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0; | |
1fd182f0 PE |
13698 | |
13699 | ||
13700 | ||
13701 | ||
e275c824 PE |
13702 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5 |
13703 | $as_echo_n "checking whether the preprocessor supports include_next... " >&6; } | |
9ba41eb9 | 13704 | if test "${gl_cv_have_include_next+set}" = set; then : |
e275c824 PE |
13705 | $as_echo_n "(cached) " >&6 |
13706 | else | |
13707 | rm -rf conftestd1a conftestd1b conftestd2 | |
13708 | mkdir conftestd1a conftestd1b conftestd2 | |
13709 | cat <<EOF > conftestd1a/conftest.h | |
13710 | #define DEFINED_IN_CONFTESTD1 | |
13711 | #include_next <conftest.h> | |
13712 | #ifdef DEFINED_IN_CONFTESTD2 | |
13713 | int foo; | |
13714 | #else | |
13715 | #error "include_next doesn't work" | |
13716 | #endif | |
13717 | EOF | |
13718 | cat <<EOF > conftestd1b/conftest.h | |
13719 | #define DEFINED_IN_CONFTESTD1 | |
13720 | #include <stdio.h> | |
13721 | #include_next <conftest.h> | |
13722 | #ifdef DEFINED_IN_CONFTESTD2 | |
13723 | int foo; | |
13724 | #else | |
13725 | #error "include_next doesn't work" | |
13726 | #endif | |
13727 | EOF | |
13728 | cat <<EOF > conftestd2/conftest.h | |
13729 | #ifndef DEFINED_IN_CONFTESTD1 | |
13730 | #error "include_next test doesn't work" | |
13731 | #endif | |
13732 | #define DEFINED_IN_CONFTESTD2 | |
13733 | EOF | |
13734 | gl_save_CPPFLAGS="$CPPFLAGS" | |
13735 | CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2" | |
13736 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13737 | /* end confdefs.h. */ | |
13738 | #include <conftest.h> | |
1fd182f0 | 13739 | _ACEOF |
e275c824 PE |
13740 | if ac_fn_c_try_compile "$LINENO"; then : |
13741 | gl_cv_have_include_next=yes | |
13742 | else | |
13743 | CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2" | |
13744 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1fd182f0 | 13745 | /* end confdefs.h. */ |
e275c824 | 13746 | #include <conftest.h> |
1fd182f0 PE |
13747 | _ACEOF |
13748 | if ac_fn_c_try_compile "$LINENO"; then : | |
e275c824 PE |
13749 | gl_cv_have_include_next=buggy |
13750 | else | |
13751 | gl_cv_have_include_next=no | |
1fd182f0 PE |
13752 | fi |
13753 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1fd182f0 | 13754 | |
e275c824 PE |
13755 | fi |
13756 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
13757 | CPPFLAGS="$gl_save_CPPFLAGS" | |
13758 | rm -rf conftestd1a conftestd1b conftestd2 | |
1fd182f0 | 13759 | |
e275c824 PE |
13760 | fi |
13761 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5 | |
13762 | $as_echo "$gl_cv_have_include_next" >&6; } | |
13763 | PRAGMA_SYSTEM_HEADER= | |
13764 | if test $gl_cv_have_include_next = yes; then | |
13765 | INCLUDE_NEXT=include_next | |
13766 | INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next | |
13767 | if test -n "$GCC"; then | |
13768 | PRAGMA_SYSTEM_HEADER='#pragma GCC system_header' | |
13769 | fi | |
1fd182f0 | 13770 | else |
e275c824 PE |
13771 | if test $gl_cv_have_include_next = buggy; then |
13772 | INCLUDE_NEXT=include | |
13773 | INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next | |
13774 | else | |
13775 | INCLUDE_NEXT=include | |
13776 | INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include | |
13777 | fi | |
1fd182f0 PE |
13778 | fi |
13779 | ||
13780 | ||
e275c824 PE |
13781 | |
13782 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5 | |
13783 | $as_echo_n "checking whether system header files limit the line length... " >&6; } | |
9ba41eb9 | 13784 | if test "${gl_cv_pragma_columns+set}" = set; then : |
1fd182f0 PE |
13785 | $as_echo_n "(cached) " >&6 |
13786 | else | |
e275c824 | 13787 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
1fd182f0 | 13788 | /* end confdefs.h. */ |
1fd182f0 | 13789 | |
e275c824 PE |
13790 | #ifdef __TANDEM |
13791 | choke me | |
13792 | #endif | |
13793 | ||
13794 | _ACEOF | |
13795 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
13796 | $EGREP "choke me" >/dev/null 2>&1; then : | |
13797 | gl_cv_pragma_columns=yes | |
13798 | else | |
13799 | gl_cv_pragma_columns=no | |
13800 | fi | |
13801 | rm -f conftest* | |
13802 | ||
13803 | ||
13804 | fi | |
13805 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5 | |
13806 | $as_echo "$gl_cv_pragma_columns" >&6; } | |
13807 | if test $gl_cv_pragma_columns = yes; then | |
13808 | PRAGMA_COLUMNS="#pragma COLUMNS 10000" | |
13809 | else | |
13810 | PRAGMA_COLUMNS= | |
13811 | fi | |
13812 | ||
13813 | ||
13814 | ||
13815 | ||
13816 | ||
13817 | ||
13818 | ||
13819 | ||
13820 | ||
13821 | ||
13822 | ||
13823 | ||
13824 | ||
13825 | ||
b06b1098 PE |
13826 | |
13827 | ||
13828 | ||
e275c824 PE |
13829 | if test $gl_cv_have_include_next = yes; then |
13830 | gl_cv_next_getopt_h='<'getopt.h'>' | |
13831 | else | |
13832 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <getopt.h>" >&5 | |
13833 | $as_echo_n "checking absolute name of <getopt.h>... " >&6; } | |
9ba41eb9 | 13834 | if test "${gl_cv_next_getopt_h+set}" = set; then : |
e275c824 PE |
13835 | $as_echo_n "(cached) " >&6 |
13836 | else | |
13837 | ||
b06b1098 PE |
13838 | if test $ac_cv_header_getopt_h = yes; then |
13839 | ||
13840 | ||
13841 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
e275c824 PE |
13842 | /* end confdefs.h. */ |
13843 | #include <getopt.h> | |
13844 | ||
13845 | _ACEOF | |
b06b1098 PE |
13846 | case "$host_os" in |
13847 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
13848 | *) gl_absname_cpp="$ac_cpp" ;; | |
13849 | esac | |
13850 | gl_cv_next_getopt_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
13851 | sed -n '\#/getopt.h#{ | |
13852 | s#.*"\(.*/getopt.h\)".*#\1# | |
13853 | s#^/[^/]#//&# | |
13854 | p | |
13855 | q | |
13856 | }'`'"' | |
e275c824 | 13857 | else |
b06b1098 PE |
13858 | gl_cv_next_getopt_h='<'getopt.h'>' |
13859 | fi | |
13860 | ||
e275c824 PE |
13861 | |
13862 | fi | |
13863 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5 | |
13864 | $as_echo "$gl_cv_next_getopt_h" >&6; } | |
13865 | fi | |
13866 | NEXT_GETOPT_H=$gl_cv_next_getopt_h | |
13867 | ||
13868 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then | |
13869 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
13870 | gl_next_as_first_directive='<'getopt.h'>' | |
13871 | else | |
13872 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
13873 | gl_next_as_first_directive=$gl_cv_next_getopt_h | |
13874 | fi | |
13875 | NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive | |
13876 | ||
13877 | ||
13878 | ||
13879 | ||
13880 | if test $ac_cv_header_getopt_h = yes; then | |
13881 | HAVE_GETOPT_H=1 | |
13882 | else | |
13883 | HAVE_GETOPT_H=0 | |
13884 | fi | |
13885 | ||
13886 | ||
13887 | gl_replace_getopt= | |
13888 | ||
13889 | if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then | |
13890 | for ac_header in getopt.h | |
13891 | do : | |
13892 | ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default" | |
9ba41eb9 | 13893 | if test "x$ac_cv_header_getopt_h" = x""yes; then : |
e275c824 PE |
13894 | cat >>confdefs.h <<_ACEOF |
13895 | #define HAVE_GETOPT_H 1 | |
13896 | _ACEOF | |
13897 | ||
13898 | else | |
13899 | gl_replace_getopt=yes | |
13900 | fi | |
13901 | ||
13902 | done | |
13903 | ||
13904 | fi | |
13905 | ||
13906 | if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then | |
13907 | for ac_func in getopt_long_only | |
13908 | do : | |
13909 | ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only" | |
9ba41eb9 | 13910 | if test "x$ac_cv_func_getopt_long_only" = x""yes; then : |
e275c824 PE |
13911 | cat >>confdefs.h <<_ACEOF |
13912 | #define HAVE_GETOPT_LONG_ONLY 1 | |
13913 | _ACEOF | |
13914 | ||
13915 | else | |
13916 | gl_replace_getopt=yes | |
13917 | fi | |
13918 | done | |
13919 | ||
13920 | fi | |
13921 | ||
13922 | if test -z "$gl_replace_getopt"; then | |
13923 | ac_fn_c_check_decl "$LINENO" "optreset" "ac_cv_have_decl_optreset" "#include <getopt.h> | |
13924 | " | |
9ba41eb9 | 13925 | if test "x$ac_cv_have_decl_optreset" = x""yes; then : |
e275c824 PE |
13926 | ac_have_decl=1 |
13927 | else | |
13928 | ac_have_decl=0 | |
13929 | fi | |
13930 | ||
13931 | cat >>confdefs.h <<_ACEOF | |
13932 | #define HAVE_DECL_OPTRESET $ac_have_decl | |
13933 | _ACEOF | |
13934 | if test $ac_have_decl = 1; then : | |
13935 | ||
13936 | else | |
13937 | ac_fn_c_check_decl "$LINENO" "getopt_clip" "ac_cv_have_decl_getopt_clip" "#include <getopt.h> | |
13938 | " | |
9ba41eb9 | 13939 | if test "x$ac_cv_have_decl_getopt_clip" = x""yes; then : |
e275c824 PE |
13940 | ac_have_decl=1 |
13941 | else | |
13942 | ac_have_decl=0 | |
13943 | fi | |
13944 | ||
13945 | cat >>confdefs.h <<_ACEOF | |
13946 | #define HAVE_DECL_GETOPT_CLIP $ac_have_decl | |
13947 | _ACEOF | |
13948 | ||
13949 | ||
13950 | fi | |
13951 | ||
13952 | fi | |
13953 | ||
13954 | if test -z "$gl_replace_getopt"; then | |
13955 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5 | |
13956 | $as_echo_n "checking whether getopt is POSIX compatible... " >&6; } | |
9ba41eb9 | 13957 | if test "${gl_cv_func_getopt_posix+set}" = set; then : |
e275c824 PE |
13958 | $as_echo_n "(cached) " >&6 |
13959 | else | |
13960 | ||
13961 | if test "$cross_compiling" = yes; then : | |
13962 | case "$host_os" in | |
13963 | mingw*) gl_cv_func_getopt_posix="guessing no";; | |
13964 | darwin* | aix*) gl_cv_func_getopt_posix="guessing no";; | |
13965 | *) gl_cv_func_getopt_posix="guessing yes";; | |
13966 | esac | |
13967 | ||
13968 | else | |
13969 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13970 | /* end confdefs.h. */ | |
13971 | ||
13972 | #include <unistd.h> | |
13973 | #include <stdlib.h> | |
13974 | #include <string.h> | |
13975 | ||
13976 | #if !HAVE_DECL_OPTRESET && !HAVE_DECL_GETOPT_CLIP | |
13977 | # define OPTIND_MIN 0 | |
13978 | #else | |
13979 | # define OPTIND_MIN 1 | |
13980 | #endif | |
13981 | ||
13982 | int | |
13983 | main () | |
13984 | { | |
13985 | { | |
13986 | int argc = 0; | |
13987 | char *argv[10]; | |
13988 | int c; | |
13989 | ||
13990 | argv[argc++] = "program"; | |
13991 | argv[argc++] = "-a"; | |
13992 | argv[argc++] = "foo"; | |
13993 | argv[argc++] = "bar"; | |
13994 | argv[argc] = NULL; | |
13995 | optind = OPTIND_MIN; | |
13996 | opterr = 0; | |
13997 | ||
13998 | c = getopt (argc, argv, "ab"); | |
13999 | if (!(c == 'a')) | |
14000 | return 1; | |
14001 | c = getopt (argc, argv, "ab"); | |
14002 | if (!(c == -1)) | |
14003 | return 2; | |
14004 | if (!(optind == 2)) | |
14005 | return 3; | |
14006 | } | |
14007 | /* Some internal state exists at this point. */ | |
14008 | { | |
14009 | int argc = 0; | |
14010 | char *argv[10]; | |
14011 | int c; | |
14012 | ||
14013 | argv[argc++] = "program"; | |
14014 | argv[argc++] = "donald"; | |
14015 | argv[argc++] = "-p"; | |
14016 | argv[argc++] = "billy"; | |
14017 | argv[argc++] = "duck"; | |
14018 | argv[argc++] = "-a"; | |
14019 | argv[argc++] = "bar"; | |
14020 | argv[argc] = NULL; | |
14021 | optind = OPTIND_MIN; | |
14022 | opterr = 0; | |
14023 | ||
14024 | c = getopt (argc, argv, "+abp:q:"); | |
14025 | if (!(c == -1)) | |
14026 | return 4; | |
14027 | if (!(strcmp (argv[0], "program") == 0)) | |
14028 | return 5; | |
14029 | if (!(strcmp (argv[1], "donald") == 0)) | |
14030 | return 6; | |
14031 | if (!(strcmp (argv[2], "-p") == 0)) | |
14032 | return 7; | |
14033 | if (!(strcmp (argv[3], "billy") == 0)) | |
14034 | return 8; | |
14035 | if (!(strcmp (argv[4], "duck") == 0)) | |
14036 | return 9; | |
14037 | if (!(strcmp (argv[5], "-a") == 0)) | |
14038 | return 10; | |
14039 | if (!(strcmp (argv[6], "bar") == 0)) | |
14040 | return 11; | |
14041 | if (!(optind == 1)) | |
14042 | return 12; | |
14043 | } | |
14044 | /* Detect MacOS 10.5, AIX 7.1 bug. */ | |
14045 | { | |
14046 | char *argv[3] = { "program", "-ab", NULL }; | |
14047 | optind = OPTIND_MIN; | |
14048 | opterr = 0; | |
14049 | if (getopt (2, argv, "ab:") != 'a') | |
14050 | return 13; | |
14051 | if (getopt (2, argv, "ab:") != '?') | |
14052 | return 14; | |
14053 | if (optopt != 'b') | |
14054 | return 15; | |
14055 | if (optind != 2) | |
14056 | return 16; | |
14057 | } | |
14058 | ||
14059 | return 0; | |
14060 | } | |
14061 | ||
14062 | _ACEOF | |
14063 | if ac_fn_c_try_run "$LINENO"; then : | |
14064 | gl_cv_func_getopt_posix=yes | |
14065 | else | |
14066 | gl_cv_func_getopt_posix=no | |
14067 | fi | |
14068 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
14069 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
14070 | fi | |
14071 | ||
14072 | ||
14073 | fi | |
14074 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5 | |
14075 | $as_echo "$gl_cv_func_getopt_posix" >&6; } | |
14076 | case "$gl_cv_func_getopt_posix" in | |
14077 | *no) gl_replace_getopt=yes ;; | |
14078 | esac | |
14079 | fi | |
14080 | ||
14081 | if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then | |
14082 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5 | |
14083 | $as_echo_n "checking for working GNU getopt function... " >&6; } | |
9ba41eb9 | 14084 | if test "${gl_cv_func_getopt_gnu+set}" = set; then : |
e275c824 PE |
14085 | $as_echo_n "(cached) " >&6 |
14086 | else | |
14087 | # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the | |
14088 | # optstring is necessary for programs like m4 that have POSIX-mandated | |
14089 | # semantics for supporting options interspersed with files. | |
14090 | # Also, since getopt_long is a GNU extension, we require optind=0. | |
14091 | # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT; | |
14092 | # so take care to revert to the correct (non-)export state. | |
14093 | gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }' | |
14094 | case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" </dev/null` in | |
14095 | xx) gl_had_POSIXLY_CORRECT=exported ;; | |
14096 | x) gl_had_POSIXLY_CORRECT=yes ;; | |
14097 | *) gl_had_POSIXLY_CORRECT= ;; | |
14098 | esac | |
14099 | POSIXLY_CORRECT=1 | |
14100 | export POSIXLY_CORRECT | |
14101 | if test "$cross_compiling" = yes; then : | |
14102 | case $host_os:$ac_cv_have_decl_optreset in | |
14103 | *-gnu*:* | mingw*:*) gl_cv_func_getopt_gnu=no;; | |
14104 | *:yes) gl_cv_func_getopt_gnu=no;; | |
14105 | *) gl_cv_func_getopt_gnu=yes;; | |
14106 | esac | |
14107 | ||
14108 | else | |
14109 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14110 | /* end confdefs.h. */ | |
14111 | #include <getopt.h> | |
14112 | #include <stddef.h> | |
14113 | #include <string.h> | |
14114 | ||
14115 | int | |
14116 | main () | |
14117 | { | |
14118 | ||
14119 | int result = 0; | |
14120 | /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw, | |
14121 | and fails on MacOS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5, | |
14122 | OSF/1 5.1, Solaris 10. */ | |
14123 | { | |
14124 | char *myargv[3]; | |
14125 | myargv[0] = "conftest"; | |
14126 | myargv[1] = "-+"; | |
14127 | myargv[2] = 0; | |
14128 | opterr = 0; | |
14129 | if (getopt (2, myargv, "+a") != '?') | |
14130 | result |= 1; | |
14131 | } | |
14132 | /* This code succeeds on glibc 2.8, mingw, | |
14133 | and fails on MacOS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11, | |
14134 | IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */ | |
14135 | { | |
14136 | char *argv[] = { "program", "-p", "foo", "bar", NULL }; | |
14137 | ||
14138 | optind = 1; | |
14139 | if (getopt (4, argv, "p::") != 'p') | |
14140 | result |= 2; | |
14141 | else if (optarg != NULL) | |
14142 | result |= 4; | |
14143 | else if (getopt (4, argv, "p::") != -1) | |
14144 | result |= 6; | |
14145 | else if (optind != 2) | |
14146 | result |= 8; | |
14147 | } | |
14148 | /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */ | |
14149 | { | |
14150 | char *argv[] = { "program", "foo", "-p", NULL }; | |
14151 | optind = 0; | |
14152 | if (getopt (3, argv, "-p") != 1) | |
14153 | result |= 16; | |
14154 | else if (getopt (3, argv, "-p") != 'p') | |
14155 | result |= 32; | |
14156 | } | |
14157 | /* This code fails on glibc 2.11. */ | |
14158 | { | |
14159 | char *argv[] = { "program", "-b", "-a", NULL }; | |
14160 | optind = opterr = 0; | |
14161 | if (getopt (3, argv, "+:a:b") != 'b') | |
14162 | result |= 64; | |
14163 | else if (getopt (3, argv, "+:a:b") != ':') | |
14164 | result |= 64; | |
14165 | } | |
14166 | return result; | |
14167 | ||
14168 | ; | |
14169 | return 0; | |
14170 | } | |
14171 | _ACEOF | |
14172 | if ac_fn_c_try_run "$LINENO"; then : | |
14173 | gl_cv_func_getopt_gnu=yes | |
14174 | else | |
14175 | gl_cv_func_getopt_gnu=no | |
14176 | fi | |
14177 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
14178 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
14179 | fi | |
14180 | ||
14181 | case $gl_had_POSIXLY_CORRECT in | |
14182 | exported) ;; | |
14183 | yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;; | |
14184 | *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;; | |
14185 | esac | |
14186 | ||
14187 | fi | |
14188 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5 | |
14189 | $as_echo "$gl_cv_func_getopt_gnu" >&6; } | |
14190 | if test "$gl_cv_func_getopt_gnu" = "no"; then | |
14191 | gl_replace_getopt=yes | |
14192 | fi | |
14193 | fi | |
14194 | ||
14195 | ac_fn_c_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default" | |
9ba41eb9 | 14196 | if test "x$ac_cv_have_decl_getenv" = x""yes; then : |
e275c824 PE |
14197 | ac_have_decl=1 |
14198 | else | |
14199 | ac_have_decl=0 | |
14200 | fi | |
14201 | ||
14202 | cat >>confdefs.h <<_ACEOF | |
14203 | #define HAVE_DECL_GETENV $ac_have_decl | |
14204 | _ACEOF | |
14205 | ||
14206 | ||
14207 | ||
14208 | ||
14209 | ||
14210 | ||
14211 | if test -n "$gl_replace_getopt"; then : | |
14212 | ||
14213 | ||
14214 | ||
14215 | GETOPT_H=getopt.h | |
14216 | ||
14217 | $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h | |
14218 | ||
14219 | ||
14220 | ||
14221 | GNULIB_UNISTD_H_GETOPT=1 | |
14222 | ||
14223 | ||
14224 | ||
14225 | ||
14226 | ||
14227 | ||
14228 | ||
14229 | ||
14230 | gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext" | |
14231 | ||
14232 | ||
14233 | ||
14234 | ||
14235 | ||
14236 | ||
14237 | ||
14238 | ||
14239 | ||
14240 | gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext" | |
14241 | ||
14242 | ||
14243 | ||
14244 | ||
14245 | ||
14246 | ||
14247 | fi | |
14248 | ||
14249 | ||
14250 | ||
14251 | GNULIB_MKTIME=0; | |
14252 | GNULIB_NANOSLEEP=0; | |
14253 | GNULIB_STRPTIME=0; | |
14254 | GNULIB_TIMEGM=0; | |
14255 | GNULIB_TIME_R=0; | |
14256 | HAVE_DECL_LOCALTIME_R=1; | |
14257 | HAVE_NANOSLEEP=1; | |
14258 | HAVE_STRPTIME=1; | |
14259 | HAVE_TIMEGM=1; | |
14260 | REPLACE_LOCALTIME_R=GNULIB_PORTCHECK; | |
14261 | REPLACE_MKTIME=GNULIB_PORTCHECK; | |
14262 | REPLACE_NANOSLEEP=GNULIB_PORTCHECK; | |
14263 | REPLACE_TIMEGM=GNULIB_PORTCHECK; | |
14264 | ||
14265 | ||
14266 | ||
14267 | ||
14268 | for ac_func in $ac_func_list | |
14269 | do : | |
14270 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
14271 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
14272 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : | |
14273 | cat >>confdefs.h <<_ACEOF | |
14274 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
14275 | _ACEOF | |
14276 | ||
14277 | fi | |
14278 | done | |
14279 | ||
14280 | ||
14281 | ||
14282 | ||
14283 | gl_cv_c_multiarch=no | |
14284 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14285 | /* end confdefs.h. */ | |
14286 | #ifndef __APPLE_CC__ | |
14287 | not a universal capable compiler | |
14288 | #endif | |
14289 | typedef int dummy; | |
14290 | ||
14291 | _ACEOF | |
14292 | if ac_fn_c_try_compile "$LINENO"; then : | |
14293 | ||
14294 | arch= | |
14295 | prev= | |
14296 | for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do | |
14297 | if test -n "$prev"; then | |
14298 | case $word in | |
14299 | i?86 | x86_64 | ppc | ppc64) | |
14300 | if test -z "$arch" || test "$arch" = "$word"; then | |
14301 | arch="$word" | |
14302 | else | |
14303 | gl_cv_c_multiarch=yes | |
14304 | fi | |
14305 | ;; | |
14306 | esac | |
14307 | prev= | |
14308 | else | |
14309 | if test "x$word" = "x-arch"; then | |
14310 | prev=arch | |
14311 | fi | |
14312 | fi | |
14313 | done | |
14314 | ||
14315 | fi | |
14316 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
14317 | if test $gl_cv_c_multiarch = yes; then | |
e275c824 PE |
14318 | APPLE_UNIVERSAL_BUILD=1 |
14319 | else | |
14320 | APPLE_UNIVERSAL_BUILD=0 | |
14321 | fi | |
14322 | ||
14323 | ||
14324 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 | |
14325 | $as_echo_n "checking for inline... " >&6; } | |
9ba41eb9 | 14326 | if test "${ac_cv_c_inline+set}" = set; then : |
e275c824 PE |
14327 | $as_echo_n "(cached) " >&6 |
14328 | else | |
14329 | ac_cv_c_inline=no | |
14330 | for ac_kw in inline __inline__ __inline; do | |
14331 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14332 | /* end confdefs.h. */ | |
14333 | #ifndef __cplusplus | |
14334 | typedef int foo_t; | |
14335 | static $ac_kw foo_t static_foo () {return 0; } | |
14336 | $ac_kw foo_t foo () {return 0; } | |
14337 | #endif | |
14338 | ||
14339 | _ACEOF | |
1fd182f0 PE |
14340 | if ac_fn_c_try_compile "$LINENO"; then : |
14341 | ac_cv_c_inline=$ac_kw | |
14342 | fi | |
14343 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
14344 | test "$ac_cv_c_inline" != no && break | |
14345 | done | |
14346 | ||
14347 | fi | |
14348 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 | |
14349 | $as_echo "$ac_cv_c_inline" >&6; } | |
14350 | ||
14351 | case $ac_cv_c_inline in | |
14352 | inline | yes) ;; | |
14353 | *) | |
14354 | case $ac_cv_c_inline in | |
14355 | no) ac_val=;; | |
14356 | *) ac_val=$ac_cv_c_inline;; | |
14357 | esac | |
14358 | cat >>confdefs.h <<_ACEOF | |
14359 | #ifndef __cplusplus | |
14360 | #define inline $ac_val | |
14361 | #endif | |
14362 | _ACEOF | |
14363 | ;; | |
14364 | esac | |
14365 | ||
14366 | ||
14367 | REPLACE_NULL=0; | |
14368 | HAVE_WCHAR_T=1; | |
14369 | STDDEF_H=''; | |
14370 | ||
14371 | ||
14372 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5 | |
14373 | $as_echo_n "checking for wchar_t... " >&6; } | |
9ba41eb9 | 14374 | if test "${gt_cv_c_wchar_t+set}" = set; then : |
1fd182f0 PE |
14375 | $as_echo_n "(cached) " >&6 |
14376 | else | |
14377 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14378 | /* end confdefs.h. */ | |
14379 | #include <stddef.h> | |
14380 | wchar_t foo = (wchar_t)'\0'; | |
14381 | int | |
14382 | main () | |
14383 | { | |
14384 | ||
14385 | ; | |
14386 | return 0; | |
14387 | } | |
14388 | _ACEOF | |
14389 | if ac_fn_c_try_compile "$LINENO"; then : | |
14390 | gt_cv_c_wchar_t=yes | |
14391 | else | |
14392 | gt_cv_c_wchar_t=no | |
14393 | fi | |
14394 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
14395 | fi | |
14396 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5 | |
14397 | $as_echo "$gt_cv_c_wchar_t" >&6; } | |
14398 | if test $gt_cv_c_wchar_t = yes; then | |
14399 | ||
14400 | $as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h | |
14401 | ||
14402 | fi | |
14403 | ||
1fd182f0 PE |
14404 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5 |
14405 | $as_echo_n "checking for C/C++ restrict keyword... " >&6; } | |
9ba41eb9 | 14406 | if test "${ac_cv_c_restrict+set}" = set; then : |
1fd182f0 PE |
14407 | $as_echo_n "(cached) " >&6 |
14408 | else | |
14409 | ac_cv_c_restrict=no | |
14410 | # The order here caters to the fact that C++ does not require restrict. | |
14411 | for ac_kw in __restrict __restrict__ _Restrict restrict; do | |
14412 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14413 | /* end confdefs.h. */ | |
14414 | typedef int * int_ptr; | |
14415 | int foo (int_ptr $ac_kw ip) { | |
14416 | return ip[0]; | |
14417 | } | |
14418 | int | |
14419 | main () | |
14420 | { | |
14421 | int s[1]; | |
14422 | int * $ac_kw t = s; | |
14423 | t[0] = 0; | |
14424 | return foo(t) | |
14425 | ; | |
14426 | return 0; | |
14427 | } | |
14428 | _ACEOF | |
14429 | if ac_fn_c_try_compile "$LINENO"; then : | |
14430 | ac_cv_c_restrict=$ac_kw | |
14431 | fi | |
14432 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
14433 | test "$ac_cv_c_restrict" != no && break | |
14434 | done | |
14435 | ||
14436 | fi | |
14437 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5 | |
14438 | $as_echo "$ac_cv_c_restrict" >&6; } | |
14439 | ||
14440 | case $ac_cv_c_restrict in | |
14441 | restrict) ;; | |
14442 | no) $as_echo "#define restrict /**/" >>confdefs.h | |
14443 | ;; | |
14444 | *) cat >>confdefs.h <<_ACEOF | |
14445 | #define restrict $ac_cv_c_restrict | |
14446 | _ACEOF | |
14447 | ;; | |
14448 | esac | |
14449 | ||
14450 | ||
14451 | ||
14452 | ||
14453 | ||
1fd182f0 PE |
14454 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5 |
14455 | $as_echo_n "checking for struct timespec in <time.h>... " >&6; } | |
9ba41eb9 | 14456 | if test "${gl_cv_sys_struct_timespec_in_time_h+set}" = set; then : |
1fd182f0 PE |
14457 | $as_echo_n "(cached) " >&6 |
14458 | else | |
14459 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14460 | /* end confdefs.h. */ | |
14461 | #include <time.h> | |
14462 | ||
14463 | int | |
14464 | main () | |
14465 | { | |
14466 | static struct timespec x; x.tv_sec = x.tv_nsec; | |
14467 | ; | |
14468 | return 0; | |
14469 | } | |
14470 | _ACEOF | |
14471 | if ac_fn_c_try_compile "$LINENO"; then : | |
14472 | gl_cv_sys_struct_timespec_in_time_h=yes | |
14473 | else | |
14474 | gl_cv_sys_struct_timespec_in_time_h=no | |
14475 | fi | |
14476 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
14477 | fi | |
14478 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5 | |
14479 | $as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; } | |
14480 | ||
14481 | TIME_H_DEFINES_STRUCT_TIMESPEC=0 | |
14482 | SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0 | |
14483 | PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0 | |
14484 | if test $gl_cv_sys_struct_timespec_in_time_h = yes; then | |
14485 | TIME_H_DEFINES_STRUCT_TIMESPEC=1 | |
14486 | else | |
14487 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5 | |
14488 | $as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; } | |
9ba41eb9 | 14489 | if test "${gl_cv_sys_struct_timespec_in_sys_time_h+set}" = set; then : |
1fd182f0 PE |
14490 | $as_echo_n "(cached) " >&6 |
14491 | else | |
14492 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14493 | /* end confdefs.h. */ | |
14494 | #include <sys/time.h> | |
14495 | ||
14496 | int | |
14497 | main () | |
14498 | { | |
14499 | static struct timespec x; x.tv_sec = x.tv_nsec; | |
14500 | ; | |
14501 | return 0; | |
14502 | } | |
14503 | _ACEOF | |
14504 | if ac_fn_c_try_compile "$LINENO"; then : | |
14505 | gl_cv_sys_struct_timespec_in_sys_time_h=yes | |
14506 | else | |
14507 | gl_cv_sys_struct_timespec_in_sys_time_h=no | |
14508 | fi | |
14509 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
14510 | fi | |
14511 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5 | |
14512 | $as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; } | |
14513 | if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then | |
14514 | SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1 | |
14515 | else | |
14516 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5 | |
14517 | $as_echo_n "checking for struct timespec in <pthread.h>... " >&6; } | |
9ba41eb9 | 14518 | if test "${gl_cv_sys_struct_timespec_in_pthread_h+set}" = set; then : |
1fd182f0 PE |
14519 | $as_echo_n "(cached) " >&6 |
14520 | else | |
14521 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14522 | /* end confdefs.h. */ | |
14523 | #include <pthread.h> | |
14524 | ||
14525 | int | |
14526 | main () | |
14527 | { | |
14528 | static struct timespec x; x.tv_sec = x.tv_nsec; | |
14529 | ; | |
14530 | return 0; | |
14531 | } | |
14532 | _ACEOF | |
14533 | if ac_fn_c_try_compile "$LINENO"; then : | |
14534 | gl_cv_sys_struct_timespec_in_pthread_h=yes | |
14535 | else | |
14536 | gl_cv_sys_struct_timespec_in_pthread_h=no | |
14537 | fi | |
14538 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
14539 | fi | |
14540 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5 | |
14541 | $as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; } | |
14542 | if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then | |
14543 | PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1 | |
14544 | fi | |
14545 | fi | |
14546 | fi | |
14547 | ||
14548 | ||
14549 | ||
14550 | ||
14551 | ||
14552 | ||
14553 | ||
14554 | ||
14555 | ||
14556 | ||
14557 | ||
14558 | ||
14559 | ||
b06b1098 PE |
14560 | |
14561 | ||
1fd182f0 PE |
14562 | if test $gl_cv_have_include_next = yes; then |
14563 | gl_cv_next_time_h='<'time.h'>' | |
14564 | else | |
14565 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5 | |
14566 | $as_echo_n "checking absolute name of <time.h>... " >&6; } | |
9ba41eb9 | 14567 | if test "${gl_cv_next_time_h+set}" = set; then : |
1fd182f0 PE |
14568 | $as_echo_n "(cached) " >&6 |
14569 | else | |
14570 | ||
b06b1098 | 14571 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
1fd182f0 PE |
14572 | /* end confdefs.h. */ |
14573 | #include <time.h> | |
14574 | ||
14575 | _ACEOF | |
b06b1098 PE |
14576 | case "$host_os" in |
14577 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
14578 | *) gl_absname_cpp="$ac_cpp" ;; | |
14579 | esac | |
14580 | gl_cv_next_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
14581 | sed -n '\#/time.h#{ | |
14582 | s#.*"\(.*/time.h\)".*#\1# | |
14583 | s#^/[^/]#//&# | |
14584 | p | |
14585 | q | |
14586 | }'`'"' | |
14587 | ||
1fd182f0 PE |
14588 | |
14589 | fi | |
14590 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5 | |
14591 | $as_echo "$gl_cv_next_time_h" >&6; } | |
14592 | fi | |
14593 | NEXT_TIME_H=$gl_cv_next_time_h | |
14594 | ||
14595 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then | |
14596 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
14597 | gl_next_as_first_directive='<'time.h'>' | |
14598 | else | |
14599 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
14600 | gl_next_as_first_directive=$gl_cv_next_time_h | |
14601 | fi | |
14602 | NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive | |
14603 | ||
14604 | ||
14605 | ||
14606 | ||
14607 | ||
b06b1098 | 14608 | |
1fd182f0 | 14609 | ac_fn_c_check_decl "$LINENO" "localtime_r" "ac_cv_have_decl_localtime_r" "$ac_includes_default" |
9ba41eb9 | 14610 | if test "x$ac_cv_have_decl_localtime_r" = x""yes; then : |
1fd182f0 PE |
14611 | ac_have_decl=1 |
14612 | else | |
14613 | ac_have_decl=0 | |
14614 | fi | |
14615 | ||
14616 | cat >>confdefs.h <<_ACEOF | |
14617 | #define HAVE_DECL_LOCALTIME_R $ac_have_decl | |
14618 | _ACEOF | |
14619 | ||
14620 | ||
14621 | ||
14622 | ||
14623 | if false; then | |
14624 | GL_COND_LIBTOOL_TRUE= | |
14625 | GL_COND_LIBTOOL_FALSE='#' | |
14626 | else | |
14627 | GL_COND_LIBTOOL_TRUE='#' | |
14628 | GL_COND_LIBTOOL_FALSE= | |
14629 | fi | |
14630 | ||
14631 | gl_cond_libtool=false | |
14632 | gl_libdeps= | |
14633 | gl_ltlibdeps= | |
14634 | gl_m4_base='m4' | |
14635 | ||
14636 | ||
14637 | ||
14638 | ||
14639 | ||
14640 | ||
14641 | ||
14642 | ||
14643 | ||
14644 | gl_source_base='lib' | |
14645 | # Code from module arg-nonnull: | |
14646 | # Code from module c++defs: | |
f737437b | 14647 | # Code from module dtoastr: |
1fd182f0 | 14648 | |
f737437b | 14649 | # Code from module extensions: |
e275c824 PE |
14650 | # Code from module getopt-gnu: |
14651 | ||
14652 | ||
14653 | ||
14654 | ||
14655 | ||
14656 | ||
e275c824 PE |
14657 | # Code from module getopt-posix: |
14658 | ||
14659 | ||
14660 | ||
14661 | ||
14662 | ||
14663 | if test -n "$gl_replace_getopt"; then : | |
14664 | ||
14665 | ||
14666 | ||
14667 | GETOPT_H=getopt.h | |
14668 | ||
14669 | $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h | |
14670 | ||
14671 | ||
14672 | ||
14673 | GNULIB_UNISTD_H_GETOPT=1 | |
14674 | ||
14675 | ||
14676 | ||
14677 | ||
14678 | ||
14679 | ||
14680 | ||
14681 | ||
14682 | gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext" | |
14683 | ||
14684 | ||
14685 | ||
14686 | ||
14687 | ||
14688 | ||
14689 | ||
14690 | ||
14691 | ||
14692 | gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext" | |
14693 | ||
14694 | ||
14695 | ||
14696 | ||
14697 | ||
14698 | ||
14699 | fi | |
14700 | ||
14701 | ||
14702 | # Code from module gettext-h: | |
14703 | ||
14704 | ||
1fd182f0 PE |
14705 | # Code from module include_next: |
14706 | # Code from module intprops: | |
14707 | # Code from module mktime: | |
14708 | ||
14709 | ||
14710 | ||
14711 | ||
14712 | ||
14713 | if test $APPLE_UNIVERSAL_BUILD = 1; then | |
14714 | # A universal build on Apple MacOS X platforms. | |
14715 | # The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode. | |
14716 | # But we need a configuration result that is valid in both modes. | |
14717 | ac_cv_func_working_mktime=no | |
14718 | fi | |
14719 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5 | |
14720 | $as_echo_n "checking for working mktime... " >&6; } | |
9ba41eb9 | 14721 | if test "${ac_cv_func_working_mktime+set}" = set; then : |
1fd182f0 PE |
14722 | $as_echo_n "(cached) " >&6 |
14723 | else | |
14724 | if test "$cross_compiling" = yes; then : | |
14725 | ac_cv_func_working_mktime=no | |
14726 | else | |
14727 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14728 | /* end confdefs.h. */ | |
14729 | /* Test program from Paul Eggert and Tony Leneis. */ | |
14730 | #include <limits.h> | |
14731 | #include <stdlib.h> | |
14732 | #include <time.h> | |
14733 | ||
14734 | #ifdef HAVE_UNISTD_H | |
14735 | # include <unistd.h> | |
14736 | #endif | |
14737 | ||
14738 | #ifndef HAVE_ALARM | |
14739 | # define alarm(X) /* empty */ | |
14740 | #endif | |
14741 | ||
14742 | /* Work around redefinition to rpl_putenv by other config tests. */ | |
14743 | #undef putenv | |
14744 | ||
14745 | static time_t time_t_max; | |
14746 | static time_t time_t_min; | |
14747 | ||
14748 | /* Values we'll use to set the TZ environment variable. */ | |
14749 | static char *tz_strings[] = { | |
14750 | (char *) 0, "TZ=GMT0", "TZ=JST-9", | |
14751 | "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00" | |
14752 | }; | |
14753 | #define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0])) | |
14754 | ||
14755 | /* Return 0 if mktime fails to convert a date in the spring-forward gap. | |
14756 | Based on a problem report from Andreas Jaeger. */ | |
14757 | static int | |
14758 | spring_forward_gap () | |
14759 | { | |
14760 | /* glibc (up to about 1998-10-07) failed this test. */ | |
14761 | struct tm tm; | |
14762 | ||
14763 | /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0" | |
14764 | instead of "TZ=America/Vancouver" in order to detect the bug even | |
14765 | on systems that don't support the Olson extension, or don't have the | |
14766 | full zoneinfo tables installed. */ | |
14767 | putenv ("TZ=PST8PDT,M4.1.0,M10.5.0"); | |
14768 | ||
14769 | tm.tm_year = 98; | |
14770 | tm.tm_mon = 3; | |
14771 | tm.tm_mday = 5; | |
14772 | tm.tm_hour = 2; | |
14773 | tm.tm_min = 0; | |
14774 | tm.tm_sec = 0; | |
14775 | tm.tm_isdst = -1; | |
14776 | return mktime (&tm) != (time_t) -1; | |
14777 | } | |
14778 | ||
14779 | static int | |
14780 | mktime_test1 (time_t now) | |
14781 | { | |
14782 | struct tm *lt; | |
14783 | return ! (lt = localtime (&now)) || mktime (lt) == now; | |
14784 | } | |
14785 | ||
14786 | static int | |
14787 | mktime_test (time_t now) | |
14788 | { | |
14789 | return (mktime_test1 (now) | |
14790 | && mktime_test1 ((time_t) (time_t_max - now)) | |
14791 | && mktime_test1 ((time_t) (time_t_min + now))); | |
14792 | } | |
14793 | ||
14794 | static int | |
14795 | irix_6_4_bug () | |
14796 | { | |
14797 | /* Based on code from Ariel Faigon. */ | |
14798 | struct tm tm; | |
14799 | tm.tm_year = 96; | |
14800 | tm.tm_mon = 3; | |
14801 | tm.tm_mday = 0; | |
14802 | tm.tm_hour = 0; | |
14803 | tm.tm_min = 0; | |
14804 | tm.tm_sec = 0; | |
14805 | tm.tm_isdst = -1; | |
14806 | mktime (&tm); | |
14807 | return tm.tm_mon == 2 && tm.tm_mday == 31; | |
14808 | } | |
14809 | ||
14810 | static int | |
14811 | bigtime_test (int j) | |
14812 | { | |
14813 | struct tm tm; | |
14814 | time_t now; | |
14815 | tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j; | |
14816 | now = mktime (&tm); | |
14817 | if (now != (time_t) -1) | |
14818 | { | |
14819 | struct tm *lt = localtime (&now); | |
14820 | if (! (lt | |
14821 | && lt->tm_year == tm.tm_year | |
14822 | && lt->tm_mon == tm.tm_mon | |
14823 | && lt->tm_mday == tm.tm_mday | |
14824 | && lt->tm_hour == tm.tm_hour | |
14825 | && lt->tm_min == tm.tm_min | |
14826 | && lt->tm_sec == tm.tm_sec | |
14827 | && lt->tm_yday == tm.tm_yday | |
14828 | && lt->tm_wday == tm.tm_wday | |
14829 | && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst) | |
14830 | == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst)))) | |
14831 | return 0; | |
14832 | } | |
14833 | return 1; | |
14834 | } | |
14835 | ||
14836 | static int | |
14837 | year_2050_test () | |
14838 | { | |
14839 | /* The correct answer for 2050-02-01 00:00:00 in Pacific time, | |
14840 | ignoring leap seconds. */ | |
14841 | unsigned long int answer = 2527315200UL; | |
14842 | ||
14843 | struct tm tm; | |
14844 | time_t t; | |
14845 | tm.tm_year = 2050 - 1900; | |
14846 | tm.tm_mon = 2 - 1; | |
14847 | tm.tm_mday = 1; | |
14848 | tm.tm_hour = tm.tm_min = tm.tm_sec = 0; | |
14849 | tm.tm_isdst = -1; | |
14850 | ||
14851 | /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0" | |
14852 | instead of "TZ=America/Vancouver" in order to detect the bug even | |
14853 | on systems that don't support the Olson extension, or don't have the | |
14854 | full zoneinfo tables installed. */ | |
14855 | putenv ("TZ=PST8PDT,M4.1.0,M10.5.0"); | |
14856 | ||
14857 | t = mktime (&tm); | |
14858 | ||
14859 | /* Check that the result is either a failure, or close enough | |
14860 | to the correct answer that we can assume the discrepancy is | |
14861 | due to leap seconds. */ | |
14862 | return (t == (time_t) -1 | |
14863 | || (0 < t && answer - 120 <= t && t <= answer + 120)); | |
14864 | } | |
14865 | ||
14866 | int | |
14867 | main () | |
14868 | { | |
14869 | int result = 0; | |
14870 | time_t t, delta; | |
14871 | int i, j; | |
14872 | ||
14873 | /* This test makes some buggy mktime implementations loop. | |
14874 | Give up after 60 seconds; a mktime slower than that | |
14875 | isn't worth using anyway. */ | |
14876 | alarm (60); | |
14877 | ||
14878 | for (;;) | |
14879 | { | |
14880 | t = (time_t_max << 1) + 1; | |
14881 | if (t <= time_t_max) | |
14882 | break; | |
14883 | time_t_max = t; | |
14884 | } | |
14885 | time_t_min = - ((time_t) ~ (time_t) 0 == (time_t) -1) - time_t_max; | |
14886 | ||
14887 | delta = time_t_max / 997; /* a suitable prime number */ | |
14888 | for (i = 0; i < N_STRINGS; i++) | |
14889 | { | |
14890 | if (tz_strings[i]) | |
14891 | putenv (tz_strings[i]); | |
14892 | ||
14893 | for (t = 0; t <= time_t_max - delta; t += delta) | |
14894 | if (! mktime_test (t)) | |
14895 | result |= 1; | |
14896 | if (! (mktime_test ((time_t) 1) | |
14897 | && mktime_test ((time_t) (60 * 60)) | |
14898 | && mktime_test ((time_t) (60 * 60 * 24)))) | |
14899 | result |= 2; | |
14900 | ||
14901 | for (j = 1; ; j <<= 1) | |
14902 | if (! bigtime_test (j)) | |
14903 | result |= 4; | |
14904 | else if (INT_MAX / 2 < j) | |
14905 | break; | |
14906 | if (! bigtime_test (INT_MAX)) | |
14907 | result |= 8; | |
14908 | } | |
14909 | if (! irix_6_4_bug ()) | |
14910 | result |= 16; | |
14911 | if (! spring_forward_gap ()) | |
14912 | result |= 32; | |
14913 | if (! year_2050_test ()) | |
14914 | result |= 64; | |
14915 | return result; | |
14916 | } | |
14917 | _ACEOF | |
14918 | if ac_fn_c_try_run "$LINENO"; then : | |
14919 | ac_cv_func_working_mktime=yes | |
14920 | else | |
14921 | ac_cv_func_working_mktime=no | |
14922 | fi | |
14923 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
14924 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
067d23c9 | 14925 | fi |
067d23c9 | 14926 | |
1fd182f0 PE |
14927 | fi |
14928 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_working_mktime" >&5 | |
14929 | $as_echo "$ac_cv_func_working_mktime" >&6; } | |
14930 | if test $ac_cv_func_working_mktime = no; then | |
067d23c9 | 14931 | |
067d23c9 | 14932 | |
067d23c9 KY |
14933 | |
14934 | ||
067d23c9 | 14935 | |
067d23c9 KY |
14936 | |
14937 | ||
14938 | ||
1fd182f0 | 14939 | gl_LIBOBJS="$gl_LIBOBJS mktime.$ac_objext" |
067d23c9 | 14940 | |
1fd182f0 | 14941 | fi |
067d23c9 | 14942 | |
1fd182f0 PE |
14943 | if test $ac_cv_func_working_mktime = no; then |
14944 | REPLACE_MKTIME=1 | |
067d23c9 KY |
14945 | |
14946 | ||
14947 | ||
1fd182f0 PE |
14948 | else |
14949 | REPLACE_MKTIME=0 | |
14950 | fi | |
067d23c9 KY |
14951 | |
14952 | ||
14953 | ||
067d23c9 | 14954 | |
1fd182f0 | 14955 | GNULIB_MKTIME=1 |
067d23c9 KY |
14956 | |
14957 | ||
14958 | ||
1fd182f0 | 14959 | # Code from module multiarch: |
067d23c9 | 14960 | |
1fd182f0 | 14961 | # Code from module stddef: |
067d23c9 | 14962 | |
067d23c9 | 14963 | |
067d23c9 | 14964 | |
1fd182f0 PE |
14965 | if test $gt_cv_c_wchar_t = no; then |
14966 | HAVE_WCHAR_T=0 | |
14967 | STDDEF_H=stddef.h | |
067d23c9 | 14968 | fi |
1fd182f0 PE |
14969 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5 |
14970 | $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; } | |
9ba41eb9 | 14971 | if test "${gl_cv_decl_null_works+set}" = set; then : |
067d23c9 | 14972 | $as_echo_n "(cached) " >&6 |
067d23c9 KY |
14973 | else |
14974 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14975 | /* end confdefs.h. */ | |
1fd182f0 PE |
14976 | #include <stddef.h> |
14977 | int test[2 * (sizeof NULL == sizeof (void *)) -1]; | |
14978 | ||
067d23c9 KY |
14979 | int |
14980 | main () | |
14981 | { | |
14982 | ||
067d23c9 KY |
14983 | ; |
14984 | return 0; | |
14985 | } | |
14986 | _ACEOF | |
1fd182f0 PE |
14987 | if ac_fn_c_try_compile "$LINENO"; then : |
14988 | gl_cv_decl_null_works=yes | |
067d23c9 | 14989 | else |
1fd182f0 | 14990 | gl_cv_decl_null_works=no |
067d23c9 | 14991 | fi |
1fd182f0 | 14992 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
067d23c9 | 14993 | fi |
1fd182f0 PE |
14994 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5 |
14995 | $as_echo "$gl_cv_decl_null_works" >&6; } | |
14996 | if test $gl_cv_decl_null_works = no; then | |
14997 | REPLACE_NULL=1 | |
14998 | STDDEF_H=stddef.h | |
14999 | fi | |
15000 | if test -n "$STDDEF_H"; then | |
15001 | ||
15002 | ||
15003 | ||
15004 | ||
15005 | ||
15006 | ||
b06b1098 PE |
15007 | |
15008 | ||
1fd182f0 PE |
15009 | if test $gl_cv_have_include_next = yes; then |
15010 | gl_cv_next_stddef_h='<'stddef.h'>' | |
15011 | else | |
15012 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5 | |
15013 | $as_echo_n "checking absolute name of <stddef.h>... " >&6; } | |
9ba41eb9 | 15014 | if test "${gl_cv_next_stddef_h+set}" = set; then : |
1fd182f0 PE |
15015 | $as_echo_n "(cached) " >&6 |
15016 | else | |
15017 | ||
b06b1098 | 15018 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
1fd182f0 PE |
15019 | /* end confdefs.h. */ |
15020 | #include <stddef.h> | |
15021 | ||
15022 | _ACEOF | |
b06b1098 PE |
15023 | case "$host_os" in |
15024 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
15025 | *) gl_absname_cpp="$ac_cpp" ;; | |
15026 | esac | |
15027 | gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
15028 | sed -n '\#/stddef.h#{ | |
15029 | s#.*"\(.*/stddef.h\)".*#\1# | |
15030 | s#^/[^/]#//&# | |
15031 | p | |
15032 | q | |
15033 | }'`'"' | |
15034 | ||
067d23c9 KY |
15035 | |
15036 | fi | |
1fd182f0 PE |
15037 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5 |
15038 | $as_echo "$gl_cv_next_stddef_h" >&6; } | |
15039 | fi | |
15040 | NEXT_STDDEF_H=$gl_cv_next_stddef_h | |
15041 | ||
15042 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then | |
15043 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
15044 | gl_next_as_first_directive='<'stddef.h'>' | |
15045 | else | |
15046 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
15047 | gl_next_as_first_directive=$gl_cv_next_stddef_h | |
15048 | fi | |
15049 | NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive | |
15050 | ||
15051 | ||
15052 | ||
b06b1098 | 15053 | |
067d23c9 KY |
15054 | fi |
15055 | ||
1fd182f0 | 15056 | # Code from module time: |
067d23c9 KY |
15057 | |
15058 | ||
067d23c9 | 15059 | |
1fd182f0 | 15060 | # Code from module time_r: |
067d23c9 | 15061 | |
067d23c9 | 15062 | |
067d23c9 KY |
15063 | |
15064 | ||
15065 | ||
067d23c9 | 15066 | |
067d23c9 | 15067 | |
1fd182f0 PE |
15068 | if test $ac_cv_have_decl_localtime_r = no; then |
15069 | HAVE_DECL_LOCALTIME_R=0 | |
15070 | fi | |
067d23c9 KY |
15071 | |
15072 | ||
1fd182f0 PE |
15073 | if test $ac_cv_func_localtime_r = yes; then |
15074 | HAVE_LOCALTIME_R=1 | |
15075 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime_r is compatible with its POSIX signature" >&5 | |
15076 | $as_echo_n "checking whether localtime_r is compatible with its POSIX signature... " >&6; } | |
9ba41eb9 | 15077 | if test "${gl_cv_time_r_posix+set}" = set; then : |
067d23c9 KY |
15078 | $as_echo_n "(cached) " >&6 |
15079 | else | |
1fd182f0 | 15080 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
067d23c9 | 15081 | /* end confdefs.h. */ |
1fd182f0 | 15082 | #include <time.h> |
067d23c9 KY |
15083 | int |
15084 | main () | |
15085 | { | |
1fd182f0 PE |
15086 | /* We don't need to append 'restrict's to the argument types, |
15087 | even though the POSIX signature has the 'restrict's, | |
15088 | since C99 says they can't affect type compatibility. */ | |
15089 | struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r; | |
15090 | if (ptr) return 0; | |
15091 | /* Check the return type is a pointer. | |
15092 | On HP-UX 10 it is 'int'. */ | |
15093 | *localtime_r (0, 0); | |
067d23c9 KY |
15094 | ; |
15095 | return 0; | |
15096 | } | |
1fd182f0 | 15097 | |
067d23c9 KY |
15098 | _ACEOF |
15099 | if ac_fn_c_try_compile "$LINENO"; then : | |
1fd182f0 | 15100 | gl_cv_time_r_posix=yes |
067d23c9 | 15101 | else |
1fd182f0 | 15102 | gl_cv_time_r_posix=no |
067d23c9 KY |
15103 | fi |
15104 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
15105 | ||
15106 | fi | |
1fd182f0 PE |
15107 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_r_posix" >&5 |
15108 | $as_echo "$gl_cv_time_r_posix" >&6; } | |
15109 | if test $gl_cv_time_r_posix = yes; then | |
15110 | REPLACE_LOCALTIME_R=0 | |
15111 | else | |
15112 | REPLACE_LOCALTIME_R=1 | |
15113 | fi | |
15114 | else | |
15115 | HAVE_LOCALTIME_R=0 | |
15116 | fi | |
15117 | if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then | |
067d23c9 | 15118 | |
067d23c9 KY |
15119 | |
15120 | ||
743c80a7 | 15121 | |
a451f14b PE |
15122 | |
15123 | ||
15124 | ||
a451f14b | 15125 | |
1fd182f0 | 15126 | gl_LIBOBJS="$gl_LIBOBJS time_r.$ac_objext" |
a451f14b | 15127 | |
a451f14b | 15128 | |
1fd182f0 | 15129 | : |
a451f14b PE |
15130 | |
15131 | fi | |
15132 | ||
15133 | ||
743c80a7 PE |
15134 | |
15135 | ||
1fd182f0 | 15136 | GNULIB_TIME_R=1 |
743c80a7 PE |
15137 | |
15138 | ||
15139 | ||
b06b1098 | 15140 | # Code from module unistd: |
a451f14b PE |
15141 | |
15142 | ||
15143 | ||
e275c824 PE |
15144 | |
15145 | ||
15146 | ||
15147 | ||
15148 | ||
15149 | ||
15150 | ||
15151 | ||
15152 | ||
15153 | ||
15154 | if test $gl_cv_have_include_next = yes; then | |
15155 | gl_cv_next_unistd_h='<'unistd.h'>' | |
15156 | else | |
15157 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5 | |
15158 | $as_echo_n "checking absolute name of <unistd.h>... " >&6; } | |
9ba41eb9 | 15159 | if test "${gl_cv_next_unistd_h+set}" = set; then : |
e275c824 PE |
15160 | $as_echo_n "(cached) " >&6 |
15161 | else | |
15162 | ||
b06b1098 PE |
15163 | if test $ac_cv_header_unistd_h = yes; then |
15164 | ||
15165 | ||
15166 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
e275c824 PE |
15167 | /* end confdefs.h. */ |
15168 | #include <unistd.h> | |
15169 | ||
15170 | _ACEOF | |
b06b1098 PE |
15171 | case "$host_os" in |
15172 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
15173 | *) gl_absname_cpp="$ac_cpp" ;; | |
15174 | esac | |
15175 | gl_cv_next_unistd_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
15176 | sed -n '\#/unistd.h#{ | |
15177 | s#.*"\(.*/unistd.h\)".*#\1# | |
15178 | s#^/[^/]#//&# | |
15179 | p | |
15180 | q | |
15181 | }'`'"' | |
e275c824 | 15182 | else |
b06b1098 PE |
15183 | gl_cv_next_unistd_h='<'unistd.h'>' |
15184 | fi | |
15185 | ||
e275c824 PE |
15186 | |
15187 | fi | |
15188 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5 | |
15189 | $as_echo "$gl_cv_next_unistd_h" >&6; } | |
15190 | fi | |
15191 | NEXT_UNISTD_H=$gl_cv_next_unistd_h | |
15192 | ||
15193 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then | |
15194 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
15195 | gl_next_as_first_directive='<'unistd.h'>' | |
15196 | else | |
15197 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
15198 | gl_next_as_first_directive=$gl_cv_next_unistd_h | |
15199 | fi | |
15200 | NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive | |
15201 | ||
15202 | ||
15203 | ||
15204 | ||
e275c824 PE |
15205 | if test $ac_cv_header_unistd_h = yes; then |
15206 | HAVE_UNISTD_H=1 | |
15207 | else | |
15208 | HAVE_UNISTD_H=0 | |
15209 | fi | |
15210 | ||
15211 | ||
15212 | ||
15213 | for gl_func in chown dup2 dup3 environ euidaccess faccessat fchdir fchownat fsync ftruncate getcwd getdomainname getdtablesize getgroups gethostname getlogin getlogin_r getpagesize getusershell setusershell endusershell lchown link linkat lseek pipe pipe2 pread pwrite readlink readlinkat rmdir sleep symlink symlinkat ttyname_r unlink unlinkat usleep; do | |
15214 | as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` | |
15215 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 | |
15216 | $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } | |
9ba41eb9 | 15217 | if eval "test \"\${$as_gl_Symbol+set}\"" = set; then : |
e275c824 PE |
15218 | $as_echo_n "(cached) " >&6 |
15219 | else | |
15220 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15221 | /* end confdefs.h. */ | |
15222 | #include <unistd.h> | |
15223 | /* Some systems declare various items in the wrong headers. */ | |
15224 | #if !(defined __GLIBC__ && !defined __UCLIBC__) | |
15225 | # include <fcntl.h> | |
15226 | # include <stdio.h> | |
15227 | # include <stdlib.h> | |
15228 | # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ | |
15229 | # include <io.h> | |
15230 | # endif | |
15231 | #endif | |
15232 | ||
15233 | int | |
15234 | main () | |
15235 | { | |
15236 | #undef $gl_func | |
15237 | (void) $gl_func; | |
15238 | ; | |
15239 | return 0; | |
15240 | } | |
15241 | _ACEOF | |
15242 | if ac_fn_c_try_compile "$LINENO"; then : | |
15243 | eval "$as_gl_Symbol=yes" | |
15244 | else | |
15245 | eval "$as_gl_Symbol=no" | |
15246 | fi | |
15247 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
15248 | fi | |
15249 | eval ac_res=\$$as_gl_Symbol | |
15250 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
15251 | $as_echo "$ac_res" >&6; } | |
15252 | if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : | |
15253 | cat >>confdefs.h <<_ACEOF | |
15254 | #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 | |
15255 | _ACEOF | |
15256 | ||
15257 | eval ac_cv_have_decl_$gl_func=yes | |
15258 | fi | |
15259 | done | |
15260 | ||
15261 | ||
1fd182f0 PE |
15262 | # Code from module warn-on-use: |
15263 | # End of code from modules | |
a451f14b | 15264 | |
a451f14b | 15265 | |
743c80a7 PE |
15266 | |
15267 | ||
15268 | ||
15269 | ||
15270 | ||
15271 | ||
15272 | ||
15273 | gltests_libdeps= | |
15274 | gltests_ltlibdeps= | |
15275 | ||
15276 | ||
15277 | ||
15278 | ||
15279 | ||
a451f14b PE |
15280 | |
15281 | ||
15282 | ||
15283 | ||
743c80a7 PE |
15284 | gl_source_base='tests' |
15285 | 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 | |
15286 | ||
15287 | gl_module_indicator_condition=$gltests_WITNESS | |
15288 | ||
15289 | ||
15290 | ||
15291 | ||
15292 | ||
15293 | ||
15294 | ||
15295 | ||
15296 | ||
15297 | LIBGNU_LIBDEPS="$gl_libdeps" | |
15298 | ||
15299 | LIBGNU_LTLIBDEPS="$gl_ltlibdeps" | |
15300 | ||
15301 | ||
15302 | ||
067d23c9 KY |
15303 | for ac_func in strftime |
15304 | do : | |
15305 | ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime" | |
9ba41eb9 | 15306 | if test "x$ac_cv_func_strftime" = x""yes; then : |
067d23c9 KY |
15307 | cat >>confdefs.h <<_ACEOF |
15308 | #define HAVE_STRFTIME 1 | |
15309 | _ACEOF | |
15310 | ||
15311 | else | |
15312 | # strftime is in -lintl on SCO UNIX. | |
15313 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strftime in -lintl" >&5 | |
15314 | $as_echo_n "checking for strftime in -lintl... " >&6; } | |
9ba41eb9 | 15315 | if test "${ac_cv_lib_intl_strftime+set}" = set; then : |
067d23c9 KY |
15316 | $as_echo_n "(cached) " >&6 |
15317 | else | |
15318 | ac_check_lib_save_LIBS=$LIBS | |
15319 | LIBS="-lintl $LIBS" | |
15320 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15321 | /* end confdefs.h. */ | |
15322 | ||
15323 | /* Override any GCC internal prototype to avoid an error. | |
15324 | Use char because int might match the return type of a GCC | |
15325 | builtin and then its argument prototype would still apply. */ | |
15326 | #ifdef __cplusplus | |
15327 | extern "C" | |
15328 | #endif | |
15329 | char strftime (); | |
15330 | int | |
15331 | main () | |
15332 | { | |
15333 | return strftime (); | |
15334 | ; | |
15335 | return 0; | |
15336 | } | |
15337 | _ACEOF | |
15338 | if ac_fn_c_try_link "$LINENO"; then : | |
15339 | ac_cv_lib_intl_strftime=yes | |
15340 | else | |
15341 | ac_cv_lib_intl_strftime=no | |
15342 | fi | |
15343 | rm -f core conftest.err conftest.$ac_objext \ | |
15344 | conftest$ac_exeext conftest.$ac_ext | |
15345 | LIBS=$ac_check_lib_save_LIBS | |
15346 | fi | |
15347 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_strftime" >&5 | |
15348 | $as_echo "$ac_cv_lib_intl_strftime" >&6; } | |
9ba41eb9 | 15349 | if test "x$ac_cv_lib_intl_strftime" = x""yes; then : |
067d23c9 KY |
15350 | $as_echo "#define HAVE_STRFTIME 1" >>confdefs.h |
15351 | ||
15352 | LIBS="-lintl $LIBS" | |
15353 | fi | |
15354 | ||
15355 | fi | |
15356 | done | |
15357 | ||
15358 | ||
15359 | # UNIX98 PTYs. | |
15360 | for ac_func in grantpt | |
15361 | do : | |
15362 | ac_fn_c_check_func "$LINENO" "grantpt" "ac_cv_func_grantpt" | |
9ba41eb9 | 15363 | if test "x$ac_cv_func_grantpt" = x""yes; then : |
067d23c9 KY |
15364 | cat >>confdefs.h <<_ACEOF |
15365 | #define HAVE_GRANTPT 1 | |
15366 | _ACEOF | |
15367 | ||
15368 | fi | |
15369 | done | |
15370 | ||
15371 | ||
15372 | # PTY-related GNU extensions. | |
15373 | for ac_func in getpt | |
15374 | do : | |
15375 | ac_fn_c_check_func "$LINENO" "getpt" "ac_cv_func_getpt" | |
9ba41eb9 | 15376 | if test "x$ac_cv_func_getpt" = x""yes; then : |
067d23c9 KY |
15377 | cat >>confdefs.h <<_ACEOF |
15378 | #define HAVE_GETPT 1 | |
15379 | _ACEOF | |
15380 | ||
15381 | fi | |
15382 | done | |
15383 | ||
15384 | ||
15385 | # Check this now, so that we will NOT find the above functions in ncurses. | |
15386 | # That is because we have not set up to link ncurses in lib-src. | |
15387 | # It's better to believe a function is not available | |
15388 | # than to expect to find it in ncurses. | |
15389 | # Also we need tputs and friends to be able to build at all. | |
15390 | have_tputs_et_al=true | |
15391 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tputs" >&5 | |
15392 | $as_echo_n "checking for library containing tputs... " >&6; } | |
9ba41eb9 | 15393 | if test "${ac_cv_search_tputs+set}" = set; then : |
067d23c9 KY |
15394 | $as_echo_n "(cached) " >&6 |
15395 | else | |
15396 | ac_func_search_save_LIBS=$LIBS | |
15397 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15398 | /* end confdefs.h. */ | |
15399 | ||
15400 | /* Override any GCC internal prototype to avoid an error. | |
15401 | Use char because int might match the return type of a GCC | |
15402 | builtin and then its argument prototype would still apply. */ | |
15403 | #ifdef __cplusplus | |
15404 | extern "C" | |
15405 | #endif | |
15406 | char tputs (); | |
15407 | int | |
15408 | main () | |
15409 | { | |
15410 | return tputs (); | |
15411 | ; | |
15412 | return 0; | |
15413 | } | |
15414 | _ACEOF | |
15415 | for ac_lib in '' ncurses terminfo termcap; do | |
15416 | if test -z "$ac_lib"; then | |
15417 | ac_res="none required" | |
15418 | else | |
15419 | ac_res=-l$ac_lib | |
15420 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
15421 | fi | |
15422 | if ac_fn_c_try_link "$LINENO"; then : | |
15423 | ac_cv_search_tputs=$ac_res | |
15424 | fi | |
15425 | rm -f core conftest.err conftest.$ac_objext \ | |
15426 | conftest$ac_exeext | |
9ba41eb9 | 15427 | if test "${ac_cv_search_tputs+set}" = set; then : |
067d23c9 KY |
15428 | break |
15429 | fi | |
15430 | done | |
9ba41eb9 | 15431 | if test "${ac_cv_search_tputs+set}" = set; then : |
067d23c9 KY |
15432 | |
15433 | else | |
15434 | ac_cv_search_tputs=no | |
15435 | fi | |
15436 | rm conftest.$ac_ext | |
15437 | LIBS=$ac_func_search_save_LIBS | |
15438 | fi | |
15439 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tputs" >&5 | |
15440 | $as_echo "$ac_cv_search_tputs" >&6; } | |
15441 | ac_res=$ac_cv_search_tputs | |
15442 | if test "$ac_res" != no; then : | |
15443 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
15444 | ||
15445 | else | |
15446 | have_tputs_et_al=false | |
15447 | fi | |
15448 | ||
15449 | if test "$have_tputs_et_al" != true; then | |
2018939f | 15450 | as_fn_error $? "I couldn't find termcap functions (tputs and friends). |
067d23c9 KY |
15451 | Maybe some development libraries/packages are missing? Try installing |
15452 | libncurses-dev(el), libterminfo-dev(el) or similar." "$LINENO" 5 | |
15453 | fi | |
15454 | # Must define this when any termcap library is found. | |
15455 | ||
15456 | $as_echo "#define HAVE_LIBNCURSES 1" >>confdefs.h | |
15457 | ||
15458 | ## FIXME This was the cpp logic, but I am not sure it is right. | |
15459 | ## The above test has not necessarily found libncurses. | |
15460 | HAVE_LIBNCURSES=yes | |
15461 | ||
15462 | ## Use terminfo instead of termcap? | |
15463 | ## Note only system files NOT using terminfo are: | |
15464 | ## freebsd < 40000, ms-w32, msdos, netbsd < 599002500, and | |
15465 | ## darwin|gnu without ncurses. | |
15466 | TERMINFO=no | |
15467 | LIBS_TERMCAP= | |
15468 | case "$opsys" in | |
15469 | ## cygwin: Fewer environment variables to go wrong, more terminal types. | |
15470 | ## hpux10-20: Use the system provided termcap(3) library. | |
15471 | ## openbsd: David Mazieres <dm@reeducation-labor.lcs.mit.edu> says this | |
15472 | ## is necessary. Otherwise Emacs dumps core when run -nw. | |
15473 | aix4-2|cygwin|hpux*|irix6-5|openbsd|sol2*|unixware) TERMINFO=yes ;; | |
15474 | ||
15475 | ## darwin: Prevents crashes when running Emacs in Terminal.app under 10.2. | |
15476 | ## The ncurses library has been moved out of the System framework in | |
15477 | ## Mac OS X 10.2. So if configure detects it, set the command-line | |
15478 | ## option to use it. | |
15479 | darwin|gnu*) | |
15480 | ## (HAVE_LIBNCURSES was not always true, but is since 2010-03-18.) | |
15481 | if test "x$HAVE_LIBNCURSES" = "xyes"; then | |
15482 | TERMINFO=yes | |
15483 | LIBS_TERMCAP="-lncurses" | |
15484 | fi | |
15485 | ;; | |
15486 | ||
15487 | freebsd) | |
15488 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether FreeBSD is new enough to use terminfo" >&5 | |
15489 | $as_echo_n "checking whether FreeBSD is new enough to use terminfo... " >&6; } | |
9ba41eb9 | 15490 | if test "${emacs_cv_freebsd_terminfo+set}" = set; then : |
067d23c9 KY |
15491 | $as_echo_n "(cached) " >&6 |
15492 | else | |
15493 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15494 | /* end confdefs.h. */ | |
15495 | #include <osreldate.h> | |
15496 | int | |
15497 | main () | |
15498 | { | |
15499 | #if __FreeBSD_version < 400000 | |
15500 | fail; | |
15501 | #endif | |
15502 | ||
15503 | ; | |
15504 | return 0; | |
15505 | } | |
15506 | _ACEOF | |
15507 | if ac_fn_c_try_link "$LINENO"; then : | |
15508 | emacs_cv_freebsd_terminfo=yes | |
15509 | else | |
15510 | emacs_cv_freebsd_terminfo=no | |
15511 | fi | |
15512 | rm -f core conftest.err conftest.$ac_objext \ | |
15513 | conftest$ac_exeext conftest.$ac_ext | |
15514 | fi | |
15515 | ||
15516 | ||
15517 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_freebsd_terminfo" >&5 | |
15518 | $as_echo "$emacs_cv_freebsd_terminfo" >&6; } | |
15519 | ||
15520 | if test $emacs_cv_freebsd_terminfo = yes; then | |
15521 | TERMINFO=yes | |
15522 | LIBS_TERMCAP="-lncurses" | |
15523 | else | |
15524 | LIBS_TERMCAP="-ltermcap" | |
15525 | fi | |
15526 | ;; | |
15527 | ||
15528 | netbsd) | |
15529 | if test $ac_cv_search_tputs = -lterminfo; then | |
15530 | TERMINFO=yes | |
15531 | LIBS_TERMCAP="-lterminfo" | |
15532 | else | |
15533 | LIBS_TERMCAP="-ltermcap" | |
15534 | fi | |
15535 | ;; | |
15536 | ||
15537 | esac | |
15538 | ||
15539 | case "$opsys" in | |
15540 | ## hpux: Make sure we get select from libc rather than from libcurses | |
15541 | ## because libcurses on HPUX 10.10 has a broken version of select. | |
15542 | ## We used to use -lc -lcurses, but this may be cleaner. | |
15543 | hpux*) LIBS_TERMCAP="-ltermcap" ;; | |
15544 | ||
15545 | openbsd) LIBS_TERMCAP="-lncurses" ;; | |
15546 | ||
15547 | ## Must use system termcap, if we use any termcap. It does special things. | |
15548 | sol2*) test "$TERMINFO" != yes && LIBS_TERMCAP="-ltermcap" ;; | |
15549 | esac | |
15550 | ||
15551 | TERMCAP_OBJ=tparam.o | |
15552 | if test $TERMINFO = yes; then | |
15553 | ||
15554 | $as_echo "#define TERMINFO 1" >>confdefs.h | |
15555 | ||
15556 | ||
15557 | ## Default used to be -ltermcap. Add a case above if need something else. | |
15558 | test "x$LIBS_TERMCAP" = "x" && LIBS_TERMCAP="-lcurses" | |
15559 | ||
15560 | TERMCAP_OBJ=terminfo.o | |
15561 | fi | |
15562 | ||
15563 | ||
15564 | ||
15565 | ||
15566 | # Do we have res_init, for detecting changes in /etc/resolv.conf? | |
15567 | resolv=no | |
15568 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15569 | /* end confdefs.h. */ | |
15570 | #include <netinet/in.h> | |
15571 | #include <arpa/nameser.h> | |
15572 | #include <resolv.h> | |
15573 | int | |
15574 | main () | |
15575 | { | |
15576 | return res_init(); | |
15577 | ; | |
15578 | return 0; | |
15579 | } | |
15580 | _ACEOF | |
15581 | if ac_fn_c_try_link "$LINENO"; then : | |
15582 | have_res_init=yes | |
15583 | else | |
15584 | have_res_init=no | |
15585 | fi | |
15586 | rm -f core conftest.err conftest.$ac_objext \ | |
15587 | conftest$ac_exeext conftest.$ac_ext | |
15588 | if test "$have_res_init" = no; then | |
15589 | OLIBS="$LIBS" | |
15590 | LIBS="$LIBS -lresolv" | |
15591 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_init with -lresolv" >&5 | |
15592 | $as_echo_n "checking for res_init with -lresolv... " >&6; } | |
15593 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15594 | /* end confdefs.h. */ | |
15595 | #include <netinet/in.h> | |
15596 | #include <arpa/nameser.h> | |
15597 | #include <resolv.h> | |
15598 | int | |
15599 | main () | |
15600 | { | |
15601 | return res_init(); | |
15602 | ; | |
15603 | return 0; | |
15604 | } | |
15605 | _ACEOF | |
15606 | if ac_fn_c_try_link "$LINENO"; then : | |
15607 | have_res_init=yes | |
15608 | else | |
15609 | have_res_init=no | |
15610 | fi | |
15611 | rm -f core conftest.err conftest.$ac_objext \ | |
15612 | conftest$ac_exeext conftest.$ac_ext | |
15613 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_res_init" >&5 | |
15614 | $as_echo "$have_res_init" >&6; } | |
15615 | if test "$have_res_init" = yes ; then | |
15616 | resolv=yes | |
15617 | fi | |
15618 | LIBS="$OLIBS" | |
15619 | fi | |
15620 | ||
15621 | if test "$have_res_init" = yes; then | |
15622 | ||
15623 | $as_echo "#define HAVE_RES_INIT 1" >>confdefs.h | |
15624 | ||
15625 | fi | |
15626 | ||
15627 | # Do we need the Hesiod library to provide the support routines? | |
15628 | LIBHESIOD= | |
15629 | if test "$with_hesiod" != no ; then | |
15630 | # Don't set $LIBS here -- see comments above. FIXME which comments? | |
15631 | ac_fn_c_check_func "$LINENO" "res_send" "ac_cv_func_res_send" | |
9ba41eb9 | 15632 | if test "x$ac_cv_func_res_send" = x""yes; then : |
067d23c9 KY |
15633 | |
15634 | else | |
15635 | ac_fn_c_check_func "$LINENO" "__res_send" "ac_cv_func___res_send" | |
9ba41eb9 | 15636 | if test "x$ac_cv_func___res_send" = x""yes; then : |
067d23c9 KY |
15637 | |
15638 | else | |
15639 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_send in -lresolv" >&5 | |
15640 | $as_echo_n "checking for res_send in -lresolv... " >&6; } | |
9ba41eb9 | 15641 | if test "${ac_cv_lib_resolv_res_send+set}" = set; then : |
067d23c9 KY |
15642 | $as_echo_n "(cached) " >&6 |
15643 | else | |
15644 | ac_check_lib_save_LIBS=$LIBS | |
15645 | LIBS="-lresolv $LIBS" | |
15646 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15647 | /* end confdefs.h. */ | |
15648 | ||
15649 | /* Override any GCC internal prototype to avoid an error. | |
15650 | Use char because int might match the return type of a GCC | |
15651 | builtin and then its argument prototype would still apply. */ | |
15652 | #ifdef __cplusplus | |
15653 | extern "C" | |
15654 | #endif | |
15655 | char res_send (); | |
15656 | int | |
15657 | main () | |
15658 | { | |
15659 | return res_send (); | |
15660 | ; | |
15661 | return 0; | |
15662 | } | |
15663 | _ACEOF | |
15664 | if ac_fn_c_try_link "$LINENO"; then : | |
15665 | ac_cv_lib_resolv_res_send=yes | |
15666 | else | |
15667 | ac_cv_lib_resolv_res_send=no | |
15668 | fi | |
15669 | rm -f core conftest.err conftest.$ac_objext \ | |
15670 | conftest$ac_exeext conftest.$ac_ext | |
15671 | LIBS=$ac_check_lib_save_LIBS | |
15672 | fi | |
15673 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_send" >&5 | |
15674 | $as_echo "$ac_cv_lib_resolv_res_send" >&6; } | |
9ba41eb9 | 15675 | if test "x$ac_cv_lib_resolv_res_send" = x""yes; then : |
067d23c9 KY |
15676 | resolv=yes |
15677 | else | |
15678 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __res_send in -lresolv" >&5 | |
15679 | $as_echo_n "checking for __res_send in -lresolv... " >&6; } | |
9ba41eb9 | 15680 | if test "${ac_cv_lib_resolv___res_send+set}" = set; then : |
067d23c9 KY |
15681 | $as_echo_n "(cached) " >&6 |
15682 | else | |
15683 | ac_check_lib_save_LIBS=$LIBS | |
15684 | LIBS="-lresolv $LIBS" | |
15685 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15686 | /* end confdefs.h. */ | |
15687 | ||
15688 | /* Override any GCC internal prototype to avoid an error. | |
15689 | Use char because int might match the return type of a GCC | |
15690 | builtin and then its argument prototype would still apply. */ | |
15691 | #ifdef __cplusplus | |
15692 | extern "C" | |
15693 | #endif | |
15694 | char __res_send (); | |
15695 | int | |
15696 | main () | |
15697 | { | |
15698 | return __res_send (); | |
15699 | ; | |
15700 | return 0; | |
15701 | } | |
15702 | _ACEOF | |
15703 | if ac_fn_c_try_link "$LINENO"; then : | |
15704 | ac_cv_lib_resolv___res_send=yes | |
15705 | else | |
15706 | ac_cv_lib_resolv___res_send=no | |
15707 | fi | |
15708 | rm -f core conftest.err conftest.$ac_objext \ | |
15709 | conftest$ac_exeext conftest.$ac_ext | |
15710 | LIBS=$ac_check_lib_save_LIBS | |
15711 | fi | |
15712 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv___res_send" >&5 | |
15713 | $as_echo "$ac_cv_lib_resolv___res_send" >&6; } | |
9ba41eb9 | 15714 | if test "x$ac_cv_lib_resolv___res_send" = x""yes; then : |
067d23c9 KY |
15715 | resolv=yes |
15716 | fi | |
15717 | ||
15718 | fi | |
15719 | ||
15720 | fi | |
15721 | ||
15722 | fi | |
15723 | ||
15724 | if test "$resolv" = yes ; then | |
15725 | RESOLVLIB=-lresolv | |
15726 | else | |
15727 | RESOLVLIB= | |
15728 | fi | |
15729 | ac_fn_c_check_func "$LINENO" "hes_getmailhost" "ac_cv_func_hes_getmailhost" | |
9ba41eb9 | 15730 | if test "x$ac_cv_func_hes_getmailhost" = x""yes; then : |
067d23c9 KY |
15731 | |
15732 | else | |
15733 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hes_getmailhost in -lhesiod" >&5 | |
15734 | $as_echo_n "checking for hes_getmailhost in -lhesiod... " >&6; } | |
9ba41eb9 | 15735 | if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then : |
067d23c9 KY |
15736 | $as_echo_n "(cached) " >&6 |
15737 | else | |
15738 | ac_check_lib_save_LIBS=$LIBS | |
15739 | LIBS="-lhesiod $RESOLVLIB $LIBS" | |
15740 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15741 | /* end confdefs.h. */ | |
15742 | ||
15743 | /* Override any GCC internal prototype to avoid an error. | |
15744 | Use char because int might match the return type of a GCC | |
15745 | builtin and then its argument prototype would still apply. */ | |
15746 | #ifdef __cplusplus | |
15747 | extern "C" | |
15748 | #endif | |
15749 | char hes_getmailhost (); | |
15750 | int | |
15751 | main () | |
15752 | { | |
15753 | return hes_getmailhost (); | |
15754 | ; | |
15755 | return 0; | |
15756 | } | |
15757 | _ACEOF | |
15758 | if ac_fn_c_try_link "$LINENO"; then : | |
15759 | ac_cv_lib_hesiod_hes_getmailhost=yes | |
15760 | else | |
15761 | ac_cv_lib_hesiod_hes_getmailhost=no | |
15762 | fi | |
15763 | rm -f core conftest.err conftest.$ac_objext \ | |
15764 | conftest$ac_exeext conftest.$ac_ext | |
15765 | LIBS=$ac_check_lib_save_LIBS | |
15766 | fi | |
15767 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5 | |
15768 | $as_echo "$ac_cv_lib_hesiod_hes_getmailhost" >&6; } | |
9ba41eb9 | 15769 | if test "x$ac_cv_lib_hesiod_hes_getmailhost" = x""yes; then : |
067d23c9 KY |
15770 | hesiod=yes |
15771 | else | |
15772 | : | |
15773 | fi | |
15774 | ||
15775 | fi | |
15776 | ||
15777 | ||
15778 | if test x"$hesiod" = xyes; then | |
15779 | ||
15780 | $as_echo "#define HAVE_LIBHESIOD 1" >>confdefs.h | |
15781 | ||
15782 | LIBHESIOD=-lhesiod | |
15783 | fi | |
15784 | fi | |
15785 | ||
15786 | ||
15787 | # Do we need libresolv (due to res_init or Hesiod)? | |
15788 | if test "$resolv" = yes ; then | |
15789 | ||
15790 | $as_echo "#define HAVE_LIBRESOLV 1" >>confdefs.h | |
15791 | ||
15792 | LIBRESOLV=-lresolv | |
15793 | else | |
15794 | LIBRESOLV= | |
15795 | fi | |
15796 | ||
15797 | ||
15798 | # These tell us which Kerberos-related libraries to use. | |
15799 | COM_ERRLIB= | |
15800 | CRYPTOLIB= | |
15801 | KRB5LIB= | |
15802 | DESLIB= | |
15803 | KRB4LIB= | |
15804 | ||
15805 | if test "${with_kerberos}" != no; then | |
15806 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for com_err in -lcom_err" >&5 | |
15807 | $as_echo_n "checking for com_err in -lcom_err... " >&6; } | |
9ba41eb9 | 15808 | if test "${ac_cv_lib_com_err_com_err+set}" = set; then : |
067d23c9 KY |
15809 | $as_echo_n "(cached) " >&6 |
15810 | else | |
15811 | ac_check_lib_save_LIBS=$LIBS | |
15812 | LIBS="-lcom_err $LIBS" | |
15813 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15814 | /* end confdefs.h. */ | |
15815 | ||
15816 | /* Override any GCC internal prototype to avoid an error. | |
15817 | Use char because int might match the return type of a GCC | |
15818 | builtin and then its argument prototype would still apply. */ | |
15819 | #ifdef __cplusplus | |
15820 | extern "C" | |
15821 | #endif | |
15822 | char com_err (); | |
15823 | int | |
15824 | main () | |
15825 | { | |
15826 | return com_err (); | |
15827 | ; | |
15828 | return 0; | |
15829 | } | |
15830 | _ACEOF | |
15831 | if ac_fn_c_try_link "$LINENO"; then : | |
15832 | ac_cv_lib_com_err_com_err=yes | |
15833 | else | |
15834 | ac_cv_lib_com_err_com_err=no | |
15835 | fi | |
15836 | rm -f core conftest.err conftest.$ac_objext \ | |
15837 | conftest$ac_exeext conftest.$ac_ext | |
15838 | LIBS=$ac_check_lib_save_LIBS | |
15839 | fi | |
15840 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_com_err_com_err" >&5 | |
15841 | $as_echo "$ac_cv_lib_com_err_com_err" >&6; } | |
9ba41eb9 | 15842 | if test "x$ac_cv_lib_com_err_com_err" = x""yes; then : |
067d23c9 KY |
15843 | have_com_err=yes |
15844 | else | |
15845 | have_com_err=no | |
15846 | fi | |
15847 | ||
15848 | if test $have_com_err = yes; then | |
15849 | COM_ERRLIB=-lcom_err | |
15850 | LIBS="$COM_ERRLIB $LIBS" | |
15851 | ||
15852 | $as_echo "#define HAVE_LIBCOM_ERR 1" >>confdefs.h | |
15853 | ||
15854 | fi | |
15855 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lcrypto" >&5 | |
15856 | $as_echo_n "checking for mit_des_cbc_encrypt in -lcrypto... " >&6; } | |
9ba41eb9 | 15857 | if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then : |
067d23c9 KY |
15858 | $as_echo_n "(cached) " >&6 |
15859 | else | |
15860 | ac_check_lib_save_LIBS=$LIBS | |
15861 | LIBS="-lcrypto $LIBS" | |
15862 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15863 | /* end confdefs.h. */ | |
15864 | ||
15865 | /* Override any GCC internal prototype to avoid an error. | |
15866 | Use char because int might match the return type of a GCC | |
15867 | builtin and then its argument prototype would still apply. */ | |
15868 | #ifdef __cplusplus | |
15869 | extern "C" | |
15870 | #endif | |
15871 | char mit_des_cbc_encrypt (); | |
15872 | int | |
15873 | main () | |
15874 | { | |
15875 | return mit_des_cbc_encrypt (); | |
15876 | ; | |
15877 | return 0; | |
15878 | } | |
15879 | _ACEOF | |
15880 | if ac_fn_c_try_link "$LINENO"; then : | |
15881 | ac_cv_lib_crypto_mit_des_cbc_encrypt=yes | |
15882 | else | |
15883 | ac_cv_lib_crypto_mit_des_cbc_encrypt=no | |
15884 | fi | |
15885 | rm -f core conftest.err conftest.$ac_objext \ | |
15886 | conftest$ac_exeext conftest.$ac_ext | |
15887 | LIBS=$ac_check_lib_save_LIBS | |
15888 | fi | |
15889 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5 | |
15890 | $as_echo "$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6; } | |
9ba41eb9 | 15891 | if test "x$ac_cv_lib_crypto_mit_des_cbc_encrypt" = x""yes; then : |
067d23c9 KY |
15892 | have_crypto=yes |
15893 | else | |
15894 | have_crypto=no | |
15895 | fi | |
15896 | ||
15897 | if test $have_crypto = yes; then | |
15898 | CRYPTOLIB=-lcrypto | |
15899 | LIBS="$CRYPTOLIB $LIBS" | |
15900 | ||
15901 | $as_echo "#define HAVE_LIBCRYPTO 1" >>confdefs.h | |
15902 | ||
15903 | fi | |
15904 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lk5crypto" >&5 | |
15905 | $as_echo_n "checking for mit_des_cbc_encrypt in -lk5crypto... " >&6; } | |
9ba41eb9 | 15906 | if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then : |
067d23c9 KY |
15907 | $as_echo_n "(cached) " >&6 |
15908 | else | |
15909 | ac_check_lib_save_LIBS=$LIBS | |
15910 | LIBS="-lk5crypto $LIBS" | |
15911 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15912 | /* end confdefs.h. */ | |
15913 | ||
15914 | /* Override any GCC internal prototype to avoid an error. | |
15915 | Use char because int might match the return type of a GCC | |
15916 | builtin and then its argument prototype would still apply. */ | |
15917 | #ifdef __cplusplus | |
15918 | extern "C" | |
15919 | #endif | |
15920 | char mit_des_cbc_encrypt (); | |
15921 | int | |
15922 | main () | |
15923 | { | |
15924 | return mit_des_cbc_encrypt (); | |
15925 | ; | |
15926 | return 0; | |
15927 | } | |
15928 | _ACEOF | |
15929 | if ac_fn_c_try_link "$LINENO"; then : | |
15930 | ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes | |
15931 | else | |
15932 | ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no | |
15933 | fi | |
15934 | rm -f core conftest.err conftest.$ac_objext \ | |
15935 | conftest$ac_exeext conftest.$ac_ext | |
15936 | LIBS=$ac_check_lib_save_LIBS | |
15937 | fi | |
15938 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5 | |
15939 | $as_echo "$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6; } | |
9ba41eb9 | 15940 | if test "x$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" = x""yes; then : |
067d23c9 KY |
15941 | have_k5crypto=yes |
15942 | else | |
15943 | have_k5crypto=no | |
15944 | fi | |
15945 | ||
15946 | if test $have_k5crypto = yes; then | |
15947 | CRYPTOLIB=-lk5crypto | |
15948 | LIBS="$CRYPTOLIB $LIBS" | |
15949 | ||
15950 | $as_echo "#define HAVE_LIBK5CRYPTO 1" >>confdefs.h | |
15951 | ||
15952 | fi | |
15953 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5_init_context in -lkrb5" >&5 | |
15954 | $as_echo_n "checking for krb5_init_context in -lkrb5... " >&6; } | |
9ba41eb9 | 15955 | if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then : |
067d23c9 KY |
15956 | $as_echo_n "(cached) " >&6 |
15957 | else | |
15958 | ac_check_lib_save_LIBS=$LIBS | |
15959 | LIBS="-lkrb5 $LIBS" | |
15960 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15961 | /* end confdefs.h. */ | |
15962 | ||
15963 | /* Override any GCC internal prototype to avoid an error. | |
15964 | Use char because int might match the return type of a GCC | |
15965 | builtin and then its argument prototype would still apply. */ | |
15966 | #ifdef __cplusplus | |
15967 | extern "C" | |
15968 | #endif | |
15969 | char krb5_init_context (); | |
15970 | int | |
15971 | main () | |
15972 | { | |
15973 | return krb5_init_context (); | |
15974 | ; | |
15975 | return 0; | |
15976 | } | |
15977 | _ACEOF | |
15978 | if ac_fn_c_try_link "$LINENO"; then : | |
15979 | ac_cv_lib_krb5_krb5_init_context=yes | |
15980 | else | |
15981 | ac_cv_lib_krb5_krb5_init_context=no | |
15982 | fi | |
15983 | rm -f core conftest.err conftest.$ac_objext \ | |
15984 | conftest$ac_exeext conftest.$ac_ext | |
15985 | LIBS=$ac_check_lib_save_LIBS | |
15986 | fi | |
15987 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb5_krb5_init_context" >&5 | |
15988 | $as_echo "$ac_cv_lib_krb5_krb5_init_context" >&6; } | |
9ba41eb9 | 15989 | if test "x$ac_cv_lib_krb5_krb5_init_context" = x""yes; then : |
067d23c9 KY |
15990 | have_krb5=yes |
15991 | else | |
15992 | have_krb5=no | |
15993 | fi | |
15994 | ||
15995 | if test $have_krb5=yes; then | |
15996 | KRB5LIB=-lkrb5 | |
15997 | LIBS="$KRB5LIB $LIBS" | |
15998 | ||
15999 | $as_echo "#define HAVE_LIBKRB5 1" >>confdefs.h | |
16000 | ||
16001 | fi | |
16002 | if test "${with_kerberos5}" = no; then | |
16003 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes425" >&5 | |
16004 | $as_echo_n "checking for des_cbc_encrypt in -ldes425... " >&6; } | |
9ba41eb9 | 16005 | if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then : |
067d23c9 KY |
16006 | $as_echo_n "(cached) " >&6 |
16007 | else | |
16008 | ac_check_lib_save_LIBS=$LIBS | |
16009 | LIBS="-ldes425 $LIBS" | |
16010 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16011 | /* end confdefs.h. */ | |
16012 | ||
16013 | /* Override any GCC internal prototype to avoid an error. | |
16014 | Use char because int might match the return type of a GCC | |
16015 | builtin and then its argument prototype would still apply. */ | |
16016 | #ifdef __cplusplus | |
16017 | extern "C" | |
16018 | #endif | |
16019 | char des_cbc_encrypt (); | |
16020 | int | |
16021 | main () | |
16022 | { | |
16023 | return des_cbc_encrypt (); | |
16024 | ; | |
16025 | return 0; | |
16026 | } | |
16027 | _ACEOF | |
16028 | if ac_fn_c_try_link "$LINENO"; then : | |
16029 | ac_cv_lib_des425_des_cbc_encrypt=yes | |
16030 | else | |
16031 | ac_cv_lib_des425_des_cbc_encrypt=no | |
16032 | fi | |
16033 | rm -f core conftest.err conftest.$ac_objext \ | |
16034 | conftest$ac_exeext conftest.$ac_ext | |
16035 | LIBS=$ac_check_lib_save_LIBS | |
16036 | fi | |
16037 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5 | |
16038 | $as_echo "$ac_cv_lib_des425_des_cbc_encrypt" >&6; } | |
9ba41eb9 | 16039 | if test "x$ac_cv_lib_des425_des_cbc_encrypt" = x""yes; then : |
067d23c9 KY |
16040 | have_des425=yes |
16041 | else | |
16042 | have_des425=no | |
16043 | fi | |
16044 | ||
16045 | if test $have_des425 = yes; then | |
16046 | DESLIB=-ldes425 | |
16047 | LIBS="$DESLIB $LIBS" | |
16048 | ||
16049 | $as_echo "#define HAVE_LIBDES425 1" >>confdefs.h | |
16050 | ||
16051 | else | |
16052 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes" >&5 | |
16053 | $as_echo_n "checking for des_cbc_encrypt in -ldes... " >&6; } | |
9ba41eb9 | 16054 | if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then : |
067d23c9 KY |
16055 | $as_echo_n "(cached) " >&6 |
16056 | else | |
16057 | ac_check_lib_save_LIBS=$LIBS | |
16058 | LIBS="-ldes $LIBS" | |
16059 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16060 | /* end confdefs.h. */ | |
16061 | ||
16062 | /* Override any GCC internal prototype to avoid an error. | |
16063 | Use char because int might match the return type of a GCC | |
16064 | builtin and then its argument prototype would still apply. */ | |
16065 | #ifdef __cplusplus | |
16066 | extern "C" | |
16067 | #endif | |
16068 | char des_cbc_encrypt (); | |
16069 | int | |
16070 | main () | |
16071 | { | |
16072 | return des_cbc_encrypt (); | |
16073 | ; | |
16074 | return 0; | |
16075 | } | |
16076 | _ACEOF | |
16077 | if ac_fn_c_try_link "$LINENO"; then : | |
16078 | ac_cv_lib_des_des_cbc_encrypt=yes | |
16079 | else | |
16080 | ac_cv_lib_des_des_cbc_encrypt=no | |
16081 | fi | |
16082 | rm -f core conftest.err conftest.$ac_objext \ | |
16083 | conftest$ac_exeext conftest.$ac_ext | |
16084 | LIBS=$ac_check_lib_save_LIBS | |
16085 | fi | |
16086 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des_des_cbc_encrypt" >&5 | |
16087 | $as_echo "$ac_cv_lib_des_des_cbc_encrypt" >&6; } | |
9ba41eb9 | 16088 | if test "x$ac_cv_lib_des_des_cbc_encrypt" = x""yes; then : |
067d23c9 KY |
16089 | have_des=yes |
16090 | else | |
16091 | have_des=no | |
16092 | fi | |
16093 | ||
16094 | if test $have_des = yes; then | |
16095 | DESLIB=-ldes | |
16096 | LIBS="$DESLIB $LIBS" | |
16097 | ||
16098 | $as_echo "#define HAVE_LIBDES 1" >>confdefs.h | |
16099 | ||
16100 | fi | |
16101 | fi | |
16102 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb4" >&5 | |
16103 | $as_echo_n "checking for krb_get_cred in -lkrb4... " >&6; } | |
9ba41eb9 | 16104 | if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then : |
067d23c9 KY |
16105 | $as_echo_n "(cached) " >&6 |
16106 | else | |
16107 | ac_check_lib_save_LIBS=$LIBS | |
16108 | LIBS="-lkrb4 $LIBS" | |
16109 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16110 | /* end confdefs.h. */ | |
16111 | ||
16112 | /* Override any GCC internal prototype to avoid an error. | |
16113 | Use char because int might match the return type of a GCC | |
16114 | builtin and then its argument prototype would still apply. */ | |
16115 | #ifdef __cplusplus | |
16116 | extern "C" | |
16117 | #endif | |
16118 | char krb_get_cred (); | |
16119 | int | |
16120 | main () | |
16121 | { | |
16122 | return krb_get_cred (); | |
16123 | ; | |
16124 | return 0; | |
16125 | } | |
16126 | _ACEOF | |
16127 | if ac_fn_c_try_link "$LINENO"; then : | |
16128 | ac_cv_lib_krb4_krb_get_cred=yes | |
16129 | else | |
16130 | ac_cv_lib_krb4_krb_get_cred=no | |
16131 | fi | |
16132 | rm -f core conftest.err conftest.$ac_objext \ | |
16133 | conftest$ac_exeext conftest.$ac_ext | |
16134 | LIBS=$ac_check_lib_save_LIBS | |
16135 | fi | |
16136 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb4_krb_get_cred" >&5 | |
16137 | $as_echo "$ac_cv_lib_krb4_krb_get_cred" >&6; } | |
9ba41eb9 | 16138 | if test "x$ac_cv_lib_krb4_krb_get_cred" = x""yes; then : |
067d23c9 KY |
16139 | have_krb4=yes |
16140 | else | |
16141 | have_krb4=no | |
16142 | fi | |
16143 | ||
16144 | if test $have_krb4 = yes; then | |
16145 | KRB4LIB=-lkrb4 | |
16146 | LIBS="$KRB4LIB $LIBS" | |
16147 | ||
16148 | $as_echo "#define HAVE_LIBKRB4 1" >>confdefs.h | |
16149 | ||
16150 | else | |
16151 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb" >&5 | |
16152 | $as_echo_n "checking for krb_get_cred in -lkrb... " >&6; } | |
9ba41eb9 | 16153 | if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then : |
067d23c9 KY |
16154 | $as_echo_n "(cached) " >&6 |
16155 | else | |
16156 | ac_check_lib_save_LIBS=$LIBS | |
16157 | LIBS="-lkrb $LIBS" | |
16158 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16159 | /* end confdefs.h. */ | |
16160 | ||
16161 | /* Override any GCC internal prototype to avoid an error. | |
16162 | Use char because int might match the return type of a GCC | |
16163 | builtin and then its argument prototype would still apply. */ | |
16164 | #ifdef __cplusplus | |
16165 | extern "C" | |
16166 | #endif | |
16167 | char krb_get_cred (); | |
16168 | int | |
16169 | main () | |
16170 | { | |
16171 | return krb_get_cred (); | |
16172 | ; | |
16173 | return 0; | |
16174 | } | |
16175 | _ACEOF | |
16176 | if ac_fn_c_try_link "$LINENO"; then : | |
16177 | ac_cv_lib_krb_krb_get_cred=yes | |
16178 | else | |
16179 | ac_cv_lib_krb_krb_get_cred=no | |
16180 | fi | |
16181 | rm -f core conftest.err conftest.$ac_objext \ | |
16182 | conftest$ac_exeext conftest.$ac_ext | |
16183 | LIBS=$ac_check_lib_save_LIBS | |
16184 | fi | |
16185 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb_krb_get_cred" >&5 | |
16186 | $as_echo "$ac_cv_lib_krb_krb_get_cred" >&6; } | |
9ba41eb9 | 16187 | if test "x$ac_cv_lib_krb_krb_get_cred" = x""yes; then : |
067d23c9 KY |
16188 | have_krb=yes |
16189 | else | |
16190 | have_krb=no | |
16191 | fi | |
16192 | ||
16193 | if test $have_krb = yes; then | |
16194 | KRB4LIB=-lkrb | |
16195 | LIBS="$KRB4LIB $LIBS" | |
16196 | ||
16197 | $as_echo "#define HAVE_LIBKRB 1" >>confdefs.h | |
16198 | ||
16199 | fi | |
16200 | fi | |
16201 | fi | |
16202 | ||
16203 | if test "${with_kerberos5}" != no; then | |
16204 | for ac_header in krb5.h | |
16205 | do : | |
16206 | ac_fn_c_check_header_mongrel "$LINENO" "krb5.h" "ac_cv_header_krb5_h" "$ac_includes_default" | |
9ba41eb9 | 16207 | if test "x$ac_cv_header_krb5_h" = x""yes; then : |
067d23c9 KY |
16208 | cat >>confdefs.h <<_ACEOF |
16209 | #define HAVE_KRB5_H 1 | |
16210 | _ACEOF | |
16211 | ac_fn_c_check_member "$LINENO" "krb5_error" "text" "ac_cv_member_krb5_error_text" "#include <krb5.h> | |
16212 | " | |
9ba41eb9 | 16213 | if test "x$ac_cv_member_krb5_error_text" = x""yes; then : |
067d23c9 KY |
16214 | |
16215 | cat >>confdefs.h <<_ACEOF | |
16216 | #define HAVE_KRB5_ERROR_TEXT 1 | |
16217 | _ACEOF | |
16218 | ||
16219 | ||
16220 | fi | |
16221 | ac_fn_c_check_member "$LINENO" "krb5_error" "e_text" "ac_cv_member_krb5_error_e_text" "#include <krb5.h> | |
16222 | " | |
9ba41eb9 | 16223 | if test "x$ac_cv_member_krb5_error_e_text" = x""yes; then : |
067d23c9 KY |
16224 | |
16225 | cat >>confdefs.h <<_ACEOF | |
16226 | #define HAVE_KRB5_ERROR_E_TEXT 1 | |
16227 | _ACEOF | |
16228 | ||
16229 | ||
16230 | fi | |
16231 | ||
16232 | fi | |
16233 | ||
16234 | done | |
16235 | ||
16236 | else | |
16237 | for ac_header in des.h | |
16238 | do : | |
16239 | ac_fn_c_check_header_mongrel "$LINENO" "des.h" "ac_cv_header_des_h" "$ac_includes_default" | |
9ba41eb9 | 16240 | if test "x$ac_cv_header_des_h" = x""yes; then : |
067d23c9 KY |
16241 | cat >>confdefs.h <<_ACEOF |
16242 | #define HAVE_DES_H 1 | |
16243 | _ACEOF | |
16244 | ||
16245 | else | |
16246 | for ac_header in kerberosIV/des.h | |
16247 | do : | |
16248 | ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/des.h" "ac_cv_header_kerberosIV_des_h" "$ac_includes_default" | |
9ba41eb9 | 16249 | if test "x$ac_cv_header_kerberosIV_des_h" = x""yes; then : |
067d23c9 KY |
16250 | cat >>confdefs.h <<_ACEOF |
16251 | #define HAVE_KERBEROSIV_DES_H 1 | |
16252 | _ACEOF | |
16253 | ||
16254 | else | |
16255 | for ac_header in kerberos/des.h | |
16256 | do : | |
16257 | ac_fn_c_check_header_mongrel "$LINENO" "kerberos/des.h" "ac_cv_header_kerberos_des_h" "$ac_includes_default" | |
9ba41eb9 | 16258 | if test "x$ac_cv_header_kerberos_des_h" = x""yes; then : |
067d23c9 KY |
16259 | cat >>confdefs.h <<_ACEOF |
16260 | #define HAVE_KERBEROS_DES_H 1 | |
16261 | _ACEOF | |
16262 | ||
16263 | fi | |
16264 | ||
16265 | done | |
16266 | ||
16267 | fi | |
16268 | ||
16269 | done | |
16270 | ||
16271 | fi | |
16272 | ||
16273 | done | |
16274 | ||
16275 | for ac_header in krb.h | |
16276 | do : | |
16277 | ac_fn_c_check_header_mongrel "$LINENO" "krb.h" "ac_cv_header_krb_h" "$ac_includes_default" | |
9ba41eb9 | 16278 | if test "x$ac_cv_header_krb_h" = x""yes; then : |
067d23c9 KY |
16279 | cat >>confdefs.h <<_ACEOF |
16280 | #define HAVE_KRB_H 1 | |
16281 | _ACEOF | |
16282 | ||
16283 | else | |
16284 | for ac_header in kerberosIV/krb.h | |
16285 | do : | |
16286 | ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/krb.h" "ac_cv_header_kerberosIV_krb_h" "$ac_includes_default" | |
9ba41eb9 | 16287 | if test "x$ac_cv_header_kerberosIV_krb_h" = x""yes; then : |
067d23c9 KY |
16288 | cat >>confdefs.h <<_ACEOF |
16289 | #define HAVE_KERBEROSIV_KRB_H 1 | |
16290 | _ACEOF | |
16291 | ||
16292 | else | |
16293 | for ac_header in kerberos/krb.h | |
16294 | do : | |
16295 | ac_fn_c_check_header_mongrel "$LINENO" "kerberos/krb.h" "ac_cv_header_kerberos_krb_h" "$ac_includes_default" | |
9ba41eb9 | 16296 | if test "x$ac_cv_header_kerberos_krb_h" = x""yes; then : |
067d23c9 KY |
16297 | cat >>confdefs.h <<_ACEOF |
16298 | #define HAVE_KERBEROS_KRB_H 1 | |
16299 | _ACEOF | |
16300 | ||
16301 | fi | |
16302 | ||
16303 | done | |
16304 | ||
16305 | fi | |
16306 | ||
16307 | done | |
16308 | ||
16309 | fi | |
16310 | ||
16311 | done | |
16312 | ||
16313 | fi | |
16314 | for ac_header in com_err.h | |
16315 | do : | |
16316 | ac_fn_c_check_header_mongrel "$LINENO" "com_err.h" "ac_cv_header_com_err_h" "$ac_includes_default" | |
9ba41eb9 | 16317 | if test "x$ac_cv_header_com_err_h" = x""yes; then : |
067d23c9 KY |
16318 | cat >>confdefs.h <<_ACEOF |
16319 | #define HAVE_COM_ERR_H 1 | |
16320 | _ACEOF | |
16321 | ||
16322 | fi | |
16323 | ||
16324 | done | |
16325 | ||
16326 | fi | |
16327 | ||
16328 | ||
16329 | ||
16330 | ||
16331 | ||
16332 | ||
16333 | ||
16334 | # Solaris requires -lintl if you want strerror (which calls dgettext) | |
16335 | # to return localized messages. | |
16336 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dgettext in -lintl" >&5 | |
16337 | $as_echo_n "checking for dgettext in -lintl... " >&6; } | |
9ba41eb9 | 16338 | if test "${ac_cv_lib_intl_dgettext+set}" = set; then : |
067d23c9 KY |
16339 | $as_echo_n "(cached) " >&6 |
16340 | else | |
16341 | ac_check_lib_save_LIBS=$LIBS | |
16342 | LIBS="-lintl $LIBS" | |
16343 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16344 | /* end confdefs.h. */ | |
16345 | ||
16346 | /* Override any GCC internal prototype to avoid an error. | |
16347 | Use char because int might match the return type of a GCC | |
16348 | builtin and then its argument prototype would still apply. */ | |
16349 | #ifdef __cplusplus | |
16350 | extern "C" | |
16351 | #endif | |
16352 | char dgettext (); | |
16353 | int | |
16354 | main () | |
16355 | { | |
16356 | return dgettext (); | |
16357 | ; | |
16358 | return 0; | |
16359 | } | |
16360 | _ACEOF | |
16361 | if ac_fn_c_try_link "$LINENO"; then : | |
16362 | ac_cv_lib_intl_dgettext=yes | |
16363 | else | |
16364 | ac_cv_lib_intl_dgettext=no | |
16365 | fi | |
16366 | rm -f core conftest.err conftest.$ac_objext \ | |
16367 | conftest$ac_exeext conftest.$ac_ext | |
16368 | LIBS=$ac_check_lib_save_LIBS | |
16369 | fi | |
16370 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_dgettext" >&5 | |
16371 | $as_echo "$ac_cv_lib_intl_dgettext" >&6; } | |
9ba41eb9 | 16372 | if test "x$ac_cv_lib_intl_dgettext" = x""yes; then : |
067d23c9 KY |
16373 | cat >>confdefs.h <<_ACEOF |
16374 | #define HAVE_LIBINTL 1 | |
16375 | _ACEOF | |
16376 | ||
16377 | LIBS="-lintl $LIBS" | |
16378 | ||
16379 | fi | |
16380 | ||
16381 | ||
16382 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime caches TZ" >&5 | |
16383 | $as_echo_n "checking whether localtime caches TZ... " >&6; } | |
9ba41eb9 | 16384 | if test "${emacs_cv_localtime_cache+set}" = set; then : |
067d23c9 KY |
16385 | $as_echo_n "(cached) " >&6 |
16386 | else | |
16387 | if test x$ac_cv_func_tzset = xyes; then | |
16388 | if test "$cross_compiling" = yes; then : | |
16389 | # If we have tzset, assume the worst when cross-compiling. | |
16390 | emacs_cv_localtime_cache=yes | |
16391 | else | |
16392 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16393 | /* end confdefs.h. */ | |
16394 | #include <time.h> | |
16395 | char TZ_GMT0[] = "TZ=GMT0"; | |
16396 | char TZ_PST8[] = "TZ=PST8"; | |
16397 | main() | |
16398 | { | |
16399 | time_t now = time ((time_t *) 0); | |
16400 | int hour_GMT0, hour_unset; | |
16401 | if (putenv (TZ_GMT0) != 0) | |
16402 | exit (1); | |
16403 | hour_GMT0 = localtime (&now)->tm_hour; | |
16404 | unsetenv("TZ"); | |
16405 | hour_unset = localtime (&now)->tm_hour; | |
16406 | if (putenv (TZ_PST8) != 0) | |
16407 | exit (1); | |
16408 | if (localtime (&now)->tm_hour == hour_GMT0) | |
16409 | exit (1); | |
16410 | unsetenv("TZ"); | |
16411 | if (localtime (&now)->tm_hour != hour_unset) | |
16412 | exit (1); | |
16413 | exit (0); | |
16414 | } | |
16415 | _ACEOF | |
16416 | if ac_fn_c_try_run "$LINENO"; then : | |
16417 | emacs_cv_localtime_cache=no | |
16418 | else | |
16419 | emacs_cv_localtime_cache=yes | |
16420 | fi | |
16421 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
16422 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
16423 | fi | |
16424 | ||
16425 | else | |
16426 | # If we lack tzset, report that localtime does not cache TZ, | |
16427 | # since we can't invalidate the cache if we don't have tzset. | |
16428 | emacs_cv_localtime_cache=no | |
16429 | fi | |
16430 | fi | |
16431 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_localtime_cache" >&5 | |
16432 | $as_echo "$emacs_cv_localtime_cache" >&6; } | |
16433 | if test $emacs_cv_localtime_cache = yes; then | |
16434 | ||
16435 | $as_echo "#define LOCALTIME_CACHE 1" >>confdefs.h | |
16436 | ||
16437 | fi | |
16438 | ||
16439 | if test "x$HAVE_TIMEVAL" = xyes; then | |
16440 | for ac_func in gettimeofday | |
16441 | do : | |
16442 | ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday" | |
9ba41eb9 | 16443 | if test "x$ac_cv_func_gettimeofday" = x""yes; then : |
067d23c9 KY |
16444 | cat >>confdefs.h <<_ACEOF |
16445 | #define HAVE_GETTIMEOFDAY 1 | |
16446 | _ACEOF | |
16447 | ||
16448 | fi | |
16449 | done | |
16450 | ||
16451 | if test $ac_cv_func_gettimeofday = yes; then | |
16452 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday can accept two arguments" >&5 | |
16453 | $as_echo_n "checking whether gettimeofday can accept two arguments... " >&6; } | |
9ba41eb9 | 16454 | if test "${emacs_cv_gettimeofday_two_arguments+set}" = set; then : |
067d23c9 KY |
16455 | $as_echo_n "(cached) " >&6 |
16456 | else | |
16457 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16458 | /* end confdefs.h. */ | |
16459 | ||
16460 | #ifdef TIME_WITH_SYS_TIME | |
16461 | #include <sys/time.h> | |
16462 | #include <time.h> | |
16463 | #else | |
16464 | #ifdef HAVE_SYS_TIME_H | |
16465 | #include <sys/time.h> | |
16466 | #else | |
16467 | #include <time.h> | |
16468 | #endif | |
16469 | #endif | |
16470 | int | |
16471 | main () | |
16472 | { | |
16473 | struct timeval time; | |
16474 | gettimeofday (&time, 0); | |
16475 | ; | |
16476 | return 0; | |
16477 | } | |
16478 | _ACEOF | |
16479 | if ac_fn_c_try_compile "$LINENO"; then : | |
16480 | emacs_cv_gettimeofday_two_arguments=yes | |
16481 | else | |
16482 | emacs_cv_gettimeofday_two_arguments=no | |
16483 | fi | |
16484 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
16485 | fi | |
16486 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_gettimeofday_two_arguments" >&5 | |
16487 | $as_echo "$emacs_cv_gettimeofday_two_arguments" >&6; } | |
16488 | if test $emacs_cv_gettimeofday_two_arguments = no; then | |
16489 | ||
16490 | $as_echo "#define GETTIMEOFDAY_ONE_ARGUMENT 1" >>confdefs.h | |
16491 | ||
16492 | fi | |
16493 | fi | |
16494 | fi | |
16495 | ||
16496 | ok_so_far=yes | |
16497 | ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket" | |
9ba41eb9 | 16498 | if test "x$ac_cv_func_socket" = x""yes; then : |
067d23c9 KY |
16499 | |
16500 | else | |
16501 | ok_so_far=no | |
16502 | fi | |
16503 | ||
16504 | if test $ok_so_far = yes; then | |
16505 | ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default" | |
9ba41eb9 | 16506 | if test "x$ac_cv_header_netinet_in_h" = x""yes; then : |
067d23c9 KY |
16507 | |
16508 | else | |
16509 | ok_so_far=no | |
16510 | fi | |
16511 | ||
16512 | ||
16513 | fi | |
16514 | if test $ok_so_far = yes; then | |
16515 | ac_fn_c_check_header_mongrel "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$ac_includes_default" | |
9ba41eb9 | 16516 | if test "x$ac_cv_header_arpa_inet_h" = x""yes; then : |
067d23c9 KY |
16517 | |
16518 | else | |
16519 | ok_so_far=no | |
16520 | fi | |
16521 | ||
16522 | ||
16523 | fi | |
16524 | if test $ok_so_far = yes; then | |
16525 | ||
16526 | $as_echo "#define HAVE_INET_SOCKETS 1" >>confdefs.h | |
16527 | ||
16528 | fi | |
16529 | ||
16530 | if test -f /usr/lpp/X11/bin/smt.exp; then | |
16531 | ||
16532 | $as_echo "#define HAVE_AIX_SMT_EXP 1" >>confdefs.h | |
16533 | ||
16534 | fi | |
16535 | ||
16536 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system supports dynamic ptys" >&5 | |
16537 | $as_echo_n "checking whether system supports dynamic ptys... " >&6; } | |
16538 | if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then | |
16539 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
16540 | $as_echo "yes" >&6; } | |
16541 | ||
16542 | $as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h | |
16543 | ||
16544 | else | |
16545 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
16546 | $as_echo "no" >&6; } | |
16547 | fi | |
16548 | ||
16549 | ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" | |
9ba41eb9 | 16550 | if test "x$ac_cv_type_pid_t" = x""yes; then : |
067d23c9 KY |
16551 | |
16552 | else | |
16553 | ||
16554 | cat >>confdefs.h <<_ACEOF | |
16555 | #define pid_t int | |
16556 | _ACEOF | |
16557 | ||
16558 | fi | |
16559 | ||
16560 | for ac_header in vfork.h | |
16561 | do : | |
16562 | ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default" | |
9ba41eb9 | 16563 | if test "x$ac_cv_header_vfork_h" = x""yes; then : |
067d23c9 KY |
16564 | cat >>confdefs.h <<_ACEOF |
16565 | #define HAVE_VFORK_H 1 | |
16566 | _ACEOF | |
16567 | ||
16568 | fi | |
16569 | ||
16570 | done | |
16571 | ||
16572 | for ac_func in fork vfork | |
16573 | do : | |
16574 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
16575 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
2018939f | 16576 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : |
067d23c9 KY |
16577 | cat >>confdefs.h <<_ACEOF |
16578 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
16579 | _ACEOF | |
16580 | ||
16581 | fi | |
16582 | done | |
16583 | ||
16584 | if test "x$ac_cv_func_fork" = xyes; then | |
16585 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 | |
16586 | $as_echo_n "checking for working fork... " >&6; } | |
9ba41eb9 | 16587 | if test "${ac_cv_func_fork_works+set}" = set; then : |
067d23c9 KY |
16588 | $as_echo_n "(cached) " >&6 |
16589 | else | |
16590 | if test "$cross_compiling" = yes; then : | |
16591 | ac_cv_func_fork_works=cross | |
16592 | else | |
16593 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16594 | /* end confdefs.h. */ | |
16595 | $ac_includes_default | |
16596 | int | |
16597 | main () | |
16598 | { | |
16599 | ||
16600 | /* By Ruediger Kuhlmann. */ | |
16601 | return fork () < 0; | |
16602 | ||
16603 | ; | |
16604 | return 0; | |
16605 | } | |
16606 | _ACEOF | |
16607 | if ac_fn_c_try_run "$LINENO"; then : | |
16608 | ac_cv_func_fork_works=yes | |
16609 | else | |
16610 | ac_cv_func_fork_works=no | |
16611 | fi | |
16612 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
16613 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
16614 | fi | |
16615 | ||
16616 | fi | |
16617 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5 | |
16618 | $as_echo "$ac_cv_func_fork_works" >&6; } | |
16619 | ||
16620 | else | |
16621 | ac_cv_func_fork_works=$ac_cv_func_fork | |
16622 | fi | |
16623 | if test "x$ac_cv_func_fork_works" = xcross; then | |
16624 | case $host in | |
16625 | *-*-amigaos* | *-*-msdosdjgpp*) | |
16626 | # Override, as these systems have only a dummy fork() stub | |
16627 | ac_cv_func_fork_works=no | |
16628 | ;; | |
16629 | *) | |
16630 | ac_cv_func_fork_works=yes | |
16631 | ;; | |
16632 | esac | |
16633 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 | |
16634 | $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} | |
16635 | fi | |
16636 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
16637 | if test "x$ac_cv_func_vfork" = xyes; then | |
16638 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 | |
16639 | $as_echo_n "checking for working vfork... " >&6; } | |
9ba41eb9 | 16640 | if test "${ac_cv_func_vfork_works+set}" = set; then : |
067d23c9 KY |
16641 | $as_echo_n "(cached) " >&6 |
16642 | else | |
16643 | if test "$cross_compiling" = yes; then : | |
16644 | ac_cv_func_vfork_works=cross | |
16645 | else | |
16646 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16647 | /* end confdefs.h. */ | |
16648 | /* Thanks to Paul Eggert for this test. */ | |
16649 | $ac_includes_default | |
16650 | #include <sys/wait.h> | |
16651 | #ifdef HAVE_VFORK_H | |
16652 | # include <vfork.h> | |
16653 | #endif | |
16654 | /* On some sparc systems, changes by the child to local and incoming | |
16655 | argument registers are propagated back to the parent. The compiler | |
16656 | is told about this with #include <vfork.h>, but some compilers | |
16657 | (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a | |
16658 | static variable whose address is put into a register that is | |
16659 | clobbered by the vfork. */ | |
16660 | static void | |
16661 | #ifdef __cplusplus | |
16662 | sparc_address_test (int arg) | |
16663 | # else | |
16664 | sparc_address_test (arg) int arg; | |
16665 | #endif | |
16666 | { | |
16667 | static pid_t child; | |
16668 | if (!child) { | |
16669 | child = vfork (); | |
16670 | if (child < 0) { | |
16671 | perror ("vfork"); | |
16672 | _exit(2); | |
16673 | } | |
16674 | if (!child) { | |
16675 | arg = getpid(); | |
16676 | write(-1, "", 0); | |
16677 | _exit (arg); | |
16678 | } | |
16679 | } | |
16680 | } | |
16681 | ||
16682 | int | |
16683 | main () | |
16684 | { | |
16685 | pid_t parent = getpid (); | |
16686 | pid_t child; | |
16687 | ||
16688 | sparc_address_test (0); | |
16689 | ||
16690 | child = vfork (); | |
16691 | ||
16692 | if (child == 0) { | |
16693 | /* Here is another test for sparc vfork register problems. This | |
16694 | test uses lots of local variables, at least as many local | |
16695 | variables as main has allocated so far including compiler | |
16696 | temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris | |
16697 | 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should | |
16698 | reuse the register of parent for one of the local variables, | |
16699 | since it will think that parent can't possibly be used any more | |
16700 | in this routine. Assigning to the local variable will thus | |
16701 | munge parent in the parent process. */ | |
16702 | pid_t | |
16703 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
16704 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
16705 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
16706 | use the same hardware register for all 8 local variables. */ | |
16707 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
16708 | || p != p5 || p != p6 || p != p7) | |
16709 | _exit(1); | |
16710 | ||
16711 | /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent | |
16712 | from child file descriptors. If the child closes a descriptor | |
16713 | before it execs or exits, this munges the parent's descriptor | |
16714 | as well. Test for this by closing stdout in the child. */ | |
16715 | _exit(close(fileno(stdout)) != 0); | |
16716 | } else { | |
16717 | int status; | |
16718 | struct stat st; | |
16719 | ||
16720 | while (wait(&status) != child) | |
16721 | ; | |
16722 | return ( | |
16723 | /* Was there some problem with vforking? */ | |
16724 | child < 0 | |
16725 | ||
16726 | /* Did the child fail? (This shouldn't happen.) */ | |
16727 | || status | |
16728 | ||
16729 | /* Did the vfork/compiler bug occur? */ | |
16730 | || parent != getpid() | |
16731 | ||
16732 | /* Did the file descriptor bug occur? */ | |
16733 | || fstat(fileno(stdout), &st) != 0 | |
16734 | ); | |
16735 | } | |
16736 | } | |
16737 | _ACEOF | |
16738 | if ac_fn_c_try_run "$LINENO"; then : | |
16739 | ac_cv_func_vfork_works=yes | |
16740 | else | |
16741 | ac_cv_func_vfork_works=no | |
16742 | fi | |
16743 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
16744 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
16745 | fi | |
16746 | ||
16747 | fi | |
16748 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 | |
16749 | $as_echo "$ac_cv_func_vfork_works" >&6; } | |
16750 | ||
16751 | fi; | |
16752 | if test "x$ac_cv_func_fork_works" = xcross; then | |
16753 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
16754 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 | |
16755 | $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} | |
16756 | fi | |
16757 | ||
16758 | if test "x$ac_cv_func_vfork_works" = xyes; then | |
16759 | ||
16760 | $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h | |
16761 | ||
16762 | else | |
16763 | ||
16764 | $as_echo "#define vfork fork" >>confdefs.h | |
16765 | ||
16766 | fi | |
16767 | if test "x$ac_cv_func_fork_works" = xyes; then | |
16768 | ||
16769 | $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h | |
16770 | ||
16771 | fi | |
16772 | ||
16773 | ||
16774 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 | |
16775 | $as_echo_n "checking for nl_langinfo and CODESET... " >&6; } | |
9ba41eb9 | 16776 | if test "${emacs_cv_langinfo_codeset+set}" = set; then : |
067d23c9 KY |
16777 | $as_echo_n "(cached) " >&6 |
16778 | else | |
16779 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16780 | /* end confdefs.h. */ | |
16781 | #include <langinfo.h> | |
16782 | int | |
16783 | main () | |
16784 | { | |
16785 | char* cs = nl_langinfo(CODESET); | |
16786 | ; | |
16787 | return 0; | |
16788 | } | |
16789 | _ACEOF | |
16790 | if ac_fn_c_try_link "$LINENO"; then : | |
16791 | emacs_cv_langinfo_codeset=yes | |
16792 | else | |
16793 | emacs_cv_langinfo_codeset=no | |
16794 | fi | |
16795 | rm -f core conftest.err conftest.$ac_objext \ | |
16796 | conftest$ac_exeext conftest.$ac_ext | |
16797 | ||
16798 | fi | |
16799 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_langinfo_codeset" >&5 | |
16800 | $as_echo "$emacs_cv_langinfo_codeset" >&6; } | |
16801 | if test $emacs_cv_langinfo_codeset = yes; then | |
16802 | ||
16803 | $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h | |
16804 | ||
16805 | fi | |
16806 | ||
16807 | ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" | |
9ba41eb9 | 16808 | if test "x$ac_cv_type_size_t" = x""yes; then : |
067d23c9 KY |
16809 | |
16810 | cat >>confdefs.h <<_ACEOF | |
16811 | #define HAVE_SIZE_T 1 | |
16812 | _ACEOF | |
16813 | ||
16814 | ||
16815 | fi | |
16816 | ||
16817 | ||
16818 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5 | |
16819 | $as_echo_n "checking for mbstate_t... " >&6; } | |
9ba41eb9 | 16820 | if test "${ac_cv_type_mbstate_t+set}" = set; then : |
067d23c9 KY |
16821 | $as_echo_n "(cached) " >&6 |
16822 | else | |
16823 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16824 | /* end confdefs.h. */ | |
16825 | $ac_includes_default | |
16826 | # include <wchar.h> | |
16827 | int | |
16828 | main () | |
16829 | { | |
16830 | mbstate_t x; return sizeof x; | |
16831 | ; | |
16832 | return 0; | |
16833 | } | |
16834 | _ACEOF | |
16835 | if ac_fn_c_try_compile "$LINENO"; then : | |
16836 | ac_cv_type_mbstate_t=yes | |
16837 | else | |
16838 | ac_cv_type_mbstate_t=no | |
16839 | fi | |
16840 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
16841 | fi | |
16842 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5 | |
16843 | $as_echo "$ac_cv_type_mbstate_t" >&6; } | |
16844 | if test $ac_cv_type_mbstate_t = yes; then | |
16845 | ||
16846 | $as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h | |
16847 | ||
16848 | else | |
16849 | ||
16850 | $as_echo "#define mbstate_t int" >>confdefs.h | |
16851 | ||
16852 | fi | |
16853 | ||
067d23c9 KY |
16854 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C restricted array declarations" >&5 |
16855 | $as_echo_n "checking for C restricted array declarations... " >&6; } | |
9ba41eb9 | 16856 | if test "${emacs_cv_c_restrict_arr+set}" = set; then : |
067d23c9 KY |
16857 | $as_echo_n "(cached) " >&6 |
16858 | else | |
16859 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16860 | /* end confdefs.h. */ | |
16861 | void fred (int x[__restrict]); | |
16862 | int | |
16863 | main () | |
16864 | { | |
16865 | ||
16866 | ; | |
16867 | return 0; | |
16868 | } | |
16869 | _ACEOF | |
16870 | if ac_fn_c_try_compile "$LINENO"; then : | |
16871 | emacs_cv_c_restrict_arr=yes | |
16872 | else | |
16873 | emacs_cv_c_restrict_arr=no | |
16874 | fi | |
16875 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
16876 | fi | |
16877 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_c_restrict_arr" >&5 | |
16878 | $as_echo "$emacs_cv_c_restrict_arr" >&6; } | |
16879 | if test "$emacs_cv_c_restrict_arr" = yes; then | |
16880 | ||
16881 | $as_echo "#define __restrict_arr __restrict" >>confdefs.h | |
16882 | ||
16883 | fi | |
16884 | ||
16885 | ||
16886 | ||
16887 | # Set up the CFLAGS for real compilation, so we can substitute it. | |
16888 | CFLAGS="$REAL_CFLAGS" | |
16889 | CPPFLAGS="$REAL_CPPFLAGS" | |
16890 | ||
16891 | ## Hack to detect a buggy GCC version. | |
16892 | if test "x$GCC" = xyes \ | |
16893 | && test x"`$CC --version 2> /dev/null | grep 'gcc.* 4.5.0'`" != x \ | |
16894 | && test x"`echo $CFLAGS | grep '\-O[23]'`" != x \ | |
16895 | && test x"`echo $CFLAGS | grep '\-fno-optimize-sibling-calls'`" = x; then | |
2018939f | 16896 | as_fn_error $? "GCC 4.5.0 has problems compiling Emacs; see etc/PROBLEMS'." "$LINENO" 5 |
067d23c9 KY |
16897 | fi |
16898 | ||
16899 | #### Find out which version of Emacs this is. | |
16900 | version=`grep 'const char emacs_version' ${srcdir}/src/emacs.c \ | |
16901 | | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'` | |
16902 | if test x"${version}" = x; then | |
2018939f | 16903 | as_fn_error $? "can't find current emacs version in \`${srcdir}/src/emacs.c'." "$LINENO" 5 |
067d23c9 KY |
16904 | fi |
16905 | if test x"${version}" != x"$PACKAGE_VERSION"; then | |
16906 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: version mismatch between \`${srcdir}/configure.in' and \`${srcdir}/src/emacs.c'." >&5 | |
16907 | $as_echo "$as_me: WARNING: version mismatch between \`${srcdir}/configure.in' and \`${srcdir}/src/emacs.c'." >&2;} | |
16908 | fi | |
16909 | ||
16910 | ### Specify what sort of things we'll be editing into Makefile and config.h. | |
16911 | ### Use configuration here uncanonicalized to avoid exceeding size limits. | |
16912 | ||
16913 | ||
16914 | ## Unused? | |
16915 | ||
16916 | ||
16917 | ||
16918 | ||
16919 | ||
16920 | ||
16921 | ||
16922 | ||
16923 | ||
16924 | ||
16925 | ||
16926 | ||
16927 | ||
16928 | ||
16929 | ||
16930 | ||
16931 | ||
16932 | ||
16933 | ||
16934 | ||
16935 | ## FIXME? Nothing uses @LD_SWITCH_X_SITE@. | |
16936 | ## src/Makefile.in did add LD_SWITCH_X_SITE (as a cpp define) to the | |
16937 | ## end of LIBX_BASE, but nothing ever set it. | |
16938 | ||
16939 | ||
16940 | ||
16941 | ||
16942 | ## Used in lwlib/Makefile.in. | |
16943 | ||
d6a003a8 AS |
16944 | if test -n "${machfile}"; then |
16945 | M_FILE="\$(srcdir)/${machfile}" | |
16946 | else | |
16947 | M_FILE= | |
16948 | fi | |
16949 | S_FILE="\$(srcdir)/${opsysfile}" | |
067d23c9 KY |
16950 | |
16951 | ||
16952 | ||
16953 | ||
16954 | ||
16955 | ||
16956 | ||
16957 | ||
16958 | ||
16959 | ||
16960 | ||
16961 | cat >>confdefs.h <<_ACEOF | |
16962 | #define EMACS_CONFIGURATION "${canonical}" | |
16963 | _ACEOF | |
16964 | ||
16965 | ||
16966 | cat >>confdefs.h <<_ACEOF | |
16967 | #define EMACS_CONFIG_OPTIONS "${ac_configure_args}" | |
16968 | _ACEOF | |
16969 | ||
d6a003a8 | 16970 | if test -n "$machfile"; then |
067d23c9 KY |
16971 | |
16972 | cat >>confdefs.h <<_ACEOF | |
16973 | #define config_machfile "${machfile}" | |
16974 | _ACEOF | |
16975 | ||
d6a003a8 | 16976 | fi |
067d23c9 KY |
16977 | |
16978 | cat >>confdefs.h <<_ACEOF | |
16979 | #define config_opsysfile "${opsysfile}" | |
16980 | _ACEOF | |
16981 | ||
16982 | ||
16983 | XMENU_OBJ= | |
16984 | XOBJ= | |
16985 | FONT_OBJ= | |
16986 | if test "${HAVE_X_WINDOWS}" = "yes" ; then | |
16987 | ||
16988 | $as_echo "#define HAVE_X_WINDOWS 1" >>confdefs.h | |
16989 | ||
16990 | XMENU_OBJ=xmenu.o | |
16991 | XOBJ="xterm.o xfns.o xselect.o xrdb.o fontset.o xsmfns.o fringe.o image.o xsettings.o xgselect.o" | |
16992 | FONT_OBJ=xfont.o | |
16993 | if test "$HAVE_XFT" = "yes"; then | |
16994 | FONT_OBJ="$FONT_OBJ ftfont.o xftfont.o ftxfont.o" | |
16995 | elif test "$HAVE_FREETYPE" = "yes"; then | |
16996 | FONT_OBJ="$FONT_OBJ ftfont.o ftxfont.o" | |
16997 | fi | |
16998 | ||
16999 | fi | |
17000 | ||
17001 | ||
17002 | ||
17003 | ||
17004 | WIDGET_OBJ= | |
17005 | MOTIF_LIBW= | |
17006 | if test "${USE_X_TOOLKIT}" != "none" ; then | |
17007 | WIDGET_OBJ=widget.o | |
17008 | ||
17009 | $as_echo "#define USE_X_TOOLKIT 1" >>confdefs.h | |
17010 | ||
17011 | if test "${USE_X_TOOLKIT}" = "LUCID"; then | |
17012 | ||
17013 | $as_echo "#define USE_LUCID 1" >>confdefs.h | |
17014 | ||
17015 | elif test "${USE_X_TOOLKIT}" = "MOTIF"; then | |
17016 | ||
17017 | $as_echo "#define USE_MOTIF 1" >>confdefs.h | |
17018 | ||
17019 | MOTIF_LIBW=-lXm | |
17020 | case "$opsys" in | |
17021 | gnu-linux) | |
17022 | ## Paul Abrahams <abrahams at equinox.shaysnet.com> says this is needed. | |
17023 | MOTIF_LIBW="$MOTIF_LIBW -lXpm" | |
17024 | ;; | |
17025 | ||
17026 | unixware) | |
17027 | ## Richard Anthony Ryan <ryanr at ellingtn.ftc.nrcs.usda.gov> | |
17028 | ## says -lXimp is needed in UNIX_SV ... 4.2 1.1.2. | |
17029 | MOTIF_LIBW="MOTIF_LIBW -lXimp" | |
17030 | ;; | |
17031 | ||
17032 | aix4-2) | |
17033 | ## olson@mcs.anl.gov says -li18n is needed by -lXm. | |
17034 | MOTIF_LIBW="$MOTIF_LIBW -li18n" | |
17035 | ;; | |
17036 | esac | |
17037 | MOTIF_LIBW="$MOTIF_LIBW $LIBXP" | |
17038 | fi | |
17039 | fi | |
17040 | ||
17041 | ||
17042 | TOOLKIT_LIBW= | |
17043 | case "$USE_X_TOOLKIT" in | |
17044 | MOTIF) TOOLKIT_LIBW="$MOTIF_LIBW" ;; | |
17045 | LUCID) TOOLKIT_LIBW="$LUCID_LIBW" ;; | |
17046 | none) test "x$HAVE_GTK" = "xyes" && TOOLKIT_LIBW="$GTK_LIBS" ;; | |
17047 | esac | |
17048 | ||
17049 | ||
17050 | if test "$USE_X_TOOLKIT" = "none"; then | |
17051 | LIBXT_OTHER="\$(LIBXSM)" | |
17052 | OLDXMENU_TARGET="really-oldXMenu" | |
17053 | else | |
17054 | LIBXT_OTHER="\$(LIBXMU) -lXt \$(LIBXTR6) -lXext" | |
17055 | OLDXMENU_TARGET="really-lwlib" | |
17056 | fi | |
17057 | ||
17058 | ||
17059 | ## The X Menu stuff is present in the X10 distribution, but missing | |
17060 | ## from X11. If we have X10, just use the installed library; | |
17061 | ## otherwise, use our own copy. | |
17062 | if test "${HAVE_X11}" = "yes" ; then | |
17063 | ||
17064 | $as_echo "#define HAVE_X11 1" >>confdefs.h | |
17065 | ||
17066 | ||
17067 | if test "$USE_X_TOOLKIT" = "none"; then | |
17068 | OLDXMENU="\${oldXMenudir}/libXMenu11.a" | |
17069 | else | |
17070 | OLDXMENU="\${lwlibdir}/liblw.a" | |
17071 | fi | |
17072 | LIBXMENU="\$(OLDXMENU)" | |
17073 | LIBX_OTHER="\$(LIBXT) \$(LIBX_EXTRA)" | |
17074 | OLDXMENU_DEPS="\${OLDXMENU} ../src/\${OLDXMENU}" | |
17075 | else | |
17076 | ## For a syntactically valid Makefile; not actually used for anything. | |
17077 | ## See comments in src/Makefile.in. | |
17078 | OLDXMENU=nothing | |
17079 | ## FIXME This case (!HAVE_X11 && HAVE_X_WINDOWS) is no longer possible(?). | |
17080 | if test "${HAVE_X_WINDOWS}" = "yes"; then | |
17081 | LIBXMENU="-lXMenu" | |
17082 | else | |
17083 | LIBXMENU= | |
17084 | fi | |
17085 | LIBX_OTHER= | |
17086 | OLDXMENU_DEPS= | |
17087 | fi | |
17088 | ||
17089 | if test "$HAVE_GTK" = "yes" || test "$HAVE_MENUS" != "yes"; then | |
17090 | OLDXMENU_TARGET= | |
17091 | OLDXMENU=nothing | |
17092 | LIBXMENU= | |
17093 | OLDXMENU_DEPS= | |
17094 | fi | |
17095 | ||
17096 | ||
17097 | ||
17098 | ||
17099 | ||
17100 | ||
17101 | ||
17102 | if test "${HAVE_MENUS}" = "yes" ; then | |
17103 | ||
17104 | $as_echo "#define HAVE_MENUS 1" >>confdefs.h | |
17105 | ||
17106 | fi | |
17107 | ||
17108 | if test "${GNU_MALLOC}" = "yes" ; then | |
17109 | ||
17110 | $as_echo "#define GNU_MALLOC 1" >>confdefs.h | |
17111 | ||
17112 | fi | |
17113 | ||
17114 | RALLOC_OBJ= | |
17115 | if test "${REL_ALLOC}" = "yes" ; then | |
17116 | ||
17117 | $as_echo "#define REL_ALLOC 1" >>confdefs.h | |
17118 | ||
17119 | ||
17120 | test "$system_malloc" != "yes" && RALLOC_OBJ=ralloc.o | |
17121 | fi | |
17122 | ||
17123 | ||
17124 | if test "$opsys" = "cygwin"; then | |
17125 | CYGWIN_OBJ="sheap.o" | |
17126 | ## Cygwin differs because of its unexec(). | |
17127 | PRE_ALLOC_OBJ= | |
17128 | POST_ALLOC_OBJ=lastfile.o | |
17129 | else | |
17130 | CYGWIN_OBJ= | |
17131 | PRE_ALLOC_OBJ=lastfile.o | |
17132 | POST_ALLOC_OBJ= | |
17133 | fi | |
17134 | ||
17135 | ||
17136 | ||
17137 | ||
17138 | ||
17139 | case "$opsys" in | |
17140 | aix4-2) LD_SWITCH_SYSTEM_TEMACS="-Wl,-bnodelcsect" ;; | |
17141 | ||
17142 | darwin) | |
17143 | ## The -headerpad option tells ld (see man page) to leave room at the | |
17144 | ## end of the header for adding load commands. Needed for dumping. | |
17145 | ## 0x690 is the total size of 30 segment load commands (at 56 | |
17146 | ## each); under Cocoa 31 commands are required. | |
17147 | if test "$HAVE_NS" = "yes"; then | |
17148 | libs_nsgui="-framework AppKit" | |
17149 | headerpad_extra=6C8 | |
17150 | else | |
17151 | libs_nsgui= | |
17152 | headerpad_extra=690 | |
17153 | fi | |
17154 | LD_SWITCH_SYSTEM_TEMACS="-prebind $libs_nsgui -Xlinker -headerpad -Xlinker $headerpad_extra" | |
17155 | ||
17156 | ## This is here because src/Makefile.in did some extra fiddling around | |
17157 | ## with LD_SWITCH_SYSTEM. The cpp logic was: | |
17158 | ## #ifndef LD_SWITCH_SYSTEM | |
17159 | ## #if !defined (__GNUC__) && ((defined (BSD_SYSTEM) && !defined (COFF))) | |
17160 | ## Since all the *bsds define LD_SWITCH_SYSTEM, this simplifies to: | |
17161 | ## not using gcc, darwin system not on an alpha (ie darwin, since | |
17162 | ## darwin + alpha does not occur). | |
17163 | ## Because this was done in src/Makefile.in, the resulting part of | |
17164 | ## LD_SWITCH_SYSTEM was not used in configure (ie, in ac_link). | |
17165 | ## It therefore seems cleaner to put this in LD_SWITCH_SYSTEM_TEMACS, | |
17166 | ## rather than LD_SWITCH_SYSTEM. | |
17167 | test "x$LD_SWITCH_SYSTEM" = "x" && test "x$GCC" != "xyes" && \ | |
17168 | LD_SWITCH_SYSTEM_TEMACS="-X $LD_SWITCH_SYSTEM_TEMACS" | |
17169 | ;; | |
17170 | ||
17171 | ## LD_SWITCH_X_SITE_AUX is a -R option saying where to find X at run-time. | |
17172 | ## When handled by cpp, this was in LD_SWITCH_SYSTEM. However, at | |
17173 | ## the point where configure sourced the s/*.h file, LD_SWITCH_X_SITE_AUX | |
17174 | ## had not yet been defined and was expanded to null. Hence LD_SWITCH_SYSTEM | |
17175 | ## had different values in configure (in ac_link) and src/Makefile.in. | |
17176 | ## It seems clearer therefore to put this piece in LD_SWITCH_SYSTEM_TEMACS. | |
17177 | gnu-linux) LD_SWITCH_SYSTEM_TEMACS="\$(LD_SWITCH_X_SITE_AUX)" ;; | |
17178 | ||
17179 | *) LD_SWITCH_SYSTEM_TEMACS= ;; | |
17180 | esac | |
17181 | ||
17182 | if test "$NS_IMPL_GNUSTEP" = "yes"; then | |
17183 | LD_SWITCH_SYSTEM_TEMACS="${LD_SWITCH_SYSTEM_TEMACS} -L${GNUSTEP_SYSTEM_LIBRARIES} ${GNUSTEP_LOCAL_LIBRARIES} -lgnustep-gui -lgnustep-base -lobjc -lpthread" | |
17184 | fi | |
17185 | ||
17186 | ||
17187 | ||
17188 | ||
17189 | LD_FIRSTFLAG= | |
17190 | ORDINARY_LINK= | |
17191 | case "$opsys" in | |
17192 | ## gnu: GNU needs its own crt0. | |
17193 | aix4-2|cygwin|darwin|gnu|hpux*|irix6-5|sol2*|unixware) ORDINARY_LINK=yes ;; | |
17194 | ||
17195 | ## On post 1.3 releases of NetBSD, gcc -nostdlib also clears the | |
17196 | ## library search parth, i.e. it won't search /usr/lib for libc and | |
17197 | ## friends. Using -nostartfiles instead avoids this problem, and | |
17198 | ## will also work on earlier NetBSD releases. | |
17199 | netbsd|openbsd) LD_FIRSTFLAG="-nostartfiles" ;; | |
17200 | ||
17201 | ## macpcc: NAKAJI Hiroyuki <nakaji@tutrp.tut.ac.jp> says | |
17202 | ## MkLinux/LinuxPPC needs this. | |
17203 | ## ibms390x only supports opsys = gnu-linux so it can be added here. | |
17204 | gnu-*) | |
17205 | case "$machine" in | |
17206 | macppc|ibms390x) LD_FIRSTFLAG="-nostdlib" ;; | |
17207 | esac | |
17208 | ;; | |
17209 | esac | |
17210 | ||
17211 | ||
17212 | if test "x$ORDINARY_LINK" = "xyes"; then | |
17213 | ||
17214 | LD_FIRSTFLAG="" | |
17215 | ||
17216 | $as_echo "#define ORDINARY_LINK 1" >>confdefs.h | |
17217 | ||
17218 | ||
17219 | ## The system files defining neither ORDINARY_LINK nor LD_FIRSTFLAG are: | |
17220 | ## freebsd, gnu-* not on macppc|ibms390x. | |
17221 | elif test "x$GCC" = "xyes" && test "x$LD_FIRSTFLAG" = "x"; then | |
17222 | ||
17223 | ## Versions of GCC >= 2.0 put their library, libgcc.a, in obscure | |
17224 | ## places that are difficult to figure out at make time. Fortunately, | |
17225 | ## these same versions allow you to pass arbitrary flags on to the | |
17226 | ## linker, so there is no reason not to use it as a linker. | |
17227 | ## | |
17228 | ## Well, it is not quite perfect. The "-nostdlib" keeps GCC from | |
17229 | ## searching for libraries in its internal directories, so we have to | |
17230 | ## ask GCC explicitly where to find libgcc.a (LIB_GCC below). | |
17231 | LD_FIRSTFLAG="-nostdlib" | |
17232 | fi | |
17233 | ||
17234 | ## FIXME? What setting of EDIT_LDFLAGS should this have? | |
17235 | test "$NS_IMPL_GNUSTEP" = "yes" && LD_FIRSTFLAG="-rdynamic" | |
17236 | ||
17237 | ||
17238 | ||
17239 | ||
17240 | ## FIXME? The logic here is not precisely the same as that above. | |
17241 | ## There is no check here for a pre-defined LD_FIRSTFLAG. | |
17242 | ## Should we only be setting LIB_GCC if LD ~ -nostdlib? | |
17243 | LIB_GCC= | |
17244 | if test "x$GCC" = "xyes" && test "x$ORDINARY_LINK" != "xyes"; then | |
17245 | ||
17246 | case "$opsys" in | |
17247 | freebsd|netbsd|openbsd) LIB_GCC= ;; | |
17248 | ||
17249 | gnu-*) | |
17250 | ## armin76@gentoo.org reported that the lgcc_s flag is necessary to | |
17251 | ## build on ARM EABI under GNU/Linux. (Bug#5518) | |
d6a003a8 AS |
17252 | case $host_cpu in |
17253 | arm*) | |
067d23c9 | 17254 | LIB_GCC="-lgcc_s" |
d6a003a8 AS |
17255 | ;; |
17256 | *) | |
067d23c9 KY |
17257 | ## FIXME? s/gnu-linux.h used to define LIB_GCC as below, then |
17258 | ## immediately undefine it again and redefine it to empty. | |
17259 | ## Was the C_SWITCH_X_SITE part really necessary? | |
17260 | ## LIB_GCC=`$CC $C_SWITCH_X_SITE -print-libgcc-file-name` | |
17261 | LIB_GCC= | |
d6a003a8 AS |
17262 | ;; |
17263 | esac | |
067d23c9 KY |
17264 | ;; |
17265 | ||
17266 | ## Ask GCC where to find libgcc.a. | |
17267 | *) LIB_GCC=`$CC -print-libgcc-file-name 2> /dev/null` ;; | |
17268 | esac | |
17269 | fi | |
17270 | ||
17271 | ||
17272 | TOOLTIP_SUPPORT= | |
17273 | WINDOW_SUPPORT= | |
17274 | ## If we're using X11/GNUstep, define some consequences. | |
17275 | if test "$HAVE_X_WINDOWS" = "yes" || test "$HAVE_NS" = "yes"; then | |
17276 | ||
17277 | $as_echo "#define HAVE_WINDOW_SYSTEM 1" >>confdefs.h | |
17278 | ||
17279 | ||
17280 | $as_echo "#define HAVE_MOUSE 1" >>confdefs.h | |
17281 | ||
17282 | MOUSE_SUPPORT="\$(REAL_MOUSE_SUPPORT)" | |
17283 | TOOLTIP_SUPPORT="\${lispsource}/mouse.elc" | |
17284 | ||
17285 | WINDOW_SUPPORT="\$(BASE_WINDOW_SUPPORT)" | |
17286 | test "$HAVE_X_WINDOWS" = "yes" && \ | |
17287 | WINDOW_SUPPORT="$WINDOW_SUPPORT \$(X_WINDOW_SUPPORT)" | |
17288 | ||
17289 | fi | |
17290 | ||
17291 | ||
17292 | ||
17293 | ||
17294 | ||
17295 | ||
17296 | ||
17297 | #### Report on what we decided to do. | |
17298 | #### Report GTK as a toolkit, even if it doesn't use Xt. | |
17299 | #### It makes printing result more understandable as using GTK sets | |
17300 | #### toolkit_scroll_bars to yes by default. | |
17301 | if test "${HAVE_GTK}" = "yes"; then | |
17302 | USE_X_TOOLKIT=GTK | |
17303 | fi | |
17304 | ||
2b7f50d8 AS |
17305 | and_machfile= |
17306 | if test -n "$machfile"; then | |
17307 | and_machfile=" and \`${machfile}'" | |
17308 | fi | |
17309 | ||
067d23c9 KY |
17310 | echo " |
17311 | Configured for \`${canonical}'. | |
17312 | ||
17313 | Where should the build process find the source code? ${srcdir} | |
17314 | What operating system and machine description files should Emacs use? | |
2b7f50d8 | 17315 | \`${opsysfile}'${and_machfile} |
067d23c9 KY |
17316 | What compiler should emacs be built with? ${CC} ${CFLAGS} |
17317 | Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason} | |
17318 | Should Emacs use a relocating allocator for buffers? ${REL_ALLOC} | |
17319 | Should Emacs use mmap(2) for buffer allocation? $use_mmap_for_buffers | |
17320 | What window system should Emacs use? ${window_system} | |
17321 | What toolkit should Emacs use? ${USE_X_TOOLKIT}" | |
17322 | ||
17323 | if test -n "${x_includes}"; then | |
17324 | echo " Where do we find X Windows header files? ${x_includes}" | |
17325 | else | |
17326 | echo " Where do we find X Windows header files? Standard dirs" | |
17327 | fi | |
17328 | if test -n "${x_libraries}"; then | |
17329 | echo " Where do we find X Windows libraries? ${x_libraries}" | |
17330 | else | |
17331 | echo " Where do we find X Windows libraries? Standard dirs" | |
17332 | fi | |
17333 | ||
17334 | echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}" | |
17335 | echo " Does Emacs use -lXpm? ${HAVE_XPM}" | |
17336 | echo " Does Emacs use -ljpeg? ${HAVE_JPEG}" | |
17337 | echo " Does Emacs use -ltiff? ${HAVE_TIFF}" | |
17338 | echo " Does Emacs use a gif library? ${HAVE_GIF} $LIBGIF" | |
17339 | echo " Does Emacs use -lpng? ${HAVE_PNG}" | |
17340 | echo " Does Emacs use -lrsvg-2? ${HAVE_RSVG}" | |
17341 | echo " Does Emacs use imagemagick? ${HAVE_IMAGEMAGICK}" | |
17342 | ||
17343 | echo " Does Emacs use -lgpm? ${HAVE_GPM}" | |
17344 | echo " Does Emacs use -ldbus? ${HAVE_DBUS}" | |
17345 | echo " Does Emacs use -lgconf? ${HAVE_GCONF}" | |
17346 | echo " Does Emacs use -lselinux? ${HAVE_LIBSELINUX}" | |
17347 | echo " Does Emacs use -lgnutls? ${HAVE_GNUTLS}" | |
17348 | echo " Does Emacs use -lxml2? ${HAVE_LIBXML2}" | |
17349 | ||
17350 | echo " Does Emacs use -lfreetype? ${HAVE_FREETYPE}" | |
17351 | echo " Does Emacs use -lm17n-flt? ${HAVE_M17N_FLT}" | |
17352 | echo " Does Emacs use -lotf? ${HAVE_LIBOTF}" | |
17353 | echo " Does Emacs use -lxft? ${HAVE_XFT}" | |
17354 | ||
17355 | echo " Does Emacs use toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}" | |
17356 | echo | |
17357 | ||
17358 | if test $USE_XASSERTS = yes; then | |
17359 | echo " Compiling with asserts turned on." | |
17360 | CPPFLAGS="$CPPFLAGS -DXASSERTS=1" | |
17361 | fi | |
17362 | ||
17363 | echo | |
17364 | ||
17365 | if test "$HAVE_NS" = "yes"; then | |
17366 | echo | |
17367 | echo "You must run \"make install\" in order to test the built application. | |
17368 | The installed application will go to nextstep/Emacs.app and can be | |
17369 | run or moved from there." | |
17370 | if test "$EN_NS_SELF_CONTAINED" = "yes"; then | |
17371 | echo "The application will be fully self-contained." | |
17372 | else | |
17373 | echo "The lisp resources for the application will be installed under ${prefix}. | |
17374 | You may need to run \"make install\" with sudo. The application will fail | |
17375 | to run if these resources are not installed." | |
17376 | fi | |
17377 | echo | |
17378 | fi | |
17379 | ||
17380 | ||
17381 | # Remove any trailing slashes in these variables. | |
17382 | test "${prefix}" != NONE && | |
17383 | prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'` | |
17384 | test "${exec_prefix}" != NONE && | |
17385 | exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'` | |
17386 | ||
193770ee | 17387 | ac_config_files="$ac_config_files Makefile lib/Makefile lib-src/Makefile oldXMenu/Makefile doc/emacs/Makefile doc/misc/Makefile doc/lispintro/Makefile doc/lispref/Makefile src/Makefile lwlib/Makefile lisp/Makefile leim/Makefile test/automated/Makefile" |
067d23c9 KY |
17388 | |
17389 | ac_config_commands="$ac_config_commands default" | |
17390 | ||
17391 | cat >confcache <<\_ACEOF | |
17392 | # This file is a shell script that caches the results of configure | |
17393 | # tests run on this system so they can be shared between configure | |
17394 | # scripts and configure runs, see configure's option --config-cache. | |
17395 | # It is not useful on other systems. If it contains results you don't | |
17396 | # want to keep, you may remove or edit it. | |
17397 | # | |
17398 | # config.status only pays attention to the cache file if you give it | |
17399 | # the --recheck option to rerun configure. | |
17400 | # | |
17401 | # `ac_cv_env_foo' variables (set or unset) will be overridden when | |
17402 | # loading this file, other *unset* `ac_cv_foo' will be assigned the | |
17403 | # following values. | |
17404 | ||
17405 | _ACEOF | |
17406 | ||
17407 | # The following way of writing the cache mishandles newlines in values, | |
17408 | # but we know of no workaround that is simple, portable, and efficient. | |
17409 | # So, we kill variables containing newlines. | |
17410 | # Ultrix sh set writes to stderr and can't be redirected directly, | |
17411 | # and sets the high bit in the cache file unless we assign to the vars. | |
17412 | ( | |
17413 | for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do | |
17414 | eval ac_val=\$$ac_var | |
17415 | case $ac_val in #( | |
17416 | *${as_nl}*) | |
17417 | case $ac_var in #( | |
17418 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
17419 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
17420 | esac | |
17421 | case $ac_var in #( | |
17422 | _ | IFS | as_nl) ;; #( | |
17423 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
17424 | *) { eval $ac_var=; unset $ac_var;} ;; | |
17425 | esac ;; | |
17426 | esac | |
17427 | done | |
17428 | ||
17429 | (set) 2>&1 | | |
17430 | case $as_nl`(ac_space=' '; set) 2>&1` in #( | |
17431 | *${as_nl}ac_space=\ *) | |
17432 | # `set' does not quote correctly, so add quotes: double-quote | |
17433 | # substitution turns \\\\ into \\, and sed turns \\ into \. | |
17434 | sed -n \ | |
17435 | "s/'/'\\\\''/g; | |
17436 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" | |
17437 | ;; #( | |
17438 | *) | |
17439 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
17440 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" | |
17441 | ;; | |
17442 | esac | | |
17443 | sort | |
17444 | ) | | |
17445 | sed ' | |
17446 | /^ac_cv_env_/b end | |
17447 | t clear | |
17448 | :clear | |
17449 | s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ | |
17450 | t end | |
17451 | s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ | |
17452 | :end' >>confcache | |
17453 | if diff "$cache_file" confcache >/dev/null 2>&1; then :; else | |
17454 | if test -w "$cache_file"; then | |
9ba41eb9 | 17455 | test "x$cache_file" != "x/dev/null" && |
067d23c9 KY |
17456 | { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 |
17457 | $as_echo "$as_me: updating cache $cache_file" >&6;} | |
9ba41eb9 | 17458 | cat confcache >$cache_file |
067d23c9 KY |
17459 | else |
17460 | { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 | |
17461 | $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} | |
17462 | fi | |
17463 | fi | |
17464 | rm -f confcache | |
17465 | ||
17466 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
17467 | # Let make expand exec_prefix. | |
17468 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
17469 | ||
17470 | DEFS=-DHAVE_CONFIG_H | |
17471 | ||
17472 | ac_libobjs= | |
17473 | ac_ltlibobjs= | |
2018939f | 17474 | U= |
067d23c9 KY |
17475 | for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue |
17476 | # 1. Remove the extension, and $U if already installed. | |
17477 | ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' | |
17478 | ac_i=`$as_echo "$ac_i" | sed "$ac_script"` | |
17479 | # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR | |
17480 | # will be set to the directory where LIBOBJS objects are built. | |
17481 | as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" | |
17482 | as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' | |
17483 | done | |
17484 | LIBOBJS=$ac_libobjs | |
17485 | ||
17486 | LTLIBOBJS=$ac_ltlibobjs | |
17487 | ||
17488 | ||
743c80a7 PE |
17489 | if test -n "$EXEEXT"; then |
17490 | am__EXEEXT_TRUE= | |
17491 | am__EXEEXT_FALSE='#' | |
17492 | else | |
17493 | am__EXEEXT_TRUE='#' | |
17494 | am__EXEEXT_FALSE= | |
17495 | fi | |
17496 | ||
17497 | if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then | |
17498 | as_fn_error $? "conditional \"AMDEP\" was never defined. | |
17499 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
17500 | fi | |
17501 | if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then | |
17502 | as_fn_error $? "conditional \"am__fastdepCC\" was never defined. | |
17503 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
17504 | fi | |
17505 | ||
17506 | if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then | |
17507 | as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined. | |
17508 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
17509 | fi | |
17510 | ||
17511 | gl_libobjs= | |
17512 | gl_ltlibobjs= | |
17513 | if test -n "$gl_LIBOBJS"; then | |
17514 | # Remove the extension. | |
17515 | sed_drop_objext='s/\.o$//;s/\.obj$//' | |
17516 | for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do | |
17517 | gl_libobjs="$gl_libobjs $i.$ac_objext" | |
17518 | gl_ltlibobjs="$gl_ltlibobjs $i.lo" | |
17519 | done | |
17520 | fi | |
17521 | gl_LIBOBJS=$gl_libobjs | |
17522 | ||
17523 | gl_LTLIBOBJS=$gl_ltlibobjs | |
17524 | ||
17525 | ||
17526 | ||
17527 | gltests_libobjs= | |
17528 | gltests_ltlibobjs= | |
17529 | if test -n "$gltests_LIBOBJS"; then | |
17530 | # Remove the extension. | |
17531 | sed_drop_objext='s/\.o$//;s/\.obj$//' | |
17532 | for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do | |
17533 | gltests_libobjs="$gltests_libobjs $i.$ac_objext" | |
17534 | gltests_ltlibobjs="$gltests_ltlibobjs $i.lo" | |
17535 | done | |
17536 | fi | |
17537 | gltests_LIBOBJS=$gltests_libobjs | |
17538 | ||
17539 | gltests_LTLIBOBJS=$gltests_ltlibobjs | |
17540 | ||
067d23c9 KY |
17541 | |
17542 | ||
9ba41eb9 | 17543 | : ${CONFIG_STATUS=./config.status} |
067d23c9 KY |
17544 | ac_write_fail=0 |
17545 | ac_clean_files_save=$ac_clean_files | |
17546 | ac_clean_files="$ac_clean_files $CONFIG_STATUS" | |
17547 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 | |
17548 | $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} | |
17549 | as_write_fail=0 | |
17550 | cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 | |
17551 | #! $SHELL | |
17552 | # Generated by $as_me. | |
17553 | # Run this file to recreate the current configuration. | |
17554 | # Compiler output produced by configure, useful for debugging | |
17555 | # configure, is in config.log if it exists. | |
17556 | ||
17557 | debug=false | |
17558 | ac_cs_recheck=false | |
17559 | ac_cs_silent=false | |
17560 | ||
17561 | SHELL=\${CONFIG_SHELL-$SHELL} | |
17562 | export SHELL | |
17563 | _ASEOF | |
17564 | cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 | |
17565 | ## -------------------- ## | |
17566 | ## M4sh Initialization. ## | |
17567 | ## -------------------- ## | |
17568 | ||
17569 | # Be more Bourne compatible | |
17570 | DUALCASE=1; export DUALCASE # for MKS sh | |
17571 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : | |
17572 | emulate sh | |
17573 | NULLCMD=: | |
17574 | # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which | |
17575 | # is contrary to our usage. Disable this feature. | |
17576 | alias -g '${1+"$@"}'='"$@"' | |
17577 | setopt NO_GLOB_SUBST | |
17578 | else | |
17579 | case `(set -o) 2>/dev/null` in #( | |
17580 | *posix*) : | |
17581 | set -o posix ;; #( | |
17582 | *) : | |
17583 | ;; | |
17584 | esac | |
17585 | fi | |
17586 | ||
17587 | ||
17588 | as_nl=' | |
17589 | ' | |
17590 | export as_nl | |
17591 | # Printing a long string crashes Solaris 7 /usr/bin/printf. | |
17592 | as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' | |
17593 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo | |
17594 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo | |
17595 | # Prefer a ksh shell builtin over an external printf program on Solaris, | |
17596 | # but without wasting forks for bash or zsh. | |
17597 | if test -z "$BASH_VERSION$ZSH_VERSION" \ | |
17598 | && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then | |
17599 | as_echo='print -r --' | |
17600 | as_echo_n='print -rn --' | |
17601 | elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then | |
17602 | as_echo='printf %s\n' | |
17603 | as_echo_n='printf %s' | |
17604 | else | |
17605 | if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then | |
17606 | as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' | |
17607 | as_echo_n='/usr/ucb/echo -n' | |
17608 | else | |
17609 | as_echo_body='eval expr "X$1" : "X\\(.*\\)"' | |
17610 | as_echo_n_body='eval | |
17611 | arg=$1; | |
17612 | case $arg in #( | |
17613 | *"$as_nl"*) | |
17614 | expr "X$arg" : "X\\(.*\\)$as_nl"; | |
17615 | arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; | |
17616 | esac; | |
17617 | expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" | |
17618 | ' | |
17619 | export as_echo_n_body | |
17620 | as_echo_n='sh -c $as_echo_n_body as_echo' | |
17621 | fi | |
17622 | export as_echo_body | |
17623 | as_echo='sh -c $as_echo_body as_echo' | |
17624 | fi | |
17625 | ||
17626 | # The user is always right. | |
17627 | if test "${PATH_SEPARATOR+set}" != set; then | |
17628 | PATH_SEPARATOR=: | |
17629 | (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { | |
17630 | (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || | |
17631 | PATH_SEPARATOR=';' | |
17632 | } | |
17633 | fi | |
17634 | ||
17635 | ||
17636 | # IFS | |
17637 | # We need space, tab and new line, in precisely that order. Quoting is | |
17638 | # there to prevent editors from complaining about space-tab. | |
17639 | # (If _AS_PATH_WALK were called with IFS unset, it would disable word | |
17640 | # splitting by setting IFS to empty value.) | |
17641 | IFS=" "" $as_nl" | |
17642 | ||
17643 | # Find who we are. Look in the path if we contain no directory separator. | |
17644 | case $0 in #(( | |
17645 | *[\\/]* ) as_myself=$0 ;; | |
17646 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
17647 | for as_dir in $PATH | |
17648 | do | |
17649 | IFS=$as_save_IFS | |
17650 | test -z "$as_dir" && as_dir=. | |
17651 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | |
17652 | done | |
17653 | IFS=$as_save_IFS | |
17654 | ||
17655 | ;; | |
17656 | esac | |
17657 | # We did not find ourselves, most probably we were run as `sh COMMAND' | |
17658 | # in which case we are not to be found in the path. | |
17659 | if test "x$as_myself" = x; then | |
17660 | as_myself=$0 | |
17661 | fi | |
17662 | if test ! -f "$as_myself"; then | |
17663 | $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 | |
17664 | exit 1 | |
17665 | fi | |
17666 | ||
17667 | # Unset variables that we do not need and which cause bugs (e.g. in | |
17668 | # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" | |
17669 | # suppresses any "Segmentation fault" message there. '((' could | |
17670 | # trigger a bug in pdksh 5.2.14. | |
17671 | for as_var in BASH_ENV ENV MAIL MAILPATH | |
17672 | do eval test x\${$as_var+set} = xset \ | |
17673 | && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : | |
17674 | done | |
17675 | PS1='$ ' | |
17676 | PS2='> ' | |
17677 | PS4='+ ' | |
17678 | ||
17679 | # NLS nuisances. | |
17680 | LC_ALL=C | |
17681 | export LC_ALL | |
17682 | LANGUAGE=C | |
17683 | export LANGUAGE | |
17684 | ||
17685 | # CDPATH. | |
17686 | (unset CDPATH) >/dev/null 2>&1 && unset CDPATH | |
17687 | ||
17688 | ||
2018939f AS |
17689 | # as_fn_error STATUS ERROR [LINENO LOG_FD] |
17690 | # ---------------------------------------- | |
067d23c9 KY |
17691 | # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are |
17692 | # provided, also output the error to LOG_FD, referencing LINENO. Then exit the | |
2018939f | 17693 | # script with STATUS, using 1 if that was 0. |
067d23c9 KY |
17694 | as_fn_error () |
17695 | { | |
2018939f AS |
17696 | as_status=$1; test $as_status -eq 0 && as_status=1 |
17697 | if test "$4"; then | |
17698 | as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
17699 | $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 | |
067d23c9 | 17700 | fi |
2018939f | 17701 | $as_echo "$as_me: error: $2" >&2 |
067d23c9 KY |
17702 | as_fn_exit $as_status |
17703 | } # as_fn_error | |
17704 | ||
17705 | ||
17706 | # as_fn_set_status STATUS | |
17707 | # ----------------------- | |
17708 | # Set $? to STATUS, without forking. | |
17709 | as_fn_set_status () | |
17710 | { | |
17711 | return $1 | |
17712 | } # as_fn_set_status | |
17713 | ||
17714 | # as_fn_exit STATUS | |
17715 | # ----------------- | |
17716 | # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. | |
17717 | as_fn_exit () | |
17718 | { | |
17719 | set +e | |
17720 | as_fn_set_status $1 | |
17721 | exit $1 | |
17722 | } # as_fn_exit | |
17723 | ||
17724 | # as_fn_unset VAR | |
17725 | # --------------- | |
17726 | # Portably unset VAR. | |
17727 | as_fn_unset () | |
17728 | { | |
17729 | { eval $1=; unset $1;} | |
17730 | } | |
17731 | as_unset=as_fn_unset | |
17732 | # as_fn_append VAR VALUE | |
17733 | # ---------------------- | |
17734 | # Append the text in VALUE to the end of the definition contained in VAR. Take | |
17735 | # advantage of any shell optimizations that allow amortized linear growth over | |
17736 | # repeated appends, instead of the typical quadratic growth present in naive | |
17737 | # implementations. | |
17738 | if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : | |
17739 | eval 'as_fn_append () | |
17740 | { | |
17741 | eval $1+=\$2 | |
17742 | }' | |
17743 | else | |
17744 | as_fn_append () | |
17745 | { | |
17746 | eval $1=\$$1\$2 | |
17747 | } | |
17748 | fi # as_fn_append | |
17749 | ||
17750 | # as_fn_arith ARG... | |
17751 | # ------------------ | |
17752 | # Perform arithmetic evaluation on the ARGs, and store the result in the | |
17753 | # global $as_val. Take advantage of shells that can avoid forks. The arguments | |
17754 | # must be portable across $(()) and expr. | |
17755 | if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : | |
17756 | eval 'as_fn_arith () | |
17757 | { | |
17758 | as_val=$(( $* )) | |
17759 | }' | |
17760 | else | |
17761 | as_fn_arith () | |
17762 | { | |
17763 | as_val=`expr "$@" || test $? -eq 1` | |
17764 | } | |
17765 | fi # as_fn_arith | |
17766 | ||
17767 | ||
17768 | if expr a : '\(a\)' >/dev/null 2>&1 && | |
17769 | test "X`expr 00001 : '.*\(...\)'`" = X001; then | |
17770 | as_expr=expr | |
17771 | else | |
17772 | as_expr=false | |
17773 | fi | |
17774 | ||
17775 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then | |
17776 | as_basename=basename | |
17777 | else | |
17778 | as_basename=false | |
17779 | fi | |
17780 | ||
17781 | if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then | |
17782 | as_dirname=dirname | |
17783 | else | |
17784 | as_dirname=false | |
17785 | fi | |
17786 | ||
17787 | as_me=`$as_basename -- "$0" || | |
17788 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ | |
17789 | X"$0" : 'X\(//\)$' \| \ | |
17790 | X"$0" : 'X\(/\)' \| . 2>/dev/null || | |
17791 | $as_echo X/"$0" | | |
17792 | sed '/^.*\/\([^/][^/]*\)\/*$/{ | |
17793 | s//\1/ | |
17794 | q | |
17795 | } | |
17796 | /^X\/\(\/\/\)$/{ | |
17797 | s//\1/ | |
17798 | q | |
17799 | } | |
17800 | /^X\/\(\/\).*/{ | |
17801 | s//\1/ | |
17802 | q | |
17803 | } | |
17804 | s/.*/./; q'` | |
17805 | ||
17806 | # Avoid depending upon Character Ranges. | |
17807 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
17808 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
17809 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
17810 | as_cr_digits='0123456789' | |
17811 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
17812 | ||
17813 | ECHO_C= ECHO_N= ECHO_T= | |
17814 | case `echo -n x` in #((((( | |
17815 | -n*) | |
17816 | case `echo 'xy\c'` in | |
17817 | *c*) ECHO_T=' ';; # ECHO_T is single tab character. | |
17818 | xy) ECHO_C='\c';; | |
17819 | *) echo `echo ksh88 bug on AIX 6.1` > /dev/null | |
17820 | ECHO_T=' ';; | |
17821 | esac;; | |
17822 | *) | |
17823 | ECHO_N='-n';; | |
17824 | esac | |
17825 | ||
17826 | rm -f conf$$ conf$$.exe conf$$.file | |
17827 | if test -d conf$$.dir; then | |
17828 | rm -f conf$$.dir/conf$$.file | |
17829 | else | |
17830 | rm -f conf$$.dir | |
17831 | mkdir conf$$.dir 2>/dev/null | |
17832 | fi | |
17833 | if (echo >conf$$.file) 2>/dev/null; then | |
17834 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
17835 | as_ln_s='ln -s' | |
17836 | # ... but there are two gotchas: | |
17837 | # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. | |
17838 | # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. | |
17839 | # In both cases, we have to default to `cp -p'. | |
17840 | ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || | |
17841 | as_ln_s='cp -p' | |
17842 | elif ln conf$$.file conf$$ 2>/dev/null; then | |
17843 | as_ln_s=ln | |
17844 | else | |
17845 | as_ln_s='cp -p' | |
17846 | fi | |
17847 | else | |
17848 | as_ln_s='cp -p' | |
17849 | fi | |
17850 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file | |
17851 | rmdir conf$$.dir 2>/dev/null | |
17852 | ||
17853 | ||
17854 | # as_fn_mkdir_p | |
17855 | # ------------- | |
17856 | # Create "$as_dir" as a directory, including parents if necessary. | |
17857 | as_fn_mkdir_p () | |
17858 | { | |
17859 | ||
17860 | case $as_dir in #( | |
17861 | -*) as_dir=./$as_dir;; | |
17862 | esac | |
17863 | test -d "$as_dir" || eval $as_mkdir_p || { | |
17864 | as_dirs= | |
17865 | while :; do | |
17866 | case $as_dir in #( | |
17867 | *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( | |
17868 | *) as_qdir=$as_dir;; | |
17869 | esac | |
17870 | as_dirs="'$as_qdir' $as_dirs" | |
17871 | as_dir=`$as_dirname -- "$as_dir" || | |
17872 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
17873 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
17874 | X"$as_dir" : 'X\(//\)$' \| \ | |
17875 | X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || | |
17876 | $as_echo X"$as_dir" | | |
17877 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
17878 | s//\1/ | |
17879 | q | |
17880 | } | |
17881 | /^X\(\/\/\)[^/].*/{ | |
17882 | s//\1/ | |
17883 | q | |
17884 | } | |
17885 | /^X\(\/\/\)$/{ | |
17886 | s//\1/ | |
17887 | q | |
17888 | } | |
17889 | /^X\(\/\).*/{ | |
17890 | s//\1/ | |
17891 | q | |
17892 | } | |
17893 | s/.*/./; q'` | |
17894 | test -d "$as_dir" && break | |
17895 | done | |
17896 | test -z "$as_dirs" || eval "mkdir $as_dirs" | |
2018939f | 17897 | } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" |
067d23c9 KY |
17898 | |
17899 | ||
17900 | } # as_fn_mkdir_p | |
17901 | if mkdir -p . 2>/dev/null; then | |
17902 | as_mkdir_p='mkdir -p "$as_dir"' | |
17903 | else | |
17904 | test -d ./-p && rmdir ./-p | |
17905 | as_mkdir_p=false | |
17906 | fi | |
17907 | ||
17908 | if test -x / >/dev/null 2>&1; then | |
17909 | as_test_x='test -x' | |
17910 | else | |
17911 | if ls -dL / >/dev/null 2>&1; then | |
17912 | as_ls_L_option=L | |
17913 | else | |
17914 | as_ls_L_option= | |
17915 | fi | |
17916 | as_test_x=' | |
17917 | eval sh -c '\'' | |
17918 | if test -d "$1"; then | |
17919 | test -d "$1/."; | |
17920 | else | |
17921 | case $1 in #( | |
17922 | -*)set "./$1";; | |
17923 | esac; | |
17924 | case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( | |
17925 | ???[sx]*):;;*)false;;esac;fi | |
17926 | '\'' sh | |
17927 | ' | |
17928 | fi | |
17929 | as_executable_p=$as_test_x | |
17930 | ||
17931 | # Sed expression to map a string onto a valid CPP name. | |
17932 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" | |
17933 | ||
17934 | # Sed expression to map a string onto a valid variable name. | |
17935 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" | |
17936 | ||
17937 | ||
17938 | exec 6>&1 | |
17939 | ## ----------------------------------- ## | |
17940 | ## Main body of $CONFIG_STATUS script. ## | |
17941 | ## ----------------------------------- ## | |
17942 | _ASEOF | |
17943 | test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 | |
17944 | ||
17945 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
17946 | # Save the log message, to keep $0 and so on meaningful, and to | |
17947 | # report actual input values of CONFIG_FILES etc. instead of their | |
17948 | # values after options handling. | |
17949 | ac_log=" | |
17950 | This file was extended by emacs $as_me 24.0.50, which was | |
9ba41eb9 | 17951 | generated by GNU Autoconf 2.67. Invocation command line was |
067d23c9 KY |
17952 | |
17953 | CONFIG_FILES = $CONFIG_FILES | |
17954 | CONFIG_HEADERS = $CONFIG_HEADERS | |
17955 | CONFIG_LINKS = $CONFIG_LINKS | |
17956 | CONFIG_COMMANDS = $CONFIG_COMMANDS | |
17957 | $ $0 $@ | |
17958 | ||
17959 | on `(hostname || uname -n) 2>/dev/null | sed 1q` | |
17960 | " | |
17961 | ||
17962 | _ACEOF | |
17963 | ||
17964 | case $ac_config_files in *" | |
17965 | "*) set x $ac_config_files; shift; ac_config_files=$*;; | |
17966 | esac | |
17967 | ||
17968 | case $ac_config_headers in *" | |
17969 | "*) set x $ac_config_headers; shift; ac_config_headers=$*;; | |
17970 | esac | |
17971 | ||
17972 | ||
17973 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
17974 | # Files that config.status was made for. | |
17975 | config_files="$ac_config_files" | |
17976 | config_headers="$ac_config_headers" | |
17977 | config_commands="$ac_config_commands" | |
17978 | ||
17979 | _ACEOF | |
17980 | ||
17981 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
17982 | ac_cs_usage="\ | |
17983 | \`$as_me' instantiates files and other configuration actions | |
17984 | from templates according to the current configuration. Unless the files | |
17985 | and actions are specified as TAGs, all are instantiated by default. | |
17986 | ||
17987 | Usage: $0 [OPTION]... [TAG]... | |
17988 | ||
17989 | -h, --help print this help, then exit | |
17990 | -V, --version print version number and configuration settings, then exit | |
17991 | --config print configuration, then exit | |
17992 | -q, --quiet, --silent | |
17993 | do not print progress messages | |
17994 | -d, --debug don't remove temporary files | |
17995 | --recheck update $as_me by reconfiguring in the same conditions | |
17996 | --file=FILE[:TEMPLATE] | |
17997 | instantiate the configuration file FILE | |
17998 | --header=FILE[:TEMPLATE] | |
17999 | instantiate the configuration header FILE | |
18000 | ||
18001 | Configuration files: | |
18002 | $config_files | |
18003 | ||
18004 | Configuration headers: | |
18005 | $config_headers | |
18006 | ||
18007 | Configuration commands: | |
18008 | $config_commands | |
18009 | ||
18010 | Report bugs to the package provider." | |
18011 | ||
18012 | _ACEOF | |
18013 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
18014 | ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" | |
18015 | ac_cs_version="\\ | |
18016 | emacs config.status 24.0.50 | |
9ba41eb9 | 18017 | configured by $0, generated by GNU Autoconf 2.67, |
067d23c9 KY |
18018 | with options \\"\$ac_cs_config\\" |
18019 | ||
2018939f | 18020 | Copyright (C) 2010 Free Software Foundation, Inc. |
067d23c9 KY |
18021 | This config.status script is free software; the Free Software Foundation |
18022 | gives unlimited permission to copy, distribute and modify it." | |
18023 | ||
18024 | ac_pwd='$ac_pwd' | |
18025 | srcdir='$srcdir' | |
18026 | INSTALL='$INSTALL' | |
743c80a7 PE |
18027 | MKDIR_P='$MKDIR_P' |
18028 | AWK='$AWK' | |
067d23c9 KY |
18029 | test -n "\$AWK" || AWK=awk |
18030 | _ACEOF | |
18031 | ||
18032 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
18033 | # The default lists apply if the user does not specify any file. | |
18034 | ac_need_defaults=: | |
18035 | while test $# != 0 | |
18036 | do | |
18037 | case $1 in | |
2018939f | 18038 | --*=?*) |
067d23c9 KY |
18039 | ac_option=`expr "X$1" : 'X\([^=]*\)='` |
18040 | ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` | |
18041 | ac_shift=: | |
18042 | ;; | |
2018939f AS |
18043 | --*=) |
18044 | ac_option=`expr "X$1" : 'X\([^=]*\)='` | |
18045 | ac_optarg= | |
18046 | ac_shift=: | |
18047 | ;; | |
067d23c9 KY |
18048 | *) |
18049 | ac_option=$1 | |
18050 | ac_optarg=$2 | |
18051 | ac_shift=shift | |
18052 | ;; | |
18053 | esac | |
18054 | ||
18055 | case $ac_option in | |
18056 | # Handling of the options. | |
18057 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) | |
18058 | ac_cs_recheck=: ;; | |
18059 | --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) | |
18060 | $as_echo "$ac_cs_version"; exit ;; | |
18061 | --config | --confi | --conf | --con | --co | --c ) | |
18062 | $as_echo "$ac_cs_config"; exit ;; | |
18063 | --debug | --debu | --deb | --de | --d | -d ) | |
18064 | debug=: ;; | |
18065 | --file | --fil | --fi | --f ) | |
18066 | $ac_shift | |
18067 | case $ac_optarg in | |
18068 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
2018939f | 18069 | '') as_fn_error $? "missing file argument" ;; |
067d23c9 KY |
18070 | esac |
18071 | as_fn_append CONFIG_FILES " '$ac_optarg'" | |
18072 | ac_need_defaults=false;; | |
18073 | --header | --heade | --head | --hea ) | |
18074 | $ac_shift | |
18075 | case $ac_optarg in | |
18076 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
18077 | esac | |
18078 | as_fn_append CONFIG_HEADERS " '$ac_optarg'" | |
18079 | ac_need_defaults=false;; | |
18080 | --he | --h) | |
18081 | # Conflict between --help and --header | |
2018939f | 18082 | as_fn_error $? "ambiguous option: \`$1' |
067d23c9 KY |
18083 | Try \`$0 --help' for more information.";; |
18084 | --help | --hel | -h ) | |
18085 | $as_echo "$ac_cs_usage"; exit ;; | |
18086 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
18087 | | -silent | --silent | --silen | --sile | --sil | --si | --s) | |
18088 | ac_cs_silent=: ;; | |
18089 | ||
18090 | # This is an error. | |
2018939f | 18091 | -*) as_fn_error $? "unrecognized option: \`$1' |
067d23c9 KY |
18092 | Try \`$0 --help' for more information." ;; |
18093 | ||
18094 | *) as_fn_append ac_config_targets " $1" | |
18095 | ac_need_defaults=false ;; | |
18096 | ||
18097 | esac | |
18098 | shift | |
18099 | done | |
18100 | ||
18101 | ac_configure_extra_args= | |
18102 | ||
18103 | if $ac_cs_silent; then | |
18104 | exec 6>/dev/null | |
18105 | ac_configure_extra_args="$ac_configure_extra_args --silent" | |
18106 | fi | |
18107 | ||
18108 | _ACEOF | |
18109 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
18110 | if \$ac_cs_recheck; then | |
18111 | set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion | |
18112 | shift | |
18113 | \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 | |
18114 | CONFIG_SHELL='$SHELL' | |
18115 | export CONFIG_SHELL | |
18116 | exec "\$@" | |
18117 | fi | |
18118 | ||
18119 | _ACEOF | |
18120 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
18121 | exec 5>>config.log | |
18122 | { | |
18123 | echo | |
18124 | sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX | |
18125 | ## Running $as_me. ## | |
18126 | _ASBOX | |
18127 | $as_echo "$ac_log" | |
18128 | } >&5 | |
18129 | ||
18130 | _ACEOF | |
18131 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
18132 | # | |
18133 | # INIT-COMMANDS | |
18134 | # | |
743c80a7 | 18135 | AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" |
067d23c9 KY |
18136 | GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPPFLAGS="$CPPFLAGS" |
18137 | ||
18138 | _ACEOF | |
18139 | ||
18140 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
18141 | ||
18142 | # Handling of arguments. | |
18143 | for ac_config_target in $ac_config_targets | |
18144 | do | |
18145 | case $ac_config_target in | |
18146 | "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:src/config.in" ;; | |
743c80a7 | 18147 | "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; |
067d23c9 | 18148 | "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; |
743c80a7 | 18149 | "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;; |
067d23c9 KY |
18150 | "lib-src/Makefile") CONFIG_FILES="$CONFIG_FILES lib-src/Makefile" ;; |
18151 | "oldXMenu/Makefile") CONFIG_FILES="$CONFIG_FILES oldXMenu/Makefile" ;; | |
18152 | "doc/emacs/Makefile") CONFIG_FILES="$CONFIG_FILES doc/emacs/Makefile" ;; | |
18153 | "doc/misc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/misc/Makefile" ;; | |
18154 | "doc/lispintro/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispintro/Makefile" ;; | |
18155 | "doc/lispref/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispref/Makefile" ;; | |
18156 | "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; | |
18157 | "lwlib/Makefile") CONFIG_FILES="$CONFIG_FILES lwlib/Makefile" ;; | |
18158 | "lisp/Makefile") CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;; | |
18159 | "leim/Makefile") CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;; | |
ea062854 | 18160 | "test/automated/Makefile") CONFIG_FILES="$CONFIG_FILES test/automated/Makefile" ;; |
067d23c9 KY |
18161 | "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; |
18162 | ||
9ba41eb9 | 18163 | *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;; |
067d23c9 KY |
18164 | esac |
18165 | done | |
18166 | ||
18167 | ||
18168 | # If the user did not use the arguments to specify the items to instantiate, | |
18169 | # then the envvar interface is used. Set only those that are not. | |
18170 | # We use the long form for the default assignment because of an extremely | |
18171 | # bizarre bug on SunOS 4.1.3. | |
18172 | if $ac_need_defaults; then | |
18173 | test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files | |
18174 | test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers | |
18175 | test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands | |
18176 | fi | |
18177 | ||
18178 | # Have a temporary directory for convenience. Make it in the build tree | |
18179 | # simply because there is no reason against having it here, and in addition, | |
18180 | # creating and moving files from /tmp can sometimes cause problems. | |
18181 | # Hook for its removal unless debugging. | |
18182 | # Note that there is a small window in which the directory will not be cleaned: | |
18183 | # after its creation but before its name has been assigned to `$tmp'. | |
18184 | $debug || | |
18185 | { | |
9ba41eb9 | 18186 | tmp= |
067d23c9 | 18187 | trap 'exit_status=$? |
9ba41eb9 | 18188 | { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status |
067d23c9 KY |
18189 | ' 0 |
18190 | trap 'as_fn_exit 1' 1 2 13 15 | |
18191 | } | |
18192 | # Create a (secure) tmp directory for tmp files. | |
18193 | ||
18194 | { | |
18195 | tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && | |
9ba41eb9 | 18196 | test -n "$tmp" && test -d "$tmp" |
067d23c9 KY |
18197 | } || |
18198 | { | |
18199 | tmp=./conf$$-$RANDOM | |
18200 | (umask 077 && mkdir "$tmp") | |
2018939f | 18201 | } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 |
067d23c9 KY |
18202 | |
18203 | # Set up the scripts for CONFIG_FILES section. | |
18204 | # No need to generate them if there are no CONFIG_FILES. | |
18205 | # This happens for instance with `./config.status config.h'. | |
18206 | if test -n "$CONFIG_FILES"; then | |
18207 | ||
18208 | if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then | |
18209 | ac_cs_awk_getline=: | |
18210 | ac_cs_awk_pipe_init= | |
18211 | ac_cs_awk_read_file=' | |
18212 | while ((getline aline < (F[key])) > 0) | |
18213 | print(aline) | |
18214 | close(F[key])' | |
18215 | ac_cs_awk_pipe_fini= | |
18216 | else | |
18217 | ac_cs_awk_getline=false | |
18218 | ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\"" | |
18219 | ac_cs_awk_read_file=' | |
18220 | print "|#_!!_#|" | |
18221 | print "cat " F[key] " &&" | |
18222 | '$ac_cs_awk_pipe_init | |
18223 | # The final `:' finishes the AND list. | |
18224 | ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }' | |
18225 | fi | |
18226 | ac_cr=`echo X | tr X '\015'` | |
18227 | # On cygwin, bash can eat \r inside `` if the user requested igncr. | |
18228 | # But we know of no other shell where ac_cr would be empty at this | |
18229 | # point, so we can use a bashism as a fallback. | |
18230 | if test "x$ac_cr" = x; then | |
18231 | eval ac_cr=\$\'\\r\' | |
18232 | fi | |
18233 | ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` | |
18234 | if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then | |
2018939f | 18235 | ac_cs_awk_cr='\\r' |
067d23c9 KY |
18236 | else |
18237 | ac_cs_awk_cr=$ac_cr | |
18238 | fi | |
18239 | ||
9ba41eb9 | 18240 | echo 'BEGIN {' >"$tmp/subs1.awk" && |
067d23c9 KY |
18241 | _ACEOF |
18242 | ||
18243 | # Create commands to substitute file output variables. | |
18244 | { | |
18245 | echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" && | |
9ba41eb9 | 18246 | echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' && |
067d23c9 KY |
18247 | echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' && |
18248 | echo "_ACAWK" && | |
18249 | echo "_ACEOF" | |
18250 | } >conf$$files.sh && | |
18251 | . ./conf$$files.sh || | |
2018939f | 18252 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 |
067d23c9 KY |
18253 | rm -f conf$$files.sh |
18254 | ||
18255 | { | |
18256 | echo "cat >conf$$subs.awk <<_ACEOF" && | |
18257 | echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && | |
18258 | echo "_ACEOF" | |
18259 | } >conf$$subs.sh || | |
2018939f AS |
18260 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 |
18261 | ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` | |
067d23c9 KY |
18262 | ac_delim='%!_!# ' |
18263 | for ac_last_try in false false false false false :; do | |
18264 | . ./conf$$subs.sh || | |
2018939f | 18265 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 |
067d23c9 KY |
18266 | |
18267 | ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` | |
18268 | if test $ac_delim_n = $ac_delim_num; then | |
18269 | break | |
18270 | elif $ac_last_try; then | |
2018939f | 18271 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 |
067d23c9 KY |
18272 | else |
18273 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
18274 | fi | |
18275 | done | |
18276 | rm -f conf$$subs.sh | |
18277 | ||
18278 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
9ba41eb9 | 18279 | cat >>"\$tmp/subs1.awk" <<\\_ACAWK && |
067d23c9 KY |
18280 | _ACEOF |
18281 | sed -n ' | |
18282 | h | |
18283 | s/^/S["/; s/!.*/"]=/ | |
18284 | p | |
18285 | g | |
18286 | s/^[^!]*!// | |
18287 | :repl | |
18288 | t repl | |
18289 | s/'"$ac_delim"'$// | |
18290 | t delim | |
18291 | :nl | |
18292 | h | |
18293 | s/\(.\{148\}\)..*/\1/ | |
18294 | t more1 | |
18295 | s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ | |
18296 | p | |
18297 | n | |
18298 | b repl | |
18299 | :more1 | |
18300 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
18301 | p | |
18302 | g | |
18303 | s/.\{148\}// | |
18304 | t nl | |
18305 | :delim | |
18306 | h | |
18307 | s/\(.\{148\}\)..*/\1/ | |
18308 | t more2 | |
18309 | s/["\\]/\\&/g; s/^/"/; s/$/"/ | |
18310 | p | |
18311 | b | |
18312 | :more2 | |
18313 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
18314 | p | |
18315 | g | |
18316 | s/.\{148\}// | |
18317 | t delim | |
18318 | ' <conf$$subs.awk | sed ' | |
18319 | /^[^""]/{ | |
18320 | N | |
18321 | s/\n// | |
18322 | } | |
18323 | ' >>$CONFIG_STATUS || ac_write_fail=1 | |
18324 | rm -f conf$$subs.awk | |
18325 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
18326 | _ACAWK | |
9ba41eb9 | 18327 | cat >>"\$tmp/subs1.awk" <<_ACAWK && |
067d23c9 KY |
18328 | for (key in S) S_is_set[key] = 1 |
18329 | FS = "\a" | |
18330 | \$ac_cs_awk_pipe_init | |
18331 | } | |
18332 | { | |
18333 | line = $ 0 | |
18334 | nfields = split(line, field, "@") | |
18335 | substed = 0 | |
18336 | len = length(field[1]) | |
18337 | for (i = 2; i < nfields; i++) { | |
18338 | key = field[i] | |
18339 | keylen = length(key) | |
18340 | if (S_is_set[key]) { | |
18341 | value = S[key] | |
18342 | line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) | |
18343 | len += length(value) + length(field[++i]) | |
18344 | substed = 1 | |
18345 | } else | |
18346 | len += 1 + keylen | |
18347 | } | |
18348 | if (nfields == 3 && !substed) { | |
18349 | key = field[2] | |
18350 | if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) { | |
18351 | \$ac_cs_awk_read_file | |
18352 | next | |
18353 | } | |
18354 | } | |
18355 | print line | |
18356 | } | |
18357 | \$ac_cs_awk_pipe_fini | |
18358 | _ACAWK | |
18359 | _ACEOF | |
18360 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
18361 | if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then | |
18362 | sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" | |
18363 | else | |
18364 | cat | |
9ba41eb9 | 18365 | fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ |
2018939f | 18366 | || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 |
067d23c9 KY |
18367 | _ACEOF |
18368 | ||
2018939f AS |
18369 | # VPATH may cause trouble with some makes, so we remove sole $(srcdir), |
18370 | # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and | |
067d23c9 KY |
18371 | # trailing colons and then remove the whole line if VPATH becomes empty |
18372 | # (actually we leave an empty line to preserve line numbers). | |
18373 | if test "x$srcdir" = x.; then | |
2018939f AS |
18374 | ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ |
18375 | h | |
18376 | s/// | |
18377 | s/^/:/ | |
18378 | s/[ ]*$/:/ | |
18379 | s/:\$(srcdir):/:/g | |
18380 | s/:\${srcdir}:/:/g | |
18381 | s/:@srcdir@:/:/g | |
18382 | s/^:*// | |
067d23c9 | 18383 | s/:*$// |
2018939f AS |
18384 | x |
18385 | s/\(=[ ]*\).*/\1/ | |
18386 | G | |
18387 | s/\n// | |
067d23c9 KY |
18388 | s/^[^=]*=[ ]*$// |
18389 | }' | |
18390 | fi | |
18391 | ||
18392 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
18393 | fi # test -n "$CONFIG_FILES" | |
18394 | ||
18395 | # Set up the scripts for CONFIG_HEADERS section. | |
18396 | # No need to generate them if there are no CONFIG_HEADERS. | |
18397 | # This happens for instance with `./config.status Makefile'. | |
18398 | if test -n "$CONFIG_HEADERS"; then | |
9ba41eb9 | 18399 | cat >"$tmp/defines.awk" <<\_ACAWK || |
067d23c9 KY |
18400 | BEGIN { |
18401 | _ACEOF | |
18402 | ||
18403 | # Transform confdefs.h into an awk script `defines.awk', embedded as | |
18404 | # here-document in config.status, that substitutes the proper values into | |
18405 | # config.h.in to produce config.h. | |
18406 | ||
18407 | # Create a delimiter string that does not exist in confdefs.h, to ease | |
18408 | # handling of long lines. | |
18409 | ac_delim='%!_!# ' | |
18410 | for ac_last_try in false false :; do | |
9ba41eb9 MB |
18411 | ac_t=`sed -n "/$ac_delim/p" confdefs.h` |
18412 | if test -z "$ac_t"; then | |
067d23c9 KY |
18413 | break |
18414 | elif $ac_last_try; then | |
2018939f | 18415 | as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 |
067d23c9 KY |
18416 | else |
18417 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
18418 | fi | |
18419 | done | |
18420 | ||
18421 | # For the awk script, D is an array of macro values keyed by name, | |
18422 | # likewise P contains macro parameters if any. Preserve backslash | |
18423 | # newline sequences. | |
18424 | ||
18425 | ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* | |
18426 | sed -n ' | |
18427 | s/.\{148\}/&'"$ac_delim"'/g | |
18428 | t rset | |
18429 | :rset | |
18430 | s/^[ ]*#[ ]*define[ ][ ]*/ / | |
18431 | t def | |
18432 | d | |
18433 | :def | |
18434 | s/\\$// | |
18435 | t bsnl | |
18436 | s/["\\]/\\&/g | |
18437 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
18438 | D["\1"]=" \3"/p | |
18439 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p | |
18440 | d | |
18441 | :bsnl | |
18442 | s/["\\]/\\&/g | |
18443 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
18444 | D["\1"]=" \3\\\\\\n"\\/p | |
18445 | t cont | |
18446 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p | |
18447 | t cont | |
18448 | d | |
18449 | :cont | |
18450 | n | |
18451 | s/.\{148\}/&'"$ac_delim"'/g | |
18452 | t clear | |
18453 | :clear | |
18454 | s/\\$// | |
18455 | t bsnlc | |
18456 | s/["\\]/\\&/g; s/^/"/; s/$/"/p | |
18457 | d | |
18458 | :bsnlc | |
18459 | s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p | |
18460 | b cont | |
18461 | ' <confdefs.h | sed ' | |
18462 | s/'"$ac_delim"'/"\\\ | |
18463 | "/g' >>$CONFIG_STATUS || ac_write_fail=1 | |
18464 | ||
18465 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
18466 | for (key in D) D_is_set[key] = 1 | |
18467 | FS = "\a" | |
18468 | } | |
18469 | /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { | |
18470 | line = \$ 0 | |
18471 | split(line, arg, " ") | |
18472 | if (arg[1] == "#") { | |
18473 | defundef = arg[2] | |
18474 | mac1 = arg[3] | |
18475 | } else { | |
18476 | defundef = substr(arg[1], 2) | |
18477 | mac1 = arg[2] | |
18478 | } | |
18479 | split(mac1, mac2, "(") #) | |
18480 | macro = mac2[1] | |
18481 | prefix = substr(line, 1, index(line, defundef) - 1) | |
18482 | if (D_is_set[macro]) { | |
18483 | # Preserve the white space surrounding the "#". | |
18484 | print prefix "define", macro P[macro] D[macro] | |
18485 | next | |
18486 | } else { | |
18487 | # Replace #undef with comments. This is necessary, for example, | |
18488 | # in the case of _POSIX_SOURCE, which is predefined and required | |
18489 | # on some systems where configure will not decide to define it. | |
18490 | if (defundef == "undef") { | |
18491 | print "/*", prefix defundef, macro, "*/" | |
18492 | next | |
18493 | } | |
18494 | } | |
18495 | } | |
18496 | { print } | |
18497 | _ACAWK | |
18498 | _ACEOF | |
18499 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
2018939f | 18500 | as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 |
067d23c9 KY |
18501 | fi # test -n "$CONFIG_HEADERS" |
18502 | ||
18503 | ||
18504 | eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" | |
18505 | shift | |
18506 | for ac_tag | |
18507 | do | |
18508 | case $ac_tag in | |
18509 | :[FHLC]) ac_mode=$ac_tag; continue;; | |
18510 | esac | |
18511 | case $ac_mode$ac_tag in | |
18512 | :[FHL]*:*);; | |
9ba41eb9 | 18513 | :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;; |
067d23c9 KY |
18514 | :[FH]-) ac_tag=-:-;; |
18515 | :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; | |
18516 | esac | |
18517 | ac_save_IFS=$IFS | |
18518 | IFS=: | |
18519 | set x $ac_tag | |
18520 | IFS=$ac_save_IFS | |
18521 | shift | |
18522 | ac_file=$1 | |
18523 | shift | |
18524 | ||
18525 | case $ac_mode in | |
18526 | :L) ac_source=$1;; | |
18527 | :[FH]) | |
18528 | ac_file_inputs= | |
18529 | for ac_f | |
18530 | do | |
18531 | case $ac_f in | |
9ba41eb9 | 18532 | -) ac_f="$tmp/stdin";; |
067d23c9 KY |
18533 | *) # Look for the file first in the build tree, then in the source tree |
18534 | # (if the path is not absolute). The absolute path cannot be DOS-style, | |
18535 | # because $ac_f cannot contain `:'. | |
18536 | test -f "$ac_f" || | |
18537 | case $ac_f in | |
18538 | [\\/$]*) false;; | |
18539 | *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; | |
18540 | esac || | |
9ba41eb9 | 18541 | as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;; |
067d23c9 KY |
18542 | esac |
18543 | case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac | |
18544 | as_fn_append ac_file_inputs " '$ac_f'" | |
18545 | done | |
18546 | ||
18547 | # Let's still pretend it is `configure' which instantiates (i.e., don't | |
18548 | # use $as_me), people would be surprised to read: | |
18549 | # /* config.h. Generated by config.status. */ | |
18550 | configure_input='Generated from '` | |
18551 | $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' | |
18552 | `' by configure.' | |
18553 | if test x"$ac_file" != x-; then | |
18554 | configure_input="$ac_file. $configure_input" | |
18555 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 | |
18556 | $as_echo "$as_me: creating $ac_file" >&6;} | |
18557 | fi | |
18558 | # Neutralize special characters interpreted by sed in replacement strings. | |
18559 | case $configure_input in #( | |
18560 | *\&* | *\|* | *\\* ) | |
18561 | ac_sed_conf_input=`$as_echo "$configure_input" | | |
18562 | sed 's/[\\\\&|]/\\\\&/g'`;; #( | |
18563 | *) ac_sed_conf_input=$configure_input;; | |
18564 | esac | |
18565 | ||
18566 | case $ac_tag in | |
9ba41eb9 MB |
18567 | *:-:* | *:-) cat >"$tmp/stdin" \ |
18568 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; | |
067d23c9 KY |
18569 | esac |
18570 | ;; | |
18571 | esac | |
18572 | ||
18573 | ac_dir=`$as_dirname -- "$ac_file" || | |
18574 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
18575 | X"$ac_file" : 'X\(//\)[^/]' \| \ | |
18576 | X"$ac_file" : 'X\(//\)$' \| \ | |
18577 | X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || | |
18578 | $as_echo X"$ac_file" | | |
18579 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
18580 | s//\1/ | |
18581 | q | |
18582 | } | |
18583 | /^X\(\/\/\)[^/].*/{ | |
18584 | s//\1/ | |
18585 | q | |
18586 | } | |
18587 | /^X\(\/\/\)$/{ | |
18588 | s//\1/ | |
18589 | q | |
18590 | } | |
18591 | /^X\(\/\).*/{ | |
18592 | s//\1/ | |
18593 | q | |
18594 | } | |
18595 | s/.*/./; q'` | |
18596 | as_dir="$ac_dir"; as_fn_mkdir_p | |
18597 | ac_builddir=. | |
18598 | ||
18599 | case "$ac_dir" in | |
18600 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
18601 | *) | |
18602 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
18603 | # A ".." for each directory in $ac_dir_suffix. | |
18604 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
18605 | case $ac_top_builddir_sub in | |
18606 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
18607 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
18608 | esac ;; | |
18609 | esac | |
18610 | ac_abs_top_builddir=$ac_pwd | |
18611 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
18612 | # for backward compatibility: | |
18613 | ac_top_builddir=$ac_top_build_prefix | |
18614 | ||
18615 | case $srcdir in | |
18616 | .) # We are building in place. | |
18617 | ac_srcdir=. | |
18618 | ac_top_srcdir=$ac_top_builddir_sub | |
18619 | ac_abs_top_srcdir=$ac_pwd ;; | |
18620 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
18621 | ac_srcdir=$srcdir$ac_dir_suffix; | |
18622 | ac_top_srcdir=$srcdir | |
18623 | ac_abs_top_srcdir=$srcdir ;; | |
18624 | *) # Relative name. | |
18625 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
18626 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
18627 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
18628 | esac | |
18629 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix | |
18630 | ||
18631 | ||
18632 | case $ac_mode in | |
18633 | :F) | |
18634 | # | |
18635 | # CONFIG_FILE | |
18636 | # | |
18637 | ||
18638 | case $INSTALL in | |
18639 | [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; | |
18640 | *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; | |
18641 | esac | |
743c80a7 PE |
18642 | ac_MKDIR_P=$MKDIR_P |
18643 | case $MKDIR_P in | |
18644 | [\\/$]* | ?:[\\/]* ) ;; | |
18645 | */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; | |
18646 | esac | |
067d23c9 KY |
18647 | _ACEOF |
18648 | ||
18649 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
18650 | # If the template does not know about datarootdir, expand it. | |
18651 | # FIXME: This hack should be removed a few years after 2.60. | |
18652 | ac_datarootdir_hack=; ac_datarootdir_seen= | |
18653 | ac_sed_dataroot=' | |
18654 | /datarootdir/ { | |
18655 | p | |
18656 | q | |
18657 | } | |
18658 | /@datadir@/p | |
18659 | /@docdir@/p | |
18660 | /@infodir@/p | |
18661 | /@localedir@/p | |
18662 | /@mandir@/p' | |
18663 | case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in | |
18664 | *datarootdir*) ac_datarootdir_seen=yes;; | |
18665 | *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) | |
18666 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 | |
18667 | $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} | |
18668 | _ACEOF | |
18669 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
18670 | ac_datarootdir_hack=' | |
18671 | s&@datadir@&$datadir&g | |
18672 | s&@docdir@&$docdir&g | |
18673 | s&@infodir@&$infodir&g | |
18674 | s&@localedir@&$localedir&g | |
18675 | s&@mandir@&$mandir&g | |
18676 | s&\\\${datarootdir}&$datarootdir&g' ;; | |
18677 | esac | |
18678 | _ACEOF | |
18679 | ||
18680 | # Neutralize VPATH when `$srcdir' = `.'. | |
18681 | # Shell code in configure.ac might set extrasub. | |
18682 | # FIXME: do we really want to maintain this feature? | |
18683 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
18684 | ac_sed_extra="$ac_vpsub | |
18685 | $extrasub | |
18686 | _ACEOF | |
18687 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
18688 | :t | |
18689 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b | |
18690 | s|@configure_input@|$ac_sed_conf_input|;t t | |
18691 | s&@top_builddir@&$ac_top_builddir_sub&;t t | |
18692 | s&@top_build_prefix@&$ac_top_build_prefix&;t t | |
18693 | s&@srcdir@&$ac_srcdir&;t t | |
18694 | s&@abs_srcdir@&$ac_abs_srcdir&;t t | |
18695 | s&@top_srcdir@&$ac_top_srcdir&;t t | |
18696 | s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t | |
18697 | s&@builddir@&$ac_builddir&;t t | |
18698 | s&@abs_builddir@&$ac_abs_builddir&;t t | |
18699 | s&@abs_top_builddir@&$ac_abs_top_builddir&;t t | |
18700 | s&@INSTALL@&$ac_INSTALL&;t t | |
743c80a7 | 18701 | s&@MKDIR_P@&$ac_MKDIR_P&;t t |
067d23c9 KY |
18702 | $ac_datarootdir_hack |
18703 | " | |
18704 | eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | | |
18705 | if $ac_cs_awk_getline; then | |
9ba41eb9 | 18706 | $AWK -f "$tmp/subs.awk" |
067d23c9 | 18707 | else |
9ba41eb9 MB |
18708 | $AWK -f "$tmp/subs.awk" | $SHELL |
18709 | fi >$tmp/out \ | |
18710 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 | |
067d23c9 KY |
18711 | |
18712 | test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && | |
9ba41eb9 MB |
18713 | { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && |
18714 | { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && | |
067d23c9 | 18715 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' |
2018939f | 18716 | which seems to be undefined. Please make sure it is defined" >&5 |
067d23c9 | 18717 | $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' |
2018939f | 18718 | which seems to be undefined. Please make sure it is defined" >&2;} |
067d23c9 | 18719 | |
9ba41eb9 | 18720 | rm -f "$tmp/stdin" |
067d23c9 | 18721 | case $ac_file in |
9ba41eb9 MB |
18722 | -) cat "$tmp/out" && rm -f "$tmp/out";; |
18723 | *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; | |
067d23c9 | 18724 | esac \ |
2018939f | 18725 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 |
067d23c9 KY |
18726 | ;; |
18727 | :H) | |
18728 | # | |
18729 | # CONFIG_HEADER | |
18730 | # | |
18731 | if test x"$ac_file" != x-; then | |
18732 | { | |
18733 | $as_echo "/* $configure_input */" \ | |
9ba41eb9 MB |
18734 | && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" |
18735 | } >"$tmp/config.h" \ | |
2018939f | 18736 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 |
9ba41eb9 | 18737 | if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then |
067d23c9 KY |
18738 | { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 |
18739 | $as_echo "$as_me: $ac_file is unchanged" >&6;} | |
18740 | else | |
18741 | rm -f "$ac_file" | |
9ba41eb9 | 18742 | mv "$tmp/config.h" "$ac_file" \ |
2018939f | 18743 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 |
067d23c9 KY |
18744 | fi |
18745 | else | |
18746 | $as_echo "/* $configure_input */" \ | |
9ba41eb9 | 18747 | && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ |
2018939f | 18748 | || as_fn_error $? "could not create -" "$LINENO" 5 |
067d23c9 | 18749 | fi |
743c80a7 PE |
18750 | # Compute "$ac_file"'s index in $config_headers. |
18751 | _am_arg="$ac_file" | |
18752 | _am_stamp_count=1 | |
18753 | for _am_header in $config_headers :; do | |
18754 | case $_am_header in | |
18755 | $_am_arg | $_am_arg:* ) | |
18756 | break ;; | |
18757 | * ) | |
18758 | _am_stamp_count=`expr $_am_stamp_count + 1` ;; | |
18759 | esac | |
18760 | done | |
18761 | echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || | |
18762 | $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
18763 | X"$_am_arg" : 'X\(//\)[^/]' \| \ | |
18764 | X"$_am_arg" : 'X\(//\)$' \| \ | |
18765 | X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || | |
18766 | $as_echo X"$_am_arg" | | |
18767 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
18768 | s//\1/ | |
18769 | q | |
18770 | } | |
18771 | /^X\(\/\/\)[^/].*/{ | |
18772 | s//\1/ | |
18773 | q | |
18774 | } | |
18775 | /^X\(\/\/\)$/{ | |
18776 | s//\1/ | |
18777 | q | |
18778 | } | |
18779 | /^X\(\/\).*/{ | |
18780 | s//\1/ | |
18781 | q | |
18782 | } | |
18783 | s/.*/./; q'`/stamp-h$_am_stamp_count | |
067d23c9 KY |
18784 | ;; |
18785 | ||
18786 | :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 | |
18787 | $as_echo "$as_me: executing $ac_file commands" >&6;} | |
18788 | ;; | |
18789 | esac | |
18790 | ||
18791 | ||
18792 | case $ac_file$ac_mode in | |
743c80a7 PE |
18793 | "depfiles":C) test x"$AMDEP_TRUE" != x"" || { |
18794 | # Autoconf 2.62 quotes --file arguments for eval, but not when files | |
18795 | # are listed without --file. Let's play safe and only enable the eval | |
18796 | # if we detect the quoting. | |
18797 | case $CONFIG_FILES in | |
18798 | *\'*) eval set x "$CONFIG_FILES" ;; | |
18799 | *) set x $CONFIG_FILES ;; | |
18800 | esac | |
18801 | shift | |
18802 | for mf | |
18803 | do | |
18804 | # Strip MF so we end up with the name of the file. | |
18805 | mf=`echo "$mf" | sed -e 's/:.*$//'` | |
18806 | # Check whether this is an Automake generated Makefile or not. | |
18807 | # We used to match only the files named `Makefile.in', but | |
18808 | # some people rename them; so instead we look at the file content. | |
18809 | # Grep'ing the first line is not enough: some people post-process | |
18810 | # each Makefile.in and add a new line on top of each file to say so. | |
18811 | # Grep'ing the whole file is not good either: AIX grep has a line | |
18812 | # limit of 2048, but all sed's we know have understand at least 4000. | |
18813 | if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then | |
18814 | dirpart=`$as_dirname -- "$mf" || | |
18815 | $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
18816 | X"$mf" : 'X\(//\)[^/]' \| \ | |
18817 | X"$mf" : 'X\(//\)$' \| \ | |
18818 | X"$mf" : 'X\(/\)' \| . 2>/dev/null || | |
18819 | $as_echo X"$mf" | | |
18820 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
18821 | s//\1/ | |
18822 | q | |
18823 | } | |
18824 | /^X\(\/\/\)[^/].*/{ | |
18825 | s//\1/ | |
18826 | q | |
18827 | } | |
18828 | /^X\(\/\/\)$/{ | |
18829 | s//\1/ | |
18830 | q | |
18831 | } | |
18832 | /^X\(\/\).*/{ | |
18833 | s//\1/ | |
18834 | q | |
18835 | } | |
18836 | s/.*/./; q'` | |
18837 | else | |
18838 | continue | |
18839 | fi | |
18840 | # Extract the definition of DEPDIR, am__include, and am__quote | |
18841 | # from the Makefile without running `make'. | |
18842 | DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` | |
18843 | test -z "$DEPDIR" && continue | |
18844 | am__include=`sed -n 's/^am__include = //p' < "$mf"` | |
18845 | test -z "am__include" && continue | |
18846 | am__quote=`sed -n 's/^am__quote = //p' < "$mf"` | |
18847 | # When using ansi2knr, U may be empty or an underscore; expand it | |
18848 | U=`sed -n 's/^U = //p' < "$mf"` | |
18849 | # Find all dependency output files, they are included files with | |
18850 | # $(DEPDIR) in their names. We invoke sed twice because it is the | |
18851 | # simplest approach to changing $(DEPDIR) to its actual value in the | |
18852 | # expansion. | |
18853 | for file in `sed -n " | |
18854 | s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ | |
18855 | sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do | |
18856 | # Make sure the directory exists. | |
18857 | test -f "$dirpart/$file" && continue | |
18858 | fdir=`$as_dirname -- "$file" || | |
18859 | $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
18860 | X"$file" : 'X\(//\)[^/]' \| \ | |
18861 | X"$file" : 'X\(//\)$' \| \ | |
18862 | X"$file" : 'X\(/\)' \| . 2>/dev/null || | |
18863 | $as_echo X"$file" | | |
18864 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
18865 | s//\1/ | |
18866 | q | |
18867 | } | |
18868 | /^X\(\/\/\)[^/].*/{ | |
18869 | s//\1/ | |
18870 | q | |
18871 | } | |
18872 | /^X\(\/\/\)$/{ | |
18873 | s//\1/ | |
18874 | q | |
18875 | } | |
18876 | /^X\(\/\).*/{ | |
18877 | s//\1/ | |
18878 | q | |
18879 | } | |
18880 | s/.*/./; q'` | |
18881 | as_dir=$dirpart/$fdir; as_fn_mkdir_p | |
18882 | # echo "creating $dirpart/$file" | |
18883 | echo '# dummy' > "$dirpart/$file" | |
18884 | done | |
18885 | done | |
18886 | } | |
18887 | ;; | |
067d23c9 KY |
18888 | "default":C) |
18889 | ||
18890 | ### Make the necessary directories, if they don't exist. | |
18891 | for dir in etc lisp ; do | |
18892 | test -d ${dir} || mkdir ${dir} | |
18893 | done | |
18894 | ||
18895 | echo creating src/epaths.h | |
18896 | ${MAKE-make} epaths-force | |
18897 | ||
18898 | if test ! -f src/.gdbinit && test -f $srcdir/src/.gdbinit; then | |
18899 | echo creating src/.gdbinit | |
18900 | echo source $srcdir/src/.gdbinit > src/.gdbinit | |
18901 | fi | |
18902 | ||
18903 | ;; | |
18904 | ||
18905 | esac | |
18906 | done # for ac_tag | |
18907 | ||
18908 | ||
18909 | as_fn_exit 0 | |
18910 | _ACEOF | |
18911 | ac_clean_files=$ac_clean_files_save | |
18912 | ||
18913 | test $ac_write_fail = 0 || | |
2018939f | 18914 | as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 |
067d23c9 KY |
18915 | |
18916 | ||
18917 | # configure is writing to config.log, and then calls config.status. | |
18918 | # config.status does its own redirection, appending to config.log. | |
18919 | # Unfortunately, on DOS this fails, as config.log is still kept open | |
18920 | # by configure, so config.status won't be able to write to it; its | |
18921 | # output is simply discarded. So we exec the FD to /dev/null, | |
18922 | # effectively closing config.log, so it can be properly (re)opened and | |
18923 | # appended to by config.status. When coming back to configure, we | |
18924 | # need to make the FD available again. | |
18925 | if test "$no_create" != yes; then | |
18926 | ac_cs_success=: | |
18927 | ac_config_status_args= | |
18928 | test "$silent" = yes && | |
18929 | ac_config_status_args="$ac_config_status_args --quiet" | |
18930 | exec 5>/dev/null | |
18931 | $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false | |
18932 | exec 5>>config.log | |
18933 | # Use ||, not &&, to avoid exiting from the if with $? = 1, which | |
18934 | # would make configure fail if this is the last instruction. | |
2018939f | 18935 | $ac_cs_success || as_fn_exit 1 |
067d23c9 KY |
18936 | fi |
18937 | if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then | |
18938 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 | |
18939 | $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} | |
18940 | fi | |
18941 |