Commit | Line | Data |
---|---|---|
ba4481b5 | 1 | #! /bin/sh |
ba4481b5 | 2 | # Guess values for system-dependent variables and create Makefiles. |
3d608a86 | 3 | # Generated by GNU Autoconf 2.65 for emacs 24.0.50. |
eb697db5 | 4 | # |
ba4481b5 | 5 | # |
ca81d7a0 | 6 | # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, |
3d608a86 J |
7 | # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, |
8 | # Inc. | |
eb697db5 DN |
9 | # |
10 | # | |
ba4481b5 DL |
11 | # This configure script is free software; the Free Software Foundation |
12 | # gives unlimited permission to copy, distribute and modify it. | |
eb697db5 DN |
13 | ## -------------------- ## |
14 | ## M4sh Initialization. ## | |
15 | ## -------------------- ## | |
503d2be0 | 16 | |
f053c89f CY |
17 | # Be more Bourne compatible |
18 | DUALCASE=1; export DUALCASE # for MKS sh | |
eb697db5 | 19 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : |
503d2be0 AS |
20 | emulate sh |
21 | NULLCMD=: | |
e9a63f04 | 22 | # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which |
6bae0ccf DL |
23 | # is contrary to our usage. Disable this feature. |
24 | alias -g '${1+"$@"}'='"$@"' | |
ca81d7a0 JD |
25 | setopt NO_GLOB_SUBST |
26 | else | |
eb697db5 DN |
27 | case `(set -o) 2>/dev/null` in #( |
28 | *posix*) : | |
29 | set -o posix ;; #( | |
30 | *) : | |
31 | ;; | |
f053c89f | 32 | esac |
503d2be0 | 33 | fi |
f053c89f CY |
34 | |
35 | ||
e9a63f04 GM |
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 | |
eb697db5 DN |
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 | |
e9a63f04 GM |
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' | |
7bbec45b | 56 | else |
e9a63f04 GM |
57 | as_echo_body='eval expr "X$1" : "X\\(.*\\)"' |
58 | as_echo_n_body='eval | |
59 | arg=$1; | |
eb697db5 | 60 | case $arg in #( |
e9a63f04 GM |
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' | |
7bbec45b | 69 | fi |
e9a63f04 GM |
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 | } | |
503d2be0 AS |
81 | fi |
82 | ||
6bae0ccf | 83 | |
ca81d7a0 JD |
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.) | |
ca81d7a0 JD |
89 | IFS=" "" $as_nl" |
90 | ||
91 | # Find who we are. Look in the path if we contain no directory separator. | |
eb697db5 | 92 | case $0 in #(( |
ca81d7a0 JD |
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=. | |
eb697db5 DN |
99 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break |
100 | done | |
ca81d7a0 JD |
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 | |
e9a63f04 | 111 | $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 |
eb697db5 | 112 | exit 1 |
ca81d7a0 JD |
113 | fi |
114 | ||
eb697db5 DN |
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 || : | |
ca81d7a0 | 122 | done |
6bae0ccf DL |
123 | PS1='$ ' |
124 | PS2='> ' | |
125 | PS4='+ ' | |
126 | ||
127 | # NLS nuisances. | |
e9a63f04 GM |
128 | LC_ALL=C |
129 | export LC_ALL | |
130 | LANGUAGE=C | |
131 | export LANGUAGE | |
6bae0ccf | 132 | |
eb697db5 DN |
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 | |
221 | exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} | |
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" | |
3d608a86 | 319 | } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" |
eb697db5 DN |
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 | ||
3d608a86 J |
359 | # as_fn_error ERROR [LINENO LOG_FD] |
360 | # --------------------------------- | |
eb697db5 DN |
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 | |
3d608a86 | 363 | # script with status $?, using 1 if that was 0. |
eb697db5 DN |
364 | as_fn_error () |
365 | { | |
3d608a86 J |
366 | as_status=$?; test $as_status -eq 0 && as_status=1 |
367 | if test "$3"; then | |
368 | as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
369 | $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 | |
eb697db5 | 370 | fi |
3d608a86 | 371 | $as_echo "$as_me: error: $1" >&2 |
eb697db5 DN |
372 | as_fn_exit $as_status |
373 | } # as_fn_error | |
374 | ||
ca81d7a0 JD |
375 | if expr a : '\(a\)' >/dev/null 2>&1 && |
376 | test "X`expr 00001 : '.*\(...\)'`" = X001; then | |
6bae0ccf DL |
377 | as_expr=expr |
378 | else | |
379 | as_expr=false | |
380 | fi | |
381 | ||
ca81d7a0 | 382 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then |
6bae0ccf DL |
383 | as_basename=basename |
384 | else | |
385 | as_basename=false | |
386 | fi | |
c0d27fcc | 387 | |
eb697db5 DN |
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 | |
c0d27fcc | 393 | |
ca81d7a0 | 394 | as_me=`$as_basename -- "$0" || |
c0d27fcc MR |
395 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ |
396 | X"$0" : 'X\(//\)$' \| \ | |
ca81d7a0 | 397 | X"$0" : 'X\(/\)' \| . 2>/dev/null || |
e9a63f04 | 398 | $as_echo X/"$0" | |
ca81d7a0 JD |
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'` | |
c0d27fcc | 412 | |
eb697db5 DN |
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 | |
6bae0ccf | 419 | |
c0d27fcc | 420 | |
eb697db5 DN |
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; } | |
c0d27fcc | 443 | |
eb697db5 DN |
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 | |
ca81d7a0 | 450 | } |
c0d27fcc | 451 | |
eb697db5 DN |
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 | |
08b47d3d | 464 | |
eb697db5 DN |
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 | |
a4f64981 | 471 | fi |
eb697db5 DN |
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 | |
a4f64981 | 486 | else |
eb697db5 | 487 | as_ln_s='cp -p' |
a4f64981 | 488 | fi |
eb697db5 DN |
489 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file |
490 | rmdir conf$$.dir 2>/dev/null | |
a5edbe4a | 491 | |
eb697db5 DN |
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 | |
5929fbe7 | 497 | fi |
e6df49e4 | 498 | |
eb697db5 DN |
499 | if test -x / >/dev/null 2>&1; then |
500 | as_test_x='test -x' | |
5929fbe7 | 501 | else |
eb697db5 DN |
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 | ' | |
5929fbe7 | 519 | fi |
eb697db5 | 520 | as_executable_p=$as_test_x |
e6df49e4 | 521 | |
eb697db5 DN |
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'" | |
a4f64981 | 524 | |
eb697db5 DN |
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'" | |
a4f64981 | 527 | |
5929fbe7 | 528 | |
eb697db5 DN |
529 | test -n "$DJDIR" || exec 7<&0 </dev/null |
530 | exec 6>&1 | |
5929fbe7 GM |
531 | |
532 | # Name of the host. | |
3d608a86 | 533 | # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, |
5929fbe7 GM |
534 | # so uname gets run too. |
535 | ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` | |
503d2be0 | 536 | |
503d2be0 AS |
537 | # |
538 | # Initializations. | |
539 | # | |
ba4481b5 | 540 | ac_default_prefix=/usr/local |
ca81d7a0 | 541 | ac_clean_files= |
6bae0ccf | 542 | ac_config_libobj_dir=. |
ca81d7a0 | 543 | LIBOBJS= |
503d2be0 AS |
544 | cross_compiling=no |
545 | subdirs= | |
c0d27fcc MR |
546 | MFLAGS= |
547 | MAKEFLAGS= | |
503d2be0 | 548 | |
c0d27fcc | 549 | # Identity of this package. |
9cf8f393 JD |
550 | PACKAGE_NAME='emacs' |
551 | PACKAGE_TARNAME='emacs' | |
49a62e8a GM |
552 | PACKAGE_VERSION='24.0.50' |
553 | PACKAGE_STRING='emacs 24.0.50' | |
9cf8f393 | 554 | PACKAGE_BUGREPORT='' |
eb697db5 | 555 | PACKAGE_URL='' |
c0d27fcc | 556 | |
503d2be0 AS |
557 | ac_unique_file="src/lisp.h" |
558 | # Factoring default headers for most tests. | |
559 | ac_includes_default="\ | |
560 | #include <stdio.h> | |
f053c89f | 561 | #ifdef HAVE_SYS_TYPES_H |
503d2be0 AS |
562 | # include <sys/types.h> |
563 | #endif | |
f053c89f | 564 | #ifdef HAVE_SYS_STAT_H |
503d2be0 AS |
565 | # include <sys/stat.h> |
566 | #endif | |
f053c89f | 567 | #ifdef STDC_HEADERS |
503d2be0 AS |
568 | # include <stdlib.h> |
569 | # include <stddef.h> | |
570 | #else | |
f053c89f | 571 | # ifdef HAVE_STDLIB_H |
503d2be0 AS |
572 | # include <stdlib.h> |
573 | # endif | |
574 | #endif | |
f053c89f CY |
575 | #ifdef HAVE_STRING_H |
576 | # if !defined STDC_HEADERS && defined HAVE_MEMORY_H | |
503d2be0 AS |
577 | # include <memory.h> |
578 | # endif | |
579 | # include <string.h> | |
580 | #endif | |
f053c89f | 581 | #ifdef HAVE_STRINGS_H |
503d2be0 AS |
582 | # include <strings.h> |
583 | #endif | |
f053c89f | 584 | #ifdef HAVE_INTTYPES_H |
503d2be0 | 585 | # include <inttypes.h> |
503d2be0 | 586 | #endif |
f053c89f | 587 | #ifdef HAVE_STDINT_H |
ca81d7a0 | 588 | # include <stdint.h> |
503d2be0 | 589 | #endif |
f053c89f | 590 | #ifdef HAVE_UNISTD_H |
503d2be0 AS |
591 | # include <unistd.h> |
592 | #endif" | |
ba4481b5 | 593 | |
a51f4969 | 594 | ac_config_libobj_dir=src |
c24fa7dc MB |
595 | ac_header_list= |
596 | ac_func_list= | |
eb697db5 | 597 | ac_subst_vars='LTLIBOBJS |
5929fbe7 | 598 | WINDOW_SUPPORT |
eb697db5 DN |
599 | TOOLTIP_SUPPORT |
600 | MOUSE_SUPPORT | |
601 | LIB_GCC | |
602 | LINKER | |
eb697db5 DN |
603 | LD_SWITCH_SYSTEM_TEMACS |
604 | POST_ALLOC_OBJ | |
605 | PRE_ALLOC_OBJ | |
606 | CYGWIN_OBJ | |
607 | RALLOC_OBJ | |
608 | OLDXMENU_DEPS | |
609 | LIBX_OTHER | |
610 | LIBXMENU | |
611 | OLDXMENU | |
612 | OLDXMENU_TARGET | |
613 | LIBXT_OTHER | |
614 | TOOLKIT_LIBW | |
615 | WIDGET_OBJ | |
616 | XOBJ | |
617 | XMENU_OBJ | |
618 | FONT_OBJ | |
619 | OTHER_FILES | |
620 | GNU_OBJC_CFLAGS | |
621 | ns_appsrc | |
622 | ns_appresdir | |
623 | ns_appbindir | |
624 | ns_appdir | |
625 | opsysfile | |
626 | machfile | |
627 | X_TOOLKIT_TYPE | |
628 | C_SWITCH_X_SYSTEM | |
629 | C_SWITCH_X_SITE | |
630 | LD_SWITCH_X_SITE | |
631 | gameuser | |
632 | gamedir | |
633 | bitmapdir | |
634 | archlibdir | |
635 | etcdir | |
636 | x_default_search_path | |
637 | lisppath | |
638 | locallisppath | |
639 | lispdir | |
640 | srcdir | |
641 | canonical | |
642 | configuration | |
643 | version | |
644 | KRB4LIB | |
645 | DESLIB | |
646 | KRB5LIB | |
647 | CRYPTOLIB | |
648 | COM_ERRLIB | |
649 | LIBRESOLV | |
650 | LIBHESIOD | |
651 | TERMCAP_OBJ | |
652 | LIBS_TERMCAP | |
653 | GETOPTOBJS | |
654 | GETOPT_H | |
655 | GETLOADAVG_LIBS | |
656 | KMEM_GROUP | |
657 | NEED_SETGID | |
658 | LIBOBJS | |
659 | BLESSMAIL_TARGET | |
660 | LIBS_MAIL | |
661 | liblockfile | |
662 | ALLOCA | |
663 | LIBXSM | |
664 | LIBGPM | |
665 | LIBGIF | |
666 | LIBTIFF | |
667 | LIBPNG | |
668 | LIBJPEG | |
669 | LIBXPM | |
670 | FREETYPE_LIBS | |
671 | FREETYPE_CFLAGS | |
672 | M17N_FLT_LIBS | |
673 | M17N_FLT_CFLAGS | |
674 | LIBOTF_LIBS | |
675 | LIBOTF_CFLAGS | |
676 | XFT_LIBS | |
677 | XFT_CFLAGS | |
678 | FONTCONFIG_LIBS | |
679 | FONTCONFIG_CFLAGS | |
680 | LIBXMU | |
681 | LIBXTR6 | |
682 | LIBSELINUX_LIBS | |
683 | GCONF_LIBS | |
684 | GCONF_CFLAGS | |
685 | DBUS_OBJ | |
686 | DBUS_LIBS | |
687 | DBUS_CFLAGS | |
688 | GTK_OBJ | |
689 | GTK_LIBS | |
690 | GTK_CFLAGS | |
691 | RSVG_LIBS | |
692 | RSVG_CFLAGS | |
693 | VMLIMIT_OBJ | |
694 | GMALLOC_OBJ | |
695 | HAVE_XSERVER | |
696 | LIB_STANDARD | |
697 | NS_SUPPORT | |
698 | NS_OBJ | |
699 | TEMACS_LDFLAGS2 | |
700 | LD_SWITCH_X_SITE_AUX_RPATH | |
701 | LD_SWITCH_X_SITE_AUX | |
702 | XMKMF | |
703 | DEPFLAGS | |
704 | MKDEPDIR | |
705 | SET_MAKE | |
706 | CFLAGS_SOUND | |
707 | ALSA_LIBS | |
708 | ALSA_CFLAGS | |
709 | PKG_CONFIG | |
710 | LIBSOUND | |
711 | START_FILES | |
712 | LIB_MATH | |
713 | CRT_DIR | |
714 | LIBS_SYSTEM | |
715 | C_SWITCH_SYSTEM | |
716 | UNEXEC_OBJ | |
717 | C_SWITCH_MACHINE | |
718 | LD_SWITCH_SYSTEM | |
e7586c7a | 719 | CANNOT_DUMP |
eb697db5 DN |
720 | MAKEINFO |
721 | GZIP_PROG | |
722 | INSTALL_INFO | |
723 | RANLIB | |
724 | INSTALL_DATA | |
725 | INSTALL_SCRIPT | |
726 | INSTALL_PROGRAM | |
e6cfa7c3 | 727 | C_WARNINGS_SWITCH |
eb697db5 DN |
728 | EGREP |
729 | GREP | |
730 | CPP | |
731 | OBJEXT | |
732 | EXEEXT | |
733 | ac_ct_CC | |
734 | CPPFLAGS | |
735 | LDFLAGS | |
736 | CFLAGS | |
737 | CC | |
738 | host_os | |
739 | host_vendor | |
740 | host_cpu | |
741 | host | |
742 | build_os | |
743 | build_vendor | |
744 | build_cpu | |
745 | build | |
e6cfa7c3 AS |
746 | PROFILING_LDFLAGS |
747 | PROFILING_CFLAGS | |
eb697db5 | 748 | MAINT |
e547b051 | 749 | GZIP_INFO |
eb697db5 DN |
750 | target_alias |
751 | host_alias | |
752 | build_alias | |
753 | LIBS | |
754 | ECHO_T | |
755 | ECHO_N | |
756 | ECHO_C | |
757 | DEFS | |
758 | mandir | |
759 | localedir | |
760 | libdir | |
761 | psdir | |
762 | pdfdir | |
763 | dvidir | |
764 | htmldir | |
765 | infodir | |
766 | docdir | |
767 | oldincludedir | |
768 | includedir | |
769 | localstatedir | |
770 | sharedstatedir | |
771 | sysconfdir | |
772 | datadir | |
773 | datarootdir | |
774 | libexecdir | |
775 | sbindir | |
776 | bindir | |
777 | program_transform_name | |
778 | prefix | |
779 | exec_prefix | |
780 | PACKAGE_URL | |
781 | PACKAGE_BUGREPORT | |
782 | PACKAGE_STRING | |
783 | PACKAGE_VERSION | |
784 | PACKAGE_TARNAME | |
785 | PACKAGE_NAME | |
786 | PATH_SEPARATOR | |
787 | SHELL' | |
788 | ac_subst_files='deps_frag | |
789 | ns_frag' | |
790 | ac_user_opts=' | |
791 | enable_option_checking | |
792 | with_pop | |
793 | with_kerberos | |
794 | with_kerberos5 | |
795 | with_hesiod | |
796 | with_mmdf | |
797 | with_mail_unlink | |
798 | with_mailhost | |
799 | with_sound | |
800 | with_sync_input | |
801 | with_x_toolkit | |
802 | with_xpm | |
803 | with_jpeg | |
804 | with_tiff | |
805 | with_gif | |
806 | with_png | |
807 | with_rsvg | |
808 | with_xft | |
809 | with_libotf | |
810 | with_m17n_flt | |
811 | with_toolkit_scroll_bars | |
812 | with_xaw3d | |
813 | with_xim | |
814 | with_ns | |
815 | with_gpm | |
816 | with_dbus | |
817 | with_gconf | |
818 | with_selinux | |
819 | with_makeinfo | |
e547b051 | 820 | with_compress_info |
eb697db5 DN |
821 | with_pkg_config_prog |
822 | with_crt_dir | |
823 | with_gnustep_conf | |
824 | enable_ns_self_contained | |
825 | enable_asserts | |
826 | enable_maintainer_mode | |
827 | enable_locallisppath | |
828 | enable_checking | |
d9170db5 | 829 | enable_use_lisp_union_type |
eb697db5 DN |
830 | enable_profiling |
831 | enable_autodepend | |
832 | enable_largefile | |
833 | with_x | |
834 | ' | |
835 | ac_precious_vars='build_alias | |
836 | host_alias | |
837 | target_alias | |
838 | CC | |
839 | CFLAGS | |
840 | LDFLAGS | |
841 | LIBS | |
842 | CPPFLAGS | |
843 | CPP | |
844 | XMKMF' | |
a4f64981 | 845 | |
5929fbe7 | 846 | |
eb697db5 DN |
847 | # Initialize some variables set by options. |
848 | ac_init_help= | |
849 | ac_init_version=false | |
850 | ac_unrecognized_opts= | |
851 | ac_unrecognized_sep= | |
852 | # The variables have the same names as the options, with | |
853 | # dashes changed to underlines. | |
854 | cache_file=/dev/null | |
855 | exec_prefix=NONE | |
856 | no_create= | |
857 | no_recursion= | |
858 | prefix=NONE | |
859 | program_prefix=NONE | |
860 | program_suffix=NONE | |
861 | program_transform_name=s,x,x, | |
862 | silent= | |
863 | site= | |
864 | srcdir= | |
865 | verbose= | |
866 | x_includes=NONE | |
867 | x_libraries=NONE | |
5929fbe7 | 868 | |
eb697db5 DN |
869 | # Installation directory options. |
870 | # These are left unexpanded so users can "make install exec_prefix=/foo" | |
871 | # and all the variables that are supposed to be based on exec_prefix | |
872 | # by default will actually change. | |
873 | # Use braces instead of parens because sh, perl, etc. also accept them. | |
874 | # (The list follows the same order as the GNU Coding Standards.) | |
875 | bindir='${exec_prefix}/bin' | |
876 | sbindir='${exec_prefix}/sbin' | |
877 | libexecdir='${exec_prefix}/libexec' | |
878 | datarootdir='${prefix}/share' | |
879 | datadir='${datarootdir}' | |
880 | sysconfdir='${prefix}/etc' | |
881 | sharedstatedir='${prefix}/com' | |
882 | localstatedir='${prefix}/var' | |
883 | includedir='${prefix}/include' | |
884 | oldincludedir='/usr/include' | |
885 | docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' | |
886 | infodir='${datarootdir}/info' | |
887 | htmldir='${docdir}' | |
888 | dvidir='${docdir}' | |
889 | pdfdir='${docdir}' | |
890 | psdir='${docdir}' | |
891 | libdir='${exec_prefix}/lib' | |
892 | localedir='${datarootdir}/locale' | |
893 | mandir='${datarootdir}/man' | |
5929fbe7 | 894 | |
eb697db5 DN |
895 | ac_prev= |
896 | ac_dashdash= | |
897 | for ac_option | |
898 | do | |
899 | # If the previous option needs an argument, assign it. | |
900 | if test -n "$ac_prev"; then | |
901 | eval $ac_prev=\$ac_option | |
902 | ac_prev= | |
903 | continue | |
904 | fi | |
a4f64981 | 905 | |
eb697db5 DN |
906 | case $ac_option in |
907 | *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; | |
908 | *) ac_optarg=yes ;; | |
909 | esac | |
a4f64981 | 910 | |
eb697db5 | 911 | # Accept the important Cygnus configure options, so we can diagnose typos. |
a4f64981 | 912 | |
eb697db5 DN |
913 | case $ac_dashdash$ac_option in |
914 | --) | |
915 | ac_dashdash=yes ;; | |
a4f64981 | 916 | |
eb697db5 DN |
917 | -bindir | --bindir | --bindi | --bind | --bin | --bi) |
918 | ac_prev=bindir ;; | |
919 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
920 | bindir=$ac_optarg ;; | |
a4f64981 | 921 | |
eb697db5 DN |
922 | -build | --build | --buil | --bui | --bu) |
923 | ac_prev=build_alias ;; | |
924 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) | |
925 | build_alias=$ac_optarg ;; | |
a4f64981 | 926 | |
eb697db5 DN |
927 | -cache-file | --cache-file | --cache-fil | --cache-fi \ |
928 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
929 | ac_prev=cache_file ;; | |
930 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
931 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
932 | cache_file=$ac_optarg ;; | |
5929fbe7 | 933 | |
eb697db5 DN |
934 | --config-cache | -C) |
935 | cache_file=config.cache ;; | |
8c5ff6dd | 936 | |
eb697db5 DN |
937 | -datadir | --datadir | --datadi | --datad) |
938 | ac_prev=datadir ;; | |
939 | -datadir=* | --datadir=* | --datadi=* | --datad=*) | |
940 | datadir=$ac_optarg ;; | |
8c5ff6dd | 941 | |
eb697db5 DN |
942 | -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ |
943 | | --dataroo | --dataro | --datar) | |
944 | ac_prev=datarootdir ;; | |
945 | -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | |
946 | | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) | |
947 | datarootdir=$ac_optarg ;; | |
5929fbe7 | 948 | |
eb697db5 DN |
949 | -disable-* | --disable-*) |
950 | ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` | |
951 | # Reject names that are not valid shell variable names. | |
952 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && | |
3d608a86 | 953 | as_fn_error "invalid feature name: $ac_useropt" |
eb697db5 DN |
954 | ac_useropt_orig=$ac_useropt |
955 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
956 | case $ac_user_opts in | |
957 | *" | |
958 | "enable_$ac_useropt" | |
959 | "*) ;; | |
960 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" | |
961 | ac_unrecognized_sep=', ';; | |
962 | esac | |
963 | eval enable_$ac_useropt=no ;; | |
5929fbe7 | 964 | |
eb697db5 DN |
965 | -docdir | --docdir | --docdi | --doc | --do) |
966 | ac_prev=docdir ;; | |
967 | -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) | |
968 | docdir=$ac_optarg ;; | |
8c5ff6dd | 969 | |
eb697db5 DN |
970 | -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) |
971 | ac_prev=dvidir ;; | |
972 | -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) | |
973 | dvidir=$ac_optarg ;; | |
8c5ff6dd | 974 | |
eb697db5 DN |
975 | -enable-* | --enable-*) |
976 | ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` | |
977 | # Reject names that are not valid shell variable names. | |
978 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && | |
3d608a86 | 979 | as_fn_error "invalid feature name: $ac_useropt" |
eb697db5 DN |
980 | ac_useropt_orig=$ac_useropt |
981 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
982 | case $ac_user_opts in | |
983 | *" | |
984 | "enable_$ac_useropt" | |
985 | "*) ;; | |
986 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" | |
987 | ac_unrecognized_sep=', ';; | |
988 | esac | |
989 | eval enable_$ac_useropt=\$ac_optarg ;; | |
648b8e6d | 990 | |
eb697db5 DN |
991 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ |
992 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
993 | | --exec | --exe | --ex) | |
994 | ac_prev=exec_prefix ;; | |
995 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
996 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
997 | | --exec=* | --exe=* | --ex=*) | |
998 | exec_prefix=$ac_optarg ;; | |
648b8e6d | 999 | |
eb697db5 DN |
1000 | -gas | --gas | --ga | --g) |
1001 | # Obsolete; use --with-gas. | |
1002 | with_gas=yes ;; | |
648b8e6d | 1003 | |
eb697db5 DN |
1004 | -help | --help | --hel | --he | -h) |
1005 | ac_init_help=long ;; | |
1006 | -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) | |
1007 | ac_init_help=recursive ;; | |
1008 | -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) | |
1009 | ac_init_help=short ;; | |
648b8e6d | 1010 | |
eb697db5 DN |
1011 | -host | --host | --hos | --ho) |
1012 | ac_prev=host_alias ;; | |
1013 | -host=* | --host=* | --hos=* | --ho=*) | |
1014 | host_alias=$ac_optarg ;; | |
8c5ff6dd | 1015 | |
eb697db5 DN |
1016 | -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) |
1017 | ac_prev=htmldir ;; | |
1018 | -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | |
1019 | | --ht=*) | |
1020 | htmldir=$ac_optarg ;; | |
a4f64981 | 1021 | |
eb697db5 DN |
1022 | -includedir | --includedir | --includedi | --included | --include \ |
1023 | | --includ | --inclu | --incl | --inc) | |
1024 | ac_prev=includedir ;; | |
1025 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
1026 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
1027 | includedir=$ac_optarg ;; | |
a4f64981 | 1028 | |
eb697db5 DN |
1029 | -infodir | --infodir | --infodi | --infod | --info | --inf) |
1030 | ac_prev=infodir ;; | |
1031 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
1032 | infodir=$ac_optarg ;; | |
7186fb09 | 1033 | |
eb697db5 DN |
1034 | -libdir | --libdir | --libdi | --libd) |
1035 | ac_prev=libdir ;; | |
1036 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
1037 | libdir=$ac_optarg ;; | |
e6df49e4 | 1038 | |
eb697db5 DN |
1039 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ |
1040 | | --libexe | --libex | --libe) | |
1041 | ac_prev=libexecdir ;; | |
1042 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
1043 | | --libexe=* | --libex=* | --libe=*) | |
1044 | libexecdir=$ac_optarg ;; | |
a4f64981 | 1045 | |
eb697db5 DN |
1046 | -localedir | --localedir | --localedi | --localed | --locale) |
1047 | ac_prev=localedir ;; | |
1048 | -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) | |
1049 | localedir=$ac_optarg ;; | |
1050 | ||
1051 | -localstatedir | --localstatedir | --localstatedi | --localstated \ | |
1052 | | --localstate | --localstat | --localsta | --localst | --locals) | |
1053 | ac_prev=localstatedir ;; | |
1054 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
1055 | | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) | |
1056 | localstatedir=$ac_optarg ;; | |
a4f64981 | 1057 | |
eb697db5 DN |
1058 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) |
1059 | ac_prev=mandir ;; | |
1060 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
1061 | mandir=$ac_optarg ;; | |
49ebbd65 | 1062 | |
eb697db5 DN |
1063 | -nfp | --nfp | --nf) |
1064 | # Obsolete; use --without-fp. | |
1065 | with_fp=no ;; | |
a4f64981 | 1066 | |
eb697db5 DN |
1067 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ |
1068 | | --no-cr | --no-c | -n) | |
1069 | no_create=yes ;; | |
1070 | ||
1071 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
1072 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
1073 | no_recursion=yes ;; | |
a4f64981 | 1074 | |
eb697db5 DN |
1075 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ |
1076 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
1077 | | --oldin | --oldi | --old | --ol | --o) | |
1078 | ac_prev=oldincludedir ;; | |
1079 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
1080 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
1081 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
1082 | oldincludedir=$ac_optarg ;; | |
e6df49e4 | 1083 | |
eb697db5 DN |
1084 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) |
1085 | ac_prev=prefix ;; | |
1086 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
1087 | prefix=$ac_optarg ;; | |
a4f64981 | 1088 | |
eb697db5 DN |
1089 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ |
1090 | | --program-pre | --program-pr | --program-p) | |
1091 | ac_prev=program_prefix ;; | |
1092 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
1093 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
1094 | program_prefix=$ac_optarg ;; | |
5929fbe7 | 1095 | |
eb697db5 DN |
1096 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ |
1097 | | --program-suf | --program-su | --program-s) | |
1098 | ac_prev=program_suffix ;; | |
1099 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
1100 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
1101 | program_suffix=$ac_optarg ;; | |
5929fbe7 | 1102 | |
eb697db5 DN |
1103 | -program-transform-name | --program-transform-name \ |
1104 | | --program-transform-nam | --program-transform-na \ | |
1105 | | --program-transform-n | --program-transform- \ | |
1106 | | --program-transform | --program-transfor \ | |
1107 | | --program-transfo | --program-transf \ | |
1108 | | --program-trans | --program-tran \ | |
1109 | | --progr-tra | --program-tr | --program-t) | |
1110 | ac_prev=program_transform_name ;; | |
1111 | -program-transform-name=* | --program-transform-name=* \ | |
1112 | | --program-transform-nam=* | --program-transform-na=* \ | |
1113 | | --program-transform-n=* | --program-transform-=* \ | |
1114 | | --program-transform=* | --program-transfor=* \ | |
1115 | | --program-transfo=* | --program-transf=* \ | |
1116 | | --program-trans=* | --program-tran=* \ | |
1117 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
1118 | program_transform_name=$ac_optarg ;; | |
5929fbe7 | 1119 | |
eb697db5 DN |
1120 | -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) |
1121 | ac_prev=pdfdir ;; | |
1122 | -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) | |
1123 | pdfdir=$ac_optarg ;; | |
5929fbe7 | 1124 | |
eb697db5 DN |
1125 | -psdir | --psdir | --psdi | --psd | --ps) |
1126 | ac_prev=psdir ;; | |
1127 | -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) | |
1128 | psdir=$ac_optarg ;; | |
5929fbe7 | 1129 | |
eb697db5 DN |
1130 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
1131 | | -silent | --silent | --silen | --sile | --sil) | |
1132 | silent=yes ;; | |
a4f64981 | 1133 | |
eb697db5 DN |
1134 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) |
1135 | ac_prev=sbindir ;; | |
1136 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
1137 | | --sbi=* | --sb=*) | |
1138 | sbindir=$ac_optarg ;; | |
0c309b80 | 1139 | |
eb697db5 DN |
1140 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ |
1141 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
1142 | | --sharedst | --shareds | --shared | --share | --shar \ | |
1143 | | --sha | --sh) | |
1144 | ac_prev=sharedstatedir ;; | |
1145 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
1146 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
1147 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
1148 | | --sha=* | --sh=*) | |
1149 | sharedstatedir=$ac_optarg ;; | |
5929fbe7 | 1150 | |
eb697db5 DN |
1151 | -site | --site | --sit) |
1152 | ac_prev=site ;; | |
1153 | -site=* | --site=* | --sit=*) | |
1154 | site=$ac_optarg ;; | |
5929fbe7 | 1155 | |
eb697db5 DN |
1156 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) |
1157 | ac_prev=srcdir ;; | |
1158 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
1159 | srcdir=$ac_optarg ;; | |
a4f64981 | 1160 | |
eb697db5 DN |
1161 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ |
1162 | | --syscon | --sysco | --sysc | --sys | --sy) | |
1163 | ac_prev=sysconfdir ;; | |
1164 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
1165 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
1166 | sysconfdir=$ac_optarg ;; | |
a4f64981 | 1167 | |
eb697db5 DN |
1168 | -target | --target | --targe | --targ | --tar | --ta | --t) |
1169 | ac_prev=target_alias ;; | |
1170 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) | |
1171 | target_alias=$ac_optarg ;; | |
a4f64981 | 1172 | |
eb697db5 DN |
1173 | -v | -verbose | --verbose | --verbos | --verbo | --verb) |
1174 | verbose=yes ;; | |
a4f64981 | 1175 | |
eb697db5 DN |
1176 | -version | --version | --versio | --versi | --vers | -V) |
1177 | ac_init_version=: ;; | |
a4f64981 | 1178 | |
eb697db5 DN |
1179 | -with-* | --with-*) |
1180 | ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` | |
1181 | # Reject names that are not valid shell variable names. | |
1182 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && | |
3d608a86 | 1183 | as_fn_error "invalid package name: $ac_useropt" |
eb697db5 DN |
1184 | ac_useropt_orig=$ac_useropt |
1185 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1186 | case $ac_user_opts in | |
1187 | *" | |
1188 | "with_$ac_useropt" | |
1189 | "*) ;; | |
1190 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" | |
1191 | ac_unrecognized_sep=', ';; | |
1192 | esac | |
1193 | eval with_$ac_useropt=\$ac_optarg ;; | |
1194 | ||
1195 | -without-* | --without-*) | |
1196 | ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` | |
1197 | # Reject names that are not valid shell variable names. | |
1198 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && | |
3d608a86 | 1199 | as_fn_error "invalid package name: $ac_useropt" |
eb697db5 DN |
1200 | ac_useropt_orig=$ac_useropt |
1201 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1202 | case $ac_user_opts in | |
1203 | *" | |
1204 | "with_$ac_useropt" | |
1205 | "*) ;; | |
1206 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" | |
1207 | ac_unrecognized_sep=', ';; | |
1208 | esac | |
1209 | eval with_$ac_useropt=no ;; | |
e6df49e4 | 1210 | |
eb697db5 DN |
1211 | --x) |
1212 | # Obsolete; use --with-x. | |
1213 | with_x=yes ;; | |
a4f64981 | 1214 | |
eb697db5 DN |
1215 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ |
1216 | | --x-incl | --x-inc | --x-in | --x-i) | |
1217 | ac_prev=x_includes ;; | |
1218 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
1219 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
1220 | x_includes=$ac_optarg ;; | |
a4f64981 | 1221 | |
eb697db5 DN |
1222 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ |
1223 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
1224 | ac_prev=x_libraries ;; | |
1225 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
1226 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
1227 | x_libraries=$ac_optarg ;; | |
a4f64981 | 1228 | |
3d608a86 J |
1229 | -*) as_fn_error "unrecognized option: \`$ac_option' |
1230 | Try \`$0 --help' for more information." | |
eb697db5 | 1231 | ;; |
a4f64981 | 1232 | |
eb697db5 DN |
1233 | *=*) |
1234 | ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` | |
1235 | # Reject names that are not valid shell variable names. | |
1236 | case $ac_envvar in #( | |
1237 | '' | [0-9]* | *[!_$as_cr_alnum]* ) | |
3d608a86 | 1238 | as_fn_error "invalid variable name: \`$ac_envvar'" ;; |
eb697db5 DN |
1239 | esac |
1240 | eval $ac_envvar=\$ac_optarg | |
1241 | export $ac_envvar ;; | |
a4f64981 | 1242 | |
eb697db5 DN |
1243 | *) |
1244 | # FIXME: should be removed in autoconf 3.0. | |
1245 | $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 | |
1246 | expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && | |
1247 | $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 | |
1248 | : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} | |
1249 | ;; | |
a4f64981 | 1250 | |
eb697db5 DN |
1251 | esac |
1252 | done | |
15e12598 | 1253 | |
eb697db5 DN |
1254 | if test -n "$ac_prev"; then |
1255 | ac_option=--`echo $ac_prev | sed 's/_/-/g'` | |
3d608a86 | 1256 | as_fn_error "missing argument to $ac_option" |
5929fbe7 | 1257 | fi |
e6df49e4 | 1258 | |
eb697db5 DN |
1259 | if test -n "$ac_unrecognized_opts"; then |
1260 | case $enable_option_checking in | |
1261 | no) ;; | |
3d608a86 | 1262 | fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; |
eb697db5 DN |
1263 | *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; |
1264 | esac | |
e6df49e4 | 1265 | fi |
15e12598 | 1266 | |
eb697db5 DN |
1267 | # Check all directory arguments for consistency. |
1268 | for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ | |
1269 | datadir sysconfdir sharedstatedir localstatedir includedir \ | |
1270 | oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ | |
1271 | libdir localedir mandir | |
1272 | do | |
1273 | eval ac_val=\$$ac_var | |
1274 | # Remove trailing slashes. | |
1275 | case $ac_val in | |
1276 | */ ) | |
1277 | ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` | |
1278 | eval $ac_var=\$ac_val;; | |
1279 | esac | |
1280 | # Be sure to have absolute directory names. | |
1281 | case $ac_val in | |
1282 | [\\/$]* | ?:[\\/]* ) continue;; | |
1283 | NONE | '' ) case $ac_var in *prefix ) continue;; esac;; | |
1284 | esac | |
3d608a86 | 1285 | as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" |
eb697db5 | 1286 | done |
a4f64981 | 1287 | |
eb697db5 DN |
1288 | # There might be people who depend on the old broken behavior: `$host' |
1289 | # used to hold the argument of --host etc. | |
1290 | # FIXME: To remove some day. | |
1291 | build=$build_alias | |
1292 | host=$host_alias | |
1293 | target=$target_alias | |
5929fbe7 | 1294 | |
eb697db5 DN |
1295 | # FIXME: To remove some day. |
1296 | if test "x$host_alias" != x; then | |
1297 | if test "x$build_alias" = x; then | |
1298 | cross_compiling=maybe | |
3d608a86 J |
1299 | $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. |
1300 | If a cross compiler is detected then cross compile mode will be used." >&2 | |
eb697db5 DN |
1301 | elif test "x$build_alias" != "x$host_alias"; then |
1302 | cross_compiling=yes | |
1303 | fi | |
49ebbd65 | 1304 | fi |
15e12598 | 1305 | |
eb697db5 DN |
1306 | ac_tool_prefix= |
1307 | test -n "$host_alias" && ac_tool_prefix=$host_alias- | |
a4f64981 | 1308 | |
eb697db5 | 1309 | test "$silent" = yes && exec 6>/dev/null |
a5edbe4a | 1310 | |
15e12598 | 1311 | |
eb697db5 DN |
1312 | ac_pwd=`pwd` && test -n "$ac_pwd" && |
1313 | ac_ls_di=`ls -di .` && | |
1314 | ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || | |
3d608a86 | 1315 | as_fn_error "working directory cannot be determined" |
eb697db5 | 1316 | test "X$ac_ls_di" = "X$ac_pwd_ls_di" || |
3d608a86 | 1317 | as_fn_error "pwd does not report name of working directory" |
e6df49e4 | 1318 | |
8c5ff6dd | 1319 | |
eb697db5 DN |
1320 | # Find the source files, if location was not specified. |
1321 | if test -z "$srcdir"; then | |
1322 | ac_srcdir_defaulted=yes | |
1323 | # Try the directory containing this script, then the parent directory. | |
1324 | ac_confdir=`$as_dirname -- "$as_myself" || | |
1325 | $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
1326 | X"$as_myself" : 'X\(//\)[^/]' \| \ | |
1327 | X"$as_myself" : 'X\(//\)$' \| \ | |
1328 | X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || | |
1329 | $as_echo X"$as_myself" | | |
1330 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
1331 | s//\1/ | |
1332 | q | |
1333 | } | |
1334 | /^X\(\/\/\)[^/].*/{ | |
1335 | s//\1/ | |
1336 | q | |
1337 | } | |
1338 | /^X\(\/\/\)$/{ | |
1339 | s//\1/ | |
1340 | q | |
1341 | } | |
1342 | /^X\(\/\).*/{ | |
1343 | s//\1/ | |
1344 | q | |
1345 | } | |
1346 | s/.*/./; q'` | |
1347 | srcdir=$ac_confdir | |
1348 | if test ! -r "$srcdir/$ac_unique_file"; then | |
1349 | srcdir=.. | |
1350 | fi | |
5929fbe7 | 1351 | else |
eb697db5 | 1352 | ac_srcdir_defaulted=no |
5929fbe7 | 1353 | fi |
eb697db5 DN |
1354 | if test ! -r "$srcdir/$ac_unique_file"; then |
1355 | test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." | |
3d608a86 | 1356 | as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" |
eb697db5 DN |
1357 | fi |
1358 | ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" | |
1359 | ac_abs_confdir=`( | |
3d608a86 | 1360 | cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" |
eb697db5 DN |
1361 | pwd)` |
1362 | # When building in place, set srcdir=. | |
1363 | if test "$ac_abs_confdir" = "$ac_pwd"; then | |
1364 | srcdir=. | |
49ebbd65 | 1365 | fi |
eb697db5 DN |
1366 | # Remove unnecessary trailing slashes from srcdir. |
1367 | # Double slashes in file names in object file debugging info | |
1368 | # mess up M-x gdb in Emacs. | |
1369 | case $srcdir in | |
1370 | */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; | |
1371 | esac | |
1372 | for ac_var in $ac_precious_vars; do | |
1373 | eval ac_env_${ac_var}_set=\${${ac_var}+set} | |
1374 | eval ac_env_${ac_var}_value=\$${ac_var} | |
1375 | eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} | |
1376 | eval ac_cv_env_${ac_var}_value=\$${ac_var} | |
1377 | done | |
a4f64981 | 1378 | |
eb697db5 DN |
1379 | # |
1380 | # Report the --help message. | |
1381 | # | |
1382 | if test "$ac_init_help" = "long"; then | |
1383 | # Omit some internal or obsolete options to make the list less imposing. | |
1384 | # This message is too long to be a string in the A/UX 3.1 sh. | |
1385 | cat <<_ACEOF | |
1386 | \`configure' configures emacs 24.0.50 to adapt to many kinds of systems. | |
8c5ff6dd | 1387 | |
eb697db5 | 1388 | Usage: $0 [OPTION]... [VAR=VALUE]... |
a4f64981 | 1389 | |
eb697db5 DN |
1390 | To assign environment variables (e.g., CC, CFLAGS...), specify them as |
1391 | VAR=VALUE. See below for descriptions of some of the useful variables. | |
a4f64981 | 1392 | |
eb697db5 | 1393 | Defaults for the options are specified in brackets. |
a4f64981 | 1394 | |
eb697db5 DN |
1395 | Configuration: |
1396 | -h, --help display this help and exit | |
1397 | --help=short display options specific to this package | |
1398 | --help=recursive display the short help of all the included packages | |
1399 | -V, --version display version information and exit | |
3d608a86 | 1400 | -q, --quiet, --silent do not print \`checking...' messages |
eb697db5 DN |
1401 | --cache-file=FILE cache test results in FILE [disabled] |
1402 | -C, --config-cache alias for \`--cache-file=config.cache' | |
1403 | -n, --no-create do not create output files | |
1404 | --srcdir=DIR find the sources in DIR [configure dir or \`..'] | |
a4f64981 | 1405 | |
eb697db5 DN |
1406 | Installation directories: |
1407 | --prefix=PREFIX install architecture-independent files in PREFIX | |
1408 | [$ac_default_prefix] | |
1409 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX | |
1410 | [PREFIX] | |
298b8a34 | 1411 | |
eb697db5 DN |
1412 | By default, \`make install' will install all the files in |
1413 | \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify | |
1414 | an installation prefix other than \`$ac_default_prefix' using \`--prefix', | |
1415 | for instance \`--prefix=\$HOME'. | |
a4f64981 | 1416 | |
eb697db5 | 1417 | For better control, use the options below. |
a4f64981 | 1418 | |
eb697db5 DN |
1419 | Fine tuning of the installation directories: |
1420 | --bindir=DIR user executables [EPREFIX/bin] | |
1421 | --sbindir=DIR system admin executables [EPREFIX/sbin] | |
1422 | --libexecdir=DIR program executables [EPREFIX/libexec] | |
1423 | --sysconfdir=DIR read-only single-machine data [PREFIX/etc] | |
1424 | --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] | |
1425 | --localstatedir=DIR modifiable single-machine data [PREFIX/var] | |
1426 | --libdir=DIR object code libraries [EPREFIX/lib] | |
1427 | --includedir=DIR C header files [PREFIX/include] | |
1428 | --oldincludedir=DIR C header files for non-gcc [/usr/include] | |
1429 | --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] | |
1430 | --datadir=DIR read-only architecture-independent data [DATAROOTDIR] | |
1431 | --infodir=DIR info documentation [DATAROOTDIR/info] | |
1432 | --localedir=DIR locale-dependent data [DATAROOTDIR/locale] | |
1433 | --mandir=DIR man documentation [DATAROOTDIR/man] | |
1434 | --docdir=DIR documentation root [DATAROOTDIR/doc/emacs] | |
1435 | --htmldir=DIR html documentation [DOCDIR] | |
1436 | --dvidir=DIR dvi documentation [DOCDIR] | |
1437 | --pdfdir=DIR pdf documentation [DOCDIR] | |
1438 | --psdir=DIR ps documentation [DOCDIR] | |
1439 | _ACEOF | |
15e12598 | 1440 | |
eb697db5 | 1441 | cat <<\_ACEOF |
e6df49e4 | 1442 | |
eb697db5 DN |
1443 | Program names: |
1444 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
1445 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
1446 | --program-transform-name=PROGRAM run sed PROGRAM on installed program names | |
a4f64981 | 1447 | |
eb697db5 DN |
1448 | X features: |
1449 | --x-includes=DIR X include files are in DIR | |
1450 | --x-libraries=DIR X library files are in DIR | |
a4f64981 | 1451 | |
eb697db5 DN |
1452 | System types: |
1453 | --build=BUILD configure for building on BUILD [guessed] | |
1454 | --host=HOST cross-compile to build programs to run on HOST [BUILD] | |
8c5ff6dd | 1455 | _ACEOF |
eb697db5 | 1456 | fi |
a4f64981 | 1457 | |
eb697db5 DN |
1458 | if test -n "$ac_init_help"; then |
1459 | case $ac_init_help in | |
1460 | short | recursive ) echo "Configuration of emacs 24.0.50:";; | |
1461 | esac | |
1462 | cat <<\_ACEOF | |
e6df49e4 | 1463 | |
eb697db5 DN |
1464 | Optional Features: |
1465 | --disable-option-checking ignore unrecognized --enable/--with options | |
1466 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) | |
1467 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
1468 | --disable-ns-self-contained | |
1469 | disable self contained build under NeXTstep | |
1470 | --enable-asserts compile code with asserts enabled | |
1471 | --enable-maintainer-mode | |
1472 | enable make rules and dependencies not useful (and | |
1473 | sometimes confusing) to the casual installer | |
1474 | --enable-locallisppath=PATH | |
1475 | directories Emacs should search for lisp files | |
1476 | specific to this site | |
1477 | --enable-checking[=LIST] | |
1478 | enable expensive run-time checks. With LIST, enable | |
1479 | only specific categories of checks. Categories are: | |
1480 | all,yes,no. Flags are: stringbytes, stringoverrun, | |
1481 | stringfreelist, xmallocoverrun, conslist | |
d9170db5 DN |
1482 | --enable-use-lisp-union-type |
1483 | use a union for the Lisp_Object data type. This is | |
1484 | only useful for development for catching certain | |
1485 | types of bugs. | |
eb697db5 DN |
1486 | --enable-profiling build emacs with profiling support. This might not |
1487 | work on all platforms | |
1488 | --enable-autodepend automatically generate dependencies to .h-files. | |
1489 | Requires GNU Make and Gcc. Enabled if GNU Make and | |
1490 | Gcc is found | |
1491 | --disable-largefile omit support for large files | |
1492 | ||
1493 | Optional Packages: | |
1494 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
1495 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
1496 | --without-pop don't support POP mail retrieval with movemail | |
1497 | --with-kerberos support Kerberos-authenticated POP | |
1498 | --with-kerberos5 support Kerberos version 5 authenticated POP | |
1499 | --with-hesiod support Hesiod to get the POP server host | |
1500 | --with-mmdf support MMDF mailboxes | |
1501 | --with-mail-unlink unlink, rather than empty, mail spool after reading | |
1502 | --with-mailhost=HOSTNAME | |
1503 | string giving default POP mail host | |
1504 | --without-sound don't compile with sound support | |
1505 | --without-sync-input process async input synchronously | |
e547b051 J |
1506 | --with-x-toolkit=KIT use an X toolkit (KIT one of: yes or gtk, gtk3, |
1507 | lucid or athena, motif, no) | |
eb697db5 DN |
1508 | --without-xpm don't compile with XPM image support |
1509 | --without-jpeg don't compile with JPEG image support | |
1510 | --without-tiff don't compile with TIFF image support | |
1511 | --without-gif don't compile with GIF image support | |
1512 | --without-png don't compile with PNG image support | |
1513 | --without-rsvg don't compile with SVG image support | |
1514 | --without-xft don't use XFT for anti aliased fonts | |
1515 | --without-libotf don't use libotf for OpenType font support | |
1516 | --without-m17n-flt don't use m17n-flt for text shaping | |
1517 | --without-toolkit-scroll-bars | |
1518 | don't use Motif or Xaw3d scroll bars | |
1519 | --without-xaw3d don't use Xaw3d | |
1520 | --without-xim don't use X11 XIM | |
1521 | --with-ns use nextstep (Cocoa or GNUstep) windowing system | |
1522 | --without-gpm don't use -lgpm for mouse support on a GNU/Linux | |
1523 | console | |
1524 | --without-dbus don't compile with D-Bus support | |
1525 | --without-gconf don't compile with GConf support | |
1526 | --without-selinux don't compile with SELinux support | |
1527 | --without-makeinfo don't require makeinfo for building manuals | |
e547b051 | 1528 | --without-compress-info don't compress the installed Info pages |
eb697db5 DN |
1529 | --with-pkg-config-prog=PATH |
1530 | path to pkg-config for finding GTK and librsvg | |
1531 | --with-crt-dir=DIR directory containing crtn.o etc. The default is | |
1532 | /usr/lib, or /usr/lib64 on some platforms. | |
1533 | --with-gnustep-conf=PATH | |
1534 | path to GNUstep.conf; default $GNUSTEP_CONFIG_FILE, | |
1535 | or /etc/GNUstep/GNUstep.conf | |
1536 | --with-x use the X Window System | |
e6df49e4 | 1537 | |
eb697db5 DN |
1538 | Some influential environment variables: |
1539 | CC C compiler command | |
1540 | CFLAGS C compiler flags | |
1541 | LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a | |
1542 | nonstandard directory <lib dir> | |
1543 | LIBS libraries to pass to the linker, e.g. -l<library> | |
1544 | CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if | |
1545 | you have headers in a nonstandard directory <include dir> | |
1546 | CPP C preprocessor | |
1547 | XMKMF Path to xmkmf, Makefile generator for X Window System | |
e6df49e4 | 1548 | |
eb697db5 DN |
1549 | Use these variables to override the choices made by `configure' or to help |
1550 | it to find libraries and programs with nonstandard names/locations. | |
49ebbd65 | 1551 | |
eb697db5 | 1552 | Report bugs to the package provider. |
5929fbe7 | 1553 | _ACEOF |
eb697db5 | 1554 | ac_status=$? |
15e12598 | 1555 | fi |
49ebbd65 | 1556 | |
eb697db5 DN |
1557 | if test "$ac_init_help" = "recursive"; then |
1558 | # If there are subdirs, report their specific --help. | |
1559 | for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue | |
1560 | test -d "$ac_dir" || | |
1561 | { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || | |
1562 | continue | |
1563 | ac_builddir=. | |
8c5ff6dd | 1564 | |
eb697db5 DN |
1565 | case "$ac_dir" in |
1566 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
1567 | *) | |
1568 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
1569 | # A ".." for each directory in $ac_dir_suffix. | |
1570 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
1571 | case $ac_top_builddir_sub in | |
1572 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
1573 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
1574 | esac ;; | |
1575 | esac | |
1576 | ac_abs_top_builddir=$ac_pwd | |
1577 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
1578 | # for backward compatibility: | |
1579 | ac_top_builddir=$ac_top_build_prefix | |
e6df49e4 | 1580 | |
eb697db5 DN |
1581 | case $srcdir in |
1582 | .) # We are building in place. | |
1583 | ac_srcdir=. | |
1584 | ac_top_srcdir=$ac_top_builddir_sub | |
1585 | ac_abs_top_srcdir=$ac_pwd ;; | |
1586 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
1587 | ac_srcdir=$srcdir$ac_dir_suffix; | |
1588 | ac_top_srcdir=$srcdir | |
1589 | ac_abs_top_srcdir=$srcdir ;; | |
1590 | *) # Relative name. | |
1591 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
1592 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
1593 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
1594 | esac | |
1595 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix | |
15e12598 | 1596 | |
eb697db5 DN |
1597 | cd "$ac_dir" || { ac_status=$?; continue; } |
1598 | # Check for guested configure. | |
1599 | if test -f "$ac_srcdir/configure.gnu"; then | |
1600 | echo && | |
1601 | $SHELL "$ac_srcdir/configure.gnu" --help=recursive | |
1602 | elif test -f "$ac_srcdir/configure"; then | |
1603 | echo && | |
1604 | $SHELL "$ac_srcdir/configure" --help=recursive | |
1605 | else | |
1606 | $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 | |
1607 | fi || ac_status=$? | |
1608 | cd "$ac_pwd" || { ac_status=$?; break; } | |
1609 | done | |
1610 | fi | |
a4f64981 | 1611 | |
eb697db5 DN |
1612 | test -n "$ac_init_help" && exit $ac_status |
1613 | if $ac_init_version; then | |
1614 | cat <<\_ACEOF | |
1615 | emacs configure 24.0.50 | |
3d608a86 | 1616 | generated by GNU Autoconf 2.65 |
a4f64981 | 1617 | |
3d608a86 | 1618 | Copyright (C) 2009 Free Software Foundation, Inc. |
eb697db5 DN |
1619 | This configure script is free software; the Free Software Foundation |
1620 | gives unlimited permission to copy, distribute and modify it. | |
5929fbe7 | 1621 | _ACEOF |
eb697db5 | 1622 | exit |
a4f64981 | 1623 | fi |
8c5ff6dd | 1624 | |
eb697db5 DN |
1625 | ## ------------------------ ## |
1626 | ## Autoconf initialization. ## | |
1627 | ## ------------------------ ## | |
a4f64981 | 1628 | |
eb697db5 DN |
1629 | # ac_fn_c_try_compile LINENO |
1630 | # -------------------------- | |
1631 | # Try to compile conftest.$ac_ext, and return whether this succeeded. | |
1632 | ac_fn_c_try_compile () | |
5929fbe7 | 1633 | { |
eb697db5 DN |
1634 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
1635 | rm -f conftest.$ac_objext | |
1636 | if { { ac_try="$ac_compile" | |
5929fbe7 GM |
1637 | case "(($ac_try" in |
1638 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1639 | *) ac_try_echo=$ac_try;; | |
1640 | esac | |
eb697db5 DN |
1641 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" |
1642 | $as_echo "$ac_try_echo"; } >&5 | |
1643 | (eval "$ac_compile") 2>conftest.err | |
5929fbe7 | 1644 | ac_status=$? |
eb697db5 DN |
1645 | if test -s conftest.err; then |
1646 | grep -v '^ *+' conftest.err >conftest.er1 | |
1647 | cat conftest.er1 >&5 | |
1648 | mv -f conftest.er1 conftest.err | |
1649 | fi | |
1650 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1651 | test $ac_status = 0; } && { | |
5929fbe7 GM |
1652 | test -z "$ac_c_werror_flag" || |
1653 | test ! -s conftest.err | |
eb697db5 DN |
1654 | } && test -s conftest.$ac_objext; then : |
1655 | ac_retval=0 | |
8c5ff6dd | 1656 | else |
5929fbe7 GM |
1657 | $as_echo "$as_me: failed program was:" >&5 |
1658 | sed 's/^/| /' conftest.$ac_ext >&5 | |
a4f64981 | 1659 | |
eb697db5 | 1660 | ac_retval=1 |
5929fbe7 | 1661 | fi |
eb697db5 DN |
1662 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} |
1663 | as_fn_set_status $ac_retval | |
1664 | ||
1665 | } # ac_fn_c_try_compile | |
1666 | ||
1667 | # ac_fn_c_try_link LINENO | |
1668 | # ----------------------- | |
1669 | # Try to link conftest.$ac_ext, and return whether this succeeded. | |
1670 | ac_fn_c_try_link () | |
1671 | { | |
1672 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1673 | rm -f conftest.$ac_objext conftest$ac_exeext | |
1674 | if { { ac_try="$ac_link" | |
5929fbe7 GM |
1675 | case "(($ac_try" in |
1676 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1677 | *) ac_try_echo=$ac_try;; | |
1678 | esac | |
eb697db5 DN |
1679 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" |
1680 | $as_echo "$ac_try_echo"; } >&5 | |
1681 | (eval "$ac_link") 2>conftest.err | |
5929fbe7 | 1682 | ac_status=$? |
eb697db5 DN |
1683 | if test -s conftest.err; then |
1684 | grep -v '^ *+' conftest.err >conftest.er1 | |
1685 | cat conftest.er1 >&5 | |
1686 | mv -f conftest.er1 conftest.err | |
1687 | fi | |
1688 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1689 | test $ac_status = 0; } && { | |
5929fbe7 GM |
1690 | test -z "$ac_c_werror_flag" || |
1691 | test ! -s conftest.err | |
eb697db5 DN |
1692 | } && test -s conftest$ac_exeext && { |
1693 | test "$cross_compiling" = yes || | |
1694 | $as_test_x conftest$ac_exeext | |
1695 | }; then : | |
1696 | ac_retval=0 | |
5929fbe7 GM |
1697 | else |
1698 | $as_echo "$as_me: failed program was:" >&5 | |
1699 | sed 's/^/| /' conftest.$ac_ext >&5 | |
a4f64981 | 1700 | |
eb697db5 | 1701 | ac_retval=1 |
cd03c74a | 1702 | fi |
eb697db5 DN |
1703 | # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information |
1704 | # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would | |
1705 | # interfere with the next link command; also delete a directory that is | |
1706 | # left behind by Apple's compiler. We do this before executing the actions. | |
1707 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
1708 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
1709 | as_fn_set_status $ac_retval | |
08b47d3d | 1710 | |
eb697db5 | 1711 | } # ac_fn_c_try_link |
08b47d3d | 1712 | |
eb697db5 DN |
1713 | # ac_fn_c_try_cpp LINENO |
1714 | # ---------------------- | |
1715 | # Try to preprocess conftest.$ac_ext, and return whether this succeeded. | |
1716 | ac_fn_c_try_cpp () | |
1717 | { | |
1718 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1719 | if { { ac_try="$ac_cpp conftest.$ac_ext" | |
5929fbe7 GM |
1720 | case "(($ac_try" in |
1721 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1722 | *) ac_try_echo=$ac_try;; | |
1723 | esac | |
eb697db5 DN |
1724 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" |
1725 | $as_echo "$ac_try_echo"; } >&5 | |
1726 | (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err | |
5929fbe7 | 1727 | ac_status=$? |
eb697db5 DN |
1728 | if test -s conftest.err; then |
1729 | grep -v '^ *+' conftest.err >conftest.er1 | |
1730 | cat conftest.er1 >&5 | |
1731 | mv -f conftest.er1 conftest.err | |
1732 | fi | |
1733 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1734 | test $ac_status = 0; } >/dev/null && { | |
5929fbe7 GM |
1735 | test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || |
1736 | test ! -s conftest.err | |
eb697db5 DN |
1737 | }; then : |
1738 | ac_retval=0 | |
5929fbe7 GM |
1739 | else |
1740 | $as_echo "$as_me: failed program was:" >&5 | |
1741 | sed 's/^/| /' conftest.$ac_ext >&5 | |
a4f64981 | 1742 | |
eb697db5 DN |
1743 | ac_retval=1 |
1744 | fi | |
1745 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
1746 | as_fn_set_status $ac_retval | |
1747 | ||
1748 | } # ac_fn_c_try_cpp | |
1749 | ||
1750 | # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES | |
1751 | # ------------------------------------------------------- | |
1752 | # Tests whether HEADER exists, giving a warning if it cannot be compiled using | |
1753 | # the include files in INCLUDES and setting the cache variable VAR | |
1754 | # accordingly. | |
1755 | ac_fn_c_check_header_mongrel () | |
1756 | { | |
1757 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
3d608a86 | 1758 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : |
eb697db5 DN |
1759 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 |
1760 | $as_echo_n "checking for $2... " >&6; } | |
3d608a86 | 1761 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : |
eb697db5 DN |
1762 | $as_echo_n "(cached) " >&6 |
1763 | fi | |
1764 | eval ac_res=\$$3 | |
1765 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1766 | $as_echo "$ac_res" >&6; } | |
1767 | else | |
1768 | # Is the header compilable? | |
1769 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 | |
1770 | $as_echo_n "checking $2 usability... " >&6; } | |
1771 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1772 | /* end confdefs.h. */ | |
1773 | $4 | |
1774 | #include <$2> | |
1775 | _ACEOF | |
1776 | if ac_fn_c_try_compile "$LINENO"; then : | |
1777 | ac_header_compiler=yes | |
1778 | else | |
1779 | ac_header_compiler=no | |
8c5ff6dd | 1780 | fi |
eb697db5 DN |
1781 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
1782 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 | |
1783 | $as_echo "$ac_header_compiler" >&6; } | |
e6df49e4 | 1784 | |
eb697db5 DN |
1785 | # Is the header present? |
1786 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 | |
1787 | $as_echo_n "checking $2 presence... " >&6; } | |
1788 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1789 | /* end confdefs.h. */ | |
1790 | #include <$2> | |
1791 | _ACEOF | |
1792 | if ac_fn_c_try_cpp "$LINENO"; then : | |
1793 | ac_header_preproc=yes | |
1794 | else | |
1795 | ac_header_preproc=no | |
1796 | fi | |
5929fbe7 | 1797 | rm -f conftest.err conftest.$ac_ext |
eb697db5 | 1798 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 |
5929fbe7 | 1799 | $as_echo "$ac_header_preproc" >&6; } |
a4f64981 | 1800 | |
5929fbe7 | 1801 | # So? What about this header? |
eb697db5 | 1802 | case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( |
5929fbe7 | 1803 | yes:no: ) |
eb697db5 DN |
1804 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 |
1805 | $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} | |
1806 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
1807 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
5929fbe7 GM |
1808 | ;; |
1809 | no:yes:* ) | |
eb697db5 DN |
1810 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 |
1811 | $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} | |
1812 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 | |
1813 | $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} | |
1814 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 | |
1815 | $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} | |
1816 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 | |
1817 | $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} | |
1818 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
1819 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
5929fbe7 GM |
1820 | ;; |
1821 | esac | |
eb697db5 DN |
1822 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 |
1823 | $as_echo_n "checking for $2... " >&6; } | |
3d608a86 | 1824 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : |
5929fbe7 GM |
1825 | $as_echo_n "(cached) " >&6 |
1826 | else | |
eb697db5 | 1827 | eval "$3=\$ac_header_compiler" |
8c5ff6dd | 1828 | fi |
eb697db5 DN |
1829 | eval ac_res=\$$3 |
1830 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
5929fbe7 | 1831 | $as_echo "$ac_res" >&6; } |
a4f64981 | 1832 | fi |
eb697db5 | 1833 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} |
a4f64981 | 1834 | |
eb697db5 | 1835 | } # ac_fn_c_check_header_mongrel |
5929fbe7 | 1836 | |
eb697db5 DN |
1837 | # ac_fn_c_try_run LINENO |
1838 | # ---------------------- | |
1839 | # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes | |
1840 | # that executables *can* be run. | |
1841 | ac_fn_c_try_run () | |
5929fbe7 | 1842 | { |
eb697db5 DN |
1843 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
1844 | if { { ac_try="$ac_link" | |
5929fbe7 GM |
1845 | case "(($ac_try" in |
1846 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1847 | *) ac_try_echo=$ac_try;; | |
1848 | esac | |
eb697db5 DN |
1849 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" |
1850 | $as_echo "$ac_try_echo"; } >&5 | |
1851 | (eval "$ac_link") 2>&5 | |
5929fbe7 | 1852 | ac_status=$? |
eb697db5 DN |
1853 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
1854 | test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' | |
1855 | { { case "(($ac_try" in | |
1856 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1857 | *) ac_try_echo=$ac_try;; | |
1858 | esac | |
1859 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1860 | $as_echo "$ac_try_echo"; } >&5 | |
1861 | (eval "$ac_try") 2>&5 | |
1862 | ac_status=$? | |
1863 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1864 | test $ac_status = 0; }; }; then : | |
1865 | ac_retval=0 | |
8c5ff6dd | 1866 | else |
eb697db5 DN |
1867 | $as_echo "$as_me: program exited with status $ac_status" >&5 |
1868 | $as_echo "$as_me: failed program was:" >&5 | |
5929fbe7 | 1869 | sed 's/^/| /' conftest.$ac_ext >&5 |
15e12598 | 1870 | |
eb697db5 | 1871 | ac_retval=$ac_status |
5929fbe7 | 1872 | fi |
eb697db5 DN |
1873 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo |
1874 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
1875 | as_fn_set_status $ac_retval | |
1876 | ||
1877 | } # ac_fn_c_try_run | |
8c5ff6dd | 1878 | |
eb697db5 DN |
1879 | # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES |
1880 | # ------------------------------------------------------- | |
1881 | # Tests whether HEADER exists and can be compiled using the include files in | |
1882 | # INCLUDES, setting the cache variable VAR accordingly. | |
1883 | ac_fn_c_check_header_compile () | |
1884 | { | |
1885 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1886 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1887 | $as_echo_n "checking for $2... " >&6; } | |
3d608a86 | 1888 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : |
eb697db5 DN |
1889 | $as_echo_n "(cached) " >&6 |
1890 | else | |
1891 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1892 | /* end confdefs.h. */ | |
1893 | $4 | |
1894 | #include <$2> | |
1895 | _ACEOF | |
1896 | if ac_fn_c_try_compile "$LINENO"; then : | |
1897 | eval "$3=yes" | |
1898 | else | |
1899 | eval "$3=no" | |
1900 | fi | |
1901 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8c5ff6dd | 1902 | fi |
eb697db5 DN |
1903 | eval ac_res=\$$3 |
1904 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
5929fbe7 | 1905 | $as_echo "$ac_res" >&6; } |
eb697db5 | 1906 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} |
15e12598 | 1907 | |
eb697db5 | 1908 | } # ac_fn_c_check_header_compile |
e6df49e4 | 1909 | |
3d608a86 J |
1910 | # ac_fn_c_check_decl LINENO SYMBOL VAR |
1911 | # ------------------------------------ | |
1912 | # Tests whether SYMBOL is declared, setting cache variable VAR accordingly. | |
eb697db5 DN |
1913 | ac_fn_c_check_decl () |
1914 | { | |
1915 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
3d608a86 J |
1916 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5 |
1917 | $as_echo_n "checking whether $2 is declared... " >&6; } | |
1918 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
5929fbe7 GM |
1919 | $as_echo_n "(cached) " >&6 |
1920 | else | |
eb697db5 | 1921 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5929fbe7 | 1922 | /* end confdefs.h. */ |
eb697db5 | 1923 | $4 |
5929fbe7 GM |
1924 | int |
1925 | main () | |
1926 | { | |
3d608a86 J |
1927 | #ifndef $2 |
1928 | (void) $2; | |
eb697db5 | 1929 | #endif |
e6df49e4 | 1930 | |
eb697db5 | 1931 | ; |
5929fbe7 GM |
1932 | return 0; |
1933 | } | |
1934 | _ACEOF | |
eb697db5 DN |
1935 | if ac_fn_c_try_compile "$LINENO"; then : |
1936 | eval "$3=yes" | |
5929fbe7 | 1937 | else |
eb697db5 | 1938 | eval "$3=no" |
5929fbe7 | 1939 | fi |
eb697db5 | 1940 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
0c309b80 | 1941 | fi |
eb697db5 DN |
1942 | eval ac_res=\$$3 |
1943 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1944 | $as_echo "$ac_res" >&6; } | |
1945 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
8c5ff6dd | 1946 | |
eb697db5 | 1947 | } # ac_fn_c_check_decl |
0c309b80 | 1948 | |
eb697db5 DN |
1949 | # ac_fn_c_check_header_preproc LINENO HEADER VAR |
1950 | # ---------------------------------------------- | |
1951 | # Tests whether HEADER is present, setting the cache variable VAR accordingly. | |
1952 | ac_fn_c_check_header_preproc () | |
1953 | { | |
1954 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1955 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1956 | $as_echo_n "checking for $2... " >&6; } | |
3d608a86 | 1957 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : |
eb697db5 DN |
1958 | $as_echo_n "(cached) " >&6 |
1959 | else | |
1960 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1961 | /* end confdefs.h. */ | |
1962 | #include <$2> | |
1963 | _ACEOF | |
1964 | if ac_fn_c_try_cpp "$LINENO"; then : | |
1965 | eval "$3=yes" | |
1966 | else | |
1967 | eval "$3=no" | |
a4f64981 | 1968 | fi |
eb697db5 DN |
1969 | rm -f conftest.err conftest.$ac_ext |
1970 | fi | |
1971 | eval ac_res=\$$3 | |
1972 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1973 | $as_echo "$ac_res" >&6; } | |
1974 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
e6df49e4 | 1975 | |
eb697db5 | 1976 | } # ac_fn_c_check_header_preproc |
a5edbe4a | 1977 | |
eb697db5 DN |
1978 | # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES |
1979 | # ---------------------------------------------------- | |
1980 | # Tries to find if the field MEMBER exists in type AGGR, after including | |
1981 | # INCLUDES, setting cache variable VAR accordingly. | |
1982 | ac_fn_c_check_member () | |
1983 | { | |
1984 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1985 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 | |
1986 | $as_echo_n "checking for $2.$3... " >&6; } | |
3d608a86 | 1987 | if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then : |
eb697db5 DN |
1988 | $as_echo_n "(cached) " >&6 |
1989 | else | |
1990 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1991 | /* end confdefs.h. */ | |
1992 | $5 | |
1993 | int | |
1994 | main () | |
1995 | { | |
1996 | static $2 ac_aggr; | |
1997 | if (ac_aggr.$3) | |
1998 | return 0; | |
1999 | ; | |
2000 | return 0; | |
2001 | } | |
2002 | _ACEOF | |
2003 | if ac_fn_c_try_compile "$LINENO"; then : | |
2004 | eval "$4=yes" | |
2005 | else | |
2006 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2007 | /* end confdefs.h. */ | |
2008 | $5 | |
2009 | int | |
2010 | main () | |
2011 | { | |
2012 | static $2 ac_aggr; | |
2013 | if (sizeof ac_aggr.$3) | |
2014 | return 0; | |
2015 | ; | |
2016 | return 0; | |
2017 | } | |
2018 | _ACEOF | |
2019 | if ac_fn_c_try_compile "$LINENO"; then : | |
2020 | eval "$4=yes" | |
2021 | else | |
2022 | eval "$4=no" | |
8c5ff6dd | 2023 | fi |
eb697db5 | 2024 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
8c5ff6dd | 2025 | fi |
eb697db5 DN |
2026 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
2027 | fi | |
2028 | eval ac_res=\$$4 | |
2029 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2030 | $as_echo "$ac_res" >&6; } | |
2031 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
a5edbe4a | 2032 | |
eb697db5 | 2033 | } # ac_fn_c_check_member |
106c6f74 | 2034 | |
eb697db5 DN |
2035 | # ac_fn_c_check_func LINENO FUNC VAR |
2036 | # ---------------------------------- | |
2037 | # Tests whether FUNC exists, setting the cache variable VAR accordingly | |
2038 | ac_fn_c_check_func () | |
2039 | { | |
2040 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2041 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2042 | $as_echo_n "checking for $2... " >&6; } | |
3d608a86 | 2043 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : |
5929fbe7 GM |
2044 | $as_echo_n "(cached) " >&6 |
2045 | else | |
eb697db5 | 2046 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5929fbe7 | 2047 | /* end confdefs.h. */ |
eb697db5 DN |
2048 | /* Define $2 to an innocuous variant, in case <limits.h> declares $2. |
2049 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
2050 | #define $2 innocuous_$2 | |
2051 | ||
2052 | /* System header to define __stub macros and hopefully few prototypes, | |
2053 | which can conflict with char $2 (); below. | |
2054 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
2055 | <limits.h> exists even on freestanding compilers. */ | |
2056 | ||
2057 | #ifdef __STDC__ | |
2058 | # include <limits.h> | |
2059 | #else | |
2060 | # include <assert.h> | |
2061 | #endif | |
2062 | ||
2063 | #undef $2 | |
8c5ff6dd | 2064 | |
5929fbe7 GM |
2065 | /* Override any GCC internal prototype to avoid an error. |
2066 | Use char because int might match the return type of a GCC | |
2067 | builtin and then its argument prototype would still apply. */ | |
2068 | #ifdef __cplusplus | |
2069 | extern "C" | |
2070 | #endif | |
eb697db5 DN |
2071 | char $2 (); |
2072 | /* The GNU C library defines this for functions which it implements | |
2073 | to always fail with ENOSYS. Some functions are actually named | |
2074 | something starting with __ and the normal name is an alias. */ | |
2075 | #if defined __stub_$2 || defined __stub___$2 | |
2076 | choke me | |
2077 | #endif | |
2078 | ||
5929fbe7 GM |
2079 | int |
2080 | main () | |
2081 | { | |
eb697db5 | 2082 | return $2 (); |
5929fbe7 GM |
2083 | ; |
2084 | return 0; | |
2085 | } | |
2086 | _ACEOF | |
eb697db5 DN |
2087 | if ac_fn_c_try_link "$LINENO"; then : |
2088 | eval "$3=yes" | |
5929fbe7 | 2089 | else |
eb697db5 DN |
2090 | eval "$3=no" |
2091 | fi | |
2092 | rm -f core conftest.err conftest.$ac_objext \ | |
2093 | conftest$ac_exeext conftest.$ac_ext | |
2094 | fi | |
2095 | eval ac_res=\$$3 | |
2096 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2097 | $as_echo "$ac_res" >&6; } | |
2098 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2099 | ||
2100 | } # ac_fn_c_check_func | |
2101 | ||
2102 | # ac_fn_c_check_type LINENO TYPE VAR INCLUDES | |
2103 | # ------------------------------------------- | |
2104 | # Tests whether TYPE exists after having included INCLUDES, setting cache | |
2105 | # variable VAR accordingly. | |
2106 | ac_fn_c_check_type () | |
2107 | { | |
2108 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2109 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2110 | $as_echo_n "checking for $2... " >&6; } | |
3d608a86 | 2111 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : |
eb697db5 DN |
2112 | $as_echo_n "(cached) " >&6 |
2113 | else | |
2114 | eval "$3=no" | |
2115 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2116 | /* end confdefs.h. */ | |
2117 | $4 | |
2118 | int | |
2119 | main () | |
2120 | { | |
2121 | if (sizeof ($2)) | |
2122 | return 0; | |
2123 | ; | |
2124 | return 0; | |
2125 | } | |
2126 | _ACEOF | |
2127 | if ac_fn_c_try_compile "$LINENO"; then : | |
2128 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2129 | /* end confdefs.h. */ | |
2130 | $4 | |
2131 | int | |
2132 | main () | |
2133 | { | |
2134 | if (sizeof (($2))) | |
2135 | return 0; | |
2136 | ; | |
2137 | return 0; | |
2138 | } | |
2139 | _ACEOF | |
2140 | if ac_fn_c_try_compile "$LINENO"; then : | |
e6df49e4 | 2141 | |
eb697db5 DN |
2142 | else |
2143 | eval "$3=yes" | |
2144 | fi | |
2145 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2146 | fi | |
2147 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
a4f64981 | 2148 | fi |
eb697db5 DN |
2149 | eval ac_res=\$$3 |
2150 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2151 | $as_echo "$ac_res" >&6; } | |
2152 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2153 | ||
2154 | } # ac_fn_c_check_type | |
2155 | cat >config.log <<_ACEOF | |
2156 | This file contains any messages produced by compilers while | |
2157 | running configure, to aid debugging if configure makes a mistake. | |
2158 | ||
2159 | It was created by emacs $as_me 24.0.50, which was | |
3d608a86 | 2160 | generated by GNU Autoconf 2.65. Invocation command line was |
eb697db5 DN |
2161 | |
2162 | $ $0 $@ | |
2163 | ||
2164 | _ACEOF | |
2165 | exec 5>>config.log | |
2166 | { | |
2167 | cat <<_ASUNAME | |
2168 | ## --------- ## | |
2169 | ## Platform. ## | |
2170 | ## --------- ## | |
2171 | ||
2172 | hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` | |
2173 | uname -m = `(uname -m) 2>/dev/null || echo unknown` | |
2174 | uname -r = `(uname -r) 2>/dev/null || echo unknown` | |
2175 | uname -s = `(uname -s) 2>/dev/null || echo unknown` | |
2176 | uname -v = `(uname -v) 2>/dev/null || echo unknown` | |
2177 | ||
2178 | /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` | |
2179 | /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` | |
2180 | ||
2181 | /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` | |
2182 | /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` | |
2183 | /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` | |
2184 | /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` | |
2185 | /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` | |
2186 | /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` | |
2187 | /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` | |
2188 | ||
2189 | _ASUNAME | |
2190 | ||
2191 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2192 | for as_dir in $PATH | |
2193 | do | |
2194 | IFS=$as_save_IFS | |
2195 | test -z "$as_dir" && as_dir=. | |
2196 | $as_echo "PATH: $as_dir" | |
2197 | done | |
2198 | IFS=$as_save_IFS | |
2199 | ||
2200 | } >&5 | |
2201 | ||
2202 | cat >&5 <<_ACEOF | |
2203 | ||
2204 | ||
2205 | ## ----------- ## | |
2206 | ## Core tests. ## | |
2207 | ## ----------- ## | |
2208 | ||
2209 | _ACEOF | |
2210 | ||
2211 | ||
2212 | # Keep a trace of the command line. | |
2213 | # Strip out --no-create and --no-recursion so they do not pile up. | |
2214 | # Strip out --silent because we don't want to record it for future runs. | |
2215 | # Also quote any args containing shell meta-characters. | |
2216 | # Make two passes to allow for proper duplicate-argument suppression. | |
2217 | ac_configure_args= | |
2218 | ac_configure_args0= | |
2219 | ac_configure_args1= | |
2220 | ac_must_keep_next=false | |
2221 | for ac_pass in 1 2 | |
2222 | do | |
2223 | for ac_arg | |
2224 | do | |
2225 | case $ac_arg in | |
2226 | -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; | |
2227 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
2228 | | -silent | --silent | --silen | --sile | --sil) | |
2229 | continue ;; | |
2230 | *\'*) | |
2231 | ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
2232 | esac | |
2233 | case $ac_pass in | |
2234 | 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; | |
2235 | 2) | |
2236 | as_fn_append ac_configure_args1 " '$ac_arg'" | |
2237 | if test $ac_must_keep_next = true; then | |
2238 | ac_must_keep_next=false # Got value, back to normal. | |
2239 | else | |
2240 | case $ac_arg in | |
2241 | *=* | --config-cache | -C | -disable-* | --disable-* \ | |
2242 | | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | |
2243 | | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | |
2244 | | -with-* | --with-* | -without-* | --without-* | --x) | |
2245 | case "$ac_configure_args0 " in | |
2246 | "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; | |
2247 | esac | |
2248 | ;; | |
2249 | -* ) ac_must_keep_next=true ;; | |
2250 | esac | |
2251 | fi | |
2252 | as_fn_append ac_configure_args " '$ac_arg'" | |
2253 | ;; | |
2254 | esac | |
2255 | done | |
2256 | done | |
2257 | { ac_configure_args0=; unset ac_configure_args0;} | |
2258 | { ac_configure_args1=; unset ac_configure_args1;} | |
2259 | ||
2260 | # When interrupted or exit'd, cleanup temporary files, and complete | |
2261 | # config.log. We remove comments because anyway the quotes in there | |
2262 | # would cause problems or look ugly. | |
2263 | # WARNING: Use '\'' to represent an apostrophe within the trap. | |
2264 | # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. | |
2265 | trap 'exit_status=$? | |
2266 | # Save into config.log some information that might help in debugging. | |
2267 | { | |
2268 | echo | |
2269 | ||
3d608a86 J |
2270 | cat <<\_ASBOX |
2271 | ## ---------------- ## | |
eb697db5 | 2272 | ## Cache variables. ## |
3d608a86 J |
2273 | ## ---------------- ## |
2274 | _ASBOX | |
eb697db5 DN |
2275 | echo |
2276 | # The following way of writing the cache mishandles newlines in values, | |
2277 | ( | |
2278 | for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do | |
2279 | eval ac_val=\$$ac_var | |
2280 | case $ac_val in #( | |
2281 | *${as_nl}*) | |
2282 | case $ac_var in #( | |
2283 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
2284 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
2285 | esac | |
2286 | case $ac_var in #( | |
2287 | _ | IFS | as_nl) ;; #( | |
2288 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
2289 | *) { eval $ac_var=; unset $ac_var;} ;; | |
2290 | esac ;; | |
2291 | esac | |
2292 | done | |
2293 | (set) 2>&1 | | |
2294 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( | |
2295 | *${as_nl}ac_space=\ *) | |
2296 | sed -n \ | |
2297 | "s/'\''/'\''\\\\'\'''\''/g; | |
2298 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" | |
2299 | ;; #( | |
2300 | *) | |
2301 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" | |
2302 | ;; | |
2303 | esac | | |
2304 | sort | |
2305 | ) | |
2306 | echo | |
08b47d3d | 2307 | |
3d608a86 J |
2308 | cat <<\_ASBOX |
2309 | ## ----------------- ## | |
eb697db5 | 2310 | ## Output variables. ## |
3d608a86 J |
2311 | ## ----------------- ## |
2312 | _ASBOX | |
eb697db5 DN |
2313 | echo |
2314 | for ac_var in $ac_subst_vars | |
2315 | do | |
2316 | eval ac_val=\$$ac_var | |
2317 | case $ac_val in | |
2318 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
2319 | esac | |
2320 | $as_echo "$ac_var='\''$ac_val'\''" | |
2321 | done | sort | |
2322 | echo | |
a5edbe4a | 2323 | |
eb697db5 | 2324 | if test -n "$ac_subst_files"; then |
3d608a86 J |
2325 | cat <<\_ASBOX |
2326 | ## ------------------- ## | |
eb697db5 | 2327 | ## File substitutions. ## |
3d608a86 J |
2328 | ## ------------------- ## |
2329 | _ASBOX | |
eb697db5 DN |
2330 | echo |
2331 | for ac_var in $ac_subst_files | |
2332 | do | |
2333 | eval ac_val=\$$ac_var | |
2334 | case $ac_val in | |
2335 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
2336 | esac | |
2337 | $as_echo "$ac_var='\''$ac_val'\''" | |
2338 | done | sort | |
2339 | echo | |
2340 | fi | |
a5edbe4a | 2341 | |
eb697db5 | 2342 | if test -s confdefs.h; then |
3d608a86 J |
2343 | cat <<\_ASBOX |
2344 | ## ----------- ## | |
eb697db5 | 2345 | ## confdefs.h. ## |
3d608a86 J |
2346 | ## ----------- ## |
2347 | _ASBOX | |
eb697db5 DN |
2348 | echo |
2349 | cat confdefs.h | |
2350 | echo | |
2351 | fi | |
2352 | test "$ac_signal" != 0 && | |
2353 | $as_echo "$as_me: caught signal $ac_signal" | |
2354 | $as_echo "$as_me: exit $exit_status" | |
2355 | } >&5 | |
2356 | rm -f core *.core core.conftest.* && | |
2357 | rm -f -r conftest* confdefs* conf$$* $ac_clean_files && | |
2358 | exit $exit_status | |
2359 | ' 0 | |
2360 | for ac_signal in 1 2 13 15; do | |
2361 | trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal | |
2362 | done | |
2363 | ac_signal=0 | |
cd03c74a | 2364 | |
eb697db5 DN |
2365 | # confdefs.h avoids OS command line length limits that DEFS can exceed. |
2366 | rm -f -r conftest* confdefs.h | |
a5edbe4a | 2367 | |
eb697db5 | 2368 | $as_echo "/* confdefs.h */" > confdefs.h |
a4f64981 | 2369 | |
eb697db5 | 2370 | # Predefined preprocessor variables. |
8c5ff6dd | 2371 | |
eb697db5 DN |
2372 | cat >>confdefs.h <<_ACEOF |
2373 | #define PACKAGE_NAME "$PACKAGE_NAME" | |
5929fbe7 | 2374 | _ACEOF |
8c5ff6dd | 2375 | |
eb697db5 DN |
2376 | cat >>confdefs.h <<_ACEOF |
2377 | #define PACKAGE_TARNAME "$PACKAGE_TARNAME" | |
2378 | _ACEOF | |
8c5ff6dd | 2379 | |
eb697db5 DN |
2380 | cat >>confdefs.h <<_ACEOF |
2381 | #define PACKAGE_VERSION "$PACKAGE_VERSION" | |
5929fbe7 | 2382 | _ACEOF |
8c5ff6dd | 2383 | |
eb697db5 DN |
2384 | cat >>confdefs.h <<_ACEOF |
2385 | #define PACKAGE_STRING "$PACKAGE_STRING" | |
5929fbe7 | 2386 | _ACEOF |
8c5ff6dd | 2387 | |
eb697db5 DN |
2388 | cat >>confdefs.h <<_ACEOF |
2389 | #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" | |
2390 | _ACEOF | |
8c5ff6dd | 2391 | |
eb697db5 DN |
2392 | cat >>confdefs.h <<_ACEOF |
2393 | #define PACKAGE_URL "$PACKAGE_URL" | |
5929fbe7 | 2394 | _ACEOF |
8c5ff6dd | 2395 | |
8c5ff6dd | 2396 | |
eb697db5 DN |
2397 | # Let the site file select an alternate cache file if it wants to. |
2398 | # Prefer an explicitly selected file to automatically selected ones. | |
2399 | ac_site_file1=NONE | |
2400 | ac_site_file2=NONE | |
2401 | if test -n "$CONFIG_SITE"; then | |
3d608a86 | 2402 | ac_site_file1=$CONFIG_SITE |
eb697db5 DN |
2403 | elif test "x$prefix" != xNONE; then |
2404 | ac_site_file1=$prefix/share/config.site | |
2405 | ac_site_file2=$prefix/etc/config.site | |
2406 | else | |
2407 | ac_site_file1=$ac_default_prefix/share/config.site | |
2408 | ac_site_file2=$ac_default_prefix/etc/config.site | |
5929fbe7 | 2409 | fi |
eb697db5 DN |
2410 | for ac_site_file in "$ac_site_file1" "$ac_site_file2" |
2411 | do | |
2412 | test "x$ac_site_file" = xNONE && continue | |
2413 | if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then | |
2414 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 | |
2415 | $as_echo "$as_me: loading site script $ac_site_file" >&6;} | |
2416 | sed 's/^/| /' "$ac_site_file" >&5 | |
3d608a86 | 2417 | . "$ac_site_file" |
eb697db5 DN |
2418 | fi |
2419 | done | |
49ebbd65 | 2420 | |
eb697db5 DN |
2421 | if test -r "$cache_file"; then |
2422 | # Some versions of bash will fail to source /dev/null (special files | |
2423 | # actually), so we avoid doing that. DJGPP emulates it as a regular file. | |
2424 | if test /dev/null != "$cache_file" && test -f "$cache_file"; then | |
2425 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 | |
2426 | $as_echo "$as_me: loading cache $cache_file" >&6;} | |
2427 | case $cache_file in | |
2428 | [\\/]* | ?:[\\/]* ) . "$cache_file";; | |
2429 | *) . "./$cache_file";; | |
2430 | esac | |
2431 | fi | |
5929fbe7 | 2432 | else |
eb697db5 DN |
2433 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 |
2434 | $as_echo "$as_me: creating cache $cache_file" >&6;} | |
2435 | >$cache_file | |
2436 | fi | |
49ebbd65 | 2437 | |
eb697db5 DN |
2438 | as_fn_append ac_header_list " stdlib.h" |
2439 | as_fn_append ac_header_list " unistd.h" | |
2440 | as_fn_append ac_header_list " sys/param.h" | |
2441 | as_fn_append ac_header_list " sys/time.h" | |
2442 | as_fn_append ac_func_list " alarm" | |
2443 | # Check that the precious variables saved in the cache have kept the same | |
2444 | # value. | |
2445 | ac_cache_corrupted=false | |
2446 | for ac_var in $ac_precious_vars; do | |
2447 | eval ac_old_set=\$ac_cv_env_${ac_var}_set | |
2448 | eval ac_new_set=\$ac_env_${ac_var}_set | |
2449 | eval ac_old_val=\$ac_cv_env_${ac_var}_value | |
2450 | eval ac_new_val=\$ac_env_${ac_var}_value | |
2451 | case $ac_old_set,$ac_new_set in | |
2452 | set,) | |
2453 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 | |
2454 | $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} | |
2455 | ac_cache_corrupted=: ;; | |
2456 | ,set) | |
2457 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 | |
2458 | $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} | |
2459 | ac_cache_corrupted=: ;; | |
2460 | ,);; | |
2461 | *) | |
2462 | if test "x$ac_old_val" != "x$ac_new_val"; then | |
2463 | # differences in whitespace do not lead to failure. | |
2464 | ac_old_val_w=`echo x $ac_old_val` | |
2465 | ac_new_val_w=`echo x $ac_new_val` | |
2466 | if test "$ac_old_val_w" != "$ac_new_val_w"; then | |
2467 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 | |
2468 | $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} | |
2469 | ac_cache_corrupted=: | |
2470 | else | |
2471 | { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 | |
2472 | $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} | |
2473 | eval $ac_var=\$ac_old_val | |
2474 | fi | |
2475 | { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 | |
2476 | $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} | |
2477 | { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 | |
2478 | $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} | |
2479 | fi;; | |
2480 | esac | |
2481 | # Pass precious variables to config.status. | |
2482 | if test "$ac_new_set" = set; then | |
2483 | case $ac_new_val in | |
2484 | *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; | |
2485 | *) ac_arg=$ac_var=$ac_new_val ;; | |
2486 | esac | |
2487 | case " $ac_configure_args " in | |
2488 | *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. | |
2489 | *) as_fn_append ac_configure_args " '$ac_arg'" ;; | |
8c5ff6dd | 2490 | esac |
eb697db5 DN |
2491 | fi |
2492 | done | |
2493 | if $ac_cache_corrupted; then | |
2494 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
2495 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
2496 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 | |
2497 | $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} | |
3d608a86 | 2498 | as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 |
eb697db5 DN |
2499 | fi |
2500 | ## -------------------- ## | |
2501 | ## Main body of script. ## | |
2502 | ## -------------------- ## | |
2503 | ||
2504 | ac_ext=c | |
2505 | ac_cpp='$CPP $CPPFLAGS' | |
2506 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2507 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2508 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
15e12598 | 2509 | |
e6df49e4 | 2510 | |
eb697db5 | 2511 | ac_config_headers="$ac_config_headers src/config.h:src/config.in" |
49ebbd65 | 2512 | |
a4f64981 | 2513 | |
a4f64981 | 2514 | |
eb697db5 DN |
2515 | test "$program_prefix" != NONE && |
2516 | program_transform_name="s&^&$program_prefix&;$program_transform_name" | |
2517 | # Use a double $ so make ignores it. | |
2518 | test "$program_suffix" != NONE && | |
2519 | program_transform_name="s&\$&$program_suffix&;$program_transform_name" | |
2520 | # Double any \ or $. | |
2521 | # By default was `s,x,x', remove it if useless. | |
2522 | ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' | |
2523 | program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` | |
a4f64981 | 2524 | |
49ebbd65 | 2525 | |
eb697db5 DN |
2526 | lispdir='${datadir}/emacs/${version}/lisp' |
2527 | locallisppath='${datadir}/emacs/${version}/site-lisp:'\ | |
2528 | '${datadir}/emacs/site-lisp' | |
2529 | lisppath='${locallisppath}:${lispdir}:${datadir}/emacs/${version}/leim' | |
2530 | etcdir='${datadir}/emacs/${version}/etc' | |
2531 | archlibdir='${libexecdir}/emacs/${version}/${configuration}' | |
2532 | docdir='${datadir}/emacs/${version}/etc' | |
2533 | gamedir='${localstatedir}/games/emacs' | |
49ebbd65 | 2534 | |
eb697db5 | 2535 | gameuser=games |
49ebbd65 | 2536 | |
49ebbd65 | 2537 | |
a4f64981 | 2538 | |
eb697db5 DN |
2539 | |
2540 | # Check whether --with-pop was given. | |
2541 | if test "${with_pop+set}" = set; then : | |
2542 | withval=$with_pop; | |
5929fbe7 | 2543 | else |
eb697db5 DN |
2544 | with_pop=yes |
2545 | fi | |
2546 | ||
2547 | if test "$with_pop" = yes; then | |
2548 | $as_echo "#define MAIL_USE_POP 1" >>confdefs.h | |
a4f64981 | 2549 | |
5929fbe7 GM |
2550 | fi |
2551 | ||
5929fbe7 | 2552 | |
eb697db5 DN |
2553 | # Check whether --with-kerberos was given. |
2554 | if test "${with_kerberos+set}" = set; then : | |
2555 | withval=$with_kerberos; | |
5929fbe7 | 2556 | else |
eb697db5 DN |
2557 | with_kerberos=no |
2558 | fi | |
2559 | ||
2560 | if test "$with_kerberos" != no; then | |
2561 | $as_echo "#define KERBEROS 1" >>confdefs.h | |
9452ded1 | 2562 | |
5929fbe7 | 2563 | fi |
a4f64981 | 2564 | |
15e12598 | 2565 | |
eb697db5 DN |
2566 | # Check whether --with-kerberos5 was given. |
2567 | if test "${with_kerberos5+set}" = set; then : | |
2568 | withval=$with_kerberos5; | |
5929fbe7 | 2569 | else |
eb697db5 | 2570 | with_kerberos5=no |
a4f64981 GM |
2571 | fi |
2572 | ||
eb697db5 DN |
2573 | if test "${with_kerberos5}" != no; then |
2574 | if test "${with_kerberos}" = no; then | |
2575 | with_kerberos=yes | |
2576 | $as_echo "#define KERBEROS 1" >>confdefs.h | |
a4f64981 | 2577 | |
5929fbe7 | 2578 | fi |
a5edbe4a | 2579 | |
eb697db5 | 2580 | $as_echo "#define KERBEROS5 1" >>confdefs.h |
a4f64981 | 2581 | |
eb697db5 | 2582 | fi |
a4f64981 | 2583 | |
a5edbe4a | 2584 | |
eb697db5 DN |
2585 | # Check whether --with-hesiod was given. |
2586 | if test "${with_hesiod+set}" = set; then : | |
2587 | withval=$with_hesiod; | |
49ebbd65 | 2588 | else |
eb697db5 DN |
2589 | with_hesiod=no |
2590 | fi | |
5929fbe7 | 2591 | |
eb697db5 | 2592 | if test "$with_hesiod" != no; then |
5929fbe7 | 2593 | |
eb697db5 | 2594 | $as_echo "#define HESIOD 1" >>confdefs.h |
5929fbe7 | 2595 | |
eb697db5 | 2596 | fi |
5929fbe7 | 2597 | |
5929fbe7 | 2598 | |
eb697db5 DN |
2599 | # Check whether --with-mmdf was given. |
2600 | if test "${with_mmdf+set}" = set; then : | |
2601 | withval=$with_mmdf; | |
8c5ff6dd | 2602 | else |
eb697db5 | 2603 | with_mmdf=no |
15e12598 | 2604 | fi |
5929fbe7 | 2605 | |
eb697db5 | 2606 | if test "$with_mmdf" != no; then |
a5edbe4a | 2607 | |
eb697db5 | 2608 | $as_echo "#define MAIL_USE_MMDF 1" >>confdefs.h |
a5edbe4a | 2609 | |
8c5ff6dd | 2610 | fi |
5929fbe7 | 2611 | |
5929fbe7 | 2612 | |
eb697db5 DN |
2613 | # Check whether --with-mail-unlink was given. |
2614 | if test "${with_mail_unlink+set}" = set; then : | |
2615 | withval=$with_mail_unlink; | |
8c5ff6dd | 2616 | else |
eb697db5 | 2617 | with_mail_unlink=no |
8c5ff6dd | 2618 | fi |
5929fbe7 | 2619 | |
eb697db5 DN |
2620 | if test "$with_mail_unlink" != no; then |
2621 | ||
2622 | $as_echo "#define MAIL_UNLINK_SPOOL 1" >>confdefs.h | |
2623 | ||
8c5ff6dd | 2624 | fi |
a5edbe4a | 2625 | |
5929fbe7 | 2626 | |
eb697db5 DN |
2627 | # Check whether --with-mailhost was given. |
2628 | if test "${with_mailhost+set}" = set; then : | |
2629 | withval=$with_mailhost; | |
2630 | cat >>confdefs.h <<_ACEOF | |
2631 | #define MAILHOST "$withval" | |
5929fbe7 GM |
2632 | _ACEOF |
2633 | ||
8c5ff6dd | 2634 | fi |
a4f64981 | 2635 | |
5929fbe7 | 2636 | |
5929fbe7 | 2637 | |
eb697db5 DN |
2638 | # Check whether --with-sound was given. |
2639 | if test "${with_sound+set}" = set; then : | |
2640 | withval=$with_sound; | |
2641 | else | |
2642 | with_sound=yes | |
2643 | fi | |
5929fbe7 | 2644 | |
5929fbe7 | 2645 | |
a4f64981 | 2646 | |
eb697db5 DN |
2647 | # Check whether --with-sync-input was given. |
2648 | if test "${with_sync_input+set}" = set; then : | |
2649 | withval=$with_sync_input; | |
8c5ff6dd | 2650 | else |
eb697db5 | 2651 | with_sync_input=yes |
8c5ff6dd | 2652 | fi |
a4f64981 | 2653 | |
eb697db5 | 2654 | if test "$with_sync_input" = yes; then |
a4f64981 | 2655 | |
eb697db5 | 2656 | $as_echo "#define SYNC_INPUT 1" >>confdefs.h |
5929fbe7 | 2657 | |
eb697db5 | 2658 | fi |
5929fbe7 | 2659 | |
5929fbe7 | 2660 | |
eb697db5 DN |
2661 | # Check whether --with-x-toolkit was given. |
2662 | if test "${with_x_toolkit+set}" = set; then : | |
2663 | withval=$with_x_toolkit; case "${withval}" in | |
2664 | y | ye | yes ) val=gtk ;; | |
2665 | n | no ) val=no ;; | |
2666 | l | lu | luc | luci | lucid ) val=lucid ;; | |
2667 | a | at | ath | athe | athen | athena ) val=athena ;; | |
2668 | m | mo | mot | moti | motif ) val=motif ;; | |
2669 | g | gt | gtk ) val=gtk ;; | |
e547b051 | 2670 | gtk3 ) val=gtk3 ;; |
eb697db5 | 2671 | * ) |
3d608a86 | 2672 | as_fn_error "\`--with-x-toolkit=$withval' is invalid; |
e547b051 J |
2673 | this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif', \`gtk' or |
2674 | \`gtk3'. \`yes' and \`gtk' are synonyms. \`athena' and \`lucid' are synonyms." "$LINENO" 5 | |
eb697db5 DN |
2675 | ;; |
2676 | esac | |
2677 | with_x_toolkit=$val | |
5929fbe7 | 2678 | |
eb697db5 | 2679 | fi |
5929fbe7 | 2680 | |
5929fbe7 GM |
2681 | |
2682 | ||
eb697db5 DN |
2683 | # Check whether --with-xpm was given. |
2684 | if test "${with_xpm+set}" = set; then : | |
2685 | withval=$with_xpm; | |
2686 | else | |
2687 | with_xpm=yes | |
2688 | fi | |
5929fbe7 | 2689 | |
5929fbe7 | 2690 | |
eb697db5 DN |
2691 | # Check whether --with-jpeg was given. |
2692 | if test "${with_jpeg+set}" = set; then : | |
2693 | withval=$with_jpeg; | |
2694 | else | |
2695 | with_jpeg=yes | |
2696 | fi | |
5929fbe7 GM |
2697 | |
2698 | ||
eb697db5 DN |
2699 | # Check whether --with-tiff was given. |
2700 | if test "${with_tiff+set}" = set; then : | |
2701 | withval=$with_tiff; | |
2702 | else | |
2703 | with_tiff=yes | |
2704 | fi | |
5929fbe7 GM |
2705 | |
2706 | ||
eb697db5 DN |
2707 | # Check whether --with-gif was given. |
2708 | if test "${with_gif+set}" = set; then : | |
2709 | withval=$with_gif; | |
2710 | else | |
2711 | with_gif=yes | |
2712 | fi | |
5929fbe7 | 2713 | |
5929fbe7 | 2714 | |
eb697db5 DN |
2715 | # Check whether --with-png was given. |
2716 | if test "${with_png+set}" = set; then : | |
2717 | withval=$with_png; | |
2718 | else | |
2719 | with_png=yes | |
8c5ff6dd | 2720 | fi |
5929fbe7 GM |
2721 | |
2722 | ||
eb697db5 DN |
2723 | # Check whether --with-rsvg was given. |
2724 | if test "${with_rsvg+set}" = set; then : | |
2725 | withval=$with_rsvg; | |
2726 | else | |
2727 | with_rsvg=yes | |
2728 | fi | |
5929fbe7 GM |
2729 | |
2730 | ||
5929fbe7 | 2731 | |
eb697db5 DN |
2732 | # Check whether --with-xft was given. |
2733 | if test "${with_xft+set}" = set; then : | |
2734 | withval=$with_xft; | |
8c5ff6dd | 2735 | else |
eb697db5 | 2736 | with_xft=yes |
8c5ff6dd | 2737 | fi |
eb697db5 DN |
2738 | |
2739 | ||
2740 | # Check whether --with-libotf was given. | |
2741 | if test "${with_libotf+set}" = set; then : | |
2742 | withval=$with_libotf; | |
8c5ff6dd | 2743 | else |
eb697db5 | 2744 | with_libotf=yes |
8c5ff6dd | 2745 | fi |
e6df49e4 GM |
2746 | |
2747 | ||
eb697db5 DN |
2748 | # Check whether --with-m17n-flt was given. |
2749 | if test "${with_m17n_flt+set}" = set; then : | |
2750 | withval=$with_m17n_flt; | |
2751 | else | |
2752 | with_m17n_flt=yes | |
2753 | fi | |
2754 | ||
5929fbe7 | 2755 | |
5929fbe7 | 2756 | |
eb697db5 DN |
2757 | # Check whether --with-toolkit-scroll-bars was given. |
2758 | if test "${with_toolkit_scroll_bars+set}" = set; then : | |
2759 | withval=$with_toolkit_scroll_bars; | |
2760 | else | |
2761 | with_toolkit_scroll_bars=yes | |
2762 | fi | |
5929fbe7 | 2763 | |
5929fbe7 | 2764 | |
eb697db5 DN |
2765 | # Check whether --with-xaw3d was given. |
2766 | if test "${with_xaw3d+set}" = set; then : | |
2767 | withval=$with_xaw3d; | |
2768 | else | |
2769 | with_xaw3d=yes | |
2770 | fi | |
5929fbe7 | 2771 | |
5929fbe7 | 2772 | |
eb697db5 DN |
2773 | # Check whether --with-xim was given. |
2774 | if test "${with_xim+set}" = set; then : | |
2775 | withval=$with_xim; | |
2776 | else | |
2777 | with_xim=yes | |
2778 | fi | |
5929fbe7 GM |
2779 | |
2780 | ||
eb697db5 DN |
2781 | # Check whether --with-ns was given. |
2782 | if test "${with_ns+set}" = set; then : | |
2783 | withval=$with_ns; | |
2784 | else | |
2785 | with_ns=no | |
2786 | fi | |
5929fbe7 | 2787 | |
5929fbe7 | 2788 | |
eb697db5 DN |
2789 | |
2790 | # Check whether --with-gpm was given. | |
2791 | if test "${with_gpm+set}" = set; then : | |
2792 | withval=$with_gpm; | |
2793 | else | |
2794 | with_gpm=yes | |
8c5ff6dd | 2795 | fi |
5929fbe7 GM |
2796 | |
2797 | ||
eb697db5 DN |
2798 | # Check whether --with-dbus was given. |
2799 | if test "${with_dbus+set}" = set; then : | |
2800 | withval=$with_dbus; | |
2801 | else | |
2802 | with_dbus=yes | |
2803 | fi | |
5929fbe7 GM |
2804 | |
2805 | ||
eb697db5 DN |
2806 | # Check whether --with-gconf was given. |
2807 | if test "${with_gconf+set}" = set; then : | |
2808 | withval=$with_gconf; | |
2809 | else | |
2810 | with_gconf=yes | |
2811 | fi | |
5929fbe7 | 2812 | |
5929fbe7 | 2813 | |
eb697db5 DN |
2814 | # Check whether --with-selinux was given. |
2815 | if test "${with_selinux+set}" = set; then : | |
2816 | withval=$with_selinux; | |
8c5ff6dd | 2817 | else |
eb697db5 DN |
2818 | with_selinux=yes |
2819 | fi | |
5929fbe7 | 2820 | |
5929fbe7 | 2821 | |
eb697db5 DN |
2822 | ## For the times when you want to build Emacs but don't have |
2823 | ## a suitable makeinfo, and can live without the manuals. | |
5929fbe7 | 2824 | |
eb697db5 DN |
2825 | # Check whether --with-makeinfo was given. |
2826 | if test "${with_makeinfo+set}" = set; then : | |
2827 | withval=$with_makeinfo; | |
2828 | else | |
2829 | with_makeinfo=yes | |
2830 | fi | |
5929fbe7 | 2831 | |
5929fbe7 | 2832 | |
e547b051 J |
2833 | ## This is an option because I do not know if all info/man support |
2834 | ## compressed files, nor how to test if they do so. | |
2835 | ||
2836 | # Check whether --with-compress-info was given. | |
2837 | if test "${with_compress_info+set}" = set; then : | |
2838 | withval=$with_compress_info; | |
2839 | else | |
2840 | with_compress_info=yes | |
2841 | fi | |
2842 | ||
2843 | if test $with_compress_info = yes; then | |
2844 | GZIP_INFO=yes | |
2845 | else | |
2846 | GZIP_INFO= | |
2847 | fi | |
2848 | ||
2849 | ||
0c309b80 | 2850 | |
eb697db5 DN |
2851 | # Check whether --with-pkg-config-prog was given. |
2852 | if test "${with_pkg_config_prog+set}" = set; then : | |
2853 | withval=$with_pkg_config_prog; | |
8c5ff6dd | 2854 | fi |
5929fbe7 | 2855 | |
eb697db5 DN |
2856 | if test "X${with_pkg_config_prog}" != X; then |
2857 | if test "${with_pkg_config_prog}" != yes; then | |
2858 | PKG_CONFIG="${with_pkg_config_prog}" | |
2859 | fi | |
8c5ff6dd | 2860 | fi |
e6df49e4 | 2861 | |
eb697db5 | 2862 | CRT_DIR= |
a4f64981 | 2863 | |
eb697db5 DN |
2864 | # Check whether --with-crt-dir was given. |
2865 | if test "${with_crt_dir+set}" = set; then : | |
2866 | withval=$with_crt_dir; | |
2867 | fi | |
2868 | ||
2869 | CRT_DIR="${with_crt_dir}" | |
5929fbe7 | 2870 | |
e6df49e4 | 2871 | |
eb697db5 DN |
2872 | # Check whether --with-gnustep-conf was given. |
2873 | if test "${with_gnustep_conf+set}" = set; then : | |
2874 | withval=$with_gnustep_conf; | |
15e12598 | 2875 | fi |
e6df49e4 | 2876 | |
eb697db5 DN |
2877 | test "X${with_gnustep_conf}" != X && test "${with_gnustep_conf}" != yes && \ |
2878 | GNUSTEP_CONFIG_FILE="${with_gnustep_conf}" | |
2879 | test "X$GNUSTEP_CONFIG_FILE" = "X" && \ | |
2880 | GNUSTEP_CONFIG_FILE=/etc/GNUstep/GNUstep.conf | |
e6df49e4 | 2881 | |
eb697db5 DN |
2882 | # Check whether --enable-ns-self-contained was given. |
2883 | if test "${enable_ns_self_contained+set}" = set; then : | |
2884 | enableval=$enable_ns_self_contained; EN_NS_SELF_CONTAINED=$enableval | |
2885 | else | |
2886 | EN_NS_SELF_CONTAINED=yes | |
2887 | fi | |
e6df49e4 | 2888 | |
5929fbe7 | 2889 | |
eb697db5 DN |
2890 | # Check whether --enable-asserts was given. |
2891 | if test "${enable_asserts+set}" = set; then : | |
2892 | enableval=$enable_asserts; USE_XASSERTS=$enableval | |
2893 | else | |
2894 | USE_XASSERTS=no | |
2895 | fi | |
a4f64981 GM |
2896 | |
2897 | ||
eb697db5 DN |
2898 | # Check whether --enable-maintainer-mode was given. |
2899 | if test "${enable_maintainer_mode+set}" = set; then : | |
2900 | enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval | |
5929fbe7 | 2901 | else |
eb697db5 DN |
2902 | USE_MAINTAINER_MODE=no |
2903 | fi | |
a4f64981 | 2904 | |
eb697db5 DN |
2905 | if test $USE_MAINTAINER_MODE = yes; then |
2906 | MAINT= | |
2907 | else | |
2908 | MAINT=# | |
2909 | fi | |
e6df49e4 | 2910 | |
5929fbe7 | 2911 | |
eb697db5 DN |
2912 | # Check whether --enable-locallisppath was given. |
2913 | if test "${enable_locallisppath+set}" = set; then : | |
2914 | enableval=$enable_locallisppath; if test "${enableval}" = "no"; then | |
2915 | locallisppath= | |
2916 | elif test "${enableval}" != "yes"; then | |
2917 | locallisppath=${enableval} | |
2918 | fi | |
2919 | fi | |
5929fbe7 | 2920 | |
5929fbe7 | 2921 | |
eb697db5 DN |
2922 | # Check whether --enable-checking was given. |
2923 | if test "${enable_checking+set}" = set; then : | |
2924 | enableval=$enable_checking; ac_checking_flags="${enableval}" | |
2925 | fi | |
2926 | ||
2927 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS," | |
2928 | for check in $ac_checking_flags | |
2929 | do | |
2930 | case $check in | |
2931 | # these set all the flags to specific states | |
2932 | yes) ac_enable_checking=1 ;; | |
2933 | no) ac_enable_checking= ; | |
2934 | ac_gc_check_stringbytes= ; | |
2935 | ac_gc_check_string_overrun= ; | |
2936 | ac_gc_check_string_free_list= ; | |
2937 | ac_xmalloc_overrun= ; | |
2938 | ac_gc_check_cons_list= ;; | |
2939 | all) ac_enable_checking=1 ; | |
2940 | ac_gc_check_stringbytes=1 ; | |
2941 | ac_gc_check_string_overrun=1 ; | |
2942 | ac_gc_check_string_free_list=1 ; | |
2943 | ac_xmalloc_overrun=1 ; | |
2944 | ac_gc_check_cons_list=1 ;; | |
2945 | # these enable particular checks | |
2946 | stringbytes) ac_gc_check_stringbytes=1 ;; | |
2947 | stringoverrun) ac_gc_check_string_overrun=1 ;; | |
2948 | stringfreelist) ac_gc_check_string_free_list=1 ;; | |
2949 | xmallocoverrun) ac_xmalloc_overrun=1 ;; | |
2950 | conslist) ac_gc_check_cons_list=1 ;; | |
3d608a86 | 2951 | *) as_fn_error "unknown check category $check" "$LINENO" 5 ;; |
eb697db5 DN |
2952 | esac |
2953 | done | |
2954 | IFS="$ac_save_IFS" | |
2955 | ||
2956 | if test x$ac_enable_checking != x ; then | |
2957 | ||
2958 | $as_echo "#define ENABLE_CHECKING 1" >>confdefs.h | |
2959 | ||
2960 | fi | |
2961 | if test x$ac_gc_check_stringbytes != x ; then | |
2962 | ||
2963 | $as_echo "#define GC_CHECK_STRING_BYTES 1" >>confdefs.h | |
5929fbe7 | 2964 | |
5929fbe7 | 2965 | fi |
eb697db5 DN |
2966 | if test x$ac_gc_check_stringoverrun != x ; then |
2967 | ||
2968 | $as_echo "#define GC_CHECK_STRING_OVERRUN 1" >>confdefs.h | |
5929fbe7 | 2969 | |
5929fbe7 | 2970 | fi |
eb697db5 DN |
2971 | if test x$ac_gc_check_string_free_list != x ; then |
2972 | ||
2973 | $as_echo "#define GC_CHECK_STRING_FREE_LIST 1" >>confdefs.h | |
2974 | ||
5929fbe7 | 2975 | fi |
eb697db5 | 2976 | if test x$ac_xmalloc_overrun != x ; then |
a4f64981 | 2977 | |
eb697db5 | 2978 | $as_echo "#define XMALLOC_OVERRUN_CHECK 1" >>confdefs.h |
5929fbe7 | 2979 | |
eb697db5 DN |
2980 | fi |
2981 | if test x$ac_gc_check_cons_list != x ; then | |
5929fbe7 | 2982 | |
eb697db5 | 2983 | $as_echo "#define GC_CHECK_CONS_LIST 1" >>confdefs.h |
5929fbe7 | 2984 | |
eb697db5 DN |
2985 | fi |
2986 | ||
d9170db5 DN |
2987 | # Check whether --enable-use-lisp-union-type was given. |
2988 | if test "${enable_use_lisp_union_type+set}" = set; then : | |
2989 | enableval=$enable_use_lisp_union_type; if test "${enableval}" != "no"; then | |
2990 | ||
2991 | $as_echo "#define USE_LISP_UNION_TYPE 1" >>confdefs.h | |
2992 | ||
2993 | fi | |
2994 | fi | |
2995 | ||
2996 | ||
2997 | ||
eb697db5 DN |
2998 | # Check whether --enable-profiling was given. |
2999 | if test "${enable_profiling+set}" = set; then : | |
3000 | enableval=$enable_profiling; ac_enable_profiling="${enableval}" | |
3001 | fi | |
3002 | ||
3003 | if test x$ac_enable_profiling != x ; then | |
3004 | PROFILING_CFLAGS="-DPROFILING=1 -pg" | |
3005 | PROFILING_LDFLAGS="-pg" | |
5929fbe7 | 3006 | else |
eb697db5 DN |
3007 | PROFILING_CFLAGS= |
3008 | PROFILING_LDFLAGS= | |
3009 | fi | |
a4f64981 | 3010 | |
e6cfa7c3 AS |
3011 | |
3012 | ||
eb697db5 DN |
3013 | # Check whether --enable-autodepend was given. |
3014 | if test "${enable_autodepend+set}" = set; then : | |
3015 | enableval=$enable_autodepend; ac_enable_autodepend="${enableval}" | |
3016 | else | |
3017 | ac_enable_autodepend=yes | |
3018 | fi | |
8c5ff6dd | 3019 | |
eb697db5 DN |
3020 | |
3021 | #### Make srcdir absolute, if it isn't already. It's important to | |
3022 | #### avoid running the path through pwd unnecessarily, since pwd can | |
3023 | #### give you automounter prefixes, which can go away. We do all this | |
3024 | #### so Emacs can find its files when run uninstalled. | |
3025 | ## Make sure CDPATH doesn't affect cd (in case PWD is relative). | |
3026 | unset CDPATH | |
3027 | case "${srcdir}" in | |
3028 | /* ) ;; | |
3029 | . ) | |
3030 | ## We may be able to use the $PWD environment variable to make this | |
3031 | ## absolute. But sometimes PWD is inaccurate. | |
3032 | ## Note: we used to use ${PWD} at the end instead of `pwd`, | |
3033 | ## but that tested only for a well-formed and valid PWD, | |
3034 | ## it did not object when PWD was well-formed and valid but just wrong. | |
3035 | if test ".${PWD}" != "." && test ".`(cd ${PWD} ; sh -c pwd)`" = ".`pwd`" ; | |
3036 | then | |
3037 | srcdir="$PWD" | |
3038 | else | |
3039 | srcdir="`(cd ${srcdir}; pwd)`" | |
3040 | fi | |
3041 | ;; | |
3042 | * ) srcdir="`(cd ${srcdir}; pwd)`" ;; | |
a4f64981 | 3043 | esac |
e6df49e4 | 3044 | |
eb697db5 DN |
3045 | #### Check if the source directory already has a configured system in it. |
3046 | if test `pwd` != `(cd ${srcdir} && pwd)` \ | |
3047 | && test -f "${srcdir}/src/config.h" ; then | |
3048 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The directory tree \`${srcdir}' is being used | |
3049 | as a build directory right now; it has been configured in its own | |
3050 | right. To configure in another directory as well, you MUST | |
3051 | use GNU make. If you do not have GNU make, then you must | |
3052 | now do \`make distclean' in ${srcdir}, | |
3053 | and then run $0 again." >&5 | |
3054 | $as_echo "$as_me: WARNING: The directory tree \`${srcdir}' is being used | |
3055 | as a build directory right now; it has been configured in its own | |
3056 | right. To configure in another directory as well, you MUST | |
3057 | use GNU make. If you do not have GNU make, then you must | |
3058 | now do \`make distclean' in ${srcdir}, | |
3059 | and then run $0 again." >&2;} | |
5929fbe7 GM |
3060 | fi |
3061 | ||
eb697db5 DN |
3062 | #### Given the configuration name, set machfile and opsysfile to the |
3063 | #### names of the m/*.h and s/*.h files we should use. | |
3064 | ||
3065 | ### Canonicalize the configuration name. | |
3066 | ||
3067 | ac_aux_dir= | |
3068 | for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do | |
3d608a86 J |
3069 | for ac_t in install-sh install.sh shtool; do |
3070 | if test -f "$ac_dir/$ac_t"; then | |
3071 | ac_aux_dir=$ac_dir | |
3072 | ac_install_sh="$ac_aux_dir/$ac_t -c" | |
3073 | break 2 | |
3074 | fi | |
3075 | done | |
eb697db5 DN |
3076 | done |
3077 | if test -z "$ac_aux_dir"; then | |
3d608a86 | 3078 | as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 |
5929fbe7 | 3079 | fi |
eb697db5 DN |
3080 | |
3081 | # These three variables are undocumented and unsupported, | |
3082 | # and are intended to be withdrawn in a future Autoconf release. | |
3083 | # They can cause serious problems if a builder's source tree is in a directory | |
3084 | # whose full name contains unusual characters. | |
3085 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. | |
3086 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. | |
3087 | ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. | |
3088 | ||
3089 | ||
3090 | # Make sure we can run config.sub. | |
3091 | $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || | |
3d608a86 | 3092 | as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 |
eb697db5 DN |
3093 | |
3094 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 | |
3095 | $as_echo_n "checking build system type... " >&6; } | |
3096 | if test "${ac_cv_build+set}" = set; then : | |
3097 | $as_echo_n "(cached) " >&6 | |
8c5ff6dd | 3098 | else |
eb697db5 DN |
3099 | ac_build_alias=$build_alias |
3100 | test "x$ac_build_alias" = x && | |
3101 | ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` | |
3102 | test "x$ac_build_alias" = x && | |
3d608a86 | 3103 | as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 |
eb697db5 | 3104 | ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || |
3d608a86 | 3105 | as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 |
eb697db5 | 3106 | |
15e12598 | 3107 | fi |
eb697db5 DN |
3108 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 |
3109 | $as_echo "$ac_cv_build" >&6; } | |
3110 | case $ac_cv_build in | |
3111 | *-*-*) ;; | |
3d608a86 | 3112 | *) as_fn_error "invalid value of canonical build" "$LINENO" 5;; |
eb697db5 DN |
3113 | esac |
3114 | build=$ac_cv_build | |
3115 | ac_save_IFS=$IFS; IFS='-' | |
3116 | set x $ac_cv_build | |
3117 | shift | |
3118 | build_cpu=$1 | |
3119 | build_vendor=$2 | |
3120 | shift; shift | |
3121 | # Remember, the first character of IFS is used to create $*, | |
3122 | # except with old shells: | |
3123 | build_os=$* | |
3124 | IFS=$ac_save_IFS | |
3125 | case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac | |
15e12598 | 3126 | |
5929fbe7 | 3127 | |
eb697db5 DN |
3128 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 |
3129 | $as_echo_n "checking host system type... " >&6; } | |
3130 | if test "${ac_cv_host+set}" = set; then : | |
5929fbe7 GM |
3131 | $as_echo_n "(cached) " >&6 |
3132 | else | |
eb697db5 DN |
3133 | if test "x$host_alias" = x; then |
3134 | ac_cv_host=$ac_cv_build | |
3135 | else | |
3136 | ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || | |
3d608a86 | 3137 | as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 |
eb697db5 | 3138 | fi |
5929fbe7 | 3139 | |
eb697db5 DN |
3140 | fi |
3141 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 | |
3142 | $as_echo "$ac_cv_host" >&6; } | |
3143 | case $ac_cv_host in | |
3144 | *-*-*) ;; | |
3d608a86 | 3145 | *) as_fn_error "invalid value of canonical host" "$LINENO" 5;; |
eb697db5 DN |
3146 | esac |
3147 | host=$ac_cv_host | |
3148 | ac_save_IFS=$IFS; IFS='-' | |
3149 | set x $ac_cv_host | |
3150 | shift | |
3151 | host_cpu=$1 | |
3152 | host_vendor=$2 | |
3153 | shift; shift | |
3154 | # Remember, the first character of IFS is used to create $*, | |
3155 | # except with old shells: | |
3156 | host_os=$* | |
3157 | IFS=$ac_save_IFS | |
3158 | case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac | |
5929fbe7 | 3159 | |
5929fbe7 | 3160 | |
eb697db5 DN |
3161 | canonical=$host |
3162 | configuration=${host_alias-${build_alias-$host}} | |
5929fbe7 | 3163 | |
5929fbe7 | 3164 | |
5929fbe7 | 3165 | |
eb697db5 DN |
3166 | ### If you add support for a new configuration, add code to this |
3167 | ### switch statement to recognize your configuration name and select | |
3168 | ### the appropriate operating system and machine description files. | |
8c5ff6dd | 3169 | |
eb697db5 DN |
3170 | ### You would hope that you could choose an m/*.h file pretty much |
3171 | ### based on the machine portion of the configuration name, and an s/*.h | |
3172 | ### file based on the operating system portion. However, it turns out | |
3173 | ### that each m/*.h file is pretty manufacturer-specific - for | |
3174 | ### example mips.h is MIPS | |
3175 | ### So we basically have to have a special case for each | |
3176 | ### configuration name. | |
3177 | ### | |
3178 | ### As far as handling version numbers on operating systems is | |
3179 | ### concerned, make sure things will fail in a fixable way. If | |
3180 | ### /etc/MACHINES doesn't say anything about version numbers, be | |
3181 | ### prepared to handle anything reasonably. If version numbers | |
3182 | ### matter, be sure /etc/MACHINES says something about it. | |
3183 | ||
3184 | machine='' opsys='' unported=no | |
3185 | case "${canonical}" in | |
3186 | ||
3187 | ## FreeBSD ports | |
3188 | *-*-freebsd* ) | |
3189 | opsys=freebsd | |
3190 | case "${canonical}" in | |
3191 | alpha*) machine=alpha ;; | |
3192 | amd64-*|x86_64-*) machine=amdx86-64 ;; | |
3193 | arm*) machine=arm ;; | |
3194 | ia64-*) machine=ia64 ;; | |
3195 | i[3456]86-*) machine=intel386 ;; | |
3196 | powerpc-*) machine=macppc ;; | |
3197 | sparc-*) machine=sparc ;; | |
3198 | sparc64-*) machine=sparc ;; | |
3199 | esac | |
3200 | ;; | |
5929fbe7 | 3201 | |
eb697db5 DN |
3202 | ## FreeBSD kernel + glibc based userland |
3203 | *-*-kfreebsd*gnu* ) | |
3204 | opsys=gnu-kfreebsd | |
3205 | case "${canonical}" in | |
3206 | alpha*) machine=alpha ;; | |
3207 | amd64-*|x86_64-*) machine=amdx86-64 ;; | |
3208 | ia64-*) machine=ia64 ;; | |
3209 | i[3456]86-*) machine=intel386 ;; | |
3210 | powerpc-*) machine=macppc ;; | |
3211 | sparc-*) machine=sparc ;; | |
3212 | sparc64-*) machine=sparc ;; | |
3213 | esac | |
3214 | ;; | |
5929fbe7 | 3215 | |
eb697db5 DN |
3216 | ## NetBSD ports |
3217 | *-*-netbsd* ) | |
3218 | opsys=netbsd | |
3219 | case "${canonical}" in | |
3220 | alpha*) machine=alpha ;; | |
3221 | x86_64-*) machine=amdx86-64 ;; | |
3222 | arm-*) machine=arm ;; | |
3223 | hppa-*) machine=hp800 ;; | |
3224 | i[3456]86-*) machine=intel386 ;; | |
3225 | m68k-*) machine=m68k ;; | |
3226 | powerpc-*) machine=macppc ;; | |
3227 | mips-*) machine=mips ;; | |
3228 | mipse[bl]-*) machine=mips ;; | |
3229 | sparc*-) machine=sparc ;; | |
3230 | vax-*) machine=vax ;; | |
3231 | esac | |
3232 | ;; | |
e6df49e4 | 3233 | |
eb697db5 DN |
3234 | ## OpenBSD ports |
3235 | *-*-openbsd* ) | |
3236 | opsys=openbsd | |
3237 | case "${canonical}" in | |
3238 | alpha*) machine=alpha ;; | |
3239 | x86_64-*) machine=amdx86-64 ;; | |
3240 | arm-*) machine=arm ;; | |
3241 | hppa-*) machine=hp800 ;; | |
3242 | i386-*) machine=intel386 ;; | |
3243 | powerpc-*) machine=macppc ;; | |
3244 | sparc*) machine=sparc ;; | |
3245 | vax-*) machine=vax ;; | |
3246 | esac | |
3247 | ;; | |
e6df49e4 | 3248 | |
eb697db5 DN |
3249 | alpha*-*-linux-gnu* ) |
3250 | machine=alpha opsys=gnu-linux | |
3251 | ;; | |
e6df49e4 | 3252 | |
eb697db5 DN |
3253 | arm*-*-linux-gnu* ) |
3254 | machine=arm opsys=gnu-linux | |
3255 | ;; | |
5929fbe7 | 3256 | |
eb697db5 DN |
3257 | ## Apple Darwin / Mac OS X |
3258 | *-apple-darwin* ) | |
3259 | case "${canonical}" in | |
3260 | i[3456]86-* ) machine=intel386 ;; | |
3261 | powerpc-* ) machine=macppc ;; | |
3262 | x86_64-* ) machine=amdx86-64 ;; | |
3263 | * ) unported=yes ;; | |
3264 | esac | |
3265 | opsys=darwin | |
3266 | # Define CPP as follows to make autoconf work correctly. | |
3267 | CPP="${CC-cc} -E -no-cpp-precomp" | |
3268 | # Use fink packages if available. | |
3269 | if test -d /sw/include && test -d /sw/lib; then | |
3270 | GCC_TEST_OPTIONS="-I/sw/include -L/sw/lib" | |
3271 | CPP="${CPP} ${GCC_TEST_OPTIONS}" | |
3272 | NON_GCC_TEST_OPTIONS=${GCC_TEST_OPTIONS} | |
3273 | fi | |
3274 | ;; | |
5929fbe7 | 3275 | |
eb697db5 DN |
3276 | ## HP 9000 series 700 and 800, running HP/UX |
3277 | hppa*-hp-hpux10.2* ) | |
3278 | machine=hp800 opsys=hpux10-20 | |
3279 | ;; | |
3280 | hppa*-hp-hpux1[1-9]* ) | |
3281 | machine=hp800 opsys=hpux11 | |
3282 | CFLAGS="-D_INCLUDE__STDC_A1_SOURCE $CFLAGS" | |
3283 | ;; | |
5929fbe7 | 3284 | |
eb697db5 DN |
3285 | hppa*-*-linux-gnu* ) |
3286 | machine=hp800 opsys=gnu-linux | |
3287 | ;; | |
5929fbe7 | 3288 | |
eb697db5 DN |
3289 | ## IBM machines |
3290 | s390-*-linux-gnu* ) | |
3291 | machine=ibms390 opsys=gnu-linux | |
3292 | ;; | |
3293 | s390x-*-linux-gnu* ) | |
3294 | machine=ibms390x opsys=gnu-linux | |
3295 | ;; | |
3296 | rs6000-ibm-aix4.[23]* ) | |
3297 | machine=ibmrs6000 opsys=aix4-2 | |
3298 | ;; | |
3299 | powerpc-ibm-aix4.[23]* ) | |
3300 | machine=ibmrs6000 opsys=aix4-2 | |
3301 | ;; | |
3302 | rs6000-ibm-aix[56]* ) | |
3303 | machine=ibmrs6000 opsys=aix4-2 | |
3304 | ;; | |
3305 | powerpc-ibm-aix[56]* ) | |
3306 | machine=ibmrs6000 opsys=aix4-2 | |
3307 | ;; | |
5929fbe7 | 3308 | |
eb697db5 DN |
3309 | ## Macintosh PowerPC |
3310 | powerpc*-*-linux-gnu* ) | |
3311 | machine=macppc opsys=gnu-linux | |
3312 | ;; | |
5929fbe7 | 3313 | |
eb697db5 DN |
3314 | ## Silicon Graphics machines |
3315 | ## Iris 4D | |
3316 | mips-sgi-irix6.5 ) | |
3317 | machine=iris4d opsys=irix6-5 | |
3318 | # Without defining _LANGUAGE_C, things get masked out in the headers | |
3319 | # so that, for instance, grepping for `free' in stdlib.h fails and | |
3320 | # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m). | |
3321 | NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C" | |
3322 | NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C" | |
3323 | ;; | |
5929fbe7 | 3324 | |
eb697db5 DN |
3325 | ## Suns |
3326 | sparc-*-linux-gnu* | sparc64-*-linux-gnu* ) | |
3327 | machine=sparc opsys=gnu-linux | |
3328 | ;; | |
15e12598 | 3329 | |
eb697db5 DN |
3330 | *-sun-solaris* \ |
3331 | | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* \ | |
3332 | | x86_64-*-solaris2* | x86_64-*-sunos5*) | |
3333 | case "${canonical}" in | |
3334 | i[3456]86-*-* ) machine=intel386 ;; | |
3335 | amd64-*-*|x86_64-*-*) machine=amdx86-64 ;; | |
3336 | sparc* ) machine=sparc ;; | |
3337 | * ) unported=yes ;; | |
3338 | esac | |
3339 | case "${canonical}" in | |
3340 | *-sunos5.6* | *-solaris2.6* ) | |
3341 | opsys=sol2-6 | |
3342 | NON_GNU_CPP=/usr/ccs/lib/cpp | |
3343 | RANLIB="ar -ts" | |
3344 | ;; | |
3345 | *-sunos5.[7-9]* | *-solaris2.[7-9]* ) | |
3346 | opsys=sol2-6 | |
3347 | emacs_check_sunpro_c=yes | |
3348 | NON_GNU_CPP=/usr/ccs/lib/cpp | |
3349 | ;; | |
3350 | *-sunos5* | *-solaris* ) | |
3351 | opsys=sol2-10 | |
3352 | emacs_check_sunpro_c=yes | |
3353 | NON_GNU_CPP=/usr/ccs/lib/cpp | |
3354 | ;; | |
3355 | esac | |
3356 | ## Watch out for a compiler that we know will not work. | |
3357 | case "${canonical}" in | |
3358 | *-solaris* | *-sunos5* ) | |
3359 | if [ "x$CC" = x/usr/ucb/cc ]; then | |
3360 | ## /usr/ucb/cc doesn't work; | |
3361 | ## we should find some other compiler that does work. | |
3362 | unset CC | |
3363 | fi | |
3364 | ;; | |
3365 | *) ;; | |
3366 | esac | |
3367 | ;; | |
5929fbe7 | 3368 | |
eb697db5 DN |
3369 | ## IA-64 |
3370 | ia64*-*-linux* ) | |
3371 | machine=ia64 opsys=gnu-linux | |
3372 | ;; | |
aaa36002 | 3373 | |
eb697db5 DN |
3374 | ## Intel 386 machines where we don't care about the manufacturer. |
3375 | i[3456]86-*-* ) | |
3376 | machine=intel386 | |
3377 | case "${canonical}" in | |
3378 | *-cygwin ) opsys=cygwin ;; | |
3379 | *-darwin* ) opsys=darwin | |
3380 | CPP="${CC-cc} -E -no-cpp-precomp" | |
3381 | ;; | |
3382 | *-linux-gnu* ) opsys=gnu-linux ;; | |
3383 | *-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;; | |
3384 | *-sysv5uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;; | |
3385 | *-sysv5OpenUNIX* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;; | |
3386 | ## Otherwise, we'll fall through to the generic opsys code at the bottom. | |
3387 | esac | |
3388 | ;; | |
5929fbe7 | 3389 | |
eb697db5 DN |
3390 | ## m68k Linux-based GNU system |
3391 | m68k-*-linux-gnu* ) | |
3392 | machine=m68k opsys=gnu-linux | |
3393 | ;; | |
5929fbe7 | 3394 | |
eb697db5 DN |
3395 | ## Mips Linux-based GNU system |
3396 | mips-*-linux-gnu* | mipsel-*-linux-gnu* \ | |
3397 | | mips64-*-linux-gnu* | mips64el-*-linux-gnu* ) | |
3398 | machine=mips opsys=gnu-linux | |
3399 | ;; | |
5929fbe7 | 3400 | |
eb697db5 DN |
3401 | ## AMD x86-64 Linux-based GNU system |
3402 | x86_64-*-linux-gnu* ) | |
3403 | machine=amdx86-64 opsys=gnu-linux | |
3404 | ;; | |
5929fbe7 | 3405 | |
eb697db5 DN |
3406 | ## Tensilica Xtensa Linux-based GNU system |
3407 | xtensa*-*-linux-gnu* ) | |
3408 | machine=xtensa opsys=gnu-linux | |
3409 | ;; | |
5929fbe7 | 3410 | |
eb697db5 DN |
3411 | ## SuperH Linux-based GNU system |
3412 | sh[34]*-*-linux-gnu* ) | |
3413 | machine=sh3 opsys=gnu-linux | |
3414 | ;; | |
5929fbe7 | 3415 | |
eb697db5 DN |
3416 | * ) |
3417 | unported=yes | |
3418 | ;; | |
5929fbe7 | 3419 | esac |
aaa36002 | 3420 | |
eb697db5 DN |
3421 | ### If the code above didn't choose an operating system, just choose |
3422 | ### an operating system based on the configuration name. You really | |
3423 | ### only want to use this when you have no idea what the right | |
3424 | ### operating system is; if you know what operating systems a machine | |
3425 | ### runs, it's cleaner to make it explicit in the case statement | |
3426 | ### above. | |
3427 | if test x"${opsys}" = x; then | |
3428 | case "${canonical}" in | |
3429 | *-gnu* ) opsys=gnu ;; | |
3430 | * ) | |
3431 | unported=yes | |
3432 | ;; | |
3433 | esac | |
5929fbe7 | 3434 | fi |
aaa36002 | 3435 | |
5929fbe7 | 3436 | |
5929fbe7 | 3437 | |
eb697db5 | 3438 | if test $unported = yes; then |
3d608a86 | 3439 | as_fn_error "Emacs hasn't been ported to \`${canonical}' systems. |
eb697db5 | 3440 | Check \`etc/MACHINES' for recognized configuration names." "$LINENO" 5 |
5929fbe7 GM |
3441 | fi |
3442 | ||
eb697db5 DN |
3443 | machfile="m/${machine}.h" |
3444 | opsysfile="s/${opsys}.h" | |
5929fbe7 | 3445 | |
5929fbe7 | 3446 | |
eb697db5 DN |
3447 | #### Choose a compiler. |
3448 | test -n "$CC" && cc_specified=yes | |
3449 | ||
3450 | # Save the value of CFLAGS that the user specified. | |
3451 | SPECIFIED_CFLAGS="$CFLAGS" | |
3452 | ||
3453 | ac_ext=c | |
3454 | ac_cpp='$CPP $CPPFLAGS' | |
3455 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3456 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3457 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
3458 | if test -n "$ac_tool_prefix"; then | |
3459 | # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. | |
3460 | set dummy ${ac_tool_prefix}gcc; ac_word=$2 | |
3461 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3462 | $as_echo_n "checking for $ac_word... " >&6; } | |
3463 | if test "${ac_cv_prog_CC+set}" = set; then : | |
5929fbe7 GM |
3464 | $as_echo_n "(cached) " >&6 |
3465 | else | |
eb697db5 DN |
3466 | if test -n "$CC"; then |
3467 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
3468 | else | |
3469 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3470 | for as_dir in $PATH | |
3471 | do | |
3472 | IFS=$as_save_IFS | |
3473 | test -z "$as_dir" && as_dir=. | |
3474 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3475 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
3476 | ac_cv_prog_CC="${ac_tool_prefix}gcc" | |
3477 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3478 | break 2 | |
3479 | fi | |
3480 | done | |
3481 | done | |
3482 | IFS=$as_save_IFS | |
5929fbe7 GM |
3483 | |
3484 | fi | |
eb697db5 DN |
3485 | fi |
3486 | CC=$ac_cv_prog_CC | |
3487 | if test -n "$CC"; then | |
3488 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
3489 | $as_echo "$CC" >&6; } | |
3490 | else | |
3491 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3492 | $as_echo "no" >&6; } | |
5929fbe7 | 3493 | fi |
7186fb09 | 3494 | |
08b47d3d | 3495 | |
eb697db5 DN |
3496 | fi |
3497 | if test -z "$ac_cv_prog_CC"; then | |
3498 | ac_ct_CC=$CC | |
3499 | # Extract the first word of "gcc", so it can be a program name with args. | |
3500 | set dummy gcc; ac_word=$2 | |
3501 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3502 | $as_echo_n "checking for $ac_word... " >&6; } | |
3503 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : | |
5929fbe7 | 3504 | $as_echo_n "(cached) " >&6 |
8c5ff6dd | 3505 | else |
eb697db5 DN |
3506 | if test -n "$ac_ct_CC"; then |
3507 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
5929fbe7 | 3508 | else |
eb697db5 DN |
3509 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
3510 | for as_dir in $PATH | |
3511 | do | |
3512 | IFS=$as_save_IFS | |
3513 | test -z "$as_dir" && as_dir=. | |
3514 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3515 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
3516 | ac_cv_prog_ac_ct_CC="gcc" | |
3517 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3518 | break 2 | |
3519 | fi | |
3520 | done | |
3521 | done | |
3522 | IFS=$as_save_IFS | |
5929fbe7 | 3523 | |
8c5ff6dd | 3524 | fi |
8c5ff6dd | 3525 | fi |
eb697db5 DN |
3526 | ac_ct_CC=$ac_cv_prog_ac_ct_CC |
3527 | if test -n "$ac_ct_CC"; then | |
3528 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 | |
3529 | $as_echo "$ac_ct_CC" >&6; } | |
3530 | else | |
3531 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3532 | $as_echo "no" >&6; } | |
8c5ff6dd | 3533 | fi |
5929fbe7 | 3534 | |
eb697db5 DN |
3535 | if test "x$ac_ct_CC" = x; then |
3536 | CC="" | |
3537 | else | |
3538 | case $cross_compiling:$ac_tool_warned in | |
3539 | yes:) | |
3540 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
3541 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
3542 | ac_tool_warned=yes ;; | |
3543 | esac | |
3544 | CC=$ac_ct_CC | |
8c5ff6dd | 3545 | fi |
eb697db5 DN |
3546 | else |
3547 | CC="$ac_cv_prog_CC" | |
8c5ff6dd | 3548 | fi |
e6df49e4 | 3549 | |
eb697db5 DN |
3550 | if test -z "$CC"; then |
3551 | if test -n "$ac_tool_prefix"; then | |
3552 | # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. | |
3553 | set dummy ${ac_tool_prefix}cc; ac_word=$2 | |
3554 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
5929fbe7 | 3555 | $as_echo_n "checking for $ac_word... " >&6; } |
eb697db5 DN |
3556 | if test "${ac_cv_prog_CC+set}" = set; then : |
3557 | $as_echo_n "(cached) " >&6 | |
3558 | else | |
3559 | if test -n "$CC"; then | |
3560 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
3561 | else | |
3562 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5929fbe7 | 3563 | for as_dir in $PATH |
a4f64981 | 3564 | do |
5929fbe7 GM |
3565 | IFS=$as_save_IFS |
3566 | test -z "$as_dir" && as_dir=. | |
eb697db5 | 3567 | for ac_exec_ext in '' $ac_executable_extensions; do |
5929fbe7 | 3568 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then |
eb697db5 DN |
3569 | ac_cv_prog_CC="${ac_tool_prefix}cc" |
3570 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
5929fbe7 GM |
3571 | break 2 |
3572 | fi | |
a4f64981 | 3573 | done |
eb697db5 | 3574 | done |
5929fbe7 | 3575 | IFS=$as_save_IFS |
9452ded1 | 3576 | |
5929fbe7 | 3577 | fi |
eb697db5 DN |
3578 | fi |
3579 | CC=$ac_cv_prog_CC | |
3580 | if test -n "$CC"; then | |
3581 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
3582 | $as_echo "$CC" >&6; } | |
5929fbe7 | 3583 | else |
eb697db5 | 3584 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
5929fbe7 | 3585 | $as_echo "no" >&6; } |
8c5ff6dd | 3586 | fi |
cd03c74a | 3587 | |
9452ded1 | 3588 | |
5929fbe7 | 3589 | fi |
eb697db5 DN |
3590 | fi |
3591 | if test -z "$CC"; then | |
3592 | # Extract the first word of "cc", so it can be a program name with args. | |
3593 | set dummy cc; ac_word=$2 | |
3594 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3595 | $as_echo_n "checking for $ac_word... " >&6; } | |
3596 | if test "${ac_cv_prog_CC+set}" = set; then : | |
5929fbe7 GM |
3597 | $as_echo_n "(cached) " >&6 |
3598 | else | |
eb697db5 DN |
3599 | if test -n "$CC"; then |
3600 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
8c5ff6dd | 3601 | else |
eb697db5 DN |
3602 | ac_prog_rejected=no |
3603 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3604 | for as_dir in $PATH | |
3605 | do | |
3606 | IFS=$as_save_IFS | |
3607 | test -z "$as_dir" && as_dir=. | |
3608 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3609 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
3610 | if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then | |
3611 | ac_prog_rejected=yes | |
3612 | continue | |
3613 | fi | |
3614 | ac_cv_prog_CC="cc" | |
3615 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3616 | break 2 | |
3617 | fi | |
3618 | done | |
3619 | done | |
3620 | IFS=$as_save_IFS | |
e6df49e4 | 3621 | |
eb697db5 DN |
3622 | if test $ac_prog_rejected = yes; then |
3623 | # We found a bogon in the path, so make sure we never use it. | |
3624 | set dummy $ac_cv_prog_CC | |
3625 | shift | |
3626 | if test $# != 0; then | |
3627 | # We chose a different compiler from the bogus one. | |
3628 | # However, it has the same basename, so the bogon will be chosen | |
3629 | # first if we set CC to just the basename; use the full file name. | |
3630 | shift | |
3631 | ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" | |
3632 | fi | |
8c5ff6dd | 3633 | fi |
8c5ff6dd | 3634 | fi |
8c5ff6dd | 3635 | fi |
eb697db5 DN |
3636 | CC=$ac_cv_prog_CC |
3637 | if test -n "$CC"; then | |
3638 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
3639 | $as_echo "$CC" >&6; } | |
3640 | else | |
3641 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3642 | $as_echo "no" >&6; } | |
8c5ff6dd | 3643 | fi |
cd03c74a | 3644 | |
8c5ff6dd | 3645 | |
eb697db5 DN |
3646 | fi |
3647 | if test -z "$CC"; then | |
3648 | if test -n "$ac_tool_prefix"; then | |
3649 | for ac_prog in cl.exe | |
3650 | do | |
3651 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | |
3652 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | |
3653 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
5929fbe7 | 3654 | $as_echo_n "checking for $ac_word... " >&6; } |
eb697db5 | 3655 | if test "${ac_cv_prog_CC+set}" = set; then : |
a5edbe4a | 3656 | $as_echo_n "(cached) " >&6 |
a5edbe4a | 3657 | else |
eb697db5 DN |
3658 | if test -n "$CC"; then |
3659 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
3660 | else | |
3661 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5929fbe7 | 3662 | for as_dir in $PATH |
8c5ff6dd | 3663 | do |
5929fbe7 GM |
3664 | IFS=$as_save_IFS |
3665 | test -z "$as_dir" && as_dir=. | |
eb697db5 | 3666 | for ac_exec_ext in '' $ac_executable_extensions; do |
5929fbe7 | 3667 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then |
eb697db5 DN |
3668 | ac_cv_prog_CC="$ac_tool_prefix$ac_prog" |
3669 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
5929fbe7 GM |
3670 | break 2 |
3671 | fi | |
3672 | done | |
eb697db5 | 3673 | done |
5929fbe7 | 3674 | IFS=$as_save_IFS |
8c5ff6dd | 3675 | |
8c5ff6dd | 3676 | fi |
eb697db5 DN |
3677 | fi |
3678 | CC=$ac_cv_prog_CC | |
3679 | if test -n "$CC"; then | |
3680 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
3681 | $as_echo "$CC" >&6; } | |
8c5ff6dd | 3682 | else |
eb697db5 | 3683 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
5929fbe7 | 3684 | $as_echo "no" >&6; } |
8c5ff6dd | 3685 | fi |
a4f64981 | 3686 | |
a4f64981 | 3687 | |
eb697db5 DN |
3688 | test -n "$CC" && break |
3689 | done | |
3690 | fi | |
3691 | if test -z "$CC"; then | |
3692 | ac_ct_CC=$CC | |
3693 | for ac_prog in cl.exe | |
3694 | do | |
3695 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
3696 | set dummy $ac_prog; ac_word=$2 | |
3697 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3698 | $as_echo_n "checking for $ac_word... " >&6; } | |
3699 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : | |
5929fbe7 | 3700 | $as_echo_n "(cached) " >&6 |
a4f64981 | 3701 | else |
eb697db5 DN |
3702 | if test -n "$ac_ct_CC"; then |
3703 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
5929fbe7 | 3704 | else |
eb697db5 DN |
3705 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
3706 | for as_dir in $PATH | |
3707 | do | |
3708 | IFS=$as_save_IFS | |
3709 | test -z "$as_dir" && as_dir=. | |
3710 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3711 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
3712 | ac_cv_prog_ac_ct_CC="$ac_prog" | |
3713 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3714 | break 2 | |
3715 | fi | |
3716 | done | |
3717 | done | |
3718 | IFS=$as_save_IFS | |
a4f64981 | 3719 | |
5929fbe7 | 3720 | fi |
5929fbe7 | 3721 | fi |
eb697db5 DN |
3722 | ac_ct_CC=$ac_cv_prog_ac_ct_CC |
3723 | if test -n "$ac_ct_CC"; then | |
3724 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 | |
3725 | $as_echo "$ac_ct_CC" >&6; } | |
8c5ff6dd | 3726 | else |
eb697db5 DN |
3727 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3728 | $as_echo "no" >&6; } | |
8c5ff6dd | 3729 | fi |
a4f64981 | 3730 | |
5929fbe7 | 3731 | |
eb697db5 DN |
3732 | test -n "$ac_ct_CC" && break |
3733 | done | |
5929fbe7 | 3734 | |
eb697db5 DN |
3735 | if test "x$ac_ct_CC" = x; then |
3736 | CC="" | |
3737 | else | |
3738 | case $cross_compiling:$ac_tool_warned in | |
3739 | yes:) | |
3740 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
3741 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
3742 | ac_tool_warned=yes ;; | |
3743 | esac | |
3744 | CC=$ac_ct_CC | |
3745 | fi | |
8c5ff6dd | 3746 | fi |
a4f64981 | 3747 | |
eb697db5 | 3748 | fi |
8c5ff6dd | 3749 | |
5929fbe7 | 3750 | |
eb697db5 DN |
3751 | test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3752 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3d608a86 J |
3753 | as_fn_error "no acceptable C compiler found in \$PATH |
3754 | See \`config.log' for more details." "$LINENO" 5; } | |
5929fbe7 | 3755 | |
eb697db5 DN |
3756 | # Provide some information about the compiler. |
3757 | $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 | |
3758 | set X $ac_compile | |
3759 | ac_compiler=$2 | |
3760 | for ac_option in --version -v -V -qversion; do | |
3761 | { { ac_try="$ac_compiler $ac_option >&5" | |
5929fbe7 GM |
3762 | case "(($ac_try" in |
3763 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3764 | *) ac_try_echo=$ac_try;; | |
3765 | esac | |
eb697db5 DN |
3766 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" |
3767 | $as_echo "$ac_try_echo"; } >&5 | |
3768 | (eval "$ac_compiler $ac_option >&5") 2>conftest.err | |
5929fbe7 | 3769 | ac_status=$? |
eb697db5 DN |
3770 | if test -s conftest.err; then |
3771 | sed '10a\ | |
3772 | ... rest of stderr output deleted ... | |
3773 | 10q' conftest.err >conftest.er1 | |
3774 | cat conftest.er1 >&5 | |
5929fbe7 | 3775 | fi |
eb697db5 DN |
3776 | rm -f conftest.er1 conftest.err |
3777 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3778 | test $ac_status = 0; } | |
3779 | done | |
a4f64981 | 3780 | |
eb697db5 | 3781 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5929fbe7 | 3782 | /* end confdefs.h. */ |
8c5ff6dd | 3783 | |
5929fbe7 GM |
3784 | int |
3785 | main () | |
3786 | { | |
3787 | ||
3788 | ; | |
3789 | return 0; | |
3790 | } | |
3791 | _ACEOF | |
eb697db5 DN |
3792 | ac_clean_files_save=$ac_clean_files |
3793 | ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" | |
3794 | # Try to create an executable without -o first, disregard a.out. | |
3795 | # It will help us diagnose broken compilers, and finding out an intuition | |
3796 | # of exeext. | |
3797 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 | |
3798 | $as_echo_n "checking whether the C compiler works... " >&6; } | |
3799 | ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` | |
3800 | ||
3801 | # The possible output files: | |
3802 | ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" | |
3803 | ||
3804 | ac_rmfiles= | |
3805 | for ac_file in $ac_files | |
3806 | do | |
3807 | case $ac_file in | |
3808 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; | |
3809 | * ) ac_rmfiles="$ac_rmfiles $ac_file";; | |
3810 | esac | |
3811 | done | |
3812 | rm -f $ac_rmfiles | |
3813 | ||
3814 | if { { ac_try="$ac_link_default" | |
5929fbe7 GM |
3815 | case "(($ac_try" in |
3816 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3817 | *) ac_try_echo=$ac_try;; | |
3818 | esac | |
eb697db5 DN |
3819 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" |
3820 | $as_echo "$ac_try_echo"; } >&5 | |
3821 | (eval "$ac_link_default") 2>&5 | |
5929fbe7 | 3822 | ac_status=$? |
eb697db5 DN |
3823 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
3824 | test $ac_status = 0; }; then : | |
3825 | # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. | |
3826 | # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' | |
3827 | # in a Makefile. We should not override ac_cv_exeext if it was cached, | |
3828 | # so that the user can short-circuit this test for compilers unknown to | |
3829 | # Autoconf. | |
3830 | for ac_file in $ac_files '' | |
3831 | do | |
3832 | test -f "$ac_file" || continue | |
3833 | case $ac_file in | |
3834 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) | |
3835 | ;; | |
3836 | [ab].out ) | |
3837 | # We found the default executable, but exeext='' is most | |
3838 | # certainly right. | |
3839 | break;; | |
3840 | *.* ) | |
3841 | if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; | |
3842 | then :; else | |
3843 | ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` | |
3844 | fi | |
3845 | # We set ac_cv_exeext here because the later test for it is not | |
3846 | # safe: cross compilers may not add the suffix if given an `-o' | |
3847 | # argument, so we may need to know it at that point already. | |
3848 | # Even if this section looks crufty: it has the advantage of | |
3849 | # actually working. | |
3850 | break;; | |
3851 | * ) | |
3852 | break;; | |
3853 | esac | |
3854 | done | |
3855 | test "$ac_cv_exeext" = no && ac_cv_exeext= | |
5929fbe7 | 3856 | |
eb697db5 DN |
3857 | else |
3858 | ac_file='' | |
49ebbd65 | 3859 | fi |
eb697db5 DN |
3860 | if test -z "$ac_file"; then : |
3861 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3862 | $as_echo "no" >&6; } | |
3863 | $as_echo "$as_me: failed program was:" >&5 | |
3864 | sed 's/^/| /' conftest.$ac_ext >&5 | |
49ebbd65 | 3865 | |
eb697db5 DN |
3866 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3867 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3d608a86 J |
3868 | { as_fn_set_status 77 |
3869 | as_fn_error "C compiler cannot create executables | |
3870 | See \`config.log' for more details." "$LINENO" 5; }; } | |
eb697db5 DN |
3871 | else |
3872 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
3873 | $as_echo "yes" >&6; } | |
8c5ff6dd | 3874 | fi |
eb697db5 DN |
3875 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 |
3876 | $as_echo_n "checking for C compiler default output file name... " >&6; } | |
3877 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 | |
3878 | $as_echo "$ac_file" >&6; } | |
3879 | ac_exeext=$ac_cv_exeext | |
e6df49e4 | 3880 | |
eb697db5 DN |
3881 | rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out |
3882 | ac_clean_files=$ac_clean_files_save | |
3883 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 | |
3884 | $as_echo_n "checking for suffix of executables... " >&6; } | |
3885 | if { { ac_try="$ac_link" | |
3886 | case "(($ac_try" in | |
3887 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3888 | *) ac_try_echo=$ac_try;; | |
3889 | esac | |
3890 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3891 | $as_echo "$ac_try_echo"; } >&5 | |
3892 | (eval "$ac_link") 2>&5 | |
3893 | ac_status=$? | |
3894 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3895 | test $ac_status = 0; }; then : | |
3896 | # If both `conftest.exe' and `conftest' are `present' (well, observable) | |
3897 | # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will | |
3898 | # work properly (i.e., refer to `conftest.exe'), while it won't with | |
3899 | # `rm'. | |
3900 | for ac_file in conftest.exe conftest conftest.*; do | |
3901 | test -f "$ac_file" || continue | |
3902 | case $ac_file in | |
3903 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; | |
3904 | *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` | |
3905 | break;; | |
3906 | * ) break;; | |
3907 | esac | |
3908 | done | |
3909 | else | |
3910 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
3911 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3d608a86 J |
3912 | as_fn_error "cannot compute suffix of executables: cannot compile and link |
3913 | See \`config.log' for more details." "$LINENO" 5; } | |
5929fbe7 | 3914 | fi |
eb697db5 DN |
3915 | rm -f conftest conftest$ac_cv_exeext |
3916 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 | |
3917 | $as_echo "$ac_cv_exeext" >&6; } | |
49ebbd65 | 3918 | |
eb697db5 DN |
3919 | rm -f conftest.$ac_ext |
3920 | EXEEXT=$ac_cv_exeext | |
3921 | ac_exeext=$EXEEXT | |
3922 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5929fbe7 | 3923 | /* end confdefs.h. */ |
eb697db5 | 3924 | #include <stdio.h> |
5929fbe7 GM |
3925 | int |
3926 | main () | |
3927 | { | |
eb697db5 DN |
3928 | FILE *f = fopen ("conftest.out", "w"); |
3929 | return ferror (f) || fclose (f) != 0; | |
49ebbd65 | 3930 | |
5929fbe7 GM |
3931 | ; |
3932 | return 0; | |
3933 | } | |
3934 | _ACEOF | |
eb697db5 DN |
3935 | ac_clean_files="$ac_clean_files conftest.out" |
3936 | # Check that the compiler produces executables we can run. If not, either | |
3937 | # the compiler is broken, or we cross compile. | |
3938 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 | |
3939 | $as_echo_n "checking whether we are cross compiling... " >&6; } | |
3940 | if test "$cross_compiling" != yes; then | |
3941 | { { ac_try="$ac_link" | |
5929fbe7 GM |
3942 | case "(($ac_try" in |
3943 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3944 | *) ac_try_echo=$ac_try;; | |
3945 | esac | |
eb697db5 DN |
3946 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" |
3947 | $as_echo "$ac_try_echo"; } >&5 | |
3948 | (eval "$ac_link") 2>&5 | |
5929fbe7 | 3949 | ac_status=$? |
eb697db5 DN |
3950 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
3951 | test $ac_status = 0; } | |
3952 | if { ac_try='./conftest$ac_cv_exeext' | |
3953 | { { case "(($ac_try" in | |
3954 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3955 | *) ac_try_echo=$ac_try;; | |
3956 | esac | |
3957 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3958 | $as_echo "$ac_try_echo"; } >&5 | |
3959 | (eval "$ac_try") 2>&5 | |
3960 | ac_status=$? | |
3961 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3962 | test $ac_status = 0; }; }; then | |
3963 | cross_compiling=no | |
5929fbe7 | 3964 | else |
eb697db5 DN |
3965 | if test "$cross_compiling" = maybe; then |
3966 | cross_compiling=yes | |
3967 | else | |
3968 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
3969 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3d608a86 | 3970 | as_fn_error "cannot run C compiled programs. |
eb697db5 | 3971 | If you meant to cross compile, use \`--host'. |
3d608a86 | 3972 | See \`config.log' for more details." "$LINENO" 5; } |
eb697db5 | 3973 | fi |
5929fbe7 | 3974 | fi |
eb697db5 DN |
3975 | fi |
3976 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 | |
3977 | $as_echo "$cross_compiling" >&6; } | |
5929fbe7 | 3978 | |
eb697db5 DN |
3979 | rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out |
3980 | ac_clean_files=$ac_clean_files_save | |
3981 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 | |
3982 | $as_echo_n "checking for suffix of object files... " >&6; } | |
3983 | if test "${ac_cv_objext+set}" = set; then : | |
a4f64981 | 3984 | $as_echo_n "(cached) " >&6 |
a4f64981 | 3985 | else |
eb697db5 | 3986 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
a4f64981 | 3987 | /* end confdefs.h. */ |
8c5ff6dd KR |
3988 | |
3989 | int | |
3990 | main () | |
3991 | { | |
eb697db5 | 3992 | |
8c5ff6dd KR |
3993 | ; |
3994 | return 0; | |
3995 | } | |
a4f64981 | 3996 | _ACEOF |
eb697db5 DN |
3997 | rm -f conftest.o conftest.obj |
3998 | if { { ac_try="$ac_compile" | |
5929fbe7 GM |
3999 | case "(($ac_try" in |
4000 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4001 | *) ac_try_echo=$ac_try;; | |
4002 | esac | |
eb697db5 DN |
4003 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" |
4004 | $as_echo "$ac_try_echo"; } >&5 | |
4005 | (eval "$ac_compile") 2>&5 | |
5929fbe7 | 4006 | ac_status=$? |
eb697db5 DN |
4007 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
4008 | test $ac_status = 0; }; then : | |
4009 | for ac_file in conftest.o conftest.obj conftest.*; do | |
4010 | test -f "$ac_file" || continue; | |
4011 | case $ac_file in | |
4012 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; | |
4013 | *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` | |
4014 | break;; | |
4015 | esac | |
4016 | done | |
a4f64981 | 4017 | else |
5929fbe7 GM |
4018 | $as_echo "$as_me: failed program was:" >&5 |
4019 | sed 's/^/| /' conftest.$ac_ext >&5 | |
a4f64981 | 4020 | |
eb697db5 DN |
4021 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
4022 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3d608a86 J |
4023 | as_fn_error "cannot compute suffix of object files: cannot compile |
4024 | See \`config.log' for more details." "$LINENO" 5; } | |
5929fbe7 | 4025 | fi |
eb697db5 | 4026 | rm -f conftest.$ac_cv_objext conftest.$ac_ext |
5929fbe7 | 4027 | fi |
eb697db5 DN |
4028 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 |
4029 | $as_echo "$ac_cv_objext" >&6; } | |
4030 | OBJEXT=$ac_cv_objext | |
4031 | ac_objext=$OBJEXT | |
4032 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 | |
4033 | $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } | |
4034 | if test "${ac_cv_c_compiler_gnu+set}" = set; then : | |
4035 | $as_echo_n "(cached) " >&6 | |
4036 | else | |
4037 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4038 | /* end confdefs.h. */ | |
8c5ff6dd | 4039 | |
eb697db5 DN |
4040 | int |
4041 | main () | |
4042 | { | |
4043 | #ifndef __GNUC__ | |
4044 | choke me | |
4045 | #endif | |
5929fbe7 | 4046 | |
eb697db5 DN |
4047 | ; |
4048 | return 0; | |
4049 | } | |
4050 | _ACEOF | |
4051 | if ac_fn_c_try_compile "$LINENO"; then : | |
4052 | ac_compiler_gnu=yes | |
4053 | else | |
4054 | ac_compiler_gnu=no | |
8c5ff6dd | 4055 | fi |
eb697db5 DN |
4056 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
4057 | ac_cv_c_compiler_gnu=$ac_compiler_gnu | |
a4f64981 | 4058 | |
a4f64981 | 4059 | fi |
eb697db5 DN |
4060 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 |
4061 | $as_echo "$ac_cv_c_compiler_gnu" >&6; } | |
4062 | if test $ac_compiler_gnu = yes; then | |
4063 | GCC=yes | |
4064 | else | |
4065 | GCC= | |
4066 | fi | |
4067 | ac_test_CFLAGS=${CFLAGS+set} | |
4068 | ac_save_CFLAGS=$CFLAGS | |
4069 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 | |
4070 | $as_echo_n "checking whether $CC accepts -g... " >&6; } | |
4071 | if test "${ac_cv_prog_cc_g+set}" = set; then : | |
5929fbe7 | 4072 | $as_echo_n "(cached) " >&6 |
08b47d3d | 4073 | else |
eb697db5 DN |
4074 | ac_save_c_werror_flag=$ac_c_werror_flag |
4075 | ac_c_werror_flag=yes | |
4076 | ac_cv_prog_cc_g=no | |
4077 | CFLAGS="-g" | |
4078 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
0c309b80 | 4079 | /* end confdefs.h. */ |
8c5ff6dd | 4080 | |
9452ded1 DN |
4081 | int |
4082 | main () | |
4083 | { | |
eb697db5 | 4084 | |
5929fbe7 | 4085 | ; |
9452ded1 DN |
4086 | return 0; |
4087 | } | |
0c309b80 | 4088 | _ACEOF |
eb697db5 DN |
4089 | if ac_fn_c_try_compile "$LINENO"; then : |
4090 | ac_cv_prog_cc_g=yes | |
8c5ff6dd | 4091 | else |
eb697db5 DN |
4092 | CFLAGS="" |
4093 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4094 | /* end confdefs.h. */ | |
a4f64981 | 4095 | |
eb697db5 DN |
4096 | int |
4097 | main () | |
4098 | { | |
cd03c74a | 4099 | |
eb697db5 DN |
4100 | ; |
4101 | return 0; | |
4102 | } | |
a4f64981 | 4103 | _ACEOF |
eb697db5 | 4104 | if ac_fn_c_try_compile "$LINENO"; then : |
e6df49e4 | 4105 | |
eb697db5 DN |
4106 | else |
4107 | ac_c_werror_flag=$ac_save_c_werror_flag | |
4108 | CFLAGS="-g" | |
4109 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4110 | /* end confdefs.h. */ | |
a5edbe4a | 4111 | |
eb697db5 DN |
4112 | int |
4113 | main () | |
4114 | { | |
e6df49e4 | 4115 | |
eb697db5 DN |
4116 | ; |
4117 | return 0; | |
4118 | } | |
4119 | _ACEOF | |
4120 | if ac_fn_c_try_compile "$LINENO"; then : | |
4121 | ac_cv_prog_cc_g=yes | |
4122 | fi | |
4123 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4124 | fi | |
4125 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4126 | fi | |
4127 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4128 | ac_c_werror_flag=$ac_save_c_werror_flag | |
4129 | fi | |
4130 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 | |
4131 | $as_echo "$ac_cv_prog_cc_g" >&6; } | |
4132 | if test "$ac_test_CFLAGS" = set; then | |
4133 | CFLAGS=$ac_save_CFLAGS | |
4134 | elif test $ac_cv_prog_cc_g = yes; then | |
4135 | if test "$GCC" = yes; then | |
4136 | CFLAGS="-g -O2" | |
4137 | else | |
4138 | CFLAGS="-g" | |
4139 | fi | |
4140 | else | |
4141 | if test "$GCC" = yes; then | |
4142 | CFLAGS="-O2" | |
4143 | else | |
4144 | CFLAGS= | |
5929fbe7 GM |
4145 | fi |
4146 | fi | |
eb697db5 DN |
4147 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 |
4148 | $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } | |
4149 | if test "${ac_cv_prog_cc_c89+set}" = set; then : | |
5929fbe7 GM |
4150 | $as_echo_n "(cached) " >&6 |
4151 | else | |
eb697db5 DN |
4152 | ac_cv_prog_cc_c89=no |
4153 | ac_save_CC=$CC | |
4154 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5929fbe7 | 4155 | /* end confdefs.h. */ |
eb697db5 DN |
4156 | #include <stdarg.h> |
4157 | #include <stdio.h> | |
4158 | #include <sys/types.h> | |
4159 | #include <sys/stat.h> | |
4160 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
4161 | struct buf { int x; }; | |
4162 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
4163 | static char *e (p, i) | |
4164 | char **p; | |
4165 | int i; | |
5929fbe7 | 4166 | { |
eb697db5 DN |
4167 | return p[i]; |
4168 | } | |
4169 | static char *f (char * (*g) (char **, int), char **p, ...) | |
4170 | { | |
4171 | char *s; | |
4172 | va_list v; | |
4173 | va_start (v,p); | |
4174 | s = g (p, va_arg (v,int)); | |
4175 | va_end (v); | |
4176 | return s; | |
5929fbe7 | 4177 | } |
e6df49e4 | 4178 | |
eb697db5 DN |
4179 | /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has |
4180 | function prototypes and stuff, but not '\xHH' hex character constants. | |
4181 | These don't provoke an error unfortunately, instead are silently treated | |
4182 | as 'x'. The following induces an error, until -std is added to get | |
4183 | proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an | |
4184 | array size at least. It's necessary to write '\x00'==0 to get something | |
4185 | that's true only with -std. */ | |
4186 | int osf4_cc_array ['\x00' == 0 ? 1 : -1]; | |
e6df49e4 | 4187 | |
eb697db5 DN |
4188 | /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters |
4189 | inside strings and character constants. */ | |
4190 | #define FOO(x) 'x' | |
4191 | int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; | |
49ebbd65 | 4192 | |
eb697db5 DN |
4193 | int test (int i, double x); |
4194 | struct s1 {int (*f) (int a);}; | |
4195 | struct s2 {int (*f) (double a);}; | |
4196 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
4197 | int argc; | |
4198 | char **argv; | |
5929fbe7 GM |
4199 | int |
4200 | main () | |
4201 | { | |
eb697db5 | 4202 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; |
5929fbe7 GM |
4203 | ; |
4204 | return 0; | |
4205 | } | |
4206 | _ACEOF | |
eb697db5 DN |
4207 | for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ |
4208 | -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
4209 | do | |
4210 | CC="$ac_save_CC $ac_arg" | |
4211 | if ac_fn_c_try_compile "$LINENO"; then : | |
4212 | ac_cv_prog_cc_c89=$ac_arg | |
4213 | fi | |
4214 | rm -f core conftest.err conftest.$ac_objext | |
4215 | test "x$ac_cv_prog_cc_c89" != "xno" && break | |
4216 | done | |
4217 | rm -f conftest.$ac_ext | |
4218 | CC=$ac_save_CC | |
49ebbd65 | 4219 | |
5929fbe7 | 4220 | fi |
eb697db5 DN |
4221 | # AC_CACHE_VAL |
4222 | case "x$ac_cv_prog_cc_c89" in | |
4223 | x) | |
4224 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 | |
4225 | $as_echo "none needed" >&6; } ;; | |
4226 | xno) | |
4227 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 | |
4228 | $as_echo "unsupported" >&6; } ;; | |
4229 | *) | |
4230 | CC="$CC $ac_cv_prog_cc_c89" | |
4231 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 | |
4232 | $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; | |
4233 | esac | |
4234 | if test "x$ac_cv_prog_cc_c89" != xno; then : | |
e6df49e4 | 4235 | |
5929fbe7 | 4236 | fi |
eb697db5 DN |
4237 | |
4238 | ac_ext=c | |
4239 | ac_cpp='$CPP $CPPFLAGS' | |
4240 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
4241 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
4242 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
4243 | ||
4244 | ||
4245 | # On Suns, sometimes $CPP names a directory. | |
4246 | if test -n "$CPP" && test -d "$CPP"; then | |
4247 | CPP= | |
5929fbe7 | 4248 | fi |
a4f64981 | 4249 | |
eb697db5 DN |
4250 | ## If not using gcc, and on Solaris, and no CPP specified, see if |
4251 | ## using a Sun compiler, which needs -Xs to prevent whitespace. | |
4252 | if test x"$GCC" != xyes && test x"$emacs_check_sunpro_c" = xyes && \ | |
4253 | test x"$CPP" = x; then | |
4254 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using a Sun C compiler" >&5 | |
4255 | $as_echo_n "checking whether we are using a Sun C compiler... " >&6; } | |
4256 | ||
4257 | if test "${emacs_cv_sunpro_c+set}" = set; then : | |
a4f64981 GM |
4258 | $as_echo_n "(cached) " >&6 |
4259 | else | |
eb697db5 | 4260 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
cd03c74a | 4261 | /* end confdefs.h. */ |
eb697db5 | 4262 | |
15e12598 VB |
4263 | int |
4264 | main () | |
4265 | { | |
eb697db5 DN |
4266 | #ifndef __SUNPRO_C |
4267 | fail; | |
4268 | #endif | |
4269 | ||
15e12598 VB |
4270 | ; |
4271 | return 0; | |
4272 | } | |
0c309b80 | 4273 | _ACEOF |
eb697db5 DN |
4274 | if ac_fn_c_try_link "$LINENO"; then : |
4275 | emacs_cv_sunpro_c=yes | |
aaa36002 | 4276 | else |
eb697db5 | 4277 | emacs_cv_sunpro_c=no |
a4f64981 | 4278 | fi |
eb697db5 DN |
4279 | rm -f core conftest.err conftest.$ac_objext \ |
4280 | conftest$ac_exeext conftest.$ac_ext | |
5929fbe7 | 4281 | fi |
a4f64981 | 4282 | |
eb697db5 DN |
4283 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_sunpro_c" >&5 |
4284 | $as_echo "$emacs_cv_sunpro_c" >&6; } | |
a4f64981 | 4285 | |
eb697db5 DN |
4286 | if test x"$emacs_cv_sunpro_c" = xyes; then |
4287 | NON_GNU_CPP="$CC -E -Xs" | |
4288 | fi | |
4289 | fi | |
a4f64981 | 4290 | |
eb697db5 DN |
4291 | #### Some systems specify a CPP to use unless we are using GCC. |
4292 | #### Now that we know whether we are using GCC, we can decide whether | |
4293 | #### to use that one. | |
4294 | if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x | |
4295 | then | |
4296 | CPP="$NON_GNU_CPP" | |
4297 | fi | |
a4f64981 | 4298 | |
eb697db5 DN |
4299 | #### Some systems specify a CC to use unless we are using GCC. |
4300 | #### Now that we know whether we are using GCC, we can decide whether | |
4301 | #### to use that one. | |
4302 | if test "x$NON_GNU_CC" != x && test x$GCC != xyes && | |
4303 | test x$cc_specified != xyes | |
4304 | then | |
4305 | CC="$NON_GNU_CC" | |
4306 | fi | |
a4f64981 | 4307 | |
9164c0e4 AS |
4308 | if test x$GCC = xyes; then |
4309 | test "x$GCC_TEST_OPTIONS" != x && CC="$CC $GCC_TEST_OPTIONS" | |
4310 | else | |
4311 | test "x$NON_GCC_TEST_OPTIONS" != x && CC="$CC $NON_GCC_TEST_OPTIONS" | |
4312 | fi | |
4313 | ||
eb697db5 DN |
4314 | ac_ext=c |
4315 | ac_cpp='$CPP $CPPFLAGS' | |
4316 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
4317 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
4318 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
4319 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 | |
4320 | $as_echo_n "checking how to run the C preprocessor... " >&6; } | |
4321 | # On Suns, sometimes $CPP names a directory. | |
4322 | if test -n "$CPP" && test -d "$CPP"; then | |
4323 | CPP= | |
4324 | fi | |
4325 | if test -z "$CPP"; then | |
4326 | if test "${ac_cv_prog_CPP+set}" = set; then : | |
4327 | $as_echo_n "(cached) " >&6 | |
4328 | else | |
4329 | # Double quotes because CPP needs to be expanded | |
4330 | for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" | |
4331 | do | |
4332 | ac_preproc_ok=false | |
4333 | for ac_c_preproc_warn_flag in '' yes | |
4334 | do | |
4335 | # Use a header file that comes with gcc, so configuring glibc | |
4336 | # with a fresh cross-compiler works. | |
4337 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
4338 | # <limits.h> exists even on freestanding compilers. | |
4339 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
4340 | # not just through cpp. "Syntax error" is here to catch this case. | |
4341 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
49ebbd65 | 4342 | /* end confdefs.h. */ |
eb697db5 DN |
4343 | #ifdef __STDC__ |
4344 | # include <limits.h> | |
4345 | #else | |
4346 | # include <assert.h> | |
4347 | #endif | |
4348 | Syntax error | |
49ebbd65 | 4349 | _ACEOF |
eb697db5 DN |
4350 | if ac_fn_c_try_cpp "$LINENO"; then : |
4351 | ||
4352 | else | |
4353 | # Broken: fails on valid input. | |
4354 | continue | |
4355 | fi | |
4356 | rm -f conftest.err conftest.$ac_ext | |
5929fbe7 | 4357 | |
eb697db5 DN |
4358 | # OK, works on sane cases. Now check whether nonexistent headers |
4359 | # can be detected and how. | |
4360 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4361 | /* end confdefs.h. */ | |
4362 | #include <ac_nonexistent.h> | |
5929fbe7 | 4363 | _ACEOF |
eb697db5 DN |
4364 | if ac_fn_c_try_cpp "$LINENO"; then : |
4365 | # Broken: success on invalid input. | |
4366 | continue | |
8c5ff6dd | 4367 | else |
eb697db5 DN |
4368 | # Passes both tests. |
4369 | ac_preproc_ok=: | |
4370 | break | |
8c5ff6dd | 4371 | fi |
eb697db5 | 4372 | rm -f conftest.err conftest.$ac_ext |
5929fbe7 | 4373 | |
eb697db5 DN |
4374 | done |
4375 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
4376 | rm -f conftest.err conftest.$ac_ext | |
4377 | if $ac_preproc_ok; then : | |
4378 | break | |
4379 | fi | |
5929fbe7 | 4380 | |
eb697db5 DN |
4381 | done |
4382 | ac_cv_prog_CPP=$CPP | |
5929fbe7 | 4383 | |
eb697db5 DN |
4384 | fi |
4385 | CPP=$ac_cv_prog_CPP | |
4386 | else | |
4387 | ac_cv_prog_CPP=$CPP | |
4388 | fi | |
4389 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 | |
4390 | $as_echo "$CPP" >&6; } | |
4391 | ac_preproc_ok=false | |
4392 | for ac_c_preproc_warn_flag in '' yes | |
4393 | do | |
4394 | # Use a header file that comes with gcc, so configuring glibc | |
4395 | # with a fresh cross-compiler works. | |
4396 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
4397 | # <limits.h> exists even on freestanding compilers. | |
4398 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
4399 | # not just through cpp. "Syntax error" is here to catch this case. | |
4400 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4401 | /* end confdefs.h. */ | |
4402 | #ifdef __STDC__ | |
4403 | # include <limits.h> | |
4404 | #else | |
4405 | # include <assert.h> | |
4406 | #endif | |
4407 | Syntax error | |
5929fbe7 | 4408 | _ACEOF |
eb697db5 | 4409 | if ac_fn_c_try_cpp "$LINENO"; then : |
5929fbe7 | 4410 | |
eb697db5 DN |
4411 | else |
4412 | # Broken: fails on valid input. | |
4413 | continue | |
8c5ff6dd | 4414 | fi |
eb697db5 | 4415 | rm -f conftest.err conftest.$ac_ext |
8c5ff6dd | 4416 | |
eb697db5 DN |
4417 | # OK, works on sane cases. Now check whether nonexistent headers |
4418 | # can be detected and how. | |
4419 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8c5ff6dd | 4420 | /* end confdefs.h. */ |
eb697db5 | 4421 | #include <ac_nonexistent.h> |
8c5ff6dd | 4422 | _ACEOF |
eb697db5 DN |
4423 | if ac_fn_c_try_cpp "$LINENO"; then : |
4424 | # Broken: success on invalid input. | |
4425 | continue | |
a5edbe4a | 4426 | else |
eb697db5 DN |
4427 | # Passes both tests. |
4428 | ac_preproc_ok=: | |
4429 | break | |
4430 | fi | |
4431 | rm -f conftest.err conftest.$ac_ext | |
e6df49e4 | 4432 | |
eb697db5 DN |
4433 | done |
4434 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
4435 | rm -f conftest.err conftest.$ac_ext | |
4436 | if $ac_preproc_ok; then : | |
cd03c74a | 4437 | |
eb697db5 DN |
4438 | else |
4439 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
4440 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3d608a86 J |
4441 | as_fn_error "C preprocessor \"$CPP\" fails sanity check |
4442 | See \`config.log' for more details." "$LINENO" 5; } | |
a4f64981 | 4443 | fi |
e6df49e4 | 4444 | |
eb697db5 DN |
4445 | ac_ext=c |
4446 | ac_cpp='$CPP $CPPFLAGS' | |
4447 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
4448 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
4449 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
15e12598 | 4450 | |
a5edbe4a | 4451 | |
eb697db5 DN |
4452 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 |
4453 | $as_echo_n "checking for grep that handles long lines and -e... " >&6; } | |
4454 | if test "${ac_cv_path_GREP+set}" = set; then : | |
4455 | $as_echo_n "(cached) " >&6 | |
4456 | else | |
4457 | if test -z "$GREP"; then | |
4458 | ac_path_GREP_found=false | |
4459 | # Loop through the user's path and test for each of PROGNAME-LIST | |
4460 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4461 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
4462 | do | |
4463 | IFS=$as_save_IFS | |
4464 | test -z "$as_dir" && as_dir=. | |
4465 | for ac_prog in grep ggrep; do | |
4466 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4467 | ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" | |
4468 | { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue | |
4469 | # Check for GNU ac_path_GREP and select it if it is found. | |
4470 | # Check for GNU $ac_path_GREP | |
4471 | case `"$ac_path_GREP" --version 2>&1` in | |
4472 | *GNU*) | |
4473 | ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; | |
4474 | *) | |
4475 | ac_count=0 | |
4476 | $as_echo_n 0123456789 >"conftest.in" | |
4477 | while : | |
4478 | do | |
4479 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
4480 | mv "conftest.tmp" "conftest.in" | |
4481 | cp "conftest.in" "conftest.nl" | |
4482 | $as_echo 'GREP' >> "conftest.nl" | |
4483 | "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
4484 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
4485 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
4486 | if test $ac_count -gt ${ac_path_GREP_max-0}; then | |
4487 | # Best one so far, save it but keep looking for a better one | |
4488 | ac_cv_path_GREP="$ac_path_GREP" | |
4489 | ac_path_GREP_max=$ac_count | |
4490 | fi | |
4491 | # 10*(2^10) chars as input seems more than enough | |
4492 | test $ac_count -gt 10 && break | |
4493 | done | |
4494 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
4495 | esac | |
a5edbe4a | 4496 | |
eb697db5 DN |
4497 | $ac_path_GREP_found && break 3 |
4498 | done | |
4499 | done | |
4500 | done | |
4501 | IFS=$as_save_IFS | |
4502 | if test -z "$ac_cv_path_GREP"; then | |
3d608a86 | 4503 | as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 |
5929fbe7 | 4504 | fi |
eb697db5 DN |
4505 | else |
4506 | ac_cv_path_GREP=$GREP | |
cd03c74a | 4507 | fi |
0c309b80 | 4508 | |
eb697db5 DN |
4509 | fi |
4510 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 | |
4511 | $as_echo "$ac_cv_path_GREP" >&6; } | |
4512 | GREP="$ac_cv_path_GREP" | |
15e12598 | 4513 | |
8c5ff6dd | 4514 | |
eb697db5 DN |
4515 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 |
4516 | $as_echo_n "checking for egrep... " >&6; } | |
4517 | if test "${ac_cv_path_EGREP+set}" = set; then : | |
8c5ff6dd | 4518 | $as_echo_n "(cached) " >&6 |
aaa36002 | 4519 | else |
eb697db5 DN |
4520 | if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 |
4521 | then ac_cv_path_EGREP="$GREP -E" | |
4522 | else | |
4523 | if test -z "$EGREP"; then | |
4524 | ac_path_EGREP_found=false | |
4525 | # Loop through the user's path and test for each of PROGNAME-LIST | |
8c5ff6dd | 4526 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
eb697db5 | 4527 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin |
8c5ff6dd KR |
4528 | do |
4529 | IFS=$as_save_IFS | |
4530 | test -z "$as_dir" && as_dir=. | |
eb697db5 DN |
4531 | for ac_prog in egrep; do |
4532 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4533 | ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" | |
4534 | { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue | |
4535 | # Check for GNU ac_path_EGREP and select it if it is found. | |
4536 | # Check for GNU $ac_path_EGREP | |
4537 | case `"$ac_path_EGREP" --version 2>&1` in | |
4538 | *GNU*) | |
4539 | ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; | |
4540 | *) | |
4541 | ac_count=0 | |
4542 | $as_echo_n 0123456789 >"conftest.in" | |
4543 | while : | |
4544 | do | |
4545 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
4546 | mv "conftest.tmp" "conftest.in" | |
4547 | cp "conftest.in" "conftest.nl" | |
4548 | $as_echo 'EGREP' >> "conftest.nl" | |
4549 | "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
4550 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
4551 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
4552 | if test $ac_count -gt ${ac_path_EGREP_max-0}; then | |
4553 | # Best one so far, save it but keep looking for a better one | |
4554 | ac_cv_path_EGREP="$ac_path_EGREP" | |
4555 | ac_path_EGREP_max=$ac_count | |
4556 | fi | |
4557 | # 10*(2^10) chars as input seems more than enough | |
4558 | test $ac_count -gt 10 && break | |
4559 | done | |
4560 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
4561 | esac | |
4562 | ||
4563 | $ac_path_EGREP_found && break 3 | |
4564 | done | |
4565 | done | |
4566 | done | |
5929fbe7 | 4567 | IFS=$as_save_IFS |
eb697db5 | 4568 | if test -z "$ac_cv_path_EGREP"; then |
3d608a86 | 4569 | as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 |
eb697db5 DN |
4570 | fi |
4571 | else | |
4572 | ac_cv_path_EGREP=$EGREP | |
4573 | fi | |
5929fbe7 | 4574 | |
eb697db5 | 4575 | fi |
5929fbe7 | 4576 | fi |
eb697db5 DN |
4577 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 |
4578 | $as_echo "$ac_cv_path_EGREP" >&6; } | |
4579 | EGREP="$ac_cv_path_EGREP" | |
4580 | ||
4581 | ||
4582 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 | |
4583 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
4584 | if test "${ac_cv_header_stdc+set}" = set; then : | |
4585 | $as_echo_n "(cached) " >&6 | |
4586 | else | |
4587 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4588 | /* end confdefs.h. */ | |
4589 | #include <stdlib.h> | |
4590 | #include <stdarg.h> | |
4591 | #include <string.h> | |
4592 | #include <float.h> | |
4593 | ||
4594 | int | |
4595 | main () | |
4596 | { | |
4597 | ||
4598 | ; | |
4599 | return 0; | |
4600 | } | |
4601 | _ACEOF | |
4602 | if ac_fn_c_try_compile "$LINENO"; then : | |
4603 | ac_cv_header_stdc=yes | |
5929fbe7 | 4604 | else |
eb697db5 | 4605 | ac_cv_header_stdc=no |
5929fbe7 | 4606 | fi |
eb697db5 | 4607 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
a4f64981 | 4608 | |
eb697db5 DN |
4609 | if test $ac_cv_header_stdc = yes; then |
4610 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
4611 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4612 | /* end confdefs.h. */ | |
4613 | #include <string.h> | |
15e12598 | 4614 | |
eb697db5 DN |
4615 | _ACEOF |
4616 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
4617 | $EGREP "memchr" >/dev/null 2>&1; then : | |
a4f64981 | 4618 | |
eb697db5 DN |
4619 | else |
4620 | ac_cv_header_stdc=no | |
4621 | fi | |
4622 | rm -f conftest* | |
5929fbe7 | 4623 | |
eb697db5 | 4624 | fi |
5929fbe7 | 4625 | |
eb697db5 DN |
4626 | if test $ac_cv_header_stdc = yes; then |
4627 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
4628 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4629 | /* end confdefs.h. */ | |
4630 | #include <stdlib.h> | |
5929fbe7 | 4631 | |
eb697db5 DN |
4632 | _ACEOF |
4633 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
4634 | $EGREP "free" >/dev/null 2>&1; then : | |
5929fbe7 | 4635 | |
eb697db5 DN |
4636 | else |
4637 | ac_cv_header_stdc=no | |
4638 | fi | |
4639 | rm -f conftest* | |
5929fbe7 | 4640 | |
eb697db5 | 4641 | fi |
5929fbe7 | 4642 | |
eb697db5 DN |
4643 | if test $ac_cv_header_stdc = yes; then |
4644 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
4645 | if test "$cross_compiling" = yes; then : | |
4646 | : | |
4647 | else | |
4648 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4649 | /* end confdefs.h. */ | |
4650 | #include <ctype.h> | |
4651 | #include <stdlib.h> | |
4652 | #if ((' ' & 0x0FF) == 0x020) | |
4653 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
4654 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
4655 | #else | |
4656 | # define ISLOWER(c) \ | |
4657 | (('a' <= (c) && (c) <= 'i') \ | |
4658 | || ('j' <= (c) && (c) <= 'r') \ | |
4659 | || ('s' <= (c) && (c) <= 'z')) | |
4660 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
4661 | #endif | |
5929fbe7 | 4662 | |
eb697db5 DN |
4663 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) |
4664 | int | |
4665 | main () | |
4666 | { | |
4667 | int i; | |
4668 | for (i = 0; i < 256; i++) | |
4669 | if (XOR (islower (i), ISLOWER (i)) | |
4670 | || toupper (i) != TOUPPER (i)) | |
4671 | return 2; | |
4672 | return 0; | |
4673 | } | |
4674 | _ACEOF | |
4675 | if ac_fn_c_try_run "$LINENO"; then : | |
a4f64981 | 4676 | |
eb697db5 DN |
4677 | else |
4678 | ac_cv_header_stdc=no | |
4679 | fi | |
4680 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
4681 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
4682 | fi | |
aaa36002 | 4683 | |
eb697db5 DN |
4684 | fi |
4685 | fi | |
4686 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 | |
4687 | $as_echo "$ac_cv_header_stdc" >&6; } | |
4688 | if test $ac_cv_header_stdc = yes; then | |
cd03c74a | 4689 | |
eb697db5 | 4690 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h |
a5edbe4a | 4691 | |
eb697db5 | 4692 | fi |
5929fbe7 | 4693 | |
eb697db5 DN |
4694 | # On IRIX 5.3, sys/types and inttypes.h are conflicting. |
4695 | for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ | |
4696 | inttypes.h stdint.h unistd.h | |
4697 | do : | |
4698 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
4699 | ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default | |
4700 | " | |
3d608a86 J |
4701 | eval as_val=\$$as_ac_Header |
4702 | if test "x$as_val" = x""yes; then : | |
eb697db5 DN |
4703 | cat >>confdefs.h <<_ACEOF |
4704 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
4705 | _ACEOF | |
4706 | ||
4707 | fi | |
5929fbe7 | 4708 | |
5929fbe7 | 4709 | done |
a5edbe4a | 4710 | |
5929fbe7 GM |
4711 | |
4712 | ||
eb697db5 DN |
4713 | ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" |
4714 | if test "x$ac_cv_header_minix_config_h" = x""yes; then : | |
4715 | MINIX=yes | |
4716 | else | |
4717 | MINIX= | |
4718 | fi | |
5929fbe7 | 4719 | |
5929fbe7 | 4720 | |
eb697db5 | 4721 | if test "$MINIX" = yes; then |
5929fbe7 | 4722 | |
eb697db5 | 4723 | $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h |
5929fbe7 | 4724 | |
5929fbe7 | 4725 | |
eb697db5 | 4726 | $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h |
5929fbe7 GM |
4727 | |
4728 | ||
eb697db5 | 4729 | $as_echo "#define _MINIX 1" >>confdefs.h |
5929fbe7 | 4730 | |
5929fbe7 GM |
4731 | fi |
4732 | ||
5929fbe7 | 4733 | |
eb697db5 DN |
4734 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 |
4735 | $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } | |
4736 | if test "${ac_cv_safe_to_define___extensions__+set}" = set; then : | |
5929fbe7 GM |
4737 | $as_echo_n "(cached) " >&6 |
4738 | else | |
eb697db5 | 4739 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5929fbe7 GM |
4740 | /* end confdefs.h. */ |
4741 | ||
eb697db5 DN |
4742 | # define __EXTENSIONS__ 1 |
4743 | $ac_includes_default | |
5929fbe7 GM |
4744 | int |
4745 | main () | |
4746 | { | |
eb697db5 | 4747 | |
5929fbe7 GM |
4748 | ; |
4749 | return 0; | |
4750 | } | |
4751 | _ACEOF | |
eb697db5 DN |
4752 | if ac_fn_c_try_compile "$LINENO"; then : |
4753 | ac_cv_safe_to_define___extensions__=yes | |
5929fbe7 | 4754 | else |
eb697db5 | 4755 | ac_cv_safe_to_define___extensions__=no |
e6df49e4 | 4756 | fi |
eb697db5 | 4757 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
9452ded1 | 4758 | fi |
eb697db5 DN |
4759 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 |
4760 | $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } | |
4761 | test $ac_cv_safe_to_define___extensions__ = yes && | |
4762 | $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h | |
8c5ff6dd | 4763 | |
eb697db5 | 4764 | $as_echo "#define _ALL_SOURCE 1" >>confdefs.h |
a4f64981 | 4765 | |
eb697db5 | 4766 | $as_echo "#define _GNU_SOURCE 1" >>confdefs.h |
a4f64981 | 4767 | |
eb697db5 | 4768 | $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h |
5929fbe7 | 4769 | |
eb697db5 | 4770 | $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h |
a4f64981 GM |
4771 | |
4772 | ||
a4f64981 | 4773 | |
eb697db5 DN |
4774 | ### Use -Wno-pointer-sign if the compiler supports it |
4775 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -Wno-pointer-sign" >&5 | |
4776 | $as_echo_n "checking whether gcc understands -Wno-pointer-sign... " >&6; } | |
4777 | SAVE_CFLAGS="$CFLAGS" | |
4778 | CFLAGS="$CFLAGS -Wno-pointer-sign" | |
4779 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4780 | /* end confdefs.h. */ | |
e6df49e4 | 4781 | |
eb697db5 DN |
4782 | int |
4783 | main () | |
4784 | { | |
4785 | ||
4786 | ; | |
4787 | return 0; | |
4788 | } | |
4789 | _ACEOF | |
4790 | if ac_fn_c_try_compile "$LINENO"; then : | |
4791 | has_option=yes | |
5929fbe7 | 4792 | else |
eb697db5 | 4793 | has_option=no |
cd03c74a | 4794 | fi |
eb697db5 DN |
4795 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
4796 | if test $has_option = yes; then | |
4797 | C_WARNINGS_SWITCH="-Wno-pointer-sign $C_WARNINGS_SWITCH" | |
5929fbe7 | 4798 | fi |
eb697db5 DN |
4799 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_option" >&5 |
4800 | $as_echo "$has_option" >&6; } | |
4801 | CFLAGS="$SAVE_CFLAGS" | |
4802 | unset has_option | |
4803 | unset SAVE_CFLAGS | |
4804 | ||
4805 | ### Use -Wdeclaration-after-statement if the compiler supports it | |
4806 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -Wdeclaration-after-statement" >&5 | |
4807 | $as_echo_n "checking whether gcc understands -Wdeclaration-after-statement... " >&6; } | |
4808 | SAVE_CFLAGS="$CFLAGS" | |
4809 | CFLAGS="$CFLAGS -Wdeclaration-after-statement" | |
4810 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5929fbe7 | 4811 | /* end confdefs.h. */ |
aaa36002 | 4812 | |
5929fbe7 GM |
4813 | int |
4814 | main () | |
4815 | { | |
eb697db5 | 4816 | |
5929fbe7 GM |
4817 | ; |
4818 | return 0; | |
4819 | } | |
4820 | _ACEOF | |
eb697db5 DN |
4821 | if ac_fn_c_try_compile "$LINENO"; then : |
4822 | has_option=yes | |
7186fb09 | 4823 | else |
eb697db5 DN |
4824 | has_option=no |
4825 | fi | |
4826 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4827 | if test $has_option = yes; then | |
4828 | C_WARNINGS_SWITCH="-Wdeclaration-after-statement $C_WARNINGS_SWITCH" | |
4829 | fi | |
4830 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_option" >&5 | |
4831 | $as_echo "$has_option" >&6; } | |
4832 | CFLAGS="$SAVE_CFLAGS" | |
4833 | unset has_option | |
4834 | unset SAVE_CFLAGS | |
4835 | ||
45871610 DN |
4836 | ### Use -Wold-style-definition if the compiler supports it |
4837 | # This can be removed when conversion to standard C is finished. | |
4838 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -Wold-style-definition" >&5 | |
4839 | $as_echo_n "checking whether gcc understands -Wold-style-definition... " >&6; } | |
4840 | SAVE_CFLAGS="$CFLAGS" | |
4841 | CFLAGS="$CFLAGS -Wold-style-definition" | |
4842 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4843 | /* end confdefs.h. */ | |
4844 | ||
4845 | int | |
4846 | main () | |
4847 | { | |
4848 | ||
4849 | ; | |
4850 | return 0; | |
4851 | } | |
4852 | _ACEOF | |
4853 | if ac_fn_c_try_compile "$LINENO"; then : | |
4854 | has_option=yes | |
4855 | else | |
4856 | has_option=no | |
4857 | fi | |
4858 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4859 | if test $has_option = yes; then | |
4860 | C_WARNINGS_SWITCH="-Wold-style-definition $C_WARNINGS_SWITCH" | |
4861 | fi | |
4862 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_option" >&5 | |
4863 | $as_echo "$has_option" >&6; } | |
4864 | CFLAGS="$SAVE_CFLAGS" | |
4865 | unset has_option | |
4866 | unset SAVE_CFLAGS | |
4867 | ||
4868 | ||
e6cfa7c3 | 4869 | |
eb697db5 | 4870 | #### Some other nice autoconf tests. |
e6df49e4 | 4871 | |
eb697db5 DN |
4872 | ac_ext=c |
4873 | ac_cpp='$CPP $CPPFLAGS' | |
4874 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
4875 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
4876 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
4877 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 | |
4878 | $as_echo_n "checking how to run the C preprocessor... " >&6; } | |
4879 | # On Suns, sometimes $CPP names a directory. | |
4880 | if test -n "$CPP" && test -d "$CPP"; then | |
4881 | CPP= | |
5929fbe7 | 4882 | fi |
eb697db5 DN |
4883 | if test -z "$CPP"; then |
4884 | if test "${ac_cv_prog_CPP+set}" = set; then : | |
4885 | $as_echo_n "(cached) " >&6 | |
4886 | else | |
4887 | # Double quotes because CPP needs to be expanded | |
4888 | for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" | |
4889 | do | |
4890 | ac_preproc_ok=false | |
4891 | for ac_c_preproc_warn_flag in '' yes | |
4892 | do | |
4893 | # Use a header file that comes with gcc, so configuring glibc | |
4894 | # with a fresh cross-compiler works. | |
4895 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
4896 | # <limits.h> exists even on freestanding compilers. | |
4897 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
4898 | # not just through cpp. "Syntax error" is here to catch this case. | |
4899 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4900 | /* end confdefs.h. */ | |
4901 | #ifdef __STDC__ | |
4902 | # include <limits.h> | |
4903 | #else | |
4904 | # include <assert.h> | |
4905 | #endif | |
4906 | Syntax error | |
4907 | _ACEOF | |
4908 | if ac_fn_c_try_cpp "$LINENO"; then : | |
15e12598 | 4909 | |
eb697db5 DN |
4910 | else |
4911 | # Broken: fails on valid input. | |
4912 | continue | |
8c5ff6dd | 4913 | fi |
eb697db5 DN |
4914 | rm -f conftest.err conftest.$ac_ext |
4915 | ||
4916 | # OK, works on sane cases. Now check whether nonexistent headers | |
4917 | # can be detected and how. | |
4918 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4919 | /* end confdefs.h. */ | |
4920 | #include <ac_nonexistent.h> | |
4921 | _ACEOF | |
4922 | if ac_fn_c_try_cpp "$LINENO"; then : | |
4923 | # Broken: success on invalid input. | |
4924 | continue | |
4925 | else | |
4926 | # Passes both tests. | |
4927 | ac_preproc_ok=: | |
4928 | break | |
a4f64981 | 4929 | fi |
eb697db5 | 4930 | rm -f conftest.err conftest.$ac_ext |
e6df49e4 | 4931 | |
eb697db5 DN |
4932 | done |
4933 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
4934 | rm -f conftest.err conftest.$ac_ext | |
4935 | if $ac_preproc_ok; then : | |
4936 | break | |
5929fbe7 | 4937 | fi |
8c5ff6dd | 4938 | |
eb697db5 DN |
4939 | done |
4940 | ac_cv_prog_CPP=$CPP | |
aaa36002 | 4941 | |
eb697db5 DN |
4942 | fi |
4943 | CPP=$ac_cv_prog_CPP | |
4944 | else | |
4945 | ac_cv_prog_CPP=$CPP | |
4946 | fi | |
4947 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 | |
4948 | $as_echo "$CPP" >&6; } | |
4949 | ac_preproc_ok=false | |
4950 | for ac_c_preproc_warn_flag in '' yes | |
4951 | do | |
4952 | # Use a header file that comes with gcc, so configuring glibc | |
4953 | # with a fresh cross-compiler works. | |
4954 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
4955 | # <limits.h> exists even on freestanding compilers. | |
4956 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
4957 | # not just through cpp. "Syntax error" is here to catch this case. | |
4958 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4959 | /* end confdefs.h. */ | |
4960 | #ifdef __STDC__ | |
4961 | # include <limits.h> | |
4962 | #else | |
4963 | # include <assert.h> | |
4964 | #endif | |
4965 | Syntax error | |
4966 | _ACEOF | |
4967 | if ac_fn_c_try_cpp "$LINENO"; then : | |
5929fbe7 | 4968 | |
eb697db5 DN |
4969 | else |
4970 | # Broken: fails on valid input. | |
4971 | continue | |
4972 | fi | |
4973 | rm -f conftest.err conftest.$ac_ext | |
5929fbe7 | 4974 | |
eb697db5 DN |
4975 | # OK, works on sane cases. Now check whether nonexistent headers |
4976 | # can be detected and how. | |
4977 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4978 | /* end confdefs.h. */ | |
4979 | #include <ac_nonexistent.h> | |
5929fbe7 | 4980 | _ACEOF |
eb697db5 DN |
4981 | if ac_fn_c_try_cpp "$LINENO"; then : |
4982 | # Broken: success on invalid input. | |
4983 | continue | |
4984 | else | |
4985 | # Passes both tests. | |
4986 | ac_preproc_ok=: | |
4987 | break | |
4988 | fi | |
4989 | rm -f conftest.err conftest.$ac_ext | |
5929fbe7 | 4990 | |
eb697db5 DN |
4991 | done |
4992 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
4993 | rm -f conftest.err conftest.$ac_ext | |
4994 | if $ac_preproc_ok; then : | |
5929fbe7 | 4995 | |
eb697db5 DN |
4996 | else |
4997 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
4998 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3d608a86 J |
4999 | as_fn_error "C preprocessor \"$CPP\" fails sanity check |
5000 | See \`config.log' for more details." "$LINENO" 5; } | |
eb697db5 | 5001 | fi |
5929fbe7 | 5002 | |
eb697db5 DN |
5003 | ac_ext=c |
5004 | ac_cpp='$CPP $CPPFLAGS' | |
5005 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
5006 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
5007 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
5008 | ||
5009 | # Find a good install program. We prefer a C program (faster), | |
5010 | # so one script is as good as another. But avoid the broken or | |
5011 | # incompatible versions: | |
5012 | # SysV /etc/install, /usr/sbin/install | |
5013 | # SunOS /usr/etc/install | |
5014 | # IRIX /sbin/install | |
5015 | # AIX /bin/install | |
5016 | # AmigaOS /C/install, which installs bootblocks on floppy discs | |
5017 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag | |
5018 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
5019 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
5020 | # OS/2's system install, which has a completely different semantic | |
5021 | # ./install, which can be erroneously created by make from ./install.sh. | |
5022 | # Reject install programs that cannot install multiple files. | |
5023 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 | |
5024 | $as_echo_n "checking for a BSD-compatible install... " >&6; } | |
5025 | if test -z "$INSTALL"; then | |
5026 | if test "${ac_cv_path_install+set}" = set; then : | |
5027 | $as_echo_n "(cached) " >&6 | |
5028 | else | |
5029 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5030 | for as_dir in $PATH | |
5031 | do | |
5032 | IFS=$as_save_IFS | |
5033 | test -z "$as_dir" && as_dir=. | |
5034 | # Account for people who put trailing slashes in PATH elements. | |
5035 | case $as_dir/ in #(( | |
5036 | ./ | .// | /[cC]/* | \ | |
5037 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ | |
5038 | ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ | |
5039 | /usr/ucb/* ) ;; | |
5040 | *) | |
5041 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
5042 | # Don't use installbsd from OSF since it installs stuff as root | |
5043 | # by default. | |
5044 | for ac_prog in ginstall scoinst install; do | |
5045 | for ac_exec_ext in '' $ac_executable_extensions; do | |
5046 | if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then | |
5047 | if test $ac_prog = install && | |
5048 | grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
5049 | # AIX install. It has an incompatible calling convention. | |
5050 | : | |
5051 | elif test $ac_prog = install && | |
5052 | grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
5053 | # program-specific install script used by HP pwplus--don't use. | |
5054 | : | |
5055 | else | |
5056 | rm -rf conftest.one conftest.two conftest.dir | |
5057 | echo one > conftest.one | |
5058 | echo two > conftest.two | |
5059 | mkdir conftest.dir | |
5060 | if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && | |
5061 | test -s conftest.one && test -s conftest.two && | |
5062 | test -s conftest.dir/conftest.one && | |
5063 | test -s conftest.dir/conftest.two | |
5064 | then | |
5065 | ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" | |
5066 | break 3 | |
5067 | fi | |
5068 | fi | |
5069 | fi | |
5070 | done | |
5071 | done | |
5072 | ;; | |
5073 | esac | |
15e12598 | 5074 | |
eb697db5 DN |
5075 | done |
5076 | IFS=$as_save_IFS | |
8c5ff6dd | 5077 | |
eb697db5 | 5078 | rm -rf conftest.one conftest.two conftest.dir |
8c5ff6dd | 5079 | |
eb697db5 DN |
5080 | fi |
5081 | if test "${ac_cv_path_install+set}" = set; then | |
5082 | INSTALL=$ac_cv_path_install | |
5083 | else | |
5084 | # As a last resort, use the slow shell script. Don't cache a | |
5085 | # value for INSTALL within a source directory, because that will | |
5086 | # break other packages using the cache if that directory is | |
5087 | # removed, or if the value is a relative name. | |
5088 | INSTALL=$ac_install_sh | |
5089 | fi | |
5090 | fi | |
5091 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 | |
5092 | $as_echo "$INSTALL" >&6; } | |
cd03c74a | 5093 | |
eb697db5 DN |
5094 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. |
5095 | # It thinks the first close brace ends the variable substitution. | |
5096 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
15e12598 | 5097 | |
eb697db5 | 5098 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' |
15e12598 | 5099 | |
eb697db5 | 5100 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' |
a4f64981 | 5101 | |
eb697db5 DN |
5102 | if test "x$RANLIB" = x; then |
5103 | if test -n "$ac_tool_prefix"; then | |
5104 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
5105 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
5106 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
8c5ff6dd | 5107 | $as_echo_n "checking for $ac_word... " >&6; } |
eb697db5 | 5108 | if test "${ac_cv_prog_RANLIB+set}" = set; then : |
7186fb09 GM |
5109 | $as_echo_n "(cached) " >&6 |
5110 | else | |
eb697db5 DN |
5111 | if test -n "$RANLIB"; then |
5112 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
5113 | else | |
5114 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8c5ff6dd KR |
5115 | for as_dir in $PATH |
5116 | do | |
5117 | IFS=$as_save_IFS | |
5118 | test -z "$as_dir" && as_dir=. | |
eb697db5 | 5119 | for ac_exec_ext in '' $ac_executable_extensions; do |
8c5ff6dd | 5120 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then |
eb697db5 DN |
5121 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" |
5122 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
8c5ff6dd KR |
5123 | break 2 |
5124 | fi | |
5125 | done | |
eb697db5 | 5126 | done |
8c5ff6dd | 5127 | IFS=$as_save_IFS |
a4f64981 | 5128 | |
e6df49e4 | 5129 | fi |
eb697db5 DN |
5130 | fi |
5131 | RANLIB=$ac_cv_prog_RANLIB | |
5132 | if test -n "$RANLIB"; then | |
5133 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 | |
5134 | $as_echo "$RANLIB" >&6; } | |
a4f64981 | 5135 | else |
eb697db5 | 5136 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
8c5ff6dd | 5137 | $as_echo "no" >&6; } |
a4f64981 GM |
5138 | fi |
5139 | ||
a4f64981 | 5140 | |
eb697db5 DN |
5141 | fi |
5142 | if test -z "$ac_cv_prog_RANLIB"; then | |
5143 | ac_ct_RANLIB=$RANLIB | |
5144 | # Extract the first word of "ranlib", so it can be a program name with args. | |
5145 | set dummy ranlib; ac_word=$2 | |
5146 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
5147 | $as_echo_n "checking for $ac_word... " >&6; } | |
5148 | if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : | |
5149 | $as_echo_n "(cached) " >&6 | |
5150 | else | |
5151 | if test -n "$ac_ct_RANLIB"; then | |
5152 | ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. | |
5153 | else | |
5154 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5155 | for as_dir in $PATH | |
5156 | do | |
5157 | IFS=$as_save_IFS | |
5158 | test -z "$as_dir" && as_dir=. | |
5159 | for ac_exec_ext in '' $ac_executable_extensions; do | |
5160 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
5161 | ac_cv_prog_ac_ct_RANLIB="ranlib" | |
5162 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
5163 | break 2 | |
5164 | fi | |
5165 | done | |
5166 | done | |
5167 | IFS=$as_save_IFS | |
8c5ff6dd | 5168 | |
eb697db5 DN |
5169 | fi |
5170 | fi | |
5171 | ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB | |
5172 | if test -n "$ac_ct_RANLIB"; then | |
5173 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 | |
5174 | $as_echo "$ac_ct_RANLIB" >&6; } | |
5175 | else | |
5176 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
5929fbe7 | 5177 | $as_echo "no" >&6; } |
eb697db5 | 5178 | fi |
e6df49e4 | 5179 | |
eb697db5 DN |
5180 | if test "x$ac_ct_RANLIB" = x; then |
5181 | RANLIB=":" | |
5182 | else | |
5183 | case $cross_compiling:$ac_tool_warned in | |
5184 | yes:) | |
5185 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
5186 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
5187 | ac_tool_warned=yes ;; | |
5188 | esac | |
5189 | RANLIB=$ac_ct_RANLIB | |
5190 | fi | |
5191 | else | |
5192 | RANLIB="$ac_cv_prog_RANLIB" | |
5193 | fi | |
a5edbe4a | 5194 | |
eb697db5 | 5195 | fi |
15e12598 | 5196 | |
eb697db5 DN |
5197 | ## Although we're running on an amd64 kernel, we're actually compiling for |
5198 | ## the x86 architecture. The user should probably have provided an | |
5199 | ## explicit --build to `configure', but if everything else than the kernel | |
5200 | ## is running in i386 mode, we can help them out. | |
5201 | if test "$machine" = "amdx86-64"; then | |
5202 | ac_fn_c_check_decl "$LINENO" "i386" "ac_cv_have_decl_i386" "$ac_includes_default" | |
5203 | if test "x$ac_cv_have_decl_i386" = x""yes; then : | |
15e12598 | 5204 | |
eb697db5 | 5205 | fi |
cd03c74a | 5206 | |
eb697db5 DN |
5207 | if test "$ac_cv_have_decl_i386" = "yes"; then |
5208 | canonical=`echo "$canonical" | sed -e 's/^amd64/i386/' -e 's/^x86_64/i386/'` | |
5209 | machine=intel386 | |
5210 | machfile="m/${machine}.h" | |
5929fbe7 | 5211 | fi |
eb697db5 | 5212 | fi |
49ebbd65 | 5213 | |
eb697db5 DN |
5214 | # Extract the first word of "install-info", so it can be a program name with args. |
5215 | set dummy install-info; ac_word=$2 | |
5216 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
5217 | $as_echo_n "checking for $ac_word... " >&6; } | |
5218 | if test "${ac_cv_path_INSTALL_INFO+set}" = set; then : | |
5929fbe7 GM |
5219 | $as_echo_n "(cached) " >&6 |
5220 | else | |
eb697db5 DN |
5221 | case $INSTALL_INFO in |
5222 | [\\/]* | ?:[\\/]*) | |
5223 | ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path. | |
5224 | ;; | |
5225 | *) | |
5226 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5227 | for as_dir in $PATH | |
5228 | do | |
5229 | IFS=$as_save_IFS | |
5230 | test -z "$as_dir" && as_dir=. | |
5231 | for ac_exec_ext in '' $ac_executable_extensions; do | |
5232 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
5233 | ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext" | |
5234 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
5235 | break 2 | |
5236 | fi | |
5237 | done | |
5238 | done | |
5239 | IFS=$as_save_IFS | |
8c5ff6dd | 5240 | |
eb697db5 | 5241 | ;; |
a4f64981 | 5242 | esac |
eb697db5 DN |
5243 | fi |
5244 | INSTALL_INFO=$ac_cv_path_INSTALL_INFO | |
5245 | if test -n "$INSTALL_INFO"; then | |
5246 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_INFO" >&5 | |
5247 | $as_echo "$INSTALL_INFO" >&6; } | |
5248 | else | |
5249 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
5250 | $as_echo "no" >&6; } | |
5929fbe7 | 5251 | fi |
49ebbd65 | 5252 | |
08b47d3d | 5253 | |
eb697db5 DN |
5254 | # Extract the first word of "install-info", so it can be a program name with args. |
5255 | set dummy install-info; ac_word=$2 | |
5256 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
5929fbe7 | 5257 | $as_echo_n "checking for $ac_word... " >&6; } |
eb697db5 | 5258 | if test "${ac_cv_path_INSTALL_INFO+set}" = set; then : |
5929fbe7 GM |
5259 | $as_echo_n "(cached) " >&6 |
5260 | else | |
eb697db5 | 5261 | case $INSTALL_INFO in |
5929fbe7 | 5262 | [\\/]* | ?:[\\/]*) |
eb697db5 | 5263 | ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path. |
5929fbe7 GM |
5264 | ;; |
5265 | *) | |
5266 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
eb697db5 | 5267 | for as_dir in /usr/sbin |
5929fbe7 GM |
5268 | do |
5269 | IFS=$as_save_IFS | |
5270 | test -z "$as_dir" && as_dir=. | |
eb697db5 | 5271 | for ac_exec_ext in '' $ac_executable_extensions; do |
5929fbe7 | 5272 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then |
eb697db5 DN |
5273 | ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext" |
5274 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
5929fbe7 | 5275 | break 2 |
8c5ff6dd | 5276 | fi |
5929fbe7 | 5277 | done |
eb697db5 | 5278 | done |
5929fbe7 GM |
5279 | IFS=$as_save_IFS |
5280 | ||
5929fbe7 GM |
5281 | ;; |
5282 | esac | |
5283 | fi | |
eb697db5 DN |
5284 | INSTALL_INFO=$ac_cv_path_INSTALL_INFO |
5285 | if test -n "$INSTALL_INFO"; then | |
5286 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_INFO" >&5 | |
5287 | $as_echo "$INSTALL_INFO" >&6; } | |
5929fbe7 | 5288 | else |
eb697db5 | 5289 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
5929fbe7 | 5290 | $as_echo "no" >&6; } |
8c5ff6dd | 5291 | fi |
08b47d3d | 5292 | |
08b47d3d | 5293 | |
eb697db5 DN |
5294 | # Extract the first word of "install-info", so it can be a program name with args. |
5295 | set dummy install-info; ac_word=$2 | |
5296 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
5297 | $as_echo_n "checking for $ac_word... " >&6; } | |
5298 | if test "${ac_cv_path_INSTALL_INFO+set}" = set; then : | |
5299 | $as_echo_n "(cached) " >&6 | |
5300 | else | |
5301 | case $INSTALL_INFO in | |
5302 | [\\/]* | ?:[\\/]*) | |
5303 | ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path. | |
5304 | ;; | |
5305 | *) | |
5306 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5307 | for as_dir in /sbin | |
5308 | do | |
5309 | IFS=$as_save_IFS | |
5310 | test -z "$as_dir" && as_dir=. | |
5311 | for ac_exec_ext in '' $ac_executable_extensions; do | |
5312 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
5313 | ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext" | |
5314 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
5315 | break 2 | |
5929fbe7 | 5316 | fi |
eb697db5 DN |
5317 | done |
5318 | done | |
5319 | IFS=$as_save_IFS | |
08b47d3d | 5320 | |
eb697db5 DN |
5321 | test -z "$ac_cv_path_INSTALL_INFO" && ac_cv_path_INSTALL_INFO=":" |
5322 | ;; | |
5323 | esac | |
5324 | fi | |
5325 | INSTALL_INFO=$ac_cv_path_INSTALL_INFO | |
5326 | if test -n "$INSTALL_INFO"; then | |
5327 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_INFO" >&5 | |
5328 | $as_echo "$INSTALL_INFO" >&6; } | |
8c5ff6dd | 5329 | else |
eb697db5 DN |
5330 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
5331 | $as_echo "no" >&6; } | |
a4f64981 | 5332 | fi |
08b47d3d | 5333 | |
5929fbe7 | 5334 | |
eb697db5 DN |
5335 | # Extract the first word of "gzip", so it can be a program name with args. |
5336 | set dummy gzip; ac_word=$2 | |
5337 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
5338 | $as_echo_n "checking for $ac_word... " >&6; } | |
5339 | if test "${ac_cv_path_GZIP_PROG+set}" = set; then : | |
5929fbe7 | 5340 | $as_echo_n "(cached) " >&6 |
5929fbe7 | 5341 | else |
eb697db5 DN |
5342 | case $GZIP_PROG in |
5343 | [\\/]* | ?:[\\/]*) | |
5344 | ac_cv_path_GZIP_PROG="$GZIP_PROG" # Let the user override the test with a path. | |
5345 | ;; | |
5346 | *) | |
5347 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5348 | for as_dir in $PATH | |
5349 | do | |
5350 | IFS=$as_save_IFS | |
5351 | test -z "$as_dir" && as_dir=. | |
5352 | for ac_exec_ext in '' $ac_executable_extensions; do | |
5353 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
5354 | ac_cv_path_GZIP_PROG="$as_dir/$ac_word$ac_exec_ext" | |
5355 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
5356 | break 2 | |
5357 | fi | |
5358 | done | |
5359 | done | |
5360 | IFS=$as_save_IFS | |
5929fbe7 | 5361 | |
eb697db5 | 5362 | ;; |
8c5ff6dd | 5363 | esac |
eb697db5 DN |
5364 | fi |
5365 | GZIP_PROG=$ac_cv_path_GZIP_PROG | |
5366 | if test -n "$GZIP_PROG"; then | |
5367 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP_PROG" >&5 | |
5368 | $as_echo "$GZIP_PROG" >&6; } | |
5929fbe7 | 5369 | else |
eb697db5 DN |
5370 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
5371 | $as_echo "no" >&6; } | |
5929fbe7 GM |
5372 | fi |
5373 | ||
5929fbe7 | 5374 | |
5929fbe7 | 5375 | |
8c5ff6dd | 5376 | |
eb697db5 DN |
5377 | ## Need makeinfo >= 4.6 (?) to build the manuals. |
5378 | # Extract the first word of "makeinfo", so it can be a program name with args. | |
5379 | set dummy makeinfo; ac_word=$2 | |
5380 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
5381 | $as_echo_n "checking for $ac_word... " >&6; } | |
5382 | if test "${ac_cv_path_MAKEINFO+set}" = set; then : | |
5929fbe7 GM |
5383 | $as_echo_n "(cached) " >&6 |
5384 | else | |
eb697db5 DN |
5385 | case $MAKEINFO in |
5386 | [\\/]* | ?:[\\/]*) | |
5387 | ac_cv_path_MAKEINFO="$MAKEINFO" # Let the user override the test with a path. | |
5388 | ;; | |
5389 | *) | |
5390 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5391 | for as_dir in $PATH | |
5392 | do | |
5393 | IFS=$as_save_IFS | |
5394 | test -z "$as_dir" && as_dir=. | |
5395 | for ac_exec_ext in '' $ac_executable_extensions; do | |
5396 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
5397 | ac_cv_path_MAKEINFO="$as_dir/$ac_word$ac_exec_ext" | |
5398 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
5399 | break 2 | |
5400 | fi | |
5401 | done | |
5402 | done | |
5403 | IFS=$as_save_IFS | |
5929fbe7 | 5404 | |
eb697db5 DN |
5405 | test -z "$ac_cv_path_MAKEINFO" && ac_cv_path_MAKEINFO="no" |
5406 | ;; | |
a4f64981 | 5407 | esac |
eb697db5 DN |
5408 | fi |
5409 | MAKEINFO=$ac_cv_path_MAKEINFO | |
5410 | if test -n "$MAKEINFO"; then | |
5411 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKEINFO" >&5 | |
5412 | $as_echo "$MAKEINFO" >&6; } | |
5929fbe7 | 5413 | else |
eb697db5 DN |
5414 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
5415 | $as_echo "no" >&6; } | |
5416 | fi | |
e6df49e4 | 5417 | |
eb697db5 DN |
5418 | |
5419 | if test "$MAKEINFO" != "no" && \ | |
5420 | 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 | |
5421 | MAKEINFO=no | |
5929fbe7 | 5422 | fi |
e6df49e4 | 5423 | |
eb697db5 DN |
5424 | ## Makeinfo is unusual. For a released Emacs, the manuals are |
5425 | ## pre-built, and not deleted by the normal clean rules. makeinfo is | |
5426 | ## therefore in the category of "special tools" not normally required, which | |
5427 | ## configure does not have to check for (eg autoconf itself). | |
5428 | ## In a Bazaar checkout on the other hand, the manuals are not included. | |
5429 | ## So makeinfo is a requirement to build from Bazaar, and configure | |
5430 | ## should test for it as it does for any other build requirement. | |
5431 | ## We use the presence of $srcdir/info/emacs to distinguish a release, | |
5432 | ## with pre-built manuals, from a Bazaar checkout. | |
5433 | if test "$MAKEINFO" = "no"; then | |
5434 | if test "x${with_makeinfo}" = "xno"; then | |
5435 | MAKEINFO=off | |
5436 | elif test ! -e $srcdir/info/emacs; then | |
3d608a86 | 5437 | as_fn_error "You do not seem to have makeinfo >= 4.6, and your |
eb697db5 DN |
5438 | source tree does not seem to have pre-built manuals in the \`info' directory. |
5439 | Either install a suitable version of makeinfo, or re-run configure | |
5440 | with the \`--without-makeinfo' option to build without the manuals. " "$LINENO" 5 | |
5441 | fi | |
5929fbe7 | 5442 | fi |
eb697db5 DN |
5443 | |
5444 | ||
5445 | if test x$GCC = xyes && test "x$GCC_LINK_TEST_OPTIONS" != x | |
5446 | then | |
f4981b7e | 5447 | ac_link="$ac_link $GCC_LINK_TEST_OPTIONS" |
5929fbe7 | 5448 | fi |
e6df49e4 | 5449 | |
eb697db5 DN |
5450 | if test x$GCC = x && test "x$NON_GCC_LINK_TEST_OPTIONS" != x |
5451 | then | |
f4981b7e | 5452 | ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS" |
5929fbe7 | 5453 | fi |
e6df49e4 GM |
5454 | |
5455 | ||
eb697db5 DN |
5456 | late_LDFLAGS=$LDFLAGS |
5457 | if test "$GCC" = yes; then | |
5458 | LDFLAGS="$LDFLAGS -Wl,-znocombreloc" | |
5459 | else | |
5460 | LDFLAGS="$LDFLAGS -znocombreloc" | |
5461 | fi | |
e6df49e4 | 5462 | |
eb697db5 DN |
5463 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -znocombreloc" >&5 |
5464 | $as_echo_n "checking for -znocombreloc... " >&6; } | |
5465 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5466 | /* end confdefs.h. */ | |
5467 | main(){return 0;} | |
5929fbe7 | 5468 | _ACEOF |
eb697db5 DN |
5469 | if ac_fn_c_try_link "$LINENO"; then : |
5470 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
5471 | $as_echo "yes" >&6; } | |
a4f64981 | 5472 | else |
eb697db5 DN |
5473 | LDFLAGS=$late_LDFLAGS |
5474 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
5475 | $as_echo "no" >&6; } | |
8c5ff6dd | 5476 | fi |
eb697db5 DN |
5477 | rm -f core conftest.err conftest.$ac_objext \ |
5478 | conftest$ac_exeext conftest.$ac_ext | |
8c5ff6dd | 5479 | |
e7586c7a GM |
5480 | |
5481 | # The value of CPP is a quoted variable reference, so we need to do this | |
5482 | # to get its actual value... | |
5483 | CPP=`eval "echo $CPP"` | |
8c5ff6dd | 5484 | |
8c5ff6dd | 5485 | |
e7586c7a GM |
5486 | CANNOT_DUMP=no |
5487 | case "$opsys" in | |
5488 | your-opsys-here) | |
5489 | CANNOT_DUMP=yes | |
5490 | ||
5491 | $as_echo "#define CANNOT_DUMP 1" >>confdefs.h | |
5492 | ||
5493 | ;; | |
5494 | esac | |
5495 | ||
eb697db5 DN |
5496 | |
5497 | ||
5498 | UNEXEC_OBJ=unexelf.o | |
5499 | case "$opsys" in | |
52eeb591 | 5500 | # MSDOS uses unexcoff.o |
d734dbbd | 5501 | # MSWindows uses unexw32.o |
eb697db5 DN |
5502 | aix4-2) |
5503 | UNEXEC_OBJ=unexaix.o | |
5504 | ;; | |
5505 | cygwin) | |
5506 | UNEXEC_OBJ=unexcw.o | |
5507 | ;; | |
5508 | darwin) | |
5509 | UNEXEC_OBJ=unexmacosx.o | |
5510 | ;; | |
5511 | hpux10-20 | hpux11) | |
5512 | UNEXEC_OBJ=unexhp9k800.o | |
5513 | ;; | |
5514 | sol2-10) | |
5515 | # Use the Solaris dldump() function, called from unexsol.c, to dump | |
5516 | # emacs, instead of the generic ELF dump code found in unexelf.c. | |
5517 | # The resulting binary has a complete symbol table, and is better | |
5518 | # for debugging and other observability tools (debuggers, pstack, etc). | |
5519 | # | |
5520 | # If you encounter a problem using dldump(), please consider sending | |
5521 | # a message to the OpenSolaris tools-linking mailing list: | |
5522 | # http://mail.opensolaris.org/mailman/listinfo/tools-linking | |
5523 | # | |
5524 | # It is likely that dldump() works with older Solaris too, but this has | |
5525 | # not been tested, so for now this change is for Solaris 10 or newer. | |
5526 | UNEXEC_OBJ=unexsol.o | |
5527 | ;; | |
5929fbe7 | 5528 | esac |
5929fbe7 | 5529 | |
eb697db5 DN |
5530 | LD_SWITCH_SYSTEM= |
5531 | case "$opsys" in | |
5532 | freebsd) | |
5533 | ## Let `ld' find image libs and similar things in /usr/local/lib. | |
5534 | ## The system compiler, GCC, has apparently been modified to not | |
5535 | ## look there, contrary to what a stock GCC would do. | |
5536 | LD_SWITCH_SYSTEM=-L/usr/local/lib | |
5537 | ;; | |
5929fbe7 | 5538 | |
eb697db5 DN |
5539 | gnu-linux) |
5540 | ## cpp test was "ifdef __mips__", but presumably this is equivalent... | |
5541 | test "$machine" = "mips" && LD_SWITCH_SYSTEM="-G 0" | |
5542 | ;; | |
e6df49e4 | 5543 | |
eb697db5 DN |
5544 | netbsd) |
5545 | LD_SWITCH_SYSTEM="-Wl,-rpath,/usr/pkg/lib -L/usr/pkg/lib -Wl,-rpath,/usr/local/lib -L/usr/local/lib" | |
5546 | ;; | |
8c5ff6dd | 5547 | |
eb697db5 DN |
5548 | openbsd) |
5549 | ## Han Boetes <han@mijncomputer.nl> says this is necessary, | |
5550 | ## otherwise Emacs dumps core on elf systems. | |
5551 | LD_SWITCH_SYSTEM="-Z" | |
5552 | ;; | |
5553 | esac | |
8c5ff6dd KR |
5554 | |
5555 | ||
eb697db5 | 5556 | ac_link="$ac_link $LD_SWITCH_SYSTEM" |
8c5ff6dd | 5557 | |
eb697db5 DN |
5558 | ## This setting of LD_SWITCH_SYSTEM references LD_SWITCH_X_SITE_AUX, |
5559 | ## which has not been defined yet. When this was handled with cpp, | |
5560 | ## it was expanded to null when configure sourced the s/*.h file. | |
5561 | ## Thus LD_SWITCH_SYSTEM had different values in configure and the Makefiles. | |
5562 | ## FIXME it would be cleaner to put this in LD_SWITCH_SYSTEM_TEMACS | |
5563 | ## (or somesuch), but because it is supposed to go at the _front_ | |
5564 | ## of LD_SWITCH_SYSTEM, we cannot do that in exactly the same way. | |
5565 | ## Compare with the gnu-linux case below, which added to the end | |
5566 | ## of LD_SWITCH_SYSTEM, and so can instead go at the front of | |
5567 | ## LD_SWITCH_SYSTEM_TEMACS. | |
5568 | case "$opsys" in | |
5569 | netbsd|openbsd) | |
5570 | ## _AUX_RPATH is like _AUX, but uses -rpath instead of -R. | |
5571 | LD_SWITCH_SYSTEM="\$(LD_SWITCH_X_SITE_AUX_RPATH) $LD_SWITCH_SYSTEM" ;; | |
5572 | esac | |
8c5ff6dd | 5573 | |
8c5ff6dd | 5574 | |
eb697db5 DN |
5575 | C_SWITCH_MACHINE= |
5576 | if test "$machine" = "alpha"; then | |
5577 | ac_fn_c_check_decl "$LINENO" "__ELF__" "ac_cv_have_decl___ELF__" "$ac_includes_default" | |
5578 | if test "x$ac_cv_have_decl___ELF__" = x""yes; then : | |
8c5ff6dd | 5579 | |
5929fbe7 | 5580 | fi |
8c5ff6dd | 5581 | |
eb697db5 DN |
5582 | if test "$ac_cv_have_decl___ELF__" = "yes"; then |
5583 | ## With ELF, make sure that all common symbols get allocated to in the | |
5584 | ## data section. Otherwise, the dump of temacs may miss variables in | |
5585 | ## the shared library that have been initialized. For example, with | |
5586 | ## GNU libc, __malloc_initialized would normally be resolved to the | |
5587 | ## shared library's .bss section, which is fatal. | |
5588 | if test "x$GCC" = "xyes"; then | |
5589 | C_SWITCH_MACHINE="-fno-common" | |
5590 | else | |
3d608a86 | 5591 | as_fn_error "What gives? Fix me if DEC Unix supports ELF now." "$LINENO" 5 |
eb697db5 DN |
5592 | fi |
5593 | else | |
5594 | UNEXEC_OBJ=unexalpha.o | |
8c5ff6dd | 5595 | fi |
15e12598 | 5596 | fi |
8c5ff6dd | 5597 | |
8c5ff6dd | 5598 | |
8c5ff6dd | 5599 | |
8c5ff6dd | 5600 | |
eb697db5 DN |
5601 | C_SWITCH_SYSTEM= |
5602 | ## Some programs in src produce warnings saying certain subprograms | |
5603 | ## are too complex and need a MAXMEM value greater than 2000 for | |
5604 | ## additional optimization. --nils@exp-math.uni-essen.de | |
5605 | test "$opsys" = "aix4.2" && test "x$GCC" != "xyes" && \ | |
5606 | C_SWITCH_SYSTEM="-ma -qmaxmem=4000" | |
5607 | ## gnu-linux might need -D_BSD_SOURCE on old libc5 systems. | |
5608 | ## It is redundant in glibc2, since we define _GNU_SOURCE. | |
a4f64981 | 5609 | |
e6df49e4 | 5610 | |
8c5ff6dd | 5611 | |
eb697db5 DN |
5612 | LIBS_SYSTEM= |
5613 | case "$opsys" in | |
5614 | ## IBM's X11R5 uses -lIM and -liconv in AIX 3.2.2. | |
5615 | aix4-2) LIBS_SYSTEM="-lrts -lIM -liconv" ;; | |
5929fbe7 | 5616 | |
eb697db5 | 5617 | freebsd) LIBS_SYSTEM="-lutil" ;; |
e6df49e4 | 5618 | |
eb697db5 | 5619 | hpux*) LIBS_SYSTEM="-l:libdld.sl" ;; |
8c5ff6dd | 5620 | |
eb697db5 | 5621 | sol2*) LIBS_SYSTEM="-lsocket -lnsl -lkstat" ;; |
e6df49e4 | 5622 | |
eb697db5 DN |
5623 | ## Motif needs -lgen. |
5624 | unixware) LIBS_SYSTEM="-lsocket -lnsl -lelf -lgen" ;; | |
5929fbe7 | 5625 | esac |
eb697db5 DN |
5626 | |
5627 | ||
5628 | ||
5629 | ### Make sure subsequent tests use flags consistent with the build flags. | |
5630 | ||
5631 | if test x"${OVERRIDE_CPPFLAGS}" != x; then | |
5632 | CPPFLAGS="${OVERRIDE_CPPFLAGS}" | |
5929fbe7 | 5633 | else |
eb697db5 | 5634 | CPPFLAGS="$C_SWITCH_SYSTEM $C_SWITCH_MACHINE $CPPFLAGS" |
15e12598 | 5635 | fi |
e6df49e4 | 5636 | |
a4f64981 | 5637 | |
eb697db5 DN |
5638 | |
5639 | # Check whether --enable-largefile was given. | |
5640 | if test "${enable_largefile+set}" = set; then : | |
5641 | enableval=$enable_largefile; | |
a4f64981 GM |
5642 | fi |
5643 | ||
eb697db5 | 5644 | if test "$enable_largefile" != no; then |
a4f64981 | 5645 | |
eb697db5 DN |
5646 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 |
5647 | $as_echo_n "checking for special C compiler options needed for large files... " >&6; } | |
5648 | if test "${ac_cv_sys_largefile_CC+set}" = set; then : | |
a4f64981 GM |
5649 | $as_echo_n "(cached) " >&6 |
5650 | else | |
eb697db5 DN |
5651 | ac_cv_sys_largefile_CC=no |
5652 | if test "$GCC" != yes; then | |
5653 | ac_save_CC=$CC | |
5654 | while :; do | |
5655 | # IRIX 6.2 and later do not support large files by default, | |
5656 | # so use the C compiler's -n32 option if that helps. | |
5657 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
a4f64981 | 5658 | /* end confdefs.h. */ |
eb697db5 DN |
5659 | #include <sys/types.h> |
5660 | /* Check that off_t can represent 2**63 - 1 correctly. | |
5661 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
5662 | since some C++ compilers masquerading as C compilers | |
5663 | incorrectly reject 9223372036854775807. */ | |
5664 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
5665 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
5666 | && LARGE_OFF_T % 2147483647 == 1) | |
5667 | ? 1 : -1]; | |
a4f64981 GM |
5668 | int |
5669 | main () | |
5670 | { | |
eb697db5 | 5671 | |
a4f64981 GM |
5672 | ; |
5673 | return 0; | |
5674 | } | |
5675 | _ACEOF | |
eb697db5 DN |
5676 | if ac_fn_c_try_compile "$LINENO"; then : |
5677 | break | |
15e12598 | 5678 | fi |
eb697db5 DN |
5679 | rm -f core conftest.err conftest.$ac_objext |
5680 | CC="$CC -n32" | |
5681 | if ac_fn_c_try_compile "$LINENO"; then : | |
5682 | ac_cv_sys_largefile_CC=' -n32'; break | |
5929fbe7 | 5683 | fi |
eb697db5 DN |
5684 | rm -f core conftest.err conftest.$ac_objext |
5685 | break | |
5686 | done | |
5687 | CC=$ac_save_CC | |
5688 | rm -f conftest.$ac_ext | |
5689 | fi | |
a4f64981 | 5690 | fi |
eb697db5 DN |
5691 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 |
5692 | $as_echo "$ac_cv_sys_largefile_CC" >&6; } | |
5693 | if test "$ac_cv_sys_largefile_CC" != no; then | |
5694 | CC=$CC$ac_cv_sys_largefile_CC | |
5695 | fi | |
a4f64981 | 5696 | |
eb697db5 DN |
5697 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 |
5698 | $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } | |
5699 | if test "${ac_cv_sys_file_offset_bits+set}" = set; then : | |
5700 | $as_echo_n "(cached) " >&6 | |
5701 | else | |
5702 | while :; do | |
5703 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5704 | /* end confdefs.h. */ | |
5705 | #include <sys/types.h> | |
5706 | /* Check that off_t can represent 2**63 - 1 correctly. | |
5707 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
5708 | since some C++ compilers masquerading as C compilers | |
5709 | incorrectly reject 9223372036854775807. */ | |
5710 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
5711 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
5712 | && LARGE_OFF_T % 2147483647 == 1) | |
5713 | ? 1 : -1]; | |
5714 | int | |
5715 | main () | |
5716 | { | |
8c5ff6dd | 5717 | |
eb697db5 DN |
5718 | ; |
5719 | return 0; | |
5720 | } | |
5929fbe7 | 5721 | _ACEOF |
eb697db5 DN |
5722 | if ac_fn_c_try_compile "$LINENO"; then : |
5723 | ac_cv_sys_file_offset_bits=no; break | |
5724 | fi | |
5725 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5726 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15e12598 | 5727 | /* end confdefs.h. */ |
eb697db5 DN |
5728 | #define _FILE_OFFSET_BITS 64 |
5729 | #include <sys/types.h> | |
5730 | /* Check that off_t can represent 2**63 - 1 correctly. | |
5731 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
5732 | since some C++ compilers masquerading as C compilers | |
5733 | incorrectly reject 9223372036854775807. */ | |
5734 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
5735 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
5736 | && LARGE_OFF_T % 2147483647 == 1) | |
5737 | ? 1 : -1]; | |
5738 | int | |
5739 | main () | |
5740 | { | |
a5edbe4a | 5741 | |
eb697db5 DN |
5742 | ; |
5743 | return 0; | |
5744 | } | |
5745 | _ACEOF | |
5746 | if ac_fn_c_try_compile "$LINENO"; then : | |
5747 | ac_cv_sys_file_offset_bits=64; break | |
a4f64981 | 5748 | fi |
eb697db5 DN |
5749 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5750 | ac_cv_sys_file_offset_bits=unknown | |
5751 | break | |
5752 | done | |
5753 | fi | |
5754 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 | |
5755 | $as_echo "$ac_cv_sys_file_offset_bits" >&6; } | |
5756 | case $ac_cv_sys_file_offset_bits in #( | |
5757 | no | unknown) ;; | |
5758 | *) | |
5759 | cat >>confdefs.h <<_ACEOF | |
5760 | #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits | |
5761 | _ACEOF | |
5762 | ;; | |
5929fbe7 | 5763 | esac |
eb697db5 DN |
5764 | rm -rf conftest* |
5765 | if test $ac_cv_sys_file_offset_bits = unknown; then | |
5766 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 | |
5767 | $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } | |
5768 | if test "${ac_cv_sys_large_files+set}" = set; then : | |
5929fbe7 | 5769 | $as_echo_n "(cached) " >&6 |
a4f64981 | 5770 | else |
eb697db5 DN |
5771 | while :; do |
5772 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5773 | /* end confdefs.h. */ | |
5774 | #include <sys/types.h> | |
5775 | /* Check that off_t can represent 2**63 - 1 correctly. | |
5776 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
5777 | since some C++ compilers masquerading as C compilers | |
5778 | incorrectly reject 9223372036854775807. */ | |
5779 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
5780 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
5781 | && LARGE_OFF_T % 2147483647 == 1) | |
5782 | ? 1 : -1]; | |
5783 | int | |
5784 | main () | |
5785 | { | |
8c5ff6dd | 5786 | |
eb697db5 DN |
5787 | ; |
5788 | return 0; | |
5789 | } | |
5929fbe7 | 5790 | _ACEOF |
eb697db5 DN |
5791 | if ac_fn_c_try_compile "$LINENO"; then : |
5792 | ac_cv_sys_large_files=no; break | |
5793 | fi | |
5794 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5795 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8c5ff6dd | 5796 | /* end confdefs.h. */ |
eb697db5 DN |
5797 | #define _LARGE_FILES 1 |
5798 | #include <sys/types.h> | |
5799 | /* Check that off_t can represent 2**63 - 1 correctly. | |
5800 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
5801 | since some C++ compilers masquerading as C compilers | |
5802 | incorrectly reject 9223372036854775807. */ | |
5803 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
5804 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
5805 | && LARGE_OFF_T % 2147483647 == 1) | |
5806 | ? 1 : -1]; | |
8c5ff6dd KR |
5807 | int |
5808 | main () | |
5809 | { | |
eb697db5 | 5810 | |
8c5ff6dd KR |
5811 | ; |
5812 | return 0; | |
5813 | } | |
5814 | _ACEOF | |
eb697db5 DN |
5815 | if ac_fn_c_try_compile "$LINENO"; then : |
5816 | ac_cv_sys_large_files=1; break | |
8c5ff6dd | 5817 | fi |
eb697db5 DN |
5818 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5819 | ac_cv_sys_large_files=unknown | |
5820 | break | |
5821 | done | |
5929fbe7 | 5822 | fi |
eb697db5 DN |
5823 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 |
5824 | $as_echo "$ac_cv_sys_large_files" >&6; } | |
5825 | case $ac_cv_sys_large_files in #( | |
5826 | no | unknown) ;; | |
5827 | *) | |
5828 | cat >>confdefs.h <<_ACEOF | |
5829 | #define _LARGE_FILES $ac_cv_sys_large_files | |
5830 | _ACEOF | |
5831 | ;; | |
5832 | esac | |
5833 | rm -rf conftest* | |
5834 | fi | |
e6df49e4 | 5835 | fi |
a5edbe4a | 5836 | |
5929fbe7 GM |
5837 | |
5838 | ||
eb697db5 DN |
5839 | ## If user specified a crt-dir, use that unconditionally. |
5840 | if test "X$CRT_DIR" = "X"; then | |
5929fbe7 | 5841 | |
eb697db5 DN |
5842 | case "$canonical" in |
5843 | x86_64-*-linux-gnu* | s390x-*-linux-gnu*) | |
5844 | ## On x86-64 and s390x GNU/Linux distributions, the standard library | |
5845 | ## can be in a variety of places. We only try /usr/lib64 and /usr/lib. | |
5846 | ## For anything else (eg /usr/lib32), it is up the user to specify | |
5847 | ## the location (bug#5655). | |
5848 | ## Test for crtn.o, not just the directory, because sometimes the | |
5849 | ## directory exists but does not have the relevant files (bug#1287). | |
5850 | ## FIXME better to test for binary compatibility somehow. | |
5851 | test -e /usr/lib64/crtn.o && CRT_DIR=/usr/lib64 | |
5852 | ;; | |
5929fbe7 | 5853 | |
eb697db5 DN |
5854 | powerpc64-*-linux-gnu* | sparc64-*-linux-gnu*) CRT_DIR=/usr/lib64 ;; |
5855 | esac | |
e6df49e4 | 5856 | |
eb697db5 DN |
5857 | case "$opsys" in |
5858 | hpux10-20) CRT_DIR=/lib ;; | |
5859 | esac | |
15e12598 | 5860 | |
eb697db5 DN |
5861 | ## Default is /usr/lib. |
5862 | test "X$CRT_DIR" = "X" && CRT_DIR=/usr/lib | |
8c5ff6dd | 5863 | |
15e12598 | 5864 | else |
eb697db5 DN |
5865 | |
5866 | ## Some platforms don't use any of these files, so it is not | |
5867 | ## appropriate to put this test outside the if block. | |
5868 | test -e $CRT_DIR/crtn.o || test -e $CRT_DIR/crt0.o || \ | |
3d608a86 | 5869 | as_fn_error "crt*.o not found in specified location." "$LINENO" 5 |
eb697db5 DN |
5870 | |
5871 | fi | |
5872 | ||
5873 | ||
5874 | ||
5875 | LIB_MATH=-lm | |
5876 | LIB_STANDARD= | |
5877 | START_FILES= | |
5878 | ||
5879 | case $opsys in | |
5880 | cygwin ) | |
5881 | LIB_MATH= | |
921d40b4 | 5882 | START_FILES='pre-crt0.o' |
eb697db5 DN |
5883 | ;; |
5884 | darwin ) | |
5885 | ## Adding -lm confuses the dynamic linker, so omit it. | |
5886 | LIB_MATH= | |
5887 | START_FILES='pre-crt0.o' | |
5888 | ;; | |
5889 | freebsd ) | |
5890 | LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o $(CRT_DIR)/crtn.o' | |
5891 | START_FILES='pre-crt0.o $(CRT_DIR)/crt1.o $(CRT_DIR)/crti.o $(CRT_DIR)/crtbegin.o' | |
5892 | ;; | |
5893 | gnu-linux | gnu-kfreebsd ) | |
5894 | LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtn.o' | |
5895 | START_FILES='pre-crt0.o $(CRT_DIR)/crt1.o $(CRT_DIR)/crti.o' | |
5896 | ;; | |
5897 | hpux10-20 | hpux11 ) | |
5898 | LIB_STANDARD=-lc | |
5899 | START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o' | |
5900 | ;; | |
5901 | netbsd | openbsd ) | |
5902 | if test -f $CRT_DIR/crti.o; then | |
5903 | LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o $(CRT_DIR)/crtn.o' | |
5904 | START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o $(CRT_DIR)/crti.o $(CRT_DIR)/crtbegin.o' | |
5905 | else | |
5906 | LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o' | |
5907 | START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o $(CRT_DIR)/crtbegin.o' | |
5908 | fi | |
5909 | ;; | |
5929fbe7 | 5910 | esac |
5929fbe7 | 5911 | |
5929fbe7 | 5912 | |
5929fbe7 | 5913 | |
5929fbe7 | 5914 | |
a4f64981 | 5915 | |
5929fbe7 | 5916 | |
e6df49e4 | 5917 | |
eb697db5 DN |
5918 | if test "${with_sound}" != "no"; then |
5919 | # Sound support for GNU/Linux and the free BSDs. | |
5920 | for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h | |
5921 | do : | |
5922 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
5923 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
3d608a86 J |
5924 | eval as_val=\$$as_ac_Header |
5925 | if test "x$as_val" = x""yes; then : | |
eb697db5 DN |
5926 | cat >>confdefs.h <<_ACEOF |
5927 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
5928 | _ACEOF | |
a46007e9 | 5929 | have_sound_header=yes |
5929fbe7 | 5930 | fi |
eb697db5 DN |
5931 | |
5932 | done | |
5933 | ||
5934 | # Emulation library used on NetBSD. | |
5935 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _oss_ioctl in -lossaudio" >&5 | |
5936 | $as_echo_n "checking for _oss_ioctl in -lossaudio... " >&6; } | |
5937 | if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then : | |
a4f64981 | 5938 | $as_echo_n "(cached) " >&6 |
a4f64981 | 5939 | else |
5929fbe7 | 5940 | ac_check_lib_save_LIBS=$LIBS |
eb697db5 DN |
5941 | LIBS="-lossaudio $LIBS" |
5942 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
a4f64981 | 5943 | /* end confdefs.h. */ |
8c5ff6dd | 5944 | |
5929fbe7 GM |
5945 | /* Override any GCC internal prototype to avoid an error. |
5946 | Use char because int might match the return type of a GCC | |
5947 | builtin and then its argument prototype would still apply. */ | |
5948 | #ifdef __cplusplus | |
5949 | extern "C" | |
5950 | #endif | |
eb697db5 | 5951 | char _oss_ioctl (); |
8c5ff6dd KR |
5952 | int |
5953 | main () | |
5954 | { | |
eb697db5 | 5955 | return _oss_ioctl (); |
8c5ff6dd KR |
5956 | ; |
5957 | return 0; | |
5958 | } | |
a4f64981 | 5959 | _ACEOF |
eb697db5 DN |
5960 | if ac_fn_c_try_link "$LINENO"; then : |
5961 | ac_cv_lib_ossaudio__oss_ioctl=yes | |
a4f64981 | 5962 | else |
eb697db5 | 5963 | ac_cv_lib_ossaudio__oss_ioctl=no |
a5edbe4a | 5964 | fi |
eb697db5 DN |
5965 | rm -f core conftest.err conftest.$ac_objext \ |
5966 | conftest$ac_exeext conftest.$ac_ext | |
5929fbe7 GM |
5967 | LIBS=$ac_check_lib_save_LIBS |
5968 | fi | |
eb697db5 DN |
5969 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5 |
5970 | $as_echo "$ac_cv_lib_ossaudio__oss_ioctl" >&6; } | |
5971 | if test "x$ac_cv_lib_ossaudio__oss_ioctl" = x""yes; then : | |
5972 | LIBSOUND=-lossaudio | |
5929fbe7 | 5973 | else |
eb697db5 | 5974 | LIBSOUND= |
8c5ff6dd | 5975 | fi |
a4f64981 | 5976 | |
8c5ff6dd KR |
5977 | |
5978 | ||
eb697db5 DN |
5979 | ALSA_REQUIRED=1.0.0 |
5980 | ALSA_MODULES="alsa >= $ALSA_REQUIRED" | |
8c5ff6dd | 5981 | |
eb697db5 DN |
5982 | succeeded=no |
5983 | ||
5984 | # Extract the first word of "pkg-config", so it can be a program name with args. | |
5985 | set dummy pkg-config; ac_word=$2 | |
5986 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
5987 | $as_echo_n "checking for $ac_word... " >&6; } | |
5988 | if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : | |
8c5ff6dd KR |
5989 | $as_echo_n "(cached) " >&6 |
5990 | else | |
eb697db5 DN |
5991 | case $PKG_CONFIG in |
5992 | [\\/]* | ?:[\\/]*) | |
5993 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
5994 | ;; | |
5995 | *) | |
5996 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5997 | for as_dir in $PATH | |
5998 | do | |
5999 | IFS=$as_save_IFS | |
6000 | test -z "$as_dir" && as_dir=. | |
6001 | for ac_exec_ext in '' $ac_executable_extensions; do | |
6002 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
6003 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
6004 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
6005 | break 2 | |
6006 | fi | |
6007 | done | |
6008 | done | |
6009 | IFS=$as_save_IFS | |
5929fbe7 | 6010 | |
eb697db5 DN |
6011 | test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" |
6012 | ;; | |
5929fbe7 | 6013 | esac |
a4f64981 | 6014 | fi |
eb697db5 DN |
6015 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG |
6016 | if test -n "$PKG_CONFIG"; then | |
6017 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
6018 | $as_echo "$PKG_CONFIG" >&6; } | |
5929fbe7 | 6019 | else |
eb697db5 DN |
6020 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
6021 | $as_echo "no" >&6; } | |
8c5ff6dd | 6022 | fi |
15e12598 VB |
6023 | |
6024 | ||
6025 | ||
eb697db5 DN |
6026 | if test "$PKG_CONFIG" = "no" ; then |
6027 | HAVE_ALSA=no | |
6028 | else | |
6029 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
6030 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
6031 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ALSA_MODULES" >&5 | |
6032 | $as_echo_n "checking for $ALSA_MODULES... " >&6; } | |
5929fbe7 | 6033 | |
eb697db5 DN |
6034 | if $PKG_CONFIG --exists "$ALSA_MODULES" 2>&5; then |
6035 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
6036 | $as_echo "yes" >&6; } | |
6037 | succeeded=yes | |
e6df49e4 | 6038 | |
eb697db5 DN |
6039 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking ALSA_CFLAGS" >&5 |
6040 | $as_echo_n "checking ALSA_CFLAGS... " >&6; } | |
6041 | ALSA_CFLAGS=`$PKG_CONFIG --cflags "$ALSA_MODULES"|sed -e 's,///*,/,g'` | |
6042 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ALSA_CFLAGS" >&5 | |
6043 | $as_echo "$ALSA_CFLAGS" >&6; } | |
4e569696 | 6044 | |
eb697db5 DN |
6045 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking ALSA_LIBS" >&5 |
6046 | $as_echo_n "checking ALSA_LIBS... " >&6; } | |
6047 | ALSA_LIBS=`$PKG_CONFIG --libs "$ALSA_MODULES"|sed -e 's,///*,/,g'` | |
6048 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ALSA_LIBS" >&5 | |
6049 | $as_echo "$ALSA_LIBS" >&6; } | |
6050 | else | |
6051 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
6052 | $as_echo "no" >&6; } | |
6053 | ALSA_CFLAGS="" | |
6054 | ALSA_LIBS="" | |
6055 | ## If we have a custom action on failure, don't print errors, but | |
6056 | ## do set a variable so people can do so. | |
6057 | ALSA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$ALSA_MODULES"` | |
5929fbe7 | 6058 | |
eb697db5 DN |
6059 | fi |
6060 | ||
6061 | ||
6062 | ||
6063 | else | |
6064 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
6065 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
6066 | fi | |
5929fbe7 | 6067 | fi |
4e569696 | 6068 | |
eb697db5 DN |
6069 | if test $succeeded = yes; then |
6070 | HAVE_ALSA=yes | |
6071 | else | |
6072 | HAVE_ALSA=no | |
6073 | fi | |
6074 | ||
6075 | if test $HAVE_ALSA = yes; then | |
6076 | SAVE_CFLAGS="$CFLAGS" | |
6077 | SAVE_LDFLAGS="$LDFLAGS" | |
6078 | CFLAGS="$ALSA_CFLAGS $CFLAGS" | |
6079 | LDFLAGS="$ALSA_LIBS $LDFLAGS" | |
6080 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8c5ff6dd | 6081 | /* end confdefs.h. */ |
eb697db5 DN |
6082 | #include <asoundlib.h> |
6083 | int | |
6084 | main () | |
6085 | { | |
6086 | snd_lib_error_set_handler (0); | |
6087 | ; | |
6088 | return 0; | |
6089 | } | |
6090 | _ACEOF | |
6091 | if ac_fn_c_try_compile "$LINENO"; then : | |
6092 | emacs_alsa_normal=yes | |
8c5ff6dd | 6093 | else |
eb697db5 | 6094 | emacs_alsa_normal=no |
8c5ff6dd | 6095 | fi |
5929fbe7 | 6096 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
eb697db5 DN |
6097 | if test "$emacs_alsa_normal" != yes; then |
6098 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5929fbe7 | 6099 | /* end confdefs.h. */ |
eb697db5 DN |
6100 | #include <alsa/asoundlib.h> |
6101 | int | |
6102 | main () | |
6103 | { | |
6104 | snd_lib_error_set_handler (0); | |
6105 | ; | |
6106 | return 0; | |
6107 | } | |
5929fbe7 | 6108 | _ACEOF |
eb697db5 DN |
6109 | if ac_fn_c_try_compile "$LINENO"; then : |
6110 | emacs_alsa_subdir=yes | |
5929fbe7 | 6111 | else |
eb697db5 | 6112 | emacs_alsa_subdir=no |
8c5ff6dd | 6113 | fi |
eb697db5 DN |
6114 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
6115 | if test "$emacs_alsa_subdir" != yes; then | |
3d608a86 | 6116 | as_fn_error "pkg-config found alsa, but it does not compile. See config.log for error messages." "$LINENO" 5 |
eb697db5 DN |
6117 | fi |
6118 | ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE" | |
6119 | fi | |
e6df49e4 | 6120 | |
eb697db5 DN |
6121 | CFLAGS="$SAVE_CFLAGS" |
6122 | LDFLAGS="$SAVE_LDFLAGS" | |
6123 | LIBSOUND="$LIBSOUND $ALSA_LIBS" | |
6124 | CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS" | |
e6df49e4 | 6125 | |
eb697db5 | 6126 | $as_echo "#define HAVE_ALSA 1" >>confdefs.h |
e6df49e4 | 6127 | |
eb697db5 | 6128 | fi |
e6df49e4 | 6129 | |
a46007e9 GM |
6130 | if test x$have_sound_header = xyes || test $HAVE_ALSA = yes; then |
6131 | case "$opsys" in | |
6132 | gnu-linux|freebsd|netbsd) | |
6133 | ||
6134 | $as_echo "#define HAVE_SOUND 1" >>confdefs.h | |
6135 | ||
6136 | ;; | |
6137 | esac | |
6138 | fi | |
6139 | ||
6140 | ||
5929fbe7 | 6141 | fi |
eb697db5 DN |
6142 | |
6143 | for ac_header in sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \ | |
6144 | linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \ | |
6145 | stdio_ext.h fcntl.h strings.h coff.h pty.h sys/mman.h \ | |
6146 | sys/param.h sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h \ | |
3d608a86 | 6147 | sys/utsname.h pwd.h utmp.h dirent.h util.h |
eb697db5 DN |
6148 | do : |
6149 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
6150 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
3d608a86 J |
6151 | eval as_val=\$$as_ac_Header |
6152 | if test "x$as_val" = x""yes; then : | |
eb697db5 DN |
6153 | cat >>confdefs.h <<_ACEOF |
6154 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
5929fbe7 | 6155 | _ACEOF |
15e12598 | 6156 | |
eb697db5 DN |
6157 | fi |
6158 | ||
6159 | done | |
6160 | ||
6161 | ||
6162 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if personality LINUX32 can be set" >&5 | |
6163 | $as_echo_n "checking if personality LINUX32 can be set... " >&6; } | |
6164 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6165 | /* end confdefs.h. */ | |
6166 | #include <sys/personality.h> | |
8c5ff6dd KR |
6167 | int |
6168 | main () | |
6169 | { | |
eb697db5 | 6170 | personality (PER_LINUX32) |
8c5ff6dd KR |
6171 | ; |
6172 | return 0; | |
6173 | } | |
6174 | _ACEOF | |
eb697db5 DN |
6175 | if ac_fn_c_try_compile "$LINENO"; then : |
6176 | emacs_cv_personality_linux32=yes | |
8c5ff6dd | 6177 | else |
eb697db5 | 6178 | emacs_cv_personality_linux32=no |
5929fbe7 | 6179 | fi |
eb697db5 DN |
6180 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
6181 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_personality_linux32" >&5 | |
6182 | $as_echo "$emacs_cv_personality_linux32" >&6; } | |
08b47d3d | 6183 | |
eb697db5 | 6184 | if test $emacs_cv_personality_linux32 = yes; then |
08b47d3d | 6185 | |
eb697db5 | 6186 | $as_echo "#define HAVE_PERSONALITY_LINUX32 1" >>confdefs.h |
08b47d3d | 6187 | |
eb697db5 | 6188 | fi |
a4f64981 | 6189 | |
eb697db5 DN |
6190 | for ac_header in term.h |
6191 | do : | |
6192 | ac_fn_c_check_header_preproc "$LINENO" "term.h" "ac_cv_header_term_h" | |
6193 | if test "x$ac_cv_header_term_h" = x""yes; then : | |
6194 | cat >>confdefs.h <<_ACEOF | |
6195 | #define HAVE_TERM_H 1 | |
5929fbe7 | 6196 | _ACEOF |
a4f64981 | 6197 | |
8c5ff6dd | 6198 | fi |
a4f64981 | 6199 | |
eb697db5 | 6200 | done |
a4f64981 | 6201 | |
eb697db5 DN |
6202 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 |
6203 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
6204 | if test "${ac_cv_header_stdc+set}" = set; then : | |
8c5ff6dd KR |
6205 | $as_echo_n "(cached) " >&6 |
6206 | else | |
eb697db5 | 6207 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
8c5ff6dd | 6208 | /* end confdefs.h. */ |
eb697db5 DN |
6209 | #include <stdlib.h> |
6210 | #include <stdarg.h> | |
6211 | #include <string.h> | |
6212 | #include <float.h> | |
6213 | ||
6214 | int | |
6215 | main () | |
6216 | { | |
6217 | ||
6218 | ; | |
6219 | return 0; | |
6220 | } | |
8c5ff6dd | 6221 | _ACEOF |
eb697db5 DN |
6222 | if ac_fn_c_try_compile "$LINENO"; then : |
6223 | ac_cv_header_stdc=yes | |
8c5ff6dd | 6224 | else |
eb697db5 | 6225 | ac_cv_header_stdc=no |
8c5ff6dd | 6226 | fi |
5929fbe7 | 6227 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
a4f64981 | 6228 | |
eb697db5 DN |
6229 | if test $ac_cv_header_stdc = yes; then |
6230 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
6231 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5929fbe7 | 6232 | /* end confdefs.h. */ |
eb697db5 DN |
6233 | #include <string.h> |
6234 | ||
5929fbe7 | 6235 | _ACEOF |
eb697db5 DN |
6236 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
6237 | $EGREP "memchr" >/dev/null 2>&1; then : | |
6238 | ||
5929fbe7 | 6239 | else |
eb697db5 DN |
6240 | ac_cv_header_stdc=no |
6241 | fi | |
6242 | rm -f conftest* | |
a4f64981 | 6243 | |
8c5ff6dd | 6244 | fi |
a4f64981 | 6245 | |
eb697db5 DN |
6246 | if test $ac_cv_header_stdc = yes; then |
6247 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
6248 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6249 | /* end confdefs.h. */ | |
6250 | #include <stdlib.h> | |
a4f64981 | 6251 | |
eb697db5 DN |
6252 | _ACEOF |
6253 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
6254 | $EGREP "free" >/dev/null 2>&1; then : | |
a4f64981 | 6255 | |
5929fbe7 | 6256 | else |
eb697db5 | 6257 | ac_cv_header_stdc=no |
5929fbe7 | 6258 | fi |
eb697db5 | 6259 | rm -f conftest* |
a4f64981 | 6260 | |
8c5ff6dd | 6261 | fi |
a4f64981 | 6262 | |
eb697db5 DN |
6263 | if test $ac_cv_header_stdc = yes; then |
6264 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
6265 | if test "$cross_compiling" = yes; then : | |
6266 | : | |
6267 | else | |
6268 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6269 | /* end confdefs.h. */ | |
6270 | #include <ctype.h> | |
6271 | #include <stdlib.h> | |
6272 | #if ((' ' & 0x0FF) == 0x020) | |
6273 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
6274 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
6275 | #else | |
6276 | # define ISLOWER(c) \ | |
6277 | (('a' <= (c) && (c) <= 'i') \ | |
6278 | || ('j' <= (c) && (c) <= 'r') \ | |
6279 | || ('s' <= (c) && (c) <= 'z')) | |
6280 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
6281 | #endif | |
6282 | ||
6283 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
6284 | int | |
6285 | main () | |
6286 | { | |
6287 | int i; | |
6288 | for (i = 0; i < 256; i++) | |
6289 | if (XOR (islower (i), ISLOWER (i)) | |
6290 | || toupper (i) != TOUPPER (i)) | |
6291 | return 2; | |
6292 | return 0; | |
6293 | } | |
8c5ff6dd | 6294 | _ACEOF |
eb697db5 DN |
6295 | if ac_fn_c_try_run "$LINENO"; then : |
6296 | ||
6297 | else | |
6298 | ac_cv_header_stdc=no | |
6299 | fi | |
6300 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
6301 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
6302 | fi | |
a4f64981 | 6303 | |
8c5ff6dd | 6304 | fi |
eb697db5 DN |
6305 | fi |
6306 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 | |
6307 | $as_echo "$ac_cv_header_stdc" >&6; } | |
6308 | if test $ac_cv_header_stdc = yes; then | |
a4f64981 | 6309 | |
eb697db5 | 6310 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h |
a4f64981 | 6311 | |
eb697db5 | 6312 | fi |
a4f64981 | 6313 | |
eb697db5 DN |
6314 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 |
6315 | $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } | |
6316 | if test "${ac_cv_header_time+set}" = set; then : | |
6317 | $as_echo_n "(cached) " >&6 | |
6318 | else | |
6319 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6320 | /* end confdefs.h. */ | |
6321 | #include <sys/types.h> | |
6322 | #include <sys/time.h> | |
6323 | #include <time.h> | |
a4f64981 | 6324 | |
eb697db5 DN |
6325 | int |
6326 | main () | |
6327 | { | |
6328 | if ((struct tm *) 0) | |
6329 | return 0; | |
6330 | ; | |
6331 | return 0; | |
6332 | } | |
8c5ff6dd | 6333 | _ACEOF |
eb697db5 DN |
6334 | if ac_fn_c_try_compile "$LINENO"; then : |
6335 | ac_cv_header_time=yes | |
6336 | else | |
6337 | ac_cv_header_time=no | |
6338 | fi | |
6339 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
6340 | fi | |
6341 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 | |
6342 | $as_echo "$ac_cv_header_time" >&6; } | |
6343 | if test $ac_cv_header_time = yes; then | |
6344 | ||
6345 | $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h | |
6346 | ||
6347 | fi | |
a4f64981 | 6348 | |
eb697db5 DN |
6349 | ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "$ac_includes_default" |
6350 | if test "x$ac_cv_have_decl_sys_siglist" = x""yes; then : | |
6351 | ac_have_decl=1 | |
6352 | else | |
6353 | ac_have_decl=0 | |
6354 | fi | |
a4f64981 | 6355 | |
eb697db5 DN |
6356 | cat >>confdefs.h <<_ACEOF |
6357 | #define HAVE_DECL_SYS_SIGLIST $ac_have_decl | |
5929fbe7 | 6358 | _ACEOF |
a4f64981 | 6359 | |
eb697db5 DN |
6360 | if test $ac_cv_have_decl_sys_siglist != yes; then |
6361 | # For Tru64, at least: | |
6362 | ac_fn_c_check_decl "$LINENO" "__sys_siglist" "ac_cv_have_decl___sys_siglist" "$ac_includes_default" | |
6363 | if test "x$ac_cv_have_decl___sys_siglist" = x""yes; then : | |
6364 | ac_have_decl=1 | |
6365 | else | |
6366 | ac_have_decl=0 | |
6367 | fi | |
5929fbe7 | 6368 | |
eb697db5 DN |
6369 | cat >>confdefs.h <<_ACEOF |
6370 | #define HAVE_DECL___SYS_SIGLIST $ac_have_decl | |
5929fbe7 GM |
6371 | _ACEOF |
6372 | ||
eb697db5 | 6373 | if test $ac_cv_have_decl___sys_siglist = yes; then |
5929fbe7 | 6374 | |
eb697db5 | 6375 | $as_echo "#define sys_siglist __sys_siglist" >>confdefs.h |
a4f64981 | 6376 | |
5929fbe7 | 6377 | fi |
5929fbe7 | 6378 | fi |
eb697db5 DN |
6379 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5 |
6380 | $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; } | |
6381 | if test "${ac_cv_header_sys_wait_h+set}" = set; then : | |
5929fbe7 | 6382 | $as_echo_n "(cached) " >&6 |
5929fbe7 | 6383 | else |
eb697db5 | 6384 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5929fbe7 | 6385 | /* end confdefs.h. */ |
eb697db5 DN |
6386 | #include <sys/types.h> |
6387 | #include <sys/wait.h> | |
6388 | #ifndef WEXITSTATUS | |
6389 | # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8) | |
6390 | #endif | |
6391 | #ifndef WIFEXITED | |
6392 | # define WIFEXITED(stat_val) (((stat_val) & 255) == 0) | |
6393 | #endif | |
6394 | ||
6395 | int | |
6396 | main () | |
6397 | { | |
6398 | int s; | |
6399 | wait (&s); | |
6400 | s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; | |
6401 | ; | |
6402 | return 0; | |
6403 | } | |
5929fbe7 | 6404 | _ACEOF |
eb697db5 DN |
6405 | if ac_fn_c_try_compile "$LINENO"; then : |
6406 | ac_cv_header_sys_wait_h=yes | |
5929fbe7 | 6407 | else |
eb697db5 | 6408 | ac_cv_header_sys_wait_h=no |
5929fbe7 | 6409 | fi |
5929fbe7 | 6410 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
eb697db5 DN |
6411 | fi |
6412 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5 | |
6413 | $as_echo "$ac_cv_header_sys_wait_h" >&6; } | |
6414 | if test $ac_cv_header_sys_wait_h = yes; then | |
a4f64981 | 6415 | |
eb697db5 | 6416 | $as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h |
a4f64981 | 6417 | |
5929fbe7 | 6418 | fi |
a4f64981 | 6419 | |
a4f64981 | 6420 | |
eb697db5 DN |
6421 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct utimbuf" >&5 |
6422 | $as_echo_n "checking for struct utimbuf... " >&6; } | |
6423 | if test "${emacs_cv_struct_utimbuf+set}" = set; then : | |
5929fbe7 | 6424 | $as_echo_n "(cached) " >&6 |
8c5ff6dd | 6425 | else |
eb697db5 DN |
6426 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
6427 | /* end confdefs.h. */ | |
6428 | #ifdef TIME_WITH_SYS_TIME | |
6429 | #include <sys/time.h> | |
6430 | #include <time.h> | |
6431 | #else | |
6432 | #ifdef HAVE_SYS_TIME_H | |
6433 | #include <sys/time.h> | |
6434 | #else | |
6435 | #include <time.h> | |
6436 | #endif | |
6437 | #endif | |
6438 | #ifdef HAVE_UTIME_H | |
6439 | #include <utime.h> | |
6440 | #endif | |
6441 | int | |
6442 | main () | |
6443 | { | |
6444 | static struct utimbuf x; x.actime = x.modtime; | |
6445 | ; | |
6446 | return 0; | |
6447 | } | |
6448 | _ACEOF | |
6449 | if ac_fn_c_try_compile "$LINENO"; then : | |
6450 | emacs_cv_struct_utimbuf=yes | |
6451 | else | |
6452 | emacs_cv_struct_utimbuf=no | |
6453 | fi | |
6454 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8c5ff6dd | 6455 | fi |
eb697db5 DN |
6456 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_struct_utimbuf" >&5 |
6457 | $as_echo "$emacs_cv_struct_utimbuf" >&6; } | |
6458 | if test $emacs_cv_struct_utimbuf = yes; then | |
6459 | ||
6460 | $as_echo "#define HAVE_STRUCT_UTIMBUF 1" >>confdefs.h | |
a4f64981 | 6461 | |
5929fbe7 | 6462 | fi |
eb697db5 DN |
6463 | |
6464 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 | |
6465 | $as_echo_n "checking return type of signal handlers... " >&6; } | |
6466 | if test "${ac_cv_type_signal+set}" = set; then : | |
8c5ff6dd KR |
6467 | $as_echo_n "(cached) " >&6 |
6468 | else | |
eb697db5 | 6469 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
8c5ff6dd | 6470 | /* end confdefs.h. */ |
eb697db5 DN |
6471 | #include <sys/types.h> |
6472 | #include <signal.h> | |
a4f64981 | 6473 | |
8c5ff6dd KR |
6474 | int |
6475 | main () | |
6476 | { | |
eb697db5 | 6477 | return *(signal (0, 0)) (0) == 1; |
8c5ff6dd KR |
6478 | ; |
6479 | return 0; | |
6480 | } | |
6481 | _ACEOF | |
eb697db5 DN |
6482 | if ac_fn_c_try_compile "$LINENO"; then : |
6483 | ac_cv_type_signal=int | |
8c5ff6dd | 6484 | else |
eb697db5 | 6485 | ac_cv_type_signal=void |
5929fbe7 | 6486 | fi |
eb697db5 | 6487 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5929fbe7 | 6488 | fi |
eb697db5 DN |
6489 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5 |
6490 | $as_echo "$ac_cv_type_signal" >&6; } | |
5929fbe7 | 6491 | |
eb697db5 DN |
6492 | cat >>confdefs.h <<_ACEOF |
6493 | #define RETSIGTYPE $ac_cv_type_signal | |
5929fbe7 GM |
6494 | _ACEOF |
6495 | ||
a4f64981 | 6496 | |
5929fbe7 | 6497 | |
eb697db5 DN |
6498 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for speed_t" >&5 |
6499 | $as_echo_n "checking for speed_t... " >&6; } | |
6500 | if test "${emacs_cv_speed_t+set}" = set; then : | |
e6df49e4 GM |
6501 | $as_echo_n "(cached) " >&6 |
6502 | else | |
eb697db5 | 6503 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
e6df49e4 | 6504 | /* end confdefs.h. */ |
eb697db5 | 6505 | #include <termios.h> |
8c5ff6dd KR |
6506 | int |
6507 | main () | |
6508 | { | |
eb697db5 | 6509 | speed_t x = 1; |
8c5ff6dd KR |
6510 | ; |
6511 | return 0; | |
6512 | } | |
6513 | _ACEOF | |
eb697db5 DN |
6514 | if ac_fn_c_try_compile "$LINENO"; then : |
6515 | emacs_cv_speed_t=yes | |
8c5ff6dd | 6516 | else |
eb697db5 | 6517 | emacs_cv_speed_t=no |
8c5ff6dd | 6518 | fi |
eb697db5 | 6519 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
8c5ff6dd | 6520 | fi |
eb697db5 DN |
6521 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_speed_t" >&5 |
6522 | $as_echo "$emacs_cv_speed_t" >&6; } | |
6523 | if test $emacs_cv_speed_t = yes; then | |
8c5ff6dd | 6524 | |
eb697db5 | 6525 | $as_echo "#define HAVE_SPEED_T 1" >>confdefs.h |
91e84f96 | 6526 | |
8c5ff6dd KR |
6527 | fi |
6528 | ||
eb697db5 DN |
6529 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5 |
6530 | $as_echo_n "checking for struct timeval... " >&6; } | |
6531 | if test "${emacs_cv_struct_timeval+set}" = set; then : | |
8c5ff6dd KR |
6532 | $as_echo_n "(cached) " >&6 |
6533 | else | |
eb697db5 | 6534 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
8c5ff6dd | 6535 | /* end confdefs.h. */ |
eb697db5 DN |
6536 | #ifdef TIME_WITH_SYS_TIME |
6537 | #include <sys/time.h> | |
6538 | #include <time.h> | |
6539 | #else | |
6540 | #ifdef HAVE_SYS_TIME_H | |
6541 | #include <sys/time.h> | |
6542 | #else | |
6543 | #include <time.h> | |
6544 | #endif | |
6545 | #endif | |
49ebbd65 DN |
6546 | int |
6547 | main () | |
6548 | { | |
eb697db5 | 6549 | static struct timeval x; x.tv_sec = x.tv_usec; |
49ebbd65 DN |
6550 | ; |
6551 | return 0; | |
6552 | } | |
6553 | _ACEOF | |
eb697db5 DN |
6554 | if ac_fn_c_try_compile "$LINENO"; then : |
6555 | emacs_cv_struct_timeval=yes | |
6556 | else | |
6557 | emacs_cv_struct_timeval=no | |
6558 | fi | |
6559 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
6560 | fi | |
6561 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_struct_timeval" >&5 | |
6562 | $as_echo "$emacs_cv_struct_timeval" >&6; } | |
6563 | HAVE_TIMEVAL=$emacs_cv_struct_timeval | |
6564 | if test $emacs_cv_struct_timeval = yes; then | |
6565 | ||
6566 | $as_echo "#define HAVE_TIMEVAL 1" >>confdefs.h | |
6567 | ||
6568 | fi | |
6569 | ||
6570 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct exception" >&5 | |
6571 | $as_echo_n "checking for struct exception... " >&6; } | |
6572 | if test "${emacs_cv_struct_exception+set}" = set; then : | |
6573 | $as_echo_n "(cached) " >&6 | |
6574 | else | |
6575 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6576 | /* end confdefs.h. */ | |
6577 | #include <math.h> | |
6578 | int | |
6579 | main () | |
6580 | { | |
6581 | static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1; | |
6582 | ; | |
6583 | return 0; | |
6584 | } | |
6585 | _ACEOF | |
6586 | if ac_fn_c_try_compile "$LINENO"; then : | |
6587 | emacs_cv_struct_exception=yes | |
8c5ff6dd | 6588 | else |
eb697db5 DN |
6589 | emacs_cv_struct_exception=no |
6590 | fi | |
6591 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
6592 | fi | |
6593 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_struct_exception" >&5 | |
6594 | $as_echo "$emacs_cv_struct_exception" >&6; } | |
6595 | HAVE_EXCEPTION=$emacs_cv_struct_exception | |
6596 | if test $emacs_cv_struct_exception != yes; then | |
6597 | ||
6598 | $as_echo "#define NO_MATHERR 1" >>confdefs.h | |
91e84f96 | 6599 | |
08b47d3d | 6600 | fi |
91e84f96 | 6601 | |
eb697db5 DN |
6602 | for ac_header in sys/socket.h |
6603 | do : | |
6604 | ac_fn_c_check_header_mongrel "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default" | |
6605 | if test "x$ac_cv_header_sys_socket_h" = x""yes; then : | |
6606 | cat >>confdefs.h <<_ACEOF | |
6607 | #define HAVE_SYS_SOCKET_H 1 | |
6608 | _ACEOF | |
6609 | ||
5929fbe7 | 6610 | fi |
91e84f96 | 6611 | |
eb697db5 DN |
6612 | done |
6613 | ||
6614 | for ac_header in net/if.h | |
6615 | do : | |
6616 | ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default | |
6617 | #if HAVE_SYS_SOCKET_H | |
6618 | #include <sys/socket.h> | |
6619 | #endif | |
6620 | " | |
6621 | if test "x$ac_cv_header_net_if_h" = x""yes; then : | |
6622 | cat >>confdefs.h <<_ACEOF | |
6623 | #define HAVE_NET_IF_H 1 | |
5929fbe7 | 6624 | _ACEOF |
91e84f96 | 6625 | |
5929fbe7 | 6626 | fi |
8c5ff6dd | 6627 | |
eb697db5 DN |
6628 | done |
6629 | ||
6630 | ||
6631 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 | |
6632 | $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; } | |
6633 | if test "${ac_cv_struct_tm+set}" = set; then : | |
15e12598 | 6634 | $as_echo_n "(cached) " >&6 |
15e12598 | 6635 | else |
eb697db5 | 6636 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
15e12598 | 6637 | /* end confdefs.h. */ |
eb697db5 DN |
6638 | #include <sys/types.h> |
6639 | #include <time.h> | |
a5edbe4a | 6640 | |
8c5ff6dd KR |
6641 | int |
6642 | main () | |
6643 | { | |
eb697db5 DN |
6644 | struct tm tm; |
6645 | int *p = &tm.tm_sec; | |
6646 | return !p; | |
8c5ff6dd KR |
6647 | ; |
6648 | return 0; | |
6649 | } | |
6650 | _ACEOF | |
eb697db5 DN |
6651 | if ac_fn_c_try_compile "$LINENO"; then : |
6652 | ac_cv_struct_tm=time.h | |
a4f64981 | 6653 | else |
eb697db5 DN |
6654 | ac_cv_struct_tm=sys/time.h |
6655 | fi | |
6656 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
15e12598 | 6657 | fi |
eb697db5 DN |
6658 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5 |
6659 | $as_echo "$ac_cv_struct_tm" >&6; } | |
6660 | if test $ac_cv_struct_tm = sys/time.h; then | |
6661 | ||
6662 | $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h | |
a4f64981 | 6663 | |
8c5ff6dd | 6664 | fi |
91e84f96 | 6665 | |
eb697db5 DN |
6666 | ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h> |
6667 | #include <$ac_cv_struct_tm> | |
6668 | ||
6669 | " | |
6670 | if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then : | |
a4f64981 | 6671 | |
eb697db5 DN |
6672 | cat >>confdefs.h <<_ACEOF |
6673 | #define HAVE_STRUCT_TM_TM_ZONE 1 | |
5929fbe7 | 6674 | _ACEOF |
a4f64981 GM |
6675 | |
6676 | ||
eb697db5 | 6677 | fi |
a4f64981 | 6678 | |
eb697db5 | 6679 | if test "$ac_cv_member_struct_tm_tm_zone" = yes; then |
a4f64981 | 6680 | |
eb697db5 | 6681 | $as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h |
15e12598 | 6682 | |
15e12598 | 6683 | else |
eb697db5 DN |
6684 | ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h> |
6685 | " | |
6686 | if test "x$ac_cv_have_decl_tzname" = x""yes; then : | |
6687 | ac_have_decl=1 | |
8c5ff6dd | 6688 | else |
eb697db5 | 6689 | ac_have_decl=0 |
8c5ff6dd | 6690 | fi |
49ebbd65 | 6691 | |
eb697db5 DN |
6692 | cat >>confdefs.h <<_ACEOF |
6693 | #define HAVE_DECL_TZNAME $ac_have_decl | |
6694 | _ACEOF | |
6695 | ||
6696 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5 | |
6697 | $as_echo_n "checking for tzname... " >&6; } | |
6698 | if test "${ac_cv_var_tzname+set}" = set; then : | |
5929fbe7 GM |
6699 | $as_echo_n "(cached) " >&6 |
6700 | else | |
eb697db5 | 6701 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
8c5ff6dd | 6702 | /* end confdefs.h. */ |
eb697db5 DN |
6703 | #include <time.h> |
6704 | #if !HAVE_DECL_TZNAME | |
6705 | extern char *tzname[]; | |
5929fbe7 GM |
6706 | #endif |
6707 | ||
a4f64981 GM |
6708 | int |
6709 | main () | |
6710 | { | |
eb697db5 | 6711 | return tzname[0][0]; |
a4f64981 GM |
6712 | ; |
6713 | return 0; | |
6714 | } | |
6715 | _ACEOF | |
eb697db5 DN |
6716 | if ac_fn_c_try_link "$LINENO"; then : |
6717 | ac_cv_var_tzname=yes | |
a4f64981 | 6718 | else |
eb697db5 DN |
6719 | ac_cv_var_tzname=no |
6720 | fi | |
6721 | rm -f core conftest.err conftest.$ac_objext \ | |
6722 | conftest$ac_exeext conftest.$ac_ext | |
6723 | fi | |
6724 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5 | |
6725 | $as_echo "$ac_cv_var_tzname" >&6; } | |
6726 | if test $ac_cv_var_tzname = yes; then | |
5929fbe7 | 6727 | |
eb697db5 DN |
6728 | $as_echo "#define HAVE_TZNAME 1" >>confdefs.h |
6729 | ||
6730 | fi | |
a4f64981 | 6731 | fi |
aaa36002 | 6732 | |
eb697db5 DN |
6733 | ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include <time.h> |
6734 | " | |
6735 | if test "x$ac_cv_member_struct_tm_tm_gmtoff" = x""yes; then : | |
6736 | ||
6737 | $as_echo "#define HAVE_TM_GMTOFF 1" >>confdefs.h | |
6738 | ||
15e12598 | 6739 | fi |
eb697db5 DN |
6740 | |
6741 | ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_flags" "ac_cv_member_struct_ifreq_ifr_flags" "$ac_includes_default | |
6742 | #if HAVE_SYS_SOCKET_H | |
6743 | #include <sys/socket.h> | |
6744 | #endif | |
6745 | #if HAVE_NET_IF_H | |
6746 | #include <net/if.h> | |
6747 | #endif | |
6748 | " | |
6749 | if test "x$ac_cv_member_struct_ifreq_ifr_flags" = x""yes; then : | |
aaa36002 | 6750 | |
5929fbe7 | 6751 | cat >>confdefs.h <<_ACEOF |
eb697db5 | 6752 | #define HAVE_STRUCT_IFREQ_IFR_FLAGS 1 |
5929fbe7 GM |
6753 | _ACEOF |
6754 | ||
cd03c74a | 6755 | |
8c5ff6dd | 6756 | fi |
eb697db5 DN |
6757 | ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_hwaddr" "ac_cv_member_struct_ifreq_ifr_hwaddr" "$ac_includes_default |
6758 | #if HAVE_SYS_SOCKET_H | |
6759 | #include <sys/socket.h> | |
6760 | #endif | |
6761 | #if HAVE_NET_IF_H | |
6762 | #include <net/if.h> | |
6763 | #endif | |
6764 | " | |
6765 | if test "x$ac_cv_member_struct_ifreq_ifr_hwaddr" = x""yes; then : | |
49ebbd65 | 6766 | |
eb697db5 DN |
6767 | cat >>confdefs.h <<_ACEOF |
6768 | #define HAVE_STRUCT_IFREQ_IFR_HWADDR 1 | |
5929fbe7 | 6769 | _ACEOF |
49ebbd65 | 6770 | |
aaa36002 | 6771 | |
8c5ff6dd | 6772 | fi |
eb697db5 DN |
6773 | ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_netmask" "ac_cv_member_struct_ifreq_ifr_netmask" "$ac_includes_default |
6774 | #if HAVE_SYS_SOCKET_H | |
6775 | #include <sys/socket.h> | |
6776 | #endif | |
6777 | #if HAVE_NET_IF_H | |
6778 | #include <net/if.h> | |
6779 | #endif | |
6780 | " | |
6781 | if test "x$ac_cv_member_struct_ifreq_ifr_netmask" = x""yes; then : | |
6782 | ||
6783 | cat >>confdefs.h <<_ACEOF | |
6784 | #define HAVE_STRUCT_IFREQ_IFR_NETMASK 1 | |
6785 | _ACEOF | |
aaa36002 | 6786 | |
5929fbe7 | 6787 | |
8c5ff6dd | 6788 | fi |
eb697db5 DN |
6789 | ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_broadaddr" "ac_cv_member_struct_ifreq_ifr_broadaddr" "$ac_includes_default |
6790 | #if HAVE_SYS_SOCKET_H | |
6791 | #include <sys/socket.h> | |
6792 | #endif | |
6793 | #if HAVE_NET_IF_H | |
6794 | #include <net/if.h> | |
6795 | #endif | |
6796 | " | |
6797 | if test "x$ac_cv_member_struct_ifreq_ifr_broadaddr" = x""yes; then : | |
cd03c74a | 6798 | |
5929fbe7 | 6799 | cat >>confdefs.h <<_ACEOF |
eb697db5 | 6800 | #define HAVE_STRUCT_IFREQ_IFR_BROADADDR 1 |
5929fbe7 | 6801 | _ACEOF |
49ebbd65 | 6802 | |
7186fb09 | 6803 | |
8c5ff6dd | 6804 | fi |
eb697db5 DN |
6805 | ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_addr" "ac_cv_member_struct_ifreq_ifr_addr" "$ac_includes_default |
6806 | #if HAVE_SYS_SOCKET_H | |
6807 | #include <sys/socket.h> | |
6808 | #endif | |
6809 | #if HAVE_NET_IF_H | |
6810 | #include <net/if.h> | |
6811 | #endif | |
6812 | " | |
6813 | if test "x$ac_cv_member_struct_ifreq_ifr_addr" = x""yes; then : | |
6814 | ||
6815 | cat >>confdefs.h <<_ACEOF | |
6816 | #define HAVE_STRUCT_IFREQ_IFR_ADDR 1 | |
6817 | _ACEOF | |
7186fb09 | 6818 | |
5929fbe7 | 6819 | |
8c5ff6dd KR |
6820 | fi |
6821 | ||
5929fbe7 | 6822 | |
5929fbe7 | 6823 | |
eb697db5 DN |
6824 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for function prototypes" >&5 |
6825 | $as_echo_n "checking for function prototypes... " >&6; } | |
6826 | if test "$ac_cv_prog_cc_c89" != no; then | |
6827 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
6828 | $as_echo "yes" >&6; } | |
5929fbe7 | 6829 | |
eb697db5 | 6830 | $as_echo "#define PROTOTYPES 1" >>confdefs.h |
5929fbe7 | 6831 | |
5929fbe7 | 6832 | |
eb697db5 | 6833 | $as_echo "#define __PROTOTYPES 1" >>confdefs.h |
5929fbe7 | 6834 | |
eb697db5 DN |
6835 | else |
6836 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
6837 | $as_echo "no" >&6; } | |
8c5ff6dd | 6838 | fi |
15e12598 | 6839 | |
eb697db5 DN |
6840 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5 |
6841 | $as_echo_n "checking for working volatile... " >&6; } | |
6842 | if test "${ac_cv_c_volatile+set}" = set; then : | |
5929fbe7 GM |
6843 | $as_echo_n "(cached) " >&6 |
6844 | else | |
eb697db5 | 6845 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
8c5ff6dd | 6846 | /* end confdefs.h. */ |
5929fbe7 | 6847 | |
8c5ff6dd KR |
6848 | int |
6849 | main () | |
a4f64981 | 6850 | { |
eb697db5 DN |
6851 | |
6852 | volatile int x; | |
6853 | int * volatile y = (int *) 0; | |
6854 | return !x && !y; | |
8c5ff6dd KR |
6855 | ; |
6856 | return 0; | |
a4f64981 | 6857 | } |
8c5ff6dd | 6858 | _ACEOF |
eb697db5 DN |
6859 | if ac_fn_c_try_compile "$LINENO"; then : |
6860 | ac_cv_c_volatile=yes | |
8c5ff6dd | 6861 | else |
eb697db5 | 6862 | ac_cv_c_volatile=no |
8c5ff6dd | 6863 | fi |
eb697db5 | 6864 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
8c5ff6dd | 6865 | fi |
eb697db5 DN |
6866 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5 |
6867 | $as_echo "$ac_cv_c_volatile" >&6; } | |
6868 | if test $ac_cv_c_volatile = no; then | |
9452ded1 | 6869 | |
eb697db5 | 6870 | $as_echo "#define volatile /**/" >>confdefs.h |
5929fbe7 | 6871 | |
8c5ff6dd | 6872 | fi |
eb697db5 DN |
6873 | |
6874 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 | |
6875 | $as_echo_n "checking for an ANSI C-conforming const... " >&6; } | |
6876 | if test "${ac_cv_c_const+set}" = set; then : | |
5929fbe7 GM |
6877 | $as_echo_n "(cached) " >&6 |
6878 | else | |
eb697db5 | 6879 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5929fbe7 GM |
6880 | /* end confdefs.h. */ |
6881 | ||
5929fbe7 GM |
6882 | int |
6883 | main () | |
6884 | { | |
eb697db5 DN |
6885 | /* FIXME: Include the comments suggested by Paul. */ |
6886 | #ifndef __cplusplus | |
6887 | /* Ultrix mips cc rejects this. */ | |
6888 | typedef int charset[2]; | |
6889 | const charset cs; | |
6890 | /* SunOS 4.1.1 cc rejects this. */ | |
6891 | char const *const *pcpcc; | |
6892 | char **ppc; | |
6893 | /* NEC SVR4.0.2 mips cc rejects this. */ | |
6894 | struct point {int x, y;}; | |
6895 | static struct point const zero = {0,0}; | |
6896 | /* AIX XL C 1.02.0.0 rejects this. | |
6897 | It does not let you subtract one const X* pointer from another in | |
6898 | an arm of an if-expression whose if-part is not a constant | |
6899 | expression */ | |
6900 | const char *g = "string"; | |
6901 | pcpcc = &g + (g ? g-g : 0); | |
6902 | /* HPUX 7.0 cc rejects these. */ | |
6903 | ++pcpcc; | |
6904 | ppc = (char**) pcpcc; | |
6905 | pcpcc = (char const *const *) ppc; | |
6906 | { /* SCO 3.2v4 cc rejects this. */ | |
6907 | char *t; | |
6908 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
6909 | ||
6910 | *t++ = 0; | |
6911 | if (s) return 0; | |
6912 | } | |
6913 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
6914 | int x[] = {25, 17}; | |
6915 | const int *foo = &x[0]; | |
6916 | ++foo; | |
6917 | } | |
6918 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
6919 | typedef const int *iptr; | |
6920 | iptr p = 0; | |
6921 | ++p; | |
6922 | } | |
6923 | { /* AIX XL C 1.02.0.0 rejects this saying | |
6924 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
6925 | struct s { int j; const int *ap[3]; }; | |
6926 | struct s *b; b->j = 5; | |
6927 | } | |
6928 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
6929 | const int foo = 10; | |
6930 | if (!foo) return 0; | |
6931 | } | |
6932 | return !cs[0] && !zero.x; | |
6933 | #endif | |
6934 | ||
5929fbe7 GM |
6935 | ; |
6936 | return 0; | |
6937 | } | |
6938 | _ACEOF | |
eb697db5 DN |
6939 | if ac_fn_c_try_compile "$LINENO"; then : |
6940 | ac_cv_c_const=yes | |
8c5ff6dd | 6941 | else |
eb697db5 | 6942 | ac_cv_c_const=no |
8c5ff6dd | 6943 | fi |
eb697db5 | 6944 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
8c5ff6dd | 6945 | fi |
eb697db5 DN |
6946 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 |
6947 | $as_echo "$ac_cv_c_const" >&6; } | |
6948 | if test $ac_cv_c_const = no; then | |
91e84f96 | 6949 | |
eb697db5 | 6950 | $as_echo "#define const /**/" >>confdefs.h |
08b47d3d | 6951 | |
8c5ff6dd | 6952 | fi |
91e84f96 | 6953 | |
eb697db5 DN |
6954 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for void * support" >&5 |
6955 | $as_echo_n "checking for void * support... " >&6; } | |
6956 | if test "${emacs_cv_void_star+set}" = set; then : | |
5929fbe7 | 6957 | $as_echo_n "(cached) " >&6 |
8c5ff6dd | 6958 | else |
eb697db5 | 6959 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5929fbe7 | 6960 | /* end confdefs.h. */ |
8c5ff6dd | 6961 | |
8c5ff6dd KR |
6962 | int |
6963 | main () | |
6964 | { | |
eb697db5 | 6965 | void * foo; |
8c5ff6dd KR |
6966 | ; |
6967 | return 0; | |
a4f64981 | 6968 | } |
a5edbe4a | 6969 | _ACEOF |
eb697db5 DN |
6970 | if ac_fn_c_try_compile "$LINENO"; then : |
6971 | emacs_cv_void_star=yes | |
15e12598 | 6972 | else |
eb697db5 | 6973 | emacs_cv_void_star=no |
a4f64981 | 6974 | fi |
eb697db5 | 6975 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
a4f64981 | 6976 | fi |
eb697db5 DN |
6977 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_void_star" >&5 |
6978 | $as_echo "$emacs_cv_void_star" >&6; } | |
6979 | if test $emacs_cv_void_star = yes; then | |
6980 | $as_echo "#define POINTER_TYPE void" >>confdefs.h | |
6981 | ||
6982 | else | |
6983 | $as_echo "#define POINTER_TYPE char" >>confdefs.h | |
15e12598 VB |
6984 | |
6985 | fi | |
15e12598 | 6986 | |
a4f64981 | 6987 | |
eb697db5 DN |
6988 | |
6989 | ||
6990 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 | |
6991 | $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } | |
6992 | set x ${MAKE-make} | |
6993 | ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` | |
3d608a86 | 6994 | if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : |
5929fbe7 | 6995 | $as_echo_n "(cached) " >&6 |
5929fbe7 | 6996 | else |
eb697db5 DN |
6997 | cat >conftest.make <<\_ACEOF |
6998 | SHELL = /bin/sh | |
6999 | all: | |
7000 | @echo '@@@%%%=$(MAKE)=@@@%%%' | |
5929fbe7 | 7001 | _ACEOF |
3d608a86 | 7002 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. |
eb697db5 DN |
7003 | case `${MAKE-make} -f conftest.make 2>/dev/null` in |
7004 | *@@@%%%=?*=@@@%%%*) | |
7005 | eval ac_cv_prog_make_${ac_make}_set=yes;; | |
7006 | *) | |
7007 | eval ac_cv_prog_make_${ac_make}_set=no;; | |
5929fbe7 | 7008 | esac |
eb697db5 DN |
7009 | rm -f conftest.make |
7010 | fi | |
7011 | if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then | |
7012 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
7013 | $as_echo "yes" >&6; } | |
7014 | SET_MAKE= | |
5929fbe7 | 7015 | else |
eb697db5 DN |
7016 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7017 | $as_echo "no" >&6; } | |
7018 | SET_MAKE="MAKE=${MAKE-make}" | |
5929fbe7 | 7019 | fi |
8c5ff6dd KR |
7020 | |
7021 | ||
eb697db5 DN |
7022 | DEPFLAGS= |
7023 | MKDEPDIR=":" | |
7024 | deps_frag=deps.mk | |
7025 | if test "$GCC" = yes && test "$ac_enable_autodepend" = yes; then | |
7026 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using GNU Make" >&5 | |
7027 | $as_echo_n "checking whether we are using GNU Make... " >&6; } | |
7028 | HAVE_GNU_MAKE=no | |
7029 | testval=`make --version 2>/dev/null | grep 'GNU Make'` | |
7030 | if test "x$testval" != x; then | |
7031 | HAVE_GNU_MAKE=yes | |
7032 | else | |
7033 | ac_enable_autodepend=no | |
7034 | fi | |
7035 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_GNU_MAKE" >&5 | |
7036 | $as_echo "$HAVE_GNU_MAKE" >&6; } | |
7037 | if test $HAVE_GNU_MAKE = yes; then | |
7038 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -MMD -MF" >&5 | |
7039 | $as_echo_n "checking whether gcc understands -MMD -MF... " >&6; } | |
7040 | SAVE_CFLAGS="$CFLAGS" | |
7041 | CFLAGS="$CFLAGS -MMD -MF deps.d" | |
7042 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5929fbe7 | 7043 | /* end confdefs.h. */ |
eb697db5 DN |
7044 | |
7045 | int | |
7046 | main () | |
7047 | { | |
7048 | ||
7049 | ; | |
7050 | return 0; | |
7051 | } | |
8c5ff6dd | 7052 | _ACEOF |
eb697db5 | 7053 | if ac_fn_c_try_compile "$LINENO"; then : |
8c5ff6dd | 7054 | |
eb697db5 DN |
7055 | else |
7056 | ac_enable_autodepend=no | |
7057 | fi | |
7058 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7059 | CFLAGS="$SAVE_CFLAGS" | |
7060 | test -f deps.d || ac_enable_autodepend=no | |
7061 | rm -rf deps.d | |
7062 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_autodepend" >&5 | |
7063 | $as_echo "$ac_enable_autodepend" >&6; } | |
7064 | fi | |
7065 | if test $ac_enable_autodepend = yes; then | |
7066 | DEPFLAGS='-MMD -MF ${DEPDIR}/$*.d' | |
7067 | ## In parallel builds, another make might create depdir between | |
7068 | ## the first test and mkdir, so stick another test on the end. | |
7069 | ## Or use mkinstalldirs? mkdir -p is not portable. | |
7070 | MKDEPDIR='test -d ${DEPDIR} || mkdir ${DEPDIR} || test -d ${DEPDIR}' | |
7071 | deps_frag=autodeps.mk | |
7072 | fi | |
8c5ff6dd | 7073 | fi |
eb697db5 | 7074 | deps_frag=$srcdir/src/$deps_frag |
a4f64981 | 7075 | |
a4f64981 | 7076 | |
a4f64981 | 7077 | |
eb697db5 DN |
7078 | |
7079 | ||
7080 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long file names" >&5 | |
7081 | $as_echo_n "checking for long file names... " >&6; } | |
7082 | if test "${ac_cv_sys_long_file_names+set}" = set; then : | |
5929fbe7 GM |
7083 | $as_echo_n "(cached) " >&6 |
7084 | else | |
eb697db5 DN |
7085 | ac_cv_sys_long_file_names=yes |
7086 | # Test for long file names in all the places we know might matter: | |
7087 | # . the current directory, where building will happen | |
7088 | # $prefix/lib where we will be installing things | |
7089 | # $exec_prefix/lib likewise | |
7090 | # $TMPDIR if set, where it might want to write temporary files | |
7091 | # /tmp where it might want to write temporary files | |
7092 | # /var/tmp likewise | |
7093 | # /usr/tmp likewise | |
7094 | for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do | |
7095 | # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib | |
7096 | # in the usual case where exec_prefix is '${prefix}'. | |
7097 | case $ac_dir in #( | |
7098 | . | /* | ?:[\\/]*) ;; #( | |
7099 | *) continue;; | |
7100 | esac | |
7101 | test -w "$ac_dir/." || continue # It is less confusing to not echo anything here. | |
7102 | ac_xdir=$ac_dir/cf$$ | |
7103 | (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue | |
7104 | ac_tf1=$ac_xdir/conftest9012345 | |
7105 | ac_tf2=$ac_xdir/conftest9012346 | |
7106 | touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" || | |
7107 | ac_cv_sys_long_file_names=no | |
7108 | rm -f -r "$ac_xdir" 2>/dev/null | |
7109 | test $ac_cv_sys_long_file_names = no && break | |
7110 | done | |
5929fbe7 | 7111 | fi |
eb697db5 DN |
7112 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_long_file_names" >&5 |
7113 | $as_echo "$ac_cv_sys_long_file_names" >&6; } | |
7114 | if test $ac_cv_sys_long_file_names = yes; then | |
7115 | ||
7116 | $as_echo "#define HAVE_LONG_FILE_NAMES 1" >>confdefs.h | |
49ebbd65 | 7117 | |
5929fbe7 | 7118 | fi |
a4f64981 | 7119 | |
eb697db5 DN |
7120 | |
7121 | #### Choose a window system. | |
7122 | ||
7123 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5 | |
7124 | $as_echo_n "checking for X... " >&6; } | |
7125 | ||
7126 | ||
7127 | # Check whether --with-x was given. | |
7128 | if test "${with_x+set}" = set; then : | |
7129 | withval=$with_x; | |
7130 | fi | |
7131 | ||
7132 | # $have_x is `yes', `no', `disabled', or empty when we do not yet know. | |
7133 | if test "x$with_x" = xno; then | |
7134 | # The user explicitly disabled X. | |
7135 | have_x=disabled | |
7136 | else | |
7137 | case $x_includes,$x_libraries in #( | |
3d608a86 | 7138 | *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #( |
eb697db5 DN |
7139 | *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then : |
7140 | $as_echo_n "(cached) " >&6 | |
7141 | else | |
7142 | # One or both of the vars are not set, and there is no cached value. | |
7143 | ac_x_includes=no ac_x_libraries=no | |
7144 | rm -f -r conftest.dir | |
7145 | if mkdir conftest.dir; then | |
7146 | cd conftest.dir | |
7147 | cat >Imakefile <<'_ACEOF' | |
7148 | incroot: | |
7149 | @echo incroot='${INCROOT}' | |
7150 | usrlibdir: | |
7151 | @echo usrlibdir='${USRLIBDIR}' | |
7152 | libdir: | |
7153 | @echo libdir='${LIBDIR}' | |
7154 | _ACEOF | |
7155 | if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then | |
3d608a86 | 7156 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. |
eb697db5 DN |
7157 | for ac_var in incroot usrlibdir libdir; do |
7158 | eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" | |
7159 | done | |
7160 | # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. | |
7161 | for ac_extension in a so sl dylib la dll; do | |
7162 | if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && | |
7163 | test -f "$ac_im_libdir/libX11.$ac_extension"; then | |
7164 | ac_im_usrlibdir=$ac_im_libdir; break | |
7165 | fi | |
7166 | done | |
7167 | # Screen out bogus values from the imake configuration. They are | |
7168 | # bogus both because they are the default anyway, and because | |
7169 | # using them would break gcc on systems where it needs fixed includes. | |
7170 | case $ac_im_incroot in | |
7171 | /usr/include) ac_x_includes= ;; | |
7172 | *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; | |
7173 | esac | |
7174 | case $ac_im_usrlibdir in | |
7175 | /usr/lib | /usr/lib64 | /lib | /lib64) ;; | |
7176 | *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; | |
7177 | esac | |
7178 | fi | |
7179 | cd .. | |
7180 | rm -f -r conftest.dir | |
5929fbe7 | 7181 | fi |
8c5ff6dd | 7182 | |
eb697db5 DN |
7183 | # Standard set of common directories for X headers. |
7184 | # Check X11 before X11Rn because it is often a symlink to the current release. | |
7185 | ac_x_header_dirs=' | |
7186 | /usr/X11/include | |
7187 | /usr/X11R7/include | |
7188 | /usr/X11R6/include | |
7189 | /usr/X11R5/include | |
7190 | /usr/X11R4/include | |
7191 | ||
7192 | /usr/include/X11 | |
7193 | /usr/include/X11R7 | |
7194 | /usr/include/X11R6 | |
7195 | /usr/include/X11R5 | |
7196 | /usr/include/X11R4 | |
8c5ff6dd | 7197 | |
eb697db5 DN |
7198 | /usr/local/X11/include |
7199 | /usr/local/X11R7/include | |
7200 | /usr/local/X11R6/include | |
7201 | /usr/local/X11R5/include | |
7202 | /usr/local/X11R4/include | |
8c5ff6dd | 7203 | |
eb697db5 DN |
7204 | /usr/local/include/X11 |
7205 | /usr/local/include/X11R7 | |
7206 | /usr/local/include/X11R6 | |
7207 | /usr/local/include/X11R5 | |
7208 | /usr/local/include/X11R4 | |
8c5ff6dd | 7209 | |
eb697db5 DN |
7210 | /usr/X386/include |
7211 | /usr/x386/include | |
7212 | /usr/XFree86/include/X11 | |
8c5ff6dd | 7213 | |
eb697db5 DN |
7214 | /usr/include |
7215 | /usr/local/include | |
7216 | /usr/unsupported/include | |
7217 | /usr/athena/include | |
7218 | /usr/local/x11r5/include | |
7219 | /usr/lpp/Xamples/include | |
8c5ff6dd | 7220 | |
eb697db5 DN |
7221 | /usr/openwin/include |
7222 | /usr/openwin/share/include' | |
8c5ff6dd | 7223 | |
eb697db5 DN |
7224 | if test "$ac_x_includes" = no; then |
7225 | # Guess where to find include files, by looking for Xlib.h. | |
7226 | # First, try using that file with no special directory specified. | |
7227 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7228 | /* end confdefs.h. */ | |
7229 | #include <X11/Xlib.h> | |
e6df49e4 | 7230 | _ACEOF |
eb697db5 DN |
7231 | if ac_fn_c_try_cpp "$LINENO"; then : |
7232 | # We can compile using X headers with no special include directory. | |
7233 | ac_x_includes= | |
7234 | else | |
7235 | for ac_dir in $ac_x_header_dirs; do | |
7236 | if test -r "$ac_dir/X11/Xlib.h"; then | |
7237 | ac_x_includes=$ac_dir | |
7238 | break | |
7239 | fi | |
7240 | done | |
7241 | fi | |
7242 | rm -f conftest.err conftest.$ac_ext | |
7243 | fi # $ac_x_includes = no | |
49ebbd65 | 7244 | |
eb697db5 DN |
7245 | if test "$ac_x_libraries" = no; then |
7246 | # Check for the libraries. | |
7247 | # See if we find them without any special options. | |
7248 | # Don't add to $LIBS permanently. | |
7249 | ac_save_LIBS=$LIBS | |
7250 | LIBS="-lX11 $LIBS" | |
7251 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7252 | /* end confdefs.h. */ | |
7253 | #include <X11/Xlib.h> | |
7254 | int | |
7255 | main () | |
7256 | { | |
7257 | XrmInitialize () | |
7258 | ; | |
7259 | return 0; | |
7260 | } | |
5929fbe7 | 7261 | _ACEOF |
eb697db5 DN |
7262 | if ac_fn_c_try_link "$LINENO"; then : |
7263 | LIBS=$ac_save_LIBS | |
7264 | # We can link X programs with no special library path. | |
7265 | ac_x_libraries= | |
7266 | else | |
7267 | LIBS=$ac_save_LIBS | |
7268 | for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` | |
7269 | do | |
7270 | # Don't even attempt the hair of trying to link an X program! | |
7271 | for ac_extension in a so sl dylib la dll; do | |
7272 | if test -r "$ac_dir/libX11.$ac_extension"; then | |
7273 | ac_x_libraries=$ac_dir | |
7274 | break 2 | |
7275 | fi | |
7276 | done | |
7277 | done | |
7278 | fi | |
7279 | rm -f core conftest.err conftest.$ac_objext \ | |
7280 | conftest$ac_exeext conftest.$ac_ext | |
7281 | fi # $ac_x_libraries = no | |
8c5ff6dd | 7282 | |
eb697db5 DN |
7283 | case $ac_x_includes,$ac_x_libraries in #( |
7284 | no,* | *,no | *\'*) | |
7285 | # Didn't find X, or a directory has "'" in its name. | |
7286 | ac_cv_have_x="have_x=no";; #( | |
7287 | *) | |
7288 | # Record where we found X for the cache. | |
7289 | ac_cv_have_x="have_x=yes\ | |
7290 | ac_x_includes='$ac_x_includes'\ | |
7291 | ac_x_libraries='$ac_x_libraries'" | |
5929fbe7 | 7292 | esac |
eb697db5 DN |
7293 | fi |
7294 | ;; #( | |
7295 | *) have_x=yes;; | |
7296 | esac | |
7297 | eval "$ac_cv_have_x" | |
7298 | fi # $with_x != no | |
49ebbd65 | 7299 | |
eb697db5 DN |
7300 | if test "$have_x" != yes; then |
7301 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5 | |
7302 | $as_echo "$have_x" >&6; } | |
7303 | no_x=yes | |
7304 | else | |
7305 | # If each of the values was on the command line, it overrides each guess. | |
7306 | test "x$x_includes" = xNONE && x_includes=$ac_x_includes | |
7307 | test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries | |
7308 | # Update the cache value to reflect the command line values. | |
7309 | ac_cv_have_x="have_x=yes\ | |
7310 | ac_x_includes='$x_includes'\ | |
7311 | ac_x_libraries='$x_libraries'" | |
7312 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5 | |
7313 | $as_echo "libraries $x_libraries, headers $x_includes" >&6; } | |
7314 | fi | |
8c5ff6dd | 7315 | |
eb697db5 DN |
7316 | if test "$no_x" = yes; then |
7317 | window_system=none | |
7318 | else | |
7319 | window_system=x11 | |
7320 | fi | |
15e12598 | 7321 | |
eb697db5 DN |
7322 | ## Workaround for bug in autoconf <= 2.62. |
7323 | ## http://lists.gnu.org/archive/html/emacs-devel/2008-04/msg01551.html | |
7324 | ## No need to do anything special for these standard directories. | |
7325 | if test -n "${x_libraries}" && test x"${x_libraries}" != xNONE; then | |
15e12598 | 7326 | |
eb697db5 | 7327 | x_libraries=`echo :${x_libraries}: | sed -e 's|:/usr/lib64:|:|g' -e 's|:/lib64:|:|g' -e 's|^:||' -e 's|:$||'` |
15e12598 | 7328 | |
eb697db5 | 7329 | fi |
91e84f96 | 7330 | |
eb697db5 DN |
7331 | LD_SWITCH_X_SITE_AUX= |
7332 | LD_SWITCH_X_SITE_AUX_RPATH= | |
7333 | if test "${x_libraries}" != NONE; then | |
7334 | if test -n "${x_libraries}"; then | |
7335 | LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"` | |
7336 | LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"` | |
7337 | LD_SWITCH_X_SITE_AUX_RPATH=`echo ${LD_SWITCH_X_SITE_AUX} | sed -e 's/-R/-Wl,-rpath,/'` | |
7338 | fi | |
7339 | x_default_search_path="" | |
7340 | x_search_path=${x_libraries} | |
7341 | if test -z "${x_search_path}"; then | |
7342 | x_search_path=/usr/lib | |
7343 | fi | |
7344 | for x_library in `echo ${x_search_path}: | \ | |
7345 | sed -e "s/:/ /g" -e p -e "s:/lib[^ /]* :/share :g"`; do | |
7346 | x_search_path="\ | |
7347 | ${x_library}/X11/%L/%T/%N%C%S:\ | |
7348 | ${x_library}/X11/%l/%T/%N%C%S:\ | |
7349 | ${x_library}/X11/%T/%N%C%S:\ | |
7350 | ${x_library}/X11/%L/%T/%N%S:\ | |
7351 | ${x_library}/X11/%l/%T/%N%S:\ | |
7352 | ${x_library}/X11/%T/%N%S" | |
7353 | if test x"${x_default_search_path}" = x; then | |
7354 | x_default_search_path=${x_search_path} | |
7355 | else | |
7356 | x_default_search_path="${x_search_path}:${x_default_search_path}" | |
7357 | fi | |
7358 | done | |
7359 | fi | |
e6df49e4 | 7360 | |
15e12598 | 7361 | |
15e12598 | 7362 | |
eb697db5 DN |
7363 | if test "${x_includes}" != NONE && test -n "${x_includes}"; then |
7364 | C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"` | |
7365 | fi | |
8c5ff6dd | 7366 | |
eb697db5 DN |
7367 | if test x"${x_includes}" = x; then |
7368 | bitmapdir=/usr/include/X11/bitmaps | |
7369 | else | |
7370 | # accumulate include directories that have X11 bitmap subdirectories | |
7371 | bmd_acc="dummyval" | |
7372 | for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do | |
7373 | if test -d "${bmd}/X11/bitmaps"; then | |
7374 | bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps" | |
7375 | fi | |
7376 | if test -d "${bmd}/bitmaps"; then | |
7377 | bmd_acc="${bmd_acc}:${bmd}/bitmaps" | |
7378 | fi | |
7379 | done | |
7380 | if test ${bmd_acc} != "dummyval"; then | |
7381 | bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"` | |
7382 | fi | |
7383 | fi | |
8c5ff6dd | 7384 | |
eb697db5 DN |
7385 | HAVE_NS=no |
7386 | NS_IMPL_COCOA=no | |
7387 | NS_IMPL_GNUSTEP=no | |
7388 | tmp_CPPFLAGS="$CPPFLAGS" | |
7389 | tmp_CFLAGS="$CFLAGS" | |
7390 | CPPFLAGS="$CPPFLAGS -x objective-c" | |
7391 | CFLAGS="$CFLAGS -x objective-c" | |
e6cfa7c3 | 7392 | TEMACS_LDFLAGS2="\${LDFLAGS} \${PROFILING_LDFLAGS}" |
eb697db5 DN |
7393 | if test "${with_ns}" != no; then |
7394 | if test "${opsys}" = darwin; then | |
7395 | NS_IMPL_COCOA=yes | |
7396 | ns_appdir=`pwd`/nextstep/Emacs.app/ | |
7397 | ns_appbindir=${ns_appdir}Contents/MacOS/ | |
7398 | ns_appresdir=${ns_appdir}Contents/Resources | |
7399 | ns_appsrc=${srcdir}/nextstep/Cocoa/Emacs.base | |
7400 | elif test -f $GNUSTEP_CONFIG_FILE; then | |
7401 | NS_IMPL_GNUSTEP=yes | |
7402 | ns_appdir=`pwd`/nextstep/Emacs.app/ | |
7403 | ns_appbindir=${ns_appdir} | |
7404 | ns_appresdir=${ns_appdir}Resources | |
7405 | ns_appsrc=${srcdir}/nextstep/GNUstep/Emacs.base | |
7406 | GNUSTEP_SYSTEM_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_HEADERS)" | |
7407 | GNUSTEP_SYSTEM_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_LIBRARIES)" | |
7408 | GNUSTEP_LOCAL_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_HEADERS)" | |
7409 | GNUSTEP_LOCAL_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_LIBRARIES)" | |
7410 | test "x${GNUSTEP_LOCAL_HEADERS}" != "x" && \ | |
7411 | GNUSTEP_LOCAL_HEADERS="-I${GNUSTEP_LOCAL_HEADERS}" | |
7412 | test "x${GNUSTEP_LOCAL_LIBRARIES}" != "x" && \ | |
7413 | GNUSTEP_LOCAL_LIBRARIES="-L${GNUSTEP_LOCAL_LIBRARIES}" | |
7414 | CPPFLAGS="$CPPFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}" | |
7415 | CFLAGS="$CFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}" | |
eb697db5 DN |
7416 | LDFLAGS="$LDFLAGS -L${GNUSTEP_SYSTEM_LIBRARIES} ${GNUSTEP_LOCAL_LIBRARIES}" |
7417 | LIB_STANDARD= | |
7418 | START_FILES= | |
7419 | TEMACS_LDFLAGS2= | |
7420 | fi | |
7421 | ac_fn_c_check_header_mongrel "$LINENO" "AppKit/AppKit.h" "ac_cv_header_AppKit_AppKit_h" "$ac_includes_default" | |
7422 | if test "x$ac_cv_header_AppKit_AppKit_h" = x""yes; then : | |
7423 | HAVE_NS=yes | |
7424 | else | |
3d608a86 | 7425 | as_fn_error "\`--with-ns' was specified, but the include |
eb697db5 DN |
7426 | files are missing or cannot be compiled." "$LINENO" 5 |
7427 | fi | |
8c5ff6dd KR |
7428 | |
7429 | ||
eb697db5 DN |
7430 | NS_HAVE_NSINTEGER=yes |
7431 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7432 | /* end confdefs.h. */ | |
7433 | #include <Foundation/NSObjCRuntime.h> | |
7434 | int | |
7435 | main () | |
7436 | { | |
7437 | NSInteger i; | |
7438 | ; | |
7439 | return 0; | |
7440 | } | |
7441 | _ACEOF | |
7442 | if ac_fn_c_try_compile "$LINENO"; then : | |
7443 | ns_have_nsinteger=yes | |
7444 | else | |
7445 | ns_have_nsinteger=no | |
7446 | fi | |
7447 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7448 | if test $ns_have_nsinteger = no; then | |
7449 | NS_HAVE_NSINTEGER=no | |
7450 | fi | |
7451 | fi | |
15e12598 | 7452 | |
15e12598 | 7453 | |
eb697db5 DN |
7454 | ns_frag=/dev/null |
7455 | NS_OBJ= | |
7456 | NS_SUPPORT= | |
7457 | if test "${HAVE_NS}" = yes; then | |
7458 | window_system=nextstep | |
7459 | with_xft=no | |
7460 | # set up packaging dirs | |
7461 | exec_prefix=${ns_appbindir} | |
7462 | libexecdir=${ns_appbindir}/libexec | |
7463 | if test "${EN_NS_SELF_CONTAINED}" = yes; then | |
7464 | prefix=${ns_appresdir} | |
7465 | fi | |
7466 | ns_frag=$srcdir/src/ns.mk | |
7467 | NS_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o fontset.o fringe.o image.o" | |
7468 | NS_SUPPORT="\${lispsource}emacs-lisp/easymenu.elc \${lispsource}term/ns-win.elc" | |
7469 | fi | |
7470 | CFLAGS="$tmp_CFLAGS" | |
7471 | CPPFLAGS="$tmp_CPPFLAGS" | |
15e12598 | 7472 | |
15e12598 | 7473 | |
a4f64981 | 7474 | |
8c5ff6dd KR |
7475 | |
7476 | ||
eb697db5 DN |
7477 | case "${window_system}" in |
7478 | x11 ) | |
7479 | HAVE_X_WINDOWS=yes | |
7480 | HAVE_X11=yes | |
7481 | case "${with_x_toolkit}" in | |
7482 | athena | lucid ) USE_X_TOOLKIT=LUCID ;; | |
7483 | motif ) USE_X_TOOLKIT=MOTIF ;; | |
7484 | gtk ) with_gtk=yes | |
7485 | USE_X_TOOLKIT=none ;; | |
e547b051 J |
7486 | gtk3 ) with_gtk3=yes |
7487 | USE_X_TOOLKIT=none ;; | |
eb697db5 DN |
7488 | no ) USE_X_TOOLKIT=none ;; |
7489 | * ) USE_X_TOOLKIT=maybe ;; | |
7490 | esac | |
7491 | ;; | |
7492 | nextstep | none ) | |
7493 | HAVE_X_WINDOWS=no | |
7494 | HAVE_X11=no | |
7495 | USE_X_TOOLKIT=none | |
7496 | ;; | |
7497 | esac | |
8c5ff6dd | 7498 | |
eb697db5 DN |
7499 | if test "$window_system" = none && test "X$with_x" != "Xno"; then |
7500 | # Extract the first word of "X", so it can be a program name with args. | |
7501 | set dummy X; ac_word=$2 | |
7502 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
7503 | $as_echo_n "checking for $ac_word... " >&6; } | |
7504 | if test "${ac_cv_prog_HAVE_XSERVER+set}" = set; then : | |
7505 | $as_echo_n "(cached) " >&6 | |
7506 | else | |
7507 | if test -n "$HAVE_XSERVER"; then | |
7508 | ac_cv_prog_HAVE_XSERVER="$HAVE_XSERVER" # Let the user override the test. | |
7509 | else | |
7510 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7511 | for as_dir in $PATH | |
7512 | do | |
7513 | IFS=$as_save_IFS | |
7514 | test -z "$as_dir" && as_dir=. | |
7515 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7516 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
7517 | ac_cv_prog_HAVE_XSERVER="true" | |
7518 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7519 | break 2 | |
7520 | fi | |
7521 | done | |
7522 | done | |
7523 | IFS=$as_save_IFS | |
8c5ff6dd | 7524 | |
eb697db5 DN |
7525 | test -z "$ac_cv_prog_HAVE_XSERVER" && ac_cv_prog_HAVE_XSERVER="false" |
7526 | fi | |
7527 | fi | |
7528 | HAVE_XSERVER=$ac_cv_prog_HAVE_XSERVER | |
7529 | if test -n "$HAVE_XSERVER"; then | |
7530 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_XSERVER" >&5 | |
7531 | $as_echo "$HAVE_XSERVER" >&6; } | |
7532 | else | |
7533 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
7534 | $as_echo "no" >&6; } | |
7535 | fi | |
8c5ff6dd | 7536 | |
8c5ff6dd | 7537 | |
eb697db5 DN |
7538 | if test "$HAVE_XSERVER" = true || |
7539 | test -n "$DISPLAY" || | |
7540 | test "`echo /usr/lib/libX11.*`" != "/usr/lib/libX11.*"; then | |
3d608a86 | 7541 | as_fn_error "You seem to be running X, but no X development libraries |
eb697db5 DN |
7542 | were found. You should install the relevant development files for X |
7543 | and for the toolkit you want, such as Gtk+, Lesstif or Motif. Also make | |
7544 | sure you have development files for image handling, i.e. | |
7545 | tiff, gif, jpeg, png and xpm. | |
7546 | If you are sure you want Emacs compiled without X window support, pass | |
7547 | --without-x | |
7548 | to configure." "$LINENO" 5 | |
7549 | fi | |
7550 | fi | |
8c5ff6dd | 7551 | |
eb697db5 DN |
7552 | ### If we're using X11, we should use the X menu package. |
7553 | HAVE_MENUS=no | |
7554 | case ${HAVE_X11} in | |
7555 | yes ) HAVE_MENUS=yes ;; | |
7556 | esac | |
8c5ff6dd | 7557 | |
eb697db5 DN |
7558 | # Do the opsystem or machine files prohibit the use of the GNU malloc? |
7559 | # Assume not, until told otherwise. | |
7560 | GNU_MALLOC=yes | |
7561 | doug_lea_malloc=yes | |
7562 | ac_fn_c_check_func "$LINENO" "malloc_get_state" "ac_cv_func_malloc_get_state" | |
7563 | if test "x$ac_cv_func_malloc_get_state" = x""yes; then : | |
8c5ff6dd | 7564 | |
eb697db5 DN |
7565 | else |
7566 | doug_lea_malloc=no | |
7567 | fi | |
8c5ff6dd | 7568 | |
eb697db5 DN |
7569 | ac_fn_c_check_func "$LINENO" "malloc_set_state" "ac_cv_func_malloc_set_state" |
7570 | if test "x$ac_cv_func_malloc_set_state" = x""yes; then : | |
8c5ff6dd | 7571 | |
eb697db5 DN |
7572 | else |
7573 | doug_lea_malloc=no | |
7574 | fi | |
8c5ff6dd | 7575 | |
eb697db5 DN |
7576 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __after_morecore_hook exists" >&5 |
7577 | $as_echo_n "checking whether __after_morecore_hook exists... " >&6; } | |
7578 | if test "${emacs_cv_var___after_morecore_hook+set}" = set; then : | |
7579 | $as_echo_n "(cached) " >&6 | |
7580 | else | |
7581 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7582 | /* end confdefs.h. */ | |
7583 | extern void (* __after_morecore_hook)(); | |
7584 | int | |
7585 | main () | |
7586 | { | |
7587 | __after_morecore_hook = 0 | |
7588 | ; | |
7589 | return 0; | |
7590 | } | |
7591 | _ACEOF | |
7592 | if ac_fn_c_try_link "$LINENO"; then : | |
7593 | emacs_cv_var___after_morecore_hook=yes | |
7594 | else | |
7595 | emacs_cv_var___after_morecore_hook=no | |
7596 | fi | |
7597 | rm -f core conftest.err conftest.$ac_objext \ | |
7598 | conftest$ac_exeext conftest.$ac_ext | |
7599 | fi | |
7600 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_var___after_morecore_hook" >&5 | |
7601 | $as_echo "$emacs_cv_var___after_morecore_hook" >&6; } | |
7602 | if test $emacs_cv_var___after_morecore_hook = no; then | |
7603 | doug_lea_malloc=no | |
7604 | fi | |
8c5ff6dd | 7605 | |
e7586c7a GM |
7606 | |
7607 | system_malloc=no | |
7608 | case "$opsys" in | |
7609 | ## darwin ld insists on the use of malloc routines in the System framework. | |
7610 | darwin|sol2-10) system_malloc=yes ;; | |
7611 | esac | |
7612 | ||
eb697db5 | 7613 | if test "${system_malloc}" = "yes"; then |
e7586c7a GM |
7614 | |
7615 | $as_echo "#define SYSTEM_MALLOC 1" >>confdefs.h | |
7616 | ||
eb697db5 DN |
7617 | GNU_MALLOC=no |
7618 | GNU_MALLOC_reason=" | |
7619 | (The GNU allocators don't work with this system configuration.)" | |
7620 | GMALLOC_OBJ= | |
7621 | VMLIMIT_OBJ= | |
7622 | else | |
7623 | test "$doug_lea_malloc" != "yes" && GMALLOC_OBJ=gmalloc.o | |
7624 | VMLIMIT_OBJ=vm-limit.o | |
7625 | fi | |
0c309b80 | 7626 | |
8c5ff6dd | 7627 | |
8c5ff6dd | 7628 | |
eb697db5 DN |
7629 | if test "$doug_lea_malloc" = "yes" ; then |
7630 | if test "$GNU_MALLOC" = yes ; then | |
7631 | GNU_MALLOC_reason=" | |
7632 | (Using Doug Lea's new malloc from the GNU C Library.)" | |
7633 | fi | |
8c5ff6dd | 7634 | |
eb697db5 | 7635 | $as_echo "#define DOUG_LEA_MALLOC 1" >>confdefs.h |
8c5ff6dd | 7636 | |
a4f64981 | 7637 | |
eb697db5 DN |
7638 | ## Use mmap directly for allocating larger buffers. |
7639 | ## FIXME this comes from src/s/{gnu,gnu-linux}.h: | |
7640 | ## #ifdef DOUG_LEA_MALLOC; #undef REL_ALLOC; #endif | |
7641 | ## Does the AC_FUNC_MMAP test below make this check unecessary? | |
7642 | case "$opsys" in | |
7643 | gnu*) REL_ALLOC=no ;; | |
7644 | esac | |
7645 | fi | |
49ebbd65 | 7646 | |
eb697db5 DN |
7647 | if test x"${REL_ALLOC}" = x; then |
7648 | REL_ALLOC=${GNU_MALLOC} | |
7649 | fi | |
8c5ff6dd | 7650 | |
e7586c7a GM |
7651 | use_mmap_for_buffers=no |
7652 | case "$opsys" in | |
7653 | freebsd|irix6-5) use_mmap_for_buffers=yes ;; | |
7654 | esac | |
8c5ff6dd | 7655 | |
8c5ff6dd | 7656 | |
8c5ff6dd | 7657 | |
7186fb09 | 7658 | |
eb697db5 DN |
7659 | for ac_header in $ac_header_list |
7660 | do : | |
7661 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
7662 | ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default | |
7663 | " | |
3d608a86 J |
7664 | eval as_val=\$$as_ac_Header |
7665 | if test "x$as_val" = x""yes; then : | |
eb697db5 DN |
7666 | cat >>confdefs.h <<_ACEOF |
7667 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
7668 | _ACEOF | |
15e12598 | 7669 | |
eb697db5 | 7670 | fi |
8c5ff6dd | 7671 | |
eb697db5 | 7672 | done |
8c5ff6dd KR |
7673 | |
7674 | ||
8c5ff6dd | 7675 | |
8c5ff6dd | 7676 | |
15e12598 | 7677 | |
8c5ff6dd KR |
7678 | |
7679 | ||
8c5ff6dd | 7680 | |
eb697db5 DN |
7681 | for ac_func in getpagesize |
7682 | do : | |
7683 | ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" | |
7684 | if test "x$ac_cv_func_getpagesize" = x""yes; then : | |
7685 | cat >>confdefs.h <<_ACEOF | |
7686 | #define HAVE_GETPAGESIZE 1 | |
7687 | _ACEOF | |
8c5ff6dd | 7688 | |
eb697db5 DN |
7689 | fi |
7690 | done | |
8c5ff6dd | 7691 | |
eb697db5 DN |
7692 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 |
7693 | $as_echo_n "checking for working mmap... " >&6; } | |
7694 | if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then : | |
7695 | $as_echo_n "(cached) " >&6 | |
7696 | else | |
7697 | if test "$cross_compiling" = yes; then : | |
7698 | ac_cv_func_mmap_fixed_mapped=no | |
7699 | else | |
7700 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7701 | /* end confdefs.h. */ | |
7702 | $ac_includes_default | |
7703 | /* malloc might have been renamed as rpl_malloc. */ | |
7704 | #undef malloc | |
8c5ff6dd | 7705 | |
eb697db5 DN |
7706 | /* Thanks to Mike Haertel and Jim Avera for this test. |
7707 | Here is a matrix of mmap possibilities: | |
7708 | mmap private not fixed | |
7709 | mmap private fixed at somewhere currently unmapped | |
7710 | mmap private fixed at somewhere already mapped | |
7711 | mmap shared not fixed | |
7712 | mmap shared fixed at somewhere currently unmapped | |
7713 | mmap shared fixed at somewhere already mapped | |
7714 | For private mappings, we should verify that changes cannot be read() | |
7715 | back from the file, nor mmap's back from the file at a different | |
7716 | address. (There have been systems where private was not correctly | |
7717 | implemented like the infamous i386 svr4.0, and systems where the | |
7718 | VM page cache was not coherent with the file system buffer cache | |
7719 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
7720 | For shared mappings, we should conversely verify that changes get | |
7721 | propagated back to all the places they're supposed to be. | |
8c5ff6dd | 7722 | |
eb697db5 DN |
7723 | Grep wants private fixed already mapped. |
7724 | The main things grep needs to know about mmap are: | |
7725 | * does it exist and is it safe to write into the mmap'd area | |
7726 | * how to use it (BSD variants) */ | |
8c5ff6dd | 7727 | |
eb697db5 DN |
7728 | #include <fcntl.h> |
7729 | #include <sys/mman.h> | |
8c5ff6dd | 7730 | |
eb697db5 DN |
7731 | #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H |
7732 | char *malloc (); | |
7733 | #endif | |
8c5ff6dd | 7734 | |
eb697db5 DN |
7735 | /* This mess was copied from the GNU getpagesize.h. */ |
7736 | #ifndef HAVE_GETPAGESIZE | |
7737 | # ifdef _SC_PAGESIZE | |
7738 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
7739 | # else /* no _SC_PAGESIZE */ | |
7740 | # ifdef HAVE_SYS_PARAM_H | |
7741 | # include <sys/param.h> | |
7742 | # ifdef EXEC_PAGESIZE | |
7743 | # define getpagesize() EXEC_PAGESIZE | |
7744 | # else /* no EXEC_PAGESIZE */ | |
7745 | # ifdef NBPG | |
7746 | # define getpagesize() NBPG * CLSIZE | |
7747 | # ifndef CLSIZE | |
7748 | # define CLSIZE 1 | |
7749 | # endif /* no CLSIZE */ | |
7750 | # else /* no NBPG */ | |
7751 | # ifdef NBPC | |
7752 | # define getpagesize() NBPC | |
7753 | # else /* no NBPC */ | |
7754 | # ifdef PAGESIZE | |
7755 | # define getpagesize() PAGESIZE | |
7756 | # endif /* PAGESIZE */ | |
7757 | # endif /* no NBPC */ | |
7758 | # endif /* no NBPG */ | |
7759 | # endif /* no EXEC_PAGESIZE */ | |
7760 | # else /* no HAVE_SYS_PARAM_H */ | |
7761 | # define getpagesize() 8192 /* punt totally */ | |
7762 | # endif /* no HAVE_SYS_PARAM_H */ | |
7763 | # endif /* no _SC_PAGESIZE */ | |
8c5ff6dd | 7764 | |
eb697db5 | 7765 | #endif /* no HAVE_GETPAGESIZE */ |
8c5ff6dd | 7766 | |
eb697db5 DN |
7767 | int |
7768 | main () | |
7769 | { | |
7770 | char *data, *data2, *data3; | |
7771 | int i, pagesize; | |
7772 | int fd, fd2; | |
8c5ff6dd | 7773 | |
eb697db5 | 7774 | pagesize = getpagesize (); |
8c5ff6dd | 7775 | |
eb697db5 DN |
7776 | /* First, make a file with some known garbage in it. */ |
7777 | data = (char *) malloc (pagesize); | |
7778 | if (!data) | |
7779 | return 1; | |
7780 | for (i = 0; i < pagesize; ++i) | |
7781 | *(data + i) = rand (); | |
7782 | umask (0); | |
7783 | fd = creat ("conftest.mmap", 0600); | |
7784 | if (fd < 0) | |
7785 | return 2; | |
7786 | if (write (fd, data, pagesize) != pagesize) | |
7787 | return 3; | |
7788 | close (fd); | |
8c5ff6dd | 7789 | |
eb697db5 DN |
7790 | /* Next, check that the tail of a page is zero-filled. File must have |
7791 | non-zero length, otherwise we risk SIGBUS for entire page. */ | |
7792 | fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600); | |
7793 | if (fd2 < 0) | |
7794 | return 4; | |
3d608a86 J |
7795 | data2 = ""; |
7796 | if (write (fd2, data2, 1) != 1) | |
eb697db5 | 7797 | return 5; |
3d608a86 | 7798 | data2 = mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L); |
eb697db5 DN |
7799 | if (data2 == MAP_FAILED) |
7800 | return 6; | |
7801 | for (i = 0; i < pagesize; ++i) | |
7802 | if (*(data2 + i)) | |
7803 | return 7; | |
7804 | close (fd2); | |
7805 | if (munmap (data2, pagesize)) | |
7806 | return 8; | |
8c5ff6dd | 7807 | |
eb697db5 DN |
7808 | /* Next, try to mmap the file at a fixed address which already has |
7809 | something else allocated at it. If we can, also make sure that | |
7810 | we see the same garbage. */ | |
7811 | fd = open ("conftest.mmap", O_RDWR); | |
7812 | if (fd < 0) | |
7813 | return 9; | |
7814 | if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, | |
7815 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
7816 | return 10; | |
7817 | for (i = 0; i < pagesize; ++i) | |
7818 | if (*(data + i) != *(data2 + i)) | |
7819 | return 11; | |
8c5ff6dd | 7820 | |
eb697db5 DN |
7821 | /* Finally, make sure that changes to the mapped area do not |
7822 | percolate back to the file as seen by read(). (This is a bug on | |
7823 | some variants of i386 svr4.0.) */ | |
7824 | for (i = 0; i < pagesize; ++i) | |
7825 | *(data2 + i) = *(data2 + i) + 1; | |
7826 | data3 = (char *) malloc (pagesize); | |
7827 | if (!data3) | |
7828 | return 12; | |
7829 | if (read (fd, data3, pagesize) != pagesize) | |
7830 | return 13; | |
7831 | for (i = 0; i < pagesize; ++i) | |
7832 | if (*(data + i) != *(data3 + i)) | |
7833 | return 14; | |
7834 | close (fd); | |
7835 | return 0; | |
7836 | } | |
7837 | _ACEOF | |
7838 | if ac_fn_c_try_run "$LINENO"; then : | |
7839 | ac_cv_func_mmap_fixed_mapped=yes | |
7840 | else | |
7841 | ac_cv_func_mmap_fixed_mapped=no | |
7842 | fi | |
7843 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
7844 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
7845 | fi | |
8c5ff6dd | 7846 | |
eb697db5 DN |
7847 | fi |
7848 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5 | |
7849 | $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; } | |
7850 | if test $ac_cv_func_mmap_fixed_mapped = yes; then | |
8c5ff6dd | 7851 | |
eb697db5 | 7852 | $as_echo "#define HAVE_MMAP 1" >>confdefs.h |
8c5ff6dd | 7853 | |
eb697db5 DN |
7854 | fi |
7855 | rm -f conftest.mmap conftest.txt | |
8c5ff6dd | 7856 | |
eb697db5 | 7857 | if test $use_mmap_for_buffers = yes; then |
e7586c7a GM |
7858 | |
7859 | $as_echo "#define USE_MMAP_FOR_BUFFERS 1" >>confdefs.h | |
7860 | ||
eb697db5 DN |
7861 | REL_ALLOC=no |
7862 | fi | |
8c5ff6dd | 7863 | |
eb697db5 | 7864 | LIBS="$LIBS_SYSTEM $LIBS" |
5929fbe7 | 7865 | |
eb697db5 DN |
7866 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5 |
7867 | $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; } | |
7868 | if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then : | |
5929fbe7 | 7869 | $as_echo_n "(cached) " >&6 |
8c5ff6dd | 7870 | else |
eb697db5 DN |
7871 | ac_check_lib_save_LIBS=$LIBS |
7872 | LIBS="-ldnet $LIBS" | |
7873 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5929fbe7 | 7874 | /* end confdefs.h. */ |
8c5ff6dd | 7875 | |
5929fbe7 GM |
7876 | /* Override any GCC internal prototype to avoid an error. |
7877 | Use char because int might match the return type of a GCC | |
7878 | builtin and then its argument prototype would still apply. */ | |
7879 | #ifdef __cplusplus | |
7880 | extern "C" | |
7881 | #endif | |
eb697db5 | 7882 | char dnet_ntoa (); |
5929fbe7 GM |
7883 | int |
7884 | main () | |
7885 | { | |
eb697db5 | 7886 | return dnet_ntoa (); |
5929fbe7 GM |
7887 | ; |
7888 | return 0; | |
7889 | } | |
7890 | _ACEOF | |
eb697db5 DN |
7891 | if ac_fn_c_try_link "$LINENO"; then : |
7892 | ac_cv_lib_dnet_dnet_ntoa=yes | |
5929fbe7 | 7893 | else |
eb697db5 | 7894 | ac_cv_lib_dnet_dnet_ntoa=no |
5929fbe7 | 7895 | fi |
eb697db5 DN |
7896 | rm -f core conftest.err conftest.$ac_objext \ |
7897 | conftest$ac_exeext conftest.$ac_ext | |
7898 | LIBS=$ac_check_lib_save_LIBS | |
5929fbe7 | 7899 | fi |
eb697db5 DN |
7900 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 |
7901 | $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; } | |
7902 | if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then : | |
5929fbe7 | 7903 | cat >>confdefs.h <<_ACEOF |
eb697db5 | 7904 | #define HAVE_LIBDNET 1 |
5929fbe7 | 7905 | _ACEOF |
aaa36002 | 7906 | |
eb697db5 | 7907 | LIBS="-ldnet $LIBS" |
5929fbe7 | 7908 | |
a4f64981 | 7909 | fi |
5929fbe7 | 7910 | |
a4f64981 | 7911 | |
eb697db5 DN |
7912 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lXbsd" >&5 |
7913 | $as_echo_n "checking for main in -lXbsd... " >&6; } | |
7914 | if test "${ac_cv_lib_Xbsd_main+set}" = set; then : | |
5929fbe7 | 7915 | $as_echo_n "(cached) " >&6 |
5929fbe7 | 7916 | else |
eb697db5 DN |
7917 | ac_check_lib_save_LIBS=$LIBS |
7918 | LIBS="-lXbsd $LIBS" | |
7919 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5929fbe7 | 7920 | /* end confdefs.h. */ |
a4f64981 | 7921 | |
a4f64981 | 7922 | |
eb697db5 DN |
7923 | int |
7924 | main () | |
7925 | { | |
7926 | return main (); | |
7927 | ; | |
7928 | return 0; | |
7929 | } | |
5929fbe7 | 7930 | _ACEOF |
eb697db5 DN |
7931 | if ac_fn_c_try_link "$LINENO"; then : |
7932 | ac_cv_lib_Xbsd_main=yes | |
a4f64981 | 7933 | else |
eb697db5 | 7934 | ac_cv_lib_Xbsd_main=no |
8c5ff6dd | 7935 | fi |
eb697db5 DN |
7936 | rm -f core conftest.err conftest.$ac_objext \ |
7937 | conftest$ac_exeext conftest.$ac_ext | |
7938 | LIBS=$ac_check_lib_save_LIBS | |
5929fbe7 | 7939 | fi |
eb697db5 DN |
7940 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xbsd_main" >&5 |
7941 | $as_echo "$ac_cv_lib_Xbsd_main" >&6; } | |
7942 | if test "x$ac_cv_lib_Xbsd_main" = x""yes; then : | |
7943 | LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd" | |
8c5ff6dd | 7944 | fi |
a4f64981 | 7945 | |
8c5ff6dd | 7946 | |
eb697db5 DN |
7947 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cma_open in -lpthreads" >&5 |
7948 | $as_echo_n "checking for cma_open in -lpthreads... " >&6; } | |
7949 | if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then : | |
15e12598 VB |
7950 | $as_echo_n "(cached) " >&6 |
7951 | else | |
eb697db5 DN |
7952 | ac_check_lib_save_LIBS=$LIBS |
7953 | LIBS="-lpthreads $LIBS" | |
7954 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15e12598 | 7955 | /* end confdefs.h. */ |
e6df49e4 GM |
7956 | |
7957 | /* Override any GCC internal prototype to avoid an error. | |
7958 | Use char because int might match the return type of a GCC | |
7959 | builtin and then its argument prototype would still apply. */ | |
7960 | #ifdef __cplusplus | |
eb697db5 | 7961 | extern "C" |
5929fbe7 | 7962 | #endif |
eb697db5 | 7963 | char cma_open (); |
aaa36002 DN |
7964 | int |
7965 | main () | |
7966 | { | |
eb697db5 | 7967 | return cma_open (); |
aaa36002 DN |
7968 | ; |
7969 | return 0; | |
7970 | } | |
7186fb09 | 7971 | _ACEOF |
eb697db5 DN |
7972 | if ac_fn_c_try_link "$LINENO"; then : |
7973 | ac_cv_lib_pthreads_cma_open=yes | |
7186fb09 | 7974 | else |
eb697db5 | 7975 | ac_cv_lib_pthreads_cma_open=no |
cd03c74a | 7976 | fi |
eb697db5 DN |
7977 | rm -f core conftest.err conftest.$ac_objext \ |
7978 | conftest$ac_exeext conftest.$ac_ext | |
7979 | LIBS=$ac_check_lib_save_LIBS | |
49ebbd65 | 7980 | fi |
eb697db5 DN |
7981 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_cma_open" >&5 |
7982 | $as_echo "$ac_cv_lib_pthreads_cma_open" >&6; } | |
7983 | if test "x$ac_cv_lib_pthreads_cma_open" = x""yes; then : | |
5929fbe7 | 7984 | cat >>confdefs.h <<_ACEOF |
eb697db5 | 7985 | #define HAVE_LIBPTHREADS 1 |
5929fbe7 GM |
7986 | _ACEOF |
7987 | ||
eb697db5 | 7988 | LIBS="-lpthreads $LIBS" |
5929fbe7 | 7989 | |
eb697db5 | 7990 | fi |
5929fbe7 GM |
7991 | |
7992 | ||
eb697db5 DN |
7993 | ## Note: when using cpp in s/aix4.2.h, this definition depended on |
7994 | ## HAVE_LIBPTHREADS. That was not defined earlier in configure when | |
7995 | ## the system file was sourced. Hence the value of LIBS_SYSTEM | |
7996 | ## added to LIBS in configure would never contain the pthreads part, | |
7997 | ## but the value used in Makefiles might. FIXME? | |
7998 | ## | |
7999 | ## -lpthreads seems to be necessary for Xlib in X11R6, and should | |
8000 | ## be harmless on older versions of X where it happens to exist. | |
8001 | test "$opsys" = "aix4-2" && \ | |
8002 | test $ac_cv_lib_pthreads_cma_open = yes && \ | |
8003 | LIBS_SYSTEM="$LIBS_SYSTEM -lpthreads" | |
5929fbe7 GM |
8004 | |
8005 | ||
eb697db5 DN |
8006 | case ${host_os} in |
8007 | aix*) | |
8008 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5 | |
8009 | $as_echo_n "checking for -bbigtoc option... " >&6; } | |
8010 | if test "${gdb_cv_bigtoc+set}" = set; then : | |
7186fb09 | 8011 | $as_echo_n "(cached) " >&6 |
a5edbe4a | 8012 | else |
a4f64981 | 8013 | |
eb697db5 DN |
8014 | case $GCC in |
8015 | yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;; | |
8016 | *) gdb_cv_bigtoc=-bbigtoc ;; | |
8017 | esac | |
a4f64981 | 8018 | |
eb697db5 DN |
8019 | LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc |
8020 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8021 | /* end confdefs.h. */ | |
8c5ff6dd | 8022 | |
eb697db5 DN |
8023 | int |
8024 | main () | |
8025 | { | |
8026 | int i; | |
8027 | ; | |
8028 | return 0; | |
8029 | } | |
8030 | _ACEOF | |
8031 | if ac_fn_c_try_link "$LINENO"; then : | |
8c5ff6dd | 8032 | |
eb697db5 DN |
8033 | else |
8034 | gdb_cv_bigtoc= | |
8035 | fi | |
8036 | rm -f core conftest.err conftest.$ac_objext \ | |
8037 | conftest$ac_exeext conftest.$ac_ext | |
8c5ff6dd | 8038 | |
eb697db5 DN |
8039 | fi |
8040 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5 | |
8041 | $as_echo "$gdb_cv_bigtoc" >&6; } | |
8042 | ;; | |
8043 | esac | |
8c5ff6dd | 8044 | |
eb697db5 DN |
8045 | # Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets |
8046 | # used for the tests that follow. We set them back to REAL_CFLAGS and | |
8047 | # REAL_CPPFLAGS later on. | |
8c5ff6dd | 8048 | |
e6cfa7c3 | 8049 | REAL_CFLAGS="$CFLAGS" |
eb697db5 | 8050 | REAL_CPPFLAGS="$CPPFLAGS" |
8c5ff6dd | 8051 | |
eb697db5 DN |
8052 | if test "${HAVE_X11}" = "yes"; then |
8053 | DEFS="$C_SWITCH_X_SITE $DEFS" | |
8054 | LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE" | |
e7586c7a | 8055 | LIBS="-lX11 $LIBS" |
eb697db5 DN |
8056 | CFLAGS="$C_SWITCH_X_SITE $CFLAGS" |
8057 | CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS" | |
8c5ff6dd | 8058 | |
eb697db5 DN |
8059 | # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests. |
8060 | # This is handled by LD_SWITCH_X_SITE_AUX during the real build, | |
8061 | # but it's more convenient here to set LD_RUN_PATH | |
8062 | # since this also works on hosts that don't understand LD_SWITCH_X_SITE_AUX. | |
8063 | if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then | |
8064 | LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH | |
8065 | export LD_RUN_PATH | |
8066 | fi | |
8c5ff6dd | 8067 | |
eb697db5 DN |
8068 | if test "${opsys}" = "gnu-linux"; then |
8069 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether X on GNU/Linux needs -b to link" >&5 | |
8070 | $as_echo_n "checking whether X on GNU/Linux needs -b to link... " >&6; } | |
8071 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8072 | /* end confdefs.h. */ | |
8c5ff6dd | 8073 | |
eb697db5 DN |
8074 | int |
8075 | main () | |
5929fbe7 | 8076 | { |
eb697db5 DN |
8077 | XOpenDisplay ("foo"); |
8078 | ; | |
8079 | return 0; | |
5929fbe7 | 8080 | } |
eb697db5 DN |
8081 | _ACEOF |
8082 | if ac_fn_c_try_link "$LINENO"; then : | |
8083 | xlinux_first_failure=no | |
8084 | else | |
8085 | xlinux_first_failure=yes | |
8086 | fi | |
8087 | rm -f core conftest.err conftest.$ac_objext \ | |
8088 | conftest$ac_exeext conftest.$ac_ext | |
8089 | if test "${xlinux_first_failure}" = "yes"; then | |
8090 | OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE" | |
8091 | OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE" | |
8092 | OLD_CPPFLAGS="$CPPFLAGS" | |
8093 | OLD_LIBS="$LIBS" | |
8094 | LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout" | |
8095 | C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout" | |
8096 | CPPFLAGS="$CPPFLAGS -b i486-linuxaout" | |
8097 | LIBS="$LIBS -b i486-linuxaout" | |
8098 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8099 | /* end confdefs.h. */ | |
8c5ff6dd | 8100 | |
eb697db5 DN |
8101 | int |
8102 | main () | |
5929fbe7 | 8103 | { |
eb697db5 DN |
8104 | XOpenDisplay ("foo"); |
8105 | ; | |
8106 | return 0; | |
5929fbe7 | 8107 | } |
eb697db5 DN |
8108 | _ACEOF |
8109 | if ac_fn_c_try_link "$LINENO"; then : | |
8110 | xlinux_second_failure=no | |
8111 | else | |
8112 | xlinux_second_failure=yes | |
8113 | fi | |
8114 | rm -f core conftest.err conftest.$ac_objext \ | |
8115 | conftest$ac_exeext conftest.$ac_ext | |
8116 | if test "${xlinux_second_failure}" = "yes"; then | |
8117 | # If we get the same failure with -b, there is no use adding -b. | |
8118 | # So take it out. This plays safe. | |
8119 | LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE" | |
8120 | C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE" | |
8121 | CPPFLAGS="$OLD_CPPFLAGS" | |
8122 | LIBS="$OLD_LIBS" | |
8123 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
8124 | $as_echo "no" >&6; } | |
8125 | else | |
8126 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
8127 | $as_echo "yes" >&6; } | |
8128 | fi | |
8129 | else | |
8130 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
8131 | $as_echo "no" >&6; } | |
8132 | fi | |
8133 | fi | |
8c5ff6dd | 8134 | |
eb697db5 DN |
8135 | # Reportedly, some broken Solaris systems have XKBlib.h but are missing |
8136 | # header files included from there. | |
8137 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Xkb" >&5 | |
8138 | $as_echo_n "checking for Xkb... " >&6; } | |
8139 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8140 | /* end confdefs.h. */ | |
8141 | #include <X11/Xlib.h> | |
8142 | #include <X11/XKBlib.h> | |
5929fbe7 GM |
8143 | int |
8144 | main () | |
8145 | { | |
eb697db5 DN |
8146 | XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd); |
8147 | ; | |
8148 | return 0; | |
5929fbe7 GM |
8149 | } |
8150 | _ACEOF | |
eb697db5 DN |
8151 | if ac_fn_c_try_link "$LINENO"; then : |
8152 | emacs_xkb=yes | |
a4f64981 | 8153 | else |
eb697db5 | 8154 | emacs_xkb=no |
5929fbe7 | 8155 | fi |
eb697db5 DN |
8156 | rm -f core conftest.err conftest.$ac_objext \ |
8157 | conftest$ac_exeext conftest.$ac_ext | |
8158 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_xkb" >&5 | |
8159 | $as_echo "$emacs_xkb" >&6; } | |
8160 | if test $emacs_xkb = yes; then | |
a4f64981 | 8161 | |
eb697db5 | 8162 | $as_echo "#define HAVE_XKBGETKEYBOARD 1" >>confdefs.h |
a4f64981 | 8163 | |
eb697db5 | 8164 | fi |
a4f64981 | 8165 | |
eb697db5 DN |
8166 | for ac_func in XrmSetDatabase XScreenResourceString \ |
8167 | XScreenNumberOfScreen XSetWMProtocols | |
8168 | do : | |
8169 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
8170 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
3d608a86 J |
8171 | eval as_val=\$$as_ac_var |
8172 | if test "x$as_val" = x""yes; then : | |
eb697db5 DN |
8173 | cat >>confdefs.h <<_ACEOF |
8174 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
5929fbe7 | 8175 | _ACEOF |
a4f64981 | 8176 | |
5929fbe7 | 8177 | fi |
eb697db5 | 8178 | done |
a4f64981 | 8179 | |
eb697db5 | 8180 | fi |
8c5ff6dd | 8181 | |
eb697db5 DN |
8182 | if test "${window_system}" = "x11"; then |
8183 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 version 6" >&5 | |
8184 | $as_echo_n "checking X11 version 6... " >&6; } | |
8185 | if test "${emacs_cv_x11_version_6+set}" = set; then : | |
a4f64981 GM |
8186 | $as_echo_n "(cached) " >&6 |
8187 | else | |
eb697db5 | 8188 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
aaa36002 | 8189 | /* end confdefs.h. */ |
eb697db5 | 8190 | #include <X11/Xlib.h> |
9452ded1 DN |
8191 | int |
8192 | main () | |
8193 | { | |
eb697db5 DN |
8194 | #if XlibSpecificationRelease < 6 |
8195 | fail; | |
8196 | #endif | |
8197 | ||
9452ded1 DN |
8198 | ; |
8199 | return 0; | |
8200 | } | |
0c309b80 | 8201 | _ACEOF |
eb697db5 DN |
8202 | if ac_fn_c_try_link "$LINENO"; then : |
8203 | emacs_cv_x11_version_6=yes | |
7186fb09 | 8204 | else |
eb697db5 DN |
8205 | emacs_cv_x11_version_6=no |
8206 | fi | |
8207 | rm -f core conftest.err conftest.$ac_objext \ | |
8208 | conftest$ac_exeext conftest.$ac_ext | |
8209 | fi | |
8210 | ||
8211 | if test $emacs_cv_x11_version_6 = yes; then | |
8212 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5 | |
8213 | $as_echo "6 or newer" >&6; } | |
8214 | ||
8215 | $as_echo "#define HAVE_X11R6 1" >>confdefs.h | |
5929fbe7 | 8216 | |
a46007e9 GM |
8217 | |
8218 | $as_echo "#define HAVE_X_I18N 1" >>confdefs.h | |
8219 | ||
8220 | ## inoue@ainet.or.jp says Solaris has a bug related to X11R6-style | |
8221 | ## XIM support. | |
8222 | case "$opsys" in | |
8223 | sol2-*) : ;; | |
8224 | *) | |
8225 | $as_echo "#define HAVE_X11R6_XIM 1" >>confdefs.h | |
8226 | ||
8227 | ;; | |
8228 | esac | |
eb697db5 DN |
8229 | else |
8230 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5 | |
8231 | $as_echo "before 6" >&6; } | |
8232 | fi | |
aaa36002 | 8233 | fi |
5929fbe7 | 8234 | |
eb697db5 DN |
8235 | |
8236 | ### Use -lrsvg-2 if available, unless `--with-rsvg=no' is specified. | |
8237 | HAVE_RSVG=no | |
8238 | if test "${HAVE_X11}" = "yes" || test "${NS_IMPL_GNUSTEP}" = "yes"; then | |
8239 | if test "${with_rsvg}" != "no"; then | |
8240 | RSVG_REQUIRED=2.11.0 | |
8241 | RSVG_MODULE="librsvg-2.0 >= $RSVG_REQUIRED" | |
8242 | ||
8243 | ||
8244 | succeeded=no | |
8245 | ||
8246 | # Extract the first word of "pkg-config", so it can be a program name with args. | |
8247 | set dummy pkg-config; ac_word=$2 | |
8248 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
8249 | $as_echo_n "checking for $ac_word... " >&6; } | |
8250 | if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : | |
8251 | $as_echo_n "(cached) " >&6 | |
8252 | else | |
8253 | case $PKG_CONFIG in | |
8254 | [\\/]* | ?:[\\/]*) | |
8255 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
8256 | ;; | |
8257 | *) | |
8258 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8259 | for as_dir in $PATH | |
8260 | do | |
8261 | IFS=$as_save_IFS | |
8262 | test -z "$as_dir" && as_dir=. | |
8263 | for ac_exec_ext in '' $ac_executable_extensions; do | |
8264 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
8265 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
8266 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
8267 | break 2 | |
8268 | fi | |
8269 | done | |
8270 | done | |
8271 | IFS=$as_save_IFS | |
8272 | ||
8273 | test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" | |
8274 | ;; | |
8275 | esac | |
aaa36002 | 8276 | fi |
eb697db5 DN |
8277 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG |
8278 | if test -n "$PKG_CONFIG"; then | |
8279 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
8280 | $as_echo "$PKG_CONFIG" >&6; } | |
8c5ff6dd | 8281 | else |
eb697db5 DN |
8282 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
8283 | $as_echo "no" >&6; } | |
a4f64981 GM |
8284 | fi |
8285 | ||
8c5ff6dd | 8286 | |
e6df49e4 | 8287 | |
eb697db5 DN |
8288 | if test "$PKG_CONFIG" = "no" ; then |
8289 | : | |
8290 | else | |
8291 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
8292 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
8293 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $RSVG_MODULE" >&5 | |
8294 | $as_echo_n "checking for $RSVG_MODULE... " >&6; } | |
8295 | ||
8296 | if $PKG_CONFIG --exists "$RSVG_MODULE" 2>&5; then | |
8297 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
8298 | $as_echo "yes" >&6; } | |
8299 | succeeded=yes | |
8300 | ||
8301 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking RSVG_CFLAGS" >&5 | |
8302 | $as_echo_n "checking RSVG_CFLAGS... " >&6; } | |
8303 | RSVG_CFLAGS=`$PKG_CONFIG --cflags "$RSVG_MODULE"|sed -e 's,///*,/,g'` | |
8304 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RSVG_CFLAGS" >&5 | |
8305 | $as_echo "$RSVG_CFLAGS" >&6; } | |
8306 | ||
8307 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking RSVG_LIBS" >&5 | |
8308 | $as_echo_n "checking RSVG_LIBS... " >&6; } | |
8309 | RSVG_LIBS=`$PKG_CONFIG --libs "$RSVG_MODULE"|sed -e 's,///*,/,g'` | |
8310 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RSVG_LIBS" >&5 | |
8311 | $as_echo "$RSVG_LIBS" >&6; } | |
8312 | else | |
8313 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
8314 | $as_echo "no" >&6; } | |
8315 | RSVG_CFLAGS="" | |
8316 | RSVG_LIBS="" | |
8317 | ## If we have a custom action on failure, don't print errors, but | |
8318 | ## do set a variable so people can do so. | |
8319 | RSVG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$RSVG_MODULE"` | |
8320 | ||
8321 | fi | |
8322 | ||
8323 | ||
8324 | ||
8325 | else | |
8326 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
8327 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
8328 | fi | |
8329 | fi | |
8330 | ||
8331 | if test $succeeded = yes; then | |
8332 | : | |
8333 | else | |
8334 | : | |
8335 | fi | |
7186fb09 | 8336 | |
a5edbe4a | 8337 | |
a5edbe4a | 8338 | |
91e84f96 | 8339 | |
eb697db5 DN |
8340 | if test ".${RSVG_CFLAGS}" != "."; then |
8341 | HAVE_RSVG=yes | |
7186fb09 | 8342 | |
eb697db5 | 8343 | $as_echo "#define HAVE_RSVG 1" >>confdefs.h |
7186fb09 | 8344 | |
eb697db5 DN |
8345 | CFLAGS="$CFLAGS $RSVG_CFLAGS" |
8346 | LIBS="$RSVG_LIBS $LIBS" | |
8347 | fi | |
8348 | fi | |
a4f64981 | 8349 | fi |
08b47d3d | 8350 | |
eb697db5 DN |
8351 | |
8352 | HAVE_GTK=no | |
e547b051 J |
8353 | if test "${with_gtk3}" = "yes"; then |
8354 | GLIB_REQUIRED=2.6 | |
8355 | GTK_REQUIRED=2.90 | |
8356 | GTK_MODULES="gtk+-3.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED" | |
8357 | ||
8358 | ||
8359 | succeeded=no | |
8360 | ||
8361 | # Extract the first word of "pkg-config", so it can be a program name with args. | |
8362 | set dummy pkg-config; ac_word=$2 | |
8363 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
8364 | $as_echo_n "checking for $ac_word... " >&6; } | |
8365 | if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : | |
8366 | $as_echo_n "(cached) " >&6 | |
8367 | else | |
8368 | case $PKG_CONFIG in | |
8369 | [\\/]* | ?:[\\/]*) | |
8370 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
8371 | ;; | |
8372 | *) | |
8373 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8374 | for as_dir in $PATH | |
8375 | do | |
8376 | IFS=$as_save_IFS | |
8377 | test -z "$as_dir" && as_dir=. | |
8378 | for ac_exec_ext in '' $ac_executable_extensions; do | |
8379 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
8380 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
8381 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
8382 | break 2 | |
8383 | fi | |
8384 | done | |
8385 | done | |
8386 | IFS=$as_save_IFS | |
8387 | ||
8388 | test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" | |
8389 | ;; | |
8390 | esac | |
8391 | fi | |
8392 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG | |
8393 | if test -n "$PKG_CONFIG"; then | |
8394 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
8395 | $as_echo "$PKG_CONFIG" >&6; } | |
8396 | else | |
8397 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
8398 | $as_echo "no" >&6; } | |
8399 | fi | |
8400 | ||
8401 | ||
8402 | ||
8403 | if test "$PKG_CONFIG" = "no" ; then | |
8404 | pkg_check_gtk=no | |
8405 | else | |
8406 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
8407 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
8408 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTK_MODULES" >&5 | |
8409 | $as_echo_n "checking for $GTK_MODULES... " >&6; } | |
8410 | ||
8411 | if $PKG_CONFIG --exists "$GTK_MODULES" 2>&5; then | |
8412 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
8413 | $as_echo "yes" >&6; } | |
8414 | succeeded=yes | |
8415 | ||
8416 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking GTK_CFLAGS" >&5 | |
8417 | $as_echo_n "checking GTK_CFLAGS... " >&6; } | |
8418 | GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES"|sed -e 's,///*,/,g'` | |
8419 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_CFLAGS" >&5 | |
8420 | $as_echo "$GTK_CFLAGS" >&6; } | |
8421 | ||
8422 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking GTK_LIBS" >&5 | |
8423 | $as_echo_n "checking GTK_LIBS... " >&6; } | |
8424 | GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES"|sed -e 's,///*,/,g'` | |
8425 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_LIBS" >&5 | |
8426 | $as_echo "$GTK_LIBS" >&6; } | |
8427 | else | |
8428 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
8429 | $as_echo "no" >&6; } | |
8430 | GTK_CFLAGS="" | |
8431 | GTK_LIBS="" | |
8432 | ## If we have a custom action on failure, don't print errors, but | |
8433 | ## do set a variable so people can do so. | |
8434 | GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"` | |
8435 | ||
8436 | fi | |
8437 | ||
8438 | ||
8439 | ||
8440 | else | |
8441 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
8442 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
8443 | fi | |
8444 | fi | |
8445 | ||
8446 | if test $succeeded = yes; then | |
8447 | pkg_check_gtk=yes | |
8448 | else | |
8449 | pkg_check_gtk=no | |
8450 | fi | |
8451 | ||
8452 | if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then | |
3d608a86 | 8453 | as_fn_error "$GTK_PKG_ERRORS" "$LINENO" 5 |
e547b051 J |
8454 | fi |
8455 | fi | |
8456 | ||
8457 | if test "$pkg_check_gtk" != "yes"; then | |
8458 | HAVE_GTK=no | |
eb697db5 DN |
8459 | if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "maybe"; then |
8460 | GLIB_REQUIRED=2.6 | |
8461 | GTK_REQUIRED=2.6 | |
8462 | GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED" | |
5929fbe7 GM |
8463 | |
8464 | ||
eb697db5 | 8465 | succeeded=no |
5929fbe7 | 8466 | |
eb697db5 DN |
8467 | # Extract the first word of "pkg-config", so it can be a program name with args. |
8468 | set dummy pkg-config; ac_word=$2 | |
8469 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
8470 | $as_echo_n "checking for $ac_word... " >&6; } | |
8471 | if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : | |
a4f64981 | 8472 | $as_echo_n "(cached) " >&6 |
a4f64981 | 8473 | else |
eb697db5 DN |
8474 | case $PKG_CONFIG in |
8475 | [\\/]* | ?:[\\/]*) | |
8476 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
8477 | ;; | |
8478 | *) | |
8479 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8480 | for as_dir in $PATH | |
8481 | do | |
8482 | IFS=$as_save_IFS | |
8483 | test -z "$as_dir" && as_dir=. | |
8484 | for ac_exec_ext in '' $ac_executable_extensions; do | |
8485 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
8486 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
8487 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
8488 | break 2 | |
8489 | fi | |
8490 | done | |
8491 | done | |
8492 | IFS=$as_save_IFS | |
8c5ff6dd | 8493 | |
eb697db5 DN |
8494 | test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" |
8495 | ;; | |
5929fbe7 | 8496 | esac |
eb697db5 DN |
8497 | fi |
8498 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG | |
8499 | if test -n "$PKG_CONFIG"; then | |
8500 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
8501 | $as_echo "$PKG_CONFIG" >&6; } | |
a4f64981 | 8502 | else |
eb697db5 DN |
8503 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
8504 | $as_echo "no" >&6; } | |
a4f64981 | 8505 | fi |
5929fbe7 | 8506 | |
9452ded1 | 8507 | |
a4f64981 | 8508 | |
eb697db5 DN |
8509 | if test "$PKG_CONFIG" = "no" ; then |
8510 | pkg_check_gtk=no | |
8511 | else | |
8512 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
8513 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
8514 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTK_MODULES" >&5 | |
8515 | $as_echo_n "checking for $GTK_MODULES... " >&6; } | |
a4f64981 | 8516 | |
eb697db5 DN |
8517 | if $PKG_CONFIG --exists "$GTK_MODULES" 2>&5; then |
8518 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
8519 | $as_echo "yes" >&6; } | |
8520 | succeeded=yes | |
a4f64981 | 8521 | |
eb697db5 DN |
8522 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking GTK_CFLAGS" >&5 |
8523 | $as_echo_n "checking GTK_CFLAGS... " >&6; } | |
8524 | GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES"|sed -e 's,///*,/,g'` | |
8525 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_CFLAGS" >&5 | |
8526 | $as_echo "$GTK_CFLAGS" >&6; } | |
91e84f96 | 8527 | |
eb697db5 DN |
8528 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking GTK_LIBS" >&5 |
8529 | $as_echo_n "checking GTK_LIBS... " >&6; } | |
8530 | GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES"|sed -e 's,///*,/,g'` | |
8531 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_LIBS" >&5 | |
8532 | $as_echo "$GTK_LIBS" >&6; } | |
8533 | else | |
8534 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
8535 | $as_echo "no" >&6; } | |
8536 | GTK_CFLAGS="" | |
8537 | GTK_LIBS="" | |
8538 | ## If we have a custom action on failure, don't print errors, but | |
8539 | ## do set a variable so people can do so. | |
8540 | GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"` | |
8732a4e9 | 8541 | |
eb697db5 | 8542 | fi |
8732a4e9 | 8543 | |
5929fbe7 | 8544 | |
9452ded1 | 8545 | |
eb697db5 DN |
8546 | else |
8547 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
8548 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
8549 | fi | |
8550 | fi | |
8551 | ||
8552 | if test $succeeded = yes; then | |
8553 | pkg_check_gtk=yes | |
8554 | else | |
8555 | pkg_check_gtk=no | |
8556 | fi | |
5929fbe7 | 8557 | |
eb697db5 | 8558 | if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then |
3d608a86 | 8559 | as_fn_error "$GTK_PKG_ERRORS" "$LINENO" 5 |
eb697db5 | 8560 | fi |
8c5ff6dd | 8561 | fi |
e547b051 | 8562 | fi |
8c5ff6dd | 8563 | |
eb697db5 DN |
8564 | GTK_OBJ= |
8565 | if test x"$pkg_check_gtk" = xyes; then | |
91e84f96 | 8566 | |
8c5ff6dd | 8567 | |
8c5ff6dd | 8568 | |
eb697db5 DN |
8569 | C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS" |
8570 | CFLAGS="$CFLAGS $GTK_CFLAGS" | |
8571 | LIBS="$GTK_LIBS $LIBS" | |
8572 | GTK_COMPILES=no | |
8573 | for ac_func in gtk_main | |
8574 | do : | |
8575 | ac_fn_c_check_func "$LINENO" "gtk_main" "ac_cv_func_gtk_main" | |
8576 | if test "x$ac_cv_func_gtk_main" = x""yes; then : | |
8577 | cat >>confdefs.h <<_ACEOF | |
8578 | #define HAVE_GTK_MAIN 1 | |
8579 | _ACEOF | |
8580 | GTK_COMPILES=yes | |
5929fbe7 | 8581 | fi |
eb697db5 | 8582 | done |
8c5ff6dd | 8583 | |
eb697db5 DN |
8584 | if test "${GTK_COMPILES}" != "yes"; then |
8585 | if test "$USE_X_TOOLKIT" != "maybe"; then | |
3d608a86 | 8586 | as_fn_error "Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" "$LINENO" 5; |
eb697db5 DN |
8587 | fi |
8588 | else | |
8589 | HAVE_GTK=yes | |
5929fbe7 | 8590 | |
eb697db5 | 8591 | $as_echo "#define USE_GTK 1" >>confdefs.h |
91e84f96 | 8592 | |
eb697db5 DN |
8593 | GTK_OBJ=gtkutil.o |
8594 | USE_X_TOOLKIT=none | |
8595 | if $PKG_CONFIG --atleast-version=2.10 gtk+-2.0; then | |
8596 | : | |
8597 | else | |
8598 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your version of Gtk+ will have problems with | |
8599 | closing open displays. This is no problem if you just use | |
8600 | one display, but if you use more than one and close one of them | |
8601 | Emacs may crash." >&5 | |
8602 | $as_echo "$as_me: WARNING: Your version of Gtk+ will have problems with | |
8603 | closing open displays. This is no problem if you just use | |
8604 | one display, but if you use more than one and close one of them | |
8605 | Emacs may crash." >&2;} | |
8606 | sleep 3 | |
8607 | fi | |
8608 | fi | |
8c5ff6dd | 8609 | |
a4f64981 | 8610 | fi |
08b47d3d | 8611 | |
15e12598 VB |
8612 | |
8613 | ||
eb697db5 | 8614 | if test "${HAVE_GTK}" = "yes"; then |
15e12598 | 8615 | |
eb697db5 DN |
8616 | if test "$with_toolkit_scroll_bars" != no; then |
8617 | with_toolkit_scroll_bars=yes | |
eb697db5 | 8618 | fi |
8c5ff6dd | 8619 | |
eb697db5 DN |
8620 | HAVE_GTK_FILE_SELECTION=no |
8621 | ac_fn_c_check_decl "$LINENO" "GTK_TYPE_FILE_SELECTION" "ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" "$ac_includes_default | |
8622 | #include <gtk/gtk.h> | |
8623 | " | |
8624 | if test "x$ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" = x""yes; then : | |
8625 | HAVE_GTK_FILE_SELECTION=yes | |
5929fbe7 | 8626 | else |
eb697db5 | 8627 | HAVE_GTK_FILE_SELECTION=no |
5929fbe7 | 8628 | fi |
91e84f96 | 8629 | |
eb697db5 DN |
8630 | if test "$HAVE_GTK_FILE_SELECTION" = yes; then |
8631 | for ac_func in gtk_file_selection_new | |
8632 | do : | |
8633 | ac_fn_c_check_func "$LINENO" "gtk_file_selection_new" "ac_cv_func_gtk_file_selection_new" | |
8634 | if test "x$ac_cv_func_gtk_file_selection_new" = x""yes; then : | |
5929fbe7 | 8635 | cat >>confdefs.h <<_ACEOF |
eb697db5 | 8636 | #define HAVE_GTK_FILE_SELECTION_NEW 1 |
5929fbe7 | 8637 | _ACEOF |
8c5ff6dd | 8638 | |
8c5ff6dd | 8639 | fi |
eb697db5 | 8640 | done |
5929fbe7 | 8641 | |
eb697db5 | 8642 | fi |
5929fbe7 | 8643 | |
e547b051 | 8644 | HAVE_GTK_AND_PTHREAD=no |
eb697db5 DN |
8645 | for ac_header in pthread.h |
8646 | do : | |
8647 | ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default" | |
8648 | if test "x$ac_cv_header_pthread_h" = x""yes; then : | |
8649 | cat >>confdefs.h <<_ACEOF | |
8650 | #define HAVE_PTHREAD_H 1 | |
5929fbe7 GM |
8651 | _ACEOF |
8652 | ||
eb697db5 | 8653 | fi |
5929fbe7 | 8654 | |
eb697db5 DN |
8655 | done |
8656 | ||
8657 | if test "$ac_cv_header_pthread_h"; then | |
8658 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_self in -lpthread" >&5 | |
8659 | $as_echo_n "checking for pthread_self in -lpthread... " >&6; } | |
8660 | if test "${ac_cv_lib_pthread_pthread_self+set}" = set; then : | |
8c5ff6dd KR |
8661 | $as_echo_n "(cached) " >&6 |
8662 | else | |
8663 | ac_check_lib_save_LIBS=$LIBS | |
eb697db5 DN |
8664 | LIBS="-lpthread $LIBS" |
8665 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
a4f64981 | 8666 | /* end confdefs.h. */ |
8c5ff6dd KR |
8667 | |
8668 | /* Override any GCC internal prototype to avoid an error. | |
8669 | Use char because int might match the return type of a GCC | |
8670 | builtin and then its argument prototype would still apply. */ | |
8671 | #ifdef __cplusplus | |
8672 | extern "C" | |
8673 | #endif | |
eb697db5 | 8674 | char pthread_self (); |
a4f64981 GM |
8675 | int |
8676 | main () | |
8677 | { | |
eb697db5 | 8678 | return pthread_self (); |
a4f64981 GM |
8679 | ; |
8680 | return 0; | |
8681 | } | |
8682 | _ACEOF | |
eb697db5 DN |
8683 | if ac_fn_c_try_link "$LINENO"; then : |
8684 | ac_cv_lib_pthread_pthread_self=yes | |
a4f64981 | 8685 | else |
eb697db5 | 8686 | ac_cv_lib_pthread_pthread_self=no |
8c5ff6dd | 8687 | fi |
eb697db5 DN |
8688 | rm -f core conftest.err conftest.$ac_objext \ |
8689 | conftest$ac_exeext conftest.$ac_ext | |
5929fbe7 GM |
8690 | LIBS=$ac_check_lib_save_LIBS |
8691 | fi | |
eb697db5 DN |
8692 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_self" >&5 |
8693 | $as_echo "$ac_cv_lib_pthread_pthread_self" >&6; } | |
8694 | if test "x$ac_cv_lib_pthread_pthread_self" = x""yes; then : | |
8695 | HAVE_GTK_AND_PTHREAD=yes | |
8696 | fi | |
91e84f96 | 8697 | |
eb697db5 DN |
8698 | fi |
8699 | if test "$HAVE_GTK_AND_PTHREAD" = yes; then | |
8700 | case "${canonical}" in | |
8701 | *-hpux*) ;; | |
8702 | *) GTK_LIBS="$GTK_LIBS -lpthread" ;; | |
8703 | esac | |
91e84f96 | 8704 | |
eb697db5 | 8705 | $as_echo "#define HAVE_GTK_AND_PTHREAD 1" >>confdefs.h |
cd03c74a | 8706 | |
eb697db5 | 8707 | fi |
e547b051 J |
8708 | |
8709 | for ac_func in gtk_widget_get_window gtk_widget_set_has_window \ | |
8710 | gtk_dialog_get_action_area gtk_widget_get_sensitive \ | |
8711 | gtk_widget_get_mapped gtk_adjustment_get_page_size \ | |
8712 | gtk_orientable_set_orientation | |
8713 | do : | |
8714 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
8715 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
3d608a86 J |
8716 | eval as_val=\$$as_ac_var |
8717 | if test "x$as_val" = x""yes; then : | |
e547b051 J |
8718 | cat >>confdefs.h <<_ACEOF |
8719 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
8720 | _ACEOF | |
8721 | ||
8722 | fi | |
8723 | done | |
8724 | ||
8725 | ||
5929fbe7 | 8726 | fi |
49ebbd65 | 8727 | |
eb697db5 DN |
8728 | HAVE_DBUS=no |
8729 | DBUS_OBJ= | |
8730 | if test "${with_dbus}" = "yes"; then | |
15e12598 | 8731 | |
eb697db5 | 8732 | succeeded=no |
a4f64981 | 8733 | |
eb697db5 DN |
8734 | # Extract the first word of "pkg-config", so it can be a program name with args. |
8735 | set dummy pkg-config; ac_word=$2 | |
8736 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
8737 | $as_echo_n "checking for $ac_word... " >&6; } | |
8738 | if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : | |
91e84f96 GM |
8739 | $as_echo_n "(cached) " >&6 |
8740 | else | |
eb697db5 DN |
8741 | case $PKG_CONFIG in |
8742 | [\\/]* | ?:[\\/]*) | |
8743 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
8744 | ;; | |
8745 | *) | |
8746 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8747 | for as_dir in $PATH | |
8748 | do | |
8749 | IFS=$as_save_IFS | |
8750 | test -z "$as_dir" && as_dir=. | |
8751 | for ac_exec_ext in '' $ac_executable_extensions; do | |
8752 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
8753 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
8754 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
8755 | break 2 | |
8756 | fi | |
8757 | done | |
8758 | done | |
8759 | IFS=$as_save_IFS | |
8760 | ||
8761 | test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" | |
8762 | ;; | |
a4f64981 | 8763 | esac |
eb697db5 DN |
8764 | fi |
8765 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG | |
8766 | if test -n "$PKG_CONFIG"; then | |
8767 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
8768 | $as_echo "$PKG_CONFIG" >&6; } | |
91e84f96 | 8769 | else |
eb697db5 DN |
8770 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
8771 | $as_echo "no" >&6; } | |
5929fbe7 | 8772 | fi |
a4f64981 | 8773 | |
49ebbd65 | 8774 | |
eb697db5 DN |
8775 | |
8776 | if test "$PKG_CONFIG" = "no" ; then | |
8777 | HAVE_DBUS=no | |
8778 | else | |
8779 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
8780 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
8781 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbus-1 >= 1.0" >&5 | |
8782 | $as_echo_n "checking for dbus-1 >= 1.0... " >&6; } | |
8783 | ||
8784 | if $PKG_CONFIG --exists "dbus-1 >= 1.0" 2>&5; then | |
8785 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
8786 | $as_echo "yes" >&6; } | |
8787 | succeeded=yes | |
8788 | ||
8789 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking DBUS_CFLAGS" >&5 | |
8790 | $as_echo_n "checking DBUS_CFLAGS... " >&6; } | |
8791 | DBUS_CFLAGS=`$PKG_CONFIG --cflags "dbus-1 >= 1.0"|sed -e 's,///*,/,g'` | |
8792 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBUS_CFLAGS" >&5 | |
8793 | $as_echo "$DBUS_CFLAGS" >&6; } | |
8794 | ||
8795 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking DBUS_LIBS" >&5 | |
8796 | $as_echo_n "checking DBUS_LIBS... " >&6; } | |
8797 | DBUS_LIBS=`$PKG_CONFIG --libs "dbus-1 >= 1.0"|sed -e 's,///*,/,g'` | |
8798 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBUS_LIBS" >&5 | |
8799 | $as_echo "$DBUS_LIBS" >&6; } | |
8800 | else | |
8801 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
8802 | $as_echo "no" >&6; } | |
8803 | DBUS_CFLAGS="" | |
8804 | DBUS_LIBS="" | |
8805 | ## If we have a custom action on failure, don't print errors, but | |
8806 | ## do set a variable so people can do so. | |
8807 | DBUS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "dbus-1 >= 1.0"` | |
8808 | ||
8809 | fi | |
8810 | ||
8811 | ||
8812 | ||
8813 | else | |
8814 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
8815 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
8816 | fi | |
8817 | fi | |
8818 | ||
8819 | if test $succeeded = yes; then | |
8820 | HAVE_DBUS=yes | |
8821 | else | |
8822 | HAVE_DBUS=no | |
8823 | fi | |
8824 | ||
8825 | if test "$HAVE_DBUS" = yes; then | |
8826 | LIBS="$LIBS $DBUS_LIBS" | |
8827 | ||
8828 | $as_echo "#define HAVE_DBUS 1" >>confdefs.h | |
8829 | ||
8830 | for ac_func in dbus_watch_get_unix_fd | |
8831 | do : | |
8832 | ac_fn_c_check_func "$LINENO" "dbus_watch_get_unix_fd" "ac_cv_func_dbus_watch_get_unix_fd" | |
8833 | if test "x$ac_cv_func_dbus_watch_get_unix_fd" = x""yes; then : | |
8834 | cat >>confdefs.h <<_ACEOF | |
8835 | #define HAVE_DBUS_WATCH_GET_UNIX_FD 1 | |
5929fbe7 | 8836 | _ACEOF |
eb697db5 DN |
8837 | |
8838 | fi | |
8839 | done | |
8840 | ||
8841 | DBUS_OBJ=dbusbind.o | |
8842 | fi | |
8843 | fi | |
8844 | ||
8845 | ||
8846 | HAVE_GCONF=no | |
8847 | if test "${HAVE_X11}" = "yes" && test "${with_gconf}" = "yes"; then | |
8848 | ||
8849 | succeeded=no | |
8850 | ||
8851 | # Extract the first word of "pkg-config", so it can be a program name with args. | |
8852 | set dummy pkg-config; ac_word=$2 | |
8853 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
8854 | $as_echo_n "checking for $ac_word... " >&6; } | |
8855 | if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : | |
8856 | $as_echo_n "(cached) " >&6 | |
8857 | else | |
8858 | case $PKG_CONFIG in | |
8859 | [\\/]* | ?:[\\/]*) | |
8860 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
8861 | ;; | |
8862 | *) | |
8863 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8864 | for as_dir in $PATH | |
8865 | do | |
8866 | IFS=$as_save_IFS | |
8867 | test -z "$as_dir" && as_dir=. | |
8868 | for ac_exec_ext in '' $ac_executable_extensions; do | |
8869 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
8870 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
8871 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
8872 | break 2 | |
8873 | fi | |
8874 | done | |
8875 | done | |
8876 | IFS=$as_save_IFS | |
8877 | ||
8878 | test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" | |
8879 | ;; | |
5929fbe7 | 8880 | esac |
eb697db5 DN |
8881 | fi |
8882 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG | |
8883 | if test -n "$PKG_CONFIG"; then | |
8884 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
8885 | $as_echo "$PKG_CONFIG" >&6; } | |
5929fbe7 | 8886 | else |
eb697db5 DN |
8887 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
8888 | $as_echo "no" >&6; } | |
8889 | fi | |
8890 | ||
8891 | ||
8892 | ||
8893 | if test "$PKG_CONFIG" = "no" ; then | |
8894 | HAVE_GCONF=no | |
8895 | else | |
8896 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
8897 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
8898 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gconf-2.0 >= 2.13" >&5 | |
8899 | $as_echo_n "checking for gconf-2.0 >= 2.13... " >&6; } | |
8900 | ||
8901 | if $PKG_CONFIG --exists "gconf-2.0 >= 2.13" 2>&5; then | |
8902 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
8903 | $as_echo "yes" >&6; } | |
8904 | succeeded=yes | |
8905 | ||
8906 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking GCONF_CFLAGS" >&5 | |
8907 | $as_echo_n "checking GCONF_CFLAGS... " >&6; } | |
8908 | GCONF_CFLAGS=`$PKG_CONFIG --cflags "gconf-2.0 >= 2.13"|sed -e 's,///*,/,g'` | |
8909 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCONF_CFLAGS" >&5 | |
8910 | $as_echo "$GCONF_CFLAGS" >&6; } | |
8911 | ||
8912 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking GCONF_LIBS" >&5 | |
8913 | $as_echo_n "checking GCONF_LIBS... " >&6; } | |
8914 | GCONF_LIBS=`$PKG_CONFIG --libs "gconf-2.0 >= 2.13"|sed -e 's,///*,/,g'` | |
8915 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCONF_LIBS" >&5 | |
8916 | $as_echo "$GCONF_LIBS" >&6; } | |
8917 | else | |
8918 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
8919 | $as_echo "no" >&6; } | |
8920 | GCONF_CFLAGS="" | |
8921 | GCONF_LIBS="" | |
8922 | ## If we have a custom action on failure, don't print errors, but | |
8923 | ## do set a variable so people can do so. | |
8924 | GCONF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gconf-2.0 >= 2.13"` | |
cd03c74a | 8925 | |
eb697db5 | 8926 | fi |
49ebbd65 | 8927 | |
e6df49e4 | 8928 | |
49ebbd65 | 8929 | |
eb697db5 DN |
8930 | else |
8931 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
8932 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
8933 | fi | |
8934 | fi | |
cd03c74a | 8935 | |
eb697db5 DN |
8936 | if test $succeeded = yes; then |
8937 | HAVE_GCONF=yes | |
8938 | else | |
8939 | HAVE_GCONF=no | |
8940 | fi | |
49ebbd65 | 8941 | |
eb697db5 | 8942 | if test "$HAVE_GCONF" = yes; then |
a4f64981 | 8943 | |
eb697db5 | 8944 | $as_echo "#define HAVE_GCONF 1" >>confdefs.h |
8c5ff6dd | 8945 | |
eb697db5 DN |
8946 | fi |
8947 | fi | |
8948 | ||
8949 | HAVE_LIBSELINUX=no | |
8950 | LIBSELINUX_LIBS= | |
8951 | if test "${with_selinux}" = "yes"; then | |
8952 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lgetfilecon in -lselinux" >&5 | |
8953 | $as_echo_n "checking for lgetfilecon in -lselinux... " >&6; } | |
8954 | if test "${ac_cv_lib_selinux_lgetfilecon+set}" = set; then : | |
15e12598 | 8955 | $as_echo_n "(cached) " >&6 |
49ebbd65 | 8956 | else |
eb697db5 DN |
8957 | ac_check_lib_save_LIBS=$LIBS |
8958 | LIBS="-lselinux $LIBS" | |
8959 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
91e84f96 | 8960 | /* end confdefs.h. */ |
15e12598 VB |
8961 | |
8962 | /* Override any GCC internal prototype to avoid an error. | |
8963 | Use char because int might match the return type of a GCC | |
8964 | builtin and then its argument prototype would still apply. */ | |
8965 | #ifdef __cplusplus | |
8966 | extern "C" | |
8967 | #endif | |
eb697db5 | 8968 | char lgetfilecon (); |
91e84f96 GM |
8969 | int |
8970 | main () | |
8971 | { | |
eb697db5 | 8972 | return lgetfilecon (); |
91e84f96 GM |
8973 | ; |
8974 | return 0; | |
8975 | } | |
8976 | _ACEOF | |
eb697db5 DN |
8977 | if ac_fn_c_try_link "$LINENO"; then : |
8978 | ac_cv_lib_selinux_lgetfilecon=yes | |
91e84f96 | 8979 | else |
eb697db5 | 8980 | ac_cv_lib_selinux_lgetfilecon=no |
a4f64981 | 8981 | fi |
eb697db5 DN |
8982 | rm -f core conftest.err conftest.$ac_objext \ |
8983 | conftest$ac_exeext conftest.$ac_ext | |
8984 | LIBS=$ac_check_lib_save_LIBS | |
15e12598 | 8985 | fi |
eb697db5 DN |
8986 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_lgetfilecon" >&5 |
8987 | $as_echo "$ac_cv_lib_selinux_lgetfilecon" >&6; } | |
8988 | if test "x$ac_cv_lib_selinux_lgetfilecon" = x""yes; then : | |
8989 | HAVE_LIBSELINUX=yes | |
8990 | else | |
8991 | HAVE_LIBSELINUX=no | |
5929fbe7 | 8992 | fi |
a4f64981 | 8993 | |
eb697db5 | 8994 | if test "$HAVE_LIBSELINUX" = yes; then |
15e12598 | 8995 | |
eb697db5 | 8996 | $as_echo "#define HAVE_LIBSELINUX 1" >>confdefs.h |
e6df49e4 | 8997 | |
eb697db5 DN |
8998 | LIBSELINUX_LIBS=-lselinux |
8999 | fi | |
5929fbe7 | 9000 | fi |
e6df49e4 | 9001 | |
eb697db5 DN |
9002 | |
9003 | HAVE_XAW3D=no | |
9004 | LUCID_LIBW= | |
9005 | if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then | |
9006 | if test "$with_xaw3d" != no; then | |
9007 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xaw3d" >&5 | |
9008 | $as_echo_n "checking for xaw3d... " >&6; } | |
9009 | if test "${emacs_cv_xaw3d+set}" = set; then : | |
a4f64981 GM |
9010 | $as_echo_n "(cached) " >&6 |
9011 | else | |
eb697db5 | 9012 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5929fbe7 | 9013 | /* end confdefs.h. */ |
5929fbe7 | 9014 | |
eb697db5 DN |
9015 | #include <X11/Intrinsic.h> |
9016 | #include <X11/Xaw3d/Simple.h> | |
9017 | int | |
9018 | main () | |
9019 | { | |
5929fbe7 | 9020 | |
eb697db5 DN |
9021 | ; |
9022 | return 0; | |
9023 | } | |
5929fbe7 | 9024 | _ACEOF |
eb697db5 DN |
9025 | if ac_fn_c_try_link "$LINENO"; then : |
9026 | emacs_cv_xaw3d=yes | |
a4f64981 | 9027 | else |
eb697db5 | 9028 | emacs_cv_xaw3d=no |
a4f64981 | 9029 | fi |
eb697db5 DN |
9030 | rm -f core conftest.err conftest.$ac_objext \ |
9031 | conftest$ac_exeext conftest.$ac_ext | |
5929fbe7 | 9032 | fi |
8c5ff6dd | 9033 | |
eb697db5 DN |
9034 | else |
9035 | emacs_cv_xaw3d=no | |
9036 | fi | |
9037 | if test $emacs_cv_xaw3d = yes; then | |
9038 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5 | |
9039 | $as_echo "yes; using Lucid toolkit" >&6; } | |
9040 | USE_X_TOOLKIT=LUCID | |
9041 | HAVE_XAW3D=yes | |
9042 | LUCID_LIBW=-lXaw3d | |
8c5ff6dd | 9043 | |
eb697db5 | 9044 | $as_echo "#define HAVE_XAW3D 1" >>confdefs.h |
5929fbe7 | 9045 | |
eb697db5 DN |
9046 | else |
9047 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
9048 | $as_echo "no" >&6; } | |
9049 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libXaw" >&5 | |
9050 | $as_echo_n "checking for libXaw... " >&6; } | |
9051 | if test "${emacs_cv_xaw+set}" = set; then : | |
5929fbe7 | 9052 | $as_echo_n "(cached) " >&6 |
5929fbe7 | 9053 | else |
eb697db5 | 9054 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5929fbe7 | 9055 | /* end confdefs.h. */ |
5929fbe7 | 9056 | |
eb697db5 DN |
9057 | #include <X11/Intrinsic.h> |
9058 | #include <X11/Xaw/Simple.h> | |
9059 | int | |
9060 | main () | |
9061 | { | |
5929fbe7 | 9062 | |
eb697db5 DN |
9063 | ; |
9064 | return 0; | |
9065 | } | |
5929fbe7 | 9066 | _ACEOF |
eb697db5 DN |
9067 | if ac_fn_c_try_link "$LINENO"; then : |
9068 | emacs_cv_xaw=yes | |
5929fbe7 | 9069 | else |
eb697db5 DN |
9070 | emacs_cv_xaw=no |
9071 | fi | |
9072 | rm -f core conftest.err conftest.$ac_objext \ | |
9073 | conftest$ac_exeext conftest.$ac_ext | |
9074 | fi | |
5929fbe7 | 9075 | |
eb697db5 DN |
9076 | if test $emacs_cv_xaw = yes; then |
9077 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5 | |
9078 | $as_echo "yes; using Lucid toolkit" >&6; } | |
9079 | USE_X_TOOLKIT=LUCID | |
9080 | LUCID_LIBW=-lXaw | |
9081 | elif test x"${USE_X_TOOLKIT}" = xLUCID; then | |
3d608a86 | 9082 | as_fn_error "Lucid toolkit requires X11/Xaw include files" "$LINENO" 5 |
eb697db5 DN |
9083 | else |
9084 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no; do not use toolkit by default" >&5 | |
9085 | $as_echo "no; do not use toolkit by default" >&6; } | |
9086 | USE_X_TOOLKIT=none | |
9087 | fi | |
9088 | fi | |
5929fbe7 | 9089 | fi |
8c5ff6dd | 9090 | |
eb697db5 | 9091 | X_TOOLKIT_TYPE=$USE_X_TOOLKIT |
a4f64981 | 9092 | |
eb697db5 DN |
9093 | LIBXTR6= |
9094 | if test "${USE_X_TOOLKIT}" != "none"; then | |
9095 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 toolkit version" >&5 | |
9096 | $as_echo_n "checking X11 toolkit version... " >&6; } | |
9097 | if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then : | |
9098 | $as_echo_n "(cached) " >&6 | |
9099 | else | |
9100 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9101 | /* end confdefs.h. */ | |
9102 | #include <X11/Intrinsic.h> | |
9103 | int | |
9104 | main () | |
9105 | { | |
9106 | #if XtSpecificationRelease < 6 | |
9107 | fail; | |
9108 | #endif | |
aaa36002 | 9109 | |
eb697db5 DN |
9110 | ; |
9111 | return 0; | |
9112 | } | |
9113 | _ACEOF | |
9114 | if ac_fn_c_try_link "$LINENO"; then : | |
9115 | emacs_cv_x11_toolkit_version_6=yes | |
5929fbe7 | 9116 | else |
eb697db5 | 9117 | emacs_cv_x11_toolkit_version_6=no |
5929fbe7 | 9118 | fi |
eb697db5 DN |
9119 | rm -f core conftest.err conftest.$ac_objext \ |
9120 | conftest$ac_exeext conftest.$ac_ext | |
5929fbe7 | 9121 | fi |
15e12598 | 9122 | |
eb697db5 DN |
9123 | HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6 |
9124 | if test $emacs_cv_x11_toolkit_version_6 = yes; then | |
9125 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5 | |
9126 | $as_echo "6 or newer" >&6; } | |
15e12598 | 9127 | |
eb697db5 | 9128 | $as_echo "#define HAVE_X11XTR6 1" >>confdefs.h |
15e12598 | 9129 | |
eb697db5 DN |
9130 | LIBXTR6="-lSM -lICE" |
9131 | case "$opsys" in | |
9132 | ## Use libw.a along with X11R6 Xt. | |
9133 | unixware) LIBXTR6="$LIBXTR6 -lw" ;; | |
9134 | esac | |
9135 | else | |
9136 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5 | |
9137 | $as_echo "before 6" >&6; } | |
9138 | fi | |
5929fbe7 | 9139 | |
eb697db5 DN |
9140 | OLDLIBS="$LIBS" |
9141 | if test x$HAVE_X11XTR6 = xyes; then | |
9142 | LIBS="-lXt -lSM -lICE $LIBS" | |
9143 | else | |
9144 | LIBS="-lXt $LIBS" | |
9145 | fi | |
9146 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XmuConvertStandardSelection in -lXmu" >&5 | |
9147 | $as_echo_n "checking for XmuConvertStandardSelection in -lXmu... " >&6; } | |
9148 | if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then : | |
5929fbe7 | 9149 | $as_echo_n "(cached) " >&6 |
5929fbe7 | 9150 | else |
eb697db5 DN |
9151 | ac_check_lib_save_LIBS=$LIBS |
9152 | LIBS="-lXmu $LIBS" | |
9153 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5929fbe7 | 9154 | /* end confdefs.h. */ |
eb697db5 DN |
9155 | |
9156 | /* Override any GCC internal prototype to avoid an error. | |
9157 | Use char because int might match the return type of a GCC | |
9158 | builtin and then its argument prototype would still apply. */ | |
9159 | #ifdef __cplusplus | |
9160 | extern "C" | |
9161 | #endif | |
9162 | char XmuConvertStandardSelection (); | |
9163 | int | |
9164 | main () | |
9165 | { | |
9166 | return XmuConvertStandardSelection (); | |
9167 | ; | |
9168 | return 0; | |
9169 | } | |
5929fbe7 | 9170 | _ACEOF |
eb697db5 DN |
9171 | if ac_fn_c_try_link "$LINENO"; then : |
9172 | ac_cv_lib_Xmu_XmuConvertStandardSelection=yes | |
5929fbe7 | 9173 | else |
eb697db5 | 9174 | ac_cv_lib_Xmu_XmuConvertStandardSelection=no |
8c5ff6dd | 9175 | fi |
eb697db5 DN |
9176 | rm -f core conftest.err conftest.$ac_objext \ |
9177 | conftest$ac_exeext conftest.$ac_ext | |
9178 | LIBS=$ac_check_lib_save_LIBS | |
9179 | fi | |
9180 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5 | |
9181 | $as_echo "$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6; } | |
9182 | if test "x$ac_cv_lib_Xmu_XmuConvertStandardSelection" = x""yes; then : | |
9183 | cat >>confdefs.h <<_ACEOF | |
9184 | #define HAVE_LIBXMU 1 | |
5929fbe7 | 9185 | _ACEOF |
a4f64981 | 9186 | |
eb697db5 DN |
9187 | LIBS="-lXmu $LIBS" |
9188 | ||
5929fbe7 | 9189 | fi |
a4f64981 | 9190 | |
eb697db5 DN |
9191 | test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS" |
9192 | fi | |
a4f64981 | 9193 | |
a4f64981 | 9194 | |
eb697db5 DN |
9195 | LIBXMU=-lXmu |
9196 | case "$machine" in | |
9197 | ## These machines don't supply Xmu. | |
9198 | hpux* | aix4-2 ) | |
9199 | test "X$ac_cv_lib_Xmu_XmuConvertStandardSelection" != "Xyes" && LIBXMU= | |
5929fbe7 GM |
9200 | ;; |
9201 | esac | |
eb697db5 DN |
9202 | |
9203 | ||
9204 | # On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D. | |
9205 | if test "${HAVE_X11}" = "yes"; then | |
9206 | if test "${USE_X_TOOLKIT}" != "none"; then | |
9207 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XShapeQueryExtension in -lXext" >&5 | |
9208 | $as_echo_n "checking for XShapeQueryExtension in -lXext... " >&6; } | |
9209 | if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then : | |
5929fbe7 GM |
9210 | $as_echo_n "(cached) " >&6 |
9211 | else | |
eb697db5 DN |
9212 | ac_check_lib_save_LIBS=$LIBS |
9213 | LIBS="-lXext $LIBS" | |
9214 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9215 | /* end confdefs.h. */ | |
49ebbd65 | 9216 | |
eb697db5 DN |
9217 | /* Override any GCC internal prototype to avoid an error. |
9218 | Use char because int might match the return type of a GCC | |
9219 | builtin and then its argument prototype would still apply. */ | |
9220 | #ifdef __cplusplus | |
9221 | extern "C" | |
9222 | #endif | |
9223 | char XShapeQueryExtension (); | |
9224 | int | |
9225 | main () | |
9226 | { | |
9227 | return XShapeQueryExtension (); | |
9228 | ; | |
9229 | return 0; | |
9230 | } | |
9231 | _ACEOF | |
9232 | if ac_fn_c_try_link "$LINENO"; then : | |
9233 | ac_cv_lib_Xext_XShapeQueryExtension=yes | |
9234 | else | |
9235 | ac_cv_lib_Xext_XShapeQueryExtension=no | |
9236 | fi | |
9237 | rm -f core conftest.err conftest.$ac_objext \ | |
9238 | conftest$ac_exeext conftest.$ac_ext | |
9239 | LIBS=$ac_check_lib_save_LIBS | |
5929fbe7 | 9240 | fi |
eb697db5 DN |
9241 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5 |
9242 | $as_echo "$ac_cv_lib_Xext_XShapeQueryExtension" >&6; } | |
9243 | if test "x$ac_cv_lib_Xext_XShapeQueryExtension" = x""yes; then : | |
5929fbe7 | 9244 | cat >>confdefs.h <<_ACEOF |
eb697db5 | 9245 | #define HAVE_LIBXEXT 1 |
5929fbe7 | 9246 | _ACEOF |
15e12598 | 9247 | |
eb697db5 | 9248 | LIBS="-lXext $LIBS" |
a4f64981 | 9249 | |
5929fbe7 | 9250 | fi |
8c5ff6dd | 9251 | |
eb697db5 DN |
9252 | fi |
9253 | fi | |
8c5ff6dd | 9254 | |
eb697db5 DN |
9255 | LIBXP= |
9256 | if test "${USE_X_TOOLKIT}" = "MOTIF"; then | |
9257 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Motif version 2.1" >&5 | |
9258 | $as_echo_n "checking for Motif version 2.1... " >&6; } | |
9259 | if test "${emacs_cv_motif_version_2_1+set}" = set; then : | |
91e84f96 GM |
9260 | $as_echo_n "(cached) " >&6 |
9261 | else | |
eb697db5 | 9262 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
91e84f96 | 9263 | /* end confdefs.h. */ |
eb697db5 DN |
9264 | #include <Xm/Xm.h> |
9265 | int | |
9266 | main () | |
9267 | { | |
9268 | #if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1) | |
9269 | int x = 5; | |
9270 | #else | |
9271 | Motif version prior to 2.1. | |
9272 | #endif | |
9273 | ; | |
9274 | return 0; | |
9275 | } | |
91e84f96 | 9276 | _ACEOF |
eb697db5 DN |
9277 | if ac_fn_c_try_compile "$LINENO"; then : |
9278 | emacs_cv_motif_version_2_1=yes | |
91e84f96 | 9279 | else |
eb697db5 | 9280 | emacs_cv_motif_version_2_1=no |
91e84f96 | 9281 | fi |
5929fbe7 | 9282 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
eb697db5 DN |
9283 | fi |
9284 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_motif_version_2_1" >&5 | |
9285 | $as_echo "$emacs_cv_motif_version_2_1" >&6; } | |
9286 | if test $emacs_cv_motif_version_2_1 = yes; then | |
9287 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpCreateContext in -lXp" >&5 | |
9288 | $as_echo_n "checking for XpCreateContext in -lXp... " >&6; } | |
9289 | if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then : | |
9290 | $as_echo_n "(cached) " >&6 | |
9291 | else | |
9292 | ac_check_lib_save_LIBS=$LIBS | |
9293 | LIBS="-lXp $LIBS" | |
9294 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9295 | /* end confdefs.h. */ | |
a4f64981 | 9296 | |
eb697db5 DN |
9297 | /* Override any GCC internal prototype to avoid an error. |
9298 | Use char because int might match the return type of a GCC | |
9299 | builtin and then its argument prototype would still apply. */ | |
9300 | #ifdef __cplusplus | |
9301 | extern "C" | |
9302 | #endif | |
9303 | char XpCreateContext (); | |
9304 | int | |
9305 | main () | |
9306 | { | |
9307 | return XpCreateContext (); | |
9308 | ; | |
9309 | return 0; | |
9310 | } | |
5929fbe7 | 9311 | _ACEOF |
eb697db5 DN |
9312 | if ac_fn_c_try_link "$LINENO"; then : |
9313 | ac_cv_lib_Xp_XpCreateContext=yes | |
9314 | else | |
9315 | ac_cv_lib_Xp_XpCreateContext=no | |
9316 | fi | |
9317 | rm -f core conftest.err conftest.$ac_objext \ | |
9318 | conftest$ac_exeext conftest.$ac_ext | |
9319 | LIBS=$ac_check_lib_save_LIBS | |
9320 | fi | |
9321 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xp_XpCreateContext" >&5 | |
9322 | $as_echo "$ac_cv_lib_Xp_XpCreateContext" >&6; } | |
9323 | if test "x$ac_cv_lib_Xp_XpCreateContext" = x""yes; then : | |
9324 | LIBXP=-lXp | |
9325 | fi | |
9326 | ||
9327 | else | |
9328 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LessTif where some systems put it" >&5 | |
9329 | $as_echo_n "checking for LessTif where some systems put it... " >&6; } | |
9330 | if test "${emacs_cv_lesstif+set}" = set; then : | |
9331 | $as_echo_n "(cached) " >&6 | |
9332 | else | |
9333 | # We put this in CFLAGS temporarily to precede other -I options | |
9334 | # that might be in CFLAGS temporarily. | |
9335 | # We put this in CPPFLAGS where it precedes the other -I options. | |
9336 | OLD_CPPFLAGS=$CPPFLAGS | |
9337 | OLD_CFLAGS=$CFLAGS | |
9338 | CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS" | |
9339 | CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS" | |
9340 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8c5ff6dd | 9341 | /* end confdefs.h. */ |
eb697db5 DN |
9342 | #include </usr/X11R6/LessTif/Motif1.2/include/Xm/Xm.h> |
9343 | int | |
9344 | main () | |
9345 | { | |
9346 | int x = 5; | |
9347 | ; | |
9348 | return 0; | |
9349 | } | |
a4f64981 | 9350 | _ACEOF |
eb697db5 DN |
9351 | if ac_fn_c_try_compile "$LINENO"; then : |
9352 | emacs_cv_lesstif=yes | |
8c5ff6dd | 9353 | else |
eb697db5 DN |
9354 | emacs_cv_lesstif=no |
9355 | fi | |
9356 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
9357 | fi | |
9358 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_lesstif" >&5 | |
9359 | $as_echo "$emacs_cv_lesstif" >&6; } | |
9360 | if test $emacs_cv_lesstif = yes; then | |
9361 | # Make sure this -I option remains in CPPFLAGS after it is set | |
9362 | # back to REAL_CPPFLAGS. | |
9363 | # There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not | |
9364 | # have those other -I options anyway. Ultimately, having this | |
9365 | # directory ultimately in CPPFLAGS will be enough. | |
9366 | REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS" | |
9367 | LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS" | |
9368 | else | |
9369 | CFLAGS=$OLD_CFLAGS | |
9370 | CPPFLAGS=$OLD_CPPFLAGS | |
9371 | fi | |
9372 | fi | |
5929fbe7 | 9373 | fi |
cd03c74a | 9374 | |
49ebbd65 | 9375 | |
eb697db5 DN |
9376 | USE_TOOLKIT_SCROLL_BARS=no |
9377 | if test "${with_toolkit_scroll_bars}" != "no"; then | |
9378 | if test "${USE_X_TOOLKIT}" != "none"; then | |
9379 | if test "${USE_X_TOOLKIT}" = "MOTIF"; then | |
9380 | $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h | |
a4f64981 | 9381 | |
eb697db5 DN |
9382 | HAVE_XAW3D=no |
9383 | USE_TOOLKIT_SCROLL_BARS=yes | |
9384 | elif test "${HAVE_XAW3D}" = "yes"; then | |
9385 | $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h | |
9386 | ||
9387 | USE_TOOLKIT_SCROLL_BARS=yes | |
9388 | fi | |
9389 | elif test "${HAVE_GTK}" = "yes"; then | |
9390 | $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h | |
9391 | ||
9392 | USE_TOOLKIT_SCROLL_BARS=yes | |
9393 | elif test "${HAVE_NS}" = "yes"; then | |
9394 | $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h | |
a4f64981 | 9395 | |
eb697db5 DN |
9396 | USE_TOOLKIT_SCROLL_BARS=yes |
9397 | fi | |
5929fbe7 | 9398 | fi |
eb697db5 DN |
9399 | |
9400 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8c5ff6dd | 9401 | /* end confdefs.h. */ |
91e84f96 | 9402 | |
eb697db5 DN |
9403 | #include <X11/Xlib.h> |
9404 | #include <X11/Xresource.h> | |
91e84f96 GM |
9405 | int |
9406 | main () | |
9407 | { | |
eb697db5 | 9408 | XIMProc callback; |
91e84f96 GM |
9409 | ; |
9410 | return 0; | |
9411 | } | |
9412 | _ACEOF | |
eb697db5 DN |
9413 | if ac_fn_c_try_compile "$LINENO"; then : |
9414 | HAVE_XIM=yes | |
9415 | ||
9416 | $as_echo "#define HAVE_XIM 1" >>confdefs.h | |
9417 | ||
5929fbe7 | 9418 | else |
eb697db5 DN |
9419 | HAVE_XIM=no |
9420 | fi | |
9421 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5929fbe7 | 9422 | |
eb697db5 DN |
9423 | |
9424 | if test "${with_xim}" != "no"; then | |
9425 | ||
9426 | $as_echo "#define USE_XIM 1" >>confdefs.h | |
9427 | ||
9428 | fi | |
9429 | ||
9430 | ||
9431 | if test "${HAVE_XIM}" != "no"; then | |
9432 | late_CFLAGS=$CFLAGS | |
9433 | if test "$GCC" = yes; then | |
9434 | CFLAGS="$CFLAGS --pedantic-errors" | |
9435 | fi | |
9436 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5929fbe7 | 9437 | /* end confdefs.h. */ |
5929fbe7 | 9438 | |
eb697db5 DN |
9439 | #include <X11/Xlib.h> |
9440 | #include <X11/Xresource.h> | |
5929fbe7 GM |
9441 | int |
9442 | main () | |
9443 | { | |
eb697db5 DN |
9444 | Display *display; |
9445 | XrmDatabase db; | |
9446 | char *res_name; | |
9447 | char *res_class; | |
9448 | XIMProc callback; | |
9449 | XPointer *client_data; | |
9450 | #ifndef __GNUC__ | |
9451 | /* If we're not using GCC, it's probably not XFree86, and this is | |
9452 | probably right, but we can't use something like --pedantic-errors. */ | |
9453 | extern Bool XRegisterIMInstantiateCallback(Display*, XrmDatabase, char*, | |
9454 | char*, XIMProc, XPointer*); | |
9455 | #endif | |
9456 | (void)XRegisterIMInstantiateCallback(display, db, res_name, res_class, callback, | |
9457 | client_data); | |
5929fbe7 GM |
9458 | ; |
9459 | return 0; | |
9460 | } | |
9461 | _ACEOF | |
eb697db5 DN |
9462 | if ac_fn_c_try_compile "$LINENO"; then : |
9463 | emacs_cv_arg6_star=yes | |
5929fbe7 | 9464 | fi |
5929fbe7 | 9465 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
eb697db5 DN |
9466 | if test "$emacs_cv_arg6_star" = yes; then |
9467 | $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer*" >>confdefs.h | |
5929fbe7 | 9468 | |
eb697db5 DN |
9469 | else |
9470 | $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer" >>confdefs.h | |
9471 | ||
9472 | fi | |
9473 | CFLAGS=$late_CFLAGS | |
8c5ff6dd | 9474 | fi |
5929fbe7 | 9475 | |
eb697db5 DN |
9476 | ### Start of font-backend (under any platform) section. |
9477 | # (nothing here yet -- this is a placeholder) | |
9478 | ### End of font-backend (under any platform) section. | |
5929fbe7 | 9479 | |
eb697db5 DN |
9480 | ### Start of font-backend (under X11) section. |
9481 | if test "${HAVE_X11}" = "yes"; then | |
5929fbe7 | 9482 | |
eb697db5 DN |
9483 | succeeded=no |
9484 | ||
9485 | # Extract the first word of "pkg-config", so it can be a program name with args. | |
9486 | set dummy pkg-config; ac_word=$2 | |
9487 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
9488 | $as_echo_n "checking for $ac_word... " >&6; } | |
9489 | if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : | |
9490 | $as_echo_n "(cached) " >&6 | |
9491 | else | |
9492 | case $PKG_CONFIG in | |
9493 | [\\/]* | ?:[\\/]*) | |
9494 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
9495 | ;; | |
9496 | *) | |
9497 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
9498 | for as_dir in $PATH | |
9499 | do | |
9500 | IFS=$as_save_IFS | |
9501 | test -z "$as_dir" && as_dir=. | |
9502 | for ac_exec_ext in '' $ac_executable_extensions; do | |
9503 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
9504 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
9505 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
9506 | break 2 | |
9507 | fi | |
9508 | done | |
9509 | done | |
9510 | IFS=$as_save_IFS | |
5929fbe7 | 9511 | |
eb697db5 DN |
9512 | test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" |
9513 | ;; | |
9514 | esac | |
9515 | fi | |
9516 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG | |
9517 | if test -n "$PKG_CONFIG"; then | |
9518 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
9519 | $as_echo "$PKG_CONFIG" >&6; } | |
9520 | else | |
9521 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
9522 | $as_echo "no" >&6; } | |
8c5ff6dd | 9523 | fi |
91e84f96 | 9524 | |
5929fbe7 | 9525 | |
91e84f96 | 9526 | |
eb697db5 DN |
9527 | if test "$PKG_CONFIG" = "no" ; then |
9528 | HAVE_FC=no | |
9529 | else | |
9530 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
9531 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
9532 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fontconfig >= 2.2.0" >&5 | |
9533 | $as_echo_n "checking for fontconfig >= 2.2.0... " >&6; } | |
8c5ff6dd | 9534 | |
eb697db5 DN |
9535 | if $PKG_CONFIG --exists "fontconfig >= 2.2.0" 2>&5; then |
9536 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
9537 | $as_echo "yes" >&6; } | |
9538 | succeeded=yes | |
8c5ff6dd | 9539 | |
eb697db5 DN |
9540 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking FONTCONFIG_CFLAGS" >&5 |
9541 | $as_echo_n "checking FONTCONFIG_CFLAGS... " >&6; } | |
9542 | FONTCONFIG_CFLAGS=`$PKG_CONFIG --cflags "fontconfig >= 2.2.0"|sed -e 's,///*,/,g'` | |
9543 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FONTCONFIG_CFLAGS" >&5 | |
9544 | $as_echo "$FONTCONFIG_CFLAGS" >&6; } | |
8c5ff6dd | 9545 | |
eb697db5 DN |
9546 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking FONTCONFIG_LIBS" >&5 |
9547 | $as_echo_n "checking FONTCONFIG_LIBS... " >&6; } | |
9548 | FONTCONFIG_LIBS=`$PKG_CONFIG --libs "fontconfig >= 2.2.0"|sed -e 's,///*,/,g'` | |
9549 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FONTCONFIG_LIBS" >&5 | |
9550 | $as_echo "$FONTCONFIG_LIBS" >&6; } | |
9551 | else | |
9552 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
9553 | $as_echo "no" >&6; } | |
9554 | FONTCONFIG_CFLAGS="" | |
9555 | FONTCONFIG_LIBS="" | |
9556 | ## If we have a custom action on failure, don't print errors, but | |
9557 | ## do set a variable so people can do so. | |
9558 | FONTCONFIG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "fontconfig >= 2.2.0"` | |
9559 | ||
9560 | fi | |
9561 | ||
9562 | ||
9563 | ||
9564 | else | |
9565 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
9566 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
9567 | fi | |
9568 | fi | |
9569 | ||
9570 | if test $succeeded = yes; then | |
9571 | HAVE_FC=yes | |
9572 | else | |
9573 | HAVE_FC=no | |
9574 | fi | |
9575 | ||
9576 | ||
9577 | ## Use -lXft if available, unless `--with-xft=no'. | |
9578 | HAVE_XFT=maybe | |
9579 | if test "${HAVE_FC}" = "no" || test "x${with_x}" = "xno"; then | |
9580 | with_xft="no"; | |
9581 | fi | |
9582 | if test "x${with_xft}" != "xno"; then | |
9583 | ||
9584 | ||
9585 | succeeded=no | |
9586 | ||
9587 | # Extract the first word of "pkg-config", so it can be a program name with args. | |
9588 | set dummy pkg-config; ac_word=$2 | |
9589 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
9590 | $as_echo_n "checking for $ac_word... " >&6; } | |
9591 | if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : | |
5929fbe7 GM |
9592 | $as_echo_n "(cached) " >&6 |
9593 | else | |
eb697db5 DN |
9594 | case $PKG_CONFIG in |
9595 | [\\/]* | ?:[\\/]*) | |
9596 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
9597 | ;; | |
9598 | *) | |
9599 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
9600 | for as_dir in $PATH | |
9601 | do | |
9602 | IFS=$as_save_IFS | |
9603 | test -z "$as_dir" && as_dir=. | |
9604 | for ac_exec_ext in '' $ac_executable_extensions; do | |
9605 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
9606 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
9607 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
9608 | break 2 | |
9609 | fi | |
9610 | done | |
9611 | done | |
9612 | IFS=$as_save_IFS | |
9613 | ||
9614 | test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" | |
9615 | ;; | |
9616 | esac | |
9617 | fi | |
9618 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG | |
9619 | if test -n "$PKG_CONFIG"; then | |
9620 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
9621 | $as_echo "$PKG_CONFIG" >&6; } | |
8c5ff6dd | 9622 | else |
eb697db5 DN |
9623 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
9624 | $as_echo "no" >&6; } | |
15e12598 | 9625 | fi |
8c5ff6dd | 9626 | |
8c5ff6dd | 9627 | |
15e12598 | 9628 | |
eb697db5 DN |
9629 | if test "$PKG_CONFIG" = "no" ; then |
9630 | HAVE_XFT=no | |
9631 | else | |
9632 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
9633 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
9634 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xft >= 0.13.0" >&5 | |
9635 | $as_echo_n "checking for xft >= 0.13.0... " >&6; } | |
9636 | ||
9637 | if $PKG_CONFIG --exists "xft >= 0.13.0" 2>&5; then | |
9638 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
9639 | $as_echo "yes" >&6; } | |
9640 | succeeded=yes | |
9641 | ||
9642 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking XFT_CFLAGS" >&5 | |
9643 | $as_echo_n "checking XFT_CFLAGS... " >&6; } | |
9644 | XFT_CFLAGS=`$PKG_CONFIG --cflags "xft >= 0.13.0"|sed -e 's,///*,/,g'` | |
9645 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XFT_CFLAGS" >&5 | |
9646 | $as_echo "$XFT_CFLAGS" >&6; } | |
9647 | ||
9648 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking XFT_LIBS" >&5 | |
9649 | $as_echo_n "checking XFT_LIBS... " >&6; } | |
9650 | XFT_LIBS=`$PKG_CONFIG --libs "xft >= 0.13.0"|sed -e 's,///*,/,g'` | |
9651 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XFT_LIBS" >&5 | |
9652 | $as_echo "$XFT_LIBS" >&6; } | |
9653 | else | |
9654 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
9655 | $as_echo "no" >&6; } | |
9656 | XFT_CFLAGS="" | |
9657 | XFT_LIBS="" | |
9658 | ## If we have a custom action on failure, don't print errors, but | |
9659 | ## do set a variable so people can do so. | |
9660 | XFT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xft >= 0.13.0"` | |
8c5ff6dd | 9661 | |
eb697db5 | 9662 | fi |
8c5ff6dd | 9663 | |
5929fbe7 GM |
9664 | |
9665 | ||
eb697db5 DN |
9666 | else |
9667 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
9668 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
9669 | fi | |
9670 | fi | |
5929fbe7 | 9671 | |
eb697db5 DN |
9672 | if test $succeeded = yes; then |
9673 | : | |
9674 | else | |
9675 | HAVE_XFT=no | |
9676 | fi | |
9677 | ||
9678 | ## Because xftfont.c uses XRenderQueryExtension, we also | |
9679 | ## need to link to -lXrender. | |
9680 | HAVE_XRENDER=no | |
9681 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRenderQueryExtension in -lXrender" >&5 | |
9682 | $as_echo_n "checking for XRenderQueryExtension in -lXrender... " >&6; } | |
9683 | if test "${ac_cv_lib_Xrender_XRenderQueryExtension+set}" = set; then : | |
e6df49e4 GM |
9684 | $as_echo_n "(cached) " >&6 |
9685 | else | |
eb697db5 DN |
9686 | ac_check_lib_save_LIBS=$LIBS |
9687 | LIBS="-lXrender $LIBS" | |
9688 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
e6df49e4 | 9689 | /* end confdefs.h. */ |
eb697db5 DN |
9690 | |
9691 | /* Override any GCC internal prototype to avoid an error. | |
9692 | Use char because int might match the return type of a GCC | |
9693 | builtin and then its argument prototype would still apply. */ | |
9694 | #ifdef __cplusplus | |
9695 | extern "C" | |
9696 | #endif | |
9697 | char XRenderQueryExtension (); | |
5929fbe7 GM |
9698 | int |
9699 | main () | |
9700 | { | |
eb697db5 | 9701 | return XRenderQueryExtension (); |
5929fbe7 GM |
9702 | ; |
9703 | return 0; | |
9704 | } | |
9705 | _ACEOF | |
eb697db5 DN |
9706 | if ac_fn_c_try_link "$LINENO"; then : |
9707 | ac_cv_lib_Xrender_XRenderQueryExtension=yes | |
5929fbe7 | 9708 | else |
eb697db5 DN |
9709 | ac_cv_lib_Xrender_XRenderQueryExtension=no |
9710 | fi | |
9711 | rm -f core conftest.err conftest.$ac_objext \ | |
9712 | conftest$ac_exeext conftest.$ac_ext | |
9713 | LIBS=$ac_check_lib_save_LIBS | |
9714 | fi | |
9715 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrender_XRenderQueryExtension" >&5 | |
9716 | $as_echo "$ac_cv_lib_Xrender_XRenderQueryExtension" >&6; } | |
9717 | if test "x$ac_cv_lib_Xrender_XRenderQueryExtension" = x""yes; then : | |
9718 | HAVE_XRENDER=yes | |
5929fbe7 GM |
9719 | fi |
9720 | ||
eb697db5 DN |
9721 | if test "$HAVE_XFT" != no && test "$HAVE_XRENDER" != no; then |
9722 | OLD_CPPFLAGS="$CPPFLAGS" | |
9723 | OLD_CFLAGS="$CFLAGS" | |
9724 | OLD_LIBS="$LIBS" | |
9725 | CPPFLAGS="$CPPFLAGS $XFT_CFLAGS" | |
9726 | CFLAGS="$CFLAGS $XFT_CFLAGS" | |
9727 | XFT_LIBS="-lXrender $XFT_LIBS" | |
9728 | LIBS="$XFT_LIBS $LIBS" | |
9729 | ac_fn_c_check_header_mongrel "$LINENO" "X11/Xft/Xft.h" "ac_cv_header_X11_Xft_Xft_h" "$ac_includes_default" | |
9730 | if test "x$ac_cv_header_X11_Xft_Xft_h" = x""yes; then : | |
9731 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XftFontOpen in -lXft" >&5 | |
9732 | $as_echo_n "checking for XftFontOpen in -lXft... " >&6; } | |
9733 | if test "${ac_cv_lib_Xft_XftFontOpen+set}" = set; then : | |
9734 | $as_echo_n "(cached) " >&6 | |
9735 | else | |
9736 | ac_check_lib_save_LIBS=$LIBS | |
9737 | LIBS="-lXft $XFT_LIBS $LIBS" | |
9738 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5929fbe7 | 9739 | /* end confdefs.h. */ |
eb697db5 DN |
9740 | |
9741 | /* Override any GCC internal prototype to avoid an error. | |
9742 | Use char because int might match the return type of a GCC | |
9743 | builtin and then its argument prototype would still apply. */ | |
9744 | #ifdef __cplusplus | |
9745 | extern "C" | |
9746 | #endif | |
9747 | char XftFontOpen (); | |
e6df49e4 GM |
9748 | int |
9749 | main () | |
8c5ff6dd | 9750 | { |
eb697db5 | 9751 | return XftFontOpen (); |
8c5ff6dd KR |
9752 | ; |
9753 | return 0; | |
9754 | } | |
9755 | _ACEOF | |
eb697db5 DN |
9756 | if ac_fn_c_try_link "$LINENO"; then : |
9757 | ac_cv_lib_Xft_XftFontOpen=yes | |
e6df49e4 | 9758 | else |
eb697db5 | 9759 | ac_cv_lib_Xft_XftFontOpen=no |
15e12598 | 9760 | fi |
eb697db5 DN |
9761 | rm -f core conftest.err conftest.$ac_objext \ |
9762 | conftest$ac_exeext conftest.$ac_ext | |
9763 | LIBS=$ac_check_lib_save_LIBS | |
15e12598 | 9764 | fi |
eb697db5 DN |
9765 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xft_XftFontOpen" >&5 |
9766 | $as_echo "$ac_cv_lib_Xft_XftFontOpen" >&6; } | |
9767 | if test "x$ac_cv_lib_Xft_XftFontOpen" = x""yes; then : | |
9768 | HAVE_XFT=yes | |
15e12598 | 9769 | fi |
91e84f96 | 9770 | |
eb697db5 | 9771 | fi |
8c5ff6dd | 9772 | |
5929fbe7 GM |
9773 | |
9774 | ||
eb697db5 | 9775 | if test "${HAVE_XFT}" = "yes"; then |
5929fbe7 | 9776 | |
eb697db5 | 9777 | $as_echo "#define HAVE_XFT 1" >>confdefs.h |
5929fbe7 GM |
9778 | |
9779 | ||
eb697db5 DN |
9780 | C_SWITCH_X_SITE="$C_SWITCH_X_SITE $XFT_CFLAGS" |
9781 | else | |
9782 | CPPFLAGS="$OLD_CPPFLAGS" | |
9783 | CFLAGS="$OLD_CFLAGS" | |
9784 | LIBS="$OLD_LIBS" | |
9785 | fi # "${HAVE_XFT}" = "yes" | |
9786 | fi # "$HAVE_XFT" != no | |
9787 | fi # "x${with_xft}" != "xno" | |
5929fbe7 | 9788 | |
eb697db5 DN |
9789 | if test "$HAVE_XFT" != "yes"; then |
9790 | HAVE_XFT=no | |
9791 | fi | |
5929fbe7 GM |
9792 | |
9793 | ||
eb697db5 DN |
9794 | HAVE_FREETYPE=no |
9795 | ## We used to allow building with FreeType and without Xft. | |
9796 | ## However, the ftx font backend driver is not in good shape. | |
9797 | if test "${HAVE_XFT}" = "yes"; then | |
9798 | HAVE_FREETYPE=yes | |
9799 | FONTCONFIG_CFLAGS= | |
9800 | FONTCONFIG_LIBS= | |
9801 | fi | |
5929fbe7 | 9802 | |
eb697db5 DN |
9803 | HAVE_LIBOTF=no |
9804 | if test "${HAVE_FREETYPE}" = "yes"; then | |
5929fbe7 | 9805 | |
eb697db5 | 9806 | $as_echo "#define HAVE_FREETYPE 1" >>confdefs.h |
5929fbe7 | 9807 | |
eb697db5 | 9808 | if test "${with_libotf}" != "no"; then |
5929fbe7 | 9809 | |
eb697db5 | 9810 | succeeded=no |
5929fbe7 | 9811 | |
eb697db5 DN |
9812 | # Extract the first word of "pkg-config", so it can be a program name with args. |
9813 | set dummy pkg-config; ac_word=$2 | |
9814 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
9815 | $as_echo_n "checking for $ac_word... " >&6; } | |
9816 | if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : | |
a4f64981 GM |
9817 | $as_echo_n "(cached) " >&6 |
9818 | else | |
eb697db5 DN |
9819 | case $PKG_CONFIG in |
9820 | [\\/]* | ?:[\\/]*) | |
9821 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
9822 | ;; | |
9823 | *) | |
9824 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
9825 | for as_dir in $PATH | |
9826 | do | |
9827 | IFS=$as_save_IFS | |
9828 | test -z "$as_dir" && as_dir=. | |
9829 | for ac_exec_ext in '' $ac_executable_extensions; do | |
9830 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
9831 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
9832 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
9833 | break 2 | |
9834 | fi | |
9835 | done | |
9836 | done | |
9837 | IFS=$as_save_IFS | |
9838 | ||
9839 | test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" | |
9840 | ;; | |
5929fbe7 | 9841 | esac |
eb697db5 DN |
9842 | fi |
9843 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG | |
9844 | if test -n "$PKG_CONFIG"; then | |
9845 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
9846 | $as_echo "$PKG_CONFIG" >&6; } | |
5929fbe7 | 9847 | else |
eb697db5 DN |
9848 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
9849 | $as_echo "no" >&6; } | |
5929fbe7 GM |
9850 | fi |
9851 | ||
5929fbe7 | 9852 | |
91e84f96 | 9853 | |
eb697db5 DN |
9854 | if test "$PKG_CONFIG" = "no" ; then |
9855 | HAVE_LIBOTF=no | |
9856 | else | |
9857 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
9858 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
9859 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libotf" >&5 | |
9860 | $as_echo_n "checking for libotf... " >&6; } | |
91e84f96 | 9861 | |
eb697db5 DN |
9862 | if $PKG_CONFIG --exists "libotf" 2>&5; then |
9863 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
9864 | $as_echo "yes" >&6; } | |
9865 | succeeded=yes | |
91e84f96 | 9866 | |
eb697db5 DN |
9867 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBOTF_CFLAGS" >&5 |
9868 | $as_echo_n "checking LIBOTF_CFLAGS... " >&6; } | |
9869 | LIBOTF_CFLAGS=`$PKG_CONFIG --cflags "libotf"|sed -e 's,///*,/,g'` | |
9870 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBOTF_CFLAGS" >&5 | |
9871 | $as_echo "$LIBOTF_CFLAGS" >&6; } | |
8c5ff6dd | 9872 | |
eb697db5 DN |
9873 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBOTF_LIBS" >&5 |
9874 | $as_echo_n "checking LIBOTF_LIBS... " >&6; } | |
9875 | LIBOTF_LIBS=`$PKG_CONFIG --libs "libotf"|sed -e 's,///*,/,g'` | |
9876 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBOTF_LIBS" >&5 | |
9877 | $as_echo "$LIBOTF_LIBS" >&6; } | |
9878 | else | |
9879 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
9880 | $as_echo "no" >&6; } | |
9881 | LIBOTF_CFLAGS="" | |
9882 | LIBOTF_LIBS="" | |
9883 | ## If we have a custom action on failure, don't print errors, but | |
9884 | ## do set a variable so people can do so. | |
9885 | LIBOTF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libotf"` | |
5929fbe7 | 9886 | |
eb697db5 | 9887 | fi |
15e12598 | 9888 | |
15e12598 VB |
9889 | |
9890 | ||
eb697db5 DN |
9891 | else |
9892 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
9893 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
9894 | fi | |
9895 | fi | |
8c5ff6dd | 9896 | |
eb697db5 DN |
9897 | if test $succeeded = yes; then |
9898 | HAVE_LIBOTF=yes | |
9899 | else | |
9900 | HAVE_LIBOTF=no | |
9901 | fi | |
5929fbe7 | 9902 | |
eb697db5 | 9903 | if test "$HAVE_LIBOTF" = "yes"; then |
5929fbe7 | 9904 | |
eb697db5 | 9905 | $as_echo "#define HAVE_LIBOTF 1" >>confdefs.h |
5929fbe7 | 9906 | |
eb697db5 DN |
9907 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTF_get_variation_glyphs in -lotf" >&5 |
9908 | $as_echo_n "checking for OTF_get_variation_glyphs in -lotf... " >&6; } | |
9909 | if test "${ac_cv_lib_otf_OTF_get_variation_glyphs+set}" = set; then : | |
9910 | $as_echo_n "(cached) " >&6 | |
9911 | else | |
9912 | ac_check_lib_save_LIBS=$LIBS | |
9913 | LIBS="-lotf $LIBS" | |
9914 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9915 | /* end confdefs.h. */ | |
91e84f96 GM |
9916 | |
9917 | /* Override any GCC internal prototype to avoid an error. | |
9918 | Use char because int might match the return type of a GCC | |
9919 | builtin and then its argument prototype would still apply. */ | |
9920 | #ifdef __cplusplus | |
9921 | extern "C" | |
9922 | #endif | |
eb697db5 | 9923 | char OTF_get_variation_glyphs (); |
91e84f96 | 9924 | int |
49ebbd65 DN |
9925 | main () |
9926 | { | |
eb697db5 | 9927 | return OTF_get_variation_glyphs (); |
49ebbd65 DN |
9928 | ; |
9929 | return 0; | |
9930 | } | |
15e12598 | 9931 | _ACEOF |
eb697db5 DN |
9932 | if ac_fn_c_try_link "$LINENO"; then : |
9933 | ac_cv_lib_otf_OTF_get_variation_glyphs=yes | |
a4f64981 | 9934 | else |
eb697db5 | 9935 | ac_cv_lib_otf_OTF_get_variation_glyphs=no |
8c5ff6dd | 9936 | fi |
eb697db5 DN |
9937 | rm -f core conftest.err conftest.$ac_objext \ |
9938 | conftest$ac_exeext conftest.$ac_ext | |
9939 | LIBS=$ac_check_lib_save_LIBS | |
5929fbe7 | 9940 | fi |
eb697db5 DN |
9941 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_otf_OTF_get_variation_glyphs" >&5 |
9942 | $as_echo "$ac_cv_lib_otf_OTF_get_variation_glyphs" >&6; } | |
9943 | if test "x$ac_cv_lib_otf_OTF_get_variation_glyphs" = x""yes; then : | |
9944 | HAVE_OTF_GET_VARIATION_GLYPHS=yes | |
5929fbe7 | 9945 | else |
eb697db5 | 9946 | HAVE_OTF_GET_VARIATION_GLYPHS=no |
5929fbe7 | 9947 | fi |
8c5ff6dd | 9948 | |
eb697db5 | 9949 | if test "${HAVE_OTF_GET_VARIATION_GLYPHS}" = "yes"; then |
5929fbe7 | 9950 | |
eb697db5 | 9951 | $as_echo "#define HAVE_OTF_GET_VARIATION_GLYPHS 1" >>confdefs.h |
a4f64981 | 9952 | |
eb697db5 DN |
9953 | fi |
9954 | fi | |
9955 | fi | |
9956 | fi | |
a4f64981 | 9957 | |
eb697db5 DN |
9958 | HAVE_M17N_FLT=no |
9959 | if test "${HAVE_LIBOTF}" = yes; then | |
9960 | if test "${with_m17n_flt}" != "no"; then | |
a4f64981 | 9961 | |
eb697db5 | 9962 | succeeded=no |
a4f64981 | 9963 | |
eb697db5 DN |
9964 | # Extract the first word of "pkg-config", so it can be a program name with args. |
9965 | set dummy pkg-config; ac_word=$2 | |
9966 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
9967 | $as_echo_n "checking for $ac_word... " >&6; } | |
9968 | if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : | |
5929fbe7 GM |
9969 | $as_echo_n "(cached) " >&6 |
9970 | else | |
eb697db5 DN |
9971 | case $PKG_CONFIG in |
9972 | [\\/]* | ?:[\\/]*) | |
9973 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
9974 | ;; | |
9975 | *) | |
9976 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
9977 | for as_dir in $PATH | |
9978 | do | |
9979 | IFS=$as_save_IFS | |
9980 | test -z "$as_dir" && as_dir=. | |
9981 | for ac_exec_ext in '' $ac_executable_extensions; do | |
9982 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
9983 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
9984 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
9985 | break 2 | |
9986 | fi | |
9987 | done | |
9988 | done | |
9989 | IFS=$as_save_IFS | |
5929fbe7 | 9990 | |
eb697db5 DN |
9991 | test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" |
9992 | ;; | |
5929fbe7 | 9993 | esac |
5929fbe7 | 9994 | fi |
eb697db5 DN |
9995 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG |
9996 | if test -n "$PKG_CONFIG"; then | |
9997 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
9998 | $as_echo "$PKG_CONFIG" >&6; } | |
5929fbe7 | 9999 | else |
eb697db5 DN |
10000 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
10001 | $as_echo "no" >&6; } | |
8c5ff6dd KR |
10002 | fi |
10003 | ||
5929fbe7 | 10004 | |
5929fbe7 | 10005 | |
eb697db5 DN |
10006 | if test "$PKG_CONFIG" = "no" ; then |
10007 | HAVE_M17N_FLT=no | |
10008 | else | |
10009 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
10010 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
10011 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for m17n-flt" >&5 | |
10012 | $as_echo_n "checking for m17n-flt... " >&6; } | |
10013 | ||
10014 | if $PKG_CONFIG --exists "m17n-flt" 2>&5; then | |
10015 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
10016 | $as_echo "yes" >&6; } | |
10017 | succeeded=yes | |
10018 | ||
10019 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking M17N_FLT_CFLAGS" >&5 | |
10020 | $as_echo_n "checking M17N_FLT_CFLAGS... " >&6; } | |
10021 | M17N_FLT_CFLAGS=`$PKG_CONFIG --cflags "m17n-flt"|sed -e 's,///*,/,g'` | |
10022 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $M17N_FLT_CFLAGS" >&5 | |
10023 | $as_echo "$M17N_FLT_CFLAGS" >&6; } | |
10024 | ||
10025 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking M17N_FLT_LIBS" >&5 | |
10026 | $as_echo_n "checking M17N_FLT_LIBS... " >&6; } | |
10027 | M17N_FLT_LIBS=`$PKG_CONFIG --libs "m17n-flt"|sed -e 's,///*,/,g'` | |
10028 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $M17N_FLT_LIBS" >&5 | |
10029 | $as_echo "$M17N_FLT_LIBS" >&6; } | |
10030 | else | |
10031 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
10032 | $as_echo "no" >&6; } | |
10033 | M17N_FLT_CFLAGS="" | |
10034 | M17N_FLT_LIBS="" | |
10035 | ## If we have a custom action on failure, don't print errors, but | |
10036 | ## do set a variable so people can do so. | |
10037 | M17N_FLT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "m17n-flt"` | |
10038 | ||
10039 | fi | |
10040 | ||
5929fbe7 | 10041 | |
15e12598 | 10042 | |
eb697db5 DN |
10043 | else |
10044 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
10045 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
10046 | fi | |
10047 | fi | |
15e12598 | 10048 | |
eb697db5 DN |
10049 | if test $succeeded = yes; then |
10050 | HAVE_M17N_FLT=yes | |
10051 | else | |
10052 | HAVE_M17N_FLT=no | |
5929fbe7 | 10053 | fi |
15e12598 | 10054 | |
eb697db5 | 10055 | if test "$HAVE_M17N_FLT" = "yes"; then |
5929fbe7 | 10056 | |
eb697db5 | 10057 | $as_echo "#define HAVE_M17N_FLT 1" >>confdefs.h |
5929fbe7 | 10058 | |
eb697db5 DN |
10059 | fi |
10060 | fi | |
10061 | fi | |
10062 | else | |
10063 | HAVE_XFT=no | |
10064 | HAVE_FREETYPE=no | |
10065 | HAVE_LIBOTF=no | |
10066 | HAVE_M17N_FLT=no | |
10067 | fi | |
5929fbe7 | 10068 | |
eb697db5 | 10069 | ### End of font-backend (under X11) section. |
5929fbe7 | 10070 | |
5929fbe7 | 10071 | |
5929fbe7 GM |
10072 | |
10073 | ||
10074 | ||
5929fbe7 | 10075 | |
5929fbe7 GM |
10076 | |
10077 | ||
10078 | ||
10079 | ||
eb697db5 DN |
10080 | ### Use -lXpm if available, unless `--with-xpm=no'. |
10081 | HAVE_XPM=no | |
10082 | LIBXPM= | |
10083 | if test "${HAVE_X11}" = "yes"; then | |
10084 | if test "${with_xpm}" != "no"; then | |
10085 | ac_fn_c_check_header_mongrel "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "$ac_includes_default" | |
10086 | if test "x$ac_cv_header_X11_xpm_h" = x""yes; then : | |
10087 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReadFileToPixmap in -lXpm" >&5 | |
10088 | $as_echo_n "checking for XpmReadFileToPixmap in -lXpm... " >&6; } | |
10089 | if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then : | |
8c5ff6dd KR |
10090 | $as_echo_n "(cached) " >&6 |
10091 | else | |
eb697db5 DN |
10092 | ac_check_lib_save_LIBS=$LIBS |
10093 | LIBS="-lXpm -lX11 $LIBS" | |
10094 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8c5ff6dd | 10095 | /* end confdefs.h. */ |
eb697db5 DN |
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 XpmReadFileToPixmap (); | |
7186fb09 GM |
10104 | int |
10105 | main () | |
10106 | { | |
eb697db5 | 10107 | return XpmReadFileToPixmap (); |
a4f64981 GM |
10108 | ; |
10109 | return 0; | |
7186fb09 | 10110 | } |
0c309b80 | 10111 | _ACEOF |
eb697db5 DN |
10112 | if ac_fn_c_try_link "$LINENO"; then : |
10113 | ac_cv_lib_Xpm_XpmReadFileToPixmap=yes | |
aaa36002 | 10114 | else |
eb697db5 DN |
10115 | ac_cv_lib_Xpm_XpmReadFileToPixmap=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_Xpm_XpmReadFileToPixmap" >&5 | |
10122 | $as_echo "$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6; } | |
10123 | if test "x$ac_cv_lib_Xpm_XpmReadFileToPixmap" = x""yes; then : | |
10124 | HAVE_XPM=yes | |
10125 | fi | |
5929fbe7 | 10126 | |
8c5ff6dd | 10127 | fi |
5929fbe7 | 10128 | |
5929fbe7 | 10129 | |
eb697db5 DN |
10130 | if test "${HAVE_XPM}" = "yes"; then |
10131 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReturnAllocPixels preprocessor define" >&5 | |
10132 | $as_echo_n "checking for XpmReturnAllocPixels preprocessor define... " >&6; } | |
10133 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10134 | /* end confdefs.h. */ | |
10135 | #include "X11/xpm.h" | |
10136 | #ifndef XpmReturnAllocPixels | |
10137 | no_return_alloc_pixels | |
10138 | #endif | |
8c5ff6dd | 10139 | |
5929fbe7 | 10140 | _ACEOF |
eb697db5 DN |
10141 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
10142 | $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then : | |
10143 | HAVE_XPM=no | |
10144 | else | |
10145 | HAVE_XPM=yes | |
15e12598 | 10146 | fi |
eb697db5 | 10147 | rm -f conftest* |
8c5ff6dd | 10148 | |
5929fbe7 | 10149 | |
eb697db5 DN |
10150 | if test "${HAVE_XPM}" = "yes"; then |
10151 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
10152 | $as_echo "yes" >&6; } | |
10153 | else | |
10154 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
10155 | $as_echo "no" >&6; } | |
10156 | fi | |
10157 | fi | |
10158 | fi | |
5929fbe7 | 10159 | |
eb697db5 | 10160 | if test "${HAVE_XPM}" = "yes"; then |
5929fbe7 | 10161 | |
eb697db5 | 10162 | $as_echo "#define HAVE_XPM 1" >>confdefs.h |
5929fbe7 | 10163 | |
eb697db5 DN |
10164 | LIBXPM=-lXpm |
10165 | fi | |
10166 | fi | |
5929fbe7 | 10167 | |
eb697db5 DN |
10168 | |
10169 | ### Use -ljpeg if available, unless `--with-jpeg=no'. | |
10170 | HAVE_JPEG=no | |
10171 | LIBJPEG= | |
10172 | if test "${HAVE_X11}" = "yes"; then | |
10173 | if test "${with_jpeg}" != "no"; then | |
10174 | ac_fn_c_check_header_mongrel "$LINENO" "jerror.h" "ac_cv_header_jerror_h" "$ac_includes_default" | |
10175 | if test "x$ac_cv_header_jerror_h" = x""yes; then : | |
10176 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_destroy_compress in -ljpeg" >&5 | |
10177 | $as_echo_n "checking for jpeg_destroy_compress in -ljpeg... " >&6; } | |
10178 | if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then : | |
10179 | $as_echo_n "(cached) " >&6 | |
10180 | else | |
10181 | ac_check_lib_save_LIBS=$LIBS | |
10182 | LIBS="-ljpeg $LIBS" | |
10183 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10184 | /* end confdefs.h. */ | |
5929fbe7 GM |
10185 | |
10186 | /* Override any GCC internal prototype to avoid an error. | |
10187 | Use char because int might match the return type of a GCC | |
10188 | builtin and then its argument prototype would still apply. */ | |
10189 | #ifdef __cplusplus | |
10190 | extern "C" | |
10191 | #endif | |
eb697db5 | 10192 | char jpeg_destroy_compress (); |
08b47d3d JD |
10193 | int |
10194 | main () | |
10195 | { | |
eb697db5 | 10196 | return jpeg_destroy_compress (); |
08b47d3d JD |
10197 | ; |
10198 | return 0; | |
10199 | } | |
7186fb09 | 10200 | _ACEOF |
eb697db5 DN |
10201 | if ac_fn_c_try_link "$LINENO"; then : |
10202 | ac_cv_lib_jpeg_jpeg_destroy_compress=yes | |
cd03c74a | 10203 | else |
eb697db5 DN |
10204 | ac_cv_lib_jpeg_jpeg_destroy_compress=no |
10205 | fi | |
10206 | rm -f core conftest.err conftest.$ac_objext \ | |
10207 | conftest$ac_exeext conftest.$ac_ext | |
10208 | LIBS=$ac_check_lib_save_LIBS | |
10209 | fi | |
10210 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5 | |
10211 | $as_echo "$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6; } | |
10212 | if test "x$ac_cv_lib_jpeg_jpeg_destroy_compress" = x""yes; then : | |
10213 | HAVE_JPEG=yes | |
10214 | fi | |
10215 | ||
10216 | fi | |
10217 | ||
10218 | ||
10219 | fi | |
10220 | ||
10221 | if test "${HAVE_JPEG}" = "yes"; then | |
10222 | $as_echo "#define HAVE_JPEG 1" >>confdefs.h | |
10223 | ||
10224 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10225 | /* end confdefs.h. */ | |
10226 | #include <jpeglib.h> | |
10227 | version=JPEG_LIB_VERSION | |
10228 | ||
10229 | _ACEOF | |
10230 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
10231 | $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then : | |
10232 | $as_echo "#define HAVE_JPEG 1" >>confdefs.h | |
8c5ff6dd | 10233 | |
eb697db5 DN |
10234 | else |
10235 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libjpeg found, but not version 6b or later" >&5 | |
10236 | $as_echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;} | |
10237 | HAVE_JPEG=no | |
5929fbe7 | 10238 | fi |
eb697db5 | 10239 | rm -f conftest* |
8c5ff6dd | 10240 | |
eb697db5 DN |
10241 | fi |
10242 | if test "${HAVE_JPEG}" = "yes"; then | |
10243 | LIBJPEG=-ljpeg | |
10244 | fi | |
5929fbe7 | 10245 | fi |
eb697db5 DN |
10246 | |
10247 | ||
10248 | ### Use -lpng if available, unless `--with-png=no'. | |
10249 | HAVE_PNG=no | |
10250 | LIBPNG= | |
10251 | if test "${HAVE_X11}" = "yes"; then | |
10252 | if test "${with_png}" != "no"; then | |
10253 | # Debian unstable as of July 2003 has multiple libpngs, and puts png.h | |
10254 | # in /usr/include/libpng. | |
10255 | for ac_header in png.h libpng/png.h | |
10256 | do : | |
10257 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
10258 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
3d608a86 J |
10259 | eval as_val=\$$as_ac_Header |
10260 | if test "x$as_val" = x""yes; then : | |
5929fbe7 | 10261 | cat >>confdefs.h <<_ACEOF |
eb697db5 | 10262 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
5929fbe7 | 10263 | _ACEOF |
8c5ff6dd | 10264 | |
eb697db5 DN |
10265 | fi |
10266 | ||
10267 | done | |
10268 | ||
10269 | if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then | |
10270 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_get_channels in -lpng" >&5 | |
10271 | $as_echo_n "checking for png_get_channels in -lpng... " >&6; } | |
10272 | if test "${ac_cv_lib_png_png_get_channels+set}" = set; then : | |
a5edbe4a GM |
10273 | $as_echo_n "(cached) " >&6 |
10274 | else | |
5929fbe7 | 10275 | ac_check_lib_save_LIBS=$LIBS |
eb697db5 DN |
10276 | LIBS="-lpng -lz -lm $LIBS" |
10277 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8c5ff6dd | 10278 | /* end confdefs.h. */ |
8c5ff6dd | 10279 | |
5929fbe7 GM |
10280 | /* Override any GCC internal prototype to avoid an error. |
10281 | Use char because int might match the return type of a GCC | |
10282 | builtin and then its argument prototype would still apply. */ | |
10283 | #ifdef __cplusplus | |
10284 | extern "C" | |
10285 | #endif | |
eb697db5 | 10286 | char png_get_channels (); |
5929fbe7 GM |
10287 | int |
10288 | main () | |
10289 | { | |
eb697db5 | 10290 | return png_get_channels (); |
5929fbe7 GM |
10291 | ; |
10292 | return 0; | |
10293 | } | |
8c5ff6dd | 10294 | _ACEOF |
eb697db5 DN |
10295 | if ac_fn_c_try_link "$LINENO"; then : |
10296 | ac_cv_lib_png_png_get_channels=yes | |
8c5ff6dd | 10297 | else |
eb697db5 DN |
10298 | ac_cv_lib_png_png_get_channels=no |
10299 | fi | |
10300 | rm -f core conftest.err conftest.$ac_objext \ | |
10301 | conftest$ac_exeext conftest.$ac_ext | |
10302 | LIBS=$ac_check_lib_save_LIBS | |
10303 | fi | |
10304 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_png_png_get_channels" >&5 | |
10305 | $as_echo "$ac_cv_lib_png_png_get_channels" >&6; } | |
10306 | if test "x$ac_cv_lib_png_png_get_channels" = x""yes; then : | |
10307 | HAVE_PNG=yes | |
8c5ff6dd | 10308 | fi |
5929fbe7 | 10309 | |
eb697db5 DN |
10310 | fi |
10311 | fi | |
10312 | ||
10313 | if test "${HAVE_PNG}" = "yes"; then | |
8c5ff6dd | 10314 | |
eb697db5 | 10315 | $as_echo "#define HAVE_PNG 1" >>confdefs.h |
8c5ff6dd | 10316 | |
eb697db5 DN |
10317 | LIBPNG="-lpng -lz -lm" |
10318 | fi | |
8c5ff6dd KR |
10319 | fi |
10320 | ||
5929fbe7 | 10321 | |
eb697db5 DN |
10322 | ### Use -ltiff if available, unless `--with-tiff=no'. |
10323 | HAVE_TIFF=no | |
10324 | LIBTIFF= | |
10325 | if test "${HAVE_X11}" = "yes"; then | |
10326 | if test "${with_tiff}" != "no"; then | |
10327 | ac_fn_c_check_header_mongrel "$LINENO" "tiffio.h" "ac_cv_header_tiffio_h" "$ac_includes_default" | |
10328 | if test "x$ac_cv_header_tiffio_h" = x""yes; then : | |
10329 | tifflibs="-lz -lm" | |
10330 | # At least one tiff package requires the jpeg library. | |
10331 | if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi | |
10332 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIFFGetVersion in -ltiff" >&5 | |
10333 | $as_echo_n "checking for TIFFGetVersion in -ltiff... " >&6; } | |
10334 | if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then : | |
8c5ff6dd KR |
10335 | $as_echo_n "(cached) " >&6 |
10336 | else | |
eb697db5 DN |
10337 | ac_check_lib_save_LIBS=$LIBS |
10338 | LIBS="-ltiff $tifflibs $LIBS" | |
10339 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
a5edbe4a | 10340 | /* end confdefs.h. */ |
5929fbe7 GM |
10341 | |
10342 | /* Override any GCC internal prototype to avoid an error. | |
10343 | Use char because int might match the return type of a GCC | |
10344 | builtin and then its argument prototype would still apply. */ | |
10345 | #ifdef __cplusplus | |
10346 | extern "C" | |
10347 | #endif | |
eb697db5 | 10348 | char TIFFGetVersion (); |
a5edbe4a GM |
10349 | int |
10350 | main () | |
10351 | { | |
eb697db5 | 10352 | return TIFFGetVersion (); |
5929fbe7 GM |
10353 | ; |
10354 | return 0; | |
a5edbe4a | 10355 | } |
08b47d3d | 10356 | _ACEOF |
eb697db5 DN |
10357 | if ac_fn_c_try_link "$LINENO"; then : |
10358 | ac_cv_lib_tiff_TIFFGetVersion=yes | |
49ebbd65 | 10359 | else |
eb697db5 | 10360 | ac_cv_lib_tiff_TIFFGetVersion=no |
8c5ff6dd | 10361 | fi |
eb697db5 DN |
10362 | rm -f core conftest.err conftest.$ac_objext \ |
10363 | conftest$ac_exeext conftest.$ac_ext | |
10364 | LIBS=$ac_check_lib_save_LIBS | |
10365 | fi | |
10366 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5 | |
10367 | $as_echo "$ac_cv_lib_tiff_TIFFGetVersion" >&6; } | |
10368 | if test "x$ac_cv_lib_tiff_TIFFGetVersion" = x""yes; then : | |
10369 | HAVE_TIFF=yes | |
49ebbd65 | 10370 | fi |
8c5ff6dd | 10371 | |
49ebbd65 | 10372 | fi |
8c5ff6dd KR |
10373 | |
10374 | ||
eb697db5 | 10375 | fi |
8c5ff6dd | 10376 | |
eb697db5 | 10377 | if test "${HAVE_TIFF}" = "yes"; then |
5929fbe7 | 10378 | |
eb697db5 DN |
10379 | $as_echo "#define HAVE_TIFF 1" >>confdefs.h |
10380 | ||
10381 | LIBTIFF=-ltiff | |
10382 | fi | |
10383 | fi | |
5929fbe7 | 10384 | |
5929fbe7 | 10385 | |
eb697db5 DN |
10386 | ### Use -lgif or -lungif if available, unless `--with-gif=no'. |
10387 | HAVE_GIF=no | |
10388 | LIBGIF= | |
10389 | if test "${HAVE_X11}" = "yes" && test "${with_gif}" != "no"; then | |
10390 | ac_fn_c_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default" | |
10391 | if test "x$ac_cv_header_gif_lib_h" = x""yes; then : | |
10392 | # EGifPutExtensionLast only exists from version libungif-4.1.0b1. | |
10393 | # Earlier versions can crash Emacs. | |
10394 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lgif" >&5 | |
10395 | $as_echo_n "checking for EGifPutExtensionLast in -lgif... " >&6; } | |
10396 | if test "${ac_cv_lib_gif_EGifPutExtensionLast+set}" = set; then : | |
10397 | $as_echo_n "(cached) " >&6 | |
10398 | else | |
10399 | ac_check_lib_save_LIBS=$LIBS | |
10400 | LIBS="-lgif $LIBS" | |
10401 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10402 | /* end confdefs.h. */ | |
cd03c74a | 10403 | |
e6df49e4 GM |
10404 | /* Override any GCC internal prototype to avoid an error. |
10405 | Use char because int might match the return type of a GCC | |
10406 | builtin and then its argument prototype would still apply. */ | |
10407 | #ifdef __cplusplus | |
10408 | extern "C" | |
10409 | #endif | |
eb697db5 | 10410 | char EGifPutExtensionLast (); |
e6df49e4 GM |
10411 | int |
10412 | main () | |
10413 | { | |
eb697db5 | 10414 | return EGifPutExtensionLast (); |
e6df49e4 GM |
10415 | ; |
10416 | return 0; | |
10417 | } | |
a5edbe4a | 10418 | _ACEOF |
eb697db5 DN |
10419 | if ac_fn_c_try_link "$LINENO"; then : |
10420 | ac_cv_lib_gif_EGifPutExtensionLast=yes | |
15e12598 | 10421 | else |
eb697db5 | 10422 | ac_cv_lib_gif_EGifPutExtensionLast=no |
15e12598 | 10423 | fi |
eb697db5 DN |
10424 | rm -f core conftest.err conftest.$ac_objext \ |
10425 | conftest$ac_exeext conftest.$ac_ext | |
10426 | LIBS=$ac_check_lib_save_LIBS | |
10427 | fi | |
10428 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_EGifPutExtensionLast" >&5 | |
10429 | $as_echo "$ac_cv_lib_gif_EGifPutExtensionLast" >&6; } | |
10430 | if test "x$ac_cv_lib_gif_EGifPutExtensionLast" = x""yes; then : | |
10431 | HAVE_GIF=yes | |
10432 | else | |
10433 | HAVE_GIF=maybe | |
15e12598 | 10434 | fi |
15e12598 | 10435 | |
8c5ff6dd | 10436 | fi |
49ebbd65 | 10437 | |
49ebbd65 | 10438 | |
eb697db5 DN |
10439 | |
10440 | if test "$HAVE_GIF" = yes; then | |
10441 | LIBGIF=-lgif | |
10442 | elif test "$HAVE_GIF" = maybe; then | |
10443 | # If gif_lib.h but no libgif, try libungif. | |
10444 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lungif" >&5 | |
10445 | $as_echo_n "checking for EGifPutExtensionLast in -lungif... " >&6; } | |
10446 | if test "${ac_cv_lib_ungif_EGifPutExtensionLast+set}" = set; then : | |
8c5ff6dd KR |
10447 | $as_echo_n "(cached) " >&6 |
10448 | else | |
eb697db5 DN |
10449 | ac_check_lib_save_LIBS=$LIBS |
10450 | LIBS="-lungif $LIBS" | |
10451 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8c5ff6dd | 10452 | /* end confdefs.h. */ |
15e12598 | 10453 | |
a4f64981 GM |
10454 | /* Override any GCC internal prototype to avoid an error. |
10455 | Use char because int might match the return type of a GCC | |
10456 | builtin and then its argument prototype would still apply. */ | |
10457 | #ifdef __cplusplus | |
10458 | extern "C" | |
10459 | #endif | |
eb697db5 | 10460 | char EGifPutExtensionLast (); |
a4f64981 GM |
10461 | int |
10462 | main () | |
10463 | { | |
eb697db5 | 10464 | return EGifPutExtensionLast (); |
a4f64981 GM |
10465 | ; |
10466 | return 0; | |
10467 | } | |
e6df49e4 | 10468 | _ACEOF |
eb697db5 DN |
10469 | if ac_fn_c_try_link "$LINENO"; then : |
10470 | ac_cv_lib_ungif_EGifPutExtensionLast=yes | |
a4f64981 | 10471 | else |
eb697db5 | 10472 | ac_cv_lib_ungif_EGifPutExtensionLast=no |
e6df49e4 | 10473 | fi |
eb697db5 DN |
10474 | rm -f core conftest.err conftest.$ac_objext \ |
10475 | conftest$ac_exeext conftest.$ac_ext | |
10476 | LIBS=$ac_check_lib_save_LIBS | |
a4f64981 | 10477 | fi |
eb697db5 DN |
10478 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5 |
10479 | $as_echo "$ac_cv_lib_ungif_EGifPutExtensionLast" >&6; } | |
10480 | if test "x$ac_cv_lib_ungif_EGifPutExtensionLast" = x""yes; then : | |
10481 | HAVE_GIF=yes | |
e6df49e4 | 10482 | else |
eb697db5 | 10483 | HAVE_GIF=no |
5929fbe7 | 10484 | fi |
8c5ff6dd | 10485 | |
eb697db5 DN |
10486 | test "$HAVE_GIF" = yes && LIBGIF=-lungif |
10487 | fi | |
5929fbe7 | 10488 | |
eb697db5 | 10489 | if test "${HAVE_GIF}" = "yes"; then |
5929fbe7 | 10490 | |
eb697db5 | 10491 | $as_echo "#define HAVE_GIF 1" >>confdefs.h |
5929fbe7 | 10492 | |
eb697db5 DN |
10493 | fi |
10494 | fi | |
5929fbe7 | 10495 | |
5929fbe7 | 10496 | |
eb697db5 DN |
10497 | if test "${HAVE_X11}" = "yes"; then |
10498 | MISSING="" | |
10499 | WITH_NO="" | |
10500 | test "${with_xpm}" != "no" && test "${HAVE_XPM}" != "yes" && | |
10501 | MISSING="libXpm" && WITH_NO="--with-xpm=no" | |
10502 | test "${with_jpeg}" != "no" && test "${HAVE_JPEG}" != "yes" && | |
10503 | MISSING="$MISSING libjpeg" && WITH_NO="$WITH_NO --with-jpeg=no" | |
10504 | test "${with_png}" != "no" && test "${HAVE_PNG}" != "yes" && | |
10505 | MISSING="$MISSING libpng" && WITH_NO="$WITH_NO --with-png=no" | |
10506 | test "${with_gif}" != "no" && test "${HAVE_GIF}" != "yes" && | |
10507 | MISSING="$MISSING libgif/libungif" && WITH_NO="$WITH_NO --with-gif=no" | |
10508 | test "${with_tiff}" != "no" && test "${HAVE_TIFF}" != "yes" && | |
10509 | MISSING="$MISSING libtiff" && WITH_NO="$WITH_NO --with-tiff=no" | |
10510 | ||
10511 | if test "X${MISSING}" != X; then | |
3d608a86 | 10512 | as_fn_error "The following required libraries were not found: |
eb697db5 DN |
10513 | $MISSING |
10514 | Maybe some development libraries/packages are missing? | |
10515 | If you don't want to link with them give | |
10516 | $WITH_NO | |
10517 | as options to configure" "$LINENO" 5 | |
10518 | fi | |
10519 | fi | |
5929fbe7 | 10520 | |
eb697db5 DN |
10521 | ### Use -lgpm if available, unless `--with-gpm=no'. |
10522 | HAVE_GPM=no | |
10523 | LIBGPM= | |
10524 | MOUSE_SUPPORT= | |
10525 | if test "${with_gpm}" != "no"; then | |
10526 | ac_fn_c_check_header_mongrel "$LINENO" "gpm.h" "ac_cv_header_gpm_h" "$ac_includes_default" | |
10527 | if test "x$ac_cv_header_gpm_h" = x""yes; then : | |
10528 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Gpm_Open in -lgpm" >&5 | |
10529 | $as_echo_n "checking for Gpm_Open in -lgpm... " >&6; } | |
10530 | if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then : | |
a4f64981 | 10531 | $as_echo_n "(cached) " >&6 |
15e12598 | 10532 | else |
eb697db5 DN |
10533 | ac_check_lib_save_LIBS=$LIBS |
10534 | LIBS="-lgpm $LIBS" | |
10535 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
e6df49e4 | 10536 | /* end confdefs.h. */ |
eb697db5 DN |
10537 | |
10538 | /* Override any GCC internal prototype to avoid an error. | |
10539 | Use char because int might match the return type of a GCC | |
10540 | builtin and then its argument prototype would still apply. */ | |
10541 | #ifdef __cplusplus | |
10542 | extern "C" | |
10543 | #endif | |
10544 | char Gpm_Open (); | |
a4f64981 GM |
10545 | int |
10546 | main () | |
15e12598 | 10547 | { |
eb697db5 | 10548 | return Gpm_Open (); |
a4f64981 GM |
10549 | ; |
10550 | return 0; | |
15e12598 | 10551 | } |
a4f64981 | 10552 | _ACEOF |
eb697db5 DN |
10553 | if ac_fn_c_try_link "$LINENO"; then : |
10554 | ac_cv_lib_gpm_Gpm_Open=yes | |
a4f64981 | 10555 | else |
eb697db5 DN |
10556 | ac_cv_lib_gpm_Gpm_Open=no |
10557 | fi | |
10558 | rm -f core conftest.err conftest.$ac_objext \ | |
10559 | conftest$ac_exeext conftest.$ac_ext | |
10560 | LIBS=$ac_check_lib_save_LIBS | |
10561 | fi | |
10562 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gpm_Gpm_Open" >&5 | |
10563 | $as_echo "$ac_cv_lib_gpm_Gpm_Open" >&6; } | |
10564 | if test "x$ac_cv_lib_gpm_Gpm_Open" = x""yes; then : | |
10565 | HAVE_GPM=yes | |
10566 | fi | |
5929fbe7 | 10567 | |
a4f64981 | 10568 | fi |
5929fbe7 | 10569 | |
eb697db5 DN |
10570 | |
10571 | ||
10572 | if test "${HAVE_GPM}" = "yes"; then | |
10573 | ||
10574 | $as_echo "#define HAVE_GPM 1" >>confdefs.h | |
10575 | ||
10576 | LIBGPM=-lgpm | |
10577 | ## May be reset below. | |
10578 | MOUSE_SUPPORT="\$(GPM_MOUSE_SUPPORT)" | |
10579 | fi | |
a4f64981 | 10580 | fi |
15e12598 | 10581 | |
8c5ff6dd | 10582 | |
eb697db5 DN |
10583 | ac_fn_c_check_header_mongrel "$LINENO" "malloc/malloc.h" "ac_cv_header_malloc_malloc_h" "$ac_includes_default" |
10584 | if test "x$ac_cv_header_malloc_malloc_h" = x""yes; then : | |
8c5ff6dd | 10585 | |
eb697db5 | 10586 | $as_echo "#define HAVE_MALLOC_MALLOC_H 1" >>confdefs.h |
8c5ff6dd | 10587 | |
eb697db5 | 10588 | fi |
298b8a34 | 10589 | |
15e12598 | 10590 | |
15e12598 | 10591 | |
eb697db5 DN |
10592 | C_SWITCH_X_SYSTEM= |
10593 | ### Use NeXTstep API to implement GUI. | |
10594 | if test "${HAVE_NS}" = "yes"; then | |
8c5ff6dd | 10595 | |
eb697db5 | 10596 | $as_echo "#define HAVE_NS 1" >>confdefs.h |
8c5ff6dd | 10597 | |
eb697db5 | 10598 | if test "${NS_IMPL_COCOA}" = "yes"; then |
5929fbe7 | 10599 | |
eb697db5 | 10600 | $as_echo "#define NS_IMPL_COCOA 1" >>confdefs.h |
8c5ff6dd | 10601 | |
eb697db5 DN |
10602 | GNU_OBJC_CFLAGS= |
10603 | fi | |
10604 | if test "${NS_IMPL_GNUSTEP}" = "yes"; then | |
8c5ff6dd | 10605 | |
eb697db5 | 10606 | $as_echo "#define NS_IMPL_GNUSTEP 1" >>confdefs.h |
8c5ff6dd | 10607 | |
eb697db5 DN |
10608 | # See also .m.o rule in Makefile.in */ |
10609 | # FIXME: are all these flags really needed? Document here why. */ | |
10610 | C_SWITCH_X_SYSTEM="-D_REENTRANT -fPIC -fno-strict-aliasing" | |
10611 | GNU_OBJC_CFLAGS="-fgnu-runtime -Wno-import -fconstant-string-class=NSConstantString -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGSWARN -DGSDIAGNOSE" | |
10612 | fi | |
10613 | if test "${NS_HAVE_NSINTEGER}" = "yes"; then | |
8c5ff6dd | 10614 | |
eb697db5 | 10615 | $as_echo "#define NS_HAVE_NSINTEGER 1" >>confdefs.h |
8c5ff6dd | 10616 | |
eb697db5 DN |
10617 | fi |
10618 | # We also have mouse menus. | |
10619 | HAVE_MENUS=yes | |
10620 | OTHER_FILES=ns-app | |
10621 | fi | |
8c5ff6dd | 10622 | |
8c5ff6dd | 10623 | |
eb697db5 DN |
10624 | ### Use session management (-lSM -lICE) if available |
10625 | HAVE_X_SM=no | |
10626 | LIBXSM= | |
10627 | if test "${HAVE_X11}" = "yes"; then | |
10628 | ac_fn_c_check_header_mongrel "$LINENO" "X11/SM/SMlib.h" "ac_cv_header_X11_SM_SMlib_h" "$ac_includes_default" | |
10629 | if test "x$ac_cv_header_X11_SM_SMlib_h" = x""yes; then : | |
10630 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SmcOpenConnection in -lSM" >&5 | |
10631 | $as_echo_n "checking for SmcOpenConnection in -lSM... " >&6; } | |
10632 | if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then : | |
10633 | $as_echo_n "(cached) " >&6 | |
10634 | else | |
10635 | ac_check_lib_save_LIBS=$LIBS | |
10636 | LIBS="-lSM -lICE $LIBS" | |
10637 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5929fbe7 | 10638 | /* end confdefs.h. */ |
eb697db5 DN |
10639 | |
10640 | /* Override any GCC internal prototype to avoid an error. | |
10641 | Use char because int might match the return type of a GCC | |
10642 | builtin and then its argument prototype would still apply. */ | |
10643 | #ifdef __cplusplus | |
10644 | extern "C" | |
10645 | #endif | |
10646 | char SmcOpenConnection (); | |
5929fbe7 GM |
10647 | int |
10648 | main () | |
10649 | { | |
eb697db5 | 10650 | return SmcOpenConnection (); |
5929fbe7 GM |
10651 | ; |
10652 | return 0; | |
10653 | } | |
10654 | _ACEOF | |
eb697db5 DN |
10655 | if ac_fn_c_try_link "$LINENO"; then : |
10656 | ac_cv_lib_SM_SmcOpenConnection=yes | |
5929fbe7 | 10657 | else |
eb697db5 DN |
10658 | ac_cv_lib_SM_SmcOpenConnection=no |
10659 | fi | |
10660 | rm -f core conftest.err conftest.$ac_objext \ | |
10661 | conftest$ac_exeext conftest.$ac_ext | |
10662 | LIBS=$ac_check_lib_save_LIBS | |
10663 | fi | |
10664 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_SM_SmcOpenConnection" >&5 | |
10665 | $as_echo "$ac_cv_lib_SM_SmcOpenConnection" >&6; } | |
10666 | if test "x$ac_cv_lib_SM_SmcOpenConnection" = x""yes; then : | |
10667 | HAVE_X_SM=yes | |
10668 | fi | |
8c5ff6dd | 10669 | |
5929fbe7 | 10670 | fi |
8c5ff6dd | 10671 | |
eb697db5 DN |
10672 | |
10673 | ||
10674 | if test "${HAVE_X_SM}" = "yes"; then | |
10675 | ||
10676 | $as_echo "#define HAVE_X_SM 1" >>confdefs.h | |
10677 | ||
10678 | LIBXSM="-lSM -lICE" | |
10679 | case "$LIBS" in | |
10680 | *-lSM*) ;; | |
10681 | *) LIBS="$LIBXSM $LIBS" ;; | |
10682 | esac | |
10683 | fi | |
10684 | fi | |
10685 | ||
10686 | ||
10687 | # If netdb.h doesn't declare h_errno, we must declare it by hand. | |
10688 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether netdb declares h_errno" >&5 | |
10689 | $as_echo_n "checking whether netdb declares h_errno... " >&6; } | |
10690 | if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then : | |
10691 | $as_echo_n "(cached) " >&6 | |
10692 | else | |
10693 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5929fbe7 | 10694 | /* end confdefs.h. */ |
eb697db5 | 10695 | #include <netdb.h> |
5929fbe7 GM |
10696 | int |
10697 | main () | |
10698 | { | |
eb697db5 | 10699 | return h_errno; |
5929fbe7 GM |
10700 | ; |
10701 | return 0; | |
10702 | } | |
10703 | _ACEOF | |
eb697db5 DN |
10704 | if ac_fn_c_try_link "$LINENO"; then : |
10705 | emacs_cv_netdb_declares_h_errno=yes | |
5929fbe7 | 10706 | else |
eb697db5 | 10707 | emacs_cv_netdb_declares_h_errno=no |
5929fbe7 | 10708 | fi |
eb697db5 DN |
10709 | rm -f core conftest.err conftest.$ac_objext \ |
10710 | conftest$ac_exeext conftest.$ac_ext | |
8c5ff6dd | 10711 | fi |
eb697db5 DN |
10712 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_netdb_declares_h_errno" >&5 |
10713 | $as_echo "$emacs_cv_netdb_declares_h_errno" >&6; } | |
10714 | if test $emacs_cv_netdb_declares_h_errno = yes; then | |
8c5ff6dd | 10715 | |
eb697db5 | 10716 | $as_echo "#define HAVE_H_ERRNO 1" >>confdefs.h |
8c5ff6dd KR |
10717 | |
10718 | fi | |
10719 | ||
eb697db5 DN |
10720 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works |
10721 | # for constant arguments. Useless! | |
10722 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 | |
10723 | $as_echo_n "checking for working alloca.h... " >&6; } | |
10724 | if test "${ac_cv_working_alloca_h+set}" = set; then : | |
5929fbe7 GM |
10725 | $as_echo_n "(cached) " >&6 |
10726 | else | |
eb697db5 | 10727 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5929fbe7 | 10728 | /* end confdefs.h. */ |
eb697db5 DN |
10729 | #include <alloca.h> |
10730 | int | |
10731 | main () | |
10732 | { | |
10733 | char *p = (char *) alloca (2 * sizeof (int)); | |
10734 | if (p) return 0; | |
10735 | ; | |
10736 | return 0; | |
10737 | } | |
10738 | _ACEOF | |
10739 | if ac_fn_c_try_link "$LINENO"; then : | |
10740 | ac_cv_working_alloca_h=yes | |
10741 | else | |
10742 | ac_cv_working_alloca_h=no | |
10743 | fi | |
10744 | rm -f core conftest.err conftest.$ac_objext \ | |
10745 | conftest$ac_exeext conftest.$ac_ext | |
10746 | fi | |
10747 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 | |
10748 | $as_echo "$ac_cv_working_alloca_h" >&6; } | |
10749 | if test $ac_cv_working_alloca_h = yes; then | |
10750 | ||
10751 | $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h | |
10752 | ||
10753 | fi | |
10754 | ||
10755 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 | |
10756 | $as_echo_n "checking for alloca... " >&6; } | |
10757 | if test "${ac_cv_func_alloca_works+set}" = set; then : | |
10758 | $as_echo_n "(cached) " >&6 | |
10759 | else | |
10760 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10761 | /* end confdefs.h. */ | |
10762 | #ifdef __GNUC__ | |
10763 | # define alloca __builtin_alloca | |
10764 | #else | |
10765 | # ifdef _MSC_VER | |
10766 | # include <malloc.h> | |
10767 | # define alloca _alloca | |
10768 | # else | |
10769 | # ifdef HAVE_ALLOCA_H | |
10770 | # include <alloca.h> | |
10771 | # else | |
10772 | # ifdef _AIX | |
10773 | #pragma alloca | |
10774 | # else | |
10775 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
10776 | char *alloca (); | |
10777 | # endif | |
10778 | # endif | |
10779 | # endif | |
10780 | # endif | |
5929fbe7 | 10781 | #endif |
8c5ff6dd | 10782 | |
5929fbe7 GM |
10783 | int |
10784 | main () | |
10785 | { | |
eb697db5 DN |
10786 | char *p = (char *) alloca (1); |
10787 | if (p) return 0; | |
5929fbe7 GM |
10788 | ; |
10789 | return 0; | |
10790 | } | |
8c5ff6dd | 10791 | _ACEOF |
eb697db5 DN |
10792 | if ac_fn_c_try_link "$LINENO"; then : |
10793 | ac_cv_func_alloca_works=yes | |
5929fbe7 | 10794 | else |
eb697db5 | 10795 | ac_cv_func_alloca_works=no |
8c5ff6dd | 10796 | fi |
eb697db5 DN |
10797 | rm -f core conftest.err conftest.$ac_objext \ |
10798 | conftest$ac_exeext conftest.$ac_ext | |
5929fbe7 | 10799 | fi |
eb697db5 DN |
10800 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 |
10801 | $as_echo "$ac_cv_func_alloca_works" >&6; } | |
10802 | ||
10803 | if test $ac_cv_func_alloca_works = yes; then | |
10804 | ||
10805 | $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h | |
10806 | ||
8c5ff6dd | 10807 | else |
eb697db5 DN |
10808 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions |
10809 | # that cause trouble. Some versions do not even contain alloca or | |
10810 | # contain a buggy version. If you still want to use their alloca, | |
10811 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
10812 | ||
10813 | ALLOCA=\${LIBOBJDIR}alloca.$ac_objext | |
10814 | ||
10815 | $as_echo "#define C_ALLOCA 1" >>confdefs.h | |
10816 | ||
10817 | ||
10818 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 | |
10819 | $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } | |
10820 | if test "${ac_cv_os_cray+set}" = set; then : | |
5929fbe7 | 10821 | $as_echo_n "(cached) " >&6 |
8c5ff6dd | 10822 | else |
eb697db5 | 10823 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
8c5ff6dd | 10824 | /* end confdefs.h. */ |
eb697db5 DN |
10825 | #if defined CRAY && ! defined CRAY2 |
10826 | webecray | |
8c5ff6dd | 10827 | #else |
eb697db5 | 10828 | wenotbecray |
8c5ff6dd KR |
10829 | #endif |
10830 | ||
eb697db5 DN |
10831 | _ACEOF |
10832 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
10833 | $EGREP "webecray" >/dev/null 2>&1; then : | |
10834 | ac_cv_os_cray=yes | |
10835 | else | |
10836 | ac_cv_os_cray=no | |
10837 | fi | |
10838 | rm -f conftest* | |
8c5ff6dd | 10839 | |
eb697db5 DN |
10840 | fi |
10841 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 | |
10842 | $as_echo "$ac_cv_os_cray" >&6; } | |
10843 | if test $ac_cv_os_cray = yes; then | |
10844 | for ac_func in _getb67 GETB67 getb67; do | |
10845 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
10846 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
3d608a86 J |
10847 | eval as_val=\$$as_ac_var |
10848 | if test "x$as_val" = x""yes; then : | |
15e12598 | 10849 | |
eb697db5 DN |
10850 | cat >>confdefs.h <<_ACEOF |
10851 | #define CRAY_STACKSEG_END $ac_func | |
5929fbe7 | 10852 | _ACEOF |
15e12598 | 10853 | |
eb697db5 | 10854 | break |
5929fbe7 | 10855 | fi |
15e12598 | 10856 | |
eb697db5 | 10857 | done |
5929fbe7 | 10858 | fi |
eb697db5 DN |
10859 | |
10860 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 | |
10861 | $as_echo_n "checking stack direction for C alloca... " >&6; } | |
10862 | if test "${ac_cv_c_stack_direction+set}" = set; then : | |
5929fbe7 GM |
10863 | $as_echo_n "(cached) " >&6 |
10864 | else | |
eb697db5 DN |
10865 | if test "$cross_compiling" = yes; then : |
10866 | ac_cv_c_stack_direction=0 | |
10867 | else | |
10868 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5929fbe7 | 10869 | /* end confdefs.h. */ |
eb697db5 DN |
10870 | $ac_includes_default |
10871 | int | |
10872 | find_stack_direction () | |
10873 | { | |
10874 | static char *addr = 0; | |
10875 | auto char dummy; | |
10876 | if (addr == 0) | |
10877 | { | |
10878 | addr = &dummy; | |
10879 | return find_stack_direction (); | |
10880 | } | |
10881 | else | |
10882 | return (&dummy > addr) ? 1 : -1; | |
10883 | } | |
15e12598 | 10884 | |
5929fbe7 GM |
10885 | int |
10886 | main () | |
a4f64981 | 10887 | { |
eb697db5 | 10888 | return find_stack_direction () < 0; |
7186fb09 | 10889 | } |
5929fbe7 | 10890 | _ACEOF |
eb697db5 DN |
10891 | if ac_fn_c_try_run "$LINENO"; then : |
10892 | ac_cv_c_stack_direction=1 | |
5929fbe7 | 10893 | else |
eb697db5 DN |
10894 | ac_cv_c_stack_direction=-1 |
10895 | fi | |
10896 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
10897 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
10898 | fi | |
49ebbd65 | 10899 | |
5929fbe7 | 10900 | fi |
eb697db5 DN |
10901 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 |
10902 | $as_echo "$ac_cv_c_stack_direction" >&6; } | |
10903 | cat >>confdefs.h <<_ACEOF | |
10904 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
10905 | _ACEOF | |
10906 | ||
15e12598 | 10907 | |
5929fbe7 | 10908 | fi |
eb697db5 DN |
10909 | |
10910 | ||
10911 | if test x"$ac_cv_func_alloca_works" != xyes; then | |
3d608a86 | 10912 | as_fn_error "a system implementation of alloca is required " "$LINENO" 5 |
eb697db5 DN |
10913 | fi |
10914 | ||
10915 | # fmod, logb, and frexp are found in -lm on most systems. | |
10916 | # On HPUX 9.01, -lm does not contain logb, so check for sqrt. | |
10917 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5 | |
10918 | $as_echo_n "checking for sqrt in -lm... " >&6; } | |
10919 | if test "${ac_cv_lib_m_sqrt+set}" = set; then : | |
5929fbe7 GM |
10920 | $as_echo_n "(cached) " >&6 |
10921 | else | |
10922 | ac_check_lib_save_LIBS=$LIBS | |
eb697db5 DN |
10923 | LIBS="-lm $LIBS" |
10924 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5929fbe7 | 10925 | /* end confdefs.h. */ |
e6df49e4 | 10926 | |
5929fbe7 GM |
10927 | /* Override any GCC internal prototype to avoid an error. |
10928 | Use char because int might match the return type of a GCC | |
10929 | builtin and then its argument prototype would still apply. */ | |
10930 | #ifdef __cplusplus | |
10931 | extern "C" | |
10932 | #endif | |
eb697db5 | 10933 | char sqrt (); |
a4f64981 GM |
10934 | int |
10935 | main () | |
10936 | { | |
eb697db5 | 10937 | return sqrt (); |
5929fbe7 GM |
10938 | ; |
10939 | return 0; | |
a4f64981 | 10940 | } |
e6df49e4 | 10941 | _ACEOF |
eb697db5 DN |
10942 | if ac_fn_c_try_link "$LINENO"; then : |
10943 | ac_cv_lib_m_sqrt=yes | |
a4f64981 | 10944 | else |
eb697db5 | 10945 | ac_cv_lib_m_sqrt=no |
8c5ff6dd | 10946 | fi |
eb697db5 DN |
10947 | rm -f core conftest.err conftest.$ac_objext \ |
10948 | conftest$ac_exeext conftest.$ac_ext | |
5929fbe7 GM |
10949 | LIBS=$ac_check_lib_save_LIBS |
10950 | fi | |
eb697db5 DN |
10951 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sqrt" >&5 |
10952 | $as_echo "$ac_cv_lib_m_sqrt" >&6; } | |
10953 | if test "x$ac_cv_lib_m_sqrt" = x""yes; then : | |
10954 | cat >>confdefs.h <<_ACEOF | |
10955 | #define HAVE_LIBM 1 | |
10956 | _ACEOF | |
15e12598 | 10957 | |
eb697db5 | 10958 | LIBS="-lm $LIBS" |
8c5ff6dd | 10959 | |
5929fbe7 | 10960 | fi |
8c5ff6dd | 10961 | |
8c5ff6dd | 10962 | |
eb697db5 DN |
10963 | # Check for mail-locking functions in a "mail" library. Probably this should |
10964 | # have the same check as for liblockfile below. | |
10965 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -lmail" >&5 | |
10966 | $as_echo_n "checking for maillock in -lmail... " >&6; } | |
10967 | if test "${ac_cv_lib_mail_maillock+set}" = set; then : | |
5929fbe7 GM |
10968 | $as_echo_n "(cached) " >&6 |
10969 | else | |
eb697db5 DN |
10970 | ac_check_lib_save_LIBS=$LIBS |
10971 | LIBS="-lmail $LIBS" | |
10972 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5929fbe7 | 10973 | /* end confdefs.h. */ |
15e12598 | 10974 | |
5929fbe7 GM |
10975 | /* Override any GCC internal prototype to avoid an error. |
10976 | Use char because int might match the return type of a GCC | |
10977 | builtin and then its argument prototype would still apply. */ | |
10978 | #ifdef __cplusplus | |
10979 | extern "C" | |
10980 | #endif | |
eb697db5 | 10981 | char maillock (); |
5929fbe7 GM |
10982 | int |
10983 | main () | |
10984 | { | |
eb697db5 | 10985 | return maillock (); |
5929fbe7 GM |
10986 | ; |
10987 | return 0; | |
10988 | } | |
a4f64981 | 10989 | _ACEOF |
eb697db5 DN |
10990 | if ac_fn_c_try_link "$LINENO"; then : |
10991 | ac_cv_lib_mail_maillock=yes | |
5929fbe7 | 10992 | else |
eb697db5 | 10993 | ac_cv_lib_mail_maillock=no |
8c5ff6dd | 10994 | fi |
eb697db5 DN |
10995 | rm -f core conftest.err conftest.$ac_objext \ |
10996 | conftest$ac_exeext conftest.$ac_ext | |
10997 | LIBS=$ac_check_lib_save_LIBS | |
5929fbe7 | 10998 | fi |
eb697db5 DN |
10999 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mail_maillock" >&5 |
11000 | $as_echo "$ac_cv_lib_mail_maillock" >&6; } | |
11001 | if test "x$ac_cv_lib_mail_maillock" = x""yes; then : | |
11002 | have_mail=yes | |
5929fbe7 | 11003 | else |
eb697db5 DN |
11004 | have_mail=no |
11005 | fi | |
11006 | ||
11007 | if test $have_mail = yes; then | |
11008 | LIBS_MAIL=-lmail | |
11009 | LIBS="$LIBS_MAIL $LIBS" | |
11010 | ||
11011 | $as_echo "#define HAVE_LIBMAIL 1" >>confdefs.h | |
11012 | ||
11013 | else | |
11014 | LIBS_MAIL= | |
11015 | fi | |
11016 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -llockfile" >&5 | |
11017 | $as_echo_n "checking for maillock in -llockfile... " >&6; } | |
11018 | if test "${ac_cv_lib_lockfile_maillock+set}" = set; then : | |
e9a63f04 | 11019 | $as_echo_n "(cached) " >&6 |
98418dba | 11020 | else |
0ca10bb7 | 11021 | ac_check_lib_save_LIBS=$LIBS |
eb697db5 DN |
11022 | LIBS="-llockfile $LIBS" |
11023 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
19650fd6 | 11024 | /* end confdefs.h. */ |
ca81d7a0 | 11025 | |
0ca10bb7 RC |
11026 | /* Override any GCC internal prototype to avoid an error. |
11027 | Use char because int might match the return type of a GCC | |
11028 | builtin and then its argument prototype would still apply. */ | |
11029 | #ifdef __cplusplus | |
11030 | extern "C" | |
11031 | #endif | |
eb697db5 | 11032 | char maillock (); |
0ca10bb7 RC |
11033 | int |
11034 | main () | |
11035 | { | |
eb697db5 | 11036 | return maillock (); |
0ca10bb7 RC |
11037 | ; |
11038 | return 0; | |
11039 | } | |
503d2be0 | 11040 | _ACEOF |
eb697db5 DN |
11041 | if ac_fn_c_try_link "$LINENO"; then : |
11042 | ac_cv_lib_lockfile_maillock=yes | |
503d2be0 | 11043 | else |
eb697db5 | 11044 | ac_cv_lib_lockfile_maillock=no |
a21616bd | 11045 | fi |
eb697db5 DN |
11046 | rm -f core conftest.err conftest.$ac_objext \ |
11047 | conftest$ac_exeext conftest.$ac_ext | |
0ca10bb7 RC |
11048 | LIBS=$ac_check_lib_save_LIBS |
11049 | fi | |
eb697db5 DN |
11050 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lockfile_maillock" >&5 |
11051 | $as_echo "$ac_cv_lib_lockfile_maillock" >&6; } | |
11052 | if test "x$ac_cv_lib_lockfile_maillock" = x""yes; then : | |
11053 | have_lockfile=yes | |
5929fbe7 | 11054 | else |
eb697db5 DN |
11055 | have_lockfile=no |
11056 | fi | |
11057 | ||
11058 | if test $have_lockfile = yes; then | |
11059 | LIBS_MAIL=-llockfile | |
11060 | LIBS="$LIBS_MAIL $LIBS" | |
11061 | ||
11062 | $as_echo "#define HAVE_LIBLOCKFILE 1" >>confdefs.h | |
11063 | ||
11064 | else | |
11065 | # If we have the shared liblockfile, assume we must use it for mail | |
11066 | # locking (e.g. Debian). If we couldn't link against liblockfile | |
11067 | # (no liblockfile.a installed), ensure that we don't need to. | |
11068 | # Extract the first word of "liblockfile.so", so it can be a program name with args. | |
11069 | set dummy liblockfile.so; ac_word=$2 | |
11070 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
11071 | $as_echo_n "checking for $ac_word... " >&6; } | |
11072 | if test "${ac_cv_prog_liblockfile+set}" = set; then : | |
11073 | $as_echo_n "(cached) " >&6 | |
11074 | else | |
11075 | if test -n "$liblockfile"; then | |
11076 | ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test. | |
11077 | else | |
11078 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
11079 | as_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH" | |
11080 | for as_dir in $as_dummy | |
11081 | do | |
11082 | IFS=$as_save_IFS | |
11083 | test -z "$as_dir" && as_dir=. | |
11084 | for ac_exec_ext in '' $ac_executable_extensions; do | |
11085 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
11086 | ac_cv_prog_liblockfile="yes" | |
11087 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
11088 | break 2 | |
11089 | fi | |
11090 | done | |
11091 | done | |
11092 | IFS=$as_save_IFS | |
11093 | ||
11094 | test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no" | |
11095 | fi | |
11096 | fi | |
11097 | liblockfile=$ac_cv_prog_liblockfile | |
11098 | if test -n "$liblockfile"; then | |
11099 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $liblockfile" >&5 | |
11100 | $as_echo "$liblockfile" >&6; } | |
11101 | else | |
11102 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
11103 | $as_echo "no" >&6; } | |
11104 | fi | |
11105 | ||
11106 | ||
11107 | if test $ac_cv_prog_liblockfile = yes; then | |
3d608a86 | 11108 | as_fn_error "Shared liblockfile found but can't link against it. |
eb697db5 DN |
11109 | This probably means that movemail could lose mail. |
11110 | There may be a \`development' package to install containing liblockfile." "$LINENO" 5 | |
11111 | fi | |
11112 | fi | |
11113 | for ac_func in touchlock | |
11114 | do : | |
11115 | ac_fn_c_check_func "$LINENO" "touchlock" "ac_cv_func_touchlock" | |
11116 | if test "x$ac_cv_func_touchlock" = x""yes; then : | |
11117 | cat >>confdefs.h <<_ACEOF | |
11118 | #define HAVE_TOUCHLOCK 1 | |
11119 | _ACEOF | |
11120 | ||
11121 | fi | |
11122 | done | |
11123 | ||
11124 | for ac_header in maillock.h | |
11125 | do : | |
11126 | ac_fn_c_check_header_mongrel "$LINENO" "maillock.h" "ac_cv_header_maillock_h" "$ac_includes_default" | |
11127 | if test "x$ac_cv_header_maillock_h" = x""yes; then : | |
11128 | cat >>confdefs.h <<_ACEOF | |
11129 | #define HAVE_MAILLOCK_H 1 | |
11130 | _ACEOF | |
11131 | ||
11132 | fi | |
11133 | ||
11134 | done | |
11135 | ||
11136 | ||
11137 | ||
11138 | ## Define MAIL_USE_FLOCK (or LOCKF) if the mailer uses flock (or lockf) to | |
11139 | ## interlock access to the mail spool. The alternative is a lock file named | |
11140 | ## /usr/spool/mail/$USER.lock. | |
11141 | mail_lock=no | |
11142 | case "$opsys" in | |
11143 | aix4-2) mail_lock="lockf" ;; | |
11144 | ||
11145 | gnu|freebsd|netbsd|openbsd|darwin|irix6-5) mail_lock="flock" ;; | |
11146 | ||
11147 | ## On GNU/Linux systems, both methods are used by various mail programs. | |
11148 | ## I assume most people are using newer mailers that have heard of flock. | |
11149 | ## Change this if you need to. | |
11150 | ## Debian contains a patch which says: ``On Debian/GNU/Linux systems, | |
11151 | ## configure gets the right answers, and that means *NOT* using flock. | |
11152 | ## Using flock is guaranteed to be the wrong thing. See Debian Policy | |
11153 | ## for details.'' and then uses `#ifdef DEBIAN'. Unfortunately the | |
11154 | ## Debian maintainer hasn't provided a clean fix for Emacs. | |
11155 | ## movemail.c will use `maillock' when MAILDIR, HAVE_LIBMAIL and | |
11156 | ## HAVE_MAILLOCK_H are defined, so the following appears to be the | |
11157 | ## correct logic. -- fx | |
11158 | ## We must check for HAVE_LIBLOCKFILE too, as movemail does. | |
11159 | ## liblockfile is a Free Software replacement for libmail, used on | |
11160 | ## Debian systems and elsewhere. -rfr. | |
11161 | gnu-*) | |
11162 | mail_lock="flock" | |
11163 | if test $have_mail = yes || test $have_lockfile = yes; then | |
11164 | test $ac_cv_header_maillock_h = yes && mail_lock=no | |
11165 | fi | |
11166 | ;; | |
11167 | esac | |
11168 | ||
11169 | BLESSMAIL_TARGET= | |
11170 | case "$mail_lock" in | |
11171 | flock) | |
11172 | $as_echo "#define MAIL_USE_FLOCK 1" >>confdefs.h | |
11173 | ;; | |
11174 | ||
11175 | lockf) | |
11176 | $as_echo "#define MAIL_USE_LOCKF 1" >>confdefs.h | |
11177 | ;; | |
11178 | ||
11179 | *) BLESSMAIL_TARGET="need-blessmail" ;; | |
11180 | esac | |
11181 | ||
11182 | ||
11183 | ||
11184 | for ac_func in gethostname getdomainname dup2 \ | |
11185 | rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \ | |
72af86bd | 11186 | random lrand48 logb frexp fmod rint cbrt ftime setsid \ |
eb697db5 DN |
11187 | strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \ |
11188 | utimes getrlimit setrlimit setpgid getcwd getwd shutdown getaddrinfo \ | |
8966b757 | 11189 | __fpending mblen mbrlen mbsinit strsignal setitimer ualarm strchr strrchr \ |
eb697db5 | 11190 | sendto recvfrom getsockopt setsockopt getsockname getpeername \ |
72af86bd | 11191 | gai_strerror mkstemp getline getdelim mremap memmove fsync sync \ |
eb697db5 | 11192 | memset memcmp difftime memcpy mempcpy mblen mbrlen posix_memalign \ |
dcc19aac | 11193 | cfmakeraw cfsetspeed isnan copysign __executable_start |
eb697db5 DN |
11194 | do : |
11195 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
11196 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
3d608a86 J |
11197 | eval as_val=\$$as_ac_var |
11198 | if test "x$as_val" = x""yes; then : | |
eb697db5 DN |
11199 | cat >>confdefs.h <<_ACEOF |
11200 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
11201 | _ACEOF | |
11202 | ||
11203 | fi | |
11204 | done | |
11205 | ||
11206 | ||
11207 | for ac_header in sys/un.h | |
11208 | do : | |
11209 | ac_fn_c_check_header_mongrel "$LINENO" "sys/un.h" "ac_cv_header_sys_un_h" "$ac_includes_default" | |
11210 | if test "x$ac_cv_header_sys_un_h" = x""yes; then : | |
11211 | cat >>confdefs.h <<_ACEOF | |
11212 | #define HAVE_SYS_UN_H 1 | |
11213 | _ACEOF | |
11214 | ||
11215 | fi | |
11216 | ||
11217 | done | |
11218 | ||
11219 | ||
11220 | ||
11221 | ||
11222 | ||
11223 | ||
11224 | ||
11225 | for ac_func in $ac_func_list | |
11226 | do : | |
11227 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
11228 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
3d608a86 J |
11229 | eval as_val=\$$as_ac_var |
11230 | if test "x$as_val" = x""yes; then : | |
eb697db5 DN |
11231 | cat >>confdefs.h <<_ACEOF |
11232 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
11233 | _ACEOF | |
11234 | ||
5929fbe7 | 11235 | fi |
eb697db5 DN |
11236 | done |
11237 | ||
11238 | ||
11239 | ||
11240 | ||
11241 | ||
11242 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5 | |
11243 | $as_echo_n "checking for working mktime... " >&6; } | |
11244 | if test "${ac_cv_func_working_mktime+set}" = set; then : | |
11245 | $as_echo_n "(cached) " >&6 | |
11246 | else | |
11247 | if test "$cross_compiling" = yes; then : | |
11248 | ac_cv_func_working_mktime=no | |
11249 | else | |
11250 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11251 | /* end confdefs.h. */ | |
11252 | /* Test program from Paul Eggert and Tony Leneis. */ | |
11253 | #ifdef TIME_WITH_SYS_TIME | |
11254 | # include <sys/time.h> | |
11255 | # include <time.h> | |
11256 | #else | |
11257 | # ifdef HAVE_SYS_TIME_H | |
11258 | # include <sys/time.h> | |
11259 | # else | |
11260 | # include <time.h> | |
11261 | # endif | |
11262 | #endif | |
11263 | ||
11264 | #include <limits.h> | |
11265 | #include <stdlib.h> | |
11266 | ||
11267 | #ifdef HAVE_UNISTD_H | |
11268 | # include <unistd.h> | |
11269 | #endif | |
11270 | ||
11271 | #ifndef HAVE_ALARM | |
11272 | # define alarm(X) /* empty */ | |
11273 | #endif | |
11274 | ||
11275 | /* Work around redefinition to rpl_putenv by other config tests. */ | |
11276 | #undef putenv | |
11277 | ||
11278 | static time_t time_t_max; | |
11279 | static time_t time_t_min; | |
11280 | ||
11281 | /* Values we'll use to set the TZ environment variable. */ | |
3d608a86 J |
11282 | static char *tz_strings[] = { |
11283 | (char *) 0, "TZ=GMT0", "TZ=JST-9", | |
eb697db5 DN |
11284 | "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00" |
11285 | }; | |
11286 | #define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0])) | |
5929fbe7 | 11287 | |
eb697db5 DN |
11288 | /* Return 0 if mktime fails to convert a date in the spring-forward gap. |
11289 | Based on a problem report from Andreas Jaeger. */ | |
11290 | static int | |
11291 | spring_forward_gap () | |
11292 | { | |
11293 | /* glibc (up to about 1998-10-07) failed this test. */ | |
11294 | struct tm tm; | |
5929fbe7 | 11295 | |
eb697db5 DN |
11296 | /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0" |
11297 | instead of "TZ=America/Vancouver" in order to detect the bug even | |
11298 | on systems that don't support the Olson extension, or don't have the | |
11299 | full zoneinfo tables installed. */ | |
3d608a86 | 11300 | putenv ("TZ=PST8PDT,M4.1.0,M10.5.0"); |
5929fbe7 | 11301 | |
eb697db5 DN |
11302 | tm.tm_year = 98; |
11303 | tm.tm_mon = 3; | |
11304 | tm.tm_mday = 5; | |
11305 | tm.tm_hour = 2; | |
11306 | tm.tm_min = 0; | |
11307 | tm.tm_sec = 0; | |
11308 | tm.tm_isdst = -1; | |
11309 | return mktime (&tm) != (time_t) -1; | |
11310 | } | |
5929fbe7 | 11311 | |
eb697db5 | 11312 | static int |
3d608a86 J |
11313 | mktime_test1 (now) |
11314 | time_t now; | |
eb697db5 DN |
11315 | { |
11316 | struct tm *lt; | |
11317 | return ! (lt = localtime (&now)) || mktime (lt) == now; | |
11318 | } | |
e6df49e4 | 11319 | |
eb697db5 | 11320 | static int |
3d608a86 J |
11321 | mktime_test (now) |
11322 | time_t now; | |
eb697db5 DN |
11323 | { |
11324 | return (mktime_test1 (now) | |
11325 | && mktime_test1 ((time_t) (time_t_max - now)) | |
11326 | && mktime_test1 ((time_t) (time_t_min + now))); | |
11327 | } | |
5929fbe7 | 11328 | |
eb697db5 DN |
11329 | static int |
11330 | irix_6_4_bug () | |
11331 | { | |
11332 | /* Based on code from Ariel Faigon. */ | |
11333 | struct tm tm; | |
11334 | tm.tm_year = 96; | |
11335 | tm.tm_mon = 3; | |
11336 | tm.tm_mday = 0; | |
11337 | tm.tm_hour = 0; | |
11338 | tm.tm_min = 0; | |
11339 | tm.tm_sec = 0; | |
11340 | tm.tm_isdst = -1; | |
11341 | mktime (&tm); | |
11342 | return tm.tm_mon == 2 && tm.tm_mday == 31; | |
11343 | } | |
5929fbe7 | 11344 | |
eb697db5 | 11345 | static int |
3d608a86 J |
11346 | bigtime_test (j) |
11347 | int j; | |
eb697db5 DN |
11348 | { |
11349 | struct tm tm; | |
11350 | time_t now; | |
11351 | tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j; | |
11352 | now = mktime (&tm); | |
11353 | if (now != (time_t) -1) | |
11354 | { | |
11355 | struct tm *lt = localtime (&now); | |
11356 | if (! (lt | |
11357 | && lt->tm_year == tm.tm_year | |
11358 | && lt->tm_mon == tm.tm_mon | |
11359 | && lt->tm_mday == tm.tm_mday | |
11360 | && lt->tm_hour == tm.tm_hour | |
11361 | && lt->tm_min == tm.tm_min | |
11362 | && lt->tm_sec == tm.tm_sec | |
11363 | && lt->tm_yday == tm.tm_yday | |
11364 | && lt->tm_wday == tm.tm_wday | |
11365 | && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst) | |
11366 | == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst)))) | |
11367 | return 0; | |
11368 | } | |
11369 | return 1; | |
11370 | } | |
5929fbe7 | 11371 | |
eb697db5 DN |
11372 | static int |
11373 | year_2050_test () | |
11374 | { | |
11375 | /* The correct answer for 2050-02-01 00:00:00 in Pacific time, | |
11376 | ignoring leap seconds. */ | |
11377 | unsigned long int answer = 2527315200UL; | |
15e12598 | 11378 | |
eb697db5 DN |
11379 | struct tm tm; |
11380 | time_t t; | |
11381 | tm.tm_year = 2050 - 1900; | |
11382 | tm.tm_mon = 2 - 1; | |
11383 | tm.tm_mday = 1; | |
11384 | tm.tm_hour = tm.tm_min = tm.tm_sec = 0; | |
11385 | tm.tm_isdst = -1; | |
a4f64981 | 11386 | |
eb697db5 DN |
11387 | /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0" |
11388 | instead of "TZ=America/Vancouver" in order to detect the bug even | |
11389 | on systems that don't support the Olson extension, or don't have the | |
11390 | full zoneinfo tables installed. */ | |
3d608a86 | 11391 | putenv ("TZ=PST8PDT,M4.1.0,M10.5.0"); |
8c5ff6dd | 11392 | |
eb697db5 | 11393 | t = mktime (&tm); |
5929fbe7 | 11394 | |
eb697db5 DN |
11395 | /* Check that the result is either a failure, or close enough |
11396 | to the correct answer that we can assume the discrepancy is | |
11397 | due to leap seconds. */ | |
11398 | return (t == (time_t) -1 | |
11399 | || (0 < t && answer - 120 <= t && t <= answer + 120)); | |
11400 | } | |
21287a21 CY |
11401 | |
11402 | int | |
11403 | main () | |
11404 | { | |
eb697db5 DN |
11405 | time_t t, delta; |
11406 | int i, j; | |
5929fbe7 | 11407 | |
eb697db5 DN |
11408 | /* This test makes some buggy mktime implementations loop. |
11409 | Give up after 60 seconds; a mktime slower than that | |
11410 | isn't worth using anyway. */ | |
11411 | alarm (60); | |
bf89cb4d | 11412 | |
eb697db5 DN |
11413 | for (;;) |
11414 | { | |
11415 | t = (time_t_max << 1) + 1; | |
11416 | if (t <= time_t_max) | |
11417 | break; | |
11418 | time_t_max = t; | |
11419 | } | |
11420 | time_t_min = - ((time_t) ~ (time_t) 0 == (time_t) -1) - time_t_max; | |
5929fbe7 | 11421 | |
eb697db5 DN |
11422 | delta = time_t_max / 997; /* a suitable prime number */ |
11423 | for (i = 0; i < N_STRINGS; i++) | |
11424 | { | |
11425 | if (tz_strings[i]) | |
3d608a86 | 11426 | putenv (tz_strings[i]); |
5929fbe7 | 11427 | |
eb697db5 DN |
11428 | for (t = 0; t <= time_t_max - delta; t += delta) |
11429 | if (! mktime_test (t)) | |
11430 | return 1; | |
11431 | if (! (mktime_test ((time_t) 1) | |
11432 | && mktime_test ((time_t) (60 * 60)) | |
11433 | && mktime_test ((time_t) (60 * 60 * 24)))) | |
11434 | return 1; | |
21287a21 | 11435 | |
eb697db5 DN |
11436 | for (j = 1; ; j <<= 1) |
11437 | if (! bigtime_test (j)) | |
11438 | return 1; | |
11439 | else if (INT_MAX / 2 < j) | |
11440 | break; | |
11441 | if (! bigtime_test (INT_MAX)) | |
11442 | return 1; | |
11443 | } | |
11444 | return ! (irix_6_4_bug () && spring_forward_gap () && year_2050_test ()); | |
9452ded1 DN |
11445 | } |
11446 | _ACEOF | |
eb697db5 DN |
11447 | if ac_fn_c_try_run "$LINENO"; then : |
11448 | ac_cv_func_working_mktime=yes | |
21287a21 | 11449 | else |
eb697db5 DN |
11450 | ac_cv_func_working_mktime=no |
11451 | fi | |
11452 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
11453 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
11454 | fi | |
11455 | ||
11456 | fi | |
11457 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_working_mktime" >&5 | |
11458 | $as_echo "$ac_cv_func_working_mktime" >&6; } | |
11459 | if test $ac_cv_func_working_mktime = no; then | |
11460 | case " $LIBOBJS " in | |
11461 | *" mktime.$ac_objext "* ) ;; | |
11462 | *) LIBOBJS="$LIBOBJS mktime.$ac_objext" | |
11463 | ;; | |
11464 | esac | |
11465 | ||
11466 | fi | |
11467 | ||
11468 | if test "$ac_cv_func_working_mktime" = no; then | |
5929fbe7 | 11469 | |
eb697db5 | 11470 | $as_echo "#define BROKEN_MKTIME 1" >>confdefs.h |
5929fbe7 | 11471 | |
21287a21 | 11472 | fi |
eb697db5 DN |
11473 | |
11474 | ac_have_func=no # yes means we've found a way to get the load average. | |
11475 | ||
11476 | # Make sure getloadavg.c is where it belongs, at configure-time. | |
11477 | test -f "$srcdir/$ac_config_libobj_dir/getloadavg.c" || | |
3d608a86 | 11478 | as_fn_error "$srcdir/$ac_config_libobj_dir/getloadavg.c is missing" "$LINENO" 5 |
eb697db5 DN |
11479 | |
11480 | ac_save_LIBS=$LIBS | |
11481 | ||
11482 | # Check for getloadavg, but be sure not to touch the cache variable. | |
11483 | (ac_fn_c_check_func "$LINENO" "getloadavg" "ac_cv_func_getloadavg" | |
11484 | if test "x$ac_cv_func_getloadavg" = x""yes; then : | |
11485 | exit 0 | |
5929fbe7 | 11486 | else |
eb697db5 | 11487 | exit 1 |
21287a21 | 11488 | fi |
eb697db5 | 11489 | ) && ac_have_func=yes |
21287a21 | 11490 | |
eb697db5 DN |
11491 | # On HPUX9, an unprivileged user can get load averages through this function. |
11492 | for ac_func in pstat_getdynamic | |
11493 | do : | |
11494 | ac_fn_c_check_func "$LINENO" "pstat_getdynamic" "ac_cv_func_pstat_getdynamic" | |
11495 | if test "x$ac_cv_func_pstat_getdynamic" = x""yes; then : | |
11496 | cat >>confdefs.h <<_ACEOF | |
11497 | #define HAVE_PSTAT_GETDYNAMIC 1 | |
5929fbe7 GM |
11498 | _ACEOF |
11499 | ||
eb697db5 DN |
11500 | fi |
11501 | done | |
11502 | ||
11503 | ||
11504 | # Solaris has libkstat which does not require root. | |
11505 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kstat_open in -lkstat" >&5 | |
11506 | $as_echo_n "checking for kstat_open in -lkstat... " >&6; } | |
11507 | if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then : | |
e9a63f04 | 11508 | $as_echo_n "(cached) " >&6 |
21287a21 | 11509 | else |
0ca10bb7 | 11510 | ac_check_lib_save_LIBS=$LIBS |
eb697db5 DN |
11511 | LIBS="-lkstat $LIBS" |
11512 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
21287a21 | 11513 | /* end confdefs.h. */ |
21287a21 | 11514 | |
0ca10bb7 RC |
11515 | /* Override any GCC internal prototype to avoid an error. |
11516 | Use char because int might match the return type of a GCC | |
11517 | builtin and then its argument prototype would still apply. */ | |
11518 | #ifdef __cplusplus | |
11519 | extern "C" | |
15e12598 | 11520 | #endif |
eb697db5 | 11521 | char kstat_open (); |
15e12598 VB |
11522 | int |
11523 | main () | |
11524 | { | |
eb697db5 | 11525 | return kstat_open (); |
15e12598 VB |
11526 | ; |
11527 | return 0; | |
11528 | } | |
11529 | _ACEOF | |
eb697db5 DN |
11530 | if ac_fn_c_try_link "$LINENO"; then : |
11531 | ac_cv_lib_kstat_kstat_open=yes | |
0ca10bb7 | 11532 | else |
eb697db5 | 11533 | ac_cv_lib_kstat_kstat_open=no |
0ca10bb7 | 11534 | fi |
eb697db5 DN |
11535 | rm -f core conftest.err conftest.$ac_objext \ |
11536 | conftest$ac_exeext conftest.$ac_ext | |
bf89cb4d GM |
11537 | LIBS=$ac_check_lib_save_LIBS |
11538 | fi | |
eb697db5 DN |
11539 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kstat_kstat_open" >&5 |
11540 | $as_echo "$ac_cv_lib_kstat_kstat_open" >&6; } | |
11541 | if test "x$ac_cv_lib_kstat_kstat_open" = x""yes; then : | |
11542 | cat >>confdefs.h <<_ACEOF | |
11543 | #define HAVE_LIBKSTAT 1 | |
11544 | _ACEOF | |
6da23aaa | 11545 | |
eb697db5 | 11546 | LIBS="-lkstat $LIBS" |
a4f64981 | 11547 | |
eb697db5 | 11548 | fi |
5929fbe7 | 11549 | |
eb697db5 DN |
11550 | test $ac_cv_lib_kstat_kstat_open = yes && ac_have_func=yes |
11551 | ||
11552 | # Some systems with -lutil have (and need) -lkvm as well, some do not. | |
11553 | # On Solaris, -lkvm requires nlist from -lelf, so check that first | |
11554 | # to get the right answer into the cache. | |
11555 | # For kstat on solaris, we need libelf to force the definition of SVR4 below. | |
11556 | if test $ac_have_func = no; then | |
11557 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_begin in -lelf" >&5 | |
11558 | $as_echo_n "checking for elf_begin in -lelf... " >&6; } | |
11559 | if test "${ac_cv_lib_elf_elf_begin+set}" = set; then : | |
0ca10bb7 RC |
11560 | $as_echo_n "(cached) " >&6 |
11561 | else | |
11562 | ac_check_lib_save_LIBS=$LIBS | |
eb697db5 DN |
11563 | LIBS="-lelf $LIBS" |
11564 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
21287a21 | 11565 | /* end confdefs.h. */ |
21287a21 | 11566 | |
0ca10bb7 RC |
11567 | /* Override any GCC internal prototype to avoid an error. |
11568 | Use char because int might match the return type of a GCC | |
11569 | builtin and then its argument prototype would still apply. */ | |
11570 | #ifdef __cplusplus | |
11571 | extern "C" | |
11572 | #endif | |
eb697db5 | 11573 | char elf_begin (); |
21287a21 CY |
11574 | int |
11575 | main () | |
11576 | { | |
eb697db5 | 11577 | return elf_begin (); |
21287a21 CY |
11578 | ; |
11579 | return 0; | |
11580 | } | |
11581 | _ACEOF | |
eb697db5 DN |
11582 | if ac_fn_c_try_link "$LINENO"; then : |
11583 | ac_cv_lib_elf_elf_begin=yes | |
bf89cb4d | 11584 | else |
eb697db5 | 11585 | ac_cv_lib_elf_elf_begin=no |
0c309b80 | 11586 | fi |
eb697db5 DN |
11587 | rm -f core conftest.err conftest.$ac_objext \ |
11588 | conftest$ac_exeext conftest.$ac_ext | |
7186fb09 | 11589 | LIBS=$ac_check_lib_save_LIBS |
9452ded1 | 11590 | fi |
eb697db5 DN |
11591 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_elf_elf_begin" >&5 |
11592 | $as_echo "$ac_cv_lib_elf_elf_begin" >&6; } | |
11593 | if test "x$ac_cv_lib_elf_elf_begin" = x""yes; then : | |
11594 | LIBS="-lelf $LIBS" | |
8c5ff6dd KR |
11595 | fi |
11596 | ||
eb697db5 DN |
11597 | fi |
11598 | if test $ac_have_func = no; then | |
11599 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kvm_open in -lkvm" >&5 | |
11600 | $as_echo_n "checking for kvm_open in -lkvm... " >&6; } | |
11601 | if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then : | |
7186fb09 GM |
11602 | $as_echo_n "(cached) " >&6 |
11603 | else | |
aaa36002 | 11604 | ac_check_lib_save_LIBS=$LIBS |
eb697db5 DN |
11605 | LIBS="-lkvm $LIBS" |
11606 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
91e84f96 | 11607 | /* end confdefs.h. */ |
7186fb09 | 11608 | |
aaa36002 DN |
11609 | /* Override any GCC internal prototype to avoid an error. |
11610 | Use char because int might match the return type of a GCC | |
11611 | builtin and then its argument prototype would still apply. */ | |
11612 | #ifdef __cplusplus | |
11613 | extern "C" | |
11614 | #endif | |
eb697db5 | 11615 | char kvm_open (); |
8732a4e9 MB |
11616 | int |
11617 | main () | |
11618 | { | |
eb697db5 | 11619 | return kvm_open (); |
0c309b80 GM |
11620 | ; |
11621 | return 0; | |
11622 | } | |
11623 | _ACEOF | |
eb697db5 DN |
11624 | if ac_fn_c_try_link "$LINENO"; then : |
11625 | ac_cv_lib_kvm_kvm_open=yes | |
7186fb09 | 11626 | else |
eb697db5 | 11627 | ac_cv_lib_kvm_kvm_open=no |
cd03c74a | 11628 | fi |
eb697db5 DN |
11629 | rm -f core conftest.err conftest.$ac_objext \ |
11630 | conftest$ac_exeext conftest.$ac_ext | |
5929fbe7 | 11631 | LIBS=$ac_check_lib_save_LIBS |
a4f64981 | 11632 | fi |
eb697db5 DN |
11633 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kvm_kvm_open" >&5 |
11634 | $as_echo "$ac_cv_lib_kvm_kvm_open" >&6; } | |
11635 | if test "x$ac_cv_lib_kvm_kvm_open" = x""yes; then : | |
11636 | LIBS="-lkvm $LIBS" | |
8c5ff6dd | 11637 | fi |
8c5ff6dd | 11638 | |
eb697db5 DN |
11639 | # Check for the 4.4BSD definition of getloadavg. |
11640 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lutil" >&5 | |
11641 | $as_echo_n "checking for getloadavg in -lutil... " >&6; } | |
11642 | if test "${ac_cv_lib_util_getloadavg+set}" = set; then : | |
5929fbe7 | 11643 | $as_echo_n "(cached) " >&6 |
8c5ff6dd | 11644 | else |
5929fbe7 | 11645 | ac_check_lib_save_LIBS=$LIBS |
eb697db5 DN |
11646 | LIBS="-lutil $LIBS" |
11647 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5929fbe7 | 11648 | /* end confdefs.h. */ |
8c5ff6dd | 11649 | |
5929fbe7 GM |
11650 | /* Override any GCC internal prototype to avoid an error. |
11651 | Use char because int might match the return type of a GCC | |
11652 | builtin and then its argument prototype would still apply. */ | |
11653 | #ifdef __cplusplus | |
11654 | extern "C" | |
11655 | #endif | |
eb697db5 | 11656 | char getloadavg (); |
5929fbe7 GM |
11657 | int |
11658 | main () | |
11659 | { | |
eb697db5 | 11660 | return getloadavg (); |
5929fbe7 GM |
11661 | ; |
11662 | return 0; | |
11663 | } | |
11664 | _ACEOF | |
eb697db5 DN |
11665 | if ac_fn_c_try_link "$LINENO"; then : |
11666 | ac_cv_lib_util_getloadavg=yes | |
49ebbd65 | 11667 | else |
eb697db5 | 11668 | ac_cv_lib_util_getloadavg=no |
8c5ff6dd | 11669 | fi |
eb697db5 DN |
11670 | rm -f core conftest.err conftest.$ac_objext \ |
11671 | conftest$ac_exeext conftest.$ac_ext | |
5929fbe7 | 11672 | LIBS=$ac_check_lib_save_LIBS |
8c5ff6dd | 11673 | fi |
eb697db5 DN |
11674 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_getloadavg" >&5 |
11675 | $as_echo "$ac_cv_lib_util_getloadavg" >&6; } | |
11676 | if test "x$ac_cv_lib_util_getloadavg" = x""yes; then : | |
11677 | LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes | |
8c5ff6dd | 11678 | fi |
8c5ff6dd | 11679 | |
eb697db5 | 11680 | fi |
8c5ff6dd | 11681 | |
eb697db5 DN |
11682 | if test $ac_have_func = no; then |
11683 | # There is a commonly available library for RS/6000 AIX. | |
11684 | # Since it is not a standard part of AIX, it might be installed locally. | |
11685 | ac_getloadavg_LIBS=$LIBS | |
11686 | LIBS="-L/usr/local/lib $LIBS" | |
11687 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lgetloadavg" >&5 | |
11688 | $as_echo_n "checking for getloadavg in -lgetloadavg... " >&6; } | |
11689 | if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then : | |
8c5ff6dd KR |
11690 | $as_echo_n "(cached) " >&6 |
11691 | else | |
5929fbe7 | 11692 | ac_check_lib_save_LIBS=$LIBS |
eb697db5 DN |
11693 | LIBS="-lgetloadavg $LIBS" |
11694 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8c5ff6dd | 11695 | /* end confdefs.h. */ |
5929fbe7 GM |
11696 | |
11697 | /* Override any GCC internal prototype to avoid an error. | |
11698 | Use char because int might match the return type of a GCC | |
11699 | builtin and then its argument prototype would still apply. */ | |
11700 | #ifdef __cplusplus | |
11701 | extern "C" | |
11702 | #endif | |
eb697db5 | 11703 | char getloadavg (); |
8c5ff6dd KR |
11704 | int |
11705 | main () | |
11706 | { | |
eb697db5 | 11707 | return getloadavg (); |
8c5ff6dd KR |
11708 | ; |
11709 | return 0; | |
11710 | } | |
a4f64981 | 11711 | _ACEOF |
eb697db5 DN |
11712 | if ac_fn_c_try_link "$LINENO"; then : |
11713 | ac_cv_lib_getloadavg_getloadavg=yes | |
5929fbe7 | 11714 | else |
eb697db5 | 11715 | ac_cv_lib_getloadavg_getloadavg=no |
5929fbe7 | 11716 | fi |
eb697db5 DN |
11717 | rm -f core conftest.err conftest.$ac_objext \ |
11718 | conftest$ac_exeext conftest.$ac_ext | |
5929fbe7 | 11719 | LIBS=$ac_check_lib_save_LIBS |
8c5ff6dd | 11720 | fi |
eb697db5 DN |
11721 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_getloadavg_getloadavg" >&5 |
11722 | $as_echo "$ac_cv_lib_getloadavg_getloadavg" >&6; } | |
11723 | if test "x$ac_cv_lib_getloadavg_getloadavg" = x""yes; then : | |
11724 | LIBS="-lgetloadavg $LIBS" | |
5929fbe7 | 11725 | else |
eb697db5 | 11726 | LIBS=$ac_getloadavg_LIBS |
5929fbe7 GM |
11727 | fi |
11728 | ||
eb697db5 | 11729 | fi |
5929fbe7 | 11730 | |
eb697db5 DN |
11731 | # Make sure it is really in the library, if we think we found it, |
11732 | # otherwise set up the replacement function. | |
11733 | for ac_func in getloadavg | |
11734 | do : | |
11735 | ac_fn_c_check_func "$LINENO" "getloadavg" "ac_cv_func_getloadavg" | |
11736 | if test "x$ac_cv_func_getloadavg" = x""yes; then : | |
11737 | cat >>confdefs.h <<_ACEOF | |
11738 | #define HAVE_GETLOADAVG 1 | |
5929fbe7 GM |
11739 | _ACEOF |
11740 | ||
eb697db5 DN |
11741 | else |
11742 | case " $LIBOBJS " in | |
11743 | *" getloadavg.$ac_objext "* ) ;; | |
11744 | *) LIBOBJS="$LIBOBJS getloadavg.$ac_objext" | |
11745 | ;; | |
11746 | esac | |
11747 | ||
11748 | ||
11749 | $as_echo "#define C_GETLOADAVG 1" >>confdefs.h | |
11750 | ||
11751 | # Figure out what our getloadavg.c needs. | |
11752 | ac_have_func=no | |
11753 | ac_fn_c_check_header_mongrel "$LINENO" "sys/dg_sys_info.h" "ac_cv_header_sys_dg_sys_info_h" "$ac_includes_default" | |
11754 | if test "x$ac_cv_header_sys_dg_sys_info_h" = x""yes; then : | |
11755 | ac_have_func=yes | |
11756 | ||
11757 | $as_echo "#define DGUX 1" >>confdefs.h | |
11758 | ||
11759 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dg_sys_info in -ldgc" >&5 | |
11760 | $as_echo_n "checking for dg_sys_info in -ldgc... " >&6; } | |
11761 | if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then : | |
5929fbe7 GM |
11762 | $as_echo_n "(cached) " >&6 |
11763 | else | |
11764 | ac_check_lib_save_LIBS=$LIBS | |
eb697db5 DN |
11765 | LIBS="-ldgc $LIBS" |
11766 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
a4f64981 | 11767 | /* end confdefs.h. */ |
5929fbe7 GM |
11768 | |
11769 | /* Override any GCC internal prototype to avoid an error. | |
11770 | Use char because int might match the return type of a GCC | |
11771 | builtin and then its argument prototype would still apply. */ | |
11772 | #ifdef __cplusplus | |
11773 | extern "C" | |
11774 | #endif | |
eb697db5 | 11775 | char dg_sys_info (); |
a4f64981 GM |
11776 | int |
11777 | main () | |
11778 | { | |
eb697db5 | 11779 | return dg_sys_info (); |
15e12598 VB |
11780 | ; |
11781 | return 0; | |
11782 | } | |
e6df49e4 | 11783 | _ACEOF |
eb697db5 DN |
11784 | if ac_fn_c_try_link "$LINENO"; then : |
11785 | ac_cv_lib_dgc_dg_sys_info=yes | |
5929fbe7 | 11786 | else |
eb697db5 | 11787 | ac_cv_lib_dgc_dg_sys_info=no |
49ebbd65 | 11788 | fi |
eb697db5 DN |
11789 | rm -f core conftest.err conftest.$ac_objext \ |
11790 | conftest$ac_exeext conftest.$ac_ext | |
5929fbe7 GM |
11791 | LIBS=$ac_check_lib_save_LIBS |
11792 | fi | |
eb697db5 DN |
11793 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dgc_dg_sys_info" >&5 |
11794 | $as_echo "$ac_cv_lib_dgc_dg_sys_info" >&6; } | |
11795 | if test "x$ac_cv_lib_dgc_dg_sys_info" = x""yes; then : | |
11796 | cat >>confdefs.h <<_ACEOF | |
11797 | #define HAVE_LIBDGC 1 | |
11798 | _ACEOF | |
11799 | ||
11800 | LIBS="-ldgc $LIBS" | |
11801 | ||
5929fbe7 | 11802 | fi |
a5edbe4a | 11803 | |
eb697db5 | 11804 | fi |
49ebbd65 DN |
11805 | |
11806 | ||
15e12598 | 11807 | |
eb697db5 DN |
11808 | ac_fn_c_check_header_mongrel "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default" |
11809 | if test "x$ac_cv_header_locale_h" = x""yes; then : | |
a4f64981 | 11810 | |
5929fbe7 | 11811 | fi |
eb697db5 DN |
11812 | |
11813 | ||
11814 | for ac_func in setlocale | |
11815 | do : | |
11816 | ac_fn_c_check_func "$LINENO" "setlocale" "ac_cv_func_setlocale" | |
11817 | if test "x$ac_cv_func_setlocale" = x""yes; then : | |
11818 | cat >>confdefs.h <<_ACEOF | |
11819 | #define HAVE_SETLOCALE 1 | |
5929fbe7 | 11820 | _ACEOF |
a4f64981 | 11821 | |
5929fbe7 | 11822 | fi |
eb697db5 | 11823 | done |
a4f64981 | 11824 | |
a4f64981 | 11825 | |
eb697db5 DN |
11826 | # We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it |
11827 | # uses stabs), but it is still SVR4. We cannot check for <elf.h> because | |
11828 | # Irix 4.0.5F has the header but not the library. | |
11829 | if test $ac_have_func = no && test "$ac_cv_lib_elf_elf_begin" = yes; then | |
11830 | ac_have_func=yes | |
11831 | ||
11832 | $as_echo "#define SVR4 1" >>confdefs.h | |
cd03c74a | 11833 | |
5929fbe7 | 11834 | fi |
8c5ff6dd | 11835 | |
eb697db5 DN |
11836 | if test $ac_have_func = no; then |
11837 | ac_fn_c_check_header_mongrel "$LINENO" "inq_stats/cpustats.h" "ac_cv_header_inq_stats_cpustats_h" "$ac_includes_default" | |
11838 | if test "x$ac_cv_header_inq_stats_cpustats_h" = x""yes; then : | |
11839 | ac_have_func=yes | |
8c5ff6dd | 11840 | |
eb697db5 DN |
11841 | $as_echo "#define UMAX 1" >>confdefs.h |
11842 | ||
11843 | ||
11844 | $as_echo "#define UMAX4_3 1" >>confdefs.h | |
8c5ff6dd | 11845 | |
5929fbe7 | 11846 | fi |
eb697db5 DN |
11847 | |
11848 | ||
11849 | fi | |
11850 | ||
11851 | if test $ac_have_func = no; then | |
11852 | ac_fn_c_check_header_mongrel "$LINENO" "sys/cpustats.h" "ac_cv_header_sys_cpustats_h" "$ac_includes_default" | |
11853 | if test "x$ac_cv_header_sys_cpustats_h" = x""yes; then : | |
11854 | ac_have_func=yes; $as_echo "#define UMAX 1" >>confdefs.h | |
11855 | ||
11856 | fi | |
11857 | ||
8c5ff6dd | 11858 | |
5929fbe7 | 11859 | fi |
eb697db5 DN |
11860 | |
11861 | if test $ac_have_func = no; then | |
11862 | for ac_header in mach/mach.h | |
11863 | do : | |
11864 | ac_fn_c_check_header_mongrel "$LINENO" "mach/mach.h" "ac_cv_header_mach_mach_h" "$ac_includes_default" | |
11865 | if test "x$ac_cv_header_mach_mach_h" = x""yes; then : | |
8c5ff6dd | 11866 | cat >>confdefs.h <<_ACEOF |
eb697db5 | 11867 | #define HAVE_MACH_MACH_H 1 |
5929fbe7 | 11868 | _ACEOF |
e6df49e4 | 11869 | |
eb697db5 DN |
11870 | fi |
11871 | ||
11872 | done | |
8c5ff6dd | 11873 | |
eb697db5 DN |
11874 | fi |
11875 | ||
11876 | for ac_header in nlist.h | |
11877 | do : | |
11878 | ac_fn_c_check_header_mongrel "$LINENO" "nlist.h" "ac_cv_header_nlist_h" "$ac_includes_default" | |
11879 | if test "x$ac_cv_header_nlist_h" = x""yes; then : | |
11880 | cat >>confdefs.h <<_ACEOF | |
11881 | #define HAVE_NLIST_H 1 | |
a4f64981 | 11882 | _ACEOF |
eb697db5 DN |
11883 | ac_fn_c_check_member "$LINENO" "struct nlist" "n_un.n_name" "ac_cv_member_struct_nlist_n_un_n_name" "#include <nlist.h> |
11884 | " | |
11885 | if test "x$ac_cv_member_struct_nlist_n_un_n_name" = x""yes; then : | |
cd03c74a | 11886 | |
eb697db5 DN |
11887 | cat >>confdefs.h <<_ACEOF |
11888 | #define HAVE_STRUCT_NLIST_N_UN_N_NAME 1 | |
5929fbe7 | 11889 | _ACEOF |
5929fbe7 | 11890 | |
eb697db5 DN |
11891 | |
11892 | $as_echo "#define NLIST_NAME_UNION 1" >>confdefs.h | |
11893 | ||
8c5ff6dd | 11894 | fi |
49ebbd65 | 11895 | |
eb697db5 | 11896 | |
5929fbe7 | 11897 | fi |
8c5ff6dd | 11898 | |
eb697db5 DN |
11899 | done |
11900 | ||
8c5ff6dd | 11901 | fi |
eb697db5 | 11902 | done |
8c5ff6dd | 11903 | |
eb697db5 DN |
11904 | |
11905 | # Some definitions of getloadavg require that the program be installed setgid. | |
11906 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getloadavg requires setgid" >&5 | |
11907 | $as_echo_n "checking whether getloadavg requires setgid... " >&6; } | |
11908 | if test "${ac_cv_func_getloadavg_setgid+set}" = set; then : | |
11909 | $as_echo_n "(cached) " >&6 | |
11910 | else | |
11911 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11912 | /* end confdefs.h. */ | |
11913 | #include "$srcdir/$ac_config_libobj_dir/getloadavg.c" | |
11914 | #ifdef LDAV_PRIVILEGED | |
11915 | Yowza Am I SETGID yet | |
11916 | #endif | |
5929fbe7 | 11917 | _ACEOF |
eb697db5 DN |
11918 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
11919 | $EGREP "Yowza Am I SETGID yet" >/dev/null 2>&1; then : | |
11920 | ac_cv_func_getloadavg_setgid=yes | |
11921 | else | |
11922 | ac_cv_func_getloadavg_setgid=no | |
11923 | fi | |
11924 | rm -f conftest* | |
11925 | ||
11926 | fi | |
11927 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getloadavg_setgid" >&5 | |
11928 | $as_echo "$ac_cv_func_getloadavg_setgid" >&6; } | |
11929 | if test $ac_cv_func_getloadavg_setgid = yes; then | |
11930 | NEED_SETGID=true | |
8c5ff6dd | 11931 | |
eb697db5 | 11932 | $as_echo "#define GETLOADAVG_PRIVILEGED 1" >>confdefs.h |
8c5ff6dd | 11933 | |
eb697db5 DN |
11934 | else |
11935 | NEED_SETGID=false | |
5929fbe7 | 11936 | fi |
eb697db5 DN |
11937 | |
11938 | if test $ac_cv_func_getloadavg_setgid = yes; then | |
11939 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking group of /dev/kmem" >&5 | |
11940 | $as_echo_n "checking group of /dev/kmem... " >&6; } | |
11941 | if test "${ac_cv_group_kmem+set}" = set; then : | |
5929fbe7 | 11942 | $as_echo_n "(cached) " >&6 |
a5edbe4a | 11943 | else |
eb697db5 DN |
11944 | # On Solaris, /dev/kmem is a symlink. Get info on the real file. |
11945 | ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null` | |
11946 | # If we got an error (system does not support symlinks), try without -L. | |
11947 | test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem` | |
11948 | ac_cv_group_kmem=`$as_echo "$ac_ls_output" \ | |
11949 | | sed -ne 's/[ ][ ]*/ /g; | |
11950 | s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/; | |
11951 | / /s/.* //;p;'` | |
11952 | ||
11953 | fi | |
11954 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_group_kmem" >&5 | |
11955 | $as_echo "$ac_cv_group_kmem" >&6; } | |
11956 | KMEM_GROUP=$ac_cv_group_kmem | |
11957 | fi | |
11958 | if test "x$ac_save_LIBS" = x; then | |
11959 | GETLOADAVG_LIBS=$LIBS | |
11960 | else | |
11961 | GETLOADAVG_LIBS=`$as_echo "$LIBS" | sed "s|$ac_save_LIBS||"` | |
11962 | fi | |
11963 | LIBS=$ac_save_LIBS | |
11964 | ||
11965 | ||
5929fbe7 | 11966 | |
eb697db5 DN |
11967 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5 |
11968 | $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; } | |
11969 | if test "${ac_cv_sys_largefile_source+set}" = set; then : | |
11970 | $as_echo_n "(cached) " >&6 | |
11971 | else | |
11972 | while :; do | |
11973 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11974 | /* end confdefs.h. */ | |
11975 | #include <sys/types.h> /* for off_t */ | |
11976 | #include <stdio.h> | |
8c5ff6dd KR |
11977 | int |
11978 | main () | |
11979 | { | |
eb697db5 DN |
11980 | int (*fp) (FILE *, off_t, int) = fseeko; |
11981 | return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); | |
5929fbe7 GM |
11982 | ; |
11983 | return 0; | |
11984 | } | |
11985 | _ACEOF | |
eb697db5 DN |
11986 | if ac_fn_c_try_link "$LINENO"; then : |
11987 | ac_cv_sys_largefile_source=no; break | |
11988 | fi | |
11989 | rm -f core conftest.err conftest.$ac_objext \ | |
11990 | conftest$ac_exeext conftest.$ac_ext | |
11991 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5929fbe7 | 11992 | /* end confdefs.h. */ |
eb697db5 DN |
11993 | #define _LARGEFILE_SOURCE 1 |
11994 | #include <sys/types.h> /* for off_t */ | |
11995 | #include <stdio.h> | |
5929fbe7 GM |
11996 | int |
11997 | main () | |
11998 | { | |
eb697db5 DN |
11999 | int (*fp) (FILE *, off_t, int) = fseeko; |
12000 | return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); | |
8c5ff6dd KR |
12001 | ; |
12002 | return 0; | |
12003 | } | |
08b47d3d | 12004 | _ACEOF |
eb697db5 DN |
12005 | if ac_fn_c_try_link "$LINENO"; then : |
12006 | ac_cv_sys_largefile_source=1; break | |
12007 | fi | |
12008 | rm -f core conftest.err conftest.$ac_objext \ | |
12009 | conftest$ac_exeext conftest.$ac_ext | |
12010 | ac_cv_sys_largefile_source=unknown | |
12011 | break | |
12012 | done | |
12013 | fi | |
12014 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5 | |
12015 | $as_echo "$ac_cv_sys_largefile_source" >&6; } | |
12016 | case $ac_cv_sys_largefile_source in #( | |
12017 | no | unknown) ;; | |
12018 | *) | |
12019 | cat >>confdefs.h <<_ACEOF | |
12020 | #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source | |
12021 | _ACEOF | |
12022 | ;; | |
5929fbe7 | 12023 | esac |
eb697db5 | 12024 | rm -rf conftest* |
a4f64981 | 12025 | |
eb697db5 DN |
12026 | # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug |
12027 | # in glibc 2.1.3, but that breaks too many other things. | |
12028 | # If you want fseeko and ftello with glibc, upgrade to a fixed glibc. | |
12029 | if test $ac_cv_sys_largefile_source != unknown; then | |
49ebbd65 | 12030 | |
eb697db5 | 12031 | $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h |
e6df49e4 | 12032 | |
5929fbe7 | 12033 | fi |
8c5ff6dd KR |
12034 | |
12035 | ||
eb697db5 DN |
12036 | # Configure getopt. |
12037 | # getopt.m4 serial 10 | |
8c5ff6dd | 12038 | |
eb697db5 DN |
12039 | # The getopt module assume you want GNU getopt, with getopt_long etc, |
12040 | # rather than vanilla POSIX getopt. This means your your code should | |
12041 | # always include <getopt.h> for the getopt prototypes. | |
15e12598 | 12042 | |
15e12598 | 12043 | |
a4f64981 | 12044 | |
8c5ff6dd | 12045 | |
5929fbe7 | 12046 | |
5929fbe7 | 12047 | |
5929fbe7 | 12048 | |
e6df49e4 | 12049 | |
49ebbd65 | 12050 | |
a4f64981 | 12051 | |
e6df49e4 | 12052 | |
eb697db5 DN |
12053 | # Prerequisites of lib/getopt*. |
12054 | ||
12055 | ||
12056 | ||
12057 | ||
12058 | GETOPT_H= | |
12059 | for ac_header in getopt.h | |
12060 | do : | |
12061 | ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default" | |
12062 | if test "x$ac_cv_header_getopt_h" = x""yes; then : | |
12063 | cat >>confdefs.h <<_ACEOF | |
12064 | #define HAVE_GETOPT_H 1 | |
12065 | _ACEOF | |
12066 | ||
5929fbe7 | 12067 | else |
eb697db5 | 12068 | GETOPT_H=getopt.h |
5929fbe7 | 12069 | fi |
a4f64981 | 12070 | |
eb697db5 DN |
12071 | done |
12072 | ||
12073 | if test -z "$GETOPT_H"; then | |
12074 | for ac_func in getopt_long_only | |
12075 | do : | |
12076 | ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only" | |
12077 | if test "x$ac_cv_func_getopt_long_only" = x""yes; then : | |
8c5ff6dd | 12078 | cat >>confdefs.h <<_ACEOF |
eb697db5 | 12079 | #define HAVE_GETOPT_LONG_ONLY 1 |
8c5ff6dd | 12080 | _ACEOF |
e6df49e4 | 12081 | |
8c5ff6dd | 12082 | else |
eb697db5 DN |
12083 | GETOPT_H=getopt.h |
12084 | fi | |
12085 | done | |
5929fbe7 | 12086 | |
eb697db5 DN |
12087 | fi |
12088 | ||
12089 | if test -z "$GETOPT_H"; then | |
12090 | ac_fn_c_check_decl "$LINENO" "optreset" "ac_cv_have_decl_optreset" "#include <getopt.h> | |
12091 | " | |
12092 | if test "x$ac_cv_have_decl_optreset" = x""yes; then : | |
12093 | GETOPT_H=getopt.h | |
12094 | fi | |
12095 | ||
12096 | fi | |
12097 | ||
12098 | if test -z "$GETOPT_H"; then | |
12099 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5 | |
12100 | $as_echo_n "checking for working GNU getopt function... " >&6; } | |
12101 | if test "${gl_cv_func_gnu_getopt+set}" = set; then : | |
a4f64981 | 12102 | $as_echo_n "(cached) " >&6 |
eb697db5 DN |
12103 | else |
12104 | if test "$cross_compiling" = yes; then : | |
12105 | ac_fn_c_check_decl "$LINENO" "getopt_clip" "ac_cv_have_decl_getopt_clip" "#include <getopt.h> | |
12106 | " | |
12107 | if test "x$ac_cv_have_decl_getopt_clip" = x""yes; then : | |
12108 | gl_cv_func_gnu_getopt=no | |
12109 | else | |
12110 | gl_cv_func_gnu_getopt=yes | |
5929fbe7 | 12111 | fi |
eb697db5 | 12112 | |
a4f64981 | 12113 | else |
eb697db5 | 12114 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
8c5ff6dd | 12115 | /* end confdefs.h. */ |
eb697db5 DN |
12116 | #include <getopt.h> |
12117 | int | |
12118 | main () | |
12119 | { | |
12120 | ||
12121 | char *myargv[3]; | |
12122 | myargv[0] = "conftest"; | |
12123 | myargv[1] = "-+"; | |
12124 | myargv[2] = 0; | |
12125 | return getopt (2, myargv, "+a") != '?'; | |
12126 | ||
12127 | ; | |
12128 | return 0; | |
12129 | } | |
5929fbe7 | 12130 | _ACEOF |
eb697db5 DN |
12131 | if ac_fn_c_try_run "$LINENO"; then : |
12132 | gl_cv_func_gnu_getopt=yes | |
5929fbe7 | 12133 | else |
eb697db5 DN |
12134 | gl_cv_func_gnu_getopt=no |
12135 | fi | |
12136 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
12137 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
12138 | fi | |
8c5ff6dd | 12139 | |
5929fbe7 | 12140 | fi |
eb697db5 DN |
12141 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gnu_getopt" >&5 |
12142 | $as_echo "$gl_cv_func_gnu_getopt" >&6; } | |
12143 | if test "$gl_cv_func_gnu_getopt" = "no"; then | |
12144 | GETOPT_H=getopt.h | |
12145 | fi | |
12146 | fi | |
5929fbe7 | 12147 | |
5929fbe7 | 12148 | |
a4f64981 | 12149 | |
eb697db5 | 12150 | if test -n "$GETOPT_H"; then : |
8c5ff6dd KR |
12151 | |
12152 | ||
eb697db5 | 12153 | GETOPT_H=getopt.h |
a5edbe4a | 12154 | |
eb697db5 | 12155 | $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h |
15e12598 | 12156 | |
49ebbd65 | 12157 | |
15e12598 | 12158 | |
eb697db5 DN |
12159 | : |
12160 | GETOPTOBJS='getopt.o getopt1.o' | |
a4f64981 | 12161 | |
8c5ff6dd | 12162 | fi |
e6df49e4 | 12163 | |
e6df49e4 | 12164 | |
eb697db5 DN |
12165 | |
12166 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getpgrp requires zero arguments" >&5 | |
12167 | $as_echo_n "checking whether getpgrp requires zero arguments... " >&6; } | |
12168 | if test "${ac_cv_func_getpgrp_void+set}" = set; then : | |
12169 | $as_echo_n "(cached) " >&6 | |
12170 | else | |
12171 | # Use it with a single arg. | |
12172 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5929fbe7 | 12173 | /* end confdefs.h. */ |
eb697db5 DN |
12174 | $ac_includes_default |
12175 | int | |
12176 | main () | |
12177 | { | |
12178 | getpgrp (0); | |
12179 | ; | |
12180 | return 0; | |
12181 | } | |
12182 | _ACEOF | |
12183 | if ac_fn_c_try_compile "$LINENO"; then : | |
12184 | ac_cv_func_getpgrp_void=no | |
5929fbe7 | 12185 | else |
eb697db5 DN |
12186 | ac_cv_func_getpgrp_void=yes |
12187 | fi | |
12188 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
a4f64981 | 12189 | |
5929fbe7 | 12190 | fi |
eb697db5 DN |
12191 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getpgrp_void" >&5 |
12192 | $as_echo "$ac_cv_func_getpgrp_void" >&6; } | |
12193 | if test $ac_cv_func_getpgrp_void = yes; then | |
8c5ff6dd | 12194 | |
eb697db5 | 12195 | $as_echo "#define GETPGRP_VOID 1" >>confdefs.h |
a4f64981 | 12196 | |
eb697db5 | 12197 | fi |
8c5ff6dd | 12198 | |
eb697db5 DN |
12199 | |
12200 | for ac_func in strftime | |
12201 | do : | |
12202 | ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime" | |
12203 | if test "x$ac_cv_func_strftime" = x""yes; then : | |
12204 | cat >>confdefs.h <<_ACEOF | |
12205 | #define HAVE_STRFTIME 1 | |
12206 | _ACEOF | |
12207 | ||
12208 | else | |
12209 | # strftime is in -lintl on SCO UNIX. | |
12210 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strftime in -lintl" >&5 | |
12211 | $as_echo_n "checking for strftime in -lintl... " >&6; } | |
12212 | if test "${ac_cv_lib_intl_strftime+set}" = set; then : | |
a4f64981 GM |
12213 | $as_echo_n "(cached) " >&6 |
12214 | else | |
eb697db5 DN |
12215 | ac_check_lib_save_LIBS=$LIBS |
12216 | LIBS="-lintl $LIBS" | |
12217 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12218 | /* end confdefs.h. */ | |
12219 | ||
12220 | /* Override any GCC internal prototype to avoid an error. | |
12221 | Use char because int might match the return type of a GCC | |
12222 | builtin and then its argument prototype would still apply. */ | |
12223 | #ifdef __cplusplus | |
12224 | extern "C" | |
12225 | #endif | |
12226 | char strftime (); | |
12227 | int | |
12228 | main () | |
12229 | { | |
12230 | return strftime (); | |
12231 | ; | |
12232 | return 0; | |
12233 | } | |
12234 | _ACEOF | |
12235 | if ac_fn_c_try_link "$LINENO"; then : | |
12236 | ac_cv_lib_intl_strftime=yes | |
12237 | else | |
12238 | ac_cv_lib_intl_strftime=no | |
12239 | fi | |
12240 | rm -f core conftest.err conftest.$ac_objext \ | |
12241 | conftest$ac_exeext conftest.$ac_ext | |
12242 | LIBS=$ac_check_lib_save_LIBS | |
12243 | fi | |
12244 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_strftime" >&5 | |
12245 | $as_echo "$ac_cv_lib_intl_strftime" >&6; } | |
12246 | if test "x$ac_cv_lib_intl_strftime" = x""yes; then : | |
12247 | $as_echo "#define HAVE_STRFTIME 1" >>confdefs.h | |
12248 | ||
12249 | LIBS="-lintl $LIBS" | |
5929fbe7 | 12250 | fi |
e6df49e4 | 12251 | |
5929fbe7 | 12252 | fi |
eb697db5 DN |
12253 | done |
12254 | ||
12255 | ||
12256 | # UNIX98 PTYs. | |
12257 | for ac_func in grantpt | |
12258 | do : | |
12259 | ac_fn_c_check_func "$LINENO" "grantpt" "ac_cv_func_grantpt" | |
12260 | if test "x$ac_cv_func_grantpt" = x""yes; then : | |
5929fbe7 | 12261 | cat >>confdefs.h <<_ACEOF |
eb697db5 | 12262 | #define HAVE_GRANTPT 1 |
a4f64981 | 12263 | _ACEOF |
5929fbe7 | 12264 | |
a4f64981 | 12265 | fi |
5929fbe7 GM |
12266 | done |
12267 | ||
8c5ff6dd | 12268 | |
eb697db5 DN |
12269 | # PTY-related GNU extensions. |
12270 | for ac_func in getpt | |
12271 | do : | |
12272 | ac_fn_c_check_func "$LINENO" "getpt" "ac_cv_func_getpt" | |
12273 | if test "x$ac_cv_func_getpt" = x""yes; then : | |
12274 | cat >>confdefs.h <<_ACEOF | |
12275 | #define HAVE_GETPT 1 | |
12276 | _ACEOF | |
8c5ff6dd | 12277 | |
5929fbe7 | 12278 | fi |
5929fbe7 | 12279 | done |
8c5ff6dd | 12280 | |
5929fbe7 | 12281 | |
eb697db5 DN |
12282 | # Check this now, so that we will NOT find the above functions in ncurses. |
12283 | # That is because we have not set up to link ncurses in lib-src. | |
12284 | # It's better to believe a function is not available | |
12285 | # than to expect to find it in ncurses. | |
12286 | # Also we need tputs and friends to be able to build at all. | |
12287 | have_tputs_et_al=true | |
12288 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tputs" >&5 | |
12289 | $as_echo_n "checking for library containing tputs... " >&6; } | |
12290 | if test "${ac_cv_search_tputs+set}" = set; then : | |
5929fbe7 | 12291 | $as_echo_n "(cached) " >&6 |
5929fbe7 | 12292 | else |
eb697db5 DN |
12293 | ac_func_search_save_LIBS=$LIBS |
12294 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5929fbe7 | 12295 | /* end confdefs.h. */ |
eb697db5 DN |
12296 | |
12297 | /* Override any GCC internal prototype to avoid an error. | |
12298 | Use char because int might match the return type of a GCC | |
12299 | builtin and then its argument prototype would still apply. */ | |
12300 | #ifdef __cplusplus | |
12301 | extern "C" | |
12302 | #endif | |
12303 | char tputs (); | |
12304 | int | |
12305 | main () | |
12306 | { | |
12307 | return tputs (); | |
12308 | ; | |
12309 | return 0; | |
12310 | } | |
5929fbe7 | 12311 | _ACEOF |
eb697db5 DN |
12312 | for ac_lib in '' ncurses terminfo termcap; do |
12313 | if test -z "$ac_lib"; then | |
12314 | ac_res="none required" | |
12315 | else | |
12316 | ac_res=-l$ac_lib | |
12317 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
12318 | fi | |
12319 | if ac_fn_c_try_link "$LINENO"; then : | |
12320 | ac_cv_search_tputs=$ac_res | |
12321 | fi | |
12322 | rm -f core conftest.err conftest.$ac_objext \ | |
12323 | conftest$ac_exeext | |
12324 | if test "${ac_cv_search_tputs+set}" = set; then : | |
12325 | break | |
12326 | fi | |
12327 | done | |
12328 | if test "${ac_cv_search_tputs+set}" = set; then : | |
12329 | ||
5929fbe7 | 12330 | else |
eb697db5 DN |
12331 | ac_cv_search_tputs=no |
12332 | fi | |
12333 | rm conftest.$ac_ext | |
12334 | LIBS=$ac_func_search_save_LIBS | |
12335 | fi | |
12336 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tputs" >&5 | |
12337 | $as_echo "$ac_cv_search_tputs" >&6; } | |
12338 | ac_res=$ac_cv_search_tputs | |
12339 | if test "$ac_res" != no; then : | |
12340 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
a4f64981 | 12341 | |
eb697db5 DN |
12342 | else |
12343 | have_tputs_et_al=false | |
5929fbe7 | 12344 | fi |
8c5ff6dd | 12345 | |
eb697db5 | 12346 | if test "$have_tputs_et_al" != true; then |
3d608a86 | 12347 | as_fn_error "I couldn't find termcap functions (tputs and friends). |
eb697db5 DN |
12348 | Maybe some development libraries/packages are missing? Try installing |
12349 | libncurses-dev(el), libterminfo-dev(el) or similar." "$LINENO" 5 | |
12350 | fi | |
12351 | # Must define this when any termcap library is found. | |
8c5ff6dd | 12352 | |
eb697db5 DN |
12353 | $as_echo "#define HAVE_LIBNCURSES 1" >>confdefs.h |
12354 | ||
12355 | ## FIXME This was the cpp logic, but I am not sure it is right. | |
12356 | ## The above test has not necessarily found libncurses. | |
12357 | HAVE_LIBNCURSES=yes | |
12358 | ||
12359 | ## Use terminfo instead of termcap? | |
12360 | ## Note only system files NOT using terminfo are: | |
12361 | ## freebsd < 40000, ms-w32, msdos, netbsd < 599002500, and | |
12362 | ## darwin|gnu without ncurses. | |
12363 | TERMINFO=no | |
12364 | LIBS_TERMCAP= | |
12365 | case "$opsys" in | |
12366 | ## cygwin: Fewer environment variables to go wrong, more terminal types. | |
12367 | ## hpux10-20: Use the system provided termcap(3) library. | |
12368 | ## openbsd: David Mazieres <dm@reeducation-labor.lcs.mit.edu> says this | |
12369 | ## is necessary. Otherwise Emacs dumps core when run -nw. | |
12370 | aix4-2|cygwin|hpux*|irix6-5|openbsd|sol2*|unixware) TERMINFO=yes ;; | |
12371 | ||
12372 | ## darwin: Prevents crashes when running Emacs in Terminal.app under 10.2. | |
12373 | ## The ncurses library has been moved out of the System framework in | |
12374 | ## Mac OS X 10.2. So if configure detects it, set the command-line | |
12375 | ## option to use it. | |
12376 | darwin|gnu*) | |
12377 | ## (HAVE_LIBNCURSES was not always true, but is since 2010-03-18.) | |
12378 | if test "x$HAVE_LIBNCURSES" = "xyes"; then | |
12379 | TERMINFO=yes | |
12380 | LIBS_TERMCAP="-lncurses" | |
12381 | fi | |
12382 | ;; | |
12383 | ||
12384 | freebsd) | |
12385 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether FreeBSD is new enough to use terminfo" >&5 | |
12386 | $as_echo_n "checking whether FreeBSD is new enough to use terminfo... " >&6; } | |
12387 | if test "${emacs_cv_freebsd_terminfo+set}" = set; then : | |
12388 | $as_echo_n "(cached) " >&6 | |
12389 | else | |
12390 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5929fbe7 | 12391 | /* end confdefs.h. */ |
eb697db5 DN |
12392 | #include <osreldate.h> |
12393 | int | |
12394 | main () | |
12395 | { | |
12396 | #if __FreeBSD_version < 400000 | |
12397 | fail; | |
12398 | #endif | |
12399 | ||
12400 | ; | |
12401 | return 0; | |
12402 | } | |
5929fbe7 | 12403 | _ACEOF |
eb697db5 DN |
12404 | if ac_fn_c_try_link "$LINENO"; then : |
12405 | emacs_cv_freebsd_terminfo=yes | |
5929fbe7 | 12406 | else |
eb697db5 DN |
12407 | emacs_cv_freebsd_terminfo=no |
12408 | fi | |
12409 | rm -f core conftest.err conftest.$ac_objext \ | |
12410 | conftest$ac_exeext conftest.$ac_ext | |
5929fbe7 | 12411 | fi |
8c5ff6dd KR |
12412 | |
12413 | ||
eb697db5 DN |
12414 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_freebsd_terminfo" >&5 |
12415 | $as_echo "$emacs_cv_freebsd_terminfo" >&6; } | |
12416 | ||
12417 | if test $emacs_cv_freebsd_terminfo = yes; then | |
12418 | TERMINFO=yes | |
12419 | LIBS_TERMCAP="-lncurses" | |
12420 | else | |
12421 | LIBS_TERMCAP="-ltermcap" | |
12422 | fi | |
5929fbe7 | 12423 | ;; |
8c5ff6dd | 12424 | |
eb697db5 DN |
12425 | netbsd) |
12426 | if test $ac_cv_search_tputs = -lterminfo; then | |
12427 | TERMINFO=yes | |
12428 | LIBS_TERMCAP="-lterminfo" | |
12429 | else | |
12430 | LIBS_TERMCAP="-ltermcap" | |
12431 | fi | |
5929fbe7 | 12432 | ;; |
eb697db5 | 12433 | |
5929fbe7 | 12434 | esac |
a4f64981 | 12435 | |
eb697db5 DN |
12436 | case "$opsys" in |
12437 | ## hpux: Make sure we get select from libc rather than from libcurses | |
12438 | ## because libcurses on HPUX 10.10 has a broken version of select. | |
12439 | ## We used to use -lc -lcurses, but this may be cleaner. | |
12440 | hpux*) LIBS_TERMCAP="-ltermcap" ;; | |
a4f64981 | 12441 | |
eb697db5 DN |
12442 | openbsd) LIBS_TERMCAP="-lncurses" ;; |
12443 | ||
12444 | ## Must use system termcap, if we use any termcap. It does special things. | |
12445 | sol2*) test "$TERMINFO" != yes && LIBS_TERMCAP="-ltermcap" ;; | |
12446 | esac | |
12447 | ||
12448 | TERMCAP_OBJ=tparam.o | |
12449 | if test $TERMINFO = yes; then | |
12450 | ||
12451 | $as_echo "#define TERMINFO 1" >>confdefs.h | |
8c5ff6dd | 12452 | |
5929fbe7 | 12453 | |
eb697db5 DN |
12454 | ## Default used to be -ltermcap. Add a case above if need something else. |
12455 | test "x$LIBS_TERMCAP" = "x" && LIBS_TERMCAP="-lcurses" | |
12456 | ||
12457 | TERMCAP_OBJ=terminfo.o | |
8c5ff6dd | 12458 | fi |
5929fbe7 | 12459 | |
5929fbe7 | 12460 | |
eb697db5 DN |
12461 | |
12462 | ||
12463 | # Do we have res_init, for detecting changes in /etc/resolv.conf? | |
12464 | resolv=no | |
12465 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12466 | /* end confdefs.h. */ | |
12467 | #include <netinet/in.h> | |
12468 | #include <arpa/nameser.h> | |
12469 | #include <resolv.h> | |
12470 | int | |
12471 | main () | |
12472 | { | |
12473 | return res_init(); | |
12474 | ; | |
12475 | return 0; | |
12476 | } | |
5929fbe7 | 12477 | _ACEOF |
eb697db5 DN |
12478 | if ac_fn_c_try_link "$LINENO"; then : |
12479 | have_res_init=yes | |
12480 | else | |
12481 | have_res_init=no | |
12482 | fi | |
12483 | rm -f core conftest.err conftest.$ac_objext \ | |
12484 | conftest$ac_exeext conftest.$ac_ext | |
12485 | if test "$have_res_init" = no; then | |
12486 | OLIBS="$LIBS" | |
12487 | LIBS="$LIBS -lresolv" | |
12488 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_init with -lresolv" >&5 | |
12489 | $as_echo_n "checking for res_init with -lresolv... " >&6; } | |
12490 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
aaa36002 | 12491 | /* end confdefs.h. */ |
eb697db5 DN |
12492 | #include <netinet/in.h> |
12493 | #include <arpa/nameser.h> | |
12494 | #include <resolv.h> | |
12495 | int | |
12496 | main () | |
12497 | { | |
12498 | return res_init(); | |
12499 | ; | |
12500 | return 0; | |
12501 | } | |
aaa36002 | 12502 | _ACEOF |
eb697db5 DN |
12503 | if ac_fn_c_try_link "$LINENO"; then : |
12504 | have_res_init=yes | |
7186fb09 | 12505 | else |
eb697db5 DN |
12506 | have_res_init=no |
12507 | fi | |
12508 | rm -f core conftest.err conftest.$ac_objext \ | |
12509 | conftest$ac_exeext conftest.$ac_ext | |
12510 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_res_init" >&5 | |
12511 | $as_echo "$have_res_init" >&6; } | |
12512 | if test "$have_res_init" = yes ; then | |
12513 | resolv=yes | |
12514 | fi | |
12515 | LIBS="$OLIBS" | |
6da23aaa | 12516 | fi |
bf89cb4d | 12517 | |
eb697db5 | 12518 | if test "$have_res_init" = yes; then |
ca81d7a0 | 12519 | |
eb697db5 | 12520 | $as_echo "#define HAVE_RES_INIT 1" >>confdefs.h |
7186fb09 | 12521 | |
6da23aaa | 12522 | fi |
ca81d7a0 | 12523 | |
eb697db5 DN |
12524 | # Do we need the Hesiod library to provide the support routines? |
12525 | LIBHESIOD= | |
12526 | if test "$with_hesiod" != no ; then | |
12527 | # Don't set $LIBS here -- see comments above. FIXME which comments? | |
12528 | ac_fn_c_check_func "$LINENO" "res_send" "ac_cv_func_res_send" | |
12529 | if test "x$ac_cv_func_res_send" = x""yes; then : | |
7186fb09 | 12530 | |
aaa36002 | 12531 | else |
eb697db5 DN |
12532 | ac_fn_c_check_func "$LINENO" "__res_send" "ac_cv_func___res_send" |
12533 | if test "x$ac_cv_func___res_send" = x""yes; then : | |
6da23aaa | 12534 | |
eb697db5 DN |
12535 | else |
12536 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_send in -lresolv" >&5 | |
12537 | $as_echo_n "checking for res_send in -lresolv... " >&6; } | |
12538 | if test "${ac_cv_lib_resolv_res_send+set}" = set; then : | |
6da23aaa EZ |
12539 | $as_echo_n "(cached) " >&6 |
12540 | else | |
eb697db5 DN |
12541 | ac_check_lib_save_LIBS=$LIBS |
12542 | LIBS="-lresolv $LIBS" | |
12543 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bf89cb4d | 12544 | /* end confdefs.h. */ |
eb697db5 DN |
12545 | |
12546 | /* Override any GCC internal prototype to avoid an error. | |
12547 | Use char because int might match the return type of a GCC | |
12548 | builtin and then its argument prototype would still apply. */ | |
12549 | #ifdef __cplusplus | |
12550 | extern "C" | |
12551 | #endif | |
12552 | char res_send (); | |
12553 | int | |
12554 | main () | |
12555 | { | |
12556 | return res_send (); | |
12557 | ; | |
12558 | return 0; | |
12559 | } | |
7186fb09 | 12560 | _ACEOF |
eb697db5 DN |
12561 | if ac_fn_c_try_link "$LINENO"; then : |
12562 | ac_cv_lib_resolv_res_send=yes | |
7186fb09 | 12563 | else |
eb697db5 | 12564 | ac_cv_lib_resolv_res_send=no |
8c5ff6dd | 12565 | fi |
eb697db5 DN |
12566 | rm -f core conftest.err conftest.$ac_objext \ |
12567 | conftest$ac_exeext conftest.$ac_ext | |
12568 | LIBS=$ac_check_lib_save_LIBS | |
12569 | fi | |
12570 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_send" >&5 | |
12571 | $as_echo "$ac_cv_lib_resolv_res_send" >&6; } | |
12572 | if test "x$ac_cv_lib_resolv_res_send" = x""yes; then : | |
12573 | resolv=yes | |
12574 | else | |
12575 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __res_send in -lresolv" >&5 | |
12576 | $as_echo_n "checking for __res_send in -lresolv... " >&6; } | |
12577 | if test "${ac_cv_lib_resolv___res_send+set}" = set; then : | |
12578 | $as_echo_n "(cached) " >&6 | |
12579 | else | |
12580 | ac_check_lib_save_LIBS=$LIBS | |
12581 | LIBS="-lresolv $LIBS" | |
12582 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5929fbe7 | 12583 | /* end confdefs.h. */ |
eb697db5 DN |
12584 | |
12585 | /* Override any GCC internal prototype to avoid an error. | |
12586 | Use char because int might match the return type of a GCC | |
12587 | builtin and then its argument prototype would still apply. */ | |
12588 | #ifdef __cplusplus | |
12589 | extern "C" | |
12590 | #endif | |
12591 | char __res_send (); | |
12592 | int | |
12593 | main () | |
12594 | { | |
12595 | return __res_send (); | |
12596 | ; | |
12597 | return 0; | |
12598 | } | |
5929fbe7 | 12599 | _ACEOF |
eb697db5 DN |
12600 | if ac_fn_c_try_link "$LINENO"; then : |
12601 | ac_cv_lib_resolv___res_send=yes | |
9452ded1 | 12602 | else |
eb697db5 | 12603 | ac_cv_lib_resolv___res_send=no |
aaa36002 | 12604 | fi |
eb697db5 DN |
12605 | rm -f core conftest.err conftest.$ac_objext \ |
12606 | conftest$ac_exeext conftest.$ac_ext | |
12607 | LIBS=$ac_check_lib_save_LIBS | |
aaa36002 | 12608 | fi |
eb697db5 DN |
12609 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv___res_send" >&5 |
12610 | $as_echo "$ac_cv_lib_resolv___res_send" >&6; } | |
12611 | if test "x$ac_cv_lib_resolv___res_send" = x""yes; then : | |
12612 | resolv=yes | |
aaa36002 | 12613 | fi |
7186fb09 | 12614 | |
9452ded1 | 12615 | fi |
7186fb09 | 12616 | |
aaa36002 | 12617 | fi |
7186fb09 | 12618 | |
aaa36002 | 12619 | fi |
7186fb09 | 12620 | |
eb697db5 DN |
12621 | if test "$resolv" = yes ; then |
12622 | RESOLVLIB=-lresolv | |
12623 | else | |
12624 | RESOLVLIB= | |
aaa36002 | 12625 | fi |
eb697db5 DN |
12626 | ac_fn_c_check_func "$LINENO" "hes_getmailhost" "ac_cv_func_hes_getmailhost" |
12627 | if test "x$ac_cv_func_hes_getmailhost" = x""yes; then : | |
aaa36002 | 12628 | |
eb697db5 DN |
12629 | else |
12630 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hes_getmailhost in -lhesiod" >&5 | |
12631 | $as_echo_n "checking for hes_getmailhost in -lhesiod... " >&6; } | |
12632 | if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then : | |
7186fb09 | 12633 | $as_echo_n "(cached) " >&6 |
ba4481b5 | 12634 | else |
eb697db5 DN |
12635 | ac_check_lib_save_LIBS=$LIBS |
12636 | LIBS="-lhesiod $RESOLVLIB $LIBS" | |
12637 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
aaa36002 | 12638 | /* end confdefs.h. */ |
5929fbe7 | 12639 | |
eb697db5 DN |
12640 | /* Override any GCC internal prototype to avoid an error. |
12641 | Use char because int might match the return type of a GCC | |
12642 | builtin and then its argument prototype would still apply. */ | |
12643 | #ifdef __cplusplus | |
12644 | extern "C" | |
12645 | #endif | |
12646 | char hes_getmailhost (); | |
12647 | int | |
12648 | main () | |
12649 | { | |
12650 | return hes_getmailhost (); | |
12651 | ; | |
12652 | return 0; | |
12653 | } | |
5929fbe7 | 12654 | _ACEOF |
eb697db5 DN |
12655 | if ac_fn_c_try_link "$LINENO"; then : |
12656 | ac_cv_lib_hesiod_hes_getmailhost=yes | |
12657 | else | |
12658 | ac_cv_lib_hesiod_hes_getmailhost=no | |
e6df49e4 | 12659 | fi |
eb697db5 DN |
12660 | rm -f core conftest.err conftest.$ac_objext \ |
12661 | conftest$ac_exeext conftest.$ac_ext | |
12662 | LIBS=$ac_check_lib_save_LIBS | |
12663 | fi | |
12664 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5 | |
12665 | $as_echo "$ac_cv_lib_hesiod_hes_getmailhost" >&6; } | |
12666 | if test "x$ac_cv_lib_hesiod_hes_getmailhost" = x""yes; then : | |
12667 | hesiod=yes | |
5929fbe7 | 12668 | else |
eb697db5 | 12669 | : |
8c5ff6dd | 12670 | fi |
a5edbe4a | 12671 | |
5929fbe7 | 12672 | fi |
cd03c74a | 12673 | |
8732a4e9 | 12674 | |
eb697db5 | 12675 | if test x"$hesiod" = xyes; then |
49ebbd65 | 12676 | |
eb697db5 | 12677 | $as_echo "#define HAVE_LIBHESIOD 1" >>confdefs.h |
a5edbe4a | 12678 | |
eb697db5 DN |
12679 | LIBHESIOD=-lhesiod |
12680 | fi | |
12681 | fi | |
e6df49e4 | 12682 | |
a4f64981 | 12683 | |
eb697db5 DN |
12684 | # Do we need libresolv (due to res_init or Hesiod)? |
12685 | if test "$resolv" = yes ; then | |
49ebbd65 | 12686 | |
eb697db5 | 12687 | $as_echo "#define HAVE_LIBRESOLV 1" >>confdefs.h |
15e12598 | 12688 | |
eb697db5 DN |
12689 | LIBRESOLV=-lresolv |
12690 | else | |
12691 | LIBRESOLV= | |
12692 | fi | |
8c5ff6dd | 12693 | |
e6df49e4 | 12694 | |
eb697db5 DN |
12695 | # These tell us which Kerberos-related libraries to use. |
12696 | COM_ERRLIB= | |
12697 | CRYPTOLIB= | |
12698 | KRB5LIB= | |
12699 | DESLIB= | |
12700 | KRB4LIB= | |
5929fbe7 | 12701 | |
eb697db5 DN |
12702 | if test "${with_kerberos}" != no; then |
12703 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for com_err in -lcom_err" >&5 | |
12704 | $as_echo_n "checking for com_err in -lcom_err... " >&6; } | |
12705 | if test "${ac_cv_lib_com_err_com_err+set}" = set; then : | |
49ebbd65 | 12706 | $as_echo_n "(cached) " >&6 |
cd03c74a | 12707 | else |
8c5ff6dd | 12708 | ac_check_lib_save_LIBS=$LIBS |
eb697db5 DN |
12709 | LIBS="-lcom_err $LIBS" |
12710 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
49ebbd65 | 12711 | /* end confdefs.h. */ |
8c5ff6dd KR |
12712 | |
12713 | /* Override any GCC internal prototype to avoid an error. | |
12714 | Use char because int might match the return type of a GCC | |
12715 | builtin and then its argument prototype would still apply. */ | |
12716 | #ifdef __cplusplus | |
12717 | extern "C" | |
12718 | #endif | |
eb697db5 | 12719 | char com_err (); |
8c5ff6dd KR |
12720 | int |
12721 | main () | |
a4f64981 | 12722 | { |
eb697db5 | 12723 | return com_err (); |
8c5ff6dd KR |
12724 | ; |
12725 | return 0; | |
49ebbd65 | 12726 | } |
a5edbe4a | 12727 | _ACEOF |
eb697db5 DN |
12728 | if ac_fn_c_try_link "$LINENO"; then : |
12729 | ac_cv_lib_com_err_com_err=yes | |
49ebbd65 | 12730 | else |
eb697db5 | 12731 | ac_cv_lib_com_err_com_err=no |
8c5ff6dd | 12732 | fi |
eb697db5 DN |
12733 | rm -f core conftest.err conftest.$ac_objext \ |
12734 | conftest$ac_exeext conftest.$ac_ext | |
8c5ff6dd | 12735 | LIBS=$ac_check_lib_save_LIBS |
49ebbd65 | 12736 | fi |
eb697db5 DN |
12737 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_com_err_com_err" >&5 |
12738 | $as_echo "$ac_cv_lib_com_err_com_err" >&6; } | |
12739 | if test "x$ac_cv_lib_com_err_com_err" = x""yes; then : | |
12740 | have_com_err=yes | |
12741 | else | |
12742 | have_com_err=no | |
5929fbe7 | 12743 | fi |
49ebbd65 | 12744 | |
eb697db5 DN |
12745 | if test $have_com_err = yes; then |
12746 | COM_ERRLIB=-lcom_err | |
12747 | LIBS="$COM_ERRLIB $LIBS" | |
5929fbe7 | 12748 | |
eb697db5 DN |
12749 | $as_echo "#define HAVE_LIBCOM_ERR 1" >>confdefs.h |
12750 | ||
12751 | fi | |
12752 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lcrypto" >&5 | |
12753 | $as_echo_n "checking for mit_des_cbc_encrypt in -lcrypto... " >&6; } | |
12754 | if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then : | |
8c5ff6dd | 12755 | $as_echo_n "(cached) " >&6 |
15e12598 | 12756 | else |
eb697db5 DN |
12757 | ac_check_lib_save_LIBS=$LIBS |
12758 | LIBS="-lcrypto $LIBS" | |
12759 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8c5ff6dd | 12760 | /* end confdefs.h. */ |
eb697db5 DN |
12761 | |
12762 | /* Override any GCC internal prototype to avoid an error. | |
12763 | Use char because int might match the return type of a GCC | |
12764 | builtin and then its argument prototype would still apply. */ | |
12765 | #ifdef __cplusplus | |
12766 | extern "C" | |
12767 | #endif | |
12768 | char mit_des_cbc_encrypt (); | |
12769 | int | |
12770 | main () | |
5929fbe7 | 12771 | { |
eb697db5 DN |
12772 | return mit_des_cbc_encrypt (); |
12773 | ; | |
12774 | return 0; | |
8c5ff6dd | 12775 | } |
a4f64981 | 12776 | _ACEOF |
eb697db5 DN |
12777 | if ac_fn_c_try_link "$LINENO"; then : |
12778 | ac_cv_lib_crypto_mit_des_cbc_encrypt=yes | |
8c5ff6dd | 12779 | else |
eb697db5 | 12780 | ac_cv_lib_crypto_mit_des_cbc_encrypt=no |
8c5ff6dd | 12781 | fi |
eb697db5 DN |
12782 | rm -f core conftest.err conftest.$ac_objext \ |
12783 | conftest$ac_exeext conftest.$ac_ext | |
12784 | LIBS=$ac_check_lib_save_LIBS | |
12785 | fi | |
12786 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5 | |
12787 | $as_echo "$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6; } | |
12788 | if test "x$ac_cv_lib_crypto_mit_des_cbc_encrypt" = x""yes; then : | |
12789 | have_crypto=yes | |
12790 | else | |
12791 | have_crypto=no | |
a4f64981 | 12792 | fi |
15e12598 | 12793 | |
eb697db5 DN |
12794 | if test $have_crypto = yes; then |
12795 | CRYPTOLIB=-lcrypto | |
12796 | LIBS="$CRYPTOLIB $LIBS" | |
12797 | ||
12798 | $as_echo "#define HAVE_LIBCRYPTO 1" >>confdefs.h | |
e6df49e4 | 12799 | |
eb697db5 DN |
12800 | fi |
12801 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lk5crypto" >&5 | |
12802 | $as_echo_n "checking for mit_des_cbc_encrypt in -lk5crypto... " >&6; } | |
12803 | if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then : | |
12804 | $as_echo_n "(cached) " >&6 | |
8c5ff6dd | 12805 | else |
eb697db5 DN |
12806 | ac_check_lib_save_LIBS=$LIBS |
12807 | LIBS="-lk5crypto $LIBS" | |
12808 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12809 | /* end confdefs.h. */ | |
8c5ff6dd | 12810 | |
eb697db5 DN |
12811 | /* Override any GCC internal prototype to avoid an error. |
12812 | Use char because int might match the return type of a GCC | |
12813 | builtin and then its argument prototype would still apply. */ | |
12814 | #ifdef __cplusplus | |
12815 | extern "C" | |
12816 | #endif | |
12817 | char mit_des_cbc_encrypt (); | |
12818 | int | |
12819 | main () | |
12820 | { | |
12821 | return mit_des_cbc_encrypt (); | |
12822 | ; | |
12823 | return 0; | |
12824 | } | |
5929fbe7 | 12825 | _ACEOF |
eb697db5 DN |
12826 | if ac_fn_c_try_link "$LINENO"; then : |
12827 | ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes | |
12828 | else | |
12829 | ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no | |
12830 | fi | |
12831 | rm -f core conftest.err conftest.$ac_objext \ | |
12832 | conftest$ac_exeext conftest.$ac_ext | |
12833 | LIBS=$ac_check_lib_save_LIBS | |
12834 | fi | |
12835 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5 | |
12836 | $as_echo "$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6; } | |
12837 | if test "x$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" = x""yes; then : | |
12838 | have_k5crypto=yes | |
12839 | else | |
12840 | have_k5crypto=no | |
5929fbe7 | 12841 | fi |
8c5ff6dd | 12842 | |
eb697db5 DN |
12843 | if test $have_k5crypto = yes; then |
12844 | CRYPTOLIB=-lk5crypto | |
12845 | LIBS="$CRYPTOLIB $LIBS" | |
5929fbe7 | 12846 | |
eb697db5 DN |
12847 | $as_echo "#define HAVE_LIBK5CRYPTO 1" >>confdefs.h |
12848 | ||
12849 | fi | |
12850 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5_init_context in -lkrb5" >&5 | |
12851 | $as_echo_n "checking for krb5_init_context in -lkrb5... " >&6; } | |
12852 | if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then : | |
8c5ff6dd KR |
12853 | $as_echo_n "(cached) " >&6 |
12854 | else | |
eb697db5 DN |
12855 | ac_check_lib_save_LIBS=$LIBS |
12856 | LIBS="-lkrb5 $LIBS" | |
12857 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8c5ff6dd | 12858 | /* end confdefs.h. */ |
5929fbe7 | 12859 | |
eb697db5 DN |
12860 | /* Override any GCC internal prototype to avoid an error. |
12861 | Use char because int might match the return type of a GCC | |
12862 | builtin and then its argument prototype would still apply. */ | |
12863 | #ifdef __cplusplus | |
12864 | extern "C" | |
5929fbe7 | 12865 | #endif |
eb697db5 DN |
12866 | char krb5_init_context (); |
12867 | int | |
12868 | main () | |
12869 | { | |
12870 | return krb5_init_context (); | |
12871 | ; | |
12872 | return 0; | |
12873 | } | |
12874 | _ACEOF | |
12875 | if ac_fn_c_try_link "$LINENO"; then : | |
12876 | ac_cv_lib_krb5_krb5_init_context=yes | |
12877 | else | |
12878 | ac_cv_lib_krb5_krb5_init_context=no | |
12879 | fi | |
12880 | rm -f core conftest.err conftest.$ac_objext \ | |
12881 | conftest$ac_exeext conftest.$ac_ext | |
12882 | LIBS=$ac_check_lib_save_LIBS | |
12883 | fi | |
12884 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb5_krb5_init_context" >&5 | |
12885 | $as_echo "$ac_cv_lib_krb5_krb5_init_context" >&6; } | |
12886 | if test "x$ac_cv_lib_krb5_krb5_init_context" = x""yes; then : | |
12887 | have_krb5=yes | |
12888 | else | |
12889 | have_krb5=no | |
12890 | fi | |
12891 | ||
12892 | if test $have_krb5=yes; then | |
12893 | KRB5LIB=-lkrb5 | |
12894 | LIBS="$KRB5LIB $LIBS" | |
12895 | ||
12896 | $as_echo "#define HAVE_LIBKRB5 1" >>confdefs.h | |
5929fbe7 | 12897 | |
eb697db5 DN |
12898 | fi |
12899 | if test "${with_kerberos5}" = no; then | |
12900 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes425" >&5 | |
12901 | $as_echo_n "checking for des_cbc_encrypt in -ldes425... " >&6; } | |
12902 | if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then : | |
12903 | $as_echo_n "(cached) " >&6 | |
12904 | else | |
12905 | ac_check_lib_save_LIBS=$LIBS | |
12906 | LIBS="-ldes425 $LIBS" | |
12907 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12908 | /* end confdefs.h. */ | |
aaa36002 DN |
12909 | |
12910 | /* Override any GCC internal prototype to avoid an error. | |
12911 | Use char because int might match the return type of a GCC | |
12912 | builtin and then its argument prototype would still apply. */ | |
12913 | #ifdef __cplusplus | |
12914 | extern "C" | |
7186fb09 | 12915 | #endif |
eb697db5 | 12916 | char des_cbc_encrypt (); |
0ca10bb7 RC |
12917 | int |
12918 | main () | |
12919 | { | |
eb697db5 | 12920 | return des_cbc_encrypt (); |
0ca10bb7 RC |
12921 | ; |
12922 | return 0; | |
12923 | } | |
12924 | _ACEOF | |
eb697db5 DN |
12925 | if ac_fn_c_try_link "$LINENO"; then : |
12926 | ac_cv_lib_des425_des_cbc_encrypt=yes | |
8c5ff6dd | 12927 | else |
eb697db5 | 12928 | ac_cv_lib_des425_des_cbc_encrypt=no |
a4f64981 | 12929 | fi |
eb697db5 DN |
12930 | rm -f core conftest.err conftest.$ac_objext \ |
12931 | conftest$ac_exeext conftest.$ac_ext | |
12932 | LIBS=$ac_check_lib_save_LIBS | |
5929fbe7 | 12933 | fi |
eb697db5 DN |
12934 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5 |
12935 | $as_echo "$ac_cv_lib_des425_des_cbc_encrypt" >&6; } | |
12936 | if test "x$ac_cv_lib_des425_des_cbc_encrypt" = x""yes; then : | |
12937 | have_des425=yes | |
12938 | else | |
12939 | have_des425=no | |
5929fbe7 | 12940 | fi |
8c5ff6dd | 12941 | |
eb697db5 DN |
12942 | if test $have_des425 = yes; then |
12943 | DESLIB=-ldes425 | |
12944 | LIBS="$DESLIB $LIBS" | |
12945 | ||
12946 | $as_echo "#define HAVE_LIBDES425 1" >>confdefs.h | |
12947 | ||
12948 | else | |
12949 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes" >&5 | |
12950 | $as_echo_n "checking for des_cbc_encrypt in -ldes... " >&6; } | |
12951 | if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then : | |
0ca10bb7 RC |
12952 | $as_echo_n "(cached) " >&6 |
12953 | else | |
eb697db5 DN |
12954 | ac_check_lib_save_LIBS=$LIBS |
12955 | LIBS="-ldes $LIBS" | |
12956 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
0ca10bb7 | 12957 | /* end confdefs.h. */ |
edfaf76d | 12958 | |
eb697db5 DN |
12959 | /* Override any GCC internal prototype to avoid an error. |
12960 | Use char because int might match the return type of a GCC | |
12961 | builtin and then its argument prototype would still apply. */ | |
12962 | #ifdef __cplusplus | |
12963 | extern "C" | |
503d2be0 | 12964 | #endif |
eb697db5 | 12965 | char des_cbc_encrypt (); |
19650fd6 AS |
12966 | int |
12967 | main () | |
12968 | { | |
eb697db5 | 12969 | return des_cbc_encrypt (); |
503d2be0 AS |
12970 | ; |
12971 | return 0; | |
12972 | } | |
12973 | _ACEOF | |
eb697db5 DN |
12974 | if ac_fn_c_try_link "$LINENO"; then : |
12975 | ac_cv_lib_des_des_cbc_encrypt=yes | |
8c5ff6dd | 12976 | else |
eb697db5 | 12977 | ac_cv_lib_des_des_cbc_encrypt=no |
a4f64981 | 12978 | fi |
eb697db5 DN |
12979 | rm -f core conftest.err conftest.$ac_objext \ |
12980 | conftest$ac_exeext conftest.$ac_ext | |
12981 | LIBS=$ac_check_lib_save_LIBS | |
12982 | fi | |
12983 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des_des_cbc_encrypt" >&5 | |
12984 | $as_echo "$ac_cv_lib_des_des_cbc_encrypt" >&6; } | |
12985 | if test "x$ac_cv_lib_des_des_cbc_encrypt" = x""yes; then : | |
12986 | have_des=yes | |
12987 | else | |
12988 | have_des=no | |
5929fbe7 | 12989 | fi |
e6df49e4 | 12990 | |
eb697db5 DN |
12991 | if test $have_des = yes; then |
12992 | DESLIB=-ldes | |
12993 | LIBS="$DESLIB $LIBS" | |
a4f64981 | 12994 | |
eb697db5 | 12995 | $as_echo "#define HAVE_LIBDES 1" >>confdefs.h |
5929fbe7 | 12996 | |
eb697db5 DN |
12997 | fi |
12998 | fi | |
12999 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb4" >&5 | |
13000 | $as_echo_n "checking for krb_get_cred in -lkrb4... " >&6; } | |
13001 | if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then : | |
e9a63f04 | 13002 | $as_echo_n "(cached) " >&6 |
ba4481b5 | 13003 | else |
eb697db5 DN |
13004 | ac_check_lib_save_LIBS=$LIBS |
13005 | LIBS="-lkrb4 $LIBS" | |
13006 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
19650fd6 | 13007 | /* end confdefs.h. */ |
ba4481b5 | 13008 | |
0ca10bb7 RC |
13009 | /* Override any GCC internal prototype to avoid an error. |
13010 | Use char because int might match the return type of a GCC | |
13011 | builtin and then its argument prototype would still apply. */ | |
13012 | #ifdef __cplusplus | |
13013 | extern "C" | |
a3f08d9e | 13014 | #endif |
eb697db5 | 13015 | char krb_get_cred (); |
503d2be0 AS |
13016 | int |
13017 | main () | |
13018 | { | |
eb697db5 | 13019 | return krb_get_cred (); |
503d2be0 AS |
13020 | ; |
13021 | return 0; | |
13022 | } | |
13023 | _ACEOF | |
eb697db5 DN |
13024 | if ac_fn_c_try_link "$LINENO"; then : |
13025 | ac_cv_lib_krb4_krb_get_cred=yes | |
bf89cb4d | 13026 | else |
eb697db5 | 13027 | ac_cv_lib_krb4_krb_get_cred=no |
91e84f96 | 13028 | fi |
eb697db5 DN |
13029 | rm -f core conftest.err conftest.$ac_objext \ |
13030 | conftest$ac_exeext conftest.$ac_ext | |
13031 | LIBS=$ac_check_lib_save_LIBS | |
91e84f96 | 13032 | fi |
eb697db5 DN |
13033 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb4_krb_get_cred" >&5 |
13034 | $as_echo "$ac_cv_lib_krb4_krb_get_cred" >&6; } | |
13035 | if test "x$ac_cv_lib_krb4_krb_get_cred" = x""yes; then : | |
13036 | have_krb4=yes | |
bf89cb4d | 13037 | else |
eb697db5 | 13038 | have_krb4=no |
91e84f96 GM |
13039 | fi |
13040 | ||
eb697db5 DN |
13041 | if test $have_krb4 = yes; then |
13042 | KRB4LIB=-lkrb4 | |
13043 | LIBS="$KRB4LIB $LIBS" | |
13044 | ||
13045 | $as_echo "#define HAVE_LIBKRB4 1" >>confdefs.h | |
13046 | ||
13047 | else | |
13048 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb" >&5 | |
13049 | $as_echo_n "checking for krb_get_cred in -lkrb... " >&6; } | |
13050 | if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then : | |
bf89cb4d | 13051 | $as_echo_n "(cached) " >&6 |
bf89cb4d | 13052 | else |
eb697db5 DN |
13053 | ac_check_lib_save_LIBS=$LIBS |
13054 | LIBS="-lkrb $LIBS" | |
13055 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bf89cb4d | 13056 | /* end confdefs.h. */ |
a4f64981 | 13057 | |
eb697db5 DN |
13058 | /* Override any GCC internal prototype to avoid an error. |
13059 | Use char because int might match the return type of a GCC | |
13060 | builtin and then its argument prototype would still apply. */ | |
13061 | #ifdef __cplusplus | |
13062 | extern "C" | |
13063 | #endif | |
13064 | char krb_get_cred (); | |
13065 | int | |
13066 | main () | |
13067 | { | |
13068 | return krb_get_cred (); | |
13069 | ; | |
13070 | return 0; | |
13071 | } | |
5929fbe7 | 13072 | _ACEOF |
eb697db5 DN |
13073 | if ac_fn_c_try_link "$LINENO"; then : |
13074 | ac_cv_lib_krb_krb_get_cred=yes | |
5929fbe7 | 13075 | else |
eb697db5 | 13076 | ac_cv_lib_krb_krb_get_cred=no |
a4f64981 | 13077 | fi |
eb697db5 DN |
13078 | rm -f core conftest.err conftest.$ac_objext \ |
13079 | conftest$ac_exeext conftest.$ac_ext | |
13080 | LIBS=$ac_check_lib_save_LIBS | |
5929fbe7 | 13081 | fi |
eb697db5 DN |
13082 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb_krb_get_cred" >&5 |
13083 | $as_echo "$ac_cv_lib_krb_krb_get_cred" >&6; } | |
13084 | if test "x$ac_cv_lib_krb_krb_get_cred" = x""yes; then : | |
13085 | have_krb=yes | |
91e84f96 | 13086 | else |
eb697db5 | 13087 | have_krb=no |
6da23aaa | 13088 | fi |
0ca10bb7 | 13089 | |
eb697db5 DN |
13090 | if test $have_krb = yes; then |
13091 | KRB4LIB=-lkrb | |
13092 | LIBS="$KRB4LIB $LIBS" | |
2d2b6695 | 13093 | |
eb697db5 | 13094 | $as_echo "#define HAVE_LIBKRB 1" >>confdefs.h |
ca81d7a0 | 13095 | |
eb697db5 DN |
13096 | fi |
13097 | fi | |
13098 | fi | |
ca81d7a0 | 13099 | |
eb697db5 DN |
13100 | if test "${with_kerberos5}" != no; then |
13101 | for ac_header in krb5.h | |
13102 | do : | |
13103 | ac_fn_c_check_header_mongrel "$LINENO" "krb5.h" "ac_cv_header_krb5_h" "$ac_includes_default" | |
13104 | if test "x$ac_cv_header_krb5_h" = x""yes; then : | |
13105 | cat >>confdefs.h <<_ACEOF | |
13106 | #define HAVE_KRB5_H 1 | |
6da23aaa | 13107 | _ACEOF |
eb697db5 DN |
13108 | ac_fn_c_check_member "$LINENO" "krb5_error" "text" "ac_cv_member_krb5_error_text" "#include <krb5.h> |
13109 | " | |
13110 | if test "x$ac_cv_member_krb5_error_text" = x""yes; then : | |
13111 | ||
13112 | cat >>confdefs.h <<_ACEOF | |
13113 | #define HAVE_KRB5_ERROR_TEXT 1 | |
bf89cb4d | 13114 | _ACEOF |
2d2b6695 | 13115 | |
eb697db5 | 13116 | |
2d2b6695 | 13117 | fi |
eb697db5 DN |
13118 | ac_fn_c_check_member "$LINENO" "krb5_error" "e_text" "ac_cv_member_krb5_error_e_text" "#include <krb5.h> |
13119 | " | |
13120 | if test "x$ac_cv_member_krb5_error_e_text" = x""yes; then : | |
6da23aaa | 13121 | |
eb697db5 DN |
13122 | cat >>confdefs.h <<_ACEOF |
13123 | #define HAVE_KRB5_ERROR_E_TEXT 1 | |
13124 | _ACEOF | |
0ca10bb7 | 13125 | |
0ca10bb7 | 13126 | |
bf89cb4d | 13127 | fi |
2d2b6695 KS |
13128 | |
13129 | fi | |
13130 | ||
eb697db5 DN |
13131 | done |
13132 | ||
13133 | else | |
13134 | for ac_header in des.h | |
13135 | do : | |
13136 | ac_fn_c_check_header_mongrel "$LINENO" "des.h" "ac_cv_header_des_h" "$ac_includes_default" | |
13137 | if test "x$ac_cv_header_des_h" = x""yes; then : | |
13138 | cat >>confdefs.h <<_ACEOF | |
13139 | #define HAVE_DES_H 1 | |
13140 | _ACEOF | |
8c5ff6dd | 13141 | |
eb697db5 DN |
13142 | else |
13143 | for ac_header in kerberosIV/des.h | |
13144 | do : | |
13145 | ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/des.h" "ac_cv_header_kerberosIV_des_h" "$ac_includes_default" | |
13146 | if test "x$ac_cv_header_kerberosIV_des_h" = x""yes; then : | |
13147 | cat >>confdefs.h <<_ACEOF | |
13148 | #define HAVE_KERBEROSIV_DES_H 1 | |
13149 | _ACEOF | |
6da23aaa | 13150 | |
eb697db5 DN |
13151 | else |
13152 | for ac_header in kerberos/des.h | |
13153 | do : | |
13154 | ac_fn_c_check_header_mongrel "$LINENO" "kerberos/des.h" "ac_cv_header_kerberos_des_h" "$ac_includes_default" | |
13155 | if test "x$ac_cv_header_kerberos_des_h" = x""yes; then : | |
13156 | cat >>confdefs.h <<_ACEOF | |
13157 | #define HAVE_KERBEROS_DES_H 1 | |
6da23aaa | 13158 | _ACEOF |
3d9fec71 | 13159 | |
3d9fec71 DL |
13160 | fi |
13161 | ||
eb697db5 | 13162 | done |
0ca10bb7 | 13163 | |
0ca10bb7 | 13164 | fi |
6da23aaa | 13165 | |
eb697db5 DN |
13166 | done |
13167 | ||
0ca10bb7 | 13168 | fi |
6da23aaa | 13169 | |
eb697db5 | 13170 | done |
6da23aaa | 13171 | |
eb697db5 DN |
13172 | for ac_header in krb.h |
13173 | do : | |
13174 | ac_fn_c_check_header_mongrel "$LINENO" "krb.h" "ac_cv_header_krb_h" "$ac_includes_default" | |
13175 | if test "x$ac_cv_header_krb_h" = x""yes; then : | |
13176 | cat >>confdefs.h <<_ACEOF | |
13177 | #define HAVE_KRB_H 1 | |
6da23aaa | 13178 | _ACEOF |
eb697db5 DN |
13179 | |
13180 | else | |
13181 | for ac_header in kerberosIV/krb.h | |
13182 | do : | |
13183 | ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/krb.h" "ac_cv_header_kerberosIV_krb_h" "$ac_includes_default" | |
13184 | if test "x$ac_cv_header_kerberosIV_krb_h" = x""yes; then : | |
13185 | cat >>confdefs.h <<_ACEOF | |
13186 | #define HAVE_KERBEROSIV_KRB_H 1 | |
6da23aaa | 13187 | _ACEOF |
eb697db5 | 13188 | |
6da23aaa | 13189 | else |
eb697db5 DN |
13190 | for ac_header in kerberos/krb.h |
13191 | do : | |
13192 | ac_fn_c_check_header_mongrel "$LINENO" "kerberos/krb.h" "ac_cv_header_kerberos_krb_h" "$ac_includes_default" | |
13193 | if test "x$ac_cv_header_kerberos_krb_h" = x""yes; then : | |
13194 | cat >>confdefs.h <<_ACEOF | |
13195 | #define HAVE_KERBEROS_KRB_H 1 | |
13196 | _ACEOF | |
0ca10bb7 | 13197 | |
0ca10bb7 RC |
13198 | fi |
13199 | ||
eb697db5 | 13200 | done |
15e12598 | 13201 | |
a4f64981 | 13202 | fi |
eb697db5 DN |
13203 | |
13204 | done | |
8c5ff6dd | 13205 | |
5929fbe7 | 13206 | fi |
eb697db5 DN |
13207 | |
13208 | done | |
13209 | ||
13210 | fi | |
13211 | for ac_header in com_err.h | |
13212 | do : | |
13213 | ac_fn_c_check_header_mongrel "$LINENO" "com_err.h" "ac_cv_header_com_err_h" "$ac_includes_default" | |
13214 | if test "x$ac_cv_header_com_err_h" = x""yes; then : | |
6da23aaa | 13215 | cat >>confdefs.h <<_ACEOF |
eb697db5 | 13216 | #define HAVE_COM_ERR_H 1 |
0ca10bb7 RC |
13217 | _ACEOF |
13218 | ||
13219 | fi | |
0ca10bb7 | 13220 | |
6da23aaa EZ |
13221 | done |
13222 | ||
eb697db5 | 13223 | fi |
6da23aaa | 13224 | |
6da23aaa | 13225 | |
91e84f96 | 13226 | |
6da23aaa | 13227 | |
6da23aaa | 13228 | |
6da23aaa EZ |
13229 | |
13230 | ||
eb697db5 DN |
13231 | # Solaris requires -lintl if you want strerror (which calls dgettext) |
13232 | # to return localized messages. | |
13233 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dgettext in -lintl" >&5 | |
13234 | $as_echo_n "checking for dgettext in -lintl... " >&6; } | |
13235 | if test "${ac_cv_lib_intl_dgettext+set}" = set; then : | |
6da23aaa EZ |
13236 | $as_echo_n "(cached) " >&6 |
13237 | else | |
eb697db5 DN |
13238 | ac_check_lib_save_LIBS=$LIBS |
13239 | LIBS="-lintl $LIBS" | |
13240 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bf89cb4d | 13241 | /* end confdefs.h. */ |
eb697db5 DN |
13242 | |
13243 | /* Override any GCC internal prototype to avoid an error. | |
13244 | Use char because int might match the return type of a GCC | |
13245 | builtin and then its argument prototype would still apply. */ | |
13246 | #ifdef __cplusplus | |
13247 | extern "C" | |
13248 | #endif | |
13249 | char dgettext (); | |
91e84f96 GM |
13250 | int |
13251 | main () | |
6da23aaa | 13252 | { |
eb697db5 | 13253 | return dgettext (); |
91e84f96 GM |
13254 | ; |
13255 | return 0; | |
6da23aaa EZ |
13256 | } |
13257 | _ACEOF | |
eb697db5 DN |
13258 | if ac_fn_c_try_link "$LINENO"; then : |
13259 | ac_cv_lib_intl_dgettext=yes | |
13260 | else | |
13261 | ac_cv_lib_intl_dgettext=no | |
13262 | fi | |
13263 | rm -f core conftest.err conftest.$ac_objext \ | |
13264 | conftest$ac_exeext conftest.$ac_ext | |
13265 | LIBS=$ac_check_lib_save_LIBS | |
13266 | fi | |
13267 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_dgettext" >&5 | |
13268 | $as_echo "$ac_cv_lib_intl_dgettext" >&6; } | |
13269 | if test "x$ac_cv_lib_intl_dgettext" = x""yes; then : | |
13270 | cat >>confdefs.h <<_ACEOF | |
13271 | #define HAVE_LIBINTL 1 | |
8c5ff6dd | 13272 | _ACEOF |
eb697db5 DN |
13273 | |
13274 | LIBS="-lintl $LIBS" | |
13275 | ||
13276 | fi | |
13277 | ||
13278 | ||
13279 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime caches TZ" >&5 | |
13280 | $as_echo_n "checking whether localtime caches TZ... " >&6; } | |
13281 | if test "${emacs_cv_localtime_cache+set}" = set; then : | |
13282 | $as_echo_n "(cached) " >&6 | |
13283 | else | |
13284 | if test x$ac_cv_func_tzset = xyes; then | |
13285 | if test "$cross_compiling" = yes; then : | |
13286 | # If we have tzset, assume the worst when cross-compiling. | |
13287 | emacs_cv_localtime_cache=yes | |
13288 | else | |
13289 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8c5ff6dd | 13290 | /* end confdefs.h. */ |
eb697db5 DN |
13291 | #include <time.h> |
13292 | extern char **environ; | |
13293 | unset_TZ () | |
13294 | { | |
13295 | char **from, **to; | |
13296 | for (to = from = environ; (*to = *from); from++) | |
13297 | if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '=')) | |
13298 | to++; | |
13299 | } | |
13300 | char TZ_GMT0[] = "TZ=GMT0"; | |
13301 | char TZ_PST8[] = "TZ=PST8"; | |
13302 | main() | |
13303 | { | |
13304 | time_t now = time ((time_t *) 0); | |
13305 | int hour_GMT0, hour_unset; | |
13306 | if (putenv (TZ_GMT0) != 0) | |
13307 | exit (1); | |
13308 | hour_GMT0 = localtime (&now)->tm_hour; | |
13309 | unset_TZ (); | |
13310 | hour_unset = localtime (&now)->tm_hour; | |
13311 | if (putenv (TZ_PST8) != 0) | |
13312 | exit (1); | |
13313 | if (localtime (&now)->tm_hour == hour_GMT0) | |
13314 | exit (1); | |
13315 | unset_TZ (); | |
13316 | if (localtime (&now)->tm_hour != hour_unset) | |
13317 | exit (1); | |
13318 | exit (0); | |
13319 | } | |
13320 | _ACEOF | |
13321 | if ac_fn_c_try_run "$LINENO"; then : | |
13322 | emacs_cv_localtime_cache=no | |
13323 | else | |
13324 | emacs_cv_localtime_cache=yes | |
13325 | fi | |
13326 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
13327 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
13328 | fi | |
13329 | ||
13330 | else | |
13331 | # If we lack tzset, report that localtime does not cache TZ, | |
13332 | # since we can't invalidate the cache if we don't have tzset. | |
13333 | emacs_cv_localtime_cache=no | |
13334 | fi | |
13335 | fi | |
13336 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_localtime_cache" >&5 | |
13337 | $as_echo "$emacs_cv_localtime_cache" >&6; } | |
13338 | if test $emacs_cv_localtime_cache = yes; then | |
13339 | ||
13340 | $as_echo "#define LOCALTIME_CACHE 1" >>confdefs.h | |
13341 | ||
13342 | fi | |
13343 | ||
13344 | if test "x$HAVE_TIMEVAL" = xyes; then | |
13345 | for ac_func in gettimeofday | |
13346 | do : | |
13347 | ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday" | |
13348 | if test "x$ac_cv_func_gettimeofday" = x""yes; then : | |
13349 | cat >>confdefs.h <<_ACEOF | |
13350 | #define HAVE_GETTIMEOFDAY 1 | |
13351 | _ACEOF | |
13352 | ||
13353 | fi | |
13354 | done | |
13355 | ||
13356 | if test $ac_cv_func_gettimeofday = yes; then | |
13357 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday can accept two arguments" >&5 | |
13358 | $as_echo_n "checking whether gettimeofday can accept two arguments... " >&6; } | |
13359 | if test "${emacs_cv_gettimeofday_two_arguments+set}" = set; then : | |
13360 | $as_echo_n "(cached) " >&6 | |
13361 | else | |
13362 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13363 | /* end confdefs.h. */ | |
13364 | ||
13365 | #ifdef TIME_WITH_SYS_TIME | |
13366 | #include <sys/time.h> | |
13367 | #include <time.h> | |
13368 | #else | |
13369 | #ifdef HAVE_SYS_TIME_H | |
13370 | #include <sys/time.h> | |
13371 | #else | |
13372 | #include <time.h> | |
13373 | #endif | |
13374 | #endif | |
aaa36002 DN |
13375 | int |
13376 | main () | |
a4f64981 | 13377 | { |
eb697db5 DN |
13378 | struct timeval time; |
13379 | gettimeofday (&time, 0); | |
aaa36002 DN |
13380 | ; |
13381 | return 0; | |
eb697db5 DN |
13382 | } |
13383 | _ACEOF | |
13384 | if ac_fn_c_try_compile "$LINENO"; then : | |
13385 | emacs_cv_gettimeofday_two_arguments=yes | |
e9a63f04 | 13386 | else |
eb697db5 | 13387 | emacs_cv_gettimeofday_two_arguments=no |
e9a63f04 | 13388 | fi |
e9a63f04 | 13389 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
eb697db5 DN |
13390 | fi |
13391 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_gettimeofday_two_arguments" >&5 | |
13392 | $as_echo "$emacs_cv_gettimeofday_two_arguments" >&6; } | |
13393 | if test $emacs_cv_gettimeofday_two_arguments = no; then | |
19650fd6 | 13394 | |
eb697db5 | 13395 | $as_echo "#define GETTIMEOFDAY_ONE_ARGUMENT 1" >>confdefs.h |
e9a63f04 | 13396 | |
eb697db5 DN |
13397 | fi |
13398 | fi | |
647847ea | 13399 | fi |
ca81d7a0 | 13400 | |
eb697db5 DN |
13401 | ok_so_far=yes |
13402 | ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket" | |
13403 | if test "x$ac_cv_func_socket" = x""yes; then : | |
13404 | ||
5929fbe7 | 13405 | else |
eb697db5 DN |
13406 | ok_so_far=no |
13407 | fi | |
503d2be0 | 13408 | |
eb697db5 DN |
13409 | if test $ok_so_far = yes; then |
13410 | ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default" | |
13411 | if test "x$ac_cv_header_netinet_in_h" = x""yes; then : | |
647847ea | 13412 | |
eb697db5 DN |
13413 | else |
13414 | ok_so_far=no | |
647847ea DL |
13415 | fi |
13416 | ||
c0d27fcc | 13417 | |
c0d27fcc | 13418 | fi |
eb697db5 DN |
13419 | if test $ok_so_far = yes; then |
13420 | ac_fn_c_check_header_mongrel "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$ac_includes_default" | |
13421 | if test "x$ac_cv_header_arpa_inet_h" = x""yes; then : | |
5929fbe7 | 13422 | |
eb697db5 DN |
13423 | else |
13424 | ok_so_far=no | |
c0d27fcc | 13425 | fi |
ca81d7a0 | 13426 | |
19650fd6 | 13427 | |
647847ea | 13428 | fi |
eb697db5 | 13429 | if test $ok_so_far = yes; then |
ca81d7a0 | 13430 | |
eb697db5 | 13431 | $as_echo "#define HAVE_INET_SOCKETS 1" >>confdefs.h |
ca81d7a0 | 13432 | |
647847ea | 13433 | fi |
c0d27fcc | 13434 | |
eb697db5 DN |
13435 | for ac_header in sys/ioctl.h |
13436 | do : | |
13437 | ac_fn_c_check_header_mongrel "$LINENO" "sys/ioctl.h" "ac_cv_header_sys_ioctl_h" "$ac_includes_default" | |
13438 | if test "x$ac_cv_header_sys_ioctl_h" = x""yes; then : | |
c0d27fcc | 13439 | cat >>confdefs.h <<_ACEOF |
eb697db5 | 13440 | #define HAVE_SYS_IOCTL_H 1 |
c0d27fcc | 13441 | _ACEOF |
647847ea | 13442 | |
73b77ee5 | 13443 | fi |
c0d27fcc | 13444 | |
503d2be0 | 13445 | done |
73b77ee5 | 13446 | |
c0d27fcc | 13447 | |
eb697db5 | 13448 | if test -f /usr/lpp/X11/bin/smt.exp; then |
15e12598 | 13449 | |
eb697db5 | 13450 | $as_echo "#define HAVE_AIX_SMT_EXP 1" >>confdefs.h |
8c5ff6dd | 13451 | |
eb697db5 | 13452 | fi |
49ebbd65 | 13453 | |
eb697db5 DN |
13454 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system supports dynamic ptys" >&5 |
13455 | $as_echo_n "checking whether system supports dynamic ptys... " >&6; } | |
13456 | if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then | |
13457 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
13458 | $as_echo "yes" >&6; } | |
15e12598 | 13459 | |
eb697db5 | 13460 | $as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h |
8c5ff6dd | 13461 | |
eb697db5 DN |
13462 | else |
13463 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
13464 | $as_echo "no" >&6; } | |
13465 | fi | |
13466 | ||
13467 | ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" | |
13468 | if test "x$ac_cv_type_pid_t" = x""yes; then : | |
15e12598 | 13469 | |
5929fbe7 | 13470 | else |
8c5ff6dd | 13471 | |
eb697db5 DN |
13472 | cat >>confdefs.h <<_ACEOF |
13473 | #define pid_t int | |
13474 | _ACEOF | |
13475 | ||
a4f64981 | 13476 | fi |
8c5ff6dd | 13477 | |
eb697db5 DN |
13478 | for ac_header in vfork.h |
13479 | do : | |
13480 | ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default" | |
13481 | if test "x$ac_cv_header_vfork_h" = x""yes; then : | |
13482 | cat >>confdefs.h <<_ACEOF | |
13483 | #define HAVE_VFORK_H 1 | |
13484 | _ACEOF | |
13485 | ||
5929fbe7 | 13486 | fi |
eb697db5 DN |
13487 | |
13488 | done | |
13489 | ||
13490 | for ac_func in fork vfork | |
13491 | do : | |
13492 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
13493 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
3d608a86 J |
13494 | eval as_val=\$$as_ac_var |
13495 | if test "x$as_val" = x""yes; then : | |
c0d27fcc | 13496 | cat >>confdefs.h <<_ACEOF |
e9a63f04 | 13497 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 |
c0d27fcc | 13498 | _ACEOF |
503d2be0 | 13499 | |
fa0b693c | 13500 | fi |
503d2be0 | 13501 | done |
fa0b693c | 13502 | |
503d2be0 | 13503 | if test "x$ac_cv_func_fork" = xyes; then |
eb697db5 | 13504 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 |
e9a63f04 | 13505 | $as_echo_n "checking for working fork... " >&6; } |
eb697db5 | 13506 | if test "${ac_cv_func_fork_works+set}" = set; then : |
e9a63f04 | 13507 | $as_echo_n "(cached) " >&6 |
fa0b693c | 13508 | else |
eb697db5 | 13509 | if test "$cross_compiling" = yes; then : |
503d2be0 AS |
13510 | ac_cv_func_fork_works=cross |
13511 | else | |
eb697db5 | 13512 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
ca81d7a0 JD |
13513 | /* end confdefs.h. */ |
13514 | $ac_includes_default | |
13515 | int | |
13516 | main () | |
13517 | { | |
13518 | ||
13519 | /* By Ruediger Kuhlmann. */ | |
13520 | return fork () < 0; | |
13521 | ||
13522 | ; | |
13523 | return 0; | |
13524 | } | |
503d2be0 | 13525 | _ACEOF |
eb697db5 | 13526 | if ac_fn_c_try_run "$LINENO"; then : |
503d2be0 AS |
13527 | ac_cv_func_fork_works=yes |
13528 | else | |
eb697db5 | 13529 | ac_cv_func_fork_works=no |
503d2be0 | 13530 | fi |
eb697db5 DN |
13531 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
13532 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
503d2be0 | 13533 | fi |
ca81d7a0 | 13534 | |
503d2be0 | 13535 | fi |
eb697db5 | 13536 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5 |
e9a63f04 | 13537 | $as_echo "$ac_cv_func_fork_works" >&6; } |
503d2be0 | 13538 | |
6bae0ccf DL |
13539 | else |
13540 | ac_cv_func_fork_works=$ac_cv_func_fork | |
503d2be0 AS |
13541 | fi |
13542 | if test "x$ac_cv_func_fork_works" = xcross; then | |
13543 | case $host in | |
13544 | *-*-amigaos* | *-*-msdosdjgpp*) | |
13545 | # Override, as these systems have only a dummy fork() stub | |
13546 | ac_cv_func_fork_works=no | |
13547 | ;; | |
13548 | *) | |
13549 | ac_cv_func_fork_works=yes | |
13550 | ;; | |
13551 | esac | |
eb697db5 | 13552 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 |
e9a63f04 | 13553 | $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} |
fa0b693c | 13554 | fi |
73b77ee5 | 13555 | ac_cv_func_vfork_works=$ac_cv_func_vfork |
503d2be0 | 13556 | if test "x$ac_cv_func_vfork" = xyes; then |
eb697db5 | 13557 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 |
e9a63f04 | 13558 | $as_echo_n "checking for working vfork... " >&6; } |
eb697db5 | 13559 | if test "${ac_cv_func_vfork_works+set}" = set; then : |
e9a63f04 | 13560 | $as_echo_n "(cached) " >&6 |
503d2be0 | 13561 | else |
eb697db5 | 13562 | if test "$cross_compiling" = yes; then : |
503d2be0 | 13563 | ac_cv_func_vfork_works=cross |
fa0b693c | 13564 | else |
eb697db5 | 13565 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
19650fd6 | 13566 | /* end confdefs.h. */ |
73b77ee5 | 13567 | /* Thanks to Paul Eggert for this test. */ |
ca81d7a0 | 13568 | $ac_includes_default |
19650fd6 | 13569 | #include <sys/wait.h> |
f053c89f | 13570 | #ifdef HAVE_VFORK_H |
503d2be0 | 13571 | # include <vfork.h> |
73b77ee5 GM |
13572 | #endif |
13573 | /* On some sparc systems, changes by the child to local and incoming | |
503d2be0 AS |
13574 | argument registers are propagated back to the parent. The compiler |
13575 | is told about this with #include <vfork.h>, but some compilers | |
13576 | (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a | |
13577 | static variable whose address is put into a register that is | |
13578 | clobbered by the vfork. */ | |
19650fd6 | 13579 | static void |
fa0b693c | 13580 | #ifdef __cplusplus |
73b77ee5 | 13581 | sparc_address_test (int arg) |
503d2be0 | 13582 | # else |
73b77ee5 | 13583 | sparc_address_test (arg) int arg; |
fa0b693c | 13584 | #endif |
fa0b693c | 13585 | { |
73b77ee5 GM |
13586 | static pid_t child; |
13587 | if (!child) { | |
13588 | child = vfork (); | |
13589 | if (child < 0) { | |
13590 | perror ("vfork"); | |
13591 | _exit(2); | |
13592 | } | |
13593 | if (!child) { | |
13594 | arg = getpid(); | |
13595 | write(-1, "", 0); | |
13596 | _exit (arg); | |
13597 | } | |
13598 | } | |
13599 | } | |
503d2be0 AS |
13600 | |
13601 | int | |
13602 | main () | |
13603 | { | |
73b77ee5 GM |
13604 | pid_t parent = getpid (); |
13605 | pid_t child; | |
fa0b693c | 13606 | |
19650fd6 | 13607 | sparc_address_test (0); |
fa0b693c | 13608 | |
73b77ee5 | 13609 | child = vfork (); |
fa0b693c | 13610 | |
73b77ee5 | 13611 | if (child == 0) { |
503d2be0 AS |
13612 | /* Here is another test for sparc vfork register problems. This |
13613 | test uses lots of local variables, at least as many local | |
13614 | variables as main has allocated so far including compiler | |
13615 | temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris | |
13616 | 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should | |
13617 | reuse the register of parent for one of the local variables, | |
13618 | since it will think that parent can't possibly be used any more | |
13619 | in this routine. Assigning to the local variable will thus | |
13620 | munge parent in the parent process. */ | |
73b77ee5 GM |
13621 | pid_t |
13622 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
13623 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
13624 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
13625 | use the same hardware register for all 8 local variables. */ | |
13626 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
13627 | || p != p5 || p != p6 || p != p7) | |
13628 | _exit(1); | |
fa0b693c | 13629 | |
503d2be0 AS |
13630 | /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent |
13631 | from child file descriptors. If the child closes a descriptor | |
13632 | before it execs or exits, this munges the parent's descriptor | |
13633 | as well. Test for this by closing stdout in the child. */ | |
73b77ee5 GM |
13634 | _exit(close(fileno(stdout)) != 0); |
13635 | } else { | |
13636 | int status; | |
13637 | struct stat st; | |
13638 | ||
13639 | while (wait(&status) != child) | |
13640 | ; | |
ca81d7a0 | 13641 | return ( |
73b77ee5 GM |
13642 | /* Was there some problem with vforking? */ |
13643 | child < 0 | |
13644 | ||
13645 | /* Did the child fail? (This shouldn't happen.) */ | |
13646 | || status | |
13647 | ||
13648 | /* Did the vfork/compiler bug occur? */ | |
13649 | || parent != getpid() | |
fa0b693c | 13650 | |
73b77ee5 GM |
13651 | /* Did the file descriptor bug occur? */ |
13652 | || fstat(fileno(stdout), &st) != 0 | |
13653 | ); | |
13654 | } | |
13655 | } | |
503d2be0 | 13656 | _ACEOF |
eb697db5 | 13657 | if ac_fn_c_try_run "$LINENO"; then : |
73b77ee5 | 13658 | ac_cv_func_vfork_works=yes |
fa0b693c | 13659 | else |
eb697db5 | 13660 | ac_cv_func_vfork_works=no |
503d2be0 | 13661 | fi |
eb697db5 DN |
13662 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
13663 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
fa0b693c | 13664 | fi |
ca81d7a0 | 13665 | |
fa0b693c | 13666 | fi |
eb697db5 | 13667 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 |
e9a63f04 | 13668 | $as_echo "$ac_cv_func_vfork_works" >&6; } |
fa0b693c | 13669 | |
503d2be0 AS |
13670 | fi; |
13671 | if test "x$ac_cv_func_fork_works" = xcross; then | |
edfaf76d | 13672 | ac_cv_func_vfork_works=$ac_cv_func_vfork |
eb697db5 | 13673 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 |
e9a63f04 | 13674 | $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} |
fa0b693c GM |
13675 | fi |
13676 | ||
503d2be0 AS |
13677 | if test "x$ac_cv_func_vfork_works" = xyes; then |
13678 | ||
eb697db5 | 13679 | $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h |
503d2be0 AS |
13680 | |
13681 | else | |
13682 | ||
eb697db5 | 13683 | $as_echo "#define vfork fork" >>confdefs.h |
fa0b693c GM |
13684 | |
13685 | fi | |
503d2be0 AS |
13686 | if test "x$ac_cv_func_fork_works" = xyes; then |
13687 | ||
eb697db5 | 13688 | $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h |
fa0b693c | 13689 | |
503d2be0 | 13690 | fi |
647847ea | 13691 | |
c0d27fcc | 13692 | |
eb697db5 | 13693 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 |
e9a63f04 | 13694 | $as_echo_n "checking for nl_langinfo and CODESET... " >&6; } |
eb697db5 | 13695 | if test "${emacs_cv_langinfo_codeset+set}" = set; then : |
e9a63f04 | 13696 | $as_echo_n "(cached) " >&6 |
6a3a24fa | 13697 | else |
eb697db5 | 13698 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
19650fd6 | 13699 | /* end confdefs.h. */ |
6a3a24fa JD |
13700 | #include <langinfo.h> |
13701 | int | |
13702 | main () | |
13703 | { | |
13704 | char* cs = nl_langinfo(CODESET); | |
15e12598 VB |
13705 | ; |
13706 | return 0; | |
8c5ff6dd | 13707 | } |
eb697db5 DN |
13708 | _ACEOF |
13709 | if ac_fn_c_try_link "$LINENO"; then : | |
13710 | emacs_cv_langinfo_codeset=yes | |
5929fbe7 | 13711 | else |
eb697db5 | 13712 | emacs_cv_langinfo_codeset=no |
8c5ff6dd | 13713 | fi |
eb697db5 DN |
13714 | rm -f core conftest.err conftest.$ac_objext \ |
13715 | conftest$ac_exeext conftest.$ac_ext | |
a4f64981 | 13716 | |
eb697db5 DN |
13717 | fi |
13718 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_langinfo_codeset" >&5 | |
13719 | $as_echo "$emacs_cv_langinfo_codeset" >&6; } | |
13720 | if test $emacs_cv_langinfo_codeset = yes; then | |
5929fbe7 | 13721 | |
eb697db5 | 13722 | $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h |
e9a63f04 | 13723 | |
8730a8da | 13724 | fi |
dc2933eb | 13725 | |
eb697db5 DN |
13726 | ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" |
13727 | if test "x$ac_cv_type_size_t" = x""yes; then : | |
503d2be0 | 13728 | |
c0d27fcc MR |
13729 | cat >>confdefs.h <<_ACEOF |
13730 | #define HAVE_SIZE_T 1 | |
13731 | _ACEOF | |
13732 | ||
8730a8da DL |
13733 | |
13734 | fi | |
13735 | ||
c0d27fcc | 13736 | |
eb697db5 | 13737 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5 |
e9a63f04 | 13738 | $as_echo_n "checking for mbstate_t... " >&6; } |
eb697db5 | 13739 | if test "${ac_cv_type_mbstate_t+set}" = set; then : |
e9a63f04 | 13740 | $as_echo_n "(cached) " >&6 |
973a76b1 | 13741 | else |
eb697db5 | 13742 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
19650fd6 | 13743 | /* end confdefs.h. */ |
973a76b1 DL |
13744 | $ac_includes_default |
13745 | # include <wchar.h> | |
13746 | int | |
13747 | main () | |
13748 | { | |
13749 | mbstate_t x; return sizeof x; | |
13750 | ; | |
13751 | return 0; | |
13752 | } | |
13753 | _ACEOF | |
eb697db5 | 13754 | if ac_fn_c_try_compile "$LINENO"; then : |
973a76b1 DL |
13755 | ac_cv_type_mbstate_t=yes |
13756 | else | |
eb697db5 | 13757 | ac_cv_type_mbstate_t=no |
973a76b1 | 13758 | fi |
ca81d7a0 | 13759 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
973a76b1 | 13760 | fi |
eb697db5 | 13761 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5 |
e9a63f04 | 13762 | $as_echo "$ac_cv_type_mbstate_t" >&6; } |
973a76b1 DL |
13763 | if test $ac_cv_type_mbstate_t = yes; then |
13764 | ||
eb697db5 | 13765 | $as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h |
973a76b1 DL |
13766 | |
13767 | else | |
13768 | ||
eb697db5 | 13769 | $as_echo "#define mbstate_t int" >>confdefs.h |
973a76b1 DL |
13770 | |
13771 | fi | |
13772 | ||
eb697db5 | 13773 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C restrict keyword" >&5 |
e9a63f04 | 13774 | $as_echo_n "checking for C restrict keyword... " >&6; } |
eb697db5 | 13775 | if test "${emacs_cv_c_restrict+set}" = set; then : |
e9a63f04 | 13776 | $as_echo_n "(cached) " >&6 |
22044edf | 13777 | else |
eb697db5 | 13778 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
19650fd6 | 13779 | /* end confdefs.h. */ |
22044edf DL |
13780 | void fred (int *restrict x); |
13781 | int | |
13782 | main () | |
13783 | { | |
b936fae4 | 13784 | |
22044edf DL |
13785 | ; |
13786 | return 0; | |
13787 | } | |
c0d27fcc | 13788 | _ACEOF |
eb697db5 | 13789 | if ac_fn_c_try_compile "$LINENO"; then : |
22044edf DL |
13790 | emacs_cv_c_restrict=yes |
13791 | else | |
eb697db5 | 13792 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
19650fd6 | 13793 | /* end confdefs.h. */ |
22044edf DL |
13794 | void fred (int *__restrict x); |
13795 | int | |
13796 | main () | |
13797 | { | |
c0d27fcc | 13798 | |
22044edf DL |
13799 | ; |
13800 | return 0; | |
13801 | } | |
c0d27fcc | 13802 | _ACEOF |
eb697db5 | 13803 | if ac_fn_c_try_compile "$LINENO"; then : |
22044edf DL |
13804 | emacs_cv_c_restrict=__restrict |
13805 | else | |
eb697db5 | 13806 | emacs_cv_c_restrict=no |
ba4481b5 | 13807 | fi |
ca81d7a0 | 13808 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
ba4481b5 | 13809 | fi |
ca81d7a0 | 13810 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
ba4481b5 | 13811 | fi |
eb697db5 | 13812 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_c_restrict" >&5 |
e9a63f04 | 13813 | $as_echo "$emacs_cv_c_restrict" >&6; } |
22044edf DL |
13814 | case "$emacs_cv_c_restrict" in |
13815 | yes) emacs_restrict=restrict;; | |
13816 | no) emacs_restrict="";; | |
13817 | *) emacs_restrict="$emacs_cv_c_restrict";; | |
13818 | esac | |
13819 | if test "$emacs_restrict" != __restrict; then | |
b936fae4 | 13820 | |
22044edf DL |
13821 | cat >>confdefs.h <<_ACEOF |
13822 | #define __restrict $emacs_restrict | |
c0d27fcc | 13823 | _ACEOF |
ba4481b5 DL |
13824 | |
13825 | fi | |
ba4481b5 | 13826 | |
eb697db5 | 13827 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C restricted array declarations" >&5 |
e9a63f04 | 13828 | $as_echo_n "checking for C restricted array declarations... " >&6; } |
eb697db5 | 13829 | if test "${emacs_cv_c_restrict_arr+set}" = set; then : |
e9a63f04 | 13830 | $as_echo_n "(cached) " >&6 |
22044edf | 13831 | else |
eb697db5 | 13832 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
19650fd6 | 13833 | /* end confdefs.h. */ |
22044edf DL |
13834 | void fred (int x[__restrict]); |
13835 | int | |
13836 | main () | |
13837 | { | |
b936fae4 | 13838 | |
22044edf DL |
13839 | ; |
13840 | return 0; | |
13841 | } | |
c0d27fcc | 13842 | _ACEOF |
eb697db5 | 13843 | if ac_fn_c_try_compile "$LINENO"; then : |
22044edf DL |
13844 | emacs_cv_c_restrict_arr=yes |
13845 | else | |
eb697db5 | 13846 | emacs_cv_c_restrict_arr=no |
ba4481b5 | 13847 | fi |
ca81d7a0 | 13848 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
22044edf | 13849 | fi |
eb697db5 | 13850 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_c_restrict_arr" >&5 |
e9a63f04 | 13851 | $as_echo "$emacs_cv_c_restrict_arr" >&6; } |
22044edf | 13852 | if test "$emacs_cv_c_restrict_arr" = yes; then |
b936fae4 | 13853 | |
eb697db5 | 13854 | $as_echo "#define __restrict_arr __restrict" >>confdefs.h |
ba4481b5 | 13855 | |
ba4481b5 DL |
13856 | fi |
13857 | ||
c0d27fcc | 13858 | |
c0d27fcc | 13859 | |
22044edf DL |
13860 | # Set up the CFLAGS for real compilation, so we can substitute it. |
13861 | CFLAGS="$REAL_CFLAGS" | |
13862 | CPPFLAGS="$REAL_CPPFLAGS" | |
13863 | ||
9978c06c CY |
13864 | ## Hack to detect a buggy GCC version. |
13865 | if test "x$GCC" = xyes \ | |
13866 | && test x"`$CC --version 2> /dev/null | grep 'gcc.* 4.5.0'`" != x \ | |
13867 | && test x"`echo $CFLAGS | grep '\-O[23]'`" != x \ | |
13868 | && test x"`echo $CFLAGS | grep '\-fno-optimize-sibling-calls'`" = x; then | |
3d608a86 | 13869 | as_fn_error "GCC 4.5.0 has problems compiling Emacs; see etc/PROBLEMS'." "$LINENO" 5 |
9978c06c CY |
13870 | fi |
13871 | ||
22044edf | 13872 | #### Find out which version of Emacs this is. |
8c5ff6dd | 13873 | version=`grep 'const char emacs_version' ${srcdir}/src/emacs.c \ |
22044edf DL |
13874 | | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'` |
13875 | if test x"${version}" = x; then | |
3d608a86 | 13876 | as_fn_error "can't find current emacs version in \`${srcdir}/src/emacs.c'." "$LINENO" 5 |
22044edf | 13877 | fi |
879de935 | 13878 | if test x"${version}" != x"$PACKAGE_VERSION"; then |
eb697db5 | 13879 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: version mismatch between \`${srcdir}/configure.in' and \`${srcdir}/src/emacs.c'." >&5 |
8c5ff6dd | 13880 | $as_echo "$as_me: WARNING: version mismatch between \`${srcdir}/configure.in' and \`${srcdir}/src/emacs.c'." >&2;} |
879de935 | 13881 | fi |
22044edf DL |
13882 | |
13883 | ### Specify what sort of things we'll be editing into Makefile and config.h. | |
13884 | ### Use configuration here uncanonicalized to avoid exceeding size limits. | |
13885 | ||
13886 | ||
4286c48d | 13887 | ## Unused? |
22044edf DL |
13888 | |
13889 | ||
13890 | ||
13891 | ||
13892 | ||
13893 | ||
13894 | ||
13895 | ||
13896 | ||
13897 | ||
13898 | ||
13899 | ||
13900 | ||
13901 | ||
13902 | ||
13903 | ||
13904 | ||
13905 | ||
13906 | ||
22044edf | 13907 | |
4286c48d GM |
13908 | ## FIXME? Nothing uses @LD_SWITCH_X_SITE@. |
13909 | ## src/Makefile.in did add LD_SWITCH_X_SITE (as a cpp define) to the | |
13910 | ## end of LIBX_BASE, but nothing ever set it. | |
22044edf DL |
13911 | |
13912 | ||
13913 | ||
13914 | ||
c82a7244 | 13915 | ## Used in lwlib/Makefile.in. |
22044edf DL |
13916 | |
13917 | ||
6a3a24fa | 13918 | |
06b62770 AR |
13919 | |
13920 | ||
13921 | ||
48fad8e8 DN |
13922 | |
13923 | ||
5e159d07 CY |
13924 | |
13925 | ||
edfda783 | 13926 | |
91231421 | 13927 | |
22044edf DL |
13928 | cat >>confdefs.h <<_ACEOF |
13929 | #define EMACS_CONFIGURATION "${canonical}" | |
13930 | _ACEOF | |
13931 | ||
13932 | ||
13933 | cat >>confdefs.h <<_ACEOF | |
13934 | #define EMACS_CONFIG_OPTIONS "${ac_configure_args}" | |
13935 | _ACEOF | |
13936 | ||
13937 | ||
13938 | cat >>confdefs.h <<_ACEOF | |
13939 | #define config_machfile "${machfile}" | |
13940 | _ACEOF | |
13941 | ||
13942 | ||
13943 | cat >>confdefs.h <<_ACEOF | |
13944 | #define config_opsysfile "${opsysfile}" | |
13945 | _ACEOF | |
13946 | ||
13947 | ||
e765bf58 JD |
13948 | XMENU_OBJ= |
13949 | XOBJ= | |
5929fbe7 | 13950 | FONT_OBJ= |
22044edf DL |
13951 | if test "${HAVE_X_WINDOWS}" = "yes" ; then |
13952 | ||
eb697db5 | 13953 | $as_echo "#define HAVE_X_WINDOWS 1" >>confdefs.h |
22044edf | 13954 | |
e765bf58 JD |
13955 | XMENU_OBJ=xmenu.o |
13956 | XOBJ="xterm.o xfns.o xselect.o xrdb.o fontset.o xsmfns.o fringe.o image.o xsettings.o xgselect.o" | |
5929fbe7 GM |
13957 | FONT_OBJ=xfont.o |
13958 | if test "$HAVE_XFT" = "yes"; then | |
13959 | FONT_OBJ="$FONT_OBJ ftfont.o xftfont.o ftxfont.o" | |
13960 | elif test "$HAVE_FREETYPE" = "yes"; then | |
13961 | FONT_OBJ="$FONT_OBJ ftfont.o ftxfont.o" | |
13962 | fi | |
13963 | ||
22044edf | 13964 | fi |
e765bf58 JD |
13965 | |
13966 | ||
13967 | ||
5929fbe7 | 13968 | |
7186fb09 | 13969 | WIDGET_OBJ= |
c82a7244 | 13970 | MOTIF_LIBW= |
22044edf | 13971 | if test "${USE_X_TOOLKIT}" != "none" ; then |
7186fb09 | 13972 | WIDGET_OBJ=widget.o |
22044edf | 13973 | |
eb697db5 | 13974 | $as_echo "#define USE_X_TOOLKIT 1" >>confdefs.h |
22044edf | 13975 | |
39dd4d52 | 13976 | if test "${USE_X_TOOLKIT}" = "LUCID"; then |
73d798d5 | 13977 | |
eb697db5 | 13978 | $as_echo "#define USE_LUCID 1" >>confdefs.h |
73d798d5 | 13979 | |
39dd4d52 | 13980 | elif test "${USE_X_TOOLKIT}" = "MOTIF"; then |
73d798d5 | 13981 | |
eb697db5 | 13982 | $as_echo "#define USE_MOTIF 1" >>confdefs.h |
73d798d5 | 13983 | |
c82a7244 GM |
13984 | MOTIF_LIBW=-lXm |
13985 | case "$opsys" in | |
13986 | gnu-linux) | |
13987 | ## Paul Abrahams <abrahams at equinox.shaysnet.com> says this is needed. | |
13988 | MOTIF_LIBW="$MOTIF_LIBW -lXpm" | |
13989 | ;; | |
13990 | ||
13991 | unixware) | |
13992 | ## Richard Anthony Ryan <ryanr at ellingtn.ftc.nrcs.usda.gov> | |
13993 | ## says -lXimp is needed in UNIX_SV ... 4.2 1.1.2. | |
13994 | MOTIF_LIBW="MOTIF_LIBW -lXimp" | |
13995 | ;; | |
13996 | ||
13997 | aix4-2) | |
13998 | ## olson@mcs.anl.gov says -li18n is needed by -lXm. | |
13999 | MOTIF_LIBW="$MOTIF_LIBW -li18n" | |
14000 | ;; | |
14001 | esac | |
14002 | MOTIF_LIBW="$MOTIF_LIBW $LIBXP" | |
73d798d5 | 14003 | fi |
22044edf | 14004 | fi |
7186fb09 | 14005 | |
c82a7244 | 14006 | |
718a19c8 | 14007 | TOOLKIT_LIBW= |
c82a7244 GM |
14008 | case "$USE_X_TOOLKIT" in |
14009 | MOTIF) TOOLKIT_LIBW="$MOTIF_LIBW" ;; | |
14010 | LUCID) TOOLKIT_LIBW="$LUCID_LIBW" ;; | |
718a19c8 | 14011 | none) test "x$HAVE_GTK" = "xyes" && TOOLKIT_LIBW="$GTK_LIBS" ;; |
c82a7244 GM |
14012 | esac |
14013 | ||
14014 | ||
a5edbe4a GM |
14015 | if test "$USE_X_TOOLKIT" = "none"; then |
14016 | LIBXT_OTHER="\$(LIBXSM)" | |
8b44daa0 | 14017 | OLDXMENU_TARGET="really-oldXMenu" |
a5edbe4a GM |
14018 | else |
14019 | LIBXT_OTHER="\$(LIBXMU) -lXt \$(LIBXTR6) -lXext" | |
8b44daa0 | 14020 | OLDXMENU_TARGET="really-lwlib" |
a5edbe4a GM |
14021 | fi |
14022 | ||
14023 | ||
718a19c8 GM |
14024 | ## The X Menu stuff is present in the X10 distribution, but missing |
14025 | ## from X11. If we have X10, just use the installed library; | |
14026 | ## otherwise, use our own copy. | |
22044edf DL |
14027 | if test "${HAVE_X11}" = "yes" ; then |
14028 | ||
eb697db5 | 14029 | $as_echo "#define HAVE_X11 1" >>confdefs.h |
22044edf | 14030 | |
718a19c8 GM |
14031 | |
14032 | if test "$USE_X_TOOLKIT" = "none"; then | |
14033 | OLDXMENU="\${oldXMenudir}libXMenu11.a" | |
14034 | else | |
14035 | OLDXMENU="\${lwlibdir}liblw.a" | |
14036 | fi | |
14037 | LIBXMENU="\$(OLDXMENU)" | |
a5edbe4a | 14038 | LIBX_OTHER="\$(LIBXT) \$(LIBX_EXTRA)" |
16455a85 | 14039 | OLDXMENU_DEPS="\${OLDXMENU} ../src/\${OLDXMENU}" |
718a19c8 | 14040 | else |
298b8a34 GM |
14041 | ## For a syntactically valid Makefile; not actually used for anything. |
14042 | ## See comments in src/Makefile.in. | |
14043 | OLDXMENU=nothing | |
1dea46de GM |
14044 | ## FIXME This case (!HAVE_X11 && HAVE_X_WINDOWS) is no longer possible(?). |
14045 | if test "${HAVE_X_WINDOWS}" = "yes"; then | |
14046 | LIBXMENU="-lXMenu" | |
14047 | else | |
14048 | LIBXMENU= | |
14049 | fi | |
a5edbe4a | 14050 | LIBX_OTHER= |
16455a85 | 14051 | OLDXMENU_DEPS= |
22044edf | 14052 | fi |
718a19c8 | 14053 | |
4286c48d | 14054 | if test "$HAVE_GTK" = "yes" || test "$HAVE_MENUS" != "yes"; then |
298b8a34 GM |
14055 | OLDXMENU_TARGET= |
14056 | OLDXMENU=nothing | |
718a19c8 | 14057 | LIBXMENU= |
16455a85 | 14058 | OLDXMENU_DEPS= |
718a19c8 GM |
14059 | fi |
14060 | ||
14061 | ||
14062 | ||
14063 | ||
a5edbe4a | 14064 | |
16455a85 | 14065 | |
298b8a34 | 14066 | |
22044edf DL |
14067 | if test "${HAVE_MENUS}" = "yes" ; then |
14068 | ||
eb697db5 | 14069 | $as_echo "#define HAVE_MENUS 1" >>confdefs.h |
22044edf DL |
14070 | |
14071 | fi | |
4f91d9c8 | 14072 | |
22044edf DL |
14073 | if test "${GNU_MALLOC}" = "yes" ; then |
14074 | ||
eb697db5 | 14075 | $as_echo "#define GNU_MALLOC 1" >>confdefs.h |
22044edf DL |
14076 | |
14077 | fi | |
4f91d9c8 GM |
14078 | |
14079 | RALLOC_OBJ= | |
22044edf DL |
14080 | if test "${REL_ALLOC}" = "yes" ; then |
14081 | ||
eb697db5 | 14082 | $as_echo "#define REL_ALLOC 1" >>confdefs.h |
22044edf | 14083 | |
4f91d9c8 GM |
14084 | |
14085 | test "$system_malloc" != "yes" && RALLOC_OBJ=ralloc.o | |
22044edf DL |
14086 | fi |
14087 | ||
718a19c8 | 14088 | |
718a19c8 GM |
14089 | if test "$opsys" = "cygwin"; then |
14090 | CYGWIN_OBJ="sheap.o" | |
14091 | ## Cygwin differs because of its unexec(). | |
7acac9f4 | 14092 | PRE_ALLOC_OBJ= |
4f91d9c8 | 14093 | POST_ALLOC_OBJ=lastfile.o |
718a19c8 GM |
14094 | else |
14095 | CYGWIN_OBJ= | |
7acac9f4 | 14096 | PRE_ALLOC_OBJ=lastfile.o |
4f91d9c8 | 14097 | POST_ALLOC_OBJ= |
718a19c8 GM |
14098 | fi |
14099 | ||
106c6f74 | 14100 | |
22044edf DL |
14101 | |
14102 | ||
c0d27fcc | 14103 | |
ede4834a GM |
14104 | case "$opsys" in |
14105 | aix4-2) LD_SWITCH_SYSTEM_TEMACS="-Wl,-bnodelcsect" ;; | |
14106 | ||
14107 | darwin) | |
a0c06748 GM |
14108 | ## The -headerpad option tells ld (see man page) to leave room at the |
14109 | ## end of the header for adding load commands. Needed for dumping. | |
14110 | ## 0x690 is the total size of 30 segment load commands (at 56 | |
14111 | ## each); under Cocoa 31 commands are required. | |
14112 | if test "$HAVE_NS" = "yes"; then | |
14113 | libs_nsgui="-framework AppKit" | |
14114 | headerpad_extra=6C8 | |
14115 | else | |
14116 | libs_nsgui= | |
14117 | headerpad_extra=690 | |
14118 | fi | |
14119 | LD_SWITCH_SYSTEM_TEMACS="-prebind $libs_nsgui -Xlinker -headerpad -Xlinker $headerpad_extra" | |
14120 | ||
14121 | ## This is here because src/Makefile.in did some extra fiddling around | |
14122 | ## with LD_SWITCH_SYSTEM. The cpp logic was: | |
14123 | ## #ifndef LD_SWITCH_SYSTEM | |
14124 | ## #if !defined (__GNUC__) && ((defined (BSD_SYSTEM) && !defined (COFF))) | |
14125 | ## Since all the *bsds define LD_SWITCH_SYSTEM, this simplifies to: | |
14126 | ## not using gcc, darwin system not on an alpha (ie darwin, since | |
14127 | ## darwin + alpha does not occur). | |
14128 | ## Because this was done in src/Makefile.in, the resulting part of | |
14129 | ## LD_SWITCH_SYSTEM was not used in configure (ie, in ac_link). | |
14130 | ## It therefore seems cleaner to put this in LD_SWITCH_SYSTEM_TEMACS, | |
14131 | ## rather than LD_SWITCH_SYSTEM. | |
14132 | test "x$LD_SWITCH_SYSTEM" = "x" && test "x$GCC" != "xyes" && \ | |
14133 | LD_SWITCH_SYSTEM_TEMACS="-X $LD_SWITCH_SYSTEM_TEMACS" | |
14134 | ;; | |
14135 | ||
14136 | ## LD_SWITCH_X_SITE_AUX is a -R option saying where to find X at run-time. | |
14137 | ## When handled by cpp, this was in LD_SWITCH_SYSTEM. However, at | |
14138 | ## the point where configure sourced the s/*.h file, LD_SWITCH_X_SITE_AUX | |
14139 | ## had not yet been defined and was expanded to null. Hence LD_SWITCH_SYSTEM | |
14140 | ## had different values in configure (in ac_link) and src/Makefile.in. | |
14141 | ## It seems clearer therefore to put this piece in LD_SWITCH_SYSTEM_TEMACS. | |
14142 | gnu-linux) LD_SWITCH_SYSTEM_TEMACS="\$(LD_SWITCH_X_SITE_AUX)" ;; | |
ede4834a GM |
14143 | |
14144 | *) LD_SWITCH_SYSTEM_TEMACS= ;; | |
14145 | esac | |
14146 | ||
a25e81b3 | 14147 | if test "$NS_IMPL_GNUSTEP" = "yes"; then |
7dddde4b GM |
14148 | LD_SWITCH_SYSTEM_TEMACS="${LD_SWITCH_SYSTEM_TEMACS} -L${GNUSTEP_SYSTEM_LIBRARIES} ${GNUSTEP_LOCAL_LIBRARIES} -lgnustep-gui -lgnustep-base -lobjc -lpthread" |
14149 | fi | |
14150 | ||
14151 | ||
ede4834a GM |
14152 | |
14153 | ||
ebbc2619 GM |
14154 | LINKER= |
14155 | ORDINARY_LINK= | |
14156 | case "$opsys" in | |
14157 | ## gnu: GNU needs its own crt0. | |
3a876c9d | 14158 | aix4-2|cygwin|darwin|gnu|irix6-5|sol2*|unixware) ORDINARY_LINK=yes ;; |
ebbc2619 GM |
14159 | |
14160 | ## On post 1.3 releases of NetBSD, gcc -nostdlib also clears the | |
14161 | ## library search parth, i.e. it won't search /usr/lib for libc and | |
14162 | ## friends. Using -nostartfiles instead avoids this problem, and | |
14163 | ## will also work on earlier NetBSD releases. | |
14164 | netbsd|openbsd) LINKER="\$(CC) -nostartfiles" ;; | |
14165 | ||
14166 | ## macpcc: NAKAJI Hiroyuki <nakaji@tutrp.tut.ac.jp> says | |
14167 | ## MkLinux/LinuxPPC needs this. | |
14168 | ## ibms390x only supports opsys = gnu-linux so it can be added here. | |
14169 | gnu-*) | |
14170 | case "$machine" in | |
14171 | macppc|ibms390x) LINKER="\$(CC) -nostdlib" ;; | |
14172 | esac | |
14173 | ;; | |
14174 | esac | |
14175 | ||
90278cb6 | 14176 | |
ebbc2619 GM |
14177 | if test "x$ORDINARY_LINK" = "xyes"; then |
14178 | ||
14179 | LINKER="\$(CC)" | |
14180 | ||
eb697db5 | 14181 | $as_echo "#define ORDINARY_LINK 1" >>confdefs.h |
ebbc2619 GM |
14182 | |
14183 | ||
14184 | ## The system files defining neither ORDINARY_LINK nor LINKER are: | |
14185 | ## (bsd-common), freebsd, gnu-* not on macppc|ibms390x, hpux*. | |
14186 | elif test "x$GCC" = "xyes" && test "x$LINKER" = "x"; then | |
14187 | ||
14188 | ## Versions of GCC >= 2.0 put their library, libgcc.a, in obscure | |
14189 | ## places that are difficult to figure out at make time. Fortunately, | |
14190 | ## these same versions allow you to pass arbitrary flags on to the | |
14191 | ## linker, so there is no reason not to use it as a linker. | |
14192 | ## | |
14193 | ## Well, it is not quite perfect. The "-nostdlib" keeps GCC from | |
14194 | ## searching for libraries in its internal directories, so we have to | |
14195 | ## ask GCC explicitly where to find libgcc.a (LIB_GCC below). | |
14196 | LINKER="\$(CC) -nostdlib" | |
ebbc2619 GM |
14197 | fi |
14198 | ||
ebbc2619 | 14199 | test "x$LINKER" = "x" && LINKER=ld |
81ac4f35 | 14200 | ## FIXME? What setting of EDIT_LDFLAGS should this have? |
ebbc2619 GM |
14201 | test "$NS_IMPL_GNUSTEP" = "yes" && LINKER="\$(CC) -rdynamic" |
14202 | ||
14203 | ||
14204 | ||
14205 | ||
81ac4f35 GM |
14206 | ## FIXME? The logic here is not precisely the same as that above. |
14207 | ## There is no check here for a pre-defined LINKER. | |
14208 | ## Should we only be setting LIB_GCC if LD ~ -nostdlib? | |
057886a3 | 14209 | LIB_GCC= |
ebbc2619 | 14210 | if test "x$GCC" = "xyes" && test "x$ORDINARY_LINK" != "xyes"; then |
057886a3 GM |
14211 | |
14212 | case "$opsys" in | |
12a25125 | 14213 | freebsd|netbsd|openbsd) LIB_GCC= ;; |
057886a3 GM |
14214 | |
14215 | gnu-*) | |
14216 | ## armin76@gentoo.org reported that the lgcc_s flag is necessary to | |
14217 | ## build on ARM EABI under GNU/Linux. (Bug#5518) | |
14218 | ## Note that m/arm.h never bothered to undefine LIB_GCC first. | |
14219 | if test "$machine" = "arm"; then | |
14220 | LIB_GCC="-lgcc_s" | |
14221 | else | |
14222 | ## FIXME? s/gnu-linux.h used to define LIB_GCC as below, then | |
14223 | ## immediately undefine it again and redefine it to empty. | |
14224 | ## Was the C_SWITCH_X_SITE part really necessary? | |
3536f993 | 14225 | ## LIB_GCC=`$CC $C_SWITCH_X_SITE -print-libgcc-file-name` |
057886a3 GM |
14226 | LIB_GCC= |
14227 | fi | |
14228 | ;; | |
14229 | ||
14230 | ## Ask GCC where to find libgcc.a. | |
3536f993 | 14231 | *) LIB_GCC=`$CC -print-libgcc-file-name 2> /dev/null` ;; |
057886a3 GM |
14232 | esac |
14233 | fi | |
14234 | ||
14235 | ||
372b4090 GM |
14236 | TOOLTIP_SUPPORT= |
14237 | WINDOW_SUPPORT= | |
14238 | ## If we're using X11/GNUstep, define some consequences. | |
14239 | if test "$HAVE_X_WINDOWS" = "yes" || test "$HAVE_NS" = "yes"; then | |
14240 | ||
eb697db5 | 14241 | $as_echo "#define HAVE_WINDOW_SYSTEM 1" >>confdefs.h |
372b4090 GM |
14242 | |
14243 | ||
eb697db5 | 14244 | $as_echo "#define HAVE_MOUSE 1" >>confdefs.h |
372b4090 GM |
14245 | |
14246 | MOUSE_SUPPORT="\$(REAL_MOUSE_SUPPORT)" | |
14247 | TOOLTIP_SUPPORT="\${lispsource}mouse.elc" | |
14248 | ||
14249 | WINDOW_SUPPORT="\$(BASE_WINDOW_SUPPORT)" | |
14250 | test "$HAVE_X_WINDOWS" = "yes" && \ | |
14251 | WINDOW_SUPPORT="$WINDOW_SUPPORT \$(X_WINDOW_SUPPORT)" | |
14252 | ||
14253 | fi | |
14254 | ||
14255 | ||
14256 | ||
14257 | ||
14258 | ||
e6df49e4 GM |
14259 | |
14260 | ||
ba4481b5 | 14261 | #### Report on what we decided to do. |
488dd4c4 JD |
14262 | #### Report GTK as a toolkit, even if it doesn't use Xt. |
14263 | #### It makes printing result more understandable as using GTK sets | |
14264 | #### toolkit_scroll_bars to yes by default. | |
14265 | if test "${HAVE_GTK}" = "yes"; then | |
14266 | USE_X_TOOLKIT=GTK | |
14267 | fi | |
14268 | ||
ba4481b5 DL |
14269 | echo " |
14270 | Configured for \`${canonical}'. | |
14271 | ||
14272 | Where should the build process find the source code? ${srcdir} | |
14273 | What operating system and machine description files should Emacs use? | |
14274 | \`${opsysfile}' and \`${machfile}' | |
14275 | What compiler should emacs be built with? ${CC} ${CFLAGS} | |
14276 | Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason} | |
73b77ee5 | 14277 | Should Emacs use a relocating allocator for buffers? ${REL_ALLOC} |
ef9e4345 | 14278 | Should Emacs use mmap(2) for buffer allocation? $use_mmap_for_buffers |
ba4481b5 | 14279 | What window system should Emacs use? ${window_system} |
8e967cf7 | 14280 | What toolkit should Emacs use? ${USE_X_TOOLKIT}" |
ba4481b5 DL |
14281 | |
14282 | if test -n "${x_includes}"; then | |
14283 | echo " Where do we find X Windows header files? ${x_includes}" | |
14284 | else | |
14285 | echo " Where do we find X Windows header files? Standard dirs" | |
14286 | fi | |
14287 | if test -n "${x_libraries}"; then | |
14288 | echo " Where do we find X Windows libraries? ${x_libraries}" | |
14289 | else | |
14290 | echo " Where do we find X Windows libraries? Standard dirs" | |
14291 | fi | |
14292 | ||
14293 | echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}" | |
14294 | echo " Does Emacs use -lXpm? ${HAVE_XPM}" | |
14295 | echo " Does Emacs use -ljpeg? ${HAVE_JPEG}" | |
14296 | echo " Does Emacs use -ltiff? ${HAVE_TIFF}" | |
91e84f96 | 14297 | echo " Does Emacs use a gif library? ${HAVE_GIF} $LIBGIF" |
ba4481b5 | 14298 | echo " Does Emacs use -lpng? ${HAVE_PNG}" |
0cfc0546 | 14299 | echo " Does Emacs use -lrsvg-2? ${HAVE_RSVG}" |
79011b82 | 14300 | echo " Does Emacs use -lgpm? ${HAVE_GPM}" |
409dd120 | 14301 | echo " Does Emacs use -ldbus? ${HAVE_DBUS}" |
637fa988 | 14302 | echo " Does Emacs use -lgconf? ${HAVE_GCONF}" |
022c122a | 14303 | echo " Does Emacs use -lselinux? ${HAVE_LIBSELINUX}" |
2ee27f27 | 14304 | |
edfda783 AR |
14305 | echo " Does Emacs use -lfreetype? ${HAVE_FREETYPE}" |
14306 | echo " Does Emacs use -lm17n-flt? ${HAVE_M17N_FLT}" | |
14307 | echo " Does Emacs use -lotf? ${HAVE_LIBOTF}" | |
14308 | echo " Does Emacs use -lxft? ${HAVE_XFT}" | |
14309 | ||
8d87199b | 14310 | echo " Does Emacs use toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}" |
ba4481b5 DL |
14311 | echo |
14312 | ||
d0098f13 JD |
14313 | if test $USE_XASSERTS = yes; then |
14314 | echo " Compiling with asserts turned on." | |
d0098f13 | 14315 | CPPFLAGS="$CPPFLAGS -DXASSERTS=1" |
d0098f13 | 14316 | fi |
05cf15c6 | 14317 | |
ca34d75a JD |
14318 | echo |
14319 | ||
06b62770 AR |
14320 | if test "$HAVE_NS" = "yes"; then |
14321 | echo | |
14322 | echo "You must run \"make install\" in order to test the built application. | |
14323 | The installed application will go to nextstep/Emacs.app and can be | |
14324 | run or moved from there." | |
14325 | if test "$EN_NS_SELF_CONTAINED" = "yes"; then | |
14326 | echo "The application will be fully self-contained." | |
14327 | else | |
14328 | echo "The lisp resources for the application will be installed under ${prefix}. | |
14329 | You may need to run \"make install\" with sudo. The application will fail | |
14330 | to run if these resources are not installed." | |
14331 | fi | |
14332 | echo | |
14333 | fi | |
14334 | ||
131e4133 MA |
14335 | if test "$HAVE_DBUS" = yes && test "${opsys}" != "gnu-linux"; then |
14336 | echo "D-Bus integration has been tested for GNU/Linux only." | |
14337 | echo | |
14338 | fi | |
14339 | ||
05cf15c6 | 14340 | |
ba4481b5 DL |
14341 | # Remove any trailing slashes in these variables. |
14342 | test "${prefix}" != NONE && | |
14343 | prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'` | |
14344 | test "${exec_prefix}" != NONE && | |
14345 | exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'` | |
14346 | ||
81ac4f35 | 14347 | ac_config_files="$ac_config_files 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" |
ca81d7a0 JD |
14348 | |
14349 | ac_config_commands="$ac_config_commands default" | |
14350 | ||
503d2be0 | 14351 | cat >confcache <<\_ACEOF |
ba4481b5 DL |
14352 | # This file is a shell script that caches the results of configure |
14353 | # tests run on this system so they can be shared between configure | |
503d2be0 AS |
14354 | # scripts and configure runs, see configure's option --config-cache. |
14355 | # It is not useful on other systems. If it contains results you don't | |
14356 | # want to keep, you may remove or edit it. | |
ba4481b5 | 14357 | # |
503d2be0 AS |
14358 | # config.status only pays attention to the cache file if you give it |
14359 | # the --recheck option to rerun configure. | |
ba4481b5 | 14360 | # |
6bae0ccf | 14361 | # `ac_cv_env_foo' variables (set or unset) will be overridden when |
503d2be0 AS |
14362 | # loading this file, other *unset* `ac_cv_foo' will be assigned the |
14363 | # following values. | |
14364 | ||
14365 | _ACEOF | |
14366 | ||
ba4481b5 DL |
14367 | # The following way of writing the cache mishandles newlines in values, |
14368 | # but we know of no workaround that is simple, portable, and efficient. | |
ca81d7a0 | 14369 | # So, we kill variables containing newlines. |
ba4481b5 DL |
14370 | # Ultrix sh set writes to stderr and can't be redirected directly, |
14371 | # and sets the high bit in the cache file unless we assign to the vars. | |
ca81d7a0 JD |
14372 | ( |
14373 | for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do | |
14374 | eval ac_val=\$$ac_var | |
14375 | case $ac_val in #( | |
14376 | *${as_nl}*) | |
14377 | case $ac_var in #( | |
eb697db5 DN |
14378 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 |
14379 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
ca81d7a0 JD |
14380 | esac |
14381 | case $ac_var in #( | |
14382 | _ | IFS | as_nl) ;; #( | |
e9a63f04 | 14383 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( |
eb697db5 | 14384 | *) { eval $ac_var=; unset $ac_var;} ;; |
ca81d7a0 JD |
14385 | esac ;; |
14386 | esac | |
14387 | done | |
14388 | ||
503d2be0 | 14389 | (set) 2>&1 | |
ca81d7a0 JD |
14390 | case $as_nl`(ac_space=' '; set) 2>&1` in #( |
14391 | *${as_nl}ac_space=\ *) | |
eb697db5 DN |
14392 | # `set' does not quote correctly, so add quotes: double-quote |
14393 | # substitution turns \\\\ into \\, and sed turns \\ into \. | |
503d2be0 | 14394 | sed -n \ |
edfaf76d LK |
14395 | "s/'/'\\\\''/g; |
14396 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" | |
ca81d7a0 | 14397 | ;; #( |
503d2be0 AS |
14398 | *) |
14399 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
ca81d7a0 | 14400 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" |
503d2be0 | 14401 | ;; |
ca81d7a0 JD |
14402 | esac | |
14403 | sort | |
14404 | ) | | |
503d2be0 | 14405 | sed ' |
ca81d7a0 | 14406 | /^ac_cv_env_/b end |
503d2be0 | 14407 | t clear |
ca81d7a0 | 14408 | :clear |
503d2be0 AS |
14409 | s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ |
14410 | t end | |
ca81d7a0 JD |
14411 | s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ |
14412 | :end' >>confcache | |
14413 | if diff "$cache_file" confcache >/dev/null 2>&1; then :; else | |
14414 | if test -w "$cache_file"; then | |
14415 | test "x$cache_file" != "x/dev/null" && | |
eb697db5 | 14416 | { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 |
e9a63f04 | 14417 | $as_echo "$as_me: updating cache $cache_file" >&6;} |
503d2be0 | 14418 | cat confcache >$cache_file |
ba4481b5 | 14419 | else |
eb697db5 | 14420 | { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 |
e9a63f04 | 14421 | $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} |
ba4481b5 DL |
14422 | fi |
14423 | fi | |
14424 | rm -f confcache | |
14425 | ||
ba4481b5 DL |
14426 | test "x$prefix" = xNONE && prefix=$ac_default_prefix |
14427 | # Let make expand exec_prefix. | |
14428 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
14429 | ||
ba4481b5 DL |
14430 | DEFS=-DHAVE_CONFIG_H |
14431 | ||
6bae0ccf DL |
14432 | ac_libobjs= |
14433 | ac_ltlibobjs= | |
14434 | for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue | |
14435 | # 1. Remove the extension, and $U if already installed. | |
ca81d7a0 | 14436 | ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' |
e9a63f04 | 14437 | ac_i=`$as_echo "$ac_i" | sed "$ac_script"` |
ca81d7a0 JD |
14438 | # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR |
14439 | # will be set to the directory where LIBOBJS objects are built. | |
eb697db5 DN |
14440 | as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" |
14441 | as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' | |
6bae0ccf DL |
14442 | done |
14443 | LIBOBJS=$ac_libobjs | |
14444 | ||
14445 | LTLIBOBJS=$ac_ltlibobjs | |
14446 | ||
14447 | ||
c0d27fcc | 14448 | |
ba4481b5 | 14449 | : ${CONFIG_STATUS=./config.status} |
e9a63f04 | 14450 | ac_write_fail=0 |
503d2be0 AS |
14451 | ac_clean_files_save=$ac_clean_files |
14452 | ac_clean_files="$ac_clean_files $CONFIG_STATUS" | |
eb697db5 | 14453 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 |
e9a63f04 | 14454 | $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} |
eb697db5 DN |
14455 | as_write_fail=0 |
14456 | cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 | |
503d2be0 | 14457 | #! $SHELL |
c0d27fcc | 14458 | # Generated by $as_me. |
ba4481b5 | 14459 | # Run this file to recreate the current configuration. |
ba4481b5 | 14460 | # Compiler output produced by configure, useful for debugging |
503d2be0 | 14461 | # configure, is in config.log if it exists. |
ba4481b5 | 14462 | |
503d2be0 | 14463 | debug=false |
19650fd6 AS |
14464 | ac_cs_recheck=false |
14465 | ac_cs_silent=false | |
5929fbe7 | 14466 | |
eb697db5 DN |
14467 | SHELL=\${CONFIG_SHELL-$SHELL} |
14468 | export SHELL | |
14469 | _ASEOF | |
14470 | cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 | |
14471 | ## -------------------- ## | |
14472 | ## M4sh Initialization. ## | |
14473 | ## -------------------- ## | |
c0d27fcc | 14474 | |
f053c89f CY |
14475 | # Be more Bourne compatible |
14476 | DUALCASE=1; export DUALCASE # for MKS sh | |
eb697db5 | 14477 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : |
503d2be0 AS |
14478 | emulate sh |
14479 | NULLCMD=: | |
e9a63f04 | 14480 | # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which |
6bae0ccf DL |
14481 | # is contrary to our usage. Disable this feature. |
14482 | alias -g '${1+"$@"}'='"$@"' | |
ca81d7a0 JD |
14483 | setopt NO_GLOB_SUBST |
14484 | else | |
eb697db5 DN |
14485 | case `(set -o) 2>/dev/null` in #( |
14486 | *posix*) : | |
14487 | set -o posix ;; #( | |
14488 | *) : | |
14489 | ;; | |
f053c89f | 14490 | esac |
503d2be0 | 14491 | fi |
f053c89f CY |
14492 | |
14493 | ||
e9a63f04 GM |
14494 | as_nl=' |
14495 | ' | |
14496 | export as_nl | |
14497 | # Printing a long string crashes Solaris 7 /usr/bin/printf. | |
14498 | as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' | |
14499 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo | |
14500 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo | |
eb697db5 DN |
14501 | # Prefer a ksh shell builtin over an external printf program on Solaris, |
14502 | # but without wasting forks for bash or zsh. | |
14503 | if test -z "$BASH_VERSION$ZSH_VERSION" \ | |
14504 | && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then | |
14505 | as_echo='print -r --' | |
14506 | as_echo_n='print -rn --' | |
14507 | elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then | |
e9a63f04 GM |
14508 | as_echo='printf %s\n' |
14509 | as_echo_n='printf %s' | |
14510 | else | |
14511 | if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then | |
14512 | as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' | |
14513 | as_echo_n='/usr/ucb/echo -n' | |
7bbec45b | 14514 | else |
e9a63f04 GM |
14515 | as_echo_body='eval expr "X$1" : "X\\(.*\\)"' |
14516 | as_echo_n_body='eval | |
14517 | arg=$1; | |
eb697db5 | 14518 | case $arg in #( |
e9a63f04 GM |
14519 | *"$as_nl"*) |
14520 | expr "X$arg" : "X\\(.*\\)$as_nl"; | |
14521 | arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; | |
14522 | esac; | |
14523 | expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" | |
14524 | ' | |
14525 | export as_echo_n_body | |
14526 | as_echo_n='sh -c $as_echo_n_body as_echo' | |
7bbec45b | 14527 | fi |
e9a63f04 GM |
14528 | export as_echo_body |
14529 | as_echo='sh -c $as_echo_body as_echo' | |
14530 | fi | |
14531 | ||
14532 | # The user is always right. | |
14533 | if test "${PATH_SEPARATOR+set}" != set; then | |
14534 | PATH_SEPARATOR=: | |
14535 | (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { | |
14536 | (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || | |
14537 | PATH_SEPARATOR=';' | |
14538 | } | |
503d2be0 AS |
14539 | fi |
14540 | ||
6bae0ccf | 14541 | |
ca81d7a0 JD |
14542 | # IFS |
14543 | # We need space, tab and new line, in precisely that order. Quoting is | |
14544 | # there to prevent editors from complaining about space-tab. | |
14545 | # (If _AS_PATH_WALK were called with IFS unset, it would disable word | |
14546 | # splitting by setting IFS to empty value.) | |
ca81d7a0 JD |
14547 | IFS=" "" $as_nl" |
14548 | ||
14549 | # Find who we are. Look in the path if we contain no directory separator. | |
eb697db5 | 14550 | case $0 in #(( |
ca81d7a0 JD |
14551 | *[\\/]* ) as_myself=$0 ;; |
14552 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
14553 | for as_dir in $PATH | |
14554 | do | |
14555 | IFS=$as_save_IFS | |
14556 | test -z "$as_dir" && as_dir=. | |
eb697db5 DN |
14557 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break |
14558 | done | |
ca81d7a0 JD |
14559 | IFS=$as_save_IFS |
14560 | ||
14561 | ;; | |
14562 | esac | |
14563 | # We did not find ourselves, most probably we were run as `sh COMMAND' | |
14564 | # in which case we are not to be found in the path. | |
14565 | if test "x$as_myself" = x; then | |
14566 | as_myself=$0 | |
14567 | fi | |
14568 | if test ! -f "$as_myself"; then | |
e9a63f04 | 14569 | $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 |
eb697db5 | 14570 | exit 1 |
ca81d7a0 JD |
14571 | fi |
14572 | ||
eb697db5 DN |
14573 | # Unset variables that we do not need and which cause bugs (e.g. in |
14574 | # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" | |
14575 | # suppresses any "Segmentation fault" message there. '((' could | |
14576 | # trigger a bug in pdksh 5.2.14. | |
14577 | for as_var in BASH_ENV ENV MAIL MAILPATH | |
14578 | do eval test x\${$as_var+set} = xset \ | |
14579 | && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : | |
ca81d7a0 | 14580 | done |
6bae0ccf DL |
14581 | PS1='$ ' |
14582 | PS2='> ' | |
14583 | PS4='+ ' | |
14584 | ||
14585 | # NLS nuisances. | |
e9a63f04 GM |
14586 | LC_ALL=C |
14587 | export LC_ALL | |
14588 | LANGUAGE=C | |
14589 | export LANGUAGE | |
6bae0ccf | 14590 | |
eb697db5 DN |
14591 | # CDPATH. |
14592 | (unset CDPATH) >/dev/null 2>&1 && unset CDPATH | |
14593 | ||
14594 | ||
3d608a86 J |
14595 | # as_fn_error ERROR [LINENO LOG_FD] |
14596 | # --------------------------------- | |
eb697db5 DN |
14597 | # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are |
14598 | # provided, also output the error to LOG_FD, referencing LINENO. Then exit the | |
3d608a86 | 14599 | # script with status $?, using 1 if that was 0. |
eb697db5 DN |
14600 | as_fn_error () |
14601 | { | |
3d608a86 J |
14602 | as_status=$?; test $as_status -eq 0 && as_status=1 |
14603 | if test "$3"; then | |
14604 | as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
14605 | $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 | |
eb697db5 | 14606 | fi |
3d608a86 | 14607 | $as_echo "$as_me: error: $1" >&2 |
eb697db5 DN |
14608 | as_fn_exit $as_status |
14609 | } # as_fn_error | |
14610 | ||
14611 | ||
14612 | # as_fn_set_status STATUS | |
14613 | # ----------------------- | |
14614 | # Set $? to STATUS, without forking. | |
14615 | as_fn_set_status () | |
14616 | { | |
14617 | return $1 | |
14618 | } # as_fn_set_status | |
14619 | ||
14620 | # as_fn_exit STATUS | |
14621 | # ----------------- | |
14622 | # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. | |
14623 | as_fn_exit () | |
14624 | { | |
14625 | set +e | |
14626 | as_fn_set_status $1 | |
14627 | exit $1 | |
14628 | } # as_fn_exit | |
14629 | ||
14630 | # as_fn_unset VAR | |
14631 | # --------------- | |
14632 | # Portably unset VAR. | |
14633 | as_fn_unset () | |
14634 | { | |
14635 | { eval $1=; unset $1;} | |
14636 | } | |
14637 | as_unset=as_fn_unset | |
14638 | # as_fn_append VAR VALUE | |
14639 | # ---------------------- | |
14640 | # Append the text in VALUE to the end of the definition contained in VAR. Take | |
14641 | # advantage of any shell optimizations that allow amortized linear growth over | |
14642 | # repeated appends, instead of the typical quadratic growth present in naive | |
14643 | # implementations. | |
14644 | if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : | |
14645 | eval 'as_fn_append () | |
14646 | { | |
14647 | eval $1+=\$2 | |
14648 | }' | |
14649 | else | |
14650 | as_fn_append () | |
14651 | { | |
14652 | eval $1=\$$1\$2 | |
14653 | } | |
14654 | fi # as_fn_append | |
14655 | ||
14656 | # as_fn_arith ARG... | |
14657 | # ------------------ | |
14658 | # Perform arithmetic evaluation on the ARGs, and store the result in the | |
14659 | # global $as_val. Take advantage of shells that can avoid forks. The arguments | |
14660 | # must be portable across $(()) and expr. | |
14661 | if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : | |
14662 | eval 'as_fn_arith () | |
14663 | { | |
14664 | as_val=$(( $* )) | |
14665 | }' | |
14666 | else | |
14667 | as_fn_arith () | |
14668 | { | |
14669 | as_val=`expr "$@" || test $? -eq 1` | |
14670 | } | |
14671 | fi # as_fn_arith | |
14672 | ||
14673 | ||
ca81d7a0 JD |
14674 | if expr a : '\(a\)' >/dev/null 2>&1 && |
14675 | test "X`expr 00001 : '.*\(...\)'`" = X001; then | |
6bae0ccf DL |
14676 | as_expr=expr |
14677 | else | |
14678 | as_expr=false | |
14679 | fi | |
14680 | ||
ca81d7a0 | 14681 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then |
6bae0ccf DL |
14682 | as_basename=basename |
14683 | else | |
14684 | as_basename=false | |
14685 | fi | |
c0d27fcc | 14686 | |
eb697db5 DN |
14687 | if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then |
14688 | as_dirname=dirname | |
14689 | else | |
14690 | as_dirname=false | |
14691 | fi | |
c0d27fcc | 14692 | |
ca81d7a0 | 14693 | as_me=`$as_basename -- "$0" || |
c0d27fcc MR |
14694 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ |
14695 | X"$0" : 'X\(//\)$' \| \ | |
ca81d7a0 | 14696 | X"$0" : 'X\(/\)' \| . 2>/dev/null || |
e9a63f04 | 14697 | $as_echo X/"$0" | |
ca81d7a0 JD |
14698 | sed '/^.*\/\([^/][^/]*\)\/*$/{ |
14699 | s//\1/ | |
14700 | q | |
14701 | } | |
14702 | /^X\/\(\/\/\)$/{ | |
14703 | s//\1/ | |
14704 | q | |
14705 | } | |
14706 | /^X\/\(\/\).*/{ | |
14707 | s//\1/ | |
14708 | q | |
14709 | } | |
14710 | s/.*/./; q'` | |
c0d27fcc | 14711 | |
eb697db5 DN |
14712 | # Avoid depending upon Character Ranges. |
14713 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
14714 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
14715 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
14716 | as_cr_digits='0123456789' | |
14717 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
ca81d7a0 JD |
14718 | |
14719 | ECHO_C= ECHO_N= ECHO_T= | |
eb697db5 | 14720 | case `echo -n x` in #((((( |
ca81d7a0 | 14721 | -n*) |
eb697db5 | 14722 | case `echo 'xy\c'` in |
ca81d7a0 | 14723 | *c*) ECHO_T=' ';; # ECHO_T is single tab character. |
eb697db5 DN |
14724 | xy) ECHO_C='\c';; |
14725 | *) echo `echo ksh88 bug on AIX 6.1` > /dev/null | |
14726 | ECHO_T=' ';; | |
ca81d7a0 JD |
14727 | esac;; |
14728 | *) | |
14729 | ECHO_N='-n';; | |
c0d27fcc | 14730 | esac |
503d2be0 AS |
14731 | |
14732 | rm -f conf$$ conf$$.exe conf$$.file | |
ca81d7a0 JD |
14733 | if test -d conf$$.dir; then |
14734 | rm -f conf$$.dir/conf$$.file | |
14735 | else | |
14736 | rm -f conf$$.dir | |
e9a63f04 GM |
14737 | mkdir conf$$.dir 2>/dev/null |
14738 | fi | |
14739 | if (echo >conf$$.file) 2>/dev/null; then | |
14740 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
14741 | as_ln_s='ln -s' | |
14742 | # ... but there are two gotchas: | |
14743 | # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. | |
14744 | # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. | |
14745 | # In both cases, we have to default to `cp -p'. | |
14746 | ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || | |
14747 | as_ln_s='cp -p' | |
14748 | elif ln conf$$.file conf$$ 2>/dev/null; then | |
14749 | as_ln_s=ln | |
14750 | else | |
503d2be0 | 14751 | as_ln_s='cp -p' |
e9a63f04 | 14752 | fi |
503d2be0 AS |
14753 | else |
14754 | as_ln_s='cp -p' | |
14755 | fi | |
ca81d7a0 JD |
14756 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file |
14757 | rmdir conf$$.dir 2>/dev/null | |
503d2be0 | 14758 | |
eb697db5 DN |
14759 | |
14760 | # as_fn_mkdir_p | |
14761 | # ------------- | |
14762 | # Create "$as_dir" as a directory, including parents if necessary. | |
14763 | as_fn_mkdir_p () | |
14764 | { | |
14765 | ||
14766 | case $as_dir in #( | |
14767 | -*) as_dir=./$as_dir;; | |
14768 | esac | |
14769 | test -d "$as_dir" || eval $as_mkdir_p || { | |
14770 | as_dirs= | |
14771 | while :; do | |
14772 | case $as_dir in #( | |
14773 | *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( | |
14774 | *) as_qdir=$as_dir;; | |
14775 | esac | |
14776 | as_dirs="'$as_qdir' $as_dirs" | |
14777 | as_dir=`$as_dirname -- "$as_dir" || | |
14778 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
14779 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
14780 | X"$as_dir" : 'X\(//\)$' \| \ | |
14781 | X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || | |
14782 | $as_echo X"$as_dir" | | |
14783 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
14784 | s//\1/ | |
14785 | q | |
14786 | } | |
14787 | /^X\(\/\/\)[^/].*/{ | |
14788 | s//\1/ | |
14789 | q | |
14790 | } | |
14791 | /^X\(\/\/\)$/{ | |
14792 | s//\1/ | |
14793 | q | |
14794 | } | |
14795 | /^X\(\/\).*/{ | |
14796 | s//\1/ | |
14797 | q | |
14798 | } | |
14799 | s/.*/./; q'` | |
14800 | test -d "$as_dir" && break | |
14801 | done | |
14802 | test -z "$as_dirs" || eval "mkdir $as_dirs" | |
3d608a86 | 14803 | } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" |
eb697db5 DN |
14804 | |
14805 | ||
14806 | } # as_fn_mkdir_p | |
6bae0ccf | 14807 | if mkdir -p . 2>/dev/null; then |
eb697db5 | 14808 | as_mkdir_p='mkdir -p "$as_dir"' |
6bae0ccf | 14809 | else |
edfaf76d | 14810 | test -d ./-p && rmdir ./-p |
6bae0ccf DL |
14811 | as_mkdir_p=false |
14812 | fi | |
14813 | ||
f053c89f CY |
14814 | if test -x / >/dev/null 2>&1; then |
14815 | as_test_x='test -x' | |
ca81d7a0 | 14816 | else |
f053c89f CY |
14817 | if ls -dL / >/dev/null 2>&1; then |
14818 | as_ls_L_option=L | |
14819 | else | |
14820 | as_ls_L_option= | |
14821 | fi | |
14822 | as_test_x=' | |
14823 | eval sh -c '\'' | |
14824 | if test -d "$1"; then | |
e9a63f04 | 14825 | test -d "$1/."; |
f053c89f | 14826 | else |
eb697db5 | 14827 | case $1 in #( |
e9a63f04 | 14828 | -*)set "./$1";; |
f053c89f | 14829 | esac; |
eb697db5 | 14830 | case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( |
f053c89f CY |
14831 | ???[sx]*):;;*)false;;esac;fi |
14832 | '\'' sh | |
14833 | ' | |
ca81d7a0 | 14834 | fi |
f053c89f | 14835 | as_executable_p=$as_test_x |
503d2be0 | 14836 | |
c0d27fcc | 14837 | # Sed expression to map a string onto a valid CPP name. |
edfaf76d | 14838 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" |
c0d27fcc MR |
14839 | |
14840 | # Sed expression to map a string onto a valid variable name. | |
edfaf76d | 14841 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" |
503d2be0 | 14842 | |
503d2be0 | 14843 | |
503d2be0 | 14844 | exec 6>&1 |
eb697db5 DN |
14845 | ## ----------------------------------- ## |
14846 | ## Main body of $CONFIG_STATUS script. ## | |
14847 | ## ----------------------------------- ## | |
14848 | _ASEOF | |
14849 | test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 | |
503d2be0 | 14850 | |
eb697db5 DN |
14851 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
14852 | # Save the log message, to keep $0 and so on meaningful, and to | |
c0d27fcc | 14853 | # report actual input values of CONFIG_FILES etc. instead of their |
ca81d7a0 JD |
14854 | # values after options handling. |
14855 | ac_log=" | |
49a62e8a | 14856 | This file was extended by emacs $as_me 24.0.50, which was |
3d608a86 | 14857 | generated by GNU Autoconf 2.65. Invocation command line was |
c0d27fcc MR |
14858 | |
14859 | CONFIG_FILES = $CONFIG_FILES | |
14860 | CONFIG_HEADERS = $CONFIG_HEADERS | |
14861 | CONFIG_LINKS = $CONFIG_LINKS | |
14862 | CONFIG_COMMANDS = $CONFIG_COMMANDS | |
14863 | $ $0 $@ | |
14864 | ||
ca81d7a0 JD |
14865 | on `(hostname || uname -n) 2>/dev/null | sed 1q` |
14866 | " | |
14867 | ||
503d2be0 AS |
14868 | _ACEOF |
14869 | ||
eb697db5 DN |
14870 | case $ac_config_files in *" |
14871 | "*) set x $ac_config_files; shift; ac_config_files=$*;; | |
14872 | esac | |
14873 | ||
14874 | case $ac_config_headers in *" | |
14875 | "*) set x $ac_config_headers; shift; ac_config_headers=$*;; | |
14876 | esac | |
14877 | ||
14878 | ||
e9a63f04 | 14879 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
503d2be0 | 14880 | # Files that config.status was made for. |
ca81d7a0 JD |
14881 | config_files="$ac_config_files" |
14882 | config_headers="$ac_config_headers" | |
14883 | config_commands="$ac_config_commands" | |
503d2be0 | 14884 | |
ca81d7a0 | 14885 | _ACEOF |
503d2be0 | 14886 | |
e9a63f04 | 14887 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
503d2be0 | 14888 | ac_cs_usage="\ |
eb697db5 DN |
14889 | \`$as_me' instantiates files and other configuration actions |
14890 | from templates according to the current configuration. Unless the files | |
14891 | and actions are specified as TAGs, all are instantiated by default. | |
503d2be0 | 14892 | |
eb697db5 | 14893 | Usage: $0 [OPTION]... [TAG]... |
503d2be0 AS |
14894 | |
14895 | -h, --help print this help, then exit | |
f053c89f | 14896 | -V, --version print version number and configuration settings, then exit |
eb697db5 DN |
14897 | --config print configuration, then exit |
14898 | -q, --quiet, --silent | |
14899 | do not print progress messages | |
503d2be0 AS |
14900 | -d, --debug don't remove temporary files |
14901 | --recheck update $as_me by reconfiguring in the same conditions | |
eb697db5 | 14902 | --file=FILE[:TEMPLATE] |
e9a63f04 | 14903 | instantiate the configuration file FILE |
eb697db5 | 14904 | --header=FILE[:TEMPLATE] |
e9a63f04 | 14905 | instantiate the configuration header FILE |
503d2be0 AS |
14906 | |
14907 | Configuration files: | |
14908 | $config_files | |
14909 | ||
14910 | Configuration headers: | |
14911 | $config_headers | |
14912 | ||
14913 | Configuration commands: | |
14914 | $config_commands | |
14915 | ||
eb697db5 | 14916 | Report bugs to the package provider." |
503d2be0 | 14917 | |
ca81d7a0 | 14918 | _ACEOF |
e9a63f04 | 14919 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
eb697db5 | 14920 | ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" |
503d2be0 | 14921 | ac_cs_version="\\ |
49a62e8a | 14922 | emacs config.status 24.0.50 |
3d608a86 | 14923 | configured by $0, generated by GNU Autoconf 2.65, |
eb697db5 | 14924 | with options \\"\$ac_cs_config\\" |
503d2be0 | 14925 | |
3d608a86 | 14926 | Copyright (C) 2009 Free Software Foundation, Inc. |
503d2be0 AS |
14927 | This config.status script is free software; the Free Software Foundation |
14928 | gives unlimited permission to copy, distribute and modify it." | |
ca81d7a0 JD |
14929 | |
14930 | ac_pwd='$ac_pwd' | |
14931 | srcdir='$srcdir' | |
14932 | INSTALL='$INSTALL' | |
e9a63f04 | 14933 | test -n "\$AWK" || AWK=awk |
c0d27fcc | 14934 | _ACEOF |
503d2be0 | 14935 | |
e9a63f04 GM |
14936 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
14937 | # The default lists apply if the user does not specify any file. | |
503d2be0 AS |
14938 | ac_need_defaults=: |
14939 | while test $# != 0 | |
ba4481b5 | 14940 | do |
503d2be0 AS |
14941 | case $1 in |
14942 | --*=*) | |
ca81d7a0 JD |
14943 | ac_option=`expr "X$1" : 'X\([^=]*\)='` |
14944 | ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` | |
6bae0ccf DL |
14945 | ac_shift=: |
14946 | ;; | |
ca81d7a0 | 14947 | *) |
6bae0ccf DL |
14948 | ac_option=$1 |
14949 | ac_optarg=$2 | |
14950 | ac_shift=shift | |
503d2be0 | 14951 | ;; |
503d2be0 AS |
14952 | esac |
14953 | ||
6bae0ccf | 14954 | case $ac_option in |
503d2be0 | 14955 | # Handling of the options. |
19650fd6 AS |
14956 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) |
14957 | ac_cs_recheck=: ;; | |
ca81d7a0 | 14958 | --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) |
e9a63f04 | 14959 | $as_echo "$ac_cs_version"; exit ;; |
eb697db5 DN |
14960 | --config | --confi | --conf | --con | --co | --c ) |
14961 | $as_echo "$ac_cs_config"; exit ;; | |
ca81d7a0 | 14962 | --debug | --debu | --deb | --de | --d | -d ) |
503d2be0 AS |
14963 | debug=: ;; |
14964 | --file | --fil | --fi | --f ) | |
6bae0ccf | 14965 | $ac_shift |
e9a63f04 GM |
14966 | case $ac_optarg in |
14967 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
14968 | esac | |
eb697db5 | 14969 | as_fn_append CONFIG_FILES " '$ac_optarg'" |
503d2be0 AS |
14970 | ac_need_defaults=false;; |
14971 | --header | --heade | --head | --hea ) | |
6bae0ccf | 14972 | $ac_shift |
e9a63f04 GM |
14973 | case $ac_optarg in |
14974 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
14975 | esac | |
eb697db5 | 14976 | as_fn_append CONFIG_HEADERS " '$ac_optarg'" |
503d2be0 | 14977 | ac_need_defaults=false;; |
ca81d7a0 JD |
14978 | --he | --h) |
14979 | # Conflict between --help and --header | |
3d608a86 | 14980 | as_fn_error "ambiguous option: \`$1' |
eb697db5 | 14981 | Try \`$0 --help' for more information.";; |
ca81d7a0 | 14982 | --help | --hel | -h ) |
e9a63f04 | 14983 | $as_echo "$ac_cs_usage"; exit ;; |
19650fd6 AS |
14984 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
14985 | | -silent | --silent | --silen | --sile | --sil | --si | --s) | |
14986 | ac_cs_silent=: ;; | |
503d2be0 AS |
14987 | |
14988 | # This is an error. | |
3d608a86 | 14989 | -*) as_fn_error "unrecognized option: \`$1' |
eb697db5 | 14990 | Try \`$0 --help' for more information." ;; |
503d2be0 | 14991 | |
eb697db5 | 14992 | *) as_fn_append ac_config_targets " $1" |
ca81d7a0 | 14993 | ac_need_defaults=false ;; |
503d2be0 | 14994 | |
ba4481b5 | 14995 | esac |
503d2be0 | 14996 | shift |
ba4481b5 DL |
14997 | done |
14998 | ||
19650fd6 AS |
14999 | ac_configure_extra_args= |
15000 | ||
15001 | if $ac_cs_silent; then | |
15002 | exec 6>/dev/null | |
15003 | ac_configure_extra_args="$ac_configure_extra_args --silent" | |
15004 | fi | |
15005 | ||
15006 | _ACEOF | |
e9a63f04 | 15007 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
19650fd6 | 15008 | if \$ac_cs_recheck; then |
e9a63f04 GM |
15009 | set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion |
15010 | shift | |
15011 | \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 | |
15012 | CONFIG_SHELL='$SHELL' | |
ca81d7a0 | 15013 | export CONFIG_SHELL |
e9a63f04 | 15014 | exec "\$@" |
19650fd6 AS |
15015 | fi |
15016 | ||
503d2be0 | 15017 | _ACEOF |
e9a63f04 | 15018 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
ca81d7a0 JD |
15019 | exec 5>>config.log |
15020 | { | |
15021 | echo | |
15022 | sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX | |
15023 | ## Running $as_me. ## | |
15024 | _ASBOX | |
e9a63f04 | 15025 | $as_echo "$ac_log" |
ca81d7a0 | 15026 | } >&5 |
ba4481b5 | 15027 | |
ca81d7a0 | 15028 | _ACEOF |
e9a63f04 | 15029 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
503d2be0 | 15030 | # |
ca81d7a0 | 15031 | # INIT-COMMANDS |
503d2be0 | 15032 | # |
81ac4f35 | 15033 | GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPPFLAGS="$CPPFLAGS" |
503d2be0 | 15034 | |
c0d27fcc MR |
15035 | _ACEOF |
15036 | ||
e9a63f04 | 15037 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
ca81d7a0 JD |
15038 | |
15039 | # Handling of arguments. | |
503d2be0 AS |
15040 | for ac_config_target in $ac_config_targets |
15041 | do | |
ca81d7a0 JD |
15042 | case $ac_config_target in |
15043 | "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:src/config.in" ;; | |
15044 | "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; | |
981f8c13 | 15045 | "lib-src/Makefile") CONFIG_FILES="$CONFIG_FILES lib-src/Makefile" ;; |
ca81d7a0 | 15046 | "oldXMenu/Makefile") CONFIG_FILES="$CONFIG_FILES oldXMenu/Makefile" ;; |
f657c21b GM |
15047 | "doc/emacs/Makefile") CONFIG_FILES="$CONFIG_FILES doc/emacs/Makefile" ;; |
15048 | "doc/misc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/misc/Makefile" ;; | |
15049 | "doc/lispintro/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispintro/Makefile" ;; | |
15050 | "doc/lispref/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispref/Makefile" ;; | |
81ac4f35 | 15051 | "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; |
f657c21b | 15052 | "lwlib/Makefile") CONFIG_FILES="$CONFIG_FILES lwlib/Makefile" ;; |
ca81d7a0 | 15053 | "lisp/Makefile") CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;; |
ca81d7a0 JD |
15054 | "leim/Makefile") CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;; |
15055 | "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; | |
15056 | ||
3d608a86 | 15057 | *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; |
503d2be0 | 15058 | esac |
ba4481b5 | 15059 | done |
503d2be0 | 15060 | |
ca81d7a0 | 15061 | |
503d2be0 AS |
15062 | # If the user did not use the arguments to specify the items to instantiate, |
15063 | # then the envvar interface is used. Set only those that are not. | |
15064 | # We use the long form for the default assignment because of an extremely | |
15065 | # bizarre bug on SunOS 4.1.3. | |
15066 | if $ac_need_defaults; then | |
15067 | test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files | |
15068 | test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers | |
15069 | test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands | |
ba4481b5 | 15070 | fi |
503d2be0 | 15071 | |
19650fd6 | 15072 | # Have a temporary directory for convenience. Make it in the build tree |
ca81d7a0 | 15073 | # simply because there is no reason against having it here, and in addition, |
19650fd6 | 15074 | # creating and moving files from /tmp can sometimes cause problems. |
ca81d7a0 JD |
15075 | # Hook for its removal unless debugging. |
15076 | # Note that there is a small window in which the directory will not be cleaned: | |
15077 | # after its creation but before its name has been assigned to `$tmp'. | |
503d2be0 AS |
15078 | $debug || |
15079 | { | |
ca81d7a0 JD |
15080 | tmp= |
15081 | trap 'exit_status=$? | |
15082 | { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status | |
15083 | ' 0 | |
eb697db5 | 15084 | trap 'as_fn_exit 1' 1 2 13 15 |
503d2be0 | 15085 | } |
503d2be0 | 15086 | # Create a (secure) tmp directory for tmp files. |
19650fd6 | 15087 | |
503d2be0 | 15088 | { |
ca81d7a0 | 15089 | tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && |
503d2be0 AS |
15090 | test -n "$tmp" && test -d "$tmp" |
15091 | } || | |
15092 | { | |
ca81d7a0 JD |
15093 | tmp=./conf$$-$RANDOM |
15094 | (umask 077 && mkdir "$tmp") | |
3d608a86 | 15095 | } || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 |
503d2be0 | 15096 | |
e9a63f04 GM |
15097 | # Set up the scripts for CONFIG_FILES section. |
15098 | # No need to generate them if there are no CONFIG_FILES. | |
15099 | # This happens for instance with `./config.status config.h'. | |
ca81d7a0 JD |
15100 | if test -n "$CONFIG_FILES"; then |
15101 | ||
648b8e6d GM |
15102 | if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then |
15103 | ac_cs_awk_getline=: | |
15104 | ac_cs_awk_pipe_init= | |
15105 | ac_cs_awk_read_file=' | |
15106 | while ((getline aline < (F[key])) > 0) | |
15107 | print(aline) | |
15108 | close(F[key])' | |
15109 | ac_cs_awk_pipe_fini= | |
15110 | else | |
15111 | ac_cs_awk_getline=false | |
15112 | ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\"" | |
15113 | ac_cs_awk_read_file=' | |
15114 | print "|#_!!_#|" | |
15115 | print "cat " F[key] " &&" | |
15116 | '$ac_cs_awk_pipe_init | |
15117 | # The final `:' finishes the AND list. | |
15118 | ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }' | |
15119 | fi | |
eb697db5 DN |
15120 | ac_cr=`echo X | tr X '\015'` |
15121 | # On cygwin, bash can eat \r inside `` if the user requested igncr. | |
15122 | # But we know of no other shell where ac_cr would be empty at this | |
15123 | # point, so we can use a bashism as a fallback. | |
15124 | if test "x$ac_cr" = x; then | |
15125 | eval ac_cr=\$\'\\r\' | |
15126 | fi | |
e9a63f04 GM |
15127 | ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` |
15128 | if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then | |
3d608a86 | 15129 | ac_cs_awk_cr='\r' |
e9a63f04 GM |
15130 | else |
15131 | ac_cs_awk_cr=$ac_cr | |
ca81d7a0 | 15132 | fi |
503d2be0 | 15133 | |
e9a63f04 | 15134 | echo 'BEGIN {' >"$tmp/subs1.awk" && |
ca81d7a0 | 15135 | _ACEOF |
503d2be0 | 15136 | |
648b8e6d GM |
15137 | # Create commands to substitute file output variables. |
15138 | { | |
15139 | echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" && | |
15140 | echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' && | |
15141 | echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' && | |
15142 | echo "_ACAWK" && | |
15143 | echo "_ACEOF" | |
15144 | } >conf$$files.sh && | |
15145 | . ./conf$$files.sh || | |
3d608a86 | 15146 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 |
648b8e6d | 15147 | rm -f conf$$files.sh |
ca81d7a0 | 15148 | |
e9a63f04 GM |
15149 | { |
15150 | echo "cat >conf$$subs.awk <<_ACEOF" && | |
15151 | echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && | |
15152 | echo "_ACEOF" | |
15153 | } >conf$$subs.sh || | |
3d608a86 J |
15154 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 |
15155 | ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` | |
ca81d7a0 JD |
15156 | ac_delim='%!_!# ' |
15157 | for ac_last_try in false false false false false :; do | |
e9a63f04 | 15158 | . ./conf$$subs.sh || |
3d608a86 | 15159 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 |
e9a63f04 | 15160 | |
eb697db5 DN |
15161 | ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` |
15162 | if test $ac_delim_n = $ac_delim_num; then | |
c24fa7dc MB |
15163 | break |
15164 | elif $ac_last_try; then | |
3d608a86 | 15165 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 |
c24fa7dc MB |
15166 | else |
15167 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
503d2be0 | 15168 | fi |
ca81d7a0 | 15169 | done |
e9a63f04 GM |
15170 | rm -f conf$$subs.sh |
15171 | ||
15172 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
15173 | cat >>"\$tmp/subs1.awk" <<\\_ACAWK && | |
15174 | _ACEOF | |
15175 | sed -n ' | |
15176 | h | |
15177 | s/^/S["/; s/!.*/"]=/ | |
15178 | p | |
15179 | g | |
15180 | s/^[^!]*!// | |
15181 | :repl | |
15182 | t repl | |
15183 | s/'"$ac_delim"'$// | |
15184 | t delim | |
15185 | :nl | |
15186 | h | |
eb697db5 | 15187 | s/\(.\{148\}\)..*/\1/ |
e9a63f04 GM |
15188 | t more1 |
15189 | s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ | |
15190 | p | |
15191 | n | |
15192 | b repl | |
15193 | :more1 | |
15194 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
15195 | p | |
15196 | g | |
15197 | s/.\{148\}// | |
15198 | t nl | |
15199 | :delim | |
15200 | h | |
eb697db5 | 15201 | s/\(.\{148\}\)..*/\1/ |
e9a63f04 GM |
15202 | t more2 |
15203 | s/["\\]/\\&/g; s/^/"/; s/$/"/ | |
15204 | p | |
15205 | b | |
15206 | :more2 | |
15207 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
15208 | p | |
15209 | g | |
15210 | s/.\{148\}// | |
15211 | t delim | |
15212 | ' <conf$$subs.awk | sed ' | |
15213 | /^[^""]/{ | |
15214 | N | |
15215 | s/\n// | |
15216 | } | |
15217 | ' >>$CONFIG_STATUS || ac_write_fail=1 | |
15218 | rm -f conf$$subs.awk | |
15219 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
15220 | _ACAWK | |
15221 | cat >>"\$tmp/subs1.awk" <<_ACAWK && | |
15222 | for (key in S) S_is_set[key] = 1 | |
15223 | FS = "\a" | |
648b8e6d | 15224 | \$ac_cs_awk_pipe_init |
e9a63f04 GM |
15225 | } |
15226 | { | |
15227 | line = $ 0 | |
15228 | nfields = split(line, field, "@") | |
15229 | substed = 0 | |
15230 | len = length(field[1]) | |
15231 | for (i = 2; i < nfields; i++) { | |
15232 | key = field[i] | |
15233 | keylen = length(key) | |
15234 | if (S_is_set[key]) { | |
15235 | value = S[key] | |
15236 | line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) | |
15237 | len += length(value) + length(field[++i]) | |
15238 | substed = 1 | |
15239 | } else | |
15240 | len += 1 + keylen | |
15241 | } | |
648b8e6d GM |
15242 | if (nfields == 3 && !substed) { |
15243 | key = field[2] | |
15244 | if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) { | |
15245 | \$ac_cs_awk_read_file | |
15246 | next | |
15247 | } | |
15248 | } | |
e9a63f04 GM |
15249 | print line |
15250 | } | |
648b8e6d | 15251 | \$ac_cs_awk_pipe_fini |
e9a63f04 | 15252 | _ACAWK |
ca81d7a0 | 15253 | _ACEOF |
e9a63f04 GM |
15254 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
15255 | if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then | |
15256 | sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" | |
15257 | else | |
15258 | cat | |
15259 | fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ | |
3d608a86 | 15260 | || as_fn_error "could not setup config files machinery" "$LINENO" 5 |
c0d27fcc | 15261 | _ACEOF |
ca81d7a0 | 15262 | |
3d608a86 J |
15263 | # VPATH may cause trouble with some makes, so we remove $(srcdir), |
15264 | # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and | |
ca81d7a0 JD |
15265 | # trailing colons and then remove the whole line if VPATH becomes empty |
15266 | # (actually we leave an empty line to preserve line numbers). | |
15267 | if test "x$srcdir" = x.; then | |
3d608a86 J |
15268 | ac_vpsub='/^[ ]*VPATH[ ]*=/{ |
15269 | s/:*\$(srcdir):*/:/ | |
15270 | s/:*\${srcdir}:*/:/ | |
15271 | s/:*@srcdir@:*/:/ | |
15272 | s/^\([^=]*=[ ]*\):*/\1/ | |
ca81d7a0 JD |
15273 | s/:*$// |
15274 | s/^[^=]*=[ ]*$// | |
15275 | }' | |
15276 | fi | |
15277 | ||
e9a63f04 | 15278 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
ca81d7a0 JD |
15279 | fi # test -n "$CONFIG_FILES" |
15280 | ||
e9a63f04 GM |
15281 | # Set up the scripts for CONFIG_HEADERS section. |
15282 | # No need to generate them if there are no CONFIG_HEADERS. | |
15283 | # This happens for instance with `./config.status Makefile'. | |
15284 | if test -n "$CONFIG_HEADERS"; then | |
15285 | cat >"$tmp/defines.awk" <<\_ACAWK || | |
15286 | BEGIN { | |
15287 | _ACEOF | |
dc2933eb | 15288 | |
e9a63f04 GM |
15289 | # Transform confdefs.h into an awk script `defines.awk', embedded as |
15290 | # here-document in config.status, that substitutes the proper values into | |
15291 | # config.h.in to produce config.h. | |
15292 | ||
15293 | # Create a delimiter string that does not exist in confdefs.h, to ease | |
15294 | # handling of long lines. | |
15295 | ac_delim='%!_!# ' | |
15296 | for ac_last_try in false false :; do | |
15297 | ac_t=`sed -n "/$ac_delim/p" confdefs.h` | |
15298 | if test -z "$ac_t"; then | |
15299 | break | |
15300 | elif $ac_last_try; then | |
3d608a86 | 15301 | as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5 |
e9a63f04 GM |
15302 | else |
15303 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
15304 | fi | |
15305 | done | |
15306 | ||
15307 | # For the awk script, D is an array of macro values keyed by name, | |
15308 | # likewise P contains macro parameters if any. Preserve backslash | |
15309 | # newline sequences. | |
15310 | ||
15311 | ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* | |
15312 | sed -n ' | |
15313 | s/.\{148\}/&'"$ac_delim"'/g | |
15314 | t rset | |
15315 | :rset | |
15316 | s/^[ ]*#[ ]*define[ ][ ]*/ / | |
15317 | t def | |
15318 | d | |
15319 | :def | |
15320 | s/\\$// | |
15321 | t bsnl | |
15322 | s/["\\]/\\&/g | |
15323 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
15324 | D["\1"]=" \3"/p | |
15325 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p | |
15326 | d | |
15327 | :bsnl | |
15328 | s/["\\]/\\&/g | |
15329 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
15330 | D["\1"]=" \3\\\\\\n"\\/p | |
15331 | t cont | |
15332 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p | |
15333 | t cont | |
15334 | d | |
15335 | :cont | |
15336 | n | |
15337 | s/.\{148\}/&'"$ac_delim"'/g | |
15338 | t clear | |
15339 | :clear | |
15340 | s/\\$// | |
15341 | t bsnlc | |
15342 | s/["\\]/\\&/g; s/^/"/; s/$/"/p | |
15343 | d | |
15344 | :bsnlc | |
15345 | s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p | |
15346 | b cont | |
15347 | ' <confdefs.h | sed ' | |
15348 | s/'"$ac_delim"'/"\\\ | |
15349 | "/g' >>$CONFIG_STATUS || ac_write_fail=1 | |
15350 | ||
15351 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
15352 | for (key in D) D_is_set[key] = 1 | |
15353 | FS = "\a" | |
15354 | } | |
15355 | /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { | |
15356 | line = \$ 0 | |
15357 | split(line, arg, " ") | |
15358 | if (arg[1] == "#") { | |
15359 | defundef = arg[2] | |
15360 | mac1 = arg[3] | |
15361 | } else { | |
15362 | defundef = substr(arg[1], 2) | |
15363 | mac1 = arg[2] | |
15364 | } | |
15365 | split(mac1, mac2, "(") #) | |
15366 | macro = mac2[1] | |
eb697db5 | 15367 | prefix = substr(line, 1, index(line, defundef) - 1) |
e9a63f04 GM |
15368 | if (D_is_set[macro]) { |
15369 | # Preserve the white space surrounding the "#". | |
e9a63f04 GM |
15370 | print prefix "define", macro P[macro] D[macro] |
15371 | next | |
15372 | } else { | |
15373 | # Replace #undef with comments. This is necessary, for example, | |
15374 | # in the case of _POSIX_SOURCE, which is predefined and required | |
15375 | # on some systems where configure will not decide to define it. | |
15376 | if (defundef == "undef") { | |
eb697db5 | 15377 | print "/*", prefix defundef, macro, "*/" |
e9a63f04 GM |
15378 | next |
15379 | } | |
15380 | } | |
15381 | } | |
15382 | { print } | |
15383 | _ACAWK | |
15384 | _ACEOF | |
15385 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
3d608a86 | 15386 | as_fn_error "could not setup config headers machinery" "$LINENO" 5 |
e9a63f04 GM |
15387 | fi # test -n "$CONFIG_HEADERS" |
15388 | ||
15389 | ||
15390 | eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" | |
15391 | shift | |
15392 | for ac_tag | |
ca81d7a0 JD |
15393 | do |
15394 | case $ac_tag in | |
15395 | :[FHLC]) ac_mode=$ac_tag; continue;; | |
15396 | esac | |
15397 | case $ac_mode$ac_tag in | |
15398 | :[FHL]*:*);; | |
3d608a86 | 15399 | :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; |
ca81d7a0 JD |
15400 | :[FH]-) ac_tag=-:-;; |
15401 | :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; | |
15402 | esac | |
15403 | ac_save_IFS=$IFS | |
15404 | IFS=: | |
15405 | set x $ac_tag | |
15406 | IFS=$ac_save_IFS | |
15407 | shift | |
15408 | ac_file=$1 | |
15409 | shift | |
15410 | ||
15411 | case $ac_mode in | |
15412 | :L) ac_source=$1;; | |
15413 | :[FH]) | |
15414 | ac_file_inputs= | |
15415 | for ac_f | |
15416 | do | |
15417 | case $ac_f in | |
15418 | -) ac_f="$tmp/stdin";; | |
15419 | *) # Look for the file first in the build tree, then in the source tree | |
15420 | # (if the path is not absolute). The absolute path cannot be DOS-style, | |
15421 | # because $ac_f cannot contain `:'. | |
15422 | test -f "$ac_f" || | |
15423 | case $ac_f in | |
15424 | [\\/$]*) false;; | |
15425 | *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; | |
15426 | esac || | |
3d608a86 | 15427 | as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; |
ca81d7a0 | 15428 | esac |
e9a63f04 | 15429 | case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac |
eb697db5 | 15430 | as_fn_append ac_file_inputs " '$ac_f'" |
ca81d7a0 JD |
15431 | done |
15432 | ||
15433 | # Let's still pretend it is `configure' which instantiates (i.e., don't | |
15434 | # use $as_me), people would be surprised to read: | |
15435 | # /* config.h. Generated by config.status. */ | |
e9a63f04 GM |
15436 | configure_input='Generated from '` |
15437 | $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' | |
15438 | `' by configure.' | |
ca81d7a0 JD |
15439 | if test x"$ac_file" != x-; then |
15440 | configure_input="$ac_file. $configure_input" | |
eb697db5 | 15441 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 |
e9a63f04 | 15442 | $as_echo "$as_me: creating $ac_file" >&6;} |
ca81d7a0 | 15443 | fi |
e9a63f04 GM |
15444 | # Neutralize special characters interpreted by sed in replacement strings. |
15445 | case $configure_input in #( | |
15446 | *\&* | *\|* | *\\* ) | |
15447 | ac_sed_conf_input=`$as_echo "$configure_input" | | |
15448 | sed 's/[\\\\&|]/\\\\&/g'`;; #( | |
15449 | *) ac_sed_conf_input=$configure_input;; | |
15450 | esac | |
ca81d7a0 JD |
15451 | |
15452 | case $ac_tag in | |
e9a63f04 | 15453 | *:-:* | *:-) cat >"$tmp/stdin" \ |
3d608a86 | 15454 | || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; |
ca81d7a0 JD |
15455 | esac |
15456 | ;; | |
ba4481b5 DL |
15457 | esac |
15458 | ||
ca81d7a0 | 15459 | ac_dir=`$as_dirname -- "$ac_file" || |
c0d27fcc | 15460 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ |
edfaf76d LK |
15461 | X"$ac_file" : 'X\(//\)[^/]' \| \ |
15462 | X"$ac_file" : 'X\(//\)$' \| \ | |
ca81d7a0 | 15463 | X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || |
e9a63f04 | 15464 | $as_echo X"$ac_file" | |
ca81d7a0 JD |
15465 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ |
15466 | s//\1/ | |
15467 | q | |
15468 | } | |
15469 | /^X\(\/\/\)[^/].*/{ | |
15470 | s//\1/ | |
15471 | q | |
15472 | } | |
15473 | /^X\(\/\/\)$/{ | |
15474 | s//\1/ | |
15475 | q | |
15476 | } | |
15477 | /^X\(\/\).*/{ | |
15478 | s//\1/ | |
15479 | q | |
15480 | } | |
15481 | s/.*/./; q'` | |
eb697db5 | 15482 | as_dir="$ac_dir"; as_fn_mkdir_p |
c0d27fcc | 15483 | ac_builddir=. |
98418dba | 15484 | |
ca81d7a0 JD |
15485 | case "$ac_dir" in |
15486 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
15487 | *) | |
e9a63f04 | 15488 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` |
ca81d7a0 | 15489 | # A ".." for each directory in $ac_dir_suffix. |
e9a63f04 | 15490 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` |
ca81d7a0 JD |
15491 | case $ac_top_builddir_sub in |
15492 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
15493 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
15494 | esac ;; | |
15495 | esac | |
15496 | ac_abs_top_builddir=$ac_pwd | |
15497 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
15498 | # for backward compatibility: | |
15499 | ac_top_builddir=$ac_top_build_prefix | |
c0d27fcc MR |
15500 | |
15501 | case $srcdir in | |
ca81d7a0 | 15502 | .) # We are building in place. |
c0d27fcc | 15503 | ac_srcdir=. |
ca81d7a0 JD |
15504 | ac_top_srcdir=$ac_top_builddir_sub |
15505 | ac_abs_top_srcdir=$ac_pwd ;; | |
15506 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
c0d27fcc | 15507 | ac_srcdir=$srcdir$ac_dir_suffix; |
ca81d7a0 JD |
15508 | ac_top_srcdir=$srcdir |
15509 | ac_abs_top_srcdir=$srcdir ;; | |
15510 | *) # Relative name. | |
15511 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
15512 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
15513 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
c0d27fcc | 15514 | esac |
ca81d7a0 | 15515 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
edfaf76d | 15516 | |
c0d27fcc | 15517 | |
ca81d7a0 JD |
15518 | case $ac_mode in |
15519 | :F) | |
15520 | # | |
15521 | # CONFIG_FILE | |
15522 | # | |
ba4481b5 | 15523 | |
503d2be0 AS |
15524 | case $INSTALL in |
15525 | [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; | |
ca81d7a0 | 15526 | *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; |
ba4481b5 | 15527 | esac |
ca81d7a0 | 15528 | _ACEOF |
ba4481b5 | 15529 | |
e9a63f04 | 15530 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
ca81d7a0 JD |
15531 | # If the template does not know about datarootdir, expand it. |
15532 | # FIXME: This hack should be removed a few years after 2.60. | |
15533 | ac_datarootdir_hack=; ac_datarootdir_seen= | |
e9a63f04 GM |
15534 | ac_sed_dataroot=' |
15535 | /datarootdir/ { | |
ca81d7a0 JD |
15536 | p |
15537 | q | |
15538 | } | |
15539 | /@datadir@/p | |
15540 | /@docdir@/p | |
15541 | /@infodir@/p | |
15542 | /@localedir@/p | |
eb697db5 | 15543 | /@mandir@/p' |
e9a63f04 | 15544 | case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in |
ca81d7a0 JD |
15545 | *datarootdir*) ac_datarootdir_seen=yes;; |
15546 | *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) | |
eb697db5 | 15547 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 |
e9a63f04 | 15548 | $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} |
8eeae1c9 | 15549 | _ACEOF |
e9a63f04 | 15550 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
ca81d7a0 JD |
15551 | ac_datarootdir_hack=' |
15552 | s&@datadir@&$datadir&g | |
15553 | s&@docdir@&$docdir&g | |
15554 | s&@infodir@&$infodir&g | |
15555 | s&@localedir@&$localedir&g | |
15556 | s&@mandir@&$mandir&g | |
eb697db5 | 15557 | s&\\\${datarootdir}&$datarootdir&g' ;; |
ca81d7a0 | 15558 | esac |
c0d27fcc | 15559 | _ACEOF |
ca81d7a0 JD |
15560 | |
15561 | # Neutralize VPATH when `$srcdir' = `.'. | |
15562 | # Shell code in configure.ac might set extrasub. | |
15563 | # FIXME: do we really want to maintain this feature? | |
e9a63f04 GM |
15564 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
15565 | ac_sed_extra="$ac_vpsub | |
503d2be0 | 15566 | $extrasub |
c0d27fcc | 15567 | _ACEOF |
e9a63f04 | 15568 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
503d2be0 AS |
15569 | :t |
15570 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b | |
e9a63f04 | 15571 | s|@configure_input@|$ac_sed_conf_input|;t t |
ca81d7a0 | 15572 | s&@top_builddir@&$ac_top_builddir_sub&;t t |
e9a63f04 | 15573 | s&@top_build_prefix@&$ac_top_build_prefix&;t t |
ca81d7a0 JD |
15574 | s&@srcdir@&$ac_srcdir&;t t |
15575 | s&@abs_srcdir@&$ac_abs_srcdir&;t t | |
15576 | s&@top_srcdir@&$ac_top_srcdir&;t t | |
15577 | s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t | |
15578 | s&@builddir@&$ac_builddir&;t t | |
15579 | s&@abs_builddir@&$ac_abs_builddir&;t t | |
15580 | s&@abs_top_builddir@&$ac_abs_top_builddir&;t t | |
15581 | s&@INSTALL@&$ac_INSTALL&;t t | |
15582 | $ac_datarootdir_hack | |
e9a63f04 | 15583 | " |
648b8e6d GM |
15584 | eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | |
15585 | if $ac_cs_awk_getline; then | |
15586 | $AWK -f "$tmp/subs.awk" | |
15587 | else | |
15588 | $AWK -f "$tmp/subs.awk" | $SHELL | |
15589 | fi >$tmp/out \ | |
3d608a86 | 15590 | || as_fn_error "could not create $ac_file" "$LINENO" 5 |
ca81d7a0 JD |
15591 | |
15592 | test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && | |
15593 | { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && | |
15594 | { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && | |
eb697db5 | 15595 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' |
3d608a86 | 15596 | which seems to be undefined. Please make sure it is defined." >&5 |
e9a63f04 | 15597 | $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' |
3d608a86 | 15598 | which seems to be undefined. Please make sure it is defined." >&2;} |
ca81d7a0 JD |
15599 | |
15600 | rm -f "$tmp/stdin" | |
503d2be0 | 15601 | case $ac_file in |
e9a63f04 GM |
15602 | -) cat "$tmp/out" && rm -f "$tmp/out";; |
15603 | *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; | |
15604 | esac \ | |
3d608a86 | 15605 | || as_fn_error "could not create $ac_file" "$LINENO" 5 |
ca81d7a0 JD |
15606 | ;; |
15607 | :H) | |
15608 | # | |
15609 | # CONFIG_HEADER | |
15610 | # | |
503d2be0 | 15611 | if test x"$ac_file" != x-; then |
e9a63f04 GM |
15612 | { |
15613 | $as_echo "/* $configure_input */" \ | |
15614 | && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" | |
15615 | } >"$tmp/config.h" \ | |
3d608a86 | 15616 | || as_fn_error "could not create $ac_file" "$LINENO" 5 |
e9a63f04 | 15617 | if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then |
eb697db5 | 15618 | { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 |
e9a63f04 | 15619 | $as_echo "$as_me: $ac_file is unchanged" >&6;} |
503d2be0 | 15620 | else |
e9a63f04 GM |
15621 | rm -f "$ac_file" |
15622 | mv "$tmp/config.h" "$ac_file" \ | |
3d608a86 | 15623 | || as_fn_error "could not create $ac_file" "$LINENO" 5 |
ba4481b5 | 15624 | fi |
503d2be0 | 15625 | else |
e9a63f04 GM |
15626 | $as_echo "/* $configure_input */" \ |
15627 | && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ | |
3d608a86 | 15628 | || as_fn_error "could not create -" "$LINENO" 5 |
ba4481b5 | 15629 | fi |
ca81d7a0 | 15630 | ;; |
edfaf76d | 15631 | |
eb697db5 | 15632 | :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 |
e9a63f04 | 15633 | $as_echo "$as_me: executing $ac_file commands" >&6;} |
ca81d7a0 JD |
15634 | ;; |
15635 | esac | |
ba4481b5 | 15636 | |
c0d27fcc | 15637 | |
ca81d7a0 JD |
15638 | case $ac_file$ac_mode in |
15639 | "default":C) | |
ba4481b5 DL |
15640 | |
15641 | ### Make the necessary directories, if they don't exist. | |
15642 | for dir in etc lisp ; do | |
15643 | test -d ${dir} || mkdir ${dir} | |
15644 | done | |
15645 | ||
ba4481b5 | 15646 | echo creating src/epaths.h |
4aa6b955 | 15647 | ${MAKE-make} epaths-force |
ba4481b5 | 15648 | |
bf3126f6 | 15649 | if test ! -f src/.gdbinit && test -f $srcdir/src/.gdbinit; then |
ba4481b5 | 15650 | echo creating src/.gdbinit |
503d2be0 | 15651 | echo source $srcdir/src/.gdbinit > src/.gdbinit |
ba4481b5 DL |
15652 | fi |
15653 | ||
503d2be0 | 15654 | ;; |
ca81d7a0 | 15655 | |
503d2be0 | 15656 | esac |
ca81d7a0 | 15657 | done # for ac_tag |
503d2be0 | 15658 | |
ba4481b5 | 15659 | |
eb697db5 | 15660 | as_fn_exit 0 |
c0d27fcc | 15661 | _ACEOF |
503d2be0 AS |
15662 | ac_clean_files=$ac_clean_files_save |
15663 | ||
e9a63f04 | 15664 | test $ac_write_fail = 0 || |
3d608a86 | 15665 | as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 |
e9a63f04 | 15666 | |
c0d27fcc | 15667 | |
503d2be0 AS |
15668 | # configure is writing to config.log, and then calls config.status. |
15669 | # config.status does its own redirection, appending to config.log. | |
15670 | # Unfortunately, on DOS this fails, as config.log is still kept open | |
15671 | # by configure, so config.status won't be able to write to it; its | |
15672 | # output is simply discarded. So we exec the FD to /dev/null, | |
15673 | # effectively closing config.log, so it can be properly (re)opened and | |
15674 | # appended to by config.status. When coming back to configure, we | |
15675 | # need to make the FD available again. | |
15676 | if test "$no_create" != yes; then | |
15677 | ac_cs_success=: | |
19650fd6 AS |
15678 | ac_config_status_args= |
15679 | test "$silent" = yes && | |
15680 | ac_config_status_args="$ac_config_status_args --quiet" | |
503d2be0 | 15681 | exec 5>/dev/null |
19650fd6 | 15682 | $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false |
503d2be0 AS |
15683 | exec 5>>config.log |
15684 | # Use ||, not &&, to avoid exiting from the if with $? = 1, which | |
15685 | # would make configure fail if this is the last instruction. | |
3d608a86 | 15686 | $ac_cs_success || as_fn_exit $? |
503d2be0 | 15687 | fi |
e9a63f04 | 15688 | if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then |
eb697db5 DN |
15689 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 |
15690 | $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} | |
e9a63f04 | 15691 | fi |
f5f47add | 15692 | |
c0d27fcc | 15693 |