(cc-align): Required by c-set-style.
[emacs.git] / configure
blob5a72cb38525560e97eded49a3d18ef8a07cfcc8f
1 #! /bin/sh
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_help="$ac_help
15 --without-gcc don't use GCC to compile Emacs if GCC is found"
16 ac_help="$ac_help
17 --without-pop don't support POP mail retrieval with movemail"
18 ac_help="$ac_help
19 --with-kerberos support Kerberos-authenticated POP"
20 ac_help="$ac_help
21 --with-kerberos5 support Kerberos version 5 authenticated POP"
22 ac_help="$ac_help
23 --with-hesiod support Hesiod to get the POP server host"
24 ac_help="$ac_help
25 --with-x-toolkit=KIT use an X toolkit (KIT = yes/lucid/athena/motif/no)"
26 ac_help="$ac_help
27 --with-xpm use -lXpm for displaying XPM images"
28 ac_help="$ac_help
29 --with-jpeg use -ljpeg for displaying JPEG images"
30 ac_help="$ac_help
31 --with-tiff use -ltiff for displaying TIFF images"
32 ac_help="$ac_help
33 --with-gif use -lungif for displaying GIF images"
34 ac_help="$ac_help
35 --with-png use -lpng for displaying PNG images"
36 ac_help="$ac_help
37 --without-toolkit-scroll-bars
38 don't use Motif or Xaw3d scroll bars"
39 ac_help="$ac_help
40 --without-xim don't use X11 XIM"
41 ac_help="$ac_help
42 --disable-largefile omit support for large files"
43 ac_help="$ac_help
44 --with-x use the X Window System"
46 # Initialize some variables set by options.
47 # The variables have the same names as the options, with
48 # dashes changed to underlines.
49 build=NONE
50 cache_file=./config.cache
51 exec_prefix=NONE
52 host=NONE
53 no_create=
54 nonopt=NONE
55 no_recursion=
56 prefix=NONE
57 program_prefix=NONE
58 program_suffix=NONE
59 program_transform_name=s,x,x,
60 silent=
61 site=
62 srcdir=
63 target=NONE
64 verbose=
65 x_includes=NONE
66 x_libraries=NONE
67 bindir='${exec_prefix}/bin'
68 sbindir='${exec_prefix}/sbin'
69 libexecdir='${exec_prefix}/libexec'
70 datadir='${prefix}/share'
71 sysconfdir='${prefix}/etc'
72 sharedstatedir='${prefix}/com'
73 localstatedir='${prefix}/var'
74 libdir='${exec_prefix}/lib'
75 includedir='${prefix}/include'
76 oldincludedir='/usr/include'
77 infodir='${prefix}/info'
78 mandir='${prefix}/man'
80 # Initialize some other variables.
81 subdirs=
82 MFLAGS= MAKEFLAGS=
83 SHELL=${CONFIG_SHELL-/bin/sh}
84 # Maximum number of lines to put in a shell here document.
85 ac_max_here_lines=12
87 ac_prev=
88 for ac_option
91 # If the previous option needs an argument, assign it.
92 if test -n "$ac_prev"; then
93 eval "$ac_prev=\$ac_option"
94 ac_prev=
95 continue
98 case "$ac_option" in
99 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
100 *) ac_optarg= ;;
101 esac
103 # Accept the important Cygnus configure options, so we can diagnose typos.
105 case "$ac_option" in
107 -bindir | --bindir | --bindi | --bind | --bin | --bi)
108 ac_prev=bindir ;;
109 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
110 bindir="$ac_optarg" ;;
112 -build | --build | --buil | --bui | --bu)
113 ac_prev=build ;;
114 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
115 build="$ac_optarg" ;;
117 -cache-file | --cache-file | --cache-fil | --cache-fi \
118 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
119 ac_prev=cache_file ;;
120 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
121 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
122 cache_file="$ac_optarg" ;;
124 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
125 ac_prev=datadir ;;
126 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
127 | --da=*)
128 datadir="$ac_optarg" ;;
130 -disable-* | --disable-*)
131 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
132 # Reject names that are not valid shell variable names.
133 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
134 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
136 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
137 eval "enable_${ac_feature}=no" ;;
139 -enable-* | --enable-*)
140 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
141 # Reject names that are not valid shell variable names.
142 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
143 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
145 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
146 case "$ac_option" in
147 *=*) ;;
148 *) ac_optarg=yes ;;
149 esac
150 eval "enable_${ac_feature}='$ac_optarg'" ;;
152 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
153 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
154 | --exec | --exe | --ex)
155 ac_prev=exec_prefix ;;
156 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
157 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
158 | --exec=* | --exe=* | --ex=*)
159 exec_prefix="$ac_optarg" ;;
161 -gas | --gas | --ga | --g)
162 # Obsolete; use --with-gas.
163 with_gas=yes ;;
165 -help | --help | --hel | --he)
166 # Omit some internal or obsolete options to make the list less imposing.
167 # This message is too long to be a string in the A/UX 3.1 sh.
168 cat << EOF
169 Usage: configure [options] [host]
170 Options: [defaults in brackets after descriptions]
171 Configuration:
172 --cache-file=FILE cache test results in FILE
173 --help print this message
174 --no-create do not create output files
175 --quiet, --silent do not print \`checking...' messages
176 --version print the version of autoconf that created configure
177 Directory and file names:
178 --prefix=PREFIX install architecture-independent files in PREFIX
179 [$ac_default_prefix]
180 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
181 [same as prefix]
182 --bindir=DIR user executables in DIR [EPREFIX/bin]
183 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
184 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
185 --datadir=DIR read-only architecture-independent data in DIR
186 [PREFIX/share]
187 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
188 --sharedstatedir=DIR modifiable architecture-independent data in DIR
189 [PREFIX/com]
190 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
191 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
192 --includedir=DIR C header files in DIR [PREFIX/include]
193 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
194 --infodir=DIR info documentation in DIR [PREFIX/info]
195 --mandir=DIR man documentation in DIR [PREFIX/man]
196 --srcdir=DIR find the sources in DIR [configure dir or ..]
197 --program-prefix=PREFIX prepend PREFIX to installed program names
198 --program-suffix=SUFFIX append SUFFIX to installed program names
199 --program-transform-name=PROGRAM
200 run sed PROGRAM on installed program names
202 cat << EOF
203 Host type:
204 --build=BUILD configure for building on BUILD [BUILD=HOST]
205 --host=HOST configure for HOST [guessed]
206 --target=TARGET configure for TARGET [TARGET=HOST]
207 Features and packages:
208 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
209 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
210 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
211 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
212 --x-includes=DIR X include files are in DIR
213 --x-libraries=DIR X library files are in DIR
215 if test -n "$ac_help"; then
216 echo "--enable and --with options recognized:$ac_help"
218 exit 0 ;;
220 -host | --host | --hos | --ho)
221 ac_prev=host ;;
222 -host=* | --host=* | --hos=* | --ho=*)
223 host="$ac_optarg" ;;
225 -includedir | --includedir | --includedi | --included | --include \
226 | --includ | --inclu | --incl | --inc)
227 ac_prev=includedir ;;
228 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
229 | --includ=* | --inclu=* | --incl=* | --inc=*)
230 includedir="$ac_optarg" ;;
232 -infodir | --infodir | --infodi | --infod | --info | --inf)
233 ac_prev=infodir ;;
234 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
235 infodir="$ac_optarg" ;;
237 -libdir | --libdir | --libdi | --libd)
238 ac_prev=libdir ;;
239 -libdir=* | --libdir=* | --libdi=* | --libd=*)
240 libdir="$ac_optarg" ;;
242 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
243 | --libexe | --libex | --libe)
244 ac_prev=libexecdir ;;
245 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
246 | --libexe=* | --libex=* | --libe=*)
247 libexecdir="$ac_optarg" ;;
249 -localstatedir | --localstatedir | --localstatedi | --localstated \
250 | --localstate | --localstat | --localsta | --localst \
251 | --locals | --local | --loca | --loc | --lo)
252 ac_prev=localstatedir ;;
253 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
254 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
255 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
256 localstatedir="$ac_optarg" ;;
258 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
259 ac_prev=mandir ;;
260 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
261 mandir="$ac_optarg" ;;
263 -nfp | --nfp | --nf)
264 # Obsolete; use --without-fp.
265 with_fp=no ;;
267 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
268 | --no-cr | --no-c)
269 no_create=yes ;;
271 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
272 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
273 no_recursion=yes ;;
275 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
276 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
277 | --oldin | --oldi | --old | --ol | --o)
278 ac_prev=oldincludedir ;;
279 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
280 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
281 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
282 oldincludedir="$ac_optarg" ;;
284 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
285 ac_prev=prefix ;;
286 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
287 prefix="$ac_optarg" ;;
289 -program-prefix | --program-prefix | --program-prefi | --program-pref \
290 | --program-pre | --program-pr | --program-p)
291 ac_prev=program_prefix ;;
292 -program-prefix=* | --program-prefix=* | --program-prefi=* \
293 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
294 program_prefix="$ac_optarg" ;;
296 -program-suffix | --program-suffix | --program-suffi | --program-suff \
297 | --program-suf | --program-su | --program-s)
298 ac_prev=program_suffix ;;
299 -program-suffix=* | --program-suffix=* | --program-suffi=* \
300 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
301 program_suffix="$ac_optarg" ;;
303 -program-transform-name | --program-transform-name \
304 | --program-transform-nam | --program-transform-na \
305 | --program-transform-n | --program-transform- \
306 | --program-transform | --program-transfor \
307 | --program-transfo | --program-transf \
308 | --program-trans | --program-tran \
309 | --progr-tra | --program-tr | --program-t)
310 ac_prev=program_transform_name ;;
311 -program-transform-name=* | --program-transform-name=* \
312 | --program-transform-nam=* | --program-transform-na=* \
313 | --program-transform-n=* | --program-transform-=* \
314 | --program-transform=* | --program-transfor=* \
315 | --program-transfo=* | --program-transf=* \
316 | --program-trans=* | --program-tran=* \
317 | --progr-tra=* | --program-tr=* | --program-t=*)
318 program_transform_name="$ac_optarg" ;;
320 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
321 | -silent | --silent | --silen | --sile | --sil)
322 silent=yes ;;
324 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
325 ac_prev=sbindir ;;
326 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
327 | --sbi=* | --sb=*)
328 sbindir="$ac_optarg" ;;
330 -sharedstatedir | --sharedstatedir | --sharedstatedi \
331 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
332 | --sharedst | --shareds | --shared | --share | --shar \
333 | --sha | --sh)
334 ac_prev=sharedstatedir ;;
335 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
336 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
337 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
338 | --sha=* | --sh=*)
339 sharedstatedir="$ac_optarg" ;;
341 -site | --site | --sit)
342 ac_prev=site ;;
343 -site=* | --site=* | --sit=*)
344 site="$ac_optarg" ;;
346 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
347 ac_prev=srcdir ;;
348 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
349 srcdir="$ac_optarg" ;;
351 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
352 | --syscon | --sysco | --sysc | --sys | --sy)
353 ac_prev=sysconfdir ;;
354 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
355 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
356 sysconfdir="$ac_optarg" ;;
358 -target | --target | --targe | --targ | --tar | --ta | --t)
359 ac_prev=target ;;
360 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
361 target="$ac_optarg" ;;
363 -v | -verbose | --verbose | --verbos | --verbo | --verb)
364 verbose=yes ;;
366 -version | --version | --versio | --versi | --vers)
367 echo "configure generated by autoconf version 2.13"
368 exit 0 ;;
370 -with-* | --with-*)
371 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
372 # Reject names that are not valid shell variable names.
373 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
374 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
376 ac_package=`echo $ac_package| sed 's/-/_/g'`
377 case "$ac_option" in
378 *=*) ;;
379 *) ac_optarg=yes ;;
380 esac
381 eval "with_${ac_package}='$ac_optarg'" ;;
383 -without-* | --without-*)
384 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
385 # Reject names that are not valid shell variable names.
386 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
387 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
389 ac_package=`echo $ac_package| sed 's/-/_/g'`
390 eval "with_${ac_package}=no" ;;
392 --x)
393 # Obsolete; use --with-x.
394 with_x=yes ;;
396 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
397 | --x-incl | --x-inc | --x-in | --x-i)
398 ac_prev=x_includes ;;
399 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
400 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
401 x_includes="$ac_optarg" ;;
403 -x-libraries | --x-libraries | --x-librarie | --x-librari \
404 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
405 ac_prev=x_libraries ;;
406 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
407 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
408 x_libraries="$ac_optarg" ;;
410 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
414 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
415 echo "configure: warning: $ac_option: invalid host type" 1>&2
417 if test "x$nonopt" != xNONE; then
418 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
420 nonopt="$ac_option"
423 esac
424 done
426 if test -n "$ac_prev"; then
427 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
430 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
432 # File descriptor usage:
433 # 0 standard input
434 # 1 file creation
435 # 2 errors and warnings
436 # 3 some systems may open it to /dev/tty
437 # 4 used on the Kubota Titan
438 # 6 checking for... messages and results
439 # 5 compiler messages saved in config.log
440 if test "$silent" = yes; then
441 exec 6>/dev/null
442 else
443 exec 6>&1
445 exec 5>./config.log
447 echo "\
448 This file contains any messages produced by compilers while
449 running configure, to aid debugging if configure makes a mistake.
450 " 1>&5
452 # Strip out --no-create and --no-recursion so they do not pile up.
453 # Also quote any args containing shell metacharacters.
454 ac_configure_args=
455 for ac_arg
457 case "$ac_arg" in
458 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
459 | --no-cr | --no-c) ;;
460 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
461 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
462 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
463 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
464 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
465 esac
466 done
468 # NLS nuisances.
469 # Only set these to C if already set. These must not be set unconditionally
470 # because not all systems understand e.g. LANG=C (notably SCO).
471 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
472 # Non-C LC_CTYPE values break the ctype check.
473 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
474 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
475 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
476 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
478 # confdefs.h avoids OS command line length limits that DEFS can exceed.
479 rm -rf conftest* confdefs.h
480 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
481 echo > confdefs.h
483 # A filename unique to this package, relative to the directory that
484 # configure is in, which we can look for to find out if srcdir is correct.
485 ac_unique_file=src/lisp.h
487 # Find the source files, if location was not specified.
488 if test -z "$srcdir"; then
489 ac_srcdir_defaulted=yes
490 # Try the directory containing this script, then its parent.
491 ac_prog=$0
492 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
493 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
494 srcdir=$ac_confdir
495 if test ! -r $srcdir/$ac_unique_file; then
496 srcdir=..
498 else
499 ac_srcdir_defaulted=no
501 if test ! -r $srcdir/$ac_unique_file; then
502 if test "$ac_srcdir_defaulted" = yes; then
503 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
504 else
505 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
508 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
510 # Prefer explicitly selected file to automatically selected ones.
511 if test -z "$CONFIG_SITE"; then
512 if test "x$prefix" != xNONE; then
513 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
514 else
515 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
518 for ac_site_file in $CONFIG_SITE; do
519 if test -r "$ac_site_file"; then
520 echo "loading site script $ac_site_file"
521 . "$ac_site_file"
523 done
525 if test -r "$cache_file"; then
526 echo "loading cache $cache_file"
527 . $cache_file
528 else
529 echo "creating cache $cache_file"
530 > $cache_file
533 ac_ext=c
534 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
535 ac_cpp='$CPP $CPPFLAGS'
536 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
537 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
538 cross_compiling=$ac_cv_prog_cc_cross
540 ac_exeext=
541 ac_objext=o
542 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
543 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
544 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
545 ac_n= ac_c='
546 ' ac_t=' '
547 else
548 ac_n=-n ac_c= ac_t=
550 else
551 ac_n= ac_c='\c' ac_t=
557 lispdir='${datadir}/emacs/${version}/lisp'
558 locallisppath='${datadir}/emacs/${version}/site-lisp:'\
559 '${datadir}/emacs/site-lisp:${datadir}/emacs/${version}/leim'
560 lisppath='${locallisppath}:${lispdir}'
561 etcdir='${datadir}/emacs/${version}/etc'
562 archlibdir='${libexecdir}/emacs/${version}/${configuration}'
563 docdir='${datadir}/emacs/${version}/etc'
565 # Check whether --with-gcc or --without-gcc was given.
566 if test "${with_gcc+set}" = set; then
567 withval="$with_gcc"
571 # Check whether --with-pop or --without-pop was given.
572 if test "${with_pop+set}" = set; then
573 withval="$with_pop"
574 if test "$withval" = yes; then
575 cat >> confdefs.h <<\EOF
576 #define MAIL_USE_POP 1
579 else :
581 else
582 cat >> confdefs.h <<\EOF
583 #define MAIL_USE_POP 1
588 # Check whether --with-kerberos or --without-kerberos was given.
589 if test "${with_kerberos+set}" = set; then
590 withval="$with_kerberos"
591 cat >> confdefs.h <<\EOF
592 #define KERBEROS 1
597 # Check whether --with-kerberos5 or --without-kerberos5 was given.
598 if test "${with_kerberos5+set}" = set; then
599 withval="$with_kerberos5"
600 if test "${with_kerberos5+set}" = set; then
601 if test "${with_kerberos+set}" != set; then
602 with_kerberos=yes
603 cat >> confdefs.h <<\EOF
604 #define KERBEROS 1
609 cat >> confdefs.h <<\EOF
610 #define KERBEROS5 1
615 # Check whether --with-hesiod or --without-hesiod was given.
616 if test "${with_hesiod+set}" = set; then
617 withval="$with_hesiod"
618 cat >> confdefs.h <<\EOF
619 #define HESIOD 1
624 # Check whether --with-x-toolkit or --without-x-toolkit was given.
625 if test "${with_x_toolkit+set}" = set; then
626 withval="$with_x_toolkit"
627 case "${withval}" in
628 y | ye | yes ) val=athena ;;
629 n | no ) val=no ;;
630 l | lu | luc | luci | lucid ) val=lucid ;;
631 a | at | ath | athe | athen | athena ) val=athena ;;
632 m | mo | mot | moti | motif ) val=motif ;;
634 { echo "configure: error: \`--with-x-toolkit=$withval' is invalid\;
635 this option's value should be \`yes', \`no', \`lucid', \`athena', or \`motif'.
636 Currently, \`yes', \`athena' and \`lucid' are synonyms." 1>&2; exit 1; }
638 esac
639 with_x_toolkit=$val
643 # Check whether --with-xpm or --without-xpm was given.
644 if test "${with_xpm+set}" = set; then
645 withval="$with_xpm"
649 # Check whether --with-jpeg or --without-jpeg was given.
650 if test "${with_jpeg+set}" = set; then
651 withval="$with_jpeg"
655 # Check whether --with-tiff or --without-tiff was given.
656 if test "${with_tiff+set}" = set; then
657 withval="$with_tiff"
661 # Check whether --with-gif or --without-gif was given.
662 if test "${with_gif+set}" = set; then
663 withval="$with_gif"
667 # Check whether --with-png or --without-png was given.
668 if test "${with_png+set}" = set; then
669 withval="$with_png"
673 # Check whether --with-toolkit-scroll-bars or --without-toolkit-scroll-bars was given.
674 if test "${with_toolkit_scroll_bars+set}" = set; then
675 withval="$with_toolkit_scroll_bars"
679 # Check whether --with-xim or --without-xim was given.
680 if test "${with_xim+set}" = set; then
681 withval="$with_xim"
686 #### Make srcdir absolute, if it isn't already. It's important to
687 #### avoid running the path through pwd unnecessarily, since pwd can
688 #### give you automounter prefixes, which can go away. We do all this
689 #### so Emacs can find its files when run uninstalled.
690 ## Make sure CDPATH doesn't affect cd (in case PWD is relative).
691 unset CDPATH
692 case "${srcdir}" in
693 /* ) ;;
695 ## We may be able to use the $PWD environment variable to make this
696 ## absolute. But sometimes PWD is inaccurate.
697 if test ".${PWD}" != "." && test ".`(cd ${PWD} ; sh -c pwd)`" = ".${PWD}" ;
698 then
699 srcdir="$PWD"
700 else
701 srcdir="`(cd ${srcdir}; pwd)`"
704 * ) srcdir="`(cd ${srcdir}; pwd)`" ;;
705 esac
707 #### Check if the source directory already has a configured system in it.
708 if test `pwd` != `(cd ${srcdir} && pwd)` \
709 && test -f "${srcdir}/src/config.h" ; then
710 echo "configure: warning: The directory tree \`${srcdir}' is being used
711 as a build directory right now; it has been configured in its own
712 right. To configure in another directory as well, you MUST
713 use GNU make. If you do not have GNU make, then you must
714 now do \`make distclean' in ${srcdir},
715 and then run $0 again." 1>&2
717 extrasub='/^VPATH[ ]*=/c\
718 vpath %.c $(srcdir)\
719 vpath %.h $(srcdir)\
720 vpath %.y $(srcdir)\
721 vpath %.l $(srcdir)\
722 vpath %.s $(srcdir)\
723 vpath %.in $(srcdir)\
724 vpath %.texi $(srcdir)'
727 #### Given the configuration name, set machfile and opsysfile to the
728 #### names of the m/*.h and s/*.h files we should use.
730 ### Canonicalize the configuration name.
732 ac_aux_dir=
733 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
734 if test -f $ac_dir/install-sh; then
735 ac_aux_dir=$ac_dir
736 ac_install_sh="$ac_aux_dir/install-sh -c"
737 break
738 elif test -f $ac_dir/install.sh; then
739 ac_aux_dir=$ac_dir
740 ac_install_sh="$ac_aux_dir/install.sh -c"
741 break
743 done
744 if test -z "$ac_aux_dir"; then
745 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
747 ac_config_guess=$ac_aux_dir/config.guess
748 ac_config_sub=$ac_aux_dir/config.sub
749 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
752 # Make sure we can run config.sub.
753 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
754 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
757 echo $ac_n "checking host system type""... $ac_c" 1>&6
758 echo "configure:759: checking host system type" >&5
760 host_alias=$host
761 case "$host_alias" in
762 NONE)
763 case $nonopt in
764 NONE)
765 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
766 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
767 fi ;;
768 *) host_alias=$nonopt ;;
769 esac ;;
770 esac
772 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
773 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
774 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
775 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
776 echo "$ac_t""$host" 1>&6
778 canonical=$host
779 configuration=$host_alias
782 ### If you add support for a new configuration, add code to this
783 ### switch statement to recognize your configuration name and select
784 ### the appropriate operating system and machine description files.
786 ### You would hope that you could choose an m/*.h file pretty much
787 ### based on the machine portion of the configuration name, and an s-
788 ### file based on the operating system portion. However, it turns out
789 ### that each m/*.h file is pretty manufacturer-specific - for
790 ### example, apollo.h, hp9000s300.h, mega68k, news.h, and tad68k are
791 ### all 68000 machines; mips.h, pmax.h, and news-risc are all MIPS
792 ### machines. So we basically have to have a special case for each
793 ### configuration name.
795 ### As far as handling version numbers on operating systems is
796 ### concerned, make sure things will fail in a fixable way. If
797 ### /etc/MACHINES doesn't say anything about version numbers, be
798 ### prepared to handle anything reasonably. If version numbers
799 ### matter, be sure /etc/MACHINES says something about it.
801 ### Eric Raymond says we should accept strings like "sysvr4" to mean
802 ### "System V Release 4"; he writes, "The old convention encouraged
803 ### confusion between `system' and `release' levels'."
805 machine='' opsys='' unported=no
806 case "${canonical}" in
808 ## NetBSD ports
809 *-*-netbsd* )
810 opsys=netbsd
811 case "${canonical}" in
812 alpha*-*-netbsd*) machine=alpha ;;
813 i[3456]86-*-netbsd*) machine=intel386 ;;
814 m68k-*-netbsd*)
815 # This is somewhat bogus.
816 machine=hp9000s300 ;;
817 powerpc-apple-netbsd*) machine=macppc ;;
818 mips-*-netbsd*) machine=pmax ;;
819 mipsel-*-netbsd*) machine=pmax ;;
820 ns32k-*-netbsd*) machine=ns32000 ;;
821 powerpc-*-netbsd*) machine=macppc ;;
822 sparc*-*-netbsd*) machine=sparc ;;
823 vax-*-netbsd*) machine=vax ;;
824 arm-*-netbsd*) machine=arm ;;
825 esac
828 ## OpenBSD ports
829 *-*-openbsd* )
830 opsys=openbsd
831 case "${canonical}" in
832 alpha*-*-openbsd*) machine=alpha ;;
833 i386-*-openbsd*) machine=intel386 ;;
834 m68k-*-openbsd*) machine=hp9000s300 ;;
835 mipsel-*-openbsd*) machine=pmax ;;
836 ns32k-*-openbsd*) machine=ns32000 ;;
837 sparc-*-openbsd*) machine=sparc ;;
838 vax-*-openbsd*) machine=vax ;;
839 esac
842 ## Acorn RISCiX:
843 arm-acorn-riscix1.1* )
844 machine=acorn opsys=riscix1-1
846 arm-acorn-riscix1.2* | arm-acorn-riscix )
847 ## This name is riscix12 instead of riscix1.2
848 ## to avoid a file name conflict on MSDOS.
849 machine=acorn opsys=riscix12
852 ## BSDI ports
853 *-*-bsdi* )
854 opsys=bsdi
855 case "${canonical}" in
856 i[345]86-*-bsdi*) machine=intel386 ;;
857 sparc-*-bsdi*) machine=sparc ;;
858 powerpc-*-bsdi*) machine=macppc ;;
859 esac
860 case "${canonical}" in
861 *-*-bsd386* | *-*-bsdi1* ) opsys=bsd386 ;;
862 *-*-bsdi2.0* ) opsys=bsdos2 ;;
863 *-*-bsdi2* ) opsys=bsdos2-1 ;;
864 *-*-bsdi3* ) opsys=bsdos3 ;;
865 *-*-bsdi[45]* ) opsys=bsdos4 ;;
866 esac
869 ## Alliant machines
870 ## Strictly speaking, we need the version of the alliant operating
871 ## system to choose the right machine file, but currently the
872 ## configuration name doesn't tell us enough to choose the right
873 ## one; we need to give alliants their own operating system name to
874 ## do this right. When someone cares, they can help us.
875 fx80-alliant-* )
876 machine=alliant4 opsys=bsd4-2
878 i860-alliant-* )
879 machine=alliant-2800 opsys=bsd4-3
882 ## Alpha (DEC) machines.
883 alpha*-dec-osf* )
884 machine=alpha opsys=osf1
885 # This is needed to find X11R6.1 libraries for certain tests.
886 NON_GCC_LINK_TEST_OPTIONS=-Wl,-rpath,/usr/X11R6/lib
887 GCC_LINK_TEST_OPTIONS=-Wl,-rpath,/usr/X11R6/lib
888 # NON_GNU_CPP is necessary on 5.0 to avoid mangling src/Makefile
889 # due to non-traditional preprocessing with the current compiler
890 # defaults. OSF 4 can also have that compiler version, and there
891 # seems always to have been a usable /usr/bin/cpp.
892 NON_GNU_CPP=/usr/bin/cpp
893 case "${canonical}" in
894 alpha*-dec-osf[5-9]*)
895 opsys=osf5-0 ;;
896 esac
899 alpha*-*-linux-gnu* )
900 machine=alpha opsys=gnu-linux
903 arm*-*-linux-gnu* )
904 machine=arm opsys=gnu-linux
907 ppc-*-linux | \
908 powerpc-*-linux* )
909 machine=macppc opsys=gnu-linux
912 ## Altos 3068
913 m68*-altos-sysv* )
914 machine=altos opsys=usg5-2
917 ## Amdahl UTS
918 580-amdahl-sysv* )
919 machine=amdahl opsys=usg5-2-2
922 ## Apollo, Domain/OS
923 m68*-apollo-* )
924 machine=apollo opsys=bsd4-3
927 ## AT&T 3b2, 3b5, 3b15, 3b20
928 we32k-att-sysv* )
929 machine=att3b opsys=usg5-2-2
932 ## AT&T 3b1 - The Mighty Unix PC!
933 m68*-att-sysv* )
934 machine=7300 opsys=usg5-2-2
937 ## Bull dpx20
938 rs6000-bull-bosx* )
939 machine=ibmrs6000 opsys=aix3-2
942 ## Bull dpx2
943 m68*-bull-sysv3* )
944 machine=dpx2 opsys=usg5-3
947 ## Bull sps7
948 m68*-bull-sysv2* )
949 machine=sps7 opsys=usg5-2
952 ## CCI 5/32, 6/32 -- see "Tahoe".
954 ## Celerity
955 ## I don't know what configuration name to use for this; config.sub
956 ## doesn't seem to know anything about it. Hey, Celerity users, get
957 ## in touch with us!
958 celerity-celerity-bsd* )
959 machine=celerity opsys=bsd4-2
962 ## Clipper
963 ## What operating systems does this chip run that Emacs has been
964 ## tested on?
965 clipper-* )
966 machine=clipper
967 ## We'll use the catch-all code at the bottom to guess the
968 ## operating system.
971 ## Convex
972 *-convex-bsd* | *-convex-convexos* )
973 machine=convex opsys=bsd4-3
974 ## Prevents spurious white space in makefiles - d.m.cooke@larc.nasa.gov
975 NON_GNU_CPP="cc -E -P"
978 ## Cubix QBx/386
979 i[3456]86-cubix-sysv* )
980 machine=intel386 opsys=usg5-3
983 ## Cydra 5
984 cydra*-cydrome-sysv* )
985 machine=cydra5 opsys=usg5-3
988 ## Data General AViiON Machines
989 ## DG changed naming conventions with the release of 5.4.4.10, they
990 ## dropped the initial 5.4 but left the intervening R. Because of the
991 ## R this shouldn't conflict with older versions of the OS (which I
992 ## think were named like dgux4.*). In addition, DG new AViiONs series
993 ## uses either Motorola M88k or Intel Pentium CPUs.
994 m88k-dg-dguxR4.* | m88k-dg-dgux4* )
995 machine=aviion opsys=dgux4
997 m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* )
998 ## This name is dgux5-4-3 instead of dgux5-4r3
999 ## to avoid a file name conflict on MSDOS.
1000 machine=aviion opsys=dgux5-4-3
1002 m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* )
1003 machine=aviion opsys=dgux5-4r2
1005 m88k-dg-dgux* )
1006 machine=aviion opsys=dgux
1009 ## Data General AViiON Intel (x86) Machines
1010 ## Exists from 5.4.3 (current i586-dg-dguxR4.11)
1011 ## Ehud Karni, 1998-may-30, ehud@unix.simonwiesel.co.il
1012 i[345]86-dg-dguxR4* )
1013 machine=aviion-intel opsys=dgux4
1016 ## DECstations
1017 mips-dec-ultrix[0-3].* | mips-dec-ultrix4.0* | mips-dec-bsd4.2* )
1018 machine=pmax opsys=bsd4-2
1020 mips-dec-ultrix4.[12]* | mips-dec-bsd* )
1021 machine=pmax opsys=bsd4-3
1023 mips-dec-ultrix* )
1024 machine=pmax opsys=ultrix4-3
1026 mips-dec-osf* )
1027 machine=pmax opsys=osf1
1029 mips-dec-mach_bsd4.3* )
1030 machine=pmax opsys=mach-bsd4-3
1033 ## Motorola Delta machines
1034 m68k-motorola-sysv* | m68000-motorola-sysv* )
1035 machine=delta opsys=usg5-3
1036 if test -z "`type gnucc | grep 'not found'`"
1037 then
1038 if test -s /etc/167config
1039 then CC="gnucc -m68040"
1040 else CC="gnucc -m68881"
1042 else
1043 if test -z "`type gcc | grep 'not found'`"
1044 then CC=gcc
1045 else CC=cc
1049 m88k-motorola-sysv4* )
1050 # jbotte@bnr.ca says that UNIX_System_V <hostName> 4.0 R40V4.3 m88k mc88110
1051 # needs POSIX_SIGNALS and therefore needs usg5-4-2.
1052 # I hope there are not other 4.0 versions for this machine
1053 # which really need usg5-4 instead.
1054 machine=delta88k opsys=usg5-4-2
1056 m88k-motorola-sysv* | m88k-motorola-m88kbcs* )
1057 machine=delta88k opsys=usg5-3
1060 ## Dual machines
1061 m68*-dual-sysv* )
1062 machine=dual opsys=usg5-2
1064 m68*-dual-uniplus* )
1065 machine=dual opsys=unipl5-2
1068 ## Elxsi 6400
1069 elxsi-elxsi-sysv* )
1070 machine=elxsi opsys=usg5-2
1073 ## Encore machines
1074 ns16k-encore-bsd* )
1075 machine=ns16000 opsys=umax
1078 ## The GEC 63 - apparently, this port isn't really finished yet.
1079 # I'm sure we finished off the last of the machines, though. -- fx
1081 ## Gould Power Node and NP1
1082 pn-gould-bsd4.2* )
1083 machine=gould opsys=bsd4-2
1085 pn-gould-bsd4.3* )
1086 machine=gould opsys=bsd4-3
1088 np1-gould-bsd* )
1089 machine=gould-np1 opsys=bsd4-3
1092 ## Harris Night Hawk machines running CX/UX (a 5000 looks just like a 4000
1093 ## as far as Emacs is concerned).
1094 m88k-harris-cxux* )
1095 # Build needs to be different on 7.0 and later releases
1096 case "`uname -r`" in
1097 [56].[0-9] ) machine=nh4000 opsys=cxux ;;
1098 [7].[0-9] ) machine=nh4000 opsys=cxux7 ;;
1099 esac
1100 NON_GNU_CPP="/lib/cpp"
1102 ## Harris ecx or gcx running CX/UX (Series 1200, Series 3000)
1103 m68k-harris-cxux* )
1104 machine=nh3000 opsys=cxux
1106 ## Harris power pc NightHawk running Power UNIX (Series 6000)
1107 powerpc-harris-powerunix )
1108 machine=nh6000 opsys=powerunix
1109 NON_GNU_CPP="cc -Xo -E -P"
1111 ## SR2001/SR2201 running HI-UX/MPP
1112 hppa1.1-hitachi-hiuxmpp* )
1113 machine=sr2k opsys=hiuxmpp
1115 hppa1.1-hitachi-hiuxwe2* )
1116 machine=sr2k opsys=hiuxwe2
1118 ## Honeywell XPS100
1119 xps*-honeywell-sysv* )
1120 machine=xps100 opsys=usg5-2
1123 ## HP 9000 series 200 or 300
1124 m68*-hp-bsd* )
1125 machine=hp9000s300 opsys=bsd4-3
1127 ## HP/UX 7, 8, 9, and 10 are supported on these machines.
1128 m68*-hp-hpux* )
1129 case "`uname -r`" in
1130 ## Someone's system reports A.B8.05 for this.
1131 ## I wonder what other possibilities there are.
1132 *.B8.* ) machine=hp9000s300 opsys=hpux8 ;;
1133 *.08.* ) machine=hp9000s300 opsys=hpux8 ;;
1134 *.09.* ) machine=hp9000s300 opsys=hpux9 ;;
1135 *.1[0-9].* ) machine=hp9000s300 opsys=hpux9shr ;;
1136 *) machine=hp9000s300 opsys=hpux ;;
1137 esac
1140 ## HP 9000 series 700 and 800, running HP/UX
1141 hppa*-hp-hpux7* )
1142 machine=hp800 opsys=hpux
1144 hppa*-hp-hpux8* )
1145 machine=hp800 opsys=hpux8
1147 hppa*-hp-hpux9shr* )
1148 machine=hp800 opsys=hpux9shr
1150 hppa*-hp-hpux9* )
1151 machine=hp800 opsys=hpux9
1154 hppa*-hp-hpux10* )
1155 machine=hp800 opsys=hpux10
1157 hppa*-hp-hpux1[1-9]* )
1158 machine=hp800 opsys=hpux11
1161 ## HP 9000 series 700 and 800, running HP/UX
1162 hppa*-hp-hpux* )
1163 ## Cross-compilation? Nah!
1164 case "`uname -r`" in
1165 ## Someone's system reports A.B8.05 for this.
1166 ## I wonder what other possibilities there are.
1167 *.B8.* ) machine=hp800 opsys=hpux8 ;;
1168 *.08.* ) machine=hp800 opsys=hpux8 ;;
1169 *.09.* ) machine=hp800 opsys=hpux9 ;;
1170 *) machine=hp800 opsys=hpux10 ;;
1171 esac
1173 hppa*-*-nextstep* )
1174 machine=hp800 opsys=nextstep
1177 ## Orion machines
1178 orion-orion-bsd* )
1179 machine=orion opsys=bsd4-2
1181 clipper-orion-bsd* )
1182 machine=orion105 opsys=bsd4-2
1185 ## IBM machines
1186 i[3456]86-ibm-aix1.1* )
1187 machine=ibmps2-aix opsys=usg5-2-2
1189 i[3456]86-ibm-aix1.[23]* | i[3456]86-ibm-aix* )
1190 machine=ibmps2-aix opsys=usg5-3
1192 i370-ibm-aix*)
1193 machine=ibm370aix opsys=usg5-3
1195 rs6000-ibm-aix3.1* | powerpc-ibm-aix3.1* )
1196 machine=ibmrs6000 opsys=aix3-1
1198 rs6000-ibm-aix3.2.5 | powerpc-ibm-aix3.2.5 )
1199 machine=ibmrs6000 opsys=aix3-2-5
1201 rs6000-ibm-aix4.1* | powerpc-ibm-aix4.1* )
1202 machine=ibmrs6000 opsys=aix4-1
1204 rs6000-ibm-aix4.2* | powerpc-ibm-aix4.2* )
1205 machine=ibmrs6000 opsys=aix4-2
1207 rs6000-ibm-aix5.1* | powerpc-ibm-aix5.1* )
1208 machine=ibmrs6000 opsys=aix4-2
1210 rs6000-ibm-aix4.0* | powerpc-ibm-aix4.0* )
1211 machine=ibmrs6000 opsys=aix4
1213 rs6000-ibm-aix4* | powerpc-ibm-aix4* )
1214 machine=ibmrs6000 opsys=aix4-1
1216 rs6000-ibm-aix* | powerpc-ibm-aix* )
1217 machine=ibmrs6000 opsys=aix3-2
1219 romp-ibm-bsd4.3* )
1220 machine=ibmrt opsys=bsd4-3
1222 romp-ibm-bsd4.2* )
1223 machine=ibmrt opsys=bsd4-2
1225 romp-ibm-aos4.3* )
1226 machine=ibmrt opsys=bsd4-3
1228 romp-ibm-aos4.2* )
1229 machine=ibmrt opsys=bsd4-2
1231 romp-ibm-aos* )
1232 machine=ibmrt opsys=bsd4-3
1234 romp-ibm-bsd* )
1235 machine=ibmrt opsys=bsd4-3
1237 romp-ibm-aix* )
1238 machine=ibmrt-aix opsys=usg5-2-2
1241 ## Integrated Solutions `Optimum V'
1242 m68*-isi-bsd4.2* )
1243 machine=isi-ov opsys=bsd4-2
1245 m68*-isi-bsd4.3* )
1246 machine=isi-ov opsys=bsd4-3
1249 ## Intel 386 machines where we do care about the manufacturer
1250 i[3456]86-intsys-sysv* )
1251 machine=is386 opsys=usg5-2-2
1254 ## Prime EXL
1255 i[3456]86-prime-sysv* )
1256 machine=i386 opsys=usg5-3
1259 ## Sequent Symmetry running Dynix
1260 i[3456]86-sequent-bsd* )
1261 machine=symmetry opsys=bsd4-3
1264 ## Sequent Symmetry running ptx 4, which is a modified SVR4.
1265 i[3456]86-sequent-ptx4* | i[3456]86-sequent-sysv4* )
1266 machine=sequent-ptx opsys=ptx4
1267 NON_GNU_CPP=/lib/cpp
1270 ## Sequent Symmetry running DYNIX/ptx
1271 ## Use the old cpp rather than the newer ANSI one.
1272 i[3456]86-sequent-ptx* )
1273 machine=sequent-ptx opsys=ptx
1274 NON_GNU_CPP="/lib/cpp"
1277 ## ncr machine running svr4.3.
1278 i[3456]86-ncr-sysv4.3 )
1279 machine=ncr386 opsys=usg5-4-3
1282 ## Unspecified sysv on an ncr machine defaults to svr4.2.
1283 ## (Plain usg5-4 doesn't turn on POSIX signals, which we need.)
1284 i[3456]86-ncr-sysv* )
1285 machine=ncr386 opsys=usg5-4-2
1288 ## Intel Paragon OSF/1
1289 i860-intel-osf1* )
1290 machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp
1293 ## Intel 860
1294 i860-*-sysv4* )
1295 machine=i860 opsys=usg5-4
1296 NON_GNU_CC="/bin/cc" # Ie, not the one in /usr/ucb/cc.
1297 NON_GNU_CPP="/usr/ccs/lib/cpp" # cc -E tokenizes macro expansion.
1300 ## Macintosh PowerPC
1301 powerpc*-*-linux-gnu* )
1302 machine=macppc opsys=gnu-linux
1305 ## Masscomp machines
1306 m68*-masscomp-rtu* )
1307 machine=masscomp opsys=rtu
1310 ## Megatest machines
1311 m68*-megatest-bsd* )
1312 machine=mega68 opsys=bsd4-2
1315 ## Workstations sold by MIPS
1316 ## This is not necessarily all workstations using the MIPS processor -
1317 ## Irises are produced by SGI, and DECstations by DEC.
1319 ## etc/MACHINES lists mips.h and mips4.h as possible machine files,
1320 ## and usg5-2-2 and bsd4-3 as possible OS files. The only guidance
1321 ## it gives for choosing between the alternatives seems to be "Use
1322 ## -machine=mips4 for RISCOS version 4; use -opsystem=bsd4-3 with
1323 ## the BSD world." I'll assume that these are instructions for
1324 ## handling two odd situations, and that every other situation
1325 ## should use mips.h and usg5-2-2, they being listed first.
1326 mips-mips-usg* )
1327 machine=mips4
1328 ## Fall through to the general code at the bottom to decide on the OS.
1330 mips-mips-riscos4* )
1331 machine=mips4 opsys=bsd4-3
1332 NON_GNU_CC="cc -systype bsd43"
1333 NON_GNU_CPP="cc -systype bsd43 -E"
1335 mips-mips-riscos5* )
1336 machine=mips4 opsys=riscos5
1337 NON_GNU_CC="cc -systype bsd43"
1338 NON_GNU_CPP="cc -systype bsd43 -E"
1340 mips-mips-bsd* )
1341 machine=mips opsys=bsd4-3
1343 mips-mips-* )
1344 machine=mips opsys=usg5-2-2
1347 ## NeXT
1348 m68*-next-* | m68k-*-nextstep* )
1349 machine=m68k opsys=nextstep
1352 ## The complete machine from National Semiconductor
1353 ns32k-ns-genix* )
1354 machine=ns32000 opsys=usg5-2
1357 ## NCR machines
1358 m68*-ncr-sysv2* | m68*-ncr-sysvr2* )
1359 machine=tower32 opsys=usg5-2-2
1361 m68*-ncr-sysv3* | m68*-ncr-sysvr3* )
1362 machine=tower32v3 opsys=usg5-3
1365 ## NEC EWS4800
1366 mips-nec-sysv4*)
1367 machine=ews4800 opsys=ux4800
1370 ## Nixdorf Targon 31
1371 m68*-nixdorf-sysv* )
1372 machine=targon31 opsys=usg5-2-2
1375 ## Nu (TI or LMI)
1376 m68*-nu-sysv* )
1377 machine=nu opsys=usg5-2
1380 ## Plexus
1381 m68*-plexus-sysv* )
1382 machine=plexus opsys=usg5-2
1385 ## PowerPC reference platform
1386 powerpcle-*-solaris2* )
1387 machine=prep
1388 opsys=sol2-5
1391 ## Pyramid machines
1392 ## I don't really have any idea what sort of processor the Pyramid has,
1393 ## so I'm assuming it is its own architecture.
1394 pyramid-pyramid-bsd* )
1395 machine=pyramid opsys=bsd4-2
1398 ## Sequent Balance
1399 ns32k-sequent-bsd4.2* )
1400 machine=sequent opsys=bsd4-2
1402 ns32k-sequent-bsd4.3* )
1403 machine=sequent opsys=bsd4-3
1406 ## Siemens Nixdorf
1407 mips-siemens-sysv* | mips-sni-sysv*)
1408 machine=mips-siemens opsys=usg5-4
1409 NON_GNU_CC=/usr/ccs/bin/cc
1410 NON_GNU_CPP=/usr/ccs/lib/cpp
1413 ## Silicon Graphics machines
1414 ## Iris 2500 and Iris 2500 Turbo (aka the Iris 3030)
1415 m68*-sgi-iris3.5* )
1416 machine=irist opsys=iris3-5
1418 m68*-sgi-iris3.6* | m68*-sgi-iris*)
1419 machine=irist opsys=iris3-6
1421 ## Iris 4D
1422 mips-sgi-irix3* )
1423 machine=iris4d opsys=irix3-3
1425 mips-sgi-irix4* )
1426 machine=iris4d opsys=irix4-0
1428 mips-sgi-irix6.5 )
1429 machine=iris4d opsys=irix6-5
1430 # Without defining _LANGUAGE_C, things get masked out in the headers
1431 # so that, for instance, grepping for `free' in stdlib.h fails and
1432 # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
1433 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
1434 NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C"
1436 mips-sgi-irix6* )
1437 machine=iris4d opsys=irix6-0
1438 # It's not clear whether -D_LANGUAGE_C is necessary as it is for 6.5,
1439 # but presumably it does no harm.
1440 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
1441 # -32 probably isn't necessary in later v.6s -- anyone know which?
1442 NON_GCC_TEST_OPTIONS=-32
1444 mips-sgi-irix5.[01]* )
1445 machine=iris4d opsys=irix5-0
1447 mips-sgi-irix5* | mips-sgi-irix* )
1448 machine=iris4d opsys=irix5-2
1451 ## SONY machines
1452 m68*-sony-bsd4.2* )
1453 machine=news opsys=bsd4-2
1455 m68*-sony-bsd4.3* )
1456 machine=news opsys=bsd4-3
1458 m68*-sony-newsos3* | m68*-sony-news3*)
1459 machine=news opsys=bsd4-3
1461 mips-sony-bsd* | mips-sony-newsos4* | mips-sony-news4*)
1462 machine=news-risc opsys=bsd4-3
1464 mips-sony-newsos6* )
1465 machine=news-r6 opsys=newsos6
1467 mips-sony-news* )
1468 machine=news-risc opsys=newsos5
1471 ## Stride
1472 m68*-stride-sysv* )
1473 machine=stride opsys=usg5-2
1476 ## Suns
1477 sparc-*-linux-gnu* | sparc64-*-linux-gnu* )
1478 machine=sparc opsys=gnu-linux
1481 *-auspex-sunos* | *-sun-sunos* | *-sun-bsd* | *-sun-solaris* \
1482 | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* | powerpc*-*-solaris2* \
1483 | rs6000-*-solaris2*)
1484 case "${canonical}" in
1485 m68*-sunos1* ) machine=sun1 ;;
1486 m68*-sunos2* ) machine=sun2 ;;
1487 m68* ) machine=sun3 ;;
1488 i[3456]86-sun-sunos[34]* ) machine=sun386 ;;
1489 i[3456]86-*-* ) machine=intel386 ;;
1490 powerpcle* ) machine=powerpcle ;;
1491 powerpc* | rs6000* ) machine=ibmrs6000 ;;
1492 sparc* ) machine=sparc ;;
1493 * ) unported=yes ;;
1494 esac
1495 case "${canonical}" in
1496 ## The Sun386 didn't get past 4.0.
1497 i[3456]86-*-sunos4 ) opsys=sunos4-0 ;;
1498 *-sunos4.0* ) opsys=sunos4-0 ;;
1499 *-sunos4.1.[3-9]*noshare )
1500 ## This name is sunos413 instead of sunos4-1-3
1501 ## to avoid a file name conflict on MSDOS.
1502 opsys=sunos413
1503 NON_GNU_CPP=/usr/lib/cpp
1504 NON_GCC_TEST_OPTIONS=-Bstatic
1505 GCC_TEST_OPTIONS=-static
1507 *-sunos4.1.[3-9]* | *-sunos4shr*)
1508 opsys=sunos4shr
1509 NON_GNU_CPP=/usr/lib/cpp
1511 *-sunos4* | *-sunos )
1512 opsys=sunos4-1
1513 NON_GCC_TEST_OPTIONS=-Bstatic
1514 GCC_TEST_OPTIONS=-static
1516 *-sunos5.3* | *-solaris2.3* )
1517 opsys=sol2-3
1518 NON_GNU_CPP=/usr/ccs/lib/cpp
1520 *-sunos5.4* | *-solaris2.4* )
1521 opsys=sol2-4
1522 NON_GNU_CPP=/usr/ccs/lib/cpp
1523 RANLIB="ar -ts"
1525 *-sunos5.5* | *-solaris2.5* )
1526 opsys=sol2-5
1527 NON_GNU_CPP=/usr/ccs/lib/cpp
1528 RANLIB="ar -ts"
1530 *-sunos5* | *-solaris* )
1531 opsys=sol2-5
1532 NON_GNU_CPP=/usr/ccs/lib/cpp
1534 * ) opsys=bsd4-2 ;;
1535 esac
1536 ## Watch out for a compiler that we know will not work.
1537 case "${canonical}" in
1538 *-solaris* | *-sunos5* )
1539 if [ "x$CC" = x/usr/ucb/cc ]; then
1540 ## /usr/ucb/cc doesn't work;
1541 ## we should find some other compiler that does work.
1542 unset CC
1545 *) ;;
1546 esac
1548 sparc-*-nextstep* )
1549 machine=sparc opsys=nextstep
1552 ## Tadpole 68k
1553 m68*-tadpole-sysv* )
1554 machine=tad68k opsys=usg5-3
1557 ## Tahoe machines
1558 tahoe-tahoe-bsd4.2* )
1559 machine=tahoe opsys=bsd4-2
1561 tahoe-tahoe-bsd4.3* )
1562 machine=tahoe opsys=bsd4-3
1565 ## Tandem Integrity S2
1566 mips-tandem-sysv* )
1567 machine=tandem-s2 opsys=usg5-3
1570 ## Tektronix XD88
1571 m88k-tektronix-sysv3* )
1572 machine=tekxd88 opsys=usg5-3
1575 ## Tektronix 16000 box (6130?)
1576 ns16k-tektronix-bsd* )
1577 machine=ns16000 opsys=bsd4-2
1579 ## Tektronix 4300
1580 ## src/m/tek4300.h hints that this is a m68k machine.
1581 m68*-tektronix-bsd* )
1582 machine=tek4300 opsys=bsd4-3
1585 ## Titan P2 or P3
1586 ## We seem to have lost the machine-description file titan.h!
1587 titan-titan-sysv* )
1588 machine=titan opsys=usg5-3
1591 ## Ustation E30 (SS5E)
1592 m68*-unisys-uniplus* )
1593 machine=ustation opsystem=unipl5-2
1596 ## Vaxen.
1597 vax-dec-* )
1598 machine=vax
1599 case "${canonical}" in
1600 *-bsd4.1* ) opsys=bsd4-1 ;;
1601 *-bsd4.2* | *-ultrix[0-3].* | *-ultrix4.0* ) opsys=bsd4-2 ;;
1602 *-bsd4.3* | *-ultrix* ) opsys=bsd4-3 ;;
1603 *-sysv[01]* | *-sysvr[01]* ) opsys=usg5-0 ;;
1604 *-sysv2* | *-sysvr2* ) opsys=usg5-2 ;;
1605 *-vms* ) opsys=vms ;;
1606 * ) unported=yes
1607 esac
1610 ## Whitechapel MG1
1611 ns16k-whitechapel-* )
1612 machine=mg1
1613 ## We don't know what sort of OS runs on these; we'll let the
1614 ## operating system guessing code below try.
1617 ## Wicat
1618 m68*-wicat-sysv* )
1619 machine=wicat opsys=usg5-2
1622 ## IA-64
1623 ia64*-*-linux* )
1624 machine=ia64 opsys=gnu-linux
1627 ## Intel 386 machines where we don't care about the manufacturer
1628 i[3456]86-*-* )
1629 machine=intel386
1630 case "${canonical}" in
1631 *-lynxos* ) opsys=lynxos ;;
1632 *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
1633 *-isc2.2* ) opsys=isc2-2 ;;
1634 *-isc4.0* ) opsys=isc4-0 ;;
1635 *-isc4.* ) opsys=isc4-1
1636 GCC_TEST_OPTIONS=-posix
1637 NON_GCC_TEST_OPTIONS=-Xp
1639 *-isc* ) opsys=isc3-0 ;;
1640 *-esix5* ) opsys=esix5r4; NON_GNU_CPP=/usr/lib/cpp ;;
1641 *-esix* ) opsys=esix ;;
1642 *-xenix* ) opsys=xenix ;;
1643 *-linux-gnu* ) opsys=gnu-linux ;;
1644 *-sco3.2v4* ) opsys=sco4 ; NON_GNU_CPP=/lib/cpp ;;
1645 *-sco3.2v5* ) opsys=sco5
1646 NON_GNU_CPP=/lib/cpp
1647 # Prevent -belf from being passed to $CPP.
1648 # /lib/cpp does not accept it.
1649 OVERRIDE_CPPFLAGS=" "
1651 *-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
1652 *-386bsd* ) opsys=386bsd ;;
1653 *-freebsd* ) opsys=freebsd ;;
1654 *-nextstep* ) opsys=nextstep ;;
1655 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
1656 esac
1659 ## m68k Linux-based GNU system
1660 m68k-*-linux-gnu* )
1661 machine=m68k opsys=gnu-linux
1664 ## Mips Linux-based GNU system
1665 mips-*-linux-gnu* )
1666 machine=mips opsys=gnu-linux
1669 ## UXP/DS
1670 sparc-fujitsu-sysv4* )
1671 machine=sparc opsys=uxpds
1672 NON_GNU_CPP=/usr/ccs/lib/cpp
1673 RANLIB="ar -ts"
1676 ## UXP/V
1677 f301-fujitsu-uxpv4.1)
1678 machine=f301 opsys=uxpv
1682 unported=yes
1684 esac
1686 ### If the code above didn't choose an operating system, just choose
1687 ### an operating system based on the configuration name. You really
1688 ### only want to use this when you have no idea what the right
1689 ### operating system is; if you know what operating systems a machine
1690 ### runs, it's cleaner to make it explicit in the case statement
1691 ### above.
1692 if test x"${opsys}" = x; then
1693 case "${canonical}" in
1694 *-gnu* ) opsys=gnu ;;
1695 *-bsd4.[01] ) opsys=bsd4-1 ;;
1696 *-bsd4.2 ) opsys=bsd4-2 ;;
1697 *-bsd4.3 ) opsys=bsd4-3 ;;
1698 *-sysv0 | *-sysvr0 ) opsys=usg5-0 ;;
1699 *-sysv2 | *-sysvr2 ) opsys=usg5-2 ;;
1700 *-sysv2.2 | *-sysvr2.2 ) opsys=usg5-2-2 ;;
1701 *-sysv3* | *-sysvr3* ) opsys=usg5-3 ;;
1702 *-sysv4.2uw* ) opsys=unixware ;;
1703 *-sysv4.1* | *-sysvr4.1* )
1704 NON_GNU_CPP=/usr/lib/cpp
1705 opsys=usg5-4 ;;
1706 *-sysv4.[2-9]* | *-sysvr4.[2-9]* )
1707 if [ x$NON_GNU_CPP = x ]; then
1708 if [ -f /usr/ccs/lib/cpp ]; then
1709 NON_GNU_CPP=/usr/ccs/lib/cpp
1710 else
1711 NON_GNU_CPP=/lib/cpp
1714 opsys=usg5-4-2 ;;
1715 *-sysv4* | *-sysvr4* ) opsys=usg5-4 ;;
1717 unported=yes
1719 esac
1723 if test $unported = yes; then
1724 { echo "configure: error: Emacs hasn't been ported to \`${canonical}' systems.
1725 Check \`etc/MACHINES' for recognized configuration names." 1>&2; exit 1; }
1728 machfile="m/${machine}.h"
1729 opsysfile="s/${opsys}.h"
1732 #### Choose a compiler.
1733 test -n "$CC" && cc_specified=yes
1735 # Save the value of CFLAGS that the user specified.
1736 SPECIFIED_CFLAGS="$CFLAGS"
1738 case ${with_gcc} in
1739 "yes" ) CC="gcc" GCC=yes ;;
1740 "no" ) : ${CC=cc} ;;
1741 * ) # Extract the first word of "gcc", so it can be a program name with args.
1742 set dummy gcc; ac_word=$2
1743 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1744 echo "configure:1745: checking for $ac_word" >&5
1745 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1746 echo $ac_n "(cached) $ac_c" 1>&6
1747 else
1748 if test -n "$CC"; then
1749 ac_cv_prog_CC="$CC" # Let the user override the test.
1750 else
1751 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1752 ac_dummy="$PATH"
1753 for ac_dir in $ac_dummy; do
1754 test -z "$ac_dir" && ac_dir=.
1755 if test -f $ac_dir/$ac_word; then
1756 ac_cv_prog_CC="gcc"
1757 break
1759 done
1760 IFS="$ac_save_ifs"
1763 CC="$ac_cv_prog_CC"
1764 if test -n "$CC"; then
1765 echo "$ac_t""$CC" 1>&6
1766 else
1767 echo "$ac_t""no" 1>&6
1770 if test -z "$CC"; then
1771 # Extract the first word of "cc", so it can be a program name with args.
1772 set dummy cc; ac_word=$2
1773 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1774 echo "configure:1775: checking for $ac_word" >&5
1775 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1776 echo $ac_n "(cached) $ac_c" 1>&6
1777 else
1778 if test -n "$CC"; then
1779 ac_cv_prog_CC="$CC" # Let the user override the test.
1780 else
1781 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1782 ac_prog_rejected=no
1783 ac_dummy="$PATH"
1784 for ac_dir in $ac_dummy; do
1785 test -z "$ac_dir" && ac_dir=.
1786 if test -f $ac_dir/$ac_word; then
1787 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1788 ac_prog_rejected=yes
1789 continue
1791 ac_cv_prog_CC="cc"
1792 break
1794 done
1795 IFS="$ac_save_ifs"
1796 if test $ac_prog_rejected = yes; then
1797 # We found a bogon in the path, so make sure we never use it.
1798 set dummy $ac_cv_prog_CC
1799 shift
1800 if test $# -gt 0; then
1801 # We chose a different compiler from the bogus one.
1802 # However, it has the same basename, so the bogon will be chosen
1803 # first if we set CC to just the basename; use the full file name.
1804 shift
1805 set dummy "$ac_dir/$ac_word" "$@"
1806 shift
1807 ac_cv_prog_CC="$@"
1812 CC="$ac_cv_prog_CC"
1813 if test -n "$CC"; then
1814 echo "$ac_t""$CC" 1>&6
1815 else
1816 echo "$ac_t""no" 1>&6
1819 if test -z "$CC"; then
1820 case "`uname -s`" in
1821 *win32* | *WIN32*)
1822 # Extract the first word of "cl", so it can be a program name with args.
1823 set dummy cl; ac_word=$2
1824 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1825 echo "configure:1826: checking for $ac_word" >&5
1826 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1827 echo $ac_n "(cached) $ac_c" 1>&6
1828 else
1829 if test -n "$CC"; then
1830 ac_cv_prog_CC="$CC" # Let the user override the test.
1831 else
1832 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1833 ac_dummy="$PATH"
1834 for ac_dir in $ac_dummy; do
1835 test -z "$ac_dir" && ac_dir=.
1836 if test -f $ac_dir/$ac_word; then
1837 ac_cv_prog_CC="cl"
1838 break
1840 done
1841 IFS="$ac_save_ifs"
1844 CC="$ac_cv_prog_CC"
1845 if test -n "$CC"; then
1846 echo "$ac_t""$CC" 1>&6
1847 else
1848 echo "$ac_t""no" 1>&6
1851 esac
1853 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1856 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1857 echo "configure:1858: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1859 ac_ext=c
1860 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1861 ac_cpp='$CPP $CPPFLAGS'
1862 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1863 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1864 cross_compiling=$ac_cv_prog_cc_cross
1866 cat > conftest.$ac_ext << EOF
1868 #line 1869 "configure"
1869 #include "confdefs.h"
1871 main(){return(0);}
1873 if { (eval echo configure:1874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1874 ac_cv_prog_cc_works=yes
1875 # If we can't run a trivial program, we are probably using a cross compiler.
1876 if (./conftest; exit) 2>/dev/null; then
1877 ac_cv_prog_cc_cross=no
1878 else
1879 ac_cv_prog_cc_cross=yes
1881 else
1882 echo "configure: failed program was:" >&5
1883 cat conftest.$ac_ext >&5
1884 ac_cv_prog_cc_works=no
1886 rm -fr conftest*
1887 ac_ext=c
1888 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1889 ac_cpp='$CPP $CPPFLAGS'
1890 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1891 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1892 cross_compiling=$ac_cv_prog_cc_cross
1894 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1895 if test $ac_cv_prog_cc_works = no; then
1896 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1898 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1899 echo "configure:1900: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1900 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1901 cross_compiling=$ac_cv_prog_cc_cross
1903 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1904 echo "configure:1905: checking whether we are using GNU C" >&5
1905 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1906 echo $ac_n "(cached) $ac_c" 1>&6
1907 else
1908 cat > conftest.c <<EOF
1909 #ifdef __GNUC__
1910 yes;
1911 #endif
1913 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1914: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1914 ac_cv_prog_gcc=yes
1915 else
1916 ac_cv_prog_gcc=no
1920 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1922 if test $ac_cv_prog_gcc = yes; then
1923 GCC=yes
1924 else
1925 GCC=
1928 ac_test_CFLAGS="${CFLAGS+set}"
1929 ac_save_CFLAGS="$CFLAGS"
1930 CFLAGS=
1931 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1932 echo "configure:1933: checking whether ${CC-cc} accepts -g" >&5
1933 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1934 echo $ac_n "(cached) $ac_c" 1>&6
1935 else
1936 echo 'void f(){}' > conftest.c
1937 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1938 ac_cv_prog_cc_g=yes
1939 else
1940 ac_cv_prog_cc_g=no
1942 rm -f conftest*
1946 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1947 if test "$ac_test_CFLAGS" = set; then
1948 CFLAGS="$ac_save_CFLAGS"
1949 elif test $ac_cv_prog_cc_g = yes; then
1950 if test "$GCC" = yes; then
1951 CFLAGS="-g -O2"
1952 else
1953 CFLAGS="-g"
1955 else
1956 if test "$GCC" = yes; then
1957 CFLAGS="-O2"
1958 else
1959 CFLAGS=
1963 esac
1965 # On Suns, sometimes $CPP names a directory.
1966 if test -n "$CPP" && test -d "$CPP"; then
1967 CPP=
1970 #### Some systems specify a CPP to use unless we are using GCC.
1971 #### Now that we know whether we are using GCC, we can decide whether
1972 #### to use that one.
1973 if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x
1974 then
1975 CPP="$NON_GNU_CPP"
1978 #### Some systems specify a CC to use unless we are using GCC.
1979 #### Now that we know whether we are using GCC, we can decide whether
1980 #### to use that one.
1981 if test "x$NON_GNU_CC" != x && test x$GCC != xyes &&
1982 test x$cc_specified != xyes
1983 then
1984 CC="$NON_GNU_CC"
1987 if test x$GCC = xyes && test "x$GCC_TEST_OPTIONS" != x
1988 then
1989 CC="$CC $GCC_TEST_OPTIONS"
1992 if test x$GCC = x && test "x$NON_GCC_TEST_OPTIONS" != x
1993 then
1994 CC="$CC $NON_GCC_TEST_OPTIONS"
1997 if test x$GCC = xyes && test "x$GCC_LINK_TEST_OPTIONS" != x
1998 then
1999 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
2002 if test x$GCC = x && test "x$NON_GCC_LINK_TEST_OPTIONS" != x
2003 then
2004 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
2007 #### Some other nice autoconf tests. If you add a test here which
2008 #### should make an entry in src/config.h, don't forget to add an
2009 #### #undef clause to src/config.h.in for autoconf to modify.
2011 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2012 echo "configure:2013: checking whether ln -s works" >&5
2013 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
2014 echo $ac_n "(cached) $ac_c" 1>&6
2015 else
2016 rm -f conftestdata
2017 if ln -s X conftestdata 2>/dev/null
2018 then
2019 rm -f conftestdata
2020 ac_cv_prog_LN_S="ln -s"
2021 else
2022 ac_cv_prog_LN_S=ln
2025 LN_S="$ac_cv_prog_LN_S"
2026 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2027 echo "$ac_t""yes" 1>&6
2028 else
2029 echo "$ac_t""no" 1>&6
2032 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2033 echo "configure:2034: checking how to run the C preprocessor" >&5
2034 # On Suns, sometimes $CPP names a directory.
2035 if test -n "$CPP" && test -d "$CPP"; then
2036 CPP=
2038 if test -z "$CPP"; then
2039 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
2040 echo $ac_n "(cached) $ac_c" 1>&6
2041 else
2042 # This must be in double quotes, not single quotes, because CPP may get
2043 # substituted into the Makefile and "${CC-cc}" will confuse make.
2044 CPP="${CC-cc} -E"
2045 # On the NeXT, cc -E runs the code through the compiler's parser,
2046 # not just through cpp.
2047 cat > conftest.$ac_ext <<EOF
2048 #line 2049 "configure"
2049 #include "confdefs.h"
2050 #include <assert.h>
2051 Syntax Error
2053 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2054 { (eval echo configure:2055: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2055 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2056 if test -z "$ac_err"; then
2058 else
2059 echo "$ac_err" >&5
2060 echo "configure: failed program was:" >&5
2061 cat conftest.$ac_ext >&5
2062 rm -rf conftest*
2063 CPP="${CC-cc} -E -traditional-cpp"
2064 cat > conftest.$ac_ext <<EOF
2065 #line 2066 "configure"
2066 #include "confdefs.h"
2067 #include <assert.h>
2068 Syntax Error
2070 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2071 { (eval echo configure:2072: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2072 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2073 if test -z "$ac_err"; then
2075 else
2076 echo "$ac_err" >&5
2077 echo "configure: failed program was:" >&5
2078 cat conftest.$ac_ext >&5
2079 rm -rf conftest*
2080 CPP="${CC-cc} -nologo -E"
2081 cat > conftest.$ac_ext <<EOF
2082 #line 2083 "configure"
2083 #include "confdefs.h"
2084 #include <assert.h>
2085 Syntax Error
2087 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2088 { (eval echo configure:2089: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2089 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2090 if test -z "$ac_err"; then
2092 else
2093 echo "$ac_err" >&5
2094 echo "configure: failed program was:" >&5
2095 cat conftest.$ac_ext >&5
2096 rm -rf conftest*
2097 CPP=/lib/cpp
2099 rm -f conftest*
2101 rm -f conftest*
2103 rm -f conftest*
2104 ac_cv_prog_CPP="$CPP"
2106 CPP="$ac_cv_prog_CPP"
2107 else
2108 ac_cv_prog_CPP="$CPP"
2110 echo "$ac_t""$CPP" 1>&6
2112 # Find a good install program. We prefer a C program (faster),
2113 # so one script is as good as another. But avoid the broken or
2114 # incompatible versions:
2115 # SysV /etc/install, /usr/sbin/install
2116 # SunOS /usr/etc/install
2117 # IRIX /sbin/install
2118 # AIX /bin/install
2119 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2120 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2121 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2122 # ./install, which can be erroneously created by make from ./install.sh.
2123 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2124 echo "configure:2125: checking for a BSD compatible install" >&5
2125 if test -z "$INSTALL"; then
2126 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
2127 echo $ac_n "(cached) $ac_c" 1>&6
2128 else
2129 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
2130 for ac_dir in $PATH; do
2131 # Account for people who put trailing slashes in PATH elements.
2132 case "$ac_dir/" in
2133 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2135 # OSF1 and SCO ODT 3.0 have their own names for install.
2136 # Don't use installbsd from OSF since it installs stuff as root
2137 # by default.
2138 for ac_prog in ginstall scoinst install; do
2139 if test -f $ac_dir/$ac_prog; then
2140 if test $ac_prog = install &&
2141 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2142 # AIX install. It has an incompatible calling convention.
2144 else
2145 ac_cv_path_install="$ac_dir/$ac_prog -c"
2146 break 2
2149 done
2151 esac
2152 done
2153 IFS="$ac_save_IFS"
2156 if test "${ac_cv_path_install+set}" = set; then
2157 INSTALL="$ac_cv_path_install"
2158 else
2159 # As a last resort, use the slow shell script. We don't cache a
2160 # path for INSTALL within a source directory, because that will
2161 # break other packages using the cache if that directory is
2162 # removed, or if the path is relative.
2163 INSTALL="$ac_install_sh"
2166 echo "$ac_t""$INSTALL" 1>&6
2168 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2169 # It thinks the first close brace ends the variable substitution.
2170 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2172 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
2174 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2176 for ac_prog in 'bison -y' byacc
2178 # Extract the first word of "$ac_prog", so it can be a program name with args.
2179 set dummy $ac_prog; ac_word=$2
2180 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2181 echo "configure:2182: checking for $ac_word" >&5
2182 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
2183 echo $ac_n "(cached) $ac_c" 1>&6
2184 else
2185 if test -n "$YACC"; then
2186 ac_cv_prog_YACC="$YACC" # Let the user override the test.
2187 else
2188 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2189 ac_dummy="$PATH"
2190 for ac_dir in $ac_dummy; do
2191 test -z "$ac_dir" && ac_dir=.
2192 if test -f $ac_dir/$ac_word; then
2193 ac_cv_prog_YACC="$ac_prog"
2194 break
2196 done
2197 IFS="$ac_save_ifs"
2200 YACC="$ac_cv_prog_YACC"
2201 if test -n "$YACC"; then
2202 echo "$ac_t""$YACC" 1>&6
2203 else
2204 echo "$ac_t""no" 1>&6
2207 test -n "$YACC" && break
2208 done
2209 test -n "$YACC" || YACC="yacc"
2211 if test "x$RANLIB" = x; then
2212 # Extract the first word of "ranlib", so it can be a program name with args.
2213 set dummy ranlib; ac_word=$2
2214 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2215 echo "configure:2216: checking for $ac_word" >&5
2216 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2217 echo $ac_n "(cached) $ac_c" 1>&6
2218 else
2219 if test -n "$RANLIB"; then
2220 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2221 else
2222 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2223 ac_dummy="$PATH"
2224 for ac_dir in $ac_dummy; do
2225 test -z "$ac_dir" && ac_dir=.
2226 if test -f $ac_dir/$ac_word; then
2227 ac_cv_prog_RANLIB="ranlib"
2228 break
2230 done
2231 IFS="$ac_save_ifs"
2232 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2235 RANLIB="$ac_cv_prog_RANLIB"
2236 if test -n "$RANLIB"; then
2237 echo "$ac_t""$RANLIB" 1>&6
2238 else
2239 echo "$ac_t""no" 1>&6
2244 echo $ac_n "checking for AIX""... $ac_c" 1>&6
2245 echo "configure:2246: checking for AIX" >&5
2246 cat > conftest.$ac_ext <<EOF
2247 #line 2248 "configure"
2248 #include "confdefs.h"
2249 #ifdef _AIX
2251 #endif
2254 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2255 egrep "yes" >/dev/null 2>&1; then
2256 rm -rf conftest*
2257 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
2258 #define _ALL_SOURCE 1
2261 else
2262 rm -rf conftest*
2263 echo "$ac_t""no" 1>&6
2265 rm -f conftest*
2269 #### Extract some information from the operating system and machine files.
2271 echo "checking the machine- and system-dependent files to find out
2272 - which libraries the lib-src programs will want, and
2273 - whether the GNU malloc routines are usable" 1>&6
2274 echo "configure:2275: checking the machine- and system-dependent files to find out
2275 - which libraries the lib-src programs will want, and
2276 - whether the GNU malloc routines are usable" >&5
2278 ### First figure out CFLAGS (which we use for running the compiler here)
2279 ### and REAL_CFLAGS (which we use for real compilation).
2280 ### The two are the same except on a few systems, where they are made
2281 ### different to work around various lossages. For example,
2282 ### GCC 2.5 on GNU/Linux needs them to be different because it treats -g
2283 ### as implying static linking.
2285 ### If the CFLAGS env var is specified, we use that value
2286 ### instead of the default.
2288 ### It's not important that this name contain the PID; you can't run
2289 ### two configures in the same directory and have anything work
2290 ### anyway.
2291 tempcname="conftest.c"
2293 echo '
2294 #include "'${srcdir}'/src/'${opsysfile}'"
2295 #include "'${srcdir}'/src/'${machfile}'"
2296 #ifndef LIBS_MACHINE
2297 #define LIBS_MACHINE
2298 #endif
2299 #ifndef LIBS_SYSTEM
2300 #define LIBS_SYSTEM
2301 #endif
2302 #ifndef C_SWITCH_SYSTEM
2303 #define C_SWITCH_SYSTEM
2304 #endif
2305 #ifndef C_SWITCH_MACHINE
2306 #define C_SWITCH_MACHINE
2307 #endif
2308 configure___ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM
2309 configure___ c_switch_system=C_SWITCH_SYSTEM
2310 configure___ c_switch_machine=C_SWITCH_MACHINE
2312 #ifndef LIB_X11_LIB
2313 #define LIB_X11_LIB -lX11
2314 #endif
2316 #ifndef LIBX11_MACHINE
2317 #define LIBX11_MACHINE
2318 #endif
2320 #ifndef LIBX11_SYSTEM
2321 #define LIBX11_SYSTEM
2322 #endif
2323 configure___ LIBX=LIB_X11_LIB LIBX11_MACHINE LIBX11_SYSTEM
2325 #ifdef UNEXEC
2326 configure___ unexec=UNEXEC
2327 #else
2328 configure___ unexec=unexec.o
2329 #endif
2331 #ifdef SYSTEM_MALLOC
2332 configure___ system_malloc=yes
2333 #else
2334 configure___ system_malloc=no
2335 #endif
2337 #ifdef USE_MMAP_FOR_BUFFERS
2338 configure___ use_mmap_for_buffers=yes
2339 #else
2340 configure___ use_mmap_for_buffers=no
2341 #endif
2343 #ifndef C_DEBUG_SWITCH
2344 #define C_DEBUG_SWITCH -g
2345 #endif
2347 #ifndef C_OPTIMIZE_SWITCH
2348 #ifdef __GNUC__
2349 #define C_OPTIMIZE_SWITCH -O2
2350 #else
2351 #define C_OPTIMIZE_SWITCH -O
2352 #endif
2353 #endif
2355 #ifndef LD_SWITCH_MACHINE
2356 #define LD_SWITCH_MACHINE
2357 #endif
2359 #ifndef LD_SWITCH_SYSTEM
2360 #define LD_SWITCH_SYSTEM
2361 #endif
2363 #ifndef LD_SWITCH_X_SITE_AUX
2364 #define LD_SWITCH_X_SITE_AUX
2365 #endif
2367 configure___ ld_switch_system=LD_SWITCH_SYSTEM
2368 configure___ ld_switch_machine=LD_SWITCH_MACHINE
2370 #ifdef THIS_IS_CONFIGURE
2372 /* Get the CFLAGS for tests in configure. */
2373 #ifdef __GNUC__
2374 configure___ CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
2375 #else
2376 configure___ CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
2377 #endif
2379 #else /* not THIS_IS_CONFIGURE */
2381 /* Get the CFLAGS for real compilation. */
2382 #ifdef __GNUC__
2383 configure___ REAL_CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
2384 #else
2385 configure___ REAL_CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
2386 #endif
2388 #endif /* not THIS_IS_CONFIGURE */
2389 ' > ${tempcname}
2391 # The value of CPP is a quoted variable reference, so we need to do this
2392 # to get its actual value...
2393 CPP=`eval "echo $CPP"`
2394 eval `${CPP} -Isrc ${tempcname} \
2395 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
2396 if test "x$SPECIFIED_CFLAGS" = x; then
2397 eval `${CPP} -Isrc -DTHIS_IS_CONFIGURE ${tempcname} \
2398 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
2399 else
2400 REAL_CFLAGS="$CFLAGS"
2402 rm ${tempcname}
2404 ac_link="$ac_link $ld_switch_machine $ld_switch_system"
2406 ### Make sure subsequent tests use flags consistent with the build flags.
2408 if test x"${OVERRIDE_CPPFLAGS}" != x; then
2409 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
2410 else
2411 CPPFLAGS="$c_switch_system $c_switch_machine $CPPFLAGS"
2415 # Check whether --enable-largefile or --disable-largefile was given.
2416 if test "${enable_largefile+set}" = set; then
2417 enableval="$enable_largefile"
2421 if test "$enable_largefile" != no; then
2423 echo $ac_n "checking for special C compiler options needed for large files""... $ac_c" 1>&6
2424 echo "configure:2425: checking for special C compiler options needed for large files" >&5
2425 if eval "test \"`echo '$''{'ac_cv_sys_largefile_CC'+set}'`\" = set"; then
2426 echo $ac_n "(cached) $ac_c" 1>&6
2427 else
2428 ac_cv_sys_largefile_CC=no
2429 if test "$GCC" != yes; then
2430 # IRIX 6.2 and later do not support large files by default,
2431 # so use the C compiler's -n32 option if that helps.
2432 cat > conftest.$ac_ext <<EOF
2433 #line 2434 "configure"
2434 #include "confdefs.h"
2435 #include <sys/types.h>
2436 int a[(off_t) 9223372036854775807 == 9223372036854775807 ? 1 : -1];
2438 int main() {
2440 ; return 0; }
2442 if { (eval echo configure:2443: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2444 else
2445 echo "configure: failed program was:" >&5
2446 cat conftest.$ac_ext >&5
2447 rm -rf conftest*
2448 ac_save_CC="$CC"
2449 CC="$CC -n32"
2450 cat > conftest.$ac_ext <<EOF
2451 #line 2452 "configure"
2452 #include "confdefs.h"
2453 #include <sys/types.h>
2454 int a[(off_t) 9223372036854775807 == 9223372036854775807 ? 1 : -1];
2456 int main() {
2458 ; return 0; }
2460 if { (eval echo configure:2461: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2461 rm -rf conftest*
2462 ac_cv_sys_largefile_CC=' -n32'
2463 else
2464 echo "configure: failed program was:" >&5
2465 cat conftest.$ac_ext >&5
2467 rm -f conftest*
2468 CC="$ac_save_CC"
2470 rm -f conftest*
2474 echo "$ac_t""$ac_cv_sys_largefile_CC" 1>&6
2475 if test "$ac_cv_sys_largefile_CC" != no; then
2476 CC="$CC$ac_cv_sys_largefile_CC"
2479 echo $ac_n "checking for _FILE_OFFSET_BITS value needed for large files""... $ac_c" 1>&6
2480 echo "configure:2481: checking for _FILE_OFFSET_BITS value needed for large files" >&5
2481 if eval "test \"`echo '$''{'ac_cv_sys_file_offset_bits'+set}'`\" = set"; then
2482 echo $ac_n "(cached) $ac_c" 1>&6
2483 else
2484 ac_cv_sys_file_offset_bits=no
2485 cat > conftest.$ac_ext <<EOF
2486 #line 2487 "configure"
2487 #include "confdefs.h"
2488 #include <sys/types.h>
2489 int a[(off_t) 9223372036854775807 == 9223372036854775807 ? 1 : -1];
2491 int main() {
2493 ; return 0; }
2495 if { (eval echo configure:2496: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2497 else
2498 echo "configure: failed program was:" >&5
2499 cat conftest.$ac_ext >&5
2500 rm -rf conftest*
2501 cat > conftest.$ac_ext <<EOF
2502 #line 2503 "configure"
2503 #include "confdefs.h"
2504 #define _FILE_OFFSET_BITS 64
2505 #include <sys/types.h>
2506 int a[(off_t) 9223372036854775807 == 9223372036854775807 ? 1 : -1];
2509 int main() {
2511 ; return 0; }
2513 if { (eval echo configure:2514: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2514 rm -rf conftest*
2515 ac_cv_sys_file_offset_bits=64
2516 else
2517 echo "configure: failed program was:" >&5
2518 cat conftest.$ac_ext >&5
2520 rm -f conftest*
2522 rm -f conftest*
2525 echo "$ac_t""$ac_cv_sys_file_offset_bits" 1>&6
2526 if test "$ac_cv_sys_file_offset_bits" != no; then
2527 cat >> confdefs.h <<EOF
2528 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
2532 echo $ac_n "checking for _LARGE_FILES value needed for large files""... $ac_c" 1>&6
2533 echo "configure:2534: checking for _LARGE_FILES value needed for large files" >&5
2534 if eval "test \"`echo '$''{'ac_cv_sys_large_files'+set}'`\" = set"; then
2535 echo $ac_n "(cached) $ac_c" 1>&6
2536 else
2537 ac_cv_sys_large_files=no
2538 cat > conftest.$ac_ext <<EOF
2539 #line 2540 "configure"
2540 #include "confdefs.h"
2542 int main() {
2544 ; return 0; }
2546 if { (eval echo configure:2547: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2548 else
2549 echo "configure: failed program was:" >&5
2550 cat conftest.$ac_ext >&5
2551 rm -rf conftest*
2552 cat > conftest.$ac_ext <<EOF
2553 #line 2554 "configure"
2554 #include "confdefs.h"
2555 #define _LARGE_FILES 1
2558 int main() {
2560 ; return 0; }
2562 if { (eval echo configure:2563: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2563 rm -rf conftest*
2564 ac_cv_sys_large_files=1
2565 else
2566 echo "configure: failed program was:" >&5
2567 cat conftest.$ac_ext >&5
2569 rm -f conftest*
2571 rm -f conftest*
2574 echo "$ac_t""$ac_cv_sys_large_files" 1>&6
2575 if test "$ac_cv_sys_large_files" != no; then
2576 cat >> confdefs.h <<EOF
2577 #define _LARGE_FILES $ac_cv_sys_large_files
2584 # Sound support for GNU/Linux and the free BSDs.
2585 for ac_hdr in machine/soundcard.h sys/soundcard.h soundcard.h
2587 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2588 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2589 echo "configure:2590: checking for $ac_hdr" >&5
2590 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2591 echo $ac_n "(cached) $ac_c" 1>&6
2592 else
2593 cat > conftest.$ac_ext <<EOF
2594 #line 2595 "configure"
2595 #include "confdefs.h"
2596 #include <$ac_hdr>
2598 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2599 { (eval echo configure:2600: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2600 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2601 if test -z "$ac_err"; then
2602 rm -rf conftest*
2603 eval "ac_cv_header_$ac_safe=yes"
2604 else
2605 echo "$ac_err" >&5
2606 echo "configure: failed program was:" >&5
2607 cat conftest.$ac_ext >&5
2608 rm -rf conftest*
2609 eval "ac_cv_header_$ac_safe=no"
2611 rm -f conftest*
2613 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2614 echo "$ac_t""yes" 1>&6
2615 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2616 cat >> confdefs.h <<EOF
2617 #define $ac_tr_hdr 1
2620 else
2621 echo "$ac_t""no" 1>&6
2623 done
2625 # Emulation library used on NetBSD.
2626 echo $ac_n "checking for _oss_ioctl in -lossaudio""... $ac_c" 1>&6
2627 echo "configure:2628: checking for _oss_ioctl in -lossaudio" >&5
2628 ac_lib_var=`echo ossaudio'_'_oss_ioctl | sed 'y%./+-%__p_%'`
2629 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2630 echo $ac_n "(cached) $ac_c" 1>&6
2631 else
2632 ac_save_LIBS="$LIBS"
2633 LIBS="-lossaudio $LIBS"
2634 cat > conftest.$ac_ext <<EOF
2635 #line 2636 "configure"
2636 #include "confdefs.h"
2637 /* Override any gcc2 internal prototype to avoid an error. */
2638 /* We use char because int might match the return type of a gcc2
2639 builtin and then its argument prototype would still apply. */
2640 char _oss_ioctl();
2642 int main() {
2643 _oss_ioctl()
2644 ; return 0; }
2646 if { (eval echo configure:2647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2647 rm -rf conftest*
2648 eval "ac_cv_lib_$ac_lib_var=yes"
2649 else
2650 echo "configure: failed program was:" >&5
2651 cat conftest.$ac_ext >&5
2652 rm -rf conftest*
2653 eval "ac_cv_lib_$ac_lib_var=no"
2655 rm -f conftest*
2656 LIBS="$ac_save_LIBS"
2659 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2660 echo "$ac_t""yes" 1>&6
2661 LIBSOUND=-lossaudio
2662 else
2663 echo "$ac_t""no" 1>&6
2664 LIBSOUND=
2669 for ac_hdr in sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \
2670 linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \
2671 termcap.h stdio_ext.h fcntl.h term.h strings.h
2673 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2674 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2675 echo "configure:2676: checking for $ac_hdr" >&5
2676 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2677 echo $ac_n "(cached) $ac_c" 1>&6
2678 else
2679 cat > conftest.$ac_ext <<EOF
2680 #line 2681 "configure"
2681 #include "confdefs.h"
2682 #include <$ac_hdr>
2684 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2685 { (eval echo configure:2686: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2686 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2687 if test -z "$ac_err"; then
2688 rm -rf conftest*
2689 eval "ac_cv_header_$ac_safe=yes"
2690 else
2691 echo "$ac_err" >&5
2692 echo "configure: failed program was:" >&5
2693 cat conftest.$ac_ext >&5
2694 rm -rf conftest*
2695 eval "ac_cv_header_$ac_safe=no"
2697 rm -f conftest*
2699 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2700 echo "$ac_t""yes" 1>&6
2701 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2702 cat >> confdefs.h <<EOF
2703 #define $ac_tr_hdr 1
2706 else
2707 echo "$ac_t""no" 1>&6
2709 done
2711 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
2712 echo "configure:2713: checking for ANSI C header files" >&5
2713 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2714 echo $ac_n "(cached) $ac_c" 1>&6
2715 else
2716 cat > conftest.$ac_ext <<EOF
2717 #line 2718 "configure"
2718 #include "confdefs.h"
2719 #include <stdlib.h>
2720 #include <stdarg.h>
2721 #include <string.h>
2722 #include <float.h>
2724 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2725 { (eval echo configure:2726: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2726 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2727 if test -z "$ac_err"; then
2728 rm -rf conftest*
2729 ac_cv_header_stdc=yes
2730 else
2731 echo "$ac_err" >&5
2732 echo "configure: failed program was:" >&5
2733 cat conftest.$ac_ext >&5
2734 rm -rf conftest*
2735 ac_cv_header_stdc=no
2737 rm -f conftest*
2739 if test $ac_cv_header_stdc = yes; then
2740 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2741 cat > conftest.$ac_ext <<EOF
2742 #line 2743 "configure"
2743 #include "confdefs.h"
2744 #include <string.h>
2746 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2747 egrep "memchr" >/dev/null 2>&1; then
2749 else
2750 rm -rf conftest*
2751 ac_cv_header_stdc=no
2753 rm -f conftest*
2757 if test $ac_cv_header_stdc = yes; then
2758 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2759 cat > conftest.$ac_ext <<EOF
2760 #line 2761 "configure"
2761 #include "confdefs.h"
2762 #include <stdlib.h>
2764 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2765 egrep "free" >/dev/null 2>&1; then
2767 else
2768 rm -rf conftest*
2769 ac_cv_header_stdc=no
2771 rm -f conftest*
2775 if test $ac_cv_header_stdc = yes; then
2776 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2777 if test "$cross_compiling" = yes; then
2779 else
2780 cat > conftest.$ac_ext <<EOF
2781 #line 2782 "configure"
2782 #include "confdefs.h"
2783 #include <ctype.h>
2784 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2785 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2786 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2787 int main () { int i; for (i = 0; i < 256; i++)
2788 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2789 exit (0); }
2792 if { (eval echo configure:2793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2793 then
2795 else
2796 echo "configure: failed program was:" >&5
2797 cat conftest.$ac_ext >&5
2798 rm -fr conftest*
2799 ac_cv_header_stdc=no
2801 rm -fr conftest*
2807 echo "$ac_t""$ac_cv_header_stdc" 1>&6
2808 if test $ac_cv_header_stdc = yes; then
2809 cat >> confdefs.h <<\EOF
2810 #define STDC_HEADERS 1
2815 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
2816 echo "configure:2817: checking whether time.h and sys/time.h may both be included" >&5
2817 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2818 echo $ac_n "(cached) $ac_c" 1>&6
2819 else
2820 cat > conftest.$ac_ext <<EOF
2821 #line 2822 "configure"
2822 #include "confdefs.h"
2823 #include <sys/types.h>
2824 #include <sys/time.h>
2825 #include <time.h>
2826 int main() {
2827 struct tm *tp;
2828 ; return 0; }
2830 if { (eval echo configure:2831: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2831 rm -rf conftest*
2832 ac_cv_header_time=yes
2833 else
2834 echo "configure: failed program was:" >&5
2835 cat conftest.$ac_ext >&5
2836 rm -rf conftest*
2837 ac_cv_header_time=no
2839 rm -f conftest*
2842 echo "$ac_t""$ac_cv_header_time" 1>&6
2843 if test $ac_cv_header_time = yes; then
2844 cat >> confdefs.h <<\EOF
2845 #define TIME_WITH_SYS_TIME 1
2850 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
2851 echo "configure:2852: checking for sys_siglist declaration in signal.h or unistd.h" >&5
2852 if eval "test \"`echo '$''{'ac_cv_decl_sys_siglist'+set}'`\" = set"; then
2853 echo $ac_n "(cached) $ac_c" 1>&6
2854 else
2855 cat > conftest.$ac_ext <<EOF
2856 #line 2857 "configure"
2857 #include "confdefs.h"
2858 #include <sys/types.h>
2859 #include <signal.h>
2860 /* NetBSD declares sys_siglist in unistd.h. */
2861 #ifdef HAVE_UNISTD_H
2862 #include <unistd.h>
2863 #endif
2864 int main() {
2865 char *msg = *(sys_siglist + 1);
2866 ; return 0; }
2868 if { (eval echo configure:2869: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2869 rm -rf conftest*
2870 ac_cv_decl_sys_siglist=yes
2871 else
2872 echo "configure: failed program was:" >&5
2873 cat conftest.$ac_ext >&5
2874 rm -rf conftest*
2875 ac_cv_decl_sys_siglist=no
2877 rm -f conftest*
2880 echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
2881 if test $ac_cv_decl_sys_siglist = yes; then
2882 cat >> confdefs.h <<\EOF
2883 #define SYS_SIGLIST_DECLARED 1
2888 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
2889 echo "configure:2890: checking for sys/wait.h that is POSIX.1 compatible" >&5
2890 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
2891 echo $ac_n "(cached) $ac_c" 1>&6
2892 else
2893 cat > conftest.$ac_ext <<EOF
2894 #line 2895 "configure"
2895 #include "confdefs.h"
2896 #include <sys/types.h>
2897 #include <sys/wait.h>
2898 #ifndef WEXITSTATUS
2899 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
2900 #endif
2901 #ifndef WIFEXITED
2902 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
2903 #endif
2904 int main() {
2905 int s;
2906 wait (&s);
2907 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
2908 ; return 0; }
2910 if { (eval echo configure:2911: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2911 rm -rf conftest*
2912 ac_cv_header_sys_wait_h=yes
2913 else
2914 echo "configure: failed program was:" >&5
2915 cat conftest.$ac_ext >&5
2916 rm -rf conftest*
2917 ac_cv_header_sys_wait_h=no
2919 rm -f conftest*
2922 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
2923 if test $ac_cv_header_sys_wait_h = yes; then
2924 cat >> confdefs.h <<\EOF
2925 #define HAVE_SYS_WAIT_H 1
2931 echo $ac_n "checking for struct utimbuf""... $ac_c" 1>&6
2932 echo "configure:2933: checking for struct utimbuf" >&5
2933 if eval "test \"`echo '$''{'emacs_cv_struct_utimbuf'+set}'`\" = set"; then
2934 echo $ac_n "(cached) $ac_c" 1>&6
2935 else
2936 cat > conftest.$ac_ext <<EOF
2937 #line 2938 "configure"
2938 #include "confdefs.h"
2939 #ifdef TIME_WITH_SYS_TIME
2940 #include <sys/time.h>
2941 #include <time.h>
2942 #else
2943 #ifdef HAVE_SYS_TIME_H
2944 #include <sys/time.h>
2945 #else
2946 #include <time.h>
2947 #endif
2948 #endif
2949 #ifdef HAVE_UTIME_H
2950 #include <utime.h>
2951 #endif
2952 int main() {
2953 static struct utimbuf x; x.actime = x.modtime;
2954 ; return 0; }
2956 if { (eval echo configure:2957: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2957 rm -rf conftest*
2958 emacs_cv_struct_utimbuf=yes
2959 else
2960 echo "configure: failed program was:" >&5
2961 cat conftest.$ac_ext >&5
2962 rm -rf conftest*
2963 emacs_cv_struct_utimbuf=no
2965 rm -f conftest*
2968 echo "$ac_t""$emacs_cv_struct_utimbuf" 1>&6
2969 if test $emacs_cv_struct_utimbuf = yes; then
2970 cat >> confdefs.h <<\EOF
2971 #define HAVE_STRUCT_UTIMBUF 1
2976 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
2977 echo "configure:2978: checking return type of signal handlers" >&5
2978 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2979 echo $ac_n "(cached) $ac_c" 1>&6
2980 else
2981 cat > conftest.$ac_ext <<EOF
2982 #line 2983 "configure"
2983 #include "confdefs.h"
2984 #include <sys/types.h>
2985 #include <signal.h>
2986 #ifdef signal
2987 #undef signal
2988 #endif
2989 #ifdef __cplusplus
2990 extern "C" void (*signal (int, void (*)(int)))(int);
2991 #else
2992 void (*signal ()) ();
2993 #endif
2995 int main() {
2996 int i;
2997 ; return 0; }
2999 if { (eval echo configure:3000: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3000 rm -rf conftest*
3001 ac_cv_type_signal=void
3002 else
3003 echo "configure: failed program was:" >&5
3004 cat conftest.$ac_ext >&5
3005 rm -rf conftest*
3006 ac_cv_type_signal=int
3008 rm -f conftest*
3011 echo "$ac_t""$ac_cv_type_signal" 1>&6
3012 cat >> confdefs.h <<EOF
3013 #define RETSIGTYPE $ac_cv_type_signal
3018 echo $ac_n "checking for speed_t""... $ac_c" 1>&6
3019 echo "configure:3020: checking for speed_t" >&5
3020 if eval "test \"`echo '$''{'emacs_cv_speed_t'+set}'`\" = set"; then
3021 echo $ac_n "(cached) $ac_c" 1>&6
3022 else
3023 cat > conftest.$ac_ext <<EOF
3024 #line 3025 "configure"
3025 #include "confdefs.h"
3026 #include <termios.h>
3027 int main() {
3028 speed_t x = 1;
3029 ; return 0; }
3031 if { (eval echo configure:3032: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3032 rm -rf conftest*
3033 emacs_cv_speed_t=yes
3034 else
3035 echo "configure: failed program was:" >&5
3036 cat conftest.$ac_ext >&5
3037 rm -rf conftest*
3038 emacs_cv_speed_t=no
3040 rm -f conftest*
3043 echo "$ac_t""$emacs_cv_speed_t" 1>&6
3044 if test $emacs_cv_speed_t = yes; then
3045 cat >> confdefs.h <<\EOF
3046 #define HAVE_SPEED_T 1
3051 echo $ac_n "checking for struct timeval""... $ac_c" 1>&6
3052 echo "configure:3053: checking for struct timeval" >&5
3053 if eval "test \"`echo '$''{'emacs_cv_struct_timeval'+set}'`\" = set"; then
3054 echo $ac_n "(cached) $ac_c" 1>&6
3055 else
3056 cat > conftest.$ac_ext <<EOF
3057 #line 3058 "configure"
3058 #include "confdefs.h"
3059 #ifdef TIME_WITH_SYS_TIME
3060 #include <sys/time.h>
3061 #include <time.h>
3062 #else
3063 #ifdef HAVE_SYS_TIME_H
3064 #include <sys/time.h>
3065 #else
3066 #include <time.h>
3067 #endif
3068 #endif
3069 int main() {
3070 static struct timeval x; x.tv_sec = x.tv_usec;
3071 ; return 0; }
3073 if { (eval echo configure:3074: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3074 rm -rf conftest*
3075 emacs_cv_struct_timeval=yes
3076 else
3077 echo "configure: failed program was:" >&5
3078 cat conftest.$ac_ext >&5
3079 rm -rf conftest*
3080 emacs_cv_struct_timeval=no
3082 rm -f conftest*
3085 echo "$ac_t""$emacs_cv_struct_timeval" 1>&6
3086 HAVE_TIMEVAL=$emacs_cv_struct_timeval
3087 if test $emacs_cv_struct_timeval = yes; then
3088 cat >> confdefs.h <<\EOF
3089 #define HAVE_TIMEVAL 1
3094 echo $ac_n "checking for struct exception""... $ac_c" 1>&6
3095 echo "configure:3096: checking for struct exception" >&5
3096 if eval "test \"`echo '$''{'emacs_cv_struct_exception'+set}'`\" = set"; then
3097 echo $ac_n "(cached) $ac_c" 1>&6
3098 else
3099 cat > conftest.$ac_ext <<EOF
3100 #line 3101 "configure"
3101 #include "confdefs.h"
3102 #include <math.h>
3103 int main() {
3104 static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1;
3105 ; return 0; }
3107 if { (eval echo configure:3108: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3108 rm -rf conftest*
3109 emacs_cv_struct_exception=yes
3110 else
3111 echo "configure: failed program was:" >&5
3112 cat conftest.$ac_ext >&5
3113 rm -rf conftest*
3114 emacs_cv_struct_exception=no
3116 rm -f conftest*
3119 echo "$ac_t""$emacs_cv_struct_exception" 1>&6
3120 HAVE_EXCEPTION=$emacs_cv_struct_exception
3121 if test $emacs_cv_struct_exception != yes; then
3122 cat >> confdefs.h <<\EOF
3123 #define NO_MATHERR 1
3128 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
3129 echo "configure:3130: checking whether struct tm is in sys/time.h or time.h" >&5
3130 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
3131 echo $ac_n "(cached) $ac_c" 1>&6
3132 else
3133 cat > conftest.$ac_ext <<EOF
3134 #line 3135 "configure"
3135 #include "confdefs.h"
3136 #include <sys/types.h>
3137 #include <time.h>
3138 int main() {
3139 struct tm *tp; tp->tm_sec;
3140 ; return 0; }
3142 if { (eval echo configure:3143: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3143 rm -rf conftest*
3144 ac_cv_struct_tm=time.h
3145 else
3146 echo "configure: failed program was:" >&5
3147 cat conftest.$ac_ext >&5
3148 rm -rf conftest*
3149 ac_cv_struct_tm=sys/time.h
3151 rm -f conftest*
3154 echo "$ac_t""$ac_cv_struct_tm" 1>&6
3155 if test $ac_cv_struct_tm = sys/time.h; then
3156 cat >> confdefs.h <<\EOF
3157 #define TM_IN_SYS_TIME 1
3162 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
3163 echo "configure:3164: checking for tm_zone in struct tm" >&5
3164 if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
3165 echo $ac_n "(cached) $ac_c" 1>&6
3166 else
3167 cat > conftest.$ac_ext <<EOF
3168 #line 3169 "configure"
3169 #include "confdefs.h"
3170 #include <sys/types.h>
3171 #include <$ac_cv_struct_tm>
3172 int main() {
3173 struct tm tm; tm.tm_zone;
3174 ; return 0; }
3176 if { (eval echo configure:3177: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3177 rm -rf conftest*
3178 ac_cv_struct_tm_zone=yes
3179 else
3180 echo "configure: failed program was:" >&5
3181 cat conftest.$ac_ext >&5
3182 rm -rf conftest*
3183 ac_cv_struct_tm_zone=no
3185 rm -f conftest*
3188 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
3189 if test "$ac_cv_struct_tm_zone" = yes; then
3190 cat >> confdefs.h <<\EOF
3191 #define HAVE_TM_ZONE 1
3194 else
3195 echo $ac_n "checking for tzname""... $ac_c" 1>&6
3196 echo "configure:3197: checking for tzname" >&5
3197 if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
3198 echo $ac_n "(cached) $ac_c" 1>&6
3199 else
3200 cat > conftest.$ac_ext <<EOF
3201 #line 3202 "configure"
3202 #include "confdefs.h"
3203 #include <time.h>
3204 #ifndef tzname /* For SGI. */
3205 extern char *tzname[]; /* RS6000 and others reject char **tzname. */
3206 #endif
3207 int main() {
3208 atoi(*tzname);
3209 ; return 0; }
3211 if { (eval echo configure:3212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3212 rm -rf conftest*
3213 ac_cv_var_tzname=yes
3214 else
3215 echo "configure: failed program was:" >&5
3216 cat conftest.$ac_ext >&5
3217 rm -rf conftest*
3218 ac_cv_var_tzname=no
3220 rm -f conftest*
3223 echo "$ac_t""$ac_cv_var_tzname" 1>&6
3224 if test $ac_cv_var_tzname = yes; then
3225 cat >> confdefs.h <<\EOF
3226 #define HAVE_TZNAME 1
3232 echo $ac_n "checking for tm_gmtoff in struct tm""... $ac_c" 1>&6
3233 echo "configure:3234: checking for tm_gmtoff in struct tm" >&5
3234 if eval "test \"`echo '$''{'emacs_cv_tm_gmtoff'+set}'`\" = set"; then
3235 echo $ac_n "(cached) $ac_c" 1>&6
3236 else
3237 cat > conftest.$ac_ext <<EOF
3238 #line 3239 "configure"
3239 #include "confdefs.h"
3240 #include <time.h>
3241 int main() {
3242 struct tm t; t.tm_gmtoff = 0
3243 ; return 0; }
3245 if { (eval echo configure:3246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3246 rm -rf conftest*
3247 emacs_cv_tm_gmtoff=yes
3248 else
3249 echo "configure: failed program was:" >&5
3250 cat conftest.$ac_ext >&5
3251 rm -rf conftest*
3252 emacs_cv_tm_gmtoff=no
3254 rm -f conftest*
3257 echo "$ac_t""$emacs_cv_tm_gmtoff" 1>&6
3258 if test $emacs_cv_tm_gmtoff = yes; then
3259 cat >> confdefs.h <<\EOF
3260 #define HAVE_TM_GMTOFF 1
3266 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
3267 echo "configure:3268: checking for ${CC-cc} option to accept ANSI C" >&5
3268 if eval "test \"`echo '$''{'ac_cv_prog_cc_stdc'+set}'`\" = set"; then
3269 echo $ac_n "(cached) $ac_c" 1>&6
3270 else
3271 ac_cv_prog_cc_stdc=no
3272 ac_save_CC="$CC"
3273 # Don't try gcc -ansi; that turns off useful extensions and
3274 # breaks some systems' header files.
3275 # AIX -qlanglvl=ansi
3276 # Ultrix and OSF/1 -std1
3277 # HP-UX 10.20 and later -Ae
3278 # HP-UX older versions -Aa -D_HPUX_SOURCE
3279 # SVR4 -Xc -D__EXTENSIONS__
3280 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3282 CC="$ac_save_CC $ac_arg"
3283 cat > conftest.$ac_ext <<EOF
3284 #line 3285 "configure"
3285 #include "confdefs.h"
3286 #include <stdarg.h>
3287 #include <stdio.h>
3288 #include <sys/types.h>
3289 #include <sys/stat.h>
3290 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3291 struct buf { int x; };
3292 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3293 static char *e (p, i)
3294 char **p;
3295 int i;
3297 return p[i];
3299 static char *f (char * (*g) (char **, int), char **p, ...)
3301 char *s;
3302 va_list v;
3303 va_start (v,p);
3304 s = g (p, va_arg (v,int));
3305 va_end (v);
3306 return s;
3308 int test (int i, double x);
3309 struct s1 {int (*f) (int a);};
3310 struct s2 {int (*f) (double a);};
3311 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3312 int argc;
3313 char **argv;
3314 int main() {
3315 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3316 ; return 0; }
3318 if { (eval echo configure:3319: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3319 rm -rf conftest*
3320 ac_cv_prog_cc_stdc="$ac_arg"; break
3321 else
3322 echo "configure: failed program was:" >&5
3323 cat conftest.$ac_ext >&5
3325 rm -f conftest*
3326 done
3327 CC="$ac_save_CC"
3331 case "x$ac_cv_prog_cc_stdc" in
3332 x|xno)
3333 echo "$ac_t""none needed" 1>&6 ;;
3335 echo "$ac_t""$ac_cv_prog_cc_stdc" 1>&6
3336 CC="$CC $ac_cv_prog_cc_stdc" ;;
3337 esac
3339 echo $ac_n "checking for function prototypes""... $ac_c" 1>&6
3340 echo "configure:3341: checking for function prototypes" >&5
3341 if test "$ac_cv_prog_cc_stdc" != no; then
3342 echo "$ac_t""yes" 1>&6
3343 cat >> confdefs.h <<\EOF
3344 #define PROTOTYPES 1
3347 else
3348 echo "$ac_t""no" 1>&6
3351 echo $ac_n "checking for working volatile""... $ac_c" 1>&6
3352 echo "configure:3353: checking for working volatile" >&5
3353 if eval "test \"`echo '$''{'ac_cv_c_volatile'+set}'`\" = set"; then
3354 echo $ac_n "(cached) $ac_c" 1>&6
3355 else
3356 cat > conftest.$ac_ext <<EOF
3357 #line 3358 "configure"
3358 #include "confdefs.h"
3360 int main() {
3362 volatile int x;
3363 int * volatile y;
3364 ; return 0; }
3366 if { (eval echo configure:3367: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3367 rm -rf conftest*
3368 ac_cv_c_volatile=yes
3369 else
3370 echo "configure: failed program was:" >&5
3371 cat conftest.$ac_ext >&5
3372 rm -rf conftest*
3373 ac_cv_c_volatile=no
3375 rm -f conftest*
3378 echo "$ac_t""$ac_cv_c_volatile" 1>&6
3379 if test $ac_cv_c_volatile = no; then
3380 cat >> confdefs.h <<\EOF
3381 #define volatile
3386 echo $ac_n "checking for working const""... $ac_c" 1>&6
3387 echo "configure:3388: checking for working const" >&5
3388 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
3389 echo $ac_n "(cached) $ac_c" 1>&6
3390 else
3391 cat > conftest.$ac_ext <<EOF
3392 #line 3393 "configure"
3393 #include "confdefs.h"
3395 int main() {
3397 /* Ultrix mips cc rejects this. */
3398 typedef int charset[2]; const charset x;
3399 /* SunOS 4.1.1 cc rejects this. */
3400 char const *const *ccp;
3401 char **p;
3402 /* NEC SVR4.0.2 mips cc rejects this. */
3403 struct point {int x, y;};
3404 static struct point const zero = {0,0};
3405 /* AIX XL C 1.02.0.0 rejects this.
3406 It does not let you subtract one const X* pointer from another in an arm
3407 of an if-expression whose if-part is not a constant expression */
3408 const char *g = "string";
3409 ccp = &g + (g ? g-g : 0);
3410 /* HPUX 7.0 cc rejects these. */
3411 ++ccp;
3412 p = (char**) ccp;
3413 ccp = (char const *const *) p;
3414 { /* SCO 3.2v4 cc rejects this. */
3415 char *t;
3416 char const *s = 0 ? (char *) 0 : (char const *) 0;
3418 *t++ = 0;
3420 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
3421 int x[] = {25, 17};
3422 const int *foo = &x[0];
3423 ++foo;
3425 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3426 typedef const int *iptr;
3427 iptr p = 0;
3428 ++p;
3430 { /* AIX XL C 1.02.0.0 rejects this saying
3431 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3432 struct s { int j; const int *ap[3]; };
3433 struct s *b; b->j = 5;
3435 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3436 const int foo = 10;
3439 ; return 0; }
3441 if { (eval echo configure:3442: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3442 rm -rf conftest*
3443 ac_cv_c_const=yes
3444 else
3445 echo "configure: failed program was:" >&5
3446 cat conftest.$ac_ext >&5
3447 rm -rf conftest*
3448 ac_cv_c_const=no
3450 rm -f conftest*
3453 echo "$ac_t""$ac_cv_c_const" 1>&6
3454 if test $ac_cv_c_const = no; then
3455 cat >> confdefs.h <<\EOF
3456 #define const
3461 echo $ac_n "checking for void * support""... $ac_c" 1>&6
3462 echo "configure:3463: checking for void * support" >&5
3463 if eval "test \"`echo '$''{'emacs_cv_void_star'+set}'`\" = set"; then
3464 echo $ac_n "(cached) $ac_c" 1>&6
3465 else
3466 cat > conftest.$ac_ext <<EOF
3467 #line 3468 "configure"
3468 #include "confdefs.h"
3470 int main() {
3471 void * foo;
3472 ; return 0; }
3474 if { (eval echo configure:3475: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3475 rm -rf conftest*
3476 emacs_cv_void_star=yes
3477 else
3478 echo "configure: failed program was:" >&5
3479 cat conftest.$ac_ext >&5
3480 rm -rf conftest*
3481 emacs_cv_void_star=no
3483 rm -f conftest*
3486 echo "$ac_t""$emacs_cv_void_star" 1>&6
3487 if test $emacs_cv_void_star = yes; then
3488 cat >> confdefs.h <<\EOF
3489 #define POINTER_TYPE void
3492 else
3493 cat >> confdefs.h <<\EOF
3494 #define POINTER_TYPE char
3499 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
3500 echo "configure:3501: checking whether ${MAKE-make} sets \${MAKE}" >&5
3501 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
3502 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
3503 echo $ac_n "(cached) $ac_c" 1>&6
3504 else
3505 cat > conftestmake <<\EOF
3506 all:
3507 @echo 'ac_maketemp="${MAKE}"'
3509 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3510 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
3511 if test -n "$ac_maketemp"; then
3512 eval ac_cv_prog_make_${ac_make}_set=yes
3513 else
3514 eval ac_cv_prog_make_${ac_make}_set=no
3516 rm -f conftestmake
3518 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3519 echo "$ac_t""yes" 1>&6
3520 SET_MAKE=
3521 else
3522 echo "$ac_t""no" 1>&6
3523 SET_MAKE="MAKE=${MAKE-make}"
3527 echo $ac_n "checking for long file names""... $ac_c" 1>&6
3528 echo "configure:3529: checking for long file names" >&5
3529 if eval "test \"`echo '$''{'ac_cv_sys_long_file_names'+set}'`\" = set"; then
3530 echo $ac_n "(cached) $ac_c" 1>&6
3531 else
3532 ac_cv_sys_long_file_names=yes
3533 # Test for long file names in all the places we know might matter:
3534 # . the current directory, where building will happen
3535 # $prefix/lib where we will be installing things
3536 # $exec_prefix/lib likewise
3537 # eval it to expand exec_prefix.
3538 # $TMPDIR if set, where it might want to write temporary files
3539 # if $TMPDIR is not set:
3540 # /tmp where it might want to write temporary files
3541 # /var/tmp likewise
3542 # /usr/tmp likewise
3543 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3544 ac_tmpdirs="$TMPDIR"
3545 else
3546 ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3548 for ac_dir in . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3549 test -d $ac_dir || continue
3550 test -w $ac_dir || continue # It is less confusing to not echo anything here.
3551 (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
3552 (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
3553 val=`cat $ac_dir/conftest9012345 2>/dev/null`
3554 if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
3555 ac_cv_sys_long_file_names=no
3556 rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
3557 break
3559 rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
3560 done
3563 echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6
3564 if test $ac_cv_sys_long_file_names = yes; then
3565 cat >> confdefs.h <<\EOF
3566 #define HAVE_LONG_FILE_NAMES 1
3572 #### Choose a window system.
3574 # If we find X, set shell vars x_includes and x_libraries to the
3575 # paths, otherwise set no_x=yes.
3576 # Uses ac_ vars as temps to allow command line to override cache and checks.
3577 # --without-x overrides everything else, but does not touch the cache.
3578 echo $ac_n "checking for X""... $ac_c" 1>&6
3579 echo "configure:3580: checking for X" >&5
3581 # Check whether --with-x or --without-x was given.
3582 if test "${with_x+set}" = set; then
3583 withval="$with_x"
3587 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
3588 if test "x$with_x" = xno; then
3589 # The user explicitly disabled X.
3590 have_x=disabled
3591 else
3592 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
3593 # Both variables are already set.
3594 have_x=yes
3595 else
3596 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
3597 echo $ac_n "(cached) $ac_c" 1>&6
3598 else
3599 # One or both of the vars are not set, and there is no cached value.
3600 ac_x_includes=NO ac_x_libraries=NO
3601 rm -fr conftestdir
3602 if mkdir conftestdir; then
3603 cd conftestdir
3604 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
3605 cat > Imakefile <<'EOF'
3606 acfindx:
3607 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
3609 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
3610 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3611 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
3612 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
3613 for ac_extension in a so sl; do
3614 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
3615 test -f $ac_im_libdir/libX11.$ac_extension; then
3616 ac_im_usrlibdir=$ac_im_libdir; break
3618 done
3619 # Screen out bogus values from the imake configuration. They are
3620 # bogus both because they are the default anyway, and because
3621 # using them would break gcc on systems where it needs fixed includes.
3622 case "$ac_im_incroot" in
3623 /usr/include) ;;
3624 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
3625 esac
3626 case "$ac_im_usrlibdir" in
3627 /usr/lib | /lib) ;;
3628 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
3629 esac
3631 cd ..
3632 rm -fr conftestdir
3635 if test "$ac_x_includes" = NO; then
3636 # Guess where to find include files, by looking for this one X11 .h file.
3637 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
3639 # First, try using that file with no special directory specified.
3640 cat > conftest.$ac_ext <<EOF
3641 #line 3642 "configure"
3642 #include "confdefs.h"
3643 #include <$x_direct_test_include>
3645 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3646 { (eval echo configure:3647: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3647 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3648 if test -z "$ac_err"; then
3649 rm -rf conftest*
3650 # We can compile using X headers with no special include directory.
3651 ac_x_includes=
3652 else
3653 echo "$ac_err" >&5
3654 echo "configure: failed program was:" >&5
3655 cat conftest.$ac_ext >&5
3656 rm -rf conftest*
3657 # Look for the header file in a standard set of common directories.
3658 # Check X11 before X11Rn because it is often a symlink to the current release.
3659 for ac_dir in \
3660 /usr/X11/include \
3661 /usr/X11R6/include \
3662 /usr/X11R5/include \
3663 /usr/X11R4/include \
3665 /usr/include/X11 \
3666 /usr/include/X11R6 \
3667 /usr/include/X11R5 \
3668 /usr/include/X11R4 \
3670 /usr/local/X11/include \
3671 /usr/local/X11R6/include \
3672 /usr/local/X11R5/include \
3673 /usr/local/X11R4/include \
3675 /usr/local/include/X11 \
3676 /usr/local/include/X11R6 \
3677 /usr/local/include/X11R5 \
3678 /usr/local/include/X11R4 \
3680 /usr/X386/include \
3681 /usr/x386/include \
3682 /usr/XFree86/include/X11 \
3684 /usr/include \
3685 /usr/local/include \
3686 /usr/unsupported/include \
3687 /usr/athena/include \
3688 /usr/local/x11r5/include \
3689 /usr/lpp/Xamples/include \
3691 /usr/openwin/include \
3692 /usr/openwin/share/include \
3695 if test -r "$ac_dir/$x_direct_test_include"; then
3696 ac_x_includes=$ac_dir
3697 break
3699 done
3701 rm -f conftest*
3702 fi # $ac_x_includes = NO
3704 if test "$ac_x_libraries" = NO; then
3705 # Check for the libraries.
3707 test -z "$x_direct_test_library" && x_direct_test_library=Xt
3708 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
3710 # See if we find them without any special options.
3711 # Don't add to $LIBS permanently.
3712 ac_save_LIBS="$LIBS"
3713 LIBS="-l$x_direct_test_library $LIBS"
3714 cat > conftest.$ac_ext <<EOF
3715 #line 3716 "configure"
3716 #include "confdefs.h"
3718 int main() {
3719 ${x_direct_test_function}()
3720 ; return 0; }
3722 if { (eval echo configure:3723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3723 rm -rf conftest*
3724 LIBS="$ac_save_LIBS"
3725 # We can link X programs with no special library path.
3726 ac_x_libraries=
3727 else
3728 echo "configure: failed program was:" >&5
3729 cat conftest.$ac_ext >&5
3730 rm -rf conftest*
3731 LIBS="$ac_save_LIBS"
3732 # First see if replacing the include by lib works.
3733 # Check X11 before X11Rn because it is often a symlink to the current release.
3734 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
3735 /usr/X11/lib \
3736 /usr/X11R6/lib \
3737 /usr/X11R5/lib \
3738 /usr/X11R4/lib \
3740 /usr/lib/X11 \
3741 /usr/lib/X11R6 \
3742 /usr/lib/X11R5 \
3743 /usr/lib/X11R4 \
3745 /usr/local/X11/lib \
3746 /usr/local/X11R6/lib \
3747 /usr/local/X11R5/lib \
3748 /usr/local/X11R4/lib \
3750 /usr/local/lib/X11 \
3751 /usr/local/lib/X11R6 \
3752 /usr/local/lib/X11R5 \
3753 /usr/local/lib/X11R4 \
3755 /usr/X386/lib \
3756 /usr/x386/lib \
3757 /usr/XFree86/lib/X11 \
3759 /usr/lib \
3760 /usr/local/lib \
3761 /usr/unsupported/lib \
3762 /usr/athena/lib \
3763 /usr/local/x11r5/lib \
3764 /usr/lpp/Xamples/lib \
3765 /lib/usr/lib/X11 \
3767 /usr/openwin/lib \
3768 /usr/openwin/share/lib \
3771 for ac_extension in a so sl; do
3772 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
3773 ac_x_libraries=$ac_dir
3774 break 2
3776 done
3777 done
3779 rm -f conftest*
3780 fi # $ac_x_libraries = NO
3782 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
3783 # Didn't find X anywhere. Cache the known absence of X.
3784 ac_cv_have_x="have_x=no"
3785 else
3786 # Record where we found X for the cache.
3787 ac_cv_have_x="have_x=yes \
3788 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
3792 eval "$ac_cv_have_x"
3793 fi # $with_x != no
3795 if test "$have_x" != yes; then
3796 echo "$ac_t""$have_x" 1>&6
3797 no_x=yes
3798 else
3799 # If each of the values was on the command line, it overrides each guess.
3800 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
3801 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
3802 # Update the cache value to reflect the command line values.
3803 ac_cv_have_x="have_x=yes \
3804 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
3805 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
3808 if test "$no_x" = yes; then
3809 window_system=none
3810 else
3811 window_system=x11
3814 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
3815 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
3816 LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"`
3817 x_default_search_path=""
3818 for x_library in `echo ${x_libraries} | sed -e "s/:/ /g"`; do
3819 x_search_path="\
3820 ${x_library}/X11/%L/%T/%N%C%S:\
3821 ${x_library}/X11/%l/%T/%N%C%S:\
3822 ${x_library}/X11/%T/%N%C%S:\
3823 ${x_library}/X11/%L/%T/%N%S:\
3824 ${x_library}/X11/%l/%T/%N%S:\
3825 ${x_library}/X11/%T/%N%S"
3826 if test x"${x_default_search_path}" = x; then
3827 x_default_search_path=${x_search_path}
3828 else
3829 x_default_search_path="${x_search_path}:${x_default_search_path}"
3831 done
3833 if test "${x_includes}" != NONE && test -n "${x_includes}"; then
3834 C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"`
3837 if test x"${x_includes}" = x; then
3838 bitmapdir=/usr/include/X11/bitmaps
3839 else
3840 # accumulate include directories that have X11 bitmap subdirectories
3841 bmd_acc="dummyval"
3842 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
3843 if test -d "${bmd}/X11/bitmaps"; then
3844 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
3846 if test -d "${bmd}/bitmaps"; then
3847 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
3849 done
3850 if test ${bmd_acc} != "dummyval"; then
3851 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
3855 case "${window_system}" in
3856 x11 )
3857 HAVE_X_WINDOWS=yes
3858 HAVE_X11=yes
3859 case "${with_x_toolkit}" in
3860 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
3861 motif ) USE_X_TOOLKIT=MOTIF ;;
3862 no ) USE_X_TOOLKIT=none ;;
3863 * ) USE_X_TOOLKIT=maybe ;;
3864 esac
3866 none )
3867 HAVE_X_WINDOWS=no
3868 HAVE_X11=no
3869 USE_X_TOOLKIT=none
3871 esac
3873 ### If we're using X11, we should use the X menu package.
3874 HAVE_MENUS=no
3875 case ${HAVE_X11} in
3876 yes ) HAVE_MENUS=yes ;;
3877 esac
3879 if test "${opsys}" = "hpux9"; then
3880 case "${x_libraries}" in
3881 *X11R4* )
3882 opsysfile="s/hpux9-x11r4.h"
3884 esac
3887 if test "${opsys}" = "hpux9shr"; then
3888 case "${x_libraries}" in
3889 *X11R4* )
3890 opsysfile="s/hpux9shxr4.h"
3892 esac
3895 ### Compute the unexec source name from the object name.
3896 UNEXEC_SRC="`echo ${unexec} | sed 's/\.o/.c/'`"
3898 # Do the opsystem or machine files prohibit the use of the GNU malloc?
3899 # Assume not, until told otherwise.
3900 GNU_MALLOC=yes
3901 doug_lea_malloc=yes
3902 echo $ac_n "checking for malloc_get_state""... $ac_c" 1>&6
3903 echo "configure:3904: checking for malloc_get_state" >&5
3904 if eval "test \"`echo '$''{'ac_cv_func_malloc_get_state'+set}'`\" = set"; then
3905 echo $ac_n "(cached) $ac_c" 1>&6
3906 else
3907 cat > conftest.$ac_ext <<EOF
3908 #line 3909 "configure"
3909 #include "confdefs.h"
3910 /* System header to define __stub macros and hopefully few prototypes,
3911 which can conflict with char malloc_get_state(); below. */
3912 #include <assert.h>
3913 /* Override any gcc2 internal prototype to avoid an error. */
3914 /* We use char because int might match the return type of a gcc2
3915 builtin and then its argument prototype would still apply. */
3916 char malloc_get_state();
3918 int main() {
3920 /* The GNU C library defines this for functions which it implements
3921 to always fail with ENOSYS. Some functions are actually named
3922 something starting with __ and the normal name is an alias. */
3923 #if defined (__stub_malloc_get_state) || defined (__stub___malloc_get_state)
3924 choke me
3925 #else
3926 malloc_get_state();
3927 #endif
3929 ; return 0; }
3931 if { (eval echo configure:3932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3932 rm -rf conftest*
3933 eval "ac_cv_func_malloc_get_state=yes"
3934 else
3935 echo "configure: failed program was:" >&5
3936 cat conftest.$ac_ext >&5
3937 rm -rf conftest*
3938 eval "ac_cv_func_malloc_get_state=no"
3940 rm -f conftest*
3943 if eval "test \"`echo '$ac_cv_func_'malloc_get_state`\" = yes"; then
3944 echo "$ac_t""yes" 1>&6
3946 else
3947 echo "$ac_t""no" 1>&6
3948 doug_lea_malloc=no
3951 echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6
3952 echo "configure:3953: checking for malloc_set_state" >&5
3953 if eval "test \"`echo '$''{'ac_cv_func_malloc_set_state'+set}'`\" = set"; then
3954 echo $ac_n "(cached) $ac_c" 1>&6
3955 else
3956 cat > conftest.$ac_ext <<EOF
3957 #line 3958 "configure"
3958 #include "confdefs.h"
3959 /* System header to define __stub macros and hopefully few prototypes,
3960 which can conflict with char malloc_set_state(); below. */
3961 #include <assert.h>
3962 /* Override any gcc2 internal prototype to avoid an error. */
3963 /* We use char because int might match the return type of a gcc2
3964 builtin and then its argument prototype would still apply. */
3965 char malloc_set_state();
3967 int main() {
3969 /* The GNU C library defines this for functions which it implements
3970 to always fail with ENOSYS. Some functions are actually named
3971 something starting with __ and the normal name is an alias. */
3972 #if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
3973 choke me
3974 #else
3975 malloc_set_state();
3976 #endif
3978 ; return 0; }
3980 if { (eval echo configure:3981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3981 rm -rf conftest*
3982 eval "ac_cv_func_malloc_set_state=yes"
3983 else
3984 echo "configure: failed program was:" >&5
3985 cat conftest.$ac_ext >&5
3986 rm -rf conftest*
3987 eval "ac_cv_func_malloc_set_state=no"
3989 rm -f conftest*
3992 if eval "test \"`echo '$ac_cv_func_'malloc_set_state`\" = yes"; then
3993 echo "$ac_t""yes" 1>&6
3995 else
3996 echo "$ac_t""no" 1>&6
3997 doug_lea_malloc=no
4000 echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6
4001 echo "configure:4002: checking whether __after_morecore_hook exists" >&5
4002 if eval "test \"`echo '$''{'emacs_cv_var___after_morecore_hook'+set}'`\" = set"; then
4003 echo $ac_n "(cached) $ac_c" 1>&6
4004 else
4005 cat > conftest.$ac_ext <<EOF
4006 #line 4007 "configure"
4007 #include "confdefs.h"
4008 extern void (* __after_morecore_hook)();
4009 int main() {
4010 __after_morecore_hook = 0
4011 ; return 0; }
4013 if { (eval echo configure:4014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4014 rm -rf conftest*
4015 emacs_cv_var___after_morecore_hook=yes
4016 else
4017 echo "configure: failed program was:" >&5
4018 cat conftest.$ac_ext >&5
4019 rm -rf conftest*
4020 emacs_cv_var___after_morecore_hook=no
4022 rm -f conftest*
4025 echo "$ac_t""$emacs_cv_var___after_morecore_hook" 1>&6
4026 if test $emacs_cv_var___after_morecore_hook = no; then
4027 doug_lea_malloc=no
4029 if test "${system_malloc}" = "yes"; then
4030 GNU_MALLOC=no
4031 GNU_MALLOC_reason="
4032 (The GNU allocators don't work with this system configuration.)"
4034 if test "$doug_lea_malloc" = "yes" ; then
4035 if test "$GNU_MALLOC" = yes ; then
4036 GNU_MALLOC_reason="
4037 (Using Doug Lea's new malloc from the GNU C Library.)"
4039 cat >> confdefs.h <<\EOF
4040 #define DOUG_LEA_MALLOC 1
4045 if test x"${REL_ALLOC}" = x; then
4046 REL_ALLOC=${GNU_MALLOC}
4050 for ac_hdr in stdlib.h unistd.h sys/stat.h
4052 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4053 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4054 echo "configure:4055: checking for $ac_hdr" >&5
4055 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4056 echo $ac_n "(cached) $ac_c" 1>&6
4057 else
4058 cat > conftest.$ac_ext <<EOF
4059 #line 4060 "configure"
4060 #include "confdefs.h"
4061 #include <$ac_hdr>
4063 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4064 { (eval echo configure:4065: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4065 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4066 if test -z "$ac_err"; then
4067 rm -rf conftest*
4068 eval "ac_cv_header_$ac_safe=yes"
4069 else
4070 echo "$ac_err" >&5
4071 echo "configure: failed program was:" >&5
4072 cat conftest.$ac_ext >&5
4073 rm -rf conftest*
4074 eval "ac_cv_header_$ac_safe=no"
4076 rm -f conftest*
4078 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4079 echo "$ac_t""yes" 1>&6
4080 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4081 cat >> confdefs.h <<EOF
4082 #define $ac_tr_hdr 1
4085 else
4086 echo "$ac_t""no" 1>&6
4088 done
4090 for ac_func in getpagesize
4092 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4093 echo "configure:4094: checking for $ac_func" >&5
4094 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4095 echo $ac_n "(cached) $ac_c" 1>&6
4096 else
4097 cat > conftest.$ac_ext <<EOF
4098 #line 4099 "configure"
4099 #include "confdefs.h"
4100 /* System header to define __stub macros and hopefully few prototypes,
4101 which can conflict with char $ac_func(); below. */
4102 #include <assert.h>
4103 /* Override any gcc2 internal prototype to avoid an error. */
4104 /* We use char because int might match the return type of a gcc2
4105 builtin and then its argument prototype would still apply. */
4106 char $ac_func();
4108 int main() {
4110 /* The GNU C library defines this for functions which it implements
4111 to always fail with ENOSYS. Some functions are actually named
4112 something starting with __ and the normal name is an alias. */
4113 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4114 choke me
4115 #else
4116 $ac_func();
4117 #endif
4119 ; return 0; }
4121 if { (eval echo configure:4122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4122 rm -rf conftest*
4123 eval "ac_cv_func_$ac_func=yes"
4124 else
4125 echo "configure: failed program was:" >&5
4126 cat conftest.$ac_ext >&5
4127 rm -rf conftest*
4128 eval "ac_cv_func_$ac_func=no"
4130 rm -f conftest*
4133 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4134 echo "$ac_t""yes" 1>&6
4135 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4136 cat >> confdefs.h <<EOF
4137 #define $ac_tr_func 1
4140 else
4141 echo "$ac_t""no" 1>&6
4143 done
4145 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
4146 echo "configure:4147: checking for working mmap" >&5
4147 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
4148 echo $ac_n "(cached) $ac_c" 1>&6
4149 else
4150 if test "$cross_compiling" = yes; then
4151 ac_cv_func_mmap_fixed_mapped=no
4152 else
4153 cat > conftest.$ac_ext <<EOF
4154 #line 4155 "configure"
4155 #include "confdefs.h"
4156 /* Thanks to Mike Haertel and Jim Avera for this test.
4157 Here is a matrix of mmap possibilities:
4158 mmap private not fixed
4159 mmap private fixed at somewhere currently unmapped
4160 mmap private fixed at somewhere already mapped
4161 mmap shared not fixed
4162 mmap shared fixed at somewhere currently unmapped
4163 mmap shared fixed at somewhere already mapped
4164 For private mappings, we should verify that changes cannot be read()
4165 back from the file, nor mmap's back from the file at a different
4166 address. (There have been systems where private was not correctly
4167 implemented like the infamous i386 svr4.0, and systems where the
4168 VM page cache was not coherent with the file system buffer cache
4169 like early versions of FreeBSD and possibly contemporary NetBSD.)
4170 For shared mappings, we should conversely verify that changes get
4171 propogated back to all the places they're supposed to be.
4173 Grep wants private fixed already mapped.
4174 The main things grep needs to know about mmap are:
4175 * does it exist and is it safe to write into the mmap'd area
4176 * how to use it (BSD variants) */
4177 #include <sys/types.h>
4178 #include <fcntl.h>
4179 #include <sys/mman.h>
4181 #if STDC_HEADERS || HAVE_STDLIB_H
4182 # include <stdlib.h>
4183 #else
4184 char *malloc ();
4185 #endif
4186 #if HAVE_UNISTD_H
4187 # include <unistd.h>
4188 #endif
4189 #if HAVE_SYS_STAT_H
4190 # include <sys/stat.h>
4191 #endif
4193 /* This mess was copied from the GNU getpagesize.h. */
4194 #if !HAVE_GETPAGESIZE
4195 /* Assume that all systems that can run configure have sys/param.h. */
4196 # if !HAVE_SYS_PARAM_H
4197 # define HAVE_SYS_PARAM_H 1
4198 # endif
4200 # ifdef _SC_PAGESIZE
4201 # define getpagesize() sysconf(_SC_PAGESIZE)
4202 # else /* no _SC_PAGESIZE */
4203 # if HAVE_SYS_PARAM_H
4204 # include <sys/param.h>
4205 # ifdef EXEC_PAGESIZE
4206 # define getpagesize() EXEC_PAGESIZE
4207 # else /* no EXEC_PAGESIZE */
4208 # ifdef NBPG
4209 # define getpagesize() NBPG * CLSIZE
4210 # ifndef CLSIZE
4211 # define CLSIZE 1
4212 # endif /* no CLSIZE */
4213 # else /* no NBPG */
4214 # ifdef NBPC
4215 # define getpagesize() NBPC
4216 # else /* no NBPC */
4217 # ifdef PAGESIZE
4218 # define getpagesize() PAGESIZE
4219 # endif /* PAGESIZE */
4220 # endif /* no NBPC */
4221 # endif /* no NBPG */
4222 # endif /* no EXEC_PAGESIZE */
4223 # else /* no HAVE_SYS_PARAM_H */
4224 # define getpagesize() 8192 /* punt totally */
4225 # endif /* no HAVE_SYS_PARAM_H */
4226 # endif /* no _SC_PAGESIZE */
4228 #endif /* no HAVE_GETPAGESIZE */
4231 main ()
4233 char *data, *data2, *data3;
4234 int i, pagesize;
4235 int fd;
4237 pagesize = getpagesize ();
4239 /* First, make a file with some known garbage in it. */
4240 data = (char *) malloc (pagesize);
4241 if (!data)
4242 exit (1);
4243 for (i = 0; i < pagesize; ++i)
4244 *(data + i) = rand ();
4245 umask (0);
4246 fd = creat ("conftestmmap", 0600);
4247 if (fd < 0)
4248 exit (1);
4249 if (write (fd, data, pagesize) != pagesize)
4250 exit (1);
4251 close (fd);
4253 /* Next, try to mmap the file at a fixed address which already has
4254 something else allocated at it. If we can, also make sure that
4255 we see the same garbage. */
4256 fd = open ("conftestmmap", O_RDWR);
4257 if (fd < 0)
4258 exit (1);
4259 data2 = (char *) malloc (2 * pagesize);
4260 if (!data2)
4261 exit (1);
4262 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
4263 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
4264 MAP_PRIVATE | MAP_FIXED, fd, 0L))
4265 exit (1);
4266 for (i = 0; i < pagesize; ++i)
4267 if (*(data + i) != *(data2 + i))
4268 exit (1);
4270 /* Finally, make sure that changes to the mapped area do not
4271 percolate back to the file as seen by read(). (This is a bug on
4272 some variants of i386 svr4.0.) */
4273 for (i = 0; i < pagesize; ++i)
4274 *(data2 + i) = *(data2 + i) + 1;
4275 data3 = (char *) malloc (pagesize);
4276 if (!data3)
4277 exit (1);
4278 if (read (fd, data3, pagesize) != pagesize)
4279 exit (1);
4280 for (i = 0; i < pagesize; ++i)
4281 if (*(data + i) != *(data3 + i))
4282 exit (1);
4283 close (fd);
4284 unlink ("conftestmmap");
4285 exit (0);
4288 if { (eval echo configure:4289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4289 then
4290 ac_cv_func_mmap_fixed_mapped=yes
4291 else
4292 echo "configure: failed program was:" >&5
4293 cat conftest.$ac_ext >&5
4294 rm -fr conftest*
4295 ac_cv_func_mmap_fixed_mapped=no
4297 rm -fr conftest*
4302 echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
4303 if test $ac_cv_func_mmap_fixed_mapped = yes; then
4304 cat >> confdefs.h <<\EOF
4305 #define HAVE_MMAP 1
4310 if test $use_mmap_for_buffers = yes; then
4311 REL_ALLOC=no
4314 LIBS="$libsrc_libs $LIBS"
4316 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
4317 echo "configure:4318: checking for dnet_ntoa in -ldnet" >&5
4318 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
4319 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4320 echo $ac_n "(cached) $ac_c" 1>&6
4321 else
4322 ac_save_LIBS="$LIBS"
4323 LIBS="-ldnet $LIBS"
4324 cat > conftest.$ac_ext <<EOF
4325 #line 4326 "configure"
4326 #include "confdefs.h"
4327 /* Override any gcc2 internal prototype to avoid an error. */
4328 /* We use char because int might match the return type of a gcc2
4329 builtin and then its argument prototype would still apply. */
4330 char dnet_ntoa();
4332 int main() {
4333 dnet_ntoa()
4334 ; return 0; }
4336 if { (eval echo configure:4337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4337 rm -rf conftest*
4338 eval "ac_cv_lib_$ac_lib_var=yes"
4339 else
4340 echo "configure: failed program was:" >&5
4341 cat conftest.$ac_ext >&5
4342 rm -rf conftest*
4343 eval "ac_cv_lib_$ac_lib_var=no"
4345 rm -f conftest*
4346 LIBS="$ac_save_LIBS"
4349 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4350 echo "$ac_t""yes" 1>&6
4351 ac_tr_lib=HAVE_LIB`echo dnet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4352 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4353 cat >> confdefs.h <<EOF
4354 #define $ac_tr_lib 1
4357 LIBS="-ldnet $LIBS"
4359 else
4360 echo "$ac_t""no" 1>&6
4364 echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
4365 echo "configure:4366: checking for main in -lXbsd" >&5
4366 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
4367 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4368 echo $ac_n "(cached) $ac_c" 1>&6
4369 else
4370 ac_save_LIBS="$LIBS"
4371 LIBS="-lXbsd $LIBS"
4372 cat > conftest.$ac_ext <<EOF
4373 #line 4374 "configure"
4374 #include "confdefs.h"
4376 int main() {
4377 main()
4378 ; return 0; }
4380 if { (eval echo configure:4381: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4381 rm -rf conftest*
4382 eval "ac_cv_lib_$ac_lib_var=yes"
4383 else
4384 echo "configure: failed program was:" >&5
4385 cat conftest.$ac_ext >&5
4386 rm -rf conftest*
4387 eval "ac_cv_lib_$ac_lib_var=no"
4389 rm -f conftest*
4390 LIBS="$ac_save_LIBS"
4393 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4394 echo "$ac_t""yes" 1>&6
4395 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
4396 else
4397 echo "$ac_t""no" 1>&6
4401 echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6
4402 echo "configure:4403: checking for cma_open in -lpthreads" >&5
4403 ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'`
4404 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4405 echo $ac_n "(cached) $ac_c" 1>&6
4406 else
4407 ac_save_LIBS="$LIBS"
4408 LIBS="-lpthreads $LIBS"
4409 cat > conftest.$ac_ext <<EOF
4410 #line 4411 "configure"
4411 #include "confdefs.h"
4412 /* Override any gcc2 internal prototype to avoid an error. */
4413 /* We use char because int might match the return type of a gcc2
4414 builtin and then its argument prototype would still apply. */
4415 char cma_open();
4417 int main() {
4418 cma_open()
4419 ; return 0; }
4421 if { (eval echo configure:4422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4422 rm -rf conftest*
4423 eval "ac_cv_lib_$ac_lib_var=yes"
4424 else
4425 echo "configure: failed program was:" >&5
4426 cat conftest.$ac_ext >&5
4427 rm -rf conftest*
4428 eval "ac_cv_lib_$ac_lib_var=no"
4430 rm -f conftest*
4431 LIBS="$ac_save_LIBS"
4434 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4435 echo "$ac_t""yes" 1>&6
4436 ac_tr_lib=HAVE_LIB`echo pthreads | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4437 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4438 cat >> confdefs.h <<EOF
4439 #define $ac_tr_lib 1
4442 LIBS="-lpthreads $LIBS"
4444 else
4445 echo "$ac_t""no" 1>&6
4449 echo $ac_n "checking for XFree86 in /usr/X386""... $ac_c" 1>&6
4450 echo "configure:4451: checking for XFree86 in /usr/X386" >&5
4451 if test -d /usr/X386/include; then
4452 HAVE_XFREE386=yes
4453 : ${C_SWITCH_X_SITE="-I/usr/X386/include"}
4454 else
4455 HAVE_XFREE386=no
4457 echo "$ac_t""$HAVE_XFREE386" 1>&6
4459 # Change CFLAGS temporarily so that C_SWITCH_X_SITE gets used
4460 # for the tests that follow. We set it back to REAL_CFLAGS later on.
4462 REAL_CPPFLAGS="$CPPFLAGS"
4464 if test "${HAVE_X11}" = "yes"; then
4465 DEFS="$C_SWITCH_X_SITE $DEFS"
4466 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
4467 LIBS="$LIBX $LIBS"
4468 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
4469 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
4471 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
4472 # This is handled by LD_SWITCH_X_SITE_AUX during the real build,
4473 # but it's more convenient here to set LD_RUN_PATH
4474 # since this also works on hosts that don't understand LD_SWITCH_X_SITE_AUX.
4475 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
4476 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
4477 export LD_RUN_PATH
4480 if test "${opsys}" = "gnu-linux"; then
4481 echo $ac_n "checking whether X on GNU/Linux needs -b to link""... $ac_c" 1>&6
4482 echo "configure:4483: checking whether X on GNU/Linux needs -b to link" >&5
4483 cat > conftest.$ac_ext <<EOF
4484 #line 4485 "configure"
4485 #include "confdefs.h"
4487 int main() {
4488 XOpenDisplay ("foo");
4489 ; return 0; }
4491 if { (eval echo configure:4492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4492 rm -rf conftest*
4493 xlinux_first_failure=no
4494 else
4495 echo "configure: failed program was:" >&5
4496 cat conftest.$ac_ext >&5
4497 rm -rf conftest*
4498 xlinux_first_failure=yes
4500 rm -f conftest*
4501 if test "${xlinux_first_failure}" = "yes"; then
4502 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
4503 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
4504 OLD_CPPFLAGS="$CPPFLAGS"
4505 OLD_LIBS="$LIBS"
4506 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
4507 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
4508 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
4509 LIBS="$LIBS -b i486-linuxaout"
4510 cat > conftest.$ac_ext <<EOF
4511 #line 4512 "configure"
4512 #include "confdefs.h"
4514 int main() {
4515 XOpenDisplay ("foo");
4516 ; return 0; }
4518 if { (eval echo configure:4519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4519 rm -rf conftest*
4520 xlinux_second_failure=no
4521 else
4522 echo "configure: failed program was:" >&5
4523 cat conftest.$ac_ext >&5
4524 rm -rf conftest*
4525 xlinux_second_failure=yes
4527 rm -f conftest*
4528 if test "${xlinux_second_failure}" = "yes"; then
4529 # If we get the same failure with -b, there is no use adding -b.
4530 # So take it out. This plays safe.
4531 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
4532 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
4533 CPPFLAGS="$OLD_CPPFLAGS"
4534 LIBS="$OLD_LIBS"
4535 echo "$ac_t""no" 1>&6
4536 else
4537 echo "$ac_t""yes" 1>&6
4539 else
4540 echo "$ac_t""no" 1>&6
4544 # Reportedly, some broken Solaris systems have XKBlib.h but are missing
4545 # header files included from there.
4546 echo $ac_n "checking for Xkb""... $ac_c" 1>&6
4547 echo "configure:4548: checking for Xkb" >&5
4548 cat > conftest.$ac_ext <<EOF
4549 #line 4550 "configure"
4550 #include "confdefs.h"
4551 #include <X11/Xlib.h>
4552 #include <X11/XKBlib.h>
4553 int main() {
4554 XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);
4555 ; return 0; }
4557 if { (eval echo configure:4558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4558 rm -rf conftest*
4559 emacs_xkb=yes
4560 else
4561 echo "configure: failed program was:" >&5
4562 cat conftest.$ac_ext >&5
4563 rm -rf conftest*
4564 emacs_xkb=no
4566 rm -f conftest*
4567 echo "$ac_t""$emacs_xkb" 1>&6
4568 if test $emacs_xkb = yes; then
4569 cat >> confdefs.h <<\EOF
4570 #define HAVE_XKBGETKEYBOARD 1
4575 for ac_func in XrmSetDatabase XScreenResourceString \
4576 XScreenNumberOfScreen XSetWMProtocols
4578 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4579 echo "configure:4580: checking for $ac_func" >&5
4580 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4581 echo $ac_n "(cached) $ac_c" 1>&6
4582 else
4583 cat > conftest.$ac_ext <<EOF
4584 #line 4585 "configure"
4585 #include "confdefs.h"
4586 /* System header to define __stub macros and hopefully few prototypes,
4587 which can conflict with char $ac_func(); below. */
4588 #include <assert.h>
4589 /* Override any gcc2 internal prototype to avoid an error. */
4590 /* We use char because int might match the return type of a gcc2
4591 builtin and then its argument prototype would still apply. */
4592 char $ac_func();
4594 int main() {
4596 /* The GNU C library defines this for functions which it implements
4597 to always fail with ENOSYS. Some functions are actually named
4598 something starting with __ and the normal name is an alias. */
4599 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4600 choke me
4601 #else
4602 $ac_func();
4603 #endif
4605 ; return 0; }
4607 if { (eval echo configure:4608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4608 rm -rf conftest*
4609 eval "ac_cv_func_$ac_func=yes"
4610 else
4611 echo "configure: failed program was:" >&5
4612 cat conftest.$ac_ext >&5
4613 rm -rf conftest*
4614 eval "ac_cv_func_$ac_func=no"
4616 rm -f conftest*
4619 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4620 echo "$ac_t""yes" 1>&6
4621 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4622 cat >> confdefs.h <<EOF
4623 #define $ac_tr_func 1
4626 else
4627 echo "$ac_t""no" 1>&6
4629 done
4633 if test "${window_system}" = "x11"; then
4634 echo $ac_n "checking X11 version 6""... $ac_c" 1>&6
4635 echo "configure:4636: checking X11 version 6" >&5
4636 if eval "test \"`echo '$''{'emacs_cv_x11_version_6'+set}'`\" = set"; then
4637 echo $ac_n "(cached) $ac_c" 1>&6
4638 else
4639 cat > conftest.$ac_ext <<EOF
4640 #line 4641 "configure"
4641 #include "confdefs.h"
4642 #include <X11/Xlib.h>
4643 int main() {
4644 #if XlibSpecificationRelease < 6
4645 fail;
4646 #endif
4648 ; return 0; }
4650 if { (eval echo configure:4651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4651 rm -rf conftest*
4652 emacs_cv_x11_version_6=yes
4653 else
4654 echo "configure: failed program was:" >&5
4655 cat conftest.$ac_ext >&5
4656 rm -rf conftest*
4657 emacs_cv_x11_version_6=no
4659 rm -f conftest*
4662 if test $emacs_cv_x11_version_6 = yes; then
4663 echo "$ac_t""6 or newer" 1>&6
4664 cat >> confdefs.h <<\EOF
4665 #define HAVE_X11R6 1
4668 else
4669 echo "$ac_t""before 6" 1>&6
4673 if test "${window_system}" = "x11"; then
4674 echo $ac_n "checking X11 version 5""... $ac_c" 1>&6
4675 echo "configure:4676: checking X11 version 5" >&5
4676 if eval "test \"`echo '$''{'emacs_cv_x11_version_5'+set}'`\" = set"; then
4677 echo $ac_n "(cached) $ac_c" 1>&6
4678 else
4679 cat > conftest.$ac_ext <<EOF
4680 #line 4681 "configure"
4681 #include "confdefs.h"
4682 #include <X11/Xlib.h>
4683 int main() {
4684 #if XlibSpecificationRelease < 5
4685 fail;
4686 #endif
4688 ; return 0; }
4690 if { (eval echo configure:4691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4691 rm -rf conftest*
4692 emacs_cv_x11_version_5=yes
4693 else
4694 echo "configure: failed program was:" >&5
4695 cat conftest.$ac_ext >&5
4696 rm -rf conftest*
4697 emacs_cv_x11_version_5=no
4699 rm -f conftest*
4702 if test $emacs_cv_x11_version_5 = yes; then
4703 echo "$ac_t""5 or newer" 1>&6
4704 HAVE_X11R5=yes
4705 cat >> confdefs.h <<\EOF
4706 #define HAVE_X11R5 1
4709 else
4710 HAVE_X11R5=no
4711 echo "$ac_t""before 5" 1>&6
4715 if test x"${USE_X_TOOLKIT}" = xmaybe; then
4716 if test x"${HAVE_X11R5}" = xyes; then
4717 echo $ac_n "checking X11 version 5 with Xaw""... $ac_c" 1>&6
4718 echo "configure:4719: checking X11 version 5 with Xaw" >&5
4719 if eval "test \"`echo '$''{'emacs_cv_x11_version_5_with_xaw'+set}'`\" = set"; then
4720 echo $ac_n "(cached) $ac_c" 1>&6
4721 else
4722 cat > conftest.$ac_ext <<EOF
4723 #line 4724 "configure"
4724 #include "confdefs.h"
4726 #include <X11/Intrinsic.h>
4727 #include <X11/Xaw/Simple.h>
4728 int main() {
4730 ; return 0; }
4732 if { (eval echo configure:4733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4733 rm -rf conftest*
4734 emacs_cv_x11_version_5_with_xaw=yes
4735 else
4736 echo "configure: failed program was:" >&5
4737 cat conftest.$ac_ext >&5
4738 rm -rf conftest*
4739 emacs_cv_x11_version_5_with_xaw=no
4741 rm -f conftest*
4744 if test $emacs_cv_x11_version_5_with_xaw = yes; then
4745 echo "$ac_t""5 or newer, with Xaw; use toolkit by default" 1>&6
4746 USE_X_TOOLKIT=LUCID
4747 else
4748 echo "$ac_t""before 5 or no Xaw; do not use toolkit by default" 1>&6
4749 USE_X_TOOLKIT=none
4751 else
4752 USE_X_TOOLKIT=none
4756 X_TOOLKIT_TYPE=$USE_X_TOOLKIT
4758 if test "${USE_X_TOOLKIT}" != "none"; then
4759 echo $ac_n "checking X11 toolkit version""... $ac_c" 1>&6
4760 echo "configure:4761: checking X11 toolkit version" >&5
4761 if eval "test \"`echo '$''{'emacs_cv_x11_toolkit_version_6'+set}'`\" = set"; then
4762 echo $ac_n "(cached) $ac_c" 1>&6
4763 else
4764 cat > conftest.$ac_ext <<EOF
4765 #line 4766 "configure"
4766 #include "confdefs.h"
4767 #include <X11/Intrinsic.h>
4768 int main() {
4769 #if XtSpecificationRelease < 6
4770 fail;
4771 #endif
4773 ; return 0; }
4775 if { (eval echo configure:4776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4776 rm -rf conftest*
4777 emacs_cv_x11_toolkit_version_6=yes
4778 else
4779 echo "configure: failed program was:" >&5
4780 cat conftest.$ac_ext >&5
4781 rm -rf conftest*
4782 emacs_cv_x11_toolkit_version_6=no
4784 rm -f conftest*
4787 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
4788 if test $emacs_cv_x11_toolkit_version_6 = yes; then
4789 echo "$ac_t""6 or newer" 1>&6
4790 cat >> confdefs.h <<\EOF
4791 #define HAVE_X11XTR6 1
4794 else
4795 echo "$ac_t""before 6" 1>&6
4798 OLDLIBS="$LIBS"
4799 if test x$HAVE_X11XTR6 = xyes; then
4800 LIBS="-lXt -lSM -lICE $LIBS"
4801 else
4802 LIBS="-lXt $LIBS"
4804 echo $ac_n "checking for XmuConvertStandardSelection in -lXmu""... $ac_c" 1>&6
4805 echo "configure:4806: checking for XmuConvertStandardSelection in -lXmu" >&5
4806 ac_lib_var=`echo Xmu'_'XmuConvertStandardSelection | sed 'y%./+-%__p_%'`
4807 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4808 echo $ac_n "(cached) $ac_c" 1>&6
4809 else
4810 ac_save_LIBS="$LIBS"
4811 LIBS="-lXmu $LIBS"
4812 cat > conftest.$ac_ext <<EOF
4813 #line 4814 "configure"
4814 #include "confdefs.h"
4815 /* Override any gcc2 internal prototype to avoid an error. */
4816 /* We use char because int might match the return type of a gcc2
4817 builtin and then its argument prototype would still apply. */
4818 char XmuConvertStandardSelection();
4820 int main() {
4821 XmuConvertStandardSelection()
4822 ; return 0; }
4824 if { (eval echo configure:4825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4825 rm -rf conftest*
4826 eval "ac_cv_lib_$ac_lib_var=yes"
4827 else
4828 echo "configure: failed program was:" >&5
4829 cat conftest.$ac_ext >&5
4830 rm -rf conftest*
4831 eval "ac_cv_lib_$ac_lib_var=no"
4833 rm -f conftest*
4834 LIBS="$ac_save_LIBS"
4837 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4838 echo "$ac_t""yes" 1>&6
4839 ac_tr_lib=HAVE_LIB`echo Xmu | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4840 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4841 cat >> confdefs.h <<EOF
4842 #define $ac_tr_lib 1
4845 LIBS="-lXmu $LIBS"
4847 else
4848 echo "$ac_t""no" 1>&6
4851 test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS"
4854 # On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D.
4855 if test "${HAVE_X11}" = "yes"; then
4856 if test "${USE_X_TOOLKIT}" != "none"; then
4857 echo $ac_n "checking for XShapeQueryExtension in -lXext""... $ac_c" 1>&6
4858 echo "configure:4859: checking for XShapeQueryExtension in -lXext" >&5
4859 ac_lib_var=`echo Xext'_'XShapeQueryExtension | sed 'y%./+-%__p_%'`
4860 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4861 echo $ac_n "(cached) $ac_c" 1>&6
4862 else
4863 ac_save_LIBS="$LIBS"
4864 LIBS="-lXext $LIBS"
4865 cat > conftest.$ac_ext <<EOF
4866 #line 4867 "configure"
4867 #include "confdefs.h"
4868 /* Override any gcc2 internal prototype to avoid an error. */
4869 /* We use char because int might match the return type of a gcc2
4870 builtin and then its argument prototype would still apply. */
4871 char XShapeQueryExtension();
4873 int main() {
4874 XShapeQueryExtension()
4875 ; return 0; }
4877 if { (eval echo configure:4878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4878 rm -rf conftest*
4879 eval "ac_cv_lib_$ac_lib_var=yes"
4880 else
4881 echo "configure: failed program was:" >&5
4882 cat conftest.$ac_ext >&5
4883 rm -rf conftest*
4884 eval "ac_cv_lib_$ac_lib_var=no"
4886 rm -f conftest*
4887 LIBS="$ac_save_LIBS"
4890 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4891 echo "$ac_t""yes" 1>&6
4892 ac_tr_lib=HAVE_LIB`echo Xext | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4893 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4894 cat >> confdefs.h <<EOF
4895 #define $ac_tr_lib 1
4898 LIBS="-lXext $LIBS"
4900 else
4901 echo "$ac_t""no" 1>&6
4907 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
4908 echo $ac_n "checking for Motif version 2.1""... $ac_c" 1>&6
4909 echo "configure:4910: checking for Motif version 2.1" >&5
4910 if eval "test \"`echo '$''{'emacs_cv_motif_version_2_1'+set}'`\" = set"; then
4911 echo $ac_n "(cached) $ac_c" 1>&6
4912 else
4913 cat > conftest.$ac_ext <<EOF
4914 #line 4915 "configure"
4915 #include "confdefs.h"
4916 #include <Xm/Xm.h>
4917 int main() {
4918 #if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
4919 int x = 5;
4920 #else
4921 Motif version prior to 2.1.
4922 #endif
4923 ; return 0; }
4925 if { (eval echo configure:4926: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4926 rm -rf conftest*
4927 emacs_cv_motif_version_2_1=yes
4928 else
4929 echo "configure: failed program was:" >&5
4930 cat conftest.$ac_ext >&5
4931 rm -rf conftest*
4932 emacs_cv_motif_version_2_1=no
4934 rm -f conftest*
4937 echo "$ac_t""$emacs_cv_motif_version_2_1" 1>&6
4938 HAVE_MOTIF_2_1=$emacs_cv_motif_version_2_1
4939 if test $emacs_cv_motif_version_2_1 = yes; then
4940 HAVE_LIBXP=no
4941 cat >> confdefs.h <<\EOF
4942 #define HAVE_MOTIF_2_1 1
4945 echo $ac_n "checking for XpCreateContext in -lXp""... $ac_c" 1>&6
4946 echo "configure:4947: checking for XpCreateContext in -lXp" >&5
4947 ac_lib_var=`echo Xp'_'XpCreateContext | sed 'y%./+-%__p_%'`
4948 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4949 echo $ac_n "(cached) $ac_c" 1>&6
4950 else
4951 ac_save_LIBS="$LIBS"
4952 LIBS="-lXp $LIBS"
4953 cat > conftest.$ac_ext <<EOF
4954 #line 4955 "configure"
4955 #include "confdefs.h"
4956 /* Override any gcc2 internal prototype to avoid an error. */
4957 /* We use char because int might match the return type of a gcc2
4958 builtin and then its argument prototype would still apply. */
4959 char XpCreateContext();
4961 int main() {
4962 XpCreateContext()
4963 ; return 0; }
4965 if { (eval echo configure:4966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4966 rm -rf conftest*
4967 eval "ac_cv_lib_$ac_lib_var=yes"
4968 else
4969 echo "configure: failed program was:" >&5
4970 cat conftest.$ac_ext >&5
4971 rm -rf conftest*
4972 eval "ac_cv_lib_$ac_lib_var=no"
4974 rm -f conftest*
4975 LIBS="$ac_save_LIBS"
4978 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4979 echo "$ac_t""yes" 1>&6
4980 HAVE_LIBXP=yes
4981 else
4982 echo "$ac_t""no" 1>&6
4985 if test ${HAVE_LIBXP} = yes; then
4986 cat >> confdefs.h <<\EOF
4987 #define HAVE_LIBXP 1
4994 ### Is -lXaw3d available?
4995 HAVE_XAW3D=no
4996 if test "${HAVE_X11}" = "yes"; then
4997 if test "${USE_X_TOOLKIT}" != "none"; then
4998 ac_safe=`echo "X11/Xaw3d/Scrollbar.h" | sed 'y%./+-%__p_%'`
4999 echo $ac_n "checking for X11/Xaw3d/Scrollbar.h""... $ac_c" 1>&6
5000 echo "configure:5001: checking for X11/Xaw3d/Scrollbar.h" >&5
5001 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5002 echo $ac_n "(cached) $ac_c" 1>&6
5003 else
5004 cat > conftest.$ac_ext <<EOF
5005 #line 5006 "configure"
5006 #include "confdefs.h"
5007 #include <X11/Xaw3d/Scrollbar.h>
5009 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5010 { (eval echo configure:5011: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5011 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5012 if test -z "$ac_err"; then
5013 rm -rf conftest*
5014 eval "ac_cv_header_$ac_safe=yes"
5015 else
5016 echo "$ac_err" >&5
5017 echo "configure: failed program was:" >&5
5018 cat conftest.$ac_ext >&5
5019 rm -rf conftest*
5020 eval "ac_cv_header_$ac_safe=no"
5022 rm -f conftest*
5024 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5025 echo "$ac_t""yes" 1>&6
5026 echo $ac_n "checking for XawScrollbarSetThumb in -lXaw3d""... $ac_c" 1>&6
5027 echo "configure:5028: checking for XawScrollbarSetThumb in -lXaw3d" >&5
5028 ac_lib_var=`echo Xaw3d'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'`
5029 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5030 echo $ac_n "(cached) $ac_c" 1>&6
5031 else
5032 ac_save_LIBS="$LIBS"
5033 LIBS="-lXaw3d $LIBS"
5034 cat > conftest.$ac_ext <<EOF
5035 #line 5036 "configure"
5036 #include "confdefs.h"
5037 /* Override any gcc2 internal prototype to avoid an error. */
5038 /* We use char because int might match the return type of a gcc2
5039 builtin and then its argument prototype would still apply. */
5040 char XawScrollbarSetThumb();
5042 int main() {
5043 XawScrollbarSetThumb()
5044 ; return 0; }
5046 if { (eval echo configure:5047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5047 rm -rf conftest*
5048 eval "ac_cv_lib_$ac_lib_var=yes"
5049 else
5050 echo "configure: failed program was:" >&5
5051 cat conftest.$ac_ext >&5
5052 rm -rf conftest*
5053 eval "ac_cv_lib_$ac_lib_var=no"
5055 rm -f conftest*
5056 LIBS="$ac_save_LIBS"
5059 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5060 echo "$ac_t""yes" 1>&6
5061 HAVE_XAW3D=yes
5062 else
5063 echo "$ac_t""no" 1>&6
5066 else
5067 echo "$ac_t""no" 1>&6
5070 if test "${HAVE_XAW3D}" = "yes"; then
5071 cat >> confdefs.h <<\EOF
5072 #define HAVE_XAW3D 1
5080 USE_TOOLKIT_SCROLL_BARS=no
5081 if test "${with_toolkit_scroll_bars}" != "no"; then
5082 if test "${USE_X_TOOLKIT}" != "none"; then
5083 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
5084 cat >> confdefs.h <<\EOF
5085 #define USE_TOOLKIT_SCROLL_BARS 1
5088 HAVE_XAW3D=no
5089 USE_TOOLKIT_SCROLL_BARS=yes
5090 elif test "${HAVE_XAW3D}" = "yes"; then
5091 cat >> confdefs.h <<\EOF
5092 #define USE_TOOLKIT_SCROLL_BARS 1
5095 USE_TOOLKIT_SCROLL_BARS=yes
5101 if test "${with_xim}" != "no"; then
5102 cat >> confdefs.h <<\EOF
5103 #define USE_XIM 1
5108 ### Use -lXpm if available, unless `--with-xpm=no'.
5109 HAVE_XPM=no
5110 if test "${HAVE_X11}" = "yes"; then
5111 if test "${with_xpm}" != "no"; then
5112 ac_safe=`echo "X11/xpm.h" | sed 'y%./+-%__p_%'`
5113 echo $ac_n "checking for X11/xpm.h""... $ac_c" 1>&6
5114 echo "configure:5115: checking for X11/xpm.h" >&5
5115 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5116 echo $ac_n "(cached) $ac_c" 1>&6
5117 else
5118 cat > conftest.$ac_ext <<EOF
5119 #line 5120 "configure"
5120 #include "confdefs.h"
5121 #include <X11/xpm.h>
5123 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5124 { (eval echo configure:5125: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5125 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5126 if test -z "$ac_err"; then
5127 rm -rf conftest*
5128 eval "ac_cv_header_$ac_safe=yes"
5129 else
5130 echo "$ac_err" >&5
5131 echo "configure: failed program was:" >&5
5132 cat conftest.$ac_ext >&5
5133 rm -rf conftest*
5134 eval "ac_cv_header_$ac_safe=no"
5136 rm -f conftest*
5138 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5139 echo "$ac_t""yes" 1>&6
5140 echo $ac_n "checking for XpmReadFileToPixmap in -lXpm""... $ac_c" 1>&6
5141 echo "configure:5142: checking for XpmReadFileToPixmap in -lXpm" >&5
5142 ac_lib_var=`echo Xpm'_'XpmReadFileToPixmap | sed 'y%./+-%__p_%'`
5143 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5144 echo $ac_n "(cached) $ac_c" 1>&6
5145 else
5146 ac_save_LIBS="$LIBS"
5147 LIBS="-lXpm -lX11 $LIBS"
5148 cat > conftest.$ac_ext <<EOF
5149 #line 5150 "configure"
5150 #include "confdefs.h"
5151 /* Override any gcc2 internal prototype to avoid an error. */
5152 /* We use char because int might match the return type of a gcc2
5153 builtin and then its argument prototype would still apply. */
5154 char XpmReadFileToPixmap();
5156 int main() {
5157 XpmReadFileToPixmap()
5158 ; return 0; }
5160 if { (eval echo configure:5161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5161 rm -rf conftest*
5162 eval "ac_cv_lib_$ac_lib_var=yes"
5163 else
5164 echo "configure: failed program was:" >&5
5165 cat conftest.$ac_ext >&5
5166 rm -rf conftest*
5167 eval "ac_cv_lib_$ac_lib_var=no"
5169 rm -f conftest*
5170 LIBS="$ac_save_LIBS"
5173 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5174 echo "$ac_t""yes" 1>&6
5175 HAVE_XPM=yes
5176 else
5177 echo "$ac_t""no" 1>&6
5180 else
5181 echo "$ac_t""no" 1>&6
5184 if test "${HAVE_XPM}" = "yes"; then
5185 echo $ac_n "checking for XpmReturnAllocPixels preprocessor define""... $ac_c" 1>&6
5186 echo "configure:5187: checking for XpmReturnAllocPixels preprocessor define" >&5
5187 cat > conftest.$ac_ext <<EOF
5188 #line 5189 "configure"
5189 #include "confdefs.h"
5190 #include "X11/xpm.h"
5191 #ifndef XpmReturnAllocPixels
5192 no_return_alloc_pixels
5193 #endif
5196 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5197 egrep "no_return_alloc_pixels" >/dev/null 2>&1; then
5198 rm -rf conftest*
5199 HAVE_XPM=no
5200 else
5201 rm -rf conftest*
5202 HAVE_XPM=yes
5204 rm -f conftest*
5207 if test "${HAVE_XPM}" = "yes"; then
5208 echo "$ac_t""yes" 1>&6
5209 else
5210 echo "$ac_t""no" 1>&6
5215 if test "${HAVE_XPM}" = "yes"; then
5216 cat >> confdefs.h <<\EOF
5217 #define HAVE_XPM 1
5223 ### Use -ljpeg if available, unless `--with-jpeg=no'.
5224 HAVE_JPEG=no
5225 if test "${HAVE_X11}" = "yes"; then
5226 if test "${with_jpeg}" != "no"; then
5227 ac_safe=`echo "jerror.h" | sed 'y%./+-%__p_%'`
5228 echo $ac_n "checking for jerror.h""... $ac_c" 1>&6
5229 echo "configure:5230: checking for jerror.h" >&5
5230 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5231 echo $ac_n "(cached) $ac_c" 1>&6
5232 else
5233 cat > conftest.$ac_ext <<EOF
5234 #line 5235 "configure"
5235 #include "confdefs.h"
5236 #include <jerror.h>
5238 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5239 { (eval echo configure:5240: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5240 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5241 if test -z "$ac_err"; then
5242 rm -rf conftest*
5243 eval "ac_cv_header_$ac_safe=yes"
5244 else
5245 echo "$ac_err" >&5
5246 echo "configure: failed program was:" >&5
5247 cat conftest.$ac_ext >&5
5248 rm -rf conftest*
5249 eval "ac_cv_header_$ac_safe=no"
5251 rm -f conftest*
5253 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5254 echo "$ac_t""yes" 1>&6
5255 echo $ac_n "checking for jpeg_destroy_compress in -ljpeg""... $ac_c" 1>&6
5256 echo "configure:5257: checking for jpeg_destroy_compress in -ljpeg" >&5
5257 ac_lib_var=`echo jpeg'_'jpeg_destroy_compress | sed 'y%./+-%__p_%'`
5258 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5259 echo $ac_n "(cached) $ac_c" 1>&6
5260 else
5261 ac_save_LIBS="$LIBS"
5262 LIBS="-ljpeg $LIBS"
5263 cat > conftest.$ac_ext <<EOF
5264 #line 5265 "configure"
5265 #include "confdefs.h"
5266 /* Override any gcc2 internal prototype to avoid an error. */
5267 /* We use char because int might match the return type of a gcc2
5268 builtin and then its argument prototype would still apply. */
5269 char jpeg_destroy_compress();
5271 int main() {
5272 jpeg_destroy_compress()
5273 ; return 0; }
5275 if { (eval echo configure:5276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5276 rm -rf conftest*
5277 eval "ac_cv_lib_$ac_lib_var=yes"
5278 else
5279 echo "configure: failed program was:" >&5
5280 cat conftest.$ac_ext >&5
5281 rm -rf conftest*
5282 eval "ac_cv_lib_$ac_lib_var=no"
5284 rm -f conftest*
5285 LIBS="$ac_save_LIBS"
5288 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5289 echo "$ac_t""yes" 1>&6
5290 HAVE_JPEG=yes
5291 else
5292 echo "$ac_t""no" 1>&6
5295 else
5296 echo "$ac_t""no" 1>&6
5301 if test "${HAVE_JPEG}" = "yes"; then
5302 cat >> confdefs.h <<\EOF
5303 #define HAVE_JPEG 1
5306 cat > conftest.$ac_ext <<EOF
5307 #line 5308 "configure"
5308 #include "confdefs.h"
5309 #include <jpeglib.h>
5310 version=JPEG_LIB_VERSION
5313 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5314 egrep "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then
5315 rm -rf conftest*
5316 cat >> confdefs.h <<\EOF
5317 #define HAVE_JPEG 1
5320 else
5321 rm -rf conftest*
5322 echo "configure: warning: libjpeg found, but not version 6b or later" 1>&2
5323 HAVE_JPEG=no
5325 rm -f conftest*
5330 ### Use -lpng if available, unless `--with-png=no'.
5331 HAVE_PNG=no
5332 if test "${HAVE_X11}" = "yes"; then
5333 if test "${with_png}" != "no"; then
5334 ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'`
5335 echo $ac_n "checking for png.h""... $ac_c" 1>&6
5336 echo "configure:5337: checking for png.h" >&5
5337 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5338 echo $ac_n "(cached) $ac_c" 1>&6
5339 else
5340 cat > conftest.$ac_ext <<EOF
5341 #line 5342 "configure"
5342 #include "confdefs.h"
5343 #include <png.h>
5345 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5346 { (eval echo configure:5347: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5347 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5348 if test -z "$ac_err"; then
5349 rm -rf conftest*
5350 eval "ac_cv_header_$ac_safe=yes"
5351 else
5352 echo "$ac_err" >&5
5353 echo "configure: failed program was:" >&5
5354 cat conftest.$ac_ext >&5
5355 rm -rf conftest*
5356 eval "ac_cv_header_$ac_safe=no"
5358 rm -f conftest*
5360 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5361 echo "$ac_t""yes" 1>&6
5362 echo $ac_n "checking for png_get_channels in -lpng""... $ac_c" 1>&6
5363 echo "configure:5364: checking for png_get_channels in -lpng" >&5
5364 ac_lib_var=`echo png'_'png_get_channels | sed 'y%./+-%__p_%'`
5365 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5366 echo $ac_n "(cached) $ac_c" 1>&6
5367 else
5368 ac_save_LIBS="$LIBS"
5369 LIBS="-lpng -lz -lm $LIBS"
5370 cat > conftest.$ac_ext <<EOF
5371 #line 5372 "configure"
5372 #include "confdefs.h"
5373 /* Override any gcc2 internal prototype to avoid an error. */
5374 /* We use char because int might match the return type of a gcc2
5375 builtin and then its argument prototype would still apply. */
5376 char png_get_channels();
5378 int main() {
5379 png_get_channels()
5380 ; return 0; }
5382 if { (eval echo configure:5383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5383 rm -rf conftest*
5384 eval "ac_cv_lib_$ac_lib_var=yes"
5385 else
5386 echo "configure: failed program was:" >&5
5387 cat conftest.$ac_ext >&5
5388 rm -rf conftest*
5389 eval "ac_cv_lib_$ac_lib_var=no"
5391 rm -f conftest*
5392 LIBS="$ac_save_LIBS"
5395 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5396 echo "$ac_t""yes" 1>&6
5397 HAVE_PNG=yes
5398 else
5399 echo "$ac_t""no" 1>&6
5402 else
5403 echo "$ac_t""no" 1>&6
5408 if test "${HAVE_PNG}" = "yes"; then
5409 cat >> confdefs.h <<\EOF
5410 #define HAVE_PNG 1
5416 ### Use -ltiff if available, unless `--with-tiff=no'.
5417 HAVE_TIFF=no
5418 if test "${HAVE_X11}" = "yes"; then
5419 if test "${with_tiff}" != "no"; then
5420 ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'`
5421 echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6
5422 echo "configure:5423: checking for tiffio.h" >&5
5423 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5424 echo $ac_n "(cached) $ac_c" 1>&6
5425 else
5426 cat > conftest.$ac_ext <<EOF
5427 #line 5428 "configure"
5428 #include "confdefs.h"
5429 #include <tiffio.h>
5431 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5432 { (eval echo configure:5433: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5433 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5434 if test -z "$ac_err"; then
5435 rm -rf conftest*
5436 eval "ac_cv_header_$ac_safe=yes"
5437 else
5438 echo "$ac_err" >&5
5439 echo "configure: failed program was:" >&5
5440 cat conftest.$ac_ext >&5
5441 rm -rf conftest*
5442 eval "ac_cv_header_$ac_safe=no"
5444 rm -f conftest*
5446 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5447 echo "$ac_t""yes" 1>&6
5448 tifflibs="-lz -lm"
5449 # At least one tiff package requires the jpeg library.
5450 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
5451 echo $ac_n "checking for TIFFGetVersion in -ltiff""... $ac_c" 1>&6
5452 echo "configure:5453: checking for TIFFGetVersion in -ltiff" >&5
5453 ac_lib_var=`echo tiff'_'TIFFGetVersion | sed 'y%./+-%__p_%'`
5454 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5455 echo $ac_n "(cached) $ac_c" 1>&6
5456 else
5457 ac_save_LIBS="$LIBS"
5458 LIBS="-ltiff $tifflibs $LIBS"
5459 cat > conftest.$ac_ext <<EOF
5460 #line 5461 "configure"
5461 #include "confdefs.h"
5462 /* Override any gcc2 internal prototype to avoid an error. */
5463 /* We use char because int might match the return type of a gcc2
5464 builtin and then its argument prototype would still apply. */
5465 char TIFFGetVersion();
5467 int main() {
5468 TIFFGetVersion()
5469 ; return 0; }
5471 if { (eval echo configure:5472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5472 rm -rf conftest*
5473 eval "ac_cv_lib_$ac_lib_var=yes"
5474 else
5475 echo "configure: failed program was:" >&5
5476 cat conftest.$ac_ext >&5
5477 rm -rf conftest*
5478 eval "ac_cv_lib_$ac_lib_var=no"
5480 rm -f conftest*
5481 LIBS="$ac_save_LIBS"
5484 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5485 echo "$ac_t""yes" 1>&6
5486 HAVE_TIFF=yes
5487 else
5488 echo "$ac_t""no" 1>&6
5491 else
5492 echo "$ac_t""no" 1>&6
5497 if test "${HAVE_TIFF}" = "yes"; then
5498 cat >> confdefs.h <<\EOF
5499 #define HAVE_TIFF 1
5505 ### Use -lgif if available, unless `--with-gif=no'.
5506 HAVE_GIF=no
5507 if test "${HAVE_X11}" = "yes"; then
5508 if test "${with_gif}" != "no"; then
5509 ac_safe=`echo "gif_lib.h" | sed 'y%./+-%__p_%'`
5510 echo $ac_n "checking for gif_lib.h""... $ac_c" 1>&6
5511 echo "configure:5512: checking for gif_lib.h" >&5
5512 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5513 echo $ac_n "(cached) $ac_c" 1>&6
5514 else
5515 cat > conftest.$ac_ext <<EOF
5516 #line 5517 "configure"
5517 #include "confdefs.h"
5518 #include <gif_lib.h>
5520 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5521 { (eval echo configure:5522: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5522 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5523 if test -z "$ac_err"; then
5524 rm -rf conftest*
5525 eval "ac_cv_header_$ac_safe=yes"
5526 else
5527 echo "$ac_err" >&5
5528 echo "configure: failed program was:" >&5
5529 cat conftest.$ac_ext >&5
5530 rm -rf conftest*
5531 eval "ac_cv_header_$ac_safe=no"
5533 rm -f conftest*
5535 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5536 echo "$ac_t""yes" 1>&6
5537 # EGifPutExtensionLast only exists from version libungif-4.1.0b1.
5538 # Earlier versions can crash Emacs.
5539 echo $ac_n "checking for EGifPutExtensionLast in -lungif""... $ac_c" 1>&6
5540 echo "configure:5541: checking for EGifPutExtensionLast in -lungif" >&5
5541 ac_lib_var=`echo ungif'_'EGifPutExtensionLast | sed 'y%./+-%__p_%'`
5542 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5543 echo $ac_n "(cached) $ac_c" 1>&6
5544 else
5545 ac_save_LIBS="$LIBS"
5546 LIBS="-lungif $LIBS"
5547 cat > conftest.$ac_ext <<EOF
5548 #line 5549 "configure"
5549 #include "confdefs.h"
5550 /* Override any gcc2 internal prototype to avoid an error. */
5551 /* We use char because int might match the return type of a gcc2
5552 builtin and then its argument prototype would still apply. */
5553 char EGifPutExtensionLast();
5555 int main() {
5556 EGifPutExtensionLast()
5557 ; return 0; }
5559 if { (eval echo configure:5560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5560 rm -rf conftest*
5561 eval "ac_cv_lib_$ac_lib_var=yes"
5562 else
5563 echo "configure: failed program was:" >&5
5564 cat conftest.$ac_ext >&5
5565 rm -rf conftest*
5566 eval "ac_cv_lib_$ac_lib_var=no"
5568 rm -f conftest*
5569 LIBS="$ac_save_LIBS"
5572 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5573 echo "$ac_t""yes" 1>&6
5574 HAVE_GIF=yes
5575 else
5576 echo "$ac_t""no" 1>&6
5579 else
5580 echo "$ac_t""no" 1>&6
5585 if test "${HAVE_GIF}" = "yes"; then
5586 cat >> confdefs.h <<\EOF
5587 #define HAVE_GIF 1
5593 # If netdb.h doesn't declare h_errno, we must declare it by hand.
5594 echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
5595 echo "configure:5596: checking whether netdb declares h_errno" >&5
5596 if eval "test \"`echo '$''{'emacs_cv_netdb_declares_h_errno'+set}'`\" = set"; then
5597 echo $ac_n "(cached) $ac_c" 1>&6
5598 else
5599 cat > conftest.$ac_ext <<EOF
5600 #line 5601 "configure"
5601 #include "confdefs.h"
5602 #include <netdb.h>
5603 int main() {
5604 return h_errno;
5605 ; return 0; }
5607 if { (eval echo configure:5608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5608 rm -rf conftest*
5609 emacs_cv_netdb_declares_h_errno=yes
5610 else
5611 echo "configure: failed program was:" >&5
5612 cat conftest.$ac_ext >&5
5613 rm -rf conftest*
5614 emacs_cv_netdb_declares_h_errno=no
5616 rm -f conftest*
5619 echo "$ac_t""$emacs_cv_netdb_declares_h_errno" 1>&6
5620 if test $emacs_cv_netdb_declares_h_errno = yes; then
5621 cat >> confdefs.h <<\EOF
5622 #define HAVE_H_ERRNO 1
5627 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
5628 # for constant arguments. Useless!
5629 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
5630 echo "configure:5631: checking for working alloca.h" >&5
5631 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
5632 echo $ac_n "(cached) $ac_c" 1>&6
5633 else
5634 cat > conftest.$ac_ext <<EOF
5635 #line 5636 "configure"
5636 #include "confdefs.h"
5637 #include <alloca.h>
5638 int main() {
5639 char *p = alloca(2 * sizeof(int));
5640 ; return 0; }
5642 if { (eval echo configure:5643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5643 rm -rf conftest*
5644 ac_cv_header_alloca_h=yes
5645 else
5646 echo "configure: failed program was:" >&5
5647 cat conftest.$ac_ext >&5
5648 rm -rf conftest*
5649 ac_cv_header_alloca_h=no
5651 rm -f conftest*
5654 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
5655 if test $ac_cv_header_alloca_h = yes; then
5656 cat >> confdefs.h <<\EOF
5657 #define HAVE_ALLOCA_H 1
5662 echo $ac_n "checking for alloca""... $ac_c" 1>&6
5663 echo "configure:5664: checking for alloca" >&5
5664 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
5665 echo $ac_n "(cached) $ac_c" 1>&6
5666 else
5667 cat > conftest.$ac_ext <<EOF
5668 #line 5669 "configure"
5669 #include "confdefs.h"
5671 #ifdef __GNUC__
5672 # define alloca __builtin_alloca
5673 #else
5674 # ifdef _MSC_VER
5675 # include <malloc.h>
5676 # define alloca _alloca
5677 # else
5678 # if HAVE_ALLOCA_H
5679 # include <alloca.h>
5680 # else
5681 # ifdef _AIX
5682 #pragma alloca
5683 # else
5684 # ifndef alloca /* predefined by HP cc +Olibcalls */
5685 char *alloca ();
5686 # endif
5687 # endif
5688 # endif
5689 # endif
5690 #endif
5692 int main() {
5693 char *p = (char *) alloca(1);
5694 ; return 0; }
5696 if { (eval echo configure:5697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5697 rm -rf conftest*
5698 ac_cv_func_alloca_works=yes
5699 else
5700 echo "configure: failed program was:" >&5
5701 cat conftest.$ac_ext >&5
5702 rm -rf conftest*
5703 ac_cv_func_alloca_works=no
5705 rm -f conftest*
5708 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
5709 if test $ac_cv_func_alloca_works = yes; then
5710 cat >> confdefs.h <<\EOF
5711 #define HAVE_ALLOCA 1
5716 if test $ac_cv_func_alloca_works = no; then
5717 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
5718 # that cause trouble. Some versions do not even contain alloca or
5719 # contain a buggy version. If you still want to use their alloca,
5720 # use ar to extract alloca.o from them instead of compiling alloca.c.
5721 ALLOCA=alloca.${ac_objext}
5722 cat >> confdefs.h <<\EOF
5723 #define C_ALLOCA 1
5727 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
5728 echo "configure:5729: checking whether alloca needs Cray hooks" >&5
5729 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
5730 echo $ac_n "(cached) $ac_c" 1>&6
5731 else
5732 cat > conftest.$ac_ext <<EOF
5733 #line 5734 "configure"
5734 #include "confdefs.h"
5735 #if defined(CRAY) && ! defined(CRAY2)
5736 webecray
5737 #else
5738 wenotbecray
5739 #endif
5742 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5743 egrep "webecray" >/dev/null 2>&1; then
5744 rm -rf conftest*
5745 ac_cv_os_cray=yes
5746 else
5747 rm -rf conftest*
5748 ac_cv_os_cray=no
5750 rm -f conftest*
5754 echo "$ac_t""$ac_cv_os_cray" 1>&6
5755 if test $ac_cv_os_cray = yes; then
5756 for ac_func in _getb67 GETB67 getb67; do
5757 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5758 echo "configure:5759: checking for $ac_func" >&5
5759 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5760 echo $ac_n "(cached) $ac_c" 1>&6
5761 else
5762 cat > conftest.$ac_ext <<EOF
5763 #line 5764 "configure"
5764 #include "confdefs.h"
5765 /* System header to define __stub macros and hopefully few prototypes,
5766 which can conflict with char $ac_func(); below. */
5767 #include <assert.h>
5768 /* Override any gcc2 internal prototype to avoid an error. */
5769 /* We use char because int might match the return type of a gcc2
5770 builtin and then its argument prototype would still apply. */
5771 char $ac_func();
5773 int main() {
5775 /* The GNU C library defines this for functions which it implements
5776 to always fail with ENOSYS. Some functions are actually named
5777 something starting with __ and the normal name is an alias. */
5778 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5779 choke me
5780 #else
5781 $ac_func();
5782 #endif
5784 ; return 0; }
5786 if { (eval echo configure:5787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5787 rm -rf conftest*
5788 eval "ac_cv_func_$ac_func=yes"
5789 else
5790 echo "configure: failed program was:" >&5
5791 cat conftest.$ac_ext >&5
5792 rm -rf conftest*
5793 eval "ac_cv_func_$ac_func=no"
5795 rm -f conftest*
5798 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5799 echo "$ac_t""yes" 1>&6
5800 cat >> confdefs.h <<EOF
5801 #define CRAY_STACKSEG_END $ac_func
5804 break
5805 else
5806 echo "$ac_t""no" 1>&6
5809 done
5812 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
5813 echo "configure:5814: checking stack direction for C alloca" >&5
5814 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
5815 echo $ac_n "(cached) $ac_c" 1>&6
5816 else
5817 if test "$cross_compiling" = yes; then
5818 ac_cv_c_stack_direction=0
5819 else
5820 cat > conftest.$ac_ext <<EOF
5821 #line 5822 "configure"
5822 #include "confdefs.h"
5823 find_stack_direction ()
5825 static char *addr = 0;
5826 auto char dummy;
5827 if (addr == 0)
5829 addr = &dummy;
5830 return find_stack_direction ();
5832 else
5833 return (&dummy > addr) ? 1 : -1;
5835 main ()
5837 exit (find_stack_direction() < 0);
5840 if { (eval echo configure:5841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5841 then
5842 ac_cv_c_stack_direction=1
5843 else
5844 echo "configure: failed program was:" >&5
5845 cat conftest.$ac_ext >&5
5846 rm -fr conftest*
5847 ac_cv_c_stack_direction=-1
5849 rm -fr conftest*
5854 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
5855 cat >> confdefs.h <<EOF
5856 #define STACK_DIRECTION $ac_cv_c_stack_direction
5862 # fmod, logb, and frexp are found in -lm on most systems.
5863 # On HPUX 9.01, -lm does not contain logb, so check for sqrt.
5864 echo $ac_n "checking for sqrt in -lm""... $ac_c" 1>&6
5865 echo "configure:5866: checking for sqrt in -lm" >&5
5866 ac_lib_var=`echo m'_'sqrt | sed 'y%./+-%__p_%'`
5867 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5868 echo $ac_n "(cached) $ac_c" 1>&6
5869 else
5870 ac_save_LIBS="$LIBS"
5871 LIBS="-lm $LIBS"
5872 cat > conftest.$ac_ext <<EOF
5873 #line 5874 "configure"
5874 #include "confdefs.h"
5875 /* Override any gcc2 internal prototype to avoid an error. */
5876 /* We use char because int might match the return type of a gcc2
5877 builtin and then its argument prototype would still apply. */
5878 char sqrt();
5880 int main() {
5881 sqrt()
5882 ; return 0; }
5884 if { (eval echo configure:5885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5885 rm -rf conftest*
5886 eval "ac_cv_lib_$ac_lib_var=yes"
5887 else
5888 echo "configure: failed program was:" >&5
5889 cat conftest.$ac_ext >&5
5890 rm -rf conftest*
5891 eval "ac_cv_lib_$ac_lib_var=no"
5893 rm -f conftest*
5894 LIBS="$ac_save_LIBS"
5897 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5898 echo "$ac_t""yes" 1>&6
5899 ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5900 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5901 cat >> confdefs.h <<EOF
5902 #define $ac_tr_lib 1
5905 LIBS="-lm $LIBS"
5907 else
5908 echo "$ac_t""no" 1>&6
5912 # Check for mail-locking functions in a "mail" library
5913 echo $ac_n "checking for maillock in -lmail""... $ac_c" 1>&6
5914 echo "configure:5915: checking for maillock in -lmail" >&5
5915 ac_lib_var=`echo mail'_'maillock | sed 'y%./+-%__p_%'`
5916 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5917 echo $ac_n "(cached) $ac_c" 1>&6
5918 else
5919 ac_save_LIBS="$LIBS"
5920 LIBS="-lmail $LIBS"
5921 cat > conftest.$ac_ext <<EOF
5922 #line 5923 "configure"
5923 #include "confdefs.h"
5924 /* Override any gcc2 internal prototype to avoid an error. */
5925 /* We use char because int might match the return type of a gcc2
5926 builtin and then its argument prototype would still apply. */
5927 char maillock();
5929 int main() {
5930 maillock()
5931 ; return 0; }
5933 if { (eval echo configure:5934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5934 rm -rf conftest*
5935 eval "ac_cv_lib_$ac_lib_var=yes"
5936 else
5937 echo "configure: failed program was:" >&5
5938 cat conftest.$ac_ext >&5
5939 rm -rf conftest*
5940 eval "ac_cv_lib_$ac_lib_var=no"
5942 rm -f conftest*
5943 LIBS="$ac_save_LIBS"
5946 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5947 echo "$ac_t""yes" 1>&6
5948 ac_tr_lib=HAVE_LIB`echo mail | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5949 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5950 cat >> confdefs.h <<EOF
5951 #define $ac_tr_lib 1
5954 LIBS="-lmail $LIBS"
5956 else
5957 echo "$ac_t""no" 1>&6
5960 echo $ac_n "checking for maillock in -llockfile""... $ac_c" 1>&6
5961 echo "configure:5962: checking for maillock in -llockfile" >&5
5962 ac_lib_var=`echo lockfile'_'maillock | sed 'y%./+-%__p_%'`
5963 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5964 echo $ac_n "(cached) $ac_c" 1>&6
5965 else
5966 ac_save_LIBS="$LIBS"
5967 LIBS="-llockfile $LIBS"
5968 cat > conftest.$ac_ext <<EOF
5969 #line 5970 "configure"
5970 #include "confdefs.h"
5971 /* Override any gcc2 internal prototype to avoid an error. */
5972 /* We use char because int might match the return type of a gcc2
5973 builtin and then its argument prototype would still apply. */
5974 char maillock();
5976 int main() {
5977 maillock()
5978 ; return 0; }
5980 if { (eval echo configure:5981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5981 rm -rf conftest*
5982 eval "ac_cv_lib_$ac_lib_var=yes"
5983 else
5984 echo "configure: failed program was:" >&5
5985 cat conftest.$ac_ext >&5
5986 rm -rf conftest*
5987 eval "ac_cv_lib_$ac_lib_var=no"
5989 rm -f conftest*
5990 LIBS="$ac_save_LIBS"
5993 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5994 echo "$ac_t""yes" 1>&6
5995 ac_tr_lib=HAVE_LIB`echo lockfile | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5996 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5997 cat >> confdefs.h <<EOF
5998 #define $ac_tr_lib 1
6001 LIBS="-llockfile $LIBS"
6003 else
6004 echo "$ac_t""no" 1>&6
6007 # If we have the shared liblockfile, assume we must use it for mail
6008 # locking (e.g. Debian). If we couldn't link against liblockfile
6009 # (no liblockfile.a installed), ensure that we don't need to.
6010 if test "$ac_cv_lib_lockfile_maillock" = no; then
6011 # Extract the first word of "liblockfile.so", so it can be a program name with args.
6012 set dummy liblockfile.so; ac_word=$2
6013 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6014 echo "configure:6015: checking for $ac_word" >&5
6015 if eval "test \"`echo '$''{'ac_cv_prog_liblockfile'+set}'`\" = set"; then
6016 echo $ac_n "(cached) $ac_c" 1>&6
6017 else
6018 if test -n "$liblockfile"; then
6019 ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
6020 else
6021 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6022 ac_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
6023 for ac_dir in $ac_dummy; do
6024 test -z "$ac_dir" && ac_dir=.
6025 if test -f $ac_dir/$ac_word; then
6026 ac_cv_prog_liblockfile="yes"
6027 break
6029 done
6030 IFS="$ac_save_ifs"
6031 test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
6034 liblockfile="$ac_cv_prog_liblockfile"
6035 if test -n "$liblockfile"; then
6036 echo "$ac_t""$liblockfile" 1>&6
6037 else
6038 echo "$ac_t""no" 1>&6
6041 if test $ac_cv_prog_liblockfile = yes; then
6042 { echo "configure: error: Shared liblockfile found but can't link against it.
6043 This probably means that movemail could lose mail.
6044 There may be a \`development' package to install containing liblockfile." 1>&2; exit 1; }
6045 else cat >> confdefs.h <<\EOF
6046 #define LIBMAIL -llockfile
6050 else :
6052 for ac_func in touchlock
6054 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6055 echo "configure:6056: checking for $ac_func" >&5
6056 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6057 echo $ac_n "(cached) $ac_c" 1>&6
6058 else
6059 cat > conftest.$ac_ext <<EOF
6060 #line 6061 "configure"
6061 #include "confdefs.h"
6062 /* System header to define __stub macros and hopefully few prototypes,
6063 which can conflict with char $ac_func(); below. */
6064 #include <assert.h>
6065 /* Override any gcc2 internal prototype to avoid an error. */
6066 /* We use char because int might match the return type of a gcc2
6067 builtin and then its argument prototype would still apply. */
6068 char $ac_func();
6070 int main() {
6072 /* The GNU C library defines this for functions which it implements
6073 to always fail with ENOSYS. Some functions are actually named
6074 something starting with __ and the normal name is an alias. */
6075 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6076 choke me
6077 #else
6078 $ac_func();
6079 #endif
6081 ; return 0; }
6083 if { (eval echo configure:6084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6084 rm -rf conftest*
6085 eval "ac_cv_func_$ac_func=yes"
6086 else
6087 echo "configure: failed program was:" >&5
6088 cat conftest.$ac_ext >&5
6089 rm -rf conftest*
6090 eval "ac_cv_func_$ac_func=no"
6092 rm -f conftest*
6095 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6096 echo "$ac_t""yes" 1>&6
6097 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6098 cat >> confdefs.h <<EOF
6099 #define $ac_tr_func 1
6102 else
6103 echo "$ac_t""no" 1>&6
6105 done
6107 for ac_hdr in maillock.h
6109 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6110 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6111 echo "configure:6112: checking for $ac_hdr" >&5
6112 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6113 echo $ac_n "(cached) $ac_c" 1>&6
6114 else
6115 cat > conftest.$ac_ext <<EOF
6116 #line 6117 "configure"
6117 #include "confdefs.h"
6118 #include <$ac_hdr>
6120 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6121 { (eval echo configure:6122: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6122 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6123 if test -z "$ac_err"; then
6124 rm -rf conftest*
6125 eval "ac_cv_header_$ac_safe=yes"
6126 else
6127 echo "$ac_err" >&5
6128 echo "configure: failed program was:" >&5
6129 cat conftest.$ac_ext >&5
6130 rm -rf conftest*
6131 eval "ac_cv_header_$ac_safe=no"
6133 rm -f conftest*
6135 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6136 echo "$ac_t""yes" 1>&6
6137 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6138 cat >> confdefs.h <<EOF
6139 #define $ac_tr_hdr 1
6142 else
6143 echo "$ac_t""no" 1>&6
6145 done
6148 for ac_func in gethostname getdomainname dup2 \
6149 rename closedir mkdir rmdir sysinfo \
6150 random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime res_init setsid \
6151 strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \
6152 utimes setrlimit setpgid getcwd getwd shutdown strftime getaddrinfo \
6153 __fpending mblen mbrlen strsignal setitimer ualarm index rindex \
6154 gai_strerror mkstemp
6156 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6157 echo "configure:6158: checking for $ac_func" >&5
6158 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6159 echo $ac_n "(cached) $ac_c" 1>&6
6160 else
6161 cat > conftest.$ac_ext <<EOF
6162 #line 6163 "configure"
6163 #include "confdefs.h"
6164 /* System header to define __stub macros and hopefully few prototypes,
6165 which can conflict with char $ac_func(); below. */
6166 #include <assert.h>
6167 /* Override any gcc2 internal prototype to avoid an error. */
6168 /* We use char because int might match the return type of a gcc2
6169 builtin and then its argument prototype would still apply. */
6170 char $ac_func();
6172 int main() {
6174 /* The GNU C library defines this for functions which it implements
6175 to always fail with ENOSYS. Some functions are actually named
6176 something starting with __ and the normal name is an alias. */
6177 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6178 choke me
6179 #else
6180 $ac_func();
6181 #endif
6183 ; return 0; }
6185 if { (eval echo configure:6186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6186 rm -rf conftest*
6187 eval "ac_cv_func_$ac_func=yes"
6188 else
6189 echo "configure: failed program was:" >&5
6190 cat conftest.$ac_ext >&5
6191 rm -rf conftest*
6192 eval "ac_cv_func_$ac_func=no"
6194 rm -f conftest*
6197 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6198 echo "$ac_t""yes" 1>&6
6199 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6200 cat >> confdefs.h <<EOF
6201 #define $ac_tr_func 1
6204 else
6205 echo "$ac_t""no" 1>&6
6207 done
6210 for ac_hdr in sys/time.h unistd.h
6212 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6213 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6214 echo "configure:6215: checking for $ac_hdr" >&5
6215 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6216 echo $ac_n "(cached) $ac_c" 1>&6
6217 else
6218 cat > conftest.$ac_ext <<EOF
6219 #line 6220 "configure"
6220 #include "confdefs.h"
6221 #include <$ac_hdr>
6223 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6224 { (eval echo configure:6225: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6225 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6226 if test -z "$ac_err"; then
6227 rm -rf conftest*
6228 eval "ac_cv_header_$ac_safe=yes"
6229 else
6230 echo "$ac_err" >&5
6231 echo "configure: failed program was:" >&5
6232 cat conftest.$ac_ext >&5
6233 rm -rf conftest*
6234 eval "ac_cv_header_$ac_safe=no"
6236 rm -f conftest*
6238 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6239 echo "$ac_t""yes" 1>&6
6240 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6241 cat >> confdefs.h <<EOF
6242 #define $ac_tr_hdr 1
6245 else
6246 echo "$ac_t""no" 1>&6
6248 done
6250 for ac_func in alarm
6252 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6253 echo "configure:6254: checking for $ac_func" >&5
6254 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6255 echo $ac_n "(cached) $ac_c" 1>&6
6256 else
6257 cat > conftest.$ac_ext <<EOF
6258 #line 6259 "configure"
6259 #include "confdefs.h"
6260 /* System header to define __stub macros and hopefully few prototypes,
6261 which can conflict with char $ac_func(); below. */
6262 #include <assert.h>
6263 /* Override any gcc2 internal prototype to avoid an error. */
6264 /* We use char because int might match the return type of a gcc2
6265 builtin and then its argument prototype would still apply. */
6266 char $ac_func();
6268 int main() {
6270 /* The GNU C library defines this for functions which it implements
6271 to always fail with ENOSYS. Some functions are actually named
6272 something starting with __ and the normal name is an alias. */
6273 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6274 choke me
6275 #else
6276 $ac_func();
6277 #endif
6279 ; return 0; }
6281 if { (eval echo configure:6282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6282 rm -rf conftest*
6283 eval "ac_cv_func_$ac_func=yes"
6284 else
6285 echo "configure: failed program was:" >&5
6286 cat conftest.$ac_ext >&5
6287 rm -rf conftest*
6288 eval "ac_cv_func_$ac_func=no"
6290 rm -f conftest*
6293 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6294 echo "$ac_t""yes" 1>&6
6295 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6296 cat >> confdefs.h <<EOF
6297 #define $ac_tr_func 1
6300 else
6301 echo "$ac_t""no" 1>&6
6303 done
6305 echo $ac_n "checking for working mktime""... $ac_c" 1>&6
6306 echo "configure:6307: checking for working mktime" >&5
6307 if eval "test \"`echo '$''{'ac_cv_func_working_mktime'+set}'`\" = set"; then
6308 echo $ac_n "(cached) $ac_c" 1>&6
6309 else
6310 if test "$cross_compiling" = yes; then
6311 ac_cv_func_working_mktime=no
6312 else
6313 cat > conftest.$ac_ext <<EOF
6314 #line 6315 "configure"
6315 #include "confdefs.h"
6316 /* Test program from Paul Eggert (eggert@twinsun.com)
6317 and Tony Leneis (tony@plaza.ds.adp.com). */
6318 #if TIME_WITH_SYS_TIME
6319 # include <sys/time.h>
6320 # include <time.h>
6321 #else
6322 # if HAVE_SYS_TIME_H
6323 # include <sys/time.h>
6324 # else
6325 # include <time.h>
6326 # endif
6327 #endif
6329 #if HAVE_UNISTD_H
6330 # include <unistd.h>
6331 #endif
6333 #if !HAVE_ALARM
6334 # define alarm(X) /* empty */
6335 #endif
6337 /* Work around redefinition to rpl_putenv by other config tests. */
6338 #undef putenv
6340 static time_t time_t_max;
6342 /* Values we'll use to set the TZ environment variable. */
6343 static const char *const tz_strings[] = {
6344 (const char *) 0, "TZ=GMT0", "TZ=JST-9",
6345 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
6347 #define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
6349 /* Fail if mktime fails to convert a date in the spring-forward gap.
6350 Based on a problem report from Andreas Jaeger. */
6351 static void
6352 spring_forward_gap ()
6354 /* glibc (up to about 1998-10-07) failed this test) */
6355 struct tm tm;
6357 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
6358 instead of "TZ=America/Vancouver" in order to detect the bug even
6359 on systems that don't support the Olson extension, or don't have the
6360 full zoneinfo tables installed. */
6361 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
6363 tm.tm_year = 98;
6364 tm.tm_mon = 3;
6365 tm.tm_mday = 5;
6366 tm.tm_hour = 2;
6367 tm.tm_min = 0;
6368 tm.tm_sec = 0;
6369 tm.tm_isdst = -1;
6370 if (mktime (&tm) == (time_t)-1)
6371 exit (1);
6374 static void
6375 mktime_test (now)
6376 time_t now;
6378 struct tm *lt;
6379 if ((lt = localtime (&now)) && mktime (lt) != now)
6380 exit (1);
6381 now = time_t_max - now;
6382 if ((lt = localtime (&now)) && mktime (lt) != now)
6383 exit (1);
6386 static void
6387 irix_6_4_bug ()
6389 /* Based on code from Ariel Faigon. */
6390 struct tm tm;
6391 tm.tm_year = 96;
6392 tm.tm_mon = 3;
6393 tm.tm_mday = 0;
6394 tm.tm_hour = 0;
6395 tm.tm_min = 0;
6396 tm.tm_sec = 0;
6397 tm.tm_isdst = -1;
6398 mktime (&tm);
6399 if (tm.tm_mon != 2 || tm.tm_mday != 31)
6400 exit (1);
6403 static void
6404 bigtime_test (j)
6405 int j;
6407 struct tm tm;
6408 time_t now;
6409 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
6410 now = mktime (&tm);
6411 if (now != (time_t) -1)
6413 struct tm *lt = localtime (&now);
6414 if (! (lt
6415 && lt->tm_year == tm.tm_year
6416 && lt->tm_mon == tm.tm_mon
6417 && lt->tm_mday == tm.tm_mday
6418 && lt->tm_hour == tm.tm_hour
6419 && lt->tm_min == tm.tm_min
6420 && lt->tm_sec == tm.tm_sec
6421 && lt->tm_yday == tm.tm_yday
6422 && lt->tm_wday == tm.tm_wday
6423 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
6424 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
6425 exit (1);
6430 main ()
6432 time_t t, delta;
6433 int i, j;
6435 /* This test makes some buggy mktime implementations loop.
6436 Give up after 60 seconds; a mktime slower than that
6437 isn't worth using anyway. */
6438 alarm (60);
6440 for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2)
6441 continue;
6442 time_t_max--;
6443 delta = time_t_max / 997; /* a suitable prime number */
6444 for (i = 0; i < N_STRINGS; i++)
6446 if (tz_strings[i])
6447 putenv (tz_strings[i]);
6449 for (t = 0; t <= time_t_max - delta; t += delta)
6450 mktime_test (t);
6451 mktime_test ((time_t) 60 * 60);
6452 mktime_test ((time_t) 60 * 60 * 24);
6454 for (j = 1; 0 < j; j *= 2)
6455 bigtime_test (j);
6456 bigtime_test (j - 1);
6458 irix_6_4_bug ();
6459 spring_forward_gap ();
6460 exit (0);
6463 if { (eval echo configure:6464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6464 then
6465 ac_cv_func_working_mktime=yes
6466 else
6467 echo "configure: failed program was:" >&5
6468 cat conftest.$ac_ext >&5
6469 rm -fr conftest*
6470 ac_cv_func_working_mktime=no
6472 rm -fr conftest*
6477 echo "$ac_t""$ac_cv_func_working_mktime" 1>&6
6478 if test $ac_cv_func_working_mktime = no; then
6479 LIBOBJS="$LIBOBJS mktime.${ac_objext}"
6482 if test "$ac_cv_func_working_mktime" = no; then
6483 cat >> confdefs.h <<\EOF
6484 #define BROKEN_MKTIME 1
6489 ac_have_func=no # yes means we've found a way to get the load average.
6491 # Some systems have getloadavg without any extra libraries.
6492 echo $ac_n "checking for getloadavg""... $ac_c" 1>&6
6493 echo "configure:6494: checking for getloadavg" >&5
6494 if eval "test \"`echo '$''{'ac_cv_func_getloadavg'+set}'`\" = set"; then
6495 echo $ac_n "(cached) $ac_c" 1>&6
6496 else
6497 cat > conftest.$ac_ext <<EOF
6498 #line 6499 "configure"
6499 #include "confdefs.h"
6500 /* System header to define __stub macros and hopefully few prototypes,
6501 which can conflict with char getloadavg(); below. */
6502 #include <assert.h>
6503 /* Override any gcc2 internal prototype to avoid an error. */
6504 /* We use char because int might match the return type of a gcc2
6505 builtin and then its argument prototype would still apply. */
6506 char getloadavg();
6508 int main() {
6510 /* The GNU C library defines this for functions which it implements
6511 to always fail with ENOSYS. Some functions are actually named
6512 something starting with __ and the normal name is an alias. */
6513 #if defined (__stub_getloadavg) || defined (__stub___getloadavg)
6514 choke me
6515 #else
6516 getloadavg();
6517 #endif
6519 ; return 0; }
6521 if { (eval echo configure:6522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6522 rm -rf conftest*
6523 eval "ac_cv_func_getloadavg=yes"
6524 else
6525 echo "configure: failed program was:" >&5
6526 cat conftest.$ac_ext >&5
6527 rm -rf conftest*
6528 eval "ac_cv_func_getloadavg=no"
6530 rm -f conftest*
6533 if eval "test \"`echo '$ac_cv_func_'getloadavg`\" = yes"; then
6534 echo "$ac_t""yes" 1>&6
6535 ac_have_func=yes
6536 else
6537 echo "$ac_t""no" 1>&6
6541 if test $ac_have_func = no; then
6542 # Some systems with -lutil have (and need) -lkvm as well, some do not.
6543 # On Solaris, -lkvm requires nlist from -lelf, so check that first
6544 # to get the right answer into the cache.
6545 echo $ac_n "checking for elf_begin in -lelf""... $ac_c" 1>&6
6546 echo "configure:6547: checking for elf_begin in -lelf" >&5
6547 ac_lib_var=`echo elf'_'elf_begin | sed 'y%./+-%__p_%'`
6548 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6549 echo $ac_n "(cached) $ac_c" 1>&6
6550 else
6551 ac_save_LIBS="$LIBS"
6552 LIBS="-lelf $LIBS"
6553 cat > conftest.$ac_ext <<EOF
6554 #line 6555 "configure"
6555 #include "confdefs.h"
6556 /* Override any gcc2 internal prototype to avoid an error. */
6557 /* We use char because int might match the return type of a gcc2
6558 builtin and then its argument prototype would still apply. */
6559 char elf_begin();
6561 int main() {
6562 elf_begin()
6563 ; return 0; }
6565 if { (eval echo configure:6566: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6566 rm -rf conftest*
6567 eval "ac_cv_lib_$ac_lib_var=yes"
6568 else
6569 echo "configure: failed program was:" >&5
6570 cat conftest.$ac_ext >&5
6571 rm -rf conftest*
6572 eval "ac_cv_lib_$ac_lib_var=no"
6574 rm -f conftest*
6575 LIBS="$ac_save_LIBS"
6578 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6579 echo "$ac_t""yes" 1>&6
6580 LIBS="-lelf $LIBS"
6581 else
6582 echo "$ac_t""no" 1>&6
6585 echo $ac_n "checking for kvm_open in -lkvm""... $ac_c" 1>&6
6586 echo "configure:6587: checking for kvm_open in -lkvm" >&5
6587 ac_lib_var=`echo kvm'_'kvm_open | sed 'y%./+-%__p_%'`
6588 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6589 echo $ac_n "(cached) $ac_c" 1>&6
6590 else
6591 ac_save_LIBS="$LIBS"
6592 LIBS="-lkvm $LIBS"
6593 cat > conftest.$ac_ext <<EOF
6594 #line 6595 "configure"
6595 #include "confdefs.h"
6596 /* Override any gcc2 internal prototype to avoid an error. */
6597 /* We use char because int might match the return type of a gcc2
6598 builtin and then its argument prototype would still apply. */
6599 char kvm_open();
6601 int main() {
6602 kvm_open()
6603 ; return 0; }
6605 if { (eval echo configure:6606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6606 rm -rf conftest*
6607 eval "ac_cv_lib_$ac_lib_var=yes"
6608 else
6609 echo "configure: failed program was:" >&5
6610 cat conftest.$ac_ext >&5
6611 rm -rf conftest*
6612 eval "ac_cv_lib_$ac_lib_var=no"
6614 rm -f conftest*
6615 LIBS="$ac_save_LIBS"
6618 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6619 echo "$ac_t""yes" 1>&6
6620 LIBS="-lkvm $LIBS"
6621 else
6622 echo "$ac_t""no" 1>&6
6625 # Check for the 4.4BSD definition of getloadavg.
6626 echo $ac_n "checking for getloadavg in -lutil""... $ac_c" 1>&6
6627 echo "configure:6628: checking for getloadavg in -lutil" >&5
6628 ac_lib_var=`echo util'_'getloadavg | sed 'y%./+-%__p_%'`
6629 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6630 echo $ac_n "(cached) $ac_c" 1>&6
6631 else
6632 ac_save_LIBS="$LIBS"
6633 LIBS="-lutil $LIBS"
6634 cat > conftest.$ac_ext <<EOF
6635 #line 6636 "configure"
6636 #include "confdefs.h"
6637 /* Override any gcc2 internal prototype to avoid an error. */
6638 /* We use char because int might match the return type of a gcc2
6639 builtin and then its argument prototype would still apply. */
6640 char getloadavg();
6642 int main() {
6643 getloadavg()
6644 ; return 0; }
6646 if { (eval echo configure:6647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6647 rm -rf conftest*
6648 eval "ac_cv_lib_$ac_lib_var=yes"
6649 else
6650 echo "configure: failed program was:" >&5
6651 cat conftest.$ac_ext >&5
6652 rm -rf conftest*
6653 eval "ac_cv_lib_$ac_lib_var=no"
6655 rm -f conftest*
6656 LIBS="$ac_save_LIBS"
6659 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6660 echo "$ac_t""yes" 1>&6
6661 LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes
6662 else
6663 echo "$ac_t""no" 1>&6
6668 if test $ac_have_func = no; then
6669 # There is a commonly available library for RS/6000 AIX.
6670 # Since it is not a standard part of AIX, it might be installed locally.
6671 ac_getloadavg_LIBS="$LIBS"; LIBS="-L/usr/local/lib $LIBS"
6672 echo $ac_n "checking for getloadavg in -lgetloadavg""... $ac_c" 1>&6
6673 echo "configure:6674: checking for getloadavg in -lgetloadavg" >&5
6674 ac_lib_var=`echo getloadavg'_'getloadavg | sed 'y%./+-%__p_%'`
6675 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6676 echo $ac_n "(cached) $ac_c" 1>&6
6677 else
6678 ac_save_LIBS="$LIBS"
6679 LIBS="-lgetloadavg $LIBS"
6680 cat > conftest.$ac_ext <<EOF
6681 #line 6682 "configure"
6682 #include "confdefs.h"
6683 /* Override any gcc2 internal prototype to avoid an error. */
6684 /* We use char because int might match the return type of a gcc2
6685 builtin and then its argument prototype would still apply. */
6686 char getloadavg();
6688 int main() {
6689 getloadavg()
6690 ; return 0; }
6692 if { (eval echo configure:6693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6693 rm -rf conftest*
6694 eval "ac_cv_lib_$ac_lib_var=yes"
6695 else
6696 echo "configure: failed program was:" >&5
6697 cat conftest.$ac_ext >&5
6698 rm -rf conftest*
6699 eval "ac_cv_lib_$ac_lib_var=no"
6701 rm -f conftest*
6702 LIBS="$ac_save_LIBS"
6705 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6706 echo "$ac_t""yes" 1>&6
6707 LIBS="-lgetloadavg $LIBS"
6708 else
6709 echo "$ac_t""no" 1>&6
6710 LIBS="$ac_getloadavg_LIBS"
6715 # Make sure it is really in the library, if we think we found it.
6716 for ac_func in getloadavg
6718 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6719 echo "configure:6720: checking for $ac_func" >&5
6720 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6721 echo $ac_n "(cached) $ac_c" 1>&6
6722 else
6723 cat > conftest.$ac_ext <<EOF
6724 #line 6725 "configure"
6725 #include "confdefs.h"
6726 /* System header to define __stub macros and hopefully few prototypes,
6727 which can conflict with char $ac_func(); below. */
6728 #include <assert.h>
6729 /* Override any gcc2 internal prototype to avoid an error. */
6730 /* We use char because int might match the return type of a gcc2
6731 builtin and then its argument prototype would still apply. */
6732 char $ac_func();
6734 int main() {
6736 /* The GNU C library defines this for functions which it implements
6737 to always fail with ENOSYS. Some functions are actually named
6738 something starting with __ and the normal name is an alias. */
6739 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6740 choke me
6741 #else
6742 $ac_func();
6743 #endif
6745 ; return 0; }
6747 if { (eval echo configure:6748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6748 rm -rf conftest*
6749 eval "ac_cv_func_$ac_func=yes"
6750 else
6751 echo "configure: failed program was:" >&5
6752 cat conftest.$ac_ext >&5
6753 rm -rf conftest*
6754 eval "ac_cv_func_$ac_func=no"
6756 rm -f conftest*
6759 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6760 echo "$ac_t""yes" 1>&6
6761 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6762 cat >> confdefs.h <<EOF
6763 #define $ac_tr_func 1
6766 else
6767 echo "$ac_t""no" 1>&6
6768 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
6770 done
6774 if test $ac_cv_func_getloadavg = yes; then
6775 cat >> confdefs.h <<\EOF
6776 #define HAVE_GETLOADAVG 1
6779 ac_have_func=yes
6780 else
6781 # Figure out what our getloadavg.c needs.
6782 ac_have_func=no
6783 ac_safe=`echo "sys/dg_sys_info.h" | sed 'y%./+-%__p_%'`
6784 echo $ac_n "checking for sys/dg_sys_info.h""... $ac_c" 1>&6
6785 echo "configure:6786: checking for sys/dg_sys_info.h" >&5
6786 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6787 echo $ac_n "(cached) $ac_c" 1>&6
6788 else
6789 cat > conftest.$ac_ext <<EOF
6790 #line 6791 "configure"
6791 #include "confdefs.h"
6792 #include <sys/dg_sys_info.h>
6794 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6795 { (eval echo configure:6796: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6796 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6797 if test -z "$ac_err"; then
6798 rm -rf conftest*
6799 eval "ac_cv_header_$ac_safe=yes"
6800 else
6801 echo "$ac_err" >&5
6802 echo "configure: failed program was:" >&5
6803 cat conftest.$ac_ext >&5
6804 rm -rf conftest*
6805 eval "ac_cv_header_$ac_safe=no"
6807 rm -f conftest*
6809 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6810 echo "$ac_t""yes" 1>&6
6811 ac_have_func=yes; cat >> confdefs.h <<\EOF
6812 #define DGUX 1
6815 echo $ac_n "checking for dg_sys_info in -ldgc""... $ac_c" 1>&6
6816 echo "configure:6817: checking for dg_sys_info in -ldgc" >&5
6817 ac_lib_var=`echo dgc'_'dg_sys_info | sed 'y%./+-%__p_%'`
6818 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6819 echo $ac_n "(cached) $ac_c" 1>&6
6820 else
6821 ac_save_LIBS="$LIBS"
6822 LIBS="-ldgc $LIBS"
6823 cat > conftest.$ac_ext <<EOF
6824 #line 6825 "configure"
6825 #include "confdefs.h"
6826 /* Override any gcc2 internal prototype to avoid an error. */
6827 /* We use char because int might match the return type of a gcc2
6828 builtin and then its argument prototype would still apply. */
6829 char dg_sys_info();
6831 int main() {
6832 dg_sys_info()
6833 ; return 0; }
6835 if { (eval echo configure:6836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6836 rm -rf conftest*
6837 eval "ac_cv_lib_$ac_lib_var=yes"
6838 else
6839 echo "configure: failed program was:" >&5
6840 cat conftest.$ac_ext >&5
6841 rm -rf conftest*
6842 eval "ac_cv_lib_$ac_lib_var=no"
6844 rm -f conftest*
6845 LIBS="$ac_save_LIBS"
6848 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6849 echo "$ac_t""yes" 1>&6
6850 ac_tr_lib=HAVE_LIB`echo dgc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6851 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6852 cat >> confdefs.h <<EOF
6853 #define $ac_tr_lib 1
6856 LIBS="-ldgc $LIBS"
6858 else
6859 echo "$ac_t""no" 1>&6
6862 else
6863 echo "$ac_t""no" 1>&6
6867 # We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
6868 # uses stabs), but it is still SVR4. We cannot check for <elf.h> because
6869 # Irix 4.0.5F has the header but not the library.
6870 if test $ac_have_func = no && test $ac_cv_lib_elf_elf_begin = yes; then
6871 ac_have_func=yes; cat >> confdefs.h <<\EOF
6872 #define SVR4 1
6877 if test $ac_have_func = no; then
6878 ac_safe=`echo "inq_stats/cpustats.h" | sed 'y%./+-%__p_%'`
6879 echo $ac_n "checking for inq_stats/cpustats.h""... $ac_c" 1>&6
6880 echo "configure:6881: checking for inq_stats/cpustats.h" >&5
6881 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6882 echo $ac_n "(cached) $ac_c" 1>&6
6883 else
6884 cat > conftest.$ac_ext <<EOF
6885 #line 6886 "configure"
6886 #include "confdefs.h"
6887 #include <inq_stats/cpustats.h>
6889 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6890 { (eval echo configure:6891: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6891 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6892 if test -z "$ac_err"; then
6893 rm -rf conftest*
6894 eval "ac_cv_header_$ac_safe=yes"
6895 else
6896 echo "$ac_err" >&5
6897 echo "configure: failed program was:" >&5
6898 cat conftest.$ac_ext >&5
6899 rm -rf conftest*
6900 eval "ac_cv_header_$ac_safe=no"
6902 rm -f conftest*
6904 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6905 echo "$ac_t""yes" 1>&6
6906 ac_have_func=yes; cat >> confdefs.h <<\EOF
6907 #define UMAX 1
6910 cat >> confdefs.h <<\EOF
6911 #define UMAX4_3 1
6914 else
6915 echo "$ac_t""no" 1>&6
6920 if test $ac_have_func = no; then
6921 ac_safe=`echo "sys/cpustats.h" | sed 'y%./+-%__p_%'`
6922 echo $ac_n "checking for sys/cpustats.h""... $ac_c" 1>&6
6923 echo "configure:6924: checking for sys/cpustats.h" >&5
6924 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6925 echo $ac_n "(cached) $ac_c" 1>&6
6926 else
6927 cat > conftest.$ac_ext <<EOF
6928 #line 6929 "configure"
6929 #include "confdefs.h"
6930 #include <sys/cpustats.h>
6932 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6933 { (eval echo configure:6934: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6934 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6935 if test -z "$ac_err"; then
6936 rm -rf conftest*
6937 eval "ac_cv_header_$ac_safe=yes"
6938 else
6939 echo "$ac_err" >&5
6940 echo "configure: failed program was:" >&5
6941 cat conftest.$ac_ext >&5
6942 rm -rf conftest*
6943 eval "ac_cv_header_$ac_safe=no"
6945 rm -f conftest*
6947 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6948 echo "$ac_t""yes" 1>&6
6949 ac_have_func=yes; cat >> confdefs.h <<\EOF
6950 #define UMAX 1
6953 else
6954 echo "$ac_t""no" 1>&6
6959 if test $ac_have_func = no; then
6960 for ac_hdr in mach/mach.h
6962 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6963 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6964 echo "configure:6965: checking for $ac_hdr" >&5
6965 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6966 echo $ac_n "(cached) $ac_c" 1>&6
6967 else
6968 cat > conftest.$ac_ext <<EOF
6969 #line 6970 "configure"
6970 #include "confdefs.h"
6971 #include <$ac_hdr>
6973 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6974 { (eval echo configure:6975: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6975 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6976 if test -z "$ac_err"; then
6977 rm -rf conftest*
6978 eval "ac_cv_header_$ac_safe=yes"
6979 else
6980 echo "$ac_err" >&5
6981 echo "configure: failed program was:" >&5
6982 cat conftest.$ac_ext >&5
6983 rm -rf conftest*
6984 eval "ac_cv_header_$ac_safe=no"
6986 rm -f conftest*
6988 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6989 echo "$ac_t""yes" 1>&6
6990 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6991 cat >> confdefs.h <<EOF
6992 #define $ac_tr_hdr 1
6995 else
6996 echo "$ac_t""no" 1>&6
6998 done
7002 ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'`
7003 echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
7004 echo "configure:7005: checking for nlist.h" >&5
7005 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7006 echo $ac_n "(cached) $ac_c" 1>&6
7007 else
7008 cat > conftest.$ac_ext <<EOF
7009 #line 7010 "configure"
7010 #include "confdefs.h"
7011 #include <nlist.h>
7013 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7014 { (eval echo configure:7015: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7015 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7016 if test -z "$ac_err"; then
7017 rm -rf conftest*
7018 eval "ac_cv_header_$ac_safe=yes"
7019 else
7020 echo "$ac_err" >&5
7021 echo "configure: failed program was:" >&5
7022 cat conftest.$ac_ext >&5
7023 rm -rf conftest*
7024 eval "ac_cv_header_$ac_safe=no"
7026 rm -f conftest*
7028 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7029 echo "$ac_t""yes" 1>&6
7030 cat >> confdefs.h <<\EOF
7031 #define NLIST_STRUCT 1
7034 echo $ac_n "checking for n_un in struct nlist""... $ac_c" 1>&6
7035 echo "configure:7036: checking for n_un in struct nlist" >&5
7036 if eval "test \"`echo '$''{'ac_cv_struct_nlist_n_un'+set}'`\" = set"; then
7037 echo $ac_n "(cached) $ac_c" 1>&6
7038 else
7039 cat > conftest.$ac_ext <<EOF
7040 #line 7041 "configure"
7041 #include "confdefs.h"
7042 #include <nlist.h>
7043 int main() {
7044 struct nlist n; n.n_un.n_name = 0;
7045 ; return 0; }
7047 if { (eval echo configure:7048: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7048 rm -rf conftest*
7049 ac_cv_struct_nlist_n_un=yes
7050 else
7051 echo "configure: failed program was:" >&5
7052 cat conftest.$ac_ext >&5
7053 rm -rf conftest*
7054 ac_cv_struct_nlist_n_un=no
7056 rm -f conftest*
7059 echo "$ac_t""$ac_cv_struct_nlist_n_un" 1>&6
7060 if test $ac_cv_struct_nlist_n_un = yes; then
7061 cat >> confdefs.h <<\EOF
7062 #define NLIST_NAME_UNION 1
7067 else
7068 echo "$ac_t""no" 1>&6
7070 fi # Do not have getloadavg in system libraries.
7072 # Some definitions of getloadavg require that the program be installed setgid.
7073 echo $ac_n "checking whether getloadavg requires setgid""... $ac_c" 1>&6
7074 echo "configure:7075: checking whether getloadavg requires setgid" >&5
7075 if eval "test \"`echo '$''{'ac_cv_func_getloadavg_setgid'+set}'`\" = set"; then
7076 echo $ac_n "(cached) $ac_c" 1>&6
7077 else
7078 cat > conftest.$ac_ext <<EOF
7079 #line 7080 "configure"
7080 #include "confdefs.h"
7081 #include "$srcdir/getloadavg.c"
7082 #ifdef LDAV_PRIVILEGED
7083 Yowza Am I SETGID yet
7084 #endif
7086 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7087 egrep "Yowza Am I SETGID yet" >/dev/null 2>&1; then
7088 rm -rf conftest*
7089 ac_cv_func_getloadavg_setgid=yes
7090 else
7091 rm -rf conftest*
7092 ac_cv_func_getloadavg_setgid=no
7094 rm -f conftest*
7098 echo "$ac_t""$ac_cv_func_getloadavg_setgid" 1>&6
7099 if test $ac_cv_func_getloadavg_setgid = yes; then
7100 NEED_SETGID=true; cat >> confdefs.h <<\EOF
7101 #define GETLOADAVG_PRIVILEGED 1
7104 else
7105 NEED_SETGID=false
7108 if test $ac_cv_func_getloadavg_setgid = yes; then
7109 echo $ac_n "checking group of /dev/kmem""... $ac_c" 1>&6
7110 echo "configure:7111: checking group of /dev/kmem" >&5
7111 if eval "test \"`echo '$''{'ac_cv_group_kmem'+set}'`\" = set"; then
7112 echo $ac_n "(cached) $ac_c" 1>&6
7113 else
7114 # On Solaris, /dev/kmem is a symlink. Get info on the real file.
7115 ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null`
7116 # If we got an error (system does not support symlinks), try without -L.
7117 test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem`
7118 ac_cv_group_kmem=`echo $ac_ls_output \
7119 | sed -ne 's/[ ][ ]*/ /g;
7120 s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/;
7121 / /s/.* //;p;'`
7125 echo "$ac_t""$ac_cv_group_kmem" 1>&6
7126 KMEM_GROUP=$ac_cv_group_kmem
7130 echo $ac_n "checking for _LARGEFILE_SOURCE value needed for large files""... $ac_c" 1>&6
7131 echo "configure:7132: checking for _LARGEFILE_SOURCE value needed for large files" >&5
7132 if eval "test \"`echo '$''{'ac_cv_sys_largefile_source'+set}'`\" = set"; then
7133 echo $ac_n "(cached) $ac_c" 1>&6
7134 else
7135 ac_cv_sys_largefile_source=no
7136 cat > conftest.$ac_ext <<EOF
7137 #line 7138 "configure"
7138 #include "confdefs.h"
7139 #include <stdio.h>
7140 int main() {
7141 return !fseeko;
7142 ; return 0; }
7144 if { (eval echo configure:7145: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7146 else
7147 echo "configure: failed program was:" >&5
7148 cat conftest.$ac_ext >&5
7149 rm -rf conftest*
7150 cat > conftest.$ac_ext <<EOF
7151 #line 7152 "configure"
7152 #include "confdefs.h"
7153 #define _LARGEFILE_SOURCE 1
7154 #include <stdio.h>
7156 int main() {
7157 return !fseeko;
7158 ; return 0; }
7160 if { (eval echo configure:7161: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7161 rm -rf conftest*
7162 ac_cv_sys_largefile_source=1
7163 else
7164 echo "configure: failed program was:" >&5
7165 cat conftest.$ac_ext >&5
7167 rm -f conftest*
7169 rm -f conftest*
7172 echo "$ac_t""$ac_cv_sys_largefile_source" 1>&6
7173 if test "$ac_cv_sys_largefile_source" != no; then
7174 cat >> confdefs.h <<EOF
7175 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
7179 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
7180 # in glibc 2.1.3, but that breaks too many other things.
7181 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
7183 echo $ac_n "checking for fseeko""... $ac_c" 1>&6
7184 echo "configure:7185: checking for fseeko" >&5
7185 if eval "test \"`echo '$''{'ac_cv_func_fseeko'+set}'`\" = set"; then
7186 echo $ac_n "(cached) $ac_c" 1>&6
7187 else
7188 ac_cv_func_fseeko=no
7189 cat > conftest.$ac_ext <<EOF
7190 #line 7191 "configure"
7191 #include "confdefs.h"
7192 #include <stdio.h>
7193 int main() {
7194 return fseeko && fseeko (stdin, 0, 0);
7195 ; return 0; }
7197 if { (eval echo configure:7198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7198 rm -rf conftest*
7199 ac_cv_func_fseeko=yes
7200 else
7201 echo "configure: failed program was:" >&5
7202 cat conftest.$ac_ext >&5
7204 rm -f conftest*
7207 echo "$ac_t""$ac_cv_func_fseeko" 1>&6
7208 if test $ac_cv_func_fseeko != no; then
7209 cat >> confdefs.h <<\EOF
7210 #define HAVE_FSEEKO 1
7215 # UNIX98 PTYs.
7216 for ac_func in grantpt
7218 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7219 echo "configure:7220: checking for $ac_func" >&5
7220 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7221 echo $ac_n "(cached) $ac_c" 1>&6
7222 else
7223 cat > conftest.$ac_ext <<EOF
7224 #line 7225 "configure"
7225 #include "confdefs.h"
7226 /* System header to define __stub macros and hopefully few prototypes,
7227 which can conflict with char $ac_func(); below. */
7228 #include <assert.h>
7229 /* Override any gcc2 internal prototype to avoid an error. */
7230 /* We use char because int might match the return type of a gcc2
7231 builtin and then its argument prototype would still apply. */
7232 char $ac_func();
7234 int main() {
7236 /* The GNU C library defines this for functions which it implements
7237 to always fail with ENOSYS. Some functions are actually named
7238 something starting with __ and the normal name is an alias. */
7239 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7240 choke me
7241 #else
7242 $ac_func();
7243 #endif
7245 ; return 0; }
7247 if { (eval echo configure:7248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7248 rm -rf conftest*
7249 eval "ac_cv_func_$ac_func=yes"
7250 else
7251 echo "configure: failed program was:" >&5
7252 cat conftest.$ac_ext >&5
7253 rm -rf conftest*
7254 eval "ac_cv_func_$ac_func=no"
7256 rm -f conftest*
7259 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7260 echo "$ac_t""yes" 1>&6
7261 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7262 cat >> confdefs.h <<EOF
7263 #define $ac_tr_func 1
7266 else
7267 echo "$ac_t""no" 1>&6
7269 done
7272 # PTY-related GNU extensions.
7273 for ac_func in getpt
7275 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7276 echo "configure:7277: checking for $ac_func" >&5
7277 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7278 echo $ac_n "(cached) $ac_c" 1>&6
7279 else
7280 cat > conftest.$ac_ext <<EOF
7281 #line 7282 "configure"
7282 #include "confdefs.h"
7283 /* System header to define __stub macros and hopefully few prototypes,
7284 which can conflict with char $ac_func(); below. */
7285 #include <assert.h>
7286 /* Override any gcc2 internal prototype to avoid an error. */
7287 /* We use char because int might match the return type of a gcc2
7288 builtin and then its argument prototype would still apply. */
7289 char $ac_func();
7291 int main() {
7293 /* The GNU C library defines this for functions which it implements
7294 to always fail with ENOSYS. Some functions are actually named
7295 something starting with __ and the normal name is an alias. */
7296 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7297 choke me
7298 #else
7299 $ac_func();
7300 #endif
7302 ; return 0; }
7304 if { (eval echo configure:7305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7305 rm -rf conftest*
7306 eval "ac_cv_func_$ac_func=yes"
7307 else
7308 echo "configure: failed program was:" >&5
7309 cat conftest.$ac_ext >&5
7310 rm -rf conftest*
7311 eval "ac_cv_func_$ac_func=no"
7313 rm -f conftest*
7316 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7317 echo "$ac_t""yes" 1>&6
7318 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7319 cat >> confdefs.h <<EOF
7320 #define $ac_tr_func 1
7323 else
7324 echo "$ac_t""no" 1>&6
7326 done
7329 # Check this now, so that we will NOT find the above functions in ncurses.
7330 # That is because we have not set up to link ncurses in lib-src.
7331 # It's better to believe a function is not available
7332 # than to expect to find it in ncurses.
7333 echo $ac_n "checking for tparm in -lncurses""... $ac_c" 1>&6
7334 echo "configure:7335: checking for tparm in -lncurses" >&5
7335 ac_lib_var=`echo ncurses'_'tparm | sed 'y%./+-%__p_%'`
7336 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7337 echo $ac_n "(cached) $ac_c" 1>&6
7338 else
7339 ac_save_LIBS="$LIBS"
7340 LIBS="-lncurses $LIBS"
7341 cat > conftest.$ac_ext <<EOF
7342 #line 7343 "configure"
7343 #include "confdefs.h"
7344 /* Override any gcc2 internal prototype to avoid an error. */
7345 /* We use char because int might match the return type of a gcc2
7346 builtin and then its argument prototype would still apply. */
7347 char tparm();
7349 int main() {
7350 tparm()
7351 ; return 0; }
7353 if { (eval echo configure:7354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7354 rm -rf conftest*
7355 eval "ac_cv_lib_$ac_lib_var=yes"
7356 else
7357 echo "configure: failed program was:" >&5
7358 cat conftest.$ac_ext >&5
7359 rm -rf conftest*
7360 eval "ac_cv_lib_$ac_lib_var=no"
7362 rm -f conftest*
7363 LIBS="$ac_save_LIBS"
7366 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7367 echo "$ac_t""yes" 1>&6
7368 ac_tr_lib=HAVE_LIB`echo ncurses | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7369 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7370 cat >> confdefs.h <<EOF
7371 #define $ac_tr_lib 1
7374 LIBS="-lncurses $LIBS"
7376 else
7377 echo "$ac_t""no" 1>&6
7381 # Do we need the Hesiod library to provide the support routines?
7382 if test "$with_hesiod" = yes ; then
7383 # Don't set $LIBS here -- see comments above.
7384 resolv=no
7385 echo $ac_n "checking for res_send""... $ac_c" 1>&6
7386 echo "configure:7387: checking for res_send" >&5
7387 if eval "test \"`echo '$''{'ac_cv_func_res_send'+set}'`\" = set"; then
7388 echo $ac_n "(cached) $ac_c" 1>&6
7389 else
7390 cat > conftest.$ac_ext <<EOF
7391 #line 7392 "configure"
7392 #include "confdefs.h"
7393 /* System header to define __stub macros and hopefully few prototypes,
7394 which can conflict with char res_send(); below. */
7395 #include <assert.h>
7396 /* Override any gcc2 internal prototype to avoid an error. */
7397 /* We use char because int might match the return type of a gcc2
7398 builtin and then its argument prototype would still apply. */
7399 char res_send();
7401 int main() {
7403 /* The GNU C library defines this for functions which it implements
7404 to always fail with ENOSYS. Some functions are actually named
7405 something starting with __ and the normal name is an alias. */
7406 #if defined (__stub_res_send) || defined (__stub___res_send)
7407 choke me
7408 #else
7409 res_send();
7410 #endif
7412 ; return 0; }
7414 if { (eval echo configure:7415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7415 rm -rf conftest*
7416 eval "ac_cv_func_res_send=yes"
7417 else
7418 echo "configure: failed program was:" >&5
7419 cat conftest.$ac_ext >&5
7420 rm -rf conftest*
7421 eval "ac_cv_func_res_send=no"
7423 rm -f conftest*
7426 if eval "test \"`echo '$ac_cv_func_'res_send`\" = yes"; then
7427 echo "$ac_t""yes" 1>&6
7429 else
7430 echo "$ac_t""no" 1>&6
7431 echo $ac_n "checking for __res_send""... $ac_c" 1>&6
7432 echo "configure:7433: checking for __res_send" >&5
7433 if eval "test \"`echo '$''{'ac_cv_func___res_send'+set}'`\" = set"; then
7434 echo $ac_n "(cached) $ac_c" 1>&6
7435 else
7436 cat > conftest.$ac_ext <<EOF
7437 #line 7438 "configure"
7438 #include "confdefs.h"
7439 /* System header to define __stub macros and hopefully few prototypes,
7440 which can conflict with char __res_send(); below. */
7441 #include <assert.h>
7442 /* Override any gcc2 internal prototype to avoid an error. */
7443 /* We use char because int might match the return type of a gcc2
7444 builtin and then its argument prototype would still apply. */
7445 char __res_send();
7447 int main() {
7449 /* The GNU C library defines this for functions which it implements
7450 to always fail with ENOSYS. Some functions are actually named
7451 something starting with __ and the normal name is an alias. */
7452 #if defined (__stub___res_send) || defined (__stub_____res_send)
7453 choke me
7454 #else
7455 __res_send();
7456 #endif
7458 ; return 0; }
7460 if { (eval echo configure:7461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7461 rm -rf conftest*
7462 eval "ac_cv_func___res_send=yes"
7463 else
7464 echo "configure: failed program was:" >&5
7465 cat conftest.$ac_ext >&5
7466 rm -rf conftest*
7467 eval "ac_cv_func___res_send=no"
7469 rm -f conftest*
7472 if eval "test \"`echo '$ac_cv_func_'__res_send`\" = yes"; then
7473 echo "$ac_t""yes" 1>&6
7475 else
7476 echo "$ac_t""no" 1>&6
7477 echo $ac_n "checking for res_send in -lresolv""... $ac_c" 1>&6
7478 echo "configure:7479: checking for res_send in -lresolv" >&5
7479 ac_lib_var=`echo resolv'_'res_send | sed 'y%./+-%__p_%'`
7480 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7481 echo $ac_n "(cached) $ac_c" 1>&6
7482 else
7483 ac_save_LIBS="$LIBS"
7484 LIBS="-lresolv $LIBS"
7485 cat > conftest.$ac_ext <<EOF
7486 #line 7487 "configure"
7487 #include "confdefs.h"
7488 /* Override any gcc2 internal prototype to avoid an error. */
7489 /* We use char because int might match the return type of a gcc2
7490 builtin and then its argument prototype would still apply. */
7491 char res_send();
7493 int main() {
7494 res_send()
7495 ; return 0; }
7497 if { (eval echo configure:7498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7498 rm -rf conftest*
7499 eval "ac_cv_lib_$ac_lib_var=yes"
7500 else
7501 echo "configure: failed program was:" >&5
7502 cat conftest.$ac_ext >&5
7503 rm -rf conftest*
7504 eval "ac_cv_lib_$ac_lib_var=no"
7506 rm -f conftest*
7507 LIBS="$ac_save_LIBS"
7510 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7511 echo "$ac_t""yes" 1>&6
7512 resolv=yes
7513 else
7514 echo "$ac_t""no" 1>&6
7515 echo $ac_n "checking for __res_send in -lresolv""... $ac_c" 1>&6
7516 echo "configure:7517: checking for __res_send in -lresolv" >&5
7517 ac_lib_var=`echo resolv'_'__res_send | sed 'y%./+-%__p_%'`
7518 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7519 echo $ac_n "(cached) $ac_c" 1>&6
7520 else
7521 ac_save_LIBS="$LIBS"
7522 LIBS="-lresolv $LIBS"
7523 cat > conftest.$ac_ext <<EOF
7524 #line 7525 "configure"
7525 #include "confdefs.h"
7526 /* Override any gcc2 internal prototype to avoid an error. */
7527 /* We use char because int might match the return type of a gcc2
7528 builtin and then its argument prototype would still apply. */
7529 char __res_send();
7531 int main() {
7532 __res_send()
7533 ; return 0; }
7535 if { (eval echo configure:7536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7536 rm -rf conftest*
7537 eval "ac_cv_lib_$ac_lib_var=yes"
7538 else
7539 echo "configure: failed program was:" >&5
7540 cat conftest.$ac_ext >&5
7541 rm -rf conftest*
7542 eval "ac_cv_lib_$ac_lib_var=no"
7544 rm -f conftest*
7545 LIBS="$ac_save_LIBS"
7548 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7549 echo "$ac_t""yes" 1>&6
7550 resolv=yes
7551 else
7552 echo "$ac_t""no" 1>&6
7561 if test "$resolv" = yes ; then
7562 RESOLVLIB=-lresolv
7563 cat >> confdefs.h <<\EOF
7564 #define HAVE_LIBRESOLV 1
7567 else
7568 RESOLVLIB=
7570 echo $ac_n "checking for hes_getmailhost""... $ac_c" 1>&6
7571 echo "configure:7572: checking for hes_getmailhost" >&5
7572 if eval "test \"`echo '$''{'ac_cv_func_hes_getmailhost'+set}'`\" = set"; then
7573 echo $ac_n "(cached) $ac_c" 1>&6
7574 else
7575 cat > conftest.$ac_ext <<EOF
7576 #line 7577 "configure"
7577 #include "confdefs.h"
7578 /* System header to define __stub macros and hopefully few prototypes,
7579 which can conflict with char hes_getmailhost(); below. */
7580 #include <assert.h>
7581 /* Override any gcc2 internal prototype to avoid an error. */
7582 /* We use char because int might match the return type of a gcc2
7583 builtin and then its argument prototype would still apply. */
7584 char hes_getmailhost();
7586 int main() {
7588 /* The GNU C library defines this for functions which it implements
7589 to always fail with ENOSYS. Some functions are actually named
7590 something starting with __ and the normal name is an alias. */
7591 #if defined (__stub_hes_getmailhost) || defined (__stub___hes_getmailhost)
7592 choke me
7593 #else
7594 hes_getmailhost();
7595 #endif
7597 ; return 0; }
7599 if { (eval echo configure:7600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7600 rm -rf conftest*
7601 eval "ac_cv_func_hes_getmailhost=yes"
7602 else
7603 echo "configure: failed program was:" >&5
7604 cat conftest.$ac_ext >&5
7605 rm -rf conftest*
7606 eval "ac_cv_func_hes_getmailhost=no"
7608 rm -f conftest*
7611 if eval "test \"`echo '$ac_cv_func_'hes_getmailhost`\" = yes"; then
7612 echo "$ac_t""yes" 1>&6
7614 else
7615 echo "$ac_t""no" 1>&6
7616 echo $ac_n "checking for hes_getmailhost in -lhesiod""... $ac_c" 1>&6
7617 echo "configure:7618: checking for hes_getmailhost in -lhesiod" >&5
7618 ac_lib_var=`echo hesiod'_'hes_getmailhost | sed 'y%./+-%__p_%'`
7619 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7620 echo $ac_n "(cached) $ac_c" 1>&6
7621 else
7622 ac_save_LIBS="$LIBS"
7623 LIBS="-lhesiod $RESOLVLIB $LIBS"
7624 cat > conftest.$ac_ext <<EOF
7625 #line 7626 "configure"
7626 #include "confdefs.h"
7627 /* Override any gcc2 internal prototype to avoid an error. */
7628 /* We use char because int might match the return type of a gcc2
7629 builtin and then its argument prototype would still apply. */
7630 char hes_getmailhost();
7632 int main() {
7633 hes_getmailhost()
7634 ; return 0; }
7636 if { (eval echo configure:7637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7637 rm -rf conftest*
7638 eval "ac_cv_lib_$ac_lib_var=yes"
7639 else
7640 echo "configure: failed program was:" >&5
7641 cat conftest.$ac_ext >&5
7642 rm -rf conftest*
7643 eval "ac_cv_lib_$ac_lib_var=no"
7645 rm -f conftest*
7646 LIBS="$ac_save_LIBS"
7649 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7650 echo "$ac_t""yes" 1>&6
7651 cat >> confdefs.h <<\EOF
7652 #define HAVE_LIBHESIOD 1
7655 else
7656 echo "$ac_t""no" 1>&6
7664 # These tell us which Kerberos-related libraries to use.
7665 if test "${with_kerberos+set}" = set; then
7666 echo $ac_n "checking for com_err in -lcom_err""... $ac_c" 1>&6
7667 echo "configure:7668: checking for com_err in -lcom_err" >&5
7668 ac_lib_var=`echo com_err'_'com_err | sed 'y%./+-%__p_%'`
7669 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7670 echo $ac_n "(cached) $ac_c" 1>&6
7671 else
7672 ac_save_LIBS="$LIBS"
7673 LIBS="-lcom_err $LIBS"
7674 cat > conftest.$ac_ext <<EOF
7675 #line 7676 "configure"
7676 #include "confdefs.h"
7677 /* Override any gcc2 internal prototype to avoid an error. */
7678 /* We use char because int might match the return type of a gcc2
7679 builtin and then its argument prototype would still apply. */
7680 char com_err();
7682 int main() {
7683 com_err()
7684 ; return 0; }
7686 if { (eval echo configure:7687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7687 rm -rf conftest*
7688 eval "ac_cv_lib_$ac_lib_var=yes"
7689 else
7690 echo "configure: failed program was:" >&5
7691 cat conftest.$ac_ext >&5
7692 rm -rf conftest*
7693 eval "ac_cv_lib_$ac_lib_var=no"
7695 rm -f conftest*
7696 LIBS="$ac_save_LIBS"
7699 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7700 echo "$ac_t""yes" 1>&6
7701 ac_tr_lib=HAVE_LIB`echo com_err | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7702 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7703 cat >> confdefs.h <<EOF
7704 #define $ac_tr_lib 1
7707 LIBS="-lcom_err $LIBS"
7709 else
7710 echo "$ac_t""no" 1>&6
7713 echo $ac_n "checking for mit_des_cbc_encrypt in -lk5crypto""... $ac_c" 1>&6
7714 echo "configure:7715: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
7715 ac_lib_var=`echo k5crypto'_'mit_des_cbc_encrypt | sed 'y%./+-%__p_%'`
7716 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7717 echo $ac_n "(cached) $ac_c" 1>&6
7718 else
7719 ac_save_LIBS="$LIBS"
7720 LIBS="-lk5crypto $LIBS"
7721 cat > conftest.$ac_ext <<EOF
7722 #line 7723 "configure"
7723 #include "confdefs.h"
7724 /* Override any gcc2 internal prototype to avoid an error. */
7725 /* We use char because int might match the return type of a gcc2
7726 builtin and then its argument prototype would still apply. */
7727 char mit_des_cbc_encrypt();
7729 int main() {
7730 mit_des_cbc_encrypt()
7731 ; return 0; }
7733 if { (eval echo configure:7734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7734 rm -rf conftest*
7735 eval "ac_cv_lib_$ac_lib_var=yes"
7736 else
7737 echo "configure: failed program was:" >&5
7738 cat conftest.$ac_ext >&5
7739 rm -rf conftest*
7740 eval "ac_cv_lib_$ac_lib_var=no"
7742 rm -f conftest*
7743 LIBS="$ac_save_LIBS"
7746 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7747 echo "$ac_t""yes" 1>&6
7748 ac_tr_lib=HAVE_LIB`echo k5crypto | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7749 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7750 cat >> confdefs.h <<EOF
7751 #define $ac_tr_lib 1
7754 LIBS="-lk5crypto $LIBS"
7756 else
7757 echo "$ac_t""no" 1>&6
7760 echo $ac_n "checking for mit_des_cbc_encrypt in -lcrypto""... $ac_c" 1>&6
7761 echo "configure:7762: checking for mit_des_cbc_encrypt in -lcrypto" >&5
7762 ac_lib_var=`echo crypto'_'mit_des_cbc_encrypt | sed 'y%./+-%__p_%'`
7763 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7764 echo $ac_n "(cached) $ac_c" 1>&6
7765 else
7766 ac_save_LIBS="$LIBS"
7767 LIBS="-lcrypto $LIBS"
7768 cat > conftest.$ac_ext <<EOF
7769 #line 7770 "configure"
7770 #include "confdefs.h"
7771 /* Override any gcc2 internal prototype to avoid an error. */
7772 /* We use char because int might match the return type of a gcc2
7773 builtin and then its argument prototype would still apply. */
7774 char mit_des_cbc_encrypt();
7776 int main() {
7777 mit_des_cbc_encrypt()
7778 ; return 0; }
7780 if { (eval echo configure:7781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7781 rm -rf conftest*
7782 eval "ac_cv_lib_$ac_lib_var=yes"
7783 else
7784 echo "configure: failed program was:" >&5
7785 cat conftest.$ac_ext >&5
7786 rm -rf conftest*
7787 eval "ac_cv_lib_$ac_lib_var=no"
7789 rm -f conftest*
7790 LIBS="$ac_save_LIBS"
7793 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7794 echo "$ac_t""yes" 1>&6
7795 ac_tr_lib=HAVE_LIB`echo crypto | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7796 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7797 cat >> confdefs.h <<EOF
7798 #define $ac_tr_lib 1
7801 LIBS="-lcrypto $LIBS"
7803 else
7804 echo "$ac_t""no" 1>&6
7807 echo $ac_n "checking for krb5_init_context in -lkrb5""... $ac_c" 1>&6
7808 echo "configure:7809: checking for krb5_init_context in -lkrb5" >&5
7809 ac_lib_var=`echo krb5'_'krb5_init_context | sed 'y%./+-%__p_%'`
7810 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7811 echo $ac_n "(cached) $ac_c" 1>&6
7812 else
7813 ac_save_LIBS="$LIBS"
7814 LIBS="-lkrb5 $LIBS"
7815 cat > conftest.$ac_ext <<EOF
7816 #line 7817 "configure"
7817 #include "confdefs.h"
7818 /* Override any gcc2 internal prototype to avoid an error. */
7819 /* We use char because int might match the return type of a gcc2
7820 builtin and then its argument prototype would still apply. */
7821 char krb5_init_context();
7823 int main() {
7824 krb5_init_context()
7825 ; return 0; }
7827 if { (eval echo configure:7828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7828 rm -rf conftest*
7829 eval "ac_cv_lib_$ac_lib_var=yes"
7830 else
7831 echo "configure: failed program was:" >&5
7832 cat conftest.$ac_ext >&5
7833 rm -rf conftest*
7834 eval "ac_cv_lib_$ac_lib_var=no"
7836 rm -f conftest*
7837 LIBS="$ac_save_LIBS"
7840 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7841 echo "$ac_t""yes" 1>&6
7842 ac_tr_lib=HAVE_LIB`echo krb5 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7843 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7844 cat >> confdefs.h <<EOF
7845 #define $ac_tr_lib 1
7848 LIBS="-lkrb5 $LIBS"
7850 else
7851 echo "$ac_t""no" 1>&6
7854 if test "${with_kerberos5+set}" != set; then
7855 echo $ac_n "checking for des_cbc_encrypt in -ldes425""... $ac_c" 1>&6
7856 echo "configure:7857: checking for des_cbc_encrypt in -ldes425" >&5
7857 ac_lib_var=`echo des425'_'des_cbc_encrypt | sed 'y%./+-%__p_%'`
7858 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7859 echo $ac_n "(cached) $ac_c" 1>&6
7860 else
7861 ac_save_LIBS="$LIBS"
7862 LIBS="-ldes425 $LIBS"
7863 cat > conftest.$ac_ext <<EOF
7864 #line 7865 "configure"
7865 #include "confdefs.h"
7866 /* Override any gcc2 internal prototype to avoid an error. */
7867 /* We use char because int might match the return type of a gcc2
7868 builtin and then its argument prototype would still apply. */
7869 char des_cbc_encrypt();
7871 int main() {
7872 des_cbc_encrypt()
7873 ; return 0; }
7875 if { (eval echo configure:7876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7876 rm -rf conftest*
7877 eval "ac_cv_lib_$ac_lib_var=yes"
7878 else
7879 echo "configure: failed program was:" >&5
7880 cat conftest.$ac_ext >&5
7881 rm -rf conftest*
7882 eval "ac_cv_lib_$ac_lib_var=no"
7884 rm -f conftest*
7885 LIBS="$ac_save_LIBS"
7888 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7889 echo "$ac_t""yes" 1>&6
7890 ac_tr_lib=HAVE_LIB`echo des425 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7891 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7892 cat >> confdefs.h <<EOF
7893 #define $ac_tr_lib 1
7896 LIBS="-ldes425 $LIBS"
7898 else
7899 echo "$ac_t""no" 1>&6
7900 echo $ac_n "checking for des_cbc_encrypt in -ldes""... $ac_c" 1>&6
7901 echo "configure:7902: checking for des_cbc_encrypt in -ldes" >&5
7902 ac_lib_var=`echo des'_'des_cbc_encrypt | sed 'y%./+-%__p_%'`
7903 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7904 echo $ac_n "(cached) $ac_c" 1>&6
7905 else
7906 ac_save_LIBS="$LIBS"
7907 LIBS="-ldes $LIBS"
7908 cat > conftest.$ac_ext <<EOF
7909 #line 7910 "configure"
7910 #include "confdefs.h"
7911 /* Override any gcc2 internal prototype to avoid an error. */
7912 /* We use char because int might match the return type of a gcc2
7913 builtin and then its argument prototype would still apply. */
7914 char des_cbc_encrypt();
7916 int main() {
7917 des_cbc_encrypt()
7918 ; return 0; }
7920 if { (eval echo configure:7921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7921 rm -rf conftest*
7922 eval "ac_cv_lib_$ac_lib_var=yes"
7923 else
7924 echo "configure: failed program was:" >&5
7925 cat conftest.$ac_ext >&5
7926 rm -rf conftest*
7927 eval "ac_cv_lib_$ac_lib_var=no"
7929 rm -f conftest*
7930 LIBS="$ac_save_LIBS"
7933 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7934 echo "$ac_t""yes" 1>&6
7935 ac_tr_lib=HAVE_LIB`echo des | sed -e 's/^a-zA-Z0-9_/_/g' \
7936 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7937 cat >> confdefs.h <<EOF
7938 #define $ac_tr_lib 1
7941 LIBS="-ldes $LIBS"
7943 else
7944 echo "$ac_t""no" 1>&6
7949 echo $ac_n "checking for krb_get_cred in -lkrb4""... $ac_c" 1>&6
7950 echo "configure:7951: checking for krb_get_cred in -lkrb4" >&5
7951 ac_lib_var=`echo krb4'_'krb_get_cred | sed 'y%./+-%__p_%'`
7952 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7953 echo $ac_n "(cached) $ac_c" 1>&6
7954 else
7955 ac_save_LIBS="$LIBS"
7956 LIBS="-lkrb4 $LIBS"
7957 cat > conftest.$ac_ext <<EOF
7958 #line 7959 "configure"
7959 #include "confdefs.h"
7960 /* Override any gcc2 internal prototype to avoid an error. */
7961 /* We use char because int might match the return type of a gcc2
7962 builtin and then its argument prototype would still apply. */
7963 char krb_get_cred();
7965 int main() {
7966 krb_get_cred()
7967 ; return 0; }
7969 if { (eval echo configure:7970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7970 rm -rf conftest*
7971 eval "ac_cv_lib_$ac_lib_var=yes"
7972 else
7973 echo "configure: failed program was:" >&5
7974 cat conftest.$ac_ext >&5
7975 rm -rf conftest*
7976 eval "ac_cv_lib_$ac_lib_var=no"
7978 rm -f conftest*
7979 LIBS="$ac_save_LIBS"
7982 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7983 echo "$ac_t""yes" 1>&6
7984 ac_tr_lib=HAVE_LIB`echo krb4 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7985 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7986 cat >> confdefs.h <<EOF
7987 #define $ac_tr_lib 1
7990 LIBS="-lkrb4 $LIBS"
7992 else
7993 echo "$ac_t""no" 1>&6
7994 echo $ac_n "checking for krb_get_cred in -lkrb""... $ac_c" 1>&6
7995 echo "configure:7996: checking for krb_get_cred in -lkrb" >&5
7996 ac_lib_var=`echo krb'_'krb_get_cred | sed 'y%./+-%__p_%'`
7997 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7998 echo $ac_n "(cached) $ac_c" 1>&6
7999 else
8000 ac_save_LIBS="$LIBS"
8001 LIBS="-lkrb $LIBS"
8002 cat > conftest.$ac_ext <<EOF
8003 #line 8004 "configure"
8004 #include "confdefs.h"
8005 /* Override any gcc2 internal prototype to avoid an error. */
8006 /* We use char because int might match the return type of a gcc2
8007 builtin and then its argument prototype would still apply. */
8008 char krb_get_cred();
8010 int main() {
8011 krb_get_cred()
8012 ; return 0; }
8014 if { (eval echo configure:8015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8015 rm -rf conftest*
8016 eval "ac_cv_lib_$ac_lib_var=yes"
8017 else
8018 echo "configure: failed program was:" >&5
8019 cat conftest.$ac_ext >&5
8020 rm -rf conftest*
8021 eval "ac_cv_lib_$ac_lib_var=no"
8023 rm -f conftest*
8024 LIBS="$ac_save_LIBS"
8027 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8028 echo "$ac_t""yes" 1>&6
8029 ac_tr_lib=HAVE_LIB`echo krb | sed -e 's/^a-zA-Z0-9_/_/g' \
8030 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8031 cat >> confdefs.h <<EOF
8032 #define $ac_tr_lib 1
8035 LIBS="-lkrb $LIBS"
8037 else
8038 echo "$ac_t""no" 1>&6
8045 if test "${with_kerberos5+set}" = set; then
8046 for ac_hdr in krb5.h
8048 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8049 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8050 echo "configure:8051: checking for $ac_hdr" >&5
8051 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8052 echo $ac_n "(cached) $ac_c" 1>&6
8053 else
8054 cat > conftest.$ac_ext <<EOF
8055 #line 8056 "configure"
8056 #include "confdefs.h"
8057 #include <$ac_hdr>
8059 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8060 { (eval echo configure:8061: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8061 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8062 if test -z "$ac_err"; then
8063 rm -rf conftest*
8064 eval "ac_cv_header_$ac_safe=yes"
8065 else
8066 echo "$ac_err" >&5
8067 echo "configure: failed program was:" >&5
8068 cat conftest.$ac_ext >&5
8069 rm -rf conftest*
8070 eval "ac_cv_header_$ac_safe=no"
8072 rm -f conftest*
8074 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8075 echo "$ac_t""yes" 1>&6
8076 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8077 cat >> confdefs.h <<EOF
8078 #define $ac_tr_hdr 1
8081 else
8082 echo "$ac_t""no" 1>&6
8084 done
8086 else
8087 for ac_hdr in des.h
8089 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8090 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8091 echo "configure:8092: checking for $ac_hdr" >&5
8092 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8093 echo $ac_n "(cached) $ac_c" 1>&6
8094 else
8095 cat > conftest.$ac_ext <<EOF
8096 #line 8097 "configure"
8097 #include "confdefs.h"
8098 #include <$ac_hdr>
8100 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8101 { (eval echo configure:8102: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8102 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8103 if test -z "$ac_err"; then
8104 rm -rf conftest*
8105 eval "ac_cv_header_$ac_safe=yes"
8106 else
8107 echo "$ac_err" >&5
8108 echo "configure: failed program was:" >&5
8109 cat conftest.$ac_ext >&5
8110 rm -rf conftest*
8111 eval "ac_cv_header_$ac_safe=no"
8113 rm -f conftest*
8115 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8116 echo "$ac_t""yes" 1>&6
8117 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8118 cat >> confdefs.h <<EOF
8119 #define $ac_tr_hdr 1
8122 else
8123 echo "$ac_t""no" 1>&6
8124 for ac_hdr in kerberosIV/des.h
8126 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8127 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8128 echo "configure:8129: checking for $ac_hdr" >&5
8129 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8130 echo $ac_n "(cached) $ac_c" 1>&6
8131 else
8132 cat > conftest.$ac_ext <<EOF
8133 #line 8134 "configure"
8134 #include "confdefs.h"
8135 #include <$ac_hdr>
8137 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8138 { (eval echo configure:8139: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8139 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8140 if test -z "$ac_err"; then
8141 rm -rf conftest*
8142 eval "ac_cv_header_$ac_safe=yes"
8143 else
8144 echo "$ac_err" >&5
8145 echo "configure: failed program was:" >&5
8146 cat conftest.$ac_ext >&5
8147 rm -rf conftest*
8148 eval "ac_cv_header_$ac_safe=no"
8150 rm -f conftest*
8152 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8153 echo "$ac_t""yes" 1>&6
8154 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8155 cat >> confdefs.h <<EOF
8156 #define $ac_tr_hdr 1
8159 else
8160 echo "$ac_t""no" 1>&6
8161 for ac_hdr in kerberos/des.h
8163 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8164 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8165 echo "configure:8166: checking for $ac_hdr" >&5
8166 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8167 echo $ac_n "(cached) $ac_c" 1>&6
8168 else
8169 cat > conftest.$ac_ext <<EOF
8170 #line 8171 "configure"
8171 #include "confdefs.h"
8172 #include <$ac_hdr>
8174 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8175 { (eval echo configure:8176: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8176 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8177 if test -z "$ac_err"; then
8178 rm -rf conftest*
8179 eval "ac_cv_header_$ac_safe=yes"
8180 else
8181 echo "$ac_err" >&5
8182 echo "configure: failed program was:" >&5
8183 cat conftest.$ac_ext >&5
8184 rm -rf conftest*
8185 eval "ac_cv_header_$ac_safe=no"
8187 rm -f conftest*
8189 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8190 echo "$ac_t""yes" 1>&6
8191 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8192 cat >> confdefs.h <<EOF
8193 #define $ac_tr_hdr 1
8196 else
8197 echo "$ac_t""no" 1>&6
8199 done
8202 done
8205 done
8207 for ac_hdr in krb.h
8209 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8210 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8211 echo "configure:8212: checking for $ac_hdr" >&5
8212 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8213 echo $ac_n "(cached) $ac_c" 1>&6
8214 else
8215 cat > conftest.$ac_ext <<EOF
8216 #line 8217 "configure"
8217 #include "confdefs.h"
8218 #include <$ac_hdr>
8220 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8221 { (eval echo configure:8222: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8222 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8223 if test -z "$ac_err"; then
8224 rm -rf conftest*
8225 eval "ac_cv_header_$ac_safe=yes"
8226 else
8227 echo "$ac_err" >&5
8228 echo "configure: failed program was:" >&5
8229 cat conftest.$ac_ext >&5
8230 rm -rf conftest*
8231 eval "ac_cv_header_$ac_safe=no"
8233 rm -f conftest*
8235 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8236 echo "$ac_t""yes" 1>&6
8237 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8238 cat >> confdefs.h <<EOF
8239 #define $ac_tr_hdr 1
8242 else
8243 echo "$ac_t""no" 1>&6
8244 for ac_hdr in kerberosIV/krb.h
8246 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8247 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8248 echo "configure:8249: checking for $ac_hdr" >&5
8249 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8250 echo $ac_n "(cached) $ac_c" 1>&6
8251 else
8252 cat > conftest.$ac_ext <<EOF
8253 #line 8254 "configure"
8254 #include "confdefs.h"
8255 #include <$ac_hdr>
8257 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8258 { (eval echo configure:8259: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8259 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8260 if test -z "$ac_err"; then
8261 rm -rf conftest*
8262 eval "ac_cv_header_$ac_safe=yes"
8263 else
8264 echo "$ac_err" >&5
8265 echo "configure: failed program was:" >&5
8266 cat conftest.$ac_ext >&5
8267 rm -rf conftest*
8268 eval "ac_cv_header_$ac_safe=no"
8270 rm -f conftest*
8272 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8273 echo "$ac_t""yes" 1>&6
8274 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8275 cat >> confdefs.h <<EOF
8276 #define $ac_tr_hdr 1
8279 else
8280 echo "$ac_t""no" 1>&6
8281 for ac_hdr in kerberos/krb.h
8283 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8284 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8285 echo "configure:8286: checking for $ac_hdr" >&5
8286 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8287 echo $ac_n "(cached) $ac_c" 1>&6
8288 else
8289 cat > conftest.$ac_ext <<EOF
8290 #line 8291 "configure"
8291 #include "confdefs.h"
8292 #include <$ac_hdr>
8294 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8295 { (eval echo configure:8296: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8296 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8297 if test -z "$ac_err"; then
8298 rm -rf conftest*
8299 eval "ac_cv_header_$ac_safe=yes"
8300 else
8301 echo "$ac_err" >&5
8302 echo "configure: failed program was:" >&5
8303 cat conftest.$ac_ext >&5
8304 rm -rf conftest*
8305 eval "ac_cv_header_$ac_safe=no"
8307 rm -f conftest*
8309 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8310 echo "$ac_t""yes" 1>&6
8311 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8312 cat >> confdefs.h <<EOF
8313 #define $ac_tr_hdr 1
8316 else
8317 echo "$ac_t""no" 1>&6
8319 done
8322 done
8325 done
8328 for ac_hdr in com_err.h
8330 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8331 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8332 echo "configure:8333: checking for $ac_hdr" >&5
8333 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8334 echo $ac_n "(cached) $ac_c" 1>&6
8335 else
8336 cat > conftest.$ac_ext <<EOF
8337 #line 8338 "configure"
8338 #include "confdefs.h"
8339 #include <$ac_hdr>
8341 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8342 { (eval echo configure:8343: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8343 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8344 if test -z "$ac_err"; then
8345 rm -rf conftest*
8346 eval "ac_cv_header_$ac_safe=yes"
8347 else
8348 echo "$ac_err" >&5
8349 echo "configure: failed program was:" >&5
8350 cat conftest.$ac_ext >&5
8351 rm -rf conftest*
8352 eval "ac_cv_header_$ac_safe=no"
8354 rm -f conftest*
8356 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8357 echo "$ac_t""yes" 1>&6
8358 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8359 cat >> confdefs.h <<EOF
8360 #define $ac_tr_hdr 1
8363 else
8364 echo "$ac_t""no" 1>&6
8366 done
8370 # Solaris requires -lintl if you want strerror (which calls dgettext)
8371 # to return localized messages.
8372 echo $ac_n "checking for dgettext in -lintl""... $ac_c" 1>&6
8373 echo "configure:8374: checking for dgettext in -lintl" >&5
8374 ac_lib_var=`echo intl'_'dgettext | sed 'y%./+-%__p_%'`
8375 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8376 echo $ac_n "(cached) $ac_c" 1>&6
8377 else
8378 ac_save_LIBS="$LIBS"
8379 LIBS="-lintl $LIBS"
8380 cat > conftest.$ac_ext <<EOF
8381 #line 8382 "configure"
8382 #include "confdefs.h"
8383 /* Override any gcc2 internal prototype to avoid an error. */
8384 /* We use char because int might match the return type of a gcc2
8385 builtin and then its argument prototype would still apply. */
8386 char dgettext();
8388 int main() {
8389 dgettext()
8390 ; return 0; }
8392 if { (eval echo configure:8393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8393 rm -rf conftest*
8394 eval "ac_cv_lib_$ac_lib_var=yes"
8395 else
8396 echo "configure: failed program was:" >&5
8397 cat conftest.$ac_ext >&5
8398 rm -rf conftest*
8399 eval "ac_cv_lib_$ac_lib_var=no"
8401 rm -f conftest*
8402 LIBS="$ac_save_LIBS"
8405 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8406 echo "$ac_t""yes" 1>&6
8407 ac_tr_lib=HAVE_LIB`echo intl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8408 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8409 cat >> confdefs.h <<EOF
8410 #define $ac_tr_lib 1
8413 LIBS="-lintl $LIBS"
8415 else
8416 echo "$ac_t""no" 1>&6
8420 echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
8421 echo "configure:8422: checking whether localtime caches TZ" >&5
8422 if eval "test \"`echo '$''{'emacs_cv_localtime_cache'+set}'`\" = set"; then
8423 echo $ac_n "(cached) $ac_c" 1>&6
8424 else
8425 if test x$ac_cv_func_tzset = xyes; then
8426 if test "$cross_compiling" = yes; then
8427 # If we have tzset, assume the worst when cross-compiling.
8428 emacs_cv_localtime_cache=yes
8429 else
8430 cat > conftest.$ac_ext <<EOF
8431 #line 8432 "configure"
8432 #include "confdefs.h"
8433 #include <time.h>
8434 extern char **environ;
8435 unset_TZ ()
8437 char **from, **to;
8438 for (to = from = environ; (*to = *from); from++)
8439 if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
8440 to++;
8442 char TZ_GMT0[] = "TZ=GMT0";
8443 char TZ_PST8[] = "TZ=PST8";
8444 main()
8446 time_t now = time ((time_t *) 0);
8447 int hour_GMT0, hour_unset;
8448 if (putenv (TZ_GMT0) != 0)
8449 exit (1);
8450 hour_GMT0 = localtime (&now)->tm_hour;
8451 unset_TZ ();
8452 hour_unset = localtime (&now)->tm_hour;
8453 if (putenv (TZ_PST8) != 0)
8454 exit (1);
8455 if (localtime (&now)->tm_hour == hour_GMT0)
8456 exit (1);
8457 unset_TZ ();
8458 if (localtime (&now)->tm_hour != hour_unset)
8459 exit (1);
8460 exit (0);
8463 if { (eval echo configure:8464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8464 then
8465 emacs_cv_localtime_cache=no
8466 else
8467 echo "configure: failed program was:" >&5
8468 cat conftest.$ac_ext >&5
8469 rm -fr conftest*
8470 emacs_cv_localtime_cache=yes
8472 rm -fr conftest*
8475 else
8476 # If we lack tzset, report that localtime does not cache TZ,
8477 # since we can't invalidate the cache if we don't have tzset.
8478 emacs_cv_localtime_cache=no
8481 echo "$ac_t""$emacs_cv_localtime_cache" 1>&6
8482 if test $emacs_cv_localtime_cache = yes; then
8483 cat >> confdefs.h <<\EOF
8484 #define LOCALTIME_CACHE 1
8489 if test "x$HAVE_TIMEVAL" = xyes; then
8490 for ac_func in gettimeofday
8492 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8493 echo "configure:8494: checking for $ac_func" >&5
8494 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8495 echo $ac_n "(cached) $ac_c" 1>&6
8496 else
8497 cat > conftest.$ac_ext <<EOF
8498 #line 8499 "configure"
8499 #include "confdefs.h"
8500 /* System header to define __stub macros and hopefully few prototypes,
8501 which can conflict with char $ac_func(); below. */
8502 #include <assert.h>
8503 /* Override any gcc2 internal prototype to avoid an error. */
8504 /* We use char because int might match the return type of a gcc2
8505 builtin and then its argument prototype would still apply. */
8506 char $ac_func();
8508 int main() {
8510 /* The GNU C library defines this for functions which it implements
8511 to always fail with ENOSYS. Some functions are actually named
8512 something starting with __ and the normal name is an alias. */
8513 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8514 choke me
8515 #else
8516 $ac_func();
8517 #endif
8519 ; return 0; }
8521 if { (eval echo configure:8522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8522 rm -rf conftest*
8523 eval "ac_cv_func_$ac_func=yes"
8524 else
8525 echo "configure: failed program was:" >&5
8526 cat conftest.$ac_ext >&5
8527 rm -rf conftest*
8528 eval "ac_cv_func_$ac_func=no"
8530 rm -f conftest*
8533 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8534 echo "$ac_t""yes" 1>&6
8535 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8536 cat >> confdefs.h <<EOF
8537 #define $ac_tr_func 1
8540 else
8541 echo "$ac_t""no" 1>&6
8543 done
8545 echo $ac_n "checking whether gettimeofday can accept two arguments""... $ac_c" 1>&6
8546 echo "configure:8547: checking whether gettimeofday can accept two arguments" >&5
8547 if eval "test \"`echo '$''{'emacs_cv_gettimeofday_two_arguments'+set}'`\" = set"; then
8548 echo $ac_n "(cached) $ac_c" 1>&6
8549 else
8550 cat > conftest.$ac_ext <<EOF
8551 #line 8552 "configure"
8552 #include "confdefs.h"
8554 #ifdef TIME_WITH_SYS_TIME
8555 #include <sys/time.h>
8556 #include <time.h>
8557 #else
8558 #ifdef HAVE_SYS_TIME_H
8559 #include <sys/time.h>
8560 #else
8561 #include <time.h>
8562 #endif
8563 #endif
8564 int main() {
8565 struct timeval time;
8566 gettimeofday (&time, 0);
8567 ; return 0; }
8569 if { (eval echo configure:8570: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8570 rm -rf conftest*
8571 emacs_cv_gettimeofday_two_arguments=yes
8572 else
8573 echo "configure: failed program was:" >&5
8574 cat conftest.$ac_ext >&5
8575 rm -rf conftest*
8576 emacs_cv_gettimeofday_two_arguments=no
8578 rm -f conftest*
8581 echo "$ac_t""$emacs_cv_gettimeofday_two_arguments" 1>&6
8582 if test $emacs_cv_gettimeofday_two_arguments = no; then
8583 cat >> confdefs.h <<\EOF
8584 #define GETTIMEOFDAY_ONE_ARGUMENT 1
8590 if test "$ac_cv_func_gettimeofday" = yes; then
8591 echo $ac_n "checking for struct timezone""... $ac_c" 1>&6
8592 echo "configure:8593: checking for struct timezone" >&5
8593 if eval "test \"`echo '$''{'emacs_cv_struct_timezone'+set}'`\" = set"; then
8594 echo $ac_n "(cached) $ac_c" 1>&6
8595 else
8596 cat > conftest.$ac_ext <<EOF
8597 #line 8598 "configure"
8598 #include "confdefs.h"
8599 #include <sys/time.h>
8600 int main() {
8601 struct timezone tz;
8602 ; return 0; }
8604 if { (eval echo configure:8605: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8605 rm -rf conftest*
8606 if test "$cross_compiling" = yes; then
8607 emacs_cv_struct_timezone=yes
8608 else
8609 cat > conftest.$ac_ext <<EOF
8610 #line 8611 "configure"
8611 #include "confdefs.h"
8613 #ifdef TIME_WITH_SYS_TIME
8614 #include <sys/time.h>
8615 #include <time.h>
8616 #else
8617 #ifdef HAVE_SYS_TIME_H
8618 #include <sys/time.h>
8619 #else
8620 #include <time.h>
8621 #endif
8622 #endif
8623 main () {
8624 struct timeval time;
8625 struct timezone dummy;
8626 exit (gettimeofday (&time, &dummy));
8629 if { (eval echo configure:8630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8630 then
8631 emacs_cv_struct_timezone=yes
8632 else
8633 echo "configure: failed program was:" >&5
8634 cat conftest.$ac_ext >&5
8635 rm -fr conftest*
8636 emacs_cv_struct_timezone=no
8638 rm -fr conftest*
8641 else
8642 echo "configure: failed program was:" >&5
8643 cat conftest.$ac_ext >&5
8644 rm -rf conftest*
8645 emacs_cv_struct_timezone=no
8647 rm -f conftest*
8650 echo "$ac_t""$emacs_cv_struct_timezone" 1>&6
8653 ok_so_far=yes
8654 echo $ac_n "checking for socket""... $ac_c" 1>&6
8655 echo "configure:8656: checking for socket" >&5
8656 if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then
8657 echo $ac_n "(cached) $ac_c" 1>&6
8658 else
8659 cat > conftest.$ac_ext <<EOF
8660 #line 8661 "configure"
8661 #include "confdefs.h"
8662 /* System header to define __stub macros and hopefully few prototypes,
8663 which can conflict with char socket(); below. */
8664 #include <assert.h>
8665 /* Override any gcc2 internal prototype to avoid an error. */
8666 /* We use char because int might match the return type of a gcc2
8667 builtin and then its argument prototype would still apply. */
8668 char socket();
8670 int main() {
8672 /* The GNU C library defines this for functions which it implements
8673 to always fail with ENOSYS. Some functions are actually named
8674 something starting with __ and the normal name is an alias. */
8675 #if defined (__stub_socket) || defined (__stub___socket)
8676 choke me
8677 #else
8678 socket();
8679 #endif
8681 ; return 0; }
8683 if { (eval echo configure:8684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8684 rm -rf conftest*
8685 eval "ac_cv_func_socket=yes"
8686 else
8687 echo "configure: failed program was:" >&5
8688 cat conftest.$ac_ext >&5
8689 rm -rf conftest*
8690 eval "ac_cv_func_socket=no"
8692 rm -f conftest*
8695 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
8696 echo "$ac_t""yes" 1>&6
8698 else
8699 echo "$ac_t""no" 1>&6
8700 ok_so_far=no
8703 if test $ok_so_far = yes; then
8704 ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'`
8705 echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6
8706 echo "configure:8707: checking for netinet/in.h" >&5
8707 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8708 echo $ac_n "(cached) $ac_c" 1>&6
8709 else
8710 cat > conftest.$ac_ext <<EOF
8711 #line 8712 "configure"
8712 #include "confdefs.h"
8713 #include <netinet/in.h>
8715 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8716 { (eval echo configure:8717: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8717 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8718 if test -z "$ac_err"; then
8719 rm -rf conftest*
8720 eval "ac_cv_header_$ac_safe=yes"
8721 else
8722 echo "$ac_err" >&5
8723 echo "configure: failed program was:" >&5
8724 cat conftest.$ac_ext >&5
8725 rm -rf conftest*
8726 eval "ac_cv_header_$ac_safe=no"
8728 rm -f conftest*
8730 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8731 echo "$ac_t""yes" 1>&6
8733 else
8734 echo "$ac_t""no" 1>&6
8735 ok_so_far=no
8739 if test $ok_so_far = yes; then
8740 ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'`
8741 echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6
8742 echo "configure:8743: checking for arpa/inet.h" >&5
8743 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8744 echo $ac_n "(cached) $ac_c" 1>&6
8745 else
8746 cat > conftest.$ac_ext <<EOF
8747 #line 8748 "configure"
8748 #include "confdefs.h"
8749 #include <arpa/inet.h>
8751 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8752 { (eval echo configure:8753: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8753 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8754 if test -z "$ac_err"; then
8755 rm -rf conftest*
8756 eval "ac_cv_header_$ac_safe=yes"
8757 else
8758 echo "$ac_err" >&5
8759 echo "configure: failed program was:" >&5
8760 cat conftest.$ac_ext >&5
8761 rm -rf conftest*
8762 eval "ac_cv_header_$ac_safe=no"
8764 rm -f conftest*
8766 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8767 echo "$ac_t""yes" 1>&6
8769 else
8770 echo "$ac_t""no" 1>&6
8771 ok_so_far=no
8775 if test $ok_so_far = yes; then
8776 cat >> confdefs.h <<\EOF
8777 #define HAVE_INET_SOCKETS 1
8782 if test -f /usr/lpp/X11/bin/smt.exp; then
8783 cat >> confdefs.h <<\EOF
8784 #define HAVE_AIX_SMT_EXP 1
8789 echo $ac_n "checking whether system supports dynamic ptys""... $ac_c" 1>&6
8790 echo "configure:8791: checking whether system supports dynamic ptys" >&5
8791 if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then
8792 echo "$ac_t""yes" 1>&6
8793 cat >> confdefs.h <<\EOF
8794 #define HAVE_DEV_PTMX 1
8797 else
8798 echo "$ac_t""no" 1>&6
8801 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
8802 echo "configure:8803: checking for pid_t" >&5
8803 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
8804 echo $ac_n "(cached) $ac_c" 1>&6
8805 else
8806 cat > conftest.$ac_ext <<EOF
8807 #line 8808 "configure"
8808 #include "confdefs.h"
8809 #include <sys/types.h>
8810 #if STDC_HEADERS
8811 #include <stdlib.h>
8812 #include <stddef.h>
8813 #endif
8815 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8816 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
8817 rm -rf conftest*
8818 ac_cv_type_pid_t=yes
8819 else
8820 rm -rf conftest*
8821 ac_cv_type_pid_t=no
8823 rm -f conftest*
8826 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
8827 if test $ac_cv_type_pid_t = no; then
8828 cat >> confdefs.h <<\EOF
8829 #define pid_t int
8834 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
8835 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
8836 echo "configure:8837: checking for vfork.h" >&5
8837 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8838 echo $ac_n "(cached) $ac_c" 1>&6
8839 else
8840 cat > conftest.$ac_ext <<EOF
8841 #line 8842 "configure"
8842 #include "confdefs.h"
8843 #include <vfork.h>
8845 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8846 { (eval echo configure:8847: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8847 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8848 if test -z "$ac_err"; then
8849 rm -rf conftest*
8850 eval "ac_cv_header_$ac_safe=yes"
8851 else
8852 echo "$ac_err" >&5
8853 echo "configure: failed program was:" >&5
8854 cat conftest.$ac_ext >&5
8855 rm -rf conftest*
8856 eval "ac_cv_header_$ac_safe=no"
8858 rm -f conftest*
8860 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8861 echo "$ac_t""yes" 1>&6
8862 cat >> confdefs.h <<\EOF
8863 #define HAVE_VFORK_H 1
8866 else
8867 echo "$ac_t""no" 1>&6
8870 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
8871 echo "configure:8872: checking for working vfork" >&5
8872 if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
8873 echo $ac_n "(cached) $ac_c" 1>&6
8874 else
8875 if test "$cross_compiling" = yes; then
8876 echo $ac_n "checking for vfork""... $ac_c" 1>&6
8877 echo "configure:8878: checking for vfork" >&5
8878 if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
8879 echo $ac_n "(cached) $ac_c" 1>&6
8880 else
8881 cat > conftest.$ac_ext <<EOF
8882 #line 8883 "configure"
8883 #include "confdefs.h"
8884 /* System header to define __stub macros and hopefully few prototypes,
8885 which can conflict with char vfork(); below. */
8886 #include <assert.h>
8887 /* Override any gcc2 internal prototype to avoid an error. */
8888 /* We use char because int might match the return type of a gcc2
8889 builtin and then its argument prototype would still apply. */
8890 char vfork();
8892 int main() {
8894 /* The GNU C library defines this for functions which it implements
8895 to always fail with ENOSYS. Some functions are actually named
8896 something starting with __ and the normal name is an alias. */
8897 #if defined (__stub_vfork) || defined (__stub___vfork)
8898 choke me
8899 #else
8900 vfork();
8901 #endif
8903 ; return 0; }
8905 if { (eval echo configure:8906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8906 rm -rf conftest*
8907 eval "ac_cv_func_vfork=yes"
8908 else
8909 echo "configure: failed program was:" >&5
8910 cat conftest.$ac_ext >&5
8911 rm -rf conftest*
8912 eval "ac_cv_func_vfork=no"
8914 rm -f conftest*
8917 if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
8918 echo "$ac_t""yes" 1>&6
8920 else
8921 echo "$ac_t""no" 1>&6
8924 ac_cv_func_vfork_works=$ac_cv_func_vfork
8925 else
8926 cat > conftest.$ac_ext <<EOF
8927 #line 8928 "configure"
8928 #include "confdefs.h"
8929 /* Thanks to Paul Eggert for this test. */
8930 #include <stdio.h>
8931 #include <sys/types.h>
8932 #include <sys/stat.h>
8933 #ifdef HAVE_UNISTD_H
8934 #include <unistd.h>
8935 #endif
8936 #ifdef HAVE_VFORK_H
8937 #include <vfork.h>
8938 #endif
8939 /* On some sparc systems, changes by the child to local and incoming
8940 argument registers are propagated back to the parent.
8941 The compiler is told about this with #include <vfork.h>,
8942 but some compilers (e.g. gcc -O) don't grok <vfork.h>.
8943 Test for this by using a static variable whose address
8944 is put into a register that is clobbered by the vfork. */
8945 static
8946 #ifdef __cplusplus
8947 sparc_address_test (int arg)
8948 #else
8949 sparc_address_test (arg) int arg;
8950 #endif
8952 static pid_t child;
8953 if (!child) {
8954 child = vfork ();
8955 if (child < 0) {
8956 perror ("vfork");
8957 _exit(2);
8959 if (!child) {
8960 arg = getpid();
8961 write(-1, "", 0);
8962 _exit (arg);
8966 main() {
8967 pid_t parent = getpid ();
8968 pid_t child;
8970 sparc_address_test ();
8972 child = vfork ();
8974 if (child == 0) {
8975 /* Here is another test for sparc vfork register problems.
8976 This test uses lots of local variables, at least
8977 as many local variables as main has allocated so far
8978 including compiler temporaries. 4 locals are enough for
8979 gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
8980 A buggy compiler should reuse the register of parent
8981 for one of the local variables, since it will think that
8982 parent can't possibly be used any more in this routine.
8983 Assigning to the local variable will thus munge parent
8984 in the parent process. */
8985 pid_t
8986 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
8987 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
8988 /* Convince the compiler that p..p7 are live; otherwise, it might
8989 use the same hardware register for all 8 local variables. */
8990 if (p != p1 || p != p2 || p != p3 || p != p4
8991 || p != p5 || p != p6 || p != p7)
8992 _exit(1);
8994 /* On some systems (e.g. IRIX 3.3),
8995 vfork doesn't separate parent from child file descriptors.
8996 If the child closes a descriptor before it execs or exits,
8997 this munges the parent's descriptor as well.
8998 Test for this by closing stdout in the child. */
8999 _exit(close(fileno(stdout)) != 0);
9000 } else {
9001 int status;
9002 struct stat st;
9004 while (wait(&status) != child)
9006 exit(
9007 /* Was there some problem with vforking? */
9008 child < 0
9010 /* Did the child fail? (This shouldn't happen.) */
9011 || status
9013 /* Did the vfork/compiler bug occur? */
9014 || parent != getpid()
9016 /* Did the file descriptor bug occur? */
9017 || fstat(fileno(stdout), &st) != 0
9022 if { (eval echo configure:9023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9023 then
9024 ac_cv_func_vfork_works=yes
9025 else
9026 echo "configure: failed program was:" >&5
9027 cat conftest.$ac_ext >&5
9028 rm -fr conftest*
9029 ac_cv_func_vfork_works=no
9031 rm -fr conftest*
9036 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
9037 if test $ac_cv_func_vfork_works = no; then
9038 cat >> confdefs.h <<\EOF
9039 #define vfork fork
9045 # Fixme: This should be replaced when we have autoconf 2.14.
9046 echo $ac_n "checking for size_t""... $ac_c" 1>&6
9047 echo "configure:9048: checking for size_t" >&5
9048 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
9049 echo $ac_n "(cached) $ac_c" 1>&6
9050 else
9051 cat > conftest.$ac_ext <<EOF
9052 #line 9053 "configure"
9053 #include "confdefs.h"
9054 #include <sys/types.h>
9055 #if STDC_HEADERS
9056 #include <stdlib.h>
9057 #include <stddef.h>
9058 #endif
9060 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9061 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
9062 rm -rf conftest*
9063 ac_cv_type_size_t=yes
9064 else
9065 rm -rf conftest*
9066 ac_cv_type_size_t=no
9068 rm -f conftest*
9071 echo "$ac_t""$ac_cv_type_size_t" 1>&6
9072 if test $ac_cv_type_size_t = no; then
9073 cat >> confdefs.h <<\EOF
9074 #define size_t unsigned
9080 # Set up the CFLAGS for real compilation, so we can substitute it.
9081 CFLAGS="$REAL_CFLAGS"
9082 CPPFLAGS="$REAL_CPPFLAGS"
9084 #### Find out which version of Emacs this is.
9085 version=`grep 'defconst[ ]*emacs-version' ${srcdir}/lisp/version.el \
9086 | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`
9087 if test x"${version}" = x; then
9088 { echo "configure: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." 1>&2; exit 1; }
9091 ### Specify what sort of things we'll be editing into Makefile and config.h.
9092 ### Use configuration here uncanonicalized to avoid exceeding size limits.
9124 cat >> confdefs.h <<EOF
9125 #define EMACS_CONFIGURATION "${canonical}"
9128 cat >> confdefs.h <<EOF
9129 #define EMACS_CONFIG_OPTIONS "${ac_configure_args}"
9132 cat >> confdefs.h <<EOF
9133 #define config_machfile "${machfile}"
9136 cat >> confdefs.h <<EOF
9137 #define config_opsysfile "${opsysfile}"
9140 cat >> confdefs.h <<EOF
9141 #define LD_SWITCH_X_SITE ${LD_SWITCH_X_SITE}
9144 cat >> confdefs.h <<EOF
9145 #define LD_SWITCH_X_SITE_AUX ${LD_SWITCH_X_SITE_AUX}
9148 cat >> confdefs.h <<EOF
9149 #define C_SWITCH_X_SITE ${C_SWITCH_X_SITE}
9152 cat >> confdefs.h <<EOF
9153 #define UNEXEC_SRC ${UNEXEC_SRC}
9157 if test "${HAVE_X_WINDOWS}" = "yes" ; then
9158 cat >> confdefs.h <<\EOF
9159 #define HAVE_X_WINDOWS 1
9163 if test "${USE_X_TOOLKIT}" != "none" ; then
9164 cat >> confdefs.h <<\EOF
9165 #define USE_X_TOOLKIT 1
9169 if test "${HAVE_X11}" = "yes" ; then
9170 cat >> confdefs.h <<\EOF
9171 #define HAVE_X11 1
9175 if test "${HAVE_XFREE386}" = "yes" ; then
9176 cat >> confdefs.h <<\EOF
9177 #define HAVE_XFREE386 1
9181 if test "${HAVE_MENUS}" = "yes" ; then
9182 cat >> confdefs.h <<\EOF
9183 #define HAVE_MENUS 1
9187 if test "${GNU_MALLOC}" = "yes" ; then
9188 cat >> confdefs.h <<\EOF
9189 #define GNU_MALLOC 1
9193 if test "${REL_ALLOC}" = "yes" ; then
9194 cat >> confdefs.h <<\EOF
9195 #define REL_ALLOC 1
9200 #### Report on what we decided to do.
9201 echo "
9202 Configured for \`${canonical}'.
9204 Where should the build process find the source code? ${srcdir}
9205 What operating system and machine description files should Emacs use?
9206 \`${opsysfile}' and \`${machfile}'
9207 What compiler should emacs be built with? ${CC} ${CFLAGS}
9208 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
9209 Should Emacs use a relocating allocator for buffers? ${REL_ALLOC}
9210 Should Emacs use mmap(2) for buffer allocation? $use_mmap_for_buffers
9211 What window system should Emacs use? ${window_system}
9212 What toolkit should Emacs use? ${USE_X_TOOLKIT}"
9214 if test -n "${x_includes}"; then
9215 echo " Where do we find X Windows header files? ${x_includes}"
9216 else
9217 echo " Where do we find X Windows header files? Standard dirs"
9219 if test -n "${x_libraries}"; then
9220 echo " Where do we find X Windows libraries? ${x_libraries}"
9221 else
9222 echo " Where do we find X Windows libraries? Standard dirs"
9225 echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}"
9226 echo " Does Emacs use -lXpm? ${HAVE_XPM}"
9227 echo " Does Emacs use -ljpeg? ${HAVE_JPEG}"
9228 echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
9229 echo " Does Emacs use -lungif? ${HAVE_GIF}"
9230 echo " Does Emacs use -lpng? ${HAVE_PNG}"
9231 echo " Does Emacs use X toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}"
9232 echo
9234 # Remove any trailing slashes in these variables.
9235 test "${prefix}" != NONE &&
9236 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
9237 test "${exec_prefix}" != NONE &&
9238 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
9240 ## Check if the C preprocessor will convert `..' to `. .'. If so, set
9241 ## CPP_NEED_TRADITIONAL to `yes' so that the code to generate Makefile
9242 ## from Makefile.c can correctly provide the arg `-traditional' to the
9243 ## C preprocessor.
9245 cat > conftest.$ac_ext <<EOF
9246 #line 9247 "configure"
9247 #include "confdefs.h"
9248 yes..yes
9250 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9251 egrep "yes..yes" >/dev/null 2>&1; then
9252 rm -rf conftest*
9253 CPP_NEED_TRADITIONAL=no
9254 else
9255 rm -rf conftest*
9256 CPP_NEED_TRADITIONAL=yes
9258 rm -f conftest*
9261 trap '' 1 2 15
9262 cat > confcache <<\EOF
9263 # This file is a shell script that caches the results of configure
9264 # tests run on this system so they can be shared between configure
9265 # scripts and configure runs. It is not useful on other systems.
9266 # If it contains results you don't want to keep, you may remove or edit it.
9268 # By default, configure uses ./config.cache as the cache file,
9269 # creating it if it does not exist already. You can give configure
9270 # the --cache-file=FILE option to use a different cache file; that is
9271 # what configure does when it calls configure scripts in
9272 # subdirectories, so they share the cache.
9273 # Giving --cache-file=/dev/null disables caching, for debugging configure.
9274 # config.status only pays attention to the cache file if you give it the
9275 # --recheck option to rerun configure.
9278 # The following way of writing the cache mishandles newlines in values,
9279 # but we know of no workaround that is simple, portable, and efficient.
9280 # So, don't put newlines in cache variables' values.
9281 # Ultrix sh set writes to stderr and can't be redirected directly,
9282 # and sets the high bit in the cache file unless we assign to the vars.
9283 (set) 2>&1 |
9284 case `(ac_space=' '; set | grep ac_space) 2>&1` in
9285 *ac_space=\ *)
9286 # `set' does not quote correctly, so add quotes (double-quote substitution
9287 # turns \\\\ into \\, and sed turns \\ into \).
9288 sed -n \
9289 -e "s/'/'\\\\''/g" \
9290 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
9293 # `set' quotes correctly as required by POSIX, so do not add quotes.
9294 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
9296 esac >> confcache
9297 if cmp -s $cache_file confcache; then
9299 else
9300 if test -w $cache_file; then
9301 echo "updating cache $cache_file"
9302 cat confcache > $cache_file
9303 else
9304 echo "not updating unwritable cache $cache_file"
9307 rm -f confcache
9309 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
9311 test "x$prefix" = xNONE && prefix=$ac_default_prefix
9312 # Let make expand exec_prefix.
9313 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9315 # Any assignment to VPATH causes Sun make to only execute
9316 # the first set of double-colon rules, so remove it if not needed.
9317 # If there is a colon in the path, we need to keep it.
9318 if test "x$srcdir" = x.; then
9319 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
9322 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
9324 DEFS=-DHAVE_CONFIG_H
9326 # Without the "./", some shells look in PATH for config.status.
9327 : ${CONFIG_STATUS=./config.status}
9329 echo creating $CONFIG_STATUS
9330 rm -f $CONFIG_STATUS
9331 cat > $CONFIG_STATUS <<EOF
9332 #! /bin/sh
9333 # Generated automatically by configure.
9334 # Run this file to recreate the current configuration.
9335 # This directory was configured as follows,
9336 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
9338 # $0 $ac_configure_args
9340 # Compiler output produced by configure, useful for debugging
9341 # configure, is in ./config.log if it exists.
9343 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
9344 for ac_option
9346 case "\$ac_option" in
9347 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
9348 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
9349 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
9350 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
9351 echo "$CONFIG_STATUS generated by autoconf version 2.13"
9352 exit 0 ;;
9353 -help | --help | --hel | --he | --h)
9354 echo "\$ac_cs_usage"; exit 0 ;;
9355 *) echo "\$ac_cs_usage"; exit 1 ;;
9356 esac
9357 done
9359 ac_given_srcdir=$srcdir
9360 ac_given_INSTALL="$INSTALL"
9362 trap 'rm -fr `echo "Makefile lib-src/Makefile.c:lib-src/Makefile.in oldXMenu/Makefile \
9363 man/Makefile lwlib/Makefile src/Makefile.c:src/Makefile.in \
9364 lisp/Makefile leim/Makefile src/config.h:src/config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
9366 cat >> $CONFIG_STATUS <<EOF
9368 # Protect against being on the right side of a sed subst in config.status.
9369 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
9370 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
9371 $ac_vpsub
9372 $extrasub
9373 s%@SHELL@%$SHELL%g
9374 s%@CFLAGS@%$CFLAGS%g
9375 s%@CPPFLAGS@%$CPPFLAGS%g
9376 s%@CXXFLAGS@%$CXXFLAGS%g
9377 s%@FFLAGS@%$FFLAGS%g
9378 s%@DEFS@%$DEFS%g
9379 s%@LDFLAGS@%$LDFLAGS%g
9380 s%@LIBS@%$LIBS%g
9381 s%@exec_prefix@%$exec_prefix%g
9382 s%@prefix@%$prefix%g
9383 s%@program_transform_name@%$program_transform_name%g
9384 s%@bindir@%$bindir%g
9385 s%@sbindir@%$sbindir%g
9386 s%@libexecdir@%$libexecdir%g
9387 s%@datadir@%$datadir%g
9388 s%@sysconfdir@%$sysconfdir%g
9389 s%@sharedstatedir@%$sharedstatedir%g
9390 s%@localstatedir@%$localstatedir%g
9391 s%@libdir@%$libdir%g
9392 s%@includedir@%$includedir%g
9393 s%@oldincludedir@%$oldincludedir%g
9394 s%@infodir@%$infodir%g
9395 s%@mandir@%$mandir%g
9396 s%@host@%$host%g
9397 s%@host_alias@%$host_alias%g
9398 s%@host_cpu@%$host_cpu%g
9399 s%@host_vendor@%$host_vendor%g
9400 s%@host_os@%$host_os%g
9401 s%@CC@%$CC%g
9402 s%@LN_S@%$LN_S%g
9403 s%@CPP@%$CPP%g
9404 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
9405 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
9406 s%@INSTALL_DATA@%$INSTALL_DATA%g
9407 s%@YACC@%$YACC%g
9408 s%@RANLIB@%$RANLIB%g
9409 s%@LIBSOUND@%$LIBSOUND%g
9410 s%@SET_MAKE@%$SET_MAKE%g
9411 s%@ALLOCA@%$ALLOCA%g
9412 s%@liblockfile@%$liblockfile%g
9413 s%@LIBOBJS@%$LIBOBJS%g
9414 s%@NEED_SETGID@%$NEED_SETGID%g
9415 s%@KMEM_GROUP@%$KMEM_GROUP%g
9416 s%@version@%$version%g
9417 s%@configuration@%$configuration%g
9418 s%@canonical@%$canonical%g
9419 s%@srcdir@%$srcdir%g
9420 s%@lispdir@%$lispdir%g
9421 s%@locallisppath@%$locallisppath%g
9422 s%@lisppath@%$lisppath%g
9423 s%@x_default_search_path@%$x_default_search_path%g
9424 s%@etcdir@%$etcdir%g
9425 s%@archlibdir@%$archlibdir%g
9426 s%@docdir@%$docdir%g
9427 s%@bitmapdir@%$bitmapdir%g
9428 s%@c_switch_system@%$c_switch_system%g
9429 s%@c_switch_machine@%$c_switch_machine%g
9430 s%@LD_SWITCH_X_SITE@%$LD_SWITCH_X_SITE%g
9431 s%@LD_SWITCH_X_SITE_AUX@%$LD_SWITCH_X_SITE_AUX%g
9432 s%@C_SWITCH_X_SITE@%$C_SWITCH_X_SITE%g
9433 s%@X_TOOLKIT_TYPE@%$X_TOOLKIT_TYPE%g
9434 s%@machfile@%$machfile%g
9435 s%@opsysfile@%$opsysfile%g
9436 s%@GETLOADAVG_LIBS@%$GETLOADAVG_LIBS%g
9438 CEOF
9441 cat >> $CONFIG_STATUS <<\EOF
9443 # Split the substitutions into bite-sized pieces for seds with
9444 # small command number limits, like on Digital OSF/1 and HP-UX.
9445 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
9446 ac_file=1 # Number of current file.
9447 ac_beg=1 # First line for current file.
9448 ac_end=$ac_max_sed_cmds # Line after last line for current file.
9449 ac_more_lines=:
9450 ac_sed_cmds=""
9451 while $ac_more_lines; do
9452 if test $ac_beg -gt 1; then
9453 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
9454 else
9455 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
9457 if test ! -s conftest.s$ac_file; then
9458 ac_more_lines=false
9459 rm -f conftest.s$ac_file
9460 else
9461 if test -z "$ac_sed_cmds"; then
9462 ac_sed_cmds="sed -f conftest.s$ac_file"
9463 else
9464 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
9466 ac_file=`expr $ac_file + 1`
9467 ac_beg=$ac_end
9468 ac_end=`expr $ac_end + $ac_max_sed_cmds`
9470 done
9471 if test -z "$ac_sed_cmds"; then
9472 ac_sed_cmds=cat
9476 cat >> $CONFIG_STATUS <<EOF
9478 CONFIG_FILES=\${CONFIG_FILES-"Makefile lib-src/Makefile.c:lib-src/Makefile.in oldXMenu/Makefile \
9479 man/Makefile lwlib/Makefile src/Makefile.c:src/Makefile.in \
9480 lisp/Makefile leim/Makefile"}
9482 cat >> $CONFIG_STATUS <<\EOF
9483 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
9484 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9485 case "$ac_file" in
9486 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9487 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9488 *) ac_file_in="${ac_file}.in" ;;
9489 esac
9491 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
9493 # Remove last slash and all that follows it. Not all systems have dirname.
9494 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9495 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9496 # The file is in a subdirectory.
9497 test ! -d "$ac_dir" && mkdir "$ac_dir"
9498 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
9499 # A "../" for each directory in $ac_dir_suffix.
9500 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
9501 else
9502 ac_dir_suffix= ac_dots=
9505 case "$ac_given_srcdir" in
9506 .) srcdir=.
9507 if test -z "$ac_dots"; then top_srcdir=.
9508 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
9509 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
9510 *) # Relative path.
9511 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
9512 top_srcdir="$ac_dots$ac_given_srcdir" ;;
9513 esac
9515 case "$ac_given_INSTALL" in
9516 [/$]*) INSTALL="$ac_given_INSTALL" ;;
9517 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
9518 esac
9520 echo creating "$ac_file"
9521 rm -f "$ac_file"
9522 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
9523 case "$ac_file" in
9524 *Makefile*) ac_comsub="1i\\
9525 # $configure_input" ;;
9526 *) ac_comsub= ;;
9527 esac
9529 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9530 sed -e "$ac_comsub
9531 s%@configure_input@%$configure_input%g
9532 s%@srcdir@%$srcdir%g
9533 s%@top_srcdir@%$top_srcdir%g
9534 s%@INSTALL@%$INSTALL%g
9535 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
9536 fi; done
9537 rm -f conftest.s*
9539 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
9540 # NAME is the cpp macro being defined and VALUE is the value it is being given.
9542 # ac_d sets the value in "#define NAME VALUE" lines.
9543 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
9544 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
9545 ac_dC='\3'
9546 ac_dD='%g'
9547 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
9548 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
9549 ac_uB='\([ ]\)%\1#\2define\3'
9550 ac_uC=' '
9551 ac_uD='\4%g'
9552 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
9553 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
9554 ac_eB='$%\1#\2define\3'
9555 ac_eC=' '
9556 ac_eD='%g'
9558 if test "${CONFIG_HEADERS+set}" != set; then
9560 cat >> $CONFIG_STATUS <<EOF
9561 CONFIG_HEADERS="src/config.h:src/config.in"
9563 cat >> $CONFIG_STATUS <<\EOF
9565 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
9566 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9567 case "$ac_file" in
9568 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9569 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9570 *) ac_file_in="${ac_file}.in" ;;
9571 esac
9573 echo creating $ac_file
9575 rm -f conftest.frag conftest.in conftest.out
9576 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9577 cat $ac_file_inputs > conftest.in
9581 # Transform confdefs.h into a sed script conftest.vals that substitutes
9582 # the proper values into config.h.in to produce config.h. And first:
9583 # Protect against being on the right side of a sed subst in config.status.
9584 # Protect against being in an unquoted here document in config.status.
9585 rm -f conftest.vals
9586 cat > conftest.hdr <<\EOF
9587 s/[\\&%]/\\&/g
9588 s%[\\$`]%\\&%g
9589 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
9590 s%ac_d%ac_u%gp
9591 s%ac_u%ac_e%gp
9593 sed -n -f conftest.hdr confdefs.h > conftest.vals
9594 rm -f conftest.hdr
9596 # This sed command replaces #undef with comments. This is necessary, for
9597 # example, in the case of _POSIX_SOURCE, which is predefined and required
9598 # on some systems where configure will not decide to define it.
9599 cat >> conftest.vals <<\EOF
9600 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
9603 # Break up conftest.vals because some shells have a limit on
9604 # the size of here documents, and old seds have small limits too.
9606 rm -f conftest.tail
9607 while :
9609 ac_lines=`grep -c . conftest.vals`
9610 # grep -c gives empty output for an empty file on some AIX systems.
9611 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
9612 # Write a limited-size here document to conftest.frag.
9613 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
9614 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
9615 echo 'CEOF
9616 sed -f conftest.frag conftest.in > conftest.out
9617 rm -f conftest.in
9618 mv conftest.out conftest.in
9619 ' >> $CONFIG_STATUS
9620 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
9621 rm -f conftest.vals
9622 mv conftest.tail conftest.vals
9623 done
9624 rm -f conftest.vals
9626 cat >> $CONFIG_STATUS <<\EOF
9627 rm -f conftest.frag conftest.h
9628 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
9629 cat conftest.in >> conftest.h
9630 rm -f conftest.in
9631 if cmp -s $ac_file conftest.h 2>/dev/null; then
9632 echo "$ac_file is unchanged"
9633 rm -f conftest.h
9634 else
9635 # Remove last slash and all that follows it. Not all systems have dirname.
9636 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9637 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9638 # The file is in a subdirectory.
9639 test ! -d "$ac_dir" && mkdir "$ac_dir"
9641 rm -f $ac_file
9642 mv conftest.h $ac_file
9644 fi; done
9647 cat >> $CONFIG_STATUS <<EOF
9648 GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPP_NEED_TRADITIONAL="$CPP_NEED_TRADITIONAL" CPPFLAGS="$CPPFLAGS"
9650 cat >> $CONFIG_STATUS <<\EOF
9653 ### Make the necessary directories, if they don't exist.
9654 for dir in etc lisp ; do
9655 test -d ${dir} || mkdir ${dir}
9656 done
9658 # Build src/Makefile from ${srcdir}/src/Makefile.c
9659 # and lib-src/Makefile from ${srcdir}/lib-src/Makefile.c
9660 # This must be done after src/config.h is built, since we rely on that file.
9662 # Now get this: Some word that is part of the ${srcdir} directory name
9663 # or the ${configuration} value might, just might, happen to be an
9664 # identifier like `sun4' or `i386' or something, and be predefined by
9665 # the C preprocessor to some helpful value like 1, or maybe the empty
9666 # string. Needless to say consequent macro substitutions are less
9667 # than conducive to the makefile finding the correct directory.
9668 undefs="`echo $top_srcdir $configuration $canonical |
9669 sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/^/ /' -e 's/ *$//' \
9670 -e 's/ */ -U/g' -e 's/-U[0-9][^ ]*//g' \
9673 echo creating src/epaths.h
9674 ${MAKE-make} epaths-force
9676 # As of 2000-11-19, newest development versions of GNU cpp preprocess
9677 # `..' to `. .' unless invoked with -traditional
9679 if test "x$GCC" = xyes && test "x$CPP_NEED_TRADITIONAL" = xyes; then
9680 CPPFLAGS="$CPPFLAGS -traditional"
9683 echo creating lib-src/Makefile
9684 ( cd lib-src
9685 rm -f junk.c junk1.c junk2.c
9686 sed -e '/start of cpp stuff/q' \
9687 < Makefile.c > junk1.c
9688 sed -e '1,/start of cpp stuff/d'\
9689 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
9690 < Makefile.c > junk.c
9691 $CPP $undefs -I. -I$top_srcdir/src $CPPFLAGS junk.c | \
9692 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
9693 cat junk1.c junk2.c > Makefile.new
9694 rm -f junk.c junk1.c junk2.c
9695 chmod 444 Makefile.new
9696 mv -f Makefile.new Makefile
9699 echo creating src/Makefile
9700 ( cd src
9701 rm -f junk.c junk1.c junk2.c
9702 sed -e '/start of cpp stuff/q' \
9703 < Makefile.c > junk1.c
9704 sed -e '1,/start of cpp stuff/d'\
9705 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
9706 < Makefile.c > junk.c
9707 $CPP $undefs -I. -I$top_srcdir/src $CPPFLAGS junk.c | \
9708 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
9709 cat junk1.c junk2.c > Makefile.new
9710 rm -f junk.c junk1.c junk2.c
9711 chmod 444 Makefile.new
9712 mv -f Makefile.new Makefile
9715 if test ! -f src/.gdbinit && test -f $top_srcdir/src/.gdbinit; then
9716 echo creating src/.gdbinit
9717 echo source $top_srcdir/src/.gdbinit > src/.gdbinit
9720 # This is how we know whether to re-run configure in certain cases.
9721 touch src/config.stamp
9724 exit 0
9726 chmod +x $CONFIG_STATUS
9727 rm -fr confdefs* $ac_clean_files
9728 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1