(get_frame_size) [VMS]: Use a fresh i/o channel.
[emacs.git] / configure
blob69efdf7040cddec6f7fb52d7be121405975db4a6
1 #! /bin/sh
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.
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
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 --without-xim don't use X11 XIM"
41 ac_help="$ac_help
42 --disable-largefile omit support for large files"
43 ac_help="$ac_help
44 --with-x use the X Window System"
46 # Initialize some variables set by options.
47 # The variables have the same names as the options, with
48 # dashes changed to underlines.
49 build=NONE
50 cache_file=./config.cache
51 exec_prefix=NONE
52 host=NONE
53 no_create=
54 nonopt=NONE
55 no_recursion=
56 prefix=NONE
57 program_prefix=NONE
58 program_suffix=NONE
59 program_transform_name=s,x,x,
60 silent=
61 site=
62 srcdir=
63 target=NONE
64 verbose=
65 x_includes=NONE
66 x_libraries=NONE
67 bindir='${exec_prefix}/bin'
68 sbindir='${exec_prefix}/sbin'
69 libexecdir='${exec_prefix}/libexec'
70 datadir='${prefix}/share'
71 sysconfdir='${prefix}/etc'
72 sharedstatedir='${prefix}/com'
73 localstatedir='${prefix}/var'
74 libdir='${exec_prefix}/lib'
75 includedir='${prefix}/include'
76 oldincludedir='/usr/include'
77 infodir='${prefix}/info'
78 mandir='${prefix}/man'
80 # Initialize some other variables.
81 subdirs=
82 MFLAGS= MAKEFLAGS=
83 SHELL=${CONFIG_SHELL-/bin/sh}
84 # Maximum number of lines to put in a shell here document.
85 ac_max_here_lines=12
87 ac_prev=
88 for ac_option
91 # If the previous option needs an argument, assign it.
92 if test -n "$ac_prev"; then
93 eval "$ac_prev=\$ac_option"
94 ac_prev=
95 continue
98 case "$ac_option" in
99 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
100 *) ac_optarg= ;;
101 esac
103 # Accept the important Cygnus configure options, so we can diagnose typos.
105 case "$ac_option" in
107 -bindir | --bindir | --bindi | --bind | --bin | --bi)
108 ac_prev=bindir ;;
109 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
110 bindir="$ac_optarg" ;;
112 -build | --build | --buil | --bui | --bu)
113 ac_prev=build ;;
114 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
115 build="$ac_optarg" ;;
117 -cache-file | --cache-file | --cache-fil | --cache-fi \
118 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
119 ac_prev=cache_file ;;
120 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
121 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
122 cache_file="$ac_optarg" ;;
124 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
125 ac_prev=datadir ;;
126 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
127 | --da=*)
128 datadir="$ac_optarg" ;;
130 -disable-* | --disable-*)
131 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
132 # Reject names that are not valid shell variable names.
133 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
134 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
136 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
137 eval "enable_${ac_feature}=no" ;;
139 -enable-* | --enable-*)
140 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
141 # Reject names that are not valid shell variable names.
142 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
143 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
145 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
146 case "$ac_option" in
147 *=*) ;;
148 *) ac_optarg=yes ;;
149 esac
150 eval "enable_${ac_feature}='$ac_optarg'" ;;
152 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
153 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
154 | --exec | --exe | --ex)
155 ac_prev=exec_prefix ;;
156 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
157 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
158 | --exec=* | --exe=* | --ex=*)
159 exec_prefix="$ac_optarg" ;;
161 -gas | --gas | --ga | --g)
162 # Obsolete; use --with-gas.
163 with_gas=yes ;;
165 -help | --help | --hel | --he)
166 # Omit some internal or obsolete options to make the list less imposing.
167 # This message is too long to be a string in the A/UX 3.1 sh.
168 cat << EOF
169 Usage: configure [options] [host]
170 Options: [defaults in brackets after descriptions]
171 Configuration:
172 --cache-file=FILE cache test results in FILE
173 --help print this message
174 --no-create do not create output files
175 --quiet, --silent do not print \`checking...' messages
176 --version print the version of autoconf that created configure
177 Directory and file names:
178 --prefix=PREFIX install architecture-independent files in PREFIX
179 [$ac_default_prefix]
180 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
181 [same as prefix]
182 --bindir=DIR user executables in DIR [EPREFIX/bin]
183 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
184 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
185 --datadir=DIR read-only architecture-independent data in DIR
186 [PREFIX/share]
187 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
188 --sharedstatedir=DIR modifiable architecture-independent data in DIR
189 [PREFIX/com]
190 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
191 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
192 --includedir=DIR C header files in DIR [PREFIX/include]
193 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
194 --infodir=DIR info documentation in DIR [PREFIX/info]
195 --mandir=DIR man documentation in DIR [PREFIX/man]
196 --srcdir=DIR find the sources in DIR [configure dir or ..]
197 --program-prefix=PREFIX prepend PREFIX to installed program names
198 --program-suffix=SUFFIX append SUFFIX to installed program names
199 --program-transform-name=PROGRAM
200 run sed PROGRAM on installed program names
202 cat << EOF
203 Host type:
204 --build=BUILD configure for building on BUILD [BUILD=HOST]
205 --host=HOST configure for HOST [guessed]
206 --target=TARGET configure for TARGET [TARGET=HOST]
207 Features and packages:
208 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
209 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
210 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
211 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
212 --x-includes=DIR X include files are in DIR
213 --x-libraries=DIR X library files are in DIR
215 if test -n "$ac_help"; then
216 echo "--enable and --with options recognized:$ac_help"
218 exit 0 ;;
220 -host | --host | --hos | --ho)
221 ac_prev=host ;;
222 -host=* | --host=* | --hos=* | --ho=*)
223 host="$ac_optarg" ;;
225 -includedir | --includedir | --includedi | --included | --include \
226 | --includ | --inclu | --incl | --inc)
227 ac_prev=includedir ;;
228 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
229 | --includ=* | --inclu=* | --incl=* | --inc=*)
230 includedir="$ac_optarg" ;;
232 -infodir | --infodir | --infodi | --infod | --info | --inf)
233 ac_prev=infodir ;;
234 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
235 infodir="$ac_optarg" ;;
237 -libdir | --libdir | --libdi | --libd)
238 ac_prev=libdir ;;
239 -libdir=* | --libdir=* | --libdi=* | --libd=*)
240 libdir="$ac_optarg" ;;
242 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
243 | --libexe | --libex | --libe)
244 ac_prev=libexecdir ;;
245 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
246 | --libexe=* | --libex=* | --libe=*)
247 libexecdir="$ac_optarg" ;;
249 -localstatedir | --localstatedir | --localstatedi | --localstated \
250 | --localstate | --localstat | --localsta | --localst \
251 | --locals | --local | --loca | --loc | --lo)
252 ac_prev=localstatedir ;;
253 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
254 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
255 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
256 localstatedir="$ac_optarg" ;;
258 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
259 ac_prev=mandir ;;
260 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
261 mandir="$ac_optarg" ;;
263 -nfp | --nfp | --nf)
264 # Obsolete; use --without-fp.
265 with_fp=no ;;
267 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
268 | --no-cr | --no-c)
269 no_create=yes ;;
271 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
272 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
273 no_recursion=yes ;;
275 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
276 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
277 | --oldin | --oldi | --old | --ol | --o)
278 ac_prev=oldincludedir ;;
279 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
280 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
281 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
282 oldincludedir="$ac_optarg" ;;
284 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
285 ac_prev=prefix ;;
286 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
287 prefix="$ac_optarg" ;;
289 -program-prefix | --program-prefix | --program-prefi | --program-pref \
290 | --program-pre | --program-pr | --program-p)
291 ac_prev=program_prefix ;;
292 -program-prefix=* | --program-prefix=* | --program-prefi=* \
293 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
294 program_prefix="$ac_optarg" ;;
296 -program-suffix | --program-suffix | --program-suffi | --program-suff \
297 | --program-suf | --program-su | --program-s)
298 ac_prev=program_suffix ;;
299 -program-suffix=* | --program-suffix=* | --program-suffi=* \
300 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
301 program_suffix="$ac_optarg" ;;
303 -program-transform-name | --program-transform-name \
304 | --program-transform-nam | --program-transform-na \
305 | --program-transform-n | --program-transform- \
306 | --program-transform | --program-transfor \
307 | --program-transfo | --program-transf \
308 | --program-trans | --program-tran \
309 | --progr-tra | --program-tr | --program-t)
310 ac_prev=program_transform_name ;;
311 -program-transform-name=* | --program-transform-name=* \
312 | --program-transform-nam=* | --program-transform-na=* \
313 | --program-transform-n=* | --program-transform-=* \
314 | --program-transform=* | --program-transfor=* \
315 | --program-transfo=* | --program-transf=* \
316 | --program-trans=* | --program-tran=* \
317 | --progr-tra=* | --program-tr=* | --program-t=*)
318 program_transform_name="$ac_optarg" ;;
320 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
321 | -silent | --silent | --silen | --sile | --sil)
322 silent=yes ;;
324 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
325 ac_prev=sbindir ;;
326 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
327 | --sbi=* | --sb=*)
328 sbindir="$ac_optarg" ;;
330 -sharedstatedir | --sharedstatedir | --sharedstatedi \
331 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
332 | --sharedst | --shareds | --shared | --share | --shar \
333 | --sha | --sh)
334 ac_prev=sharedstatedir ;;
335 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
336 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
337 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
338 | --sha=* | --sh=*)
339 sharedstatedir="$ac_optarg" ;;
341 -site | --site | --sit)
342 ac_prev=site ;;
343 -site=* | --site=* | --sit=*)
344 site="$ac_optarg" ;;
346 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
347 ac_prev=srcdir ;;
348 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
349 srcdir="$ac_optarg" ;;
351 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
352 | --syscon | --sysco | --sysc | --sys | --sy)
353 ac_prev=sysconfdir ;;
354 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
355 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
356 sysconfdir="$ac_optarg" ;;
358 -target | --target | --targe | --targ | --tar | --ta | --t)
359 ac_prev=target ;;
360 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
361 target="$ac_optarg" ;;
363 -v | -verbose | --verbose | --verbos | --verbo | --verb)
364 verbose=yes ;;
366 -version | --version | --versio | --versi | --vers)
367 echo "configure generated by autoconf version 2.13"
368 exit 0 ;;
370 -with-* | --with-*)
371 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
372 # Reject names that are not valid shell variable names.
373 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
374 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
376 ac_package=`echo $ac_package| sed 's/-/_/g'`
377 case "$ac_option" in
378 *=*) ;;
379 *) ac_optarg=yes ;;
380 esac
381 eval "with_${ac_package}='$ac_optarg'" ;;
383 -without-* | --without-*)
384 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
385 # Reject names that are not valid shell variable names.
386 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
387 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
389 ac_package=`echo $ac_package| sed 's/-/_/g'`
390 eval "with_${ac_package}=no" ;;
392 --x)
393 # Obsolete; use --with-x.
394 with_x=yes ;;
396 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
397 | --x-incl | --x-inc | --x-in | --x-i)
398 ac_prev=x_includes ;;
399 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
400 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
401 x_includes="$ac_optarg" ;;
403 -x-libraries | --x-libraries | --x-librarie | --x-librari \
404 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
405 ac_prev=x_libraries ;;
406 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
407 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
408 x_libraries="$ac_optarg" ;;
410 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
414 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
415 echo "configure: warning: $ac_option: invalid host type" 1>&2
417 if test "x$nonopt" != xNONE; then
418 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
420 nonopt="$ac_option"
423 esac
424 done
426 if test -n "$ac_prev"; then
427 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
430 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
432 # File descriptor usage:
433 # 0 standard input
434 # 1 file creation
435 # 2 errors and warnings
436 # 3 some systems may open it to /dev/tty
437 # 4 used on the Kubota Titan
438 # 6 checking for... messages and results
439 # 5 compiler messages saved in config.log
440 if test "$silent" = yes; then
441 exec 6>/dev/null
442 else
443 exec 6>&1
445 exec 5>./config.log
447 echo "\
448 This file contains any messages produced by compilers while
449 running configure, to aid debugging if configure makes a mistake.
450 " 1>&5
452 # Strip out --no-create and --no-recursion so they do not pile up.
453 # Also quote any args containing shell metacharacters.
454 ac_configure_args=
455 for ac_arg
457 case "$ac_arg" in
458 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
459 | --no-cr | --no-c) ;;
460 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
461 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
462 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
463 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
464 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
465 esac
466 done
468 # NLS nuisances.
469 # Only set these to C if already set. These must not be set unconditionally
470 # because not all systems understand e.g. LANG=C (notably SCO).
471 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
472 # Non-C LC_CTYPE values break the ctype check.
473 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
474 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
475 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
476 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
478 # confdefs.h avoids OS command line length limits that DEFS can exceed.
479 rm -rf conftest* confdefs.h
480 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
481 echo > confdefs.h
483 # A filename unique to this package, relative to the directory that
484 # configure is in, which we can look for to find out if srcdir is correct.
485 ac_unique_file=src/lisp.h
487 # Find the source files, if location was not specified.
488 if test -z "$srcdir"; then
489 ac_srcdir_defaulted=yes
490 # Try the directory containing this script, then its parent.
491 ac_prog=$0
492 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
493 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
494 srcdir=$ac_confdir
495 if test ! -r $srcdir/$ac_unique_file; then
496 srcdir=..
498 else
499 ac_srcdir_defaulted=no
501 if test ! -r $srcdir/$ac_unique_file; then
502 if test "$ac_srcdir_defaulted" = yes; then
503 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
504 else
505 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
508 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
510 # Prefer explicitly selected file to automatically selected ones.
511 if test -z "$CONFIG_SITE"; then
512 if test "x$prefix" != xNONE; then
513 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
514 else
515 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
518 for ac_site_file in $CONFIG_SITE; do
519 if test -r "$ac_site_file"; then
520 echo "loading site script $ac_site_file"
521 . "$ac_site_file"
523 done
525 if test -r "$cache_file"; then
526 echo "loading cache $cache_file"
527 . $cache_file
528 else
529 echo "creating cache $cache_file"
530 > $cache_file
533 ac_ext=c
534 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
535 ac_cpp='$CPP $CPPFLAGS'
536 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
537 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
538 cross_compiling=$ac_cv_prog_cc_cross
540 ac_exeext=
541 ac_objext=o
542 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
543 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
544 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
545 ac_n= ac_c='
546 ' ac_t=' '
547 else
548 ac_n=-n ac_c= ac_t=
550 else
551 ac_n= ac_c='\c' ac_t=
557 lispdir='${datadir}/emacs/${version}/lisp'
558 locallisppath='${datadir}/emacs/${version}/site-lisp:'\
559 '${datadir}/emacs/site-lisp:${datadir}/emacs/${version}/leim'
560 lisppath='${locallisppath}:${lispdir}'
561 etcdir='${datadir}/emacs/${version}/etc'
562 archlibdir='${libexecdir}/emacs/${version}/${configuration}'
563 docdir='${datadir}/emacs/${version}/etc'
565 # Check whether --with-gcc or --without-gcc was given.
566 if test "${with_gcc+set}" = set; then
567 withval="$with_gcc"
571 # Check whether --with-pop or --without-pop was given.
572 if test "${with_pop+set}" = set; then
573 withval="$with_pop"
574 if test "$withval" = yes; then
575 cat >> confdefs.h <<\EOF
576 #define MAIL_USE_POP 1
579 else :
581 else
582 cat >> confdefs.h <<\EOF
583 #define MAIL_USE_POP 1
588 # Check whether --with-kerberos or --without-kerberos was given.
589 if test "${with_kerberos+set}" = set; then
590 withval="$with_kerberos"
591 cat >> confdefs.h <<\EOF
592 #define KERBEROS 1
597 # Check whether --with-kerberos5 or --without-kerberos5 was given.
598 if test "${with_kerberos5+set}" = set; then
599 withval="$with_kerberos5"
600 if test "${with_kerberos5+set}" = set; then
601 if test "${with_kerberos+set}" != set; then
602 with_kerberos=yes
603 cat >> confdefs.h <<\EOF
604 #define KERBEROS 1
609 cat >> confdefs.h <<\EOF
610 #define KERBEROS5 1
615 # Check whether --with-hesiod or --without-hesiod was given.
616 if test "${with_hesiod+set}" = set; then
617 withval="$with_hesiod"
618 cat >> confdefs.h <<\EOF
619 #define HESIOD 1
624 # Check whether --with-x-toolkit or --without-x-toolkit was given.
625 if test "${with_x_toolkit+set}" = set; then
626 withval="$with_x_toolkit"
627 case "${withval}" in
628 y | ye | yes ) val=athena ;;
629 n | no ) val=no ;;
630 l | lu | luc | luci | lucid ) val=lucid ;;
631 a | at | ath | athe | athen | athena ) val=athena ;;
632 m | mo | mot | moti | motif ) val=motif ;;
634 { echo "configure: error: \`--with-x-toolkit=$withval' is invalid\;
635 this option's value should be \`yes', \`no', \`lucid', \`athena', or \`motif'.
636 Currently, \`yes', \`athena' and \`lucid' are synonyms." 1>&2; exit 1; }
638 esac
639 with_x_toolkit=$val
643 # Check whether --with-xpm or --without-xpm was given.
644 if test "${with_xpm+set}" = set; then
645 withval="$with_xpm"
649 # Check whether --with-jpeg or --without-jpeg was given.
650 if test "${with_jpeg+set}" = set; then
651 withval="$with_jpeg"
655 # Check whether --with-tiff or --without-tiff was given.
656 if test "${with_tiff+set}" = set; then
657 withval="$with_tiff"
661 # Check whether --with-gif or --without-gif was given.
662 if test "${with_gif+set}" = set; then
663 withval="$with_gif"
667 # Check whether --with-png or --without-png was given.
668 if test "${with_png+set}" = set; then
669 withval="$with_png"
673 # Check whether --with-toolkit-scroll-bars or --without-toolkit-scroll-bars was given.
674 if test "${with_toolkit_scroll_bars+set}" = set; then
675 withval="$with_toolkit_scroll_bars"
679 # Check whether --with-xim or --without-xim was given.
680 if test "${with_xim+set}" = set; then
681 withval="$with_xim"
686 #### Make srcdir absolute, if it isn't already. It's important to
687 #### avoid running the path through pwd unnecessarily, since pwd can
688 #### give you automounter prefixes, which can go away. We do all this
689 #### so Emacs can find its files when run uninstalled.
690 ## Make sure CDPATH doesn't affect cd (in case PWD is relative).
691 unset CDPATH
692 case "${srcdir}" in
693 /* ) ;;
695 ## We may be able to use the $PWD environment variable to make this
696 ## absolute. But sometimes PWD is inaccurate.
697 if test ".${PWD}" != "." && test ".`(cd ${PWD} ; sh -c pwd)`" = ".${PWD}" ;
698 then
699 srcdir="$PWD"
700 else
701 srcdir="`(cd ${srcdir}; pwd)`"
704 * ) srcdir="`(cd ${srcdir}; pwd)`" ;;
705 esac
707 #### Check if the source directory already has a configured system in it.
708 if test `pwd` != `(cd ${srcdir} && pwd)` \
709 && test -f "${srcdir}/src/config.h" ; then
710 echo "configure: warning: The directory tree \`${srcdir}' is being used
711 as a build directory right now; it has been configured in its own
712 right. To configure in another directory as well, you MUST
713 use GNU make. If you do not have GNU make, then you must
714 now do \`make distclean' in ${srcdir},
715 and then run $0 again." 1>&2
717 extrasub='/^VPATH[ ]*=/c\
718 vpath %.c $(srcdir)\
719 vpath %.h $(srcdir)\
720 vpath %.y $(srcdir)\
721 vpath %.l $(srcdir)\
722 vpath %.s $(srcdir)\
723 vpath %.in $(srcdir)\
724 vpath %.texi $(srcdir)'
727 #### Given the configuration name, set machfile and opsysfile to the
728 #### names of the m/*.h and s/*.h files we should use.
730 ### Canonicalize the configuration name.
732 ac_aux_dir=
733 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
734 if test -f $ac_dir/install-sh; then
735 ac_aux_dir=$ac_dir
736 ac_install_sh="$ac_aux_dir/install-sh -c"
737 break
738 elif test -f $ac_dir/install.sh; then
739 ac_aux_dir=$ac_dir
740 ac_install_sh="$ac_aux_dir/install.sh -c"
741 break
743 done
744 if test -z "$ac_aux_dir"; then
745 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
747 ac_config_guess=$ac_aux_dir/config.guess
748 ac_config_sub=$ac_aux_dir/config.sub
749 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
752 # Make sure we can run config.sub.
753 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
754 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
757 echo $ac_n "checking host system type""... $ac_c" 1>&6
758 echo "configure:759: checking host system type" >&5
760 host_alias=$host
761 case "$host_alias" in
762 NONE)
763 case $nonopt in
764 NONE)
765 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
766 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
767 fi ;;
768 *) host_alias=$nonopt ;;
769 esac ;;
770 esac
772 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
773 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
774 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
775 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
776 echo "$ac_t""$host" 1>&6
778 canonical=$host
779 configuration=$host_alias
782 ### If you add support for a new configuration, add code to this
783 ### switch statement to recognize your configuration name and select
784 ### the appropriate operating system and machine description files.
786 ### You would hope that you could choose an m/*.h file pretty much
787 ### based on the machine portion of the configuration name, and an s-
788 ### file based on the operating system portion. However, it turns out
789 ### that each m/*.h file is pretty manufacturer-specific - for
790 ### example, apollo.h, hp9000s300.h, mega68k, news.h, and tad68k are
791 ### all 68000 machines; mips.h, pmax.h, and news-risc are all MIPS
792 ### machines. So we basically have to have a special case for each
793 ### configuration name.
795 ### As far as handling version numbers on operating systems is
796 ### concerned, make sure things will fail in a fixable way. If
797 ### /etc/MACHINES doesn't say anything about version numbers, be
798 ### prepared to handle anything reasonably. If version numbers
799 ### matter, be sure /etc/MACHINES says something about it.
801 ### Eric Raymond says we should accept strings like "sysvr4" to mean
802 ### "System V Release 4"; he writes, "The old convention encouraged
803 ### confusion between `system' and `release' levels'."
805 machine='' opsys='' unported=no
806 case "${canonical}" in
808 ## NetBSD ports
809 *-*-netbsd* )
810 opsys=netbsd
811 case "${canonical}" in
812 alpha*-*-netbsd*) machine=alpha ;;
813 i[3456]86-*-netbsd*) machine=intel386 ;;
814 m68k-*-netbsd*)
815 # This is somewhat bogus.
816 machine=hp9000s300 ;;
817 powerpc-apple-netbsd*) machine=macppc ;;
818 mips-*-netbsd*) machine=pmax ;;
819 mipsel-*-netbsd*) machine=pmax ;;
820 ns32k-*-netbsd*) machine=ns32000 ;;
821 powerpc-*-netbsd*) machine=macppc ;;
822 sparc*-*-netbsd*) machine=sparc ;;
823 vax-*-netbsd*) machine=vax ;;
824 arm-*-netbsd*) machine=arm ;;
825 esac
828 ## OpenBSD ports
829 *-*-openbsd* )
830 opsys=openbsd
831 case "${canonical}" in
832 alpha*-*-openbsd*) machine=alpha ;;
833 i386-*-openbsd*) machine=intel386 ;;
834 m68k-*-openbsd*) machine=hp9000s300 ;;
835 mipsel-*-openbsd*) machine=pmax ;;
836 ns32k-*-openbsd*) machine=ns32000 ;;
837 sparc-*-openbsd*) machine=sparc ;;
838 vax-*-openbsd*) machine=vax ;;
839 esac
842 ## Acorn RISCiX:
843 arm-acorn-riscix1.1* )
844 machine=acorn opsys=riscix1-1
846 arm-acorn-riscix1.2* | arm-acorn-riscix )
847 ## This name is riscix12 instead of riscix1.2
848 ## to avoid a file name conflict on MSDOS.
849 machine=acorn opsys=riscix12
852 ## BSDI ports
853 *-*-bsdi* )
854 opsys=bsdi
855 case "${canonical}" in
856 i[345]86-*-bsdi*) machine=intel386 ;;
857 sparc-*-bsdi*) machine=sparc ;;
858 powerpc-*-bsdi*) machine=macppc ;;
859 esac
860 case "${canonical}" in
861 *-*-bsd386* | *-*-bsdi1* ) opsys=bsd386 ;;
862 *-*-bsdi2.0* ) opsys=bsdos2 ;;
863 *-*-bsdi2* ) opsys=bsdos2-1 ;;
864 *-*-bsdi3* ) opsys=bsdos3 ;;
865 *-*-bsdi[45]* ) opsys=bsdos4 ;;
866 esac
869 ## Alliant machines
870 ## Strictly speaking, we need the version of the alliant operating
871 ## system to choose the right machine file, but currently the
872 ## configuration name doesn't tell us enough to choose the right
873 ## one; we need to give alliants their own operating system name to
874 ## do this right. When someone cares, they can help us.
875 fx80-alliant-* )
876 machine=alliant4 opsys=bsd4-2
878 i860-alliant-* )
879 machine=alliant-2800 opsys=bsd4-3
882 ## Alpha (DEC) machines.
883 alpha*-dec-osf* )
884 machine=alpha opsys=osf1
885 # This is needed to find X11R6.1 libraries for certain tests.
886 NON_GCC_LINK_TEST_OPTIONS=-Wl,-rpath,/usr/X11R6/lib
887 GCC_LINK_TEST_OPTIONS=-Wl,-rpath,/usr/X11R6/lib
888 # NON_GNU_CPP is necessary on 5.0 to avoid mangling src/Makefile
889 # due to non-traditional preprocessing with the current compiler
890 # defaults. OSF 4 can also have that compiler version, and there
891 # seems always to have been a usable /usr/bin/cpp.
892 NON_GNU_CPP=/usr/bin/cpp
893 case "${canonical}" in
894 alpha*-dec-osf[5-9]*)
895 opsys=osf5-0 ;;
896 esac
899 alpha*-*-linux-gnu* )
900 machine=alpha opsys=gnu-linux
903 arm*-*-linux-gnu* )
904 machine=arm opsys=gnu-linux
907 ppc-*-linux | \
908 powerpc-*-linux* )
909 machine=macppc opsys=gnu-linux
912 ## Altos 3068
913 m68*-altos-sysv* )
914 machine=altos opsys=usg5-2
917 ## Amdahl UTS
918 580-amdahl-sysv* )
919 machine=amdahl opsys=usg5-2-2
922 ## Apollo, Domain/OS
923 m68*-apollo-* )
924 machine=apollo opsys=bsd4-3
927 ## AT&T 3b2, 3b5, 3b15, 3b20
928 we32k-att-sysv* )
929 machine=att3b opsys=usg5-2-2
932 ## AT&T 3b1 - The Mighty Unix PC!
933 m68*-att-sysv* )
934 machine=7300 opsys=usg5-2-2
937 ## Bull dpx20
938 rs6000-bull-bosx* )
939 machine=ibmrs6000 opsys=aix3-2
942 ## Bull dpx2
943 m68*-bull-sysv3* )
944 machine=dpx2 opsys=usg5-3
947 ## Bull sps7
948 m68*-bull-sysv2* )
949 machine=sps7 opsys=usg5-2
952 ## CCI 5/32, 6/32 -- see "Tahoe".
954 ## Celerity
955 ## I don't know what configuration name to use for this; config.sub
956 ## doesn't seem to know anything about it. Hey, Celerity users, get
957 ## in touch with us!
958 celerity-celerity-bsd* )
959 machine=celerity opsys=bsd4-2
962 ## Clipper
963 ## What operating systems does this chip run that Emacs has been
964 ## tested on?
965 clipper-* )
966 machine=clipper
967 ## We'll use the catch-all code at the bottom to guess the
968 ## operating system.
971 ## Convex
972 *-convex-bsd* | *-convex-convexos* )
973 machine=convex opsys=bsd4-3
974 ## Prevents spurious white space in makefiles - d.m.cooke@larc.nasa.gov
975 NON_GNU_CPP="cc -E -P"
978 ## Cubix QBx/386
979 i[3456]86-cubix-sysv* )
980 machine=intel386 opsys=usg5-3
983 ## Cydra 5
984 cydra*-cydrome-sysv* )
985 machine=cydra5 opsys=usg5-3
988 ## Data General AViiON Machines
989 ## DG changed naming conventions with the release of 5.4.4.10, they
990 ## dropped the initial 5.4 but left the intervening R. Because of the
991 ## R this shouldn't conflict with older versions of the OS (which I
992 ## think were named like dgux4.*). In addition, DG new AViiONs series
993 ## uses either Motorola M88k or Intel Pentium CPUs.
994 m88k-dg-dguxR4.* | m88k-dg-dgux4* )
995 machine=aviion opsys=dgux4
997 m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* )
998 ## This name is dgux5-4-3 instead of dgux5-4r3
999 ## to avoid a file name conflict on MSDOS.
1000 machine=aviion opsys=dgux5-4-3
1002 m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* )
1003 machine=aviion opsys=dgux5-4r2
1005 m88k-dg-dgux* )
1006 machine=aviion opsys=dgux
1009 ## Data General AViiON Intel (x86) Machines
1010 ## Exists from 5.4.3 (current i586-dg-dguxR4.11)
1011 ## Ehud Karni, 1998-may-30, ehud@unix.simonwiesel.co.il
1012 i[345]86-dg-dguxR4* )
1013 machine=aviion-intel opsys=dgux4
1016 ## DECstations
1017 mips-dec-ultrix[0-3].* | mips-dec-ultrix4.0* | mips-dec-bsd4.2* )
1018 machine=pmax opsys=bsd4-2
1020 mips-dec-ultrix4.[12]* | mips-dec-bsd* )
1021 machine=pmax opsys=bsd4-3
1023 mips-dec-ultrix* )
1024 machine=pmax opsys=ultrix4-3
1026 mips-dec-osf* )
1027 machine=pmax opsys=osf1
1029 mips-dec-mach_bsd4.3* )
1030 machine=pmax opsys=mach-bsd4-3
1033 ## Motorola Delta machines
1034 m68k-motorola-sysv* | m68000-motorola-sysv* )
1035 machine=delta opsys=usg5-3
1036 if test -z "`type gnucc | grep 'not found'`"
1037 then
1038 if test -s /etc/167config
1039 then CC="gnucc -m68040"
1040 else CC="gnucc -m68881"
1042 else
1043 if test -z "`type gcc | grep 'not found'`"
1044 then CC=gcc
1045 else CC=cc
1049 m88k-motorola-sysv4* )
1050 # jbotte@bnr.ca says that UNIX_System_V <hostName> 4.0 R40V4.3 m88k mc88110
1051 # needs POSIX_SIGNALS and therefore needs usg5-4-2.
1052 # I hope there are not other 4.0 versions for this machine
1053 # which really need usg5-4 instead.
1054 machine=delta88k opsys=usg5-4-2
1056 m88k-motorola-sysv* | m88k-motorola-m88kbcs* )
1057 machine=delta88k opsys=usg5-3
1060 ## Dual machines
1061 m68*-dual-sysv* )
1062 machine=dual opsys=usg5-2
1064 m68*-dual-uniplus* )
1065 machine=dual opsys=unipl5-2
1068 ## Elxsi 6400
1069 elxsi-elxsi-sysv* )
1070 machine=elxsi opsys=usg5-2
1073 ## Encore machines
1074 ns16k-encore-bsd* )
1075 machine=ns16000 opsys=umax
1078 ## The GEC 63 - apparently, this port isn't really finished yet.
1079 # I'm sure we finished off the last of the machines, though. -- fx
1081 ## Gould Power Node and NP1
1082 pn-gould-bsd4.2* )
1083 machine=gould opsys=bsd4-2
1085 pn-gould-bsd4.3* )
1086 machine=gould opsys=bsd4-3
1088 np1-gould-bsd* )
1089 machine=gould-np1 opsys=bsd4-3
1092 ## Harris Night Hawk machines running CX/UX (a 5000 looks just like a 4000
1093 ## as far as Emacs is concerned).
1094 m88k-harris-cxux* )
1095 # Build needs to be different on 7.0 and later releases
1096 case "`uname -r`" in
1097 [56].[0-9] ) machine=nh4000 opsys=cxux ;;
1098 [7].[0-9] ) machine=nh4000 opsys=cxux7 ;;
1099 esac
1100 NON_GNU_CPP="/lib/cpp"
1102 ## Harris ecx or gcx running CX/UX (Series 1200, Series 3000)
1103 m68k-harris-cxux* )
1104 machine=nh3000 opsys=cxux
1106 ## Harris power pc NightHawk running Power UNIX (Series 6000)
1107 powerpc-harris-powerunix )
1108 machine=nh6000 opsys=powerunix
1109 NON_GNU_CPP="cc -Xo -E -P"
1111 ## SR2001/SR2201 running HI-UX/MPP
1112 hppa1.1-hitachi-hiuxmpp* )
1113 machine=sr2k opsys=hiuxmpp
1115 hppa1.1-hitachi-hiuxwe2* )
1116 machine=sr2k opsys=hiuxwe2
1118 ## Honeywell XPS100
1119 xps*-honeywell-sysv* )
1120 machine=xps100 opsys=usg5-2
1123 ## HP 9000 series 200 or 300
1124 m68*-hp-bsd* )
1125 machine=hp9000s300 opsys=bsd4-3
1127 ## HP/UX 7, 8, 9, and 10 are supported on these machines.
1128 m68*-hp-hpux* )
1129 case "`uname -r`" in
1130 ## Someone's system reports A.B8.05 for this.
1131 ## I wonder what other possibilities there are.
1132 *.B8.* ) machine=hp9000s300 opsys=hpux8 ;;
1133 *.08.* ) machine=hp9000s300 opsys=hpux8 ;;
1134 *.09.* ) machine=hp9000s300 opsys=hpux9 ;;
1135 *.1[0-9].* ) machine=hp9000s300 opsys=hpux9shr ;;
1136 *) machine=hp9000s300 opsys=hpux ;;
1137 esac
1140 ## HP 9000 series 700 and 800, running HP/UX
1141 hppa*-hp-hpux7* )
1142 machine=hp800 opsys=hpux
1144 hppa*-hp-hpux8* )
1145 machine=hp800 opsys=hpux8
1147 hppa*-hp-hpux9shr* )
1148 machine=hp800 opsys=hpux9shr
1150 hppa*-hp-hpux9* )
1151 machine=hp800 opsys=hpux9
1154 hppa*-hp-hpux10* )
1155 machine=hp800 opsys=hpux10
1157 hppa*-hp-hpux1[1-9]* )
1158 machine=hp800 opsys=hpux11
1161 ## HP 9000 series 700 and 800, running HP/UX
1162 hppa*-hp-hpux* )
1163 ## Cross-compilation? Nah!
1164 case "`uname -r`" in
1165 ## Someone's system reports A.B8.05 for this.
1166 ## I wonder what other possibilities there are.
1167 *.B8.* ) machine=hp800 opsys=hpux8 ;;
1168 *.08.* ) machine=hp800 opsys=hpux8 ;;
1169 *.09.* ) machine=hp800 opsys=hpux9 ;;
1170 *) machine=hp800 opsys=hpux10 ;;
1171 esac
1173 hppa*-*-nextstep* )
1174 machine=hp800 opsys=nextstep
1177 ## Orion machines
1178 orion-orion-bsd* )
1179 machine=orion opsys=bsd4-2
1181 clipper-orion-bsd* )
1182 machine=orion105 opsys=bsd4-2
1185 ## IBM machines
1186 i[3456]86-ibm-aix1.1* )
1187 machine=ibmps2-aix opsys=usg5-2-2
1189 i[3456]86-ibm-aix1.[23]* | i[3456]86-ibm-aix* )
1190 machine=ibmps2-aix opsys=usg5-3
1192 i370-ibm-aix*)
1193 machine=ibm370aix opsys=usg5-3
1195 rs6000-ibm-aix3.1* | powerpc-ibm-aix3.1* )
1196 machine=ibmrs6000 opsys=aix3-1
1198 rs6000-ibm-aix3.2.5 | powerpc-ibm-aix3.2.5 )
1199 machine=ibmrs6000 opsys=aix3-2-5
1201 rs6000-ibm-aix4.1* | powerpc-ibm-aix4.1* )
1202 machine=ibmrs6000 opsys=aix4-1
1204 rs6000-ibm-aix4.2* | powerpc-ibm-aix4.2* )
1205 machine=ibmrs6000 opsys=aix4-2
1207 rs6000-ibm-aix5.1* | powerpc-ibm-aix5.1* )
1208 machine=ibmrs6000 opsys=aix4-2
1210 rs6000-ibm-aix4.0* | powerpc-ibm-aix4.0* )
1211 machine=ibmrs6000 opsys=aix4
1213 rs6000-ibm-aix4* | powerpc-ibm-aix4* )
1214 machine=ibmrs6000 opsys=aix4-1
1216 rs6000-ibm-aix* | powerpc-ibm-aix* )
1217 machine=ibmrs6000 opsys=aix3-2
1219 romp-ibm-bsd4.3* )
1220 machine=ibmrt opsys=bsd4-3
1222 romp-ibm-bsd4.2* )
1223 machine=ibmrt opsys=bsd4-2
1225 romp-ibm-aos4.3* )
1226 machine=ibmrt opsys=bsd4-3
1228 romp-ibm-aos4.2* )
1229 machine=ibmrt opsys=bsd4-2
1231 romp-ibm-aos* )
1232 machine=ibmrt opsys=bsd4-3
1234 romp-ibm-bsd* )
1235 machine=ibmrt opsys=bsd4-3
1237 romp-ibm-aix* )
1238 machine=ibmrt-aix opsys=usg5-2-2
1241 ## Integrated Solutions `Optimum V'
1242 m68*-isi-bsd4.2* )
1243 machine=isi-ov opsys=bsd4-2
1245 m68*-isi-bsd4.3* )
1246 machine=isi-ov opsys=bsd4-3
1249 ## Intel 386 machines where we do care about the manufacturer
1250 i[3456]86-intsys-sysv* )
1251 machine=is386 opsys=usg5-2-2
1254 ## Prime EXL
1255 i[3456]86-prime-sysv* )
1256 machine=i386 opsys=usg5-3
1259 ## Sequent Symmetry running Dynix
1260 i[3456]86-sequent-bsd* )
1261 machine=symmetry opsys=bsd4-3
1264 ## Sequent Symmetry running ptx 4, which is a modified SVR4.
1265 i[3456]86-sequent-ptx4* | i[3456]86-sequent-sysv4* )
1266 machine=sequent-ptx opsys=ptx4
1267 NON_GNU_CPP=/lib/cpp
1270 ## Sequent Symmetry running DYNIX/ptx
1271 ## Use the old cpp rather than the newer ANSI one.
1272 i[3456]86-sequent-ptx* )
1273 machine=sequent-ptx opsys=ptx
1274 NON_GNU_CPP="/lib/cpp"
1277 ## ncr machine running svr4.3.
1278 i[3456]86-ncr-sysv4.3 )
1279 machine=ncr386 opsys=usg5-4-3
1282 ## Unspecified sysv on an ncr machine defaults to svr4.2.
1283 ## (Plain usg5-4 doesn't turn on POSIX signals, which we need.)
1284 i[3456]86-ncr-sysv* )
1285 machine=ncr386 opsys=usg5-4-2
1288 ## Intel Paragon OSF/1
1289 i860-intel-osf1* )
1290 machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp
1293 ## Intel 860
1294 i860-*-sysv4* )
1295 machine=i860 opsys=usg5-4
1296 NON_GNU_CC="/bin/cc" # Ie, not the one in /usr/ucb/cc.
1297 NON_GNU_CPP="/usr/ccs/lib/cpp" # cc -E tokenizes macro expansion.
1300 ## Macintosh PowerPC
1301 powerpc*-*-linux-gnu* )
1302 machine=macppc opsys=gnu-linux
1305 ## Masscomp machines
1306 m68*-masscomp-rtu* )
1307 machine=masscomp opsys=rtu
1310 ## Megatest machines
1311 m68*-megatest-bsd* )
1312 machine=mega68 opsys=bsd4-2
1315 ## Workstations sold by MIPS
1316 ## This is not necessarily all workstations using the MIPS processor -
1317 ## Irises are produced by SGI, and DECstations by DEC.
1319 ## etc/MACHINES lists mips.h and mips4.h as possible machine files,
1320 ## and usg5-2-2 and bsd4-3 as possible OS files. The only guidance
1321 ## it gives for choosing between the alternatives seems to be "Use
1322 ## -machine=mips4 for RISCOS version 4; use -opsystem=bsd4-3 with
1323 ## the BSD world." I'll assume that these are instructions for
1324 ## handling two odd situations, and that every other situation
1325 ## should use mips.h and usg5-2-2, they being listed first.
1326 mips-mips-usg* )
1327 machine=mips4
1328 ## Fall through to the general code at the bottom to decide on the OS.
1330 mips-mips-riscos4* )
1331 machine=mips4 opsys=bsd4-3
1332 NON_GNU_CC="cc -systype bsd43"
1333 NON_GNU_CPP="cc -systype bsd43 -E"
1335 mips-mips-riscos5* )
1336 machine=mips4 opsys=riscos5
1337 NON_GNU_CC="cc -systype bsd43"
1338 NON_GNU_CPP="cc -systype bsd43 -E"
1340 mips-mips-bsd* )
1341 machine=mips opsys=bsd4-3
1343 mips-mips-* )
1344 machine=mips opsys=usg5-2-2
1347 ## NeXT
1348 m68*-next-* | m68k-*-nextstep* )
1349 machine=m68k opsys=nextstep
1352 ## The complete machine from National Semiconductor
1353 ns32k-ns-genix* )
1354 machine=ns32000 opsys=usg5-2
1357 ## NCR machines
1358 m68*-ncr-sysv2* | m68*-ncr-sysvr2* )
1359 machine=tower32 opsys=usg5-2-2
1361 m68*-ncr-sysv3* | m68*-ncr-sysvr3* )
1362 machine=tower32v3 opsys=usg5-3
1365 ## NEC EWS4800
1366 mips-nec-sysv4*)
1367 machine=ews4800 opsys=ux4800
1370 ## Nixdorf Targon 31
1371 m68*-nixdorf-sysv* )
1372 machine=targon31 opsys=usg5-2-2
1375 ## Nu (TI or LMI)
1376 m68*-nu-sysv* )
1377 machine=nu opsys=usg5-2
1380 ## Plexus
1381 m68*-plexus-sysv* )
1382 machine=plexus opsys=usg5-2
1385 ## PowerPC reference platform
1386 powerpcle-*-solaris2* )
1387 machine=prep
1388 opsys=sol2-5
1391 ## Pyramid machines
1392 ## I don't really have any idea what sort of processor the Pyramid has,
1393 ## so I'm assuming it is its own architecture.
1394 pyramid-pyramid-bsd* )
1395 machine=pyramid opsys=bsd4-2
1398 ## Sequent Balance
1399 ns32k-sequent-bsd4.2* )
1400 machine=sequent opsys=bsd4-2
1402 ns32k-sequent-bsd4.3* )
1403 machine=sequent opsys=bsd4-3
1406 ## Siemens Nixdorf
1407 mips-siemens-sysv* | mips-sni-sysv*)
1408 machine=mips-siemens opsys=usg5-4
1409 NON_GNU_CC=/usr/ccs/bin/cc
1410 NON_GNU_CPP=/usr/ccs/lib/cpp
1413 ## Silicon Graphics machines
1414 ## Iris 2500 and Iris 2500 Turbo (aka the Iris 3030)
1415 m68*-sgi-iris3.5* )
1416 machine=irist opsys=iris3-5
1418 m68*-sgi-iris3.6* | m68*-sgi-iris*)
1419 machine=irist opsys=iris3-6
1421 ## Iris 4D
1422 mips-sgi-irix3* )
1423 machine=iris4d opsys=irix3-3
1425 mips-sgi-irix4* )
1426 machine=iris4d opsys=irix4-0
1428 mips-sgi-irix6.5 )
1429 machine=iris4d opsys=irix6-5
1430 # Without defining _LANGUAGE_C, things get masked out in the headers
1431 # so that, for instance, grepping for `free' in stdlib.h fails and
1432 # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
1433 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
1434 NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C"
1436 mips-sgi-irix6* )
1437 machine=iris4d opsys=irix6-0
1438 # It's not clear whether -D_LANGUAGE_C is necessary as it is for 6.5,
1439 # but presumably it does no harm.
1440 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
1441 # -32 probably isn't necessary in later v.6s -- anyone know which?
1442 NON_GCC_TEST_OPTIONS=-32
1444 mips-sgi-irix5.[01]* )
1445 machine=iris4d opsys=irix5-0
1447 mips-sgi-irix5* | mips-sgi-irix* )
1448 machine=iris4d opsys=irix5-2
1451 ## SONY machines
1452 m68*-sony-bsd4.2* )
1453 machine=news opsys=bsd4-2
1455 m68*-sony-bsd4.3* )
1456 machine=news opsys=bsd4-3
1458 m68*-sony-newsos3* | m68*-sony-news3*)
1459 machine=news opsys=bsd4-3
1461 mips-sony-bsd* | mips-sony-newsos4* | mips-sony-news4*)
1462 machine=news-risc opsys=bsd4-3
1464 mips-sony-newsos6* )
1465 machine=news-r6 opsys=newsos6
1467 mips-sony-news* )
1468 machine=news-risc opsys=newsos5
1471 ## Stride
1472 m68*-stride-sysv* )
1473 machine=stride opsys=usg5-2
1476 ## Suns
1477 sparc-*-linux-gnu* | sparc64-*-linux-gnu* )
1478 machine=sparc opsys=gnu-linux
1481 *-auspex-sunos* | *-sun-sunos* | *-sun-bsd* | *-sun-solaris* \
1482 | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* | powerpc*-*-solaris2* \
1483 | rs6000-*-solaris2*)
1484 case "${canonical}" in
1485 m68*-sunos1* ) machine=sun1 ;;
1486 m68*-sunos2* ) machine=sun2 ;;
1487 m68* ) machine=sun3 ;;
1488 i[3456]86-sun-sunos[34]* ) machine=sun386 ;;
1489 i[3456]86-*-* ) machine=intel386 ;;
1490 powerpcle* ) machine=powerpcle ;;
1491 powerpc* | rs6000* ) machine=ibmrs6000 ;;
1492 sparc* ) machine=sparc ;;
1493 * ) unported=yes ;;
1494 esac
1495 case "${canonical}" in
1496 ## The Sun386 didn't get past 4.0.
1497 i[3456]86-*-sunos4 ) opsys=sunos4-0 ;;
1498 *-sunos4.0* ) opsys=sunos4-0 ;;
1499 *-sunos4.1.[3-9]*noshare )
1500 ## This name is sunos413 instead of sunos4-1-3
1501 ## to avoid a file name conflict on MSDOS.
1502 opsys=sunos413
1503 NON_GNU_CPP=/usr/lib/cpp
1504 NON_GCC_TEST_OPTIONS=-Bstatic
1505 GCC_TEST_OPTIONS=-static
1507 *-sunos4.1.[3-9]* | *-sunos4shr*)
1508 opsys=sunos4shr
1509 NON_GNU_CPP=/usr/lib/cpp
1511 *-sunos4* | *-sunos )
1512 opsys=sunos4-1
1513 NON_GCC_TEST_OPTIONS=-Bstatic
1514 GCC_TEST_OPTIONS=-static
1516 *-sunos5.3* | *-solaris2.3* )
1517 opsys=sol2-3
1518 NON_GNU_CPP=/usr/ccs/lib/cpp
1520 *-sunos5.4* | *-solaris2.4* )
1521 opsys=sol2-4
1522 NON_GNU_CPP=/usr/ccs/lib/cpp
1523 RANLIB="ar -ts"
1525 *-sunos5.5* | *-solaris2.5* )
1526 opsys=sol2-5
1527 NON_GNU_CPP=/usr/ccs/lib/cpp
1528 RANLIB="ar -ts"
1530 *-sunos5* | *-solaris* )
1531 opsys=sol2-5
1532 NON_GNU_CPP=/usr/ccs/lib/cpp
1534 * ) opsys=bsd4-2 ;;
1535 esac
1536 ## Watch out for a compiler that we know will not work.
1537 case "${canonical}" in
1538 *-solaris* | *-sunos5* )
1539 if [ "x$CC" = x/usr/ucb/cc ]; then
1540 ## /usr/ucb/cc doesn't work;
1541 ## we should find some other compiler that does work.
1542 unset CC
1545 *) ;;
1546 esac
1548 sparc-*-nextstep* )
1549 machine=sparc opsys=nextstep
1552 ## Tadpole 68k
1553 m68*-tadpole-sysv* )
1554 machine=tad68k opsys=usg5-3
1557 ## Tahoe machines
1558 tahoe-tahoe-bsd4.2* )
1559 machine=tahoe opsys=bsd4-2
1561 tahoe-tahoe-bsd4.3* )
1562 machine=tahoe opsys=bsd4-3
1565 ## Tandem Integrity S2
1566 mips-tandem-sysv* )
1567 machine=tandem-s2 opsys=usg5-3
1570 ## Tektronix XD88
1571 m88k-tektronix-sysv3* )
1572 machine=tekxd88 opsys=usg5-3
1575 ## Tektronix 16000 box (6130?)
1576 ns16k-tektronix-bsd* )
1577 machine=ns16000 opsys=bsd4-2
1579 ## Tektronix 4300
1580 ## src/m/tek4300.h hints that this is a m68k machine.
1581 m68*-tektronix-bsd* )
1582 machine=tek4300 opsys=bsd4-3
1585 ## Titan P2 or P3
1586 ## We seem to have lost the machine-description file titan.h!
1587 titan-titan-sysv* )
1588 machine=titan opsys=usg5-3
1591 ## Ustation E30 (SS5E)
1592 m68*-unisys-uniplus* )
1593 machine=ustation opsystem=unipl5-2
1596 ## Vaxen.
1597 vax-dec-* )
1598 machine=vax
1599 case "${canonical}" in
1600 *-bsd4.1* ) opsys=bsd4-1 ;;
1601 *-bsd4.2* | *-ultrix[0-3].* | *-ultrix4.0* ) opsys=bsd4-2 ;;
1602 *-bsd4.3* | *-ultrix* ) opsys=bsd4-3 ;;
1603 *-sysv[01]* | *-sysvr[01]* ) opsys=usg5-0 ;;
1604 *-sysv2* | *-sysvr2* ) opsys=usg5-2 ;;
1605 *-vms* ) opsys=vms ;;
1606 * ) unported=yes
1607 esac
1610 ## Whitechapel MG1
1611 ns16k-whitechapel-* )
1612 machine=mg1
1613 ## We don't know what sort of OS runs on these; we'll let the
1614 ## operating system guessing code below try.
1617 ## Wicat
1618 m68*-wicat-sysv* )
1619 machine=wicat opsys=usg5-2
1622 ## IA-64
1623 ia64*-*-linux* )
1624 machine=ia64 opsys=gnu-linux
1627 ## Intel 386 machines where we don't care about the manufacturer
1628 i[3456]86-*-* )
1629 machine=intel386
1630 case "${canonical}" in
1631 *-lynxos* ) opsys=lynxos ;;
1632 *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
1633 *-isc2.2* ) opsys=isc2-2 ;;
1634 *-isc4.0* ) opsys=isc4-0 ;;
1635 *-isc4.* ) opsys=isc4-1
1636 GCC_TEST_OPTIONS=-posix
1637 NON_GCC_TEST_OPTIONS=-Xp
1639 *-isc* ) opsys=isc3-0 ;;
1640 *-esix5* ) opsys=esix5r4; NON_GNU_CPP=/usr/lib/cpp ;;
1641 *-esix* ) opsys=esix ;;
1642 *-xenix* ) opsys=xenix ;;
1643 *-linux-gnu* ) opsys=gnu-linux ;;
1644 *-sco3.2v4* ) opsys=sco4 ; NON_GNU_CPP=/lib/cpp ;;
1645 *-sco3.2v5* ) opsys=sco5
1646 NON_GNU_CPP=/lib/cpp
1647 # Prevent -belf from being passed to $CPP.
1648 # /lib/cpp does not accept it.
1649 OVERRIDE_CPPFLAGS=" "
1651 *-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
1652 *-386bsd* ) opsys=386bsd ;;
1653 *-freebsd* ) opsys=freebsd ;;
1654 *-nextstep* ) opsys=nextstep ;;
1655 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
1656 esac
1659 ## m68k Linux-based GNU system
1660 m68k-*-linux-gnu* )
1661 machine=m68k opsys=gnu-linux
1664 ## Mips Linux-based GNU system
1665 mips-*-linux-gnu* )
1666 machine=mips opsys=gnu-linux
1669 ## UXP/DS
1670 sparc-fujitsu-sysv4* )
1671 machine=sparc opsys=uxpds
1672 NON_GNU_CPP=/usr/ccs/lib/cpp
1673 RANLIB="ar -ts"
1676 ## UXP/V
1677 f301-fujitsu-uxpv4.1)
1678 machine=f301 opsys=uxpv
1682 unported=yes
1684 esac
1686 ### If the code above didn't choose an operating system, just choose
1687 ### an operating system based on the configuration name. You really
1688 ### only want to use this when you have no idea what the right
1689 ### operating system is; if you know what operating systems a machine
1690 ### runs, it's cleaner to make it explicit in the case statement
1691 ### above.
1692 if test x"${opsys}" = x; then
1693 case "${canonical}" in
1694 *-gnu* ) opsys=gnu ;;
1695 *-bsd4.[01] ) opsys=bsd4-1 ;;
1696 *-bsd4.2 ) opsys=bsd4-2 ;;
1697 *-bsd4.3 ) opsys=bsd4-3 ;;
1698 *-sysv0 | *-sysvr0 ) opsys=usg5-0 ;;
1699 *-sysv2 | *-sysvr2 ) opsys=usg5-2 ;;
1700 *-sysv2.2 | *-sysvr2.2 ) opsys=usg5-2-2 ;;
1701 *-sysv3* | *-sysvr3* ) opsys=usg5-3 ;;
1702 *-sysv4.2uw* ) opsys=unixware ;;
1703 *-sysv4.1* | *-sysvr4.1* )
1704 NON_GNU_CPP=/usr/lib/cpp
1705 opsys=usg5-4 ;;
1706 *-sysv4.[2-9]* | *-sysvr4.[2-9]* )
1707 if [ x$NON_GNU_CPP = x ]; then
1708 if [ -f /usr/ccs/lib/cpp ]; then
1709 NON_GNU_CPP=/usr/ccs/lib/cpp
1710 else
1711 NON_GNU_CPP=/lib/cpp
1714 opsys=usg5-4-2 ;;
1715 *-sysv4* | *-sysvr4* ) opsys=usg5-4 ;;
1717 unported=yes
1719 esac
1723 if test $unported = yes; then
1724 { echo "configure: error: Emacs hasn't been ported to \`${canonical}' systems.
1725 Check \`etc/MACHINES' for recognized configuration names." 1>&2; exit 1; }
1728 machfile="m/${machine}.h"
1729 opsysfile="s/${opsys}.h"
1732 #### Choose a compiler.
1733 test -n "$CC" && cc_specified=yes
1735 # Save the value of CFLAGS that the user specified.
1736 SPECIFIED_CFLAGS="$CFLAGS"
1738 case ${with_gcc} in
1739 "yes" ) CC="gcc" GCC=yes ;;
1740 "no" ) : ${CC=cc} ;;
1741 * ) # Extract the first word of "gcc", so it can be a program name with args.
1742 set dummy gcc; ac_word=$2
1743 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1744 echo "configure:1745: checking for $ac_word" >&5
1745 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1746 echo $ac_n "(cached) $ac_c" 1>&6
1747 else
1748 if test -n "$CC"; then
1749 ac_cv_prog_CC="$CC" # Let the user override the test.
1750 else
1751 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1752 ac_dummy="$PATH"
1753 for ac_dir in $ac_dummy; do
1754 test -z "$ac_dir" && ac_dir=.
1755 if test -f $ac_dir/$ac_word; then
1756 ac_cv_prog_CC="gcc"
1757 break
1759 done
1760 IFS="$ac_save_ifs"
1763 CC="$ac_cv_prog_CC"
1764 if test -n "$CC"; then
1765 echo "$ac_t""$CC" 1>&6
1766 else
1767 echo "$ac_t""no" 1>&6
1770 if test -z "$CC"; then
1771 # Extract the first word of "cc", so it can be a program name with args.
1772 set dummy cc; ac_word=$2
1773 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1774 echo "configure:1775: checking for $ac_word" >&5
1775 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1776 echo $ac_n "(cached) $ac_c" 1>&6
1777 else
1778 if test -n "$CC"; then
1779 ac_cv_prog_CC="$CC" # Let the user override the test.
1780 else
1781 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1782 ac_prog_rejected=no
1783 ac_dummy="$PATH"
1784 for ac_dir in $ac_dummy; do
1785 test -z "$ac_dir" && ac_dir=.
1786 if test -f $ac_dir/$ac_word; then
1787 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1788 ac_prog_rejected=yes
1789 continue
1791 ac_cv_prog_CC="cc"
1792 break
1794 done
1795 IFS="$ac_save_ifs"
1796 if test $ac_prog_rejected = yes; then
1797 # We found a bogon in the path, so make sure we never use it.
1798 set dummy $ac_cv_prog_CC
1799 shift
1800 if test $# -gt 0; then
1801 # We chose a different compiler from the bogus one.
1802 # However, it has the same basename, so the bogon will be chosen
1803 # first if we set CC to just the basename; use the full file name.
1804 shift
1805 set dummy "$ac_dir/$ac_word" "$@"
1806 shift
1807 ac_cv_prog_CC="$@"
1812 CC="$ac_cv_prog_CC"
1813 if test -n "$CC"; then
1814 echo "$ac_t""$CC" 1>&6
1815 else
1816 echo "$ac_t""no" 1>&6
1819 if test -z "$CC"; then
1820 case "`uname -s`" in
1821 *win32* | *WIN32*)
1822 # Extract the first word of "cl", so it can be a program name with args.
1823 set dummy cl; ac_word=$2
1824 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1825 echo "configure:1826: checking for $ac_word" >&5
1826 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1827 echo $ac_n "(cached) $ac_c" 1>&6
1828 else
1829 if test -n "$CC"; then
1830 ac_cv_prog_CC="$CC" # Let the user override the test.
1831 else
1832 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1833 ac_dummy="$PATH"
1834 for ac_dir in $ac_dummy; do
1835 test -z "$ac_dir" && ac_dir=.
1836 if test -f $ac_dir/$ac_word; then
1837 ac_cv_prog_CC="cl"
1838 break
1840 done
1841 IFS="$ac_save_ifs"
1844 CC="$ac_cv_prog_CC"
1845 if test -n "$CC"; then
1846 echo "$ac_t""$CC" 1>&6
1847 else
1848 echo "$ac_t""no" 1>&6
1851 esac
1853 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1856 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1857 echo "configure:1858: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1859 ac_ext=c
1860 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1861 ac_cpp='$CPP $CPPFLAGS'
1862 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1863 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1864 cross_compiling=$ac_cv_prog_cc_cross
1866 cat > conftest.$ac_ext << EOF
1868 #line 1869 "configure"
1869 #include "confdefs.h"
1871 main(){return(0);}
1873 if { (eval echo configure:1874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1874 ac_cv_prog_cc_works=yes
1875 # If we can't run a trivial program, we are probably using a cross compiler.
1876 if (./conftest; exit) 2>/dev/null; then
1877 ac_cv_prog_cc_cross=no
1878 else
1879 ac_cv_prog_cc_cross=yes
1881 else
1882 echo "configure: failed program was:" >&5
1883 cat conftest.$ac_ext >&5
1884 ac_cv_prog_cc_works=no
1886 rm -fr conftest*
1887 ac_ext=c
1888 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1889 ac_cpp='$CPP $CPPFLAGS'
1890 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1891 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1892 cross_compiling=$ac_cv_prog_cc_cross
1894 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1895 if test $ac_cv_prog_cc_works = no; then
1896 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1898 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1899 echo "configure:1900: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1900 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1901 cross_compiling=$ac_cv_prog_cc_cross
1903 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1904 echo "configure:1905: checking whether we are using GNU C" >&5
1905 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1906 echo $ac_n "(cached) $ac_c" 1>&6
1907 else
1908 cat > conftest.c <<EOF
1909 #ifdef __GNUC__
1910 yes;
1911 #endif
1913 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1914: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1914 ac_cv_prog_gcc=yes
1915 else
1916 ac_cv_prog_gcc=no
1920 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1922 if test $ac_cv_prog_gcc = yes; then
1923 GCC=yes
1924 else
1925 GCC=
1928 ac_test_CFLAGS="${CFLAGS+set}"
1929 ac_save_CFLAGS="$CFLAGS"
1930 CFLAGS=
1931 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1932 echo "configure:1933: checking whether ${CC-cc} accepts -g" >&5
1933 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1934 echo $ac_n "(cached) $ac_c" 1>&6
1935 else
1936 echo 'void f(){}' > conftest.c
1937 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1938 ac_cv_prog_cc_g=yes
1939 else
1940 ac_cv_prog_cc_g=no
1942 rm -f conftest*
1946 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1947 if test "$ac_test_CFLAGS" = set; then
1948 CFLAGS="$ac_save_CFLAGS"
1949 elif test $ac_cv_prog_cc_g = yes; then
1950 if test "$GCC" = yes; then
1951 CFLAGS="-g -O2"
1952 else
1953 CFLAGS="-g"
1955 else
1956 if test "$GCC" = yes; then
1957 CFLAGS="-O2"
1958 else
1959 CFLAGS=
1963 esac
1965 # On Suns, sometimes $CPP names a directory.
1966 if test -n "$CPP" && test -d "$CPP"; then
1967 CPP=
1970 #### Some systems specify a CPP to use unless we are using GCC.
1971 #### Now that we know whether we are using GCC, we can decide whether
1972 #### to use that one.
1973 if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x
1974 then
1975 CPP="$NON_GNU_CPP"
1978 #### Some systems specify a CC to use unless we are using GCC.
1979 #### Now that we know whether we are using GCC, we can decide whether
1980 #### to use that one.
1981 if test "x$NON_GNU_CC" != x && test x$GCC != xyes &&
1982 test x$cc_specified != xyes
1983 then
1984 CC="$NON_GNU_CC"
1987 if test x$GCC = xyes && test "x$GCC_TEST_OPTIONS" != x
1988 then
1989 CC="$CC $GCC_TEST_OPTIONS"
1992 if test x$GCC = x && test "x$NON_GCC_TEST_OPTIONS" != x
1993 then
1994 CC="$CC $NON_GCC_TEST_OPTIONS"
1997 if test x$GCC = xyes && test "x$GCC_LINK_TEST_OPTIONS" != x
1998 then
1999 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
2002 if test x$GCC = x && test "x$NON_GCC_LINK_TEST_OPTIONS" != x
2003 then
2004 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
2007 #### Some other nice autoconf tests. If you add a test here which
2008 #### should make an entry in src/config.h, don't forget to add an
2009 #### #undef clause to src/config.h.in for autoconf to modify.
2011 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2012 echo "configure:2013: checking whether ln -s works" >&5
2013 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
2014 echo $ac_n "(cached) $ac_c" 1>&6
2015 else
2016 rm -f conftestdata
2017 if ln -s X conftestdata 2>/dev/null
2018 then
2019 rm -f conftestdata
2020 ac_cv_prog_LN_S="ln -s"
2021 else
2022 ac_cv_prog_LN_S=ln
2025 LN_S="$ac_cv_prog_LN_S"
2026 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2027 echo "$ac_t""yes" 1>&6
2028 else
2029 echo "$ac_t""no" 1>&6
2032 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2033 echo "configure:2034: checking how to run the C preprocessor" >&5
2034 # On Suns, sometimes $CPP names a directory.
2035 if test -n "$CPP" && test -d "$CPP"; then
2036 CPP=
2038 if test -z "$CPP"; then
2039 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
2040 echo $ac_n "(cached) $ac_c" 1>&6
2041 else
2042 # This must be in double quotes, not single quotes, because CPP may get
2043 # substituted into the Makefile and "${CC-cc}" will confuse make.
2044 CPP="${CC-cc} -E"
2045 # On the NeXT, cc -E runs the code through the compiler's parser,
2046 # not just through cpp.
2047 cat > conftest.$ac_ext <<EOF
2048 #line 2049 "configure"
2049 #include "confdefs.h"
2050 #include <assert.h>
2051 Syntax Error
2053 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2054 { (eval echo configure:2055: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2055 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2056 if test -z "$ac_err"; then
2058 else
2059 echo "$ac_err" >&5
2060 echo "configure: failed program was:" >&5
2061 cat conftest.$ac_ext >&5
2062 rm -rf conftest*
2063 CPP="${CC-cc} -E -traditional-cpp"
2064 cat > conftest.$ac_ext <<EOF
2065 #line 2066 "configure"
2066 #include "confdefs.h"
2067 #include <assert.h>
2068 Syntax Error
2070 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2071 { (eval echo configure:2072: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2072 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2073 if test -z "$ac_err"; then
2075 else
2076 echo "$ac_err" >&5
2077 echo "configure: failed program was:" >&5
2078 cat conftest.$ac_ext >&5
2079 rm -rf conftest*
2080 CPP="${CC-cc} -nologo -E"
2081 cat > conftest.$ac_ext <<EOF
2082 #line 2083 "configure"
2083 #include "confdefs.h"
2084 #include <assert.h>
2085 Syntax Error
2087 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2088 { (eval echo configure:2089: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2089 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2090 if test -z "$ac_err"; then
2092 else
2093 echo "$ac_err" >&5
2094 echo "configure: failed program was:" >&5
2095 cat conftest.$ac_ext >&5
2096 rm -rf conftest*
2097 CPP=/lib/cpp
2099 rm -f conftest*
2101 rm -f conftest*
2103 rm -f conftest*
2104 ac_cv_prog_CPP="$CPP"
2106 CPP="$ac_cv_prog_CPP"
2107 else
2108 ac_cv_prog_CPP="$CPP"
2110 echo "$ac_t""$CPP" 1>&6
2112 # Find a good install program. We prefer a C program (faster),
2113 # so one script is as good as another. But avoid the broken or
2114 # incompatible versions:
2115 # SysV /etc/install, /usr/sbin/install
2116 # SunOS /usr/etc/install
2117 # IRIX /sbin/install
2118 # AIX /bin/install
2119 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2120 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2121 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2122 # ./install, which can be erroneously created by make from ./install.sh.
2123 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2124 echo "configure:2125: checking for a BSD compatible install" >&5
2125 if test -z "$INSTALL"; then
2126 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
2127 echo $ac_n "(cached) $ac_c" 1>&6
2128 else
2129 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
2130 for ac_dir in $PATH; do
2131 # Account for people who put trailing slashes in PATH elements.
2132 case "$ac_dir/" in
2133 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2135 # OSF1 and SCO ODT 3.0 have their own names for install.
2136 # Don't use installbsd from OSF since it installs stuff as root
2137 # by default.
2138 for ac_prog in ginstall scoinst install; do
2139 if test -f $ac_dir/$ac_prog; then
2140 if test $ac_prog = install &&
2141 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2142 # AIX install. It has an incompatible calling convention.
2144 else
2145 ac_cv_path_install="$ac_dir/$ac_prog -c"
2146 break 2
2149 done
2151 esac
2152 done
2153 IFS="$ac_save_IFS"
2156 if test "${ac_cv_path_install+set}" = set; then
2157 INSTALL="$ac_cv_path_install"
2158 else
2159 # As a last resort, use the slow shell script. We don't cache a
2160 # path for INSTALL within a source directory, because that will
2161 # break other packages using the cache if that directory is
2162 # removed, or if the path is relative.
2163 INSTALL="$ac_install_sh"
2166 echo "$ac_t""$INSTALL" 1>&6
2168 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2169 # It thinks the first close brace ends the variable substitution.
2170 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2172 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
2174 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2176 for ac_prog in 'bison -y' byacc
2178 # Extract the first word of "$ac_prog", so it can be a program name with args.
2179 set dummy $ac_prog; ac_word=$2
2180 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2181 echo "configure:2182: checking for $ac_word" >&5
2182 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
2183 echo $ac_n "(cached) $ac_c" 1>&6
2184 else
2185 if test -n "$YACC"; then
2186 ac_cv_prog_YACC="$YACC" # Let the user override the test.
2187 else
2188 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2189 ac_dummy="$PATH"
2190 for ac_dir in $ac_dummy; do
2191 test -z "$ac_dir" && ac_dir=.
2192 if test -f $ac_dir/$ac_word; then
2193 ac_cv_prog_YACC="$ac_prog"
2194 break
2196 done
2197 IFS="$ac_save_ifs"
2200 YACC="$ac_cv_prog_YACC"
2201 if test -n "$YACC"; then
2202 echo "$ac_t""$YACC" 1>&6
2203 else
2204 echo "$ac_t""no" 1>&6
2207 test -n "$YACC" && break
2208 done
2209 test -n "$YACC" || YACC="yacc"
2211 if test "x$RANLIB" = x; then
2212 # Extract the first word of "ranlib", so it can be a program name with args.
2213 set dummy ranlib; ac_word=$2
2214 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2215 echo "configure:2216: checking for $ac_word" >&5
2216 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2217 echo $ac_n "(cached) $ac_c" 1>&6
2218 else
2219 if test -n "$RANLIB"; then
2220 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2221 else
2222 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2223 ac_dummy="$PATH"
2224 for ac_dir in $ac_dummy; do
2225 test -z "$ac_dir" && ac_dir=.
2226 if test -f $ac_dir/$ac_word; then
2227 ac_cv_prog_RANLIB="ranlib"
2228 break
2230 done
2231 IFS="$ac_save_ifs"
2232 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2235 RANLIB="$ac_cv_prog_RANLIB"
2236 if test -n "$RANLIB"; then
2237 echo "$ac_t""$RANLIB" 1>&6
2238 else
2239 echo "$ac_t""no" 1>&6
2244 echo $ac_n "checking for AIX""... $ac_c" 1>&6
2245 echo "configure:2246: checking for AIX" >&5
2246 cat > conftest.$ac_ext <<EOF
2247 #line 2248 "configure"
2248 #include "confdefs.h"
2249 #ifdef _AIX
2251 #endif
2254 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2255 egrep "yes" >/dev/null 2>&1; then
2256 rm -rf conftest*
2257 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
2258 #define _ALL_SOURCE 1
2261 else
2262 rm -rf conftest*
2263 echo "$ac_t""no" 1>&6
2265 rm -f conftest*
2269 #### Extract some information from the operating system and machine files.
2271 echo "checking the machine- and system-dependent files to find out
2272 - which libraries the lib-src programs will want, and
2273 - whether the GNU malloc routines are usable" 1>&6
2274 echo "configure:2275: checking the machine- and system-dependent files to find out
2275 - which libraries the lib-src programs will want, and
2276 - whether the GNU malloc routines are usable" >&5
2278 ### First figure out CFLAGS (which we use for running the compiler here)
2279 ### and REAL_CFLAGS (which we use for real compilation).
2280 ### The two are the same except on a few systems, where they are made
2281 ### different to work around various lossages. For example,
2282 ### GCC 2.5 on GNU/Linux needs them to be different because it treats -g
2283 ### as implying static linking.
2285 ### If the CFLAGS env var is specified, we use that value
2286 ### instead of the default.
2288 ### It's not important that this name contain the PID; you can't run
2289 ### two configures in the same directory and have anything work
2290 ### anyway.
2291 tempcname="conftest.c"
2293 echo '
2294 #include "'${srcdir}'/src/'${opsysfile}'"
2295 #include "'${srcdir}'/src/'${machfile}'"
2296 #ifndef LIBS_MACHINE
2297 #define LIBS_MACHINE
2298 #endif
2299 #ifndef LIBS_SYSTEM
2300 #define LIBS_SYSTEM
2301 #endif
2302 #ifndef C_SWITCH_SYSTEM
2303 #define C_SWITCH_SYSTEM
2304 #endif
2305 #ifndef C_SWITCH_MACHINE
2306 #define C_SWITCH_MACHINE
2307 #endif
2308 configure___ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM
2309 configure___ c_switch_system=C_SWITCH_SYSTEM
2310 configure___ c_switch_machine=C_SWITCH_MACHINE
2312 #ifndef LIB_X11_LIB
2313 #define LIB_X11_LIB -lX11
2314 #endif
2316 #ifndef LIBX11_MACHINE
2317 #define LIBX11_MACHINE
2318 #endif
2320 #ifndef LIBX11_SYSTEM
2321 #define LIBX11_SYSTEM
2322 #endif
2323 configure___ LIBX=LIB_X11_LIB LIBX11_MACHINE LIBX11_SYSTEM
2325 #ifdef UNEXEC
2326 configure___ unexec=UNEXEC
2327 #else
2328 configure___ unexec=unexec.o
2329 #endif
2331 #ifdef SYSTEM_MALLOC
2332 configure___ system_malloc=yes
2333 #else
2334 configure___ system_malloc=no
2335 #endif
2337 #ifdef USE_MMAP_FOR_BUFFERS
2338 configure___ use_mmap_for_buffers=yes
2339 #else
2340 configure___ use_mmap_for_buffers=no
2341 #endif
2343 #ifndef C_DEBUG_SWITCH
2344 #define C_DEBUG_SWITCH -g
2345 #endif
2347 #ifndef C_OPTIMIZE_SWITCH
2348 #ifdef __GNUC__
2349 #define C_OPTIMIZE_SWITCH -O2
2350 #else
2351 #define C_OPTIMIZE_SWITCH -O
2352 #endif
2353 #endif
2355 #ifndef LD_SWITCH_MACHINE
2356 #define LD_SWITCH_MACHINE
2357 #endif
2359 #ifndef LD_SWITCH_SYSTEM
2360 #define LD_SWITCH_SYSTEM
2361 #endif
2363 #ifndef LD_SWITCH_X_SITE_AUX
2364 #define LD_SWITCH_X_SITE_AUX
2365 #endif
2367 configure___ ld_switch_system=LD_SWITCH_SYSTEM
2368 configure___ ld_switch_machine=LD_SWITCH_MACHINE
2370 #ifdef THIS_IS_CONFIGURE
2372 /* Get the CFLAGS for tests in configure. */
2373 #ifdef __GNUC__
2374 configure___ CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
2375 #else
2376 configure___ CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
2377 #endif
2379 #else /* not THIS_IS_CONFIGURE */
2381 /* Get the CFLAGS for real compilation. */
2382 #ifdef __GNUC__
2383 configure___ REAL_CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
2384 #else
2385 configure___ REAL_CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
2386 #endif
2388 #endif /* not THIS_IS_CONFIGURE */
2389 ' > ${tempcname}
2391 # The value of CPP is a quoted variable reference, so we need to do this
2392 # to get its actual value...
2393 CPP=`eval "echo $CPP"`
2394 eval `${CPP} -Isrc ${tempcname} \
2395 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
2396 if test "x$SPECIFIED_CFLAGS" = x; then
2397 eval `${CPP} -Isrc -DTHIS_IS_CONFIGURE ${tempcname} \
2398 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
2399 else
2400 REAL_CFLAGS="$CFLAGS"
2402 rm ${tempcname}
2404 ac_link="$ac_link $ld_switch_machine $ld_switch_system"
2406 ### Make sure subsequent tests use flags consistent with the build flags.
2408 if test x"${OVERRIDE_CPPFLAGS}" != x; then
2409 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
2410 else
2411 CPPFLAGS="$c_switch_system $c_switch_machine $CPPFLAGS"
2415 # Check whether --enable-largefile or --disable-largefile was given.
2416 if test "${enable_largefile+set}" = set; then
2417 enableval="$enable_largefile"
2421 if test "$enable_largefile" != no; then
2423 echo $ac_n "checking for special C compiler options needed for large files""... $ac_c" 1>&6
2424 echo "configure:2425: checking for special C compiler options needed for large files" >&5
2425 if eval "test \"`echo '$''{'ac_cv_sys_largefile_CC'+set}'`\" = set"; then
2426 echo $ac_n "(cached) $ac_c" 1>&6
2427 else
2428 ac_cv_sys_largefile_CC=no
2429 if test "$GCC" != yes; then
2430 # IRIX 6.2 and later do not support large files by default,
2431 # so use the C compiler's -n32 option if that helps.
2432 cat > conftest.$ac_ext <<EOF
2433 #line 2434 "configure"
2434 #include "confdefs.h"
2435 #include <sys/types.h>
2436 int a[(off_t) 9223372036854775807 == 9223372036854775807 ? 1 : -1];
2438 int main() {
2440 ; return 0; }
2442 if { (eval echo configure:2443: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2444 else
2445 echo "configure: failed program was:" >&5
2446 cat conftest.$ac_ext >&5
2447 rm -rf conftest*
2448 ac_save_CC="$CC"
2449 CC="$CC -n32"
2450 cat > conftest.$ac_ext <<EOF
2451 #line 2452 "configure"
2452 #include "confdefs.h"
2453 #include <sys/types.h>
2454 int a[(off_t) 9223372036854775807 == 9223372036854775807 ? 1 : -1];
2456 int main() {
2458 ; return 0; }
2460 if { (eval echo configure:2461: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2461 rm -rf conftest*
2462 ac_cv_sys_largefile_CC=' -n32'
2463 else
2464 echo "configure: failed program was:" >&5
2465 cat conftest.$ac_ext >&5
2467 rm -f conftest*
2468 CC="$ac_save_CC"
2470 rm -f conftest*
2474 echo "$ac_t""$ac_cv_sys_largefile_CC" 1>&6
2475 if test "$ac_cv_sys_largefile_CC" != no; then
2476 CC="$CC$ac_cv_sys_largefile_CC"
2479 echo $ac_n "checking for _FILE_OFFSET_BITS value needed for large files""... $ac_c" 1>&6
2480 echo "configure:2481: checking for _FILE_OFFSET_BITS value needed for large files" >&5
2481 if eval "test \"`echo '$''{'ac_cv_sys_file_offset_bits'+set}'`\" = set"; then
2482 echo $ac_n "(cached) $ac_c" 1>&6
2483 else
2484 ac_cv_sys_file_offset_bits=no
2485 cat > conftest.$ac_ext <<EOF
2486 #line 2487 "configure"
2487 #include "confdefs.h"
2488 #include <sys/types.h>
2489 int a[(off_t) 9223372036854775807 == 9223372036854775807 ? 1 : -1];
2491 int main() {
2493 ; return 0; }
2495 if { (eval echo configure:2496: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2497 else
2498 echo "configure: failed program was:" >&5
2499 cat conftest.$ac_ext >&5
2500 rm -rf conftest*
2501 cat > conftest.$ac_ext <<EOF
2502 #line 2503 "configure"
2503 #include "confdefs.h"
2504 #define _FILE_OFFSET_BITS 64
2505 #include <sys/types.h>
2506 int a[(off_t) 9223372036854775807 == 9223372036854775807 ? 1 : -1];
2509 int main() {
2511 ; return 0; }
2513 if { (eval echo configure:2514: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2514 rm -rf conftest*
2515 ac_cv_sys_file_offset_bits=64
2516 else
2517 echo "configure: failed program was:" >&5
2518 cat conftest.$ac_ext >&5
2520 rm -f conftest*
2522 rm -f conftest*
2525 echo "$ac_t""$ac_cv_sys_file_offset_bits" 1>&6
2526 if test "$ac_cv_sys_file_offset_bits" != no; then
2527 cat >> confdefs.h <<EOF
2528 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
2532 echo $ac_n "checking for _LARGE_FILES value needed for large files""... $ac_c" 1>&6
2533 echo "configure:2534: checking for _LARGE_FILES value needed for large files" >&5
2534 if eval "test \"`echo '$''{'ac_cv_sys_large_files'+set}'`\" = set"; then
2535 echo $ac_n "(cached) $ac_c" 1>&6
2536 else
2537 ac_cv_sys_large_files=no
2538 cat > conftest.$ac_ext <<EOF
2539 #line 2540 "configure"
2540 #include "confdefs.h"
2542 int main() {
2544 ; return 0; }
2546 if { (eval echo configure:2547: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2548 else
2549 echo "configure: failed program was:" >&5
2550 cat conftest.$ac_ext >&5
2551 rm -rf conftest*
2552 cat > conftest.$ac_ext <<EOF
2553 #line 2554 "configure"
2554 #include "confdefs.h"
2555 #define _LARGE_FILES 1
2558 int main() {
2560 ; return 0; }
2562 if { (eval echo configure:2563: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2563 rm -rf conftest*
2564 ac_cv_sys_large_files=1
2565 else
2566 echo "configure: failed program was:" >&5
2567 cat conftest.$ac_ext >&5
2569 rm -f conftest*
2571 rm -f conftest*
2574 echo "$ac_t""$ac_cv_sys_large_files" 1>&6
2575 if test "$ac_cv_sys_large_files" != no; then
2576 cat >> confdefs.h <<EOF
2577 #define _LARGE_FILES $ac_cv_sys_large_files
2584 # Sound support for GNU/Linux and the free BSDs.
2585 for ac_hdr in machine/soundcard.h sys/soundcard.h soundcard.h
2587 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2588 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2589 echo "configure:2590: checking for $ac_hdr" >&5
2590 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2591 echo $ac_n "(cached) $ac_c" 1>&6
2592 else
2593 cat > conftest.$ac_ext <<EOF
2594 #line 2595 "configure"
2595 #include "confdefs.h"
2596 #include <$ac_hdr>
2598 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2599 { (eval echo configure:2600: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2600 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2601 if test -z "$ac_err"; then
2602 rm -rf conftest*
2603 eval "ac_cv_header_$ac_safe=yes"
2604 else
2605 echo "$ac_err" >&5
2606 echo "configure: failed program was:" >&5
2607 cat conftest.$ac_ext >&5
2608 rm -rf conftest*
2609 eval "ac_cv_header_$ac_safe=no"
2611 rm -f conftest*
2613 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2614 echo "$ac_t""yes" 1>&6
2615 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2616 cat >> confdefs.h <<EOF
2617 #define $ac_tr_hdr 1
2620 else
2621 echo "$ac_t""no" 1>&6
2623 done
2625 # Emulation library used on NetBSD.
2626 echo $ac_n "checking for _oss_ioctl in -lossaudio""... $ac_c" 1>&6
2627 echo "configure:2628: checking for _oss_ioctl in -lossaudio" >&5
2628 ac_lib_var=`echo ossaudio'_'_oss_ioctl | sed 'y%./+-%__p_%'`
2629 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2630 echo $ac_n "(cached) $ac_c" 1>&6
2631 else
2632 ac_save_LIBS="$LIBS"
2633 LIBS="-lossaudio $LIBS"
2634 cat > conftest.$ac_ext <<EOF
2635 #line 2636 "configure"
2636 #include "confdefs.h"
2637 /* Override any gcc2 internal prototype to avoid an error. */
2638 /* We use char because int might match the return type of a gcc2
2639 builtin and then its argument prototype would still apply. */
2640 char _oss_ioctl();
2642 int main() {
2643 _oss_ioctl()
2644 ; return 0; }
2646 if { (eval echo configure:2647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2647 rm -rf conftest*
2648 eval "ac_cv_lib_$ac_lib_var=yes"
2649 else
2650 echo "configure: failed program was:" >&5
2651 cat conftest.$ac_ext >&5
2652 rm -rf conftest*
2653 eval "ac_cv_lib_$ac_lib_var=no"
2655 rm -f conftest*
2656 LIBS="$ac_save_LIBS"
2659 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2660 echo "$ac_t""yes" 1>&6
2661 LIBSOUND=-lossaudio
2662 else
2663 echo "$ac_t""no" 1>&6
2664 LIBSOUND=
2669 for ac_hdr in sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \
2670 linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \
2671 termcap.h stdio_ext.h fcntl.h term.h strings.h
2673 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2674 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2675 echo "configure:2676: checking for $ac_hdr" >&5
2676 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2677 echo $ac_n "(cached) $ac_c" 1>&6
2678 else
2679 cat > conftest.$ac_ext <<EOF
2680 #line 2681 "configure"
2681 #include "confdefs.h"
2682 #include <$ac_hdr>
2684 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2685 { (eval echo configure:2686: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2686 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2687 if test -z "$ac_err"; then
2688 rm -rf conftest*
2689 eval "ac_cv_header_$ac_safe=yes"
2690 else
2691 echo "$ac_err" >&5
2692 echo "configure: failed program was:" >&5
2693 cat conftest.$ac_ext >&5
2694 rm -rf conftest*
2695 eval "ac_cv_header_$ac_safe=no"
2697 rm -f conftest*
2699 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2700 echo "$ac_t""yes" 1>&6
2701 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2702 cat >> confdefs.h <<EOF
2703 #define $ac_tr_hdr 1
2706 else
2707 echo "$ac_t""no" 1>&6
2709 done
2711 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
2712 echo "configure:2713: checking for ANSI C header files" >&5
2713 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2714 echo $ac_n "(cached) $ac_c" 1>&6
2715 else
2716 cat > conftest.$ac_ext <<EOF
2717 #line 2718 "configure"
2718 #include "confdefs.h"
2719 #include <stdlib.h>
2720 #include <stdarg.h>
2721 #include <string.h>
2722 #include <float.h>
2724 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2725 { (eval echo configure:2726: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2726 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2727 if test -z "$ac_err"; then
2728 rm -rf conftest*
2729 ac_cv_header_stdc=yes
2730 else
2731 echo "$ac_err" >&5
2732 echo "configure: failed program was:" >&5
2733 cat conftest.$ac_ext >&5
2734 rm -rf conftest*
2735 ac_cv_header_stdc=no
2737 rm -f conftest*
2739 if test $ac_cv_header_stdc = yes; then
2740 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2741 cat > conftest.$ac_ext <<EOF
2742 #line 2743 "configure"
2743 #include "confdefs.h"
2744 #include <string.h>
2746 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2747 egrep "memchr" >/dev/null 2>&1; then
2749 else
2750 rm -rf conftest*
2751 ac_cv_header_stdc=no
2753 rm -f conftest*
2757 if test $ac_cv_header_stdc = yes; then
2758 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2759 cat > conftest.$ac_ext <<EOF
2760 #line 2761 "configure"
2761 #include "confdefs.h"
2762 #include <stdlib.h>
2764 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2765 egrep "free" >/dev/null 2>&1; then
2767 else
2768 rm -rf conftest*
2769 ac_cv_header_stdc=no
2771 rm -f conftest*
2775 if test $ac_cv_header_stdc = yes; then
2776 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2777 if test "$cross_compiling" = yes; then
2779 else
2780 cat > conftest.$ac_ext <<EOF
2781 #line 2782 "configure"
2782 #include "confdefs.h"
2783 #include <ctype.h>
2784 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2785 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2786 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2787 int main () { int i; for (i = 0; i < 256; i++)
2788 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2789 exit (0); }
2792 if { (eval echo configure:2793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2793 then
2795 else
2796 echo "configure: failed program was:" >&5
2797 cat conftest.$ac_ext >&5
2798 rm -fr conftest*
2799 ac_cv_header_stdc=no
2801 rm -fr conftest*
2807 echo "$ac_t""$ac_cv_header_stdc" 1>&6
2808 if test $ac_cv_header_stdc = yes; then
2809 cat >> confdefs.h <<\EOF
2810 #define STDC_HEADERS 1
2815 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
2816 echo "configure:2817: checking whether time.h and sys/time.h may both be included" >&5
2817 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2818 echo $ac_n "(cached) $ac_c" 1>&6
2819 else
2820 cat > conftest.$ac_ext <<EOF
2821 #line 2822 "configure"
2822 #include "confdefs.h"
2823 #include <sys/types.h>
2824 #include <sys/time.h>
2825 #include <time.h>
2826 int main() {
2827 struct tm *tp;
2828 ; return 0; }
2830 if { (eval echo configure:2831: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2831 rm -rf conftest*
2832 ac_cv_header_time=yes
2833 else
2834 echo "configure: failed program was:" >&5
2835 cat conftest.$ac_ext >&5
2836 rm -rf conftest*
2837 ac_cv_header_time=no
2839 rm -f conftest*
2842 echo "$ac_t""$ac_cv_header_time" 1>&6
2843 if test $ac_cv_header_time = yes; then
2844 cat >> confdefs.h <<\EOF
2845 #define TIME_WITH_SYS_TIME 1
2850 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
2851 echo "configure:2852: checking for sys_siglist declaration in signal.h or unistd.h" >&5
2852 if eval "test \"`echo '$''{'ac_cv_decl_sys_siglist'+set}'`\" = set"; then
2853 echo $ac_n "(cached) $ac_c" 1>&6
2854 else
2855 cat > conftest.$ac_ext <<EOF
2856 #line 2857 "configure"
2857 #include "confdefs.h"
2858 #include <sys/types.h>
2859 #include <signal.h>
2860 /* NetBSD declares sys_siglist in unistd.h. */
2861 #ifdef HAVE_UNISTD_H
2862 #include <unistd.h>
2863 #endif
2864 int main() {
2865 char *msg = *(sys_siglist + 1);
2866 ; return 0; }
2868 if { (eval echo configure:2869: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2869 rm -rf conftest*
2870 ac_cv_decl_sys_siglist=yes
2871 else
2872 echo "configure: failed program was:" >&5
2873 cat conftest.$ac_ext >&5
2874 rm -rf conftest*
2875 ac_cv_decl_sys_siglist=no
2877 rm -f conftest*
2880 echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
2881 if test $ac_cv_decl_sys_siglist = yes; then
2882 cat >> confdefs.h <<\EOF
2883 #define SYS_SIGLIST_DECLARED 1
2888 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
2889 echo "configure:2890: checking for sys/wait.h that is POSIX.1 compatible" >&5
2890 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
2891 echo $ac_n "(cached) $ac_c" 1>&6
2892 else
2893 cat > conftest.$ac_ext <<EOF
2894 #line 2895 "configure"
2895 #include "confdefs.h"
2896 #include <sys/types.h>
2897 #include <sys/wait.h>
2898 #ifndef WEXITSTATUS
2899 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
2900 #endif
2901 #ifndef WIFEXITED
2902 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
2903 #endif
2904 int main() {
2905 int s;
2906 wait (&s);
2907 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
2908 ; return 0; }
2910 if { (eval echo configure:2911: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2911 rm -rf conftest*
2912 ac_cv_header_sys_wait_h=yes
2913 else
2914 echo "configure: failed program was:" >&5
2915 cat conftest.$ac_ext >&5
2916 rm -rf conftest*
2917 ac_cv_header_sys_wait_h=no
2919 rm -f conftest*
2922 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
2923 if test $ac_cv_header_sys_wait_h = yes; then
2924 cat >> confdefs.h <<\EOF
2925 #define HAVE_SYS_WAIT_H 1
2931 echo $ac_n "checking for struct utimbuf""... $ac_c" 1>&6
2932 echo "configure:2933: checking for struct utimbuf" >&5
2933 if eval "test \"`echo '$''{'emacs_cv_struct_utimbuf'+set}'`\" = set"; then
2934 echo $ac_n "(cached) $ac_c" 1>&6
2935 else
2936 cat > conftest.$ac_ext <<EOF
2937 #line 2938 "configure"
2938 #include "confdefs.h"
2939 #ifdef TIME_WITH_SYS_TIME
2940 #include <sys/time.h>
2941 #include <time.h>
2942 #else
2943 #ifdef HAVE_SYS_TIME_H
2944 #include <sys/time.h>
2945 #else
2946 #include <time.h>
2947 #endif
2948 #endif
2949 #ifdef HAVE_UTIME_H
2950 #include <utime.h>
2951 #endif
2952 int main() {
2953 static struct utimbuf x; x.actime = x.modtime;
2954 ; return 0; }
2956 if { (eval echo configure:2957: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2957 rm -rf conftest*
2958 emacs_cv_struct_utimbuf=yes
2959 else
2960 echo "configure: failed program was:" >&5
2961 cat conftest.$ac_ext >&5
2962 rm -rf conftest*
2963 emacs_cv_struct_utimbuf=no
2965 rm -f conftest*
2968 echo "$ac_t""$emacs_cv_struct_utimbuf" 1>&6
2969 if test $emacs_cv_struct_utimbuf = yes; then
2970 cat >> confdefs.h <<\EOF
2971 #define HAVE_STRUCT_UTIMBUF 1
2976 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
2977 echo "configure:2978: checking return type of signal handlers" >&5
2978 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2979 echo $ac_n "(cached) $ac_c" 1>&6
2980 else
2981 cat > conftest.$ac_ext <<EOF
2982 #line 2983 "configure"
2983 #include "confdefs.h"
2984 #include <sys/types.h>
2985 #include <signal.h>
2986 #ifdef signal
2987 #undef signal
2988 #endif
2989 #ifdef __cplusplus
2990 extern "C" void (*signal (int, void (*)(int)))(int);
2991 #else
2992 void (*signal ()) ();
2993 #endif
2995 int main() {
2996 int i;
2997 ; return 0; }
2999 if { (eval echo configure:3000: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3000 rm -rf conftest*
3001 ac_cv_type_signal=void
3002 else
3003 echo "configure: failed program was:" >&5
3004 cat conftest.$ac_ext >&5
3005 rm -rf conftest*
3006 ac_cv_type_signal=int
3008 rm -f conftest*
3011 echo "$ac_t""$ac_cv_type_signal" 1>&6
3012 cat >> confdefs.h <<EOF
3013 #define RETSIGTYPE $ac_cv_type_signal
3018 echo $ac_n "checking for speed_t""... $ac_c" 1>&6
3019 echo "configure:3020: checking for speed_t" >&5
3020 if eval "test \"`echo '$''{'emacs_cv_speed_t'+set}'`\" = set"; then
3021 echo $ac_n "(cached) $ac_c" 1>&6
3022 else
3023 cat > conftest.$ac_ext <<EOF
3024 #line 3025 "configure"
3025 #include "confdefs.h"
3026 #include <termios.h>
3027 int main() {
3028 speed_t x = 1;
3029 ; return 0; }
3031 if { (eval echo configure:3032: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3032 rm -rf conftest*
3033 emacs_cv_speed_t=yes
3034 else
3035 echo "configure: failed program was:" >&5
3036 cat conftest.$ac_ext >&5
3038 rm -f conftest*
3041 echo "$ac_t""$emacs_cv_speed_t" 1>&6
3042 if test $emacs_cv_speed_t = yes; then
3043 cat >> confdefs.h <<\EOF
3044 #define HAVE_SPEED_T 1
3049 echo $ac_n "checking for struct timeval""... $ac_c" 1>&6
3050 echo "configure:3051: checking for struct timeval" >&5
3051 if eval "test \"`echo '$''{'emacs_cv_struct_timeval'+set}'`\" = set"; then
3052 echo $ac_n "(cached) $ac_c" 1>&6
3053 else
3054 cat > conftest.$ac_ext <<EOF
3055 #line 3056 "configure"
3056 #include "confdefs.h"
3057 #ifdef TIME_WITH_SYS_TIME
3058 #include <sys/time.h>
3059 #include <time.h>
3060 #else
3061 #ifdef HAVE_SYS_TIME_H
3062 #include <sys/time.h>
3063 #else
3064 #include <time.h>
3065 #endif
3066 #endif
3067 int main() {
3068 static struct timeval x; x.tv_sec = x.tv_usec;
3069 ; return 0; }
3071 if { (eval echo configure:3072: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3072 rm -rf conftest*
3073 emacs_cv_struct_timeval=yes
3074 else
3075 echo "configure: failed program was:" >&5
3076 cat conftest.$ac_ext >&5
3077 rm -rf conftest*
3078 emacs_cv_struct_timeval=no
3080 rm -f conftest*
3083 echo "$ac_t""$emacs_cv_struct_timeval" 1>&6
3084 HAVE_TIMEVAL=$emacs_cv_struct_timeval
3085 if test $emacs_cv_struct_timeval = yes; then
3086 cat >> confdefs.h <<\EOF
3087 #define HAVE_TIMEVAL 1
3092 echo $ac_n "checking for struct exception""... $ac_c" 1>&6
3093 echo "configure:3094: checking for struct exception" >&5
3094 if eval "test \"`echo '$''{'emacs_cv_struct_exception'+set}'`\" = set"; then
3095 echo $ac_n "(cached) $ac_c" 1>&6
3096 else
3097 cat > conftest.$ac_ext <<EOF
3098 #line 3099 "configure"
3099 #include "confdefs.h"
3100 #include <math.h>
3101 int main() {
3102 static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1;
3103 ; return 0; }
3105 if { (eval echo configure:3106: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3106 rm -rf conftest*
3107 emacs_cv_struct_exception=yes
3108 else
3109 echo "configure: failed program was:" >&5
3110 cat conftest.$ac_ext >&5
3111 rm -rf conftest*
3112 emacs_cv_struct_exception=no
3114 rm -f conftest*
3117 echo "$ac_t""$emacs_cv_struct_exception" 1>&6
3118 HAVE_EXCEPTION=$emacs_cv_struct_exception
3119 if test $emacs_cv_struct_exception != yes; then
3120 cat >> confdefs.h <<\EOF
3121 #define NO_MATHERR 1
3126 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
3127 echo "configure:3128: checking whether struct tm is in sys/time.h or time.h" >&5
3128 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
3129 echo $ac_n "(cached) $ac_c" 1>&6
3130 else
3131 cat > conftest.$ac_ext <<EOF
3132 #line 3133 "configure"
3133 #include "confdefs.h"
3134 #include <sys/types.h>
3135 #include <time.h>
3136 int main() {
3137 struct tm *tp; tp->tm_sec;
3138 ; return 0; }
3140 if { (eval echo configure:3141: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3141 rm -rf conftest*
3142 ac_cv_struct_tm=time.h
3143 else
3144 echo "configure: failed program was:" >&5
3145 cat conftest.$ac_ext >&5
3146 rm -rf conftest*
3147 ac_cv_struct_tm=sys/time.h
3149 rm -f conftest*
3152 echo "$ac_t""$ac_cv_struct_tm" 1>&6
3153 if test $ac_cv_struct_tm = sys/time.h; then
3154 cat >> confdefs.h <<\EOF
3155 #define TM_IN_SYS_TIME 1
3160 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
3161 echo "configure:3162: checking for tm_zone in struct tm" >&5
3162 if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
3163 echo $ac_n "(cached) $ac_c" 1>&6
3164 else
3165 cat > conftest.$ac_ext <<EOF
3166 #line 3167 "configure"
3167 #include "confdefs.h"
3168 #include <sys/types.h>
3169 #include <$ac_cv_struct_tm>
3170 int main() {
3171 struct tm tm; tm.tm_zone;
3172 ; return 0; }
3174 if { (eval echo configure:3175: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3175 rm -rf conftest*
3176 ac_cv_struct_tm_zone=yes
3177 else
3178 echo "configure: failed program was:" >&5
3179 cat conftest.$ac_ext >&5
3180 rm -rf conftest*
3181 ac_cv_struct_tm_zone=no
3183 rm -f conftest*
3186 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
3187 if test "$ac_cv_struct_tm_zone" = yes; then
3188 cat >> confdefs.h <<\EOF
3189 #define HAVE_TM_ZONE 1
3192 else
3193 echo $ac_n "checking for tzname""... $ac_c" 1>&6
3194 echo "configure:3195: checking for tzname" >&5
3195 if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
3196 echo $ac_n "(cached) $ac_c" 1>&6
3197 else
3198 cat > conftest.$ac_ext <<EOF
3199 #line 3200 "configure"
3200 #include "confdefs.h"
3201 #include <time.h>
3202 #ifndef tzname /* For SGI. */
3203 extern char *tzname[]; /* RS6000 and others reject char **tzname. */
3204 #endif
3205 int main() {
3206 atoi(*tzname);
3207 ; return 0; }
3209 if { (eval echo configure:3210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3210 rm -rf conftest*
3211 ac_cv_var_tzname=yes
3212 else
3213 echo "configure: failed program was:" >&5
3214 cat conftest.$ac_ext >&5
3215 rm -rf conftest*
3216 ac_cv_var_tzname=no
3218 rm -f conftest*
3221 echo "$ac_t""$ac_cv_var_tzname" 1>&6
3222 if test $ac_cv_var_tzname = yes; then
3223 cat >> confdefs.h <<\EOF
3224 #define HAVE_TZNAME 1
3230 echo $ac_n "checking for tm_gmtoff in struct tm""... $ac_c" 1>&6
3231 echo "configure:3232: checking for tm_gmtoff in struct tm" >&5
3232 if eval "test \"`echo '$''{'emacs_cv_tm_gmtoff'+set}'`\" = set"; then
3233 echo $ac_n "(cached) $ac_c" 1>&6
3234 else
3235 cat > conftest.$ac_ext <<EOF
3236 #line 3237 "configure"
3237 #include "confdefs.h"
3238 #include <time.h>
3239 int main() {
3240 struct tm t; t.tm_gmtoff = 0
3241 ; return 0; }
3243 if { (eval echo configure:3244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3244 rm -rf conftest*
3245 emacs_cv_tm_gmtoff=yes
3246 else
3247 echo "configure: failed program was:" >&5
3248 cat conftest.$ac_ext >&5
3249 rm -rf conftest*
3250 emacs_cv_tm_gmtoff=no
3252 rm -f conftest*
3255 echo "$ac_t""$emacs_cv_tm_gmtoff" 1>&6
3256 if test $emacs_cv_tm_gmtoff = yes; then
3257 cat >> confdefs.h <<\EOF
3258 #define HAVE_TM_GMTOFF 1
3264 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
3265 echo "configure:3266: checking for ${CC-cc} option to accept ANSI C" >&5
3266 if eval "test \"`echo '$''{'ac_cv_prog_cc_stdc'+set}'`\" = set"; then
3267 echo $ac_n "(cached) $ac_c" 1>&6
3268 else
3269 ac_cv_prog_cc_stdc=no
3270 ac_save_CC="$CC"
3271 # Don't try gcc -ansi; that turns off useful extensions and
3272 # breaks some systems' header files.
3273 # AIX -qlanglvl=ansi
3274 # Ultrix and OSF/1 -std1
3275 # HP-UX 10.20 and later -Ae
3276 # HP-UX older versions -Aa -D_HPUX_SOURCE
3277 # SVR4 -Xc -D__EXTENSIONS__
3278 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3280 CC="$ac_save_CC $ac_arg"
3281 cat > conftest.$ac_ext <<EOF
3282 #line 3283 "configure"
3283 #include "confdefs.h"
3284 #include <stdarg.h>
3285 #include <stdio.h>
3286 #include <sys/types.h>
3287 #include <sys/stat.h>
3288 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3289 struct buf { int x; };
3290 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3291 static char *e (p, i)
3292 char **p;
3293 int i;
3295 return p[i];
3297 static char *f (char * (*g) (char **, int), char **p, ...)
3299 char *s;
3300 va_list v;
3301 va_start (v,p);
3302 s = g (p, va_arg (v,int));
3303 va_end (v);
3304 return s;
3306 int test (int i, double x);
3307 struct s1 {int (*f) (int a);};
3308 struct s2 {int (*f) (double a);};
3309 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3310 int argc;
3311 char **argv;
3312 int main() {
3313 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3314 ; return 0; }
3316 if { (eval echo configure:3317: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3317 rm -rf conftest*
3318 ac_cv_prog_cc_stdc="$ac_arg"; break
3319 else
3320 echo "configure: failed program was:" >&5
3321 cat conftest.$ac_ext >&5
3323 rm -f conftest*
3324 done
3325 CC="$ac_save_CC"
3329 case "x$ac_cv_prog_cc_stdc" in
3330 x|xno)
3331 echo "$ac_t""none needed" 1>&6 ;;
3333 echo "$ac_t""$ac_cv_prog_cc_stdc" 1>&6
3334 CC="$CC $ac_cv_prog_cc_stdc" ;;
3335 esac
3337 echo $ac_n "checking for function prototypes""... $ac_c" 1>&6
3338 echo "configure:3339: checking for function prototypes" >&5
3339 if test "$ac_cv_prog_cc_stdc" != no; then
3340 echo "$ac_t""yes" 1>&6
3341 cat >> confdefs.h <<\EOF
3342 #define PROTOTYPES 1
3345 else
3346 echo "$ac_t""no" 1>&6
3349 echo $ac_n "checking for working volatile""... $ac_c" 1>&6
3350 echo "configure:3351: checking for working volatile" >&5
3351 if eval "test \"`echo '$''{'ac_cv_c_volatile'+set}'`\" = set"; then
3352 echo $ac_n "(cached) $ac_c" 1>&6
3353 else
3354 cat > conftest.$ac_ext <<EOF
3355 #line 3356 "configure"
3356 #include "confdefs.h"
3358 int main() {
3360 volatile int x;
3361 int * volatile y;
3362 ; return 0; }
3364 if { (eval echo configure:3365: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3365 rm -rf conftest*
3366 ac_cv_c_volatile=yes
3367 else
3368 echo "configure: failed program was:" >&5
3369 cat conftest.$ac_ext >&5
3370 rm -rf conftest*
3371 ac_cv_c_volatile=no
3373 rm -f conftest*
3376 echo "$ac_t""$ac_cv_c_volatile" 1>&6
3377 if test $ac_cv_c_volatile = no; then
3378 cat >> confdefs.h <<\EOF
3379 #define volatile
3384 echo $ac_n "checking for working const""... $ac_c" 1>&6
3385 echo "configure:3386: checking for working const" >&5
3386 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
3387 echo $ac_n "(cached) $ac_c" 1>&6
3388 else
3389 cat > conftest.$ac_ext <<EOF
3390 #line 3391 "configure"
3391 #include "confdefs.h"
3393 int main() {
3395 /* Ultrix mips cc rejects this. */
3396 typedef int charset[2]; const charset x;
3397 /* SunOS 4.1.1 cc rejects this. */
3398 char const *const *ccp;
3399 char **p;
3400 /* NEC SVR4.0.2 mips cc rejects this. */
3401 struct point {int x, y;};
3402 static struct point const zero = {0,0};
3403 /* AIX XL C 1.02.0.0 rejects this.
3404 It does not let you subtract one const X* pointer from another in an arm
3405 of an if-expression whose if-part is not a constant expression */
3406 const char *g = "string";
3407 ccp = &g + (g ? g-g : 0);
3408 /* HPUX 7.0 cc rejects these. */
3409 ++ccp;
3410 p = (char**) ccp;
3411 ccp = (char const *const *) p;
3412 { /* SCO 3.2v4 cc rejects this. */
3413 char *t;
3414 char const *s = 0 ? (char *) 0 : (char const *) 0;
3416 *t++ = 0;
3418 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
3419 int x[] = {25, 17};
3420 const int *foo = &x[0];
3421 ++foo;
3423 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3424 typedef const int *iptr;
3425 iptr p = 0;
3426 ++p;
3428 { /* AIX XL C 1.02.0.0 rejects this saying
3429 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3430 struct s { int j; const int *ap[3]; };
3431 struct s *b; b->j = 5;
3433 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3434 const int foo = 10;
3437 ; return 0; }
3439 if { (eval echo configure:3440: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3440 rm -rf conftest*
3441 ac_cv_c_const=yes
3442 else
3443 echo "configure: failed program was:" >&5
3444 cat conftest.$ac_ext >&5
3445 rm -rf conftest*
3446 ac_cv_c_const=no
3448 rm -f conftest*
3451 echo "$ac_t""$ac_cv_c_const" 1>&6
3452 if test $ac_cv_c_const = no; then
3453 cat >> confdefs.h <<\EOF
3454 #define const
3459 echo $ac_n "checking for void * support""... $ac_c" 1>&6
3460 echo "configure:3461: checking for void * support" >&5
3461 if eval "test \"`echo '$''{'emacs_cv_void_star'+set}'`\" = set"; then
3462 echo $ac_n "(cached) $ac_c" 1>&6
3463 else
3464 cat > conftest.$ac_ext <<EOF
3465 #line 3466 "configure"
3466 #include "confdefs.h"
3468 int main() {
3469 void * foo;
3470 ; return 0; }
3472 if { (eval echo configure:3473: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3473 rm -rf conftest*
3474 emacs_cv_void_star=yes
3475 else
3476 echo "configure: failed program was:" >&5
3477 cat conftest.$ac_ext >&5
3478 rm -rf conftest*
3479 emacs_cv_void_star=no
3481 rm -f conftest*
3484 echo "$ac_t""$emacs_cv_void_star" 1>&6
3485 if test $emacs_cv_void_star = yes; then
3486 cat >> confdefs.h <<\EOF
3487 #define POINTER_TYPE void
3490 else
3491 cat >> confdefs.h <<\EOF
3492 #define POINTER_TYPE char
3497 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
3498 echo "configure:3499: checking whether ${MAKE-make} sets \${MAKE}" >&5
3499 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
3500 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
3501 echo $ac_n "(cached) $ac_c" 1>&6
3502 else
3503 cat > conftestmake <<\EOF
3504 all:
3505 @echo 'ac_maketemp="${MAKE}"'
3507 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3508 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
3509 if test -n "$ac_maketemp"; then
3510 eval ac_cv_prog_make_${ac_make}_set=yes
3511 else
3512 eval ac_cv_prog_make_${ac_make}_set=no
3514 rm -f conftestmake
3516 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3517 echo "$ac_t""yes" 1>&6
3518 SET_MAKE=
3519 else
3520 echo "$ac_t""no" 1>&6
3521 SET_MAKE="MAKE=${MAKE-make}"
3525 echo $ac_n "checking for long file names""... $ac_c" 1>&6
3526 echo "configure:3527: checking for long file names" >&5
3527 if eval "test \"`echo '$''{'ac_cv_sys_long_file_names'+set}'`\" = set"; then
3528 echo $ac_n "(cached) $ac_c" 1>&6
3529 else
3530 ac_cv_sys_long_file_names=yes
3531 # Test for long file names in all the places we know might matter:
3532 # . the current directory, where building will happen
3533 # $prefix/lib where we will be installing things
3534 # $exec_prefix/lib likewise
3535 # eval it to expand exec_prefix.
3536 # $TMPDIR if set, where it might want to write temporary files
3537 # if $TMPDIR is not set:
3538 # /tmp where it might want to write temporary files
3539 # /var/tmp likewise
3540 # /usr/tmp likewise
3541 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3542 ac_tmpdirs="$TMPDIR"
3543 else
3544 ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3546 for ac_dir in . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3547 test -d $ac_dir || continue
3548 test -w $ac_dir || continue # It is less confusing to not echo anything here.
3549 (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
3550 (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
3551 val=`cat $ac_dir/conftest9012345 2>/dev/null`
3552 if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
3553 ac_cv_sys_long_file_names=no
3554 rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
3555 break
3557 rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
3558 done
3561 echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6
3562 if test $ac_cv_sys_long_file_names = yes; then
3563 cat >> confdefs.h <<\EOF
3564 #define HAVE_LONG_FILE_NAMES 1
3570 #### Choose a window system.
3572 # If we find X, set shell vars x_includes and x_libraries to the
3573 # paths, otherwise set no_x=yes.
3574 # Uses ac_ vars as temps to allow command line to override cache and checks.
3575 # --without-x overrides everything else, but does not touch the cache.
3576 echo $ac_n "checking for X""... $ac_c" 1>&6
3577 echo "configure:3578: checking for X" >&5
3579 # Check whether --with-x or --without-x was given.
3580 if test "${with_x+set}" = set; then
3581 withval="$with_x"
3585 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
3586 if test "x$with_x" = xno; then
3587 # The user explicitly disabled X.
3588 have_x=disabled
3589 else
3590 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
3591 # Both variables are already set.
3592 have_x=yes
3593 else
3594 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
3595 echo $ac_n "(cached) $ac_c" 1>&6
3596 else
3597 # One or both of the vars are not set, and there is no cached value.
3598 ac_x_includes=NO ac_x_libraries=NO
3599 rm -fr conftestdir
3600 if mkdir conftestdir; then
3601 cd conftestdir
3602 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
3603 cat > Imakefile <<'EOF'
3604 acfindx:
3605 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
3607 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
3608 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3609 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
3610 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
3611 for ac_extension in a so sl; do
3612 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
3613 test -f $ac_im_libdir/libX11.$ac_extension; then
3614 ac_im_usrlibdir=$ac_im_libdir; break
3616 done
3617 # Screen out bogus values from the imake configuration. They are
3618 # bogus both because they are the default anyway, and because
3619 # using them would break gcc on systems where it needs fixed includes.
3620 case "$ac_im_incroot" in
3621 /usr/include) ;;
3622 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
3623 esac
3624 case "$ac_im_usrlibdir" in
3625 /usr/lib | /lib) ;;
3626 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
3627 esac
3629 cd ..
3630 rm -fr conftestdir
3633 if test "$ac_x_includes" = NO; then
3634 # Guess where to find include files, by looking for this one X11 .h file.
3635 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
3637 # First, try using that file with no special directory specified.
3638 cat > conftest.$ac_ext <<EOF
3639 #line 3640 "configure"
3640 #include "confdefs.h"
3641 #include <$x_direct_test_include>
3643 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3644 { (eval echo configure:3645: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3645 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3646 if test -z "$ac_err"; then
3647 rm -rf conftest*
3648 # We can compile using X headers with no special include directory.
3649 ac_x_includes=
3650 else
3651 echo "$ac_err" >&5
3652 echo "configure: failed program was:" >&5
3653 cat conftest.$ac_ext >&5
3654 rm -rf conftest*
3655 # Look for the header file in a standard set of common directories.
3656 # Check X11 before X11Rn because it is often a symlink to the current release.
3657 for ac_dir in \
3658 /usr/X11/include \
3659 /usr/X11R6/include \
3660 /usr/X11R5/include \
3661 /usr/X11R4/include \
3663 /usr/include/X11 \
3664 /usr/include/X11R6 \
3665 /usr/include/X11R5 \
3666 /usr/include/X11R4 \
3668 /usr/local/X11/include \
3669 /usr/local/X11R6/include \
3670 /usr/local/X11R5/include \
3671 /usr/local/X11R4/include \
3673 /usr/local/include/X11 \
3674 /usr/local/include/X11R6 \
3675 /usr/local/include/X11R5 \
3676 /usr/local/include/X11R4 \
3678 /usr/X386/include \
3679 /usr/x386/include \
3680 /usr/XFree86/include/X11 \
3682 /usr/include \
3683 /usr/local/include \
3684 /usr/unsupported/include \
3685 /usr/athena/include \
3686 /usr/local/x11r5/include \
3687 /usr/lpp/Xamples/include \
3689 /usr/openwin/include \
3690 /usr/openwin/share/include \
3693 if test -r "$ac_dir/$x_direct_test_include"; then
3694 ac_x_includes=$ac_dir
3695 break
3697 done
3699 rm -f conftest*
3700 fi # $ac_x_includes = NO
3702 if test "$ac_x_libraries" = NO; then
3703 # Check for the libraries.
3705 test -z "$x_direct_test_library" && x_direct_test_library=Xt
3706 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
3708 # See if we find them without any special options.
3709 # Don't add to $LIBS permanently.
3710 ac_save_LIBS="$LIBS"
3711 LIBS="-l$x_direct_test_library $LIBS"
3712 cat > conftest.$ac_ext <<EOF
3713 #line 3714 "configure"
3714 #include "confdefs.h"
3716 int main() {
3717 ${x_direct_test_function}()
3718 ; return 0; }
3720 if { (eval echo configure:3721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3721 rm -rf conftest*
3722 LIBS="$ac_save_LIBS"
3723 # We can link X programs with no special library path.
3724 ac_x_libraries=
3725 else
3726 echo "configure: failed program was:" >&5
3727 cat conftest.$ac_ext >&5
3728 rm -rf conftest*
3729 LIBS="$ac_save_LIBS"
3730 # First see if replacing the include by lib works.
3731 # Check X11 before X11Rn because it is often a symlink to the current release.
3732 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
3733 /usr/X11/lib \
3734 /usr/X11R6/lib \
3735 /usr/X11R5/lib \
3736 /usr/X11R4/lib \
3738 /usr/lib/X11 \
3739 /usr/lib/X11R6 \
3740 /usr/lib/X11R5 \
3741 /usr/lib/X11R4 \
3743 /usr/local/X11/lib \
3744 /usr/local/X11R6/lib \
3745 /usr/local/X11R5/lib \
3746 /usr/local/X11R4/lib \
3748 /usr/local/lib/X11 \
3749 /usr/local/lib/X11R6 \
3750 /usr/local/lib/X11R5 \
3751 /usr/local/lib/X11R4 \
3753 /usr/X386/lib \
3754 /usr/x386/lib \
3755 /usr/XFree86/lib/X11 \
3757 /usr/lib \
3758 /usr/local/lib \
3759 /usr/unsupported/lib \
3760 /usr/athena/lib \
3761 /usr/local/x11r5/lib \
3762 /usr/lpp/Xamples/lib \
3763 /lib/usr/lib/X11 \
3765 /usr/openwin/lib \
3766 /usr/openwin/share/lib \
3769 for ac_extension in a so sl; do
3770 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
3771 ac_x_libraries=$ac_dir
3772 break 2
3774 done
3775 done
3777 rm -f conftest*
3778 fi # $ac_x_libraries = NO
3780 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
3781 # Didn't find X anywhere. Cache the known absence of X.
3782 ac_cv_have_x="have_x=no"
3783 else
3784 # Record where we found X for the cache.
3785 ac_cv_have_x="have_x=yes \
3786 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
3790 eval "$ac_cv_have_x"
3791 fi # $with_x != no
3793 if test "$have_x" != yes; then
3794 echo "$ac_t""$have_x" 1>&6
3795 no_x=yes
3796 else
3797 # If each of the values was on the command line, it overrides each guess.
3798 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
3799 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
3800 # Update the cache value to reflect the command line values.
3801 ac_cv_have_x="have_x=yes \
3802 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
3803 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
3806 if test "$no_x" = yes; then
3807 window_system=none
3808 else
3809 window_system=x11
3812 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
3813 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
3814 LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"`
3815 x_default_search_path=""
3816 for x_library in `echo ${x_libraries} | sed -e "s/:/ /g"`; do
3817 x_search_path="\
3818 ${x_library}/X11/%L/%T/%N%C%S:\
3819 ${x_library}/X11/%l/%T/%N%C%S:\
3820 ${x_library}/X11/%T/%N%C%S:\
3821 ${x_library}/X11/%L/%T/%N%S:\
3822 ${x_library}/X11/%l/%T/%N%S:\
3823 ${x_library}/X11/%T/%N%S"
3824 if test x"${x_default_search_path}" = x; then
3825 x_default_search_path=${x_search_path}
3826 else
3827 x_default_search_path="${x_search_path}:${x_default_search_path}"
3829 done
3831 if test "${x_includes}" != NONE && test -n "${x_includes}"; then
3832 C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"`
3835 if test x"${x_includes}" = x; then
3836 bitmapdir=/usr/include/X11/bitmaps
3837 else
3838 # accumulate include directories that have X11 bitmap subdirectories
3839 bmd_acc="dummyval"
3840 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
3841 if test -d "${bmd}/X11/bitmaps"; then
3842 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
3844 if test -d "${bmd}/bitmaps"; then
3845 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
3847 done
3848 if test ${bmd_acc} != "dummyval"; then
3849 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
3853 case "${window_system}" in
3854 x11 )
3855 HAVE_X_WINDOWS=yes
3856 HAVE_X11=yes
3857 case "${with_x_toolkit}" in
3858 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
3859 motif ) USE_X_TOOLKIT=MOTIF ;;
3860 no ) USE_X_TOOLKIT=none ;;
3861 * ) USE_X_TOOLKIT=maybe ;;
3862 esac
3864 none )
3865 HAVE_X_WINDOWS=no
3866 HAVE_X11=no
3867 USE_X_TOOLKIT=none
3869 esac
3871 ### If we're using X11, we should use the X menu package.
3872 HAVE_MENUS=no
3873 case ${HAVE_X11} in
3874 yes ) HAVE_MENUS=yes ;;
3875 esac
3877 if test "${opsys}" = "hpux9"; then
3878 case "${x_libraries}" in
3879 *X11R4* )
3880 opsysfile="s/hpux9-x11r4.h"
3882 esac
3885 if test "${opsys}" = "hpux9shr"; then
3886 case "${x_libraries}" in
3887 *X11R4* )
3888 opsysfile="s/hpux9shxr4.h"
3890 esac
3893 ### Compute the unexec source name from the object name.
3894 UNEXEC_SRC="`echo ${unexec} | sed 's/\.o/.c/'`"
3896 # Do the opsystem or machine files prohibit the use of the GNU malloc?
3897 # Assume not, until told otherwise.
3898 GNU_MALLOC=yes
3899 doug_lea_malloc=yes
3900 echo $ac_n "checking for malloc_get_state""... $ac_c" 1>&6
3901 echo "configure:3902: checking for malloc_get_state" >&5
3902 if eval "test \"`echo '$''{'ac_cv_func_malloc_get_state'+set}'`\" = set"; then
3903 echo $ac_n "(cached) $ac_c" 1>&6
3904 else
3905 cat > conftest.$ac_ext <<EOF
3906 #line 3907 "configure"
3907 #include "confdefs.h"
3908 /* System header to define __stub macros and hopefully few prototypes,
3909 which can conflict with char malloc_get_state(); below. */
3910 #include <assert.h>
3911 /* Override any gcc2 internal prototype to avoid an error. */
3912 /* We use char because int might match the return type of a gcc2
3913 builtin and then its argument prototype would still apply. */
3914 char malloc_get_state();
3916 int main() {
3918 /* The GNU C library defines this for functions which it implements
3919 to always fail with ENOSYS. Some functions are actually named
3920 something starting with __ and the normal name is an alias. */
3921 #if defined (__stub_malloc_get_state) || defined (__stub___malloc_get_state)
3922 choke me
3923 #else
3924 malloc_get_state();
3925 #endif
3927 ; return 0; }
3929 if { (eval echo configure:3930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3930 rm -rf conftest*
3931 eval "ac_cv_func_malloc_get_state=yes"
3932 else
3933 echo "configure: failed program was:" >&5
3934 cat conftest.$ac_ext >&5
3935 rm -rf conftest*
3936 eval "ac_cv_func_malloc_get_state=no"
3938 rm -f conftest*
3941 if eval "test \"`echo '$ac_cv_func_'malloc_get_state`\" = yes"; then
3942 echo "$ac_t""yes" 1>&6
3944 else
3945 echo "$ac_t""no" 1>&6
3946 doug_lea_malloc=no
3949 echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6
3950 echo "configure:3951: checking for malloc_set_state" >&5
3951 if eval "test \"`echo '$''{'ac_cv_func_malloc_set_state'+set}'`\" = set"; then
3952 echo $ac_n "(cached) $ac_c" 1>&6
3953 else
3954 cat > conftest.$ac_ext <<EOF
3955 #line 3956 "configure"
3956 #include "confdefs.h"
3957 /* System header to define __stub macros and hopefully few prototypes,
3958 which can conflict with char malloc_set_state(); below. */
3959 #include <assert.h>
3960 /* Override any gcc2 internal prototype to avoid an error. */
3961 /* We use char because int might match the return type of a gcc2
3962 builtin and then its argument prototype would still apply. */
3963 char malloc_set_state();
3965 int main() {
3967 /* The GNU C library defines this for functions which it implements
3968 to always fail with ENOSYS. Some functions are actually named
3969 something starting with __ and the normal name is an alias. */
3970 #if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
3971 choke me
3972 #else
3973 malloc_set_state();
3974 #endif
3976 ; return 0; }
3978 if { (eval echo configure:3979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3979 rm -rf conftest*
3980 eval "ac_cv_func_malloc_set_state=yes"
3981 else
3982 echo "configure: failed program was:" >&5
3983 cat conftest.$ac_ext >&5
3984 rm -rf conftest*
3985 eval "ac_cv_func_malloc_set_state=no"
3987 rm -f conftest*
3990 if eval "test \"`echo '$ac_cv_func_'malloc_set_state`\" = yes"; then
3991 echo "$ac_t""yes" 1>&6
3993 else
3994 echo "$ac_t""no" 1>&6
3995 doug_lea_malloc=no
3998 echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6
3999 echo "configure:4000: checking whether __after_morecore_hook exists" >&5
4000 if eval "test \"`echo '$''{'emacs_cv_var___after_morecore_hook'+set}'`\" = set"; then
4001 echo $ac_n "(cached) $ac_c" 1>&6
4002 else
4003 cat > conftest.$ac_ext <<EOF
4004 #line 4005 "configure"
4005 #include "confdefs.h"
4006 extern void (* __after_morecore_hook)();
4007 int main() {
4008 __after_morecore_hook = 0
4009 ; return 0; }
4011 if { (eval echo configure:4012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4012 rm -rf conftest*
4013 emacs_cv_var___after_morecore_hook=yes
4014 else
4015 echo "configure: failed program was:" >&5
4016 cat conftest.$ac_ext >&5
4017 rm -rf conftest*
4018 emacs_cv_var___after_morecore_hook=no
4020 rm -f conftest*
4023 echo "$ac_t""$emacs_cv_var___after_morecore_hook" 1>&6
4024 if test $emacs_cv_var___after_morecore_hook = no; then
4025 doug_lea_malloc=no
4027 if test "${system_malloc}" = "yes"; then
4028 GNU_MALLOC=no
4029 GNU_MALLOC_reason="
4030 (The GNU allocators don't work with this system configuration.)"
4032 if test "$doug_lea_malloc" = "yes" ; then
4033 if test "$GNU_MALLOC" = yes ; then
4034 GNU_MALLOC_reason="
4035 (Using Doug Lea's new malloc from the GNU C Library.)"
4037 cat >> confdefs.h <<\EOF
4038 #define DOUG_LEA_MALLOC 1
4043 if test x"${REL_ALLOC}" = x; then
4044 REL_ALLOC=${GNU_MALLOC}
4048 for ac_hdr in stdlib.h unistd.h sys/stat.h
4050 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4051 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4052 echo "configure:4053: checking for $ac_hdr" >&5
4053 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+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 #include <$ac_hdr>
4061 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4062 { (eval echo configure:4063: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4063 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4064 if test -z "$ac_err"; then
4065 rm -rf conftest*
4066 eval "ac_cv_header_$ac_safe=yes"
4067 else
4068 echo "$ac_err" >&5
4069 echo "configure: failed program was:" >&5
4070 cat conftest.$ac_ext >&5
4071 rm -rf conftest*
4072 eval "ac_cv_header_$ac_safe=no"
4074 rm -f conftest*
4076 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4077 echo "$ac_t""yes" 1>&6
4078 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4079 cat >> confdefs.h <<EOF
4080 #define $ac_tr_hdr 1
4083 else
4084 echo "$ac_t""no" 1>&6
4086 done
4088 for ac_func in getpagesize
4090 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4091 echo "configure:4092: checking for $ac_func" >&5
4092 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4093 echo $ac_n "(cached) $ac_c" 1>&6
4094 else
4095 cat > conftest.$ac_ext <<EOF
4096 #line 4097 "configure"
4097 #include "confdefs.h"
4098 /* System header to define __stub macros and hopefully few prototypes,
4099 which can conflict with char $ac_func(); below. */
4100 #include <assert.h>
4101 /* Override any gcc2 internal prototype to avoid an error. */
4102 /* We use char because int might match the return type of a gcc2
4103 builtin and then its argument prototype would still apply. */
4104 char $ac_func();
4106 int main() {
4108 /* The GNU C library defines this for functions which it implements
4109 to always fail with ENOSYS. Some functions are actually named
4110 something starting with __ and the normal name is an alias. */
4111 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4112 choke me
4113 #else
4114 $ac_func();
4115 #endif
4117 ; return 0; }
4119 if { (eval echo configure:4120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4120 rm -rf conftest*
4121 eval "ac_cv_func_$ac_func=yes"
4122 else
4123 echo "configure: failed program was:" >&5
4124 cat conftest.$ac_ext >&5
4125 rm -rf conftest*
4126 eval "ac_cv_func_$ac_func=no"
4128 rm -f conftest*
4131 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4132 echo "$ac_t""yes" 1>&6
4133 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4134 cat >> confdefs.h <<EOF
4135 #define $ac_tr_func 1
4138 else
4139 echo "$ac_t""no" 1>&6
4141 done
4143 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
4144 echo "configure:4145: checking for working mmap" >&5
4145 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
4146 echo $ac_n "(cached) $ac_c" 1>&6
4147 else
4148 if test "$cross_compiling" = yes; then
4149 ac_cv_func_mmap_fixed_mapped=no
4150 else
4151 cat > conftest.$ac_ext <<EOF
4152 #line 4153 "configure"
4153 #include "confdefs.h"
4154 /* Thanks to Mike Haertel and Jim Avera for this test.
4155 Here is a matrix of mmap possibilities:
4156 mmap private not fixed
4157 mmap private fixed at somewhere currently unmapped
4158 mmap private fixed at somewhere already mapped
4159 mmap shared not fixed
4160 mmap shared fixed at somewhere currently unmapped
4161 mmap shared fixed at somewhere already mapped
4162 For private mappings, we should verify that changes cannot be read()
4163 back from the file, nor mmap's back from the file at a different
4164 address. (There have been systems where private was not correctly
4165 implemented like the infamous i386 svr4.0, and systems where the
4166 VM page cache was not coherent with the file system buffer cache
4167 like early versions of FreeBSD and possibly contemporary NetBSD.)
4168 For shared mappings, we should conversely verify that changes get
4169 propogated back to all the places they're supposed to be.
4171 Grep wants private fixed already mapped.
4172 The main things grep needs to know about mmap are:
4173 * does it exist and is it safe to write into the mmap'd area
4174 * how to use it (BSD variants) */
4175 #include <sys/types.h>
4176 #include <fcntl.h>
4177 #include <sys/mman.h>
4179 #if STDC_HEADERS || HAVE_STDLIB_H
4180 # include <stdlib.h>
4181 #else
4182 char *malloc ();
4183 #endif
4184 #if HAVE_UNISTD_H
4185 # include <unistd.h>
4186 #endif
4187 #if HAVE_SYS_STAT_H
4188 # include <sys/stat.h>
4189 #endif
4191 /* This mess was copied from the GNU getpagesize.h. */
4192 #if !HAVE_GETPAGESIZE
4193 /* Assume that all systems that can run configure have sys/param.h. */
4194 # if !HAVE_SYS_PARAM_H
4195 # define HAVE_SYS_PARAM_H 1
4196 # endif
4198 # ifdef _SC_PAGESIZE
4199 # define getpagesize() sysconf(_SC_PAGESIZE)
4200 # else /* no _SC_PAGESIZE */
4201 # if HAVE_SYS_PARAM_H
4202 # include <sys/param.h>
4203 # ifdef EXEC_PAGESIZE
4204 # define getpagesize() EXEC_PAGESIZE
4205 # else /* no EXEC_PAGESIZE */
4206 # ifdef NBPG
4207 # define getpagesize() NBPG * CLSIZE
4208 # ifndef CLSIZE
4209 # define CLSIZE 1
4210 # endif /* no CLSIZE */
4211 # else /* no NBPG */
4212 # ifdef NBPC
4213 # define getpagesize() NBPC
4214 # else /* no NBPC */
4215 # ifdef PAGESIZE
4216 # define getpagesize() PAGESIZE
4217 # endif /* PAGESIZE */
4218 # endif /* no NBPC */
4219 # endif /* no NBPG */
4220 # endif /* no EXEC_PAGESIZE */
4221 # else /* no HAVE_SYS_PARAM_H */
4222 # define getpagesize() 8192 /* punt totally */
4223 # endif /* no HAVE_SYS_PARAM_H */
4224 # endif /* no _SC_PAGESIZE */
4226 #endif /* no HAVE_GETPAGESIZE */
4229 main ()
4231 char *data, *data2, *data3;
4232 int i, pagesize;
4233 int fd;
4235 pagesize = getpagesize ();
4237 /* First, make a file with some known garbage in it. */
4238 data = (char *) malloc (pagesize);
4239 if (!data)
4240 exit (1);
4241 for (i = 0; i < pagesize; ++i)
4242 *(data + i) = rand ();
4243 umask (0);
4244 fd = creat ("conftestmmap", 0600);
4245 if (fd < 0)
4246 exit (1);
4247 if (write (fd, data, pagesize) != pagesize)
4248 exit (1);
4249 close (fd);
4251 /* Next, try to mmap the file at a fixed address which already has
4252 something else allocated at it. If we can, also make sure that
4253 we see the same garbage. */
4254 fd = open ("conftestmmap", O_RDWR);
4255 if (fd < 0)
4256 exit (1);
4257 data2 = (char *) malloc (2 * pagesize);
4258 if (!data2)
4259 exit (1);
4260 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
4261 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
4262 MAP_PRIVATE | MAP_FIXED, fd, 0L))
4263 exit (1);
4264 for (i = 0; i < pagesize; ++i)
4265 if (*(data + i) != *(data2 + i))
4266 exit (1);
4268 /* Finally, make sure that changes to the mapped area do not
4269 percolate back to the file as seen by read(). (This is a bug on
4270 some variants of i386 svr4.0.) */
4271 for (i = 0; i < pagesize; ++i)
4272 *(data2 + i) = *(data2 + i) + 1;
4273 data3 = (char *) malloc (pagesize);
4274 if (!data3)
4275 exit (1);
4276 if (read (fd, data3, pagesize) != pagesize)
4277 exit (1);
4278 for (i = 0; i < pagesize; ++i)
4279 if (*(data + i) != *(data3 + i))
4280 exit (1);
4281 close (fd);
4282 unlink ("conftestmmap");
4283 exit (0);
4286 if { (eval echo configure:4287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4287 then
4288 ac_cv_func_mmap_fixed_mapped=yes
4289 else
4290 echo "configure: failed program was:" >&5
4291 cat conftest.$ac_ext >&5
4292 rm -fr conftest*
4293 ac_cv_func_mmap_fixed_mapped=no
4295 rm -fr conftest*
4300 echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
4301 if test $ac_cv_func_mmap_fixed_mapped = yes; then
4302 cat >> confdefs.h <<\EOF
4303 #define HAVE_MMAP 1
4308 if test $use_mmap_for_buffers = yes; then
4309 REL_ALLOC=no
4312 LIBS="$libsrc_libs $LIBS"
4314 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
4315 echo "configure:4316: checking for dnet_ntoa in -ldnet" >&5
4316 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
4317 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4318 echo $ac_n "(cached) $ac_c" 1>&6
4319 else
4320 ac_save_LIBS="$LIBS"
4321 LIBS="-ldnet $LIBS"
4322 cat > conftest.$ac_ext <<EOF
4323 #line 4324 "configure"
4324 #include "confdefs.h"
4325 /* Override any gcc2 internal prototype to avoid an error. */
4326 /* We use char because int might match the return type of a gcc2
4327 builtin and then its argument prototype would still apply. */
4328 char dnet_ntoa();
4330 int main() {
4331 dnet_ntoa()
4332 ; return 0; }
4334 if { (eval echo configure:4335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4335 rm -rf conftest*
4336 eval "ac_cv_lib_$ac_lib_var=yes"
4337 else
4338 echo "configure: failed program was:" >&5
4339 cat conftest.$ac_ext >&5
4340 rm -rf conftest*
4341 eval "ac_cv_lib_$ac_lib_var=no"
4343 rm -f conftest*
4344 LIBS="$ac_save_LIBS"
4347 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4348 echo "$ac_t""yes" 1>&6
4349 ac_tr_lib=HAVE_LIB`echo dnet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4350 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4351 cat >> confdefs.h <<EOF
4352 #define $ac_tr_lib 1
4355 LIBS="-ldnet $LIBS"
4357 else
4358 echo "$ac_t""no" 1>&6
4362 echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
4363 echo "configure:4364: checking for main in -lXbsd" >&5
4364 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
4365 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4366 echo $ac_n "(cached) $ac_c" 1>&6
4367 else
4368 ac_save_LIBS="$LIBS"
4369 LIBS="-lXbsd $LIBS"
4370 cat > conftest.$ac_ext <<EOF
4371 #line 4372 "configure"
4372 #include "confdefs.h"
4374 int main() {
4375 main()
4376 ; return 0; }
4378 if { (eval echo configure:4379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4379 rm -rf conftest*
4380 eval "ac_cv_lib_$ac_lib_var=yes"
4381 else
4382 echo "configure: failed program was:" >&5
4383 cat conftest.$ac_ext >&5
4384 rm -rf conftest*
4385 eval "ac_cv_lib_$ac_lib_var=no"
4387 rm -f conftest*
4388 LIBS="$ac_save_LIBS"
4391 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4392 echo "$ac_t""yes" 1>&6
4393 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
4394 else
4395 echo "$ac_t""no" 1>&6
4399 echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6
4400 echo "configure:4401: checking for cma_open in -lpthreads" >&5
4401 ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'`
4402 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4403 echo $ac_n "(cached) $ac_c" 1>&6
4404 else
4405 ac_save_LIBS="$LIBS"
4406 LIBS="-lpthreads $LIBS"
4407 cat > conftest.$ac_ext <<EOF
4408 #line 4409 "configure"
4409 #include "confdefs.h"
4410 /* Override any gcc2 internal prototype to avoid an error. */
4411 /* We use char because int might match the return type of a gcc2
4412 builtin and then its argument prototype would still apply. */
4413 char cma_open();
4415 int main() {
4416 cma_open()
4417 ; return 0; }
4419 if { (eval echo configure:4420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4420 rm -rf conftest*
4421 eval "ac_cv_lib_$ac_lib_var=yes"
4422 else
4423 echo "configure: failed program was:" >&5
4424 cat conftest.$ac_ext >&5
4425 rm -rf conftest*
4426 eval "ac_cv_lib_$ac_lib_var=no"
4428 rm -f conftest*
4429 LIBS="$ac_save_LIBS"
4432 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4433 echo "$ac_t""yes" 1>&6
4434 ac_tr_lib=HAVE_LIB`echo pthreads | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4435 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4436 cat >> confdefs.h <<EOF
4437 #define $ac_tr_lib 1
4440 LIBS="-lpthreads $LIBS"
4442 else
4443 echo "$ac_t""no" 1>&6
4447 echo $ac_n "checking for XFree86 in /usr/X386""... $ac_c" 1>&6
4448 echo "configure:4449: checking for XFree86 in /usr/X386" >&5
4449 if test -d /usr/X386/include; then
4450 HAVE_XFREE386=yes
4451 : ${C_SWITCH_X_SITE="-I/usr/X386/include"}
4452 else
4453 HAVE_XFREE386=no
4455 echo "$ac_t""$HAVE_XFREE386" 1>&6
4457 # Change CFLAGS temporarily so that C_SWITCH_X_SITE gets used
4458 # for the tests that follow. We set it back to REAL_CFLAGS later on.
4460 REAL_CPPFLAGS="$CPPFLAGS"
4462 if test "${HAVE_X11}" = "yes"; then
4463 DEFS="$C_SWITCH_X_SITE $DEFS"
4464 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
4465 LIBS="$LIBX $LIBS"
4466 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
4467 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
4469 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
4470 # This is handled by LD_SWITCH_X_SITE_AUX during the real build,
4471 # but it's more convenient here to set LD_RUN_PATH
4472 # since this also works on hosts that don't understand LD_SWITCH_X_SITE_AUX.
4473 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
4474 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
4475 export LD_RUN_PATH
4478 if test "${opsys}" = "gnu-linux"; then
4479 echo $ac_n "checking whether X on GNU/Linux needs -b to link""... $ac_c" 1>&6
4480 echo "configure:4481: checking whether X on GNU/Linux needs -b to link" >&5
4481 cat > conftest.$ac_ext <<EOF
4482 #line 4483 "configure"
4483 #include "confdefs.h"
4485 int main() {
4486 XOpenDisplay ("foo");
4487 ; return 0; }
4489 if { (eval echo configure:4490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4490 rm -rf conftest*
4491 xlinux_first_failure=no
4492 else
4493 echo "configure: failed program was:" >&5
4494 cat conftest.$ac_ext >&5
4495 rm -rf conftest*
4496 xlinux_first_failure=yes
4498 rm -f conftest*
4499 if test "${xlinux_first_failure}" = "yes"; then
4500 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
4501 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
4502 OLD_CPPFLAGS="$CPPFLAGS"
4503 OLD_LIBS="$LIBS"
4504 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
4505 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
4506 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
4507 LIBS="$LIBS -b i486-linuxaout"
4508 cat > conftest.$ac_ext <<EOF
4509 #line 4510 "configure"
4510 #include "confdefs.h"
4512 int main() {
4513 XOpenDisplay ("foo");
4514 ; return 0; }
4516 if { (eval echo configure:4517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4517 rm -rf conftest*
4518 xlinux_second_failure=no
4519 else
4520 echo "configure: failed program was:" >&5
4521 cat conftest.$ac_ext >&5
4522 rm -rf conftest*
4523 xlinux_second_failure=yes
4525 rm -f conftest*
4526 if test "${xlinux_second_failure}" = "yes"; then
4527 # If we get the same failure with -b, there is no use adding -b.
4528 # So take it out. This plays safe.
4529 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
4530 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
4531 CPPFLAGS="$OLD_CPPFLAGS"
4532 LIBS="$OLD_LIBS"
4533 echo "$ac_t""no" 1>&6
4534 else
4535 echo "$ac_t""yes" 1>&6
4537 else
4538 echo "$ac_t""no" 1>&6
4542 # Reportedly, some broken Solaris systems have XKBlib.h but are missing
4543 # header files included from there.
4544 echo $ac_n "checking for Xkb""... $ac_c" 1>&6
4545 echo "configure:4546: checking for Xkb" >&5
4546 cat > conftest.$ac_ext <<EOF
4547 #line 4548 "configure"
4548 #include "confdefs.h"
4549 #include <X11/Xlib.h>
4550 #include <X11/XKBlib.h>
4551 int main() {
4552 XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);
4553 ; return 0; }
4555 if { (eval echo configure:4556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4556 rm -rf conftest*
4557 emacs_xkb=yes
4558 else
4559 echo "configure: failed program was:" >&5
4560 cat conftest.$ac_ext >&5
4561 rm -rf conftest*
4562 emacs_xkb=no
4564 rm -f conftest*
4565 echo "$ac_t""$emacs_xkb" 1>&6
4566 if test $emacs_xkb = yes; then
4567 cat >> confdefs.h <<\EOF
4568 #define HAVE_XKBGETKEYBOARD 1
4573 for ac_func in XrmSetDatabase XScreenResourceString \
4574 XScreenNumberOfScreen XSetWMProtocols
4576 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4577 echo "configure:4578: checking for $ac_func" >&5
4578 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4579 echo $ac_n "(cached) $ac_c" 1>&6
4580 else
4581 cat > conftest.$ac_ext <<EOF
4582 #line 4583 "configure"
4583 #include "confdefs.h"
4584 /* System header to define __stub macros and hopefully few prototypes,
4585 which can conflict with char $ac_func(); below. */
4586 #include <assert.h>
4587 /* Override any gcc2 internal prototype to avoid an error. */
4588 /* We use char because int might match the return type of a gcc2
4589 builtin and then its argument prototype would still apply. */
4590 char $ac_func();
4592 int main() {
4594 /* The GNU C library defines this for functions which it implements
4595 to always fail with ENOSYS. Some functions are actually named
4596 something starting with __ and the normal name is an alias. */
4597 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4598 choke me
4599 #else
4600 $ac_func();
4601 #endif
4603 ; return 0; }
4605 if { (eval echo configure:4606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4606 rm -rf conftest*
4607 eval "ac_cv_func_$ac_func=yes"
4608 else
4609 echo "configure: failed program was:" >&5
4610 cat conftest.$ac_ext >&5
4611 rm -rf conftest*
4612 eval "ac_cv_func_$ac_func=no"
4614 rm -f conftest*
4617 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4618 echo "$ac_t""yes" 1>&6
4619 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4620 cat >> confdefs.h <<EOF
4621 #define $ac_tr_func 1
4624 else
4625 echo "$ac_t""no" 1>&6
4627 done
4631 if test "${window_system}" = "x11"; then
4632 echo $ac_n "checking X11 version 6""... $ac_c" 1>&6
4633 echo "configure:4634: checking X11 version 6" >&5
4634 if eval "test \"`echo '$''{'emacs_cv_x11_version_6'+set}'`\" = set"; then
4635 echo $ac_n "(cached) $ac_c" 1>&6
4636 else
4637 cat > conftest.$ac_ext <<EOF
4638 #line 4639 "configure"
4639 #include "confdefs.h"
4640 #include <X11/Xlib.h>
4641 int main() {
4642 #if XlibSpecificationRelease < 6
4643 fail;
4644 #endif
4646 ; return 0; }
4648 if { (eval echo configure:4649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4649 rm -rf conftest*
4650 emacs_cv_x11_version_6=yes
4651 else
4652 echo "configure: failed program was:" >&5
4653 cat conftest.$ac_ext >&5
4654 rm -rf conftest*
4655 emacs_cv_x11_version_6=no
4657 rm -f conftest*
4660 if test $emacs_cv_x11_version_6 = yes; then
4661 echo "$ac_t""6 or newer" 1>&6
4662 cat >> confdefs.h <<\EOF
4663 #define HAVE_X11R6 1
4666 else
4667 echo "$ac_t""before 6" 1>&6
4671 if test "${window_system}" = "x11"; then
4672 echo $ac_n "checking X11 version 5""... $ac_c" 1>&6
4673 echo "configure:4674: checking X11 version 5" >&5
4674 if eval "test \"`echo '$''{'emacs_cv_x11_version_5'+set}'`\" = set"; then
4675 echo $ac_n "(cached) $ac_c" 1>&6
4676 else
4677 cat > conftest.$ac_ext <<EOF
4678 #line 4679 "configure"
4679 #include "confdefs.h"
4680 #include <X11/Xlib.h>
4681 int main() {
4682 #if XlibSpecificationRelease < 5
4683 fail;
4684 #endif
4686 ; return 0; }
4688 if { (eval echo configure:4689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4689 rm -rf conftest*
4690 emacs_cv_x11_version_5=yes
4691 else
4692 echo "configure: failed program was:" >&5
4693 cat conftest.$ac_ext >&5
4694 rm -rf conftest*
4695 emacs_cv_x11_version_5=no
4697 rm -f conftest*
4700 if test $emacs_cv_x11_version_5 = yes; then
4701 echo "$ac_t""5 or newer" 1>&6
4702 HAVE_X11R5=yes
4703 cat >> confdefs.h <<\EOF
4704 #define HAVE_X11R5 1
4707 else
4708 HAVE_X11R5=no
4709 echo "$ac_t""before 5" 1>&6
4713 if test x"${USE_X_TOOLKIT}" = xmaybe; then
4714 if test x"${HAVE_X11R5}" = xyes; then
4715 echo $ac_n "checking X11 version 5 with Xaw""... $ac_c" 1>&6
4716 echo "configure:4717: checking X11 version 5 with Xaw" >&5
4717 if eval "test \"`echo '$''{'emacs_cv_x11_version_5_with_xaw'+set}'`\" = set"; then
4718 echo $ac_n "(cached) $ac_c" 1>&6
4719 else
4720 cat > conftest.$ac_ext <<EOF
4721 #line 4722 "configure"
4722 #include "confdefs.h"
4724 #include <X11/Intrinsic.h>
4725 #include <X11/Xaw/Simple.h>
4726 int main() {
4728 ; return 0; }
4730 if { (eval echo configure:4731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4731 rm -rf conftest*
4732 emacs_cv_x11_version_5_with_xaw=yes
4733 else
4734 echo "configure: failed program was:" >&5
4735 cat conftest.$ac_ext >&5
4736 rm -rf conftest*
4737 emacs_cv_x11_version_5_with_xaw=no
4739 rm -f conftest*
4742 if test $emacs_cv_x11_version_5_with_xaw = yes; then
4743 echo "$ac_t""5 or newer, with Xaw; use toolkit by default" 1>&6
4744 USE_X_TOOLKIT=LUCID
4745 else
4746 echo "$ac_t""before 5 or no Xaw; do not use toolkit by default" 1>&6
4747 USE_X_TOOLKIT=none
4749 else
4750 USE_X_TOOLKIT=none
4754 X_TOOLKIT_TYPE=$USE_X_TOOLKIT
4756 if test "${USE_X_TOOLKIT}" != "none"; then
4757 echo $ac_n "checking X11 toolkit version""... $ac_c" 1>&6
4758 echo "configure:4759: checking X11 toolkit version" >&5
4759 if eval "test \"`echo '$''{'emacs_cv_x11_toolkit_version_6'+set}'`\" = set"; then
4760 echo $ac_n "(cached) $ac_c" 1>&6
4761 else
4762 cat > conftest.$ac_ext <<EOF
4763 #line 4764 "configure"
4764 #include "confdefs.h"
4765 #include <X11/Intrinsic.h>
4766 int main() {
4767 #if XtSpecificationRelease < 6
4768 fail;
4769 #endif
4771 ; return 0; }
4773 if { (eval echo configure:4774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4774 rm -rf conftest*
4775 emacs_cv_x11_toolkit_version_6=yes
4776 else
4777 echo "configure: failed program was:" >&5
4778 cat conftest.$ac_ext >&5
4779 rm -rf conftest*
4780 emacs_cv_x11_toolkit_version_6=no
4782 rm -f conftest*
4785 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
4786 if test $emacs_cv_x11_toolkit_version_6 = yes; then
4787 echo "$ac_t""6 or newer" 1>&6
4788 cat >> confdefs.h <<\EOF
4789 #define HAVE_X11XTR6 1
4792 else
4793 echo "$ac_t""before 6" 1>&6
4796 OLDLIBS="$LIBS"
4797 if test x$HAVE_X11XTR6 = xyes; then
4798 LIBS="-lXt -lSM -lICE $LIBS"
4799 else
4800 LIBS="-lXt $LIBS"
4802 echo $ac_n "checking for XmuConvertStandardSelection in -lXmu""... $ac_c" 1>&6
4803 echo "configure:4804: checking for XmuConvertStandardSelection in -lXmu" >&5
4804 ac_lib_var=`echo Xmu'_'XmuConvertStandardSelection | sed 'y%./+-%__p_%'`
4805 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4806 echo $ac_n "(cached) $ac_c" 1>&6
4807 else
4808 ac_save_LIBS="$LIBS"
4809 LIBS="-lXmu $LIBS"
4810 cat > conftest.$ac_ext <<EOF
4811 #line 4812 "configure"
4812 #include "confdefs.h"
4813 /* Override any gcc2 internal prototype to avoid an error. */
4814 /* We use char because int might match the return type of a gcc2
4815 builtin and then its argument prototype would still apply. */
4816 char XmuConvertStandardSelection();
4818 int main() {
4819 XmuConvertStandardSelection()
4820 ; return 0; }
4822 if { (eval echo configure:4823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4823 rm -rf conftest*
4824 eval "ac_cv_lib_$ac_lib_var=yes"
4825 else
4826 echo "configure: failed program was:" >&5
4827 cat conftest.$ac_ext >&5
4828 rm -rf conftest*
4829 eval "ac_cv_lib_$ac_lib_var=no"
4831 rm -f conftest*
4832 LIBS="$ac_save_LIBS"
4835 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4836 echo "$ac_t""yes" 1>&6
4837 ac_tr_lib=HAVE_LIB`echo Xmu | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4838 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4839 cat >> confdefs.h <<EOF
4840 #define $ac_tr_lib 1
4843 LIBS="-lXmu $LIBS"
4845 else
4846 echo "$ac_t""no" 1>&6
4849 test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS"
4852 # On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D.
4853 if test "${HAVE_X11}" = "yes"; then
4854 if test "${USE_X_TOOLKIT}" != "none"; then
4855 echo $ac_n "checking for XShapeQueryExtension in -lXext""... $ac_c" 1>&6
4856 echo "configure:4857: checking for XShapeQueryExtension in -lXext" >&5
4857 ac_lib_var=`echo Xext'_'XShapeQueryExtension | sed 'y%./+-%__p_%'`
4858 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4859 echo $ac_n "(cached) $ac_c" 1>&6
4860 else
4861 ac_save_LIBS="$LIBS"
4862 LIBS="-lXext $LIBS"
4863 cat > conftest.$ac_ext <<EOF
4864 #line 4865 "configure"
4865 #include "confdefs.h"
4866 /* Override any gcc2 internal prototype to avoid an error. */
4867 /* We use char because int might match the return type of a gcc2
4868 builtin and then its argument prototype would still apply. */
4869 char XShapeQueryExtension();
4871 int main() {
4872 XShapeQueryExtension()
4873 ; return 0; }
4875 if { (eval echo configure:4876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4876 rm -rf conftest*
4877 eval "ac_cv_lib_$ac_lib_var=yes"
4878 else
4879 echo "configure: failed program was:" >&5
4880 cat conftest.$ac_ext >&5
4881 rm -rf conftest*
4882 eval "ac_cv_lib_$ac_lib_var=no"
4884 rm -f conftest*
4885 LIBS="$ac_save_LIBS"
4888 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4889 echo "$ac_t""yes" 1>&6
4890 ac_tr_lib=HAVE_LIB`echo Xext | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4891 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4892 cat >> confdefs.h <<EOF
4893 #define $ac_tr_lib 1
4896 LIBS="-lXext $LIBS"
4898 else
4899 echo "$ac_t""no" 1>&6
4905 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
4906 echo $ac_n "checking for Motif version 2.1""... $ac_c" 1>&6
4907 echo "configure:4908: checking for Motif version 2.1" >&5
4908 if eval "test \"`echo '$''{'emacs_cv_motif_version_2_1'+set}'`\" = set"; then
4909 echo $ac_n "(cached) $ac_c" 1>&6
4910 else
4911 cat > conftest.$ac_ext <<EOF
4912 #line 4913 "configure"
4913 #include "confdefs.h"
4914 #include <Xm/Xm.h>
4915 int main() {
4916 #if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
4917 int x = 5;
4918 #else
4919 Motif version prior to 2.1.
4920 #endif
4921 ; return 0; }
4923 if { (eval echo configure:4924: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4924 rm -rf conftest*
4925 emacs_cv_motif_version_2_1=yes
4926 else
4927 echo "configure: failed program was:" >&5
4928 cat conftest.$ac_ext >&5
4929 rm -rf conftest*
4930 emacs_cv_motif_version_2_1=no
4932 rm -f conftest*
4935 echo "$ac_t""$emacs_cv_motif_version_2_1" 1>&6
4936 HAVE_MOTIF_2_1=$emacs_cv_motif_version_2_1
4937 if test $emacs_cv_motif_version_2_1 = yes; then
4938 HAVE_LIBXP=no
4939 cat >> confdefs.h <<\EOF
4940 #define HAVE_MOTIF_2_1 1
4943 echo $ac_n "checking for XpCreateContext in -lXp""... $ac_c" 1>&6
4944 echo "configure:4945: checking for XpCreateContext in -lXp" >&5
4945 ac_lib_var=`echo Xp'_'XpCreateContext | sed 'y%./+-%__p_%'`
4946 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4947 echo $ac_n "(cached) $ac_c" 1>&6
4948 else
4949 ac_save_LIBS="$LIBS"
4950 LIBS="-lXp $LIBS"
4951 cat > conftest.$ac_ext <<EOF
4952 #line 4953 "configure"
4953 #include "confdefs.h"
4954 /* Override any gcc2 internal prototype to avoid an error. */
4955 /* We use char because int might match the return type of a gcc2
4956 builtin and then its argument prototype would still apply. */
4957 char XpCreateContext();
4959 int main() {
4960 XpCreateContext()
4961 ; return 0; }
4963 if { (eval echo configure:4964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4964 rm -rf conftest*
4965 eval "ac_cv_lib_$ac_lib_var=yes"
4966 else
4967 echo "configure: failed program was:" >&5
4968 cat conftest.$ac_ext >&5
4969 rm -rf conftest*
4970 eval "ac_cv_lib_$ac_lib_var=no"
4972 rm -f conftest*
4973 LIBS="$ac_save_LIBS"
4976 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4977 echo "$ac_t""yes" 1>&6
4978 HAVE_LIBXP=yes
4979 else
4980 echo "$ac_t""no" 1>&6
4983 if test ${HAVE_LIBXP} = yes; then
4984 cat >> confdefs.h <<\EOF
4985 #define HAVE_LIBXP 1
4992 ### Is -lXaw3d available?
4993 HAVE_XAW3D=no
4994 if test "${HAVE_X11}" = "yes"; then
4995 if test "${USE_X_TOOLKIT}" != "none"; then
4996 ac_safe=`echo "X11/Xaw3d/Scrollbar.h" | sed 'y%./+-%__p_%'`
4997 echo $ac_n "checking for X11/Xaw3d/Scrollbar.h""... $ac_c" 1>&6
4998 echo "configure:4999: checking for X11/Xaw3d/Scrollbar.h" >&5
4999 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+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 #include <X11/Xaw3d/Scrollbar.h>
5007 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5008 { (eval echo configure:5009: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5009 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5010 if test -z "$ac_err"; then
5011 rm -rf conftest*
5012 eval "ac_cv_header_$ac_safe=yes"
5013 else
5014 echo "$ac_err" >&5
5015 echo "configure: failed program was:" >&5
5016 cat conftest.$ac_ext >&5
5017 rm -rf conftest*
5018 eval "ac_cv_header_$ac_safe=no"
5020 rm -f conftest*
5022 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5023 echo "$ac_t""yes" 1>&6
5024 echo $ac_n "checking for XawScrollbarSetThumb in -lXaw3d""... $ac_c" 1>&6
5025 echo "configure:5026: checking for XawScrollbarSetThumb in -lXaw3d" >&5
5026 ac_lib_var=`echo Xaw3d'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'`
5027 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5028 echo $ac_n "(cached) $ac_c" 1>&6
5029 else
5030 ac_save_LIBS="$LIBS"
5031 LIBS="-lXaw3d $LIBS"
5032 cat > conftest.$ac_ext <<EOF
5033 #line 5034 "configure"
5034 #include "confdefs.h"
5035 /* Override any gcc2 internal prototype to avoid an error. */
5036 /* We use char because int might match the return type of a gcc2
5037 builtin and then its argument prototype would still apply. */
5038 char XawScrollbarSetThumb();
5040 int main() {
5041 XawScrollbarSetThumb()
5042 ; return 0; }
5044 if { (eval echo configure:5045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5045 rm -rf conftest*
5046 eval "ac_cv_lib_$ac_lib_var=yes"
5047 else
5048 echo "configure: failed program was:" >&5
5049 cat conftest.$ac_ext >&5
5050 rm -rf conftest*
5051 eval "ac_cv_lib_$ac_lib_var=no"
5053 rm -f conftest*
5054 LIBS="$ac_save_LIBS"
5057 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5058 echo "$ac_t""yes" 1>&6
5059 HAVE_XAW3D=yes
5060 else
5061 echo "$ac_t""no" 1>&6
5064 else
5065 echo "$ac_t""no" 1>&6
5068 if test "${HAVE_XAW3D}" = "yes"; then
5069 cat >> confdefs.h <<\EOF
5070 #define HAVE_XAW3D 1
5078 USE_TOOLKIT_SCROLL_BARS=no
5079 if test "${with_toolkit_scroll_bars}" != "no"; then
5080 if test "${USE_X_TOOLKIT}" != "none"; then
5081 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
5082 cat >> confdefs.h <<\EOF
5083 #define USE_TOOLKIT_SCROLL_BARS 1
5086 HAVE_XAW3D=no
5087 USE_TOOLKIT_SCROLL_BARS=yes
5088 elif test "${HAVE_XAW3D}" = "yes"; then
5089 cat >> confdefs.h <<\EOF
5090 #define USE_TOOLKIT_SCROLL_BARS 1
5093 USE_TOOLKIT_SCROLL_BARS=yes
5099 if test "${with_xim}" != "no"; then
5100 cat >> confdefs.h <<\EOF
5101 #define USE_XIM 1
5106 ### Use -lXpm if available, unless `--with-xpm=no'.
5107 HAVE_XPM=no
5108 if test "${HAVE_X11}" = "yes"; then
5109 if test "${with_xpm}" != "no"; then
5110 ac_safe=`echo "X11/xpm.h" | sed 'y%./+-%__p_%'`
5111 echo $ac_n "checking for X11/xpm.h""... $ac_c" 1>&6
5112 echo "configure:5113: checking for X11/xpm.h" >&5
5113 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5114 echo $ac_n "(cached) $ac_c" 1>&6
5115 else
5116 cat > conftest.$ac_ext <<EOF
5117 #line 5118 "configure"
5118 #include "confdefs.h"
5119 #include <X11/xpm.h>
5121 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5122 { (eval echo configure:5123: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5123 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5124 if test -z "$ac_err"; then
5125 rm -rf conftest*
5126 eval "ac_cv_header_$ac_safe=yes"
5127 else
5128 echo "$ac_err" >&5
5129 echo "configure: failed program was:" >&5
5130 cat conftest.$ac_ext >&5
5131 rm -rf conftest*
5132 eval "ac_cv_header_$ac_safe=no"
5134 rm -f conftest*
5136 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5137 echo "$ac_t""yes" 1>&6
5138 echo $ac_n "checking for XpmReadFileToPixmap in -lXpm""... $ac_c" 1>&6
5139 echo "configure:5140: checking for XpmReadFileToPixmap in -lXpm" >&5
5140 ac_lib_var=`echo Xpm'_'XpmReadFileToPixmap | sed 'y%./+-%__p_%'`
5141 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5142 echo $ac_n "(cached) $ac_c" 1>&6
5143 else
5144 ac_save_LIBS="$LIBS"
5145 LIBS="-lXpm -lX11 $LIBS"
5146 cat > conftest.$ac_ext <<EOF
5147 #line 5148 "configure"
5148 #include "confdefs.h"
5149 /* Override any gcc2 internal prototype to avoid an error. */
5150 /* We use char because int might match the return type of a gcc2
5151 builtin and then its argument prototype would still apply. */
5152 char XpmReadFileToPixmap();
5154 int main() {
5155 XpmReadFileToPixmap()
5156 ; return 0; }
5158 if { (eval echo configure:5159: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5159 rm -rf conftest*
5160 eval "ac_cv_lib_$ac_lib_var=yes"
5161 else
5162 echo "configure: failed program was:" >&5
5163 cat conftest.$ac_ext >&5
5164 rm -rf conftest*
5165 eval "ac_cv_lib_$ac_lib_var=no"
5167 rm -f conftest*
5168 LIBS="$ac_save_LIBS"
5171 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5172 echo "$ac_t""yes" 1>&6
5173 HAVE_XPM=yes
5174 else
5175 echo "$ac_t""no" 1>&6
5178 else
5179 echo "$ac_t""no" 1>&6
5182 if test "${HAVE_XPM}" = "yes"; then
5183 echo $ac_n "checking for XpmReturnAllocPixels preprocessor define""... $ac_c" 1>&6
5184 echo "configure:5185: checking for XpmReturnAllocPixels preprocessor define" >&5
5185 cat > conftest.$ac_ext <<EOF
5186 #line 5187 "configure"
5187 #include "confdefs.h"
5188 #include "X11/xpm.h"
5189 #ifndef XpmReturnAllocPixels
5190 no_return_alloc_pixels
5191 #endif
5194 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5195 egrep "no_return_alloc_pixels" >/dev/null 2>&1; then
5196 rm -rf conftest*
5197 HAVE_XPM=no
5198 else
5199 rm -rf conftest*
5200 HAVE_XPM=yes
5202 rm -f conftest*
5205 if test "${HAVE_XPM}" = "yes"; then
5206 echo "$ac_t""yes" 1>&6
5207 else
5208 echo "$ac_t""no" 1>&6
5213 if test "${HAVE_XPM}" = "yes"; then
5214 cat >> confdefs.h <<\EOF
5215 #define HAVE_XPM 1
5221 ### Use -ljpeg if available, unless `--with-jpeg=no'.
5222 HAVE_JPEG=no
5223 if test "${HAVE_X11}" = "yes"; then
5224 if test "${with_jpeg}" != "no"; then
5225 ac_safe=`echo "jerror.h" | sed 'y%./+-%__p_%'`
5226 echo $ac_n "checking for jerror.h""... $ac_c" 1>&6
5227 echo "configure:5228: checking for jerror.h" >&5
5228 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5229 echo $ac_n "(cached) $ac_c" 1>&6
5230 else
5231 cat > conftest.$ac_ext <<EOF
5232 #line 5233 "configure"
5233 #include "confdefs.h"
5234 #include <jerror.h>
5236 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5237 { (eval echo configure:5238: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5238 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5239 if test -z "$ac_err"; then
5240 rm -rf conftest*
5241 eval "ac_cv_header_$ac_safe=yes"
5242 else
5243 echo "$ac_err" >&5
5244 echo "configure: failed program was:" >&5
5245 cat conftest.$ac_ext >&5
5246 rm -rf conftest*
5247 eval "ac_cv_header_$ac_safe=no"
5249 rm -f conftest*
5251 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5252 echo "$ac_t""yes" 1>&6
5253 echo $ac_n "checking for jpeg_destroy_compress in -ljpeg""... $ac_c" 1>&6
5254 echo "configure:5255: checking for jpeg_destroy_compress in -ljpeg" >&5
5255 ac_lib_var=`echo jpeg'_'jpeg_destroy_compress | sed 'y%./+-%__p_%'`
5256 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5257 echo $ac_n "(cached) $ac_c" 1>&6
5258 else
5259 ac_save_LIBS="$LIBS"
5260 LIBS="-ljpeg $LIBS"
5261 cat > conftest.$ac_ext <<EOF
5262 #line 5263 "configure"
5263 #include "confdefs.h"
5264 /* Override any gcc2 internal prototype to avoid an error. */
5265 /* We use char because int might match the return type of a gcc2
5266 builtin and then its argument prototype would still apply. */
5267 char jpeg_destroy_compress();
5269 int main() {
5270 jpeg_destroy_compress()
5271 ; return 0; }
5273 if { (eval echo configure:5274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5274 rm -rf conftest*
5275 eval "ac_cv_lib_$ac_lib_var=yes"
5276 else
5277 echo "configure: failed program was:" >&5
5278 cat conftest.$ac_ext >&5
5279 rm -rf conftest*
5280 eval "ac_cv_lib_$ac_lib_var=no"
5282 rm -f conftest*
5283 LIBS="$ac_save_LIBS"
5286 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5287 echo "$ac_t""yes" 1>&6
5288 HAVE_JPEG=yes
5289 else
5290 echo "$ac_t""no" 1>&6
5293 else
5294 echo "$ac_t""no" 1>&6
5299 if test "${HAVE_JPEG}" = "yes"; then
5300 cat >> confdefs.h <<\EOF
5301 #define HAVE_JPEG 1
5307 ### Use -lpng if available, unless `--with-png=no'.
5308 HAVE_PNG=no
5309 if test "${HAVE_X11}" = "yes"; then
5310 if test "${with_png}" != "no"; then
5311 ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'`
5312 echo $ac_n "checking for png.h""... $ac_c" 1>&6
5313 echo "configure:5314: checking for png.h" >&5
5314 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5315 echo $ac_n "(cached) $ac_c" 1>&6
5316 else
5317 cat > conftest.$ac_ext <<EOF
5318 #line 5319 "configure"
5319 #include "confdefs.h"
5320 #include <png.h>
5322 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5323 { (eval echo configure:5324: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5324 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5325 if test -z "$ac_err"; then
5326 rm -rf conftest*
5327 eval "ac_cv_header_$ac_safe=yes"
5328 else
5329 echo "$ac_err" >&5
5330 echo "configure: failed program was:" >&5
5331 cat conftest.$ac_ext >&5
5332 rm -rf conftest*
5333 eval "ac_cv_header_$ac_safe=no"
5335 rm -f conftest*
5337 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5338 echo "$ac_t""yes" 1>&6
5339 echo $ac_n "checking for png_get_channels in -lpng""... $ac_c" 1>&6
5340 echo "configure:5341: checking for png_get_channels in -lpng" >&5
5341 ac_lib_var=`echo png'_'png_get_channels | sed 'y%./+-%__p_%'`
5342 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5343 echo $ac_n "(cached) $ac_c" 1>&6
5344 else
5345 ac_save_LIBS="$LIBS"
5346 LIBS="-lpng -lz -lm $LIBS"
5347 cat > conftest.$ac_ext <<EOF
5348 #line 5349 "configure"
5349 #include "confdefs.h"
5350 /* Override any gcc2 internal prototype to avoid an error. */
5351 /* We use char because int might match the return type of a gcc2
5352 builtin and then its argument prototype would still apply. */
5353 char png_get_channels();
5355 int main() {
5356 png_get_channels()
5357 ; return 0; }
5359 if { (eval echo configure:5360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5360 rm -rf conftest*
5361 eval "ac_cv_lib_$ac_lib_var=yes"
5362 else
5363 echo "configure: failed program was:" >&5
5364 cat conftest.$ac_ext >&5
5365 rm -rf conftest*
5366 eval "ac_cv_lib_$ac_lib_var=no"
5368 rm -f conftest*
5369 LIBS="$ac_save_LIBS"
5372 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5373 echo "$ac_t""yes" 1>&6
5374 HAVE_PNG=yes
5375 else
5376 echo "$ac_t""no" 1>&6
5379 else
5380 echo "$ac_t""no" 1>&6
5385 if test "${HAVE_PNG}" = "yes"; then
5386 cat >> confdefs.h <<\EOF
5387 #define HAVE_PNG 1
5393 ### Use -ltiff if available, unless `--with-tiff=no'.
5394 HAVE_TIFF=no
5395 if test "${HAVE_X11}" = "yes"; then
5396 if test "${with_tiff}" != "no"; then
5397 ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'`
5398 echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6
5399 echo "configure:5400: checking for tiffio.h" >&5
5400 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5401 echo $ac_n "(cached) $ac_c" 1>&6
5402 else
5403 cat > conftest.$ac_ext <<EOF
5404 #line 5405 "configure"
5405 #include "confdefs.h"
5406 #include <tiffio.h>
5408 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5409 { (eval echo configure:5410: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5410 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5411 if test -z "$ac_err"; then
5412 rm -rf conftest*
5413 eval "ac_cv_header_$ac_safe=yes"
5414 else
5415 echo "$ac_err" >&5
5416 echo "configure: failed program was:" >&5
5417 cat conftest.$ac_ext >&5
5418 rm -rf conftest*
5419 eval "ac_cv_header_$ac_safe=no"
5421 rm -f conftest*
5423 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5424 echo "$ac_t""yes" 1>&6
5425 tifflibs="-lz -lm"
5426 # At least one tiff package requires the jpeg library.
5427 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
5428 echo $ac_n "checking for TIFFGetVersion in -ltiff""... $ac_c" 1>&6
5429 echo "configure:5430: checking for TIFFGetVersion in -ltiff" >&5
5430 ac_lib_var=`echo tiff'_'TIFFGetVersion | sed 'y%./+-%__p_%'`
5431 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5432 echo $ac_n "(cached) $ac_c" 1>&6
5433 else
5434 ac_save_LIBS="$LIBS"
5435 LIBS="-ltiff $tifflibs $LIBS"
5436 cat > conftest.$ac_ext <<EOF
5437 #line 5438 "configure"
5438 #include "confdefs.h"
5439 /* Override any gcc2 internal prototype to avoid an error. */
5440 /* We use char because int might match the return type of a gcc2
5441 builtin and then its argument prototype would still apply. */
5442 char TIFFGetVersion();
5444 int main() {
5445 TIFFGetVersion()
5446 ; return 0; }
5448 if { (eval echo configure:5449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5449 rm -rf conftest*
5450 eval "ac_cv_lib_$ac_lib_var=yes"
5451 else
5452 echo "configure: failed program was:" >&5
5453 cat conftest.$ac_ext >&5
5454 rm -rf conftest*
5455 eval "ac_cv_lib_$ac_lib_var=no"
5457 rm -f conftest*
5458 LIBS="$ac_save_LIBS"
5461 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5462 echo "$ac_t""yes" 1>&6
5463 HAVE_TIFF=yes
5464 else
5465 echo "$ac_t""no" 1>&6
5468 else
5469 echo "$ac_t""no" 1>&6
5474 if test "${HAVE_TIFF}" = "yes"; then
5475 cat >> confdefs.h <<\EOF
5476 #define HAVE_TIFF 1
5482 ### Use -lgif if available, unless `--with-gif=no'.
5483 HAVE_GIF=no
5484 if test "${HAVE_X11}" = "yes"; then
5485 if test "${with_gif}" != "no"; then
5486 ac_safe=`echo "gif_lib.h" | sed 'y%./+-%__p_%'`
5487 echo $ac_n "checking for gif_lib.h""... $ac_c" 1>&6
5488 echo "configure:5489: checking for gif_lib.h" >&5
5489 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5490 echo $ac_n "(cached) $ac_c" 1>&6
5491 else
5492 cat > conftest.$ac_ext <<EOF
5493 #line 5494 "configure"
5494 #include "confdefs.h"
5495 #include <gif_lib.h>
5497 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5498 { (eval echo configure:5499: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5499 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5500 if test -z "$ac_err"; then
5501 rm -rf conftest*
5502 eval "ac_cv_header_$ac_safe=yes"
5503 else
5504 echo "$ac_err" >&5
5505 echo "configure: failed program was:" >&5
5506 cat conftest.$ac_ext >&5
5507 rm -rf conftest*
5508 eval "ac_cv_header_$ac_safe=no"
5510 rm -f conftest*
5512 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5513 echo "$ac_t""yes" 1>&6
5514 echo $ac_n "checking for DGifOpen in -lungif""... $ac_c" 1>&6
5515 echo "configure:5516: checking for DGifOpen in -lungif" >&5
5516 ac_lib_var=`echo ungif'_'DGifOpen | sed 'y%./+-%__p_%'`
5517 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5518 echo $ac_n "(cached) $ac_c" 1>&6
5519 else
5520 ac_save_LIBS="$LIBS"
5521 LIBS="-lungif $LIBS"
5522 cat > conftest.$ac_ext <<EOF
5523 #line 5524 "configure"
5524 #include "confdefs.h"
5525 /* Override any gcc2 internal prototype to avoid an error. */
5526 /* We use char because int might match the return type of a gcc2
5527 builtin and then its argument prototype would still apply. */
5528 char DGifOpen();
5530 int main() {
5531 DGifOpen()
5532 ; return 0; }
5534 if { (eval echo configure:5535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5535 rm -rf conftest*
5536 eval "ac_cv_lib_$ac_lib_var=yes"
5537 else
5538 echo "configure: failed program was:" >&5
5539 cat conftest.$ac_ext >&5
5540 rm -rf conftest*
5541 eval "ac_cv_lib_$ac_lib_var=no"
5543 rm -f conftest*
5544 LIBS="$ac_save_LIBS"
5547 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5548 echo "$ac_t""yes" 1>&6
5549 HAVE_GIF=yes
5550 else
5551 echo "$ac_t""no" 1>&6
5554 else
5555 echo "$ac_t""no" 1>&6
5560 if test "${HAVE_GIF}" = "yes"; then
5561 cat >> confdefs.h <<\EOF
5562 #define HAVE_GIF 1
5568 # If netdb.h doesn't declare h_errno, we must declare it by hand.
5569 echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
5570 echo "configure:5571: checking whether netdb declares h_errno" >&5
5571 if eval "test \"`echo '$''{'emacs_cv_netdb_declares_h_errno'+set}'`\" = set"; then
5572 echo $ac_n "(cached) $ac_c" 1>&6
5573 else
5574 cat > conftest.$ac_ext <<EOF
5575 #line 5576 "configure"
5576 #include "confdefs.h"
5577 #include <netdb.h>
5578 int main() {
5579 return h_errno;
5580 ; return 0; }
5582 if { (eval echo configure:5583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5583 rm -rf conftest*
5584 emacs_cv_netdb_declares_h_errno=yes
5585 else
5586 echo "configure: failed program was:" >&5
5587 cat conftest.$ac_ext >&5
5588 rm -rf conftest*
5589 emacs_cv_netdb_declares_h_errno=no
5591 rm -f conftest*
5594 echo "$ac_t""$emacs_cv_netdb_declares_h_errno" 1>&6
5595 if test $emacs_cv_netdb_declares_h_errno = yes; then
5596 cat >> confdefs.h <<\EOF
5597 #define HAVE_H_ERRNO 1
5602 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
5603 # for constant arguments. Useless!
5604 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
5605 echo "configure:5606: checking for working alloca.h" >&5
5606 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
5607 echo $ac_n "(cached) $ac_c" 1>&6
5608 else
5609 cat > conftest.$ac_ext <<EOF
5610 #line 5611 "configure"
5611 #include "confdefs.h"
5612 #include <alloca.h>
5613 int main() {
5614 char *p = alloca(2 * sizeof(int));
5615 ; return 0; }
5617 if { (eval echo configure:5618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5618 rm -rf conftest*
5619 ac_cv_header_alloca_h=yes
5620 else
5621 echo "configure: failed program was:" >&5
5622 cat conftest.$ac_ext >&5
5623 rm -rf conftest*
5624 ac_cv_header_alloca_h=no
5626 rm -f conftest*
5629 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
5630 if test $ac_cv_header_alloca_h = yes; then
5631 cat >> confdefs.h <<\EOF
5632 #define HAVE_ALLOCA_H 1
5637 echo $ac_n "checking for alloca""... $ac_c" 1>&6
5638 echo "configure:5639: checking for alloca" >&5
5639 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
5640 echo $ac_n "(cached) $ac_c" 1>&6
5641 else
5642 cat > conftest.$ac_ext <<EOF
5643 #line 5644 "configure"
5644 #include "confdefs.h"
5646 #ifdef __GNUC__
5647 # define alloca __builtin_alloca
5648 #else
5649 # ifdef _MSC_VER
5650 # include <malloc.h>
5651 # define alloca _alloca
5652 # else
5653 # if HAVE_ALLOCA_H
5654 # include <alloca.h>
5655 # else
5656 # ifdef _AIX
5657 #pragma alloca
5658 # else
5659 # ifndef alloca /* predefined by HP cc +Olibcalls */
5660 char *alloca ();
5661 # endif
5662 # endif
5663 # endif
5664 # endif
5665 #endif
5667 int main() {
5668 char *p = (char *) alloca(1);
5669 ; return 0; }
5671 if { (eval echo configure:5672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5672 rm -rf conftest*
5673 ac_cv_func_alloca_works=yes
5674 else
5675 echo "configure: failed program was:" >&5
5676 cat conftest.$ac_ext >&5
5677 rm -rf conftest*
5678 ac_cv_func_alloca_works=no
5680 rm -f conftest*
5683 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
5684 if test $ac_cv_func_alloca_works = yes; then
5685 cat >> confdefs.h <<\EOF
5686 #define HAVE_ALLOCA 1
5691 if test $ac_cv_func_alloca_works = no; then
5692 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
5693 # that cause trouble. Some versions do not even contain alloca or
5694 # contain a buggy version. If you still want to use their alloca,
5695 # use ar to extract alloca.o from them instead of compiling alloca.c.
5696 ALLOCA=alloca.${ac_objext}
5697 cat >> confdefs.h <<\EOF
5698 #define C_ALLOCA 1
5702 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
5703 echo "configure:5704: checking whether alloca needs Cray hooks" >&5
5704 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
5705 echo $ac_n "(cached) $ac_c" 1>&6
5706 else
5707 cat > conftest.$ac_ext <<EOF
5708 #line 5709 "configure"
5709 #include "confdefs.h"
5710 #if defined(CRAY) && ! defined(CRAY2)
5711 webecray
5712 #else
5713 wenotbecray
5714 #endif
5717 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5718 egrep "webecray" >/dev/null 2>&1; then
5719 rm -rf conftest*
5720 ac_cv_os_cray=yes
5721 else
5722 rm -rf conftest*
5723 ac_cv_os_cray=no
5725 rm -f conftest*
5729 echo "$ac_t""$ac_cv_os_cray" 1>&6
5730 if test $ac_cv_os_cray = yes; then
5731 for ac_func in _getb67 GETB67 getb67; do
5732 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5733 echo "configure:5734: checking for $ac_func" >&5
5734 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5735 echo $ac_n "(cached) $ac_c" 1>&6
5736 else
5737 cat > conftest.$ac_ext <<EOF
5738 #line 5739 "configure"
5739 #include "confdefs.h"
5740 /* System header to define __stub macros and hopefully few prototypes,
5741 which can conflict with char $ac_func(); below. */
5742 #include <assert.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 $ac_func();
5748 int main() {
5750 /* The GNU C library defines this for functions which it implements
5751 to always fail with ENOSYS. Some functions are actually named
5752 something starting with __ and the normal name is an alias. */
5753 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5754 choke me
5755 #else
5756 $ac_func();
5757 #endif
5759 ; return 0; }
5761 if { (eval echo configure:5762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5762 rm -rf conftest*
5763 eval "ac_cv_func_$ac_func=yes"
5764 else
5765 echo "configure: failed program was:" >&5
5766 cat conftest.$ac_ext >&5
5767 rm -rf conftest*
5768 eval "ac_cv_func_$ac_func=no"
5770 rm -f conftest*
5773 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5774 echo "$ac_t""yes" 1>&6
5775 cat >> confdefs.h <<EOF
5776 #define CRAY_STACKSEG_END $ac_func
5779 break
5780 else
5781 echo "$ac_t""no" 1>&6
5784 done
5787 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
5788 echo "configure:5789: checking stack direction for C alloca" >&5
5789 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
5790 echo $ac_n "(cached) $ac_c" 1>&6
5791 else
5792 if test "$cross_compiling" = yes; then
5793 ac_cv_c_stack_direction=0
5794 else
5795 cat > conftest.$ac_ext <<EOF
5796 #line 5797 "configure"
5797 #include "confdefs.h"
5798 find_stack_direction ()
5800 static char *addr = 0;
5801 auto char dummy;
5802 if (addr == 0)
5804 addr = &dummy;
5805 return find_stack_direction ();
5807 else
5808 return (&dummy > addr) ? 1 : -1;
5810 main ()
5812 exit (find_stack_direction() < 0);
5815 if { (eval echo configure:5816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5816 then
5817 ac_cv_c_stack_direction=1
5818 else
5819 echo "configure: failed program was:" >&5
5820 cat conftest.$ac_ext >&5
5821 rm -fr conftest*
5822 ac_cv_c_stack_direction=-1
5824 rm -fr conftest*
5829 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
5830 cat >> confdefs.h <<EOF
5831 #define STACK_DIRECTION $ac_cv_c_stack_direction
5837 # fmod, logb, and frexp are found in -lm on most systems.
5838 # On HPUX 9.01, -lm does not contain logb, so check for sqrt.
5839 echo $ac_n "checking for sqrt in -lm""... $ac_c" 1>&6
5840 echo "configure:5841: checking for sqrt in -lm" >&5
5841 ac_lib_var=`echo m'_'sqrt | sed 'y%./+-%__p_%'`
5842 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5843 echo $ac_n "(cached) $ac_c" 1>&6
5844 else
5845 ac_save_LIBS="$LIBS"
5846 LIBS="-lm $LIBS"
5847 cat > conftest.$ac_ext <<EOF
5848 #line 5849 "configure"
5849 #include "confdefs.h"
5850 /* Override any gcc2 internal prototype to avoid an error. */
5851 /* We use char because int might match the return type of a gcc2
5852 builtin and then its argument prototype would still apply. */
5853 char sqrt();
5855 int main() {
5856 sqrt()
5857 ; return 0; }
5859 if { (eval echo configure:5860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5860 rm -rf conftest*
5861 eval "ac_cv_lib_$ac_lib_var=yes"
5862 else
5863 echo "configure: failed program was:" >&5
5864 cat conftest.$ac_ext >&5
5865 rm -rf conftest*
5866 eval "ac_cv_lib_$ac_lib_var=no"
5868 rm -f conftest*
5869 LIBS="$ac_save_LIBS"
5872 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5873 echo "$ac_t""yes" 1>&6
5874 ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5875 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5876 cat >> confdefs.h <<EOF
5877 #define $ac_tr_lib 1
5880 LIBS="-lm $LIBS"
5882 else
5883 echo "$ac_t""no" 1>&6
5887 # Check for mail-locking functions in a "mail" library
5888 echo $ac_n "checking for maillock in -lmail""... $ac_c" 1>&6
5889 echo "configure:5890: checking for maillock in -lmail" >&5
5890 ac_lib_var=`echo mail'_'maillock | sed 'y%./+-%__p_%'`
5891 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5892 echo $ac_n "(cached) $ac_c" 1>&6
5893 else
5894 ac_save_LIBS="$LIBS"
5895 LIBS="-lmail $LIBS"
5896 cat > conftest.$ac_ext <<EOF
5897 #line 5898 "configure"
5898 #include "confdefs.h"
5899 /* Override any gcc2 internal prototype to avoid an error. */
5900 /* We use char because int might match the return type of a gcc2
5901 builtin and then its argument prototype would still apply. */
5902 char maillock();
5904 int main() {
5905 maillock()
5906 ; return 0; }
5908 if { (eval echo configure:5909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5909 rm -rf conftest*
5910 eval "ac_cv_lib_$ac_lib_var=yes"
5911 else
5912 echo "configure: failed program was:" >&5
5913 cat conftest.$ac_ext >&5
5914 rm -rf conftest*
5915 eval "ac_cv_lib_$ac_lib_var=no"
5917 rm -f conftest*
5918 LIBS="$ac_save_LIBS"
5921 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5922 echo "$ac_t""yes" 1>&6
5923 ac_tr_lib=HAVE_LIB`echo mail | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5924 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5925 cat >> confdefs.h <<EOF
5926 #define $ac_tr_lib 1
5929 LIBS="-lmail $LIBS"
5931 else
5932 echo "$ac_t""no" 1>&6
5935 echo $ac_n "checking for maillock in -llockfile""... $ac_c" 1>&6
5936 echo "configure:5937: checking for maillock in -llockfile" >&5
5937 ac_lib_var=`echo lockfile'_'maillock | sed 'y%./+-%__p_%'`
5938 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5939 echo $ac_n "(cached) $ac_c" 1>&6
5940 else
5941 ac_save_LIBS="$LIBS"
5942 LIBS="-llockfile $LIBS"
5943 cat > conftest.$ac_ext <<EOF
5944 #line 5945 "configure"
5945 #include "confdefs.h"
5946 /* Override any gcc2 internal prototype to avoid an error. */
5947 /* We use char because int might match the return type of a gcc2
5948 builtin and then its argument prototype would still apply. */
5949 char maillock();
5951 int main() {
5952 maillock()
5953 ; return 0; }
5955 if { (eval echo configure:5956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5956 rm -rf conftest*
5957 eval "ac_cv_lib_$ac_lib_var=yes"
5958 else
5959 echo "configure: failed program was:" >&5
5960 cat conftest.$ac_ext >&5
5961 rm -rf conftest*
5962 eval "ac_cv_lib_$ac_lib_var=no"
5964 rm -f conftest*
5965 LIBS="$ac_save_LIBS"
5968 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5969 echo "$ac_t""yes" 1>&6
5970 ac_tr_lib=HAVE_LIB`echo lockfile | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5971 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5972 cat >> confdefs.h <<EOF
5973 #define $ac_tr_lib 1
5976 LIBS="-llockfile $LIBS"
5978 else
5979 echo "$ac_t""no" 1>&6
5982 # If we have the shared liblockfile, assume we must use it for mail
5983 # locking (e.g. Debian). If we couldn't link against liblockfile
5984 # (no liblockfile.a installed), ensure that we don't need to.
5985 if test "$ac_cv_lib_lockfile_maillock" = no; then
5986 # Extract the first word of "liblockfile.so", so it can be a program name with args.
5987 set dummy liblockfile.so; ac_word=$2
5988 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5989 echo "configure:5990: checking for $ac_word" >&5
5990 if eval "test \"`echo '$''{'ac_cv_prog_liblockfile'+set}'`\" = set"; then
5991 echo $ac_n "(cached) $ac_c" 1>&6
5992 else
5993 if test -n "$liblockfile"; then
5994 ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
5995 else
5996 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5997 ac_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
5998 for ac_dir in $ac_dummy; do
5999 test -z "$ac_dir" && ac_dir=.
6000 if test -f $ac_dir/$ac_word; then
6001 ac_cv_prog_liblockfile="yes"
6002 break
6004 done
6005 IFS="$ac_save_ifs"
6006 test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
6009 liblockfile="$ac_cv_prog_liblockfile"
6010 if test -n "$liblockfile"; then
6011 echo "$ac_t""$liblockfile" 1>&6
6012 else
6013 echo "$ac_t""no" 1>&6
6016 if test $ac_cv_prog_liblockfile = yes; then
6017 { echo "configure: error: Shared liblockfile found but can't link against it.
6018 This probably means that movemail could lose mail.
6019 There may be a \`development' package to install containing liblockfile." 1>&2; exit 1; }
6020 else cat >> confdefs.h <<\EOF
6021 #define LIBMAIL -llockfile
6025 else :
6027 for ac_func in touchlock
6029 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6030 echo "configure:6031: checking for $ac_func" >&5
6031 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6032 echo $ac_n "(cached) $ac_c" 1>&6
6033 else
6034 cat > conftest.$ac_ext <<EOF
6035 #line 6036 "configure"
6036 #include "confdefs.h"
6037 /* System header to define __stub macros and hopefully few prototypes,
6038 which can conflict with char $ac_func(); below. */
6039 #include <assert.h>
6040 /* Override any gcc2 internal prototype to avoid an error. */
6041 /* We use char because int might match the return type of a gcc2
6042 builtin and then its argument prototype would still apply. */
6043 char $ac_func();
6045 int main() {
6047 /* The GNU C library defines this for functions which it implements
6048 to always fail with ENOSYS. Some functions are actually named
6049 something starting with __ and the normal name is an alias. */
6050 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6051 choke me
6052 #else
6053 $ac_func();
6054 #endif
6056 ; return 0; }
6058 if { (eval echo configure:6059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6059 rm -rf conftest*
6060 eval "ac_cv_func_$ac_func=yes"
6061 else
6062 echo "configure: failed program was:" >&5
6063 cat conftest.$ac_ext >&5
6064 rm -rf conftest*
6065 eval "ac_cv_func_$ac_func=no"
6067 rm -f conftest*
6070 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6071 echo "$ac_t""yes" 1>&6
6072 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6073 cat >> confdefs.h <<EOF
6074 #define $ac_tr_func 1
6077 else
6078 echo "$ac_t""no" 1>&6
6080 done
6082 for ac_hdr in maillock.h
6084 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6085 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6086 echo "configure:6087: checking for $ac_hdr" >&5
6087 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6088 echo $ac_n "(cached) $ac_c" 1>&6
6089 else
6090 cat > conftest.$ac_ext <<EOF
6091 #line 6092 "configure"
6092 #include "confdefs.h"
6093 #include <$ac_hdr>
6095 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6096 { (eval echo configure:6097: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6097 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6098 if test -z "$ac_err"; then
6099 rm -rf conftest*
6100 eval "ac_cv_header_$ac_safe=yes"
6101 else
6102 echo "$ac_err" >&5
6103 echo "configure: failed program was:" >&5
6104 cat conftest.$ac_ext >&5
6105 rm -rf conftest*
6106 eval "ac_cv_header_$ac_safe=no"
6108 rm -f conftest*
6110 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6111 echo "$ac_t""yes" 1>&6
6112 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6113 cat >> confdefs.h <<EOF
6114 #define $ac_tr_hdr 1
6117 else
6118 echo "$ac_t""no" 1>&6
6120 done
6123 for ac_func in gethostname getdomainname dup2 \
6124 rename closedir mkdir rmdir sysinfo \
6125 random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime res_init setsid \
6126 strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \
6127 utimes setrlimit setpgid getcwd getwd shutdown strftime getaddrinfo \
6128 __fpending mblen mbrlen strsignal setitimer ualarm index rindex \
6129 gai_strerror mkstemp
6131 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6132 echo "configure:6133: checking for $ac_func" >&5
6133 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6134 echo $ac_n "(cached) $ac_c" 1>&6
6135 else
6136 cat > conftest.$ac_ext <<EOF
6137 #line 6138 "configure"
6138 #include "confdefs.h"
6139 /* System header to define __stub macros and hopefully few prototypes,
6140 which can conflict with char $ac_func(); below. */
6141 #include <assert.h>
6142 /* Override any gcc2 internal prototype to avoid an error. */
6143 /* We use char because int might match the return type of a gcc2
6144 builtin and then its argument prototype would still apply. */
6145 char $ac_func();
6147 int main() {
6149 /* The GNU C library defines this for functions which it implements
6150 to always fail with ENOSYS. Some functions are actually named
6151 something starting with __ and the normal name is an alias. */
6152 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6153 choke me
6154 #else
6155 $ac_func();
6156 #endif
6158 ; return 0; }
6160 if { (eval echo configure:6161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6161 rm -rf conftest*
6162 eval "ac_cv_func_$ac_func=yes"
6163 else
6164 echo "configure: failed program was:" >&5
6165 cat conftest.$ac_ext >&5
6166 rm -rf conftest*
6167 eval "ac_cv_func_$ac_func=no"
6169 rm -f conftest*
6172 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6173 echo "$ac_t""yes" 1>&6
6174 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6175 cat >> confdefs.h <<EOF
6176 #define $ac_tr_func 1
6179 else
6180 echo "$ac_t""no" 1>&6
6182 done
6185 for ac_hdr in sys/time.h unistd.h
6187 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6188 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6189 echo "configure:6190: checking for $ac_hdr" >&5
6190 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6191 echo $ac_n "(cached) $ac_c" 1>&6
6192 else
6193 cat > conftest.$ac_ext <<EOF
6194 #line 6195 "configure"
6195 #include "confdefs.h"
6196 #include <$ac_hdr>
6198 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6199 { (eval echo configure:6200: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6200 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6201 if test -z "$ac_err"; then
6202 rm -rf conftest*
6203 eval "ac_cv_header_$ac_safe=yes"
6204 else
6205 echo "$ac_err" >&5
6206 echo "configure: failed program was:" >&5
6207 cat conftest.$ac_ext >&5
6208 rm -rf conftest*
6209 eval "ac_cv_header_$ac_safe=no"
6211 rm -f conftest*
6213 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6214 echo "$ac_t""yes" 1>&6
6215 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6216 cat >> confdefs.h <<EOF
6217 #define $ac_tr_hdr 1
6220 else
6221 echo "$ac_t""no" 1>&6
6223 done
6225 for ac_func in alarm
6227 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6228 echo "configure:6229: checking for $ac_func" >&5
6229 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6230 echo $ac_n "(cached) $ac_c" 1>&6
6231 else
6232 cat > conftest.$ac_ext <<EOF
6233 #line 6234 "configure"
6234 #include "confdefs.h"
6235 /* System header to define __stub macros and hopefully few prototypes,
6236 which can conflict with char $ac_func(); below. */
6237 #include <assert.h>
6238 /* Override any gcc2 internal prototype to avoid an error. */
6239 /* We use char because int might match the return type of a gcc2
6240 builtin and then its argument prototype would still apply. */
6241 char $ac_func();
6243 int main() {
6245 /* The GNU C library defines this for functions which it implements
6246 to always fail with ENOSYS. Some functions are actually named
6247 something starting with __ and the normal name is an alias. */
6248 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6249 choke me
6250 #else
6251 $ac_func();
6252 #endif
6254 ; return 0; }
6256 if { (eval echo configure:6257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6257 rm -rf conftest*
6258 eval "ac_cv_func_$ac_func=yes"
6259 else
6260 echo "configure: failed program was:" >&5
6261 cat conftest.$ac_ext >&5
6262 rm -rf conftest*
6263 eval "ac_cv_func_$ac_func=no"
6265 rm -f conftest*
6268 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6269 echo "$ac_t""yes" 1>&6
6270 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6271 cat >> confdefs.h <<EOF
6272 #define $ac_tr_func 1
6275 else
6276 echo "$ac_t""no" 1>&6
6278 done
6280 echo $ac_n "checking for working mktime""... $ac_c" 1>&6
6281 echo "configure:6282: checking for working mktime" >&5
6282 if eval "test \"`echo '$''{'ac_cv_func_working_mktime'+set}'`\" = set"; then
6283 echo $ac_n "(cached) $ac_c" 1>&6
6284 else
6285 if test "$cross_compiling" = yes; then
6286 ac_cv_func_working_mktime=no
6287 else
6288 cat > conftest.$ac_ext <<EOF
6289 #line 6290 "configure"
6290 #include "confdefs.h"
6291 /* Test program from Paul Eggert (eggert@twinsun.com)
6292 and Tony Leneis (tony@plaza.ds.adp.com). */
6293 #if TIME_WITH_SYS_TIME
6294 # include <sys/time.h>
6295 # include <time.h>
6296 #else
6297 # if HAVE_SYS_TIME_H
6298 # include <sys/time.h>
6299 # else
6300 # include <time.h>
6301 # endif
6302 #endif
6304 #if HAVE_UNISTD_H
6305 # include <unistd.h>
6306 #endif
6308 #if !HAVE_ALARM
6309 # define alarm(X) /* empty */
6310 #endif
6312 /* Work around redefinition to rpl_putenv by other config tests. */
6313 #undef putenv
6315 static time_t time_t_max;
6317 /* Values we'll use to set the TZ environment variable. */
6318 static const char *const tz_strings[] = {
6319 (const char *) 0, "TZ=GMT0", "TZ=JST-9",
6320 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
6322 #define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
6324 /* Fail if mktime fails to convert a date in the spring-forward gap.
6325 Based on a problem report from Andreas Jaeger. */
6326 static void
6327 spring_forward_gap ()
6329 /* glibc (up to about 1998-10-07) failed this test) */
6330 struct tm tm;
6332 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
6333 instead of "TZ=America/Vancouver" in order to detect the bug even
6334 on systems that don't support the Olson extension, or don't have the
6335 full zoneinfo tables installed. */
6336 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
6338 tm.tm_year = 98;
6339 tm.tm_mon = 3;
6340 tm.tm_mday = 5;
6341 tm.tm_hour = 2;
6342 tm.tm_min = 0;
6343 tm.tm_sec = 0;
6344 tm.tm_isdst = -1;
6345 if (mktime (&tm) == (time_t)-1)
6346 exit (1);
6349 static void
6350 mktime_test (now)
6351 time_t now;
6353 struct tm *lt;
6354 if ((lt = localtime (&now)) && mktime (lt) != now)
6355 exit (1);
6356 now = time_t_max - now;
6357 if ((lt = localtime (&now)) && mktime (lt) != now)
6358 exit (1);
6361 static void
6362 irix_6_4_bug ()
6364 /* Based on code from Ariel Faigon. */
6365 struct tm tm;
6366 tm.tm_year = 96;
6367 tm.tm_mon = 3;
6368 tm.tm_mday = 0;
6369 tm.tm_hour = 0;
6370 tm.tm_min = 0;
6371 tm.tm_sec = 0;
6372 tm.tm_isdst = -1;
6373 mktime (&tm);
6374 if (tm.tm_mon != 2 || tm.tm_mday != 31)
6375 exit (1);
6378 static void
6379 bigtime_test (j)
6380 int j;
6382 struct tm tm;
6383 time_t now;
6384 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
6385 now = mktime (&tm);
6386 if (now != (time_t) -1)
6388 struct tm *lt = localtime (&now);
6389 if (! (lt
6390 && lt->tm_year == tm.tm_year
6391 && lt->tm_mon == tm.tm_mon
6392 && lt->tm_mday == tm.tm_mday
6393 && lt->tm_hour == tm.tm_hour
6394 && lt->tm_min == tm.tm_min
6395 && lt->tm_sec == tm.tm_sec
6396 && lt->tm_yday == tm.tm_yday
6397 && lt->tm_wday == tm.tm_wday
6398 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
6399 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
6400 exit (1);
6405 main ()
6407 time_t t, delta;
6408 int i, j;
6410 /* This test makes some buggy mktime implementations loop.
6411 Give up after 60 seconds; a mktime slower than that
6412 isn't worth using anyway. */
6413 alarm (60);
6415 for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2)
6416 continue;
6417 time_t_max--;
6418 delta = time_t_max / 997; /* a suitable prime number */
6419 for (i = 0; i < N_STRINGS; i++)
6421 if (tz_strings[i])
6422 putenv (tz_strings[i]);
6424 for (t = 0; t <= time_t_max - delta; t += delta)
6425 mktime_test (t);
6426 mktime_test ((time_t) 60 * 60);
6427 mktime_test ((time_t) 60 * 60 * 24);
6429 for (j = 1; 0 < j; j *= 2)
6430 bigtime_test (j);
6431 bigtime_test (j - 1);
6433 irix_6_4_bug ();
6434 spring_forward_gap ();
6435 exit (0);
6438 if { (eval echo configure:6439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6439 then
6440 ac_cv_func_working_mktime=yes
6441 else
6442 echo "configure: failed program was:" >&5
6443 cat conftest.$ac_ext >&5
6444 rm -fr conftest*
6445 ac_cv_func_working_mktime=no
6447 rm -fr conftest*
6452 echo "$ac_t""$ac_cv_func_working_mktime" 1>&6
6453 if test $ac_cv_func_working_mktime = no; then
6454 LIBOBJS="$LIBOBJS mktime.${ac_objext}"
6457 if test "$ac_cv_func_working_mktime" = no; then
6458 cat >> confdefs.h <<\EOF
6459 #define BROKEN_MKTIME 1
6464 ac_have_func=no # yes means we've found a way to get the load average.
6466 # Some systems have getloadavg without any extra libraries.
6467 echo $ac_n "checking for getloadavg""... $ac_c" 1>&6
6468 echo "configure:6469: checking for getloadavg" >&5
6469 if eval "test \"`echo '$''{'ac_cv_func_getloadavg'+set}'`\" = set"; then
6470 echo $ac_n "(cached) $ac_c" 1>&6
6471 else
6472 cat > conftest.$ac_ext <<EOF
6473 #line 6474 "configure"
6474 #include "confdefs.h"
6475 /* System header to define __stub macros and hopefully few prototypes,
6476 which can conflict with char getloadavg(); below. */
6477 #include <assert.h>
6478 /* Override any gcc2 internal prototype to avoid an error. */
6479 /* We use char because int might match the return type of a gcc2
6480 builtin and then its argument prototype would still apply. */
6481 char getloadavg();
6483 int main() {
6485 /* The GNU C library defines this for functions which it implements
6486 to always fail with ENOSYS. Some functions are actually named
6487 something starting with __ and the normal name is an alias. */
6488 #if defined (__stub_getloadavg) || defined (__stub___getloadavg)
6489 choke me
6490 #else
6491 getloadavg();
6492 #endif
6494 ; return 0; }
6496 if { (eval echo configure:6497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6497 rm -rf conftest*
6498 eval "ac_cv_func_getloadavg=yes"
6499 else
6500 echo "configure: failed program was:" >&5
6501 cat conftest.$ac_ext >&5
6502 rm -rf conftest*
6503 eval "ac_cv_func_getloadavg=no"
6505 rm -f conftest*
6508 if eval "test \"`echo '$ac_cv_func_'getloadavg`\" = yes"; then
6509 echo "$ac_t""yes" 1>&6
6510 ac_have_func=yes
6511 else
6512 echo "$ac_t""no" 1>&6
6516 if test $ac_have_func = no; then
6517 # Some systems with -lutil have (and need) -lkvm as well, some do not.
6518 # On Solaris, -lkvm requires nlist from -lelf, so check that first
6519 # to get the right answer into the cache.
6520 echo $ac_n "checking for elf_begin in -lelf""... $ac_c" 1>&6
6521 echo "configure:6522: checking for elf_begin in -lelf" >&5
6522 ac_lib_var=`echo elf'_'elf_begin | sed 'y%./+-%__p_%'`
6523 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6524 echo $ac_n "(cached) $ac_c" 1>&6
6525 else
6526 ac_save_LIBS="$LIBS"
6527 LIBS="-lelf $LIBS"
6528 cat > conftest.$ac_ext <<EOF
6529 #line 6530 "configure"
6530 #include "confdefs.h"
6531 /* Override any gcc2 internal prototype to avoid an error. */
6532 /* We use char because int might match the return type of a gcc2
6533 builtin and then its argument prototype would still apply. */
6534 char elf_begin();
6536 int main() {
6537 elf_begin()
6538 ; return 0; }
6540 if { (eval echo configure:6541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6541 rm -rf conftest*
6542 eval "ac_cv_lib_$ac_lib_var=yes"
6543 else
6544 echo "configure: failed program was:" >&5
6545 cat conftest.$ac_ext >&5
6546 rm -rf conftest*
6547 eval "ac_cv_lib_$ac_lib_var=no"
6549 rm -f conftest*
6550 LIBS="$ac_save_LIBS"
6553 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6554 echo "$ac_t""yes" 1>&6
6555 LIBS="-lelf $LIBS"
6556 else
6557 echo "$ac_t""no" 1>&6
6560 echo $ac_n "checking for kvm_open in -lkvm""... $ac_c" 1>&6
6561 echo "configure:6562: checking for kvm_open in -lkvm" >&5
6562 ac_lib_var=`echo kvm'_'kvm_open | sed 'y%./+-%__p_%'`
6563 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6564 echo $ac_n "(cached) $ac_c" 1>&6
6565 else
6566 ac_save_LIBS="$LIBS"
6567 LIBS="-lkvm $LIBS"
6568 cat > conftest.$ac_ext <<EOF
6569 #line 6570 "configure"
6570 #include "confdefs.h"
6571 /* Override any gcc2 internal prototype to avoid an error. */
6572 /* We use char because int might match the return type of a gcc2
6573 builtin and then its argument prototype would still apply. */
6574 char kvm_open();
6576 int main() {
6577 kvm_open()
6578 ; return 0; }
6580 if { (eval echo configure:6581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6581 rm -rf conftest*
6582 eval "ac_cv_lib_$ac_lib_var=yes"
6583 else
6584 echo "configure: failed program was:" >&5
6585 cat conftest.$ac_ext >&5
6586 rm -rf conftest*
6587 eval "ac_cv_lib_$ac_lib_var=no"
6589 rm -f conftest*
6590 LIBS="$ac_save_LIBS"
6593 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6594 echo "$ac_t""yes" 1>&6
6595 LIBS="-lkvm $LIBS"
6596 else
6597 echo "$ac_t""no" 1>&6
6600 # Check for the 4.4BSD definition of getloadavg.
6601 echo $ac_n "checking for getloadavg in -lutil""... $ac_c" 1>&6
6602 echo "configure:6603: checking for getloadavg in -lutil" >&5
6603 ac_lib_var=`echo util'_'getloadavg | sed 'y%./+-%__p_%'`
6604 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6605 echo $ac_n "(cached) $ac_c" 1>&6
6606 else
6607 ac_save_LIBS="$LIBS"
6608 LIBS="-lutil $LIBS"
6609 cat > conftest.$ac_ext <<EOF
6610 #line 6611 "configure"
6611 #include "confdefs.h"
6612 /* Override any gcc2 internal prototype to avoid an error. */
6613 /* We use char because int might match the return type of a gcc2
6614 builtin and then its argument prototype would still apply. */
6615 char getloadavg();
6617 int main() {
6618 getloadavg()
6619 ; return 0; }
6621 if { (eval echo configure:6622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6622 rm -rf conftest*
6623 eval "ac_cv_lib_$ac_lib_var=yes"
6624 else
6625 echo "configure: failed program was:" >&5
6626 cat conftest.$ac_ext >&5
6627 rm -rf conftest*
6628 eval "ac_cv_lib_$ac_lib_var=no"
6630 rm -f conftest*
6631 LIBS="$ac_save_LIBS"
6634 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6635 echo "$ac_t""yes" 1>&6
6636 LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes
6637 else
6638 echo "$ac_t""no" 1>&6
6643 if test $ac_have_func = no; then
6644 # There is a commonly available library for RS/6000 AIX.
6645 # Since it is not a standard part of AIX, it might be installed locally.
6646 ac_getloadavg_LIBS="$LIBS"; LIBS="-L/usr/local/lib $LIBS"
6647 echo $ac_n "checking for getloadavg in -lgetloadavg""... $ac_c" 1>&6
6648 echo "configure:6649: checking for getloadavg in -lgetloadavg" >&5
6649 ac_lib_var=`echo getloadavg'_'getloadavg | sed 'y%./+-%__p_%'`
6650 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6651 echo $ac_n "(cached) $ac_c" 1>&6
6652 else
6653 ac_save_LIBS="$LIBS"
6654 LIBS="-lgetloadavg $LIBS"
6655 cat > conftest.$ac_ext <<EOF
6656 #line 6657 "configure"
6657 #include "confdefs.h"
6658 /* Override any gcc2 internal prototype to avoid an error. */
6659 /* We use char because int might match the return type of a gcc2
6660 builtin and then its argument prototype would still apply. */
6661 char getloadavg();
6663 int main() {
6664 getloadavg()
6665 ; return 0; }
6667 if { (eval echo configure:6668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6668 rm -rf conftest*
6669 eval "ac_cv_lib_$ac_lib_var=yes"
6670 else
6671 echo "configure: failed program was:" >&5
6672 cat conftest.$ac_ext >&5
6673 rm -rf conftest*
6674 eval "ac_cv_lib_$ac_lib_var=no"
6676 rm -f conftest*
6677 LIBS="$ac_save_LIBS"
6680 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6681 echo "$ac_t""yes" 1>&6
6682 LIBS="-lgetloadavg $LIBS"
6683 else
6684 echo "$ac_t""no" 1>&6
6685 LIBS="$ac_getloadavg_LIBS"
6690 # Make sure it is really in the library, if we think we found it.
6691 for ac_func in getloadavg
6693 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6694 echo "configure:6695: checking for $ac_func" >&5
6695 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6696 echo $ac_n "(cached) $ac_c" 1>&6
6697 else
6698 cat > conftest.$ac_ext <<EOF
6699 #line 6700 "configure"
6700 #include "confdefs.h"
6701 /* System header to define __stub macros and hopefully few prototypes,
6702 which can conflict with char $ac_func(); below. */
6703 #include <assert.h>
6704 /* Override any gcc2 internal prototype to avoid an error. */
6705 /* We use char because int might match the return type of a gcc2
6706 builtin and then its argument prototype would still apply. */
6707 char $ac_func();
6709 int main() {
6711 /* The GNU C library defines this for functions which it implements
6712 to always fail with ENOSYS. Some functions are actually named
6713 something starting with __ and the normal name is an alias. */
6714 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6715 choke me
6716 #else
6717 $ac_func();
6718 #endif
6720 ; return 0; }
6722 if { (eval echo configure:6723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6723 rm -rf conftest*
6724 eval "ac_cv_func_$ac_func=yes"
6725 else
6726 echo "configure: failed program was:" >&5
6727 cat conftest.$ac_ext >&5
6728 rm -rf conftest*
6729 eval "ac_cv_func_$ac_func=no"
6731 rm -f conftest*
6734 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6735 echo "$ac_t""yes" 1>&6
6736 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6737 cat >> confdefs.h <<EOF
6738 #define $ac_tr_func 1
6741 else
6742 echo "$ac_t""no" 1>&6
6743 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
6745 done
6749 if test $ac_cv_func_getloadavg = yes; then
6750 cat >> confdefs.h <<\EOF
6751 #define HAVE_GETLOADAVG 1
6754 ac_have_func=yes
6755 else
6756 # Figure out what our getloadavg.c needs.
6757 ac_have_func=no
6758 ac_safe=`echo "sys/dg_sys_info.h" | sed 'y%./+-%__p_%'`
6759 echo $ac_n "checking for sys/dg_sys_info.h""... $ac_c" 1>&6
6760 echo "configure:6761: checking for sys/dg_sys_info.h" >&5
6761 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6762 echo $ac_n "(cached) $ac_c" 1>&6
6763 else
6764 cat > conftest.$ac_ext <<EOF
6765 #line 6766 "configure"
6766 #include "confdefs.h"
6767 #include <sys/dg_sys_info.h>
6769 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6770 { (eval echo configure:6771: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6771 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6772 if test -z "$ac_err"; then
6773 rm -rf conftest*
6774 eval "ac_cv_header_$ac_safe=yes"
6775 else
6776 echo "$ac_err" >&5
6777 echo "configure: failed program was:" >&5
6778 cat conftest.$ac_ext >&5
6779 rm -rf conftest*
6780 eval "ac_cv_header_$ac_safe=no"
6782 rm -f conftest*
6784 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6785 echo "$ac_t""yes" 1>&6
6786 ac_have_func=yes; cat >> confdefs.h <<\EOF
6787 #define DGUX 1
6790 echo $ac_n "checking for dg_sys_info in -ldgc""... $ac_c" 1>&6
6791 echo "configure:6792: checking for dg_sys_info in -ldgc" >&5
6792 ac_lib_var=`echo dgc'_'dg_sys_info | sed 'y%./+-%__p_%'`
6793 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6794 echo $ac_n "(cached) $ac_c" 1>&6
6795 else
6796 ac_save_LIBS="$LIBS"
6797 LIBS="-ldgc $LIBS"
6798 cat > conftest.$ac_ext <<EOF
6799 #line 6800 "configure"
6800 #include "confdefs.h"
6801 /* Override any gcc2 internal prototype to avoid an error. */
6802 /* We use char because int might match the return type of a gcc2
6803 builtin and then its argument prototype would still apply. */
6804 char dg_sys_info();
6806 int main() {
6807 dg_sys_info()
6808 ; return 0; }
6810 if { (eval echo configure:6811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6811 rm -rf conftest*
6812 eval "ac_cv_lib_$ac_lib_var=yes"
6813 else
6814 echo "configure: failed program was:" >&5
6815 cat conftest.$ac_ext >&5
6816 rm -rf conftest*
6817 eval "ac_cv_lib_$ac_lib_var=no"
6819 rm -f conftest*
6820 LIBS="$ac_save_LIBS"
6823 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6824 echo "$ac_t""yes" 1>&6
6825 ac_tr_lib=HAVE_LIB`echo dgc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6826 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6827 cat >> confdefs.h <<EOF
6828 #define $ac_tr_lib 1
6831 LIBS="-ldgc $LIBS"
6833 else
6834 echo "$ac_t""no" 1>&6
6837 else
6838 echo "$ac_t""no" 1>&6
6842 # We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
6843 # uses stabs), but it is still SVR4. We cannot check for <elf.h> because
6844 # Irix 4.0.5F has the header but not the library.
6845 if test $ac_have_func = no && test $ac_cv_lib_elf_elf_begin = yes; then
6846 ac_have_func=yes; cat >> confdefs.h <<\EOF
6847 #define SVR4 1
6852 if test $ac_have_func = no; then
6853 ac_safe=`echo "inq_stats/cpustats.h" | sed 'y%./+-%__p_%'`
6854 echo $ac_n "checking for inq_stats/cpustats.h""... $ac_c" 1>&6
6855 echo "configure:6856: checking for inq_stats/cpustats.h" >&5
6856 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6857 echo $ac_n "(cached) $ac_c" 1>&6
6858 else
6859 cat > conftest.$ac_ext <<EOF
6860 #line 6861 "configure"
6861 #include "confdefs.h"
6862 #include <inq_stats/cpustats.h>
6864 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6865 { (eval echo configure:6866: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6866 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6867 if test -z "$ac_err"; then
6868 rm -rf conftest*
6869 eval "ac_cv_header_$ac_safe=yes"
6870 else
6871 echo "$ac_err" >&5
6872 echo "configure: failed program was:" >&5
6873 cat conftest.$ac_ext >&5
6874 rm -rf conftest*
6875 eval "ac_cv_header_$ac_safe=no"
6877 rm -f conftest*
6879 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6880 echo "$ac_t""yes" 1>&6
6881 ac_have_func=yes; cat >> confdefs.h <<\EOF
6882 #define UMAX 1
6885 cat >> confdefs.h <<\EOF
6886 #define UMAX4_3 1
6889 else
6890 echo "$ac_t""no" 1>&6
6895 if test $ac_have_func = no; then
6896 ac_safe=`echo "sys/cpustats.h" | sed 'y%./+-%__p_%'`
6897 echo $ac_n "checking for sys/cpustats.h""... $ac_c" 1>&6
6898 echo "configure:6899: checking for sys/cpustats.h" >&5
6899 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6900 echo $ac_n "(cached) $ac_c" 1>&6
6901 else
6902 cat > conftest.$ac_ext <<EOF
6903 #line 6904 "configure"
6904 #include "confdefs.h"
6905 #include <sys/cpustats.h>
6907 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6908 { (eval echo configure:6909: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6909 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6910 if test -z "$ac_err"; then
6911 rm -rf conftest*
6912 eval "ac_cv_header_$ac_safe=yes"
6913 else
6914 echo "$ac_err" >&5
6915 echo "configure: failed program was:" >&5
6916 cat conftest.$ac_ext >&5
6917 rm -rf conftest*
6918 eval "ac_cv_header_$ac_safe=no"
6920 rm -f conftest*
6922 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6923 echo "$ac_t""yes" 1>&6
6924 ac_have_func=yes; cat >> confdefs.h <<\EOF
6925 #define UMAX 1
6928 else
6929 echo "$ac_t""no" 1>&6
6934 if test $ac_have_func = no; then
6935 for ac_hdr in mach/mach.h
6937 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6938 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6939 echo "configure:6940: checking for $ac_hdr" >&5
6940 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6941 echo $ac_n "(cached) $ac_c" 1>&6
6942 else
6943 cat > conftest.$ac_ext <<EOF
6944 #line 6945 "configure"
6945 #include "confdefs.h"
6946 #include <$ac_hdr>
6948 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6949 { (eval echo configure:6950: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6950 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6951 if test -z "$ac_err"; then
6952 rm -rf conftest*
6953 eval "ac_cv_header_$ac_safe=yes"
6954 else
6955 echo "$ac_err" >&5
6956 echo "configure: failed program was:" >&5
6957 cat conftest.$ac_ext >&5
6958 rm -rf conftest*
6959 eval "ac_cv_header_$ac_safe=no"
6961 rm -f conftest*
6963 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6964 echo "$ac_t""yes" 1>&6
6965 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6966 cat >> confdefs.h <<EOF
6967 #define $ac_tr_hdr 1
6970 else
6971 echo "$ac_t""no" 1>&6
6973 done
6977 ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'`
6978 echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
6979 echo "configure:6980: checking for nlist.h" >&5
6980 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6981 echo $ac_n "(cached) $ac_c" 1>&6
6982 else
6983 cat > conftest.$ac_ext <<EOF
6984 #line 6985 "configure"
6985 #include "confdefs.h"
6986 #include <nlist.h>
6988 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6989 { (eval echo configure:6990: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6990 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6991 if test -z "$ac_err"; then
6992 rm -rf conftest*
6993 eval "ac_cv_header_$ac_safe=yes"
6994 else
6995 echo "$ac_err" >&5
6996 echo "configure: failed program was:" >&5
6997 cat conftest.$ac_ext >&5
6998 rm -rf conftest*
6999 eval "ac_cv_header_$ac_safe=no"
7001 rm -f conftest*
7003 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7004 echo "$ac_t""yes" 1>&6
7005 cat >> confdefs.h <<\EOF
7006 #define NLIST_STRUCT 1
7009 echo $ac_n "checking for n_un in struct nlist""... $ac_c" 1>&6
7010 echo "configure:7011: checking for n_un in struct nlist" >&5
7011 if eval "test \"`echo '$''{'ac_cv_struct_nlist_n_un'+set}'`\" = set"; then
7012 echo $ac_n "(cached) $ac_c" 1>&6
7013 else
7014 cat > conftest.$ac_ext <<EOF
7015 #line 7016 "configure"
7016 #include "confdefs.h"
7017 #include <nlist.h>
7018 int main() {
7019 struct nlist n; n.n_un.n_name = 0;
7020 ; return 0; }
7022 if { (eval echo configure:7023: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7023 rm -rf conftest*
7024 ac_cv_struct_nlist_n_un=yes
7025 else
7026 echo "configure: failed program was:" >&5
7027 cat conftest.$ac_ext >&5
7028 rm -rf conftest*
7029 ac_cv_struct_nlist_n_un=no
7031 rm -f conftest*
7034 echo "$ac_t""$ac_cv_struct_nlist_n_un" 1>&6
7035 if test $ac_cv_struct_nlist_n_un = yes; then
7036 cat >> confdefs.h <<\EOF
7037 #define NLIST_NAME_UNION 1
7042 else
7043 echo "$ac_t""no" 1>&6
7045 fi # Do not have getloadavg in system libraries.
7047 # Some definitions of getloadavg require that the program be installed setgid.
7048 echo $ac_n "checking whether getloadavg requires setgid""... $ac_c" 1>&6
7049 echo "configure:7050: checking whether getloadavg requires setgid" >&5
7050 if eval "test \"`echo '$''{'ac_cv_func_getloadavg_setgid'+set}'`\" = set"; then
7051 echo $ac_n "(cached) $ac_c" 1>&6
7052 else
7053 cat > conftest.$ac_ext <<EOF
7054 #line 7055 "configure"
7055 #include "confdefs.h"
7056 #include "$srcdir/getloadavg.c"
7057 #ifdef LDAV_PRIVILEGED
7058 Yowza Am I SETGID yet
7059 #endif
7061 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7062 egrep "Yowza Am I SETGID yet" >/dev/null 2>&1; then
7063 rm -rf conftest*
7064 ac_cv_func_getloadavg_setgid=yes
7065 else
7066 rm -rf conftest*
7067 ac_cv_func_getloadavg_setgid=no
7069 rm -f conftest*
7073 echo "$ac_t""$ac_cv_func_getloadavg_setgid" 1>&6
7074 if test $ac_cv_func_getloadavg_setgid = yes; then
7075 NEED_SETGID=true; cat >> confdefs.h <<\EOF
7076 #define GETLOADAVG_PRIVILEGED 1
7079 else
7080 NEED_SETGID=false
7083 if test $ac_cv_func_getloadavg_setgid = yes; then
7084 echo $ac_n "checking group of /dev/kmem""... $ac_c" 1>&6
7085 echo "configure:7086: checking group of /dev/kmem" >&5
7086 if eval "test \"`echo '$''{'ac_cv_group_kmem'+set}'`\" = set"; then
7087 echo $ac_n "(cached) $ac_c" 1>&6
7088 else
7089 # On Solaris, /dev/kmem is a symlink. Get info on the real file.
7090 ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null`
7091 # If we got an error (system does not support symlinks), try without -L.
7092 test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem`
7093 ac_cv_group_kmem=`echo $ac_ls_output \
7094 | sed -ne 's/[ ][ ]*/ /g;
7095 s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/;
7096 / /s/.* //;p;'`
7100 echo "$ac_t""$ac_cv_group_kmem" 1>&6
7101 KMEM_GROUP=$ac_cv_group_kmem
7105 echo $ac_n "checking for _LARGEFILE_SOURCE value needed for large files""... $ac_c" 1>&6
7106 echo "configure:7107: checking for _LARGEFILE_SOURCE value needed for large files" >&5
7107 if eval "test \"`echo '$''{'ac_cv_sys_largefile_source'+set}'`\" = set"; then
7108 echo $ac_n "(cached) $ac_c" 1>&6
7109 else
7110 ac_cv_sys_largefile_source=no
7111 cat > conftest.$ac_ext <<EOF
7112 #line 7113 "configure"
7113 #include "confdefs.h"
7114 #include <stdio.h>
7115 int main() {
7116 return !fseeko;
7117 ; return 0; }
7119 if { (eval echo configure:7120: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7121 else
7122 echo "configure: failed program was:" >&5
7123 cat conftest.$ac_ext >&5
7124 rm -rf conftest*
7125 cat > conftest.$ac_ext <<EOF
7126 #line 7127 "configure"
7127 #include "confdefs.h"
7128 #define _LARGEFILE_SOURCE 1
7129 #include <stdio.h>
7131 int main() {
7132 return !fseeko;
7133 ; return 0; }
7135 if { (eval echo configure:7136: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7136 rm -rf conftest*
7137 ac_cv_sys_largefile_source=1
7138 else
7139 echo "configure: failed program was:" >&5
7140 cat conftest.$ac_ext >&5
7142 rm -f conftest*
7144 rm -f conftest*
7147 echo "$ac_t""$ac_cv_sys_largefile_source" 1>&6
7148 if test "$ac_cv_sys_largefile_source" != no; then
7149 cat >> confdefs.h <<EOF
7150 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
7154 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
7155 # in glibc 2.1.3, but that breaks too many other things.
7156 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
7158 echo $ac_n "checking for fseeko""... $ac_c" 1>&6
7159 echo "configure:7160: checking for fseeko" >&5
7160 if eval "test \"`echo '$''{'ac_cv_func_fseeko'+set}'`\" = set"; then
7161 echo $ac_n "(cached) $ac_c" 1>&6
7162 else
7163 ac_cv_func_fseeko=no
7164 cat > conftest.$ac_ext <<EOF
7165 #line 7166 "configure"
7166 #include "confdefs.h"
7167 #include <stdio.h>
7168 int main() {
7169 return fseeko && fseeko (stdin, 0, 0);
7170 ; return 0; }
7172 if { (eval echo configure:7173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7173 rm -rf conftest*
7174 ac_cv_func_fseeko=yes
7175 else
7176 echo "configure: failed program was:" >&5
7177 cat conftest.$ac_ext >&5
7179 rm -f conftest*
7182 echo "$ac_t""$ac_cv_func_fseeko" 1>&6
7183 if test $ac_cv_func_fseeko != no; then
7184 cat >> confdefs.h <<\EOF
7185 #define HAVE_FSEEKO 1
7190 # UNIX98 PTYs.
7191 for ac_func in grantpt
7193 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7194 echo "configure:7195: checking for $ac_func" >&5
7195 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7196 echo $ac_n "(cached) $ac_c" 1>&6
7197 else
7198 cat > conftest.$ac_ext <<EOF
7199 #line 7200 "configure"
7200 #include "confdefs.h"
7201 /* System header to define __stub macros and hopefully few prototypes,
7202 which can conflict with char $ac_func(); below. */
7203 #include <assert.h>
7204 /* Override any gcc2 internal prototype to avoid an error. */
7205 /* We use char because int might match the return type of a gcc2
7206 builtin and then its argument prototype would still apply. */
7207 char $ac_func();
7209 int main() {
7211 /* The GNU C library defines this for functions which it implements
7212 to always fail with ENOSYS. Some functions are actually named
7213 something starting with __ and the normal name is an alias. */
7214 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7215 choke me
7216 #else
7217 $ac_func();
7218 #endif
7220 ; return 0; }
7222 if { (eval echo configure:7223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7223 rm -rf conftest*
7224 eval "ac_cv_func_$ac_func=yes"
7225 else
7226 echo "configure: failed program was:" >&5
7227 cat conftest.$ac_ext >&5
7228 rm -rf conftest*
7229 eval "ac_cv_func_$ac_func=no"
7231 rm -f conftest*
7234 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7235 echo "$ac_t""yes" 1>&6
7236 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7237 cat >> confdefs.h <<EOF
7238 #define $ac_tr_func 1
7241 else
7242 echo "$ac_t""no" 1>&6
7244 done
7247 # PTY-related GNU extensions.
7248 for ac_func in getpt
7250 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7251 echo "configure:7252: checking for $ac_func" >&5
7252 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7253 echo $ac_n "(cached) $ac_c" 1>&6
7254 else
7255 cat > conftest.$ac_ext <<EOF
7256 #line 7257 "configure"
7257 #include "confdefs.h"
7258 /* System header to define __stub macros and hopefully few prototypes,
7259 which can conflict with char $ac_func(); below. */
7260 #include <assert.h>
7261 /* Override any gcc2 internal prototype to avoid an error. */
7262 /* We use char because int might match the return type of a gcc2
7263 builtin and then its argument prototype would still apply. */
7264 char $ac_func();
7266 int main() {
7268 /* The GNU C library defines this for functions which it implements
7269 to always fail with ENOSYS. Some functions are actually named
7270 something starting with __ and the normal name is an alias. */
7271 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7272 choke me
7273 #else
7274 $ac_func();
7275 #endif
7277 ; return 0; }
7279 if { (eval echo configure:7280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7280 rm -rf conftest*
7281 eval "ac_cv_func_$ac_func=yes"
7282 else
7283 echo "configure: failed program was:" >&5
7284 cat conftest.$ac_ext >&5
7285 rm -rf conftest*
7286 eval "ac_cv_func_$ac_func=no"
7288 rm -f conftest*
7291 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7292 echo "$ac_t""yes" 1>&6
7293 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7294 cat >> confdefs.h <<EOF
7295 #define $ac_tr_func 1
7298 else
7299 echo "$ac_t""no" 1>&6
7301 done
7304 # Check this now, so that we will NOT find the above functions in ncurses.
7305 # That is because we have not set up to link ncurses in lib-src.
7306 # It's better to believe a function is not available
7307 # than to expect to find it in ncurses.
7308 echo $ac_n "checking for tparm in -lncurses""... $ac_c" 1>&6
7309 echo "configure:7310: checking for tparm in -lncurses" >&5
7310 ac_lib_var=`echo ncurses'_'tparm | sed 'y%./+-%__p_%'`
7311 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7312 echo $ac_n "(cached) $ac_c" 1>&6
7313 else
7314 ac_save_LIBS="$LIBS"
7315 LIBS="-lncurses $LIBS"
7316 cat > conftest.$ac_ext <<EOF
7317 #line 7318 "configure"
7318 #include "confdefs.h"
7319 /* Override any gcc2 internal prototype to avoid an error. */
7320 /* We use char because int might match the return type of a gcc2
7321 builtin and then its argument prototype would still apply. */
7322 char tparm();
7324 int main() {
7325 tparm()
7326 ; return 0; }
7328 if { (eval echo configure:7329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7329 rm -rf conftest*
7330 eval "ac_cv_lib_$ac_lib_var=yes"
7331 else
7332 echo "configure: failed program was:" >&5
7333 cat conftest.$ac_ext >&5
7334 rm -rf conftest*
7335 eval "ac_cv_lib_$ac_lib_var=no"
7337 rm -f conftest*
7338 LIBS="$ac_save_LIBS"
7341 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7342 echo "$ac_t""yes" 1>&6
7343 ac_tr_lib=HAVE_LIB`echo ncurses | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7344 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7345 cat >> confdefs.h <<EOF
7346 #define $ac_tr_lib 1
7349 LIBS="-lncurses $LIBS"
7351 else
7352 echo "$ac_t""no" 1>&6
7356 # Do we need the Hesiod library to provide the support routines?
7357 if test "$with_hesiod" = yes ; then
7358 # Don't set $LIBS here -- see comments above.
7359 resolv=no
7360 echo $ac_n "checking for res_send""... $ac_c" 1>&6
7361 echo "configure:7362: checking for res_send" >&5
7362 if eval "test \"`echo '$''{'ac_cv_func_res_send'+set}'`\" = set"; then
7363 echo $ac_n "(cached) $ac_c" 1>&6
7364 else
7365 cat > conftest.$ac_ext <<EOF
7366 #line 7367 "configure"
7367 #include "confdefs.h"
7368 /* System header to define __stub macros and hopefully few prototypes,
7369 which can conflict with char res_send(); below. */
7370 #include <assert.h>
7371 /* Override any gcc2 internal prototype to avoid an error. */
7372 /* We use char because int might match the return type of a gcc2
7373 builtin and then its argument prototype would still apply. */
7374 char res_send();
7376 int main() {
7378 /* The GNU C library defines this for functions which it implements
7379 to always fail with ENOSYS. Some functions are actually named
7380 something starting with __ and the normal name is an alias. */
7381 #if defined (__stub_res_send) || defined (__stub___res_send)
7382 choke me
7383 #else
7384 res_send();
7385 #endif
7387 ; return 0; }
7389 if { (eval echo configure:7390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7390 rm -rf conftest*
7391 eval "ac_cv_func_res_send=yes"
7392 else
7393 echo "configure: failed program was:" >&5
7394 cat conftest.$ac_ext >&5
7395 rm -rf conftest*
7396 eval "ac_cv_func_res_send=no"
7398 rm -f conftest*
7401 if eval "test \"`echo '$ac_cv_func_'res_send`\" = yes"; then
7402 echo "$ac_t""yes" 1>&6
7404 else
7405 echo "$ac_t""no" 1>&6
7406 echo $ac_n "checking for __res_send""... $ac_c" 1>&6
7407 echo "configure:7408: checking for __res_send" >&5
7408 if eval "test \"`echo '$''{'ac_cv_func___res_send'+set}'`\" = set"; then
7409 echo $ac_n "(cached) $ac_c" 1>&6
7410 else
7411 cat > conftest.$ac_ext <<EOF
7412 #line 7413 "configure"
7413 #include "confdefs.h"
7414 /* System header to define __stub macros and hopefully few prototypes,
7415 which can conflict with char __res_send(); below. */
7416 #include <assert.h>
7417 /* Override any gcc2 internal prototype to avoid an error. */
7418 /* We use char because int might match the return type of a gcc2
7419 builtin and then its argument prototype would still apply. */
7420 char __res_send();
7422 int main() {
7424 /* The GNU C library defines this for functions which it implements
7425 to always fail with ENOSYS. Some functions are actually named
7426 something starting with __ and the normal name is an alias. */
7427 #if defined (__stub___res_send) || defined (__stub_____res_send)
7428 choke me
7429 #else
7430 __res_send();
7431 #endif
7433 ; return 0; }
7435 if { (eval echo configure:7436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7436 rm -rf conftest*
7437 eval "ac_cv_func___res_send=yes"
7438 else
7439 echo "configure: failed program was:" >&5
7440 cat conftest.$ac_ext >&5
7441 rm -rf conftest*
7442 eval "ac_cv_func___res_send=no"
7444 rm -f conftest*
7447 if eval "test \"`echo '$ac_cv_func_'__res_send`\" = yes"; then
7448 echo "$ac_t""yes" 1>&6
7450 else
7451 echo "$ac_t""no" 1>&6
7452 echo $ac_n "checking for res_send in -lresolv""... $ac_c" 1>&6
7453 echo "configure:7454: checking for res_send in -lresolv" >&5
7454 ac_lib_var=`echo resolv'_'res_send | sed 'y%./+-%__p_%'`
7455 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7456 echo $ac_n "(cached) $ac_c" 1>&6
7457 else
7458 ac_save_LIBS="$LIBS"
7459 LIBS="-lresolv $LIBS"
7460 cat > conftest.$ac_ext <<EOF
7461 #line 7462 "configure"
7462 #include "confdefs.h"
7463 /* Override any gcc2 internal prototype to avoid an error. */
7464 /* We use char because int might match the return type of a gcc2
7465 builtin and then its argument prototype would still apply. */
7466 char res_send();
7468 int main() {
7469 res_send()
7470 ; return 0; }
7472 if { (eval echo configure:7473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7473 rm -rf conftest*
7474 eval "ac_cv_lib_$ac_lib_var=yes"
7475 else
7476 echo "configure: failed program was:" >&5
7477 cat conftest.$ac_ext >&5
7478 rm -rf conftest*
7479 eval "ac_cv_lib_$ac_lib_var=no"
7481 rm -f conftest*
7482 LIBS="$ac_save_LIBS"
7485 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7486 echo "$ac_t""yes" 1>&6
7487 resolv=yes
7488 else
7489 echo "$ac_t""no" 1>&6
7490 echo $ac_n "checking for __res_send in -lresolv""... $ac_c" 1>&6
7491 echo "configure:7492: checking for __res_send in -lresolv" >&5
7492 ac_lib_var=`echo resolv'_'__res_send | sed 'y%./+-%__p_%'`
7493 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7494 echo $ac_n "(cached) $ac_c" 1>&6
7495 else
7496 ac_save_LIBS="$LIBS"
7497 LIBS="-lresolv $LIBS"
7498 cat > conftest.$ac_ext <<EOF
7499 #line 7500 "configure"
7500 #include "confdefs.h"
7501 /* Override any gcc2 internal prototype to avoid an error. */
7502 /* We use char because int might match the return type of a gcc2
7503 builtin and then its argument prototype would still apply. */
7504 char __res_send();
7506 int main() {
7507 __res_send()
7508 ; return 0; }
7510 if { (eval echo configure:7511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7511 rm -rf conftest*
7512 eval "ac_cv_lib_$ac_lib_var=yes"
7513 else
7514 echo "configure: failed program was:" >&5
7515 cat conftest.$ac_ext >&5
7516 rm -rf conftest*
7517 eval "ac_cv_lib_$ac_lib_var=no"
7519 rm -f conftest*
7520 LIBS="$ac_save_LIBS"
7523 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7524 echo "$ac_t""yes" 1>&6
7525 resolv=yes
7526 else
7527 echo "$ac_t""no" 1>&6
7536 if test "$resolv" = yes ; then
7537 RESOLVLIB=-lresolv
7538 cat >> confdefs.h <<\EOF
7539 #define HAVE_LIBRESOLV 1
7542 else
7543 RESOLVLIB=
7545 echo $ac_n "checking for hes_getmailhost""... $ac_c" 1>&6
7546 echo "configure:7547: checking for hes_getmailhost" >&5
7547 if eval "test \"`echo '$''{'ac_cv_func_hes_getmailhost'+set}'`\" = set"; then
7548 echo $ac_n "(cached) $ac_c" 1>&6
7549 else
7550 cat > conftest.$ac_ext <<EOF
7551 #line 7552 "configure"
7552 #include "confdefs.h"
7553 /* System header to define __stub macros and hopefully few prototypes,
7554 which can conflict with char hes_getmailhost(); below. */
7555 #include <assert.h>
7556 /* Override any gcc2 internal prototype to avoid an error. */
7557 /* We use char because int might match the return type of a gcc2
7558 builtin and then its argument prototype would still apply. */
7559 char hes_getmailhost();
7561 int main() {
7563 /* The GNU C library defines this for functions which it implements
7564 to always fail with ENOSYS. Some functions are actually named
7565 something starting with __ and the normal name is an alias. */
7566 #if defined (__stub_hes_getmailhost) || defined (__stub___hes_getmailhost)
7567 choke me
7568 #else
7569 hes_getmailhost();
7570 #endif
7572 ; return 0; }
7574 if { (eval echo configure:7575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7575 rm -rf conftest*
7576 eval "ac_cv_func_hes_getmailhost=yes"
7577 else
7578 echo "configure: failed program was:" >&5
7579 cat conftest.$ac_ext >&5
7580 rm -rf conftest*
7581 eval "ac_cv_func_hes_getmailhost=no"
7583 rm -f conftest*
7586 if eval "test \"`echo '$ac_cv_func_'hes_getmailhost`\" = yes"; then
7587 echo "$ac_t""yes" 1>&6
7589 else
7590 echo "$ac_t""no" 1>&6
7591 echo $ac_n "checking for hes_getmailhost in -lhesiod""... $ac_c" 1>&6
7592 echo "configure:7593: checking for hes_getmailhost in -lhesiod" >&5
7593 ac_lib_var=`echo hesiod'_'hes_getmailhost | sed 'y%./+-%__p_%'`
7594 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7595 echo $ac_n "(cached) $ac_c" 1>&6
7596 else
7597 ac_save_LIBS="$LIBS"
7598 LIBS="-lhesiod $RESOLVLIB $LIBS"
7599 cat > conftest.$ac_ext <<EOF
7600 #line 7601 "configure"
7601 #include "confdefs.h"
7602 /* Override any gcc2 internal prototype to avoid an error. */
7603 /* We use char because int might match the return type of a gcc2
7604 builtin and then its argument prototype would still apply. */
7605 char hes_getmailhost();
7607 int main() {
7608 hes_getmailhost()
7609 ; return 0; }
7611 if { (eval echo configure:7612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7612 rm -rf conftest*
7613 eval "ac_cv_lib_$ac_lib_var=yes"
7614 else
7615 echo "configure: failed program was:" >&5
7616 cat conftest.$ac_ext >&5
7617 rm -rf conftest*
7618 eval "ac_cv_lib_$ac_lib_var=no"
7620 rm -f conftest*
7621 LIBS="$ac_save_LIBS"
7624 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7625 echo "$ac_t""yes" 1>&6
7626 cat >> confdefs.h <<\EOF
7627 #define HAVE_LIBHESIOD 1
7630 else
7631 echo "$ac_t""no" 1>&6
7639 # These tell us which Kerberos-related libraries to use.
7640 if test "${with_kerberos+set}" = set; then
7641 echo $ac_n "checking for com_err in -lcom_err""... $ac_c" 1>&6
7642 echo "configure:7643: checking for com_err in -lcom_err" >&5
7643 ac_lib_var=`echo com_err'_'com_err | sed 'y%./+-%__p_%'`
7644 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7645 echo $ac_n "(cached) $ac_c" 1>&6
7646 else
7647 ac_save_LIBS="$LIBS"
7648 LIBS="-lcom_err $LIBS"
7649 cat > conftest.$ac_ext <<EOF
7650 #line 7651 "configure"
7651 #include "confdefs.h"
7652 /* Override any gcc2 internal prototype to avoid an error. */
7653 /* We use char because int might match the return type of a gcc2
7654 builtin and then its argument prototype would still apply. */
7655 char com_err();
7657 int main() {
7658 com_err()
7659 ; return 0; }
7661 if { (eval echo configure:7662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7662 rm -rf conftest*
7663 eval "ac_cv_lib_$ac_lib_var=yes"
7664 else
7665 echo "configure: failed program was:" >&5
7666 cat conftest.$ac_ext >&5
7667 rm -rf conftest*
7668 eval "ac_cv_lib_$ac_lib_var=no"
7670 rm -f conftest*
7671 LIBS="$ac_save_LIBS"
7674 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7675 echo "$ac_t""yes" 1>&6
7676 ac_tr_lib=HAVE_LIB`echo com_err | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7677 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7678 cat >> confdefs.h <<EOF
7679 #define $ac_tr_lib 1
7682 LIBS="-lcom_err $LIBS"
7684 else
7685 echo "$ac_t""no" 1>&6
7688 echo $ac_n "checking for mit_des_cbc_encrypt in -lk5crypto""... $ac_c" 1>&6
7689 echo "configure:7690: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
7690 ac_lib_var=`echo k5crypto'_'mit_des_cbc_encrypt | sed 'y%./+-%__p_%'`
7691 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7692 echo $ac_n "(cached) $ac_c" 1>&6
7693 else
7694 ac_save_LIBS="$LIBS"
7695 LIBS="-lk5crypto $LIBS"
7696 cat > conftest.$ac_ext <<EOF
7697 #line 7698 "configure"
7698 #include "confdefs.h"
7699 /* Override any gcc2 internal prototype to avoid an error. */
7700 /* We use char because int might match the return type of a gcc2
7701 builtin and then its argument prototype would still apply. */
7702 char mit_des_cbc_encrypt();
7704 int main() {
7705 mit_des_cbc_encrypt()
7706 ; return 0; }
7708 if { (eval echo configure:7709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7709 rm -rf conftest*
7710 eval "ac_cv_lib_$ac_lib_var=yes"
7711 else
7712 echo "configure: failed program was:" >&5
7713 cat conftest.$ac_ext >&5
7714 rm -rf conftest*
7715 eval "ac_cv_lib_$ac_lib_var=no"
7717 rm -f conftest*
7718 LIBS="$ac_save_LIBS"
7721 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7722 echo "$ac_t""yes" 1>&6
7723 ac_tr_lib=HAVE_LIB`echo k5crypto | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7724 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7725 cat >> confdefs.h <<EOF
7726 #define $ac_tr_lib 1
7729 LIBS="-lk5crypto $LIBS"
7731 else
7732 echo "$ac_t""no" 1>&6
7735 echo $ac_n "checking for mit_des_cbc_encrypt in -lcrypto""... $ac_c" 1>&6
7736 echo "configure:7737: checking for mit_des_cbc_encrypt in -lcrypto" >&5
7737 ac_lib_var=`echo crypto'_'mit_des_cbc_encrypt | sed 'y%./+-%__p_%'`
7738 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7739 echo $ac_n "(cached) $ac_c" 1>&6
7740 else
7741 ac_save_LIBS="$LIBS"
7742 LIBS="-lcrypto $LIBS"
7743 cat > conftest.$ac_ext <<EOF
7744 #line 7745 "configure"
7745 #include "confdefs.h"
7746 /* Override any gcc2 internal prototype to avoid an error. */
7747 /* We use char because int might match the return type of a gcc2
7748 builtin and then its argument prototype would still apply. */
7749 char mit_des_cbc_encrypt();
7751 int main() {
7752 mit_des_cbc_encrypt()
7753 ; return 0; }
7755 if { (eval echo configure:7756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7756 rm -rf conftest*
7757 eval "ac_cv_lib_$ac_lib_var=yes"
7758 else
7759 echo "configure: failed program was:" >&5
7760 cat conftest.$ac_ext >&5
7761 rm -rf conftest*
7762 eval "ac_cv_lib_$ac_lib_var=no"
7764 rm -f conftest*
7765 LIBS="$ac_save_LIBS"
7768 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7769 echo "$ac_t""yes" 1>&6
7770 ac_tr_lib=HAVE_LIB`echo crypto | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7771 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7772 cat >> confdefs.h <<EOF
7773 #define $ac_tr_lib 1
7776 LIBS="-lcrypto $LIBS"
7778 else
7779 echo "$ac_t""no" 1>&6
7782 echo $ac_n "checking for krb5_init_context in -lkrb5""... $ac_c" 1>&6
7783 echo "configure:7784: checking for krb5_init_context in -lkrb5" >&5
7784 ac_lib_var=`echo krb5'_'krb5_init_context | sed 'y%./+-%__p_%'`
7785 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7786 echo $ac_n "(cached) $ac_c" 1>&6
7787 else
7788 ac_save_LIBS="$LIBS"
7789 LIBS="-lkrb5 $LIBS"
7790 cat > conftest.$ac_ext <<EOF
7791 #line 7792 "configure"
7792 #include "confdefs.h"
7793 /* Override any gcc2 internal prototype to avoid an error. */
7794 /* We use char because int might match the return type of a gcc2
7795 builtin and then its argument prototype would still apply. */
7796 char krb5_init_context();
7798 int main() {
7799 krb5_init_context()
7800 ; return 0; }
7802 if { (eval echo configure:7803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7803 rm -rf conftest*
7804 eval "ac_cv_lib_$ac_lib_var=yes"
7805 else
7806 echo "configure: failed program was:" >&5
7807 cat conftest.$ac_ext >&5
7808 rm -rf conftest*
7809 eval "ac_cv_lib_$ac_lib_var=no"
7811 rm -f conftest*
7812 LIBS="$ac_save_LIBS"
7815 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7816 echo "$ac_t""yes" 1>&6
7817 ac_tr_lib=HAVE_LIB`echo krb5 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7818 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7819 cat >> confdefs.h <<EOF
7820 #define $ac_tr_lib 1
7823 LIBS="-lkrb5 $LIBS"
7825 else
7826 echo "$ac_t""no" 1>&6
7829 if test "${with_kerberos5+set}" != set; then
7830 echo $ac_n "checking for des_cbc_encrypt in -ldes425""... $ac_c" 1>&6
7831 echo "configure:7832: checking for des_cbc_encrypt in -ldes425" >&5
7832 ac_lib_var=`echo des425'_'des_cbc_encrypt | sed 'y%./+-%__p_%'`
7833 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7834 echo $ac_n "(cached) $ac_c" 1>&6
7835 else
7836 ac_save_LIBS="$LIBS"
7837 LIBS="-ldes425 $LIBS"
7838 cat > conftest.$ac_ext <<EOF
7839 #line 7840 "configure"
7840 #include "confdefs.h"
7841 /* Override any gcc2 internal prototype to avoid an error. */
7842 /* We use char because int might match the return type of a gcc2
7843 builtin and then its argument prototype would still apply. */
7844 char des_cbc_encrypt();
7846 int main() {
7847 des_cbc_encrypt()
7848 ; return 0; }
7850 if { (eval echo configure:7851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7851 rm -rf conftest*
7852 eval "ac_cv_lib_$ac_lib_var=yes"
7853 else
7854 echo "configure: failed program was:" >&5
7855 cat conftest.$ac_ext >&5
7856 rm -rf conftest*
7857 eval "ac_cv_lib_$ac_lib_var=no"
7859 rm -f conftest*
7860 LIBS="$ac_save_LIBS"
7863 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7864 echo "$ac_t""yes" 1>&6
7865 ac_tr_lib=HAVE_LIB`echo des425 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7866 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7867 cat >> confdefs.h <<EOF
7868 #define $ac_tr_lib 1
7871 LIBS="-ldes425 $LIBS"
7873 else
7874 echo "$ac_t""no" 1>&6
7875 echo $ac_n "checking for des_cbc_encrypt in -ldes""... $ac_c" 1>&6
7876 echo "configure:7877: checking for des_cbc_encrypt in -ldes" >&5
7877 ac_lib_var=`echo des'_'des_cbc_encrypt | sed 'y%./+-%__p_%'`
7878 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7879 echo $ac_n "(cached) $ac_c" 1>&6
7880 else
7881 ac_save_LIBS="$LIBS"
7882 LIBS="-ldes $LIBS"
7883 cat > conftest.$ac_ext <<EOF
7884 #line 7885 "configure"
7885 #include "confdefs.h"
7886 /* Override any gcc2 internal prototype to avoid an error. */
7887 /* We use char because int might match the return type of a gcc2
7888 builtin and then its argument prototype would still apply. */
7889 char des_cbc_encrypt();
7891 int main() {
7892 des_cbc_encrypt()
7893 ; return 0; }
7895 if { (eval echo configure:7896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7896 rm -rf conftest*
7897 eval "ac_cv_lib_$ac_lib_var=yes"
7898 else
7899 echo "configure: failed program was:" >&5
7900 cat conftest.$ac_ext >&5
7901 rm -rf conftest*
7902 eval "ac_cv_lib_$ac_lib_var=no"
7904 rm -f conftest*
7905 LIBS="$ac_save_LIBS"
7908 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7909 echo "$ac_t""yes" 1>&6
7910 ac_tr_lib=HAVE_LIB`echo des | sed -e 's/^a-zA-Z0-9_/_/g' \
7911 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7912 cat >> confdefs.h <<EOF
7913 #define $ac_tr_lib 1
7916 LIBS="-ldes $LIBS"
7918 else
7919 echo "$ac_t""no" 1>&6
7924 echo $ac_n "checking for krb_get_cred in -lkrb4""... $ac_c" 1>&6
7925 echo "configure:7926: checking for krb_get_cred in -lkrb4" >&5
7926 ac_lib_var=`echo krb4'_'krb_get_cred | sed 'y%./+-%__p_%'`
7927 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7928 echo $ac_n "(cached) $ac_c" 1>&6
7929 else
7930 ac_save_LIBS="$LIBS"
7931 LIBS="-lkrb4 $LIBS"
7932 cat > conftest.$ac_ext <<EOF
7933 #line 7934 "configure"
7934 #include "confdefs.h"
7935 /* Override any gcc2 internal prototype to avoid an error. */
7936 /* We use char because int might match the return type of a gcc2
7937 builtin and then its argument prototype would still apply. */
7938 char krb_get_cred();
7940 int main() {
7941 krb_get_cred()
7942 ; return 0; }
7944 if { (eval echo configure:7945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7945 rm -rf conftest*
7946 eval "ac_cv_lib_$ac_lib_var=yes"
7947 else
7948 echo "configure: failed program was:" >&5
7949 cat conftest.$ac_ext >&5
7950 rm -rf conftest*
7951 eval "ac_cv_lib_$ac_lib_var=no"
7953 rm -f conftest*
7954 LIBS="$ac_save_LIBS"
7957 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7958 echo "$ac_t""yes" 1>&6
7959 ac_tr_lib=HAVE_LIB`echo krb4 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7960 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7961 cat >> confdefs.h <<EOF
7962 #define $ac_tr_lib 1
7965 LIBS="-lkrb4 $LIBS"
7967 else
7968 echo "$ac_t""no" 1>&6
7969 echo $ac_n "checking for krb_get_cred in -lkrb""... $ac_c" 1>&6
7970 echo "configure:7971: checking for krb_get_cred in -lkrb" >&5
7971 ac_lib_var=`echo krb'_'krb_get_cred | sed 'y%./+-%__p_%'`
7972 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7973 echo $ac_n "(cached) $ac_c" 1>&6
7974 else
7975 ac_save_LIBS="$LIBS"
7976 LIBS="-lkrb $LIBS"
7977 cat > conftest.$ac_ext <<EOF
7978 #line 7979 "configure"
7979 #include "confdefs.h"
7980 /* Override any gcc2 internal prototype to avoid an error. */
7981 /* We use char because int might match the return type of a gcc2
7982 builtin and then its argument prototype would still apply. */
7983 char krb_get_cred();
7985 int main() {
7986 krb_get_cred()
7987 ; return 0; }
7989 if { (eval echo configure:7990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7990 rm -rf conftest*
7991 eval "ac_cv_lib_$ac_lib_var=yes"
7992 else
7993 echo "configure: failed program was:" >&5
7994 cat conftest.$ac_ext >&5
7995 rm -rf conftest*
7996 eval "ac_cv_lib_$ac_lib_var=no"
7998 rm -f conftest*
7999 LIBS="$ac_save_LIBS"
8002 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8003 echo "$ac_t""yes" 1>&6
8004 ac_tr_lib=HAVE_LIB`echo krb | sed -e 's/^a-zA-Z0-9_/_/g' \
8005 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8006 cat >> confdefs.h <<EOF
8007 #define $ac_tr_lib 1
8010 LIBS="-lkrb $LIBS"
8012 else
8013 echo "$ac_t""no" 1>&6
8020 if test "${with_kerberos5+set}" = set; then
8021 for ac_hdr in krb5.h
8023 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8024 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8025 echo "configure:8026: checking for $ac_hdr" >&5
8026 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8027 echo $ac_n "(cached) $ac_c" 1>&6
8028 else
8029 cat > conftest.$ac_ext <<EOF
8030 #line 8031 "configure"
8031 #include "confdefs.h"
8032 #include <$ac_hdr>
8034 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8035 { (eval echo configure:8036: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8036 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8037 if test -z "$ac_err"; then
8038 rm -rf conftest*
8039 eval "ac_cv_header_$ac_safe=yes"
8040 else
8041 echo "$ac_err" >&5
8042 echo "configure: failed program was:" >&5
8043 cat conftest.$ac_ext >&5
8044 rm -rf conftest*
8045 eval "ac_cv_header_$ac_safe=no"
8047 rm -f conftest*
8049 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8050 echo "$ac_t""yes" 1>&6
8051 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8052 cat >> confdefs.h <<EOF
8053 #define $ac_tr_hdr 1
8056 else
8057 echo "$ac_t""no" 1>&6
8059 done
8061 else
8062 for ac_hdr in des.h
8064 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8065 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8066 echo "configure:8067: checking for $ac_hdr" >&5
8067 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8068 echo $ac_n "(cached) $ac_c" 1>&6
8069 else
8070 cat > conftest.$ac_ext <<EOF
8071 #line 8072 "configure"
8072 #include "confdefs.h"
8073 #include <$ac_hdr>
8075 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8076 { (eval echo configure:8077: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8077 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8078 if test -z "$ac_err"; then
8079 rm -rf conftest*
8080 eval "ac_cv_header_$ac_safe=yes"
8081 else
8082 echo "$ac_err" >&5
8083 echo "configure: failed program was:" >&5
8084 cat conftest.$ac_ext >&5
8085 rm -rf conftest*
8086 eval "ac_cv_header_$ac_safe=no"
8088 rm -f conftest*
8090 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8091 echo "$ac_t""yes" 1>&6
8092 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8093 cat >> confdefs.h <<EOF
8094 #define $ac_tr_hdr 1
8097 else
8098 echo "$ac_t""no" 1>&6
8099 for ac_hdr in kerberosIV/des.h
8101 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8102 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8103 echo "configure:8104: checking for $ac_hdr" >&5
8104 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8105 echo $ac_n "(cached) $ac_c" 1>&6
8106 else
8107 cat > conftest.$ac_ext <<EOF
8108 #line 8109 "configure"
8109 #include "confdefs.h"
8110 #include <$ac_hdr>
8112 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8113 { (eval echo configure:8114: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8114 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8115 if test -z "$ac_err"; then
8116 rm -rf conftest*
8117 eval "ac_cv_header_$ac_safe=yes"
8118 else
8119 echo "$ac_err" >&5
8120 echo "configure: failed program was:" >&5
8121 cat conftest.$ac_ext >&5
8122 rm -rf conftest*
8123 eval "ac_cv_header_$ac_safe=no"
8125 rm -f conftest*
8127 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8128 echo "$ac_t""yes" 1>&6
8129 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8130 cat >> confdefs.h <<EOF
8131 #define $ac_tr_hdr 1
8134 else
8135 echo "$ac_t""no" 1>&6
8136 for ac_hdr in kerberos/des.h
8138 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8139 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8140 echo "configure:8141: checking for $ac_hdr" >&5
8141 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8142 echo $ac_n "(cached) $ac_c" 1>&6
8143 else
8144 cat > conftest.$ac_ext <<EOF
8145 #line 8146 "configure"
8146 #include "confdefs.h"
8147 #include <$ac_hdr>
8149 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8150 { (eval echo configure:8151: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8151 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8152 if test -z "$ac_err"; then
8153 rm -rf conftest*
8154 eval "ac_cv_header_$ac_safe=yes"
8155 else
8156 echo "$ac_err" >&5
8157 echo "configure: failed program was:" >&5
8158 cat conftest.$ac_ext >&5
8159 rm -rf conftest*
8160 eval "ac_cv_header_$ac_safe=no"
8162 rm -f conftest*
8164 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8165 echo "$ac_t""yes" 1>&6
8166 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8167 cat >> confdefs.h <<EOF
8168 #define $ac_tr_hdr 1
8171 else
8172 echo "$ac_t""no" 1>&6
8174 done
8177 done
8180 done
8182 for ac_hdr in krb.h
8184 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8185 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8186 echo "configure:8187: checking for $ac_hdr" >&5
8187 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8188 echo $ac_n "(cached) $ac_c" 1>&6
8189 else
8190 cat > conftest.$ac_ext <<EOF
8191 #line 8192 "configure"
8192 #include "confdefs.h"
8193 #include <$ac_hdr>
8195 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8196 { (eval echo configure:8197: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8197 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8198 if test -z "$ac_err"; then
8199 rm -rf conftest*
8200 eval "ac_cv_header_$ac_safe=yes"
8201 else
8202 echo "$ac_err" >&5
8203 echo "configure: failed program was:" >&5
8204 cat conftest.$ac_ext >&5
8205 rm -rf conftest*
8206 eval "ac_cv_header_$ac_safe=no"
8208 rm -f conftest*
8210 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8211 echo "$ac_t""yes" 1>&6
8212 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8213 cat >> confdefs.h <<EOF
8214 #define $ac_tr_hdr 1
8217 else
8218 echo "$ac_t""no" 1>&6
8219 for ac_hdr in kerberosIV/krb.h
8221 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8222 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8223 echo "configure:8224: checking for $ac_hdr" >&5
8224 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8225 echo $ac_n "(cached) $ac_c" 1>&6
8226 else
8227 cat > conftest.$ac_ext <<EOF
8228 #line 8229 "configure"
8229 #include "confdefs.h"
8230 #include <$ac_hdr>
8232 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8233 { (eval echo configure:8234: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8234 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8235 if test -z "$ac_err"; then
8236 rm -rf conftest*
8237 eval "ac_cv_header_$ac_safe=yes"
8238 else
8239 echo "$ac_err" >&5
8240 echo "configure: failed program was:" >&5
8241 cat conftest.$ac_ext >&5
8242 rm -rf conftest*
8243 eval "ac_cv_header_$ac_safe=no"
8245 rm -f conftest*
8247 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8248 echo "$ac_t""yes" 1>&6
8249 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8250 cat >> confdefs.h <<EOF
8251 #define $ac_tr_hdr 1
8254 else
8255 echo "$ac_t""no" 1>&6
8256 for ac_hdr in kerberos/krb.h
8258 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8259 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8260 echo "configure:8261: checking for $ac_hdr" >&5
8261 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8262 echo $ac_n "(cached) $ac_c" 1>&6
8263 else
8264 cat > conftest.$ac_ext <<EOF
8265 #line 8266 "configure"
8266 #include "confdefs.h"
8267 #include <$ac_hdr>
8269 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8270 { (eval echo configure:8271: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8271 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8272 if test -z "$ac_err"; then
8273 rm -rf conftest*
8274 eval "ac_cv_header_$ac_safe=yes"
8275 else
8276 echo "$ac_err" >&5
8277 echo "configure: failed program was:" >&5
8278 cat conftest.$ac_ext >&5
8279 rm -rf conftest*
8280 eval "ac_cv_header_$ac_safe=no"
8282 rm -f conftest*
8284 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8285 echo "$ac_t""yes" 1>&6
8286 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8287 cat >> confdefs.h <<EOF
8288 #define $ac_tr_hdr 1
8291 else
8292 echo "$ac_t""no" 1>&6
8294 done
8297 done
8300 done
8303 for ac_hdr in com_err.h
8305 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8306 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8307 echo "configure:8308: checking for $ac_hdr" >&5
8308 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8309 echo $ac_n "(cached) $ac_c" 1>&6
8310 else
8311 cat > conftest.$ac_ext <<EOF
8312 #line 8313 "configure"
8313 #include "confdefs.h"
8314 #include <$ac_hdr>
8316 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8317 { (eval echo configure:8318: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8318 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8319 if test -z "$ac_err"; then
8320 rm -rf conftest*
8321 eval "ac_cv_header_$ac_safe=yes"
8322 else
8323 echo "$ac_err" >&5
8324 echo "configure: failed program was:" >&5
8325 cat conftest.$ac_ext >&5
8326 rm -rf conftest*
8327 eval "ac_cv_header_$ac_safe=no"
8329 rm -f conftest*
8331 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8332 echo "$ac_t""yes" 1>&6
8333 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8334 cat >> confdefs.h <<EOF
8335 #define $ac_tr_hdr 1
8338 else
8339 echo "$ac_t""no" 1>&6
8341 done
8345 # Solaris requires -lintl if you want strerror (which calls dgettext)
8346 # to return localized messages.
8347 echo $ac_n "checking for dgettext in -lintl""... $ac_c" 1>&6
8348 echo "configure:8349: checking for dgettext in -lintl" >&5
8349 ac_lib_var=`echo intl'_'dgettext | sed 'y%./+-%__p_%'`
8350 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8351 echo $ac_n "(cached) $ac_c" 1>&6
8352 else
8353 ac_save_LIBS="$LIBS"
8354 LIBS="-lintl $LIBS"
8355 cat > conftest.$ac_ext <<EOF
8356 #line 8357 "configure"
8357 #include "confdefs.h"
8358 /* Override any gcc2 internal prototype to avoid an error. */
8359 /* We use char because int might match the return type of a gcc2
8360 builtin and then its argument prototype would still apply. */
8361 char dgettext();
8363 int main() {
8364 dgettext()
8365 ; return 0; }
8367 if { (eval echo configure:8368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8368 rm -rf conftest*
8369 eval "ac_cv_lib_$ac_lib_var=yes"
8370 else
8371 echo "configure: failed program was:" >&5
8372 cat conftest.$ac_ext >&5
8373 rm -rf conftest*
8374 eval "ac_cv_lib_$ac_lib_var=no"
8376 rm -f conftest*
8377 LIBS="$ac_save_LIBS"
8380 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8381 echo "$ac_t""yes" 1>&6
8382 ac_tr_lib=HAVE_LIB`echo intl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8383 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8384 cat >> confdefs.h <<EOF
8385 #define $ac_tr_lib 1
8388 LIBS="-lintl $LIBS"
8390 else
8391 echo "$ac_t""no" 1>&6
8395 echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
8396 echo "configure:8397: checking whether localtime caches TZ" >&5
8397 if eval "test \"`echo '$''{'emacs_cv_localtime_cache'+set}'`\" = set"; then
8398 echo $ac_n "(cached) $ac_c" 1>&6
8399 else
8400 if test x$ac_cv_func_tzset = xyes; then
8401 if test "$cross_compiling" = yes; then
8402 # If we have tzset, assume the worst when cross-compiling.
8403 emacs_cv_localtime_cache=yes
8404 else
8405 cat > conftest.$ac_ext <<EOF
8406 #line 8407 "configure"
8407 #include "confdefs.h"
8408 #include <time.h>
8409 extern char **environ;
8410 unset_TZ ()
8412 char **from, **to;
8413 for (to = from = environ; (*to = *from); from++)
8414 if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
8415 to++;
8417 char TZ_GMT0[] = "TZ=GMT0";
8418 char TZ_PST8[] = "TZ=PST8";
8419 main()
8421 time_t now = time ((time_t *) 0);
8422 int hour_GMT0, hour_unset;
8423 if (putenv (TZ_GMT0) != 0)
8424 exit (1);
8425 hour_GMT0 = localtime (&now)->tm_hour;
8426 unset_TZ ();
8427 hour_unset = localtime (&now)->tm_hour;
8428 if (putenv (TZ_PST8) != 0)
8429 exit (1);
8430 if (localtime (&now)->tm_hour == hour_GMT0)
8431 exit (1);
8432 unset_TZ ();
8433 if (localtime (&now)->tm_hour != hour_unset)
8434 exit (1);
8435 exit (0);
8438 if { (eval echo configure:8439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8439 then
8440 emacs_cv_localtime_cache=no
8441 else
8442 echo "configure: failed program was:" >&5
8443 cat conftest.$ac_ext >&5
8444 rm -fr conftest*
8445 emacs_cv_localtime_cache=yes
8447 rm -fr conftest*
8450 else
8451 # If we lack tzset, report that localtime does not cache TZ,
8452 # since we can't invalidate the cache if we don't have tzset.
8453 emacs_cv_localtime_cache=no
8456 echo "$ac_t""$emacs_cv_localtime_cache" 1>&6
8457 if test $emacs_cv_localtime_cache = yes; then
8458 cat >> confdefs.h <<\EOF
8459 #define LOCALTIME_CACHE 1
8464 if test "x$HAVE_TIMEVAL" = xyes; then
8465 for ac_func in gettimeofday
8467 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8468 echo "configure:8469: checking for $ac_func" >&5
8469 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8470 echo $ac_n "(cached) $ac_c" 1>&6
8471 else
8472 cat > conftest.$ac_ext <<EOF
8473 #line 8474 "configure"
8474 #include "confdefs.h"
8475 /* System header to define __stub macros and hopefully few prototypes,
8476 which can conflict with char $ac_func(); below. */
8477 #include <assert.h>
8478 /* Override any gcc2 internal prototype to avoid an error. */
8479 /* We use char because int might match the return type of a gcc2
8480 builtin and then its argument prototype would still apply. */
8481 char $ac_func();
8483 int main() {
8485 /* The GNU C library defines this for functions which it implements
8486 to always fail with ENOSYS. Some functions are actually named
8487 something starting with __ and the normal name is an alias. */
8488 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8489 choke me
8490 #else
8491 $ac_func();
8492 #endif
8494 ; return 0; }
8496 if { (eval echo configure:8497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8497 rm -rf conftest*
8498 eval "ac_cv_func_$ac_func=yes"
8499 else
8500 echo "configure: failed program was:" >&5
8501 cat conftest.$ac_ext >&5
8502 rm -rf conftest*
8503 eval "ac_cv_func_$ac_func=no"
8505 rm -f conftest*
8508 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8509 echo "$ac_t""yes" 1>&6
8510 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8511 cat >> confdefs.h <<EOF
8512 #define $ac_tr_func 1
8515 else
8516 echo "$ac_t""no" 1>&6
8518 done
8520 echo $ac_n "checking whether gettimeofday can accept two arguments""... $ac_c" 1>&6
8521 echo "configure:8522: checking whether gettimeofday can accept two arguments" >&5
8522 if eval "test \"`echo '$''{'emacs_cv_gettimeofday_two_arguments'+set}'`\" = set"; then
8523 echo $ac_n "(cached) $ac_c" 1>&6
8524 else
8525 cat > conftest.$ac_ext <<EOF
8526 #line 8527 "configure"
8527 #include "confdefs.h"
8529 #ifdef TIME_WITH_SYS_TIME
8530 #include <sys/time.h>
8531 #include <time.h>
8532 #else
8533 #ifdef HAVE_SYS_TIME_H
8534 #include <sys/time.h>
8535 #else
8536 #include <time.h>
8537 #endif
8538 #endif
8539 int main() {
8540 struct timeval time;
8541 gettimeofday (&time, 0);
8542 ; return 0; }
8544 if { (eval echo configure:8545: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8545 rm -rf conftest*
8546 emacs_cv_gettimeofday_two_arguments=yes
8547 else
8548 echo "configure: failed program was:" >&5
8549 cat conftest.$ac_ext >&5
8550 rm -rf conftest*
8551 emacs_cv_gettimeofday_two_arguments=no
8553 rm -f conftest*
8556 echo "$ac_t""$emacs_cv_gettimeofday_two_arguments" 1>&6
8557 if test $emacs_cv_gettimeofday_two_arguments = no; then
8558 cat >> confdefs.h <<\EOF
8559 #define GETTIMEOFDAY_ONE_ARGUMENT 1
8565 if test "$ac_cv_func_gettimeofday" = yes; then
8566 echo $ac_n "checking for struct timezone""... $ac_c" 1>&6
8567 echo "configure:8568: checking for struct timezone" >&5
8568 if eval "test \"`echo '$''{'emacs_cv_struct_timezone'+set}'`\" = set"; then
8569 echo $ac_n "(cached) $ac_c" 1>&6
8570 else
8571 cat > conftest.$ac_ext <<EOF
8572 #line 8573 "configure"
8573 #include "confdefs.h"
8574 #include <sys/time.h>
8575 int main() {
8576 struct timezone tz;
8577 ; return 0; }
8579 if { (eval echo configure:8580: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8580 rm -rf conftest*
8581 if test "$cross_compiling" = yes; then
8582 emacs_cv_struct_timezone=yes
8583 else
8584 cat > conftest.$ac_ext <<EOF
8585 #line 8586 "configure"
8586 #include "confdefs.h"
8588 #ifdef TIME_WITH_SYS_TIME
8589 #include <sys/time.h>
8590 #include <time.h>
8591 #else
8592 #ifdef HAVE_SYS_TIME_H
8593 #include <sys/time.h>
8594 #else
8595 #include <time.h>
8596 #endif
8597 #endif
8598 main () {
8599 struct timeval time;
8600 struct timezone dummy;
8601 exit (gettimeofday (&time, &dummy));
8604 if { (eval echo configure:8605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8605 then
8606 emacs_cv_struct_timezone=yes
8607 else
8608 echo "configure: failed program was:" >&5
8609 cat conftest.$ac_ext >&5
8610 rm -fr conftest*
8611 emacs_cv_struct_timezone=no
8613 rm -fr conftest*
8616 else
8617 echo "configure: failed program was:" >&5
8618 cat conftest.$ac_ext >&5
8619 rm -rf conftest*
8620 emacs_cv_struct_timezone=no
8622 rm -f conftest*
8625 echo "$ac_t""$emacs_cv_struct_timezone" 1>&6
8628 ok_so_far=yes
8629 echo $ac_n "checking for socket""... $ac_c" 1>&6
8630 echo "configure:8631: checking for socket" >&5
8631 if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then
8632 echo $ac_n "(cached) $ac_c" 1>&6
8633 else
8634 cat > conftest.$ac_ext <<EOF
8635 #line 8636 "configure"
8636 #include "confdefs.h"
8637 /* System header to define __stub macros and hopefully few prototypes,
8638 which can conflict with char socket(); below. */
8639 #include <assert.h>
8640 /* Override any gcc2 internal prototype to avoid an error. */
8641 /* We use char because int might match the return type of a gcc2
8642 builtin and then its argument prototype would still apply. */
8643 char socket();
8645 int main() {
8647 /* The GNU C library defines this for functions which it implements
8648 to always fail with ENOSYS. Some functions are actually named
8649 something starting with __ and the normal name is an alias. */
8650 #if defined (__stub_socket) || defined (__stub___socket)
8651 choke me
8652 #else
8653 socket();
8654 #endif
8656 ; return 0; }
8658 if { (eval echo configure:8659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8659 rm -rf conftest*
8660 eval "ac_cv_func_socket=yes"
8661 else
8662 echo "configure: failed program was:" >&5
8663 cat conftest.$ac_ext >&5
8664 rm -rf conftest*
8665 eval "ac_cv_func_socket=no"
8667 rm -f conftest*
8670 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
8671 echo "$ac_t""yes" 1>&6
8673 else
8674 echo "$ac_t""no" 1>&6
8675 ok_so_far=no
8678 if test $ok_so_far = yes; then
8679 ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'`
8680 echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6
8681 echo "configure:8682: checking for netinet/in.h" >&5
8682 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8683 echo $ac_n "(cached) $ac_c" 1>&6
8684 else
8685 cat > conftest.$ac_ext <<EOF
8686 #line 8687 "configure"
8687 #include "confdefs.h"
8688 #include <netinet/in.h>
8690 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8691 { (eval echo configure:8692: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8692 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8693 if test -z "$ac_err"; then
8694 rm -rf conftest*
8695 eval "ac_cv_header_$ac_safe=yes"
8696 else
8697 echo "$ac_err" >&5
8698 echo "configure: failed program was:" >&5
8699 cat conftest.$ac_ext >&5
8700 rm -rf conftest*
8701 eval "ac_cv_header_$ac_safe=no"
8703 rm -f conftest*
8705 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8706 echo "$ac_t""yes" 1>&6
8708 else
8709 echo "$ac_t""no" 1>&6
8710 ok_so_far=no
8714 if test $ok_so_far = yes; then
8715 ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'`
8716 echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6
8717 echo "configure:8718: checking for arpa/inet.h" >&5
8718 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8719 echo $ac_n "(cached) $ac_c" 1>&6
8720 else
8721 cat > conftest.$ac_ext <<EOF
8722 #line 8723 "configure"
8723 #include "confdefs.h"
8724 #include <arpa/inet.h>
8726 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8727 { (eval echo configure:8728: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8728 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8729 if test -z "$ac_err"; then
8730 rm -rf conftest*
8731 eval "ac_cv_header_$ac_safe=yes"
8732 else
8733 echo "$ac_err" >&5
8734 echo "configure: failed program was:" >&5
8735 cat conftest.$ac_ext >&5
8736 rm -rf conftest*
8737 eval "ac_cv_header_$ac_safe=no"
8739 rm -f conftest*
8741 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8742 echo "$ac_t""yes" 1>&6
8744 else
8745 echo "$ac_t""no" 1>&6
8746 ok_so_far=no
8750 if test $ok_so_far = yes; then
8751 cat >> confdefs.h <<\EOF
8752 #define HAVE_INET_SOCKETS 1
8757 if test -f /usr/lpp/X11/bin/smt.exp; then
8758 cat >> confdefs.h <<\EOF
8759 #define HAVE_AIX_SMT_EXP 1
8764 echo $ac_n "checking whether system supports dynamic ptys""... $ac_c" 1>&6
8765 echo "configure:8766: checking whether system supports dynamic ptys" >&5
8766 if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then
8767 echo "$ac_t""yes" 1>&6
8768 cat >> confdefs.h <<\EOF
8769 #define HAVE_DEV_PTMX 1
8772 else
8773 echo "$ac_t""no" 1>&6
8776 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
8777 echo "configure:8778: checking for pid_t" >&5
8778 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
8779 echo $ac_n "(cached) $ac_c" 1>&6
8780 else
8781 cat > conftest.$ac_ext <<EOF
8782 #line 8783 "configure"
8783 #include "confdefs.h"
8784 #include <sys/types.h>
8785 #if STDC_HEADERS
8786 #include <stdlib.h>
8787 #include <stddef.h>
8788 #endif
8790 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8791 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
8792 rm -rf conftest*
8793 ac_cv_type_pid_t=yes
8794 else
8795 rm -rf conftest*
8796 ac_cv_type_pid_t=no
8798 rm -f conftest*
8801 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
8802 if test $ac_cv_type_pid_t = no; then
8803 cat >> confdefs.h <<\EOF
8804 #define pid_t int
8809 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
8810 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
8811 echo "configure:8812: checking for vfork.h" >&5
8812 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8813 echo $ac_n "(cached) $ac_c" 1>&6
8814 else
8815 cat > conftest.$ac_ext <<EOF
8816 #line 8817 "configure"
8817 #include "confdefs.h"
8818 #include <vfork.h>
8820 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8821 { (eval echo configure:8822: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8822 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8823 if test -z "$ac_err"; then
8824 rm -rf conftest*
8825 eval "ac_cv_header_$ac_safe=yes"
8826 else
8827 echo "$ac_err" >&5
8828 echo "configure: failed program was:" >&5
8829 cat conftest.$ac_ext >&5
8830 rm -rf conftest*
8831 eval "ac_cv_header_$ac_safe=no"
8833 rm -f conftest*
8835 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8836 echo "$ac_t""yes" 1>&6
8837 cat >> confdefs.h <<\EOF
8838 #define HAVE_VFORK_H 1
8841 else
8842 echo "$ac_t""no" 1>&6
8845 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
8846 echo "configure:8847: checking for working vfork" >&5
8847 if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
8848 echo $ac_n "(cached) $ac_c" 1>&6
8849 else
8850 if test "$cross_compiling" = yes; then
8851 echo $ac_n "checking for vfork""... $ac_c" 1>&6
8852 echo "configure:8853: checking for vfork" >&5
8853 if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
8854 echo $ac_n "(cached) $ac_c" 1>&6
8855 else
8856 cat > conftest.$ac_ext <<EOF
8857 #line 8858 "configure"
8858 #include "confdefs.h"
8859 /* System header to define __stub macros and hopefully few prototypes,
8860 which can conflict with char vfork(); below. */
8861 #include <assert.h>
8862 /* Override any gcc2 internal prototype to avoid an error. */
8863 /* We use char because int might match the return type of a gcc2
8864 builtin and then its argument prototype would still apply. */
8865 char vfork();
8867 int main() {
8869 /* The GNU C library defines this for functions which it implements
8870 to always fail with ENOSYS. Some functions are actually named
8871 something starting with __ and the normal name is an alias. */
8872 #if defined (__stub_vfork) || defined (__stub___vfork)
8873 choke me
8874 #else
8875 vfork();
8876 #endif
8878 ; return 0; }
8880 if { (eval echo configure:8881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8881 rm -rf conftest*
8882 eval "ac_cv_func_vfork=yes"
8883 else
8884 echo "configure: failed program was:" >&5
8885 cat conftest.$ac_ext >&5
8886 rm -rf conftest*
8887 eval "ac_cv_func_vfork=no"
8889 rm -f conftest*
8892 if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
8893 echo "$ac_t""yes" 1>&6
8895 else
8896 echo "$ac_t""no" 1>&6
8899 ac_cv_func_vfork_works=$ac_cv_func_vfork
8900 else
8901 cat > conftest.$ac_ext <<EOF
8902 #line 8903 "configure"
8903 #include "confdefs.h"
8904 /* Thanks to Paul Eggert for this test. */
8905 #include <stdio.h>
8906 #include <sys/types.h>
8907 #include <sys/stat.h>
8908 #ifdef HAVE_UNISTD_H
8909 #include <unistd.h>
8910 #endif
8911 #ifdef HAVE_VFORK_H
8912 #include <vfork.h>
8913 #endif
8914 /* On some sparc systems, changes by the child to local and incoming
8915 argument registers are propagated back to the parent.
8916 The compiler is told about this with #include <vfork.h>,
8917 but some compilers (e.g. gcc -O) don't grok <vfork.h>.
8918 Test for this by using a static variable whose address
8919 is put into a register that is clobbered by the vfork. */
8920 static
8921 #ifdef __cplusplus
8922 sparc_address_test (int arg)
8923 #else
8924 sparc_address_test (arg) int arg;
8925 #endif
8927 static pid_t child;
8928 if (!child) {
8929 child = vfork ();
8930 if (child < 0) {
8931 perror ("vfork");
8932 _exit(2);
8934 if (!child) {
8935 arg = getpid();
8936 write(-1, "", 0);
8937 _exit (arg);
8941 main() {
8942 pid_t parent = getpid ();
8943 pid_t child;
8945 sparc_address_test ();
8947 child = vfork ();
8949 if (child == 0) {
8950 /* Here is another test for sparc vfork register problems.
8951 This test uses lots of local variables, at least
8952 as many local variables as main has allocated so far
8953 including compiler temporaries. 4 locals are enough for
8954 gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
8955 A buggy compiler should reuse the register of parent
8956 for one of the local variables, since it will think that
8957 parent can't possibly be used any more in this routine.
8958 Assigning to the local variable will thus munge parent
8959 in the parent process. */
8960 pid_t
8961 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
8962 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
8963 /* Convince the compiler that p..p7 are live; otherwise, it might
8964 use the same hardware register for all 8 local variables. */
8965 if (p != p1 || p != p2 || p != p3 || p != p4
8966 || p != p5 || p != p6 || p != p7)
8967 _exit(1);
8969 /* On some systems (e.g. IRIX 3.3),
8970 vfork doesn't separate parent from child file descriptors.
8971 If the child closes a descriptor before it execs or exits,
8972 this munges the parent's descriptor as well.
8973 Test for this by closing stdout in the child. */
8974 _exit(close(fileno(stdout)) != 0);
8975 } else {
8976 int status;
8977 struct stat st;
8979 while (wait(&status) != child)
8981 exit(
8982 /* Was there some problem with vforking? */
8983 child < 0
8985 /* Did the child fail? (This shouldn't happen.) */
8986 || status
8988 /* Did the vfork/compiler bug occur? */
8989 || parent != getpid()
8991 /* Did the file descriptor bug occur? */
8992 || fstat(fileno(stdout), &st) != 0
8997 if { (eval echo configure:8998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8998 then
8999 ac_cv_func_vfork_works=yes
9000 else
9001 echo "configure: failed program was:" >&5
9002 cat conftest.$ac_ext >&5
9003 rm -fr conftest*
9004 ac_cv_func_vfork_works=no
9006 rm -fr conftest*
9011 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
9012 if test $ac_cv_func_vfork_works = no; then
9013 cat >> confdefs.h <<\EOF
9014 #define vfork fork
9020 # Fixme: This should be replaced when we have autoconf 2.14.
9021 echo $ac_n "checking for size_t""... $ac_c" 1>&6
9022 echo "configure:9023: checking for size_t" >&5
9023 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
9024 echo $ac_n "(cached) $ac_c" 1>&6
9025 else
9026 cat > conftest.$ac_ext <<EOF
9027 #line 9028 "configure"
9028 #include "confdefs.h"
9029 #include <sys/types.h>
9030 #if STDC_HEADERS
9031 #include <stdlib.h>
9032 #include <stddef.h>
9033 #endif
9035 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9036 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
9037 rm -rf conftest*
9038 ac_cv_type_size_t=yes
9039 else
9040 rm -rf conftest*
9041 ac_cv_type_size_t=no
9043 rm -f conftest*
9046 echo "$ac_t""$ac_cv_type_size_t" 1>&6
9047 if test $ac_cv_type_size_t = no; then
9048 cat >> confdefs.h <<\EOF
9049 #define size_t unsigned
9055 # Set up the CFLAGS for real compilation, so we can substitute it.
9056 CFLAGS="$REAL_CFLAGS"
9057 CPPFLAGS="$REAL_CPPFLAGS"
9059 #### Find out which version of Emacs this is.
9060 version=`grep 'defconst[ ]*emacs-version' ${srcdir}/lisp/version.el \
9061 | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`
9062 if test x"${version}" = x; then
9063 { echo "configure: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." 1>&2; exit 1; }
9066 ### Specify what sort of things we'll be editing into Makefile and config.h.
9067 ### Use configuration here uncanonicalized to avoid exceeding size limits.
9099 cat >> confdefs.h <<EOF
9100 #define EMACS_CONFIGURATION "${canonical}"
9103 cat >> confdefs.h <<EOF
9104 #define EMACS_CONFIG_OPTIONS "${ac_configure_args}"
9107 cat >> confdefs.h <<EOF
9108 #define config_machfile "${machfile}"
9111 cat >> confdefs.h <<EOF
9112 #define config_opsysfile "${opsysfile}"
9115 cat >> confdefs.h <<EOF
9116 #define LD_SWITCH_X_SITE ${LD_SWITCH_X_SITE}
9119 cat >> confdefs.h <<EOF
9120 #define LD_SWITCH_X_SITE_AUX ${LD_SWITCH_X_SITE_AUX}
9123 cat >> confdefs.h <<EOF
9124 #define C_SWITCH_X_SITE ${C_SWITCH_X_SITE}
9127 cat >> confdefs.h <<EOF
9128 #define UNEXEC_SRC ${UNEXEC_SRC}
9132 if test "${HAVE_X_WINDOWS}" = "yes" ; then
9133 cat >> confdefs.h <<\EOF
9134 #define HAVE_X_WINDOWS 1
9138 if test "${USE_X_TOOLKIT}" != "none" ; then
9139 cat >> confdefs.h <<\EOF
9140 #define USE_X_TOOLKIT 1
9144 if test "${HAVE_X11}" = "yes" ; then
9145 cat >> confdefs.h <<\EOF
9146 #define HAVE_X11 1
9150 if test "${HAVE_XFREE386}" = "yes" ; then
9151 cat >> confdefs.h <<\EOF
9152 #define HAVE_XFREE386 1
9156 if test "${HAVE_MENUS}" = "yes" ; then
9157 cat >> confdefs.h <<\EOF
9158 #define HAVE_MENUS 1
9162 if test "${GNU_MALLOC}" = "yes" ; then
9163 cat >> confdefs.h <<\EOF
9164 #define GNU_MALLOC 1
9168 if test "${REL_ALLOC}" = "yes" ; then
9169 cat >> confdefs.h <<\EOF
9170 #define REL_ALLOC 1
9175 #### Report on what we decided to do.
9176 echo "
9177 Configured for \`${canonical}'.
9179 Where should the build process find the source code? ${srcdir}
9180 What operating system and machine description files should Emacs use?
9181 \`${opsysfile}' and \`${machfile}'
9182 What compiler should emacs be built with? ${CC} ${CFLAGS}
9183 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
9184 Should Emacs use a relocating allocator for buffers? ${REL_ALLOC}
9185 Should Emacs use mmap(2) for buffer allocation? $use_mmap_for_buffers
9186 What window system should Emacs use? ${window_system}
9187 What toolkit should Emacs use? ${USE_X_TOOLKIT}"
9189 if test -n "${x_includes}"; then
9190 echo " Where do we find X Windows header files? ${x_includes}"
9191 else
9192 echo " Where do we find X Windows header files? Standard dirs"
9194 if test -n "${x_libraries}"; then
9195 echo " Where do we find X Windows libraries? ${x_libraries}"
9196 else
9197 echo " Where do we find X Windows libraries? Standard dirs"
9200 echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}"
9201 echo " Does Emacs use -lXpm? ${HAVE_XPM}"
9202 echo " Does Emacs use -ljpeg? ${HAVE_JPEG}"
9203 echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
9204 echo " Does Emacs use -lungif? ${HAVE_GIF}"
9205 echo " Does Emacs use -lpng? ${HAVE_PNG}"
9206 echo " Does Emacs use X toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}"
9207 echo
9209 # Remove any trailing slashes in these variables.
9210 test "${prefix}" != NONE &&
9211 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
9212 test "${exec_prefix}" != NONE &&
9213 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
9215 ## Check if the C preprocessor will convert `..' to `. .'. If so, set
9216 ## CPP_NEED_TRADITIONAL to `yes' so that the code to generate Makefile
9217 ## from Makefile.c can correctly provide the arg `-traditional' to the
9218 ## C preprocessor.
9220 cat > conftest.$ac_ext <<EOF
9221 #line 9222 "configure"
9222 #include "confdefs.h"
9223 yes..yes
9225 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9226 egrep "yes..yes" >/dev/null 2>&1; then
9227 rm -rf conftest*
9228 CPP_NEED_TRADITIONAL=no
9229 else
9230 rm -rf conftest*
9231 CPP_NEED_TRADITIONAL=yes
9233 rm -f conftest*
9236 trap '' 1 2 15
9237 cat > confcache <<\EOF
9238 # This file is a shell script that caches the results of configure
9239 # tests run on this system so they can be shared between configure
9240 # scripts and configure runs. It is not useful on other systems.
9241 # If it contains results you don't want to keep, you may remove or edit it.
9243 # By default, configure uses ./config.cache as the cache file,
9244 # creating it if it does not exist already. You can give configure
9245 # the --cache-file=FILE option to use a different cache file; that is
9246 # what configure does when it calls configure scripts in
9247 # subdirectories, so they share the cache.
9248 # Giving --cache-file=/dev/null disables caching, for debugging configure.
9249 # config.status only pays attention to the cache file if you give it the
9250 # --recheck option to rerun configure.
9253 # The following way of writing the cache mishandles newlines in values,
9254 # but we know of no workaround that is simple, portable, and efficient.
9255 # So, don't put newlines in cache variables' values.
9256 # Ultrix sh set writes to stderr and can't be redirected directly,
9257 # and sets the high bit in the cache file unless we assign to the vars.
9258 (set) 2>&1 |
9259 case `(ac_space=' '; set | grep ac_space) 2>&1` in
9260 *ac_space=\ *)
9261 # `set' does not quote correctly, so add quotes (double-quote substitution
9262 # turns \\\\ into \\, and sed turns \\ into \).
9263 sed -n \
9264 -e "s/'/'\\\\''/g" \
9265 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
9268 # `set' quotes correctly as required by POSIX, so do not add quotes.
9269 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
9271 esac >> confcache
9272 if cmp -s $cache_file confcache; then
9274 else
9275 if test -w $cache_file; then
9276 echo "updating cache $cache_file"
9277 cat confcache > $cache_file
9278 else
9279 echo "not updating unwritable cache $cache_file"
9282 rm -f confcache
9284 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
9286 test "x$prefix" = xNONE && prefix=$ac_default_prefix
9287 # Let make expand exec_prefix.
9288 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9290 # Any assignment to VPATH causes Sun make to only execute
9291 # the first set of double-colon rules, so remove it if not needed.
9292 # If there is a colon in the path, we need to keep it.
9293 if test "x$srcdir" = x.; then
9294 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
9297 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
9299 DEFS=-DHAVE_CONFIG_H
9301 # Without the "./", some shells look in PATH for config.status.
9302 : ${CONFIG_STATUS=./config.status}
9304 echo creating $CONFIG_STATUS
9305 rm -f $CONFIG_STATUS
9306 cat > $CONFIG_STATUS <<EOF
9307 #! /bin/sh
9308 # Generated automatically by configure.
9309 # Run this file to recreate the current configuration.
9310 # This directory was configured as follows,
9311 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
9313 # $0 $ac_configure_args
9315 # Compiler output produced by configure, useful for debugging
9316 # configure, is in ./config.log if it exists.
9318 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
9319 for ac_option
9321 case "\$ac_option" in
9322 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
9323 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
9324 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
9325 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
9326 echo "$CONFIG_STATUS generated by autoconf version 2.13"
9327 exit 0 ;;
9328 -help | --help | --hel | --he | --h)
9329 echo "\$ac_cs_usage"; exit 0 ;;
9330 *) echo "\$ac_cs_usage"; exit 1 ;;
9331 esac
9332 done
9334 ac_given_srcdir=$srcdir
9335 ac_given_INSTALL="$INSTALL"
9337 trap 'rm -fr `echo "Makefile lib-src/Makefile.c:lib-src/Makefile.in oldXMenu/Makefile \
9338 man/Makefile lwlib/Makefile src/Makefile.c:src/Makefile.in \
9339 lisp/Makefile leim/Makefile src/config.h:src/config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
9341 cat >> $CONFIG_STATUS <<EOF
9343 # Protect against being on the right side of a sed subst in config.status.
9344 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
9345 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
9346 $ac_vpsub
9347 $extrasub
9348 s%@SHELL@%$SHELL%g
9349 s%@CFLAGS@%$CFLAGS%g
9350 s%@CPPFLAGS@%$CPPFLAGS%g
9351 s%@CXXFLAGS@%$CXXFLAGS%g
9352 s%@FFLAGS@%$FFLAGS%g
9353 s%@DEFS@%$DEFS%g
9354 s%@LDFLAGS@%$LDFLAGS%g
9355 s%@LIBS@%$LIBS%g
9356 s%@exec_prefix@%$exec_prefix%g
9357 s%@prefix@%$prefix%g
9358 s%@program_transform_name@%$program_transform_name%g
9359 s%@bindir@%$bindir%g
9360 s%@sbindir@%$sbindir%g
9361 s%@libexecdir@%$libexecdir%g
9362 s%@datadir@%$datadir%g
9363 s%@sysconfdir@%$sysconfdir%g
9364 s%@sharedstatedir@%$sharedstatedir%g
9365 s%@localstatedir@%$localstatedir%g
9366 s%@libdir@%$libdir%g
9367 s%@includedir@%$includedir%g
9368 s%@oldincludedir@%$oldincludedir%g
9369 s%@infodir@%$infodir%g
9370 s%@mandir@%$mandir%g
9371 s%@host@%$host%g
9372 s%@host_alias@%$host_alias%g
9373 s%@host_cpu@%$host_cpu%g
9374 s%@host_vendor@%$host_vendor%g
9375 s%@host_os@%$host_os%g
9376 s%@CC@%$CC%g
9377 s%@LN_S@%$LN_S%g
9378 s%@CPP@%$CPP%g
9379 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
9380 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
9381 s%@INSTALL_DATA@%$INSTALL_DATA%g
9382 s%@YACC@%$YACC%g
9383 s%@RANLIB@%$RANLIB%g
9384 s%@LIBSOUND@%$LIBSOUND%g
9385 s%@SET_MAKE@%$SET_MAKE%g
9386 s%@ALLOCA@%$ALLOCA%g
9387 s%@liblockfile@%$liblockfile%g
9388 s%@LIBOBJS@%$LIBOBJS%g
9389 s%@NEED_SETGID@%$NEED_SETGID%g
9390 s%@KMEM_GROUP@%$KMEM_GROUP%g
9391 s%@version@%$version%g
9392 s%@configuration@%$configuration%g
9393 s%@canonical@%$canonical%g
9394 s%@srcdir@%$srcdir%g
9395 s%@lispdir@%$lispdir%g
9396 s%@locallisppath@%$locallisppath%g
9397 s%@lisppath@%$lisppath%g
9398 s%@x_default_search_path@%$x_default_search_path%g
9399 s%@etcdir@%$etcdir%g
9400 s%@archlibdir@%$archlibdir%g
9401 s%@docdir@%$docdir%g
9402 s%@bitmapdir@%$bitmapdir%g
9403 s%@c_switch_system@%$c_switch_system%g
9404 s%@c_switch_machine@%$c_switch_machine%g
9405 s%@LD_SWITCH_X_SITE@%$LD_SWITCH_X_SITE%g
9406 s%@LD_SWITCH_X_SITE_AUX@%$LD_SWITCH_X_SITE_AUX%g
9407 s%@C_SWITCH_X_SITE@%$C_SWITCH_X_SITE%g
9408 s%@X_TOOLKIT_TYPE@%$X_TOOLKIT_TYPE%g
9409 s%@machfile@%$machfile%g
9410 s%@opsysfile@%$opsysfile%g
9411 s%@GETLOADAVG_LIBS@%$GETLOADAVG_LIBS%g
9413 CEOF
9416 cat >> $CONFIG_STATUS <<\EOF
9418 # Split the substitutions into bite-sized pieces for seds with
9419 # small command number limits, like on Digital OSF/1 and HP-UX.
9420 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
9421 ac_file=1 # Number of current file.
9422 ac_beg=1 # First line for current file.
9423 ac_end=$ac_max_sed_cmds # Line after last line for current file.
9424 ac_more_lines=:
9425 ac_sed_cmds=""
9426 while $ac_more_lines; do
9427 if test $ac_beg -gt 1; then
9428 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
9429 else
9430 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
9432 if test ! -s conftest.s$ac_file; then
9433 ac_more_lines=false
9434 rm -f conftest.s$ac_file
9435 else
9436 if test -z "$ac_sed_cmds"; then
9437 ac_sed_cmds="sed -f conftest.s$ac_file"
9438 else
9439 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
9441 ac_file=`expr $ac_file + 1`
9442 ac_beg=$ac_end
9443 ac_end=`expr $ac_end + $ac_max_sed_cmds`
9445 done
9446 if test -z "$ac_sed_cmds"; then
9447 ac_sed_cmds=cat
9451 cat >> $CONFIG_STATUS <<EOF
9453 CONFIG_FILES=\${CONFIG_FILES-"Makefile lib-src/Makefile.c:lib-src/Makefile.in oldXMenu/Makefile \
9454 man/Makefile lwlib/Makefile src/Makefile.c:src/Makefile.in \
9455 lisp/Makefile leim/Makefile"}
9457 cat >> $CONFIG_STATUS <<\EOF
9458 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
9459 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9460 case "$ac_file" in
9461 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9462 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9463 *) ac_file_in="${ac_file}.in" ;;
9464 esac
9466 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
9468 # Remove last slash and all that follows it. Not all systems have dirname.
9469 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9470 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9471 # The file is in a subdirectory.
9472 test ! -d "$ac_dir" && mkdir "$ac_dir"
9473 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
9474 # A "../" for each directory in $ac_dir_suffix.
9475 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
9476 else
9477 ac_dir_suffix= ac_dots=
9480 case "$ac_given_srcdir" in
9481 .) srcdir=.
9482 if test -z "$ac_dots"; then top_srcdir=.
9483 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
9484 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
9485 *) # Relative path.
9486 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
9487 top_srcdir="$ac_dots$ac_given_srcdir" ;;
9488 esac
9490 case "$ac_given_INSTALL" in
9491 [/$]*) INSTALL="$ac_given_INSTALL" ;;
9492 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
9493 esac
9495 echo creating "$ac_file"
9496 rm -f "$ac_file"
9497 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
9498 case "$ac_file" in
9499 *Makefile*) ac_comsub="1i\\
9500 # $configure_input" ;;
9501 *) ac_comsub= ;;
9502 esac
9504 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9505 sed -e "$ac_comsub
9506 s%@configure_input@%$configure_input%g
9507 s%@srcdir@%$srcdir%g
9508 s%@top_srcdir@%$top_srcdir%g
9509 s%@INSTALL@%$INSTALL%g
9510 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
9511 fi; done
9512 rm -f conftest.s*
9514 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
9515 # NAME is the cpp macro being defined and VALUE is the value it is being given.
9517 # ac_d sets the value in "#define NAME VALUE" lines.
9518 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
9519 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
9520 ac_dC='\3'
9521 ac_dD='%g'
9522 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
9523 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
9524 ac_uB='\([ ]\)%\1#\2define\3'
9525 ac_uC=' '
9526 ac_uD='\4%g'
9527 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
9528 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
9529 ac_eB='$%\1#\2define\3'
9530 ac_eC=' '
9531 ac_eD='%g'
9533 if test "${CONFIG_HEADERS+set}" != set; then
9535 cat >> $CONFIG_STATUS <<EOF
9536 CONFIG_HEADERS="src/config.h:src/config.in"
9538 cat >> $CONFIG_STATUS <<\EOF
9540 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
9541 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9542 case "$ac_file" in
9543 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9544 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9545 *) ac_file_in="${ac_file}.in" ;;
9546 esac
9548 echo creating $ac_file
9550 rm -f conftest.frag conftest.in conftest.out
9551 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9552 cat $ac_file_inputs > conftest.in
9556 # Transform confdefs.h into a sed script conftest.vals that substitutes
9557 # the proper values into config.h.in to produce config.h. And first:
9558 # Protect against being on the right side of a sed subst in config.status.
9559 # Protect against being in an unquoted here document in config.status.
9560 rm -f conftest.vals
9561 cat > conftest.hdr <<\EOF
9562 s/[\\&%]/\\&/g
9563 s%[\\$`]%\\&%g
9564 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
9565 s%ac_d%ac_u%gp
9566 s%ac_u%ac_e%gp
9568 sed -n -f conftest.hdr confdefs.h > conftest.vals
9569 rm -f conftest.hdr
9571 # This sed command replaces #undef with comments. This is necessary, for
9572 # example, in the case of _POSIX_SOURCE, which is predefined and required
9573 # on some systems where configure will not decide to define it.
9574 cat >> conftest.vals <<\EOF
9575 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
9578 # Break up conftest.vals because some shells have a limit on
9579 # the size of here documents, and old seds have small limits too.
9581 rm -f conftest.tail
9582 while :
9584 ac_lines=`grep -c . conftest.vals`
9585 # grep -c gives empty output for an empty file on some AIX systems.
9586 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
9587 # Write a limited-size here document to conftest.frag.
9588 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
9589 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
9590 echo 'CEOF
9591 sed -f conftest.frag conftest.in > conftest.out
9592 rm -f conftest.in
9593 mv conftest.out conftest.in
9594 ' >> $CONFIG_STATUS
9595 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
9596 rm -f conftest.vals
9597 mv conftest.tail conftest.vals
9598 done
9599 rm -f conftest.vals
9601 cat >> $CONFIG_STATUS <<\EOF
9602 rm -f conftest.frag conftest.h
9603 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
9604 cat conftest.in >> conftest.h
9605 rm -f conftest.in
9606 if cmp -s $ac_file conftest.h 2>/dev/null; then
9607 echo "$ac_file is unchanged"
9608 rm -f conftest.h
9609 else
9610 # Remove last slash and all that follows it. Not all systems have dirname.
9611 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9612 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9613 # The file is in a subdirectory.
9614 test ! -d "$ac_dir" && mkdir "$ac_dir"
9616 rm -f $ac_file
9617 mv conftest.h $ac_file
9619 fi; done
9622 cat >> $CONFIG_STATUS <<EOF
9623 GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPP_NEED_TRADITIONAL="$CPP_NEED_TRADITIONAL" CPPFLAGS="$CPPFLAGS"
9625 cat >> $CONFIG_STATUS <<\EOF
9628 ### Make the necessary directories, if they don't exist.
9629 for dir in etc lisp ; do
9630 test -d ${dir} || mkdir ${dir}
9631 done
9633 # Build src/Makefile from ${srcdir}/src/Makefile.c
9634 # and lib-src/Makefile from ${srcdir}/lib-src/Makefile.c
9635 # This must be done after src/config.h is built, since we rely on that file.
9637 # Now get this: Some word that is part of the ${srcdir} directory name
9638 # or the ${configuration} value might, just might, happen to be an
9639 # identifier like `sun4' or `i386' or something, and be predefined by
9640 # the C preprocessor to some helpful value like 1, or maybe the empty
9641 # string. Needless to say consequent macro substitutions are less
9642 # than conducive to the makefile finding the correct directory.
9643 undefs="`echo $top_srcdir $configuration $canonical |
9644 sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/^/ /' -e 's/ *$//' \
9645 -e 's/ */ -U/g' -e 's/-U[0-9][^ ]*//g' \
9648 echo creating src/epaths.h
9649 ${MAKE-make} epaths-force
9651 # As of 2000-11-19, newest development versions of GNU cpp preprocess
9652 # `..' to `. .' unless invoked with -traditional
9654 if test "x$GCC" = xyes && test "x$CPP_NEED_TRADITIONAL" = xyes; then
9655 CPPFLAGS="$CPPFLAGS -traditional"
9658 echo creating lib-src/Makefile
9659 ( cd lib-src
9660 rm -f junk.c junk1.c junk2.c
9661 sed -e '/start of cpp stuff/q' \
9662 < Makefile.c > junk1.c
9663 sed -e '1,/start of cpp stuff/d'\
9664 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
9665 < Makefile.c > junk.c
9666 $CPP $undefs -I. -I$top_srcdir/src $CPPFLAGS junk.c | \
9667 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
9668 cat junk1.c junk2.c > Makefile.new
9669 rm -f junk.c junk1.c junk2.c
9670 chmod 444 Makefile.new
9671 mv -f Makefile.new Makefile
9674 echo creating src/Makefile
9675 ( cd src
9676 rm -f junk.c junk1.c junk2.c
9677 sed -e '/start of cpp stuff/q' \
9678 < Makefile.c > junk1.c
9679 sed -e '1,/start of cpp stuff/d'\
9680 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
9681 < Makefile.c > junk.c
9682 $CPP $undefs -I. -I$top_srcdir/src $CPPFLAGS junk.c | \
9683 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
9684 cat junk1.c junk2.c > Makefile.new
9685 rm -f junk.c junk1.c junk2.c
9686 chmod 444 Makefile.new
9687 mv -f Makefile.new Makefile
9690 if test ! -f src/.gdbinit && test -f $top_srcdir/src/.gdbinit; then
9691 echo creating src/.gdbinit
9692 echo source $top_srcdir/src/.gdbinit > src/.gdbinit
9695 # This is how we know whether to re-run configure in certain cases.
9696 touch src/config.stamp
9699 exit 0
9701 chmod +x $CONFIG_STATUS
9702 rm -fr confdefs* $ac_clean_files
9703 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1