21.3 not released yet
[emacs/old-mirror.git] / configure
blob995762e3dc034cf07b808cde8335af1d791e55fe
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 s390-*-linux-gnu)
1196 machine=ibms390 opsys=gnu-linux
1198 rs6000-ibm-aix3.1* | powerpc-ibm-aix3.1* )
1199 machine=ibmrs6000 opsys=aix3-1
1201 rs6000-ibm-aix3.2.5 | powerpc-ibm-aix3.2.5 )
1202 machine=ibmrs6000 opsys=aix3-2-5
1204 rs6000-ibm-aix4.1* | powerpc-ibm-aix4.1* )
1205 machine=ibmrs6000 opsys=aix4-1
1207 rs6000-ibm-aix4.2* | powerpc-ibm-aix4.2* )
1208 machine=ibmrs6000 opsys=aix4-2
1210 rs6000-ibm-aix5.1* | powerpc-ibm-aix5.1* )
1211 machine=ibmrs6000 opsys=aix4-2
1213 rs6000-ibm-aix4.0* | powerpc-ibm-aix4.0* )
1214 machine=ibmrs6000 opsys=aix4
1216 rs6000-ibm-aix4* | powerpc-ibm-aix4* )
1217 machine=ibmrs6000 opsys=aix4-1
1219 rs6000-ibm-aix* | powerpc-ibm-aix* )
1220 machine=ibmrs6000 opsys=aix3-2
1222 romp-ibm-bsd4.3* )
1223 machine=ibmrt opsys=bsd4-3
1225 romp-ibm-bsd4.2* )
1226 machine=ibmrt opsys=bsd4-2
1228 romp-ibm-aos4.3* )
1229 machine=ibmrt opsys=bsd4-3
1231 romp-ibm-aos4.2* )
1232 machine=ibmrt opsys=bsd4-2
1234 romp-ibm-aos* )
1235 machine=ibmrt opsys=bsd4-3
1237 romp-ibm-bsd* )
1238 machine=ibmrt opsys=bsd4-3
1240 romp-ibm-aix* )
1241 machine=ibmrt-aix opsys=usg5-2-2
1244 ## Integrated Solutions `Optimum V'
1245 m68*-isi-bsd4.2* )
1246 machine=isi-ov opsys=bsd4-2
1248 m68*-isi-bsd4.3* )
1249 machine=isi-ov opsys=bsd4-3
1252 ## Intel 386 machines where we do care about the manufacturer
1253 i[3456]86-intsys-sysv* )
1254 machine=is386 opsys=usg5-2-2
1257 ## Prime EXL
1258 i[3456]86-prime-sysv* )
1259 machine=i386 opsys=usg5-3
1262 ## Sequent Symmetry running Dynix
1263 i[3456]86-sequent-bsd* )
1264 machine=symmetry opsys=bsd4-3
1267 ## Sequent Symmetry running ptx 4, which is a modified SVR4.
1268 i[3456]86-sequent-ptx4* | i[3456]86-sequent-sysv4* )
1269 machine=sequent-ptx opsys=ptx4
1270 NON_GNU_CPP=/lib/cpp
1273 ## Sequent Symmetry running DYNIX/ptx
1274 ## Use the old cpp rather than the newer ANSI one.
1275 i[3456]86-sequent-ptx* )
1276 machine=sequent-ptx opsys=ptx
1277 NON_GNU_CPP="/lib/cpp"
1280 ## ncr machine running svr4.3.
1281 i[3456]86-ncr-sysv4.3 )
1282 machine=ncr386 opsys=usg5-4-3
1285 ## Unspecified sysv on an ncr machine defaults to svr4.2.
1286 ## (Plain usg5-4 doesn't turn on POSIX signals, which we need.)
1287 i[3456]86-ncr-sysv* )
1288 machine=ncr386 opsys=usg5-4-2
1291 ## Intel Paragon OSF/1
1292 i860-intel-osf1* )
1293 machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp
1296 ## Intel 860
1297 i860-*-sysv4* )
1298 machine=i860 opsys=usg5-4
1299 NON_GNU_CC="/bin/cc" # Ie, not the one in /usr/ucb/cc.
1300 NON_GNU_CPP="/usr/ccs/lib/cpp" # cc -E tokenizes macro expansion.
1303 ## Macintosh PowerPC
1304 powerpc*-*-linux-gnu* )
1305 machine=macppc opsys=gnu-linux
1308 ## Masscomp machines
1309 m68*-masscomp-rtu* )
1310 machine=masscomp opsys=rtu
1313 ## Megatest machines
1314 m68*-megatest-bsd* )
1315 machine=mega68 opsys=bsd4-2
1318 ## Workstations sold by MIPS
1319 ## This is not necessarily all workstations using the MIPS processor -
1320 ## Irises are produced by SGI, and DECstations by DEC.
1322 ## etc/MACHINES lists mips.h and mips4.h as possible machine files,
1323 ## and usg5-2-2 and bsd4-3 as possible OS files. The only guidance
1324 ## it gives for choosing between the alternatives seems to be "Use
1325 ## -machine=mips4 for RISCOS version 4; use -opsystem=bsd4-3 with
1326 ## the BSD world." I'll assume that these are instructions for
1327 ## handling two odd situations, and that every other situation
1328 ## should use mips.h and usg5-2-2, they being listed first.
1329 mips-mips-usg* )
1330 machine=mips4
1331 ## Fall through to the general code at the bottom to decide on the OS.
1333 mips-mips-riscos4* )
1334 machine=mips4 opsys=bsd4-3
1335 NON_GNU_CC="cc -systype bsd43"
1336 NON_GNU_CPP="cc -systype bsd43 -E"
1338 mips-mips-riscos5* )
1339 machine=mips4 opsys=riscos5
1340 NON_GNU_CC="cc -systype bsd43"
1341 NON_GNU_CPP="cc -systype bsd43 -E"
1343 mips-mips-bsd* )
1344 machine=mips opsys=bsd4-3
1346 mips-mips-* )
1347 machine=mips opsys=usg5-2-2
1350 ## NeXT
1351 m68*-next-* | m68k-*-nextstep* )
1352 machine=m68k opsys=nextstep
1355 ## The complete machine from National Semiconductor
1356 ns32k-ns-genix* )
1357 machine=ns32000 opsys=usg5-2
1360 ## NCR machines
1361 m68*-ncr-sysv2* | m68*-ncr-sysvr2* )
1362 machine=tower32 opsys=usg5-2-2
1364 m68*-ncr-sysv3* | m68*-ncr-sysvr3* )
1365 machine=tower32v3 opsys=usg5-3
1368 ## NEC EWS4800
1369 mips-nec-sysv4*)
1370 machine=ews4800 opsys=ux4800
1373 ## Nixdorf Targon 31
1374 m68*-nixdorf-sysv* )
1375 machine=targon31 opsys=usg5-2-2
1378 ## Nu (TI or LMI)
1379 m68*-nu-sysv* )
1380 machine=nu opsys=usg5-2
1383 ## Plexus
1384 m68*-plexus-sysv* )
1385 machine=plexus opsys=usg5-2
1388 ## PowerPC reference platform
1389 powerpcle-*-solaris2* )
1390 machine=prep
1391 opsys=sol2-5
1394 ## Pyramid machines
1395 ## I don't really have any idea what sort of processor the Pyramid has,
1396 ## so I'm assuming it is its own architecture.
1397 pyramid-pyramid-bsd* )
1398 machine=pyramid opsys=bsd4-2
1401 ## Sequent Balance
1402 ns32k-sequent-bsd4.2* )
1403 machine=sequent opsys=bsd4-2
1405 ns32k-sequent-bsd4.3* )
1406 machine=sequent opsys=bsd4-3
1409 ## Siemens Nixdorf
1410 mips-siemens-sysv* | mips-sni-sysv*)
1411 machine=mips-siemens opsys=usg5-4
1412 NON_GNU_CC=/usr/ccs/bin/cc
1413 NON_GNU_CPP=/usr/ccs/lib/cpp
1416 ## Silicon Graphics machines
1417 ## Iris 2500 and Iris 2500 Turbo (aka the Iris 3030)
1418 m68*-sgi-iris3.5* )
1419 machine=irist opsys=iris3-5
1421 m68*-sgi-iris3.6* | m68*-sgi-iris*)
1422 machine=irist opsys=iris3-6
1424 ## Iris 4D
1425 mips-sgi-irix3* )
1426 machine=iris4d opsys=irix3-3
1428 mips-sgi-irix4* )
1429 machine=iris4d opsys=irix4-0
1431 mips-sgi-irix6.5 )
1432 machine=iris4d opsys=irix6-5
1433 # Without defining _LANGUAGE_C, things get masked out in the headers
1434 # so that, for instance, grepping for `free' in stdlib.h fails and
1435 # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
1436 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
1437 NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C"
1439 mips-sgi-irix6* )
1440 machine=iris4d opsys=irix6-0
1441 # It's not clear whether -D_LANGUAGE_C is necessary as it is for 6.5,
1442 # but presumably it does no harm.
1443 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
1444 # -32 probably isn't necessary in later v.6s -- anyone know which?
1445 NON_GCC_TEST_OPTIONS=-32
1447 mips-sgi-irix5.[01]* )
1448 machine=iris4d opsys=irix5-0
1450 mips-sgi-irix5* | mips-sgi-irix* )
1451 machine=iris4d opsys=irix5-2
1454 ## SONY machines
1455 m68*-sony-bsd4.2* )
1456 machine=news opsys=bsd4-2
1458 m68*-sony-bsd4.3* )
1459 machine=news opsys=bsd4-3
1461 m68*-sony-newsos3* | m68*-sony-news3*)
1462 machine=news opsys=bsd4-3
1464 mips-sony-bsd* | mips-sony-newsos4* | mips-sony-news4*)
1465 machine=news-risc opsys=bsd4-3
1467 mips-sony-newsos6* )
1468 machine=news-r6 opsys=newsos6
1470 mips-sony-news* )
1471 machine=news-risc opsys=newsos5
1474 ## Stride
1475 m68*-stride-sysv* )
1476 machine=stride opsys=usg5-2
1479 ## Suns
1480 sparc-*-linux-gnu* | sparc64-*-linux-gnu* )
1481 machine=sparc opsys=gnu-linux
1484 *-auspex-sunos* | *-sun-sunos* | *-sun-bsd* | *-sun-solaris* \
1485 | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* | powerpc*-*-solaris2* \
1486 | rs6000-*-solaris2*)
1487 case "${canonical}" in
1488 m68*-sunos1* ) machine=sun1 ;;
1489 m68*-sunos2* ) machine=sun2 ;;
1490 m68* ) machine=sun3 ;;
1491 i[3456]86-sun-sunos[34]* ) machine=sun386 ;;
1492 i[3456]86-*-* ) machine=intel386 ;;
1493 powerpcle* ) machine=powerpcle ;;
1494 powerpc* | rs6000* ) machine=ibmrs6000 ;;
1495 sparc* ) machine=sparc ;;
1496 * ) unported=yes ;;
1497 esac
1498 case "${canonical}" in
1499 ## The Sun386 didn't get past 4.0.
1500 i[3456]86-*-sunos4 ) opsys=sunos4-0 ;;
1501 *-sunos4.0* ) opsys=sunos4-0 ;;
1502 *-sunos4.1.[3-9]*noshare )
1503 ## This name is sunos413 instead of sunos4-1-3
1504 ## to avoid a file name conflict on MSDOS.
1505 opsys=sunos413
1506 NON_GNU_CPP=/usr/lib/cpp
1507 NON_GCC_TEST_OPTIONS=-Bstatic
1508 GCC_TEST_OPTIONS=-static
1510 *-sunos4.1.[3-9]* | *-sunos4shr*)
1511 opsys=sunos4shr
1512 NON_GNU_CPP=/usr/lib/cpp
1514 *-sunos4* | *-sunos )
1515 opsys=sunos4-1
1516 NON_GCC_TEST_OPTIONS=-Bstatic
1517 GCC_TEST_OPTIONS=-static
1519 *-sunos5.3* | *-solaris2.3* )
1520 opsys=sol2-3
1521 NON_GNU_CPP=/usr/ccs/lib/cpp
1523 *-sunos5.4* | *-solaris2.4* )
1524 opsys=sol2-4
1525 NON_GNU_CPP=/usr/ccs/lib/cpp
1526 RANLIB="ar -ts"
1528 *-sunos5.5* | *-solaris2.5* )
1529 opsys=sol2-5
1530 NON_GNU_CPP=/usr/ccs/lib/cpp
1531 RANLIB="ar -ts"
1533 *-sunos5* | *-solaris* )
1534 opsys=sol2-5
1535 NON_GNU_CPP=/usr/ccs/lib/cpp
1537 * ) opsys=bsd4-2 ;;
1538 esac
1539 ## Watch out for a compiler that we know will not work.
1540 case "${canonical}" in
1541 *-solaris* | *-sunos5* )
1542 if [ "x$CC" = x/usr/ucb/cc ]; then
1543 ## /usr/ucb/cc doesn't work;
1544 ## we should find some other compiler that does work.
1545 unset CC
1548 *) ;;
1549 esac
1551 sparc-*-nextstep* )
1552 machine=sparc opsys=nextstep
1555 ## Tadpole 68k
1556 m68*-tadpole-sysv* )
1557 machine=tad68k opsys=usg5-3
1560 ## Tahoe machines
1561 tahoe-tahoe-bsd4.2* )
1562 machine=tahoe opsys=bsd4-2
1564 tahoe-tahoe-bsd4.3* )
1565 machine=tahoe opsys=bsd4-3
1568 ## Tandem Integrity S2
1569 mips-tandem-sysv* )
1570 machine=tandem-s2 opsys=usg5-3
1573 ## Tektronix XD88
1574 m88k-tektronix-sysv3* )
1575 machine=tekxd88 opsys=usg5-3
1578 ## Tektronix 16000 box (6130?)
1579 ns16k-tektronix-bsd* )
1580 machine=ns16000 opsys=bsd4-2
1582 ## Tektronix 4300
1583 ## src/m/tek4300.h hints that this is a m68k machine.
1584 m68*-tektronix-bsd* )
1585 machine=tek4300 opsys=bsd4-3
1588 ## Titan P2 or P3
1589 ## We seem to have lost the machine-description file titan.h!
1590 titan-titan-sysv* )
1591 machine=titan opsys=usg5-3
1594 ## Ustation E30 (SS5E)
1595 m68*-unisys-uniplus* )
1596 machine=ustation opsystem=unipl5-2
1599 ## Vaxen.
1600 vax-dec-* )
1601 machine=vax
1602 case "${canonical}" in
1603 *-bsd4.1* ) opsys=bsd4-1 ;;
1604 *-bsd4.2* | *-ultrix[0-3].* | *-ultrix4.0* ) opsys=bsd4-2 ;;
1605 *-bsd4.3* | *-ultrix* ) opsys=bsd4-3 ;;
1606 *-sysv[01]* | *-sysvr[01]* ) opsys=usg5-0 ;;
1607 *-sysv2* | *-sysvr2* ) opsys=usg5-2 ;;
1608 *-vms* ) opsys=vms ;;
1609 * ) unported=yes
1610 esac
1613 ## Whitechapel MG1
1614 ns16k-whitechapel-* )
1615 machine=mg1
1616 ## We don't know what sort of OS runs on these; we'll let the
1617 ## operating system guessing code below try.
1620 ## Wicat
1621 m68*-wicat-sysv* )
1622 machine=wicat opsys=usg5-2
1625 ## IA-64
1626 ia64*-*-linux* )
1627 machine=ia64 opsys=gnu-linux
1630 ## Intel 386 machines where we don't care about the manufacturer
1631 i[3456]86-*-* )
1632 machine=intel386
1633 case "${canonical}" in
1634 *-lynxos* ) opsys=lynxos ;;
1635 *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
1636 *-isc2.2* ) opsys=isc2-2 ;;
1637 *-isc4.0* ) opsys=isc4-0 ;;
1638 *-isc4.* ) opsys=isc4-1
1639 GCC_TEST_OPTIONS=-posix
1640 NON_GCC_TEST_OPTIONS=-Xp
1642 *-isc* ) opsys=isc3-0 ;;
1643 *-esix5* ) opsys=esix5r4; NON_GNU_CPP=/usr/lib/cpp ;;
1644 *-esix* ) opsys=esix ;;
1645 *-xenix* ) opsys=xenix ;;
1646 *-linux-gnu* ) opsys=gnu-linux ;;
1647 *-sco3.2v4* ) opsys=sco4 ; NON_GNU_CPP=/lib/cpp ;;
1648 *-sco3.2v5* ) opsys=sco5
1649 NON_GNU_CPP=/lib/cpp
1650 # Prevent -belf from being passed to $CPP.
1651 # /lib/cpp does not accept it.
1652 OVERRIDE_CPPFLAGS=" "
1654 *-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
1655 *-386bsd* ) opsys=386bsd ;;
1656 *-freebsd* ) opsys=freebsd ;;
1657 *-nextstep* ) opsys=nextstep ;;
1658 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
1659 esac
1662 ## m68k Linux-based GNU system
1663 m68k-*-linux-gnu* )
1664 machine=m68k opsys=gnu-linux
1667 ## Mips Linux-based GNU system
1668 mips-*-linux-gnu* | mipsel-*-linux-gnu* )
1669 machine=mips opsys=gnu-linux
1672 ## UXP/DS
1673 sparc-fujitsu-sysv4* )
1674 machine=sparc opsys=uxpds
1675 NON_GNU_CPP=/usr/ccs/lib/cpp
1676 RANLIB="ar -ts"
1679 ## UXP/V
1680 f301-fujitsu-uxpv4.1)
1681 machine=f301 opsys=uxpv
1685 unported=yes
1687 esac
1689 ### If the code above didn't choose an operating system, just choose
1690 ### an operating system based on the configuration name. You really
1691 ### only want to use this when you have no idea what the right
1692 ### operating system is; if you know what operating systems a machine
1693 ### runs, it's cleaner to make it explicit in the case statement
1694 ### above.
1695 if test x"${opsys}" = x; then
1696 case "${canonical}" in
1697 *-gnu* ) opsys=gnu ;;
1698 *-bsd4.[01] ) opsys=bsd4-1 ;;
1699 *-bsd4.2 ) opsys=bsd4-2 ;;
1700 *-bsd4.3 ) opsys=bsd4-3 ;;
1701 *-sysv0 | *-sysvr0 ) opsys=usg5-0 ;;
1702 *-sysv2 | *-sysvr2 ) opsys=usg5-2 ;;
1703 *-sysv2.2 | *-sysvr2.2 ) opsys=usg5-2-2 ;;
1704 *-sysv3* | *-sysvr3* ) opsys=usg5-3 ;;
1705 *-sysv4.2uw* ) opsys=unixware ;;
1706 *-sysv4.1* | *-sysvr4.1* )
1707 NON_GNU_CPP=/usr/lib/cpp
1708 opsys=usg5-4 ;;
1709 *-sysv4.[2-9]* | *-sysvr4.[2-9]* )
1710 if [ x$NON_GNU_CPP = x ]; then
1711 if [ -f /usr/ccs/lib/cpp ]; then
1712 NON_GNU_CPP=/usr/ccs/lib/cpp
1713 else
1714 NON_GNU_CPP=/lib/cpp
1717 opsys=usg5-4-2 ;;
1718 *-sysv4* | *-sysvr4* ) opsys=usg5-4 ;;
1720 unported=yes
1722 esac
1726 if test $unported = yes; then
1727 { echo "configure: error: Emacs hasn't been ported to \`${canonical}' systems.
1728 Check \`etc/MACHINES' for recognized configuration names." 1>&2; exit 1; }
1731 machfile="m/${machine}.h"
1732 opsysfile="s/${opsys}.h"
1735 #### Choose a compiler.
1736 test -n "$CC" && cc_specified=yes
1738 # Save the value of CFLAGS that the user specified.
1739 SPECIFIED_CFLAGS="$CFLAGS"
1741 case ${with_gcc} in
1742 "yes" ) CC="gcc" GCC=yes ;;
1743 "no" ) : ${CC=cc} ;;
1744 * ) # Extract the first word of "gcc", so it can be a program name with args.
1745 set dummy gcc; ac_word=$2
1746 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1747 echo "configure:1748: checking for $ac_word" >&5
1748 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1749 echo $ac_n "(cached) $ac_c" 1>&6
1750 else
1751 if test -n "$CC"; then
1752 ac_cv_prog_CC="$CC" # Let the user override the test.
1753 else
1754 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1755 ac_dummy="$PATH"
1756 for ac_dir in $ac_dummy; do
1757 test -z "$ac_dir" && ac_dir=.
1758 if test -f $ac_dir/$ac_word; then
1759 ac_cv_prog_CC="gcc"
1760 break
1762 done
1763 IFS="$ac_save_ifs"
1766 CC="$ac_cv_prog_CC"
1767 if test -n "$CC"; then
1768 echo "$ac_t""$CC" 1>&6
1769 else
1770 echo "$ac_t""no" 1>&6
1773 if test -z "$CC"; then
1774 # Extract the first word of "cc", so it can be a program name with args.
1775 set dummy cc; ac_word=$2
1776 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1777 echo "configure:1778: checking for $ac_word" >&5
1778 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1779 echo $ac_n "(cached) $ac_c" 1>&6
1780 else
1781 if test -n "$CC"; then
1782 ac_cv_prog_CC="$CC" # Let the user override the test.
1783 else
1784 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1785 ac_prog_rejected=no
1786 ac_dummy="$PATH"
1787 for ac_dir in $ac_dummy; do
1788 test -z "$ac_dir" && ac_dir=.
1789 if test -f $ac_dir/$ac_word; then
1790 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1791 ac_prog_rejected=yes
1792 continue
1794 ac_cv_prog_CC="cc"
1795 break
1797 done
1798 IFS="$ac_save_ifs"
1799 if test $ac_prog_rejected = yes; then
1800 # We found a bogon in the path, so make sure we never use it.
1801 set dummy $ac_cv_prog_CC
1802 shift
1803 if test $# -gt 0; then
1804 # We chose a different compiler from the bogus one.
1805 # However, it has the same basename, so the bogon will be chosen
1806 # first if we set CC to just the basename; use the full file name.
1807 shift
1808 set dummy "$ac_dir/$ac_word" "$@"
1809 shift
1810 ac_cv_prog_CC="$@"
1815 CC="$ac_cv_prog_CC"
1816 if test -n "$CC"; then
1817 echo "$ac_t""$CC" 1>&6
1818 else
1819 echo "$ac_t""no" 1>&6
1822 if test -z "$CC"; then
1823 case "`uname -s`" in
1824 *win32* | *WIN32*)
1825 # Extract the first word of "cl", so it can be a program name with args.
1826 set dummy cl; ac_word=$2
1827 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1828 echo "configure:1829: checking for $ac_word" >&5
1829 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1830 echo $ac_n "(cached) $ac_c" 1>&6
1831 else
1832 if test -n "$CC"; then
1833 ac_cv_prog_CC="$CC" # Let the user override the test.
1834 else
1835 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1836 ac_dummy="$PATH"
1837 for ac_dir in $ac_dummy; do
1838 test -z "$ac_dir" && ac_dir=.
1839 if test -f $ac_dir/$ac_word; then
1840 ac_cv_prog_CC="cl"
1841 break
1843 done
1844 IFS="$ac_save_ifs"
1847 CC="$ac_cv_prog_CC"
1848 if test -n "$CC"; then
1849 echo "$ac_t""$CC" 1>&6
1850 else
1851 echo "$ac_t""no" 1>&6
1854 esac
1856 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1859 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1860 echo "configure:1861: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1862 ac_ext=c
1863 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1864 ac_cpp='$CPP $CPPFLAGS'
1865 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1866 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1867 cross_compiling=$ac_cv_prog_cc_cross
1869 cat > conftest.$ac_ext << EOF
1871 #line 1872 "configure"
1872 #include "confdefs.h"
1874 main(){return(0);}
1876 if { (eval echo configure:1877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1877 ac_cv_prog_cc_works=yes
1878 # If we can't run a trivial program, we are probably using a cross compiler.
1879 if (./conftest; exit) 2>/dev/null; then
1880 ac_cv_prog_cc_cross=no
1881 else
1882 ac_cv_prog_cc_cross=yes
1884 else
1885 echo "configure: failed program was:" >&5
1886 cat conftest.$ac_ext >&5
1887 ac_cv_prog_cc_works=no
1889 rm -fr conftest*
1890 ac_ext=c
1891 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1892 ac_cpp='$CPP $CPPFLAGS'
1893 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1894 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1895 cross_compiling=$ac_cv_prog_cc_cross
1897 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1898 if test $ac_cv_prog_cc_works = no; then
1899 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1901 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1902 echo "configure:1903: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1903 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1904 cross_compiling=$ac_cv_prog_cc_cross
1906 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1907 echo "configure:1908: checking whether we are using GNU C" >&5
1908 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1909 echo $ac_n "(cached) $ac_c" 1>&6
1910 else
1911 cat > conftest.c <<EOF
1912 #ifdef __GNUC__
1913 yes;
1914 #endif
1916 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1917: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1917 ac_cv_prog_gcc=yes
1918 else
1919 ac_cv_prog_gcc=no
1923 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1925 if test $ac_cv_prog_gcc = yes; then
1926 GCC=yes
1927 else
1928 GCC=
1931 ac_test_CFLAGS="${CFLAGS+set}"
1932 ac_save_CFLAGS="$CFLAGS"
1933 CFLAGS=
1934 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1935 echo "configure:1936: checking whether ${CC-cc} accepts -g" >&5
1936 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1937 echo $ac_n "(cached) $ac_c" 1>&6
1938 else
1939 echo 'void f(){}' > conftest.c
1940 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1941 ac_cv_prog_cc_g=yes
1942 else
1943 ac_cv_prog_cc_g=no
1945 rm -f conftest*
1949 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1950 if test "$ac_test_CFLAGS" = set; then
1951 CFLAGS="$ac_save_CFLAGS"
1952 elif test $ac_cv_prog_cc_g = yes; then
1953 if test "$GCC" = yes; then
1954 CFLAGS="-g -O2"
1955 else
1956 CFLAGS="-g"
1958 else
1959 if test "$GCC" = yes; then
1960 CFLAGS="-O2"
1961 else
1962 CFLAGS=
1966 esac
1968 # On Suns, sometimes $CPP names a directory.
1969 if test -n "$CPP" && test -d "$CPP"; then
1970 CPP=
1973 #### Some systems specify a CPP to use unless we are using GCC.
1974 #### Now that we know whether we are using GCC, we can decide whether
1975 #### to use that one.
1976 if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x
1977 then
1978 CPP="$NON_GNU_CPP"
1981 #### Some systems specify a CC to use unless we are using GCC.
1982 #### Now that we know whether we are using GCC, we can decide whether
1983 #### to use that one.
1984 if test "x$NON_GNU_CC" != x && test x$GCC != xyes &&
1985 test x$cc_specified != xyes
1986 then
1987 CC="$NON_GNU_CC"
1990 if test x$GCC = xyes && test "x$GCC_TEST_OPTIONS" != x
1991 then
1992 CC="$CC $GCC_TEST_OPTIONS"
1995 if test x$GCC = x && test "x$NON_GCC_TEST_OPTIONS" != x
1996 then
1997 CC="$CC $NON_GCC_TEST_OPTIONS"
2000 if test x$GCC = xyes && test "x$GCC_LINK_TEST_OPTIONS" != x
2001 then
2002 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
2005 if test x$GCC = x && test "x$NON_GCC_LINK_TEST_OPTIONS" != x
2006 then
2007 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
2010 #### Some other nice autoconf tests. If you add a test here which
2011 #### should make an entry in src/config.h, don't forget to add an
2012 #### #undef clause to src/config.h.in for autoconf to modify.
2014 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2015 echo "configure:2016: checking whether ln -s works" >&5
2016 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
2017 echo $ac_n "(cached) $ac_c" 1>&6
2018 else
2019 rm -f conftestdata
2020 if ln -s X conftestdata 2>/dev/null
2021 then
2022 rm -f conftestdata
2023 ac_cv_prog_LN_S="ln -s"
2024 else
2025 ac_cv_prog_LN_S=ln
2028 LN_S="$ac_cv_prog_LN_S"
2029 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2030 echo "$ac_t""yes" 1>&6
2031 else
2032 echo "$ac_t""no" 1>&6
2035 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2036 echo "configure:2037: checking how to run the C preprocessor" >&5
2037 # On Suns, sometimes $CPP names a directory.
2038 if test -n "$CPP" && test -d "$CPP"; then
2039 CPP=
2041 if test -z "$CPP"; then
2042 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
2043 echo $ac_n "(cached) $ac_c" 1>&6
2044 else
2045 # This must be in double quotes, not single quotes, because CPP may get
2046 # substituted into the Makefile and "${CC-cc}" will confuse make.
2047 CPP="${CC-cc} -E"
2048 # On the NeXT, cc -E runs the code through the compiler's parser,
2049 # not just through cpp.
2050 cat > conftest.$ac_ext <<EOF
2051 #line 2052 "configure"
2052 #include "confdefs.h"
2053 #include <assert.h>
2054 Syntax Error
2056 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2057 { (eval echo configure:2058: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2058 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2059 if test -z "$ac_err"; then
2061 else
2062 echo "$ac_err" >&5
2063 echo "configure: failed program was:" >&5
2064 cat conftest.$ac_ext >&5
2065 rm -rf conftest*
2066 CPP="${CC-cc} -E -traditional-cpp"
2067 cat > conftest.$ac_ext <<EOF
2068 #line 2069 "configure"
2069 #include "confdefs.h"
2070 #include <assert.h>
2071 Syntax Error
2073 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2074 { (eval echo configure:2075: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2075 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2076 if test -z "$ac_err"; then
2078 else
2079 echo "$ac_err" >&5
2080 echo "configure: failed program was:" >&5
2081 cat conftest.$ac_ext >&5
2082 rm -rf conftest*
2083 CPP="${CC-cc} -nologo -E"
2084 cat > conftest.$ac_ext <<EOF
2085 #line 2086 "configure"
2086 #include "confdefs.h"
2087 #include <assert.h>
2088 Syntax Error
2090 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2091 { (eval echo configure:2092: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2092 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2093 if test -z "$ac_err"; then
2095 else
2096 echo "$ac_err" >&5
2097 echo "configure: failed program was:" >&5
2098 cat conftest.$ac_ext >&5
2099 rm -rf conftest*
2100 CPP=/lib/cpp
2102 rm -f conftest*
2104 rm -f conftest*
2106 rm -f conftest*
2107 ac_cv_prog_CPP="$CPP"
2109 CPP="$ac_cv_prog_CPP"
2110 else
2111 ac_cv_prog_CPP="$CPP"
2113 echo "$ac_t""$CPP" 1>&6
2115 # Find a good install program. We prefer a C program (faster),
2116 # so one script is as good as another. But avoid the broken or
2117 # incompatible versions:
2118 # SysV /etc/install, /usr/sbin/install
2119 # SunOS /usr/etc/install
2120 # IRIX /sbin/install
2121 # AIX /bin/install
2122 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2123 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2124 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2125 # ./install, which can be erroneously created by make from ./install.sh.
2126 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2127 echo "configure:2128: checking for a BSD compatible install" >&5
2128 if test -z "$INSTALL"; then
2129 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
2130 echo $ac_n "(cached) $ac_c" 1>&6
2131 else
2132 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
2133 for ac_dir in $PATH; do
2134 # Account for people who put trailing slashes in PATH elements.
2135 case "$ac_dir/" in
2136 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2138 # OSF1 and SCO ODT 3.0 have their own names for install.
2139 # Don't use installbsd from OSF since it installs stuff as root
2140 # by default.
2141 for ac_prog in ginstall scoinst install; do
2142 if test -f $ac_dir/$ac_prog; then
2143 if test $ac_prog = install &&
2144 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2145 # AIX install. It has an incompatible calling convention.
2147 else
2148 ac_cv_path_install="$ac_dir/$ac_prog -c"
2149 break 2
2152 done
2154 esac
2155 done
2156 IFS="$ac_save_IFS"
2159 if test "${ac_cv_path_install+set}" = set; then
2160 INSTALL="$ac_cv_path_install"
2161 else
2162 # As a last resort, use the slow shell script. We don't cache a
2163 # path for INSTALL within a source directory, because that will
2164 # break other packages using the cache if that directory is
2165 # removed, or if the path is relative.
2166 INSTALL="$ac_install_sh"
2169 echo "$ac_t""$INSTALL" 1>&6
2171 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2172 # It thinks the first close brace ends the variable substitution.
2173 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2175 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
2177 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2179 for ac_prog in 'bison -y' byacc
2181 # Extract the first word of "$ac_prog", so it can be a program name with args.
2182 set dummy $ac_prog; ac_word=$2
2183 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2184 echo "configure:2185: checking for $ac_word" >&5
2185 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
2186 echo $ac_n "(cached) $ac_c" 1>&6
2187 else
2188 if test -n "$YACC"; then
2189 ac_cv_prog_YACC="$YACC" # Let the user override the test.
2190 else
2191 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2192 ac_dummy="$PATH"
2193 for ac_dir in $ac_dummy; do
2194 test -z "$ac_dir" && ac_dir=.
2195 if test -f $ac_dir/$ac_word; then
2196 ac_cv_prog_YACC="$ac_prog"
2197 break
2199 done
2200 IFS="$ac_save_ifs"
2203 YACC="$ac_cv_prog_YACC"
2204 if test -n "$YACC"; then
2205 echo "$ac_t""$YACC" 1>&6
2206 else
2207 echo "$ac_t""no" 1>&6
2210 test -n "$YACC" && break
2211 done
2212 test -n "$YACC" || YACC="yacc"
2214 if test "x$RANLIB" = x; then
2215 # Extract the first word of "ranlib", so it can be a program name with args.
2216 set dummy ranlib; ac_word=$2
2217 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2218 echo "configure:2219: checking for $ac_word" >&5
2219 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2220 echo $ac_n "(cached) $ac_c" 1>&6
2221 else
2222 if test -n "$RANLIB"; then
2223 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2224 else
2225 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2226 ac_dummy="$PATH"
2227 for ac_dir in $ac_dummy; do
2228 test -z "$ac_dir" && ac_dir=.
2229 if test -f $ac_dir/$ac_word; then
2230 ac_cv_prog_RANLIB="ranlib"
2231 break
2233 done
2234 IFS="$ac_save_ifs"
2235 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2238 RANLIB="$ac_cv_prog_RANLIB"
2239 if test -n "$RANLIB"; then
2240 echo "$ac_t""$RANLIB" 1>&6
2241 else
2242 echo "$ac_t""no" 1>&6
2247 echo $ac_n "checking for AIX""... $ac_c" 1>&6
2248 echo "configure:2249: checking for AIX" >&5
2249 cat > conftest.$ac_ext <<EOF
2250 #line 2251 "configure"
2251 #include "confdefs.h"
2252 #ifdef _AIX
2254 #endif
2257 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2258 egrep "yes" >/dev/null 2>&1; then
2259 rm -rf conftest*
2260 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
2261 #define _ALL_SOURCE 1
2264 else
2265 rm -rf conftest*
2266 echo "$ac_t""no" 1>&6
2268 rm -f conftest*
2272 #### Extract some information from the operating system and machine files.
2274 echo "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" 1>&6
2277 echo "configure:2278: checking the machine- and system-dependent files to find out
2278 - which libraries the lib-src programs will want, and
2279 - whether the GNU malloc routines are usable" >&5
2281 ### First figure out CFLAGS (which we use for running the compiler here)
2282 ### and REAL_CFLAGS (which we use for real compilation).
2283 ### The two are the same except on a few systems, where they are made
2284 ### different to work around various lossages. For example,
2285 ### GCC 2.5 on GNU/Linux needs them to be different because it treats -g
2286 ### as implying static linking.
2288 ### If the CFLAGS env var is specified, we use that value
2289 ### instead of the default.
2291 ### It's not important that this name contain the PID; you can't run
2292 ### two configures in the same directory and have anything work
2293 ### anyway.
2294 tempcname="conftest.c"
2296 echo '
2297 #include "'${srcdir}'/src/'${opsysfile}'"
2298 #include "'${srcdir}'/src/'${machfile}'"
2299 #ifndef LIBS_MACHINE
2300 #define LIBS_MACHINE
2301 #endif
2302 #ifndef LIBS_SYSTEM
2303 #define LIBS_SYSTEM
2304 #endif
2305 #ifndef C_SWITCH_SYSTEM
2306 #define C_SWITCH_SYSTEM
2307 #endif
2308 #ifndef C_SWITCH_MACHINE
2309 #define C_SWITCH_MACHINE
2310 #endif
2311 configure___ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM
2312 configure___ c_switch_system=C_SWITCH_SYSTEM
2313 configure___ c_switch_machine=C_SWITCH_MACHINE
2315 #ifndef LIB_X11_LIB
2316 #define LIB_X11_LIB -lX11
2317 #endif
2319 #ifndef LIBX11_MACHINE
2320 #define LIBX11_MACHINE
2321 #endif
2323 #ifndef LIBX11_SYSTEM
2324 #define LIBX11_SYSTEM
2325 #endif
2326 configure___ LIBX=LIB_X11_LIB LIBX11_MACHINE LIBX11_SYSTEM
2328 #ifdef UNEXEC
2329 configure___ unexec=UNEXEC
2330 #else
2331 configure___ unexec=unexec.o
2332 #endif
2334 #ifdef SYSTEM_MALLOC
2335 configure___ system_malloc=yes
2336 #else
2337 configure___ system_malloc=no
2338 #endif
2340 #ifdef USE_MMAP_FOR_BUFFERS
2341 configure___ use_mmap_for_buffers=yes
2342 #else
2343 configure___ use_mmap_for_buffers=no
2344 #endif
2346 #ifndef C_DEBUG_SWITCH
2347 #define C_DEBUG_SWITCH -g
2348 #endif
2350 #ifndef C_OPTIMIZE_SWITCH
2351 #ifdef __GNUC__
2352 #define C_OPTIMIZE_SWITCH -O2
2353 #else
2354 #define C_OPTIMIZE_SWITCH -O
2355 #endif
2356 #endif
2358 #ifndef LD_SWITCH_MACHINE
2359 #define LD_SWITCH_MACHINE
2360 #endif
2362 #ifndef LD_SWITCH_SYSTEM
2363 #define LD_SWITCH_SYSTEM
2364 #endif
2366 #ifndef LD_SWITCH_X_SITE_AUX
2367 #define LD_SWITCH_X_SITE_AUX
2368 #endif
2370 configure___ ld_switch_system=LD_SWITCH_SYSTEM
2371 configure___ ld_switch_machine=LD_SWITCH_MACHINE
2373 #ifdef THIS_IS_CONFIGURE
2375 /* Get the CFLAGS for tests in configure. */
2376 #ifdef __GNUC__
2377 configure___ CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
2378 #else
2379 configure___ CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
2380 #endif
2382 #else /* not THIS_IS_CONFIGURE */
2384 /* Get the CFLAGS for real compilation. */
2385 #ifdef __GNUC__
2386 configure___ REAL_CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
2387 #else
2388 configure___ REAL_CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
2389 #endif
2391 #endif /* not THIS_IS_CONFIGURE */
2392 ' > ${tempcname}
2394 # The value of CPP is a quoted variable reference, so we need to do this
2395 # to get its actual value...
2396 CPP=`eval "echo $CPP"`
2397 eval `${CPP} -Isrc ${tempcname} \
2398 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
2399 if test "x$SPECIFIED_CFLAGS" = x; then
2400 eval `${CPP} -Isrc -DTHIS_IS_CONFIGURE ${tempcname} \
2401 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
2402 else
2403 REAL_CFLAGS="$CFLAGS"
2405 rm ${tempcname}
2407 ac_link="$ac_link $ld_switch_machine $ld_switch_system"
2409 ### Make sure subsequent tests use flags consistent with the build flags.
2411 if test x"${OVERRIDE_CPPFLAGS}" != x; then
2412 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
2413 else
2414 CPPFLAGS="$c_switch_system $c_switch_machine $CPPFLAGS"
2418 # Check whether --enable-largefile or --disable-largefile was given.
2419 if test "${enable_largefile+set}" = set; then
2420 enableval="$enable_largefile"
2424 if test "$enable_largefile" != no; then
2426 echo $ac_n "checking for special C compiler options needed for large files""... $ac_c" 1>&6
2427 echo "configure:2428: checking for special C compiler options needed for large files" >&5
2428 if eval "test \"`echo '$''{'ac_cv_sys_largefile_CC'+set}'`\" = set"; then
2429 echo $ac_n "(cached) $ac_c" 1>&6
2430 else
2431 ac_cv_sys_largefile_CC=no
2432 if test "$GCC" != yes; then
2433 # IRIX 6.2 and later do not support large files by default,
2434 # so use the C compiler's -n32 option if that helps.
2435 cat > conftest.$ac_ext <<EOF
2436 #line 2437 "configure"
2437 #include "confdefs.h"
2438 #include <sys/types.h>
2439 int a[(off_t) 9223372036854775807 == 9223372036854775807 ? 1 : -1];
2441 int main() {
2443 ; return 0; }
2445 if { (eval echo configure:2446: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2447 else
2448 echo "configure: failed program was:" >&5
2449 cat conftest.$ac_ext >&5
2450 rm -rf conftest*
2451 ac_save_CC="$CC"
2452 CC="$CC -n32"
2453 cat > conftest.$ac_ext <<EOF
2454 #line 2455 "configure"
2455 #include "confdefs.h"
2456 #include <sys/types.h>
2457 int a[(off_t) 9223372036854775807 == 9223372036854775807 ? 1 : -1];
2459 int main() {
2461 ; return 0; }
2463 if { (eval echo configure:2464: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2464 rm -rf conftest*
2465 ac_cv_sys_largefile_CC=' -n32'
2466 else
2467 echo "configure: failed program was:" >&5
2468 cat conftest.$ac_ext >&5
2470 rm -f conftest*
2471 CC="$ac_save_CC"
2473 rm -f conftest*
2477 echo "$ac_t""$ac_cv_sys_largefile_CC" 1>&6
2478 if test "$ac_cv_sys_largefile_CC" != no; then
2479 CC="$CC$ac_cv_sys_largefile_CC"
2482 echo $ac_n "checking for _FILE_OFFSET_BITS value needed for large files""... $ac_c" 1>&6
2483 echo "configure:2484: checking for _FILE_OFFSET_BITS value needed for large files" >&5
2484 if eval "test \"`echo '$''{'ac_cv_sys_file_offset_bits'+set}'`\" = set"; then
2485 echo $ac_n "(cached) $ac_c" 1>&6
2486 else
2487 ac_cv_sys_file_offset_bits=no
2488 cat > conftest.$ac_ext <<EOF
2489 #line 2490 "configure"
2490 #include "confdefs.h"
2491 #include <sys/types.h>
2492 int a[(off_t) 9223372036854775807 == 9223372036854775807 ? 1 : -1];
2494 int main() {
2496 ; return 0; }
2498 if { (eval echo configure:2499: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2500 else
2501 echo "configure: failed program was:" >&5
2502 cat conftest.$ac_ext >&5
2503 rm -rf conftest*
2504 cat > conftest.$ac_ext <<EOF
2505 #line 2506 "configure"
2506 #include "confdefs.h"
2507 #define _FILE_OFFSET_BITS 64
2508 #include <sys/types.h>
2509 int a[(off_t) 9223372036854775807 == 9223372036854775807 ? 1 : -1];
2512 int main() {
2514 ; return 0; }
2516 if { (eval echo configure:2517: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2517 rm -rf conftest*
2518 ac_cv_sys_file_offset_bits=64
2519 else
2520 echo "configure: failed program was:" >&5
2521 cat conftest.$ac_ext >&5
2523 rm -f conftest*
2525 rm -f conftest*
2528 echo "$ac_t""$ac_cv_sys_file_offset_bits" 1>&6
2529 if test "$ac_cv_sys_file_offset_bits" != no; then
2530 cat >> confdefs.h <<EOF
2531 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
2535 echo $ac_n "checking for _LARGE_FILES value needed for large files""... $ac_c" 1>&6
2536 echo "configure:2537: checking for _LARGE_FILES value needed for large files" >&5
2537 if eval "test \"`echo '$''{'ac_cv_sys_large_files'+set}'`\" = set"; then
2538 echo $ac_n "(cached) $ac_c" 1>&6
2539 else
2540 ac_cv_sys_large_files=no
2541 cat > conftest.$ac_ext <<EOF
2542 #line 2543 "configure"
2543 #include "confdefs.h"
2545 int main() {
2547 ; return 0; }
2549 if { (eval echo configure:2550: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2551 else
2552 echo "configure: failed program was:" >&5
2553 cat conftest.$ac_ext >&5
2554 rm -rf conftest*
2555 cat > conftest.$ac_ext <<EOF
2556 #line 2557 "configure"
2557 #include "confdefs.h"
2558 #define _LARGE_FILES 1
2561 int main() {
2563 ; return 0; }
2565 if { (eval echo configure:2566: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2566 rm -rf conftest*
2567 ac_cv_sys_large_files=1
2568 else
2569 echo "configure: failed program was:" >&5
2570 cat conftest.$ac_ext >&5
2572 rm -f conftest*
2574 rm -f conftest*
2577 echo "$ac_t""$ac_cv_sys_large_files" 1>&6
2578 if test "$ac_cv_sys_large_files" != no; then
2579 cat >> confdefs.h <<EOF
2580 #define _LARGE_FILES $ac_cv_sys_large_files
2587 # Sound support for GNU/Linux and the free BSDs.
2588 for ac_hdr in machine/soundcard.h sys/soundcard.h soundcard.h
2590 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2591 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2592 echo "configure:2593: checking for $ac_hdr" >&5
2593 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2594 echo $ac_n "(cached) $ac_c" 1>&6
2595 else
2596 cat > conftest.$ac_ext <<EOF
2597 #line 2598 "configure"
2598 #include "confdefs.h"
2599 #include <$ac_hdr>
2601 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2602 { (eval echo configure:2603: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2603 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2604 if test -z "$ac_err"; then
2605 rm -rf conftest*
2606 eval "ac_cv_header_$ac_safe=yes"
2607 else
2608 echo "$ac_err" >&5
2609 echo "configure: failed program was:" >&5
2610 cat conftest.$ac_ext >&5
2611 rm -rf conftest*
2612 eval "ac_cv_header_$ac_safe=no"
2614 rm -f conftest*
2616 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2617 echo "$ac_t""yes" 1>&6
2618 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2619 cat >> confdefs.h <<EOF
2620 #define $ac_tr_hdr 1
2623 else
2624 echo "$ac_t""no" 1>&6
2626 done
2628 # Emulation library used on NetBSD.
2629 echo $ac_n "checking for _oss_ioctl in -lossaudio""... $ac_c" 1>&6
2630 echo "configure:2631: checking for _oss_ioctl in -lossaudio" >&5
2631 ac_lib_var=`echo ossaudio'_'_oss_ioctl | sed 'y%./+-%__p_%'`
2632 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2633 echo $ac_n "(cached) $ac_c" 1>&6
2634 else
2635 ac_save_LIBS="$LIBS"
2636 LIBS="-lossaudio $LIBS"
2637 cat > conftest.$ac_ext <<EOF
2638 #line 2639 "configure"
2639 #include "confdefs.h"
2640 /* Override any gcc2 internal prototype to avoid an error. */
2641 /* We use char because int might match the return type of a gcc2
2642 builtin and then its argument prototype would still apply. */
2643 char _oss_ioctl();
2645 int main() {
2646 _oss_ioctl()
2647 ; return 0; }
2649 if { (eval echo configure:2650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2650 rm -rf conftest*
2651 eval "ac_cv_lib_$ac_lib_var=yes"
2652 else
2653 echo "configure: failed program was:" >&5
2654 cat conftest.$ac_ext >&5
2655 rm -rf conftest*
2656 eval "ac_cv_lib_$ac_lib_var=no"
2658 rm -f conftest*
2659 LIBS="$ac_save_LIBS"
2662 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2663 echo "$ac_t""yes" 1>&6
2664 LIBSOUND=-lossaudio
2665 else
2666 echo "$ac_t""no" 1>&6
2667 LIBSOUND=
2672 for ac_hdr in sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \
2673 linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \
2674 termcap.h stdio_ext.h fcntl.h term.h strings.h
2676 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2677 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2678 echo "configure:2679: checking for $ac_hdr" >&5
2679 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2680 echo $ac_n "(cached) $ac_c" 1>&6
2681 else
2682 cat > conftest.$ac_ext <<EOF
2683 #line 2684 "configure"
2684 #include "confdefs.h"
2685 #include <$ac_hdr>
2687 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2688 { (eval echo configure:2689: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2689 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2690 if test -z "$ac_err"; then
2691 rm -rf conftest*
2692 eval "ac_cv_header_$ac_safe=yes"
2693 else
2694 echo "$ac_err" >&5
2695 echo "configure: failed program was:" >&5
2696 cat conftest.$ac_ext >&5
2697 rm -rf conftest*
2698 eval "ac_cv_header_$ac_safe=no"
2700 rm -f conftest*
2702 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2703 echo "$ac_t""yes" 1>&6
2704 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2705 cat >> confdefs.h <<EOF
2706 #define $ac_tr_hdr 1
2709 else
2710 echo "$ac_t""no" 1>&6
2712 done
2714 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
2715 echo "configure:2716: checking for ANSI C header files" >&5
2716 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2717 echo $ac_n "(cached) $ac_c" 1>&6
2718 else
2719 cat > conftest.$ac_ext <<EOF
2720 #line 2721 "configure"
2721 #include "confdefs.h"
2722 #include <stdlib.h>
2723 #include <stdarg.h>
2724 #include <string.h>
2725 #include <float.h>
2727 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2728 { (eval echo configure:2729: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2729 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2730 if test -z "$ac_err"; then
2731 rm -rf conftest*
2732 ac_cv_header_stdc=yes
2733 else
2734 echo "$ac_err" >&5
2735 echo "configure: failed program was:" >&5
2736 cat conftest.$ac_ext >&5
2737 rm -rf conftest*
2738 ac_cv_header_stdc=no
2740 rm -f conftest*
2742 if test $ac_cv_header_stdc = yes; then
2743 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2744 cat > conftest.$ac_ext <<EOF
2745 #line 2746 "configure"
2746 #include "confdefs.h"
2747 #include <string.h>
2749 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2750 egrep "memchr" >/dev/null 2>&1; then
2752 else
2753 rm -rf conftest*
2754 ac_cv_header_stdc=no
2756 rm -f conftest*
2760 if test $ac_cv_header_stdc = yes; then
2761 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2762 cat > conftest.$ac_ext <<EOF
2763 #line 2764 "configure"
2764 #include "confdefs.h"
2765 #include <stdlib.h>
2767 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2768 egrep "free" >/dev/null 2>&1; then
2770 else
2771 rm -rf conftest*
2772 ac_cv_header_stdc=no
2774 rm -f conftest*
2778 if test $ac_cv_header_stdc = yes; then
2779 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2780 if test "$cross_compiling" = yes; then
2782 else
2783 cat > conftest.$ac_ext <<EOF
2784 #line 2785 "configure"
2785 #include "confdefs.h"
2786 #include <ctype.h>
2787 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2788 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2789 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2790 int main () { int i; for (i = 0; i < 256; i++)
2791 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2792 exit (0); }
2795 if { (eval echo configure:2796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2796 then
2798 else
2799 echo "configure: failed program was:" >&5
2800 cat conftest.$ac_ext >&5
2801 rm -fr conftest*
2802 ac_cv_header_stdc=no
2804 rm -fr conftest*
2810 echo "$ac_t""$ac_cv_header_stdc" 1>&6
2811 if test $ac_cv_header_stdc = yes; then
2812 cat >> confdefs.h <<\EOF
2813 #define STDC_HEADERS 1
2818 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
2819 echo "configure:2820: checking whether time.h and sys/time.h may both be included" >&5
2820 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2821 echo $ac_n "(cached) $ac_c" 1>&6
2822 else
2823 cat > conftest.$ac_ext <<EOF
2824 #line 2825 "configure"
2825 #include "confdefs.h"
2826 #include <sys/types.h>
2827 #include <sys/time.h>
2828 #include <time.h>
2829 int main() {
2830 struct tm *tp;
2831 ; return 0; }
2833 if { (eval echo configure:2834: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2834 rm -rf conftest*
2835 ac_cv_header_time=yes
2836 else
2837 echo "configure: failed program was:" >&5
2838 cat conftest.$ac_ext >&5
2839 rm -rf conftest*
2840 ac_cv_header_time=no
2842 rm -f conftest*
2845 echo "$ac_t""$ac_cv_header_time" 1>&6
2846 if test $ac_cv_header_time = yes; then
2847 cat >> confdefs.h <<\EOF
2848 #define TIME_WITH_SYS_TIME 1
2853 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
2854 echo "configure:2855: checking for sys_siglist declaration in signal.h or unistd.h" >&5
2855 if eval "test \"`echo '$''{'ac_cv_decl_sys_siglist'+set}'`\" = set"; then
2856 echo $ac_n "(cached) $ac_c" 1>&6
2857 else
2858 cat > conftest.$ac_ext <<EOF
2859 #line 2860 "configure"
2860 #include "confdefs.h"
2861 #include <sys/types.h>
2862 #include <signal.h>
2863 /* NetBSD declares sys_siglist in unistd.h. */
2864 #ifdef HAVE_UNISTD_H
2865 #include <unistd.h>
2866 #endif
2867 int main() {
2868 char *msg = *(sys_siglist + 1);
2869 ; return 0; }
2871 if { (eval echo configure:2872: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2872 rm -rf conftest*
2873 ac_cv_decl_sys_siglist=yes
2874 else
2875 echo "configure: failed program was:" >&5
2876 cat conftest.$ac_ext >&5
2877 rm -rf conftest*
2878 ac_cv_decl_sys_siglist=no
2880 rm -f conftest*
2883 echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
2884 if test $ac_cv_decl_sys_siglist = yes; then
2885 cat >> confdefs.h <<\EOF
2886 #define SYS_SIGLIST_DECLARED 1
2891 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
2892 echo "configure:2893: checking for sys/wait.h that is POSIX.1 compatible" >&5
2893 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
2894 echo $ac_n "(cached) $ac_c" 1>&6
2895 else
2896 cat > conftest.$ac_ext <<EOF
2897 #line 2898 "configure"
2898 #include "confdefs.h"
2899 #include <sys/types.h>
2900 #include <sys/wait.h>
2901 #ifndef WEXITSTATUS
2902 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
2903 #endif
2904 #ifndef WIFEXITED
2905 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
2906 #endif
2907 int main() {
2908 int s;
2909 wait (&s);
2910 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
2911 ; return 0; }
2913 if { (eval echo configure:2914: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2914 rm -rf conftest*
2915 ac_cv_header_sys_wait_h=yes
2916 else
2917 echo "configure: failed program was:" >&5
2918 cat conftest.$ac_ext >&5
2919 rm -rf conftest*
2920 ac_cv_header_sys_wait_h=no
2922 rm -f conftest*
2925 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
2926 if test $ac_cv_header_sys_wait_h = yes; then
2927 cat >> confdefs.h <<\EOF
2928 #define HAVE_SYS_WAIT_H 1
2934 echo $ac_n "checking for struct utimbuf""... $ac_c" 1>&6
2935 echo "configure:2936: checking for struct utimbuf" >&5
2936 if eval "test \"`echo '$''{'emacs_cv_struct_utimbuf'+set}'`\" = set"; then
2937 echo $ac_n "(cached) $ac_c" 1>&6
2938 else
2939 cat > conftest.$ac_ext <<EOF
2940 #line 2941 "configure"
2941 #include "confdefs.h"
2942 #ifdef TIME_WITH_SYS_TIME
2943 #include <sys/time.h>
2944 #include <time.h>
2945 #else
2946 #ifdef HAVE_SYS_TIME_H
2947 #include <sys/time.h>
2948 #else
2949 #include <time.h>
2950 #endif
2951 #endif
2952 #ifdef HAVE_UTIME_H
2953 #include <utime.h>
2954 #endif
2955 int main() {
2956 static struct utimbuf x; x.actime = x.modtime;
2957 ; return 0; }
2959 if { (eval echo configure:2960: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2960 rm -rf conftest*
2961 emacs_cv_struct_utimbuf=yes
2962 else
2963 echo "configure: failed program was:" >&5
2964 cat conftest.$ac_ext >&5
2965 rm -rf conftest*
2966 emacs_cv_struct_utimbuf=no
2968 rm -f conftest*
2971 echo "$ac_t""$emacs_cv_struct_utimbuf" 1>&6
2972 if test $emacs_cv_struct_utimbuf = yes; then
2973 cat >> confdefs.h <<\EOF
2974 #define HAVE_STRUCT_UTIMBUF 1
2979 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
2980 echo "configure:2981: checking return type of signal handlers" >&5
2981 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2982 echo $ac_n "(cached) $ac_c" 1>&6
2983 else
2984 cat > conftest.$ac_ext <<EOF
2985 #line 2986 "configure"
2986 #include "confdefs.h"
2987 #include <sys/types.h>
2988 #include <signal.h>
2989 #ifdef signal
2990 #undef signal
2991 #endif
2992 #ifdef __cplusplus
2993 extern "C" void (*signal (int, void (*)(int)))(int);
2994 #else
2995 void (*signal ()) ();
2996 #endif
2998 int main() {
2999 int i;
3000 ; return 0; }
3002 if { (eval echo configure:3003: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3003 rm -rf conftest*
3004 ac_cv_type_signal=void
3005 else
3006 echo "configure: failed program was:" >&5
3007 cat conftest.$ac_ext >&5
3008 rm -rf conftest*
3009 ac_cv_type_signal=int
3011 rm -f conftest*
3014 echo "$ac_t""$ac_cv_type_signal" 1>&6
3015 cat >> confdefs.h <<EOF
3016 #define RETSIGTYPE $ac_cv_type_signal
3021 echo $ac_n "checking for speed_t""... $ac_c" 1>&6
3022 echo "configure:3023: checking for speed_t" >&5
3023 if eval "test \"`echo '$''{'emacs_cv_speed_t'+set}'`\" = set"; then
3024 echo $ac_n "(cached) $ac_c" 1>&6
3025 else
3026 cat > conftest.$ac_ext <<EOF
3027 #line 3028 "configure"
3028 #include "confdefs.h"
3029 #include <termios.h>
3030 int main() {
3031 speed_t x = 1;
3032 ; return 0; }
3034 if { (eval echo configure:3035: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3035 rm -rf conftest*
3036 emacs_cv_speed_t=yes
3037 else
3038 echo "configure: failed program was:" >&5
3039 cat conftest.$ac_ext >&5
3040 rm -rf conftest*
3041 emacs_cv_speed_t=no
3043 rm -f conftest*
3046 echo "$ac_t""$emacs_cv_speed_t" 1>&6
3047 if test $emacs_cv_speed_t = yes; then
3048 cat >> confdefs.h <<\EOF
3049 #define HAVE_SPEED_T 1
3054 echo $ac_n "checking for struct timeval""... $ac_c" 1>&6
3055 echo "configure:3056: checking for struct timeval" >&5
3056 if eval "test \"`echo '$''{'emacs_cv_struct_timeval'+set}'`\" = set"; then
3057 echo $ac_n "(cached) $ac_c" 1>&6
3058 else
3059 cat > conftest.$ac_ext <<EOF
3060 #line 3061 "configure"
3061 #include "confdefs.h"
3062 #ifdef TIME_WITH_SYS_TIME
3063 #include <sys/time.h>
3064 #include <time.h>
3065 #else
3066 #ifdef HAVE_SYS_TIME_H
3067 #include <sys/time.h>
3068 #else
3069 #include <time.h>
3070 #endif
3071 #endif
3072 int main() {
3073 static struct timeval x; x.tv_sec = x.tv_usec;
3074 ; return 0; }
3076 if { (eval echo configure:3077: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3077 rm -rf conftest*
3078 emacs_cv_struct_timeval=yes
3079 else
3080 echo "configure: failed program was:" >&5
3081 cat conftest.$ac_ext >&5
3082 rm -rf conftest*
3083 emacs_cv_struct_timeval=no
3085 rm -f conftest*
3088 echo "$ac_t""$emacs_cv_struct_timeval" 1>&6
3089 HAVE_TIMEVAL=$emacs_cv_struct_timeval
3090 if test $emacs_cv_struct_timeval = yes; then
3091 cat >> confdefs.h <<\EOF
3092 #define HAVE_TIMEVAL 1
3097 echo $ac_n "checking for struct exception""... $ac_c" 1>&6
3098 echo "configure:3099: checking for struct exception" >&5
3099 if eval "test \"`echo '$''{'emacs_cv_struct_exception'+set}'`\" = set"; then
3100 echo $ac_n "(cached) $ac_c" 1>&6
3101 else
3102 cat > conftest.$ac_ext <<EOF
3103 #line 3104 "configure"
3104 #include "confdefs.h"
3105 #include <math.h>
3106 int main() {
3107 static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1;
3108 ; return 0; }
3110 if { (eval echo configure:3111: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3111 rm -rf conftest*
3112 emacs_cv_struct_exception=yes
3113 else
3114 echo "configure: failed program was:" >&5
3115 cat conftest.$ac_ext >&5
3116 rm -rf conftest*
3117 emacs_cv_struct_exception=no
3119 rm -f conftest*
3122 echo "$ac_t""$emacs_cv_struct_exception" 1>&6
3123 HAVE_EXCEPTION=$emacs_cv_struct_exception
3124 if test $emacs_cv_struct_exception != yes; then
3125 cat >> confdefs.h <<\EOF
3126 #define NO_MATHERR 1
3131 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
3132 echo "configure:3133: checking whether struct tm is in sys/time.h or time.h" >&5
3133 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
3134 echo $ac_n "(cached) $ac_c" 1>&6
3135 else
3136 cat > conftest.$ac_ext <<EOF
3137 #line 3138 "configure"
3138 #include "confdefs.h"
3139 #include <sys/types.h>
3140 #include <time.h>
3141 int main() {
3142 struct tm *tp; tp->tm_sec;
3143 ; return 0; }
3145 if { (eval echo configure:3146: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3146 rm -rf conftest*
3147 ac_cv_struct_tm=time.h
3148 else
3149 echo "configure: failed program was:" >&5
3150 cat conftest.$ac_ext >&5
3151 rm -rf conftest*
3152 ac_cv_struct_tm=sys/time.h
3154 rm -f conftest*
3157 echo "$ac_t""$ac_cv_struct_tm" 1>&6
3158 if test $ac_cv_struct_tm = sys/time.h; then
3159 cat >> confdefs.h <<\EOF
3160 #define TM_IN_SYS_TIME 1
3165 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
3166 echo "configure:3167: checking for tm_zone in struct tm" >&5
3167 if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
3168 echo $ac_n "(cached) $ac_c" 1>&6
3169 else
3170 cat > conftest.$ac_ext <<EOF
3171 #line 3172 "configure"
3172 #include "confdefs.h"
3173 #include <sys/types.h>
3174 #include <$ac_cv_struct_tm>
3175 int main() {
3176 struct tm tm; tm.tm_zone;
3177 ; return 0; }
3179 if { (eval echo configure:3180: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3180 rm -rf conftest*
3181 ac_cv_struct_tm_zone=yes
3182 else
3183 echo "configure: failed program was:" >&5
3184 cat conftest.$ac_ext >&5
3185 rm -rf conftest*
3186 ac_cv_struct_tm_zone=no
3188 rm -f conftest*
3191 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
3192 if test "$ac_cv_struct_tm_zone" = yes; then
3193 cat >> confdefs.h <<\EOF
3194 #define HAVE_TM_ZONE 1
3197 else
3198 echo $ac_n "checking for tzname""... $ac_c" 1>&6
3199 echo "configure:3200: checking for tzname" >&5
3200 if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
3201 echo $ac_n "(cached) $ac_c" 1>&6
3202 else
3203 cat > conftest.$ac_ext <<EOF
3204 #line 3205 "configure"
3205 #include "confdefs.h"
3206 #include <time.h>
3207 #ifndef tzname /* For SGI. */
3208 extern char *tzname[]; /* RS6000 and others reject char **tzname. */
3209 #endif
3210 int main() {
3211 atoi(*tzname);
3212 ; return 0; }
3214 if { (eval echo configure:3215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3215 rm -rf conftest*
3216 ac_cv_var_tzname=yes
3217 else
3218 echo "configure: failed program was:" >&5
3219 cat conftest.$ac_ext >&5
3220 rm -rf conftest*
3221 ac_cv_var_tzname=no
3223 rm -f conftest*
3226 echo "$ac_t""$ac_cv_var_tzname" 1>&6
3227 if test $ac_cv_var_tzname = yes; then
3228 cat >> confdefs.h <<\EOF
3229 #define HAVE_TZNAME 1
3235 echo $ac_n "checking for tm_gmtoff in struct tm""... $ac_c" 1>&6
3236 echo "configure:3237: checking for tm_gmtoff in struct tm" >&5
3237 if eval "test \"`echo '$''{'emacs_cv_tm_gmtoff'+set}'`\" = set"; then
3238 echo $ac_n "(cached) $ac_c" 1>&6
3239 else
3240 cat > conftest.$ac_ext <<EOF
3241 #line 3242 "configure"
3242 #include "confdefs.h"
3243 #include <time.h>
3244 int main() {
3245 struct tm t; t.tm_gmtoff = 0
3246 ; return 0; }
3248 if { (eval echo configure:3249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3249 rm -rf conftest*
3250 emacs_cv_tm_gmtoff=yes
3251 else
3252 echo "configure: failed program was:" >&5
3253 cat conftest.$ac_ext >&5
3254 rm -rf conftest*
3255 emacs_cv_tm_gmtoff=no
3257 rm -f conftest*
3260 echo "$ac_t""$emacs_cv_tm_gmtoff" 1>&6
3261 if test $emacs_cv_tm_gmtoff = yes; then
3262 cat >> confdefs.h <<\EOF
3263 #define HAVE_TM_GMTOFF 1
3269 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
3270 echo "configure:3271: checking for ${CC-cc} option to accept ANSI C" >&5
3271 if eval "test \"`echo '$''{'ac_cv_prog_cc_stdc'+set}'`\" = set"; then
3272 echo $ac_n "(cached) $ac_c" 1>&6
3273 else
3274 ac_cv_prog_cc_stdc=no
3275 ac_save_CC="$CC"
3276 # Don't try gcc -ansi; that turns off useful extensions and
3277 # breaks some systems' header files.
3278 # AIX -qlanglvl=ansi
3279 # Ultrix and OSF/1 -std1
3280 # HP-UX 10.20 and later -Ae
3281 # HP-UX older versions -Aa -D_HPUX_SOURCE
3282 # SVR4 -Xc -D__EXTENSIONS__
3283 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3285 CC="$ac_save_CC $ac_arg"
3286 cat > conftest.$ac_ext <<EOF
3287 #line 3288 "configure"
3288 #include "confdefs.h"
3289 #include <stdarg.h>
3290 #include <stdio.h>
3291 #include <sys/types.h>
3292 #include <sys/stat.h>
3293 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3294 struct buf { int x; };
3295 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3296 static char *e (p, i)
3297 char **p;
3298 int i;
3300 return p[i];
3302 static char *f (char * (*g) (char **, int), char **p, ...)
3304 char *s;
3305 va_list v;
3306 va_start (v,p);
3307 s = g (p, va_arg (v,int));
3308 va_end (v);
3309 return s;
3311 int test (int i, double x);
3312 struct s1 {int (*f) (int a);};
3313 struct s2 {int (*f) (double a);};
3314 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3315 int argc;
3316 char **argv;
3317 int main() {
3318 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3319 ; return 0; }
3321 if { (eval echo configure:3322: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3322 rm -rf conftest*
3323 ac_cv_prog_cc_stdc="$ac_arg"; break
3324 else
3325 echo "configure: failed program was:" >&5
3326 cat conftest.$ac_ext >&5
3328 rm -f conftest*
3329 done
3330 CC="$ac_save_CC"
3334 case "x$ac_cv_prog_cc_stdc" in
3335 x|xno)
3336 echo "$ac_t""none needed" 1>&6 ;;
3338 echo "$ac_t""$ac_cv_prog_cc_stdc" 1>&6
3339 CC="$CC $ac_cv_prog_cc_stdc" ;;
3340 esac
3342 echo $ac_n "checking for function prototypes""... $ac_c" 1>&6
3343 echo "configure:3344: checking for function prototypes" >&5
3344 if test "$ac_cv_prog_cc_stdc" != no; then
3345 echo "$ac_t""yes" 1>&6
3346 cat >> confdefs.h <<\EOF
3347 #define PROTOTYPES 1
3350 else
3351 echo "$ac_t""no" 1>&6
3354 echo $ac_n "checking for working volatile""... $ac_c" 1>&6
3355 echo "configure:3356: checking for working volatile" >&5
3356 if eval "test \"`echo '$''{'ac_cv_c_volatile'+set}'`\" = set"; then
3357 echo $ac_n "(cached) $ac_c" 1>&6
3358 else
3359 cat > conftest.$ac_ext <<EOF
3360 #line 3361 "configure"
3361 #include "confdefs.h"
3363 int main() {
3365 volatile int x;
3366 int * volatile y;
3367 ; return 0; }
3369 if { (eval echo configure:3370: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3370 rm -rf conftest*
3371 ac_cv_c_volatile=yes
3372 else
3373 echo "configure: failed program was:" >&5
3374 cat conftest.$ac_ext >&5
3375 rm -rf conftest*
3376 ac_cv_c_volatile=no
3378 rm -f conftest*
3381 echo "$ac_t""$ac_cv_c_volatile" 1>&6
3382 if test $ac_cv_c_volatile = no; then
3383 cat >> confdefs.h <<\EOF
3384 #define volatile
3389 echo $ac_n "checking for working const""... $ac_c" 1>&6
3390 echo "configure:3391: checking for working const" >&5
3391 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
3392 echo $ac_n "(cached) $ac_c" 1>&6
3393 else
3394 cat > conftest.$ac_ext <<EOF
3395 #line 3396 "configure"
3396 #include "confdefs.h"
3398 int main() {
3400 /* Ultrix mips cc rejects this. */
3401 typedef int charset[2]; const charset x;
3402 /* SunOS 4.1.1 cc rejects this. */
3403 char const *const *ccp;
3404 char **p;
3405 /* NEC SVR4.0.2 mips cc rejects this. */
3406 struct point {int x, y;};
3407 static struct point const zero = {0,0};
3408 /* AIX XL C 1.02.0.0 rejects this.
3409 It does not let you subtract one const X* pointer from another in an arm
3410 of an if-expression whose if-part is not a constant expression */
3411 const char *g = "string";
3412 ccp = &g + (g ? g-g : 0);
3413 /* HPUX 7.0 cc rejects these. */
3414 ++ccp;
3415 p = (char**) ccp;
3416 ccp = (char const *const *) p;
3417 { /* SCO 3.2v4 cc rejects this. */
3418 char *t;
3419 char const *s = 0 ? (char *) 0 : (char const *) 0;
3421 *t++ = 0;
3423 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
3424 int x[] = {25, 17};
3425 const int *foo = &x[0];
3426 ++foo;
3428 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3429 typedef const int *iptr;
3430 iptr p = 0;
3431 ++p;
3433 { /* AIX XL C 1.02.0.0 rejects this saying
3434 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3435 struct s { int j; const int *ap[3]; };
3436 struct s *b; b->j = 5;
3438 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3439 const int foo = 10;
3442 ; return 0; }
3444 if { (eval echo configure:3445: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3445 rm -rf conftest*
3446 ac_cv_c_const=yes
3447 else
3448 echo "configure: failed program was:" >&5
3449 cat conftest.$ac_ext >&5
3450 rm -rf conftest*
3451 ac_cv_c_const=no
3453 rm -f conftest*
3456 echo "$ac_t""$ac_cv_c_const" 1>&6
3457 if test $ac_cv_c_const = no; then
3458 cat >> confdefs.h <<\EOF
3459 #define const
3464 echo $ac_n "checking for void * support""... $ac_c" 1>&6
3465 echo "configure:3466: checking for void * support" >&5
3466 if eval "test \"`echo '$''{'emacs_cv_void_star'+set}'`\" = set"; then
3467 echo $ac_n "(cached) $ac_c" 1>&6
3468 else
3469 cat > conftest.$ac_ext <<EOF
3470 #line 3471 "configure"
3471 #include "confdefs.h"
3473 int main() {
3474 void * foo;
3475 ; return 0; }
3477 if { (eval echo configure:3478: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3478 rm -rf conftest*
3479 emacs_cv_void_star=yes
3480 else
3481 echo "configure: failed program was:" >&5
3482 cat conftest.$ac_ext >&5
3483 rm -rf conftest*
3484 emacs_cv_void_star=no
3486 rm -f conftest*
3489 echo "$ac_t""$emacs_cv_void_star" 1>&6
3490 if test $emacs_cv_void_star = yes; then
3491 cat >> confdefs.h <<\EOF
3492 #define POINTER_TYPE void
3495 else
3496 cat >> confdefs.h <<\EOF
3497 #define POINTER_TYPE char
3502 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
3503 echo "configure:3504: checking whether ${MAKE-make} sets \${MAKE}" >&5
3504 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
3505 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
3506 echo $ac_n "(cached) $ac_c" 1>&6
3507 else
3508 cat > conftestmake <<\EOF
3509 all:
3510 @echo 'ac_maketemp="${MAKE}"'
3512 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3513 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
3514 if test -n "$ac_maketemp"; then
3515 eval ac_cv_prog_make_${ac_make}_set=yes
3516 else
3517 eval ac_cv_prog_make_${ac_make}_set=no
3519 rm -f conftestmake
3521 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3522 echo "$ac_t""yes" 1>&6
3523 SET_MAKE=
3524 else
3525 echo "$ac_t""no" 1>&6
3526 SET_MAKE="MAKE=${MAKE-make}"
3530 echo $ac_n "checking for long file names""... $ac_c" 1>&6
3531 echo "configure:3532: checking for long file names" >&5
3532 if eval "test \"`echo '$''{'ac_cv_sys_long_file_names'+set}'`\" = set"; then
3533 echo $ac_n "(cached) $ac_c" 1>&6
3534 else
3535 ac_cv_sys_long_file_names=yes
3536 # Test for long file names in all the places we know might matter:
3537 # . the current directory, where building will happen
3538 # $prefix/lib where we will be installing things
3539 # $exec_prefix/lib likewise
3540 # eval it to expand exec_prefix.
3541 # $TMPDIR if set, where it might want to write temporary files
3542 # if $TMPDIR is not set:
3543 # /tmp where it might want to write temporary files
3544 # /var/tmp likewise
3545 # /usr/tmp likewise
3546 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3547 ac_tmpdirs="$TMPDIR"
3548 else
3549 ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3551 for ac_dir in . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3552 test -d $ac_dir || continue
3553 test -w $ac_dir || continue # It is less confusing to not echo anything here.
3554 (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
3555 (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
3556 val=`cat $ac_dir/conftest9012345 2>/dev/null`
3557 if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
3558 ac_cv_sys_long_file_names=no
3559 rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
3560 break
3562 rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
3563 done
3566 echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6
3567 if test $ac_cv_sys_long_file_names = yes; then
3568 cat >> confdefs.h <<\EOF
3569 #define HAVE_LONG_FILE_NAMES 1
3575 #### Choose a window system.
3577 # If we find X, set shell vars x_includes and x_libraries to the
3578 # paths, otherwise set no_x=yes.
3579 # Uses ac_ vars as temps to allow command line to override cache and checks.
3580 # --without-x overrides everything else, but does not touch the cache.
3581 echo $ac_n "checking for X""... $ac_c" 1>&6
3582 echo "configure:3583: checking for X" >&5
3584 # Check whether --with-x or --without-x was given.
3585 if test "${with_x+set}" = set; then
3586 withval="$with_x"
3590 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
3591 if test "x$with_x" = xno; then
3592 # The user explicitly disabled X.
3593 have_x=disabled
3594 else
3595 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
3596 # Both variables are already set.
3597 have_x=yes
3598 else
3599 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
3600 echo $ac_n "(cached) $ac_c" 1>&6
3601 else
3602 # One or both of the vars are not set, and there is no cached value.
3603 ac_x_includes=NO ac_x_libraries=NO
3604 rm -fr conftestdir
3605 if mkdir conftestdir; then
3606 cd conftestdir
3607 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
3608 cat > Imakefile <<'EOF'
3609 acfindx:
3610 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
3612 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
3613 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3614 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
3615 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
3616 for ac_extension in a so sl; do
3617 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
3618 test -f $ac_im_libdir/libX11.$ac_extension; then
3619 ac_im_usrlibdir=$ac_im_libdir; break
3621 done
3622 # Screen out bogus values from the imake configuration. They are
3623 # bogus both because they are the default anyway, and because
3624 # using them would break gcc on systems where it needs fixed includes.
3625 case "$ac_im_incroot" in
3626 /usr/include) ;;
3627 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
3628 esac
3629 case "$ac_im_usrlibdir" in
3630 /usr/lib | /lib) ;;
3631 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
3632 esac
3634 cd ..
3635 rm -fr conftestdir
3638 if test "$ac_x_includes" = NO; then
3639 # Guess where to find include files, by looking for this one X11 .h file.
3640 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
3642 # First, try using that file with no special directory specified.
3643 cat > conftest.$ac_ext <<EOF
3644 #line 3645 "configure"
3645 #include "confdefs.h"
3646 #include <$x_direct_test_include>
3648 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3649 { (eval echo configure:3650: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3650 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3651 if test -z "$ac_err"; then
3652 rm -rf conftest*
3653 # We can compile using X headers with no special include directory.
3654 ac_x_includes=
3655 else
3656 echo "$ac_err" >&5
3657 echo "configure: failed program was:" >&5
3658 cat conftest.$ac_ext >&5
3659 rm -rf conftest*
3660 # Look for the header file in a standard set of common directories.
3661 # Check X11 before X11Rn because it is often a symlink to the current release.
3662 for ac_dir in \
3663 /usr/X11/include \
3664 /usr/X11R6/include \
3665 /usr/X11R5/include \
3666 /usr/X11R4/include \
3668 /usr/include/X11 \
3669 /usr/include/X11R6 \
3670 /usr/include/X11R5 \
3671 /usr/include/X11R4 \
3673 /usr/local/X11/include \
3674 /usr/local/X11R6/include \
3675 /usr/local/X11R5/include \
3676 /usr/local/X11R4/include \
3678 /usr/local/include/X11 \
3679 /usr/local/include/X11R6 \
3680 /usr/local/include/X11R5 \
3681 /usr/local/include/X11R4 \
3683 /usr/X386/include \
3684 /usr/x386/include \
3685 /usr/XFree86/include/X11 \
3687 /usr/include \
3688 /usr/local/include \
3689 /usr/unsupported/include \
3690 /usr/athena/include \
3691 /usr/local/x11r5/include \
3692 /usr/lpp/Xamples/include \
3694 /usr/openwin/include \
3695 /usr/openwin/share/include \
3698 if test -r "$ac_dir/$x_direct_test_include"; then
3699 ac_x_includes=$ac_dir
3700 break
3702 done
3704 rm -f conftest*
3705 fi # $ac_x_includes = NO
3707 if test "$ac_x_libraries" = NO; then
3708 # Check for the libraries.
3710 test -z "$x_direct_test_library" && x_direct_test_library=Xt
3711 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
3713 # See if we find them without any special options.
3714 # Don't add to $LIBS permanently.
3715 ac_save_LIBS="$LIBS"
3716 LIBS="-l$x_direct_test_library $LIBS"
3717 cat > conftest.$ac_ext <<EOF
3718 #line 3719 "configure"
3719 #include "confdefs.h"
3721 int main() {
3722 ${x_direct_test_function}()
3723 ; return 0; }
3725 if { (eval echo configure:3726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3726 rm -rf conftest*
3727 LIBS="$ac_save_LIBS"
3728 # We can link X programs with no special library path.
3729 ac_x_libraries=
3730 else
3731 echo "configure: failed program was:" >&5
3732 cat conftest.$ac_ext >&5
3733 rm -rf conftest*
3734 LIBS="$ac_save_LIBS"
3735 # First see if replacing the include by lib works.
3736 # Check X11 before X11Rn because it is often a symlink to the current release.
3737 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
3738 /usr/X11/lib \
3739 /usr/X11R6/lib \
3740 /usr/X11R5/lib \
3741 /usr/X11R4/lib \
3743 /usr/lib/X11 \
3744 /usr/lib/X11R6 \
3745 /usr/lib/X11R5 \
3746 /usr/lib/X11R4 \
3748 /usr/local/X11/lib \
3749 /usr/local/X11R6/lib \
3750 /usr/local/X11R5/lib \
3751 /usr/local/X11R4/lib \
3753 /usr/local/lib/X11 \
3754 /usr/local/lib/X11R6 \
3755 /usr/local/lib/X11R5 \
3756 /usr/local/lib/X11R4 \
3758 /usr/X386/lib \
3759 /usr/x386/lib \
3760 /usr/XFree86/lib/X11 \
3762 /usr/lib \
3763 /usr/local/lib \
3764 /usr/unsupported/lib \
3765 /usr/athena/lib \
3766 /usr/local/x11r5/lib \
3767 /usr/lpp/Xamples/lib \
3768 /lib/usr/lib/X11 \
3770 /usr/openwin/lib \
3771 /usr/openwin/share/lib \
3774 for ac_extension in a so sl; do
3775 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
3776 ac_x_libraries=$ac_dir
3777 break 2
3779 done
3780 done
3782 rm -f conftest*
3783 fi # $ac_x_libraries = NO
3785 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
3786 # Didn't find X anywhere. Cache the known absence of X.
3787 ac_cv_have_x="have_x=no"
3788 else
3789 # Record where we found X for the cache.
3790 ac_cv_have_x="have_x=yes \
3791 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
3795 eval "$ac_cv_have_x"
3796 fi # $with_x != no
3798 if test "$have_x" != yes; then
3799 echo "$ac_t""$have_x" 1>&6
3800 no_x=yes
3801 else
3802 # If each of the values was on the command line, it overrides each guess.
3803 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
3804 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
3805 # Update the cache value to reflect the command line values.
3806 ac_cv_have_x="have_x=yes \
3807 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
3808 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
3811 if test "$no_x" = yes; then
3812 window_system=none
3813 else
3814 window_system=x11
3817 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
3818 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
3819 LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"`
3820 x_default_search_path=""
3821 for x_library in `echo ${x_libraries} | sed -e "s/:/ /g"`; do
3822 x_search_path="\
3823 ${x_library}/X11/%L/%T/%N%C%S:\
3824 ${x_library}/X11/%l/%T/%N%C%S:\
3825 ${x_library}/X11/%T/%N%C%S:\
3826 ${x_library}/X11/%L/%T/%N%S:\
3827 ${x_library}/X11/%l/%T/%N%S:\
3828 ${x_library}/X11/%T/%N%S"
3829 if test x"${x_default_search_path}" = x; then
3830 x_default_search_path=${x_search_path}
3831 else
3832 x_default_search_path="${x_search_path}:${x_default_search_path}"
3834 done
3836 if test "${x_includes}" != NONE && test -n "${x_includes}"; then
3837 C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"`
3840 if test x"${x_includes}" = x; then
3841 bitmapdir=/usr/include/X11/bitmaps
3842 else
3843 # accumulate include directories that have X11 bitmap subdirectories
3844 bmd_acc="dummyval"
3845 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
3846 if test -d "${bmd}/X11/bitmaps"; then
3847 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
3849 if test -d "${bmd}/bitmaps"; then
3850 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
3852 done
3853 if test ${bmd_acc} != "dummyval"; then
3854 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
3858 case "${window_system}" in
3859 x11 )
3860 HAVE_X_WINDOWS=yes
3861 HAVE_X11=yes
3862 case "${with_x_toolkit}" in
3863 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
3864 motif ) USE_X_TOOLKIT=MOTIF ;;
3865 no ) USE_X_TOOLKIT=none ;;
3866 * ) USE_X_TOOLKIT=maybe ;;
3867 esac
3869 none )
3870 HAVE_X_WINDOWS=no
3871 HAVE_X11=no
3872 USE_X_TOOLKIT=none
3874 esac
3876 ### If we're using X11, we should use the X menu package.
3877 HAVE_MENUS=no
3878 case ${HAVE_X11} in
3879 yes ) HAVE_MENUS=yes ;;
3880 esac
3882 if test "${opsys}" = "hpux9"; then
3883 case "${x_libraries}" in
3884 *X11R4* )
3885 opsysfile="s/hpux9-x11r4.h"
3887 esac
3890 if test "${opsys}" = "hpux9shr"; then
3891 case "${x_libraries}" in
3892 *X11R4* )
3893 opsysfile="s/hpux9shxr4.h"
3895 esac
3898 ### Compute the unexec source name from the object name.
3899 UNEXEC_SRC="`echo ${unexec} | sed 's/\.o/.c/'`"
3901 # Do the opsystem or machine files prohibit the use of the GNU malloc?
3902 # Assume not, until told otherwise.
3903 GNU_MALLOC=yes
3904 doug_lea_malloc=yes
3905 echo $ac_n "checking for malloc_get_state""... $ac_c" 1>&6
3906 echo "configure:3907: checking for malloc_get_state" >&5
3907 if eval "test \"`echo '$''{'ac_cv_func_malloc_get_state'+set}'`\" = set"; then
3908 echo $ac_n "(cached) $ac_c" 1>&6
3909 else
3910 cat > conftest.$ac_ext <<EOF
3911 #line 3912 "configure"
3912 #include "confdefs.h"
3913 /* System header to define __stub macros and hopefully few prototypes,
3914 which can conflict with char malloc_get_state(); below. */
3915 #include <assert.h>
3916 /* Override any gcc2 internal prototype to avoid an error. */
3917 /* We use char because int might match the return type of a gcc2
3918 builtin and then its argument prototype would still apply. */
3919 char malloc_get_state();
3921 int main() {
3923 /* The GNU C library defines this for functions which it implements
3924 to always fail with ENOSYS. Some functions are actually named
3925 something starting with __ and the normal name is an alias. */
3926 #if defined (__stub_malloc_get_state) || defined (__stub___malloc_get_state)
3927 choke me
3928 #else
3929 malloc_get_state();
3930 #endif
3932 ; return 0; }
3934 if { (eval echo configure:3935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3935 rm -rf conftest*
3936 eval "ac_cv_func_malloc_get_state=yes"
3937 else
3938 echo "configure: failed program was:" >&5
3939 cat conftest.$ac_ext >&5
3940 rm -rf conftest*
3941 eval "ac_cv_func_malloc_get_state=no"
3943 rm -f conftest*
3946 if eval "test \"`echo '$ac_cv_func_'malloc_get_state`\" = yes"; then
3947 echo "$ac_t""yes" 1>&6
3949 else
3950 echo "$ac_t""no" 1>&6
3951 doug_lea_malloc=no
3954 echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6
3955 echo "configure:3956: checking for malloc_set_state" >&5
3956 if eval "test \"`echo '$''{'ac_cv_func_malloc_set_state'+set}'`\" = set"; then
3957 echo $ac_n "(cached) $ac_c" 1>&6
3958 else
3959 cat > conftest.$ac_ext <<EOF
3960 #line 3961 "configure"
3961 #include "confdefs.h"
3962 /* System header to define __stub macros and hopefully few prototypes,
3963 which can conflict with char malloc_set_state(); below. */
3964 #include <assert.h>
3965 /* Override any gcc2 internal prototype to avoid an error. */
3966 /* We use char because int might match the return type of a gcc2
3967 builtin and then its argument prototype would still apply. */
3968 char malloc_set_state();
3970 int main() {
3972 /* The GNU C library defines this for functions which it implements
3973 to always fail with ENOSYS. Some functions are actually named
3974 something starting with __ and the normal name is an alias. */
3975 #if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
3976 choke me
3977 #else
3978 malloc_set_state();
3979 #endif
3981 ; return 0; }
3983 if { (eval echo configure:3984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3984 rm -rf conftest*
3985 eval "ac_cv_func_malloc_set_state=yes"
3986 else
3987 echo "configure: failed program was:" >&5
3988 cat conftest.$ac_ext >&5
3989 rm -rf conftest*
3990 eval "ac_cv_func_malloc_set_state=no"
3992 rm -f conftest*
3995 if eval "test \"`echo '$ac_cv_func_'malloc_set_state`\" = yes"; then
3996 echo "$ac_t""yes" 1>&6
3998 else
3999 echo "$ac_t""no" 1>&6
4000 doug_lea_malloc=no
4003 echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6
4004 echo "configure:4005: checking whether __after_morecore_hook exists" >&5
4005 if eval "test \"`echo '$''{'emacs_cv_var___after_morecore_hook'+set}'`\" = set"; then
4006 echo $ac_n "(cached) $ac_c" 1>&6
4007 else
4008 cat > conftest.$ac_ext <<EOF
4009 #line 4010 "configure"
4010 #include "confdefs.h"
4011 extern void (* __after_morecore_hook)();
4012 int main() {
4013 __after_morecore_hook = 0
4014 ; return 0; }
4016 if { (eval echo configure:4017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4017 rm -rf conftest*
4018 emacs_cv_var___after_morecore_hook=yes
4019 else
4020 echo "configure: failed program was:" >&5
4021 cat conftest.$ac_ext >&5
4022 rm -rf conftest*
4023 emacs_cv_var___after_morecore_hook=no
4025 rm -f conftest*
4028 echo "$ac_t""$emacs_cv_var___after_morecore_hook" 1>&6
4029 if test $emacs_cv_var___after_morecore_hook = no; then
4030 doug_lea_malloc=no
4032 if test "${system_malloc}" = "yes"; then
4033 GNU_MALLOC=no
4034 GNU_MALLOC_reason="
4035 (The GNU allocators don't work with this system configuration.)"
4037 if test "$doug_lea_malloc" = "yes" ; then
4038 if test "$GNU_MALLOC" = yes ; then
4039 GNU_MALLOC_reason="
4040 (Using Doug Lea's new malloc from the GNU C Library.)"
4042 cat >> confdefs.h <<\EOF
4043 #define DOUG_LEA_MALLOC 1
4048 if test x"${REL_ALLOC}" = x; then
4049 REL_ALLOC=${GNU_MALLOC}
4053 for ac_hdr in stdlib.h unistd.h sys/stat.h
4055 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4056 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4057 echo "configure:4058: checking for $ac_hdr" >&5
4058 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4059 echo $ac_n "(cached) $ac_c" 1>&6
4060 else
4061 cat > conftest.$ac_ext <<EOF
4062 #line 4063 "configure"
4063 #include "confdefs.h"
4064 #include <$ac_hdr>
4066 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4067 { (eval echo configure:4068: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4068 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4069 if test -z "$ac_err"; then
4070 rm -rf conftest*
4071 eval "ac_cv_header_$ac_safe=yes"
4072 else
4073 echo "$ac_err" >&5
4074 echo "configure: failed program was:" >&5
4075 cat conftest.$ac_ext >&5
4076 rm -rf conftest*
4077 eval "ac_cv_header_$ac_safe=no"
4079 rm -f conftest*
4081 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4082 echo "$ac_t""yes" 1>&6
4083 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4084 cat >> confdefs.h <<EOF
4085 #define $ac_tr_hdr 1
4088 else
4089 echo "$ac_t""no" 1>&6
4091 done
4093 for ac_func in getpagesize
4095 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4096 echo "configure:4097: checking for $ac_func" >&5
4097 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4098 echo $ac_n "(cached) $ac_c" 1>&6
4099 else
4100 cat > conftest.$ac_ext <<EOF
4101 #line 4102 "configure"
4102 #include "confdefs.h"
4103 /* System header to define __stub macros and hopefully few prototypes,
4104 which can conflict with char $ac_func(); below. */
4105 #include <assert.h>
4106 /* Override any gcc2 internal prototype to avoid an error. */
4107 /* We use char because int might match the return type of a gcc2
4108 builtin and then its argument prototype would still apply. */
4109 char $ac_func();
4111 int main() {
4113 /* The GNU C library defines this for functions which it implements
4114 to always fail with ENOSYS. Some functions are actually named
4115 something starting with __ and the normal name is an alias. */
4116 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4117 choke me
4118 #else
4119 $ac_func();
4120 #endif
4122 ; return 0; }
4124 if { (eval echo configure:4125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4125 rm -rf conftest*
4126 eval "ac_cv_func_$ac_func=yes"
4127 else
4128 echo "configure: failed program was:" >&5
4129 cat conftest.$ac_ext >&5
4130 rm -rf conftest*
4131 eval "ac_cv_func_$ac_func=no"
4133 rm -f conftest*
4136 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4137 echo "$ac_t""yes" 1>&6
4138 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4139 cat >> confdefs.h <<EOF
4140 #define $ac_tr_func 1
4143 else
4144 echo "$ac_t""no" 1>&6
4146 done
4148 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
4149 echo "configure:4150: checking for working mmap" >&5
4150 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
4151 echo $ac_n "(cached) $ac_c" 1>&6
4152 else
4153 if test "$cross_compiling" = yes; then
4154 ac_cv_func_mmap_fixed_mapped=no
4155 else
4156 cat > conftest.$ac_ext <<EOF
4157 #line 4158 "configure"
4158 #include "confdefs.h"
4159 /* Thanks to Mike Haertel and Jim Avera for this test.
4160 Here is a matrix of mmap possibilities:
4161 mmap private not fixed
4162 mmap private fixed at somewhere currently unmapped
4163 mmap private fixed at somewhere already mapped
4164 mmap shared not fixed
4165 mmap shared fixed at somewhere currently unmapped
4166 mmap shared fixed at somewhere already mapped
4167 For private mappings, we should verify that changes cannot be read()
4168 back from the file, nor mmap's back from the file at a different
4169 address. (There have been systems where private was not correctly
4170 implemented like the infamous i386 svr4.0, and systems where the
4171 VM page cache was not coherent with the file system buffer cache
4172 like early versions of FreeBSD and possibly contemporary NetBSD.)
4173 For shared mappings, we should conversely verify that changes get
4174 propogated back to all the places they're supposed to be.
4176 Grep wants private fixed already mapped.
4177 The main things grep needs to know about mmap are:
4178 * does it exist and is it safe to write into the mmap'd area
4179 * how to use it (BSD variants) */
4180 #include <sys/types.h>
4181 #include <fcntl.h>
4182 #include <sys/mman.h>
4184 #if STDC_HEADERS || HAVE_STDLIB_H
4185 # include <stdlib.h>
4186 #else
4187 char *malloc ();
4188 #endif
4189 #if HAVE_UNISTD_H
4190 # include <unistd.h>
4191 #endif
4192 #if HAVE_SYS_STAT_H
4193 # include <sys/stat.h>
4194 #endif
4196 /* This mess was copied from the GNU getpagesize.h. */
4197 #if !HAVE_GETPAGESIZE
4198 /* Assume that all systems that can run configure have sys/param.h. */
4199 # if !HAVE_SYS_PARAM_H
4200 # define HAVE_SYS_PARAM_H 1
4201 # endif
4203 # ifdef _SC_PAGESIZE
4204 # define getpagesize() sysconf(_SC_PAGESIZE)
4205 # else /* no _SC_PAGESIZE */
4206 # if HAVE_SYS_PARAM_H
4207 # include <sys/param.h>
4208 # ifdef EXEC_PAGESIZE
4209 # define getpagesize() EXEC_PAGESIZE
4210 # else /* no EXEC_PAGESIZE */
4211 # ifdef NBPG
4212 # define getpagesize() NBPG * CLSIZE
4213 # ifndef CLSIZE
4214 # define CLSIZE 1
4215 # endif /* no CLSIZE */
4216 # else /* no NBPG */
4217 # ifdef NBPC
4218 # define getpagesize() NBPC
4219 # else /* no NBPC */
4220 # ifdef PAGESIZE
4221 # define getpagesize() PAGESIZE
4222 # endif /* PAGESIZE */
4223 # endif /* no NBPC */
4224 # endif /* no NBPG */
4225 # endif /* no EXEC_PAGESIZE */
4226 # else /* no HAVE_SYS_PARAM_H */
4227 # define getpagesize() 8192 /* punt totally */
4228 # endif /* no HAVE_SYS_PARAM_H */
4229 # endif /* no _SC_PAGESIZE */
4231 #endif /* no HAVE_GETPAGESIZE */
4234 main ()
4236 char *data, *data2, *data3;
4237 int i, pagesize;
4238 int fd;
4240 pagesize = getpagesize ();
4242 /* First, make a file with some known garbage in it. */
4243 data = (char *) malloc (pagesize);
4244 if (!data)
4245 exit (1);
4246 for (i = 0; i < pagesize; ++i)
4247 *(data + i) = rand ();
4248 umask (0);
4249 fd = creat ("conftestmmap", 0600);
4250 if (fd < 0)
4251 exit (1);
4252 if (write (fd, data, pagesize) != pagesize)
4253 exit (1);
4254 close (fd);
4256 /* Next, try to mmap the file at a fixed address which already has
4257 something else allocated at it. If we can, also make sure that
4258 we see the same garbage. */
4259 fd = open ("conftestmmap", O_RDWR);
4260 if (fd < 0)
4261 exit (1);
4262 data2 = (char *) malloc (2 * pagesize);
4263 if (!data2)
4264 exit (1);
4265 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
4266 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
4267 MAP_PRIVATE | MAP_FIXED, fd, 0L))
4268 exit (1);
4269 for (i = 0; i < pagesize; ++i)
4270 if (*(data + i) != *(data2 + i))
4271 exit (1);
4273 /* Finally, make sure that changes to the mapped area do not
4274 percolate back to the file as seen by read(). (This is a bug on
4275 some variants of i386 svr4.0.) */
4276 for (i = 0; i < pagesize; ++i)
4277 *(data2 + i) = *(data2 + i) + 1;
4278 data3 = (char *) malloc (pagesize);
4279 if (!data3)
4280 exit (1);
4281 if (read (fd, data3, pagesize) != pagesize)
4282 exit (1);
4283 for (i = 0; i < pagesize; ++i)
4284 if (*(data + i) != *(data3 + i))
4285 exit (1);
4286 close (fd);
4287 unlink ("conftestmmap");
4288 exit (0);
4291 if { (eval echo configure:4292: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4292 then
4293 ac_cv_func_mmap_fixed_mapped=yes
4294 else
4295 echo "configure: failed program was:" >&5
4296 cat conftest.$ac_ext >&5
4297 rm -fr conftest*
4298 ac_cv_func_mmap_fixed_mapped=no
4300 rm -fr conftest*
4305 echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
4306 if test $ac_cv_func_mmap_fixed_mapped = yes; then
4307 cat >> confdefs.h <<\EOF
4308 #define HAVE_MMAP 1
4313 if test $use_mmap_for_buffers = yes; then
4314 REL_ALLOC=no
4317 LIBS="$libsrc_libs $LIBS"
4319 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
4320 echo "configure:4321: checking for dnet_ntoa in -ldnet" >&5
4321 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
4322 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4323 echo $ac_n "(cached) $ac_c" 1>&6
4324 else
4325 ac_save_LIBS="$LIBS"
4326 LIBS="-ldnet $LIBS"
4327 cat > conftest.$ac_ext <<EOF
4328 #line 4329 "configure"
4329 #include "confdefs.h"
4330 /* Override any gcc2 internal prototype to avoid an error. */
4331 /* We use char because int might match the return type of a gcc2
4332 builtin and then its argument prototype would still apply. */
4333 char dnet_ntoa();
4335 int main() {
4336 dnet_ntoa()
4337 ; return 0; }
4339 if { (eval echo configure:4340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4340 rm -rf conftest*
4341 eval "ac_cv_lib_$ac_lib_var=yes"
4342 else
4343 echo "configure: failed program was:" >&5
4344 cat conftest.$ac_ext >&5
4345 rm -rf conftest*
4346 eval "ac_cv_lib_$ac_lib_var=no"
4348 rm -f conftest*
4349 LIBS="$ac_save_LIBS"
4352 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4353 echo "$ac_t""yes" 1>&6
4354 ac_tr_lib=HAVE_LIB`echo dnet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4355 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4356 cat >> confdefs.h <<EOF
4357 #define $ac_tr_lib 1
4360 LIBS="-ldnet $LIBS"
4362 else
4363 echo "$ac_t""no" 1>&6
4367 echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
4368 echo "configure:4369: checking for main in -lXbsd" >&5
4369 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
4370 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4371 echo $ac_n "(cached) $ac_c" 1>&6
4372 else
4373 ac_save_LIBS="$LIBS"
4374 LIBS="-lXbsd $LIBS"
4375 cat > conftest.$ac_ext <<EOF
4376 #line 4377 "configure"
4377 #include "confdefs.h"
4379 int main() {
4380 main()
4381 ; return 0; }
4383 if { (eval echo configure:4384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4384 rm -rf conftest*
4385 eval "ac_cv_lib_$ac_lib_var=yes"
4386 else
4387 echo "configure: failed program was:" >&5
4388 cat conftest.$ac_ext >&5
4389 rm -rf conftest*
4390 eval "ac_cv_lib_$ac_lib_var=no"
4392 rm -f conftest*
4393 LIBS="$ac_save_LIBS"
4396 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4397 echo "$ac_t""yes" 1>&6
4398 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
4399 else
4400 echo "$ac_t""no" 1>&6
4404 echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6
4405 echo "configure:4406: checking for cma_open in -lpthreads" >&5
4406 ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'`
4407 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4408 echo $ac_n "(cached) $ac_c" 1>&6
4409 else
4410 ac_save_LIBS="$LIBS"
4411 LIBS="-lpthreads $LIBS"
4412 cat > conftest.$ac_ext <<EOF
4413 #line 4414 "configure"
4414 #include "confdefs.h"
4415 /* Override any gcc2 internal prototype to avoid an error. */
4416 /* We use char because int might match the return type of a gcc2
4417 builtin and then its argument prototype would still apply. */
4418 char cma_open();
4420 int main() {
4421 cma_open()
4422 ; return 0; }
4424 if { (eval echo configure:4425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4425 rm -rf conftest*
4426 eval "ac_cv_lib_$ac_lib_var=yes"
4427 else
4428 echo "configure: failed program was:" >&5
4429 cat conftest.$ac_ext >&5
4430 rm -rf conftest*
4431 eval "ac_cv_lib_$ac_lib_var=no"
4433 rm -f conftest*
4434 LIBS="$ac_save_LIBS"
4437 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4438 echo "$ac_t""yes" 1>&6
4439 ac_tr_lib=HAVE_LIB`echo pthreads | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4440 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4441 cat >> confdefs.h <<EOF
4442 #define $ac_tr_lib 1
4445 LIBS="-lpthreads $LIBS"
4447 else
4448 echo "$ac_t""no" 1>&6
4452 echo $ac_n "checking for XFree86 in /usr/X386""... $ac_c" 1>&6
4453 echo "configure:4454: checking for XFree86 in /usr/X386" >&5
4454 if test -d /usr/X386/include; then
4455 HAVE_XFREE386=yes
4456 : ${C_SWITCH_X_SITE="-I/usr/X386/include"}
4457 else
4458 HAVE_XFREE386=no
4460 echo "$ac_t""$HAVE_XFREE386" 1>&6
4462 # Change CFLAGS temporarily so that C_SWITCH_X_SITE gets used
4463 # for the tests that follow. We set it back to REAL_CFLAGS later on.
4465 REAL_CPPFLAGS="$CPPFLAGS"
4467 if test "${HAVE_X11}" = "yes"; then
4468 DEFS="$C_SWITCH_X_SITE $DEFS"
4469 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
4470 LIBS="$LIBX $LIBS"
4471 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
4472 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
4474 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
4475 # This is handled by LD_SWITCH_X_SITE_AUX during the real build,
4476 # but it's more convenient here to set LD_RUN_PATH
4477 # since this also works on hosts that don't understand LD_SWITCH_X_SITE_AUX.
4478 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
4479 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
4480 export LD_RUN_PATH
4483 if test "${opsys}" = "gnu-linux"; then
4484 echo $ac_n "checking whether X on GNU/Linux needs -b to link""... $ac_c" 1>&6
4485 echo "configure:4486: checking whether X on GNU/Linux needs -b to link" >&5
4486 cat > conftest.$ac_ext <<EOF
4487 #line 4488 "configure"
4488 #include "confdefs.h"
4490 int main() {
4491 XOpenDisplay ("foo");
4492 ; return 0; }
4494 if { (eval echo configure:4495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4495 rm -rf conftest*
4496 xlinux_first_failure=no
4497 else
4498 echo "configure: failed program was:" >&5
4499 cat conftest.$ac_ext >&5
4500 rm -rf conftest*
4501 xlinux_first_failure=yes
4503 rm -f conftest*
4504 if test "${xlinux_first_failure}" = "yes"; then
4505 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
4506 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
4507 OLD_CPPFLAGS="$CPPFLAGS"
4508 OLD_LIBS="$LIBS"
4509 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
4510 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
4511 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
4512 LIBS="$LIBS -b i486-linuxaout"
4513 cat > conftest.$ac_ext <<EOF
4514 #line 4515 "configure"
4515 #include "confdefs.h"
4517 int main() {
4518 XOpenDisplay ("foo");
4519 ; return 0; }
4521 if { (eval echo configure:4522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4522 rm -rf conftest*
4523 xlinux_second_failure=no
4524 else
4525 echo "configure: failed program was:" >&5
4526 cat conftest.$ac_ext >&5
4527 rm -rf conftest*
4528 xlinux_second_failure=yes
4530 rm -f conftest*
4531 if test "${xlinux_second_failure}" = "yes"; then
4532 # If we get the same failure with -b, there is no use adding -b.
4533 # So take it out. This plays safe.
4534 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
4535 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
4536 CPPFLAGS="$OLD_CPPFLAGS"
4537 LIBS="$OLD_LIBS"
4538 echo "$ac_t""no" 1>&6
4539 else
4540 echo "$ac_t""yes" 1>&6
4542 else
4543 echo "$ac_t""no" 1>&6
4547 # Reportedly, some broken Solaris systems have XKBlib.h but are missing
4548 # header files included from there.
4549 echo $ac_n "checking for Xkb""... $ac_c" 1>&6
4550 echo "configure:4551: checking for Xkb" >&5
4551 cat > conftest.$ac_ext <<EOF
4552 #line 4553 "configure"
4553 #include "confdefs.h"
4554 #include <X11/Xlib.h>
4555 #include <X11/XKBlib.h>
4556 int main() {
4557 XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);
4558 ; return 0; }
4560 if { (eval echo configure:4561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4561 rm -rf conftest*
4562 emacs_xkb=yes
4563 else
4564 echo "configure: failed program was:" >&5
4565 cat conftest.$ac_ext >&5
4566 rm -rf conftest*
4567 emacs_xkb=no
4569 rm -f conftest*
4570 echo "$ac_t""$emacs_xkb" 1>&6
4571 if test $emacs_xkb = yes; then
4572 cat >> confdefs.h <<\EOF
4573 #define HAVE_XKBGETKEYBOARD 1
4578 for ac_func in XrmSetDatabase XScreenResourceString \
4579 XScreenNumberOfScreen XSetWMProtocols
4581 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4582 echo "configure:4583: checking for $ac_func" >&5
4583 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4584 echo $ac_n "(cached) $ac_c" 1>&6
4585 else
4586 cat > conftest.$ac_ext <<EOF
4587 #line 4588 "configure"
4588 #include "confdefs.h"
4589 /* System header to define __stub macros and hopefully few prototypes,
4590 which can conflict with char $ac_func(); below. */
4591 #include <assert.h>
4592 /* Override any gcc2 internal prototype to avoid an error. */
4593 /* We use char because int might match the return type of a gcc2
4594 builtin and then its argument prototype would still apply. */
4595 char $ac_func();
4597 int main() {
4599 /* The GNU C library defines this for functions which it implements
4600 to always fail with ENOSYS. Some functions are actually named
4601 something starting with __ and the normal name is an alias. */
4602 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4603 choke me
4604 #else
4605 $ac_func();
4606 #endif
4608 ; return 0; }
4610 if { (eval echo configure:4611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4611 rm -rf conftest*
4612 eval "ac_cv_func_$ac_func=yes"
4613 else
4614 echo "configure: failed program was:" >&5
4615 cat conftest.$ac_ext >&5
4616 rm -rf conftest*
4617 eval "ac_cv_func_$ac_func=no"
4619 rm -f conftest*
4622 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4623 echo "$ac_t""yes" 1>&6
4624 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4625 cat >> confdefs.h <<EOF
4626 #define $ac_tr_func 1
4629 else
4630 echo "$ac_t""no" 1>&6
4632 done
4636 if test "${window_system}" = "x11"; then
4637 echo $ac_n "checking X11 version 6""... $ac_c" 1>&6
4638 echo "configure:4639: checking X11 version 6" >&5
4639 if eval "test \"`echo '$''{'emacs_cv_x11_version_6'+set}'`\" = set"; then
4640 echo $ac_n "(cached) $ac_c" 1>&6
4641 else
4642 cat > conftest.$ac_ext <<EOF
4643 #line 4644 "configure"
4644 #include "confdefs.h"
4645 #include <X11/Xlib.h>
4646 int main() {
4647 #if XlibSpecificationRelease < 6
4648 fail;
4649 #endif
4651 ; return 0; }
4653 if { (eval echo configure:4654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4654 rm -rf conftest*
4655 emacs_cv_x11_version_6=yes
4656 else
4657 echo "configure: failed program was:" >&5
4658 cat conftest.$ac_ext >&5
4659 rm -rf conftest*
4660 emacs_cv_x11_version_6=no
4662 rm -f conftest*
4665 if test $emacs_cv_x11_version_6 = yes; then
4666 echo "$ac_t""6 or newer" 1>&6
4667 cat >> confdefs.h <<\EOF
4668 #define HAVE_X11R6 1
4671 else
4672 echo "$ac_t""before 6" 1>&6
4676 if test "${window_system}" = "x11"; then
4677 echo $ac_n "checking X11 version 5""... $ac_c" 1>&6
4678 echo "configure:4679: checking X11 version 5" >&5
4679 if eval "test \"`echo '$''{'emacs_cv_x11_version_5'+set}'`\" = set"; then
4680 echo $ac_n "(cached) $ac_c" 1>&6
4681 else
4682 cat > conftest.$ac_ext <<EOF
4683 #line 4684 "configure"
4684 #include "confdefs.h"
4685 #include <X11/Xlib.h>
4686 int main() {
4687 #if XlibSpecificationRelease < 5
4688 fail;
4689 #endif
4691 ; return 0; }
4693 if { (eval echo configure:4694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4694 rm -rf conftest*
4695 emacs_cv_x11_version_5=yes
4696 else
4697 echo "configure: failed program was:" >&5
4698 cat conftest.$ac_ext >&5
4699 rm -rf conftest*
4700 emacs_cv_x11_version_5=no
4702 rm -f conftest*
4705 if test $emacs_cv_x11_version_5 = yes; then
4706 echo "$ac_t""5 or newer" 1>&6
4707 HAVE_X11R5=yes
4708 cat >> confdefs.h <<\EOF
4709 #define HAVE_X11R5 1
4712 else
4713 HAVE_X11R5=no
4714 echo "$ac_t""before 5" 1>&6
4718 if test x"${USE_X_TOOLKIT}" = xmaybe; then
4719 if test x"${HAVE_X11R5}" = xyes; then
4720 echo $ac_n "checking X11 version 5 with Xaw""... $ac_c" 1>&6
4721 echo "configure:4722: checking X11 version 5 with Xaw" >&5
4722 if eval "test \"`echo '$''{'emacs_cv_x11_version_5_with_xaw'+set}'`\" = set"; then
4723 echo $ac_n "(cached) $ac_c" 1>&6
4724 else
4725 cat > conftest.$ac_ext <<EOF
4726 #line 4727 "configure"
4727 #include "confdefs.h"
4729 #include <X11/Intrinsic.h>
4730 #include <X11/Xaw/Simple.h>
4731 int main() {
4733 ; return 0; }
4735 if { (eval echo configure:4736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4736 rm -rf conftest*
4737 emacs_cv_x11_version_5_with_xaw=yes
4738 else
4739 echo "configure: failed program was:" >&5
4740 cat conftest.$ac_ext >&5
4741 rm -rf conftest*
4742 emacs_cv_x11_version_5_with_xaw=no
4744 rm -f conftest*
4747 if test $emacs_cv_x11_version_5_with_xaw = yes; then
4748 echo "$ac_t""5 or newer, with Xaw; use toolkit by default" 1>&6
4749 USE_X_TOOLKIT=LUCID
4750 else
4751 echo "$ac_t""before 5 or no Xaw; do not use toolkit by default" 1>&6
4752 USE_X_TOOLKIT=none
4754 else
4755 USE_X_TOOLKIT=none
4759 X_TOOLKIT_TYPE=$USE_X_TOOLKIT
4761 if test "${USE_X_TOOLKIT}" != "none"; then
4762 echo $ac_n "checking X11 toolkit version""... $ac_c" 1>&6
4763 echo "configure:4764: checking X11 toolkit version" >&5
4764 if eval "test \"`echo '$''{'emacs_cv_x11_toolkit_version_6'+set}'`\" = set"; then
4765 echo $ac_n "(cached) $ac_c" 1>&6
4766 else
4767 cat > conftest.$ac_ext <<EOF
4768 #line 4769 "configure"
4769 #include "confdefs.h"
4770 #include <X11/Intrinsic.h>
4771 int main() {
4772 #if XtSpecificationRelease < 6
4773 fail;
4774 #endif
4776 ; return 0; }
4778 if { (eval echo configure:4779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4779 rm -rf conftest*
4780 emacs_cv_x11_toolkit_version_6=yes
4781 else
4782 echo "configure: failed program was:" >&5
4783 cat conftest.$ac_ext >&5
4784 rm -rf conftest*
4785 emacs_cv_x11_toolkit_version_6=no
4787 rm -f conftest*
4790 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
4791 if test $emacs_cv_x11_toolkit_version_6 = yes; then
4792 echo "$ac_t""6 or newer" 1>&6
4793 cat >> confdefs.h <<\EOF
4794 #define HAVE_X11XTR6 1
4797 else
4798 echo "$ac_t""before 6" 1>&6
4801 OLDLIBS="$LIBS"
4802 if test x$HAVE_X11XTR6 = xyes; then
4803 LIBS="-lXt -lSM -lICE $LIBS"
4804 else
4805 LIBS="-lXt $LIBS"
4807 echo $ac_n "checking for XmuConvertStandardSelection in -lXmu""... $ac_c" 1>&6
4808 echo "configure:4809: checking for XmuConvertStandardSelection in -lXmu" >&5
4809 ac_lib_var=`echo Xmu'_'XmuConvertStandardSelection | sed 'y%./+-%__p_%'`
4810 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4811 echo $ac_n "(cached) $ac_c" 1>&6
4812 else
4813 ac_save_LIBS="$LIBS"
4814 LIBS="-lXmu $LIBS"
4815 cat > conftest.$ac_ext <<EOF
4816 #line 4817 "configure"
4817 #include "confdefs.h"
4818 /* Override any gcc2 internal prototype to avoid an error. */
4819 /* We use char because int might match the return type of a gcc2
4820 builtin and then its argument prototype would still apply. */
4821 char XmuConvertStandardSelection();
4823 int main() {
4824 XmuConvertStandardSelection()
4825 ; return 0; }
4827 if { (eval echo configure:4828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4828 rm -rf conftest*
4829 eval "ac_cv_lib_$ac_lib_var=yes"
4830 else
4831 echo "configure: failed program was:" >&5
4832 cat conftest.$ac_ext >&5
4833 rm -rf conftest*
4834 eval "ac_cv_lib_$ac_lib_var=no"
4836 rm -f conftest*
4837 LIBS="$ac_save_LIBS"
4840 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4841 echo "$ac_t""yes" 1>&6
4842 ac_tr_lib=HAVE_LIB`echo Xmu | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4843 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4844 cat >> confdefs.h <<EOF
4845 #define $ac_tr_lib 1
4848 LIBS="-lXmu $LIBS"
4850 else
4851 echo "$ac_t""no" 1>&6
4854 test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS"
4857 # On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D.
4858 if test "${HAVE_X11}" = "yes"; then
4859 if test "${USE_X_TOOLKIT}" != "none"; then
4860 echo $ac_n "checking for XShapeQueryExtension in -lXext""... $ac_c" 1>&6
4861 echo "configure:4862: checking for XShapeQueryExtension in -lXext" >&5
4862 ac_lib_var=`echo Xext'_'XShapeQueryExtension | sed 'y%./+-%__p_%'`
4863 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4864 echo $ac_n "(cached) $ac_c" 1>&6
4865 else
4866 ac_save_LIBS="$LIBS"
4867 LIBS="-lXext $LIBS"
4868 cat > conftest.$ac_ext <<EOF
4869 #line 4870 "configure"
4870 #include "confdefs.h"
4871 /* Override any gcc2 internal prototype to avoid an error. */
4872 /* We use char because int might match the return type of a gcc2
4873 builtin and then its argument prototype would still apply. */
4874 char XShapeQueryExtension();
4876 int main() {
4877 XShapeQueryExtension()
4878 ; return 0; }
4880 if { (eval echo configure:4881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4881 rm -rf conftest*
4882 eval "ac_cv_lib_$ac_lib_var=yes"
4883 else
4884 echo "configure: failed program was:" >&5
4885 cat conftest.$ac_ext >&5
4886 rm -rf conftest*
4887 eval "ac_cv_lib_$ac_lib_var=no"
4889 rm -f conftest*
4890 LIBS="$ac_save_LIBS"
4893 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4894 echo "$ac_t""yes" 1>&6
4895 ac_tr_lib=HAVE_LIB`echo Xext | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4896 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4897 cat >> confdefs.h <<EOF
4898 #define $ac_tr_lib 1
4901 LIBS="-lXext $LIBS"
4903 else
4904 echo "$ac_t""no" 1>&6
4910 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
4911 echo $ac_n "checking for Motif version 2.1""... $ac_c" 1>&6
4912 echo "configure:4913: checking for Motif version 2.1" >&5
4913 if eval "test \"`echo '$''{'emacs_cv_motif_version_2_1'+set}'`\" = set"; then
4914 echo $ac_n "(cached) $ac_c" 1>&6
4915 else
4916 cat > conftest.$ac_ext <<EOF
4917 #line 4918 "configure"
4918 #include "confdefs.h"
4919 #include <Xm/Xm.h>
4920 int main() {
4921 #if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
4922 int x = 5;
4923 #else
4924 Motif version prior to 2.1.
4925 #endif
4926 ; return 0; }
4928 if { (eval echo configure:4929: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4929 rm -rf conftest*
4930 emacs_cv_motif_version_2_1=yes
4931 else
4932 echo "configure: failed program was:" >&5
4933 cat conftest.$ac_ext >&5
4934 rm -rf conftest*
4935 emacs_cv_motif_version_2_1=no
4937 rm -f conftest*
4940 echo "$ac_t""$emacs_cv_motif_version_2_1" 1>&6
4941 HAVE_MOTIF_2_1=$emacs_cv_motif_version_2_1
4942 if test $emacs_cv_motif_version_2_1 = yes; then
4943 HAVE_LIBXP=no
4944 cat >> confdefs.h <<\EOF
4945 #define HAVE_MOTIF_2_1 1
4948 echo $ac_n "checking for XpCreateContext in -lXp""... $ac_c" 1>&6
4949 echo "configure:4950: checking for XpCreateContext in -lXp" >&5
4950 ac_lib_var=`echo Xp'_'XpCreateContext | sed 'y%./+-%__p_%'`
4951 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4952 echo $ac_n "(cached) $ac_c" 1>&6
4953 else
4954 ac_save_LIBS="$LIBS"
4955 LIBS="-lXp $LIBS"
4956 cat > conftest.$ac_ext <<EOF
4957 #line 4958 "configure"
4958 #include "confdefs.h"
4959 /* Override any gcc2 internal prototype to avoid an error. */
4960 /* We use char because int might match the return type of a gcc2
4961 builtin and then its argument prototype would still apply. */
4962 char XpCreateContext();
4964 int main() {
4965 XpCreateContext()
4966 ; return 0; }
4968 if { (eval echo configure:4969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4969 rm -rf conftest*
4970 eval "ac_cv_lib_$ac_lib_var=yes"
4971 else
4972 echo "configure: failed program was:" >&5
4973 cat conftest.$ac_ext >&5
4974 rm -rf conftest*
4975 eval "ac_cv_lib_$ac_lib_var=no"
4977 rm -f conftest*
4978 LIBS="$ac_save_LIBS"
4981 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4982 echo "$ac_t""yes" 1>&6
4983 HAVE_LIBXP=yes
4984 else
4985 echo "$ac_t""no" 1>&6
4988 if test ${HAVE_LIBXP} = yes; then
4989 cat >> confdefs.h <<\EOF
4990 #define HAVE_LIBXP 1
4997 ### Is -lXaw3d available?
4998 HAVE_XAW3D=no
4999 if test "${HAVE_X11}" = "yes"; then
5000 if test "${USE_X_TOOLKIT}" != "none"; then
5001 ac_safe=`echo "X11/Xaw3d/Scrollbar.h" | sed 'y%./+-%__p_%'`
5002 echo $ac_n "checking for X11/Xaw3d/Scrollbar.h""... $ac_c" 1>&6
5003 echo "configure:5004: checking for X11/Xaw3d/Scrollbar.h" >&5
5004 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5005 echo $ac_n "(cached) $ac_c" 1>&6
5006 else
5007 cat > conftest.$ac_ext <<EOF
5008 #line 5009 "configure"
5009 #include "confdefs.h"
5010 #include <X11/Xaw3d/Scrollbar.h>
5012 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5013 { (eval echo configure:5014: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5014 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5015 if test -z "$ac_err"; then
5016 rm -rf conftest*
5017 eval "ac_cv_header_$ac_safe=yes"
5018 else
5019 echo "$ac_err" >&5
5020 echo "configure: failed program was:" >&5
5021 cat conftest.$ac_ext >&5
5022 rm -rf conftest*
5023 eval "ac_cv_header_$ac_safe=no"
5025 rm -f conftest*
5027 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5028 echo "$ac_t""yes" 1>&6
5029 echo $ac_n "checking for XawScrollbarSetThumb in -lXaw3d""... $ac_c" 1>&6
5030 echo "configure:5031: checking for XawScrollbarSetThumb in -lXaw3d" >&5
5031 ac_lib_var=`echo Xaw3d'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'`
5032 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5033 echo $ac_n "(cached) $ac_c" 1>&6
5034 else
5035 ac_save_LIBS="$LIBS"
5036 LIBS="-lXaw3d $LIBS"
5037 cat > conftest.$ac_ext <<EOF
5038 #line 5039 "configure"
5039 #include "confdefs.h"
5040 /* Override any gcc2 internal prototype to avoid an error. */
5041 /* We use char because int might match the return type of a gcc2
5042 builtin and then its argument prototype would still apply. */
5043 char XawScrollbarSetThumb();
5045 int main() {
5046 XawScrollbarSetThumb()
5047 ; return 0; }
5049 if { (eval echo configure:5050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5050 rm -rf conftest*
5051 eval "ac_cv_lib_$ac_lib_var=yes"
5052 else
5053 echo "configure: failed program was:" >&5
5054 cat conftest.$ac_ext >&5
5055 rm -rf conftest*
5056 eval "ac_cv_lib_$ac_lib_var=no"
5058 rm -f conftest*
5059 LIBS="$ac_save_LIBS"
5062 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5063 echo "$ac_t""yes" 1>&6
5064 HAVE_XAW3D=yes
5065 else
5066 echo "$ac_t""no" 1>&6
5069 else
5070 echo "$ac_t""no" 1>&6
5073 if test "${HAVE_XAW3D}" = "yes"; then
5074 cat >> confdefs.h <<\EOF
5075 #define HAVE_XAW3D 1
5083 USE_TOOLKIT_SCROLL_BARS=no
5084 if test "${with_toolkit_scroll_bars}" != "no"; then
5085 if test "${USE_X_TOOLKIT}" != "none"; then
5086 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
5087 cat >> confdefs.h <<\EOF
5088 #define USE_TOOLKIT_SCROLL_BARS 1
5091 HAVE_XAW3D=no
5092 USE_TOOLKIT_SCROLL_BARS=yes
5093 elif test "${HAVE_XAW3D}" = "yes"; then
5094 cat >> confdefs.h <<\EOF
5095 #define USE_TOOLKIT_SCROLL_BARS 1
5098 USE_TOOLKIT_SCROLL_BARS=yes
5104 if test "${with_xim}" != "no"; then
5105 cat >> confdefs.h <<\EOF
5106 #define USE_XIM 1
5111 ### Use -lXpm if available, unless `--with-xpm=no'.
5112 HAVE_XPM=no
5113 if test "${HAVE_X11}" = "yes"; then
5114 if test "${with_xpm}" != "no"; then
5115 ac_safe=`echo "X11/xpm.h" | sed 'y%./+-%__p_%'`
5116 echo $ac_n "checking for X11/xpm.h""... $ac_c" 1>&6
5117 echo "configure:5118: checking for X11/xpm.h" >&5
5118 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5119 echo $ac_n "(cached) $ac_c" 1>&6
5120 else
5121 cat > conftest.$ac_ext <<EOF
5122 #line 5123 "configure"
5123 #include "confdefs.h"
5124 #include <X11/xpm.h>
5126 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5127 { (eval echo configure:5128: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5128 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5129 if test -z "$ac_err"; then
5130 rm -rf conftest*
5131 eval "ac_cv_header_$ac_safe=yes"
5132 else
5133 echo "$ac_err" >&5
5134 echo "configure: failed program was:" >&5
5135 cat conftest.$ac_ext >&5
5136 rm -rf conftest*
5137 eval "ac_cv_header_$ac_safe=no"
5139 rm -f conftest*
5141 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5142 echo "$ac_t""yes" 1>&6
5143 echo $ac_n "checking for XpmReadFileToPixmap in -lXpm""... $ac_c" 1>&6
5144 echo "configure:5145: checking for XpmReadFileToPixmap in -lXpm" >&5
5145 ac_lib_var=`echo Xpm'_'XpmReadFileToPixmap | sed 'y%./+-%__p_%'`
5146 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5147 echo $ac_n "(cached) $ac_c" 1>&6
5148 else
5149 ac_save_LIBS="$LIBS"
5150 LIBS="-lXpm -lX11 $LIBS"
5151 cat > conftest.$ac_ext <<EOF
5152 #line 5153 "configure"
5153 #include "confdefs.h"
5154 /* Override any gcc2 internal prototype to avoid an error. */
5155 /* We use char because int might match the return type of a gcc2
5156 builtin and then its argument prototype would still apply. */
5157 char XpmReadFileToPixmap();
5159 int main() {
5160 XpmReadFileToPixmap()
5161 ; return 0; }
5163 if { (eval echo configure:5164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5164 rm -rf conftest*
5165 eval "ac_cv_lib_$ac_lib_var=yes"
5166 else
5167 echo "configure: failed program was:" >&5
5168 cat conftest.$ac_ext >&5
5169 rm -rf conftest*
5170 eval "ac_cv_lib_$ac_lib_var=no"
5172 rm -f conftest*
5173 LIBS="$ac_save_LIBS"
5176 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5177 echo "$ac_t""yes" 1>&6
5178 HAVE_XPM=yes
5179 else
5180 echo "$ac_t""no" 1>&6
5183 else
5184 echo "$ac_t""no" 1>&6
5187 if test "${HAVE_XPM}" = "yes"; then
5188 echo $ac_n "checking for XpmReturnAllocPixels preprocessor define""... $ac_c" 1>&6
5189 echo "configure:5190: checking for XpmReturnAllocPixels preprocessor define" >&5
5190 cat > conftest.$ac_ext <<EOF
5191 #line 5192 "configure"
5192 #include "confdefs.h"
5193 #include "X11/xpm.h"
5194 #ifndef XpmReturnAllocPixels
5195 no_return_alloc_pixels
5196 #endif
5199 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5200 egrep "no_return_alloc_pixels" >/dev/null 2>&1; then
5201 rm -rf conftest*
5202 HAVE_XPM=no
5203 else
5204 rm -rf conftest*
5205 HAVE_XPM=yes
5207 rm -f conftest*
5210 if test "${HAVE_XPM}" = "yes"; then
5211 echo "$ac_t""yes" 1>&6
5212 else
5213 echo "$ac_t""no" 1>&6
5218 if test "${HAVE_XPM}" = "yes"; then
5219 cat >> confdefs.h <<\EOF
5220 #define HAVE_XPM 1
5226 ### Use -ljpeg if available, unless `--with-jpeg=no'.
5227 HAVE_JPEG=no
5228 if test "${HAVE_X11}" = "yes"; then
5229 if test "${with_jpeg}" != "no"; then
5230 ac_safe=`echo "jerror.h" | sed 'y%./+-%__p_%'`
5231 echo $ac_n "checking for jerror.h""... $ac_c" 1>&6
5232 echo "configure:5233: checking for jerror.h" >&5
5233 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5234 echo $ac_n "(cached) $ac_c" 1>&6
5235 else
5236 cat > conftest.$ac_ext <<EOF
5237 #line 5238 "configure"
5238 #include "confdefs.h"
5239 #include <jerror.h>
5241 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5242 { (eval echo configure:5243: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5243 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5244 if test -z "$ac_err"; then
5245 rm -rf conftest*
5246 eval "ac_cv_header_$ac_safe=yes"
5247 else
5248 echo "$ac_err" >&5
5249 echo "configure: failed program was:" >&5
5250 cat conftest.$ac_ext >&5
5251 rm -rf conftest*
5252 eval "ac_cv_header_$ac_safe=no"
5254 rm -f conftest*
5256 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5257 echo "$ac_t""yes" 1>&6
5258 echo $ac_n "checking for jpeg_destroy_compress in -ljpeg""... $ac_c" 1>&6
5259 echo "configure:5260: checking for jpeg_destroy_compress in -ljpeg" >&5
5260 ac_lib_var=`echo jpeg'_'jpeg_destroy_compress | sed 'y%./+-%__p_%'`
5261 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5262 echo $ac_n "(cached) $ac_c" 1>&6
5263 else
5264 ac_save_LIBS="$LIBS"
5265 LIBS="-ljpeg $LIBS"
5266 cat > conftest.$ac_ext <<EOF
5267 #line 5268 "configure"
5268 #include "confdefs.h"
5269 /* Override any gcc2 internal prototype to avoid an error. */
5270 /* We use char because int might match the return type of a gcc2
5271 builtin and then its argument prototype would still apply. */
5272 char jpeg_destroy_compress();
5274 int main() {
5275 jpeg_destroy_compress()
5276 ; return 0; }
5278 if { (eval echo configure:5279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5279 rm -rf conftest*
5280 eval "ac_cv_lib_$ac_lib_var=yes"
5281 else
5282 echo "configure: failed program was:" >&5
5283 cat conftest.$ac_ext >&5
5284 rm -rf conftest*
5285 eval "ac_cv_lib_$ac_lib_var=no"
5287 rm -f conftest*
5288 LIBS="$ac_save_LIBS"
5291 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5292 echo "$ac_t""yes" 1>&6
5293 HAVE_JPEG=yes
5294 else
5295 echo "$ac_t""no" 1>&6
5298 else
5299 echo "$ac_t""no" 1>&6
5304 if test "${HAVE_JPEG}" = "yes"; then
5305 cat >> confdefs.h <<\EOF
5306 #define HAVE_JPEG 1
5309 cat > conftest.$ac_ext <<EOF
5310 #line 5311 "configure"
5311 #include "confdefs.h"
5312 #include <jpeglib.h>
5313 version=JPEG_LIB_VERSION
5316 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5317 egrep "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then
5318 rm -rf conftest*
5319 cat >> confdefs.h <<\EOF
5320 #define HAVE_JPEG 1
5323 else
5324 rm -rf conftest*
5325 echo "configure: warning: libjpeg found, but not version 6b or later" 1>&2
5326 HAVE_JPEG=no
5328 rm -f conftest*
5333 ### Use -lpng if available, unless `--with-png=no'.
5334 HAVE_PNG=no
5335 if test "${HAVE_X11}" = "yes"; then
5336 if test "${with_png}" != "no"; then
5337 ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'`
5338 echo $ac_n "checking for png.h""... $ac_c" 1>&6
5339 echo "configure:5340: checking for png.h" >&5
5340 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5341 echo $ac_n "(cached) $ac_c" 1>&6
5342 else
5343 cat > conftest.$ac_ext <<EOF
5344 #line 5345 "configure"
5345 #include "confdefs.h"
5346 #include <png.h>
5348 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5349 { (eval echo configure:5350: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5350 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5351 if test -z "$ac_err"; then
5352 rm -rf conftest*
5353 eval "ac_cv_header_$ac_safe=yes"
5354 else
5355 echo "$ac_err" >&5
5356 echo "configure: failed program was:" >&5
5357 cat conftest.$ac_ext >&5
5358 rm -rf conftest*
5359 eval "ac_cv_header_$ac_safe=no"
5361 rm -f conftest*
5363 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5364 echo "$ac_t""yes" 1>&6
5365 echo $ac_n "checking for png_get_channels in -lpng""... $ac_c" 1>&6
5366 echo "configure:5367: checking for png_get_channels in -lpng" >&5
5367 ac_lib_var=`echo png'_'png_get_channels | sed 'y%./+-%__p_%'`
5368 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5369 echo $ac_n "(cached) $ac_c" 1>&6
5370 else
5371 ac_save_LIBS="$LIBS"
5372 LIBS="-lpng -lz -lm $LIBS"
5373 cat > conftest.$ac_ext <<EOF
5374 #line 5375 "configure"
5375 #include "confdefs.h"
5376 /* Override any gcc2 internal prototype to avoid an error. */
5377 /* We use char because int might match the return type of a gcc2
5378 builtin and then its argument prototype would still apply. */
5379 char png_get_channels();
5381 int main() {
5382 png_get_channels()
5383 ; return 0; }
5385 if { (eval echo configure:5386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5386 rm -rf conftest*
5387 eval "ac_cv_lib_$ac_lib_var=yes"
5388 else
5389 echo "configure: failed program was:" >&5
5390 cat conftest.$ac_ext >&5
5391 rm -rf conftest*
5392 eval "ac_cv_lib_$ac_lib_var=no"
5394 rm -f conftest*
5395 LIBS="$ac_save_LIBS"
5398 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5399 echo "$ac_t""yes" 1>&6
5400 HAVE_PNG=yes
5401 else
5402 echo "$ac_t""no" 1>&6
5405 else
5406 echo "$ac_t""no" 1>&6
5411 if test "${HAVE_PNG}" = "yes"; then
5412 cat >> confdefs.h <<\EOF
5413 #define HAVE_PNG 1
5419 ### Use -ltiff if available, unless `--with-tiff=no'.
5420 HAVE_TIFF=no
5421 if test "${HAVE_X11}" = "yes"; then
5422 if test "${with_tiff}" != "no"; then
5423 ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'`
5424 echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6
5425 echo "configure:5426: checking for tiffio.h" >&5
5426 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5427 echo $ac_n "(cached) $ac_c" 1>&6
5428 else
5429 cat > conftest.$ac_ext <<EOF
5430 #line 5431 "configure"
5431 #include "confdefs.h"
5432 #include <tiffio.h>
5434 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5435 { (eval echo configure:5436: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5436 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5437 if test -z "$ac_err"; then
5438 rm -rf conftest*
5439 eval "ac_cv_header_$ac_safe=yes"
5440 else
5441 echo "$ac_err" >&5
5442 echo "configure: failed program was:" >&5
5443 cat conftest.$ac_ext >&5
5444 rm -rf conftest*
5445 eval "ac_cv_header_$ac_safe=no"
5447 rm -f conftest*
5449 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5450 echo "$ac_t""yes" 1>&6
5451 tifflibs="-lz -lm"
5452 # At least one tiff package requires the jpeg library.
5453 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
5454 echo $ac_n "checking for TIFFGetVersion in -ltiff""... $ac_c" 1>&6
5455 echo "configure:5456: checking for TIFFGetVersion in -ltiff" >&5
5456 ac_lib_var=`echo tiff'_'TIFFGetVersion | sed 'y%./+-%__p_%'`
5457 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5458 echo $ac_n "(cached) $ac_c" 1>&6
5459 else
5460 ac_save_LIBS="$LIBS"
5461 LIBS="-ltiff $tifflibs $LIBS"
5462 cat > conftest.$ac_ext <<EOF
5463 #line 5464 "configure"
5464 #include "confdefs.h"
5465 /* Override any gcc2 internal prototype to avoid an error. */
5466 /* We use char because int might match the return type of a gcc2
5467 builtin and then its argument prototype would still apply. */
5468 char TIFFGetVersion();
5470 int main() {
5471 TIFFGetVersion()
5472 ; return 0; }
5474 if { (eval echo configure:5475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5475 rm -rf conftest*
5476 eval "ac_cv_lib_$ac_lib_var=yes"
5477 else
5478 echo "configure: failed program was:" >&5
5479 cat conftest.$ac_ext >&5
5480 rm -rf conftest*
5481 eval "ac_cv_lib_$ac_lib_var=no"
5483 rm -f conftest*
5484 LIBS="$ac_save_LIBS"
5487 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5488 echo "$ac_t""yes" 1>&6
5489 HAVE_TIFF=yes
5490 else
5491 echo "$ac_t""no" 1>&6
5494 else
5495 echo "$ac_t""no" 1>&6
5500 if test "${HAVE_TIFF}" = "yes"; then
5501 cat >> confdefs.h <<\EOF
5502 #define HAVE_TIFF 1
5508 ### Use -lgif if available, unless `--with-gif=no'.
5509 HAVE_GIF=no
5510 if test "${HAVE_X11}" = "yes"; then
5511 if test "${with_gif}" != "no"; then
5512 ac_safe=`echo "gif_lib.h" | sed 'y%./+-%__p_%'`
5513 echo $ac_n "checking for gif_lib.h""... $ac_c" 1>&6
5514 echo "configure:5515: checking for gif_lib.h" >&5
5515 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5516 echo $ac_n "(cached) $ac_c" 1>&6
5517 else
5518 cat > conftest.$ac_ext <<EOF
5519 #line 5520 "configure"
5520 #include "confdefs.h"
5521 #include <gif_lib.h>
5523 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5524 { (eval echo configure:5525: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5525 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5526 if test -z "$ac_err"; then
5527 rm -rf conftest*
5528 eval "ac_cv_header_$ac_safe=yes"
5529 else
5530 echo "$ac_err" >&5
5531 echo "configure: failed program was:" >&5
5532 cat conftest.$ac_ext >&5
5533 rm -rf conftest*
5534 eval "ac_cv_header_$ac_safe=no"
5536 rm -f conftest*
5538 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5539 echo "$ac_t""yes" 1>&6
5540 # EGifPutExtensionLast only exists from version libungif-4.1.0b1.
5541 # Earlier versions can crash Emacs.
5542 echo $ac_n "checking for EGifPutExtensionLast in -lungif""... $ac_c" 1>&6
5543 echo "configure:5544: checking for EGifPutExtensionLast in -lungif" >&5
5544 ac_lib_var=`echo ungif'_'EGifPutExtensionLast | sed 'y%./+-%__p_%'`
5545 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5546 echo $ac_n "(cached) $ac_c" 1>&6
5547 else
5548 ac_save_LIBS="$LIBS"
5549 LIBS="-lungif $LIBS"
5550 cat > conftest.$ac_ext <<EOF
5551 #line 5552 "configure"
5552 #include "confdefs.h"
5553 /* Override any gcc2 internal prototype to avoid an error. */
5554 /* We use char because int might match the return type of a gcc2
5555 builtin and then its argument prototype would still apply. */
5556 char EGifPutExtensionLast();
5558 int main() {
5559 EGifPutExtensionLast()
5560 ; return 0; }
5562 if { (eval echo configure:5563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5563 rm -rf conftest*
5564 eval "ac_cv_lib_$ac_lib_var=yes"
5565 else
5566 echo "configure: failed program was:" >&5
5567 cat conftest.$ac_ext >&5
5568 rm -rf conftest*
5569 eval "ac_cv_lib_$ac_lib_var=no"
5571 rm -f conftest*
5572 LIBS="$ac_save_LIBS"
5575 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5576 echo "$ac_t""yes" 1>&6
5577 HAVE_GIF=yes
5578 else
5579 echo "$ac_t""no" 1>&6
5582 else
5583 echo "$ac_t""no" 1>&6
5588 if test "${HAVE_GIF}" = "yes"; then
5589 cat >> confdefs.h <<\EOF
5590 #define HAVE_GIF 1
5596 # If netdb.h doesn't declare h_errno, we must declare it by hand.
5597 echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
5598 echo "configure:5599: checking whether netdb declares h_errno" >&5
5599 if eval "test \"`echo '$''{'emacs_cv_netdb_declares_h_errno'+set}'`\" = set"; then
5600 echo $ac_n "(cached) $ac_c" 1>&6
5601 else
5602 cat > conftest.$ac_ext <<EOF
5603 #line 5604 "configure"
5604 #include "confdefs.h"
5605 #include <netdb.h>
5606 int main() {
5607 return h_errno;
5608 ; return 0; }
5610 if { (eval echo configure:5611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5611 rm -rf conftest*
5612 emacs_cv_netdb_declares_h_errno=yes
5613 else
5614 echo "configure: failed program was:" >&5
5615 cat conftest.$ac_ext >&5
5616 rm -rf conftest*
5617 emacs_cv_netdb_declares_h_errno=no
5619 rm -f conftest*
5622 echo "$ac_t""$emacs_cv_netdb_declares_h_errno" 1>&6
5623 if test $emacs_cv_netdb_declares_h_errno = yes; then
5624 cat >> confdefs.h <<\EOF
5625 #define HAVE_H_ERRNO 1
5630 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
5631 # for constant arguments. Useless!
5632 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
5633 echo "configure:5634: checking for working alloca.h" >&5
5634 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
5635 echo $ac_n "(cached) $ac_c" 1>&6
5636 else
5637 cat > conftest.$ac_ext <<EOF
5638 #line 5639 "configure"
5639 #include "confdefs.h"
5640 #include <alloca.h>
5641 int main() {
5642 char *p = alloca(2 * sizeof(int));
5643 ; return 0; }
5645 if { (eval echo configure:5646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5646 rm -rf conftest*
5647 ac_cv_header_alloca_h=yes
5648 else
5649 echo "configure: failed program was:" >&5
5650 cat conftest.$ac_ext >&5
5651 rm -rf conftest*
5652 ac_cv_header_alloca_h=no
5654 rm -f conftest*
5657 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
5658 if test $ac_cv_header_alloca_h = yes; then
5659 cat >> confdefs.h <<\EOF
5660 #define HAVE_ALLOCA_H 1
5665 echo $ac_n "checking for alloca""... $ac_c" 1>&6
5666 echo "configure:5667: checking for alloca" >&5
5667 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
5668 echo $ac_n "(cached) $ac_c" 1>&6
5669 else
5670 cat > conftest.$ac_ext <<EOF
5671 #line 5672 "configure"
5672 #include "confdefs.h"
5674 #ifdef __GNUC__
5675 # define alloca __builtin_alloca
5676 #else
5677 # ifdef _MSC_VER
5678 # include <malloc.h>
5679 # define alloca _alloca
5680 # else
5681 # if HAVE_ALLOCA_H
5682 # include <alloca.h>
5683 # else
5684 # ifdef _AIX
5685 #pragma alloca
5686 # else
5687 # ifndef alloca /* predefined by HP cc +Olibcalls */
5688 char *alloca ();
5689 # endif
5690 # endif
5691 # endif
5692 # endif
5693 #endif
5695 int main() {
5696 char *p = (char *) alloca(1);
5697 ; return 0; }
5699 if { (eval echo configure:5700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5700 rm -rf conftest*
5701 ac_cv_func_alloca_works=yes
5702 else
5703 echo "configure: failed program was:" >&5
5704 cat conftest.$ac_ext >&5
5705 rm -rf conftest*
5706 ac_cv_func_alloca_works=no
5708 rm -f conftest*
5711 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
5712 if test $ac_cv_func_alloca_works = yes; then
5713 cat >> confdefs.h <<\EOF
5714 #define HAVE_ALLOCA 1
5719 if test $ac_cv_func_alloca_works = no; then
5720 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
5721 # that cause trouble. Some versions do not even contain alloca or
5722 # contain a buggy version. If you still want to use their alloca,
5723 # use ar to extract alloca.o from them instead of compiling alloca.c.
5724 ALLOCA=alloca.${ac_objext}
5725 cat >> confdefs.h <<\EOF
5726 #define C_ALLOCA 1
5730 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
5731 echo "configure:5732: checking whether alloca needs Cray hooks" >&5
5732 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
5733 echo $ac_n "(cached) $ac_c" 1>&6
5734 else
5735 cat > conftest.$ac_ext <<EOF
5736 #line 5737 "configure"
5737 #include "confdefs.h"
5738 #if defined(CRAY) && ! defined(CRAY2)
5739 webecray
5740 #else
5741 wenotbecray
5742 #endif
5745 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5746 egrep "webecray" >/dev/null 2>&1; then
5747 rm -rf conftest*
5748 ac_cv_os_cray=yes
5749 else
5750 rm -rf conftest*
5751 ac_cv_os_cray=no
5753 rm -f conftest*
5757 echo "$ac_t""$ac_cv_os_cray" 1>&6
5758 if test $ac_cv_os_cray = yes; then
5759 for ac_func in _getb67 GETB67 getb67; do
5760 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5761 echo "configure:5762: checking for $ac_func" >&5
5762 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5763 echo $ac_n "(cached) $ac_c" 1>&6
5764 else
5765 cat > conftest.$ac_ext <<EOF
5766 #line 5767 "configure"
5767 #include "confdefs.h"
5768 /* System header to define __stub macros and hopefully few prototypes,
5769 which can conflict with char $ac_func(); below. */
5770 #include <assert.h>
5771 /* Override any gcc2 internal prototype to avoid an error. */
5772 /* We use char because int might match the return type of a gcc2
5773 builtin and then its argument prototype would still apply. */
5774 char $ac_func();
5776 int main() {
5778 /* The GNU C library defines this for functions which it implements
5779 to always fail with ENOSYS. Some functions are actually named
5780 something starting with __ and the normal name is an alias. */
5781 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5782 choke me
5783 #else
5784 $ac_func();
5785 #endif
5787 ; return 0; }
5789 if { (eval echo configure:5790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5790 rm -rf conftest*
5791 eval "ac_cv_func_$ac_func=yes"
5792 else
5793 echo "configure: failed program was:" >&5
5794 cat conftest.$ac_ext >&5
5795 rm -rf conftest*
5796 eval "ac_cv_func_$ac_func=no"
5798 rm -f conftest*
5801 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5802 echo "$ac_t""yes" 1>&6
5803 cat >> confdefs.h <<EOF
5804 #define CRAY_STACKSEG_END $ac_func
5807 break
5808 else
5809 echo "$ac_t""no" 1>&6
5812 done
5815 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
5816 echo "configure:5817: checking stack direction for C alloca" >&5
5817 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
5818 echo $ac_n "(cached) $ac_c" 1>&6
5819 else
5820 if test "$cross_compiling" = yes; then
5821 ac_cv_c_stack_direction=0
5822 else
5823 cat > conftest.$ac_ext <<EOF
5824 #line 5825 "configure"
5825 #include "confdefs.h"
5826 find_stack_direction ()
5828 static char *addr = 0;
5829 auto char dummy;
5830 if (addr == 0)
5832 addr = &dummy;
5833 return find_stack_direction ();
5835 else
5836 return (&dummy > addr) ? 1 : -1;
5838 main ()
5840 exit (find_stack_direction() < 0);
5843 if { (eval echo configure:5844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5844 then
5845 ac_cv_c_stack_direction=1
5846 else
5847 echo "configure: failed program was:" >&5
5848 cat conftest.$ac_ext >&5
5849 rm -fr conftest*
5850 ac_cv_c_stack_direction=-1
5852 rm -fr conftest*
5857 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
5858 cat >> confdefs.h <<EOF
5859 #define STACK_DIRECTION $ac_cv_c_stack_direction
5865 # fmod, logb, and frexp are found in -lm on most systems.
5866 # On HPUX 9.01, -lm does not contain logb, so check for sqrt.
5867 echo $ac_n "checking for sqrt in -lm""... $ac_c" 1>&6
5868 echo "configure:5869: checking for sqrt in -lm" >&5
5869 ac_lib_var=`echo m'_'sqrt | sed 'y%./+-%__p_%'`
5870 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5871 echo $ac_n "(cached) $ac_c" 1>&6
5872 else
5873 ac_save_LIBS="$LIBS"
5874 LIBS="-lm $LIBS"
5875 cat > conftest.$ac_ext <<EOF
5876 #line 5877 "configure"
5877 #include "confdefs.h"
5878 /* Override any gcc2 internal prototype to avoid an error. */
5879 /* We use char because int might match the return type of a gcc2
5880 builtin and then its argument prototype would still apply. */
5881 char sqrt();
5883 int main() {
5884 sqrt()
5885 ; return 0; }
5887 if { (eval echo configure:5888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5888 rm -rf conftest*
5889 eval "ac_cv_lib_$ac_lib_var=yes"
5890 else
5891 echo "configure: failed program was:" >&5
5892 cat conftest.$ac_ext >&5
5893 rm -rf conftest*
5894 eval "ac_cv_lib_$ac_lib_var=no"
5896 rm -f conftest*
5897 LIBS="$ac_save_LIBS"
5900 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5901 echo "$ac_t""yes" 1>&6
5902 ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5903 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5904 cat >> confdefs.h <<EOF
5905 #define $ac_tr_lib 1
5908 LIBS="-lm $LIBS"
5910 else
5911 echo "$ac_t""no" 1>&6
5915 # Check for mail-locking functions in a "mail" library
5916 echo $ac_n "checking for maillock in -lmail""... $ac_c" 1>&6
5917 echo "configure:5918: checking for maillock in -lmail" >&5
5918 ac_lib_var=`echo mail'_'maillock | sed 'y%./+-%__p_%'`
5919 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5920 echo $ac_n "(cached) $ac_c" 1>&6
5921 else
5922 ac_save_LIBS="$LIBS"
5923 LIBS="-lmail $LIBS"
5924 cat > conftest.$ac_ext <<EOF
5925 #line 5926 "configure"
5926 #include "confdefs.h"
5927 /* Override any gcc2 internal prototype to avoid an error. */
5928 /* We use char because int might match the return type of a gcc2
5929 builtin and then its argument prototype would still apply. */
5930 char maillock();
5932 int main() {
5933 maillock()
5934 ; return 0; }
5936 if { (eval echo configure:5937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5937 rm -rf conftest*
5938 eval "ac_cv_lib_$ac_lib_var=yes"
5939 else
5940 echo "configure: failed program was:" >&5
5941 cat conftest.$ac_ext >&5
5942 rm -rf conftest*
5943 eval "ac_cv_lib_$ac_lib_var=no"
5945 rm -f conftest*
5946 LIBS="$ac_save_LIBS"
5949 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5950 echo "$ac_t""yes" 1>&6
5951 ac_tr_lib=HAVE_LIB`echo mail | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5952 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5953 cat >> confdefs.h <<EOF
5954 #define $ac_tr_lib 1
5957 LIBS="-lmail $LIBS"
5959 else
5960 echo "$ac_t""no" 1>&6
5963 echo $ac_n "checking for maillock in -llockfile""... $ac_c" 1>&6
5964 echo "configure:5965: checking for maillock in -llockfile" >&5
5965 ac_lib_var=`echo lockfile'_'maillock | sed 'y%./+-%__p_%'`
5966 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5967 echo $ac_n "(cached) $ac_c" 1>&6
5968 else
5969 ac_save_LIBS="$LIBS"
5970 LIBS="-llockfile $LIBS"
5971 cat > conftest.$ac_ext <<EOF
5972 #line 5973 "configure"
5973 #include "confdefs.h"
5974 /* Override any gcc2 internal prototype to avoid an error. */
5975 /* We use char because int might match the return type of a gcc2
5976 builtin and then its argument prototype would still apply. */
5977 char maillock();
5979 int main() {
5980 maillock()
5981 ; return 0; }
5983 if { (eval echo configure:5984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5984 rm -rf conftest*
5985 eval "ac_cv_lib_$ac_lib_var=yes"
5986 else
5987 echo "configure: failed program was:" >&5
5988 cat conftest.$ac_ext >&5
5989 rm -rf conftest*
5990 eval "ac_cv_lib_$ac_lib_var=no"
5992 rm -f conftest*
5993 LIBS="$ac_save_LIBS"
5996 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5997 echo "$ac_t""yes" 1>&6
5998 ac_tr_lib=HAVE_LIB`echo lockfile | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5999 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6000 cat >> confdefs.h <<EOF
6001 #define $ac_tr_lib 1
6004 LIBS="-llockfile $LIBS"
6006 else
6007 echo "$ac_t""no" 1>&6
6010 # If we have the shared liblockfile, assume we must use it for mail
6011 # locking (e.g. Debian). If we couldn't link against liblockfile
6012 # (no liblockfile.a installed), ensure that we don't need to.
6013 if test "$ac_cv_lib_lockfile_maillock" = no; then
6014 # Extract the first word of "liblockfile.so", so it can be a program name with args.
6015 set dummy liblockfile.so; ac_word=$2
6016 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6017 echo "configure:6018: checking for $ac_word" >&5
6018 if eval "test \"`echo '$''{'ac_cv_prog_liblockfile'+set}'`\" = set"; then
6019 echo $ac_n "(cached) $ac_c" 1>&6
6020 else
6021 if test -n "$liblockfile"; then
6022 ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
6023 else
6024 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6025 ac_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
6026 for ac_dir in $ac_dummy; do
6027 test -z "$ac_dir" && ac_dir=.
6028 if test -f $ac_dir/$ac_word; then
6029 ac_cv_prog_liblockfile="yes"
6030 break
6032 done
6033 IFS="$ac_save_ifs"
6034 test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
6037 liblockfile="$ac_cv_prog_liblockfile"
6038 if test -n "$liblockfile"; then
6039 echo "$ac_t""$liblockfile" 1>&6
6040 else
6041 echo "$ac_t""no" 1>&6
6044 if test $ac_cv_prog_liblockfile = yes; then
6045 { echo "configure: error: Shared liblockfile found but can't link against it.
6046 This probably means that movemail could lose mail.
6047 There may be a \`development' package to install containing liblockfile." 1>&2; exit 1; }
6048 else cat >> confdefs.h <<\EOF
6049 #define LIBMAIL -llockfile
6053 else :
6055 for ac_func in touchlock
6057 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6058 echo "configure:6059: checking for $ac_func" >&5
6059 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6060 echo $ac_n "(cached) $ac_c" 1>&6
6061 else
6062 cat > conftest.$ac_ext <<EOF
6063 #line 6064 "configure"
6064 #include "confdefs.h"
6065 /* System header to define __stub macros and hopefully few prototypes,
6066 which can conflict with char $ac_func(); below. */
6067 #include <assert.h>
6068 /* Override any gcc2 internal prototype to avoid an error. */
6069 /* We use char because int might match the return type of a gcc2
6070 builtin and then its argument prototype would still apply. */
6071 char $ac_func();
6073 int main() {
6075 /* The GNU C library defines this for functions which it implements
6076 to always fail with ENOSYS. Some functions are actually named
6077 something starting with __ and the normal name is an alias. */
6078 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6079 choke me
6080 #else
6081 $ac_func();
6082 #endif
6084 ; return 0; }
6086 if { (eval echo configure:6087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6087 rm -rf conftest*
6088 eval "ac_cv_func_$ac_func=yes"
6089 else
6090 echo "configure: failed program was:" >&5
6091 cat conftest.$ac_ext >&5
6092 rm -rf conftest*
6093 eval "ac_cv_func_$ac_func=no"
6095 rm -f conftest*
6098 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6099 echo "$ac_t""yes" 1>&6
6100 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6101 cat >> confdefs.h <<EOF
6102 #define $ac_tr_func 1
6105 else
6106 echo "$ac_t""no" 1>&6
6108 done
6110 for ac_hdr in maillock.h
6112 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6113 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6114 echo "configure:6115: checking for $ac_hdr" >&5
6115 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6116 echo $ac_n "(cached) $ac_c" 1>&6
6117 else
6118 cat > conftest.$ac_ext <<EOF
6119 #line 6120 "configure"
6120 #include "confdefs.h"
6121 #include <$ac_hdr>
6123 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6124 { (eval echo configure:6125: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6125 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6126 if test -z "$ac_err"; then
6127 rm -rf conftest*
6128 eval "ac_cv_header_$ac_safe=yes"
6129 else
6130 echo "$ac_err" >&5
6131 echo "configure: failed program was:" >&5
6132 cat conftest.$ac_ext >&5
6133 rm -rf conftest*
6134 eval "ac_cv_header_$ac_safe=no"
6136 rm -f conftest*
6138 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6139 echo "$ac_t""yes" 1>&6
6140 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6141 cat >> confdefs.h <<EOF
6142 #define $ac_tr_hdr 1
6145 else
6146 echo "$ac_t""no" 1>&6
6148 done
6151 for ac_func in gethostname getdomainname dup2 \
6152 rename closedir mkdir rmdir sysinfo \
6153 random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime res_init setsid \
6154 strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \
6155 utimes setrlimit setpgid getcwd getwd shutdown strftime getaddrinfo \
6156 __fpending mblen mbrlen strsignal setitimer ualarm index rindex \
6157 gai_strerror mkstemp
6159 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6160 echo "configure:6161: checking for $ac_func" >&5
6161 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6162 echo $ac_n "(cached) $ac_c" 1>&6
6163 else
6164 cat > conftest.$ac_ext <<EOF
6165 #line 6166 "configure"
6166 #include "confdefs.h"
6167 /* System header to define __stub macros and hopefully few prototypes,
6168 which can conflict with char $ac_func(); below. */
6169 #include <assert.h>
6170 /* Override any gcc2 internal prototype to avoid an error. */
6171 /* We use char because int might match the return type of a gcc2
6172 builtin and then its argument prototype would still apply. */
6173 char $ac_func();
6175 int main() {
6177 /* The GNU C library defines this for functions which it implements
6178 to always fail with ENOSYS. Some functions are actually named
6179 something starting with __ and the normal name is an alias. */
6180 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6181 choke me
6182 #else
6183 $ac_func();
6184 #endif
6186 ; return 0; }
6188 if { (eval echo configure:6189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6189 rm -rf conftest*
6190 eval "ac_cv_func_$ac_func=yes"
6191 else
6192 echo "configure: failed program was:" >&5
6193 cat conftest.$ac_ext >&5
6194 rm -rf conftest*
6195 eval "ac_cv_func_$ac_func=no"
6197 rm -f conftest*
6200 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6201 echo "$ac_t""yes" 1>&6
6202 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6203 cat >> confdefs.h <<EOF
6204 #define $ac_tr_func 1
6207 else
6208 echo "$ac_t""no" 1>&6
6210 done
6213 for ac_hdr in sys/time.h unistd.h
6215 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6216 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6217 echo "configure:6218: checking for $ac_hdr" >&5
6218 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6219 echo $ac_n "(cached) $ac_c" 1>&6
6220 else
6221 cat > conftest.$ac_ext <<EOF
6222 #line 6223 "configure"
6223 #include "confdefs.h"
6224 #include <$ac_hdr>
6226 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6227 { (eval echo configure:6228: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6228 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6229 if test -z "$ac_err"; then
6230 rm -rf conftest*
6231 eval "ac_cv_header_$ac_safe=yes"
6232 else
6233 echo "$ac_err" >&5
6234 echo "configure: failed program was:" >&5
6235 cat conftest.$ac_ext >&5
6236 rm -rf conftest*
6237 eval "ac_cv_header_$ac_safe=no"
6239 rm -f conftest*
6241 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6242 echo "$ac_t""yes" 1>&6
6243 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6244 cat >> confdefs.h <<EOF
6245 #define $ac_tr_hdr 1
6248 else
6249 echo "$ac_t""no" 1>&6
6251 done
6253 for ac_func in alarm
6255 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6256 echo "configure:6257: checking for $ac_func" >&5
6257 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6258 echo $ac_n "(cached) $ac_c" 1>&6
6259 else
6260 cat > conftest.$ac_ext <<EOF
6261 #line 6262 "configure"
6262 #include "confdefs.h"
6263 /* System header to define __stub macros and hopefully few prototypes,
6264 which can conflict with char $ac_func(); below. */
6265 #include <assert.h>
6266 /* Override any gcc2 internal prototype to avoid an error. */
6267 /* We use char because int might match the return type of a gcc2
6268 builtin and then its argument prototype would still apply. */
6269 char $ac_func();
6271 int main() {
6273 /* The GNU C library defines this for functions which it implements
6274 to always fail with ENOSYS. Some functions are actually named
6275 something starting with __ and the normal name is an alias. */
6276 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6277 choke me
6278 #else
6279 $ac_func();
6280 #endif
6282 ; return 0; }
6284 if { (eval echo configure:6285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6285 rm -rf conftest*
6286 eval "ac_cv_func_$ac_func=yes"
6287 else
6288 echo "configure: failed program was:" >&5
6289 cat conftest.$ac_ext >&5
6290 rm -rf conftest*
6291 eval "ac_cv_func_$ac_func=no"
6293 rm -f conftest*
6296 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6297 echo "$ac_t""yes" 1>&6
6298 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6299 cat >> confdefs.h <<EOF
6300 #define $ac_tr_func 1
6303 else
6304 echo "$ac_t""no" 1>&6
6306 done
6308 echo $ac_n "checking for working mktime""... $ac_c" 1>&6
6309 echo "configure:6310: checking for working mktime" >&5
6310 if eval "test \"`echo '$''{'ac_cv_func_working_mktime'+set}'`\" = set"; then
6311 echo $ac_n "(cached) $ac_c" 1>&6
6312 else
6313 if test "$cross_compiling" = yes; then
6314 ac_cv_func_working_mktime=no
6315 else
6316 cat > conftest.$ac_ext <<EOF
6317 #line 6318 "configure"
6318 #include "confdefs.h"
6319 /* Test program from Paul Eggert (eggert@twinsun.com)
6320 and Tony Leneis (tony@plaza.ds.adp.com). */
6321 #if TIME_WITH_SYS_TIME
6322 # include <sys/time.h>
6323 # include <time.h>
6324 #else
6325 # if HAVE_SYS_TIME_H
6326 # include <sys/time.h>
6327 # else
6328 # include <time.h>
6329 # endif
6330 #endif
6332 #if HAVE_UNISTD_H
6333 # include <unistd.h>
6334 #endif
6336 #if !HAVE_ALARM
6337 # define alarm(X) /* empty */
6338 #endif
6340 /* Work around redefinition to rpl_putenv by other config tests. */
6341 #undef putenv
6343 static time_t time_t_max;
6345 /* Values we'll use to set the TZ environment variable. */
6346 static const char *const tz_strings[] = {
6347 (const char *) 0, "TZ=GMT0", "TZ=JST-9",
6348 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
6350 #define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
6352 /* Fail if mktime fails to convert a date in the spring-forward gap.
6353 Based on a problem report from Andreas Jaeger. */
6354 static void
6355 spring_forward_gap ()
6357 /* glibc (up to about 1998-10-07) failed this test) */
6358 struct tm tm;
6360 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
6361 instead of "TZ=America/Vancouver" in order to detect the bug even
6362 on systems that don't support the Olson extension, or don't have the
6363 full zoneinfo tables installed. */
6364 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
6366 tm.tm_year = 98;
6367 tm.tm_mon = 3;
6368 tm.tm_mday = 5;
6369 tm.tm_hour = 2;
6370 tm.tm_min = 0;
6371 tm.tm_sec = 0;
6372 tm.tm_isdst = -1;
6373 if (mktime (&tm) == (time_t)-1)
6374 exit (1);
6377 static void
6378 mktime_test (now)
6379 time_t now;
6381 struct tm *lt;
6382 if ((lt = localtime (&now)) && mktime (lt) != now)
6383 exit (1);
6384 now = time_t_max - now;
6385 if ((lt = localtime (&now)) && mktime (lt) != now)
6386 exit (1);
6389 static void
6390 irix_6_4_bug ()
6392 /* Based on code from Ariel Faigon. */
6393 struct tm tm;
6394 tm.tm_year = 96;
6395 tm.tm_mon = 3;
6396 tm.tm_mday = 0;
6397 tm.tm_hour = 0;
6398 tm.tm_min = 0;
6399 tm.tm_sec = 0;
6400 tm.tm_isdst = -1;
6401 mktime (&tm);
6402 if (tm.tm_mon != 2 || tm.tm_mday != 31)
6403 exit (1);
6406 static void
6407 bigtime_test (j)
6408 int j;
6410 struct tm tm;
6411 time_t now;
6412 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
6413 now = mktime (&tm);
6414 if (now != (time_t) -1)
6416 struct tm *lt = localtime (&now);
6417 if (! (lt
6418 && lt->tm_year == tm.tm_year
6419 && lt->tm_mon == tm.tm_mon
6420 && lt->tm_mday == tm.tm_mday
6421 && lt->tm_hour == tm.tm_hour
6422 && lt->tm_min == tm.tm_min
6423 && lt->tm_sec == tm.tm_sec
6424 && lt->tm_yday == tm.tm_yday
6425 && lt->tm_wday == tm.tm_wday
6426 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
6427 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
6428 exit (1);
6433 main ()
6435 time_t t, delta;
6436 int i, j;
6438 /* This test makes some buggy mktime implementations loop.
6439 Give up after 60 seconds; a mktime slower than that
6440 isn't worth using anyway. */
6441 alarm (60);
6443 for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2)
6444 continue;
6445 time_t_max--;
6446 delta = time_t_max / 997; /* a suitable prime number */
6447 for (i = 0; i < N_STRINGS; i++)
6449 if (tz_strings[i])
6450 putenv (tz_strings[i]);
6452 for (t = 0; t <= time_t_max - delta; t += delta)
6453 mktime_test (t);
6454 mktime_test ((time_t) 60 * 60);
6455 mktime_test ((time_t) 60 * 60 * 24);
6457 for (j = 1; 0 < j; j *= 2)
6458 bigtime_test (j);
6459 bigtime_test (j - 1);
6461 irix_6_4_bug ();
6462 spring_forward_gap ();
6463 exit (0);
6466 if { (eval echo configure:6467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6467 then
6468 ac_cv_func_working_mktime=yes
6469 else
6470 echo "configure: failed program was:" >&5
6471 cat conftest.$ac_ext >&5
6472 rm -fr conftest*
6473 ac_cv_func_working_mktime=no
6475 rm -fr conftest*
6480 echo "$ac_t""$ac_cv_func_working_mktime" 1>&6
6481 if test $ac_cv_func_working_mktime = no; then
6482 LIBOBJS="$LIBOBJS mktime.${ac_objext}"
6485 if test "$ac_cv_func_working_mktime" = no; then
6486 cat >> confdefs.h <<\EOF
6487 #define BROKEN_MKTIME 1
6492 ac_have_func=no # yes means we've found a way to get the load average.
6494 # Some systems have getloadavg without any extra libraries.
6495 echo $ac_n "checking for getloadavg""... $ac_c" 1>&6
6496 echo "configure:6497: checking for getloadavg" >&5
6497 if eval "test \"`echo '$''{'ac_cv_func_getloadavg'+set}'`\" = set"; then
6498 echo $ac_n "(cached) $ac_c" 1>&6
6499 else
6500 cat > conftest.$ac_ext <<EOF
6501 #line 6502 "configure"
6502 #include "confdefs.h"
6503 /* System header to define __stub macros and hopefully few prototypes,
6504 which can conflict with char getloadavg(); below. */
6505 #include <assert.h>
6506 /* Override any gcc2 internal prototype to avoid an error. */
6507 /* We use char because int might match the return type of a gcc2
6508 builtin and then its argument prototype would still apply. */
6509 char getloadavg();
6511 int main() {
6513 /* The GNU C library defines this for functions which it implements
6514 to always fail with ENOSYS. Some functions are actually named
6515 something starting with __ and the normal name is an alias. */
6516 #if defined (__stub_getloadavg) || defined (__stub___getloadavg)
6517 choke me
6518 #else
6519 getloadavg();
6520 #endif
6522 ; return 0; }
6524 if { (eval echo configure:6525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6525 rm -rf conftest*
6526 eval "ac_cv_func_getloadavg=yes"
6527 else
6528 echo "configure: failed program was:" >&5
6529 cat conftest.$ac_ext >&5
6530 rm -rf conftest*
6531 eval "ac_cv_func_getloadavg=no"
6533 rm -f conftest*
6536 if eval "test \"`echo '$ac_cv_func_'getloadavg`\" = yes"; then
6537 echo "$ac_t""yes" 1>&6
6538 ac_have_func=yes
6539 else
6540 echo "$ac_t""no" 1>&6
6544 if test $ac_have_func = no; then
6545 # Some systems with -lutil have (and need) -lkvm as well, some do not.
6546 # On Solaris, -lkvm requires nlist from -lelf, so check that first
6547 # to get the right answer into the cache.
6548 echo $ac_n "checking for elf_begin in -lelf""... $ac_c" 1>&6
6549 echo "configure:6550: checking for elf_begin in -lelf" >&5
6550 ac_lib_var=`echo elf'_'elf_begin | sed 'y%./+-%__p_%'`
6551 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6552 echo $ac_n "(cached) $ac_c" 1>&6
6553 else
6554 ac_save_LIBS="$LIBS"
6555 LIBS="-lelf $LIBS"
6556 cat > conftest.$ac_ext <<EOF
6557 #line 6558 "configure"
6558 #include "confdefs.h"
6559 /* Override any gcc2 internal prototype to avoid an error. */
6560 /* We use char because int might match the return type of a gcc2
6561 builtin and then its argument prototype would still apply. */
6562 char elf_begin();
6564 int main() {
6565 elf_begin()
6566 ; return 0; }
6568 if { (eval echo configure:6569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6569 rm -rf conftest*
6570 eval "ac_cv_lib_$ac_lib_var=yes"
6571 else
6572 echo "configure: failed program was:" >&5
6573 cat conftest.$ac_ext >&5
6574 rm -rf conftest*
6575 eval "ac_cv_lib_$ac_lib_var=no"
6577 rm -f conftest*
6578 LIBS="$ac_save_LIBS"
6581 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6582 echo "$ac_t""yes" 1>&6
6583 LIBS="-lelf $LIBS"
6584 else
6585 echo "$ac_t""no" 1>&6
6588 echo $ac_n "checking for kvm_open in -lkvm""... $ac_c" 1>&6
6589 echo "configure:6590: checking for kvm_open in -lkvm" >&5
6590 ac_lib_var=`echo kvm'_'kvm_open | sed 'y%./+-%__p_%'`
6591 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6592 echo $ac_n "(cached) $ac_c" 1>&6
6593 else
6594 ac_save_LIBS="$LIBS"
6595 LIBS="-lkvm $LIBS"
6596 cat > conftest.$ac_ext <<EOF
6597 #line 6598 "configure"
6598 #include "confdefs.h"
6599 /* Override any gcc2 internal prototype to avoid an error. */
6600 /* We use char because int might match the return type of a gcc2
6601 builtin and then its argument prototype would still apply. */
6602 char kvm_open();
6604 int main() {
6605 kvm_open()
6606 ; return 0; }
6608 if { (eval echo configure:6609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6609 rm -rf conftest*
6610 eval "ac_cv_lib_$ac_lib_var=yes"
6611 else
6612 echo "configure: failed program was:" >&5
6613 cat conftest.$ac_ext >&5
6614 rm -rf conftest*
6615 eval "ac_cv_lib_$ac_lib_var=no"
6617 rm -f conftest*
6618 LIBS="$ac_save_LIBS"
6621 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6622 echo "$ac_t""yes" 1>&6
6623 LIBS="-lkvm $LIBS"
6624 else
6625 echo "$ac_t""no" 1>&6
6628 # Check for the 4.4BSD definition of getloadavg.
6629 echo $ac_n "checking for getloadavg in -lutil""... $ac_c" 1>&6
6630 echo "configure:6631: checking for getloadavg in -lutil" >&5
6631 ac_lib_var=`echo util'_'getloadavg | sed 'y%./+-%__p_%'`
6632 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6633 echo $ac_n "(cached) $ac_c" 1>&6
6634 else
6635 ac_save_LIBS="$LIBS"
6636 LIBS="-lutil $LIBS"
6637 cat > conftest.$ac_ext <<EOF
6638 #line 6639 "configure"
6639 #include "confdefs.h"
6640 /* Override any gcc2 internal prototype to avoid an error. */
6641 /* We use char because int might match the return type of a gcc2
6642 builtin and then its argument prototype would still apply. */
6643 char getloadavg();
6645 int main() {
6646 getloadavg()
6647 ; return 0; }
6649 if { (eval echo configure:6650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6650 rm -rf conftest*
6651 eval "ac_cv_lib_$ac_lib_var=yes"
6652 else
6653 echo "configure: failed program was:" >&5
6654 cat conftest.$ac_ext >&5
6655 rm -rf conftest*
6656 eval "ac_cv_lib_$ac_lib_var=no"
6658 rm -f conftest*
6659 LIBS="$ac_save_LIBS"
6662 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6663 echo "$ac_t""yes" 1>&6
6664 LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes
6665 else
6666 echo "$ac_t""no" 1>&6
6671 if test $ac_have_func = no; then
6672 # There is a commonly available library for RS/6000 AIX.
6673 # Since it is not a standard part of AIX, it might be installed locally.
6674 ac_getloadavg_LIBS="$LIBS"; LIBS="-L/usr/local/lib $LIBS"
6675 echo $ac_n "checking for getloadavg in -lgetloadavg""... $ac_c" 1>&6
6676 echo "configure:6677: checking for getloadavg in -lgetloadavg" >&5
6677 ac_lib_var=`echo getloadavg'_'getloadavg | sed 'y%./+-%__p_%'`
6678 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6679 echo $ac_n "(cached) $ac_c" 1>&6
6680 else
6681 ac_save_LIBS="$LIBS"
6682 LIBS="-lgetloadavg $LIBS"
6683 cat > conftest.$ac_ext <<EOF
6684 #line 6685 "configure"
6685 #include "confdefs.h"
6686 /* Override any gcc2 internal prototype to avoid an error. */
6687 /* We use char because int might match the return type of a gcc2
6688 builtin and then its argument prototype would still apply. */
6689 char getloadavg();
6691 int main() {
6692 getloadavg()
6693 ; return 0; }
6695 if { (eval echo configure:6696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6696 rm -rf conftest*
6697 eval "ac_cv_lib_$ac_lib_var=yes"
6698 else
6699 echo "configure: failed program was:" >&5
6700 cat conftest.$ac_ext >&5
6701 rm -rf conftest*
6702 eval "ac_cv_lib_$ac_lib_var=no"
6704 rm -f conftest*
6705 LIBS="$ac_save_LIBS"
6708 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6709 echo "$ac_t""yes" 1>&6
6710 LIBS="-lgetloadavg $LIBS"
6711 else
6712 echo "$ac_t""no" 1>&6
6713 LIBS="$ac_getloadavg_LIBS"
6718 # Make sure it is really in the library, if we think we found it.
6719 for ac_func in getloadavg
6721 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6722 echo "configure:6723: checking for $ac_func" >&5
6723 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6724 echo $ac_n "(cached) $ac_c" 1>&6
6725 else
6726 cat > conftest.$ac_ext <<EOF
6727 #line 6728 "configure"
6728 #include "confdefs.h"
6729 /* System header to define __stub macros and hopefully few prototypes,
6730 which can conflict with char $ac_func(); below. */
6731 #include <assert.h>
6732 /* Override any gcc2 internal prototype to avoid an error. */
6733 /* We use char because int might match the return type of a gcc2
6734 builtin and then its argument prototype would still apply. */
6735 char $ac_func();
6737 int main() {
6739 /* The GNU C library defines this for functions which it implements
6740 to always fail with ENOSYS. Some functions are actually named
6741 something starting with __ and the normal name is an alias. */
6742 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6743 choke me
6744 #else
6745 $ac_func();
6746 #endif
6748 ; return 0; }
6750 if { (eval echo configure:6751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6751 rm -rf conftest*
6752 eval "ac_cv_func_$ac_func=yes"
6753 else
6754 echo "configure: failed program was:" >&5
6755 cat conftest.$ac_ext >&5
6756 rm -rf conftest*
6757 eval "ac_cv_func_$ac_func=no"
6759 rm -f conftest*
6762 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6763 echo "$ac_t""yes" 1>&6
6764 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6765 cat >> confdefs.h <<EOF
6766 #define $ac_tr_func 1
6769 else
6770 echo "$ac_t""no" 1>&6
6771 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
6773 done
6777 if test $ac_cv_func_getloadavg = yes; then
6778 cat >> confdefs.h <<\EOF
6779 #define HAVE_GETLOADAVG 1
6782 ac_have_func=yes
6783 else
6784 # Figure out what our getloadavg.c needs.
6785 ac_have_func=no
6786 ac_safe=`echo "sys/dg_sys_info.h" | sed 'y%./+-%__p_%'`
6787 echo $ac_n "checking for sys/dg_sys_info.h""... $ac_c" 1>&6
6788 echo "configure:6789: checking for sys/dg_sys_info.h" >&5
6789 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6790 echo $ac_n "(cached) $ac_c" 1>&6
6791 else
6792 cat > conftest.$ac_ext <<EOF
6793 #line 6794 "configure"
6794 #include "confdefs.h"
6795 #include <sys/dg_sys_info.h>
6797 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6798 { (eval echo configure:6799: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6799 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6800 if test -z "$ac_err"; then
6801 rm -rf conftest*
6802 eval "ac_cv_header_$ac_safe=yes"
6803 else
6804 echo "$ac_err" >&5
6805 echo "configure: failed program was:" >&5
6806 cat conftest.$ac_ext >&5
6807 rm -rf conftest*
6808 eval "ac_cv_header_$ac_safe=no"
6810 rm -f conftest*
6812 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6813 echo "$ac_t""yes" 1>&6
6814 ac_have_func=yes; cat >> confdefs.h <<\EOF
6815 #define DGUX 1
6818 echo $ac_n "checking for dg_sys_info in -ldgc""... $ac_c" 1>&6
6819 echo "configure:6820: checking for dg_sys_info in -ldgc" >&5
6820 ac_lib_var=`echo dgc'_'dg_sys_info | sed 'y%./+-%__p_%'`
6821 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6822 echo $ac_n "(cached) $ac_c" 1>&6
6823 else
6824 ac_save_LIBS="$LIBS"
6825 LIBS="-ldgc $LIBS"
6826 cat > conftest.$ac_ext <<EOF
6827 #line 6828 "configure"
6828 #include "confdefs.h"
6829 /* Override any gcc2 internal prototype to avoid an error. */
6830 /* We use char because int might match the return type of a gcc2
6831 builtin and then its argument prototype would still apply. */
6832 char dg_sys_info();
6834 int main() {
6835 dg_sys_info()
6836 ; return 0; }
6838 if { (eval echo configure:6839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6839 rm -rf conftest*
6840 eval "ac_cv_lib_$ac_lib_var=yes"
6841 else
6842 echo "configure: failed program was:" >&5
6843 cat conftest.$ac_ext >&5
6844 rm -rf conftest*
6845 eval "ac_cv_lib_$ac_lib_var=no"
6847 rm -f conftest*
6848 LIBS="$ac_save_LIBS"
6851 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6852 echo "$ac_t""yes" 1>&6
6853 ac_tr_lib=HAVE_LIB`echo dgc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6854 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6855 cat >> confdefs.h <<EOF
6856 #define $ac_tr_lib 1
6859 LIBS="-ldgc $LIBS"
6861 else
6862 echo "$ac_t""no" 1>&6
6865 else
6866 echo "$ac_t""no" 1>&6
6870 # We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
6871 # uses stabs), but it is still SVR4. We cannot check for <elf.h> because
6872 # Irix 4.0.5F has the header but not the library.
6873 if test $ac_have_func = no && test $ac_cv_lib_elf_elf_begin = yes; then
6874 ac_have_func=yes; cat >> confdefs.h <<\EOF
6875 #define SVR4 1
6880 if test $ac_have_func = no; then
6881 ac_safe=`echo "inq_stats/cpustats.h" | sed 'y%./+-%__p_%'`
6882 echo $ac_n "checking for inq_stats/cpustats.h""... $ac_c" 1>&6
6883 echo "configure:6884: checking for inq_stats/cpustats.h" >&5
6884 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6885 echo $ac_n "(cached) $ac_c" 1>&6
6886 else
6887 cat > conftest.$ac_ext <<EOF
6888 #line 6889 "configure"
6889 #include "confdefs.h"
6890 #include <inq_stats/cpustats.h>
6892 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6893 { (eval echo configure:6894: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6894 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6895 if test -z "$ac_err"; then
6896 rm -rf conftest*
6897 eval "ac_cv_header_$ac_safe=yes"
6898 else
6899 echo "$ac_err" >&5
6900 echo "configure: failed program was:" >&5
6901 cat conftest.$ac_ext >&5
6902 rm -rf conftest*
6903 eval "ac_cv_header_$ac_safe=no"
6905 rm -f conftest*
6907 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6908 echo "$ac_t""yes" 1>&6
6909 ac_have_func=yes; cat >> confdefs.h <<\EOF
6910 #define UMAX 1
6913 cat >> confdefs.h <<\EOF
6914 #define UMAX4_3 1
6917 else
6918 echo "$ac_t""no" 1>&6
6923 if test $ac_have_func = no; then
6924 ac_safe=`echo "sys/cpustats.h" | sed 'y%./+-%__p_%'`
6925 echo $ac_n "checking for sys/cpustats.h""... $ac_c" 1>&6
6926 echo "configure:6927: checking for sys/cpustats.h" >&5
6927 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6928 echo $ac_n "(cached) $ac_c" 1>&6
6929 else
6930 cat > conftest.$ac_ext <<EOF
6931 #line 6932 "configure"
6932 #include "confdefs.h"
6933 #include <sys/cpustats.h>
6935 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6936 { (eval echo configure:6937: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6937 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6938 if test -z "$ac_err"; then
6939 rm -rf conftest*
6940 eval "ac_cv_header_$ac_safe=yes"
6941 else
6942 echo "$ac_err" >&5
6943 echo "configure: failed program was:" >&5
6944 cat conftest.$ac_ext >&5
6945 rm -rf conftest*
6946 eval "ac_cv_header_$ac_safe=no"
6948 rm -f conftest*
6950 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6951 echo "$ac_t""yes" 1>&6
6952 ac_have_func=yes; cat >> confdefs.h <<\EOF
6953 #define UMAX 1
6956 else
6957 echo "$ac_t""no" 1>&6
6962 if test $ac_have_func = no; then
6963 for ac_hdr in mach/mach.h
6965 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6966 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6967 echo "configure:6968: checking for $ac_hdr" >&5
6968 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6969 echo $ac_n "(cached) $ac_c" 1>&6
6970 else
6971 cat > conftest.$ac_ext <<EOF
6972 #line 6973 "configure"
6973 #include "confdefs.h"
6974 #include <$ac_hdr>
6976 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6977 { (eval echo configure:6978: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6978 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6979 if test -z "$ac_err"; then
6980 rm -rf conftest*
6981 eval "ac_cv_header_$ac_safe=yes"
6982 else
6983 echo "$ac_err" >&5
6984 echo "configure: failed program was:" >&5
6985 cat conftest.$ac_ext >&5
6986 rm -rf conftest*
6987 eval "ac_cv_header_$ac_safe=no"
6989 rm -f conftest*
6991 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6992 echo "$ac_t""yes" 1>&6
6993 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6994 cat >> confdefs.h <<EOF
6995 #define $ac_tr_hdr 1
6998 else
6999 echo "$ac_t""no" 1>&6
7001 done
7005 ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'`
7006 echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
7007 echo "configure:7008: checking for nlist.h" >&5
7008 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7009 echo $ac_n "(cached) $ac_c" 1>&6
7010 else
7011 cat > conftest.$ac_ext <<EOF
7012 #line 7013 "configure"
7013 #include "confdefs.h"
7014 #include <nlist.h>
7016 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7017 { (eval echo configure:7018: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7018 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7019 if test -z "$ac_err"; then
7020 rm -rf conftest*
7021 eval "ac_cv_header_$ac_safe=yes"
7022 else
7023 echo "$ac_err" >&5
7024 echo "configure: failed program was:" >&5
7025 cat conftest.$ac_ext >&5
7026 rm -rf conftest*
7027 eval "ac_cv_header_$ac_safe=no"
7029 rm -f conftest*
7031 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7032 echo "$ac_t""yes" 1>&6
7033 cat >> confdefs.h <<\EOF
7034 #define NLIST_STRUCT 1
7037 echo $ac_n "checking for n_un in struct nlist""... $ac_c" 1>&6
7038 echo "configure:7039: checking for n_un in struct nlist" >&5
7039 if eval "test \"`echo '$''{'ac_cv_struct_nlist_n_un'+set}'`\" = set"; then
7040 echo $ac_n "(cached) $ac_c" 1>&6
7041 else
7042 cat > conftest.$ac_ext <<EOF
7043 #line 7044 "configure"
7044 #include "confdefs.h"
7045 #include <nlist.h>
7046 int main() {
7047 struct nlist n; n.n_un.n_name = 0;
7048 ; return 0; }
7050 if { (eval echo configure:7051: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7051 rm -rf conftest*
7052 ac_cv_struct_nlist_n_un=yes
7053 else
7054 echo "configure: failed program was:" >&5
7055 cat conftest.$ac_ext >&5
7056 rm -rf conftest*
7057 ac_cv_struct_nlist_n_un=no
7059 rm -f conftest*
7062 echo "$ac_t""$ac_cv_struct_nlist_n_un" 1>&6
7063 if test $ac_cv_struct_nlist_n_un = yes; then
7064 cat >> confdefs.h <<\EOF
7065 #define NLIST_NAME_UNION 1
7070 else
7071 echo "$ac_t""no" 1>&6
7073 fi # Do not have getloadavg in system libraries.
7075 # Some definitions of getloadavg require that the program be installed setgid.
7076 echo $ac_n "checking whether getloadavg requires setgid""... $ac_c" 1>&6
7077 echo "configure:7078: checking whether getloadavg requires setgid" >&5
7078 if eval "test \"`echo '$''{'ac_cv_func_getloadavg_setgid'+set}'`\" = set"; then
7079 echo $ac_n "(cached) $ac_c" 1>&6
7080 else
7081 cat > conftest.$ac_ext <<EOF
7082 #line 7083 "configure"
7083 #include "confdefs.h"
7084 #include "$srcdir/getloadavg.c"
7085 #ifdef LDAV_PRIVILEGED
7086 Yowza Am I SETGID yet
7087 #endif
7089 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7090 egrep "Yowza Am I SETGID yet" >/dev/null 2>&1; then
7091 rm -rf conftest*
7092 ac_cv_func_getloadavg_setgid=yes
7093 else
7094 rm -rf conftest*
7095 ac_cv_func_getloadavg_setgid=no
7097 rm -f conftest*
7101 echo "$ac_t""$ac_cv_func_getloadavg_setgid" 1>&6
7102 if test $ac_cv_func_getloadavg_setgid = yes; then
7103 NEED_SETGID=true; cat >> confdefs.h <<\EOF
7104 #define GETLOADAVG_PRIVILEGED 1
7107 else
7108 NEED_SETGID=false
7111 if test $ac_cv_func_getloadavg_setgid = yes; then
7112 echo $ac_n "checking group of /dev/kmem""... $ac_c" 1>&6
7113 echo "configure:7114: checking group of /dev/kmem" >&5
7114 if eval "test \"`echo '$''{'ac_cv_group_kmem'+set}'`\" = set"; then
7115 echo $ac_n "(cached) $ac_c" 1>&6
7116 else
7117 # On Solaris, /dev/kmem is a symlink. Get info on the real file.
7118 ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null`
7119 # If we got an error (system does not support symlinks), try without -L.
7120 test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem`
7121 ac_cv_group_kmem=`echo $ac_ls_output \
7122 | sed -ne 's/[ ][ ]*/ /g;
7123 s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/;
7124 / /s/.* //;p;'`
7128 echo "$ac_t""$ac_cv_group_kmem" 1>&6
7129 KMEM_GROUP=$ac_cv_group_kmem
7133 echo $ac_n "checking for _LARGEFILE_SOURCE value needed for large files""... $ac_c" 1>&6
7134 echo "configure:7135: checking for _LARGEFILE_SOURCE value needed for large files" >&5
7135 if eval "test \"`echo '$''{'ac_cv_sys_largefile_source'+set}'`\" = set"; then
7136 echo $ac_n "(cached) $ac_c" 1>&6
7137 else
7138 ac_cv_sys_largefile_source=no
7139 cat > conftest.$ac_ext <<EOF
7140 #line 7141 "configure"
7141 #include "confdefs.h"
7142 #include <stdio.h>
7143 int main() {
7144 return !fseeko;
7145 ; return 0; }
7147 if { (eval echo configure:7148: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7149 else
7150 echo "configure: failed program was:" >&5
7151 cat conftest.$ac_ext >&5
7152 rm -rf conftest*
7153 cat > conftest.$ac_ext <<EOF
7154 #line 7155 "configure"
7155 #include "confdefs.h"
7156 #define _LARGEFILE_SOURCE 1
7157 #include <stdio.h>
7159 int main() {
7160 return !fseeko;
7161 ; return 0; }
7163 if { (eval echo configure:7164: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7164 rm -rf conftest*
7165 ac_cv_sys_largefile_source=1
7166 else
7167 echo "configure: failed program was:" >&5
7168 cat conftest.$ac_ext >&5
7170 rm -f conftest*
7172 rm -f conftest*
7175 echo "$ac_t""$ac_cv_sys_largefile_source" 1>&6
7176 if test "$ac_cv_sys_largefile_source" != no; then
7177 cat >> confdefs.h <<EOF
7178 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
7182 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
7183 # in glibc 2.1.3, but that breaks too many other things.
7184 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
7186 echo $ac_n "checking for fseeko""... $ac_c" 1>&6
7187 echo "configure:7188: checking for fseeko" >&5
7188 if eval "test \"`echo '$''{'ac_cv_func_fseeko'+set}'`\" = set"; then
7189 echo $ac_n "(cached) $ac_c" 1>&6
7190 else
7191 ac_cv_func_fseeko=no
7192 cat > conftest.$ac_ext <<EOF
7193 #line 7194 "configure"
7194 #include "confdefs.h"
7195 #include <stdio.h>
7196 int main() {
7197 return fseeko && fseeko (stdin, 0, 0);
7198 ; return 0; }
7200 if { (eval echo configure:7201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7201 rm -rf conftest*
7202 ac_cv_func_fseeko=yes
7203 else
7204 echo "configure: failed program was:" >&5
7205 cat conftest.$ac_ext >&5
7207 rm -f conftest*
7210 echo "$ac_t""$ac_cv_func_fseeko" 1>&6
7211 if test $ac_cv_func_fseeko != no; then
7212 cat >> confdefs.h <<\EOF
7213 #define HAVE_FSEEKO 1
7218 # UNIX98 PTYs.
7219 for ac_func in grantpt
7221 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7222 echo "configure:7223: checking for $ac_func" >&5
7223 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7224 echo $ac_n "(cached) $ac_c" 1>&6
7225 else
7226 cat > conftest.$ac_ext <<EOF
7227 #line 7228 "configure"
7228 #include "confdefs.h"
7229 /* System header to define __stub macros and hopefully few prototypes,
7230 which can conflict with char $ac_func(); below. */
7231 #include <assert.h>
7232 /* Override any gcc2 internal prototype to avoid an error. */
7233 /* We use char because int might match the return type of a gcc2
7234 builtin and then its argument prototype would still apply. */
7235 char $ac_func();
7237 int main() {
7239 /* The GNU C library defines this for functions which it implements
7240 to always fail with ENOSYS. Some functions are actually named
7241 something starting with __ and the normal name is an alias. */
7242 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7243 choke me
7244 #else
7245 $ac_func();
7246 #endif
7248 ; return 0; }
7250 if { (eval echo configure:7251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7251 rm -rf conftest*
7252 eval "ac_cv_func_$ac_func=yes"
7253 else
7254 echo "configure: failed program was:" >&5
7255 cat conftest.$ac_ext >&5
7256 rm -rf conftest*
7257 eval "ac_cv_func_$ac_func=no"
7259 rm -f conftest*
7262 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7263 echo "$ac_t""yes" 1>&6
7264 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7265 cat >> confdefs.h <<EOF
7266 #define $ac_tr_func 1
7269 else
7270 echo "$ac_t""no" 1>&6
7272 done
7275 # PTY-related GNU extensions.
7276 for ac_func in getpt
7278 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7279 echo "configure:7280: checking for $ac_func" >&5
7280 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7281 echo $ac_n "(cached) $ac_c" 1>&6
7282 else
7283 cat > conftest.$ac_ext <<EOF
7284 #line 7285 "configure"
7285 #include "confdefs.h"
7286 /* System header to define __stub macros and hopefully few prototypes,
7287 which can conflict with char $ac_func(); below. */
7288 #include <assert.h>
7289 /* Override any gcc2 internal prototype to avoid an error. */
7290 /* We use char because int might match the return type of a gcc2
7291 builtin and then its argument prototype would still apply. */
7292 char $ac_func();
7294 int main() {
7296 /* The GNU C library defines this for functions which it implements
7297 to always fail with ENOSYS. Some functions are actually named
7298 something starting with __ and the normal name is an alias. */
7299 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7300 choke me
7301 #else
7302 $ac_func();
7303 #endif
7305 ; return 0; }
7307 if { (eval echo configure:7308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7308 rm -rf conftest*
7309 eval "ac_cv_func_$ac_func=yes"
7310 else
7311 echo "configure: failed program was:" >&5
7312 cat conftest.$ac_ext >&5
7313 rm -rf conftest*
7314 eval "ac_cv_func_$ac_func=no"
7316 rm -f conftest*
7319 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7320 echo "$ac_t""yes" 1>&6
7321 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7322 cat >> confdefs.h <<EOF
7323 #define $ac_tr_func 1
7326 else
7327 echo "$ac_t""no" 1>&6
7329 done
7332 # Check this now, so that we will NOT find the above functions in ncurses.
7333 # That is because we have not set up to link ncurses in lib-src.
7334 # It's better to believe a function is not available
7335 # than to expect to find it in ncurses.
7336 echo $ac_n "checking for tparm in -lncurses""... $ac_c" 1>&6
7337 echo "configure:7338: checking for tparm in -lncurses" >&5
7338 ac_lib_var=`echo ncurses'_'tparm | sed 'y%./+-%__p_%'`
7339 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7340 echo $ac_n "(cached) $ac_c" 1>&6
7341 else
7342 ac_save_LIBS="$LIBS"
7343 LIBS="-lncurses $LIBS"
7344 cat > conftest.$ac_ext <<EOF
7345 #line 7346 "configure"
7346 #include "confdefs.h"
7347 /* Override any gcc2 internal prototype to avoid an error. */
7348 /* We use char because int might match the return type of a gcc2
7349 builtin and then its argument prototype would still apply. */
7350 char tparm();
7352 int main() {
7353 tparm()
7354 ; return 0; }
7356 if { (eval echo configure:7357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7357 rm -rf conftest*
7358 eval "ac_cv_lib_$ac_lib_var=yes"
7359 else
7360 echo "configure: failed program was:" >&5
7361 cat conftest.$ac_ext >&5
7362 rm -rf conftest*
7363 eval "ac_cv_lib_$ac_lib_var=no"
7365 rm -f conftest*
7366 LIBS="$ac_save_LIBS"
7369 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7370 echo "$ac_t""yes" 1>&6
7371 ac_tr_lib=HAVE_LIB`echo ncurses | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7372 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7373 cat >> confdefs.h <<EOF
7374 #define $ac_tr_lib 1
7377 LIBS="-lncurses $LIBS"
7379 else
7380 echo "$ac_t""no" 1>&6
7384 # Do we need the Hesiod library to provide the support routines?
7385 if test "$with_hesiod" = yes ; then
7386 # Don't set $LIBS here -- see comments above.
7387 resolv=no
7388 echo $ac_n "checking for res_send""... $ac_c" 1>&6
7389 echo "configure:7390: checking for res_send" >&5
7390 if eval "test \"`echo '$''{'ac_cv_func_res_send'+set}'`\" = set"; then
7391 echo $ac_n "(cached) $ac_c" 1>&6
7392 else
7393 cat > conftest.$ac_ext <<EOF
7394 #line 7395 "configure"
7395 #include "confdefs.h"
7396 /* System header to define __stub macros and hopefully few prototypes,
7397 which can conflict with char res_send(); below. */
7398 #include <assert.h>
7399 /* Override any gcc2 internal prototype to avoid an error. */
7400 /* We use char because int might match the return type of a gcc2
7401 builtin and then its argument prototype would still apply. */
7402 char res_send();
7404 int main() {
7406 /* The GNU C library defines this for functions which it implements
7407 to always fail with ENOSYS. Some functions are actually named
7408 something starting with __ and the normal name is an alias. */
7409 #if defined (__stub_res_send) || defined (__stub___res_send)
7410 choke me
7411 #else
7412 res_send();
7413 #endif
7415 ; return 0; }
7417 if { (eval echo configure:7418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7418 rm -rf conftest*
7419 eval "ac_cv_func_res_send=yes"
7420 else
7421 echo "configure: failed program was:" >&5
7422 cat conftest.$ac_ext >&5
7423 rm -rf conftest*
7424 eval "ac_cv_func_res_send=no"
7426 rm -f conftest*
7429 if eval "test \"`echo '$ac_cv_func_'res_send`\" = yes"; then
7430 echo "$ac_t""yes" 1>&6
7432 else
7433 echo "$ac_t""no" 1>&6
7434 echo $ac_n "checking for __res_send""... $ac_c" 1>&6
7435 echo "configure:7436: checking for __res_send" >&5
7436 if eval "test \"`echo '$''{'ac_cv_func___res_send'+set}'`\" = set"; then
7437 echo $ac_n "(cached) $ac_c" 1>&6
7438 else
7439 cat > conftest.$ac_ext <<EOF
7440 #line 7441 "configure"
7441 #include "confdefs.h"
7442 /* System header to define __stub macros and hopefully few prototypes,
7443 which can conflict with char __res_send(); below. */
7444 #include <assert.h>
7445 /* Override any gcc2 internal prototype to avoid an error. */
7446 /* We use char because int might match the return type of a gcc2
7447 builtin and then its argument prototype would still apply. */
7448 char __res_send();
7450 int main() {
7452 /* The GNU C library defines this for functions which it implements
7453 to always fail with ENOSYS. Some functions are actually named
7454 something starting with __ and the normal name is an alias. */
7455 #if defined (__stub___res_send) || defined (__stub_____res_send)
7456 choke me
7457 #else
7458 __res_send();
7459 #endif
7461 ; return 0; }
7463 if { (eval echo configure:7464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7464 rm -rf conftest*
7465 eval "ac_cv_func___res_send=yes"
7466 else
7467 echo "configure: failed program was:" >&5
7468 cat conftest.$ac_ext >&5
7469 rm -rf conftest*
7470 eval "ac_cv_func___res_send=no"
7472 rm -f conftest*
7475 if eval "test \"`echo '$ac_cv_func_'__res_send`\" = yes"; then
7476 echo "$ac_t""yes" 1>&6
7478 else
7479 echo "$ac_t""no" 1>&6
7480 echo $ac_n "checking for res_send in -lresolv""... $ac_c" 1>&6
7481 echo "configure:7482: checking for res_send in -lresolv" >&5
7482 ac_lib_var=`echo resolv'_'res_send | sed 'y%./+-%__p_%'`
7483 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7484 echo $ac_n "(cached) $ac_c" 1>&6
7485 else
7486 ac_save_LIBS="$LIBS"
7487 LIBS="-lresolv $LIBS"
7488 cat > conftest.$ac_ext <<EOF
7489 #line 7490 "configure"
7490 #include "confdefs.h"
7491 /* Override any gcc2 internal prototype to avoid an error. */
7492 /* We use char because int might match the return type of a gcc2
7493 builtin and then its argument prototype would still apply. */
7494 char res_send();
7496 int main() {
7497 res_send()
7498 ; return 0; }
7500 if { (eval echo configure:7501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7501 rm -rf conftest*
7502 eval "ac_cv_lib_$ac_lib_var=yes"
7503 else
7504 echo "configure: failed program was:" >&5
7505 cat conftest.$ac_ext >&5
7506 rm -rf conftest*
7507 eval "ac_cv_lib_$ac_lib_var=no"
7509 rm -f conftest*
7510 LIBS="$ac_save_LIBS"
7513 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7514 echo "$ac_t""yes" 1>&6
7515 resolv=yes
7516 else
7517 echo "$ac_t""no" 1>&6
7518 echo $ac_n "checking for __res_send in -lresolv""... $ac_c" 1>&6
7519 echo "configure:7520: checking for __res_send in -lresolv" >&5
7520 ac_lib_var=`echo resolv'_'__res_send | sed 'y%./+-%__p_%'`
7521 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7522 echo $ac_n "(cached) $ac_c" 1>&6
7523 else
7524 ac_save_LIBS="$LIBS"
7525 LIBS="-lresolv $LIBS"
7526 cat > conftest.$ac_ext <<EOF
7527 #line 7528 "configure"
7528 #include "confdefs.h"
7529 /* Override any gcc2 internal prototype to avoid an error. */
7530 /* We use char because int might match the return type of a gcc2
7531 builtin and then its argument prototype would still apply. */
7532 char __res_send();
7534 int main() {
7535 __res_send()
7536 ; return 0; }
7538 if { (eval echo configure:7539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7539 rm -rf conftest*
7540 eval "ac_cv_lib_$ac_lib_var=yes"
7541 else
7542 echo "configure: failed program was:" >&5
7543 cat conftest.$ac_ext >&5
7544 rm -rf conftest*
7545 eval "ac_cv_lib_$ac_lib_var=no"
7547 rm -f conftest*
7548 LIBS="$ac_save_LIBS"
7551 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7552 echo "$ac_t""yes" 1>&6
7553 resolv=yes
7554 else
7555 echo "$ac_t""no" 1>&6
7564 if test "$resolv" = yes ; then
7565 RESOLVLIB=-lresolv
7566 cat >> confdefs.h <<\EOF
7567 #define HAVE_LIBRESOLV 1
7570 else
7571 RESOLVLIB=
7573 echo $ac_n "checking for hes_getmailhost""... $ac_c" 1>&6
7574 echo "configure:7575: checking for hes_getmailhost" >&5
7575 if eval "test \"`echo '$''{'ac_cv_func_hes_getmailhost'+set}'`\" = set"; then
7576 echo $ac_n "(cached) $ac_c" 1>&6
7577 else
7578 cat > conftest.$ac_ext <<EOF
7579 #line 7580 "configure"
7580 #include "confdefs.h"
7581 /* System header to define __stub macros and hopefully few prototypes,
7582 which can conflict with char hes_getmailhost(); below. */
7583 #include <assert.h>
7584 /* Override any gcc2 internal prototype to avoid an error. */
7585 /* We use char because int might match the return type of a gcc2
7586 builtin and then its argument prototype would still apply. */
7587 char hes_getmailhost();
7589 int main() {
7591 /* The GNU C library defines this for functions which it implements
7592 to always fail with ENOSYS. Some functions are actually named
7593 something starting with __ and the normal name is an alias. */
7594 #if defined (__stub_hes_getmailhost) || defined (__stub___hes_getmailhost)
7595 choke me
7596 #else
7597 hes_getmailhost();
7598 #endif
7600 ; return 0; }
7602 if { (eval echo configure:7603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7603 rm -rf conftest*
7604 eval "ac_cv_func_hes_getmailhost=yes"
7605 else
7606 echo "configure: failed program was:" >&5
7607 cat conftest.$ac_ext >&5
7608 rm -rf conftest*
7609 eval "ac_cv_func_hes_getmailhost=no"
7611 rm -f conftest*
7614 if eval "test \"`echo '$ac_cv_func_'hes_getmailhost`\" = yes"; then
7615 echo "$ac_t""yes" 1>&6
7617 else
7618 echo "$ac_t""no" 1>&6
7619 echo $ac_n "checking for hes_getmailhost in -lhesiod""... $ac_c" 1>&6
7620 echo "configure:7621: checking for hes_getmailhost in -lhesiod" >&5
7621 ac_lib_var=`echo hesiod'_'hes_getmailhost | sed 'y%./+-%__p_%'`
7622 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7623 echo $ac_n "(cached) $ac_c" 1>&6
7624 else
7625 ac_save_LIBS="$LIBS"
7626 LIBS="-lhesiod $RESOLVLIB $LIBS"
7627 cat > conftest.$ac_ext <<EOF
7628 #line 7629 "configure"
7629 #include "confdefs.h"
7630 /* Override any gcc2 internal prototype to avoid an error. */
7631 /* We use char because int might match the return type of a gcc2
7632 builtin and then its argument prototype would still apply. */
7633 char hes_getmailhost();
7635 int main() {
7636 hes_getmailhost()
7637 ; return 0; }
7639 if { (eval echo configure:7640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7640 rm -rf conftest*
7641 eval "ac_cv_lib_$ac_lib_var=yes"
7642 else
7643 echo "configure: failed program was:" >&5
7644 cat conftest.$ac_ext >&5
7645 rm -rf conftest*
7646 eval "ac_cv_lib_$ac_lib_var=no"
7648 rm -f conftest*
7649 LIBS="$ac_save_LIBS"
7652 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7653 echo "$ac_t""yes" 1>&6
7654 cat >> confdefs.h <<\EOF
7655 #define HAVE_LIBHESIOD 1
7658 else
7659 echo "$ac_t""no" 1>&6
7667 # These tell us which Kerberos-related libraries to use.
7668 if test "${with_kerberos+set}" = set; then
7669 echo $ac_n "checking for com_err in -lcom_err""... $ac_c" 1>&6
7670 echo "configure:7671: checking for com_err in -lcom_err" >&5
7671 ac_lib_var=`echo com_err'_'com_err | sed 'y%./+-%__p_%'`
7672 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7673 echo $ac_n "(cached) $ac_c" 1>&6
7674 else
7675 ac_save_LIBS="$LIBS"
7676 LIBS="-lcom_err $LIBS"
7677 cat > conftest.$ac_ext <<EOF
7678 #line 7679 "configure"
7679 #include "confdefs.h"
7680 /* Override any gcc2 internal prototype to avoid an error. */
7681 /* We use char because int might match the return type of a gcc2
7682 builtin and then its argument prototype would still apply. */
7683 char com_err();
7685 int main() {
7686 com_err()
7687 ; return 0; }
7689 if { (eval echo configure:7690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7690 rm -rf conftest*
7691 eval "ac_cv_lib_$ac_lib_var=yes"
7692 else
7693 echo "configure: failed program was:" >&5
7694 cat conftest.$ac_ext >&5
7695 rm -rf conftest*
7696 eval "ac_cv_lib_$ac_lib_var=no"
7698 rm -f conftest*
7699 LIBS="$ac_save_LIBS"
7702 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7703 echo "$ac_t""yes" 1>&6
7704 ac_tr_lib=HAVE_LIB`echo com_err | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7705 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7706 cat >> confdefs.h <<EOF
7707 #define $ac_tr_lib 1
7710 LIBS="-lcom_err $LIBS"
7712 else
7713 echo "$ac_t""no" 1>&6
7716 echo $ac_n "checking for mit_des_cbc_encrypt in -lk5crypto""... $ac_c" 1>&6
7717 echo "configure:7718: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
7718 ac_lib_var=`echo k5crypto'_'mit_des_cbc_encrypt | sed 'y%./+-%__p_%'`
7719 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7720 echo $ac_n "(cached) $ac_c" 1>&6
7721 else
7722 ac_save_LIBS="$LIBS"
7723 LIBS="-lk5crypto $LIBS"
7724 cat > conftest.$ac_ext <<EOF
7725 #line 7726 "configure"
7726 #include "confdefs.h"
7727 /* Override any gcc2 internal prototype to avoid an error. */
7728 /* We use char because int might match the return type of a gcc2
7729 builtin and then its argument prototype would still apply. */
7730 char mit_des_cbc_encrypt();
7732 int main() {
7733 mit_des_cbc_encrypt()
7734 ; return 0; }
7736 if { (eval echo configure:7737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7737 rm -rf conftest*
7738 eval "ac_cv_lib_$ac_lib_var=yes"
7739 else
7740 echo "configure: failed program was:" >&5
7741 cat conftest.$ac_ext >&5
7742 rm -rf conftest*
7743 eval "ac_cv_lib_$ac_lib_var=no"
7745 rm -f conftest*
7746 LIBS="$ac_save_LIBS"
7749 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7750 echo "$ac_t""yes" 1>&6
7751 ac_tr_lib=HAVE_LIB`echo k5crypto | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7752 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7753 cat >> confdefs.h <<EOF
7754 #define $ac_tr_lib 1
7757 LIBS="-lk5crypto $LIBS"
7759 else
7760 echo "$ac_t""no" 1>&6
7763 echo $ac_n "checking for mit_des_cbc_encrypt in -lcrypto""... $ac_c" 1>&6
7764 echo "configure:7765: checking for mit_des_cbc_encrypt in -lcrypto" >&5
7765 ac_lib_var=`echo crypto'_'mit_des_cbc_encrypt | sed 'y%./+-%__p_%'`
7766 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7767 echo $ac_n "(cached) $ac_c" 1>&6
7768 else
7769 ac_save_LIBS="$LIBS"
7770 LIBS="-lcrypto $LIBS"
7771 cat > conftest.$ac_ext <<EOF
7772 #line 7773 "configure"
7773 #include "confdefs.h"
7774 /* Override any gcc2 internal prototype to avoid an error. */
7775 /* We use char because int might match the return type of a gcc2
7776 builtin and then its argument prototype would still apply. */
7777 char mit_des_cbc_encrypt();
7779 int main() {
7780 mit_des_cbc_encrypt()
7781 ; return 0; }
7783 if { (eval echo configure:7784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7784 rm -rf conftest*
7785 eval "ac_cv_lib_$ac_lib_var=yes"
7786 else
7787 echo "configure: failed program was:" >&5
7788 cat conftest.$ac_ext >&5
7789 rm -rf conftest*
7790 eval "ac_cv_lib_$ac_lib_var=no"
7792 rm -f conftest*
7793 LIBS="$ac_save_LIBS"
7796 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7797 echo "$ac_t""yes" 1>&6
7798 ac_tr_lib=HAVE_LIB`echo crypto | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7799 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7800 cat >> confdefs.h <<EOF
7801 #define $ac_tr_lib 1
7804 LIBS="-lcrypto $LIBS"
7806 else
7807 echo "$ac_t""no" 1>&6
7810 echo $ac_n "checking for krb5_init_context in -lkrb5""... $ac_c" 1>&6
7811 echo "configure:7812: checking for krb5_init_context in -lkrb5" >&5
7812 ac_lib_var=`echo krb5'_'krb5_init_context | sed 'y%./+-%__p_%'`
7813 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7814 echo $ac_n "(cached) $ac_c" 1>&6
7815 else
7816 ac_save_LIBS="$LIBS"
7817 LIBS="-lkrb5 $LIBS"
7818 cat > conftest.$ac_ext <<EOF
7819 #line 7820 "configure"
7820 #include "confdefs.h"
7821 /* Override any gcc2 internal prototype to avoid an error. */
7822 /* We use char because int might match the return type of a gcc2
7823 builtin and then its argument prototype would still apply. */
7824 char krb5_init_context();
7826 int main() {
7827 krb5_init_context()
7828 ; return 0; }
7830 if { (eval echo configure:7831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7831 rm -rf conftest*
7832 eval "ac_cv_lib_$ac_lib_var=yes"
7833 else
7834 echo "configure: failed program was:" >&5
7835 cat conftest.$ac_ext >&5
7836 rm -rf conftest*
7837 eval "ac_cv_lib_$ac_lib_var=no"
7839 rm -f conftest*
7840 LIBS="$ac_save_LIBS"
7843 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7844 echo "$ac_t""yes" 1>&6
7845 ac_tr_lib=HAVE_LIB`echo krb5 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7846 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7847 cat >> confdefs.h <<EOF
7848 #define $ac_tr_lib 1
7851 LIBS="-lkrb5 $LIBS"
7853 else
7854 echo "$ac_t""no" 1>&6
7857 if test "${with_kerberos5+set}" != set; then
7858 echo $ac_n "checking for des_cbc_encrypt in -ldes425""... $ac_c" 1>&6
7859 echo "configure:7860: checking for des_cbc_encrypt in -ldes425" >&5
7860 ac_lib_var=`echo des425'_'des_cbc_encrypt | sed 'y%./+-%__p_%'`
7861 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7862 echo $ac_n "(cached) $ac_c" 1>&6
7863 else
7864 ac_save_LIBS="$LIBS"
7865 LIBS="-ldes425 $LIBS"
7866 cat > conftest.$ac_ext <<EOF
7867 #line 7868 "configure"
7868 #include "confdefs.h"
7869 /* Override any gcc2 internal prototype to avoid an error. */
7870 /* We use char because int might match the return type of a gcc2
7871 builtin and then its argument prototype would still apply. */
7872 char des_cbc_encrypt();
7874 int main() {
7875 des_cbc_encrypt()
7876 ; return 0; }
7878 if { (eval echo configure:7879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7879 rm -rf conftest*
7880 eval "ac_cv_lib_$ac_lib_var=yes"
7881 else
7882 echo "configure: failed program was:" >&5
7883 cat conftest.$ac_ext >&5
7884 rm -rf conftest*
7885 eval "ac_cv_lib_$ac_lib_var=no"
7887 rm -f conftest*
7888 LIBS="$ac_save_LIBS"
7891 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7892 echo "$ac_t""yes" 1>&6
7893 ac_tr_lib=HAVE_LIB`echo des425 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7894 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7895 cat >> confdefs.h <<EOF
7896 #define $ac_tr_lib 1
7899 LIBS="-ldes425 $LIBS"
7901 else
7902 echo "$ac_t""no" 1>&6
7903 echo $ac_n "checking for des_cbc_encrypt in -ldes""... $ac_c" 1>&6
7904 echo "configure:7905: checking for des_cbc_encrypt in -ldes" >&5
7905 ac_lib_var=`echo des'_'des_cbc_encrypt | sed 'y%./+-%__p_%'`
7906 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7907 echo $ac_n "(cached) $ac_c" 1>&6
7908 else
7909 ac_save_LIBS="$LIBS"
7910 LIBS="-ldes $LIBS"
7911 cat > conftest.$ac_ext <<EOF
7912 #line 7913 "configure"
7913 #include "confdefs.h"
7914 /* Override any gcc2 internal prototype to avoid an error. */
7915 /* We use char because int might match the return type of a gcc2
7916 builtin and then its argument prototype would still apply. */
7917 char des_cbc_encrypt();
7919 int main() {
7920 des_cbc_encrypt()
7921 ; return 0; }
7923 if { (eval echo configure:7924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7924 rm -rf conftest*
7925 eval "ac_cv_lib_$ac_lib_var=yes"
7926 else
7927 echo "configure: failed program was:" >&5
7928 cat conftest.$ac_ext >&5
7929 rm -rf conftest*
7930 eval "ac_cv_lib_$ac_lib_var=no"
7932 rm -f conftest*
7933 LIBS="$ac_save_LIBS"
7936 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7937 echo "$ac_t""yes" 1>&6
7938 ac_tr_lib=HAVE_LIB`echo des | sed -e 's/^a-zA-Z0-9_/_/g' \
7939 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7940 cat >> confdefs.h <<EOF
7941 #define $ac_tr_lib 1
7944 LIBS="-ldes $LIBS"
7946 else
7947 echo "$ac_t""no" 1>&6
7952 echo $ac_n "checking for krb_get_cred in -lkrb4""... $ac_c" 1>&6
7953 echo "configure:7954: checking for krb_get_cred in -lkrb4" >&5
7954 ac_lib_var=`echo krb4'_'krb_get_cred | sed 'y%./+-%__p_%'`
7955 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7956 echo $ac_n "(cached) $ac_c" 1>&6
7957 else
7958 ac_save_LIBS="$LIBS"
7959 LIBS="-lkrb4 $LIBS"
7960 cat > conftest.$ac_ext <<EOF
7961 #line 7962 "configure"
7962 #include "confdefs.h"
7963 /* Override any gcc2 internal prototype to avoid an error. */
7964 /* We use char because int might match the return type of a gcc2
7965 builtin and then its argument prototype would still apply. */
7966 char krb_get_cred();
7968 int main() {
7969 krb_get_cred()
7970 ; return 0; }
7972 if { (eval echo configure:7973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7973 rm -rf conftest*
7974 eval "ac_cv_lib_$ac_lib_var=yes"
7975 else
7976 echo "configure: failed program was:" >&5
7977 cat conftest.$ac_ext >&5
7978 rm -rf conftest*
7979 eval "ac_cv_lib_$ac_lib_var=no"
7981 rm -f conftest*
7982 LIBS="$ac_save_LIBS"
7985 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7986 echo "$ac_t""yes" 1>&6
7987 ac_tr_lib=HAVE_LIB`echo krb4 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7988 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7989 cat >> confdefs.h <<EOF
7990 #define $ac_tr_lib 1
7993 LIBS="-lkrb4 $LIBS"
7995 else
7996 echo "$ac_t""no" 1>&6
7997 echo $ac_n "checking for krb_get_cred in -lkrb""... $ac_c" 1>&6
7998 echo "configure:7999: checking for krb_get_cred in -lkrb" >&5
7999 ac_lib_var=`echo krb'_'krb_get_cred | sed 'y%./+-%__p_%'`
8000 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8001 echo $ac_n "(cached) $ac_c" 1>&6
8002 else
8003 ac_save_LIBS="$LIBS"
8004 LIBS="-lkrb $LIBS"
8005 cat > conftest.$ac_ext <<EOF
8006 #line 8007 "configure"
8007 #include "confdefs.h"
8008 /* Override any gcc2 internal prototype to avoid an error. */
8009 /* We use char because int might match the return type of a gcc2
8010 builtin and then its argument prototype would still apply. */
8011 char krb_get_cred();
8013 int main() {
8014 krb_get_cred()
8015 ; return 0; }
8017 if { (eval echo configure:8018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8018 rm -rf conftest*
8019 eval "ac_cv_lib_$ac_lib_var=yes"
8020 else
8021 echo "configure: failed program was:" >&5
8022 cat conftest.$ac_ext >&5
8023 rm -rf conftest*
8024 eval "ac_cv_lib_$ac_lib_var=no"
8026 rm -f conftest*
8027 LIBS="$ac_save_LIBS"
8030 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8031 echo "$ac_t""yes" 1>&6
8032 ac_tr_lib=HAVE_LIB`echo krb | sed -e 's/^a-zA-Z0-9_/_/g' \
8033 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8034 cat >> confdefs.h <<EOF
8035 #define $ac_tr_lib 1
8038 LIBS="-lkrb $LIBS"
8040 else
8041 echo "$ac_t""no" 1>&6
8048 if test "${with_kerberos5+set}" = set; then
8049 for ac_hdr in krb5.h
8051 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8052 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8053 echo "configure:8054: checking for $ac_hdr" >&5
8054 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8055 echo $ac_n "(cached) $ac_c" 1>&6
8056 else
8057 cat > conftest.$ac_ext <<EOF
8058 #line 8059 "configure"
8059 #include "confdefs.h"
8060 #include <$ac_hdr>
8062 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8063 { (eval echo configure:8064: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8064 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8065 if test -z "$ac_err"; then
8066 rm -rf conftest*
8067 eval "ac_cv_header_$ac_safe=yes"
8068 else
8069 echo "$ac_err" >&5
8070 echo "configure: failed program was:" >&5
8071 cat conftest.$ac_ext >&5
8072 rm -rf conftest*
8073 eval "ac_cv_header_$ac_safe=no"
8075 rm -f conftest*
8077 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8078 echo "$ac_t""yes" 1>&6
8079 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8080 cat >> confdefs.h <<EOF
8081 #define $ac_tr_hdr 1
8084 else
8085 echo "$ac_t""no" 1>&6
8087 done
8089 else
8090 for ac_hdr in des.h
8092 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8093 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8094 echo "configure:8095: checking for $ac_hdr" >&5
8095 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8096 echo $ac_n "(cached) $ac_c" 1>&6
8097 else
8098 cat > conftest.$ac_ext <<EOF
8099 #line 8100 "configure"
8100 #include "confdefs.h"
8101 #include <$ac_hdr>
8103 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8104 { (eval echo configure:8105: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8105 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8106 if test -z "$ac_err"; then
8107 rm -rf conftest*
8108 eval "ac_cv_header_$ac_safe=yes"
8109 else
8110 echo "$ac_err" >&5
8111 echo "configure: failed program was:" >&5
8112 cat conftest.$ac_ext >&5
8113 rm -rf conftest*
8114 eval "ac_cv_header_$ac_safe=no"
8116 rm -f conftest*
8118 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8119 echo "$ac_t""yes" 1>&6
8120 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8121 cat >> confdefs.h <<EOF
8122 #define $ac_tr_hdr 1
8125 else
8126 echo "$ac_t""no" 1>&6
8127 for ac_hdr in kerberosIV/des.h
8129 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8130 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8131 echo "configure:8132: checking for $ac_hdr" >&5
8132 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8133 echo $ac_n "(cached) $ac_c" 1>&6
8134 else
8135 cat > conftest.$ac_ext <<EOF
8136 #line 8137 "configure"
8137 #include "confdefs.h"
8138 #include <$ac_hdr>
8140 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8141 { (eval echo configure:8142: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8142 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8143 if test -z "$ac_err"; then
8144 rm -rf conftest*
8145 eval "ac_cv_header_$ac_safe=yes"
8146 else
8147 echo "$ac_err" >&5
8148 echo "configure: failed program was:" >&5
8149 cat conftest.$ac_ext >&5
8150 rm -rf conftest*
8151 eval "ac_cv_header_$ac_safe=no"
8153 rm -f conftest*
8155 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8156 echo "$ac_t""yes" 1>&6
8157 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8158 cat >> confdefs.h <<EOF
8159 #define $ac_tr_hdr 1
8162 else
8163 echo "$ac_t""no" 1>&6
8164 for ac_hdr in kerberos/des.h
8166 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8167 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8168 echo "configure:8169: checking for $ac_hdr" >&5
8169 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8170 echo $ac_n "(cached) $ac_c" 1>&6
8171 else
8172 cat > conftest.$ac_ext <<EOF
8173 #line 8174 "configure"
8174 #include "confdefs.h"
8175 #include <$ac_hdr>
8177 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8178 { (eval echo configure:8179: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8179 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8180 if test -z "$ac_err"; then
8181 rm -rf conftest*
8182 eval "ac_cv_header_$ac_safe=yes"
8183 else
8184 echo "$ac_err" >&5
8185 echo "configure: failed program was:" >&5
8186 cat conftest.$ac_ext >&5
8187 rm -rf conftest*
8188 eval "ac_cv_header_$ac_safe=no"
8190 rm -f conftest*
8192 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8193 echo "$ac_t""yes" 1>&6
8194 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8195 cat >> confdefs.h <<EOF
8196 #define $ac_tr_hdr 1
8199 else
8200 echo "$ac_t""no" 1>&6
8202 done
8205 done
8208 done
8210 for ac_hdr in krb.h
8212 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8213 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8214 echo "configure:8215: checking for $ac_hdr" >&5
8215 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8216 echo $ac_n "(cached) $ac_c" 1>&6
8217 else
8218 cat > conftest.$ac_ext <<EOF
8219 #line 8220 "configure"
8220 #include "confdefs.h"
8221 #include <$ac_hdr>
8223 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8224 { (eval echo configure:8225: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8225 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8226 if test -z "$ac_err"; then
8227 rm -rf conftest*
8228 eval "ac_cv_header_$ac_safe=yes"
8229 else
8230 echo "$ac_err" >&5
8231 echo "configure: failed program was:" >&5
8232 cat conftest.$ac_ext >&5
8233 rm -rf conftest*
8234 eval "ac_cv_header_$ac_safe=no"
8236 rm -f conftest*
8238 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8239 echo "$ac_t""yes" 1>&6
8240 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8241 cat >> confdefs.h <<EOF
8242 #define $ac_tr_hdr 1
8245 else
8246 echo "$ac_t""no" 1>&6
8247 for ac_hdr in kerberosIV/krb.h
8249 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8250 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8251 echo "configure:8252: checking for $ac_hdr" >&5
8252 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8253 echo $ac_n "(cached) $ac_c" 1>&6
8254 else
8255 cat > conftest.$ac_ext <<EOF
8256 #line 8257 "configure"
8257 #include "confdefs.h"
8258 #include <$ac_hdr>
8260 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8261 { (eval echo configure:8262: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8262 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8263 if test -z "$ac_err"; then
8264 rm -rf conftest*
8265 eval "ac_cv_header_$ac_safe=yes"
8266 else
8267 echo "$ac_err" >&5
8268 echo "configure: failed program was:" >&5
8269 cat conftest.$ac_ext >&5
8270 rm -rf conftest*
8271 eval "ac_cv_header_$ac_safe=no"
8273 rm -f conftest*
8275 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8276 echo "$ac_t""yes" 1>&6
8277 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8278 cat >> confdefs.h <<EOF
8279 #define $ac_tr_hdr 1
8282 else
8283 echo "$ac_t""no" 1>&6
8284 for ac_hdr in kerberos/krb.h
8286 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8287 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8288 echo "configure:8289: checking for $ac_hdr" >&5
8289 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8290 echo $ac_n "(cached) $ac_c" 1>&6
8291 else
8292 cat > conftest.$ac_ext <<EOF
8293 #line 8294 "configure"
8294 #include "confdefs.h"
8295 #include <$ac_hdr>
8297 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8298 { (eval echo configure:8299: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8299 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8300 if test -z "$ac_err"; then
8301 rm -rf conftest*
8302 eval "ac_cv_header_$ac_safe=yes"
8303 else
8304 echo "$ac_err" >&5
8305 echo "configure: failed program was:" >&5
8306 cat conftest.$ac_ext >&5
8307 rm -rf conftest*
8308 eval "ac_cv_header_$ac_safe=no"
8310 rm -f conftest*
8312 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8313 echo "$ac_t""yes" 1>&6
8314 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8315 cat >> confdefs.h <<EOF
8316 #define $ac_tr_hdr 1
8319 else
8320 echo "$ac_t""no" 1>&6
8322 done
8325 done
8328 done
8331 for ac_hdr in com_err.h
8333 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8334 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8335 echo "configure:8336: checking for $ac_hdr" >&5
8336 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8337 echo $ac_n "(cached) $ac_c" 1>&6
8338 else
8339 cat > conftest.$ac_ext <<EOF
8340 #line 8341 "configure"
8341 #include "confdefs.h"
8342 #include <$ac_hdr>
8344 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8345 { (eval echo configure:8346: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8346 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8347 if test -z "$ac_err"; then
8348 rm -rf conftest*
8349 eval "ac_cv_header_$ac_safe=yes"
8350 else
8351 echo "$ac_err" >&5
8352 echo "configure: failed program was:" >&5
8353 cat conftest.$ac_ext >&5
8354 rm -rf conftest*
8355 eval "ac_cv_header_$ac_safe=no"
8357 rm -f conftest*
8359 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8360 echo "$ac_t""yes" 1>&6
8361 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8362 cat >> confdefs.h <<EOF
8363 #define $ac_tr_hdr 1
8366 else
8367 echo "$ac_t""no" 1>&6
8369 done
8373 # Solaris requires -lintl if you want strerror (which calls dgettext)
8374 # to return localized messages.
8375 echo $ac_n "checking for dgettext in -lintl""... $ac_c" 1>&6
8376 echo "configure:8377: checking for dgettext in -lintl" >&5
8377 ac_lib_var=`echo intl'_'dgettext | sed 'y%./+-%__p_%'`
8378 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8379 echo $ac_n "(cached) $ac_c" 1>&6
8380 else
8381 ac_save_LIBS="$LIBS"
8382 LIBS="-lintl $LIBS"
8383 cat > conftest.$ac_ext <<EOF
8384 #line 8385 "configure"
8385 #include "confdefs.h"
8386 /* Override any gcc2 internal prototype to avoid an error. */
8387 /* We use char because int might match the return type of a gcc2
8388 builtin and then its argument prototype would still apply. */
8389 char dgettext();
8391 int main() {
8392 dgettext()
8393 ; return 0; }
8395 if { (eval echo configure:8396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8396 rm -rf conftest*
8397 eval "ac_cv_lib_$ac_lib_var=yes"
8398 else
8399 echo "configure: failed program was:" >&5
8400 cat conftest.$ac_ext >&5
8401 rm -rf conftest*
8402 eval "ac_cv_lib_$ac_lib_var=no"
8404 rm -f conftest*
8405 LIBS="$ac_save_LIBS"
8408 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8409 echo "$ac_t""yes" 1>&6
8410 ac_tr_lib=HAVE_LIB`echo intl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8411 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8412 cat >> confdefs.h <<EOF
8413 #define $ac_tr_lib 1
8416 LIBS="-lintl $LIBS"
8418 else
8419 echo "$ac_t""no" 1>&6
8423 echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
8424 echo "configure:8425: checking whether localtime caches TZ" >&5
8425 if eval "test \"`echo '$''{'emacs_cv_localtime_cache'+set}'`\" = set"; then
8426 echo $ac_n "(cached) $ac_c" 1>&6
8427 else
8428 if test x$ac_cv_func_tzset = xyes; then
8429 if test "$cross_compiling" = yes; then
8430 # If we have tzset, assume the worst when cross-compiling.
8431 emacs_cv_localtime_cache=yes
8432 else
8433 cat > conftest.$ac_ext <<EOF
8434 #line 8435 "configure"
8435 #include "confdefs.h"
8436 #include <time.h>
8437 extern char **environ;
8438 unset_TZ ()
8440 char **from, **to;
8441 for (to = from = environ; (*to = *from); from++)
8442 if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
8443 to++;
8445 char TZ_GMT0[] = "TZ=GMT0";
8446 char TZ_PST8[] = "TZ=PST8";
8447 main()
8449 time_t now = time ((time_t *) 0);
8450 int hour_GMT0, hour_unset;
8451 if (putenv (TZ_GMT0) != 0)
8452 exit (1);
8453 hour_GMT0 = localtime (&now)->tm_hour;
8454 unset_TZ ();
8455 hour_unset = localtime (&now)->tm_hour;
8456 if (putenv (TZ_PST8) != 0)
8457 exit (1);
8458 if (localtime (&now)->tm_hour == hour_GMT0)
8459 exit (1);
8460 unset_TZ ();
8461 if (localtime (&now)->tm_hour != hour_unset)
8462 exit (1);
8463 exit (0);
8466 if { (eval echo configure:8467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8467 then
8468 emacs_cv_localtime_cache=no
8469 else
8470 echo "configure: failed program was:" >&5
8471 cat conftest.$ac_ext >&5
8472 rm -fr conftest*
8473 emacs_cv_localtime_cache=yes
8475 rm -fr conftest*
8478 else
8479 # If we lack tzset, report that localtime does not cache TZ,
8480 # since we can't invalidate the cache if we don't have tzset.
8481 emacs_cv_localtime_cache=no
8484 echo "$ac_t""$emacs_cv_localtime_cache" 1>&6
8485 if test $emacs_cv_localtime_cache = yes; then
8486 cat >> confdefs.h <<\EOF
8487 #define LOCALTIME_CACHE 1
8492 if test "x$HAVE_TIMEVAL" = xyes; then
8493 for ac_func in gettimeofday
8495 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8496 echo "configure:8497: checking for $ac_func" >&5
8497 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8498 echo $ac_n "(cached) $ac_c" 1>&6
8499 else
8500 cat > conftest.$ac_ext <<EOF
8501 #line 8502 "configure"
8502 #include "confdefs.h"
8503 /* System header to define __stub macros and hopefully few prototypes,
8504 which can conflict with char $ac_func(); below. */
8505 #include <assert.h>
8506 /* Override any gcc2 internal prototype to avoid an error. */
8507 /* We use char because int might match the return type of a gcc2
8508 builtin and then its argument prototype would still apply. */
8509 char $ac_func();
8511 int main() {
8513 /* The GNU C library defines this for functions which it implements
8514 to always fail with ENOSYS. Some functions are actually named
8515 something starting with __ and the normal name is an alias. */
8516 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8517 choke me
8518 #else
8519 $ac_func();
8520 #endif
8522 ; return 0; }
8524 if { (eval echo configure:8525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8525 rm -rf conftest*
8526 eval "ac_cv_func_$ac_func=yes"
8527 else
8528 echo "configure: failed program was:" >&5
8529 cat conftest.$ac_ext >&5
8530 rm -rf conftest*
8531 eval "ac_cv_func_$ac_func=no"
8533 rm -f conftest*
8536 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8537 echo "$ac_t""yes" 1>&6
8538 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8539 cat >> confdefs.h <<EOF
8540 #define $ac_tr_func 1
8543 else
8544 echo "$ac_t""no" 1>&6
8546 done
8548 echo $ac_n "checking whether gettimeofday can accept two arguments""... $ac_c" 1>&6
8549 echo "configure:8550: checking whether gettimeofday can accept two arguments" >&5
8550 if eval "test \"`echo '$''{'emacs_cv_gettimeofday_two_arguments'+set}'`\" = set"; then
8551 echo $ac_n "(cached) $ac_c" 1>&6
8552 else
8553 cat > conftest.$ac_ext <<EOF
8554 #line 8555 "configure"
8555 #include "confdefs.h"
8557 #ifdef TIME_WITH_SYS_TIME
8558 #include <sys/time.h>
8559 #include <time.h>
8560 #else
8561 #ifdef HAVE_SYS_TIME_H
8562 #include <sys/time.h>
8563 #else
8564 #include <time.h>
8565 #endif
8566 #endif
8567 int main() {
8568 struct timeval time;
8569 gettimeofday (&time, 0);
8570 ; return 0; }
8572 if { (eval echo configure:8573: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8573 rm -rf conftest*
8574 emacs_cv_gettimeofday_two_arguments=yes
8575 else
8576 echo "configure: failed program was:" >&5
8577 cat conftest.$ac_ext >&5
8578 rm -rf conftest*
8579 emacs_cv_gettimeofday_two_arguments=no
8581 rm -f conftest*
8584 echo "$ac_t""$emacs_cv_gettimeofday_two_arguments" 1>&6
8585 if test $emacs_cv_gettimeofday_two_arguments = no; then
8586 cat >> confdefs.h <<\EOF
8587 #define GETTIMEOFDAY_ONE_ARGUMENT 1
8593 if test "$ac_cv_func_gettimeofday" = yes; then
8594 echo $ac_n "checking for struct timezone""... $ac_c" 1>&6
8595 echo "configure:8596: checking for struct timezone" >&5
8596 if eval "test \"`echo '$''{'emacs_cv_struct_timezone'+set}'`\" = set"; then
8597 echo $ac_n "(cached) $ac_c" 1>&6
8598 else
8599 cat > conftest.$ac_ext <<EOF
8600 #line 8601 "configure"
8601 #include "confdefs.h"
8602 #include <sys/time.h>
8603 int main() {
8604 struct timezone tz;
8605 ; return 0; }
8607 if { (eval echo configure:8608: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8608 rm -rf conftest*
8609 if test "$cross_compiling" = yes; then
8610 emacs_cv_struct_timezone=yes
8611 else
8612 cat > conftest.$ac_ext <<EOF
8613 #line 8614 "configure"
8614 #include "confdefs.h"
8616 #ifdef TIME_WITH_SYS_TIME
8617 #include <sys/time.h>
8618 #include <time.h>
8619 #else
8620 #ifdef HAVE_SYS_TIME_H
8621 #include <sys/time.h>
8622 #else
8623 #include <time.h>
8624 #endif
8625 #endif
8626 main () {
8627 struct timeval time;
8628 struct timezone dummy;
8629 exit (gettimeofday (&time, &dummy));
8632 if { (eval echo configure:8633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8633 then
8634 emacs_cv_struct_timezone=yes
8635 else
8636 echo "configure: failed program was:" >&5
8637 cat conftest.$ac_ext >&5
8638 rm -fr conftest*
8639 emacs_cv_struct_timezone=no
8641 rm -fr conftest*
8644 else
8645 echo "configure: failed program was:" >&5
8646 cat conftest.$ac_ext >&5
8647 rm -rf conftest*
8648 emacs_cv_struct_timezone=no
8650 rm -f conftest*
8653 echo "$ac_t""$emacs_cv_struct_timezone" 1>&6
8656 ok_so_far=yes
8657 echo $ac_n "checking for socket""... $ac_c" 1>&6
8658 echo "configure:8659: checking for socket" >&5
8659 if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then
8660 echo $ac_n "(cached) $ac_c" 1>&6
8661 else
8662 cat > conftest.$ac_ext <<EOF
8663 #line 8664 "configure"
8664 #include "confdefs.h"
8665 /* System header to define __stub macros and hopefully few prototypes,
8666 which can conflict with char socket(); below. */
8667 #include <assert.h>
8668 /* Override any gcc2 internal prototype to avoid an error. */
8669 /* We use char because int might match the return type of a gcc2
8670 builtin and then its argument prototype would still apply. */
8671 char socket();
8673 int main() {
8675 /* The GNU C library defines this for functions which it implements
8676 to always fail with ENOSYS. Some functions are actually named
8677 something starting with __ and the normal name is an alias. */
8678 #if defined (__stub_socket) || defined (__stub___socket)
8679 choke me
8680 #else
8681 socket();
8682 #endif
8684 ; return 0; }
8686 if { (eval echo configure:8687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8687 rm -rf conftest*
8688 eval "ac_cv_func_socket=yes"
8689 else
8690 echo "configure: failed program was:" >&5
8691 cat conftest.$ac_ext >&5
8692 rm -rf conftest*
8693 eval "ac_cv_func_socket=no"
8695 rm -f conftest*
8698 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
8699 echo "$ac_t""yes" 1>&6
8701 else
8702 echo "$ac_t""no" 1>&6
8703 ok_so_far=no
8706 if test $ok_so_far = yes; then
8707 ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'`
8708 echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6
8709 echo "configure:8710: checking for netinet/in.h" >&5
8710 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8711 echo $ac_n "(cached) $ac_c" 1>&6
8712 else
8713 cat > conftest.$ac_ext <<EOF
8714 #line 8715 "configure"
8715 #include "confdefs.h"
8716 #include <netinet/in.h>
8718 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8719 { (eval echo configure:8720: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8720 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8721 if test -z "$ac_err"; then
8722 rm -rf conftest*
8723 eval "ac_cv_header_$ac_safe=yes"
8724 else
8725 echo "$ac_err" >&5
8726 echo "configure: failed program was:" >&5
8727 cat conftest.$ac_ext >&5
8728 rm -rf conftest*
8729 eval "ac_cv_header_$ac_safe=no"
8731 rm -f conftest*
8733 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8734 echo "$ac_t""yes" 1>&6
8736 else
8737 echo "$ac_t""no" 1>&6
8738 ok_so_far=no
8742 if test $ok_so_far = yes; then
8743 ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'`
8744 echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6
8745 echo "configure:8746: checking for arpa/inet.h" >&5
8746 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8747 echo $ac_n "(cached) $ac_c" 1>&6
8748 else
8749 cat > conftest.$ac_ext <<EOF
8750 #line 8751 "configure"
8751 #include "confdefs.h"
8752 #include <arpa/inet.h>
8754 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8755 { (eval echo configure:8756: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8756 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8757 if test -z "$ac_err"; then
8758 rm -rf conftest*
8759 eval "ac_cv_header_$ac_safe=yes"
8760 else
8761 echo "$ac_err" >&5
8762 echo "configure: failed program was:" >&5
8763 cat conftest.$ac_ext >&5
8764 rm -rf conftest*
8765 eval "ac_cv_header_$ac_safe=no"
8767 rm -f conftest*
8769 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8770 echo "$ac_t""yes" 1>&6
8772 else
8773 echo "$ac_t""no" 1>&6
8774 ok_so_far=no
8778 if test $ok_so_far = yes; then
8779 cat >> confdefs.h <<\EOF
8780 #define HAVE_INET_SOCKETS 1
8785 if test -f /usr/lpp/X11/bin/smt.exp; then
8786 cat >> confdefs.h <<\EOF
8787 #define HAVE_AIX_SMT_EXP 1
8792 echo $ac_n "checking whether system supports dynamic ptys""... $ac_c" 1>&6
8793 echo "configure:8794: checking whether system supports dynamic ptys" >&5
8794 if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then
8795 echo "$ac_t""yes" 1>&6
8796 cat >> confdefs.h <<\EOF
8797 #define HAVE_DEV_PTMX 1
8800 else
8801 echo "$ac_t""no" 1>&6
8804 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
8805 echo "configure:8806: checking for pid_t" >&5
8806 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
8807 echo $ac_n "(cached) $ac_c" 1>&6
8808 else
8809 cat > conftest.$ac_ext <<EOF
8810 #line 8811 "configure"
8811 #include "confdefs.h"
8812 #include <sys/types.h>
8813 #if STDC_HEADERS
8814 #include <stdlib.h>
8815 #include <stddef.h>
8816 #endif
8818 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8819 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
8820 rm -rf conftest*
8821 ac_cv_type_pid_t=yes
8822 else
8823 rm -rf conftest*
8824 ac_cv_type_pid_t=no
8826 rm -f conftest*
8829 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
8830 if test $ac_cv_type_pid_t = no; then
8831 cat >> confdefs.h <<\EOF
8832 #define pid_t int
8837 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
8838 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
8839 echo "configure:8840: checking for vfork.h" >&5
8840 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8841 echo $ac_n "(cached) $ac_c" 1>&6
8842 else
8843 cat > conftest.$ac_ext <<EOF
8844 #line 8845 "configure"
8845 #include "confdefs.h"
8846 #include <vfork.h>
8848 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8849 { (eval echo configure:8850: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8850 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8851 if test -z "$ac_err"; then
8852 rm -rf conftest*
8853 eval "ac_cv_header_$ac_safe=yes"
8854 else
8855 echo "$ac_err" >&5
8856 echo "configure: failed program was:" >&5
8857 cat conftest.$ac_ext >&5
8858 rm -rf conftest*
8859 eval "ac_cv_header_$ac_safe=no"
8861 rm -f conftest*
8863 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8864 echo "$ac_t""yes" 1>&6
8865 cat >> confdefs.h <<\EOF
8866 #define HAVE_VFORK_H 1
8869 else
8870 echo "$ac_t""no" 1>&6
8873 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
8874 echo "configure:8875: checking for working vfork" >&5
8875 if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
8876 echo $ac_n "(cached) $ac_c" 1>&6
8877 else
8878 if test "$cross_compiling" = yes; then
8879 echo $ac_n "checking for vfork""... $ac_c" 1>&6
8880 echo "configure:8881: checking for vfork" >&5
8881 if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
8882 echo $ac_n "(cached) $ac_c" 1>&6
8883 else
8884 cat > conftest.$ac_ext <<EOF
8885 #line 8886 "configure"
8886 #include "confdefs.h"
8887 /* System header to define __stub macros and hopefully few prototypes,
8888 which can conflict with char vfork(); below. */
8889 #include <assert.h>
8890 /* Override any gcc2 internal prototype to avoid an error. */
8891 /* We use char because int might match the return type of a gcc2
8892 builtin and then its argument prototype would still apply. */
8893 char vfork();
8895 int main() {
8897 /* The GNU C library defines this for functions which it implements
8898 to always fail with ENOSYS. Some functions are actually named
8899 something starting with __ and the normal name is an alias. */
8900 #if defined (__stub_vfork) || defined (__stub___vfork)
8901 choke me
8902 #else
8903 vfork();
8904 #endif
8906 ; return 0; }
8908 if { (eval echo configure:8909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8909 rm -rf conftest*
8910 eval "ac_cv_func_vfork=yes"
8911 else
8912 echo "configure: failed program was:" >&5
8913 cat conftest.$ac_ext >&5
8914 rm -rf conftest*
8915 eval "ac_cv_func_vfork=no"
8917 rm -f conftest*
8920 if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
8921 echo "$ac_t""yes" 1>&6
8923 else
8924 echo "$ac_t""no" 1>&6
8927 ac_cv_func_vfork_works=$ac_cv_func_vfork
8928 else
8929 cat > conftest.$ac_ext <<EOF
8930 #line 8931 "configure"
8931 #include "confdefs.h"
8932 /* Thanks to Paul Eggert for this test. */
8933 #include <stdio.h>
8934 #include <sys/types.h>
8935 #include <sys/stat.h>
8936 #ifdef HAVE_UNISTD_H
8937 #include <unistd.h>
8938 #endif
8939 #ifdef HAVE_VFORK_H
8940 #include <vfork.h>
8941 #endif
8942 /* On some sparc systems, changes by the child to local and incoming
8943 argument registers are propagated back to the parent.
8944 The compiler is told about this with #include <vfork.h>,
8945 but some compilers (e.g. gcc -O) don't grok <vfork.h>.
8946 Test for this by using a static variable whose address
8947 is put into a register that is clobbered by the vfork. */
8948 static
8949 #ifdef __cplusplus
8950 sparc_address_test (int arg)
8951 #else
8952 sparc_address_test (arg) int arg;
8953 #endif
8955 static pid_t child;
8956 if (!child) {
8957 child = vfork ();
8958 if (child < 0) {
8959 perror ("vfork");
8960 _exit(2);
8962 if (!child) {
8963 arg = getpid();
8964 write(-1, "", 0);
8965 _exit (arg);
8969 main() {
8970 pid_t parent = getpid ();
8971 pid_t child;
8973 sparc_address_test ();
8975 child = vfork ();
8977 if (child == 0) {
8978 /* Here is another test for sparc vfork register problems.
8979 This test uses lots of local variables, at least
8980 as many local variables as main has allocated so far
8981 including compiler temporaries. 4 locals are enough for
8982 gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
8983 A buggy compiler should reuse the register of parent
8984 for one of the local variables, since it will think that
8985 parent can't possibly be used any more in this routine.
8986 Assigning to the local variable will thus munge parent
8987 in the parent process. */
8988 pid_t
8989 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
8990 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
8991 /* Convince the compiler that p..p7 are live; otherwise, it might
8992 use the same hardware register for all 8 local variables. */
8993 if (p != p1 || p != p2 || p != p3 || p != p4
8994 || p != p5 || p != p6 || p != p7)
8995 _exit(1);
8997 /* On some systems (e.g. IRIX 3.3),
8998 vfork doesn't separate parent from child file descriptors.
8999 If the child closes a descriptor before it execs or exits,
9000 this munges the parent's descriptor as well.
9001 Test for this by closing stdout in the child. */
9002 _exit(close(fileno(stdout)) != 0);
9003 } else {
9004 int status;
9005 struct stat st;
9007 while (wait(&status) != child)
9009 exit(
9010 /* Was there some problem with vforking? */
9011 child < 0
9013 /* Did the child fail? (This shouldn't happen.) */
9014 || status
9016 /* Did the vfork/compiler bug occur? */
9017 || parent != getpid()
9019 /* Did the file descriptor bug occur? */
9020 || fstat(fileno(stdout), &st) != 0
9025 if { (eval echo configure:9026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9026 then
9027 ac_cv_func_vfork_works=yes
9028 else
9029 echo "configure: failed program was:" >&5
9030 cat conftest.$ac_ext >&5
9031 rm -fr conftest*
9032 ac_cv_func_vfork_works=no
9034 rm -fr conftest*
9039 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
9040 if test $ac_cv_func_vfork_works = no; then
9041 cat >> confdefs.h <<\EOF
9042 #define vfork fork
9048 # Fixme: This should be replaced when we have autoconf 2.14.
9049 echo $ac_n "checking for size_t""... $ac_c" 1>&6
9050 echo "configure:9051: checking for size_t" >&5
9051 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
9052 echo $ac_n "(cached) $ac_c" 1>&6
9053 else
9054 cat > conftest.$ac_ext <<EOF
9055 #line 9056 "configure"
9056 #include "confdefs.h"
9057 #include <sys/types.h>
9058 #if STDC_HEADERS
9059 #include <stdlib.h>
9060 #include <stddef.h>
9061 #endif
9063 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9064 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
9065 rm -rf conftest*
9066 ac_cv_type_size_t=yes
9067 else
9068 rm -rf conftest*
9069 ac_cv_type_size_t=no
9071 rm -f conftest*
9074 echo "$ac_t""$ac_cv_type_size_t" 1>&6
9075 if test $ac_cv_type_size_t = no; then
9076 cat >> confdefs.h <<\EOF
9077 #define size_t unsigned
9083 # Set up the CFLAGS for real compilation, so we can substitute it.
9084 CFLAGS="$REAL_CFLAGS"
9085 CPPFLAGS="$REAL_CPPFLAGS"
9087 #### Find out which version of Emacs this is.
9088 version=`grep 'defconst[ ]*emacs-version' ${srcdir}/lisp/version.el \
9089 | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`
9090 if test x"${version}" = x; then
9091 { echo "configure: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." 1>&2; exit 1; }
9094 ### Specify what sort of things we'll be editing into Makefile and config.h.
9095 ### Use configuration here uncanonicalized to avoid exceeding size limits.
9127 cat >> confdefs.h <<EOF
9128 #define EMACS_CONFIGURATION "${canonical}"
9131 cat >> confdefs.h <<EOF
9132 #define EMACS_CONFIG_OPTIONS "${ac_configure_args}"
9135 cat >> confdefs.h <<EOF
9136 #define config_machfile "${machfile}"
9139 cat >> confdefs.h <<EOF
9140 #define config_opsysfile "${opsysfile}"
9143 cat >> confdefs.h <<EOF
9144 #define LD_SWITCH_X_SITE ${LD_SWITCH_X_SITE}
9147 cat >> confdefs.h <<EOF
9148 #define LD_SWITCH_X_SITE_AUX ${LD_SWITCH_X_SITE_AUX}
9151 cat >> confdefs.h <<EOF
9152 #define C_SWITCH_X_SITE ${C_SWITCH_X_SITE}
9155 cat >> confdefs.h <<EOF
9156 #define UNEXEC_SRC ${UNEXEC_SRC}
9160 if test "${HAVE_X_WINDOWS}" = "yes" ; then
9161 cat >> confdefs.h <<\EOF
9162 #define HAVE_X_WINDOWS 1
9166 if test "${USE_X_TOOLKIT}" != "none" ; then
9167 cat >> confdefs.h <<\EOF
9168 #define USE_X_TOOLKIT 1
9172 if test "${HAVE_X11}" = "yes" ; then
9173 cat >> confdefs.h <<\EOF
9174 #define HAVE_X11 1
9178 if test "${HAVE_XFREE386}" = "yes" ; then
9179 cat >> confdefs.h <<\EOF
9180 #define HAVE_XFREE386 1
9184 if test "${HAVE_MENUS}" = "yes" ; then
9185 cat >> confdefs.h <<\EOF
9186 #define HAVE_MENUS 1
9190 if test "${GNU_MALLOC}" = "yes" ; then
9191 cat >> confdefs.h <<\EOF
9192 #define GNU_MALLOC 1
9196 if test "${REL_ALLOC}" = "yes" ; then
9197 cat >> confdefs.h <<\EOF
9198 #define REL_ALLOC 1
9203 #### Report on what we decided to do.
9204 echo "
9205 Configured for \`${canonical}'.
9207 Where should the build process find the source code? ${srcdir}
9208 What operating system and machine description files should Emacs use?
9209 \`${opsysfile}' and \`${machfile}'
9210 What compiler should emacs be built with? ${CC} ${CFLAGS}
9211 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
9212 Should Emacs use a relocating allocator for buffers? ${REL_ALLOC}
9213 Should Emacs use mmap(2) for buffer allocation? $use_mmap_for_buffers
9214 What window system should Emacs use? ${window_system}
9215 What toolkit should Emacs use? ${USE_X_TOOLKIT}"
9217 if test -n "${x_includes}"; then
9218 echo " Where do we find X Windows header files? ${x_includes}"
9219 else
9220 echo " Where do we find X Windows header files? Standard dirs"
9222 if test -n "${x_libraries}"; then
9223 echo " Where do we find X Windows libraries? ${x_libraries}"
9224 else
9225 echo " Where do we find X Windows libraries? Standard dirs"
9228 echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}"
9229 echo " Does Emacs use -lXpm? ${HAVE_XPM}"
9230 echo " Does Emacs use -ljpeg? ${HAVE_JPEG}"
9231 echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
9232 echo " Does Emacs use -lungif? ${HAVE_GIF}"
9233 echo " Does Emacs use -lpng? ${HAVE_PNG}"
9234 echo " Does Emacs use X toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}"
9235 echo
9237 # Remove any trailing slashes in these variables.
9238 test "${prefix}" != NONE &&
9239 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
9240 test "${exec_prefix}" != NONE &&
9241 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
9243 ## Check if the C preprocessor will convert `..' to `. .'. If so, set
9244 ## CPP_NEED_TRADITIONAL to `yes' so that the code to generate Makefile
9245 ## from Makefile.c can correctly provide the arg `-traditional' to the
9246 ## C preprocessor.
9248 cat > conftest.$ac_ext <<EOF
9249 #line 9250 "configure"
9250 #include "confdefs.h"
9251 yes..yes
9253 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9254 egrep "yes..yes" >/dev/null 2>&1; then
9255 rm -rf conftest*
9256 CPP_NEED_TRADITIONAL=no
9257 else
9258 rm -rf conftest*
9259 CPP_NEED_TRADITIONAL=yes
9261 rm -f conftest*
9264 trap '' 1 2 15
9265 cat > confcache <<\EOF
9266 # This file is a shell script that caches the results of configure
9267 # tests run on this system so they can be shared between configure
9268 # scripts and configure runs. It is not useful on other systems.
9269 # If it contains results you don't want to keep, you may remove or edit it.
9271 # By default, configure uses ./config.cache as the cache file,
9272 # creating it if it does not exist already. You can give configure
9273 # the --cache-file=FILE option to use a different cache file; that is
9274 # what configure does when it calls configure scripts in
9275 # subdirectories, so they share the cache.
9276 # Giving --cache-file=/dev/null disables caching, for debugging configure.
9277 # config.status only pays attention to the cache file if you give it the
9278 # --recheck option to rerun configure.
9281 # The following way of writing the cache mishandles newlines in values,
9282 # but we know of no workaround that is simple, portable, and efficient.
9283 # So, don't put newlines in cache variables' values.
9284 # Ultrix sh set writes to stderr and can't be redirected directly,
9285 # and sets the high bit in the cache file unless we assign to the vars.
9286 (set) 2>&1 |
9287 case `(ac_space=' '; set | grep ac_space) 2>&1` in
9288 *ac_space=\ *)
9289 # `set' does not quote correctly, so add quotes (double-quote substitution
9290 # turns \\\\ into \\, and sed turns \\ into \).
9291 sed -n \
9292 -e "s/'/'\\\\''/g" \
9293 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
9296 # `set' quotes correctly as required by POSIX, so do not add quotes.
9297 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
9299 esac >> confcache
9300 if cmp -s $cache_file confcache; then
9302 else
9303 if test -w $cache_file; then
9304 echo "updating cache $cache_file"
9305 cat confcache > $cache_file
9306 else
9307 echo "not updating unwritable cache $cache_file"
9310 rm -f confcache
9312 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
9314 test "x$prefix" = xNONE && prefix=$ac_default_prefix
9315 # Let make expand exec_prefix.
9316 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9318 # Any assignment to VPATH causes Sun make to only execute
9319 # the first set of double-colon rules, so remove it if not needed.
9320 # If there is a colon in the path, we need to keep it.
9321 if test "x$srcdir" = x.; then
9322 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
9325 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
9327 DEFS=-DHAVE_CONFIG_H
9329 # Without the "./", some shells look in PATH for config.status.
9330 : ${CONFIG_STATUS=./config.status}
9332 echo creating $CONFIG_STATUS
9333 rm -f $CONFIG_STATUS
9334 cat > $CONFIG_STATUS <<EOF
9335 #! /bin/sh
9336 # Generated automatically by configure.
9337 # Run this file to recreate the current configuration.
9338 # This directory was configured as follows,
9339 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
9341 # $0 $ac_configure_args
9343 # Compiler output produced by configure, useful for debugging
9344 # configure, is in ./config.log if it exists.
9346 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
9347 for ac_option
9349 case "\$ac_option" in
9350 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
9351 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
9352 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
9353 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
9354 echo "$CONFIG_STATUS generated by autoconf version 2.13"
9355 exit 0 ;;
9356 -help | --help | --hel | --he | --h)
9357 echo "\$ac_cs_usage"; exit 0 ;;
9358 *) echo "\$ac_cs_usage"; exit 1 ;;
9359 esac
9360 done
9362 ac_given_srcdir=$srcdir
9363 ac_given_INSTALL="$INSTALL"
9365 trap 'rm -fr `echo "Makefile lib-src/Makefile.c:lib-src/Makefile.in oldXMenu/Makefile \
9366 man/Makefile lwlib/Makefile src/Makefile.c:src/Makefile.in \
9367 lisp/Makefile leim/Makefile src/config.h:src/config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
9369 cat >> $CONFIG_STATUS <<EOF
9371 # Protect against being on the right side of a sed subst in config.status.
9372 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
9373 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
9374 $ac_vpsub
9375 $extrasub
9376 s%@SHELL@%$SHELL%g
9377 s%@CFLAGS@%$CFLAGS%g
9378 s%@CPPFLAGS@%$CPPFLAGS%g
9379 s%@CXXFLAGS@%$CXXFLAGS%g
9380 s%@FFLAGS@%$FFLAGS%g
9381 s%@DEFS@%$DEFS%g
9382 s%@LDFLAGS@%$LDFLAGS%g
9383 s%@LIBS@%$LIBS%g
9384 s%@exec_prefix@%$exec_prefix%g
9385 s%@prefix@%$prefix%g
9386 s%@program_transform_name@%$program_transform_name%g
9387 s%@bindir@%$bindir%g
9388 s%@sbindir@%$sbindir%g
9389 s%@libexecdir@%$libexecdir%g
9390 s%@datadir@%$datadir%g
9391 s%@sysconfdir@%$sysconfdir%g
9392 s%@sharedstatedir@%$sharedstatedir%g
9393 s%@localstatedir@%$localstatedir%g
9394 s%@libdir@%$libdir%g
9395 s%@includedir@%$includedir%g
9396 s%@oldincludedir@%$oldincludedir%g
9397 s%@infodir@%$infodir%g
9398 s%@mandir@%$mandir%g
9399 s%@host@%$host%g
9400 s%@host_alias@%$host_alias%g
9401 s%@host_cpu@%$host_cpu%g
9402 s%@host_vendor@%$host_vendor%g
9403 s%@host_os@%$host_os%g
9404 s%@CC@%$CC%g
9405 s%@LN_S@%$LN_S%g
9406 s%@CPP@%$CPP%g
9407 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
9408 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
9409 s%@INSTALL_DATA@%$INSTALL_DATA%g
9410 s%@YACC@%$YACC%g
9411 s%@RANLIB@%$RANLIB%g
9412 s%@LIBSOUND@%$LIBSOUND%g
9413 s%@SET_MAKE@%$SET_MAKE%g
9414 s%@ALLOCA@%$ALLOCA%g
9415 s%@liblockfile@%$liblockfile%g
9416 s%@LIBOBJS@%$LIBOBJS%g
9417 s%@NEED_SETGID@%$NEED_SETGID%g
9418 s%@KMEM_GROUP@%$KMEM_GROUP%g
9419 s%@version@%$version%g
9420 s%@configuration@%$configuration%g
9421 s%@canonical@%$canonical%g
9422 s%@srcdir@%$srcdir%g
9423 s%@lispdir@%$lispdir%g
9424 s%@locallisppath@%$locallisppath%g
9425 s%@lisppath@%$lisppath%g
9426 s%@x_default_search_path@%$x_default_search_path%g
9427 s%@etcdir@%$etcdir%g
9428 s%@archlibdir@%$archlibdir%g
9429 s%@docdir@%$docdir%g
9430 s%@bitmapdir@%$bitmapdir%g
9431 s%@c_switch_system@%$c_switch_system%g
9432 s%@c_switch_machine@%$c_switch_machine%g
9433 s%@LD_SWITCH_X_SITE@%$LD_SWITCH_X_SITE%g
9434 s%@LD_SWITCH_X_SITE_AUX@%$LD_SWITCH_X_SITE_AUX%g
9435 s%@C_SWITCH_X_SITE@%$C_SWITCH_X_SITE%g
9436 s%@X_TOOLKIT_TYPE@%$X_TOOLKIT_TYPE%g
9437 s%@machfile@%$machfile%g
9438 s%@opsysfile@%$opsysfile%g
9439 s%@GETLOADAVG_LIBS@%$GETLOADAVG_LIBS%g
9441 CEOF
9444 cat >> $CONFIG_STATUS <<\EOF
9446 # Split the substitutions into bite-sized pieces for seds with
9447 # small command number limits, like on Digital OSF/1 and HP-UX.
9448 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
9449 ac_file=1 # Number of current file.
9450 ac_beg=1 # First line for current file.
9451 ac_end=$ac_max_sed_cmds # Line after last line for current file.
9452 ac_more_lines=:
9453 ac_sed_cmds=""
9454 while $ac_more_lines; do
9455 if test $ac_beg -gt 1; then
9456 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
9457 else
9458 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
9460 if test ! -s conftest.s$ac_file; then
9461 ac_more_lines=false
9462 rm -f conftest.s$ac_file
9463 else
9464 if test -z "$ac_sed_cmds"; then
9465 ac_sed_cmds="sed -f conftest.s$ac_file"
9466 else
9467 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
9469 ac_file=`expr $ac_file + 1`
9470 ac_beg=$ac_end
9471 ac_end=`expr $ac_end + $ac_max_sed_cmds`
9473 done
9474 if test -z "$ac_sed_cmds"; then
9475 ac_sed_cmds=cat
9479 cat >> $CONFIG_STATUS <<EOF
9481 CONFIG_FILES=\${CONFIG_FILES-"Makefile lib-src/Makefile.c:lib-src/Makefile.in oldXMenu/Makefile \
9482 man/Makefile lwlib/Makefile src/Makefile.c:src/Makefile.in \
9483 lisp/Makefile leim/Makefile"}
9485 cat >> $CONFIG_STATUS <<\EOF
9486 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
9487 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9488 case "$ac_file" in
9489 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9490 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9491 *) ac_file_in="${ac_file}.in" ;;
9492 esac
9494 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
9496 # Remove last slash and all that follows it. Not all systems have dirname.
9497 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9498 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9499 # The file is in a subdirectory.
9500 test ! -d "$ac_dir" && mkdir "$ac_dir"
9501 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
9502 # A "../" for each directory in $ac_dir_suffix.
9503 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
9504 else
9505 ac_dir_suffix= ac_dots=
9508 case "$ac_given_srcdir" in
9509 .) srcdir=.
9510 if test -z "$ac_dots"; then top_srcdir=.
9511 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
9512 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
9513 *) # Relative path.
9514 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
9515 top_srcdir="$ac_dots$ac_given_srcdir" ;;
9516 esac
9518 case "$ac_given_INSTALL" in
9519 [/$]*) INSTALL="$ac_given_INSTALL" ;;
9520 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
9521 esac
9523 echo creating "$ac_file"
9524 rm -f "$ac_file"
9525 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
9526 case "$ac_file" in
9527 *Makefile*) ac_comsub="1i\\
9528 # $configure_input" ;;
9529 *) ac_comsub= ;;
9530 esac
9532 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9533 sed -e "$ac_comsub
9534 s%@configure_input@%$configure_input%g
9535 s%@srcdir@%$srcdir%g
9536 s%@top_srcdir@%$top_srcdir%g
9537 s%@INSTALL@%$INSTALL%g
9538 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
9539 fi; done
9540 rm -f conftest.s*
9542 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
9543 # NAME is the cpp macro being defined and VALUE is the value it is being given.
9545 # ac_d sets the value in "#define NAME VALUE" lines.
9546 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
9547 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
9548 ac_dC='\3'
9549 ac_dD='%g'
9550 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
9551 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
9552 ac_uB='\([ ]\)%\1#\2define\3'
9553 ac_uC=' '
9554 ac_uD='\4%g'
9555 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
9556 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
9557 ac_eB='$%\1#\2define\3'
9558 ac_eC=' '
9559 ac_eD='%g'
9561 if test "${CONFIG_HEADERS+set}" != set; then
9563 cat >> $CONFIG_STATUS <<EOF
9564 CONFIG_HEADERS="src/config.h:src/config.in"
9566 cat >> $CONFIG_STATUS <<\EOF
9568 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
9569 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9570 case "$ac_file" in
9571 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9572 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9573 *) ac_file_in="${ac_file}.in" ;;
9574 esac
9576 echo creating $ac_file
9578 rm -f conftest.frag conftest.in conftest.out
9579 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9580 cat $ac_file_inputs > conftest.in
9584 # Transform confdefs.h into a sed script conftest.vals that substitutes
9585 # the proper values into config.h.in to produce config.h. And first:
9586 # Protect against being on the right side of a sed subst in config.status.
9587 # Protect against being in an unquoted here document in config.status.
9588 rm -f conftest.vals
9589 cat > conftest.hdr <<\EOF
9590 s/[\\&%]/\\&/g
9591 s%[\\$`]%\\&%g
9592 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
9593 s%ac_d%ac_u%gp
9594 s%ac_u%ac_e%gp
9596 sed -n -f conftest.hdr confdefs.h > conftest.vals
9597 rm -f conftest.hdr
9599 # This sed command replaces #undef with comments. This is necessary, for
9600 # example, in the case of _POSIX_SOURCE, which is predefined and required
9601 # on some systems where configure will not decide to define it.
9602 cat >> conftest.vals <<\EOF
9603 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
9606 # Break up conftest.vals because some shells have a limit on
9607 # the size of here documents, and old seds have small limits too.
9609 rm -f conftest.tail
9610 while :
9612 ac_lines=`grep -c . conftest.vals`
9613 # grep -c gives empty output for an empty file on some AIX systems.
9614 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
9615 # Write a limited-size here document to conftest.frag.
9616 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
9617 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
9618 echo 'CEOF
9619 sed -f conftest.frag conftest.in > conftest.out
9620 rm -f conftest.in
9621 mv conftest.out conftest.in
9622 ' >> $CONFIG_STATUS
9623 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
9624 rm -f conftest.vals
9625 mv conftest.tail conftest.vals
9626 done
9627 rm -f conftest.vals
9629 cat >> $CONFIG_STATUS <<\EOF
9630 rm -f conftest.frag conftest.h
9631 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
9632 cat conftest.in >> conftest.h
9633 rm -f conftest.in
9634 if cmp -s $ac_file conftest.h 2>/dev/null; then
9635 echo "$ac_file is unchanged"
9636 rm -f conftest.h
9637 else
9638 # Remove last slash and all that follows it. Not all systems have dirname.
9639 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9640 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9641 # The file is in a subdirectory.
9642 test ! -d "$ac_dir" && mkdir "$ac_dir"
9644 rm -f $ac_file
9645 mv conftest.h $ac_file
9647 fi; done
9650 cat >> $CONFIG_STATUS <<EOF
9651 GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPP_NEED_TRADITIONAL="$CPP_NEED_TRADITIONAL" CPPFLAGS="$CPPFLAGS"
9653 cat >> $CONFIG_STATUS <<\EOF
9656 ### Make the necessary directories, if they don't exist.
9657 for dir in etc lisp ; do
9658 test -d ${dir} || mkdir ${dir}
9659 done
9661 # Build src/Makefile from ${srcdir}/src/Makefile.c
9662 # and lib-src/Makefile from ${srcdir}/lib-src/Makefile.c
9663 # This must be done after src/config.h is built, since we rely on that file.
9665 # Now get this: Some word that is part of the ${srcdir} directory name
9666 # or the ${configuration} value might, just might, happen to be an
9667 # identifier like `sun4' or `i386' or something, and be predefined by
9668 # the C preprocessor to some helpful value like 1, or maybe the empty
9669 # string. Needless to say consequent macro substitutions are less
9670 # than conducive to the makefile finding the correct directory.
9671 undefs="`echo $top_srcdir $configuration $canonical |
9672 sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/^/ /' -e 's/ *$//' \
9673 -e 's/ */ -U/g' -e 's/-U[0-9][^ ]*//g' \
9676 echo creating src/epaths.h
9677 ${MAKE-make} epaths-force
9679 # As of 2000-11-19, newest development versions of GNU cpp preprocess
9680 # `..' to `. .' unless invoked with -traditional
9682 if test "x$GCC" = xyes && test "x$CPP_NEED_TRADITIONAL" = xyes; then
9683 CPPFLAGS="$CPPFLAGS -traditional"
9686 echo creating lib-src/Makefile
9687 ( cd lib-src
9688 rm -f junk.c junk1.c junk2.c
9689 sed -e '/start of cpp stuff/q' \
9690 < Makefile.c > junk1.c
9691 sed -e '1,/start of cpp stuff/d'\
9692 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
9693 < Makefile.c > junk.c
9694 $CPP $undefs -I. -I$top_srcdir/src $CPPFLAGS junk.c | \
9695 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
9696 cat junk1.c junk2.c > Makefile.new
9697 rm -f junk.c junk1.c junk2.c
9698 chmod 444 Makefile.new
9699 mv -f Makefile.new Makefile
9702 echo creating src/Makefile
9703 ( cd src
9704 rm -f junk.c junk1.c junk2.c
9705 sed -e '/start of cpp stuff/q' \
9706 < Makefile.c > junk1.c
9707 sed -e '1,/start of cpp stuff/d'\
9708 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
9709 < Makefile.c > junk.c
9710 $CPP $undefs -I. -I$top_srcdir/src $CPPFLAGS junk.c | \
9711 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
9712 cat junk1.c junk2.c > Makefile.new
9713 rm -f junk.c junk1.c junk2.c
9714 chmod 444 Makefile.new
9715 mv -f Makefile.new Makefile
9718 if test ! -f src/.gdbinit && test -f $top_srcdir/src/.gdbinit; then
9719 echo creating src/.gdbinit
9720 echo source $top_srcdir/src/.gdbinit > src/.gdbinit
9723 # This is how we know whether to re-run configure in certain cases.
9724 touch src/config.stamp
9727 exit 0
9729 chmod +x $CONFIG_STATUS
9730 rm -fr confdefs* $ac_clean_files
9731 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1