]> code.delx.au - gnu-emacs/blob - configure
*** empty log message ***
[gnu-emacs] / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_help="$ac_help
15 --without-gcc don't use GCC to compile Emacs if GCC is found"
16 ac_help="$ac_help
17 --without-pop don't support POP mail retrieval with movemail"
18 ac_help="$ac_help
19 --with-kerberos support Kerberos-authenticated POP"
20 ac_help="$ac_help
21 --with-kerberos5 support Kerberos version 5 authenticated POP"
22 ac_help="$ac_help
23 --with-hesiod support Hesiod to get the POP server host"
24 ac_help="$ac_help
25 --with-x-toolkit=KIT use an X toolkit (KIT = yes/lucid/athena/motif/no)"
26 ac_help="$ac_help
27 --with-xpm use -lXpm for displaying XPM images"
28 ac_help="$ac_help
29 --with-jpeg use -ljpeg for displaying JPEG images"
30 ac_help="$ac_help
31 --with-tiff use -ltiff for displaying TIFF images"
32 ac_help="$ac_help
33 --with-gif use -lungif for displaying GIF images"
34 ac_help="$ac_help
35 --with-png use -lpng for displaying PNG images"
36 ac_help="$ac_help
37 --without-toolkit-scroll-bars
38 don't use Motif or Xaw3d scroll bars"
39 ac_help="$ac_help
40 --with-x use the X Window System"
41
42 # Initialize some variables set by options.
43 # The variables have the same names as the options, with
44 # dashes changed to underlines.
45 build=NONE
46 cache_file=./config.cache
47 exec_prefix=NONE
48 host=NONE
49 no_create=
50 nonopt=NONE
51 no_recursion=
52 prefix=NONE
53 program_prefix=NONE
54 program_suffix=NONE
55 program_transform_name=s,x,x,
56 silent=
57 site=
58 srcdir=
59 target=NONE
60 verbose=
61 x_includes=NONE
62 x_libraries=NONE
63 bindir='${exec_prefix}/bin'
64 sbindir='${exec_prefix}/sbin'
65 libexecdir='${exec_prefix}/libexec'
66 datadir='${prefix}/share'
67 sysconfdir='${prefix}/etc'
68 sharedstatedir='${prefix}/com'
69 localstatedir='${prefix}/var'
70 libdir='${exec_prefix}/lib'
71 includedir='${prefix}/include'
72 oldincludedir='/usr/include'
73 infodir='${prefix}/info'
74 mandir='${prefix}/man'
75
76 # Initialize some other variables.
77 subdirs=
78 MFLAGS= MAKEFLAGS=
79 SHELL=${CONFIG_SHELL-/bin/sh}
80 # Maximum number of lines to put in a shell here document.
81 ac_max_here_lines=12
82
83 ac_prev=
84 for ac_option
85 do
86
87 # If the previous option needs an argument, assign it.
88 if test -n "$ac_prev"; then
89 eval "$ac_prev=\$ac_option"
90 ac_prev=
91 continue
92 fi
93
94 case "$ac_option" in
95 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
96 *) ac_optarg= ;;
97 esac
98
99 # Accept the important Cygnus configure options, so we can diagnose typos.
100
101 case "$ac_option" in
102
103 -bindir | --bindir | --bindi | --bind | --bin | --bi)
104 ac_prev=bindir ;;
105 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
106 bindir="$ac_optarg" ;;
107
108 -build | --build | --buil | --bui | --bu)
109 ac_prev=build ;;
110 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
111 build="$ac_optarg" ;;
112
113 -cache-file | --cache-file | --cache-fil | --cache-fi \
114 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
115 ac_prev=cache_file ;;
116 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
117 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
118 cache_file="$ac_optarg" ;;
119
120 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
121 ac_prev=datadir ;;
122 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
123 | --da=*)
124 datadir="$ac_optarg" ;;
125
126 -disable-* | --disable-*)
127 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
128 # Reject names that are not valid shell variable names.
129 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
130 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
131 fi
132 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
133 eval "enable_${ac_feature}=no" ;;
134
135 -enable-* | --enable-*)
136 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
137 # Reject names that are not valid shell variable names.
138 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
139 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
140 fi
141 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
142 case "$ac_option" in
143 *=*) ;;
144 *) ac_optarg=yes ;;
145 esac
146 eval "enable_${ac_feature}='$ac_optarg'" ;;
147
148 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
149 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
150 | --exec | --exe | --ex)
151 ac_prev=exec_prefix ;;
152 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
153 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
154 | --exec=* | --exe=* | --ex=*)
155 exec_prefix="$ac_optarg" ;;
156
157 -gas | --gas | --ga | --g)
158 # Obsolete; use --with-gas.
159 with_gas=yes ;;
160
161 -help | --help | --hel | --he)
162 # Omit some internal or obsolete options to make the list less imposing.
163 # This message is too long to be a string in the A/UX 3.1 sh.
164 cat << EOF
165 Usage: configure [options] [host]
166 Options: [defaults in brackets after descriptions]
167 Configuration:
168 --cache-file=FILE cache test results in FILE
169 --help print this message
170 --no-create do not create output files
171 --quiet, --silent do not print \`checking...' messages
172 --version print the version of autoconf that created configure
173 Directory and file names:
174 --prefix=PREFIX install architecture-independent files in PREFIX
175 [$ac_default_prefix]
176 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
177 [same as prefix]
178 --bindir=DIR user executables in DIR [EPREFIX/bin]
179 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
180 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
181 --datadir=DIR read-only architecture-independent data in DIR
182 [PREFIX/share]
183 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
184 --sharedstatedir=DIR modifiable architecture-independent data in DIR
185 [PREFIX/com]
186 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
187 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
188 --includedir=DIR C header files in DIR [PREFIX/include]
189 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
190 --infodir=DIR info documentation in DIR [PREFIX/info]
191 --mandir=DIR man documentation in DIR [PREFIX/man]
192 --srcdir=DIR find the sources in DIR [configure dir or ..]
193 --program-prefix=PREFIX prepend PREFIX to installed program names
194 --program-suffix=SUFFIX append SUFFIX to installed program names
195 --program-transform-name=PROGRAM
196 run sed PROGRAM on installed program names
197 EOF
198 cat << EOF
199 Host type:
200 --build=BUILD configure for building on BUILD [BUILD=HOST]
201 --host=HOST configure for HOST [guessed]
202 --target=TARGET configure for TARGET [TARGET=HOST]
203 Features and packages:
204 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
205 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
206 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
207 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
208 --x-includes=DIR X include files are in DIR
209 --x-libraries=DIR X library files are in DIR
210 EOF
211 if test -n "$ac_help"; then
212 echo "--enable and --with options recognized:$ac_help"
213 fi
214 exit 0 ;;
215
216 -host | --host | --hos | --ho)
217 ac_prev=host ;;
218 -host=* | --host=* | --hos=* | --ho=*)
219 host="$ac_optarg" ;;
220
221 -includedir | --includedir | --includedi | --included | --include \
222 | --includ | --inclu | --incl | --inc)
223 ac_prev=includedir ;;
224 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
225 | --includ=* | --inclu=* | --incl=* | --inc=*)
226 includedir="$ac_optarg" ;;
227
228 -infodir | --infodir | --infodi | --infod | --info | --inf)
229 ac_prev=infodir ;;
230 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
231 infodir="$ac_optarg" ;;
232
233 -libdir | --libdir | --libdi | --libd)
234 ac_prev=libdir ;;
235 -libdir=* | --libdir=* | --libdi=* | --libd=*)
236 libdir="$ac_optarg" ;;
237
238 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
239 | --libexe | --libex | --libe)
240 ac_prev=libexecdir ;;
241 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
242 | --libexe=* | --libex=* | --libe=*)
243 libexecdir="$ac_optarg" ;;
244
245 -localstatedir | --localstatedir | --localstatedi | --localstated \
246 | --localstate | --localstat | --localsta | --localst \
247 | --locals | --local | --loca | --loc | --lo)
248 ac_prev=localstatedir ;;
249 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
250 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
251 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
252 localstatedir="$ac_optarg" ;;
253
254 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
255 ac_prev=mandir ;;
256 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
257 mandir="$ac_optarg" ;;
258
259 -nfp | --nfp | --nf)
260 # Obsolete; use --without-fp.
261 with_fp=no ;;
262
263 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
264 | --no-cr | --no-c)
265 no_create=yes ;;
266
267 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
268 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
269 no_recursion=yes ;;
270
271 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
272 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
273 | --oldin | --oldi | --old | --ol | --o)
274 ac_prev=oldincludedir ;;
275 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
276 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
277 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
278 oldincludedir="$ac_optarg" ;;
279
280 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
281 ac_prev=prefix ;;
282 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
283 prefix="$ac_optarg" ;;
284
285 -program-prefix | --program-prefix | --program-prefi | --program-pref \
286 | --program-pre | --program-pr | --program-p)
287 ac_prev=program_prefix ;;
288 -program-prefix=* | --program-prefix=* | --program-prefi=* \
289 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
290 program_prefix="$ac_optarg" ;;
291
292 -program-suffix | --program-suffix | --program-suffi | --program-suff \
293 | --program-suf | --program-su | --program-s)
294 ac_prev=program_suffix ;;
295 -program-suffix=* | --program-suffix=* | --program-suffi=* \
296 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
297 program_suffix="$ac_optarg" ;;
298
299 -program-transform-name | --program-transform-name \
300 | --program-transform-nam | --program-transform-na \
301 | --program-transform-n | --program-transform- \
302 | --program-transform | --program-transfor \
303 | --program-transfo | --program-transf \
304 | --program-trans | --program-tran \
305 | --progr-tra | --program-tr | --program-t)
306 ac_prev=program_transform_name ;;
307 -program-transform-name=* | --program-transform-name=* \
308 | --program-transform-nam=* | --program-transform-na=* \
309 | --program-transform-n=* | --program-transform-=* \
310 | --program-transform=* | --program-transfor=* \
311 | --program-transfo=* | --program-transf=* \
312 | --program-trans=* | --program-tran=* \
313 | --progr-tra=* | --program-tr=* | --program-t=*)
314 program_transform_name="$ac_optarg" ;;
315
316 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
317 | -silent | --silent | --silen | --sile | --sil)
318 silent=yes ;;
319
320 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
321 ac_prev=sbindir ;;
322 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
323 | --sbi=* | --sb=*)
324 sbindir="$ac_optarg" ;;
325
326 -sharedstatedir | --sharedstatedir | --sharedstatedi \
327 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
328 | --sharedst | --shareds | --shared | --share | --shar \
329 | --sha | --sh)
330 ac_prev=sharedstatedir ;;
331 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
332 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
333 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
334 | --sha=* | --sh=*)
335 sharedstatedir="$ac_optarg" ;;
336
337 -site | --site | --sit)
338 ac_prev=site ;;
339 -site=* | --site=* | --sit=*)
340 site="$ac_optarg" ;;
341
342 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
343 ac_prev=srcdir ;;
344 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
345 srcdir="$ac_optarg" ;;
346
347 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
348 | --syscon | --sysco | --sysc | --sys | --sy)
349 ac_prev=sysconfdir ;;
350 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
351 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
352 sysconfdir="$ac_optarg" ;;
353
354 -target | --target | --targe | --targ | --tar | --ta | --t)
355 ac_prev=target ;;
356 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
357 target="$ac_optarg" ;;
358
359 -v | -verbose | --verbose | --verbos | --verbo | --verb)
360 verbose=yes ;;
361
362 -version | --version | --versio | --versi | --vers)
363 echo "configure generated by autoconf version 2.13"
364 exit 0 ;;
365
366 -with-* | --with-*)
367 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
368 # Reject names that are not valid shell variable names.
369 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
370 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
371 fi
372 ac_package=`echo $ac_package| sed 's/-/_/g'`
373 case "$ac_option" in
374 *=*) ;;
375 *) ac_optarg=yes ;;
376 esac
377 eval "with_${ac_package}='$ac_optarg'" ;;
378
379 -without-* | --without-*)
380 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
381 # Reject names that are not valid shell variable names.
382 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
383 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
384 fi
385 ac_package=`echo $ac_package| sed 's/-/_/g'`
386 eval "with_${ac_package}=no" ;;
387
388 --x)
389 # Obsolete; use --with-x.
390 with_x=yes ;;
391
392 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
393 | --x-incl | --x-inc | --x-in | --x-i)
394 ac_prev=x_includes ;;
395 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
396 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
397 x_includes="$ac_optarg" ;;
398
399 -x-libraries | --x-libraries | --x-librarie | --x-librari \
400 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
401 ac_prev=x_libraries ;;
402 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
403 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
404 x_libraries="$ac_optarg" ;;
405
406 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
407 ;;
408
409 *)
410 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
411 echo "configure: warning: $ac_option: invalid host type" 1>&2
412 fi
413 if test "x$nonopt" != xNONE; then
414 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
415 fi
416 nonopt="$ac_option"
417 ;;
418
419 esac
420 done
421
422 if test -n "$ac_prev"; then
423 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
424 fi
425
426 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
427
428 # File descriptor usage:
429 # 0 standard input
430 # 1 file creation
431 # 2 errors and warnings
432 # 3 some systems may open it to /dev/tty
433 # 4 used on the Kubota Titan
434 # 6 checking for... messages and results
435 # 5 compiler messages saved in config.log
436 if test "$silent" = yes; then
437 exec 6>/dev/null
438 else
439 exec 6>&1
440 fi
441 exec 5>./config.log
442
443 echo "\
444 This file contains any messages produced by compilers while
445 running configure, to aid debugging if configure makes a mistake.
446 " 1>&5
447
448 # Strip out --no-create and --no-recursion so they do not pile up.
449 # Also quote any args containing shell metacharacters.
450 ac_configure_args=
451 for ac_arg
452 do
453 case "$ac_arg" in
454 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
455 | --no-cr | --no-c) ;;
456 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
457 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
458 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
459 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
460 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
461 esac
462 done
463
464 # NLS nuisances.
465 # Only set these to C if already set. These must not be set unconditionally
466 # because not all systems understand e.g. LANG=C (notably SCO).
467 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
468 # Non-C LC_CTYPE values break the ctype check.
469 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
470 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
471 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
472 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
473
474 # confdefs.h avoids OS command line length limits that DEFS can exceed.
475 rm -rf conftest* confdefs.h
476 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
477 echo > confdefs.h
478
479 # A filename unique to this package, relative to the directory that
480 # configure is in, which we can look for to find out if srcdir is correct.
481 ac_unique_file=src/lisp.h
482
483 # Find the source files, if location was not specified.
484 if test -z "$srcdir"; then
485 ac_srcdir_defaulted=yes
486 # Try the directory containing this script, then its parent.
487 ac_prog=$0
488 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
489 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
490 srcdir=$ac_confdir
491 if test ! -r $srcdir/$ac_unique_file; then
492 srcdir=..
493 fi
494 else
495 ac_srcdir_defaulted=no
496 fi
497 if test ! -r $srcdir/$ac_unique_file; then
498 if test "$ac_srcdir_defaulted" = yes; then
499 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
500 else
501 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
502 fi
503 fi
504 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
505
506 # Prefer explicitly selected file to automatically selected ones.
507 if test -z "$CONFIG_SITE"; then
508 if test "x$prefix" != xNONE; then
509 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
510 else
511 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
512 fi
513 fi
514 for ac_site_file in $CONFIG_SITE; do
515 if test -r "$ac_site_file"; then
516 echo "loading site script $ac_site_file"
517 . "$ac_site_file"
518 fi
519 done
520
521 if test -r "$cache_file"; then
522 echo "loading cache $cache_file"
523 . $cache_file
524 else
525 echo "creating cache $cache_file"
526 > $cache_file
527 fi
528
529 ac_ext=c
530 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
531 ac_cpp='$CPP $CPPFLAGS'
532 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
533 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
534 cross_compiling=$ac_cv_prog_cc_cross
535
536 ac_exeext=
537 ac_objext=o
538 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
539 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
540 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
541 ac_n= ac_c='
542 ' ac_t=' '
543 else
544 ac_n=-n ac_c= ac_t=
545 fi
546 else
547 ac_n= ac_c='\c' ac_t=
548 fi
549
550
551
552
553 lispdir='${datadir}/emacs/${version}/lisp'
554 locallisppath='${datadir}/emacs/${version}/site-lisp:'\
555 '${datadir}/emacs/site-lisp:${datadir}/emacs/${version}/leim'
556 lisppath='${locallisppath}:${lispdir}'
557 etcdir='${datadir}/emacs/${version}/etc'
558 archlibdir='${libexecdir}/emacs/${version}/${configuration}'
559 docdir='${datadir}/emacs/${version}/etc'
560
561 # Check whether --with-gcc or --without-gcc was given.
562 if test "${with_gcc+set}" = set; then
563 withval="$with_gcc"
564 :
565 fi
566
567 # Check whether --with-pop or --without-pop was given.
568 if test "${with_pop+set}" = set; then
569 withval="$with_pop"
570 if test "$withval" = yes; then
571 cat >> confdefs.h <<\EOF
572 #define MAIL_USE_POP 1
573 EOF
574
575 else :
576 fi
577 else
578 cat >> confdefs.h <<\EOF
579 #define MAIL_USE_POP 1
580 EOF
581
582 fi
583
584 # Check whether --with-kerberos or --without-kerberos was given.
585 if test "${with_kerberos+set}" = set; then
586 withval="$with_kerberos"
587 cat >> confdefs.h <<\EOF
588 #define KERBEROS 1
589 EOF
590
591 fi
592
593 # Check whether --with-kerberos5 or --without-kerberos5 was given.
594 if test "${with_kerberos5+set}" = set; then
595 withval="$with_kerberos5"
596 if test "${with_kerberos5+set}" = set; then
597 if test "${with_kerberos+set}" != set; then
598 with_kerberos=yes
599 cat >> confdefs.h <<\EOF
600 #define KERBEROS 1
601 EOF
602
603 fi
604 fi
605 cat >> confdefs.h <<\EOF
606 #define KERBEROS5 1
607 EOF
608
609 fi
610
611 # Check whether --with-hesiod or --without-hesiod was given.
612 if test "${with_hesiod+set}" = set; then
613 withval="$with_hesiod"
614 cat >> confdefs.h <<\EOF
615 #define HESIOD 1
616 EOF
617
618 fi
619
620 # Check whether --with-x-toolkit or --without-x-toolkit was given.
621 if test "${with_x_toolkit+set}" = set; then
622 withval="$with_x_toolkit"
623 case "${withval}" in
624 y | ye | yes ) val=athena ;;
625 n | no ) val=no ;;
626 l | lu | luc | luci | lucid ) val=lucid ;;
627 a | at | ath | athe | athen | athena ) val=athena ;;
628 m | mo | mot | moti | motif ) val=motif ;;
629 * )
630 { echo "configure: error: \`--with-x-toolkit=$withval' is invalid\;
631 this option's value should be \`yes', \`no', \`lucid', \`athena', or \`motif'.
632 Currently, \`yes', \`athena' and \`lucid' are synonyms." 1>&2; exit 1; }
633 ;;
634 esac
635 with_x_toolkit=$val
636
637 fi
638
639 # Check whether --with-xpm or --without-xpm was given.
640 if test "${with_xpm+set}" = set; then
641 withval="$with_xpm"
642 :
643 fi
644
645 # Check whether --with-jpeg or --without-jpeg was given.
646 if test "${with_jpeg+set}" = set; then
647 withval="$with_jpeg"
648 :
649 fi
650
651 # Check whether --with-tiff or --without-tiff was given.
652 if test "${with_tiff+set}" = set; then
653 withval="$with_tiff"
654 :
655 fi
656
657 # Check whether --with-gif or --without-gif was given.
658 if test "${with_gif+set}" = set; then
659 withval="$with_gif"
660 :
661 fi
662
663 # Check whether --with-png or --without-png was given.
664 if test "${with_png+set}" = set; then
665 withval="$with_png"
666 :
667 fi
668
669 # Check whether --with-toolkit-scroll-bars or --without-toolkit-scroll-bars was given.
670 if test "${with_toolkit_scroll_bars+set}" = set; then
671 withval="$with_toolkit_scroll_bars"
672 :
673 fi
674
675
676 #### Make srcdir absolute, if it isn't already. It's important to
677 #### avoid running the path through pwd unnecessary, since pwd can
678 #### give you automounter prefixes, which can go away. We do all this
679 #### so Emacs can find its files when run uninstalled.
680 case "${srcdir}" in
681 /* ) ;;
682 . )
683 ## We may be able to use the $PWD environment variable to make this
684 ## absolute. But sometimes PWD is inaccurate.
685 ## Make sure CDPATH doesn't affect cd (in case PWD is relative).
686 unset CDPATH
687 if test "${PWD}" != "" && test "`(cd ${PWD} ; sh -c pwd)`" = "`pwd`" ;
688 then
689 srcdir="$PWD"
690 else
691 srcdir="`(cd ${srcdir}; pwd)`"
692 fi
693 ;;
694 * ) srcdir="`(cd ${srcdir}; pwd)`" ;;
695 esac
696
697 #### Check if the source directory already has a configured system in it.
698 if test `pwd` != `(cd ${srcdir} && pwd)` \
699 && test -f "${srcdir}/src/config.h" ; then
700 echo "configure: warning: The directory tree \`${srcdir}' is being used
701 as a build directory right now; it has been configured in its own
702 right. To configure in another directory as well, you MUST
703 use GNU make. If you do not have GNU make, then you must
704 now do \`make distclean' in ${srcdir},
705 and then run $0 again." 1>&2
706
707 extrasub='/^VPATH[ ]*=/c\
708 vpath %.c $(srcdir)\
709 vpath %.h $(srcdir)\
710 vpath %.y $(srcdir)\
711 vpath %.l $(srcdir)\
712 vpath %.s $(srcdir)\
713 vpath %.in $(srcdir)\
714 vpath %.texi $(srcdir)'
715 fi
716
717 #### Given the configuration name, set machfile and opsysfile to the
718 #### names of the m/*.h and s/*.h files we should use.
719
720 ### Canonicalize the configuration name.
721
722 ac_aux_dir=
723 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
724 if test -f $ac_dir/install-sh; then
725 ac_aux_dir=$ac_dir
726 ac_install_sh="$ac_aux_dir/install-sh -c"
727 break
728 elif test -f $ac_dir/install.sh; then
729 ac_aux_dir=$ac_dir
730 ac_install_sh="$ac_aux_dir/install.sh -c"
731 break
732 fi
733 done
734 if test -z "$ac_aux_dir"; then
735 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
736 fi
737 ac_config_guess=$ac_aux_dir/config.guess
738 ac_config_sub=$ac_aux_dir/config.sub
739 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
740
741
742 # Make sure we can run config.sub.
743 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
744 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
745 fi
746
747 echo $ac_n "checking host system type""... $ac_c" 1>&6
748 echo "configure:749: checking host system type" >&5
749
750 host_alias=$host
751 case "$host_alias" in
752 NONE)
753 case $nonopt in
754 NONE)
755 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
756 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
757 fi ;;
758 *) host_alias=$nonopt ;;
759 esac ;;
760 esac
761
762 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
763 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
764 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
765 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
766 echo "$ac_t""$host" 1>&6
767
768 canonical=$host
769 configuration=$host_alias
770
771
772 ### If you add support for a new configuration, add code to this
773 ### switch statement to recognize your configuration name and select
774 ### the appropriate operating system and machine description files.
775
776 ### You would hope that you could choose an m/*.h file pretty much
777 ### based on the machine portion of the configuration name, and an s-
778 ### file based on the operating system portion. However, it turns out
779 ### that each m/*.h file is pretty manufacturer-specific - for
780 ### example, apollo.h, hp9000s300.h, mega68k, news.h, and tad68k are
781 ### all 68000 machines; mips.h, pmax.h, and news-risc are all MIPS
782 ### machines. So we basically have to have a special case for each
783 ### configuration name.
784 ###
785 ### As far as handling version numbers on operating systems is
786 ### concerned, make sure things will fail in a fixable way. If
787 ### /etc/MACHINES doesn't say anything about version numbers, be
788 ### prepared to handle anything reasonably. If version numbers
789 ### matter, be sure /etc/MACHINES says something about it.
790 ###
791 ### Eric Raymond says we should accept strings like "sysvr4" to mean
792 ### "System V Release 4"; he writes, "The old convention encouraged
793 ### confusion between `system' and `release' levels'."
794
795 machine='' opsys='' unported=no
796 case "${canonical}" in
797
798 ## NetBSD ports
799 *-*-netbsd* )
800 opsys=netbsd
801 case "${canonical}" in
802 alpha*-*-netbsd*) machine=alpha ;;
803 i[3456]86-*-netbsd*) machine=intel386 ;;
804 m68k-*-netbsd*)
805 # This is somewhat bogus.
806 machine=hp9000s300 ;;
807 powerpc-apple-netbsd*) machine=macppc ;;
808 mips-*-netbsd*) machine=pmax ;;
809 mipsel-*-netbsd*) machine=pmax ;;
810 ns32k-*-netbsd*) machine=ns32000 ;;
811 powerpc-*-netbsd*) machine=macppc ;;
812 sparc-*-netbsd*) machine=sparc ;;
813 vax-*-netbsd*) machine=vax ;;
814 arm-*-netbsd*) machine=arm ;;
815 esac
816 ;;
817
818 ## OpenBSD ports
819 *-*-openbsd* )
820 opsys=openbsd
821 case "${canonical}" in
822 alpha*-*-openbsd*) machine=alpha ;;
823 i386-*-openbsd*) machine=intel386 ;;
824 m68k-*-openbsd*) machine=hp9000s300 ;;
825 mipsel-*-openbsd*) machine=pmax ;;
826 ns32k-*-openbsd*) machine=ns32000 ;;
827 sparc-*-openbsd*) machine=sparc ;;
828 vax-*-openbsd*) machine=vax ;;
829 esac
830 ;;
831
832 ## Acorn RISCiX:
833 arm-acorn-riscix1.1* )
834 machine=acorn opsys=riscix1-1
835 ;;
836 arm-acorn-riscix1.2* | arm-acorn-riscix )
837 ## This name is riscix12 instead of riscix1.2
838 ## to avoid a file name conflict on MSDOS.
839 machine=acorn opsys=riscix12
840 ;;
841
842 ## BSDI ports
843 *-*-bsdi* )
844 opsys=bsdi
845 case "${canonical}" in
846 i[345]86-*-bsdi*) machine=intel386 ;;
847 sparc-*-bsdi*) machine=sparc ;;
848 powerpc-*-bsdi*) machine=powerpc ;;
849 esac
850 case "${canonical}" in
851 *-*-bsd386* | *-*-bsdi1* ) opsys=bsd386 ;;
852 *-*-bsdi2.0* ) opsys=bsdos2 ;;
853 *-*-bsdi2* ) opsys=bsdos2-1 ;;
854 *-*-bsdi3* ) opsys=bsdos3 ;;
855 *-*-bsdi4* ) opsys=bsdos4 ;;
856 esac
857 ;;
858
859 ## Alliant machines
860 ## Strictly speaking, we need the version of the alliant operating
861 ## system to choose the right machine file, but currently the
862 ## configuration name doesn't tell us enough to choose the right
863 ## one; we need to give alliants their own operating system name to
864 ## do this right. When someone cares, they can help us.
865 fx80-alliant-* )
866 machine=alliant4 opsys=bsd4-2
867 ;;
868 i860-alliant-* )
869 machine=alliant-2800 opsys=bsd4-3
870 ;;
871
872 ## Alpha (DEC) machines.
873 alpha*-dec-osf* )
874 machine=alpha opsys=osf1
875 # This is needed to find X11R6.1 libraries for certain tests.
876 NON_GCC_LINK_TEST_OPTIONS=-Wl,-rpath,/usr/X11R6/lib
877 GCC_LINK_TEST_OPTIONS=-Wl,-rpath,/usr/X11R6/lib
878 case "${canonical}" in
879 # This is necessary on 5.0 to avoid mangling src/Makefile.
880 # Separated out in case it causes problems on earlier versions.
881 alpha*-dec-osf[5-9]*)
882 NON_GNU_CPP='cc -E -std0' ;;
883 esac
884 ;;
885
886 alpha*-*-linux-gnu* )
887 machine=alpha opsys=gnu-linux
888 ;;
889
890 arm*-*-linux-gnu* )
891 machine=arm opsys=gnu-linux
892 ;;
893
894 ppc-*-linux | \
895 powerpc-*-linux* )
896 machine=powerpc opsys=gnu-linux
897 ;;
898
899 ## Altos 3068
900 m68*-altos-sysv* )
901 machine=altos opsys=usg5-2
902 ;;
903
904 ## Amdahl UTS
905 580-amdahl-sysv* )
906 machine=amdahl opsys=usg5-2-2
907 ;;
908
909 ## Apollo, Domain/OS
910 m68*-apollo-* )
911 machine=apollo opsys=bsd4-3
912 ;;
913
914 ## AT&T 3b2, 3b5, 3b15, 3b20
915 we32k-att-sysv* )
916 machine=att3b opsys=usg5-2-2
917 ;;
918
919 ## AT&T 3b1 - The Mighty Unix PC!
920 m68*-att-sysv* )
921 machine=7300 opsys=usg5-2-2
922 ;;
923
924 ## Bull dpx20
925 rs6000-bull-bosx* )
926 machine=ibmrs6000 opsys=aix3-2
927 ;;
928
929 ## Bull dpx2
930 m68*-bull-sysv3* )
931 machine=dpx2 opsys=usg5-3
932 ;;
933
934 ## Bull sps7
935 m68*-bull-sysv2* )
936 machine=sps7 opsys=usg5-2
937 ;;
938
939 ## CCI 5/32, 6/32 -- see "Tahoe".
940
941 ## Celerity
942 ## I don't know what configuration name to use for this; config.sub
943 ## doesn't seem to know anything about it. Hey, Celerity users, get
944 ## in touch with us!
945 celerity-celerity-bsd* )
946 machine=celerity opsys=bsd4-2
947 ;;
948
949 ## Clipper
950 ## What operating systems does this chip run that Emacs has been
951 ## tested on?
952 clipper-* )
953 machine=clipper
954 ## We'll use the catch-all code at the bottom to guess the
955 ## operating system.
956 ;;
957
958 ## Convex
959 *-convex-bsd* | *-convex-convexos* )
960 machine=convex opsys=bsd4-3
961 ## Prevents spurious white space in makefiles - d.m.cooke@larc.nasa.gov
962 NON_GNU_CPP="cc -E -P"
963 ;;
964
965 ## Cubix QBx/386
966 i[3456]86-cubix-sysv* )
967 machine=intel386 opsys=usg5-3
968 ;;
969
970 ## Cydra 5
971 cydra*-cydrome-sysv* )
972 machine=cydra5 opsys=usg5-3
973 ;;
974
975 ## Data General AViiON Machines
976 ## DG changed naming conventions with the release of 5.4.4.10, they
977 ## dropped the initial 5.4 but left the intervening R. Because of the
978 ## R this shouldn't conflict with older versions of the OS (which I
979 ## think were named like dgux4.*). In addition, DG new AViiONs series
980 ## uses either Motorola M88k or Intel Pentium CPUs.
981 m88k-dg-dguxR4.* | m88k-dg-dgux4* )
982 machine=aviion opsys=dgux4
983 ;;
984 m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* )
985 ## This name is dgux5-4-3 instead of dgux5-4r3
986 ## to avoid a file name conflict on MSDOS.
987 machine=aviion opsys=dgux5-4-3
988 ;;
989 m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* )
990 machine=aviion opsys=dgux5-4r2
991 ;;
992 m88k-dg-dgux* )
993 machine=aviion opsys=dgux
994 ;;
995
996 ## Data General AViiON Intel (x86) Machines
997 ## Exists from 5.4.3 (current i586-dg-dguxR4.11)
998 ## Ehud Karni, 1998-may-30, ehud@unix.simonwiesel.co.il
999 i[345]86-dg-dguxR4* )
1000 machine=aviion-intel opsys=dgux4
1001 ;;
1002
1003 ## DECstations
1004 mips-dec-ultrix[0-3].* | mips-dec-ultrix4.0* | mips-dec-bsd4.2* )
1005 machine=pmax opsys=bsd4-2
1006 ;;
1007 mips-dec-ultrix4.[12]* | mips-dec-bsd* )
1008 machine=pmax opsys=bsd4-3
1009 ;;
1010 mips-dec-ultrix* )
1011 machine=pmax opsys=ultrix4-3
1012 ;;
1013 mips-dec-osf* )
1014 machine=pmax opsys=osf1
1015 ;;
1016 mips-dec-mach_bsd4.3* )
1017 machine=pmax opsys=mach-bsd4-3
1018 ;;
1019
1020 ## Motorola Delta machines
1021 m68k-motorola-sysv* | m68000-motorola-sysv* )
1022 machine=delta opsys=usg5-3
1023 if test -z "`type gnucc | grep 'not found'`"
1024 then
1025 if test -s /etc/167config
1026 then CC="gnucc -m68040"
1027 else CC="gnucc -m68881"
1028 fi
1029 else
1030 if test -z "`type gcc | grep 'not found'`"
1031 then CC=gcc
1032 else CC=cc
1033 fi
1034 fi
1035 ;;
1036 m88k-motorola-sysv4* )
1037 # jbotte@bnr.ca says that UNIX_System_V <hostName> 4.0 R40V4.3 m88k mc88110
1038 # needs POSIX_SIGNALS and therefore needs usg5-4-2.
1039 # I hope there are not other 4.0 versions for this machine
1040 # which really need usg5-4 instead.
1041 machine=delta88k opsys=usg5-4-2
1042 ;;
1043 m88k-motorola-sysv* | m88k-motorola-m88kbcs* )
1044 machine=delta88k opsys=usg5-3
1045 ;;
1046
1047 ## Dual machines
1048 m68*-dual-sysv* )
1049 machine=dual opsys=usg5-2
1050 ;;
1051 m68*-dual-uniplus* )
1052 machine=dual opsys=unipl5-2
1053 ;;
1054
1055 ## Elxsi 6400
1056 elxsi-elxsi-sysv* )
1057 machine=elxsi opsys=usg5-2
1058 ;;
1059
1060 ## Encore machines
1061 ns16k-encore-bsd* )
1062 machine=ns16000 opsys=umax
1063 ;;
1064
1065 ## The GEC 93 - apparently, this port isn't really finished yet.
1066
1067 ## Gould Power Node and NP1
1068 pn-gould-bsd4.2* )
1069 machine=gould opsys=bsd4-2
1070 ;;
1071 pn-gould-bsd4.3* )
1072 machine=gould opsys=bsd4-3
1073 ;;
1074 np1-gould-bsd* )
1075 machine=gould-np1 opsys=bsd4-3
1076 ;;
1077
1078 ## Harris Night Hawk machines running CX/UX (a 5000 looks just like a 4000
1079 ## as far as Emacs is concerned).
1080 m88k-harris-cxux* )
1081 # Build needs to be different on 7.0 and later releases
1082 case "`uname -r`" in
1083 [56].[0-9] ) machine=nh4000 opsys=cxux ;;
1084 [7].[0-9] ) machine=nh4000 opsys=cxux7 ;;
1085 esac
1086 NON_GNU_CPP="/lib/cpp"
1087 ;;
1088 ## Harris ecx or gcx running CX/UX (Series 1200, Series 3000)
1089 m68k-harris-cxux* )
1090 machine=nh3000 opsys=cxux
1091 ;;
1092 ## Harris power pc NightHawk running Power UNIX (Series 6000)
1093 powerpc-harris-powerunix )
1094 machine=nh6000 opsys=powerunix
1095 NON_GNU_CPP="cc -Xo -E -P"
1096 ;;
1097 ## SR2001/SR2201 running HI-UX/MPP
1098 hppa1.1-hitachi-hiuxmpp* )
1099 machine=sr2k opsys=hiuxmpp
1100 ;;
1101 ## Honeywell XPS100
1102 xps*-honeywell-sysv* )
1103 machine=xps100 opsys=usg5-2
1104 ;;
1105
1106 ## HP 9000 series 200 or 300
1107 m68*-hp-bsd* )
1108 machine=hp9000s300 opsys=bsd4-3
1109 ;;
1110 ## HP/UX 7, 8, 9, and 10 are supported on these machines.
1111 m68*-hp-hpux* )
1112 case "`uname -r`" in
1113 ## Someone's system reports A.B8.05 for this.
1114 ## I wonder what other possibilities there are.
1115 *.B8.* ) machine=hp9000s300 opsys=hpux8 ;;
1116 *.08.* ) machine=hp9000s300 opsys=hpux8 ;;
1117 *.09.* ) machine=hp9000s300 opsys=hpux9 ;;
1118 *.1[0-9].* ) machine=hp9000s300 opsys=hpux9shr ;;
1119 *) machine=hp9000s300 opsys=hpux ;;
1120 esac
1121 ;;
1122
1123 ## HP 9000 series 700 and 800, running HP/UX
1124 hppa*-hp-hpux7* )
1125 machine=hp800 opsys=hpux
1126 ;;
1127 hppa*-hp-hpux8* )
1128 machine=hp800 opsys=hpux8
1129 ;;
1130 hppa*-hp-hpux9shr* )
1131 machine=hp800 opsys=hpux9shr
1132 ;;
1133 hppa*-hp-hpux9* )
1134 machine=hp800 opsys=hpux9
1135 ;;
1136 hppa*-hp-hpux1[0-9]* )
1137 machine=hp800 opsys=hpux10
1138 ;;
1139
1140 ## HP 9000 series 700 and 800, running HP/UX
1141 hppa*-hp-hpux* )
1142 ## Cross-compilation? Nah!
1143 case "`uname -r`" in
1144 ## Someone's system reports A.B8.05 for this.
1145 ## I wonder what other possibilities there are.
1146 *.B8.* ) machine=hp800 opsys=hpux8 ;;
1147 *.08.* ) machine=hp800 opsys=hpux8 ;;
1148 *.09.* ) machine=hp800 opsys=hpux9 ;;
1149 *) machine=hp800 opsys=hpux10 ;;
1150 esac
1151 ;;
1152 hppa*-*-nextstep* )
1153 machine=hp800 opsys=nextstep
1154 ;;
1155
1156 ## Orion machines
1157 orion-orion-bsd* )
1158 machine=orion opsys=bsd4-2
1159 ;;
1160 clipper-orion-bsd* )
1161 machine=orion105 opsys=bsd4-2
1162 ;;
1163
1164 ## IBM machines
1165 i[3456]86-ibm-aix1.1* )
1166 machine=ibmps2-aix opsys=usg5-2-2
1167 ;;
1168 i[3456]86-ibm-aix1.[23]* | i[3456]86-ibm-aix* )
1169 machine=ibmps2-aix opsys=usg5-3
1170 ;;
1171 i370-ibm-aix*)
1172 machine=ibm370aix opsys=usg5-3
1173 ;;
1174 rs6000-ibm-aix3.1* | powerpc-ibm-aix3.1* )
1175 machine=ibmrs6000 opsys=aix3-1
1176 ;;
1177 rs6000-ibm-aix3.2.5 | powerpc-ibm-aix3.2.5 )
1178 machine=ibmrs6000 opsys=aix3-2-5
1179 ;;
1180 rs6000-ibm-aix4.1* | powerpc-ibm-aix4.1* )
1181 machine=ibmrs6000 opsys=aix4-1
1182 ;;
1183 rs6000-ibm-aix4.2* | powerpc-ibm-aix4.2* )
1184 machine=ibmrs6000 opsys=aix4-2
1185 ;;
1186 rs6000-ibm-aix4.0* | powerpc-ibm-aix4.0* )
1187 machine=ibmrs6000 opsys=aix4
1188 ;;
1189 rs6000-ibm-aix4* | powerpc-ibm-aix4* )
1190 machine=ibmrs6000 opsys=aix4-1
1191 ;;
1192 rs6000-ibm-aix* | powerpc-ibm-aix* )
1193 machine=ibmrs6000 opsys=aix3-2
1194 ;;
1195 romp-ibm-bsd4.3* )
1196 machine=ibmrt opsys=bsd4-3
1197 ;;
1198 romp-ibm-bsd4.2* )
1199 machine=ibmrt opsys=bsd4-2
1200 ;;
1201 romp-ibm-aos4.3* )
1202 machine=ibmrt opsys=bsd4-3
1203 ;;
1204 romp-ibm-aos4.2* )
1205 machine=ibmrt opsys=bsd4-2
1206 ;;
1207 romp-ibm-aos* )
1208 machine=ibmrt opsys=bsd4-3
1209 ;;
1210 romp-ibm-bsd* )
1211 machine=ibmrt opsys=bsd4-3
1212 ;;
1213 romp-ibm-aix* )
1214 machine=ibmrt-aix opsys=usg5-2-2
1215 ;;
1216
1217 ## Integrated Solutions `Optimum V'
1218 m68*-isi-bsd4.2* )
1219 machine=isi-ov opsys=bsd4-2
1220 ;;
1221 m68*-isi-bsd4.3* )
1222 machine=isi-ov opsys=bsd4-3
1223 ;;
1224
1225 ## Intel 386 machines where we do care about the manufacturer
1226 i[3456]86-intsys-sysv* )
1227 machine=is386 opsys=usg5-2-2
1228 ;;
1229
1230 ## Prime EXL
1231 i[3456]86-prime-sysv* )
1232 machine=i386 opsys=usg5-3
1233 ;;
1234
1235 ## Sequent Symmetry running Dynix
1236 i[3456]86-sequent-bsd* )
1237 machine=symmetry opsys=bsd4-3
1238 ;;
1239
1240 ## Sequent Symmetry running ptx 4, which is a modified SVR4.
1241 i[3456]86-sequent-ptx4* | i[3456]86-sequent-sysv4* )
1242 machine=sequent-ptx opsys=ptx4
1243 NON_GNU_CPP=/lib/cpp
1244 ;;
1245
1246 ## Sequent Symmetry running DYNIX/ptx
1247 ## Use the old cpp rather than the newer ANSI one.
1248 i[3456]86-sequent-ptx* )
1249 machine=sequent-ptx opsys=ptx
1250 NON_GNU_CPP="/lib/cpp"
1251 ;;
1252
1253 ## ncr machine running svr4.3.
1254 i[3456]86-ncr-sysv4.3 )
1255 machine=ncr386 opsys=usg5-4-3
1256 ;;
1257
1258 ## Unspecified sysv on an ncr machine defaults to svr4.2.
1259 ## (Plain usg5-4 doesn't turn on POSIX signals, which we need.)
1260 i[3456]86-ncr-sysv* )
1261 machine=ncr386 opsys=usg5-4-2
1262 ;;
1263
1264 ## Intel Paragon OSF/1
1265 i860-intel-osf1* )
1266 machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp
1267 ;;
1268
1269 ## Intel 860
1270 i860-*-sysv4* )
1271 machine=i860 opsys=usg5-4
1272 NON_GNU_CC="/bin/cc" # Ie, not the one in /usr/ucb/cc.
1273 NON_GNU_CPP="/usr/ccs/lib/cpp" # cc -E tokenizes macro expansion.
1274 ;;
1275
1276 ## Masscomp machines
1277 m68*-masscomp-rtu* )
1278 machine=masscomp opsys=rtu
1279 ;;
1280
1281 ## Megatest machines
1282 m68*-megatest-bsd* )
1283 machine=mega68 opsys=bsd4-2
1284 ;;
1285
1286 ## Workstations sold by MIPS
1287 ## This is not necessarily all workstations using the MIPS processor -
1288 ## Irises are produced by SGI, and DECstations by DEC.
1289
1290 ## etc/MACHINES lists mips.h and mips4.h as possible machine files,
1291 ## and usg5-2-2 and bsd4-3 as possible OS files. The only guidance
1292 ## it gives for choosing between the alternatives seems to be "Use
1293 ## -machine=mips4 for RISCOS version 4; use -opsystem=bsd4-3 with
1294 ## the BSD world." I'll assume that these are instructions for
1295 ## handling two odd situations, and that every other situation
1296 ## should use mips.h and usg5-2-2, they being listed first.
1297 mips-mips-usg* )
1298 machine=mips4
1299 ## Fall through to the general code at the bottom to decide on the OS.
1300 ;;
1301 mips-mips-riscos4* )
1302 machine=mips4 opsys=bsd4-3
1303 NON_GNU_CC="cc -systype bsd43"
1304 NON_GNU_CPP="cc -systype bsd43 -E"
1305 ;;
1306 mips-mips-riscos5* )
1307 machine=mips4 opsys=riscos5
1308 NON_GNU_CC="cc -systype bsd43"
1309 NON_GNU_CPP="cc -systype bsd43 -E"
1310 ;;
1311 mips-mips-bsd* )
1312 machine=mips opsys=bsd4-3
1313 ;;
1314 mips-mips-* )
1315 machine=mips opsys=usg5-2-2
1316 ;;
1317
1318 ## NeXT
1319 m68*-next-* | m68k-*-nextstep* )
1320 machine=m68k opsys=nextstep
1321 ;;
1322
1323 ## The complete machine from National Semiconductor
1324 ns32k-ns-genix* )
1325 machine=ns32000 opsys=usg5-2
1326 ;;
1327
1328 ## NCR machines
1329 m68*-ncr-sysv2* | m68*-ncr-sysvr2* )
1330 machine=tower32 opsys=usg5-2-2
1331 ;;
1332 m68*-ncr-sysv3* | m68*-ncr-sysvr3* )
1333 machine=tower32v3 opsys=usg5-3
1334 ;;
1335
1336 ## NEC EWS4800
1337 mips-nec-sysv4*)
1338 machine=ews4800 opsys=ux4800
1339 ;;
1340
1341 ## Nixdorf Targon 31
1342 m68*-nixdorf-sysv* )
1343 machine=targon31 opsys=usg5-2-2
1344 ;;
1345
1346 ## Nu (TI or LMI)
1347 m68*-nu-sysv* )
1348 machine=nu opsys=usg5-2
1349 ;;
1350
1351 ## Plexus
1352 m68*-plexus-sysv* )
1353 machine=plexus opsys=usg5-2
1354 ;;
1355
1356 ## PowerPC reference platform
1357 powerpcle-*-solaris2* )
1358 machine=prep
1359 opsys=sol2-5
1360 ;;
1361
1362 ## Pyramid machines
1363 ## I don't really have any idea what sort of processor the Pyramid has,
1364 ## so I'm assuming it is its own architecture.
1365 pyramid-pyramid-bsd* )
1366 machine=pyramid opsys=bsd4-2
1367 ;;
1368
1369 ## Sequent Balance
1370 ns32k-sequent-bsd4.2* )
1371 machine=sequent opsys=bsd4-2
1372 ;;
1373 ns32k-sequent-bsd4.3* )
1374 machine=sequent opsys=bsd4-3
1375 ;;
1376
1377 ## Siemens Nixdorf
1378 mips-siemens-sysv* | mips-sni-sysv*)
1379 machine=mips-siemens opsys=usg5-4
1380 NON_GNU_CC=/usr/ccs/bin/cc
1381 NON_GNU_CPP=/usr/ccs/lib/cpp
1382 ;;
1383
1384 ## Silicon Graphics machines
1385 ## Iris 2500 and Iris 2500 Turbo (aka the Iris 3030)
1386 m68*-sgi-iris3.5* )
1387 machine=irist opsys=iris3-5
1388 ;;
1389 m68*-sgi-iris3.6* | m68*-sgi-iris*)
1390 machine=irist opsys=iris3-6
1391 ;;
1392 ## Iris 4D
1393 mips-sgi-irix3* )
1394 machine=iris4d opsys=irix3-3
1395 ;;
1396 mips-sgi-irix4* )
1397 machine=iris4d opsys=irix4-0
1398 ;;
1399 mips-sgi-irix6.5 )
1400 machine=iris4d opsys=irix6-5
1401 # Without defining _LANGUAGE_C, things get masked out in the headers
1402 # so that, for instance, grepping for `free' in stdlib.h fails and
1403 # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
1404 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
1405 NON_GCC_TEST_OPTIONS="-n32 -D_LANGUAGE_C"
1406 ;;
1407 mips-sgi-irix6* )
1408 machine=iris4d opsys=irix6-0
1409 # It's not clear whether -D_LANGUAGE_C is necessary as it is for 6.5,
1410 # but presumably it does no harm.
1411 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
1412 NON_GCC_TEST_OPTIONS=-32
1413 ;;
1414 mips-sgi-irix5.[01]* )
1415 machine=iris4d opsys=irix5-0
1416 ;;
1417 mips-sgi-irix5* | mips-sgi-irix* )
1418 machine=iris4d opsys=irix5-2
1419 ;;
1420
1421 ## SONY machines
1422 m68*-sony-bsd4.2* )
1423 machine=news opsys=bsd4-2
1424 ;;
1425 m68*-sony-bsd4.3* )
1426 machine=news opsys=bsd4-3
1427 ;;
1428 m68*-sony-newsos3* | m68*-sony-news3*)
1429 machine=news opsys=bsd4-3
1430 ;;
1431 mips-sony-bsd* | mips-sony-newsos4* | mips-sony-news4*)
1432 machine=news-risc opsys=bsd4-3
1433 ;;
1434 mips-sony-newsos6* )
1435 machine=news-r6 opsys=newsos6
1436 ;;
1437 mips-sony-news* )
1438 machine=news-risc opsys=newsos5
1439 ;;
1440
1441 ## Stride
1442 m68*-stride-sysv* )
1443 machine=stride opsys=usg5-2
1444 ;;
1445
1446 ## Suns
1447 sparc-*-linux-gnu* | sparc64-*-linux-gnu* )
1448 machine=sparc opsys=gnu-linux
1449 ;;
1450
1451 *-auspex-sunos* | *-sun-sunos* | *-sun-bsd* | *-sun-solaris* \
1452 | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* | powerpc*-*-solaris2* \
1453 | rs6000-*-solaris2*)
1454 case "${canonical}" in
1455 m68*-sunos1* ) machine=sun1 ;;
1456 m68*-sunos2* ) machine=sun2 ;;
1457 m68* ) machine=sun3 ;;
1458 i[3456]86-sun-sunos[34]* ) machine=sun386 ;;
1459 i[3456]86-*-* ) machine=intel386 ;;
1460 powerpcle* ) machine=powerpcle ;;
1461 powerpc* | rs6000* ) machine=ibmrs6000 ;;
1462 sparc* ) machine=sparc ;;
1463 * ) unported=yes ;;
1464 esac
1465 case "${canonical}" in
1466 ## The Sun386 didn't get past 4.0.
1467 i[3456]86-*-sunos4 ) opsys=sunos4-0 ;;
1468 *-sunos4.0* ) opsys=sunos4-0 ;;
1469 *-sunos4.1.[3-9]*noshare )
1470 ## This name is sunos413 instead of sunos4-1-3
1471 ## to avoid a file name conflict on MSDOS.
1472 opsys=sunos413
1473 NON_GNU_CPP=/usr/lib/cpp
1474 NON_GCC_TEST_OPTIONS=-Bstatic
1475 GCC_TEST_OPTIONS=-static
1476 ;;
1477 *-sunos4.1.[3-9]* | *-sunos4shr*)
1478 opsys=sunos4shr
1479 NON_GNU_CPP=/usr/lib/cpp
1480 ;;
1481 *-sunos4* | *-sunos )
1482 opsys=sunos4-1
1483 NON_GCC_TEST_OPTIONS=-Bstatic
1484 GCC_TEST_OPTIONS=-static
1485 ;;
1486 *-sunos5.3* | *-solaris2.3* )
1487 opsys=sol2-3
1488 NON_GNU_CPP=/usr/ccs/lib/cpp
1489 ;;
1490 *-sunos5.4* | *-solaris2.4* )
1491 opsys=sol2-4
1492 NON_GNU_CPP=/usr/ccs/lib/cpp
1493 RANLIB="ar -ts"
1494 ;;
1495 *-sunos5.5* | *-solaris2.5* )
1496 opsys=sol2-5
1497 NON_GNU_CPP=/usr/ccs/lib/cpp
1498 RANLIB="ar -ts"
1499 ;;
1500 *-sunos5* | *-solaris* )
1501 opsys=sol2-5
1502 NON_GNU_CPP=/usr/ccs/lib/cpp
1503 ;;
1504 * ) opsys=bsd4-2 ;;
1505 esac
1506 ## Watch out for a compiler that we know will not work.
1507 case "${canonical}" in
1508 *-solaris* | *-sunos5* )
1509 if [ "x$CC" = x/usr/ucb/cc ]; then
1510 ## /usr/ucb/cc doesn't work;
1511 ## we should find some other compiler that does work.
1512 unset CC
1513 fi
1514 ;;
1515 *) ;;
1516 esac
1517 ;;
1518 sparc-*-nextstep* )
1519 machine=sparc opsys=nextstep
1520 ;;
1521
1522 ## Tadpole 68k
1523 m68*-tadpole-sysv* )
1524 machine=tad68k opsys=usg5-3
1525 ;;
1526
1527 ## Tahoe machines
1528 tahoe-tahoe-bsd4.2* )
1529 machine=tahoe opsys=bsd4-2
1530 ;;
1531 tahoe-tahoe-bsd4.3* )
1532 machine=tahoe opsys=bsd4-3
1533 ;;
1534
1535 ## Tandem Integrity S2
1536 mips-tandem-sysv* )
1537 machine=tandem-s2 opsys=usg5-3
1538 ;;
1539
1540 ## Tektronix XD88
1541 m88k-tektronix-sysv3* )
1542 machine=tekxd88 opsys=usg5-3
1543 ;;
1544
1545 ## Tektronix 16000 box (6130?)
1546 ns16k-tektronix-bsd* )
1547 machine=ns16000 opsys=bsd4-2
1548 ;;
1549 ## Tektronix 4300
1550 ## src/m/tek4300.h hints that this is a m68k machine.
1551 m68*-tektronix-bsd* )
1552 machine=tek4300 opsys=bsd4-3
1553 ;;
1554
1555 ## Titan P2 or P3
1556 ## We seem to have lost the machine-description file titan.h!
1557 titan-titan-sysv* )
1558 machine=titan opsys=usg5-3
1559 ;;
1560
1561 ## Ustation E30 (SS5E)
1562 m68*-unisys-uniplus* )
1563 machine=ustation opsystem=unipl5-2
1564 ;;
1565
1566 ## Vaxen.
1567 vax-dec-* )
1568 machine=vax
1569 case "${canonical}" in
1570 *-bsd4.1* ) opsys=bsd4-1 ;;
1571 *-bsd4.2* | *-ultrix[0-3].* | *-ultrix4.0* ) opsys=bsd4-2 ;;
1572 *-bsd4.3* | *-ultrix* ) opsys=bsd4-3 ;;
1573 *-sysv[01]* | *-sysvr[01]* ) opsys=usg5-0 ;;
1574 *-sysv2* | *-sysvr2* ) opsys=usg5-2 ;;
1575 *-vms* ) opsys=vms ;;
1576 * ) unported=yes
1577 esac
1578 ;;
1579
1580 ## Whitechapel MG1
1581 ns16k-whitechapel-* )
1582 machine=mg1
1583 ## We don't know what sort of OS runs on these; we'll let the
1584 ## operating system guessing code below try.
1585 ;;
1586
1587 ## Wicat
1588 m68*-wicat-sysv* )
1589 machine=wicat opsys=usg5-2
1590 ;;
1591
1592 ## Intel 386 machines where we don't care about the manufacturer
1593 i[3456]86-*-* )
1594 machine=intel386
1595 case "${canonical}" in
1596 *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
1597 *-isc2.2* ) opsys=isc2-2 ;;
1598 *-isc4.0* ) opsys=isc4-0 ;;
1599 *-isc4.* ) opsys=isc4-1
1600 GCC_TEST_OPTIONS=-posix
1601 NON_GCC_TEST_OPTIONS=-Xp
1602 ;;
1603 *-isc* ) opsys=isc3-0 ;;
1604 *-esix5* ) opsys=esix5r4; NON_GNU_CPP=/usr/lib/cpp ;;
1605 *-esix* ) opsys=esix ;;
1606 *-xenix* ) opsys=xenix ;;
1607 *-linux-gnu* ) opsys=gnu-linux ;;
1608 *-sco3.2v4* ) opsys=sco4 ; NON_GNU_CPP=/lib/cpp ;;
1609 *-sco3.2v5* ) opsys=sco5
1610 NON_GNU_CPP=/lib/cpp
1611 # Prevent -belf from being passed to $CPP.
1612 # /lib/cpp does not accept it.
1613 OVERRIDE_CPPFLAGS=" "
1614 ;;
1615 *-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
1616 *-386bsd* ) opsys=386bsd ;;
1617 *-freebsd* ) opsys=freebsd ;;
1618 *-nextstep* ) opsys=nextstep ;;
1619 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
1620 esac
1621 ;;
1622
1623 ## m68k Linux-based GNU system
1624 m68k-*-linux-gnu* )
1625 machine=m68k opsys=gnu-linux
1626 ;;
1627
1628 ## Mips Linux-based GNU system
1629 mips-*-linux-gnu* )
1630 machine=mips opsys=gnu-linux
1631 ;;
1632
1633 ## UXP/DS
1634 sparc-fujitsu-sysv4* )
1635 machine=sparc opsys=uxpds
1636 NON_GNU_CPP=/usr/ccs/lib/cpp
1637 RANLIB="ar -ts"
1638 ;;
1639
1640 ## UXP/V
1641 f301-fujitsu-uxpv4.1)
1642 machine=f301 opsys=uxpv
1643 ;;
1644
1645 * )
1646 unported=yes
1647 ;;
1648 esac
1649
1650 ### If the code above didn't choose an operating system, just choose
1651 ### an operating system based on the configuration name. You really
1652 ### only want to use this when you have no idea what the right
1653 ### operating system is; if you know what operating systems a machine
1654 ### runs, it's cleaner to make it explicit in the case statement
1655 ### above.
1656 if test x"${opsys}" = x; then
1657 case "${canonical}" in
1658 *-gnu* ) opsys=gnu ;;
1659 *-bsd4.[01] ) opsys=bsd4-1 ;;
1660 *-bsd4.2 ) opsys=bsd4-2 ;;
1661 *-bsd4.3 ) opsys=bsd4-3 ;;
1662 *-sysv0 | *-sysvr0 ) opsys=usg5-0 ;;
1663 *-sysv2 | *-sysvr2 ) opsys=usg5-2 ;;
1664 *-sysv2.2 | *-sysvr2.2 ) opsys=usg5-2-2 ;;
1665 *-sysv3* | *-sysvr3* ) opsys=usg5-3 ;;
1666 *-sysv4.2uw* ) opsys=unixware ;;
1667 *-sysv4.1* | *-sysvr4.1* )
1668 NON_GNU_CPP=/usr/lib/cpp
1669 opsys=usg5-4 ;;
1670 *-sysv4.[2-9]* | *-sysvr4.[2-9]* )
1671 if [ x$NON_GNU_CPP = x ]; then
1672 if [ -f /usr/ccs/lib/cpp ]; then
1673 NON_GNU_CPP=/usr/ccs/lib/cpp
1674 else
1675 NON_GNU_CPP=/lib/cpp
1676 fi
1677 fi
1678 opsys=usg5-4-2 ;;
1679 *-sysv4* | *-sysvr4* ) opsys=usg5-4 ;;
1680 * )
1681 unported=yes
1682 ;;
1683 esac
1684 fi
1685
1686
1687 if test $unported = yes; then
1688 { echo "configure: error: Emacs hasn't been ported to \`${canonical}' systems.
1689 Check \`etc/MACHINES' for recognized configuration names." 1>&2; exit 1; }
1690 fi
1691
1692 machfile="m/${machine}.h"
1693 opsysfile="s/${opsys}.h"
1694
1695
1696 #### Choose a compiler.
1697 test -n "$CC" && cc_specified=yes
1698
1699 # Save the value of CFLAGS that the user specified.
1700 SPECIFIED_CFLAGS="$CFLAGS"
1701
1702 case ${with_gcc} in
1703 "yes" ) CC="gcc" GCC=yes ;;
1704 "no" ) : ${CC=cc} ;;
1705 * ) # Extract the first word of "gcc", so it can be a program name with args.
1706 set dummy gcc; ac_word=$2
1707 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1708 echo "configure:1709: checking for $ac_word" >&5
1709 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1710 echo $ac_n "(cached) $ac_c" 1>&6
1711 else
1712 if test -n "$CC"; then
1713 ac_cv_prog_CC="$CC" # Let the user override the test.
1714 else
1715 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1716 ac_dummy="$PATH"
1717 for ac_dir in $ac_dummy; do
1718 test -z "$ac_dir" && ac_dir=.
1719 if test -f $ac_dir/$ac_word; then
1720 ac_cv_prog_CC="gcc"
1721 break
1722 fi
1723 done
1724 IFS="$ac_save_ifs"
1725 fi
1726 fi
1727 CC="$ac_cv_prog_CC"
1728 if test -n "$CC"; then
1729 echo "$ac_t""$CC" 1>&6
1730 else
1731 echo "$ac_t""no" 1>&6
1732 fi
1733
1734 if test -z "$CC"; then
1735 # Extract the first word of "cc", so it can be a program name with args.
1736 set dummy cc; ac_word=$2
1737 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1738 echo "configure:1739: checking for $ac_word" >&5
1739 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1740 echo $ac_n "(cached) $ac_c" 1>&6
1741 else
1742 if test -n "$CC"; then
1743 ac_cv_prog_CC="$CC" # Let the user override the test.
1744 else
1745 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1746 ac_prog_rejected=no
1747 ac_dummy="$PATH"
1748 for ac_dir in $ac_dummy; do
1749 test -z "$ac_dir" && ac_dir=.
1750 if test -f $ac_dir/$ac_word; then
1751 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1752 ac_prog_rejected=yes
1753 continue
1754 fi
1755 ac_cv_prog_CC="cc"
1756 break
1757 fi
1758 done
1759 IFS="$ac_save_ifs"
1760 if test $ac_prog_rejected = yes; then
1761 # We found a bogon in the path, so make sure we never use it.
1762 set dummy $ac_cv_prog_CC
1763 shift
1764 if test $# -gt 0; then
1765 # We chose a different compiler from the bogus one.
1766 # However, it has the same basename, so the bogon will be chosen
1767 # first if we set CC to just the basename; use the full file name.
1768 shift
1769 set dummy "$ac_dir/$ac_word" "$@"
1770 shift
1771 ac_cv_prog_CC="$@"
1772 fi
1773 fi
1774 fi
1775 fi
1776 CC="$ac_cv_prog_CC"
1777 if test -n "$CC"; then
1778 echo "$ac_t""$CC" 1>&6
1779 else
1780 echo "$ac_t""no" 1>&6
1781 fi
1782
1783 if test -z "$CC"; then
1784 case "`uname -s`" in
1785 *win32* | *WIN32*)
1786 # Extract the first word of "cl", so it can be a program name with args.
1787 set dummy cl; ac_word=$2
1788 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1789 echo "configure:1790: checking for $ac_word" >&5
1790 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1791 echo $ac_n "(cached) $ac_c" 1>&6
1792 else
1793 if test -n "$CC"; then
1794 ac_cv_prog_CC="$CC" # Let the user override the test.
1795 else
1796 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1797 ac_dummy="$PATH"
1798 for ac_dir in $ac_dummy; do
1799 test -z "$ac_dir" && ac_dir=.
1800 if test -f $ac_dir/$ac_word; then
1801 ac_cv_prog_CC="cl"
1802 break
1803 fi
1804 done
1805 IFS="$ac_save_ifs"
1806 fi
1807 fi
1808 CC="$ac_cv_prog_CC"
1809 if test -n "$CC"; then
1810 echo "$ac_t""$CC" 1>&6
1811 else
1812 echo "$ac_t""no" 1>&6
1813 fi
1814 ;;
1815 esac
1816 fi
1817 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1818 fi
1819
1820 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1821 echo "configure:1822: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1822
1823 ac_ext=c
1824 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1825 ac_cpp='$CPP $CPPFLAGS'
1826 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1827 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1828 cross_compiling=$ac_cv_prog_cc_cross
1829
1830 cat > conftest.$ac_ext << EOF
1831
1832 #line 1833 "configure"
1833 #include "confdefs.h"
1834
1835 main(){return(0);}
1836 EOF
1837 if { (eval echo configure:1838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1838 ac_cv_prog_cc_works=yes
1839 # If we can't run a trivial program, we are probably using a cross compiler.
1840 if (./conftest; exit) 2>/dev/null; then
1841 ac_cv_prog_cc_cross=no
1842 else
1843 ac_cv_prog_cc_cross=yes
1844 fi
1845 else
1846 echo "configure: failed program was:" >&5
1847 cat conftest.$ac_ext >&5
1848 ac_cv_prog_cc_works=no
1849 fi
1850 rm -fr conftest*
1851 ac_ext=c
1852 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1853 ac_cpp='$CPP $CPPFLAGS'
1854 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1855 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1856 cross_compiling=$ac_cv_prog_cc_cross
1857
1858 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1859 if test $ac_cv_prog_cc_works = no; then
1860 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1861 fi
1862 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1863 echo "configure:1864: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1864 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1865 cross_compiling=$ac_cv_prog_cc_cross
1866
1867 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1868 echo "configure:1869: checking whether we are using GNU C" >&5
1869 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1870 echo $ac_n "(cached) $ac_c" 1>&6
1871 else
1872 cat > conftest.c <<EOF
1873 #ifdef __GNUC__
1874 yes;
1875 #endif
1876 EOF
1877 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1878: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1878 ac_cv_prog_gcc=yes
1879 else
1880 ac_cv_prog_gcc=no
1881 fi
1882 fi
1883
1884 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1885
1886 if test $ac_cv_prog_gcc = yes; then
1887 GCC=yes
1888 else
1889 GCC=
1890 fi
1891
1892 ac_test_CFLAGS="${CFLAGS+set}"
1893 ac_save_CFLAGS="$CFLAGS"
1894 CFLAGS=
1895 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1896 echo "configure:1897: checking whether ${CC-cc} accepts -g" >&5
1897 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1898 echo $ac_n "(cached) $ac_c" 1>&6
1899 else
1900 echo 'void f(){}' > conftest.c
1901 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1902 ac_cv_prog_cc_g=yes
1903 else
1904 ac_cv_prog_cc_g=no
1905 fi
1906 rm -f conftest*
1907
1908 fi
1909
1910 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1911 if test "$ac_test_CFLAGS" = set; then
1912 CFLAGS="$ac_save_CFLAGS"
1913 elif test $ac_cv_prog_cc_g = yes; then
1914 if test "$GCC" = yes; then
1915 CFLAGS="-g -O2"
1916 else
1917 CFLAGS="-g"
1918 fi
1919 else
1920 if test "$GCC" = yes; then
1921 CFLAGS="-O2"
1922 else
1923 CFLAGS=
1924 fi
1925 fi
1926
1927 esac
1928
1929 # On Suns, sometimes $CPP names a directory.
1930 if test -n "$CPP" && test -d "$CPP"; then
1931 CPP=
1932 fi
1933
1934 #### Some systems specify a CPP to use unless we are using GCC.
1935 #### Now that we know whether we are using GCC, we can decide whether
1936 #### to use that one.
1937 if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x
1938 then
1939 CPP="$NON_GNU_CPP"
1940 fi
1941
1942 #### Some systems specify a CC to use unless we are using GCC.
1943 #### Now that we know whether we are using GCC, we can decide whether
1944 #### to use that one.
1945 if test "x$NON_GNU_CC" != x && test x$GCC != xyes &&
1946 test x$cc_specified != xyes
1947 then
1948 CC="$NON_GNU_CC"
1949 fi
1950
1951 if test x$GCC = xyes && test "x$GCC_TEST_OPTIONS" != x
1952 then
1953 CC="$CC $GCC_TEST_OPTIONS"
1954 fi
1955
1956 if test x$GCC = x && test "x$NON_GCC_TEST_OPTIONS" != x
1957 then
1958 CC="$CC $NON_GCC_TEST_OPTIONS"
1959 fi
1960
1961 if test x$GCC = xyes && test "x$GCC_LINK_TEST_OPTIONS" != x
1962 then
1963 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
1964 fi
1965
1966 if test x$GCC = x && test "x$NON_GCC_LINK_TEST_OPTIONS" != x
1967 then
1968 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
1969 fi
1970
1971 #### Some other nice autoconf tests. If you add a test here which
1972 #### should make an entry in src/config.h, don't forget to add an
1973 #### #undef clause to src/config.h.in for autoconf to modify.
1974
1975 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1976 echo "configure:1977: checking whether ln -s works" >&5
1977 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1978 echo $ac_n "(cached) $ac_c" 1>&6
1979 else
1980 rm -f conftestdata
1981 if ln -s X conftestdata 2>/dev/null
1982 then
1983 rm -f conftestdata
1984 ac_cv_prog_LN_S="ln -s"
1985 else
1986 ac_cv_prog_LN_S=ln
1987 fi
1988 fi
1989 LN_S="$ac_cv_prog_LN_S"
1990 if test "$ac_cv_prog_LN_S" = "ln -s"; then
1991 echo "$ac_t""yes" 1>&6
1992 else
1993 echo "$ac_t""no" 1>&6
1994 fi
1995
1996 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1997 echo "configure:1998: checking how to run the C preprocessor" >&5
1998 # On Suns, sometimes $CPP names a directory.
1999 if test -n "$CPP" && test -d "$CPP"; then
2000 CPP=
2001 fi
2002 if test -z "$CPP"; then
2003 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
2004 echo $ac_n "(cached) $ac_c" 1>&6
2005 else
2006 # This must be in double quotes, not single quotes, because CPP may get
2007 # substituted into the Makefile and "${CC-cc}" will confuse make.
2008 CPP="${CC-cc} -E"
2009 # On the NeXT, cc -E runs the code through the compiler's parser,
2010 # not just through cpp.
2011 cat > conftest.$ac_ext <<EOF
2012 #line 2013 "configure"
2013 #include "confdefs.h"
2014 #include <assert.h>
2015 Syntax Error
2016 EOF
2017 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2018 { (eval echo configure:2019: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2019 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2020 if test -z "$ac_err"; then
2021 :
2022 else
2023 echo "$ac_err" >&5
2024 echo "configure: failed program was:" >&5
2025 cat conftest.$ac_ext >&5
2026 rm -rf conftest*
2027 CPP="${CC-cc} -E -traditional-cpp"
2028 cat > conftest.$ac_ext <<EOF
2029 #line 2030 "configure"
2030 #include "confdefs.h"
2031 #include <assert.h>
2032 Syntax Error
2033 EOF
2034 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2035 { (eval echo configure:2036: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2036 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2037 if test -z "$ac_err"; then
2038 :
2039 else
2040 echo "$ac_err" >&5
2041 echo "configure: failed program was:" >&5
2042 cat conftest.$ac_ext >&5
2043 rm -rf conftest*
2044 CPP="${CC-cc} -nologo -E"
2045 cat > conftest.$ac_ext <<EOF
2046 #line 2047 "configure"
2047 #include "confdefs.h"
2048 #include <assert.h>
2049 Syntax Error
2050 EOF
2051 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2052 { (eval echo configure:2053: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2053 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2054 if test -z "$ac_err"; then
2055 :
2056 else
2057 echo "$ac_err" >&5
2058 echo "configure: failed program was:" >&5
2059 cat conftest.$ac_ext >&5
2060 rm -rf conftest*
2061 CPP=/lib/cpp
2062 fi
2063 rm -f conftest*
2064 fi
2065 rm -f conftest*
2066 fi
2067 rm -f conftest*
2068 ac_cv_prog_CPP="$CPP"
2069 fi
2070 CPP="$ac_cv_prog_CPP"
2071 else
2072 ac_cv_prog_CPP="$CPP"
2073 fi
2074 echo "$ac_t""$CPP" 1>&6
2075
2076 # Find a good install program. We prefer a C program (faster),
2077 # so one script is as good as another. But avoid the broken or
2078 # incompatible versions:
2079 # SysV /etc/install, /usr/sbin/install
2080 # SunOS /usr/etc/install
2081 # IRIX /sbin/install
2082 # AIX /bin/install
2083 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2084 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2085 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2086 # ./install, which can be erroneously created by make from ./install.sh.
2087 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2088 echo "configure:2089: checking for a BSD compatible install" >&5
2089 if test -z "$INSTALL"; then
2090 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
2091 echo $ac_n "(cached) $ac_c" 1>&6
2092 else
2093 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
2094 for ac_dir in $PATH; do
2095 # Account for people who put trailing slashes in PATH elements.
2096 case "$ac_dir/" in
2097 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2098 *)
2099 # OSF1 and SCO ODT 3.0 have their own names for install.
2100 # Don't use installbsd from OSF since it installs stuff as root
2101 # by default.
2102 for ac_prog in ginstall scoinst install; do
2103 if test -f $ac_dir/$ac_prog; then
2104 if test $ac_prog = install &&
2105 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2106 # AIX install. It has an incompatible calling convention.
2107 :
2108 else
2109 ac_cv_path_install="$ac_dir/$ac_prog -c"
2110 break 2
2111 fi
2112 fi
2113 done
2114 ;;
2115 esac
2116 done
2117 IFS="$ac_save_IFS"
2118
2119 fi
2120 if test "${ac_cv_path_install+set}" = set; then
2121 INSTALL="$ac_cv_path_install"
2122 else
2123 # As a last resort, use the slow shell script. We don't cache a
2124 # path for INSTALL within a source directory, because that will
2125 # break other packages using the cache if that directory is
2126 # removed, or if the path is relative.
2127 INSTALL="$ac_install_sh"
2128 fi
2129 fi
2130 echo "$ac_t""$INSTALL" 1>&6
2131
2132 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2133 # It thinks the first close brace ends the variable substitution.
2134 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2135
2136 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
2137
2138 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2139
2140 for ac_prog in 'bison -y' byacc
2141 do
2142 # Extract the first word of "$ac_prog", so it can be a program name with args.
2143 set dummy $ac_prog; ac_word=$2
2144 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2145 echo "configure:2146: checking for $ac_word" >&5
2146 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
2147 echo $ac_n "(cached) $ac_c" 1>&6
2148 else
2149 if test -n "$YACC"; then
2150 ac_cv_prog_YACC="$YACC" # Let the user override the test.
2151 else
2152 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2153 ac_dummy="$PATH"
2154 for ac_dir in $ac_dummy; do
2155 test -z "$ac_dir" && ac_dir=.
2156 if test -f $ac_dir/$ac_word; then
2157 ac_cv_prog_YACC="$ac_prog"
2158 break
2159 fi
2160 done
2161 IFS="$ac_save_ifs"
2162 fi
2163 fi
2164 YACC="$ac_cv_prog_YACC"
2165 if test -n "$YACC"; then
2166 echo "$ac_t""$YACC" 1>&6
2167 else
2168 echo "$ac_t""no" 1>&6
2169 fi
2170
2171 test -n "$YACC" && break
2172 done
2173 test -n "$YACC" || YACC="yacc"
2174
2175 if test "x$RANLIB" = x; then
2176 # Extract the first word of "ranlib", so it can be a program name with args.
2177 set dummy ranlib; ac_word=$2
2178 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2179 echo "configure:2180: checking for $ac_word" >&5
2180 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2181 echo $ac_n "(cached) $ac_c" 1>&6
2182 else
2183 if test -n "$RANLIB"; then
2184 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2185 else
2186 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2187 ac_dummy="$PATH"
2188 for ac_dir in $ac_dummy; do
2189 test -z "$ac_dir" && ac_dir=.
2190 if test -f $ac_dir/$ac_word; then
2191 ac_cv_prog_RANLIB="ranlib"
2192 break
2193 fi
2194 done
2195 IFS="$ac_save_ifs"
2196 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2197 fi
2198 fi
2199 RANLIB="$ac_cv_prog_RANLIB"
2200 if test -n "$RANLIB"; then
2201 echo "$ac_t""$RANLIB" 1>&6
2202 else
2203 echo "$ac_t""no" 1>&6
2204 fi
2205
2206 fi
2207
2208 echo $ac_n "checking for AIX""... $ac_c" 1>&6
2209 echo "configure:2210: checking for AIX" >&5
2210 cat > conftest.$ac_ext <<EOF
2211 #line 2212 "configure"
2212 #include "confdefs.h"
2213 #ifdef _AIX
2214 yes
2215 #endif
2216
2217 EOF
2218 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2219 egrep "yes" >/dev/null 2>&1; then
2220 rm -rf conftest*
2221 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
2222 #define _ALL_SOURCE 1
2223 EOF
2224
2225 else
2226 rm -rf conftest*
2227 echo "$ac_t""no" 1>&6
2228 fi
2229 rm -f conftest*
2230
2231
2232
2233 # Sound support for GNU/Linux and the free BSDs.
2234 for ac_hdr in machine/soundcard.h sys/soundcard.h
2235 do
2236 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2237 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2238 echo "configure:2239: checking for $ac_hdr" >&5
2239 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2240 echo $ac_n "(cached) $ac_c" 1>&6
2241 else
2242 cat > conftest.$ac_ext <<EOF
2243 #line 2244 "configure"
2244 #include "confdefs.h"
2245 #include <$ac_hdr>
2246 EOF
2247 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2248 { (eval echo configure:2249: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2249 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2250 if test -z "$ac_err"; then
2251 rm -rf conftest*
2252 eval "ac_cv_header_$ac_safe=yes"
2253 else
2254 echo "$ac_err" >&5
2255 echo "configure: failed program was:" >&5
2256 cat conftest.$ac_ext >&5
2257 rm -rf conftest*
2258 eval "ac_cv_header_$ac_safe=no"
2259 fi
2260 rm -f conftest*
2261 fi
2262 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2263 echo "$ac_t""yes" 1>&6
2264 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2265 cat >> confdefs.h <<EOF
2266 #define $ac_tr_hdr 1
2267 EOF
2268
2269 else
2270 echo "$ac_t""no" 1>&6
2271 fi
2272 done
2273
2274
2275 for ac_hdr in sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \
2276 linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \
2277 termcap.h stdio_ext.h
2278 do
2279 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2280 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2281 echo "configure:2282: checking for $ac_hdr" >&5
2282 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2283 echo $ac_n "(cached) $ac_c" 1>&6
2284 else
2285 cat > conftest.$ac_ext <<EOF
2286 #line 2287 "configure"
2287 #include "confdefs.h"
2288 #include <$ac_hdr>
2289 EOF
2290 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2291 { (eval echo configure:2292: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2292 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2293 if test -z "$ac_err"; then
2294 rm -rf conftest*
2295 eval "ac_cv_header_$ac_safe=yes"
2296 else
2297 echo "$ac_err" >&5
2298 echo "configure: failed program was:" >&5
2299 cat conftest.$ac_ext >&5
2300 rm -rf conftest*
2301 eval "ac_cv_header_$ac_safe=no"
2302 fi
2303 rm -f conftest*
2304 fi
2305 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2306 echo "$ac_t""yes" 1>&6
2307 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2308 cat >> confdefs.h <<EOF
2309 #define $ac_tr_hdr 1
2310 EOF
2311
2312 else
2313 echo "$ac_t""no" 1>&6
2314 fi
2315 done
2316
2317 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
2318 echo "configure:2319: checking for ANSI C header files" >&5
2319 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2320 echo $ac_n "(cached) $ac_c" 1>&6
2321 else
2322 cat > conftest.$ac_ext <<EOF
2323 #line 2324 "configure"
2324 #include "confdefs.h"
2325 #include <stdlib.h>
2326 #include <stdarg.h>
2327 #include <string.h>
2328 #include <float.h>
2329 EOF
2330 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2331 { (eval echo configure:2332: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2332 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2333 if test -z "$ac_err"; then
2334 rm -rf conftest*
2335 ac_cv_header_stdc=yes
2336 else
2337 echo "$ac_err" >&5
2338 echo "configure: failed program was:" >&5
2339 cat conftest.$ac_ext >&5
2340 rm -rf conftest*
2341 ac_cv_header_stdc=no
2342 fi
2343 rm -f conftest*
2344
2345 if test $ac_cv_header_stdc = yes; then
2346 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2347 cat > conftest.$ac_ext <<EOF
2348 #line 2349 "configure"
2349 #include "confdefs.h"
2350 #include <string.h>
2351 EOF
2352 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2353 egrep "memchr" >/dev/null 2>&1; then
2354 :
2355 else
2356 rm -rf conftest*
2357 ac_cv_header_stdc=no
2358 fi
2359 rm -f conftest*
2360
2361 fi
2362
2363 if test $ac_cv_header_stdc = yes; then
2364 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2365 cat > conftest.$ac_ext <<EOF
2366 #line 2367 "configure"
2367 #include "confdefs.h"
2368 #include <stdlib.h>
2369 EOF
2370 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2371 egrep "free" >/dev/null 2>&1; then
2372 :
2373 else
2374 rm -rf conftest*
2375 ac_cv_header_stdc=no
2376 fi
2377 rm -f conftest*
2378
2379 fi
2380
2381 if test $ac_cv_header_stdc = yes; then
2382 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2383 if test "$cross_compiling" = yes; then
2384 :
2385 else
2386 cat > conftest.$ac_ext <<EOF
2387 #line 2388 "configure"
2388 #include "confdefs.h"
2389 #include <ctype.h>
2390 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2391 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2392 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2393 int main () { int i; for (i = 0; i < 256; i++)
2394 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2395 exit (0); }
2396
2397 EOF
2398 if { (eval echo configure:2399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2399 then
2400 :
2401 else
2402 echo "configure: failed program was:" >&5
2403 cat conftest.$ac_ext >&5
2404 rm -fr conftest*
2405 ac_cv_header_stdc=no
2406 fi
2407 rm -fr conftest*
2408 fi
2409
2410 fi
2411 fi
2412
2413 echo "$ac_t""$ac_cv_header_stdc" 1>&6
2414 if test $ac_cv_header_stdc = yes; then
2415 cat >> confdefs.h <<\EOF
2416 #define STDC_HEADERS 1
2417 EOF
2418
2419 fi
2420
2421 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
2422 echo "configure:2423: checking whether time.h and sys/time.h may both be included" >&5
2423 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2424 echo $ac_n "(cached) $ac_c" 1>&6
2425 else
2426 cat > conftest.$ac_ext <<EOF
2427 #line 2428 "configure"
2428 #include "confdefs.h"
2429 #include <sys/types.h>
2430 #include <sys/time.h>
2431 #include <time.h>
2432 int main() {
2433 struct tm *tp;
2434 ; return 0; }
2435 EOF
2436 if { (eval echo configure:2437: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2437 rm -rf conftest*
2438 ac_cv_header_time=yes
2439 else
2440 echo "configure: failed program was:" >&5
2441 cat conftest.$ac_ext >&5
2442 rm -rf conftest*
2443 ac_cv_header_time=no
2444 fi
2445 rm -f conftest*
2446 fi
2447
2448 echo "$ac_t""$ac_cv_header_time" 1>&6
2449 if test $ac_cv_header_time = yes; then
2450 cat >> confdefs.h <<\EOF
2451 #define TIME_WITH_SYS_TIME 1
2452 EOF
2453
2454 fi
2455
2456 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
2457 echo "configure:2458: checking for sys_siglist declaration in signal.h or unistd.h" >&5
2458 if eval "test \"`echo '$''{'ac_cv_decl_sys_siglist'+set}'`\" = set"; then
2459 echo $ac_n "(cached) $ac_c" 1>&6
2460 else
2461 cat > conftest.$ac_ext <<EOF
2462 #line 2463 "configure"
2463 #include "confdefs.h"
2464 #include <sys/types.h>
2465 #include <signal.h>
2466 /* NetBSD declares sys_siglist in unistd.h. */
2467 #ifdef HAVE_UNISTD_H
2468 #include <unistd.h>
2469 #endif
2470 int main() {
2471 char *msg = *(sys_siglist + 1);
2472 ; return 0; }
2473 EOF
2474 if { (eval echo configure:2475: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2475 rm -rf conftest*
2476 ac_cv_decl_sys_siglist=yes
2477 else
2478 echo "configure: failed program was:" >&5
2479 cat conftest.$ac_ext >&5
2480 rm -rf conftest*
2481 ac_cv_decl_sys_siglist=no
2482 fi
2483 rm -f conftest*
2484 fi
2485
2486 echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
2487 if test $ac_cv_decl_sys_siglist = yes; then
2488 cat >> confdefs.h <<\EOF
2489 #define SYS_SIGLIST_DECLARED 1
2490 EOF
2491
2492 fi
2493
2494
2495 echo $ac_n "checking for struct utimbuf""... $ac_c" 1>&6
2496 echo "configure:2497: checking for struct utimbuf" >&5
2497 if eval "test \"`echo '$''{'emacs_cv_struct_utimbuf'+set}'`\" = set"; then
2498 echo $ac_n "(cached) $ac_c" 1>&6
2499 else
2500 cat > conftest.$ac_ext <<EOF
2501 #line 2502 "configure"
2502 #include "confdefs.h"
2503 #ifdef TIME_WITH_SYS_TIME
2504 #include <sys/time.h>
2505 #include <time.h>
2506 #else
2507 #ifdef HAVE_SYS_TIME_H
2508 #include <sys/time.h>
2509 #else
2510 #include <time.h>
2511 #endif
2512 #endif
2513 #ifdef HAVE_UTIME_H
2514 #include <utime.h>
2515 #endif
2516 int main() {
2517 static struct utimbuf x; x.actime = x.modtime;
2518 ; return 0; }
2519 EOF
2520 if { (eval echo configure:2521: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2521 rm -rf conftest*
2522 emacs_cv_struct_utimbuf=yes
2523 else
2524 echo "configure: failed program was:" >&5
2525 cat conftest.$ac_ext >&5
2526 rm -rf conftest*
2527 emacs_cv_struct_utimbuf=no
2528 fi
2529 rm -f conftest*
2530 fi
2531
2532 echo "$ac_t""$emacs_cv_struct_utimbuf" 1>&6
2533 if test $emacs_cv_struct_utimbuf = yes; then
2534 cat >> confdefs.h <<\EOF
2535 #define HAVE_STRUCT_UTIMBUF 1
2536 EOF
2537
2538 fi
2539
2540 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
2541 echo "configure:2542: checking return type of signal handlers" >&5
2542 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2543 echo $ac_n "(cached) $ac_c" 1>&6
2544 else
2545 cat > conftest.$ac_ext <<EOF
2546 #line 2547 "configure"
2547 #include "confdefs.h"
2548 #include <sys/types.h>
2549 #include <signal.h>
2550 #ifdef signal
2551 #undef signal
2552 #endif
2553 #ifdef __cplusplus
2554 extern "C" void (*signal (int, void (*)(int)))(int);
2555 #else
2556 void (*signal ()) ();
2557 #endif
2558
2559 int main() {
2560 int i;
2561 ; return 0; }
2562 EOF
2563 if { (eval echo configure:2564: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2564 rm -rf conftest*
2565 ac_cv_type_signal=void
2566 else
2567 echo "configure: failed program was:" >&5
2568 cat conftest.$ac_ext >&5
2569 rm -rf conftest*
2570 ac_cv_type_signal=int
2571 fi
2572 rm -f conftest*
2573 fi
2574
2575 echo "$ac_t""$ac_cv_type_signal" 1>&6
2576 cat >> confdefs.h <<EOF
2577 #define RETSIGTYPE $ac_cv_type_signal
2578 EOF
2579
2580
2581
2582 echo $ac_n "checking for struct timeval""... $ac_c" 1>&6
2583 echo "configure:2584: checking for struct timeval" >&5
2584 if eval "test \"`echo '$''{'emacs_cv_struct_timeval'+set}'`\" = set"; then
2585 echo $ac_n "(cached) $ac_c" 1>&6
2586 else
2587 cat > conftest.$ac_ext <<EOF
2588 #line 2589 "configure"
2589 #include "confdefs.h"
2590 #ifdef TIME_WITH_SYS_TIME
2591 #include <sys/time.h>
2592 #include <time.h>
2593 #else
2594 #ifdef HAVE_SYS_TIME_H
2595 #include <sys/time.h>
2596 #else
2597 #include <time.h>
2598 #endif
2599 #endif
2600 int main() {
2601 static struct timeval x; x.tv_sec = x.tv_usec;
2602 ; return 0; }
2603 EOF
2604 if { (eval echo configure:2605: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2605 rm -rf conftest*
2606 emacs_cv_struct_timeval=yes
2607 else
2608 echo "configure: failed program was:" >&5
2609 cat conftest.$ac_ext >&5
2610 rm -rf conftest*
2611 emacs_cv_struct_timeval=no
2612 fi
2613 rm -f conftest*
2614 fi
2615
2616 echo "$ac_t""$emacs_cv_struct_timeval" 1>&6
2617 HAVE_TIMEVAL=$emacs_cv_struct_timeval
2618 if test $emacs_cv_struct_timeval = yes; then
2619 cat >> confdefs.h <<\EOF
2620 #define HAVE_TIMEVAL 1
2621 EOF
2622
2623 fi
2624
2625 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
2626 echo "configure:2627: checking whether struct tm is in sys/time.h or time.h" >&5
2627 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
2628 echo $ac_n "(cached) $ac_c" 1>&6
2629 else
2630 cat > conftest.$ac_ext <<EOF
2631 #line 2632 "configure"
2632 #include "confdefs.h"
2633 #include <sys/types.h>
2634 #include <time.h>
2635 int main() {
2636 struct tm *tp; tp->tm_sec;
2637 ; return 0; }
2638 EOF
2639 if { (eval echo configure:2640: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2640 rm -rf conftest*
2641 ac_cv_struct_tm=time.h
2642 else
2643 echo "configure: failed program was:" >&5
2644 cat conftest.$ac_ext >&5
2645 rm -rf conftest*
2646 ac_cv_struct_tm=sys/time.h
2647 fi
2648 rm -f conftest*
2649 fi
2650
2651 echo "$ac_t""$ac_cv_struct_tm" 1>&6
2652 if test $ac_cv_struct_tm = sys/time.h; then
2653 cat >> confdefs.h <<\EOF
2654 #define TM_IN_SYS_TIME 1
2655 EOF
2656
2657 fi
2658
2659 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
2660 echo "configure:2661: checking for tm_zone in struct tm" >&5
2661 if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
2662 echo $ac_n "(cached) $ac_c" 1>&6
2663 else
2664 cat > conftest.$ac_ext <<EOF
2665 #line 2666 "configure"
2666 #include "confdefs.h"
2667 #include <sys/types.h>
2668 #include <$ac_cv_struct_tm>
2669 int main() {
2670 struct tm tm; tm.tm_zone;
2671 ; return 0; }
2672 EOF
2673 if { (eval echo configure:2674: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2674 rm -rf conftest*
2675 ac_cv_struct_tm_zone=yes
2676 else
2677 echo "configure: failed program was:" >&5
2678 cat conftest.$ac_ext >&5
2679 rm -rf conftest*
2680 ac_cv_struct_tm_zone=no
2681 fi
2682 rm -f conftest*
2683 fi
2684
2685 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
2686 if test "$ac_cv_struct_tm_zone" = yes; then
2687 cat >> confdefs.h <<\EOF
2688 #define HAVE_TM_ZONE 1
2689 EOF
2690
2691 else
2692 echo $ac_n "checking for tzname""... $ac_c" 1>&6
2693 echo "configure:2694: checking for tzname" >&5
2694 if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
2695 echo $ac_n "(cached) $ac_c" 1>&6
2696 else
2697 cat > conftest.$ac_ext <<EOF
2698 #line 2699 "configure"
2699 #include "confdefs.h"
2700 #include <time.h>
2701 #ifndef tzname /* For SGI. */
2702 extern char *tzname[]; /* RS6000 and others reject char **tzname. */
2703 #endif
2704 int main() {
2705 atoi(*tzname);
2706 ; return 0; }
2707 EOF
2708 if { (eval echo configure:2709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2709 rm -rf conftest*
2710 ac_cv_var_tzname=yes
2711 else
2712 echo "configure: failed program was:" >&5
2713 cat conftest.$ac_ext >&5
2714 rm -rf conftest*
2715 ac_cv_var_tzname=no
2716 fi
2717 rm -f conftest*
2718 fi
2719
2720 echo "$ac_t""$ac_cv_var_tzname" 1>&6
2721 if test $ac_cv_var_tzname = yes; then
2722 cat >> confdefs.h <<\EOF
2723 #define HAVE_TZNAME 1
2724 EOF
2725
2726 fi
2727 fi
2728
2729 echo $ac_n "checking for tm_gmtoff in struct tm""... $ac_c" 1>&6
2730 echo "configure:2731: checking for tm_gmtoff in struct tm" >&5
2731 if eval "test \"`echo '$''{'emacs_cv_tm_gmtoff'+set}'`\" = set"; then
2732 echo $ac_n "(cached) $ac_c" 1>&6
2733 else
2734 cat > conftest.$ac_ext <<EOF
2735 #line 2736 "configure"
2736 #include "confdefs.h"
2737 #include <time.h>
2738 int main() {
2739 struct tm t; t.tm_gmtoff = 0
2740 ; return 0; }
2741 EOF
2742 if { (eval echo configure:2743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2743 rm -rf conftest*
2744 emacs_cv_tm_gmtoff=yes
2745 else
2746 echo "configure: failed program was:" >&5
2747 cat conftest.$ac_ext >&5
2748 rm -rf conftest*
2749 emacs_cv_tm_gmtoff=no
2750 fi
2751 rm -f conftest*
2752 fi
2753
2754 echo "$ac_t""$emacs_cv_tm_gmtoff" 1>&6
2755 if test $emacs_cv_tm_gmtoff = yes; then
2756 cat >> confdefs.h <<\EOF
2757 #define HAVE_TM_GMTOFF 1
2758 EOF
2759
2760 fi
2761
2762
2763 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
2764 echo "configure:2765: checking for ${CC-cc} option to accept ANSI C" >&5
2765 if eval "test \"`echo '$''{'ac_cv_prog_cc_stdc'+set}'`\" = set"; then
2766 echo $ac_n "(cached) $ac_c" 1>&6
2767 else
2768 ac_cv_prog_cc_stdc=no
2769 ac_save_CC="$CC"
2770 # Don't try gcc -ansi; that turns off useful extensions and
2771 # breaks some systems' header files.
2772 # AIX -qlanglvl=ansi
2773 # Ultrix and OSF/1 -std1
2774 # HP-UX 10.20 and later -Ae
2775 # HP-UX older versions -Aa -D_HPUX_SOURCE
2776 # SVR4 -Xc -D__EXTENSIONS__
2777 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2778 do
2779 CC="$ac_save_CC $ac_arg"
2780 cat > conftest.$ac_ext <<EOF
2781 #line 2782 "configure"
2782 #include "confdefs.h"
2783 #include <stdarg.h>
2784 #include <stdio.h>
2785 #include <sys/types.h>
2786 #include <sys/stat.h>
2787 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2788 struct buf { int x; };
2789 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2790 static char *e (p, i)
2791 char **p;
2792 int i;
2793 {
2794 return p[i];
2795 }
2796 static char *f (char * (*g) (char **, int), char **p, ...)
2797 {
2798 char *s;
2799 va_list v;
2800 va_start (v,p);
2801 s = g (p, va_arg (v,int));
2802 va_end (v);
2803 return s;
2804 }
2805 int test (int i, double x);
2806 struct s1 {int (*f) (int a);};
2807 struct s2 {int (*f) (double a);};
2808 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2809 int argc;
2810 char **argv;
2811 int main() {
2812 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2813 ; return 0; }
2814 EOF
2815 if { (eval echo configure:2816: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2816 rm -rf conftest*
2817 ac_cv_prog_cc_stdc="$ac_arg"; break
2818 else
2819 echo "configure: failed program was:" >&5
2820 cat conftest.$ac_ext >&5
2821 fi
2822 rm -f conftest*
2823 done
2824 CC="$ac_save_CC"
2825
2826 fi
2827
2828 case "x$ac_cv_prog_cc_stdc" in
2829 x|xno)
2830 echo "$ac_t""none needed" 1>&6 ;;
2831 *)
2832 echo "$ac_t""$ac_cv_prog_cc_stdc" 1>&6
2833 CC="$CC $ac_cv_prog_cc_stdc" ;;
2834 esac
2835
2836 echo $ac_n "checking for function prototypes""... $ac_c" 1>&6
2837 echo "configure:2838: checking for function prototypes" >&5
2838 if test "$ac_cv_prog_cc_stdc" != no; then
2839 echo "$ac_t""yes" 1>&6
2840 cat >> confdefs.h <<\EOF
2841 #define PROTOTYPES 1
2842 EOF
2843
2844 else
2845 echo "$ac_t""no" 1>&6
2846 fi
2847
2848 echo $ac_n "checking for working volatile""... $ac_c" 1>&6
2849 echo "configure:2850: checking for working volatile" >&5
2850 if eval "test \"`echo '$''{'ac_cv_c_volatile'+set}'`\" = set"; then
2851 echo $ac_n "(cached) $ac_c" 1>&6
2852 else
2853 cat > conftest.$ac_ext <<EOF
2854 #line 2855 "configure"
2855 #include "confdefs.h"
2856
2857 int main() {
2858
2859 volatile int x;
2860 int * volatile y;
2861 ; return 0; }
2862 EOF
2863 if { (eval echo configure:2864: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2864 rm -rf conftest*
2865 ac_cv_c_volatile=yes
2866 else
2867 echo "configure: failed program was:" >&5
2868 cat conftest.$ac_ext >&5
2869 rm -rf conftest*
2870 ac_cv_c_volatile=no
2871 fi
2872 rm -f conftest*
2873 fi
2874
2875 echo "$ac_t""$ac_cv_c_volatile" 1>&6
2876 if test $ac_cv_c_volatile = no; then
2877 cat >> confdefs.h <<\EOF
2878 #define volatile
2879 EOF
2880
2881 fi
2882
2883 echo $ac_n "checking for working const""... $ac_c" 1>&6
2884 echo "configure:2885: checking for working const" >&5
2885 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2886 echo $ac_n "(cached) $ac_c" 1>&6
2887 else
2888 cat > conftest.$ac_ext <<EOF
2889 #line 2890 "configure"
2890 #include "confdefs.h"
2891
2892 int main() {
2893
2894 /* Ultrix mips cc rejects this. */
2895 typedef int charset[2]; const charset x;
2896 /* SunOS 4.1.1 cc rejects this. */
2897 char const *const *ccp;
2898 char **p;
2899 /* NEC SVR4.0.2 mips cc rejects this. */
2900 struct point {int x, y;};
2901 static struct point const zero = {0,0};
2902 /* AIX XL C 1.02.0.0 rejects this.
2903 It does not let you subtract one const X* pointer from another in an arm
2904 of an if-expression whose if-part is not a constant expression */
2905 const char *g = "string";
2906 ccp = &g + (g ? g-g : 0);
2907 /* HPUX 7.0 cc rejects these. */
2908 ++ccp;
2909 p = (char**) ccp;
2910 ccp = (char const *const *) p;
2911 { /* SCO 3.2v4 cc rejects this. */
2912 char *t;
2913 char const *s = 0 ? (char *) 0 : (char const *) 0;
2914
2915 *t++ = 0;
2916 }
2917 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
2918 int x[] = {25, 17};
2919 const int *foo = &x[0];
2920 ++foo;
2921 }
2922 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2923 typedef const int *iptr;
2924 iptr p = 0;
2925 ++p;
2926 }
2927 { /* AIX XL C 1.02.0.0 rejects this saying
2928 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2929 struct s { int j; const int *ap[3]; };
2930 struct s *b; b->j = 5;
2931 }
2932 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2933 const int foo = 10;
2934 }
2935
2936 ; return 0; }
2937 EOF
2938 if { (eval echo configure:2939: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2939 rm -rf conftest*
2940 ac_cv_c_const=yes
2941 else
2942 echo "configure: failed program was:" >&5
2943 cat conftest.$ac_ext >&5
2944 rm -rf conftest*
2945 ac_cv_c_const=no
2946 fi
2947 rm -f conftest*
2948 fi
2949
2950 echo "$ac_t""$ac_cv_c_const" 1>&6
2951 if test $ac_cv_c_const = no; then
2952 cat >> confdefs.h <<\EOF
2953 #define const
2954 EOF
2955
2956 fi
2957
2958 echo $ac_n "checking for void * support""... $ac_c" 1>&6
2959 echo "configure:2960: checking for void * support" >&5
2960 if eval "test \"`echo '$''{'emacs_cv_void_star'+set}'`\" = set"; then
2961 echo $ac_n "(cached) $ac_c" 1>&6
2962 else
2963 cat > conftest.$ac_ext <<EOF
2964 #line 2965 "configure"
2965 #include "confdefs.h"
2966
2967 int main() {
2968 void * foo;
2969 ; return 0; }
2970 EOF
2971 if { (eval echo configure:2972: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2972 rm -rf conftest*
2973 emacs_cv_void_star=yes
2974 else
2975 echo "configure: failed program was:" >&5
2976 cat conftest.$ac_ext >&5
2977 rm -rf conftest*
2978 emacs_cv_void_star=no
2979 fi
2980 rm -f conftest*
2981 fi
2982
2983 echo "$ac_t""$emacs_cv_void_star" 1>&6
2984 if test $emacs_cv_void_star = yes; then
2985 cat >> confdefs.h <<\EOF
2986 #define POINTER_TYPE void
2987 EOF
2988
2989 else
2990 cat >> confdefs.h <<\EOF
2991 #define POINTER_TYPE char
2992 EOF
2993
2994 fi
2995
2996 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
2997 echo "configure:2998: checking whether ${MAKE-make} sets \${MAKE}" >&5
2998 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
2999 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
3000 echo $ac_n "(cached) $ac_c" 1>&6
3001 else
3002 cat > conftestmake <<\EOF
3003 all:
3004 @echo 'ac_maketemp="${MAKE}"'
3005 EOF
3006 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3007 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
3008 if test -n "$ac_maketemp"; then
3009 eval ac_cv_prog_make_${ac_make}_set=yes
3010 else
3011 eval ac_cv_prog_make_${ac_make}_set=no
3012 fi
3013 rm -f conftestmake
3014 fi
3015 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3016 echo "$ac_t""yes" 1>&6
3017 SET_MAKE=
3018 else
3019 echo "$ac_t""no" 1>&6
3020 SET_MAKE="MAKE=${MAKE-make}"
3021 fi
3022
3023
3024 echo $ac_n "checking for long file names""... $ac_c" 1>&6
3025 echo "configure:3026: checking for long file names" >&5
3026 if eval "test \"`echo '$''{'ac_cv_sys_long_file_names'+set}'`\" = set"; then
3027 echo $ac_n "(cached) $ac_c" 1>&6
3028 else
3029 ac_cv_sys_long_file_names=yes
3030 # Test for long file names in all the places we know might matter:
3031 # . the current directory, where building will happen
3032 # $prefix/lib where we will be installing things
3033 # $exec_prefix/lib likewise
3034 # eval it to expand exec_prefix.
3035 # $TMPDIR if set, where it might want to write temporary files
3036 # if $TMPDIR is not set:
3037 # /tmp where it might want to write temporary files
3038 # /var/tmp likewise
3039 # /usr/tmp likewise
3040 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3041 ac_tmpdirs="$TMPDIR"
3042 else
3043 ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3044 fi
3045 for ac_dir in . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3046 test -d $ac_dir || continue
3047 test -w $ac_dir || continue # It is less confusing to not echo anything here.
3048 (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
3049 (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
3050 val=`cat $ac_dir/conftest9012345 2>/dev/null`
3051 if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
3052 ac_cv_sys_long_file_names=no
3053 rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
3054 break
3055 fi
3056 rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
3057 done
3058 fi
3059
3060 echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6
3061 if test $ac_cv_sys_long_file_names = yes; then
3062 cat >> confdefs.h <<\EOF
3063 #define HAVE_LONG_FILE_NAMES 1
3064 EOF
3065
3066 fi
3067
3068
3069 #### Choose a window system.
3070
3071 # If we find X, set shell vars x_includes and x_libraries to the
3072 # paths, otherwise set no_x=yes.
3073 # Uses ac_ vars as temps to allow command line to override cache and checks.
3074 # --without-x overrides everything else, but does not touch the cache.
3075 echo $ac_n "checking for X""... $ac_c" 1>&6
3076 echo "configure:3077: checking for X" >&5
3077
3078 # Check whether --with-x or --without-x was given.
3079 if test "${with_x+set}" = set; then
3080 withval="$with_x"
3081 :
3082 fi
3083
3084 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
3085 if test "x$with_x" = xno; then
3086 # The user explicitly disabled X.
3087 have_x=disabled
3088 else
3089 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
3090 # Both variables are already set.
3091 have_x=yes
3092 else
3093 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
3094 echo $ac_n "(cached) $ac_c" 1>&6
3095 else
3096 # One or both of the vars are not set, and there is no cached value.
3097 ac_x_includes=NO ac_x_libraries=NO
3098 rm -fr conftestdir
3099 if mkdir conftestdir; then
3100 cd conftestdir
3101 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
3102 cat > Imakefile <<'EOF'
3103 acfindx:
3104 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
3105 EOF
3106 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
3107 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3108 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
3109 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
3110 for ac_extension in a so sl; do
3111 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
3112 test -f $ac_im_libdir/libX11.$ac_extension; then
3113 ac_im_usrlibdir=$ac_im_libdir; break
3114 fi
3115 done
3116 # Screen out bogus values from the imake configuration. They are
3117 # bogus both because they are the default anyway, and because
3118 # using them would break gcc on systems where it needs fixed includes.
3119 case "$ac_im_incroot" in
3120 /usr/include) ;;
3121 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
3122 esac
3123 case "$ac_im_usrlibdir" in
3124 /usr/lib | /lib) ;;
3125 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
3126 esac
3127 fi
3128 cd ..
3129 rm -fr conftestdir
3130 fi
3131
3132 if test "$ac_x_includes" = NO; then
3133 # Guess where to find include files, by looking for this one X11 .h file.
3134 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
3135
3136 # First, try using that file with no special directory specified.
3137 cat > conftest.$ac_ext <<EOF
3138 #line 3139 "configure"
3139 #include "confdefs.h"
3140 #include <$x_direct_test_include>
3141 EOF
3142 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3143 { (eval echo configure:3144: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3144 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3145 if test -z "$ac_err"; then
3146 rm -rf conftest*
3147 # We can compile using X headers with no special include directory.
3148 ac_x_includes=
3149 else
3150 echo "$ac_err" >&5
3151 echo "configure: failed program was:" >&5
3152 cat conftest.$ac_ext >&5
3153 rm -rf conftest*
3154 # Look for the header file in a standard set of common directories.
3155 # Check X11 before X11Rn because it is often a symlink to the current release.
3156 for ac_dir in \
3157 /usr/X11/include \
3158 /usr/X11R6/include \
3159 /usr/X11R5/include \
3160 /usr/X11R4/include \
3161 \
3162 /usr/include/X11 \
3163 /usr/include/X11R6 \
3164 /usr/include/X11R5 \
3165 /usr/include/X11R4 \
3166 \
3167 /usr/local/X11/include \
3168 /usr/local/X11R6/include \
3169 /usr/local/X11R5/include \
3170 /usr/local/X11R4/include \
3171 \
3172 /usr/local/include/X11 \
3173 /usr/local/include/X11R6 \
3174 /usr/local/include/X11R5 \
3175 /usr/local/include/X11R4 \
3176 \
3177 /usr/X386/include \
3178 /usr/x386/include \
3179 /usr/XFree86/include/X11 \
3180 \
3181 /usr/include \
3182 /usr/local/include \
3183 /usr/unsupported/include \
3184 /usr/athena/include \
3185 /usr/local/x11r5/include \
3186 /usr/lpp/Xamples/include \
3187 \
3188 /usr/openwin/include \
3189 /usr/openwin/share/include \
3190 ; \
3191 do
3192 if test -r "$ac_dir/$x_direct_test_include"; then
3193 ac_x_includes=$ac_dir
3194 break
3195 fi
3196 done
3197 fi
3198 rm -f conftest*
3199 fi # $ac_x_includes = NO
3200
3201 if test "$ac_x_libraries" = NO; then
3202 # Check for the libraries.
3203
3204 test -z "$x_direct_test_library" && x_direct_test_library=Xt
3205 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
3206
3207 # See if we find them without any special options.
3208 # Don't add to $LIBS permanently.
3209 ac_save_LIBS="$LIBS"
3210 LIBS="-l$x_direct_test_library $LIBS"
3211 cat > conftest.$ac_ext <<EOF
3212 #line 3213 "configure"
3213 #include "confdefs.h"
3214
3215 int main() {
3216 ${x_direct_test_function}()
3217 ; return 0; }
3218 EOF
3219 if { (eval echo configure:3220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3220 rm -rf conftest*
3221 LIBS="$ac_save_LIBS"
3222 # We can link X programs with no special library path.
3223 ac_x_libraries=
3224 else
3225 echo "configure: failed program was:" >&5
3226 cat conftest.$ac_ext >&5
3227 rm -rf conftest*
3228 LIBS="$ac_save_LIBS"
3229 # First see if replacing the include by lib works.
3230 # Check X11 before X11Rn because it is often a symlink to the current release.
3231 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
3232 /usr/X11/lib \
3233 /usr/X11R6/lib \
3234 /usr/X11R5/lib \
3235 /usr/X11R4/lib \
3236 \
3237 /usr/lib/X11 \
3238 /usr/lib/X11R6 \
3239 /usr/lib/X11R5 \
3240 /usr/lib/X11R4 \
3241 \
3242 /usr/local/X11/lib \
3243 /usr/local/X11R6/lib \
3244 /usr/local/X11R5/lib \
3245 /usr/local/X11R4/lib \
3246 \
3247 /usr/local/lib/X11 \
3248 /usr/local/lib/X11R6 \
3249 /usr/local/lib/X11R5 \
3250 /usr/local/lib/X11R4 \
3251 \
3252 /usr/X386/lib \
3253 /usr/x386/lib \
3254 /usr/XFree86/lib/X11 \
3255 \
3256 /usr/lib \
3257 /usr/local/lib \
3258 /usr/unsupported/lib \
3259 /usr/athena/lib \
3260 /usr/local/x11r5/lib \
3261 /usr/lpp/Xamples/lib \
3262 /lib/usr/lib/X11 \
3263 \
3264 /usr/openwin/lib \
3265 /usr/openwin/share/lib \
3266 ; \
3267 do
3268 for ac_extension in a so sl; do
3269 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
3270 ac_x_libraries=$ac_dir
3271 break 2
3272 fi
3273 done
3274 done
3275 fi
3276 rm -f conftest*
3277 fi # $ac_x_libraries = NO
3278
3279 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
3280 # Didn't find X anywhere. Cache the known absence of X.
3281 ac_cv_have_x="have_x=no"
3282 else
3283 # Record where we found X for the cache.
3284 ac_cv_have_x="have_x=yes \
3285 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
3286 fi
3287 fi
3288 fi
3289 eval "$ac_cv_have_x"
3290 fi # $with_x != no
3291
3292 if test "$have_x" != yes; then
3293 echo "$ac_t""$have_x" 1>&6
3294 no_x=yes
3295 else
3296 # If each of the values was on the command line, it overrides each guess.
3297 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
3298 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
3299 # Update the cache value to reflect the command line values.
3300 ac_cv_have_x="have_x=yes \
3301 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
3302 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
3303 fi
3304
3305 if test "$no_x" = yes; then
3306 window_system=none
3307 else
3308 window_system=x11
3309 fi
3310
3311 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
3312 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
3313 LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"`
3314 x_default_search_path=""
3315 for x_library in `echo ${x_libraries} | sed -e "s/:/ /g"`; do
3316 x_search_path="${x_library}/X11/%L/%T/%N%C%S:\
3317 ${x_library}/X11/%L/%T/%N%C%S:${x_libary}/X11/%l/%T/%N%C%S:\
3318 ${x_library}/X11/%T/%N%C%S:${x_library}/X11/%L/%T/%N%S:\
3319 ${x_library}/X11/%l/%T/%N%S:${x_library}/X11/%T/%N%S"
3320 if test x"${x_default_search_path}" = x; then
3321 x_default_search_path=${x_search_path}
3322 else
3323 x_default_search_path="${x_search_path}:${x_default_search_path}"
3324 fi
3325 done
3326 fi
3327 if test "${x_includes}" != NONE && test -n "${x_includes}"; then
3328 C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"`
3329 fi
3330
3331 if test x"${x_includes}" = x; then
3332 bitmapdir=/usr/include/X11/bitmaps
3333 else
3334 # accumulate include directories that have X11 bitmap subdirectories
3335 bmd_acc="dummyval"
3336 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
3337 if test -d "${bmd}/X11/bitmaps"; then
3338 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
3339 fi
3340 if test -d "${bmd}/bitmaps"; then
3341 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
3342 fi
3343 done
3344 if test ${bmd_acc} != "dummyval"; then
3345 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
3346 fi
3347 fi
3348
3349 case "${window_system}" in
3350 x11 )
3351 HAVE_X_WINDOWS=yes
3352 HAVE_X11=yes
3353 case "${with_x_toolkit}" in
3354 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
3355 motif ) USE_X_TOOLKIT=MOTIF ;;
3356 no ) USE_X_TOOLKIT=none ;;
3357 * ) USE_X_TOOLKIT=maybe ;;
3358 esac
3359 ;;
3360 none )
3361 HAVE_X_WINDOWS=no
3362 HAVE_X11=no
3363 USE_X_TOOLKIT=none
3364 ;;
3365 esac
3366
3367 ### If we're using X11, we should use the X menu package.
3368 HAVE_MENUS=no
3369 case ${HAVE_X11} in
3370 yes ) HAVE_MENUS=yes ;;
3371 esac
3372
3373 if test "${opsys}" = "hpux9"; then
3374 case "${x_libraries}" in
3375 *X11R4* )
3376 opsysfile="s/hpux9-x11r4.h"
3377 ;;
3378 esac
3379 fi
3380
3381 if test "${opsys}" = "hpux9shr"; then
3382 case "${x_libraries}" in
3383 *X11R4* )
3384 opsysfile="s/hpux9shxr4.h"
3385 ;;
3386 esac
3387 fi
3388
3389 #### Extract some information from the operating system and machine files.
3390
3391 echo "checking the machine- and system-dependent files to find out
3392 - which libraries the lib-src programs will want, and
3393 - whether the GNU malloc routines are usable" 1>&6
3394 echo "configure:3395: checking the machine- and system-dependent files to find out
3395 - which libraries the lib-src programs will want, and
3396 - whether the GNU malloc routines are usable" >&5
3397
3398 ### First figure out CFLAGS (which we use for running the compiler here)
3399 ### and REAL_CFLAGS (which we use for real compilation).
3400 ### The two are the same except on a few systems, where they are made
3401 ### different to work around various lossages. For example,
3402 ### GCC 2.5 on GNU/Linux needs them to be different because it treats -g
3403 ### as implying static linking.
3404
3405 ### If the CFLAGS env var is specified, we use that value
3406 ### instead of the default.
3407
3408 ### It's not important that this name contain the PID; you can't run
3409 ### two configures in the same directory and have anything work
3410 ### anyway.
3411 tempcname="conftest.c"
3412
3413 echo '
3414 #include "'${srcdir}'/src/'${opsysfile}'"
3415 #include "'${srcdir}'/src/'${machfile}'"
3416 #ifndef LIBS_MACHINE
3417 #define LIBS_MACHINE
3418 #endif
3419 #ifndef LIBS_SYSTEM
3420 #define LIBS_SYSTEM
3421 #endif
3422 #ifndef C_SWITCH_SYSTEM
3423 #define C_SWITCH_SYSTEM
3424 #endif
3425 #ifndef C_SWITCH_MACHINE
3426 #define C_SWITCH_MACHINE
3427 #endif
3428 configure___ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM
3429 configure___ c_switch_system=C_SWITCH_SYSTEM
3430 configure___ c_switch_machine=C_SWITCH_MACHINE
3431
3432 #ifndef LIB_X11_LIB
3433 #define LIB_X11_LIB -lX11
3434 #endif
3435
3436 #ifndef LIBX11_MACHINE
3437 #define LIBX11_MACHINE
3438 #endif
3439
3440 #ifndef LIBX11_SYSTEM
3441 #define LIBX11_SYSTEM
3442 #endif
3443 configure___ LIBX=LIB_X11_LIB LIBX11_MACHINE LIBX11_SYSTEM
3444
3445 #ifdef UNEXEC
3446 configure___ unexec=UNEXEC
3447 #else
3448 configure___ unexec=unexec.o
3449 #endif
3450
3451 #ifdef SYSTEM_MALLOC
3452 configure___ system_malloc=yes
3453 #else
3454 configure___ system_malloc=no
3455 #endif
3456
3457 #ifndef C_DEBUG_SWITCH
3458 #define C_DEBUG_SWITCH -g
3459 #endif
3460
3461 #ifndef C_OPTIMIZE_SWITCH
3462 #ifdef __GNUC__
3463 #define C_OPTIMIZE_SWITCH -O2
3464 #else
3465 #define C_OPTIMIZE_SWITCH -O
3466 #endif
3467 #endif
3468
3469 #ifndef LD_SWITCH_MACHINE
3470 #define LD_SWITCH_MACHINE
3471 #endif
3472
3473 #ifndef LD_SWITCH_SYSTEM
3474 #define LD_SWITCH_SYSTEM
3475 #endif
3476
3477 #ifndef LD_SWITCH_X_SITE_AUX
3478 #define LD_SWITCH_X_SITE_AUX
3479 #endif
3480
3481 configure___ ld_switch_system=LD_SWITCH_SYSTEM
3482 configure___ ld_switch_machine=LD_SWITCH_MACHINE
3483
3484 #ifdef THIS_IS_CONFIGURE
3485
3486 /* Get the CFLAGS for tests in configure. */
3487 #ifdef __GNUC__
3488 configure___ CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
3489 #else
3490 configure___ CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
3491 #endif
3492
3493 #else /* not THIS_IS_CONFIGURE */
3494
3495 /* Get the CFLAGS for real compilation. */
3496 #ifdef __GNUC__
3497 configure___ REAL_CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
3498 #else
3499 configure___ REAL_CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
3500 #endif
3501
3502 #endif /* not THIS_IS_CONFIGURE */
3503 ' > ${tempcname}
3504
3505 # The value of CPP is a quoted variable reference, so we need to do this
3506 # to get its actual value...
3507 CPP=`eval "echo $CPP"`
3508 eval `${CPP} -Isrc ${tempcname} \
3509 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
3510 if test "x$SPECIFIED_CFLAGS" = x; then
3511 eval `${CPP} -Isrc -DTHIS_IS_CONFIGURE ${tempcname} \
3512 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
3513 else
3514 REAL_CFLAGS="$CFLAGS"
3515 fi
3516 rm ${tempcname}
3517
3518 ac_link="$ac_link $ld_switch_machine $ld_switch_system"
3519
3520 ### Compute the unexec source name from the object name.
3521 UNEXEC_SRC="`echo ${unexec} | sed 's/\.o/.c/'`"
3522
3523 # Do the opsystem or machine files prohibit the use of the GNU malloc?
3524 # Assume not, until told otherwise.
3525 GNU_MALLOC=yes
3526 doug_lea_malloc=yes
3527 echo $ac_n "checking for malloc_get_state""... $ac_c" 1>&6
3528 echo "configure:3529: checking for malloc_get_state" >&5
3529 if eval "test \"`echo '$''{'ac_cv_func_malloc_get_state'+set}'`\" = set"; then
3530 echo $ac_n "(cached) $ac_c" 1>&6
3531 else
3532 cat > conftest.$ac_ext <<EOF
3533 #line 3534 "configure"
3534 #include "confdefs.h"
3535 /* System header to define __stub macros and hopefully few prototypes,
3536 which can conflict with char malloc_get_state(); below. */
3537 #include <assert.h>
3538 /* Override any gcc2 internal prototype to avoid an error. */
3539 /* We use char because int might match the return type of a gcc2
3540 builtin and then its argument prototype would still apply. */
3541 char malloc_get_state();
3542
3543 int main() {
3544
3545 /* The GNU C library defines this for functions which it implements
3546 to always fail with ENOSYS. Some functions are actually named
3547 something starting with __ and the normal name is an alias. */
3548 #if defined (__stub_malloc_get_state) || defined (__stub___malloc_get_state)
3549 choke me
3550 #else
3551 malloc_get_state();
3552 #endif
3553
3554 ; return 0; }
3555 EOF
3556 if { (eval echo configure:3557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3557 rm -rf conftest*
3558 eval "ac_cv_func_malloc_get_state=yes"
3559 else
3560 echo "configure: failed program was:" >&5
3561 cat conftest.$ac_ext >&5
3562 rm -rf conftest*
3563 eval "ac_cv_func_malloc_get_state=no"
3564 fi
3565 rm -f conftest*
3566 fi
3567
3568 if eval "test \"`echo '$ac_cv_func_'malloc_get_state`\" = yes"; then
3569 echo "$ac_t""yes" 1>&6
3570 :
3571 else
3572 echo "$ac_t""no" 1>&6
3573 doug_lea_malloc=no
3574 fi
3575
3576 echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6
3577 echo "configure:3578: checking for malloc_set_state" >&5
3578 if eval "test \"`echo '$''{'ac_cv_func_malloc_set_state'+set}'`\" = set"; then
3579 echo $ac_n "(cached) $ac_c" 1>&6
3580 else
3581 cat > conftest.$ac_ext <<EOF
3582 #line 3583 "configure"
3583 #include "confdefs.h"
3584 /* System header to define __stub macros and hopefully few prototypes,
3585 which can conflict with char malloc_set_state(); below. */
3586 #include <assert.h>
3587 /* Override any gcc2 internal prototype to avoid an error. */
3588 /* We use char because int might match the return type of a gcc2
3589 builtin and then its argument prototype would still apply. */
3590 char malloc_set_state();
3591
3592 int main() {
3593
3594 /* The GNU C library defines this for functions which it implements
3595 to always fail with ENOSYS. Some functions are actually named
3596 something starting with __ and the normal name is an alias. */
3597 #if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
3598 choke me
3599 #else
3600 malloc_set_state();
3601 #endif
3602
3603 ; return 0; }
3604 EOF
3605 if { (eval echo configure:3606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3606 rm -rf conftest*
3607 eval "ac_cv_func_malloc_set_state=yes"
3608 else
3609 echo "configure: failed program was:" >&5
3610 cat conftest.$ac_ext >&5
3611 rm -rf conftest*
3612 eval "ac_cv_func_malloc_set_state=no"
3613 fi
3614 rm -f conftest*
3615 fi
3616
3617 if eval "test \"`echo '$ac_cv_func_'malloc_set_state`\" = yes"; then
3618 echo "$ac_t""yes" 1>&6
3619 :
3620 else
3621 echo "$ac_t""no" 1>&6
3622 doug_lea_malloc=no
3623 fi
3624
3625 echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6
3626 echo "configure:3627: checking whether __after_morecore_hook exists" >&5
3627 if eval "test \"`echo '$''{'emacs_cv_var___after_morecore_hook'+set}'`\" = set"; then
3628 echo $ac_n "(cached) $ac_c" 1>&6
3629 else
3630 cat > conftest.$ac_ext <<EOF
3631 #line 3632 "configure"
3632 #include "confdefs.h"
3633 extern void (* __after_morecore_hook)();
3634 int main() {
3635 __after_morecore_hook = 0
3636 ; return 0; }
3637 EOF
3638 if { (eval echo configure:3639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3639 rm -rf conftest*
3640 emacs_cv_var___after_morecore_hook=yes
3641 else
3642 echo "configure: failed program was:" >&5
3643 cat conftest.$ac_ext >&5
3644 rm -rf conftest*
3645 emacs_cv_var___after_morecore_hook=no
3646 fi
3647 rm -f conftest*
3648 fi
3649
3650 echo "$ac_t""$emacs_cv_var___after_morecore_hook" 1>&6
3651 if test $emacs_cv_var___after_morecore_hook = no; then
3652 doug_lea_malloc=no
3653 fi
3654 if test "${system_malloc}" = "yes"; then
3655 GNU_MALLOC=no
3656 GNU_MALLOC_reason="
3657 (The GNU allocators don't work with this system configuration.)"
3658 fi
3659 if test "$doug_lea_malloc" = "yes" ; then
3660 if test "$GNU_MALLOC" = yes ; then
3661 GNU_MALLOC_reason="
3662 (Using Doug Lea's new malloc from the GNU C Library.)"
3663 fi
3664 cat >> confdefs.h <<\EOF
3665 #define DOUG_LEA_MALLOC 1
3666 EOF
3667
3668 fi
3669
3670 if test x"${REL_ALLOC}" = x; then
3671 REL_ALLOC=${GNU_MALLOC}
3672 fi
3673
3674 #### Add the libraries to LIBS and check for some functions.
3675
3676 if test x"${OVERRIDE_CPPFLAGS}" != x; then
3677 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
3678 else
3679 CPPFLAGS="$c_switch_system $c_switch_machine $CPPFLAGS"
3680 fi
3681
3682 LIBS="$libsrc_libs $LIBS"
3683
3684 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
3685 echo "configure:3686: checking for dnet_ntoa in -ldnet" >&5
3686 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
3687 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3688 echo $ac_n "(cached) $ac_c" 1>&6
3689 else
3690 ac_save_LIBS="$LIBS"
3691 LIBS="-ldnet $LIBS"
3692 cat > conftest.$ac_ext <<EOF
3693 #line 3694 "configure"
3694 #include "confdefs.h"
3695 /* Override any gcc2 internal prototype to avoid an error. */
3696 /* We use char because int might match the return type of a gcc2
3697 builtin and then its argument prototype would still apply. */
3698 char dnet_ntoa();
3699
3700 int main() {
3701 dnet_ntoa()
3702 ; return 0; }
3703 EOF
3704 if { (eval echo configure:3705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3705 rm -rf conftest*
3706 eval "ac_cv_lib_$ac_lib_var=yes"
3707 else
3708 echo "configure: failed program was:" >&5
3709 cat conftest.$ac_ext >&5
3710 rm -rf conftest*
3711 eval "ac_cv_lib_$ac_lib_var=no"
3712 fi
3713 rm -f conftest*
3714 LIBS="$ac_save_LIBS"
3715
3716 fi
3717 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3718 echo "$ac_t""yes" 1>&6
3719 ac_tr_lib=HAVE_LIB`echo dnet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3720 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3721 cat >> confdefs.h <<EOF
3722 #define $ac_tr_lib 1
3723 EOF
3724
3725 LIBS="-ldnet $LIBS"
3726
3727 else
3728 echo "$ac_t""no" 1>&6
3729 fi
3730
3731
3732 echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
3733 echo "configure:3734: checking for main in -lXbsd" >&5
3734 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
3735 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3736 echo $ac_n "(cached) $ac_c" 1>&6
3737 else
3738 ac_save_LIBS="$LIBS"
3739 LIBS="-lXbsd $LIBS"
3740 cat > conftest.$ac_ext <<EOF
3741 #line 3742 "configure"
3742 #include "confdefs.h"
3743
3744 int main() {
3745 main()
3746 ; return 0; }
3747 EOF
3748 if { (eval echo configure:3749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3749 rm -rf conftest*
3750 eval "ac_cv_lib_$ac_lib_var=yes"
3751 else
3752 echo "configure: failed program was:" >&5
3753 cat conftest.$ac_ext >&5
3754 rm -rf conftest*
3755 eval "ac_cv_lib_$ac_lib_var=no"
3756 fi
3757 rm -f conftest*
3758 LIBS="$ac_save_LIBS"
3759
3760 fi
3761 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3762 echo "$ac_t""yes" 1>&6
3763 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
3764 else
3765 echo "$ac_t""no" 1>&6
3766 fi
3767
3768
3769 echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6
3770 echo "configure:3771: checking for cma_open in -lpthreads" >&5
3771 ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'`
3772 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3773 echo $ac_n "(cached) $ac_c" 1>&6
3774 else
3775 ac_save_LIBS="$LIBS"
3776 LIBS="-lpthreads $LIBS"
3777 cat > conftest.$ac_ext <<EOF
3778 #line 3779 "configure"
3779 #include "confdefs.h"
3780 /* Override any gcc2 internal prototype to avoid an error. */
3781 /* We use char because int might match the return type of a gcc2
3782 builtin and then its argument prototype would still apply. */
3783 char cma_open();
3784
3785 int main() {
3786 cma_open()
3787 ; return 0; }
3788 EOF
3789 if { (eval echo configure:3790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3790 rm -rf conftest*
3791 eval "ac_cv_lib_$ac_lib_var=yes"
3792 else
3793 echo "configure: failed program was:" >&5
3794 cat conftest.$ac_ext >&5
3795 rm -rf conftest*
3796 eval "ac_cv_lib_$ac_lib_var=no"
3797 fi
3798 rm -f conftest*
3799 LIBS="$ac_save_LIBS"
3800
3801 fi
3802 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3803 echo "$ac_t""yes" 1>&6
3804 ac_tr_lib=HAVE_LIB`echo pthreads | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3805 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3806 cat >> confdefs.h <<EOF
3807 #define $ac_tr_lib 1
3808 EOF
3809
3810 LIBS="-lpthreads $LIBS"
3811
3812 else
3813 echo "$ac_t""no" 1>&6
3814 fi
3815
3816
3817 echo $ac_n "checking for XFree86 in /usr/X386""... $ac_c" 1>&6
3818 echo "configure:3819: checking for XFree86 in /usr/X386" >&5
3819 if test -d /usr/X386/include; then
3820 HAVE_XFREE386=yes
3821 : ${C_SWITCH_X_SITE="-I/usr/X386/include"}
3822 else
3823 HAVE_XFREE386=no
3824 fi
3825 echo "$ac_t""$HAVE_XFREE386" 1>&6
3826
3827 # Change CFLAGS temporarily so that C_SWITCH_X_SITE gets used
3828 # for the tests that follow. We set it back to REAL_CFLAGS later on.
3829
3830 if test "${HAVE_X11}" = "yes"; then
3831 DEFS="$C_SWITCH_X_SITE $DEFS"
3832 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
3833 LIBS="$LIBX $LIBS"
3834 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
3835
3836 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
3837 # This is handled by LD_SWITCH_X_SITE_AUX during the real build,
3838 # but it's more convenient here to set LD_RUN_PATH
3839 # since this also works on hosts that don't understand LD_SWITCH_X_SITE_AUX.
3840 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
3841 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
3842 export LD_RUN_PATH
3843 fi
3844
3845 if test "${opsys}" = "gnu-linux"; then
3846 echo $ac_n "checking whether X on GNU/Linux needs -b to link""... $ac_c" 1>&6
3847 echo "configure:3848: checking whether X on GNU/Linux needs -b to link" >&5
3848 cat > conftest.$ac_ext <<EOF
3849 #line 3850 "configure"
3850 #include "confdefs.h"
3851
3852 int main() {
3853 XOpenDisplay ("foo");
3854 ; return 0; }
3855 EOF
3856 if { (eval echo configure:3857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3857 rm -rf conftest*
3858 xlinux_first_failure=no
3859 else
3860 echo "configure: failed program was:" >&5
3861 cat conftest.$ac_ext >&5
3862 rm -rf conftest*
3863 xlinux_first_failure=yes
3864 fi
3865 rm -f conftest*
3866 if test "${xlinux_first_failure}" = "yes"; then
3867 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
3868 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
3869 OLD_CPPFLAGS="$CPPFLAGS"
3870 OLD_LIBS="$LIBS"
3871 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
3872 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
3873 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
3874 LIBS="$LIBS -b i486-linuxaout"
3875 cat > conftest.$ac_ext <<EOF
3876 #line 3877 "configure"
3877 #include "confdefs.h"
3878
3879 int main() {
3880 XOpenDisplay ("foo");
3881 ; return 0; }
3882 EOF
3883 if { (eval echo configure:3884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3884 rm -rf conftest*
3885 xlinux_second_failure=no
3886 else
3887 echo "configure: failed program was:" >&5
3888 cat conftest.$ac_ext >&5
3889 rm -rf conftest*
3890 xlinux_second_failure=yes
3891 fi
3892 rm -f conftest*
3893 if test "${xlinux_second_failure}" = "yes"; then
3894 # If we get the same failure with -b, there is no use adding -b.
3895 # So take it out. This plays safe.
3896 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
3897 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
3898 CPPFLAGS="$OLD_CPPFLAGS"
3899 LIBS="$OLD_LIBS"
3900 echo "$ac_t""no" 1>&6
3901 else
3902 echo "$ac_t""yes" 1>&6
3903 fi
3904 else
3905 echo "$ac_t""no" 1>&6
3906 fi
3907 fi
3908
3909 for ac_func in XrmSetDatabase XScreenResourceString \
3910 XScreenNumberOfScreen XSetWMProtocols
3911 do
3912 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3913 echo "configure:3914: checking for $ac_func" >&5
3914 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3915 echo $ac_n "(cached) $ac_c" 1>&6
3916 else
3917 cat > conftest.$ac_ext <<EOF
3918 #line 3919 "configure"
3919 #include "confdefs.h"
3920 /* System header to define __stub macros and hopefully few prototypes,
3921 which can conflict with char $ac_func(); below. */
3922 #include <assert.h>
3923 /* Override any gcc2 internal prototype to avoid an error. */
3924 /* We use char because int might match the return type of a gcc2
3925 builtin and then its argument prototype would still apply. */
3926 char $ac_func();
3927
3928 int main() {
3929
3930 /* The GNU C library defines this for functions which it implements
3931 to always fail with ENOSYS. Some functions are actually named
3932 something starting with __ and the normal name is an alias. */
3933 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3934 choke me
3935 #else
3936 $ac_func();
3937 #endif
3938
3939 ; return 0; }
3940 EOF
3941 if { (eval echo configure:3942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3942 rm -rf conftest*
3943 eval "ac_cv_func_$ac_func=yes"
3944 else
3945 echo "configure: failed program was:" >&5
3946 cat conftest.$ac_ext >&5
3947 rm -rf conftest*
3948 eval "ac_cv_func_$ac_func=no"
3949 fi
3950 rm -f conftest*
3951 fi
3952
3953 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3954 echo "$ac_t""yes" 1>&6
3955 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3956 cat >> confdefs.h <<EOF
3957 #define $ac_tr_func 1
3958 EOF
3959
3960 else
3961 echo "$ac_t""no" 1>&6
3962 fi
3963 done
3964
3965 fi
3966
3967 if test "${window_system}" = "x11"; then
3968 echo $ac_n "checking X11 version 6""... $ac_c" 1>&6
3969 echo "configure:3970: checking X11 version 6" >&5
3970 if eval "test \"`echo '$''{'emacs_cv_x11_version_6'+set}'`\" = set"; then
3971 echo $ac_n "(cached) $ac_c" 1>&6
3972 else
3973 cat > conftest.$ac_ext <<EOF
3974 #line 3975 "configure"
3975 #include "confdefs.h"
3976 #include <X11/Xlib.h>
3977 int main() {
3978 #if XlibSpecificationRelease < 6
3979 fail;
3980 #endif
3981
3982 ; return 0; }
3983 EOF
3984 if { (eval echo configure:3985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3985 rm -rf conftest*
3986 emacs_cv_x11_version_6=yes
3987 else
3988 echo "configure: failed program was:" >&5
3989 cat conftest.$ac_ext >&5
3990 rm -rf conftest*
3991 emacs_cv_x11_version_6=no
3992 fi
3993 rm -f conftest*
3994 fi
3995
3996 if test $emacs_cv_x11_version_6 = yes; then
3997 echo "$ac_t""6 or newer" 1>&6
3998 cat >> confdefs.h <<\EOF
3999 #define HAVE_X11R6 1
4000 EOF
4001
4002 else
4003 echo "$ac_t""before 6" 1>&6
4004 fi
4005 fi
4006
4007 if test "${window_system}" = "x11"; then
4008 echo $ac_n "checking X11 version 5""... $ac_c" 1>&6
4009 echo "configure:4010: checking X11 version 5" >&5
4010 if eval "test \"`echo '$''{'emacs_cv_x11_version_5'+set}'`\" = set"; then
4011 echo $ac_n "(cached) $ac_c" 1>&6
4012 else
4013 cat > conftest.$ac_ext <<EOF
4014 #line 4015 "configure"
4015 #include "confdefs.h"
4016 #include <X11/Xlib.h>
4017 int main() {
4018 #if XlibSpecificationRelease < 5
4019 fail;
4020 #endif
4021
4022 ; return 0; }
4023 EOF
4024 if { (eval echo configure:4025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4025 rm -rf conftest*
4026 emacs_cv_x11_version_5=yes
4027 else
4028 echo "configure: failed program was:" >&5
4029 cat conftest.$ac_ext >&5
4030 rm -rf conftest*
4031 emacs_cv_x11_version_5=no
4032 fi
4033 rm -f conftest*
4034 fi
4035
4036 if test $emacs_cv_x11_version_5 = yes; then
4037 echo "$ac_t""5 or newer" 1>&6
4038 HAVE_X11R5=yes
4039 cat >> confdefs.h <<\EOF
4040 #define HAVE_X11R5 1
4041 EOF
4042
4043 else
4044 HAVE_X11R5=no
4045 echo "$ac_t""before 5" 1>&6
4046 fi
4047 fi
4048
4049 if test x"${USE_X_TOOLKIT}" = xmaybe; then
4050 if test x"${HAVE_X11R5}" = xyes; then
4051 echo $ac_n "checking X11 version 5 with Xaw""... $ac_c" 1>&6
4052 echo "configure:4053: checking X11 version 5 with Xaw" >&5
4053 if eval "test \"`echo '$''{'emacs_cv_x11_version_5_with_xaw'+set}'`\" = set"; then
4054 echo $ac_n "(cached) $ac_c" 1>&6
4055 else
4056 cat > conftest.$ac_ext <<EOF
4057 #line 4058 "configure"
4058 #include "confdefs.h"
4059
4060 #include <X11/Intrinsic.h>
4061 #include <X11/Xaw/Simple.h>
4062 int main() {
4063
4064 ; return 0; }
4065 EOF
4066 if { (eval echo configure:4067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4067 rm -rf conftest*
4068 emacs_cv_x11_version_5_with_xaw=yes
4069 else
4070 echo "configure: failed program was:" >&5
4071 cat conftest.$ac_ext >&5
4072 rm -rf conftest*
4073 emacs_cv_x11_version_5_with_xaw=no
4074 fi
4075 rm -f conftest*
4076 fi
4077
4078 if test $emacs_cv_x11_version_5_with_xaw = yes; then
4079 echo "$ac_t""5 or newer, with Xaw; use toolkit by default" 1>&6
4080 USE_X_TOOLKIT=LUCID
4081 else
4082 echo "$ac_t""before 5 or no Xaw; do not use toolkit by default" 1>&6
4083 USE_X_TOOLKIT=none
4084 fi
4085 else
4086 USE_X_TOOLKIT=none
4087 fi
4088 fi
4089
4090 X_TOOLKIT_TYPE=$USE_X_TOOLKIT
4091
4092 if test "${USE_X_TOOLKIT}" != "none"; then
4093 echo $ac_n "checking X11 toolkit version""... $ac_c" 1>&6
4094 echo "configure:4095: checking X11 toolkit version" >&5
4095 if eval "test \"`echo '$''{'emacs_cv_x11_toolkit_version_6'+set}'`\" = set"; then
4096 echo $ac_n "(cached) $ac_c" 1>&6
4097 else
4098 cat > conftest.$ac_ext <<EOF
4099 #line 4100 "configure"
4100 #include "confdefs.h"
4101 #include <X11/Intrinsic.h>
4102 int main() {
4103 #if XtSpecificationRelease < 6
4104 fail;
4105 #endif
4106
4107 ; return 0; }
4108 EOF
4109 if { (eval echo configure:4110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4110 rm -rf conftest*
4111 emacs_cv_x11_toolkit_version_6=yes
4112 else
4113 echo "configure: failed program was:" >&5
4114 cat conftest.$ac_ext >&5
4115 rm -rf conftest*
4116 emacs_cv_x11_toolkit_version_6=no
4117 fi
4118 rm -f conftest*
4119 fi
4120
4121 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
4122 if test $emacs_cv_x11_toolkit_version_6 = yes; then
4123 echo "$ac_t""6 or newer" 1>&6
4124 cat >> confdefs.h <<\EOF
4125 #define HAVE_X11XTR6 1
4126 EOF
4127
4128 else
4129 echo "$ac_t""before 6" 1>&6
4130 fi
4131
4132 OLDLIBS="$LIBS"
4133 if test x$HAVE_X11XTR6 = xyes; then
4134 LIBS="-lXt -lSM -lICE $LIBS"
4135 else
4136 LIBS="-lXt $LIBS"
4137 fi
4138 echo $ac_n "checking for XmuConvertStandardSelection in -lXmu""... $ac_c" 1>&6
4139 echo "configure:4140: checking for XmuConvertStandardSelection in -lXmu" >&5
4140 ac_lib_var=`echo Xmu'_'XmuConvertStandardSelection | sed 'y%./+-%__p_%'`
4141 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4142 echo $ac_n "(cached) $ac_c" 1>&6
4143 else
4144 ac_save_LIBS="$LIBS"
4145 LIBS="-lXmu $LIBS"
4146 cat > conftest.$ac_ext <<EOF
4147 #line 4148 "configure"
4148 #include "confdefs.h"
4149 /* Override any gcc2 internal prototype to avoid an error. */
4150 /* We use char because int might match the return type of a gcc2
4151 builtin and then its argument prototype would still apply. */
4152 char XmuConvertStandardSelection();
4153
4154 int main() {
4155 XmuConvertStandardSelection()
4156 ; return 0; }
4157 EOF
4158 if { (eval echo configure:4159: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4159 rm -rf conftest*
4160 eval "ac_cv_lib_$ac_lib_var=yes"
4161 else
4162 echo "configure: failed program was:" >&5
4163 cat conftest.$ac_ext >&5
4164 rm -rf conftest*
4165 eval "ac_cv_lib_$ac_lib_var=no"
4166 fi
4167 rm -f conftest*
4168 LIBS="$ac_save_LIBS"
4169
4170 fi
4171 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4172 echo "$ac_t""yes" 1>&6
4173 ac_tr_lib=HAVE_LIB`echo Xmu | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4174 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4175 cat >> confdefs.h <<EOF
4176 #define $ac_tr_lib 1
4177 EOF
4178
4179 LIBS="-lXmu $LIBS"
4180
4181 else
4182 echo "$ac_t""no" 1>&6
4183 fi
4184
4185 LIBS="$OLDLIBS"
4186 fi
4187
4188 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
4189 echo $ac_n "checking for Motif version 2.1""... $ac_c" 1>&6
4190 echo "configure:4191: checking for Motif version 2.1" >&5
4191 if eval "test \"`echo '$''{'emacs_cv_motif_version_2_1'+set}'`\" = set"; then
4192 echo $ac_n "(cached) $ac_c" 1>&6
4193 else
4194 cat > conftest.$ac_ext <<EOF
4195 #line 4196 "configure"
4196 #include "confdefs.h"
4197 #include <Xm/Xm.h>
4198 int main() {
4199 #if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
4200 int x = 5;
4201 #else
4202 Motif version prior to 2.1.
4203 #endif
4204 ; return 0; }
4205 EOF
4206 if { (eval echo configure:4207: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4207 rm -rf conftest*
4208 emacs_cv_motif_version_2_1=yes
4209 else
4210 echo "configure: failed program was:" >&5
4211 cat conftest.$ac_ext >&5
4212 rm -rf conftest*
4213 emacs_cv_motif_version_2_1=no
4214 fi
4215 rm -f conftest*
4216 fi
4217
4218 echo "$ac_t""$emacs_cv_motif_version_2_1" 1>&6
4219 HAVE_MOTIF_2_1=$emacs_cv_motif_version_2_1
4220 if test $emacs_cv_motif_version_2_1 = yes; then
4221 cat >> confdefs.h <<\EOF
4222 #define HAVE_MOTIF_2_1 1
4223 EOF
4224
4225 echo $ac_n "checking for XpCreateContext in -lXp""... $ac_c" 1>&6
4226 echo "configure:4227: checking for XpCreateContext in -lXp" >&5
4227 ac_lib_var=`echo Xp'_'XpCreateContext | sed 'y%./+-%__p_%'`
4228 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4229 echo $ac_n "(cached) $ac_c" 1>&6
4230 else
4231 ac_save_LIBS="$LIBS"
4232 LIBS="-lXp $LIBS"
4233 cat > conftest.$ac_ext <<EOF
4234 #line 4235 "configure"
4235 #include "confdefs.h"
4236 /* Override any gcc2 internal prototype to avoid an error. */
4237 /* We use char because int might match the return type of a gcc2
4238 builtin and then its argument prototype would still apply. */
4239 char XpCreateContext();
4240
4241 int main() {
4242 XpCreateContext()
4243 ; return 0; }
4244 EOF
4245 if { (eval echo configure:4246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4246 rm -rf conftest*
4247 eval "ac_cv_lib_$ac_lib_var=yes"
4248 else
4249 echo "configure: failed program was:" >&5
4250 cat conftest.$ac_ext >&5
4251 rm -rf conftest*
4252 eval "ac_cv_lib_$ac_lib_var=no"
4253 fi
4254 rm -f conftest*
4255 LIBS="$ac_save_LIBS"
4256
4257 fi
4258 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4259 echo "$ac_t""yes" 1>&6
4260 ac_tr_lib=HAVE_LIB`echo Xp | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4261 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4262 cat >> confdefs.h <<EOF
4263 #define $ac_tr_lib 1
4264 EOF
4265
4266 LIBS="-lXp $LIBS"
4267
4268 else
4269 echo "$ac_t""no" 1>&6
4270 fi
4271
4272 fi
4273 fi
4274
4275 ### Is -lXaw3d available?
4276 HAVE_XAW3D=no
4277 if test "${HAVE_X11}" = "yes"; then
4278 if test "${USE_X_TOOLKIT}" != "none"; then
4279 old_c_flags="${CFLAGS}"
4280 CFLAGS="${LD_SWITCH_X_SITE}"
4281 ac_safe=`echo "X11/Xaw3d/Scrollbar.h" | sed 'y%./+-%__p_%'`
4282 echo $ac_n "checking for X11/Xaw3d/Scrollbar.h""... $ac_c" 1>&6
4283 echo "configure:4284: checking for X11/Xaw3d/Scrollbar.h" >&5
4284 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4285 echo $ac_n "(cached) $ac_c" 1>&6
4286 else
4287 cat > conftest.$ac_ext <<EOF
4288 #line 4289 "configure"
4289 #include "confdefs.h"
4290 #include <X11/Xaw3d/Scrollbar.h>
4291 EOF
4292 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4293 { (eval echo configure:4294: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4294 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4295 if test -z "$ac_err"; then
4296 rm -rf conftest*
4297 eval "ac_cv_header_$ac_safe=yes"
4298 else
4299 echo "$ac_err" >&5
4300 echo "configure: failed program was:" >&5
4301 cat conftest.$ac_ext >&5
4302 rm -rf conftest*
4303 eval "ac_cv_header_$ac_safe=no"
4304 fi
4305 rm -f conftest*
4306 fi
4307 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4308 echo "$ac_t""yes" 1>&6
4309 echo $ac_n "checking for XawScrollbarSetThumb in -lXaw3d""... $ac_c" 1>&6
4310 echo "configure:4311: checking for XawScrollbarSetThumb in -lXaw3d" >&5
4311 ac_lib_var=`echo Xaw3d'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'`
4312 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4313 echo $ac_n "(cached) $ac_c" 1>&6
4314 else
4315 ac_save_LIBS="$LIBS"
4316 LIBS="-lXaw3d -lX11 $LIBS"
4317 cat > conftest.$ac_ext <<EOF
4318 #line 4319 "configure"
4319 #include "confdefs.h"
4320 /* Override any gcc2 internal prototype to avoid an error. */
4321 /* We use char because int might match the return type of a gcc2
4322 builtin and then its argument prototype would still apply. */
4323 char XawScrollbarSetThumb();
4324
4325 int main() {
4326 XawScrollbarSetThumb()
4327 ; return 0; }
4328 EOF
4329 if { (eval echo configure:4330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4330 rm -rf conftest*
4331 eval "ac_cv_lib_$ac_lib_var=yes"
4332 else
4333 echo "configure: failed program was:" >&5
4334 cat conftest.$ac_ext >&5
4335 rm -rf conftest*
4336 eval "ac_cv_lib_$ac_lib_var=no"
4337 fi
4338 rm -f conftest*
4339 LIBS="$ac_save_LIBS"
4340
4341 fi
4342 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4343 echo "$ac_t""yes" 1>&6
4344 HAVE_XAW3D=yes
4345 else
4346 echo "$ac_t""no" 1>&6
4347 fi
4348
4349 else
4350 echo "$ac_t""no" 1>&6
4351 fi
4352
4353 CFLAGS="${old_c_flags}"
4354
4355 if test "${HAVE_XAW3D}" = "yes"; then
4356 cat >> confdefs.h <<\EOF
4357 #define HAVE_XAW3D 1
4358 EOF
4359
4360 fi
4361 fi
4362 fi
4363
4364
4365 USE_TOOLKIT_SCROLL_BARS=no
4366 if test "${with_toolkit_scroll_bars}" != "no"; then
4367 if test "${USE_X_TOOLKIT}" != "none"; then
4368 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
4369 cat >> confdefs.h <<\EOF
4370 #define USE_TOOLKIT_SCROLL_BARS 1
4371 EOF
4372
4373 HAVE_XAW3D=no
4374 USE_TOOLKIT_SCROLL_BARS=yes
4375 elif test "${HAVE_XAW3D}" = "yes"; then
4376 cat >> confdefs.h <<\EOF
4377 #define USE_TOOLKIT_SCROLL_BARS 1
4378 EOF
4379
4380 USE_TOOLKIT_SCROLL_BARS=yes
4381 fi
4382 fi
4383 fi
4384
4385 ### Use -lXpm if available, unless `--with-xpm=no'.
4386 HAVE_XPM=no
4387 if test "${HAVE_X11}" = "yes"; then
4388 if test "${with_xpm}" != "no"; then
4389 old_c_flags="${CFLAGS}"
4390 CFLAGS="${LD_SWITCH_X_SITE}"
4391 ac_safe=`echo "X11/xpm.h" | sed 'y%./+-%__p_%'`
4392 echo $ac_n "checking for X11/xpm.h""... $ac_c" 1>&6
4393 echo "configure:4394: checking for X11/xpm.h" >&5
4394 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4395 echo $ac_n "(cached) $ac_c" 1>&6
4396 else
4397 cat > conftest.$ac_ext <<EOF
4398 #line 4399 "configure"
4399 #include "confdefs.h"
4400 #include <X11/xpm.h>
4401 EOF
4402 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4403 { (eval echo configure:4404: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4404 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4405 if test -z "$ac_err"; then
4406 rm -rf conftest*
4407 eval "ac_cv_header_$ac_safe=yes"
4408 else
4409 echo "$ac_err" >&5
4410 echo "configure: failed program was:" >&5
4411 cat conftest.$ac_ext >&5
4412 rm -rf conftest*
4413 eval "ac_cv_header_$ac_safe=no"
4414 fi
4415 rm -f conftest*
4416 fi
4417 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4418 echo "$ac_t""yes" 1>&6
4419 echo $ac_n "checking for XpmReadFileToPixmap in -lXpm""... $ac_c" 1>&6
4420 echo "configure:4421: checking for XpmReadFileToPixmap in -lXpm" >&5
4421 ac_lib_var=`echo Xpm'_'XpmReadFileToPixmap | sed 'y%./+-%__p_%'`
4422 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4423 echo $ac_n "(cached) $ac_c" 1>&6
4424 else
4425 ac_save_LIBS="$LIBS"
4426 LIBS="-lXpm -lX11 $LIBS"
4427 cat > conftest.$ac_ext <<EOF
4428 #line 4429 "configure"
4429 #include "confdefs.h"
4430 /* Override any gcc2 internal prototype to avoid an error. */
4431 /* We use char because int might match the return type of a gcc2
4432 builtin and then its argument prototype would still apply. */
4433 char XpmReadFileToPixmap();
4434
4435 int main() {
4436 XpmReadFileToPixmap()
4437 ; return 0; }
4438 EOF
4439 if { (eval echo configure:4440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4440 rm -rf conftest*
4441 eval "ac_cv_lib_$ac_lib_var=yes"
4442 else
4443 echo "configure: failed program was:" >&5
4444 cat conftest.$ac_ext >&5
4445 rm -rf conftest*
4446 eval "ac_cv_lib_$ac_lib_var=no"
4447 fi
4448 rm -f conftest*
4449 LIBS="$ac_save_LIBS"
4450
4451 fi
4452 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4453 echo "$ac_t""yes" 1>&6
4454 HAVE_XPM=yes
4455 else
4456 echo "$ac_t""no" 1>&6
4457 fi
4458
4459 else
4460 echo "$ac_t""no" 1>&6
4461 fi
4462
4463 CFLAGS="${old_c_flags}"
4464 fi
4465
4466 if test "${HAVE_XPM}" = "yes"; then
4467 cat >> confdefs.h <<\EOF
4468 #define HAVE_XPM 1
4469 EOF
4470
4471 fi
4472 fi
4473
4474 ### Use -ljpeg if available, unless `--with-jpeg=no'.
4475 HAVE_JPEG=no
4476 if test "${HAVE_X11}" = "yes"; then
4477 if test "${with_jpeg}" != "no"; then
4478 old_c_flags="${CFLAGS}"
4479 CFLAGS="${LD_SWITCH_X_SITE} ${CFLAGS}"
4480 ac_safe=`echo "jerror.h" | sed 'y%./+-%__p_%'`
4481 echo $ac_n "checking for jerror.h""... $ac_c" 1>&6
4482 echo "configure:4483: checking for jerror.h" >&5
4483 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4484 echo $ac_n "(cached) $ac_c" 1>&6
4485 else
4486 cat > conftest.$ac_ext <<EOF
4487 #line 4488 "configure"
4488 #include "confdefs.h"
4489 #include <jerror.h>
4490 EOF
4491 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4492 { (eval echo configure:4493: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4493 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4494 if test -z "$ac_err"; then
4495 rm -rf conftest*
4496 eval "ac_cv_header_$ac_safe=yes"
4497 else
4498 echo "$ac_err" >&5
4499 echo "configure: failed program was:" >&5
4500 cat conftest.$ac_ext >&5
4501 rm -rf conftest*
4502 eval "ac_cv_header_$ac_safe=no"
4503 fi
4504 rm -f conftest*
4505 fi
4506 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4507 echo "$ac_t""yes" 1>&6
4508 echo $ac_n "checking for jpeg_destroy_compress in -ljpeg""... $ac_c" 1>&6
4509 echo "configure:4510: checking for jpeg_destroy_compress in -ljpeg" >&5
4510 ac_lib_var=`echo jpeg'_'jpeg_destroy_compress | sed 'y%./+-%__p_%'`
4511 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4512 echo $ac_n "(cached) $ac_c" 1>&6
4513 else
4514 ac_save_LIBS="$LIBS"
4515 LIBS="-ljpeg -lX11 $LIBS"
4516 cat > conftest.$ac_ext <<EOF
4517 #line 4518 "configure"
4518 #include "confdefs.h"
4519 /* Override any gcc2 internal prototype to avoid an error. */
4520 /* We use char because int might match the return type of a gcc2
4521 builtin and then its argument prototype would still apply. */
4522 char jpeg_destroy_compress();
4523
4524 int main() {
4525 jpeg_destroy_compress()
4526 ; return 0; }
4527 EOF
4528 if { (eval echo configure:4529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4529 rm -rf conftest*
4530 eval "ac_cv_lib_$ac_lib_var=yes"
4531 else
4532 echo "configure: failed program was:" >&5
4533 cat conftest.$ac_ext >&5
4534 rm -rf conftest*
4535 eval "ac_cv_lib_$ac_lib_var=no"
4536 fi
4537 rm -f conftest*
4538 LIBS="$ac_save_LIBS"
4539
4540 fi
4541 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4542 echo "$ac_t""yes" 1>&6
4543 HAVE_JPEG=yes
4544 else
4545 echo "$ac_t""no" 1>&6
4546 fi
4547
4548 else
4549 echo "$ac_t""no" 1>&6
4550 fi
4551
4552 CFLAGS="${old_c_flags}"
4553 fi
4554
4555 if test "${HAVE_JPEG}" = "yes"; then
4556 cat >> confdefs.h <<\EOF
4557 #define HAVE_JPEG 1
4558 EOF
4559
4560 fi
4561 fi
4562
4563 ### Use -lpng if available, unless `--with-png=no'.
4564 HAVE_PNG=no
4565 if test "${HAVE_X11}" = "yes"; then
4566 if test "${with_png}" != "no"; then
4567 old_c_flags="${CFLAGS}"
4568 CFLAGS="${LD_SWITCH_X_SITE} ${CFLAGS}"
4569 ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'`
4570 echo $ac_n "checking for png.h""... $ac_c" 1>&6
4571 echo "configure:4572: checking for png.h" >&5
4572 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4573 echo $ac_n "(cached) $ac_c" 1>&6
4574 else
4575 cat > conftest.$ac_ext <<EOF
4576 #line 4577 "configure"
4577 #include "confdefs.h"
4578 #include <png.h>
4579 EOF
4580 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4581 { (eval echo configure:4582: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4582 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4583 if test -z "$ac_err"; then
4584 rm -rf conftest*
4585 eval "ac_cv_header_$ac_safe=yes"
4586 else
4587 echo "$ac_err" >&5
4588 echo "configure: failed program was:" >&5
4589 cat conftest.$ac_ext >&5
4590 rm -rf conftest*
4591 eval "ac_cv_header_$ac_safe=no"
4592 fi
4593 rm -f conftest*
4594 fi
4595 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4596 echo "$ac_t""yes" 1>&6
4597 echo $ac_n "checking for png_set_expand in -lpng""... $ac_c" 1>&6
4598 echo "configure:4599: checking for png_set_expand in -lpng" >&5
4599 ac_lib_var=`echo png'_'png_set_expand | sed 'y%./+-%__p_%'`
4600 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4601 echo $ac_n "(cached) $ac_c" 1>&6
4602 else
4603 ac_save_LIBS="$LIBS"
4604 LIBS="-lpng -lX11 -lz -lm $LIBS"
4605 cat > conftest.$ac_ext <<EOF
4606 #line 4607 "configure"
4607 #include "confdefs.h"
4608 /* Override any gcc2 internal prototype to avoid an error. */
4609 /* We use char because int might match the return type of a gcc2
4610 builtin and then its argument prototype would still apply. */
4611 char png_set_expand();
4612
4613 int main() {
4614 png_set_expand()
4615 ; return 0; }
4616 EOF
4617 if { (eval echo configure:4618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4618 rm -rf conftest*
4619 eval "ac_cv_lib_$ac_lib_var=yes"
4620 else
4621 echo "configure: failed program was:" >&5
4622 cat conftest.$ac_ext >&5
4623 rm -rf conftest*
4624 eval "ac_cv_lib_$ac_lib_var=no"
4625 fi
4626 rm -f conftest*
4627 LIBS="$ac_save_LIBS"
4628
4629 fi
4630 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4631 echo "$ac_t""yes" 1>&6
4632 HAVE_PNG=yes
4633 else
4634 echo "$ac_t""no" 1>&6
4635 fi
4636
4637 else
4638 echo "$ac_t""no" 1>&6
4639 fi
4640
4641 CFLAGS="${old_c_flags}"
4642 fi
4643
4644 if test "${HAVE_PNG}" = "yes"; then
4645 cat >> confdefs.h <<\EOF
4646 #define HAVE_PNG 1
4647 EOF
4648
4649 fi
4650 fi
4651
4652 ### Use -ltiff if available, unless `--with-tiff=no'.
4653 HAVE_TIFF=no
4654 if test "${HAVE_X11}" = "yes"; then
4655 if test "${with_tiff}" != "no"; then
4656 old_c_flags="${CFLAGS}"
4657 CFLAGS="${LD_SWITCH_X_SITE} ${CFLAGS}"
4658 ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'`
4659 echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6
4660 echo "configure:4661: checking for tiffio.h" >&5
4661 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4662 echo $ac_n "(cached) $ac_c" 1>&6
4663 else
4664 cat > conftest.$ac_ext <<EOF
4665 #line 4666 "configure"
4666 #include "confdefs.h"
4667 #include <tiffio.h>
4668 EOF
4669 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4670 { (eval echo configure:4671: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4671 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4672 if test -z "$ac_err"; then
4673 rm -rf conftest*
4674 eval "ac_cv_header_$ac_safe=yes"
4675 else
4676 echo "$ac_err" >&5
4677 echo "configure: failed program was:" >&5
4678 cat conftest.$ac_ext >&5
4679 rm -rf conftest*
4680 eval "ac_cv_header_$ac_safe=no"
4681 fi
4682 rm -f conftest*
4683 fi
4684 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4685 echo "$ac_t""yes" 1>&6
4686 tifflibs="-lX11 -lz -lm"
4687 # At least one tiff package requires the jpeg library.
4688 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
4689 echo $ac_n "checking for TIFFGetVersion in -ltiff""... $ac_c" 1>&6
4690 echo "configure:4691: checking for TIFFGetVersion in -ltiff" >&5
4691 ac_lib_var=`echo tiff'_'TIFFGetVersion | sed 'y%./+-%__p_%'`
4692 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4693 echo $ac_n "(cached) $ac_c" 1>&6
4694 else
4695 ac_save_LIBS="$LIBS"
4696 LIBS="-ltiff $tifflibs $LIBS"
4697 cat > conftest.$ac_ext <<EOF
4698 #line 4699 "configure"
4699 #include "confdefs.h"
4700 /* Override any gcc2 internal prototype to avoid an error. */
4701 /* We use char because int might match the return type of a gcc2
4702 builtin and then its argument prototype would still apply. */
4703 char TIFFGetVersion();
4704
4705 int main() {
4706 TIFFGetVersion()
4707 ; return 0; }
4708 EOF
4709 if { (eval echo configure:4710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4710 rm -rf conftest*
4711 eval "ac_cv_lib_$ac_lib_var=yes"
4712 else
4713 echo "configure: failed program was:" >&5
4714 cat conftest.$ac_ext >&5
4715 rm -rf conftest*
4716 eval "ac_cv_lib_$ac_lib_var=no"
4717 fi
4718 rm -f conftest*
4719 LIBS="$ac_save_LIBS"
4720
4721 fi
4722 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4723 echo "$ac_t""yes" 1>&6
4724 HAVE_TIFF=yes
4725 else
4726 echo "$ac_t""no" 1>&6
4727 fi
4728
4729 else
4730 echo "$ac_t""no" 1>&6
4731 fi
4732
4733 CFLAGS="${old_c_flags}"
4734 fi
4735
4736 if test "${HAVE_TIFF}" = "yes"; then
4737 cat >> confdefs.h <<\EOF
4738 #define HAVE_TIFF 1
4739 EOF
4740
4741 fi
4742 fi
4743
4744 ### Use -lgif if available, unless `--with-gif=no'.
4745 HAVE_GIF=no
4746 if test "${HAVE_X11}" = "yes"; then
4747 if test "${with_gif}" != "no"; then
4748 old_c_flags="${CFLAGS}"
4749 CFLAGS="${LD_SWITCH_X_SITE} ${CFLAGS}"
4750 ac_safe=`echo "gif_lib.h" | sed 'y%./+-%__p_%'`
4751 echo $ac_n "checking for gif_lib.h""... $ac_c" 1>&6
4752 echo "configure:4753: checking for gif_lib.h" >&5
4753 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4754 echo $ac_n "(cached) $ac_c" 1>&6
4755 else
4756 cat > conftest.$ac_ext <<EOF
4757 #line 4758 "configure"
4758 #include "confdefs.h"
4759 #include <gif_lib.h>
4760 EOF
4761 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4762 { (eval echo configure:4763: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4763 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4764 if test -z "$ac_err"; then
4765 rm -rf conftest*
4766 eval "ac_cv_header_$ac_safe=yes"
4767 else
4768 echo "$ac_err" >&5
4769 echo "configure: failed program was:" >&5
4770 cat conftest.$ac_ext >&5
4771 rm -rf conftest*
4772 eval "ac_cv_header_$ac_safe=no"
4773 fi
4774 rm -f conftest*
4775 fi
4776 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4777 echo "$ac_t""yes" 1>&6
4778 echo $ac_n "checking for DGifOpen in -lungif""... $ac_c" 1>&6
4779 echo "configure:4780: checking for DGifOpen in -lungif" >&5
4780 ac_lib_var=`echo ungif'_'DGifOpen | sed 'y%./+-%__p_%'`
4781 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4782 echo $ac_n "(cached) $ac_c" 1>&6
4783 else
4784 ac_save_LIBS="$LIBS"
4785 LIBS="-lungif -lX11 $LIBS"
4786 cat > conftest.$ac_ext <<EOF
4787 #line 4788 "configure"
4788 #include "confdefs.h"
4789 /* Override any gcc2 internal prototype to avoid an error. */
4790 /* We use char because int might match the return type of a gcc2
4791 builtin and then its argument prototype would still apply. */
4792 char DGifOpen();
4793
4794 int main() {
4795 DGifOpen()
4796 ; return 0; }
4797 EOF
4798 if { (eval echo configure:4799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4799 rm -rf conftest*
4800 eval "ac_cv_lib_$ac_lib_var=yes"
4801 else
4802 echo "configure: failed program was:" >&5
4803 cat conftest.$ac_ext >&5
4804 rm -rf conftest*
4805 eval "ac_cv_lib_$ac_lib_var=no"
4806 fi
4807 rm -f conftest*
4808 LIBS="$ac_save_LIBS"
4809
4810 fi
4811 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4812 echo "$ac_t""yes" 1>&6
4813 HAVE_GIF=yes
4814 else
4815 echo "$ac_t""no" 1>&6
4816 fi
4817
4818 else
4819 echo "$ac_t""no" 1>&6
4820 fi
4821
4822 CFLAGS="${old_c_flags}"
4823 fi
4824
4825 if test "${HAVE_GIF}" = "yes"; then
4826 cat >> confdefs.h <<\EOF
4827 #define HAVE_GIF 1
4828 EOF
4829
4830 fi
4831 fi
4832
4833 # If netdb.h doesn't declare h_errno, we must declare it by hand.
4834 echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
4835 echo "configure:4836: checking whether netdb declares h_errno" >&5
4836 if eval "test \"`echo '$''{'emacs_cv_netdb_declares_h_errno'+set}'`\" = set"; then
4837 echo $ac_n "(cached) $ac_c" 1>&6
4838 else
4839 cat > conftest.$ac_ext <<EOF
4840 #line 4841 "configure"
4841 #include "confdefs.h"
4842 #include <netdb.h>
4843 int main() {
4844 return h_errno;
4845 ; return 0; }
4846 EOF
4847 if { (eval echo configure:4848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4848 rm -rf conftest*
4849 emacs_cv_netdb_declares_h_errno=yes
4850 else
4851 echo "configure: failed program was:" >&5
4852 cat conftest.$ac_ext >&5
4853 rm -rf conftest*
4854 emacs_cv_netdb_declares_h_errno=no
4855 fi
4856 rm -f conftest*
4857 fi
4858
4859 echo "$ac_t""$emacs_cv_netdb_declares_h_errno" 1>&6
4860 if test $emacs_cv_netdb_declares_h_errno = yes; then
4861 cat >> confdefs.h <<\EOF
4862 #define HAVE_H_ERRNO 1
4863 EOF
4864
4865 fi
4866
4867 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
4868 # for constant arguments. Useless!
4869 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
4870 echo "configure:4871: checking for working alloca.h" >&5
4871 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
4872 echo $ac_n "(cached) $ac_c" 1>&6
4873 else
4874 cat > conftest.$ac_ext <<EOF
4875 #line 4876 "configure"
4876 #include "confdefs.h"
4877 #include <alloca.h>
4878 int main() {
4879 char *p = alloca(2 * sizeof(int));
4880 ; return 0; }
4881 EOF
4882 if { (eval echo configure:4883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4883 rm -rf conftest*
4884 ac_cv_header_alloca_h=yes
4885 else
4886 echo "configure: failed program was:" >&5
4887 cat conftest.$ac_ext >&5
4888 rm -rf conftest*
4889 ac_cv_header_alloca_h=no
4890 fi
4891 rm -f conftest*
4892 fi
4893
4894 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
4895 if test $ac_cv_header_alloca_h = yes; then
4896 cat >> confdefs.h <<\EOF
4897 #define HAVE_ALLOCA_H 1
4898 EOF
4899
4900 fi
4901
4902 echo $ac_n "checking for alloca""... $ac_c" 1>&6
4903 echo "configure:4904: checking for alloca" >&5
4904 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
4905 echo $ac_n "(cached) $ac_c" 1>&6
4906 else
4907 cat > conftest.$ac_ext <<EOF
4908 #line 4909 "configure"
4909 #include "confdefs.h"
4910
4911 #ifdef __GNUC__
4912 # define alloca __builtin_alloca
4913 #else
4914 # ifdef _MSC_VER
4915 # include <malloc.h>
4916 # define alloca _alloca
4917 # else
4918 # if HAVE_ALLOCA_H
4919 # include <alloca.h>
4920 # else
4921 # ifdef _AIX
4922 #pragma alloca
4923 # else
4924 # ifndef alloca /* predefined by HP cc +Olibcalls */
4925 char *alloca ();
4926 # endif
4927 # endif
4928 # endif
4929 # endif
4930 #endif
4931
4932 int main() {
4933 char *p = (char *) alloca(1);
4934 ; return 0; }
4935 EOF
4936 if { (eval echo configure:4937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4937 rm -rf conftest*
4938 ac_cv_func_alloca_works=yes
4939 else
4940 echo "configure: failed program was:" >&5
4941 cat conftest.$ac_ext >&5
4942 rm -rf conftest*
4943 ac_cv_func_alloca_works=no
4944 fi
4945 rm -f conftest*
4946 fi
4947
4948 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
4949 if test $ac_cv_func_alloca_works = yes; then
4950 cat >> confdefs.h <<\EOF
4951 #define HAVE_ALLOCA 1
4952 EOF
4953
4954 fi
4955
4956 if test $ac_cv_func_alloca_works = no; then
4957 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
4958 # that cause trouble. Some versions do not even contain alloca or
4959 # contain a buggy version. If you still want to use their alloca,
4960 # use ar to extract alloca.o from them instead of compiling alloca.c.
4961 ALLOCA=alloca.${ac_objext}
4962 cat >> confdefs.h <<\EOF
4963 #define C_ALLOCA 1
4964 EOF
4965
4966
4967 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
4968 echo "configure:4969: checking whether alloca needs Cray hooks" >&5
4969 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
4970 echo $ac_n "(cached) $ac_c" 1>&6
4971 else
4972 cat > conftest.$ac_ext <<EOF
4973 #line 4974 "configure"
4974 #include "confdefs.h"
4975 #if defined(CRAY) && ! defined(CRAY2)
4976 webecray
4977 #else
4978 wenotbecray
4979 #endif
4980
4981 EOF
4982 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4983 egrep "webecray" >/dev/null 2>&1; then
4984 rm -rf conftest*
4985 ac_cv_os_cray=yes
4986 else
4987 rm -rf conftest*
4988 ac_cv_os_cray=no
4989 fi
4990 rm -f conftest*
4991
4992 fi
4993
4994 echo "$ac_t""$ac_cv_os_cray" 1>&6
4995 if test $ac_cv_os_cray = yes; then
4996 for ac_func in _getb67 GETB67 getb67; do
4997 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4998 echo "configure:4999: checking for $ac_func" >&5
4999 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5000 echo $ac_n "(cached) $ac_c" 1>&6
5001 else
5002 cat > conftest.$ac_ext <<EOF
5003 #line 5004 "configure"
5004 #include "confdefs.h"
5005 /* System header to define __stub macros and hopefully few prototypes,
5006 which can conflict with char $ac_func(); below. */
5007 #include <assert.h>
5008 /* Override any gcc2 internal prototype to avoid an error. */
5009 /* We use char because int might match the return type of a gcc2
5010 builtin and then its argument prototype would still apply. */
5011 char $ac_func();
5012
5013 int main() {
5014
5015 /* The GNU C library defines this for functions which it implements
5016 to always fail with ENOSYS. Some functions are actually named
5017 something starting with __ and the normal name is an alias. */
5018 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5019 choke me
5020 #else
5021 $ac_func();
5022 #endif
5023
5024 ; return 0; }
5025 EOF
5026 if { (eval echo configure:5027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5027 rm -rf conftest*
5028 eval "ac_cv_func_$ac_func=yes"
5029 else
5030 echo "configure: failed program was:" >&5
5031 cat conftest.$ac_ext >&5
5032 rm -rf conftest*
5033 eval "ac_cv_func_$ac_func=no"
5034 fi
5035 rm -f conftest*
5036 fi
5037
5038 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5039 echo "$ac_t""yes" 1>&6
5040 cat >> confdefs.h <<EOF
5041 #define CRAY_STACKSEG_END $ac_func
5042 EOF
5043
5044 break
5045 else
5046 echo "$ac_t""no" 1>&6
5047 fi
5048
5049 done
5050 fi
5051
5052 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
5053 echo "configure:5054: checking stack direction for C alloca" >&5
5054 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
5055 echo $ac_n "(cached) $ac_c" 1>&6
5056 else
5057 if test "$cross_compiling" = yes; then
5058 ac_cv_c_stack_direction=0
5059 else
5060 cat > conftest.$ac_ext <<EOF
5061 #line 5062 "configure"
5062 #include "confdefs.h"
5063 find_stack_direction ()
5064 {
5065 static char *addr = 0;
5066 auto char dummy;
5067 if (addr == 0)
5068 {
5069 addr = &dummy;
5070 return find_stack_direction ();
5071 }
5072 else
5073 return (&dummy > addr) ? 1 : -1;
5074 }
5075 main ()
5076 {
5077 exit (find_stack_direction() < 0);
5078 }
5079 EOF
5080 if { (eval echo configure:5081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5081 then
5082 ac_cv_c_stack_direction=1
5083 else
5084 echo "configure: failed program was:" >&5
5085 cat conftest.$ac_ext >&5
5086 rm -fr conftest*
5087 ac_cv_c_stack_direction=-1
5088 fi
5089 rm -fr conftest*
5090 fi
5091
5092 fi
5093
5094 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
5095 cat >> confdefs.h <<EOF
5096 #define STACK_DIRECTION $ac_cv_c_stack_direction
5097 EOF
5098
5099 fi
5100
5101
5102 # fmod, logb, and frexp are found in -lm on most systems.
5103 # On HPUX 9.01, -lm does not contain logb, so check for sqrt.
5104 echo $ac_n "checking for sqrt in -lm""... $ac_c" 1>&6
5105 echo "configure:5106: checking for sqrt in -lm" >&5
5106 ac_lib_var=`echo m'_'sqrt | sed 'y%./+-%__p_%'`
5107 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5108 echo $ac_n "(cached) $ac_c" 1>&6
5109 else
5110 ac_save_LIBS="$LIBS"
5111 LIBS="-lm $LIBS"
5112 cat > conftest.$ac_ext <<EOF
5113 #line 5114 "configure"
5114 #include "confdefs.h"
5115 /* Override any gcc2 internal prototype to avoid an error. */
5116 /* We use char because int might match the return type of a gcc2
5117 builtin and then its argument prototype would still apply. */
5118 char sqrt();
5119
5120 int main() {
5121 sqrt()
5122 ; return 0; }
5123 EOF
5124 if { (eval echo configure:5125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5125 rm -rf conftest*
5126 eval "ac_cv_lib_$ac_lib_var=yes"
5127 else
5128 echo "configure: failed program was:" >&5
5129 cat conftest.$ac_ext >&5
5130 rm -rf conftest*
5131 eval "ac_cv_lib_$ac_lib_var=no"
5132 fi
5133 rm -f conftest*
5134 LIBS="$ac_save_LIBS"
5135
5136 fi
5137 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5138 echo "$ac_t""yes" 1>&6
5139 ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5140 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5141 cat >> confdefs.h <<EOF
5142 #define $ac_tr_lib 1
5143 EOF
5144
5145 LIBS="-lm $LIBS"
5146
5147 else
5148 echo "$ac_t""no" 1>&6
5149 fi
5150
5151
5152 # Check for mail-locking functions in a "mail" library
5153 echo $ac_n "checking for maillock in -lmail""... $ac_c" 1>&6
5154 echo "configure:5155: checking for maillock in -lmail" >&5
5155 ac_lib_var=`echo mail'_'maillock | sed 'y%./+-%__p_%'`
5156 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5157 echo $ac_n "(cached) $ac_c" 1>&6
5158 else
5159 ac_save_LIBS="$LIBS"
5160 LIBS="-lmail $LIBS"
5161 cat > conftest.$ac_ext <<EOF
5162 #line 5163 "configure"
5163 #include "confdefs.h"
5164 /* Override any gcc2 internal prototype to avoid an error. */
5165 /* We use char because int might match the return type of a gcc2
5166 builtin and then its argument prototype would still apply. */
5167 char maillock();
5168
5169 int main() {
5170 maillock()
5171 ; return 0; }
5172 EOF
5173 if { (eval echo configure:5174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5174 rm -rf conftest*
5175 eval "ac_cv_lib_$ac_lib_var=yes"
5176 else
5177 echo "configure: failed program was:" >&5
5178 cat conftest.$ac_ext >&5
5179 rm -rf conftest*
5180 eval "ac_cv_lib_$ac_lib_var=no"
5181 fi
5182 rm -f conftest*
5183 LIBS="$ac_save_LIBS"
5184
5185 fi
5186 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5187 echo "$ac_t""yes" 1>&6
5188 ac_tr_lib=HAVE_LIB`echo mail | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5189 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5190 cat >> confdefs.h <<EOF
5191 #define $ac_tr_lib 1
5192 EOF
5193
5194 LIBS="-lmail $LIBS"
5195
5196 else
5197 echo "$ac_t""no" 1>&6
5198 fi
5199
5200 echo $ac_n "checking for maillock in -llockfile""... $ac_c" 1>&6
5201 echo "configure:5202: checking for maillock in -llockfile" >&5
5202 ac_lib_var=`echo lockfile'_'maillock | sed 'y%./+-%__p_%'`
5203 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5204 echo $ac_n "(cached) $ac_c" 1>&6
5205 else
5206 ac_save_LIBS="$LIBS"
5207 LIBS="-llockfile $LIBS"
5208 cat > conftest.$ac_ext <<EOF
5209 #line 5210 "configure"
5210 #include "confdefs.h"
5211 /* Override any gcc2 internal prototype to avoid an error. */
5212 /* We use char because int might match the return type of a gcc2
5213 builtin and then its argument prototype would still apply. */
5214 char maillock();
5215
5216 int main() {
5217 maillock()
5218 ; return 0; }
5219 EOF
5220 if { (eval echo configure:5221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5221 rm -rf conftest*
5222 eval "ac_cv_lib_$ac_lib_var=yes"
5223 else
5224 echo "configure: failed program was:" >&5
5225 cat conftest.$ac_ext >&5
5226 rm -rf conftest*
5227 eval "ac_cv_lib_$ac_lib_var=no"
5228 fi
5229 rm -f conftest*
5230 LIBS="$ac_save_LIBS"
5231
5232 fi
5233 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5234 echo "$ac_t""yes" 1>&6
5235 ac_tr_lib=HAVE_LIB`echo lockfile | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5236 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5237 cat >> confdefs.h <<EOF
5238 #define $ac_tr_lib 1
5239 EOF
5240
5241 LIBS="-llockfile $LIBS"
5242
5243 else
5244 echo "$ac_t""no" 1>&6
5245 fi
5246
5247 # If we have the shared liblockfile, assume we must use it for mail
5248 # locking (e.g. Debian). If we couldn't link against liblockfile
5249 # (no liblockfile.a installed), ensure that we don't need to.
5250 if test "$ac_cv_lib_lockfile_maillock" = no; then
5251 # Extract the first word of "liblockfile.so", so it can be a program name with args.
5252 set dummy liblockfile.so; ac_word=$2
5253 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5254 echo "configure:5255: checking for $ac_word" >&5
5255 if eval "test \"`echo '$''{'ac_cv_prog_liblockfile'+set}'`\" = set"; then
5256 echo $ac_n "(cached) $ac_c" 1>&6
5257 else
5258 if test -n "$liblockfile"; then
5259 ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
5260 else
5261 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5262 ac_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
5263 for ac_dir in $ac_dummy; do
5264 test -z "$ac_dir" && ac_dir=.
5265 if test -f $ac_dir/$ac_word; then
5266 ac_cv_prog_liblockfile="yes"
5267 break
5268 fi
5269 done
5270 IFS="$ac_save_ifs"
5271 test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
5272 fi
5273 fi
5274 liblockfile="$ac_cv_prog_liblockfile"
5275 if test -n "$liblockfile"; then
5276 echo "$ac_t""$liblockfile" 1>&6
5277 else
5278 echo "$ac_t""no" 1>&6
5279 fi
5280
5281 if test $ac_cv_prog_liblockfile = yes; then
5282 { echo "configure: error: Shared liblockfile found but can't link against it.
5283 This probably means that movemail could lose mail.
5284 There may be a \`development' package to install containing liblockfile." 1>&2; exit 1; }
5285 else cat >> confdefs.h <<\EOF
5286 #define LIBMAIL -llockfile
5287 EOF
5288
5289 fi
5290 else :
5291 fi
5292 for ac_func in touchlock
5293 do
5294 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5295 echo "configure:5296: checking for $ac_func" >&5
5296 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5297 echo $ac_n "(cached) $ac_c" 1>&6
5298 else
5299 cat > conftest.$ac_ext <<EOF
5300 #line 5301 "configure"
5301 #include "confdefs.h"
5302 /* System header to define __stub macros and hopefully few prototypes,
5303 which can conflict with char $ac_func(); below. */
5304 #include <assert.h>
5305 /* Override any gcc2 internal prototype to avoid an error. */
5306 /* We use char because int might match the return type of a gcc2
5307 builtin and then its argument prototype would still apply. */
5308 char $ac_func();
5309
5310 int main() {
5311
5312 /* The GNU C library defines this for functions which it implements
5313 to always fail with ENOSYS. Some functions are actually named
5314 something starting with __ and the normal name is an alias. */
5315 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5316 choke me
5317 #else
5318 $ac_func();
5319 #endif
5320
5321 ; return 0; }
5322 EOF
5323 if { (eval echo configure:5324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5324 rm -rf conftest*
5325 eval "ac_cv_func_$ac_func=yes"
5326 else
5327 echo "configure: failed program was:" >&5
5328 cat conftest.$ac_ext >&5
5329 rm -rf conftest*
5330 eval "ac_cv_func_$ac_func=no"
5331 fi
5332 rm -f conftest*
5333 fi
5334
5335 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5336 echo "$ac_t""yes" 1>&6
5337 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5338 cat >> confdefs.h <<EOF
5339 #define $ac_tr_func 1
5340 EOF
5341
5342 else
5343 echo "$ac_t""no" 1>&6
5344 fi
5345 done
5346
5347 for ac_hdr in maillock.h
5348 do
5349 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5350 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5351 echo "configure:5352: checking for $ac_hdr" >&5
5352 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5353 echo $ac_n "(cached) $ac_c" 1>&6
5354 else
5355 cat > conftest.$ac_ext <<EOF
5356 #line 5357 "configure"
5357 #include "confdefs.h"
5358 #include <$ac_hdr>
5359 EOF
5360 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5361 { (eval echo configure:5362: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5362 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5363 if test -z "$ac_err"; then
5364 rm -rf conftest*
5365 eval "ac_cv_header_$ac_safe=yes"
5366 else
5367 echo "$ac_err" >&5
5368 echo "configure: failed program was:" >&5
5369 cat conftest.$ac_ext >&5
5370 rm -rf conftest*
5371 eval "ac_cv_header_$ac_safe=no"
5372 fi
5373 rm -f conftest*
5374 fi
5375 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5376 echo "$ac_t""yes" 1>&6
5377 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5378 cat >> confdefs.h <<EOF
5379 #define $ac_tr_hdr 1
5380 EOF
5381
5382 else
5383 echo "$ac_t""no" 1>&6
5384 fi
5385 done
5386
5387
5388 for ac_func in gettimeofday gethostname getdomainname dup2 \
5389 rename closedir mkdir rmdir sysinfo \
5390 random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime res_init setsid \
5391 strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \
5392 utimes setrlimit setpgid getcwd shutdown strftime getaddrinfo \
5393 __fpending ftello getloadavg mblen mbrlen strsignal setitimer ualarm
5394 do
5395 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5396 echo "configure:5397: checking for $ac_func" >&5
5397 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5398 echo $ac_n "(cached) $ac_c" 1>&6
5399 else
5400 cat > conftest.$ac_ext <<EOF
5401 #line 5402 "configure"
5402 #include "confdefs.h"
5403 /* System header to define __stub macros and hopefully few prototypes,
5404 which can conflict with char $ac_func(); below. */
5405 #include <assert.h>
5406 /* Override any gcc2 internal prototype to avoid an error. */
5407 /* We use char because int might match the return type of a gcc2
5408 builtin and then its argument prototype would still apply. */
5409 char $ac_func();
5410
5411 int main() {
5412
5413 /* The GNU C library defines this for functions which it implements
5414 to always fail with ENOSYS. Some functions are actually named
5415 something starting with __ and the normal name is an alias. */
5416 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5417 choke me
5418 #else
5419 $ac_func();
5420 #endif
5421
5422 ; return 0; }
5423 EOF
5424 if { (eval echo configure:5425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5425 rm -rf conftest*
5426 eval "ac_cv_func_$ac_func=yes"
5427 else
5428 echo "configure: failed program was:" >&5
5429 cat conftest.$ac_ext >&5
5430 rm -rf conftest*
5431 eval "ac_cv_func_$ac_func=no"
5432 fi
5433 rm -f conftest*
5434 fi
5435
5436 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5437 echo "$ac_t""yes" 1>&6
5438 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5439 cat >> confdefs.h <<EOF
5440 #define $ac_tr_func 1
5441 EOF
5442
5443 else
5444 echo "$ac_t""no" 1>&6
5445 fi
5446 done
5447
5448
5449 for ac_hdr in sys/time.h unistd.h
5450 do
5451 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5452 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5453 echo "configure:5454: checking for $ac_hdr" >&5
5454 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5455 echo $ac_n "(cached) $ac_c" 1>&6
5456 else
5457 cat > conftest.$ac_ext <<EOF
5458 #line 5459 "configure"
5459 #include "confdefs.h"
5460 #include <$ac_hdr>
5461 EOF
5462 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5463 { (eval echo configure:5464: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5464 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5465 if test -z "$ac_err"; then
5466 rm -rf conftest*
5467 eval "ac_cv_header_$ac_safe=yes"
5468 else
5469 echo "$ac_err" >&5
5470 echo "configure: failed program was:" >&5
5471 cat conftest.$ac_ext >&5
5472 rm -rf conftest*
5473 eval "ac_cv_header_$ac_safe=no"
5474 fi
5475 rm -f conftest*
5476 fi
5477 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5478 echo "$ac_t""yes" 1>&6
5479 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5480 cat >> confdefs.h <<EOF
5481 #define $ac_tr_hdr 1
5482 EOF
5483
5484 else
5485 echo "$ac_t""no" 1>&6
5486 fi
5487 done
5488
5489 for ac_func in alarm
5490 do
5491 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5492 echo "configure:5493: checking for $ac_func" >&5
5493 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5494 echo $ac_n "(cached) $ac_c" 1>&6
5495 else
5496 cat > conftest.$ac_ext <<EOF
5497 #line 5498 "configure"
5498 #include "confdefs.h"
5499 /* System header to define __stub macros and hopefully few prototypes,
5500 which can conflict with char $ac_func(); below. */
5501 #include <assert.h>
5502 /* Override any gcc2 internal prototype to avoid an error. */
5503 /* We use char because int might match the return type of a gcc2
5504 builtin and then its argument prototype would still apply. */
5505 char $ac_func();
5506
5507 int main() {
5508
5509 /* The GNU C library defines this for functions which it implements
5510 to always fail with ENOSYS. Some functions are actually named
5511 something starting with __ and the normal name is an alias. */
5512 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5513 choke me
5514 #else
5515 $ac_func();
5516 #endif
5517
5518 ; return 0; }
5519 EOF
5520 if { (eval echo configure:5521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5521 rm -rf conftest*
5522 eval "ac_cv_func_$ac_func=yes"
5523 else
5524 echo "configure: failed program was:" >&5
5525 cat conftest.$ac_ext >&5
5526 rm -rf conftest*
5527 eval "ac_cv_func_$ac_func=no"
5528 fi
5529 rm -f conftest*
5530 fi
5531
5532 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5533 echo "$ac_t""yes" 1>&6
5534 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5535 cat >> confdefs.h <<EOF
5536 #define $ac_tr_func 1
5537 EOF
5538
5539 else
5540 echo "$ac_t""no" 1>&6
5541 fi
5542 done
5543
5544 echo $ac_n "checking for working mktime""... $ac_c" 1>&6
5545 echo "configure:5546: checking for working mktime" >&5
5546 if eval "test \"`echo '$''{'ac_cv_func_working_mktime'+set}'`\" = set"; then
5547 echo $ac_n "(cached) $ac_c" 1>&6
5548 else
5549 if test "$cross_compiling" = yes; then
5550 ac_cv_func_working_mktime=no
5551 else
5552 cat > conftest.$ac_ext <<EOF
5553 #line 5554 "configure"
5554 #include "confdefs.h"
5555 /* Test program from Paul Eggert (eggert@twinsun.com)
5556 and Tony Leneis (tony@plaza.ds.adp.com). */
5557 #if TIME_WITH_SYS_TIME
5558 # include <sys/time.h>
5559 # include <time.h>
5560 #else
5561 # if HAVE_SYS_TIME_H
5562 # include <sys/time.h>
5563 # else
5564 # include <time.h>
5565 # endif
5566 #endif
5567
5568 #if HAVE_UNISTD_H
5569 # include <unistd.h>
5570 #endif
5571
5572 #if !HAVE_ALARM
5573 # define alarm(X) /* empty */
5574 #endif
5575
5576 /* Work around redefinition to rpl_putenv by other config tests. */
5577 #undef putenv
5578
5579 static time_t time_t_max;
5580
5581 /* Values we'll use to set the TZ environment variable. */
5582 static const char *const tz_strings[] = {
5583 (const char *) 0, "TZ=GMT0", "TZ=JST-9",
5584 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
5585 };
5586 #define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
5587
5588 /* Fail if mktime fails to convert a date in the spring-forward gap.
5589 Based on a problem report from Andreas Jaeger. */
5590 static void
5591 spring_forward_gap ()
5592 {
5593 /* glibc (up to about 1998-10-07) failed this test) */
5594 struct tm tm;
5595
5596 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
5597 instead of "TZ=America/Vancouver" in order to detect the bug even
5598 on systems that don't support the Olson extension, or don't have the
5599 full zoneinfo tables installed. */
5600 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
5601
5602 tm.tm_year = 98;
5603 tm.tm_mon = 3;
5604 tm.tm_mday = 5;
5605 tm.tm_hour = 2;
5606 tm.tm_min = 0;
5607 tm.tm_sec = 0;
5608 tm.tm_isdst = -1;
5609 if (mktime (&tm) == (time_t)-1)
5610 exit (1);
5611 }
5612
5613 static void
5614 mktime_test (now)
5615 time_t now;
5616 {
5617 struct tm *lt;
5618 if ((lt = localtime (&now)) && mktime (lt) != now)
5619 exit (1);
5620 now = time_t_max - now;
5621 if ((lt = localtime (&now)) && mktime (lt) != now)
5622 exit (1);
5623 }
5624
5625 static void
5626 irix_6_4_bug ()
5627 {
5628 /* Based on code from Ariel Faigon. */
5629 struct tm tm;
5630 tm.tm_year = 96;
5631 tm.tm_mon = 3;
5632 tm.tm_mday = 0;
5633 tm.tm_hour = 0;
5634 tm.tm_min = 0;
5635 tm.tm_sec = 0;
5636 tm.tm_isdst = -1;
5637 mktime (&tm);
5638 if (tm.tm_mon != 2 || tm.tm_mday != 31)
5639 exit (1);
5640 }
5641
5642 static void
5643 bigtime_test (j)
5644 int j;
5645 {
5646 struct tm tm;
5647 time_t now;
5648 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
5649 now = mktime (&tm);
5650 if (now != (time_t) -1)
5651 {
5652 struct tm *lt = localtime (&now);
5653 if (! (lt
5654 && lt->tm_year == tm.tm_year
5655 && lt->tm_mon == tm.tm_mon
5656 && lt->tm_mday == tm.tm_mday
5657 && lt->tm_hour == tm.tm_hour
5658 && lt->tm_min == tm.tm_min
5659 && lt->tm_sec == tm.tm_sec
5660 && lt->tm_yday == tm.tm_yday
5661 && lt->tm_wday == tm.tm_wday
5662 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
5663 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
5664 exit (1);
5665 }
5666 }
5667
5668 int
5669 main ()
5670 {
5671 time_t t, delta;
5672 int i, j;
5673
5674 /* This test makes some buggy mktime implementations loop.
5675 Give up after 60 seconds; a mktime slower than that
5676 isn't worth using anyway. */
5677 alarm (60);
5678
5679 for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2)
5680 continue;
5681 time_t_max--;
5682 delta = time_t_max / 997; /* a suitable prime number */
5683 for (i = 0; i < N_STRINGS; i++)
5684 {
5685 if (tz_strings[i])
5686 putenv (tz_strings[i]);
5687
5688 for (t = 0; t <= time_t_max - delta; t += delta)
5689 mktime_test (t);
5690 mktime_test ((time_t) 60 * 60);
5691 mktime_test ((time_t) 60 * 60 * 24);
5692
5693 for (j = 1; 0 < j; j *= 2)
5694 bigtime_test (j);
5695 bigtime_test (j - 1);
5696 }
5697 irix_6_4_bug ();
5698 spring_forward_gap ();
5699 exit (0);
5700 }
5701 EOF
5702 if { (eval echo configure:5703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5703 then
5704 ac_cv_func_working_mktime=yes
5705 else
5706 echo "configure: failed program was:" >&5
5707 cat conftest.$ac_ext >&5
5708 rm -fr conftest*
5709 ac_cv_func_working_mktime=no
5710 fi
5711 rm -fr conftest*
5712 fi
5713
5714 fi
5715
5716 echo "$ac_t""$ac_cv_func_working_mktime" 1>&6
5717 if test $ac_cv_func_working_mktime = no; then
5718 LIBOBJS="$LIBOBJS mktime.${ac_objext}"
5719 fi
5720
5721 if test "$ac_cv_func_working_mktime" = no; then
5722 cat >> confdefs.h <<\EOF
5723 #define BROKEN_MKTIME 1
5724 EOF
5725
5726 fi
5727
5728 # Check this now, so that we will NOT find the above functions in ncurses.
5729 # That is because we have not set up to link ncurses in lib-src.
5730 # It's better to believe a function is not available
5731 # than to expect to find it in ncurses.
5732 echo $ac_n "checking for tparm in -lncurses""... $ac_c" 1>&6
5733 echo "configure:5734: checking for tparm in -lncurses" >&5
5734 ac_lib_var=`echo ncurses'_'tparm | sed 'y%./+-%__p_%'`
5735 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5736 echo $ac_n "(cached) $ac_c" 1>&6
5737 else
5738 ac_save_LIBS="$LIBS"
5739 LIBS="-lncurses $LIBS"
5740 cat > conftest.$ac_ext <<EOF
5741 #line 5742 "configure"
5742 #include "confdefs.h"
5743 /* Override any gcc2 internal prototype to avoid an error. */
5744 /* We use char because int might match the return type of a gcc2
5745 builtin and then its argument prototype would still apply. */
5746 char tparm();
5747
5748 int main() {
5749 tparm()
5750 ; return 0; }
5751 EOF
5752 if { (eval echo configure:5753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5753 rm -rf conftest*
5754 eval "ac_cv_lib_$ac_lib_var=yes"
5755 else
5756 echo "configure: failed program was:" >&5
5757 cat conftest.$ac_ext >&5
5758 rm -rf conftest*
5759 eval "ac_cv_lib_$ac_lib_var=no"
5760 fi
5761 rm -f conftest*
5762 LIBS="$ac_save_LIBS"
5763
5764 fi
5765 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5766 echo "$ac_t""yes" 1>&6
5767 ac_tr_lib=HAVE_LIB`echo ncurses | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5768 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5769 cat >> confdefs.h <<EOF
5770 #define $ac_tr_lib 1
5771 EOF
5772
5773 LIBS="-lncurses $LIBS"
5774
5775 else
5776 echo "$ac_t""no" 1>&6
5777 fi
5778
5779
5780 # These tell us which Kerberos-related libraries to use.
5781 if test "${with_kerberos+set}" = set; then
5782 echo $ac_n "checking for com_err in -lcom_err""... $ac_c" 1>&6
5783 echo "configure:5784: checking for com_err in -lcom_err" >&5
5784 ac_lib_var=`echo com_err'_'com_err | sed 'y%./+-%__p_%'`
5785 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5786 echo $ac_n "(cached) $ac_c" 1>&6
5787 else
5788 ac_save_LIBS="$LIBS"
5789 LIBS="-lcom_err $LIBS"
5790 cat > conftest.$ac_ext <<EOF
5791 #line 5792 "configure"
5792 #include "confdefs.h"
5793 /* Override any gcc2 internal prototype to avoid an error. */
5794 /* We use char because int might match the return type of a gcc2
5795 builtin and then its argument prototype would still apply. */
5796 char com_err();
5797
5798 int main() {
5799 com_err()
5800 ; return 0; }
5801 EOF
5802 if { (eval echo configure:5803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5803 rm -rf conftest*
5804 eval "ac_cv_lib_$ac_lib_var=yes"
5805 else
5806 echo "configure: failed program was:" >&5
5807 cat conftest.$ac_ext >&5
5808 rm -rf conftest*
5809 eval "ac_cv_lib_$ac_lib_var=no"
5810 fi
5811 rm -f conftest*
5812 LIBS="$ac_save_LIBS"
5813
5814 fi
5815 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5816 echo "$ac_t""yes" 1>&6
5817 ac_tr_lib=HAVE_LIB`echo com_err | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5818 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5819 cat >> confdefs.h <<EOF
5820 #define $ac_tr_lib 1
5821 EOF
5822
5823 LIBS="-lcom_err $LIBS"
5824
5825 else
5826 echo "$ac_t""no" 1>&6
5827 fi
5828
5829 echo $ac_n "checking for mit_des_cbc_encrypt in -lk5crypto""... $ac_c" 1>&6
5830 echo "configure:5831: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
5831 ac_lib_var=`echo k5crypto'_'mit_des_cbc_encrypt | sed 'y%./+-%__p_%'`
5832 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5833 echo $ac_n "(cached) $ac_c" 1>&6
5834 else
5835 ac_save_LIBS="$LIBS"
5836 LIBS="-lk5crypto $LIBS"
5837 cat > conftest.$ac_ext <<EOF
5838 #line 5839 "configure"
5839 #include "confdefs.h"
5840 /* Override any gcc2 internal prototype to avoid an error. */
5841 /* We use char because int might match the return type of a gcc2
5842 builtin and then its argument prototype would still apply. */
5843 char mit_des_cbc_encrypt();
5844
5845 int main() {
5846 mit_des_cbc_encrypt()
5847 ; return 0; }
5848 EOF
5849 if { (eval echo configure:5850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5850 rm -rf conftest*
5851 eval "ac_cv_lib_$ac_lib_var=yes"
5852 else
5853 echo "configure: failed program was:" >&5
5854 cat conftest.$ac_ext >&5
5855 rm -rf conftest*
5856 eval "ac_cv_lib_$ac_lib_var=no"
5857 fi
5858 rm -f conftest*
5859 LIBS="$ac_save_LIBS"
5860
5861 fi
5862 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5863 echo "$ac_t""yes" 1>&6
5864 ac_tr_lib=HAVE_LIB`echo k5crypto | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5865 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5866 cat >> confdefs.h <<EOF
5867 #define $ac_tr_lib 1
5868 EOF
5869
5870 LIBS="-lk5crypto $LIBS"
5871
5872 else
5873 echo "$ac_t""no" 1>&6
5874 fi
5875
5876 echo $ac_n "checking for mit_des_cbc_encrypt in -lcrypto""... $ac_c" 1>&6
5877 echo "configure:5878: checking for mit_des_cbc_encrypt in -lcrypto" >&5
5878 ac_lib_var=`echo crypto'_'mit_des_cbc_encrypt | sed 'y%./+-%__p_%'`
5879 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5880 echo $ac_n "(cached) $ac_c" 1>&6
5881 else
5882 ac_save_LIBS="$LIBS"
5883 LIBS="-lcrypto $LIBS"
5884 cat > conftest.$ac_ext <<EOF
5885 #line 5886 "configure"
5886 #include "confdefs.h"
5887 /* Override any gcc2 internal prototype to avoid an error. */
5888 /* We use char because int might match the return type of a gcc2
5889 builtin and then its argument prototype would still apply. */
5890 char mit_des_cbc_encrypt();
5891
5892 int main() {
5893 mit_des_cbc_encrypt()
5894 ; return 0; }
5895 EOF
5896 if { (eval echo configure:5897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5897 rm -rf conftest*
5898 eval "ac_cv_lib_$ac_lib_var=yes"
5899 else
5900 echo "configure: failed program was:" >&5
5901 cat conftest.$ac_ext >&5
5902 rm -rf conftest*
5903 eval "ac_cv_lib_$ac_lib_var=no"
5904 fi
5905 rm -f conftest*
5906 LIBS="$ac_save_LIBS"
5907
5908 fi
5909 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5910 echo "$ac_t""yes" 1>&6
5911 ac_tr_lib=HAVE_LIB`echo crypto | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5912 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5913 cat >> confdefs.h <<EOF
5914 #define $ac_tr_lib 1
5915 EOF
5916
5917 LIBS="-lcrypto $LIBS"
5918
5919 else
5920 echo "$ac_t""no" 1>&6
5921 fi
5922
5923 echo $ac_n "checking for krb5_init_context in -lkrb5""... $ac_c" 1>&6
5924 echo "configure:5925: checking for krb5_init_context in -lkrb5" >&5
5925 ac_lib_var=`echo krb5'_'krb5_init_context | sed 'y%./+-%__p_%'`
5926 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5927 echo $ac_n "(cached) $ac_c" 1>&6
5928 else
5929 ac_save_LIBS="$LIBS"
5930 LIBS="-lkrb5 $LIBS"
5931 cat > conftest.$ac_ext <<EOF
5932 #line 5933 "configure"
5933 #include "confdefs.h"
5934 /* Override any gcc2 internal prototype to avoid an error. */
5935 /* We use char because int might match the return type of a gcc2
5936 builtin and then its argument prototype would still apply. */
5937 char krb5_init_context();
5938
5939 int main() {
5940 krb5_init_context()
5941 ; return 0; }
5942 EOF
5943 if { (eval echo configure:5944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5944 rm -rf conftest*
5945 eval "ac_cv_lib_$ac_lib_var=yes"
5946 else
5947 echo "configure: failed program was:" >&5
5948 cat conftest.$ac_ext >&5
5949 rm -rf conftest*
5950 eval "ac_cv_lib_$ac_lib_var=no"
5951 fi
5952 rm -f conftest*
5953 LIBS="$ac_save_LIBS"
5954
5955 fi
5956 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5957 echo "$ac_t""yes" 1>&6
5958 ac_tr_lib=HAVE_LIB`echo krb5 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5959 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5960 cat >> confdefs.h <<EOF
5961 #define $ac_tr_lib 1
5962 EOF
5963
5964 LIBS="-lkrb5 $LIBS"
5965
5966 else
5967 echo "$ac_t""no" 1>&6
5968 fi
5969
5970 if test "${with_kerberos5+set}" != set; then
5971 echo $ac_n "checking for des_cbc_encrypt in -ldes425""... $ac_c" 1>&6
5972 echo "configure:5973: checking for des_cbc_encrypt in -ldes425" >&5
5973 ac_lib_var=`echo des425'_'des_cbc_encrypt | sed 'y%./+-%__p_%'`
5974 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5975 echo $ac_n "(cached) $ac_c" 1>&6
5976 else
5977 ac_save_LIBS="$LIBS"
5978 LIBS="-ldes425 $LIBS"
5979 cat > conftest.$ac_ext <<EOF
5980 #line 5981 "configure"
5981 #include "confdefs.h"
5982 /* Override any gcc2 internal prototype to avoid an error. */
5983 /* We use char because int might match the return type of a gcc2
5984 builtin and then its argument prototype would still apply. */
5985 char des_cbc_encrypt();
5986
5987 int main() {
5988 des_cbc_encrypt()
5989 ; return 0; }
5990 EOF
5991 if { (eval echo configure:5992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5992 rm -rf conftest*
5993 eval "ac_cv_lib_$ac_lib_var=yes"
5994 else
5995 echo "configure: failed program was:" >&5
5996 cat conftest.$ac_ext >&5
5997 rm -rf conftest*
5998 eval "ac_cv_lib_$ac_lib_var=no"
5999 fi
6000 rm -f conftest*
6001 LIBS="$ac_save_LIBS"
6002
6003 fi
6004 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6005 echo "$ac_t""yes" 1>&6
6006 ac_tr_lib=HAVE_LIB`echo des425 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6007 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6008 cat >> confdefs.h <<EOF
6009 #define $ac_tr_lib 1
6010 EOF
6011
6012 LIBS="-ldes425 $LIBS"
6013
6014 else
6015 echo "$ac_t""no" 1>&6
6016 echo $ac_n "checking for des_cbc_encrypt in -ldes""... $ac_c" 1>&6
6017 echo "configure:6018: checking for des_cbc_encrypt in -ldes" >&5
6018 ac_lib_var=`echo des'_'des_cbc_encrypt | sed 'y%./+-%__p_%'`
6019 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6020 echo $ac_n "(cached) $ac_c" 1>&6
6021 else
6022 ac_save_LIBS="$LIBS"
6023 LIBS="-ldes $LIBS"
6024 cat > conftest.$ac_ext <<EOF
6025 #line 6026 "configure"
6026 #include "confdefs.h"
6027 /* Override any gcc2 internal prototype to avoid an error. */
6028 /* We use char because int might match the return type of a gcc2
6029 builtin and then its argument prototype would still apply. */
6030 char des_cbc_encrypt();
6031
6032 int main() {
6033 des_cbc_encrypt()
6034 ; return 0; }
6035 EOF
6036 if { (eval echo configure:6037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6037 rm -rf conftest*
6038 eval "ac_cv_lib_$ac_lib_var=yes"
6039 else
6040 echo "configure: failed program was:" >&5
6041 cat conftest.$ac_ext >&5
6042 rm -rf conftest*
6043 eval "ac_cv_lib_$ac_lib_var=no"
6044 fi
6045 rm -f conftest*
6046 LIBS="$ac_save_LIBS"
6047
6048 fi
6049 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6050 echo "$ac_t""yes" 1>&6
6051 ac_tr_lib=HAVE_LIB`echo des | sed -e 's/^a-zA-Z0-9_/_/g' \
6052 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6053 cat >> confdefs.h <<EOF
6054 #define $ac_tr_lib 1
6055 EOF
6056
6057 LIBS="-ldes $LIBS"
6058
6059 else
6060 echo "$ac_t""no" 1>&6
6061 fi
6062
6063 fi
6064
6065 echo $ac_n "checking for krb_get_cred in -lkrb4""... $ac_c" 1>&6
6066 echo "configure:6067: checking for krb_get_cred in -lkrb4" >&5
6067 ac_lib_var=`echo krb4'_'krb_get_cred | sed 'y%./+-%__p_%'`
6068 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6069 echo $ac_n "(cached) $ac_c" 1>&6
6070 else
6071 ac_save_LIBS="$LIBS"
6072 LIBS="-lkrb4 $LIBS"
6073 cat > conftest.$ac_ext <<EOF
6074 #line 6075 "configure"
6075 #include "confdefs.h"
6076 /* Override any gcc2 internal prototype to avoid an error. */
6077 /* We use char because int might match the return type of a gcc2
6078 builtin and then its argument prototype would still apply. */
6079 char krb_get_cred();
6080
6081 int main() {
6082 krb_get_cred()
6083 ; return 0; }
6084 EOF
6085 if { (eval echo configure:6086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6086 rm -rf conftest*
6087 eval "ac_cv_lib_$ac_lib_var=yes"
6088 else
6089 echo "configure: failed program was:" >&5
6090 cat conftest.$ac_ext >&5
6091 rm -rf conftest*
6092 eval "ac_cv_lib_$ac_lib_var=no"
6093 fi
6094 rm -f conftest*
6095 LIBS="$ac_save_LIBS"
6096
6097 fi
6098 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6099 echo "$ac_t""yes" 1>&6
6100 ac_tr_lib=HAVE_LIB`echo krb4 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6101 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6102 cat >> confdefs.h <<EOF
6103 #define $ac_tr_lib 1
6104 EOF
6105
6106 LIBS="-lkrb4 $LIBS"
6107
6108 else
6109 echo "$ac_t""no" 1>&6
6110 echo $ac_n "checking for krb_get_cred in -lkrb""... $ac_c" 1>&6
6111 echo "configure:6112: checking for krb_get_cred in -lkrb" >&5
6112 ac_lib_var=`echo krb'_'krb_get_cred | sed 'y%./+-%__p_%'`
6113 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6114 echo $ac_n "(cached) $ac_c" 1>&6
6115 else
6116 ac_save_LIBS="$LIBS"
6117 LIBS="-lkrb $LIBS"
6118 cat > conftest.$ac_ext <<EOF
6119 #line 6120 "configure"
6120 #include "confdefs.h"
6121 /* Override any gcc2 internal prototype to avoid an error. */
6122 /* We use char because int might match the return type of a gcc2
6123 builtin and then its argument prototype would still apply. */
6124 char krb_get_cred();
6125
6126 int main() {
6127 krb_get_cred()
6128 ; return 0; }
6129 EOF
6130 if { (eval echo configure:6131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6131 rm -rf conftest*
6132 eval "ac_cv_lib_$ac_lib_var=yes"
6133 else
6134 echo "configure: failed program was:" >&5
6135 cat conftest.$ac_ext >&5
6136 rm -rf conftest*
6137 eval "ac_cv_lib_$ac_lib_var=no"
6138 fi
6139 rm -f conftest*
6140 LIBS="$ac_save_LIBS"
6141
6142 fi
6143 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6144 echo "$ac_t""yes" 1>&6
6145 ac_tr_lib=HAVE_LIB`echo krb | sed -e 's/^a-zA-Z0-9_/_/g' \
6146 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6147 cat >> confdefs.h <<EOF
6148 #define $ac_tr_lib 1
6149 EOF
6150
6151 LIBS="-lkrb $LIBS"
6152
6153 else
6154 echo "$ac_t""no" 1>&6
6155 fi
6156
6157 fi
6158
6159 fi
6160
6161 if test "${with_kerberos5+set}" = set; then
6162 for ac_hdr in krb5.h
6163 do
6164 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6165 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6166 echo "configure:6167: checking for $ac_hdr" >&5
6167 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6168 echo $ac_n "(cached) $ac_c" 1>&6
6169 else
6170 cat > conftest.$ac_ext <<EOF
6171 #line 6172 "configure"
6172 #include "confdefs.h"
6173 #include <$ac_hdr>
6174 EOF
6175 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6176 { (eval echo configure:6177: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6177 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6178 if test -z "$ac_err"; then
6179 rm -rf conftest*
6180 eval "ac_cv_header_$ac_safe=yes"
6181 else
6182 echo "$ac_err" >&5
6183 echo "configure: failed program was:" >&5
6184 cat conftest.$ac_ext >&5
6185 rm -rf conftest*
6186 eval "ac_cv_header_$ac_safe=no"
6187 fi
6188 rm -f conftest*
6189 fi
6190 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6191 echo "$ac_t""yes" 1>&6
6192 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6193 cat >> confdefs.h <<EOF
6194 #define $ac_tr_hdr 1
6195 EOF
6196
6197 else
6198 echo "$ac_t""no" 1>&6
6199 fi
6200 done
6201
6202 else
6203 for ac_hdr in des.h
6204 do
6205 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6206 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6207 echo "configure:6208: checking for $ac_hdr" >&5
6208 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6209 echo $ac_n "(cached) $ac_c" 1>&6
6210 else
6211 cat > conftest.$ac_ext <<EOF
6212 #line 6213 "configure"
6213 #include "confdefs.h"
6214 #include <$ac_hdr>
6215 EOF
6216 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6217 { (eval echo configure:6218: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6218 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6219 if test -z "$ac_err"; then
6220 rm -rf conftest*
6221 eval "ac_cv_header_$ac_safe=yes"
6222 else
6223 echo "$ac_err" >&5
6224 echo "configure: failed program was:" >&5
6225 cat conftest.$ac_ext >&5
6226 rm -rf conftest*
6227 eval "ac_cv_header_$ac_safe=no"
6228 fi
6229 rm -f conftest*
6230 fi
6231 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6232 echo "$ac_t""yes" 1>&6
6233 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6234 cat >> confdefs.h <<EOF
6235 #define $ac_tr_hdr 1
6236 EOF
6237
6238 else
6239 echo "$ac_t""no" 1>&6
6240 for ac_hdr in kerberosIV/des.h
6241 do
6242 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6243 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6244 echo "configure:6245: checking for $ac_hdr" >&5
6245 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6246 echo $ac_n "(cached) $ac_c" 1>&6
6247 else
6248 cat > conftest.$ac_ext <<EOF
6249 #line 6250 "configure"
6250 #include "confdefs.h"
6251 #include <$ac_hdr>
6252 EOF
6253 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6254 { (eval echo configure:6255: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6255 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6256 if test -z "$ac_err"; then
6257 rm -rf conftest*
6258 eval "ac_cv_header_$ac_safe=yes"
6259 else
6260 echo "$ac_err" >&5
6261 echo "configure: failed program was:" >&5
6262 cat conftest.$ac_ext >&5
6263 rm -rf conftest*
6264 eval "ac_cv_header_$ac_safe=no"
6265 fi
6266 rm -f conftest*
6267 fi
6268 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6269 echo "$ac_t""yes" 1>&6
6270 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6271 cat >> confdefs.h <<EOF
6272 #define $ac_tr_hdr 1
6273 EOF
6274
6275 else
6276 echo "$ac_t""no" 1>&6
6277 for ac_hdr in kerberos/des.h
6278 do
6279 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6280 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6281 echo "configure:6282: checking for $ac_hdr" >&5
6282 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6283 echo $ac_n "(cached) $ac_c" 1>&6
6284 else
6285 cat > conftest.$ac_ext <<EOF
6286 #line 6287 "configure"
6287 #include "confdefs.h"
6288 #include <$ac_hdr>
6289 EOF
6290 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6291 { (eval echo configure:6292: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6292 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6293 if test -z "$ac_err"; then
6294 rm -rf conftest*
6295 eval "ac_cv_header_$ac_safe=yes"
6296 else
6297 echo "$ac_err" >&5
6298 echo "configure: failed program was:" >&5
6299 cat conftest.$ac_ext >&5
6300 rm -rf conftest*
6301 eval "ac_cv_header_$ac_safe=no"
6302 fi
6303 rm -f conftest*
6304 fi
6305 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6306 echo "$ac_t""yes" 1>&6
6307 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6308 cat >> confdefs.h <<EOF
6309 #define $ac_tr_hdr 1
6310 EOF
6311
6312 else
6313 echo "$ac_t""no" 1>&6
6314 fi
6315 done
6316
6317 fi
6318 done
6319
6320 fi
6321 done
6322
6323 for ac_hdr in krb.h
6324 do
6325 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6326 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6327 echo "configure:6328: checking for $ac_hdr" >&5
6328 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6329 echo $ac_n "(cached) $ac_c" 1>&6
6330 else
6331 cat > conftest.$ac_ext <<EOF
6332 #line 6333 "configure"
6333 #include "confdefs.h"
6334 #include <$ac_hdr>
6335 EOF
6336 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6337 { (eval echo configure:6338: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6338 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6339 if test -z "$ac_err"; then
6340 rm -rf conftest*
6341 eval "ac_cv_header_$ac_safe=yes"
6342 else
6343 echo "$ac_err" >&5
6344 echo "configure: failed program was:" >&5
6345 cat conftest.$ac_ext >&5
6346 rm -rf conftest*
6347 eval "ac_cv_header_$ac_safe=no"
6348 fi
6349 rm -f conftest*
6350 fi
6351 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6352 echo "$ac_t""yes" 1>&6
6353 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6354 cat >> confdefs.h <<EOF
6355 #define $ac_tr_hdr 1
6356 EOF
6357
6358 else
6359 echo "$ac_t""no" 1>&6
6360 for ac_hdr in kerberosIV/krb.h
6361 do
6362 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6363 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6364 echo "configure:6365: checking for $ac_hdr" >&5
6365 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6366 echo $ac_n "(cached) $ac_c" 1>&6
6367 else
6368 cat > conftest.$ac_ext <<EOF
6369 #line 6370 "configure"
6370 #include "confdefs.h"
6371 #include <$ac_hdr>
6372 EOF
6373 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6374 { (eval echo configure:6375: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6375 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6376 if test -z "$ac_err"; then
6377 rm -rf conftest*
6378 eval "ac_cv_header_$ac_safe=yes"
6379 else
6380 echo "$ac_err" >&5
6381 echo "configure: failed program was:" >&5
6382 cat conftest.$ac_ext >&5
6383 rm -rf conftest*
6384 eval "ac_cv_header_$ac_safe=no"
6385 fi
6386 rm -f conftest*
6387 fi
6388 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6389 echo "$ac_t""yes" 1>&6
6390 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6391 cat >> confdefs.h <<EOF
6392 #define $ac_tr_hdr 1
6393 EOF
6394
6395 else
6396 echo "$ac_t""no" 1>&6
6397 for ac_hdr in kerberos/krb.h
6398 do
6399 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6400 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6401 echo "configure:6402: checking for $ac_hdr" >&5
6402 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6403 echo $ac_n "(cached) $ac_c" 1>&6
6404 else
6405 cat > conftest.$ac_ext <<EOF
6406 #line 6407 "configure"
6407 #include "confdefs.h"
6408 #include <$ac_hdr>
6409 EOF
6410 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6411 { (eval echo configure:6412: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6412 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6413 if test -z "$ac_err"; then
6414 rm -rf conftest*
6415 eval "ac_cv_header_$ac_safe=yes"
6416 else
6417 echo "$ac_err" >&5
6418 echo "configure: failed program was:" >&5
6419 cat conftest.$ac_ext >&5
6420 rm -rf conftest*
6421 eval "ac_cv_header_$ac_safe=no"
6422 fi
6423 rm -f conftest*
6424 fi
6425 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6426 echo "$ac_t""yes" 1>&6
6427 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6428 cat >> confdefs.h <<EOF
6429 #define $ac_tr_hdr 1
6430 EOF
6431
6432 else
6433 echo "$ac_t""no" 1>&6
6434 fi
6435 done
6436
6437 fi
6438 done
6439
6440 fi
6441 done
6442
6443 fi
6444 for ac_hdr in com_err.h
6445 do
6446 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6447 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6448 echo "configure:6449: checking for $ac_hdr" >&5
6449 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6450 echo $ac_n "(cached) $ac_c" 1>&6
6451 else
6452 cat > conftest.$ac_ext <<EOF
6453 #line 6454 "configure"
6454 #include "confdefs.h"
6455 #include <$ac_hdr>
6456 EOF
6457 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6458 { (eval echo configure:6459: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6459 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6460 if test -z "$ac_err"; then
6461 rm -rf conftest*
6462 eval "ac_cv_header_$ac_safe=yes"
6463 else
6464 echo "$ac_err" >&5
6465 echo "configure: failed program was:" >&5
6466 cat conftest.$ac_ext >&5
6467 rm -rf conftest*
6468 eval "ac_cv_header_$ac_safe=no"
6469 fi
6470 rm -f conftest*
6471 fi
6472 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6473 echo "$ac_t""yes" 1>&6
6474 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6475 cat >> confdefs.h <<EOF
6476 #define $ac_tr_hdr 1
6477 EOF
6478
6479 else
6480 echo "$ac_t""no" 1>&6
6481 fi
6482 done
6483
6484 fi
6485
6486 # Solaris requires -lintl if you want strerror (which calls dgettext)
6487 # to return localized messages.
6488 echo $ac_n "checking for dgettext in -lintl""... $ac_c" 1>&6
6489 echo "configure:6490: checking for dgettext in -lintl" >&5
6490 ac_lib_var=`echo intl'_'dgettext | sed 'y%./+-%__p_%'`
6491 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6492 echo $ac_n "(cached) $ac_c" 1>&6
6493 else
6494 ac_save_LIBS="$LIBS"
6495 LIBS="-lintl $LIBS"
6496 cat > conftest.$ac_ext <<EOF
6497 #line 6498 "configure"
6498 #include "confdefs.h"
6499 /* Override any gcc2 internal prototype to avoid an error. */
6500 /* We use char because int might match the return type of a gcc2
6501 builtin and then its argument prototype would still apply. */
6502 char dgettext();
6503
6504 int main() {
6505 dgettext()
6506 ; return 0; }
6507 EOF
6508 if { (eval echo configure:6509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6509 rm -rf conftest*
6510 eval "ac_cv_lib_$ac_lib_var=yes"
6511 else
6512 echo "configure: failed program was:" >&5
6513 cat conftest.$ac_ext >&5
6514 rm -rf conftest*
6515 eval "ac_cv_lib_$ac_lib_var=no"
6516 fi
6517 rm -f conftest*
6518 LIBS="$ac_save_LIBS"
6519
6520 fi
6521 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6522 echo "$ac_t""yes" 1>&6
6523 ac_tr_lib=HAVE_LIB`echo intl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6524 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6525 cat >> confdefs.h <<EOF
6526 #define $ac_tr_lib 1
6527 EOF
6528
6529 LIBS="-lintl $LIBS"
6530
6531 else
6532 echo "$ac_t""no" 1>&6
6533 fi
6534
6535
6536 echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
6537 echo "configure:6538: checking whether localtime caches TZ" >&5
6538 if eval "test \"`echo '$''{'emacs_cv_localtime_cache'+set}'`\" = set"; then
6539 echo $ac_n "(cached) $ac_c" 1>&6
6540 else
6541 if test x$ac_cv_func_tzset = xyes; then
6542 if test "$cross_compiling" = yes; then
6543 # If we have tzset, assume the worst when cross-compiling.
6544 emacs_cv_localtime_cache=yes
6545 else
6546 cat > conftest.$ac_ext <<EOF
6547 #line 6548 "configure"
6548 #include "confdefs.h"
6549 #include <time.h>
6550 extern char **environ;
6551 unset_TZ ()
6552 {
6553 char **from, **to;
6554 for (to = from = environ; (*to = *from); from++)
6555 if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
6556 to++;
6557 }
6558 char TZ_GMT0[] = "TZ=GMT0";
6559 char TZ_PST8[] = "TZ=PST8";
6560 main()
6561 {
6562 time_t now = time ((time_t *) 0);
6563 int hour_GMT0, hour_unset;
6564 if (putenv (TZ_GMT0) != 0)
6565 exit (1);
6566 hour_GMT0 = localtime (&now)->tm_hour;
6567 unset_TZ ();
6568 hour_unset = localtime (&now)->tm_hour;
6569 if (putenv (TZ_PST8) != 0)
6570 exit (1);
6571 if (localtime (&now)->tm_hour == hour_GMT0)
6572 exit (1);
6573 unset_TZ ();
6574 if (localtime (&now)->tm_hour != hour_unset)
6575 exit (1);
6576 exit (0);
6577 }
6578 EOF
6579 if { (eval echo configure:6580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6580 then
6581 emacs_cv_localtime_cache=no
6582 else
6583 echo "configure: failed program was:" >&5
6584 cat conftest.$ac_ext >&5
6585 rm -fr conftest*
6586 emacs_cv_localtime_cache=yes
6587 fi
6588 rm -fr conftest*
6589 fi
6590
6591 else
6592 # If we lack tzset, report that localtime does not cache TZ,
6593 # since we can't invalidate the cache if we don't have tzset.
6594 emacs_cv_localtime_cache=no
6595 fi
6596 fi
6597 echo "$ac_t""$emacs_cv_localtime_cache" 1>&6
6598 if test $emacs_cv_localtime_cache = yes; then
6599 cat >> confdefs.h <<\EOF
6600 #define LOCALTIME_CACHE 1
6601 EOF
6602
6603 fi
6604
6605 if test "x$HAVE_TIMEVAL" = xyes; then
6606 echo $ac_n "checking whether gettimeofday can accept two arguments""... $ac_c" 1>&6
6607 echo "configure:6608: checking whether gettimeofday can accept two arguments" >&5
6608 if eval "test \"`echo '$''{'emacs_cv_gettimeofday_two_arguments'+set}'`\" = set"; then
6609 echo $ac_n "(cached) $ac_c" 1>&6
6610 else
6611 cat > conftest.$ac_ext <<EOF
6612 #line 6613 "configure"
6613 #include "confdefs.h"
6614
6615 #ifdef TIME_WITH_SYS_TIME
6616 #include <sys/time.h>
6617 #include <time.h>
6618 #else
6619 #ifdef HAVE_SYS_TIME_H
6620 #include <sys/time.h>
6621 #else
6622 #include <time.h>
6623 #endif
6624 #endif
6625
6626 int main() {
6627
6628 struct timeval time;
6629 struct timezone dummy;
6630 gettimeofday (&time, &dummy);
6631
6632 ; return 0; }
6633 EOF
6634 if { (eval echo configure:6635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6635 rm -rf conftest*
6636 emacs_cv_gettimeofday_two_arguments=yes
6637 else
6638 echo "configure: failed program was:" >&5
6639 cat conftest.$ac_ext >&5
6640 rm -rf conftest*
6641 emacs_cv_gettimeofday_two_arguments=no
6642 fi
6643 rm -f conftest*
6644 fi
6645
6646 echo "$ac_t""$emacs_cv_gettimeofday_two_arguments" 1>&6
6647 if test $emacs_cv_gettimeofday_two_arguments = no; then
6648 cat >> confdefs.h <<\EOF
6649 #define GETTIMEOFDAY_ONE_ARGUMENT 1
6650 EOF
6651
6652 fi
6653 fi
6654
6655 ok_so_far=yes
6656 echo $ac_n "checking for socket""... $ac_c" 1>&6
6657 echo "configure:6658: checking for socket" >&5
6658 if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then
6659 echo $ac_n "(cached) $ac_c" 1>&6
6660 else
6661 cat > conftest.$ac_ext <<EOF
6662 #line 6663 "configure"
6663 #include "confdefs.h"
6664 /* System header to define __stub macros and hopefully few prototypes,
6665 which can conflict with char socket(); below. */
6666 #include <assert.h>
6667 /* Override any gcc2 internal prototype to avoid an error. */
6668 /* We use char because int might match the return type of a gcc2
6669 builtin and then its argument prototype would still apply. */
6670 char socket();
6671
6672 int main() {
6673
6674 /* The GNU C library defines this for functions which it implements
6675 to always fail with ENOSYS. Some functions are actually named
6676 something starting with __ and the normal name is an alias. */
6677 #if defined (__stub_socket) || defined (__stub___socket)
6678 choke me
6679 #else
6680 socket();
6681 #endif
6682
6683 ; return 0; }
6684 EOF
6685 if { (eval echo configure:6686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6686 rm -rf conftest*
6687 eval "ac_cv_func_socket=yes"
6688 else
6689 echo "configure: failed program was:" >&5
6690 cat conftest.$ac_ext >&5
6691 rm -rf conftest*
6692 eval "ac_cv_func_socket=no"
6693 fi
6694 rm -f conftest*
6695 fi
6696
6697 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
6698 echo "$ac_t""yes" 1>&6
6699 :
6700 else
6701 echo "$ac_t""no" 1>&6
6702 ok_so_far=no
6703 fi
6704
6705 if test $ok_so_far = yes; then
6706 ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'`
6707 echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6
6708 echo "configure:6709: checking for netinet/in.h" >&5
6709 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6710 echo $ac_n "(cached) $ac_c" 1>&6
6711 else
6712 cat > conftest.$ac_ext <<EOF
6713 #line 6714 "configure"
6714 #include "confdefs.h"
6715 #include <netinet/in.h>
6716 EOF
6717 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6718 { (eval echo configure:6719: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6719 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6720 if test -z "$ac_err"; then
6721 rm -rf conftest*
6722 eval "ac_cv_header_$ac_safe=yes"
6723 else
6724 echo "$ac_err" >&5
6725 echo "configure: failed program was:" >&5
6726 cat conftest.$ac_ext >&5
6727 rm -rf conftest*
6728 eval "ac_cv_header_$ac_safe=no"
6729 fi
6730 rm -f conftest*
6731 fi
6732 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6733 echo "$ac_t""yes" 1>&6
6734 :
6735 else
6736 echo "$ac_t""no" 1>&6
6737 ok_so_far=no
6738 fi
6739
6740 fi
6741 if test $ok_so_far = yes; then
6742 ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'`
6743 echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6
6744 echo "configure:6745: checking for arpa/inet.h" >&5
6745 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6746 echo $ac_n "(cached) $ac_c" 1>&6
6747 else
6748 cat > conftest.$ac_ext <<EOF
6749 #line 6750 "configure"
6750 #include "confdefs.h"
6751 #include <arpa/inet.h>
6752 EOF
6753 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6754 { (eval echo configure:6755: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6755 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6756 if test -z "$ac_err"; then
6757 rm -rf conftest*
6758 eval "ac_cv_header_$ac_safe=yes"
6759 else
6760 echo "$ac_err" >&5
6761 echo "configure: failed program was:" >&5
6762 cat conftest.$ac_ext >&5
6763 rm -rf conftest*
6764 eval "ac_cv_header_$ac_safe=no"
6765 fi
6766 rm -f conftest*
6767 fi
6768 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6769 echo "$ac_t""yes" 1>&6
6770 :
6771 else
6772 echo "$ac_t""no" 1>&6
6773 ok_so_far=no
6774 fi
6775
6776 fi
6777 if test $ok_so_far = yes; then
6778 cat >> confdefs.h <<\EOF
6779 #define HAVE_INET_SOCKETS 1
6780 EOF
6781
6782 fi
6783
6784 if test -f /usr/lpp/X11/bin/smt.exp; then
6785 cat >> confdefs.h <<\EOF
6786 #define HAVE_AIX_SMT_EXP 1
6787 EOF
6788
6789 fi
6790
6791 echo $ac_n "checking whether system supports dynamic ptys""... $ac_c" 1>&6
6792 echo "configure:6793: checking whether system supports dynamic ptys" >&5
6793 if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then
6794 echo "$ac_t""yes" 1>&6
6795 cat >> confdefs.h <<\EOF
6796 #define HAVE_DEV_PTMX 1
6797 EOF
6798
6799 else
6800 echo "$ac_t""no" 1>&6
6801 fi
6802
6803 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
6804 echo "configure:6805: checking for pid_t" >&5
6805 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
6806 echo $ac_n "(cached) $ac_c" 1>&6
6807 else
6808 cat > conftest.$ac_ext <<EOF
6809 #line 6810 "configure"
6810 #include "confdefs.h"
6811 #include <sys/types.h>
6812 #if STDC_HEADERS
6813 #include <stdlib.h>
6814 #include <stddef.h>
6815 #endif
6816 EOF
6817 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6818 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6819 rm -rf conftest*
6820 ac_cv_type_pid_t=yes
6821 else
6822 rm -rf conftest*
6823 ac_cv_type_pid_t=no
6824 fi
6825 rm -f conftest*
6826
6827 fi
6828 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
6829 if test $ac_cv_type_pid_t = no; then
6830 cat >> confdefs.h <<\EOF
6831 #define pid_t int
6832 EOF
6833
6834 fi
6835
6836 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
6837 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
6838 echo "configure:6839: checking for vfork.h" >&5
6839 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6840 echo $ac_n "(cached) $ac_c" 1>&6
6841 else
6842 cat > conftest.$ac_ext <<EOF
6843 #line 6844 "configure"
6844 #include "confdefs.h"
6845 #include <vfork.h>
6846 EOF
6847 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6848 { (eval echo configure:6849: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6849 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6850 if test -z "$ac_err"; then
6851 rm -rf conftest*
6852 eval "ac_cv_header_$ac_safe=yes"
6853 else
6854 echo "$ac_err" >&5
6855 echo "configure: failed program was:" >&5
6856 cat conftest.$ac_ext >&5
6857 rm -rf conftest*
6858 eval "ac_cv_header_$ac_safe=no"
6859 fi
6860 rm -f conftest*
6861 fi
6862 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6863 echo "$ac_t""yes" 1>&6
6864 cat >> confdefs.h <<\EOF
6865 #define HAVE_VFORK_H 1
6866 EOF
6867
6868 else
6869 echo "$ac_t""no" 1>&6
6870 fi
6871
6872 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
6873 echo "configure:6874: checking for working vfork" >&5
6874 if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
6875 echo $ac_n "(cached) $ac_c" 1>&6
6876 else
6877 if test "$cross_compiling" = yes; then
6878 echo $ac_n "checking for vfork""... $ac_c" 1>&6
6879 echo "configure:6880: checking for vfork" >&5
6880 if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
6881 echo $ac_n "(cached) $ac_c" 1>&6
6882 else
6883 cat > conftest.$ac_ext <<EOF
6884 #line 6885 "configure"
6885 #include "confdefs.h"
6886 /* System header to define __stub macros and hopefully few prototypes,
6887 which can conflict with char vfork(); below. */
6888 #include <assert.h>
6889 /* Override any gcc2 internal prototype to avoid an error. */
6890 /* We use char because int might match the return type of a gcc2
6891 builtin and then its argument prototype would still apply. */
6892 char vfork();
6893
6894 int main() {
6895
6896 /* The GNU C library defines this for functions which it implements
6897 to always fail with ENOSYS. Some functions are actually named
6898 something starting with __ and the normal name is an alias. */
6899 #if defined (__stub_vfork) || defined (__stub___vfork)
6900 choke me
6901 #else
6902 vfork();
6903 #endif
6904
6905 ; return 0; }
6906 EOF
6907 if { (eval echo configure:6908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6908 rm -rf conftest*
6909 eval "ac_cv_func_vfork=yes"
6910 else
6911 echo "configure: failed program was:" >&5
6912 cat conftest.$ac_ext >&5
6913 rm -rf conftest*
6914 eval "ac_cv_func_vfork=no"
6915 fi
6916 rm -f conftest*
6917 fi
6918
6919 if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
6920 echo "$ac_t""yes" 1>&6
6921 :
6922 else
6923 echo "$ac_t""no" 1>&6
6924 fi
6925
6926 ac_cv_func_vfork_works=$ac_cv_func_vfork
6927 else
6928 cat > conftest.$ac_ext <<EOF
6929 #line 6930 "configure"
6930 #include "confdefs.h"
6931 /* Thanks to Paul Eggert for this test. */
6932 #include <stdio.h>
6933 #include <sys/types.h>
6934 #include <sys/stat.h>
6935 #ifdef HAVE_UNISTD_H
6936 #include <unistd.h>
6937 #endif
6938 #ifdef HAVE_VFORK_H
6939 #include <vfork.h>
6940 #endif
6941 /* On some sparc systems, changes by the child to local and incoming
6942 argument registers are propagated back to the parent.
6943 The compiler is told about this with #include <vfork.h>,
6944 but some compilers (e.g. gcc -O) don't grok <vfork.h>.
6945 Test for this by using a static variable whose address
6946 is put into a register that is clobbered by the vfork. */
6947 static
6948 #ifdef __cplusplus
6949 sparc_address_test (int arg)
6950 #else
6951 sparc_address_test (arg) int arg;
6952 #endif
6953 {
6954 static pid_t child;
6955 if (!child) {
6956 child = vfork ();
6957 if (child < 0) {
6958 perror ("vfork");
6959 _exit(2);
6960 }
6961 if (!child) {
6962 arg = getpid();
6963 write(-1, "", 0);
6964 _exit (arg);
6965 }
6966 }
6967 }
6968 main() {
6969 pid_t parent = getpid ();
6970 pid_t child;
6971
6972 sparc_address_test ();
6973
6974 child = vfork ();
6975
6976 if (child == 0) {
6977 /* Here is another test for sparc vfork register problems.
6978 This test uses lots of local variables, at least
6979 as many local variables as main has allocated so far
6980 including compiler temporaries. 4 locals are enough for
6981 gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
6982 A buggy compiler should reuse the register of parent
6983 for one of the local variables, since it will think that
6984 parent can't possibly be used any more in this routine.
6985 Assigning to the local variable will thus munge parent
6986 in the parent process. */
6987 pid_t
6988 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
6989 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
6990 /* Convince the compiler that p..p7 are live; otherwise, it might
6991 use the same hardware register for all 8 local variables. */
6992 if (p != p1 || p != p2 || p != p3 || p != p4
6993 || p != p5 || p != p6 || p != p7)
6994 _exit(1);
6995
6996 /* On some systems (e.g. IRIX 3.3),
6997 vfork doesn't separate parent from child file descriptors.
6998 If the child closes a descriptor before it execs or exits,
6999 this munges the parent's descriptor as well.
7000 Test for this by closing stdout in the child. */
7001 _exit(close(fileno(stdout)) != 0);
7002 } else {
7003 int status;
7004 struct stat st;
7005
7006 while (wait(&status) != child)
7007 ;
7008 exit(
7009 /* Was there some problem with vforking? */
7010 child < 0
7011
7012 /* Did the child fail? (This shouldn't happen.) */
7013 || status
7014
7015 /* Did the vfork/compiler bug occur? */
7016 || parent != getpid()
7017
7018 /* Did the file descriptor bug occur? */
7019 || fstat(fileno(stdout), &st) != 0
7020 );
7021 }
7022 }
7023 EOF
7024 if { (eval echo configure:7025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7025 then
7026 ac_cv_func_vfork_works=yes
7027 else
7028 echo "configure: failed program was:" >&5
7029 cat conftest.$ac_ext >&5
7030 rm -fr conftest*
7031 ac_cv_func_vfork_works=no
7032 fi
7033 rm -fr conftest*
7034 fi
7035
7036 fi
7037
7038 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
7039 if test $ac_cv_func_vfork_works = no; then
7040 cat >> confdefs.h <<\EOF
7041 #define vfork fork
7042 EOF
7043
7044 fi
7045
7046
7047 # Set up the CFLAGS for real compilation, so we can substitute it.
7048 CFLAGS="$REAL_CFLAGS"
7049
7050 #### Find out which version of Emacs this is.
7051 version=`grep 'defconst[ ]*emacs-version' ${srcdir}/lisp/version.el \
7052 | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`
7053 if test x"${version}" = x; then
7054 { echo "configure: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." 1>&2; exit 1; }
7055 fi
7056
7057 ### Specify what sort of things we'll be editing into Makefile and config.h.
7058 ### Use configuration here uncanonicalized to avoid exceeding size limits.
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7070
7071
7072
7073
7074
7075
7076
7077
7078
7079
7080
7081
7082
7083
7084
7085
7086
7087
7088
7089 cat >> confdefs.h <<EOF
7090 #define EMACS_CONFIGURATION "${canonical}"
7091 EOF
7092
7093 cat >> confdefs.h <<EOF
7094 #define EMACS_CONFIG_OPTIONS "${ac_configure_args}"
7095 EOF
7096
7097 cat >> confdefs.h <<EOF
7098 #define config_machfile "${machfile}"
7099 EOF
7100
7101 cat >> confdefs.h <<EOF
7102 #define config_opsysfile "${opsysfile}"
7103 EOF
7104
7105 cat >> confdefs.h <<EOF
7106 #define LD_SWITCH_X_SITE ${LD_SWITCH_X_SITE}
7107 EOF
7108
7109 cat >> confdefs.h <<EOF
7110 #define LD_SWITCH_X_SITE_AUX ${LD_SWITCH_X_SITE_AUX}
7111 EOF
7112
7113 cat >> confdefs.h <<EOF
7114 #define C_SWITCH_X_SITE ${C_SWITCH_X_SITE}
7115 EOF
7116
7117 cat >> confdefs.h <<EOF
7118 #define UNEXEC_SRC ${UNEXEC_SRC}
7119 EOF
7120
7121
7122 if test "${HAVE_X_WINDOWS}" = "yes" ; then
7123 cat >> confdefs.h <<\EOF
7124 #define HAVE_X_WINDOWS 1
7125 EOF
7126
7127 fi
7128 if test "${USE_X_TOOLKIT}" != "none" ; then
7129 cat >> confdefs.h <<\EOF
7130 #define USE_X_TOOLKIT 1
7131 EOF
7132
7133 fi
7134 if test "${HAVE_X11}" = "yes" ; then
7135 cat >> confdefs.h <<\EOF
7136 #define HAVE_X11 1
7137 EOF
7138
7139 fi
7140 if test "${HAVE_XFREE386}" = "yes" ; then
7141 cat >> confdefs.h <<\EOF
7142 #define HAVE_XFREE386 1
7143 EOF
7144
7145 fi
7146 if test "${HAVE_MENUS}" = "yes" ; then
7147 cat >> confdefs.h <<\EOF
7148 #define HAVE_MENUS 1
7149 EOF
7150
7151 fi
7152 if test "${GNU_MALLOC}" = "yes" ; then
7153 cat >> confdefs.h <<\EOF
7154 #define GNU_MALLOC 1
7155 EOF
7156
7157 fi
7158 if test "${REL_ALLOC}" = "yes" ; then
7159 cat >> confdefs.h <<\EOF
7160 #define REL_ALLOC 1
7161 EOF
7162
7163 fi
7164
7165 #### Report on what we decided to do.
7166 echo "
7167 Configured for \`${canonical}'.
7168
7169 Where should the build process find the source code? ${srcdir}
7170 What operating system and machine description files should Emacs use?
7171 \`${opsysfile}' and \`${machfile}'
7172 What compiler should emacs be built with? ${CC} ${CFLAGS}
7173 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
7174 Should Emacs use the relocating allocator for buffers? ${REL_ALLOC}
7175 What window system should Emacs use? ${window_system}
7176 What toolkit should Emacs use? ${USE_X_TOOLKIT}"
7177
7178 if test -n "${x_includes}"; then
7179 echo " Where do we find X Windows header files? ${x_includes}"
7180 else
7181 echo " Where do we find X Windows header files? Standard dirs"
7182 fi
7183 if test -n "${x_libraries}"; then
7184 echo " Where do we find X Windows libraries? ${x_libraries}"
7185 else
7186 echo " Where do we find X Windows libraries? Standard dirs"
7187 fi
7188
7189 echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}"
7190 echo " Does Emacs use -lXpm? ${HAVE_XPM}"
7191 echo " Does Emacs use -ljpeg? ${HAVE_JPEG}"
7192 echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
7193 echo " Does Emacs use -lungif? ${HAVE_GIF}"
7194 echo " Does Emacs use -lpng? ${HAVE_PNG}"
7195 echo " Does Emacs use X toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}"
7196 echo
7197
7198 # Remove any trailing slashes in these variables.
7199 test "${prefix}" != NONE &&
7200 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
7201 test "${exec_prefix}" != NONE &&
7202 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
7203
7204 trap '' 1 2 15
7205 cat > confcache <<\EOF
7206 # This file is a shell script that caches the results of configure
7207 # tests run on this system so they can be shared between configure
7208 # scripts and configure runs. It is not useful on other systems.
7209 # If it contains results you don't want to keep, you may remove or edit it.
7210 #
7211 # By default, configure uses ./config.cache as the cache file,
7212 # creating it if it does not exist already. You can give configure
7213 # the --cache-file=FILE option to use a different cache file; that is
7214 # what configure does when it calls configure scripts in
7215 # subdirectories, so they share the cache.
7216 # Giving --cache-file=/dev/null disables caching, for debugging configure.
7217 # config.status only pays attention to the cache file if you give it the
7218 # --recheck option to rerun configure.
7219 #
7220 EOF
7221 # The following way of writing the cache mishandles newlines in values,
7222 # but we know of no workaround that is simple, portable, and efficient.
7223 # So, don't put newlines in cache variables' values.
7224 # Ultrix sh set writes to stderr and can't be redirected directly,
7225 # and sets the high bit in the cache file unless we assign to the vars.
7226 (set) 2>&1 |
7227 case `(ac_space=' '; set | grep ac_space) 2>&1` in
7228 *ac_space=\ *)
7229 # `set' does not quote correctly, so add quotes (double-quote substitution
7230 # turns \\\\ into \\, and sed turns \\ into \).
7231 sed -n \
7232 -e "s/'/'\\\\''/g" \
7233 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
7234 ;;
7235 *)
7236 # `set' quotes correctly as required by POSIX, so do not add quotes.
7237 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
7238 ;;
7239 esac >> confcache
7240 if cmp -s $cache_file confcache; then
7241 :
7242 else
7243 if test -w $cache_file; then
7244 echo "updating cache $cache_file"
7245 cat confcache > $cache_file
7246 else
7247 echo "not updating unwritable cache $cache_file"
7248 fi
7249 fi
7250 rm -f confcache
7251
7252 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
7253
7254 test "x$prefix" = xNONE && prefix=$ac_default_prefix
7255 # Let make expand exec_prefix.
7256 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7257
7258 # Any assignment to VPATH causes Sun make to only execute
7259 # the first set of double-colon rules, so remove it if not needed.
7260 # If there is a colon in the path, we need to keep it.
7261 if test "x$srcdir" = x.; then
7262 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
7263 fi
7264
7265 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
7266
7267 DEFS=-DHAVE_CONFIG_H
7268
7269 # Without the "./", some shells look in PATH for config.status.
7270 : ${CONFIG_STATUS=./config.status}
7271
7272 echo creating $CONFIG_STATUS
7273 rm -f $CONFIG_STATUS
7274 cat > $CONFIG_STATUS <<EOF
7275 #! /bin/sh
7276 # Generated automatically by configure.
7277 # Run this file to recreate the current configuration.
7278 # This directory was configured as follows,
7279 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7280 #
7281 # $0 $ac_configure_args
7282 #
7283 # Compiler output produced by configure, useful for debugging
7284 # configure, is in ./config.log if it exists.
7285
7286 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
7287 for ac_option
7288 do
7289 case "\$ac_option" in
7290 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
7291 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
7292 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
7293 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
7294 echo "$CONFIG_STATUS generated by autoconf version 2.13"
7295 exit 0 ;;
7296 -help | --help | --hel | --he | --h)
7297 echo "\$ac_cs_usage"; exit 0 ;;
7298 *) echo "\$ac_cs_usage"; exit 1 ;;
7299 esac
7300 done
7301
7302 ac_given_srcdir=$srcdir
7303 ac_given_INSTALL="$INSTALL"
7304
7305 trap 'rm -fr `echo "Makefile lib-src/Makefile.c:lib-src/Makefile.in oldXMenu/Makefile \
7306 man/Makefile lwlib/Makefile src/Makefile.c:src/Makefile.in \
7307 leim/Makefile src/config.h:src/config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
7308 EOF
7309 cat >> $CONFIG_STATUS <<EOF
7310
7311 # Protect against being on the right side of a sed subst in config.status.
7312 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
7313 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
7314 $ac_vpsub
7315 $extrasub
7316 s%@SHELL@%$SHELL%g
7317 s%@CFLAGS@%$CFLAGS%g
7318 s%@CPPFLAGS@%$CPPFLAGS%g
7319 s%@CXXFLAGS@%$CXXFLAGS%g
7320 s%@FFLAGS@%$FFLAGS%g
7321 s%@DEFS@%$DEFS%g
7322 s%@LDFLAGS@%$LDFLAGS%g
7323 s%@LIBS@%$LIBS%g
7324 s%@exec_prefix@%$exec_prefix%g
7325 s%@prefix@%$prefix%g
7326 s%@program_transform_name@%$program_transform_name%g
7327 s%@bindir@%$bindir%g
7328 s%@sbindir@%$sbindir%g
7329 s%@libexecdir@%$libexecdir%g
7330 s%@datadir@%$datadir%g
7331 s%@sysconfdir@%$sysconfdir%g
7332 s%@sharedstatedir@%$sharedstatedir%g
7333 s%@localstatedir@%$localstatedir%g
7334 s%@libdir@%$libdir%g
7335 s%@includedir@%$includedir%g
7336 s%@oldincludedir@%$oldincludedir%g
7337 s%@infodir@%$infodir%g
7338 s%@mandir@%$mandir%g
7339 s%@host@%$host%g
7340 s%@host_alias@%$host_alias%g
7341 s%@host_cpu@%$host_cpu%g
7342 s%@host_vendor@%$host_vendor%g
7343 s%@host_os@%$host_os%g
7344 s%@CC@%$CC%g
7345 s%@LN_S@%$LN_S%g
7346 s%@CPP@%$CPP%g
7347 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
7348 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
7349 s%@INSTALL_DATA@%$INSTALL_DATA%g
7350 s%@YACC@%$YACC%g
7351 s%@RANLIB@%$RANLIB%g
7352 s%@SET_MAKE@%$SET_MAKE%g
7353 s%@ALLOCA@%$ALLOCA%g
7354 s%@liblockfile@%$liblockfile%g
7355 s%@LIBOBJS@%$LIBOBJS%g
7356 s%@version@%$version%g
7357 s%@configuration@%$configuration%g
7358 s%@canonical@%$canonical%g
7359 s%@srcdir@%$srcdir%g
7360 s%@lispdir@%$lispdir%g
7361 s%@locallisppath@%$locallisppath%g
7362 s%@lisppath@%$lisppath%g
7363 s%@x_default_search_path@%$x_default_search_path%g
7364 s%@etcdir@%$etcdir%g
7365 s%@archlibdir@%$archlibdir%g
7366 s%@docdir@%$docdir%g
7367 s%@bitmapdir@%$bitmapdir%g
7368 s%@c_switch_system@%$c_switch_system%g
7369 s%@c_switch_machine@%$c_switch_machine%g
7370 s%@LD_SWITCH_X_SITE@%$LD_SWITCH_X_SITE%g
7371 s%@LD_SWITCH_X_SITE_AUX@%$LD_SWITCH_X_SITE_AUX%g
7372 s%@C_SWITCH_X_SITE@%$C_SWITCH_X_SITE%g
7373 s%@X_TOOLKIT_TYPE@%$X_TOOLKIT_TYPE%g
7374 s%@machfile@%$machfile%g
7375 s%@opsysfile@%$opsysfile%g
7376
7377 CEOF
7378 EOF
7379
7380 cat >> $CONFIG_STATUS <<\EOF
7381
7382 # Split the substitutions into bite-sized pieces for seds with
7383 # small command number limits, like on Digital OSF/1 and HP-UX.
7384 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
7385 ac_file=1 # Number of current file.
7386 ac_beg=1 # First line for current file.
7387 ac_end=$ac_max_sed_cmds # Line after last line for current file.
7388 ac_more_lines=:
7389 ac_sed_cmds=""
7390 while $ac_more_lines; do
7391 if test $ac_beg -gt 1; then
7392 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
7393 else
7394 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
7395 fi
7396 if test ! -s conftest.s$ac_file; then
7397 ac_more_lines=false
7398 rm -f conftest.s$ac_file
7399 else
7400 if test -z "$ac_sed_cmds"; then
7401 ac_sed_cmds="sed -f conftest.s$ac_file"
7402 else
7403 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
7404 fi
7405 ac_file=`expr $ac_file + 1`
7406 ac_beg=$ac_end
7407 ac_end=`expr $ac_end + $ac_max_sed_cmds`
7408 fi
7409 done
7410 if test -z "$ac_sed_cmds"; then
7411 ac_sed_cmds=cat
7412 fi
7413 EOF
7414
7415 cat >> $CONFIG_STATUS <<EOF
7416
7417 CONFIG_FILES=\${CONFIG_FILES-"Makefile lib-src/Makefile.c:lib-src/Makefile.in oldXMenu/Makefile \
7418 man/Makefile lwlib/Makefile src/Makefile.c:src/Makefile.in \
7419 leim/Makefile"}
7420 EOF
7421 cat >> $CONFIG_STATUS <<\EOF
7422 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
7423 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
7424 case "$ac_file" in
7425 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
7426 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7427 *) ac_file_in="${ac_file}.in" ;;
7428 esac
7429
7430 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
7431
7432 # Remove last slash and all that follows it. Not all systems have dirname.
7433 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7434 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7435 # The file is in a subdirectory.
7436 test ! -d "$ac_dir" && mkdir "$ac_dir"
7437 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
7438 # A "../" for each directory in $ac_dir_suffix.
7439 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
7440 else
7441 ac_dir_suffix= ac_dots=
7442 fi
7443
7444 case "$ac_given_srcdir" in
7445 .) srcdir=.
7446 if test -z "$ac_dots"; then top_srcdir=.
7447 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
7448 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
7449 *) # Relative path.
7450 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
7451 top_srcdir="$ac_dots$ac_given_srcdir" ;;
7452 esac
7453
7454 case "$ac_given_INSTALL" in
7455 [/$]*) INSTALL="$ac_given_INSTALL" ;;
7456 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
7457 esac
7458
7459 echo creating "$ac_file"
7460 rm -f "$ac_file"
7461 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
7462 case "$ac_file" in
7463 *Makefile*) ac_comsub="1i\\
7464 # $configure_input" ;;
7465 *) ac_comsub= ;;
7466 esac
7467
7468 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7469 sed -e "$ac_comsub
7470 s%@configure_input@%$configure_input%g
7471 s%@srcdir@%$srcdir%g
7472 s%@top_srcdir@%$top_srcdir%g
7473 s%@INSTALL@%$INSTALL%g
7474 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
7475 fi; done
7476 rm -f conftest.s*
7477
7478 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
7479 # NAME is the cpp macro being defined and VALUE is the value it is being given.
7480 #
7481 # ac_d sets the value in "#define NAME VALUE" lines.
7482 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
7483 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
7484 ac_dC='\3'
7485 ac_dD='%g'
7486 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
7487 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
7488 ac_uB='\([ ]\)%\1#\2define\3'
7489 ac_uC=' '
7490 ac_uD='\4%g'
7491 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
7492 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
7493 ac_eB='$%\1#\2define\3'
7494 ac_eC=' '
7495 ac_eD='%g'
7496
7497 if test "${CONFIG_HEADERS+set}" != set; then
7498 EOF
7499 cat >> $CONFIG_STATUS <<EOF
7500 CONFIG_HEADERS="src/config.h:src/config.in"
7501 EOF
7502 cat >> $CONFIG_STATUS <<\EOF
7503 fi
7504 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
7505 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
7506 case "$ac_file" in
7507 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
7508 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7509 *) ac_file_in="${ac_file}.in" ;;
7510 esac
7511
7512 echo creating $ac_file
7513
7514 rm -f conftest.frag conftest.in conftest.out
7515 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7516 cat $ac_file_inputs > conftest.in
7517
7518 EOF
7519
7520 # Transform confdefs.h into a sed script conftest.vals that substitutes
7521 # the proper values into config.h.in to produce config.h. And first:
7522 # Protect against being on the right side of a sed subst in config.status.
7523 # Protect against being in an unquoted here document in config.status.
7524 rm -f conftest.vals
7525 cat > conftest.hdr <<\EOF
7526 s/[\\&%]/\\&/g
7527 s%[\\$`]%\\&%g
7528 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
7529 s%ac_d%ac_u%gp
7530 s%ac_u%ac_e%gp
7531 EOF
7532 sed -n -f conftest.hdr confdefs.h > conftest.vals
7533 rm -f conftest.hdr
7534
7535 # This sed command replaces #undef with comments. This is necessary, for
7536 # example, in the case of _POSIX_SOURCE, which is predefined and required
7537 # on some systems where configure will not decide to define it.
7538 cat >> conftest.vals <<\EOF
7539 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
7540 EOF
7541
7542 # Break up conftest.vals because some shells have a limit on
7543 # the size of here documents, and old seds have small limits too.
7544
7545 rm -f conftest.tail
7546 while :
7547 do
7548 ac_lines=`grep -c . conftest.vals`
7549 # grep -c gives empty output for an empty file on some AIX systems.
7550 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
7551 # Write a limited-size here document to conftest.frag.
7552 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
7553 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
7554 echo 'CEOF
7555 sed -f conftest.frag conftest.in > conftest.out
7556 rm -f conftest.in
7557 mv conftest.out conftest.in
7558 ' >> $CONFIG_STATUS
7559 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
7560 rm -f conftest.vals
7561 mv conftest.tail conftest.vals
7562 done
7563 rm -f conftest.vals
7564
7565 cat >> $CONFIG_STATUS <<\EOF
7566 rm -f conftest.frag conftest.h
7567 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
7568 cat conftest.in >> conftest.h
7569 rm -f conftest.in
7570 if cmp -s $ac_file conftest.h 2>/dev/null; then
7571 echo "$ac_file is unchanged"
7572 rm -f conftest.h
7573 else
7574 # Remove last slash and all that follows it. Not all systems have dirname.
7575 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7576 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7577 # The file is in a subdirectory.
7578 test ! -d "$ac_dir" && mkdir "$ac_dir"
7579 fi
7580 rm -f $ac_file
7581 mv conftest.h $ac_file
7582 fi
7583 fi; done
7584
7585 EOF
7586 cat >> $CONFIG_STATUS <<EOF
7587 CPP="$CPP" CPPFLAGS="$CPPFLAGS"
7588 EOF
7589 cat >> $CONFIG_STATUS <<\EOF
7590
7591
7592 ### Make the necessary directories, if they don't exist.
7593 for dir in etc lisp ; do
7594 test -d ${dir} || mkdir ${dir}
7595 done
7596
7597 # Build src/Makefile from ${srcdir}/src/Makefile.c
7598 # and lib-src/Makefile from ${srcdir}/lib-src/Makefile.c
7599 # This must be done after src/config.h is built, since we rely on that file.
7600
7601 # Now get this: Some word that is part of the ${srcdir} directory name
7602 # or the ${configuration} value might, just might, happen to be an
7603 # identifier like `sun4' or `i386' or something, and be predefined by
7604 # the C preprocessor to some helpful value like 1, or maybe the empty
7605 # string. Needless to say consequent macro substitutions are less
7606 # than conducive to the makefile finding the correct directory.
7607 undefs="`echo $top_srcdir $configuration $canonical |
7608 sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/^/ /' -e 's/ *$//' \
7609 -e 's/ */ -U/g' -e 's/-U[0-9][^ ]*//g' \
7610 `"
7611
7612 echo creating src/epaths.h
7613 make epaths-force
7614
7615 echo creating lib-src/Makefile
7616 ( cd lib-src
7617 rm -f junk.c junk1.c junk2.c
7618 sed -e '/start of cpp stuff/q' \
7619 < Makefile.c > junk1.c
7620 sed -e '1,/start of cpp stuff/d'\
7621 -e 's@/\*\*/#\(.*\)$@/* \1 */@' \
7622 < Makefile.c > junk.c
7623 $CPP $undefs -I. -I$top_srcdir/src $CPPFLAGS junk.c | \
7624 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
7625 cat junk1.c junk2.c > Makefile.new
7626 rm -f junk.c junk1.c junk2.c
7627 chmod 444 Makefile.new
7628 mv -f Makefile.new Makefile
7629 )
7630
7631 echo creating src/Makefile
7632 ( cd src
7633 rm -f junk.c junk1.c junk2.c
7634 sed -e '/start of cpp stuff/q' \
7635 < Makefile.c > junk1.c
7636 sed -e '1,/start of cpp stuff/d'\
7637 -e 's@/\*\*/#\(.*\)$@/* \1 */@' \
7638 < Makefile.c > junk.c
7639 $CPP $undefs -I. -I$top_srcdir/src $CPPFLAGS junk.c | \
7640 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
7641 cat junk1.c junk2.c > Makefile.new
7642 rm -f junk.c junk1.c junk2.c
7643 chmod 444 Makefile.new
7644 mv -f Makefile.new Makefile
7645 )
7646
7647 if test ! -f src/.gdbinit && test -f $top_srcdir/src/.gdbinit; then
7648 echo creating src/.gdbinit
7649 echo source $top_srcdir/src/.gdbinit > src/.gdbinit
7650 fi
7651
7652 # This is how we know whether to re-run configure in certain cases.
7653 touch src/config.stamp
7654
7655
7656 exit 0
7657 EOF
7658 chmod +x $CONFIG_STATUS
7659 rm -fr confdefs* $ac_clean_files
7660 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
7661