Emacs version 21.3
[emacs/old-mirror.git] / configure
blobe849f124802a41aa69aaa64f2e007b847cf301e9
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.2* )
1155 machine=hp800 opsys=hpux10-20
1158 hppa*-hp-hpux10* )
1159 machine=hp800 opsys=hpux10
1162 hppa*-hp-hpux1[1-9]* )
1163 machine=hp800 opsys=hpux11
1166 ## HP 9000 series 700 and 800, running HP/UX
1167 hppa*-hp-hpux* )
1168 ## Cross-compilation? Nah!
1169 case "`uname -r`" in
1170 ## Someone's system reports A.B8.05 for this.
1171 ## I wonder what other possibilities there are.
1172 *.B8.* ) machine=hp800 opsys=hpux8 ;;
1173 *.08.* ) machine=hp800 opsys=hpux8 ;;
1174 *.09.* ) machine=hp800 opsys=hpux9 ;;
1175 *) machine=hp800 opsys=hpux10 ;;
1176 esac
1178 hppa*-*-nextstep* )
1179 machine=hp800 opsys=nextstep
1182 ## Orion machines
1183 orion-orion-bsd* )
1184 machine=orion opsys=bsd4-2
1186 clipper-orion-bsd* )
1187 machine=orion105 opsys=bsd4-2
1190 ## IBM machines
1191 i[3456]86-ibm-aix1.1* )
1192 machine=ibmps2-aix opsys=usg5-2-2
1194 i[3456]86-ibm-aix1.[23]* | i[3456]86-ibm-aix* )
1195 machine=ibmps2-aix opsys=usg5-3
1197 i370-ibm-aix*)
1198 machine=ibm370aix opsys=usg5-3
1200 s390-*-linux-gnu)
1201 machine=ibms390 opsys=gnu-linux
1203 rs6000-ibm-aix3.1* | powerpc-ibm-aix3.1* )
1204 machine=ibmrs6000 opsys=aix3-1
1206 rs6000-ibm-aix3.2.5 | powerpc-ibm-aix3.2.5 )
1207 machine=ibmrs6000 opsys=aix3-2-5
1209 rs6000-ibm-aix4.1* | powerpc-ibm-aix4.1* )
1210 machine=ibmrs6000 opsys=aix4-1
1212 rs6000-ibm-aix4.2* | powerpc-ibm-aix4.2* )
1213 machine=ibmrs6000 opsys=aix4-2
1215 rs6000-ibm-aix5.1* | powerpc-ibm-aix5.1* )
1216 machine=ibmrs6000 opsys=aix4-2
1218 rs6000-ibm-aix4.0* | powerpc-ibm-aix4.0* )
1219 machine=ibmrs6000 opsys=aix4
1221 rs6000-ibm-aix4* | powerpc-ibm-aix4* )
1222 machine=ibmrs6000 opsys=aix4-1
1224 rs6000-ibm-aix* | powerpc-ibm-aix* )
1225 machine=ibmrs6000 opsys=aix3-2
1227 romp-ibm-bsd4.3* )
1228 machine=ibmrt opsys=bsd4-3
1230 romp-ibm-bsd4.2* )
1231 machine=ibmrt opsys=bsd4-2
1233 romp-ibm-aos4.3* )
1234 machine=ibmrt opsys=bsd4-3
1236 romp-ibm-aos4.2* )
1237 machine=ibmrt opsys=bsd4-2
1239 romp-ibm-aos* )
1240 machine=ibmrt opsys=bsd4-3
1242 romp-ibm-bsd* )
1243 machine=ibmrt opsys=bsd4-3
1245 romp-ibm-aix* )
1246 machine=ibmrt-aix opsys=usg5-2-2
1249 ## Integrated Solutions `Optimum V'
1250 m68*-isi-bsd4.2* )
1251 machine=isi-ov opsys=bsd4-2
1253 m68*-isi-bsd4.3* )
1254 machine=isi-ov opsys=bsd4-3
1257 ## Intel 386 machines where we do care about the manufacturer
1258 i[3456]86-intsys-sysv* )
1259 machine=is386 opsys=usg5-2-2
1262 ## Prime EXL
1263 i[3456]86-prime-sysv* )
1264 machine=i386 opsys=usg5-3
1267 ## Sequent Symmetry running Dynix
1268 i[3456]86-sequent-bsd* )
1269 machine=symmetry opsys=bsd4-3
1272 ## Sequent Symmetry running ptx 4, which is a modified SVR4.
1273 i[3456]86-sequent-ptx4* | i[3456]86-sequent-sysv4* )
1274 machine=sequent-ptx opsys=ptx4
1275 NON_GNU_CPP=/lib/cpp
1278 ## Sequent Symmetry running DYNIX/ptx
1279 ## Use the old cpp rather than the newer ANSI one.
1280 i[3456]86-sequent-ptx* )
1281 machine=sequent-ptx opsys=ptx
1282 NON_GNU_CPP="/lib/cpp"
1285 ## ncr machine running svr4.3.
1286 i[3456]86-ncr-sysv4.3 )
1287 machine=ncr386 opsys=usg5-4-3
1290 ## Unspecified sysv on an ncr machine defaults to svr4.2.
1291 ## (Plain usg5-4 doesn't turn on POSIX signals, which we need.)
1292 i[3456]86-ncr-sysv* )
1293 machine=ncr386 opsys=usg5-4-2
1296 ## Intel Paragon OSF/1
1297 i860-intel-osf1* )
1298 machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp
1301 ## Intel 860
1302 i860-*-sysv4* )
1303 machine=i860 opsys=usg5-4
1304 NON_GNU_CC="/bin/cc" # Ie, not the one in /usr/ucb/cc.
1305 NON_GNU_CPP="/usr/ccs/lib/cpp" # cc -E tokenizes macro expansion.
1308 ## Macintosh PowerPC
1309 powerpc*-*-linux-gnu* )
1310 machine=macppc opsys=gnu-linux
1313 ## Masscomp machines
1314 m68*-masscomp-rtu* )
1315 machine=masscomp opsys=rtu
1318 ## Megatest machines
1319 m68*-megatest-bsd* )
1320 machine=mega68 opsys=bsd4-2
1323 ## Workstations sold by MIPS
1324 ## This is not necessarily all workstations using the MIPS processor -
1325 ## Irises are produced by SGI, and DECstations by DEC.
1327 ## etc/MACHINES lists mips.h and mips4.h as possible machine files,
1328 ## and usg5-2-2 and bsd4-3 as possible OS files. The only guidance
1329 ## it gives for choosing between the alternatives seems to be "Use
1330 ## -machine=mips4 for RISCOS version 4; use -opsystem=bsd4-3 with
1331 ## the BSD world." I'll assume that these are instructions for
1332 ## handling two odd situations, and that every other situation
1333 ## should use mips.h and usg5-2-2, they being listed first.
1334 mips-mips-usg* )
1335 machine=mips4
1336 ## Fall through to the general code at the bottom to decide on the OS.
1338 mips-mips-riscos4* )
1339 machine=mips4 opsys=bsd4-3
1340 NON_GNU_CC="cc -systype bsd43"
1341 NON_GNU_CPP="cc -systype bsd43 -E"
1343 mips-mips-riscos5* )
1344 machine=mips4 opsys=riscos5
1345 NON_GNU_CC="cc -systype bsd43"
1346 NON_GNU_CPP="cc -systype bsd43 -E"
1348 mips-mips-bsd* )
1349 machine=mips opsys=bsd4-3
1351 mips-mips-* )
1352 machine=mips opsys=usg5-2-2
1355 ## NeXT
1356 m68*-next-* | m68k-*-nextstep* )
1357 machine=m68k opsys=nextstep
1360 ## The complete machine from National Semiconductor
1361 ns32k-ns-genix* )
1362 machine=ns32000 opsys=usg5-2
1365 ## NCR machines
1366 m68*-ncr-sysv2* | m68*-ncr-sysvr2* )
1367 machine=tower32 opsys=usg5-2-2
1369 m68*-ncr-sysv3* | m68*-ncr-sysvr3* )
1370 machine=tower32v3 opsys=usg5-3
1373 ## NEC EWS4800
1374 mips-nec-sysv4*)
1375 machine=ews4800 opsys=ux4800
1378 ## Nixdorf Targon 31
1379 m68*-nixdorf-sysv* )
1380 machine=targon31 opsys=usg5-2-2
1383 ## Nu (TI or LMI)
1384 m68*-nu-sysv* )
1385 machine=nu opsys=usg5-2
1388 ## Plexus
1389 m68*-plexus-sysv* )
1390 machine=plexus opsys=usg5-2
1393 ## PowerPC reference platform
1394 powerpcle-*-solaris2* )
1395 machine=prep
1396 opsys=sol2-5
1399 ## Pyramid machines
1400 ## I don't really have any idea what sort of processor the Pyramid has,
1401 ## so I'm assuming it is its own architecture.
1402 pyramid-pyramid-bsd* )
1403 machine=pyramid opsys=bsd4-2
1406 ## Sequent Balance
1407 ns32k-sequent-bsd4.2* )
1408 machine=sequent opsys=bsd4-2
1410 ns32k-sequent-bsd4.3* )
1411 machine=sequent opsys=bsd4-3
1414 ## Siemens Nixdorf
1415 mips-siemens-sysv* | mips-sni-sysv*)
1416 machine=mips-siemens opsys=usg5-4
1417 NON_GNU_CC=/usr/ccs/bin/cc
1418 NON_GNU_CPP=/usr/ccs/lib/cpp
1421 ## Silicon Graphics machines
1422 ## Iris 2500 and Iris 2500 Turbo (aka the Iris 3030)
1423 m68*-sgi-iris3.5* )
1424 machine=irist opsys=iris3-5
1426 m68*-sgi-iris3.6* | m68*-sgi-iris*)
1427 machine=irist opsys=iris3-6
1429 ## Iris 4D
1430 mips-sgi-irix3* )
1431 machine=iris4d opsys=irix3-3
1433 mips-sgi-irix4* )
1434 machine=iris4d opsys=irix4-0
1436 mips-sgi-irix6.5 )
1437 machine=iris4d opsys=irix6-5
1438 # Without defining _LANGUAGE_C, things get masked out in the headers
1439 # so that, for instance, grepping for `free' in stdlib.h fails and
1440 # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
1441 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
1442 NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C"
1444 mips-sgi-irix6* )
1445 machine=iris4d opsys=irix6-0
1446 # It's not clear whether -D_LANGUAGE_C is necessary as it is for 6.5,
1447 # but presumably it does no harm.
1448 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
1449 # -32 probably isn't necessary in later v.6s -- anyone know which?
1450 NON_GCC_TEST_OPTIONS=-32
1452 mips-sgi-irix5.[01]* )
1453 machine=iris4d opsys=irix5-0
1455 mips-sgi-irix5* | mips-sgi-irix* )
1456 machine=iris4d opsys=irix5-2
1459 ## SONY machines
1460 m68*-sony-bsd4.2* )
1461 machine=news opsys=bsd4-2
1463 m68*-sony-bsd4.3* )
1464 machine=news opsys=bsd4-3
1466 m68*-sony-newsos3* | m68*-sony-news3*)
1467 machine=news opsys=bsd4-3
1469 mips-sony-bsd* | mips-sony-newsos4* | mips-sony-news4*)
1470 machine=news-risc opsys=bsd4-3
1472 mips-sony-newsos6* )
1473 machine=news-r6 opsys=newsos6
1475 mips-sony-news* )
1476 machine=news-risc opsys=newsos5
1479 ## Stride
1480 m68*-stride-sysv* )
1481 machine=stride opsys=usg5-2
1484 ## Suns
1485 sparc-*-linux-gnu* | sparc64-*-linux-gnu* )
1486 machine=sparc opsys=gnu-linux
1489 *-auspex-sunos* | *-sun-sunos* | *-sun-bsd* | *-sun-solaris* \
1490 | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* | powerpc*-*-solaris2* \
1491 | rs6000-*-solaris2*)
1492 case "${canonical}" in
1493 m68*-sunos1* ) machine=sun1 ;;
1494 m68*-sunos2* ) machine=sun2 ;;
1495 m68* ) machine=sun3 ;;
1496 i[3456]86-sun-sunos[34]* ) machine=sun386 ;;
1497 i[3456]86-*-* ) machine=intel386 ;;
1498 powerpcle* ) machine=powerpcle ;;
1499 powerpc* | rs6000* ) machine=ibmrs6000 ;;
1500 sparc* ) machine=sparc ;;
1501 * ) unported=yes ;;
1502 esac
1503 case "${canonical}" in
1504 ## The Sun386 didn't get past 4.0.
1505 i[3456]86-*-sunos4 ) opsys=sunos4-0 ;;
1506 *-sunos4.0* ) opsys=sunos4-0 ;;
1507 *-sunos4.1.[3-9]*noshare )
1508 ## This name is sunos413 instead of sunos4-1-3
1509 ## to avoid a file name conflict on MSDOS.
1510 opsys=sunos413
1511 NON_GNU_CPP=/usr/lib/cpp
1512 NON_GCC_TEST_OPTIONS=-Bstatic
1513 GCC_TEST_OPTIONS=-static
1515 *-sunos4.1.[3-9]* | *-sunos4shr*)
1516 opsys=sunos4shr
1517 NON_GNU_CPP=/usr/lib/cpp
1519 *-sunos4* | *-sunos )
1520 opsys=sunos4-1
1521 NON_GCC_TEST_OPTIONS=-Bstatic
1522 GCC_TEST_OPTIONS=-static
1524 *-sunos5.3* | *-solaris2.3* )
1525 opsys=sol2-3
1526 NON_GNU_CPP=/usr/ccs/lib/cpp
1528 *-sunos5.4* | *-solaris2.4* )
1529 opsys=sol2-4
1530 NON_GNU_CPP=/usr/ccs/lib/cpp
1531 RANLIB="ar -ts"
1533 *-sunos5.5* | *-solaris2.5* )
1534 opsys=sol2-5
1535 NON_GNU_CPP=/usr/ccs/lib/cpp
1536 RANLIB="ar -ts"
1538 *-sunos5* | *-solaris* )
1539 opsys=sol2-5
1540 NON_GNU_CPP=/usr/ccs/lib/cpp
1542 * ) opsys=bsd4-2 ;;
1543 esac
1544 ## Watch out for a compiler that we know will not work.
1545 case "${canonical}" in
1546 *-solaris* | *-sunos5* )
1547 if [ "x$CC" = x/usr/ucb/cc ]; then
1548 ## /usr/ucb/cc doesn't work;
1549 ## we should find some other compiler that does work.
1550 unset CC
1553 *) ;;
1554 esac
1556 sparc-*-nextstep* )
1557 machine=sparc opsys=nextstep
1560 ## Tadpole 68k
1561 m68*-tadpole-sysv* )
1562 machine=tad68k opsys=usg5-3
1565 ## Tahoe machines
1566 tahoe-tahoe-bsd4.2* )
1567 machine=tahoe opsys=bsd4-2
1569 tahoe-tahoe-bsd4.3* )
1570 machine=tahoe opsys=bsd4-3
1573 ## Tandem Integrity S2
1574 mips-tandem-sysv* )
1575 machine=tandem-s2 opsys=usg5-3
1578 ## Tektronix XD88
1579 m88k-tektronix-sysv3* )
1580 machine=tekxd88 opsys=usg5-3
1583 ## Tektronix 16000 box (6130?)
1584 ns16k-tektronix-bsd* )
1585 machine=ns16000 opsys=bsd4-2
1587 ## Tektronix 4300
1588 ## src/m/tek4300.h hints that this is a m68k machine.
1589 m68*-tektronix-bsd* )
1590 machine=tek4300 opsys=bsd4-3
1593 ## Titan P2 or P3
1594 ## We seem to have lost the machine-description file titan.h!
1595 titan-titan-sysv* )
1596 machine=titan opsys=usg5-3
1599 ## Ustation E30 (SS5E)
1600 m68*-unisys-uniplus* )
1601 machine=ustation opsystem=unipl5-2
1604 ## Vaxen.
1605 vax-dec-* )
1606 machine=vax
1607 case "${canonical}" in
1608 *-bsd4.1* ) opsys=bsd4-1 ;;
1609 *-bsd4.2* | *-ultrix[0-3].* | *-ultrix4.0* ) opsys=bsd4-2 ;;
1610 *-bsd4.3* | *-ultrix* ) opsys=bsd4-3 ;;
1611 *-sysv[01]* | *-sysvr[01]* ) opsys=usg5-0 ;;
1612 *-sysv2* | *-sysvr2* ) opsys=usg5-2 ;;
1613 *-vms* ) opsys=vms ;;
1614 * ) unported=yes
1615 esac
1618 ## Whitechapel MG1
1619 ns16k-whitechapel-* )
1620 machine=mg1
1621 ## We don't know what sort of OS runs on these; we'll let the
1622 ## operating system guessing code below try.
1625 ## Wicat
1626 m68*-wicat-sysv* )
1627 machine=wicat opsys=usg5-2
1630 ## IA-64
1631 ia64*-*-linux* )
1632 machine=ia64 opsys=gnu-linux
1635 ## Intel 386 machines where we don't care about the manufacturer
1636 i[3456]86-*-* )
1637 machine=intel386
1638 case "${canonical}" in
1639 *-lynxos* ) opsys=lynxos ;;
1640 *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
1641 *-isc2.2* ) opsys=isc2-2 ;;
1642 *-isc4.0* ) opsys=isc4-0 ;;
1643 *-isc4.* ) opsys=isc4-1
1644 GCC_TEST_OPTIONS=-posix
1645 NON_GCC_TEST_OPTIONS=-Xp
1647 *-isc* ) opsys=isc3-0 ;;
1648 *-esix5* ) opsys=esix5r4; NON_GNU_CPP=/usr/lib/cpp ;;
1649 *-esix* ) opsys=esix ;;
1650 *-xenix* ) opsys=xenix ;;
1651 *-linux-gnu* ) opsys=gnu-linux ;;
1652 *-sco3.2v4* ) opsys=sco4 ; NON_GNU_CPP=/lib/cpp ;;
1653 *-sco3.2v5* ) opsys=sco5
1654 NON_GNU_CPP=/lib/cpp
1655 # Prevent -belf from being passed to $CPP.
1656 # /lib/cpp does not accept it.
1657 OVERRIDE_CPPFLAGS=" "
1659 *-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
1660 *-386bsd* ) opsys=386bsd ;;
1661 *-freebsd* ) opsys=freebsd ;;
1662 *-nextstep* ) opsys=nextstep ;;
1663 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
1664 esac
1667 ## m68k Linux-based GNU system
1668 m68k-*-linux-gnu* )
1669 machine=m68k opsys=gnu-linux
1672 ## Mips Linux-based GNU system
1673 mips-*-linux-gnu* | mipsel-*-linux-gnu* )
1674 machine=mips opsys=gnu-linux
1677 ## UXP/DS
1678 sparc-fujitsu-sysv4* )
1679 machine=sparc opsys=uxpds
1680 NON_GNU_CPP=/usr/ccs/lib/cpp
1681 RANLIB="ar -ts"
1684 ## UXP/V
1685 f301-fujitsu-uxpv4.1)
1686 machine=f301 opsys=uxpv
1690 unported=yes
1692 esac
1694 ### If the code above didn't choose an operating system, just choose
1695 ### an operating system based on the configuration name. You really
1696 ### only want to use this when you have no idea what the right
1697 ### operating system is; if you know what operating systems a machine
1698 ### runs, it's cleaner to make it explicit in the case statement
1699 ### above.
1700 if test x"${opsys}" = x; then
1701 case "${canonical}" in
1702 *-gnu* ) opsys=gnu ;;
1703 *-bsd4.[01] ) opsys=bsd4-1 ;;
1704 *-bsd4.2 ) opsys=bsd4-2 ;;
1705 *-bsd4.3 ) opsys=bsd4-3 ;;
1706 *-sysv0 | *-sysvr0 ) opsys=usg5-0 ;;
1707 *-sysv2 | *-sysvr2 ) opsys=usg5-2 ;;
1708 *-sysv2.2 | *-sysvr2.2 ) opsys=usg5-2-2 ;;
1709 *-sysv3* | *-sysvr3* ) opsys=usg5-3 ;;
1710 *-sysv4.2uw* ) opsys=unixware ;;
1711 *-sysv4.1* | *-sysvr4.1* )
1712 NON_GNU_CPP=/usr/lib/cpp
1713 opsys=usg5-4 ;;
1714 *-sysv4.[2-9]* | *-sysvr4.[2-9]* )
1715 if [ x$NON_GNU_CPP = x ]; then
1716 if [ -f /usr/ccs/lib/cpp ]; then
1717 NON_GNU_CPP=/usr/ccs/lib/cpp
1718 else
1719 NON_GNU_CPP=/lib/cpp
1722 opsys=usg5-4-2 ;;
1723 *-sysv4* | *-sysvr4* ) opsys=usg5-4 ;;
1725 unported=yes
1727 esac
1731 if test $unported = yes; then
1732 { echo "configure: error: Emacs hasn't been ported to \`${canonical}' systems.
1733 Check \`etc/MACHINES' for recognized configuration names." 1>&2; exit 1; }
1736 machfile="m/${machine}.h"
1737 opsysfile="s/${opsys}.h"
1740 #### Choose a compiler.
1741 test -n "$CC" && cc_specified=yes
1743 # Save the value of CFLAGS that the user specified.
1744 SPECIFIED_CFLAGS="$CFLAGS"
1746 case ${with_gcc} in
1747 "yes" ) CC="gcc" GCC=yes ;;
1748 "no" ) : ${CC=cc} ;;
1749 * ) # Extract the first word of "gcc", so it can be a program name with args.
1750 set dummy gcc; ac_word=$2
1751 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1752 echo "configure:1753: checking for $ac_word" >&5
1753 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1754 echo $ac_n "(cached) $ac_c" 1>&6
1755 else
1756 if test -n "$CC"; then
1757 ac_cv_prog_CC="$CC" # Let the user override the test.
1758 else
1759 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1760 ac_dummy="$PATH"
1761 for ac_dir in $ac_dummy; do
1762 test -z "$ac_dir" && ac_dir=.
1763 if test -f $ac_dir/$ac_word; then
1764 ac_cv_prog_CC="gcc"
1765 break
1767 done
1768 IFS="$ac_save_ifs"
1771 CC="$ac_cv_prog_CC"
1772 if test -n "$CC"; then
1773 echo "$ac_t""$CC" 1>&6
1774 else
1775 echo "$ac_t""no" 1>&6
1778 if test -z "$CC"; then
1779 # Extract the first word of "cc", so it can be a program name with args.
1780 set dummy cc; ac_word=$2
1781 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1782 echo "configure:1783: checking for $ac_word" >&5
1783 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1784 echo $ac_n "(cached) $ac_c" 1>&6
1785 else
1786 if test -n "$CC"; then
1787 ac_cv_prog_CC="$CC" # Let the user override the test.
1788 else
1789 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1790 ac_prog_rejected=no
1791 ac_dummy="$PATH"
1792 for ac_dir in $ac_dummy; do
1793 test -z "$ac_dir" && ac_dir=.
1794 if test -f $ac_dir/$ac_word; then
1795 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1796 ac_prog_rejected=yes
1797 continue
1799 ac_cv_prog_CC="cc"
1800 break
1802 done
1803 IFS="$ac_save_ifs"
1804 if test $ac_prog_rejected = yes; then
1805 # We found a bogon in the path, so make sure we never use it.
1806 set dummy $ac_cv_prog_CC
1807 shift
1808 if test $# -gt 0; then
1809 # We chose a different compiler from the bogus one.
1810 # However, it has the same basename, so the bogon will be chosen
1811 # first if we set CC to just the basename; use the full file name.
1812 shift
1813 set dummy "$ac_dir/$ac_word" "$@"
1814 shift
1815 ac_cv_prog_CC="$@"
1820 CC="$ac_cv_prog_CC"
1821 if test -n "$CC"; then
1822 echo "$ac_t""$CC" 1>&6
1823 else
1824 echo "$ac_t""no" 1>&6
1827 if test -z "$CC"; then
1828 case "`uname -s`" in
1829 *win32* | *WIN32*)
1830 # Extract the first word of "cl", so it can be a program name with args.
1831 set dummy cl; ac_word=$2
1832 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1833 echo "configure:1834: checking for $ac_word" >&5
1834 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1835 echo $ac_n "(cached) $ac_c" 1>&6
1836 else
1837 if test -n "$CC"; then
1838 ac_cv_prog_CC="$CC" # Let the user override the test.
1839 else
1840 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1841 ac_dummy="$PATH"
1842 for ac_dir in $ac_dummy; do
1843 test -z "$ac_dir" && ac_dir=.
1844 if test -f $ac_dir/$ac_word; then
1845 ac_cv_prog_CC="cl"
1846 break
1848 done
1849 IFS="$ac_save_ifs"
1852 CC="$ac_cv_prog_CC"
1853 if test -n "$CC"; then
1854 echo "$ac_t""$CC" 1>&6
1855 else
1856 echo "$ac_t""no" 1>&6
1859 esac
1861 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1864 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1865 echo "configure:1866: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1867 ac_ext=c
1868 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1869 ac_cpp='$CPP $CPPFLAGS'
1870 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1871 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1872 cross_compiling=$ac_cv_prog_cc_cross
1874 cat > conftest.$ac_ext << EOF
1876 #line 1877 "configure"
1877 #include "confdefs.h"
1879 main(){return(0);}
1881 if { (eval echo configure:1882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1882 ac_cv_prog_cc_works=yes
1883 # If we can't run a trivial program, we are probably using a cross compiler.
1884 if (./conftest; exit) 2>/dev/null; then
1885 ac_cv_prog_cc_cross=no
1886 else
1887 ac_cv_prog_cc_cross=yes
1889 else
1890 echo "configure: failed program was:" >&5
1891 cat conftest.$ac_ext >&5
1892 ac_cv_prog_cc_works=no
1894 rm -fr conftest*
1895 ac_ext=c
1896 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1897 ac_cpp='$CPP $CPPFLAGS'
1898 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1899 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1900 cross_compiling=$ac_cv_prog_cc_cross
1902 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1903 if test $ac_cv_prog_cc_works = no; then
1904 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1906 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1907 echo "configure:1908: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1908 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1909 cross_compiling=$ac_cv_prog_cc_cross
1911 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1912 echo "configure:1913: checking whether we are using GNU C" >&5
1913 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1914 echo $ac_n "(cached) $ac_c" 1>&6
1915 else
1916 cat > conftest.c <<EOF
1917 #ifdef __GNUC__
1918 yes;
1919 #endif
1921 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1922: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1922 ac_cv_prog_gcc=yes
1923 else
1924 ac_cv_prog_gcc=no
1928 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1930 if test $ac_cv_prog_gcc = yes; then
1931 GCC=yes
1932 else
1933 GCC=
1936 ac_test_CFLAGS="${CFLAGS+set}"
1937 ac_save_CFLAGS="$CFLAGS"
1938 CFLAGS=
1939 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1940 echo "configure:1941: checking whether ${CC-cc} accepts -g" >&5
1941 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1942 echo $ac_n "(cached) $ac_c" 1>&6
1943 else
1944 echo 'void f(){}' > conftest.c
1945 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1946 ac_cv_prog_cc_g=yes
1947 else
1948 ac_cv_prog_cc_g=no
1950 rm -f conftest*
1954 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1955 if test "$ac_test_CFLAGS" = set; then
1956 CFLAGS="$ac_save_CFLAGS"
1957 elif test $ac_cv_prog_cc_g = yes; then
1958 if test "$GCC" = yes; then
1959 CFLAGS="-g -O2"
1960 else
1961 CFLAGS="-g"
1963 else
1964 if test "$GCC" = yes; then
1965 CFLAGS="-O2"
1966 else
1967 CFLAGS=
1971 esac
1973 # On Suns, sometimes $CPP names a directory.
1974 if test -n "$CPP" && test -d "$CPP"; then
1975 CPP=
1978 #### Some systems specify a CPP 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_CPP" != x && test x$GCC != xyes && test "x$CPP" = x
1982 then
1983 CPP="$NON_GNU_CPP"
1986 #### Some systems specify a CC to use unless we are using GCC.
1987 #### Now that we know whether we are using GCC, we can decide whether
1988 #### to use that one.
1989 if test "x$NON_GNU_CC" != x && test x$GCC != xyes &&
1990 test x$cc_specified != xyes
1991 then
1992 CC="$NON_GNU_CC"
1995 if test x$GCC = xyes && test "x$GCC_TEST_OPTIONS" != x
1996 then
1997 CC="$CC $GCC_TEST_OPTIONS"
2000 if test x$GCC = x && test "x$NON_GCC_TEST_OPTIONS" != x
2001 then
2002 CC="$CC $NON_GCC_TEST_OPTIONS"
2005 if test x$GCC = xyes && test "x$GCC_LINK_TEST_OPTIONS" != x
2006 then
2007 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
2010 if test x$GCC = x && test "x$NON_GCC_LINK_TEST_OPTIONS" != x
2011 then
2012 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
2015 #### Some other nice autoconf tests. If you add a test here which
2016 #### should make an entry in src/config.h, don't forget to add an
2017 #### #undef clause to src/config.h.in for autoconf to modify.
2019 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2020 echo "configure:2021: checking whether ln -s works" >&5
2021 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
2022 echo $ac_n "(cached) $ac_c" 1>&6
2023 else
2024 rm -f conftestdata
2025 if ln -s X conftestdata 2>/dev/null
2026 then
2027 rm -f conftestdata
2028 ac_cv_prog_LN_S="ln -s"
2029 else
2030 ac_cv_prog_LN_S=ln
2033 LN_S="$ac_cv_prog_LN_S"
2034 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2035 echo "$ac_t""yes" 1>&6
2036 else
2037 echo "$ac_t""no" 1>&6
2040 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2041 echo "configure:2042: checking how to run the C preprocessor" >&5
2042 # On Suns, sometimes $CPP names a directory.
2043 if test -n "$CPP" && test -d "$CPP"; then
2044 CPP=
2046 if test -z "$CPP"; then
2047 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
2048 echo $ac_n "(cached) $ac_c" 1>&6
2049 else
2050 # This must be in double quotes, not single quotes, because CPP may get
2051 # substituted into the Makefile and "${CC-cc}" will confuse make.
2052 CPP="${CC-cc} -E"
2053 # On the NeXT, cc -E runs the code through the compiler's parser,
2054 # not just through cpp.
2055 cat > conftest.$ac_ext <<EOF
2056 #line 2057 "configure"
2057 #include "confdefs.h"
2058 #include <assert.h>
2059 Syntax Error
2061 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2062 { (eval echo configure:2063: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2063 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2064 if test -z "$ac_err"; then
2066 else
2067 echo "$ac_err" >&5
2068 echo "configure: failed program was:" >&5
2069 cat conftest.$ac_ext >&5
2070 rm -rf conftest*
2071 CPP="${CC-cc} -E -traditional-cpp"
2072 cat > conftest.$ac_ext <<EOF
2073 #line 2074 "configure"
2074 #include "confdefs.h"
2075 #include <assert.h>
2076 Syntax Error
2078 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2079 { (eval echo configure:2080: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2080 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2081 if test -z "$ac_err"; then
2083 else
2084 echo "$ac_err" >&5
2085 echo "configure: failed program was:" >&5
2086 cat conftest.$ac_ext >&5
2087 rm -rf conftest*
2088 CPP="${CC-cc} -nologo -E"
2089 cat > conftest.$ac_ext <<EOF
2090 #line 2091 "configure"
2091 #include "confdefs.h"
2092 #include <assert.h>
2093 Syntax Error
2095 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2096 { (eval echo configure:2097: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2097 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2098 if test -z "$ac_err"; then
2100 else
2101 echo "$ac_err" >&5
2102 echo "configure: failed program was:" >&5
2103 cat conftest.$ac_ext >&5
2104 rm -rf conftest*
2105 CPP=/lib/cpp
2107 rm -f conftest*
2109 rm -f conftest*
2111 rm -f conftest*
2112 ac_cv_prog_CPP="$CPP"
2114 CPP="$ac_cv_prog_CPP"
2115 else
2116 ac_cv_prog_CPP="$CPP"
2118 echo "$ac_t""$CPP" 1>&6
2120 # Find a good install program. We prefer a C program (faster),
2121 # so one script is as good as another. But avoid the broken or
2122 # incompatible versions:
2123 # SysV /etc/install, /usr/sbin/install
2124 # SunOS /usr/etc/install
2125 # IRIX /sbin/install
2126 # AIX /bin/install
2127 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2128 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2129 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2130 # ./install, which can be erroneously created by make from ./install.sh.
2131 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2132 echo "configure:2133: checking for a BSD compatible install" >&5
2133 if test -z "$INSTALL"; then
2134 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
2135 echo $ac_n "(cached) $ac_c" 1>&6
2136 else
2137 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
2138 for ac_dir in $PATH; do
2139 # Account for people who put trailing slashes in PATH elements.
2140 case "$ac_dir/" in
2141 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2143 # OSF1 and SCO ODT 3.0 have their own names for install.
2144 # Don't use installbsd from OSF since it installs stuff as root
2145 # by default.
2146 for ac_prog in ginstall scoinst install; do
2147 if test -f $ac_dir/$ac_prog; then
2148 if test $ac_prog = install &&
2149 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2150 # AIX install. It has an incompatible calling convention.
2152 else
2153 ac_cv_path_install="$ac_dir/$ac_prog -c"
2154 break 2
2157 done
2159 esac
2160 done
2161 IFS="$ac_save_IFS"
2164 if test "${ac_cv_path_install+set}" = set; then
2165 INSTALL="$ac_cv_path_install"
2166 else
2167 # As a last resort, use the slow shell script. We don't cache a
2168 # path for INSTALL within a source directory, because that will
2169 # break other packages using the cache if that directory is
2170 # removed, or if the path is relative.
2171 INSTALL="$ac_install_sh"
2174 echo "$ac_t""$INSTALL" 1>&6
2176 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2177 # It thinks the first close brace ends the variable substitution.
2178 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2180 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
2182 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2184 for ac_prog in 'bison -y' byacc
2186 # Extract the first word of "$ac_prog", so it can be a program name with args.
2187 set dummy $ac_prog; ac_word=$2
2188 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2189 echo "configure:2190: checking for $ac_word" >&5
2190 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
2191 echo $ac_n "(cached) $ac_c" 1>&6
2192 else
2193 if test -n "$YACC"; then
2194 ac_cv_prog_YACC="$YACC" # Let the user override the test.
2195 else
2196 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2197 ac_dummy="$PATH"
2198 for ac_dir in $ac_dummy; do
2199 test -z "$ac_dir" && ac_dir=.
2200 if test -f $ac_dir/$ac_word; then
2201 ac_cv_prog_YACC="$ac_prog"
2202 break
2204 done
2205 IFS="$ac_save_ifs"
2208 YACC="$ac_cv_prog_YACC"
2209 if test -n "$YACC"; then
2210 echo "$ac_t""$YACC" 1>&6
2211 else
2212 echo "$ac_t""no" 1>&6
2215 test -n "$YACC" && break
2216 done
2217 test -n "$YACC" || YACC="yacc"
2219 if test "x$RANLIB" = x; then
2220 # Extract the first word of "ranlib", so it can be a program name with args.
2221 set dummy ranlib; ac_word=$2
2222 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2223 echo "configure:2224: checking for $ac_word" >&5
2224 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2225 echo $ac_n "(cached) $ac_c" 1>&6
2226 else
2227 if test -n "$RANLIB"; then
2228 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2229 else
2230 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2231 ac_dummy="$PATH"
2232 for ac_dir in $ac_dummy; do
2233 test -z "$ac_dir" && ac_dir=.
2234 if test -f $ac_dir/$ac_word; then
2235 ac_cv_prog_RANLIB="ranlib"
2236 break
2238 done
2239 IFS="$ac_save_ifs"
2240 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2243 RANLIB="$ac_cv_prog_RANLIB"
2244 if test -n "$RANLIB"; then
2245 echo "$ac_t""$RANLIB" 1>&6
2246 else
2247 echo "$ac_t""no" 1>&6
2252 echo $ac_n "checking for AIX""... $ac_c" 1>&6
2253 echo "configure:2254: checking for AIX" >&5
2254 cat > conftest.$ac_ext <<EOF
2255 #line 2256 "configure"
2256 #include "confdefs.h"
2257 #ifdef _AIX
2259 #endif
2262 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2263 egrep "yes" >/dev/null 2>&1; then
2264 rm -rf conftest*
2265 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
2266 #define _ALL_SOURCE 1
2269 else
2270 rm -rf conftest*
2271 echo "$ac_t""no" 1>&6
2273 rm -f conftest*
2277 #### Extract some information from the operating system and machine files.
2279 echo "checking the machine- and system-dependent files to find out
2280 - which libraries the lib-src programs will want, and
2281 - whether the GNU malloc routines are usable" 1>&6
2282 echo "configure:2283: checking the machine- and system-dependent files to find out
2283 - which libraries the lib-src programs will want, and
2284 - whether the GNU malloc routines are usable" >&5
2286 ### First figure out CFLAGS (which we use for running the compiler here)
2287 ### and REAL_CFLAGS (which we use for real compilation).
2288 ### The two are the same except on a few systems, where they are made
2289 ### different to work around various lossages. For example,
2290 ### GCC 2.5 on GNU/Linux needs them to be different because it treats -g
2291 ### as implying static linking.
2293 ### If the CFLAGS env var is specified, we use that value
2294 ### instead of the default.
2296 ### It's not important that this name contain the PID; you can't run
2297 ### two configures in the same directory and have anything work
2298 ### anyway.
2299 tempcname="conftest.c"
2301 echo '
2302 #include "'${srcdir}'/src/'${opsysfile}'"
2303 #include "'${srcdir}'/src/'${machfile}'"
2304 #ifndef LIBS_MACHINE
2305 #define LIBS_MACHINE
2306 #endif
2307 #ifndef LIBS_SYSTEM
2308 #define LIBS_SYSTEM
2309 #endif
2310 #ifndef C_SWITCH_SYSTEM
2311 #define C_SWITCH_SYSTEM
2312 #endif
2313 #ifndef C_SWITCH_MACHINE
2314 #define C_SWITCH_MACHINE
2315 #endif
2316 configure___ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM
2317 configure___ c_switch_system=C_SWITCH_SYSTEM
2318 configure___ c_switch_machine=C_SWITCH_MACHINE
2320 #ifndef LIB_X11_LIB
2321 #define LIB_X11_LIB -lX11
2322 #endif
2324 #ifndef LIBX11_MACHINE
2325 #define LIBX11_MACHINE
2326 #endif
2328 #ifndef LIBX11_SYSTEM
2329 #define LIBX11_SYSTEM
2330 #endif
2331 configure___ LIBX=LIB_X11_LIB LIBX11_MACHINE LIBX11_SYSTEM
2333 #ifdef UNEXEC
2334 configure___ unexec=UNEXEC
2335 #else
2336 configure___ unexec=unexec.o
2337 #endif
2339 #ifdef SYSTEM_MALLOC
2340 configure___ system_malloc=yes
2341 #else
2342 configure___ system_malloc=no
2343 #endif
2345 #ifdef USE_MMAP_FOR_BUFFERS
2346 configure___ use_mmap_for_buffers=yes
2347 #else
2348 configure___ use_mmap_for_buffers=no
2349 #endif
2351 #ifndef C_DEBUG_SWITCH
2352 #define C_DEBUG_SWITCH -g
2353 #endif
2355 #ifndef C_OPTIMIZE_SWITCH
2356 #ifdef __GNUC__
2357 #define C_OPTIMIZE_SWITCH -O2
2358 #else
2359 #define C_OPTIMIZE_SWITCH -O
2360 #endif
2361 #endif
2363 #ifndef LD_SWITCH_MACHINE
2364 #define LD_SWITCH_MACHINE
2365 #endif
2367 #ifndef LD_SWITCH_SYSTEM
2368 #define LD_SWITCH_SYSTEM
2369 #endif
2371 #ifndef LD_SWITCH_X_SITE_AUX
2372 #define LD_SWITCH_X_SITE_AUX
2373 #endif
2375 configure___ ld_switch_system=LD_SWITCH_SYSTEM
2376 configure___ ld_switch_machine=LD_SWITCH_MACHINE
2378 #ifdef THIS_IS_CONFIGURE
2380 /* Get the CFLAGS for tests in configure. */
2381 #ifdef __GNUC__
2382 configure___ CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
2383 #else
2384 configure___ CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
2385 #endif
2387 #else /* not THIS_IS_CONFIGURE */
2389 /* Get the CFLAGS for real compilation. */
2390 #ifdef __GNUC__
2391 configure___ REAL_CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
2392 #else
2393 configure___ REAL_CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
2394 #endif
2396 #endif /* not THIS_IS_CONFIGURE */
2397 ' > ${tempcname}
2399 # The value of CPP is a quoted variable reference, so we need to do this
2400 # to get its actual value...
2401 CPP=`eval "echo $CPP"`
2402 eval `${CPP} -Isrc ${tempcname} \
2403 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
2404 if test "x$SPECIFIED_CFLAGS" = x; then
2405 eval `${CPP} -Isrc -DTHIS_IS_CONFIGURE ${tempcname} \
2406 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
2407 else
2408 REAL_CFLAGS="$CFLAGS"
2410 rm ${tempcname}
2412 ac_link="$ac_link $ld_switch_machine $ld_switch_system"
2414 ### Make sure subsequent tests use flags consistent with the build flags.
2416 if test x"${OVERRIDE_CPPFLAGS}" != x; then
2417 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
2418 else
2419 CPPFLAGS="$c_switch_system $c_switch_machine $CPPFLAGS"
2423 # Check whether --enable-largefile or --disable-largefile was given.
2424 if test "${enable_largefile+set}" = set; then
2425 enableval="$enable_largefile"
2429 if test "$enable_largefile" != no; then
2431 echo $ac_n "checking for special C compiler options needed for large files""... $ac_c" 1>&6
2432 echo "configure:2433: checking for special C compiler options needed for large files" >&5
2433 if eval "test \"`echo '$''{'ac_cv_sys_largefile_CC'+set}'`\" = set"; then
2434 echo $ac_n "(cached) $ac_c" 1>&6
2435 else
2436 ac_cv_sys_largefile_CC=no
2437 if test "$GCC" != yes; then
2438 # IRIX 6.2 and later do not support large files by default,
2439 # so use the C compiler's -n32 option if that helps.
2440 cat > conftest.$ac_ext <<EOF
2441 #line 2442 "configure"
2442 #include "confdefs.h"
2443 #include <sys/types.h>
2444 int a[(off_t) 9223372036854775807 == 9223372036854775807 ? 1 : -1];
2446 int main() {
2448 ; return 0; }
2450 if { (eval echo configure:2451: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2452 else
2453 echo "configure: failed program was:" >&5
2454 cat conftest.$ac_ext >&5
2455 rm -rf conftest*
2456 ac_save_CC="$CC"
2457 CC="$CC -n32"
2458 cat > conftest.$ac_ext <<EOF
2459 #line 2460 "configure"
2460 #include "confdefs.h"
2461 #include <sys/types.h>
2462 int a[(off_t) 9223372036854775807 == 9223372036854775807 ? 1 : -1];
2464 int main() {
2466 ; return 0; }
2468 if { (eval echo configure:2469: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2469 rm -rf conftest*
2470 ac_cv_sys_largefile_CC=' -n32'
2471 else
2472 echo "configure: failed program was:" >&5
2473 cat conftest.$ac_ext >&5
2475 rm -f conftest*
2476 CC="$ac_save_CC"
2478 rm -f conftest*
2482 echo "$ac_t""$ac_cv_sys_largefile_CC" 1>&6
2483 if test "$ac_cv_sys_largefile_CC" != no; then
2484 CC="$CC$ac_cv_sys_largefile_CC"
2487 echo $ac_n "checking for _FILE_OFFSET_BITS value needed for large files""... $ac_c" 1>&6
2488 echo "configure:2489: checking for _FILE_OFFSET_BITS value needed for large files" >&5
2489 if eval "test \"`echo '$''{'ac_cv_sys_file_offset_bits'+set}'`\" = set"; then
2490 echo $ac_n "(cached) $ac_c" 1>&6
2491 else
2492 ac_cv_sys_file_offset_bits=no
2493 cat > conftest.$ac_ext <<EOF
2494 #line 2495 "configure"
2495 #include "confdefs.h"
2496 #include <sys/types.h>
2497 int a[(off_t) 9223372036854775807 == 9223372036854775807 ? 1 : -1];
2499 int main() {
2501 ; return 0; }
2503 if { (eval echo configure:2504: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2505 else
2506 echo "configure: failed program was:" >&5
2507 cat conftest.$ac_ext >&5
2508 rm -rf conftest*
2509 cat > conftest.$ac_ext <<EOF
2510 #line 2511 "configure"
2511 #include "confdefs.h"
2512 #define _FILE_OFFSET_BITS 64
2513 #include <sys/types.h>
2514 int a[(off_t) 9223372036854775807 == 9223372036854775807 ? 1 : -1];
2517 int main() {
2519 ; return 0; }
2521 if { (eval echo configure:2522: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2522 rm -rf conftest*
2523 ac_cv_sys_file_offset_bits=64
2524 else
2525 echo "configure: failed program was:" >&5
2526 cat conftest.$ac_ext >&5
2528 rm -f conftest*
2530 rm -f conftest*
2533 echo "$ac_t""$ac_cv_sys_file_offset_bits" 1>&6
2534 if test "$ac_cv_sys_file_offset_bits" != no; then
2535 cat >> confdefs.h <<EOF
2536 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
2540 echo $ac_n "checking for _LARGE_FILES value needed for large files""... $ac_c" 1>&6
2541 echo "configure:2542: checking for _LARGE_FILES value needed for large files" >&5
2542 if eval "test \"`echo '$''{'ac_cv_sys_large_files'+set}'`\" = set"; then
2543 echo $ac_n "(cached) $ac_c" 1>&6
2544 else
2545 ac_cv_sys_large_files=no
2546 cat > conftest.$ac_ext <<EOF
2547 #line 2548 "configure"
2548 #include "confdefs.h"
2550 int main() {
2552 ; return 0; }
2554 if { (eval echo configure:2555: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2556 else
2557 echo "configure: failed program was:" >&5
2558 cat conftest.$ac_ext >&5
2559 rm -rf conftest*
2560 cat > conftest.$ac_ext <<EOF
2561 #line 2562 "configure"
2562 #include "confdefs.h"
2563 #define _LARGE_FILES 1
2566 int main() {
2568 ; return 0; }
2570 if { (eval echo configure:2571: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2571 rm -rf conftest*
2572 ac_cv_sys_large_files=1
2573 else
2574 echo "configure: failed program was:" >&5
2575 cat conftest.$ac_ext >&5
2577 rm -f conftest*
2579 rm -f conftest*
2582 echo "$ac_t""$ac_cv_sys_large_files" 1>&6
2583 if test "$ac_cv_sys_large_files" != no; then
2584 cat >> confdefs.h <<EOF
2585 #define _LARGE_FILES $ac_cv_sys_large_files
2592 # Sound support for GNU/Linux and the free BSDs.
2593 for ac_hdr in machine/soundcard.h sys/soundcard.h soundcard.h
2595 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2596 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2597 echo "configure:2598: checking for $ac_hdr" >&5
2598 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2599 echo $ac_n "(cached) $ac_c" 1>&6
2600 else
2601 cat > conftest.$ac_ext <<EOF
2602 #line 2603 "configure"
2603 #include "confdefs.h"
2604 #include <$ac_hdr>
2606 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2607 { (eval echo configure:2608: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2608 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2609 if test -z "$ac_err"; then
2610 rm -rf conftest*
2611 eval "ac_cv_header_$ac_safe=yes"
2612 else
2613 echo "$ac_err" >&5
2614 echo "configure: failed program was:" >&5
2615 cat conftest.$ac_ext >&5
2616 rm -rf conftest*
2617 eval "ac_cv_header_$ac_safe=no"
2619 rm -f conftest*
2621 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2622 echo "$ac_t""yes" 1>&6
2623 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2624 cat >> confdefs.h <<EOF
2625 #define $ac_tr_hdr 1
2628 else
2629 echo "$ac_t""no" 1>&6
2631 done
2633 # Emulation library used on NetBSD.
2634 echo $ac_n "checking for _oss_ioctl in -lossaudio""... $ac_c" 1>&6
2635 echo "configure:2636: checking for _oss_ioctl in -lossaudio" >&5
2636 ac_lib_var=`echo ossaudio'_'_oss_ioctl | sed 'y%./+-%__p_%'`
2637 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2638 echo $ac_n "(cached) $ac_c" 1>&6
2639 else
2640 ac_save_LIBS="$LIBS"
2641 LIBS="-lossaudio $LIBS"
2642 cat > conftest.$ac_ext <<EOF
2643 #line 2644 "configure"
2644 #include "confdefs.h"
2645 /* Override any gcc2 internal prototype to avoid an error. */
2646 /* We use char because int might match the return type of a gcc2
2647 builtin and then its argument prototype would still apply. */
2648 char _oss_ioctl();
2650 int main() {
2651 _oss_ioctl()
2652 ; return 0; }
2654 if { (eval echo configure:2655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2655 rm -rf conftest*
2656 eval "ac_cv_lib_$ac_lib_var=yes"
2657 else
2658 echo "configure: failed program was:" >&5
2659 cat conftest.$ac_ext >&5
2660 rm -rf conftest*
2661 eval "ac_cv_lib_$ac_lib_var=no"
2663 rm -f conftest*
2664 LIBS="$ac_save_LIBS"
2667 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2668 echo "$ac_t""yes" 1>&6
2669 LIBSOUND=-lossaudio
2670 else
2671 echo "$ac_t""no" 1>&6
2672 LIBSOUND=
2677 for ac_hdr in sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \
2678 linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \
2679 termcap.h stdio_ext.h fcntl.h term.h strings.h
2681 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2682 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2683 echo "configure:2684: checking for $ac_hdr" >&5
2684 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2685 echo $ac_n "(cached) $ac_c" 1>&6
2686 else
2687 cat > conftest.$ac_ext <<EOF
2688 #line 2689 "configure"
2689 #include "confdefs.h"
2690 #include <$ac_hdr>
2692 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2693 { (eval echo configure:2694: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2694 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2695 if test -z "$ac_err"; then
2696 rm -rf conftest*
2697 eval "ac_cv_header_$ac_safe=yes"
2698 else
2699 echo "$ac_err" >&5
2700 echo "configure: failed program was:" >&5
2701 cat conftest.$ac_ext >&5
2702 rm -rf conftest*
2703 eval "ac_cv_header_$ac_safe=no"
2705 rm -f conftest*
2707 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2708 echo "$ac_t""yes" 1>&6
2709 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2710 cat >> confdefs.h <<EOF
2711 #define $ac_tr_hdr 1
2714 else
2715 echo "$ac_t""no" 1>&6
2717 done
2719 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
2720 echo "configure:2721: checking for ANSI C header files" >&5
2721 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2722 echo $ac_n "(cached) $ac_c" 1>&6
2723 else
2724 cat > conftest.$ac_ext <<EOF
2725 #line 2726 "configure"
2726 #include "confdefs.h"
2727 #include <stdlib.h>
2728 #include <stdarg.h>
2729 #include <string.h>
2730 #include <float.h>
2732 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2733 { (eval echo configure:2734: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2734 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2735 if test -z "$ac_err"; then
2736 rm -rf conftest*
2737 ac_cv_header_stdc=yes
2738 else
2739 echo "$ac_err" >&5
2740 echo "configure: failed program was:" >&5
2741 cat conftest.$ac_ext >&5
2742 rm -rf conftest*
2743 ac_cv_header_stdc=no
2745 rm -f conftest*
2747 if test $ac_cv_header_stdc = yes; then
2748 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2749 cat > conftest.$ac_ext <<EOF
2750 #line 2751 "configure"
2751 #include "confdefs.h"
2752 #include <string.h>
2754 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2755 egrep "memchr" >/dev/null 2>&1; then
2757 else
2758 rm -rf conftest*
2759 ac_cv_header_stdc=no
2761 rm -f conftest*
2765 if test $ac_cv_header_stdc = yes; then
2766 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2767 cat > conftest.$ac_ext <<EOF
2768 #line 2769 "configure"
2769 #include "confdefs.h"
2770 #include <stdlib.h>
2772 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2773 egrep "free" >/dev/null 2>&1; then
2775 else
2776 rm -rf conftest*
2777 ac_cv_header_stdc=no
2779 rm -f conftest*
2783 if test $ac_cv_header_stdc = yes; then
2784 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2785 if test "$cross_compiling" = yes; then
2787 else
2788 cat > conftest.$ac_ext <<EOF
2789 #line 2790 "configure"
2790 #include "confdefs.h"
2791 #include <ctype.h>
2792 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2793 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2794 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2795 int main () { int i; for (i = 0; i < 256; i++)
2796 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2797 exit (0); }
2800 if { (eval echo configure:2801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2801 then
2803 else
2804 echo "configure: failed program was:" >&5
2805 cat conftest.$ac_ext >&5
2806 rm -fr conftest*
2807 ac_cv_header_stdc=no
2809 rm -fr conftest*
2815 echo "$ac_t""$ac_cv_header_stdc" 1>&6
2816 if test $ac_cv_header_stdc = yes; then
2817 cat >> confdefs.h <<\EOF
2818 #define STDC_HEADERS 1
2823 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
2824 echo "configure:2825: checking whether time.h and sys/time.h may both be included" >&5
2825 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2826 echo $ac_n "(cached) $ac_c" 1>&6
2827 else
2828 cat > conftest.$ac_ext <<EOF
2829 #line 2830 "configure"
2830 #include "confdefs.h"
2831 #include <sys/types.h>
2832 #include <sys/time.h>
2833 #include <time.h>
2834 int main() {
2835 struct tm *tp;
2836 ; return 0; }
2838 if { (eval echo configure:2839: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2839 rm -rf conftest*
2840 ac_cv_header_time=yes
2841 else
2842 echo "configure: failed program was:" >&5
2843 cat conftest.$ac_ext >&5
2844 rm -rf conftest*
2845 ac_cv_header_time=no
2847 rm -f conftest*
2850 echo "$ac_t""$ac_cv_header_time" 1>&6
2851 if test $ac_cv_header_time = yes; then
2852 cat >> confdefs.h <<\EOF
2853 #define TIME_WITH_SYS_TIME 1
2858 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
2859 echo "configure:2860: checking for sys_siglist declaration in signal.h or unistd.h" >&5
2860 if eval "test \"`echo '$''{'ac_cv_decl_sys_siglist'+set}'`\" = set"; then
2861 echo $ac_n "(cached) $ac_c" 1>&6
2862 else
2863 cat > conftest.$ac_ext <<EOF
2864 #line 2865 "configure"
2865 #include "confdefs.h"
2866 #include <sys/types.h>
2867 #include <signal.h>
2868 /* NetBSD declares sys_siglist in unistd.h. */
2869 #ifdef HAVE_UNISTD_H
2870 #include <unistd.h>
2871 #endif
2872 int main() {
2873 char *msg = *(sys_siglist + 1);
2874 ; return 0; }
2876 if { (eval echo configure:2877: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2877 rm -rf conftest*
2878 ac_cv_decl_sys_siglist=yes
2879 else
2880 echo "configure: failed program was:" >&5
2881 cat conftest.$ac_ext >&5
2882 rm -rf conftest*
2883 ac_cv_decl_sys_siglist=no
2885 rm -f conftest*
2888 echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
2889 if test $ac_cv_decl_sys_siglist = yes; then
2890 cat >> confdefs.h <<\EOF
2891 #define SYS_SIGLIST_DECLARED 1
2896 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
2897 echo "configure:2898: checking for sys/wait.h that is POSIX.1 compatible" >&5
2898 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
2899 echo $ac_n "(cached) $ac_c" 1>&6
2900 else
2901 cat > conftest.$ac_ext <<EOF
2902 #line 2903 "configure"
2903 #include "confdefs.h"
2904 #include <sys/types.h>
2905 #include <sys/wait.h>
2906 #ifndef WEXITSTATUS
2907 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
2908 #endif
2909 #ifndef WIFEXITED
2910 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
2911 #endif
2912 int main() {
2913 int s;
2914 wait (&s);
2915 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
2916 ; return 0; }
2918 if { (eval echo configure:2919: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2919 rm -rf conftest*
2920 ac_cv_header_sys_wait_h=yes
2921 else
2922 echo "configure: failed program was:" >&5
2923 cat conftest.$ac_ext >&5
2924 rm -rf conftest*
2925 ac_cv_header_sys_wait_h=no
2927 rm -f conftest*
2930 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
2931 if test $ac_cv_header_sys_wait_h = yes; then
2932 cat >> confdefs.h <<\EOF
2933 #define HAVE_SYS_WAIT_H 1
2939 echo $ac_n "checking for struct utimbuf""... $ac_c" 1>&6
2940 echo "configure:2941: checking for struct utimbuf" >&5
2941 if eval "test \"`echo '$''{'emacs_cv_struct_utimbuf'+set}'`\" = set"; then
2942 echo $ac_n "(cached) $ac_c" 1>&6
2943 else
2944 cat > conftest.$ac_ext <<EOF
2945 #line 2946 "configure"
2946 #include "confdefs.h"
2947 #ifdef TIME_WITH_SYS_TIME
2948 #include <sys/time.h>
2949 #include <time.h>
2950 #else
2951 #ifdef HAVE_SYS_TIME_H
2952 #include <sys/time.h>
2953 #else
2954 #include <time.h>
2955 #endif
2956 #endif
2957 #ifdef HAVE_UTIME_H
2958 #include <utime.h>
2959 #endif
2960 int main() {
2961 static struct utimbuf x; x.actime = x.modtime;
2962 ; return 0; }
2964 if { (eval echo configure:2965: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2965 rm -rf conftest*
2966 emacs_cv_struct_utimbuf=yes
2967 else
2968 echo "configure: failed program was:" >&5
2969 cat conftest.$ac_ext >&5
2970 rm -rf conftest*
2971 emacs_cv_struct_utimbuf=no
2973 rm -f conftest*
2976 echo "$ac_t""$emacs_cv_struct_utimbuf" 1>&6
2977 if test $emacs_cv_struct_utimbuf = yes; then
2978 cat >> confdefs.h <<\EOF
2979 #define HAVE_STRUCT_UTIMBUF 1
2984 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
2985 echo "configure:2986: checking return type of signal handlers" >&5
2986 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2987 echo $ac_n "(cached) $ac_c" 1>&6
2988 else
2989 cat > conftest.$ac_ext <<EOF
2990 #line 2991 "configure"
2991 #include "confdefs.h"
2992 #include <sys/types.h>
2993 #include <signal.h>
2994 #ifdef signal
2995 #undef signal
2996 #endif
2997 #ifdef __cplusplus
2998 extern "C" void (*signal (int, void (*)(int)))(int);
2999 #else
3000 void (*signal ()) ();
3001 #endif
3003 int main() {
3004 int i;
3005 ; return 0; }
3007 if { (eval echo configure:3008: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3008 rm -rf conftest*
3009 ac_cv_type_signal=void
3010 else
3011 echo "configure: failed program was:" >&5
3012 cat conftest.$ac_ext >&5
3013 rm -rf conftest*
3014 ac_cv_type_signal=int
3016 rm -f conftest*
3019 echo "$ac_t""$ac_cv_type_signal" 1>&6
3020 cat >> confdefs.h <<EOF
3021 #define RETSIGTYPE $ac_cv_type_signal
3026 echo $ac_n "checking for speed_t""... $ac_c" 1>&6
3027 echo "configure:3028: checking for speed_t" >&5
3028 if eval "test \"`echo '$''{'emacs_cv_speed_t'+set}'`\" = set"; then
3029 echo $ac_n "(cached) $ac_c" 1>&6
3030 else
3031 cat > conftest.$ac_ext <<EOF
3032 #line 3033 "configure"
3033 #include "confdefs.h"
3034 #include <termios.h>
3035 int main() {
3036 speed_t x = 1;
3037 ; return 0; }
3039 if { (eval echo configure:3040: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3040 rm -rf conftest*
3041 emacs_cv_speed_t=yes
3042 else
3043 echo "configure: failed program was:" >&5
3044 cat conftest.$ac_ext >&5
3045 rm -rf conftest*
3046 emacs_cv_speed_t=no
3048 rm -f conftest*
3051 echo "$ac_t""$emacs_cv_speed_t" 1>&6
3052 if test $emacs_cv_speed_t = yes; then
3053 cat >> confdefs.h <<\EOF
3054 #define HAVE_SPEED_T 1
3059 echo $ac_n "checking for struct timeval""... $ac_c" 1>&6
3060 echo "configure:3061: checking for struct timeval" >&5
3061 if eval "test \"`echo '$''{'emacs_cv_struct_timeval'+set}'`\" = set"; then
3062 echo $ac_n "(cached) $ac_c" 1>&6
3063 else
3064 cat > conftest.$ac_ext <<EOF
3065 #line 3066 "configure"
3066 #include "confdefs.h"
3067 #ifdef TIME_WITH_SYS_TIME
3068 #include <sys/time.h>
3069 #include <time.h>
3070 #else
3071 #ifdef HAVE_SYS_TIME_H
3072 #include <sys/time.h>
3073 #else
3074 #include <time.h>
3075 #endif
3076 #endif
3077 int main() {
3078 static struct timeval x; x.tv_sec = x.tv_usec;
3079 ; return 0; }
3081 if { (eval echo configure:3082: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3082 rm -rf conftest*
3083 emacs_cv_struct_timeval=yes
3084 else
3085 echo "configure: failed program was:" >&5
3086 cat conftest.$ac_ext >&5
3087 rm -rf conftest*
3088 emacs_cv_struct_timeval=no
3090 rm -f conftest*
3093 echo "$ac_t""$emacs_cv_struct_timeval" 1>&6
3094 HAVE_TIMEVAL=$emacs_cv_struct_timeval
3095 if test $emacs_cv_struct_timeval = yes; then
3096 cat >> confdefs.h <<\EOF
3097 #define HAVE_TIMEVAL 1
3102 echo $ac_n "checking for struct exception""... $ac_c" 1>&6
3103 echo "configure:3104: checking for struct exception" >&5
3104 if eval "test \"`echo '$''{'emacs_cv_struct_exception'+set}'`\" = set"; then
3105 echo $ac_n "(cached) $ac_c" 1>&6
3106 else
3107 cat > conftest.$ac_ext <<EOF
3108 #line 3109 "configure"
3109 #include "confdefs.h"
3110 #include <math.h>
3111 int main() {
3112 static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1;
3113 ; return 0; }
3115 if { (eval echo configure:3116: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3116 rm -rf conftest*
3117 emacs_cv_struct_exception=yes
3118 else
3119 echo "configure: failed program was:" >&5
3120 cat conftest.$ac_ext >&5
3121 rm -rf conftest*
3122 emacs_cv_struct_exception=no
3124 rm -f conftest*
3127 echo "$ac_t""$emacs_cv_struct_exception" 1>&6
3128 HAVE_EXCEPTION=$emacs_cv_struct_exception
3129 if test $emacs_cv_struct_exception != yes; then
3130 cat >> confdefs.h <<\EOF
3131 #define NO_MATHERR 1
3136 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
3137 echo "configure:3138: checking whether struct tm is in sys/time.h or time.h" >&5
3138 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
3139 echo $ac_n "(cached) $ac_c" 1>&6
3140 else
3141 cat > conftest.$ac_ext <<EOF
3142 #line 3143 "configure"
3143 #include "confdefs.h"
3144 #include <sys/types.h>
3145 #include <time.h>
3146 int main() {
3147 struct tm *tp; tp->tm_sec;
3148 ; return 0; }
3150 if { (eval echo configure:3151: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3151 rm -rf conftest*
3152 ac_cv_struct_tm=time.h
3153 else
3154 echo "configure: failed program was:" >&5
3155 cat conftest.$ac_ext >&5
3156 rm -rf conftest*
3157 ac_cv_struct_tm=sys/time.h
3159 rm -f conftest*
3162 echo "$ac_t""$ac_cv_struct_tm" 1>&6
3163 if test $ac_cv_struct_tm = sys/time.h; then
3164 cat >> confdefs.h <<\EOF
3165 #define TM_IN_SYS_TIME 1
3170 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
3171 echo "configure:3172: checking for tm_zone in struct tm" >&5
3172 if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
3173 echo $ac_n "(cached) $ac_c" 1>&6
3174 else
3175 cat > conftest.$ac_ext <<EOF
3176 #line 3177 "configure"
3177 #include "confdefs.h"
3178 #include <sys/types.h>
3179 #include <$ac_cv_struct_tm>
3180 int main() {
3181 struct tm tm; tm.tm_zone;
3182 ; return 0; }
3184 if { (eval echo configure:3185: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3185 rm -rf conftest*
3186 ac_cv_struct_tm_zone=yes
3187 else
3188 echo "configure: failed program was:" >&5
3189 cat conftest.$ac_ext >&5
3190 rm -rf conftest*
3191 ac_cv_struct_tm_zone=no
3193 rm -f conftest*
3196 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
3197 if test "$ac_cv_struct_tm_zone" = yes; then
3198 cat >> confdefs.h <<\EOF
3199 #define HAVE_TM_ZONE 1
3202 else
3203 echo $ac_n "checking for tzname""... $ac_c" 1>&6
3204 echo "configure:3205: checking for tzname" >&5
3205 if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
3206 echo $ac_n "(cached) $ac_c" 1>&6
3207 else
3208 cat > conftest.$ac_ext <<EOF
3209 #line 3210 "configure"
3210 #include "confdefs.h"
3211 #include <time.h>
3212 #ifndef tzname /* For SGI. */
3213 extern char *tzname[]; /* RS6000 and others reject char **tzname. */
3214 #endif
3215 int main() {
3216 atoi(*tzname);
3217 ; return 0; }
3219 if { (eval echo configure:3220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3220 rm -rf conftest*
3221 ac_cv_var_tzname=yes
3222 else
3223 echo "configure: failed program was:" >&5
3224 cat conftest.$ac_ext >&5
3225 rm -rf conftest*
3226 ac_cv_var_tzname=no
3228 rm -f conftest*
3231 echo "$ac_t""$ac_cv_var_tzname" 1>&6
3232 if test $ac_cv_var_tzname = yes; then
3233 cat >> confdefs.h <<\EOF
3234 #define HAVE_TZNAME 1
3240 echo $ac_n "checking for tm_gmtoff in struct tm""... $ac_c" 1>&6
3241 echo "configure:3242: checking for tm_gmtoff in struct tm" >&5
3242 if eval "test \"`echo '$''{'emacs_cv_tm_gmtoff'+set}'`\" = set"; then
3243 echo $ac_n "(cached) $ac_c" 1>&6
3244 else
3245 cat > conftest.$ac_ext <<EOF
3246 #line 3247 "configure"
3247 #include "confdefs.h"
3248 #include <time.h>
3249 int main() {
3250 struct tm t; t.tm_gmtoff = 0
3251 ; return 0; }
3253 if { (eval echo configure:3254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3254 rm -rf conftest*
3255 emacs_cv_tm_gmtoff=yes
3256 else
3257 echo "configure: failed program was:" >&5
3258 cat conftest.$ac_ext >&5
3259 rm -rf conftest*
3260 emacs_cv_tm_gmtoff=no
3262 rm -f conftest*
3265 echo "$ac_t""$emacs_cv_tm_gmtoff" 1>&6
3266 if test $emacs_cv_tm_gmtoff = yes; then
3267 cat >> confdefs.h <<\EOF
3268 #define HAVE_TM_GMTOFF 1
3274 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
3275 echo "configure:3276: checking for ${CC-cc} option to accept ANSI C" >&5
3276 if eval "test \"`echo '$''{'ac_cv_prog_cc_stdc'+set}'`\" = set"; then
3277 echo $ac_n "(cached) $ac_c" 1>&6
3278 else
3279 ac_cv_prog_cc_stdc=no
3280 ac_save_CC="$CC"
3281 # Don't try gcc -ansi; that turns off useful extensions and
3282 # breaks some systems' header files.
3283 # AIX -qlanglvl=ansi
3284 # Ultrix and OSF/1 -std1
3285 # HP-UX 10.20 and later -Ae
3286 # HP-UX older versions -Aa -D_HPUX_SOURCE
3287 # SVR4 -Xc -D__EXTENSIONS__
3288 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3290 CC="$ac_save_CC $ac_arg"
3291 cat > conftest.$ac_ext <<EOF
3292 #line 3293 "configure"
3293 #include "confdefs.h"
3294 #include <stdarg.h>
3295 #include <stdio.h>
3296 #include <sys/types.h>
3297 #include <sys/stat.h>
3298 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3299 struct buf { int x; };
3300 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3301 static char *e (p, i)
3302 char **p;
3303 int i;
3305 return p[i];
3307 static char *f (char * (*g) (char **, int), char **p, ...)
3309 char *s;
3310 va_list v;
3311 va_start (v,p);
3312 s = g (p, va_arg (v,int));
3313 va_end (v);
3314 return s;
3316 int test (int i, double x);
3317 struct s1 {int (*f) (int a);};
3318 struct s2 {int (*f) (double a);};
3319 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3320 int argc;
3321 char **argv;
3322 int main() {
3323 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3324 ; return 0; }
3326 if { (eval echo configure:3327: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3327 rm -rf conftest*
3328 ac_cv_prog_cc_stdc="$ac_arg"; break
3329 else
3330 echo "configure: failed program was:" >&5
3331 cat conftest.$ac_ext >&5
3333 rm -f conftest*
3334 done
3335 CC="$ac_save_CC"
3339 case "x$ac_cv_prog_cc_stdc" in
3340 x|xno)
3341 echo "$ac_t""none needed" 1>&6 ;;
3343 echo "$ac_t""$ac_cv_prog_cc_stdc" 1>&6
3344 CC="$CC $ac_cv_prog_cc_stdc" ;;
3345 esac
3347 echo $ac_n "checking for function prototypes""... $ac_c" 1>&6
3348 echo "configure:3349: checking for function prototypes" >&5
3349 if test "$ac_cv_prog_cc_stdc" != no; then
3350 echo "$ac_t""yes" 1>&6
3351 cat >> confdefs.h <<\EOF
3352 #define PROTOTYPES 1
3355 else
3356 echo "$ac_t""no" 1>&6
3359 echo $ac_n "checking for working volatile""... $ac_c" 1>&6
3360 echo "configure:3361: checking for working volatile" >&5
3361 if eval "test \"`echo '$''{'ac_cv_c_volatile'+set}'`\" = set"; then
3362 echo $ac_n "(cached) $ac_c" 1>&6
3363 else
3364 cat > conftest.$ac_ext <<EOF
3365 #line 3366 "configure"
3366 #include "confdefs.h"
3368 int main() {
3370 volatile int x;
3371 int * volatile y;
3372 ; return 0; }
3374 if { (eval echo configure:3375: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3375 rm -rf conftest*
3376 ac_cv_c_volatile=yes
3377 else
3378 echo "configure: failed program was:" >&5
3379 cat conftest.$ac_ext >&5
3380 rm -rf conftest*
3381 ac_cv_c_volatile=no
3383 rm -f conftest*
3386 echo "$ac_t""$ac_cv_c_volatile" 1>&6
3387 if test $ac_cv_c_volatile = no; then
3388 cat >> confdefs.h <<\EOF
3389 #define volatile
3394 echo $ac_n "checking for working const""... $ac_c" 1>&6
3395 echo "configure:3396: checking for working const" >&5
3396 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
3397 echo $ac_n "(cached) $ac_c" 1>&6
3398 else
3399 cat > conftest.$ac_ext <<EOF
3400 #line 3401 "configure"
3401 #include "confdefs.h"
3403 int main() {
3405 /* Ultrix mips cc rejects this. */
3406 typedef int charset[2]; const charset x;
3407 /* SunOS 4.1.1 cc rejects this. */
3408 char const *const *ccp;
3409 char **p;
3410 /* NEC SVR4.0.2 mips cc rejects this. */
3411 struct point {int x, y;};
3412 static struct point const zero = {0,0};
3413 /* AIX XL C 1.02.0.0 rejects this.
3414 It does not let you subtract one const X* pointer from another in an arm
3415 of an if-expression whose if-part is not a constant expression */
3416 const char *g = "string";
3417 ccp = &g + (g ? g-g : 0);
3418 /* HPUX 7.0 cc rejects these. */
3419 ++ccp;
3420 p = (char**) ccp;
3421 ccp = (char const *const *) p;
3422 { /* SCO 3.2v4 cc rejects this. */
3423 char *t;
3424 char const *s = 0 ? (char *) 0 : (char const *) 0;
3426 *t++ = 0;
3428 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
3429 int x[] = {25, 17};
3430 const int *foo = &x[0];
3431 ++foo;
3433 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3434 typedef const int *iptr;
3435 iptr p = 0;
3436 ++p;
3438 { /* AIX XL C 1.02.0.0 rejects this saying
3439 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3440 struct s { int j; const int *ap[3]; };
3441 struct s *b; b->j = 5;
3443 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3444 const int foo = 10;
3447 ; return 0; }
3449 if { (eval echo configure:3450: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3450 rm -rf conftest*
3451 ac_cv_c_const=yes
3452 else
3453 echo "configure: failed program was:" >&5
3454 cat conftest.$ac_ext >&5
3455 rm -rf conftest*
3456 ac_cv_c_const=no
3458 rm -f conftest*
3461 echo "$ac_t""$ac_cv_c_const" 1>&6
3462 if test $ac_cv_c_const = no; then
3463 cat >> confdefs.h <<\EOF
3464 #define const
3469 echo $ac_n "checking for void * support""... $ac_c" 1>&6
3470 echo "configure:3471: checking for void * support" >&5
3471 if eval "test \"`echo '$''{'emacs_cv_void_star'+set}'`\" = set"; then
3472 echo $ac_n "(cached) $ac_c" 1>&6
3473 else
3474 cat > conftest.$ac_ext <<EOF
3475 #line 3476 "configure"
3476 #include "confdefs.h"
3478 int main() {
3479 void * foo;
3480 ; return 0; }
3482 if { (eval echo configure:3483: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3483 rm -rf conftest*
3484 emacs_cv_void_star=yes
3485 else
3486 echo "configure: failed program was:" >&5
3487 cat conftest.$ac_ext >&5
3488 rm -rf conftest*
3489 emacs_cv_void_star=no
3491 rm -f conftest*
3494 echo "$ac_t""$emacs_cv_void_star" 1>&6
3495 if test $emacs_cv_void_star = yes; then
3496 cat >> confdefs.h <<\EOF
3497 #define POINTER_TYPE void
3500 else
3501 cat >> confdefs.h <<\EOF
3502 #define POINTER_TYPE char
3507 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
3508 echo "configure:3509: checking whether ${MAKE-make} sets \${MAKE}" >&5
3509 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
3510 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
3511 echo $ac_n "(cached) $ac_c" 1>&6
3512 else
3513 cat > conftestmake <<\EOF
3514 all:
3515 @echo 'ac_maketemp="${MAKE}"'
3517 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3518 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
3519 if test -n "$ac_maketemp"; then
3520 eval ac_cv_prog_make_${ac_make}_set=yes
3521 else
3522 eval ac_cv_prog_make_${ac_make}_set=no
3524 rm -f conftestmake
3526 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3527 echo "$ac_t""yes" 1>&6
3528 SET_MAKE=
3529 else
3530 echo "$ac_t""no" 1>&6
3531 SET_MAKE="MAKE=${MAKE-make}"
3535 echo $ac_n "checking for long file names""... $ac_c" 1>&6
3536 echo "configure:3537: checking for long file names" >&5
3537 if eval "test \"`echo '$''{'ac_cv_sys_long_file_names'+set}'`\" = set"; then
3538 echo $ac_n "(cached) $ac_c" 1>&6
3539 else
3540 ac_cv_sys_long_file_names=yes
3541 # Test for long file names in all the places we know might matter:
3542 # . the current directory, where building will happen
3543 # $prefix/lib where we will be installing things
3544 # $exec_prefix/lib likewise
3545 # eval it to expand exec_prefix.
3546 # $TMPDIR if set, where it might want to write temporary files
3547 # if $TMPDIR is not set:
3548 # /tmp where it might want to write temporary files
3549 # /var/tmp likewise
3550 # /usr/tmp likewise
3551 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3552 ac_tmpdirs="$TMPDIR"
3553 else
3554 ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3556 for ac_dir in . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3557 test -d $ac_dir || continue
3558 test -w $ac_dir || continue # It is less confusing to not echo anything here.
3559 (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
3560 (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
3561 val=`cat $ac_dir/conftest9012345 2>/dev/null`
3562 if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
3563 ac_cv_sys_long_file_names=no
3564 rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
3565 break
3567 rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
3568 done
3571 echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6
3572 if test $ac_cv_sys_long_file_names = yes; then
3573 cat >> confdefs.h <<\EOF
3574 #define HAVE_LONG_FILE_NAMES 1
3580 #### Choose a window system.
3582 # If we find X, set shell vars x_includes and x_libraries to the
3583 # paths, otherwise set no_x=yes.
3584 # Uses ac_ vars as temps to allow command line to override cache and checks.
3585 # --without-x overrides everything else, but does not touch the cache.
3586 echo $ac_n "checking for X""... $ac_c" 1>&6
3587 echo "configure:3588: checking for X" >&5
3589 # Check whether --with-x or --without-x was given.
3590 if test "${with_x+set}" = set; then
3591 withval="$with_x"
3595 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
3596 if test "x$with_x" = xno; then
3597 # The user explicitly disabled X.
3598 have_x=disabled
3599 else
3600 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
3601 # Both variables are already set.
3602 have_x=yes
3603 else
3604 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
3605 echo $ac_n "(cached) $ac_c" 1>&6
3606 else
3607 # One or both of the vars are not set, and there is no cached value.
3608 ac_x_includes=NO ac_x_libraries=NO
3609 rm -fr conftestdir
3610 if mkdir conftestdir; then
3611 cd conftestdir
3612 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
3613 cat > Imakefile <<'EOF'
3614 acfindx:
3615 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
3617 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
3618 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3619 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
3620 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
3621 for ac_extension in a so sl; do
3622 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
3623 test -f $ac_im_libdir/libX11.$ac_extension; then
3624 ac_im_usrlibdir=$ac_im_libdir; break
3626 done
3627 # Screen out bogus values from the imake configuration. They are
3628 # bogus both because they are the default anyway, and because
3629 # using them would break gcc on systems where it needs fixed includes.
3630 case "$ac_im_incroot" in
3631 /usr/include) ;;
3632 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
3633 esac
3634 case "$ac_im_usrlibdir" in
3635 /usr/lib | /lib) ;;
3636 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
3637 esac
3639 cd ..
3640 rm -fr conftestdir
3643 if test "$ac_x_includes" = NO; then
3644 # Guess where to find include files, by looking for this one X11 .h file.
3645 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
3647 # First, try using that file with no special directory specified.
3648 cat > conftest.$ac_ext <<EOF
3649 #line 3650 "configure"
3650 #include "confdefs.h"
3651 #include <$x_direct_test_include>
3653 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3654 { (eval echo configure:3655: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3655 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3656 if test -z "$ac_err"; then
3657 rm -rf conftest*
3658 # We can compile using X headers with no special include directory.
3659 ac_x_includes=
3660 else
3661 echo "$ac_err" >&5
3662 echo "configure: failed program was:" >&5
3663 cat conftest.$ac_ext >&5
3664 rm -rf conftest*
3665 # Look for the header file in a standard set of common directories.
3666 # Check X11 before X11Rn because it is often a symlink to the current release.
3667 for ac_dir in \
3668 /usr/X11/include \
3669 /usr/X11R6/include \
3670 /usr/X11R5/include \
3671 /usr/X11R4/include \
3673 /usr/include/X11 \
3674 /usr/include/X11R6 \
3675 /usr/include/X11R5 \
3676 /usr/include/X11R4 \
3678 /usr/local/X11/include \
3679 /usr/local/X11R6/include \
3680 /usr/local/X11R5/include \
3681 /usr/local/X11R4/include \
3683 /usr/local/include/X11 \
3684 /usr/local/include/X11R6 \
3685 /usr/local/include/X11R5 \
3686 /usr/local/include/X11R4 \
3688 /usr/X386/include \
3689 /usr/x386/include \
3690 /usr/XFree86/include/X11 \
3692 /usr/include \
3693 /usr/local/include \
3694 /usr/unsupported/include \
3695 /usr/athena/include \
3696 /usr/local/x11r5/include \
3697 /usr/lpp/Xamples/include \
3699 /usr/openwin/include \
3700 /usr/openwin/share/include \
3703 if test -r "$ac_dir/$x_direct_test_include"; then
3704 ac_x_includes=$ac_dir
3705 break
3707 done
3709 rm -f conftest*
3710 fi # $ac_x_includes = NO
3712 if test "$ac_x_libraries" = NO; then
3713 # Check for the libraries.
3715 test -z "$x_direct_test_library" && x_direct_test_library=Xt
3716 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
3718 # See if we find them without any special options.
3719 # Don't add to $LIBS permanently.
3720 ac_save_LIBS="$LIBS"
3721 LIBS="-l$x_direct_test_library $LIBS"
3722 cat > conftest.$ac_ext <<EOF
3723 #line 3724 "configure"
3724 #include "confdefs.h"
3726 int main() {
3727 ${x_direct_test_function}()
3728 ; return 0; }
3730 if { (eval echo configure:3731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3731 rm -rf conftest*
3732 LIBS="$ac_save_LIBS"
3733 # We can link X programs with no special library path.
3734 ac_x_libraries=
3735 else
3736 echo "configure: failed program was:" >&5
3737 cat conftest.$ac_ext >&5
3738 rm -rf conftest*
3739 LIBS="$ac_save_LIBS"
3740 # First see if replacing the include by lib works.
3741 # Check X11 before X11Rn because it is often a symlink to the current release.
3742 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
3743 /usr/X11/lib \
3744 /usr/X11R6/lib \
3745 /usr/X11R5/lib \
3746 /usr/X11R4/lib \
3748 /usr/lib/X11 \
3749 /usr/lib/X11R6 \
3750 /usr/lib/X11R5 \
3751 /usr/lib/X11R4 \
3753 /usr/local/X11/lib \
3754 /usr/local/X11R6/lib \
3755 /usr/local/X11R5/lib \
3756 /usr/local/X11R4/lib \
3758 /usr/local/lib/X11 \
3759 /usr/local/lib/X11R6 \
3760 /usr/local/lib/X11R5 \
3761 /usr/local/lib/X11R4 \
3763 /usr/X386/lib \
3764 /usr/x386/lib \
3765 /usr/XFree86/lib/X11 \
3767 /usr/lib \
3768 /usr/local/lib \
3769 /usr/unsupported/lib \
3770 /usr/athena/lib \
3771 /usr/local/x11r5/lib \
3772 /usr/lpp/Xamples/lib \
3773 /lib/usr/lib/X11 \
3775 /usr/openwin/lib \
3776 /usr/openwin/share/lib \
3779 for ac_extension in a so sl; do
3780 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
3781 ac_x_libraries=$ac_dir
3782 break 2
3784 done
3785 done
3787 rm -f conftest*
3788 fi # $ac_x_libraries = NO
3790 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
3791 # Didn't find X anywhere. Cache the known absence of X.
3792 ac_cv_have_x="have_x=no"
3793 else
3794 # Record where we found X for the cache.
3795 ac_cv_have_x="have_x=yes \
3796 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
3800 eval "$ac_cv_have_x"
3801 fi # $with_x != no
3803 if test "$have_x" != yes; then
3804 echo "$ac_t""$have_x" 1>&6
3805 no_x=yes
3806 else
3807 # If each of the values was on the command line, it overrides each guess.
3808 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
3809 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
3810 # Update the cache value to reflect the command line values.
3811 ac_cv_have_x="have_x=yes \
3812 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
3813 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
3816 if test "$no_x" = yes; then
3817 window_system=none
3818 else
3819 window_system=x11
3822 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
3823 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
3824 LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"`
3825 x_default_search_path=""
3826 for x_library in `echo ${x_libraries} | sed -e "s/:/ /g"`; do
3827 x_search_path="\
3828 ${x_library}/X11/%L/%T/%N%C%S:\
3829 ${x_library}/X11/%l/%T/%N%C%S:\
3830 ${x_library}/X11/%T/%N%C%S:\
3831 ${x_library}/X11/%L/%T/%N%S:\
3832 ${x_library}/X11/%l/%T/%N%S:\
3833 ${x_library}/X11/%T/%N%S"
3834 if test x"${x_default_search_path}" = x; then
3835 x_default_search_path=${x_search_path}
3836 else
3837 x_default_search_path="${x_search_path}:${x_default_search_path}"
3839 done
3841 if test "${x_includes}" != NONE && test -n "${x_includes}"; then
3842 C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"`
3845 if test x"${x_includes}" = x; then
3846 bitmapdir=/usr/include/X11/bitmaps
3847 else
3848 # accumulate include directories that have X11 bitmap subdirectories
3849 bmd_acc="dummyval"
3850 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
3851 if test -d "${bmd}/X11/bitmaps"; then
3852 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
3854 if test -d "${bmd}/bitmaps"; then
3855 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
3857 done
3858 if test ${bmd_acc} != "dummyval"; then
3859 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
3863 case "${window_system}" in
3864 x11 )
3865 HAVE_X_WINDOWS=yes
3866 HAVE_X11=yes
3867 case "${with_x_toolkit}" in
3868 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
3869 motif ) USE_X_TOOLKIT=MOTIF ;;
3870 no ) USE_X_TOOLKIT=none ;;
3871 * ) USE_X_TOOLKIT=maybe ;;
3872 esac
3874 none )
3875 HAVE_X_WINDOWS=no
3876 HAVE_X11=no
3877 USE_X_TOOLKIT=none
3879 esac
3881 ### If we're using X11, we should use the X menu package.
3882 HAVE_MENUS=no
3883 case ${HAVE_X11} in
3884 yes ) HAVE_MENUS=yes ;;
3885 esac
3887 if test "${opsys}" = "hpux9"; then
3888 case "${x_libraries}" in
3889 *X11R4* )
3890 opsysfile="s/hpux9-x11r4.h"
3892 esac
3895 if test "${opsys}" = "hpux9shr"; then
3896 case "${x_libraries}" in
3897 *X11R4* )
3898 opsysfile="s/hpux9shxr4.h"
3900 esac
3903 ### Compute the unexec source name from the object name.
3904 UNEXEC_SRC="`echo ${unexec} | sed 's/\.o/.c/'`"
3906 # Do the opsystem or machine files prohibit the use of the GNU malloc?
3907 # Assume not, until told otherwise.
3908 GNU_MALLOC=yes
3909 doug_lea_malloc=yes
3910 echo $ac_n "checking for malloc_get_state""... $ac_c" 1>&6
3911 echo "configure:3912: checking for malloc_get_state" >&5
3912 if eval "test \"`echo '$''{'ac_cv_func_malloc_get_state'+set}'`\" = set"; then
3913 echo $ac_n "(cached) $ac_c" 1>&6
3914 else
3915 cat > conftest.$ac_ext <<EOF
3916 #line 3917 "configure"
3917 #include "confdefs.h"
3918 /* System header to define __stub macros and hopefully few prototypes,
3919 which can conflict with char malloc_get_state(); below. */
3920 #include <assert.h>
3921 /* Override any gcc2 internal prototype to avoid an error. */
3922 /* We use char because int might match the return type of a gcc2
3923 builtin and then its argument prototype would still apply. */
3924 char malloc_get_state();
3926 int main() {
3928 /* The GNU C library defines this for functions which it implements
3929 to always fail with ENOSYS. Some functions are actually named
3930 something starting with __ and the normal name is an alias. */
3931 #if defined (__stub_malloc_get_state) || defined (__stub___malloc_get_state)
3932 choke me
3933 #else
3934 malloc_get_state();
3935 #endif
3937 ; return 0; }
3939 if { (eval echo configure:3940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3940 rm -rf conftest*
3941 eval "ac_cv_func_malloc_get_state=yes"
3942 else
3943 echo "configure: failed program was:" >&5
3944 cat conftest.$ac_ext >&5
3945 rm -rf conftest*
3946 eval "ac_cv_func_malloc_get_state=no"
3948 rm -f conftest*
3951 if eval "test \"`echo '$ac_cv_func_'malloc_get_state`\" = yes"; then
3952 echo "$ac_t""yes" 1>&6
3954 else
3955 echo "$ac_t""no" 1>&6
3956 doug_lea_malloc=no
3959 echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6
3960 echo "configure:3961: checking for malloc_set_state" >&5
3961 if eval "test \"`echo '$''{'ac_cv_func_malloc_set_state'+set}'`\" = set"; then
3962 echo $ac_n "(cached) $ac_c" 1>&6
3963 else
3964 cat > conftest.$ac_ext <<EOF
3965 #line 3966 "configure"
3966 #include "confdefs.h"
3967 /* System header to define __stub macros and hopefully few prototypes,
3968 which can conflict with char malloc_set_state(); below. */
3969 #include <assert.h>
3970 /* Override any gcc2 internal prototype to avoid an error. */
3971 /* We use char because int might match the return type of a gcc2
3972 builtin and then its argument prototype would still apply. */
3973 char malloc_set_state();
3975 int main() {
3977 /* The GNU C library defines this for functions which it implements
3978 to always fail with ENOSYS. Some functions are actually named
3979 something starting with __ and the normal name is an alias. */
3980 #if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
3981 choke me
3982 #else
3983 malloc_set_state();
3984 #endif
3986 ; return 0; }
3988 if { (eval echo configure:3989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3989 rm -rf conftest*
3990 eval "ac_cv_func_malloc_set_state=yes"
3991 else
3992 echo "configure: failed program was:" >&5
3993 cat conftest.$ac_ext >&5
3994 rm -rf conftest*
3995 eval "ac_cv_func_malloc_set_state=no"
3997 rm -f conftest*
4000 if eval "test \"`echo '$ac_cv_func_'malloc_set_state`\" = yes"; then
4001 echo "$ac_t""yes" 1>&6
4003 else
4004 echo "$ac_t""no" 1>&6
4005 doug_lea_malloc=no
4008 echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6
4009 echo "configure:4010: checking whether __after_morecore_hook exists" >&5
4010 if eval "test \"`echo '$''{'emacs_cv_var___after_morecore_hook'+set}'`\" = set"; then
4011 echo $ac_n "(cached) $ac_c" 1>&6
4012 else
4013 cat > conftest.$ac_ext <<EOF
4014 #line 4015 "configure"
4015 #include "confdefs.h"
4016 extern void (* __after_morecore_hook)();
4017 int main() {
4018 __after_morecore_hook = 0
4019 ; return 0; }
4021 if { (eval echo configure:4022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4022 rm -rf conftest*
4023 emacs_cv_var___after_morecore_hook=yes
4024 else
4025 echo "configure: failed program was:" >&5
4026 cat conftest.$ac_ext >&5
4027 rm -rf conftest*
4028 emacs_cv_var___after_morecore_hook=no
4030 rm -f conftest*
4033 echo "$ac_t""$emacs_cv_var___after_morecore_hook" 1>&6
4034 if test $emacs_cv_var___after_morecore_hook = no; then
4035 doug_lea_malloc=no
4037 if test "${system_malloc}" = "yes"; then
4038 GNU_MALLOC=no
4039 GNU_MALLOC_reason="
4040 (The GNU allocators don't work with this system configuration.)"
4042 if test "$doug_lea_malloc" = "yes" ; then
4043 if test "$GNU_MALLOC" = yes ; then
4044 GNU_MALLOC_reason="
4045 (Using Doug Lea's new malloc from the GNU C Library.)"
4047 cat >> confdefs.h <<\EOF
4048 #define DOUG_LEA_MALLOC 1
4053 if test x"${REL_ALLOC}" = x; then
4054 REL_ALLOC=${GNU_MALLOC}
4058 for ac_hdr in stdlib.h unistd.h sys/stat.h
4060 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4061 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4062 echo "configure:4063: checking for $ac_hdr" >&5
4063 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4064 echo $ac_n "(cached) $ac_c" 1>&6
4065 else
4066 cat > conftest.$ac_ext <<EOF
4067 #line 4068 "configure"
4068 #include "confdefs.h"
4069 #include <$ac_hdr>
4071 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4072 { (eval echo configure:4073: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4073 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4074 if test -z "$ac_err"; then
4075 rm -rf conftest*
4076 eval "ac_cv_header_$ac_safe=yes"
4077 else
4078 echo "$ac_err" >&5
4079 echo "configure: failed program was:" >&5
4080 cat conftest.$ac_ext >&5
4081 rm -rf conftest*
4082 eval "ac_cv_header_$ac_safe=no"
4084 rm -f conftest*
4086 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4087 echo "$ac_t""yes" 1>&6
4088 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4089 cat >> confdefs.h <<EOF
4090 #define $ac_tr_hdr 1
4093 else
4094 echo "$ac_t""no" 1>&6
4096 done
4098 for ac_func in getpagesize
4100 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4101 echo "configure:4102: checking for $ac_func" >&5
4102 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4103 echo $ac_n "(cached) $ac_c" 1>&6
4104 else
4105 cat > conftest.$ac_ext <<EOF
4106 #line 4107 "configure"
4107 #include "confdefs.h"
4108 /* System header to define __stub macros and hopefully few prototypes,
4109 which can conflict with char $ac_func(); below. */
4110 #include <assert.h>
4111 /* Override any gcc2 internal prototype to avoid an error. */
4112 /* We use char because int might match the return type of a gcc2
4113 builtin and then its argument prototype would still apply. */
4114 char $ac_func();
4116 int main() {
4118 /* The GNU C library defines this for functions which it implements
4119 to always fail with ENOSYS. Some functions are actually named
4120 something starting with __ and the normal name is an alias. */
4121 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4122 choke me
4123 #else
4124 $ac_func();
4125 #endif
4127 ; return 0; }
4129 if { (eval echo configure:4130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4130 rm -rf conftest*
4131 eval "ac_cv_func_$ac_func=yes"
4132 else
4133 echo "configure: failed program was:" >&5
4134 cat conftest.$ac_ext >&5
4135 rm -rf conftest*
4136 eval "ac_cv_func_$ac_func=no"
4138 rm -f conftest*
4141 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4142 echo "$ac_t""yes" 1>&6
4143 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4144 cat >> confdefs.h <<EOF
4145 #define $ac_tr_func 1
4148 else
4149 echo "$ac_t""no" 1>&6
4151 done
4153 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
4154 echo "configure:4155: checking for working mmap" >&5
4155 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
4156 echo $ac_n "(cached) $ac_c" 1>&6
4157 else
4158 if test "$cross_compiling" = yes; then
4159 ac_cv_func_mmap_fixed_mapped=no
4160 else
4161 cat > conftest.$ac_ext <<EOF
4162 #line 4163 "configure"
4163 #include "confdefs.h"
4164 /* Thanks to Mike Haertel and Jim Avera for this test.
4165 Here is a matrix of mmap possibilities:
4166 mmap private not fixed
4167 mmap private fixed at somewhere currently unmapped
4168 mmap private fixed at somewhere already mapped
4169 mmap shared not fixed
4170 mmap shared fixed at somewhere currently unmapped
4171 mmap shared fixed at somewhere already mapped
4172 For private mappings, we should verify that changes cannot be read()
4173 back from the file, nor mmap's back from the file at a different
4174 address. (There have been systems where private was not correctly
4175 implemented like the infamous i386 svr4.0, and systems where the
4176 VM page cache was not coherent with the file system buffer cache
4177 like early versions of FreeBSD and possibly contemporary NetBSD.)
4178 For shared mappings, we should conversely verify that changes get
4179 propogated back to all the places they're supposed to be.
4181 Grep wants private fixed already mapped.
4182 The main things grep needs to know about mmap are:
4183 * does it exist and is it safe to write into the mmap'd area
4184 * how to use it (BSD variants) */
4185 #include <sys/types.h>
4186 #include <fcntl.h>
4187 #include <sys/mman.h>
4189 #if STDC_HEADERS || HAVE_STDLIB_H
4190 # include <stdlib.h>
4191 #else
4192 char *malloc ();
4193 #endif
4194 #if HAVE_UNISTD_H
4195 # include <unistd.h>
4196 #endif
4197 #if HAVE_SYS_STAT_H
4198 # include <sys/stat.h>
4199 #endif
4201 /* This mess was copied from the GNU getpagesize.h. */
4202 #if !HAVE_GETPAGESIZE
4203 /* Assume that all systems that can run configure have sys/param.h. */
4204 # if !HAVE_SYS_PARAM_H
4205 # define HAVE_SYS_PARAM_H 1
4206 # endif
4208 # ifdef _SC_PAGESIZE
4209 # define getpagesize() sysconf(_SC_PAGESIZE)
4210 # else /* no _SC_PAGESIZE */
4211 # if HAVE_SYS_PARAM_H
4212 # include <sys/param.h>
4213 # ifdef EXEC_PAGESIZE
4214 # define getpagesize() EXEC_PAGESIZE
4215 # else /* no EXEC_PAGESIZE */
4216 # ifdef NBPG
4217 # define getpagesize() NBPG * CLSIZE
4218 # ifndef CLSIZE
4219 # define CLSIZE 1
4220 # endif /* no CLSIZE */
4221 # else /* no NBPG */
4222 # ifdef NBPC
4223 # define getpagesize() NBPC
4224 # else /* no NBPC */
4225 # ifdef PAGESIZE
4226 # define getpagesize() PAGESIZE
4227 # endif /* PAGESIZE */
4228 # endif /* no NBPC */
4229 # endif /* no NBPG */
4230 # endif /* no EXEC_PAGESIZE */
4231 # else /* no HAVE_SYS_PARAM_H */
4232 # define getpagesize() 8192 /* punt totally */
4233 # endif /* no HAVE_SYS_PARAM_H */
4234 # endif /* no _SC_PAGESIZE */
4236 #endif /* no HAVE_GETPAGESIZE */
4239 main ()
4241 char *data, *data2, *data3;
4242 int i, pagesize;
4243 int fd;
4245 pagesize = getpagesize ();
4247 /* First, make a file with some known garbage in it. */
4248 data = (char *) malloc (pagesize);
4249 if (!data)
4250 exit (1);
4251 for (i = 0; i < pagesize; ++i)
4252 *(data + i) = rand ();
4253 umask (0);
4254 fd = creat ("conftestmmap", 0600);
4255 if (fd < 0)
4256 exit (1);
4257 if (write (fd, data, pagesize) != pagesize)
4258 exit (1);
4259 close (fd);
4261 /* Next, try to mmap the file at a fixed address which already has
4262 something else allocated at it. If we can, also make sure that
4263 we see the same garbage. */
4264 fd = open ("conftestmmap", O_RDWR);
4265 if (fd < 0)
4266 exit (1);
4267 data2 = (char *) malloc (2 * pagesize);
4268 if (!data2)
4269 exit (1);
4270 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
4271 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
4272 MAP_PRIVATE | MAP_FIXED, fd, 0L))
4273 exit (1);
4274 for (i = 0; i < pagesize; ++i)
4275 if (*(data + i) != *(data2 + i))
4276 exit (1);
4278 /* Finally, make sure that changes to the mapped area do not
4279 percolate back to the file as seen by read(). (This is a bug on
4280 some variants of i386 svr4.0.) */
4281 for (i = 0; i < pagesize; ++i)
4282 *(data2 + i) = *(data2 + i) + 1;
4283 data3 = (char *) malloc (pagesize);
4284 if (!data3)
4285 exit (1);
4286 if (read (fd, data3, pagesize) != pagesize)
4287 exit (1);
4288 for (i = 0; i < pagesize; ++i)
4289 if (*(data + i) != *(data3 + i))
4290 exit (1);
4291 close (fd);
4292 unlink ("conftestmmap");
4293 exit (0);
4296 if { (eval echo configure:4297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4297 then
4298 ac_cv_func_mmap_fixed_mapped=yes
4299 else
4300 echo "configure: failed program was:" >&5
4301 cat conftest.$ac_ext >&5
4302 rm -fr conftest*
4303 ac_cv_func_mmap_fixed_mapped=no
4305 rm -fr conftest*
4310 echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
4311 if test $ac_cv_func_mmap_fixed_mapped = yes; then
4312 cat >> confdefs.h <<\EOF
4313 #define HAVE_MMAP 1
4318 if test $use_mmap_for_buffers = yes; then
4319 REL_ALLOC=no
4322 LIBS="$libsrc_libs $LIBS"
4324 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
4325 echo "configure:4326: checking for dnet_ntoa in -ldnet" >&5
4326 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
4327 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4328 echo $ac_n "(cached) $ac_c" 1>&6
4329 else
4330 ac_save_LIBS="$LIBS"
4331 LIBS="-ldnet $LIBS"
4332 cat > conftest.$ac_ext <<EOF
4333 #line 4334 "configure"
4334 #include "confdefs.h"
4335 /* Override any gcc2 internal prototype to avoid an error. */
4336 /* We use char because int might match the return type of a gcc2
4337 builtin and then its argument prototype would still apply. */
4338 char dnet_ntoa();
4340 int main() {
4341 dnet_ntoa()
4342 ; return 0; }
4344 if { (eval echo configure:4345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4345 rm -rf conftest*
4346 eval "ac_cv_lib_$ac_lib_var=yes"
4347 else
4348 echo "configure: failed program was:" >&5
4349 cat conftest.$ac_ext >&5
4350 rm -rf conftest*
4351 eval "ac_cv_lib_$ac_lib_var=no"
4353 rm -f conftest*
4354 LIBS="$ac_save_LIBS"
4357 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4358 echo "$ac_t""yes" 1>&6
4359 ac_tr_lib=HAVE_LIB`echo dnet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4360 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4361 cat >> confdefs.h <<EOF
4362 #define $ac_tr_lib 1
4365 LIBS="-ldnet $LIBS"
4367 else
4368 echo "$ac_t""no" 1>&6
4372 echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
4373 echo "configure:4374: checking for main in -lXbsd" >&5
4374 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
4375 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4376 echo $ac_n "(cached) $ac_c" 1>&6
4377 else
4378 ac_save_LIBS="$LIBS"
4379 LIBS="-lXbsd $LIBS"
4380 cat > conftest.$ac_ext <<EOF
4381 #line 4382 "configure"
4382 #include "confdefs.h"
4384 int main() {
4385 main()
4386 ; return 0; }
4388 if { (eval echo configure:4389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4389 rm -rf conftest*
4390 eval "ac_cv_lib_$ac_lib_var=yes"
4391 else
4392 echo "configure: failed program was:" >&5
4393 cat conftest.$ac_ext >&5
4394 rm -rf conftest*
4395 eval "ac_cv_lib_$ac_lib_var=no"
4397 rm -f conftest*
4398 LIBS="$ac_save_LIBS"
4401 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4402 echo "$ac_t""yes" 1>&6
4403 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
4404 else
4405 echo "$ac_t""no" 1>&6
4409 echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6
4410 echo "configure:4411: checking for cma_open in -lpthreads" >&5
4411 ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'`
4412 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4413 echo $ac_n "(cached) $ac_c" 1>&6
4414 else
4415 ac_save_LIBS="$LIBS"
4416 LIBS="-lpthreads $LIBS"
4417 cat > conftest.$ac_ext <<EOF
4418 #line 4419 "configure"
4419 #include "confdefs.h"
4420 /* Override any gcc2 internal prototype to avoid an error. */
4421 /* We use char because int might match the return type of a gcc2
4422 builtin and then its argument prototype would still apply. */
4423 char cma_open();
4425 int main() {
4426 cma_open()
4427 ; return 0; }
4429 if { (eval echo configure:4430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4430 rm -rf conftest*
4431 eval "ac_cv_lib_$ac_lib_var=yes"
4432 else
4433 echo "configure: failed program was:" >&5
4434 cat conftest.$ac_ext >&5
4435 rm -rf conftest*
4436 eval "ac_cv_lib_$ac_lib_var=no"
4438 rm -f conftest*
4439 LIBS="$ac_save_LIBS"
4442 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4443 echo "$ac_t""yes" 1>&6
4444 ac_tr_lib=HAVE_LIB`echo pthreads | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4445 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4446 cat >> confdefs.h <<EOF
4447 #define $ac_tr_lib 1
4450 LIBS="-lpthreads $LIBS"
4452 else
4453 echo "$ac_t""no" 1>&6
4457 echo $ac_n "checking for XFree86 in /usr/X386""... $ac_c" 1>&6
4458 echo "configure:4459: checking for XFree86 in /usr/X386" >&5
4459 if test -d /usr/X386/include; then
4460 HAVE_XFREE386=yes
4461 : ${C_SWITCH_X_SITE="-I/usr/X386/include"}
4462 else
4463 HAVE_XFREE386=no
4465 echo "$ac_t""$HAVE_XFREE386" 1>&6
4468 case ${host_os} in
4469 aix*)
4470 echo $ac_n "checking for -bbigtoc option""... $ac_c" 1>&6
4471 echo "configure:4472: checking for -bbigtoc option" >&5
4472 if eval "test \"`echo '$''{'gdb_cv_bigtoc'+set}'`\" = set"; then
4473 echo $ac_n "(cached) $ac_c" 1>&6
4474 else
4476 case $GCC in
4477 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
4478 *) gdb_cv_bigtoc=-bbigtoc ;;
4479 esac
4481 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
4482 cat > conftest.$ac_ext <<EOF
4483 #line 4484 "configure"
4484 #include "confdefs.h"
4486 int main() {
4487 int i;
4488 ; return 0; }
4490 if { (eval echo configure:4491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4492 else
4493 echo "configure: failed program was:" >&5
4494 cat conftest.$ac_ext >&5
4495 rm -rf conftest*
4496 gdb_cv_bigtoc=
4498 rm -f conftest*
4502 echo "$ac_t""$gdb_cv_bigtoc" 1>&6
4504 esac
4506 # Change CFLAGS temporarily so that C_SWITCH_X_SITE gets used
4507 # for the tests that follow. We set it back to REAL_CFLAGS later on.
4509 REAL_CPPFLAGS="$CPPFLAGS"
4511 if test "${HAVE_X11}" = "yes"; then
4512 DEFS="$C_SWITCH_X_SITE $DEFS"
4513 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
4514 LIBS="$LIBX $LIBS"
4515 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
4516 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
4518 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
4519 # This is handled by LD_SWITCH_X_SITE_AUX during the real build,
4520 # but it's more convenient here to set LD_RUN_PATH
4521 # since this also works on hosts that don't understand LD_SWITCH_X_SITE_AUX.
4522 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
4523 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
4524 export LD_RUN_PATH
4527 if test "${opsys}" = "gnu-linux"; then
4528 echo $ac_n "checking whether X on GNU/Linux needs -b to link""... $ac_c" 1>&6
4529 echo "configure:4530: checking whether X on GNU/Linux needs -b to link" >&5
4530 cat > conftest.$ac_ext <<EOF
4531 #line 4532 "configure"
4532 #include "confdefs.h"
4534 int main() {
4535 XOpenDisplay ("foo");
4536 ; return 0; }
4538 if { (eval echo configure:4539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4539 rm -rf conftest*
4540 xlinux_first_failure=no
4541 else
4542 echo "configure: failed program was:" >&5
4543 cat conftest.$ac_ext >&5
4544 rm -rf conftest*
4545 xlinux_first_failure=yes
4547 rm -f conftest*
4548 if test "${xlinux_first_failure}" = "yes"; then
4549 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
4550 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
4551 OLD_CPPFLAGS="$CPPFLAGS"
4552 OLD_LIBS="$LIBS"
4553 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
4554 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
4555 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
4556 LIBS="$LIBS -b i486-linuxaout"
4557 cat > conftest.$ac_ext <<EOF
4558 #line 4559 "configure"
4559 #include "confdefs.h"
4561 int main() {
4562 XOpenDisplay ("foo");
4563 ; return 0; }
4565 if { (eval echo configure:4566: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4566 rm -rf conftest*
4567 xlinux_second_failure=no
4568 else
4569 echo "configure: failed program was:" >&5
4570 cat conftest.$ac_ext >&5
4571 rm -rf conftest*
4572 xlinux_second_failure=yes
4574 rm -f conftest*
4575 if test "${xlinux_second_failure}" = "yes"; then
4576 # If we get the same failure with -b, there is no use adding -b.
4577 # So take it out. This plays safe.
4578 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
4579 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
4580 CPPFLAGS="$OLD_CPPFLAGS"
4581 LIBS="$OLD_LIBS"
4582 echo "$ac_t""no" 1>&6
4583 else
4584 echo "$ac_t""yes" 1>&6
4586 else
4587 echo "$ac_t""no" 1>&6
4591 # Reportedly, some broken Solaris systems have XKBlib.h but are missing
4592 # header files included from there.
4593 echo $ac_n "checking for Xkb""... $ac_c" 1>&6
4594 echo "configure:4595: checking for Xkb" >&5
4595 cat > conftest.$ac_ext <<EOF
4596 #line 4597 "configure"
4597 #include "confdefs.h"
4598 #include <X11/Xlib.h>
4599 #include <X11/XKBlib.h>
4600 int main() {
4601 XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);
4602 ; return 0; }
4604 if { (eval echo configure:4605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4605 rm -rf conftest*
4606 emacs_xkb=yes
4607 else
4608 echo "configure: failed program was:" >&5
4609 cat conftest.$ac_ext >&5
4610 rm -rf conftest*
4611 emacs_xkb=no
4613 rm -f conftest*
4614 echo "$ac_t""$emacs_xkb" 1>&6
4615 if test $emacs_xkb = yes; then
4616 cat >> confdefs.h <<\EOF
4617 #define HAVE_XKBGETKEYBOARD 1
4622 for ac_func in XrmSetDatabase XScreenResourceString \
4623 XScreenNumberOfScreen XSetWMProtocols
4625 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4626 echo "configure:4627: checking for $ac_func" >&5
4627 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4628 echo $ac_n "(cached) $ac_c" 1>&6
4629 else
4630 cat > conftest.$ac_ext <<EOF
4631 #line 4632 "configure"
4632 #include "confdefs.h"
4633 /* System header to define __stub macros and hopefully few prototypes,
4634 which can conflict with char $ac_func(); below. */
4635 #include <assert.h>
4636 /* Override any gcc2 internal prototype to avoid an error. */
4637 /* We use char because int might match the return type of a gcc2
4638 builtin and then its argument prototype would still apply. */
4639 char $ac_func();
4641 int main() {
4643 /* The GNU C library defines this for functions which it implements
4644 to always fail with ENOSYS. Some functions are actually named
4645 something starting with __ and the normal name is an alias. */
4646 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4647 choke me
4648 #else
4649 $ac_func();
4650 #endif
4652 ; return 0; }
4654 if { (eval echo configure:4655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4655 rm -rf conftest*
4656 eval "ac_cv_func_$ac_func=yes"
4657 else
4658 echo "configure: failed program was:" >&5
4659 cat conftest.$ac_ext >&5
4660 rm -rf conftest*
4661 eval "ac_cv_func_$ac_func=no"
4663 rm -f conftest*
4666 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4667 echo "$ac_t""yes" 1>&6
4668 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4669 cat >> confdefs.h <<EOF
4670 #define $ac_tr_func 1
4673 else
4674 echo "$ac_t""no" 1>&6
4676 done
4680 if test "${window_system}" = "x11"; then
4681 echo $ac_n "checking X11 version 6""... $ac_c" 1>&6
4682 echo "configure:4683: checking X11 version 6" >&5
4683 if eval "test \"`echo '$''{'emacs_cv_x11_version_6'+set}'`\" = set"; then
4684 echo $ac_n "(cached) $ac_c" 1>&6
4685 else
4686 cat > conftest.$ac_ext <<EOF
4687 #line 4688 "configure"
4688 #include "confdefs.h"
4689 #include <X11/Xlib.h>
4690 int main() {
4691 #if XlibSpecificationRelease < 6
4692 fail;
4693 #endif
4695 ; return 0; }
4697 if { (eval echo configure:4698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4698 rm -rf conftest*
4699 emacs_cv_x11_version_6=yes
4700 else
4701 echo "configure: failed program was:" >&5
4702 cat conftest.$ac_ext >&5
4703 rm -rf conftest*
4704 emacs_cv_x11_version_6=no
4706 rm -f conftest*
4709 if test $emacs_cv_x11_version_6 = yes; then
4710 echo "$ac_t""6 or newer" 1>&6
4711 cat >> confdefs.h <<\EOF
4712 #define HAVE_X11R6 1
4715 else
4716 echo "$ac_t""before 6" 1>&6
4720 if test "${window_system}" = "x11"; then
4721 echo $ac_n "checking X11 version 5""... $ac_c" 1>&6
4722 echo "configure:4723: checking X11 version 5" >&5
4723 if eval "test \"`echo '$''{'emacs_cv_x11_version_5'+set}'`\" = set"; then
4724 echo $ac_n "(cached) $ac_c" 1>&6
4725 else
4726 cat > conftest.$ac_ext <<EOF
4727 #line 4728 "configure"
4728 #include "confdefs.h"
4729 #include <X11/Xlib.h>
4730 int main() {
4731 #if XlibSpecificationRelease < 5
4732 fail;
4733 #endif
4735 ; return 0; }
4737 if { (eval echo configure:4738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4738 rm -rf conftest*
4739 emacs_cv_x11_version_5=yes
4740 else
4741 echo "configure: failed program was:" >&5
4742 cat conftest.$ac_ext >&5
4743 rm -rf conftest*
4744 emacs_cv_x11_version_5=no
4746 rm -f conftest*
4749 if test $emacs_cv_x11_version_5 = yes; then
4750 echo "$ac_t""5 or newer" 1>&6
4751 HAVE_X11R5=yes
4752 cat >> confdefs.h <<\EOF
4753 #define HAVE_X11R5 1
4756 else
4757 HAVE_X11R5=no
4758 echo "$ac_t""before 5" 1>&6
4762 if test x"${USE_X_TOOLKIT}" = xmaybe; then
4763 if test x"${HAVE_X11R5}" = xyes; then
4764 echo $ac_n "checking X11 version 5 with Xaw""... $ac_c" 1>&6
4765 echo "configure:4766: checking X11 version 5 with Xaw" >&5
4766 if eval "test \"`echo '$''{'emacs_cv_x11_version_5_with_xaw'+set}'`\" = set"; then
4767 echo $ac_n "(cached) $ac_c" 1>&6
4768 else
4769 cat > conftest.$ac_ext <<EOF
4770 #line 4771 "configure"
4771 #include "confdefs.h"
4773 #include <X11/Intrinsic.h>
4774 #include <X11/Xaw/Simple.h>
4775 int main() {
4777 ; return 0; }
4779 if { (eval echo configure:4780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4780 rm -rf conftest*
4781 emacs_cv_x11_version_5_with_xaw=yes
4782 else
4783 echo "configure: failed program was:" >&5
4784 cat conftest.$ac_ext >&5
4785 rm -rf conftest*
4786 emacs_cv_x11_version_5_with_xaw=no
4788 rm -f conftest*
4791 if test $emacs_cv_x11_version_5_with_xaw = yes; then
4792 echo "$ac_t""5 or newer, with Xaw; use toolkit by default" 1>&6
4793 USE_X_TOOLKIT=LUCID
4794 else
4795 echo "$ac_t""before 5 or no Xaw; do not use toolkit by default" 1>&6
4796 USE_X_TOOLKIT=none
4798 else
4799 USE_X_TOOLKIT=none
4803 X_TOOLKIT_TYPE=$USE_X_TOOLKIT
4805 if test "${USE_X_TOOLKIT}" != "none"; then
4806 echo $ac_n "checking X11 toolkit version""... $ac_c" 1>&6
4807 echo "configure:4808: checking X11 toolkit version" >&5
4808 if eval "test \"`echo '$''{'emacs_cv_x11_toolkit_version_6'+set}'`\" = set"; then
4809 echo $ac_n "(cached) $ac_c" 1>&6
4810 else
4811 cat > conftest.$ac_ext <<EOF
4812 #line 4813 "configure"
4813 #include "confdefs.h"
4814 #include <X11/Intrinsic.h>
4815 int main() {
4816 #if XtSpecificationRelease < 6
4817 fail;
4818 #endif
4820 ; return 0; }
4822 if { (eval echo configure:4823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4823 rm -rf conftest*
4824 emacs_cv_x11_toolkit_version_6=yes
4825 else
4826 echo "configure: failed program was:" >&5
4827 cat conftest.$ac_ext >&5
4828 rm -rf conftest*
4829 emacs_cv_x11_toolkit_version_6=no
4831 rm -f conftest*
4834 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
4835 if test $emacs_cv_x11_toolkit_version_6 = yes; then
4836 echo "$ac_t""6 or newer" 1>&6
4837 cat >> confdefs.h <<\EOF
4838 #define HAVE_X11XTR6 1
4841 else
4842 echo "$ac_t""before 6" 1>&6
4845 OLDLIBS="$LIBS"
4846 if test x$HAVE_X11XTR6 = xyes; then
4847 LIBS="-lXt -lSM -lICE $LIBS"
4848 else
4849 LIBS="-lXt $LIBS"
4851 echo $ac_n "checking for XmuConvertStandardSelection in -lXmu""... $ac_c" 1>&6
4852 echo "configure:4853: checking for XmuConvertStandardSelection in -lXmu" >&5
4853 ac_lib_var=`echo Xmu'_'XmuConvertStandardSelection | sed 'y%./+-%__p_%'`
4854 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4855 echo $ac_n "(cached) $ac_c" 1>&6
4856 else
4857 ac_save_LIBS="$LIBS"
4858 LIBS="-lXmu $LIBS"
4859 cat > conftest.$ac_ext <<EOF
4860 #line 4861 "configure"
4861 #include "confdefs.h"
4862 /* Override any gcc2 internal prototype to avoid an error. */
4863 /* We use char because int might match the return type of a gcc2
4864 builtin and then its argument prototype would still apply. */
4865 char XmuConvertStandardSelection();
4867 int main() {
4868 XmuConvertStandardSelection()
4869 ; return 0; }
4871 if { (eval echo configure:4872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4872 rm -rf conftest*
4873 eval "ac_cv_lib_$ac_lib_var=yes"
4874 else
4875 echo "configure: failed program was:" >&5
4876 cat conftest.$ac_ext >&5
4877 rm -rf conftest*
4878 eval "ac_cv_lib_$ac_lib_var=no"
4880 rm -f conftest*
4881 LIBS="$ac_save_LIBS"
4884 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4885 echo "$ac_t""yes" 1>&6
4886 ac_tr_lib=HAVE_LIB`echo Xmu | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4887 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4888 cat >> confdefs.h <<EOF
4889 #define $ac_tr_lib 1
4892 LIBS="-lXmu $LIBS"
4894 else
4895 echo "$ac_t""no" 1>&6
4898 test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS"
4901 # On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D.
4902 if test "${HAVE_X11}" = "yes"; then
4903 if test "${USE_X_TOOLKIT}" != "none"; then
4904 echo $ac_n "checking for XShapeQueryExtension in -lXext""... $ac_c" 1>&6
4905 echo "configure:4906: checking for XShapeQueryExtension in -lXext" >&5
4906 ac_lib_var=`echo Xext'_'XShapeQueryExtension | sed 'y%./+-%__p_%'`
4907 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4908 echo $ac_n "(cached) $ac_c" 1>&6
4909 else
4910 ac_save_LIBS="$LIBS"
4911 LIBS="-lXext $LIBS"
4912 cat > conftest.$ac_ext <<EOF
4913 #line 4914 "configure"
4914 #include "confdefs.h"
4915 /* Override any gcc2 internal prototype to avoid an error. */
4916 /* We use char because int might match the return type of a gcc2
4917 builtin and then its argument prototype would still apply. */
4918 char XShapeQueryExtension();
4920 int main() {
4921 XShapeQueryExtension()
4922 ; return 0; }
4924 if { (eval echo configure:4925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4925 rm -rf conftest*
4926 eval "ac_cv_lib_$ac_lib_var=yes"
4927 else
4928 echo "configure: failed program was:" >&5
4929 cat conftest.$ac_ext >&5
4930 rm -rf conftest*
4931 eval "ac_cv_lib_$ac_lib_var=no"
4933 rm -f conftest*
4934 LIBS="$ac_save_LIBS"
4937 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4938 echo "$ac_t""yes" 1>&6
4939 ac_tr_lib=HAVE_LIB`echo Xext | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4940 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4941 cat >> confdefs.h <<EOF
4942 #define $ac_tr_lib 1
4945 LIBS="-lXext $LIBS"
4947 else
4948 echo "$ac_t""no" 1>&6
4954 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
4955 echo $ac_n "checking for Motif version 2.1""... $ac_c" 1>&6
4956 echo "configure:4957: checking for Motif version 2.1" >&5
4957 if eval "test \"`echo '$''{'emacs_cv_motif_version_2_1'+set}'`\" = set"; then
4958 echo $ac_n "(cached) $ac_c" 1>&6
4959 else
4960 cat > conftest.$ac_ext <<EOF
4961 #line 4962 "configure"
4962 #include "confdefs.h"
4963 #include <Xm/Xm.h>
4964 int main() {
4965 #if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
4966 int x = 5;
4967 #else
4968 Motif version prior to 2.1.
4969 #endif
4970 ; return 0; }
4972 if { (eval echo configure:4973: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4973 rm -rf conftest*
4974 emacs_cv_motif_version_2_1=yes
4975 else
4976 echo "configure: failed program was:" >&5
4977 cat conftest.$ac_ext >&5
4978 rm -rf conftest*
4979 emacs_cv_motif_version_2_1=no
4981 rm -f conftest*
4984 echo "$ac_t""$emacs_cv_motif_version_2_1" 1>&6
4985 HAVE_MOTIF_2_1=$emacs_cv_motif_version_2_1
4986 if test $emacs_cv_motif_version_2_1 = yes; then
4987 HAVE_LIBXP=no
4988 cat >> confdefs.h <<\EOF
4989 #define HAVE_MOTIF_2_1 1
4992 echo $ac_n "checking for XpCreateContext in -lXp""... $ac_c" 1>&6
4993 echo "configure:4994: checking for XpCreateContext in -lXp" >&5
4994 ac_lib_var=`echo Xp'_'XpCreateContext | sed 'y%./+-%__p_%'`
4995 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4996 echo $ac_n "(cached) $ac_c" 1>&6
4997 else
4998 ac_save_LIBS="$LIBS"
4999 LIBS="-lXp $LIBS"
5000 cat > conftest.$ac_ext <<EOF
5001 #line 5002 "configure"
5002 #include "confdefs.h"
5003 /* Override any gcc2 internal prototype to avoid an error. */
5004 /* We use char because int might match the return type of a gcc2
5005 builtin and then its argument prototype would still apply. */
5006 char XpCreateContext();
5008 int main() {
5009 XpCreateContext()
5010 ; return 0; }
5012 if { (eval echo configure:5013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5013 rm -rf conftest*
5014 eval "ac_cv_lib_$ac_lib_var=yes"
5015 else
5016 echo "configure: failed program was:" >&5
5017 cat conftest.$ac_ext >&5
5018 rm -rf conftest*
5019 eval "ac_cv_lib_$ac_lib_var=no"
5021 rm -f conftest*
5022 LIBS="$ac_save_LIBS"
5025 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5026 echo "$ac_t""yes" 1>&6
5027 HAVE_LIBXP=yes
5028 else
5029 echo "$ac_t""no" 1>&6
5032 if test ${HAVE_LIBXP} = yes; then
5033 cat >> confdefs.h <<\EOF
5034 #define HAVE_LIBXP 1
5041 ### Is -lXaw3d available?
5042 HAVE_XAW3D=no
5043 if test "${HAVE_X11}" = "yes"; then
5044 if test "${USE_X_TOOLKIT}" != "none"; then
5045 ac_safe=`echo "X11/Xaw3d/Scrollbar.h" | sed 'y%./+-%__p_%'`
5046 echo $ac_n "checking for X11/Xaw3d/Scrollbar.h""... $ac_c" 1>&6
5047 echo "configure:5048: checking for X11/Xaw3d/Scrollbar.h" >&5
5048 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5049 echo $ac_n "(cached) $ac_c" 1>&6
5050 else
5051 cat > conftest.$ac_ext <<EOF
5052 #line 5053 "configure"
5053 #include "confdefs.h"
5054 #include <X11/Xaw3d/Scrollbar.h>
5056 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5057 { (eval echo configure:5058: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5058 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5059 if test -z "$ac_err"; then
5060 rm -rf conftest*
5061 eval "ac_cv_header_$ac_safe=yes"
5062 else
5063 echo "$ac_err" >&5
5064 echo "configure: failed program was:" >&5
5065 cat conftest.$ac_ext >&5
5066 rm -rf conftest*
5067 eval "ac_cv_header_$ac_safe=no"
5069 rm -f conftest*
5071 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5072 echo "$ac_t""yes" 1>&6
5073 echo $ac_n "checking for XawScrollbarSetThumb in -lXaw3d""... $ac_c" 1>&6
5074 echo "configure:5075: checking for XawScrollbarSetThumb in -lXaw3d" >&5
5075 ac_lib_var=`echo Xaw3d'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'`
5076 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5077 echo $ac_n "(cached) $ac_c" 1>&6
5078 else
5079 ac_save_LIBS="$LIBS"
5080 LIBS="-lXaw3d $LIBS"
5081 cat > conftest.$ac_ext <<EOF
5082 #line 5083 "configure"
5083 #include "confdefs.h"
5084 /* Override any gcc2 internal prototype to avoid an error. */
5085 /* We use char because int might match the return type of a gcc2
5086 builtin and then its argument prototype would still apply. */
5087 char XawScrollbarSetThumb();
5089 int main() {
5090 XawScrollbarSetThumb()
5091 ; return 0; }
5093 if { (eval echo configure:5094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5094 rm -rf conftest*
5095 eval "ac_cv_lib_$ac_lib_var=yes"
5096 else
5097 echo "configure: failed program was:" >&5
5098 cat conftest.$ac_ext >&5
5099 rm -rf conftest*
5100 eval "ac_cv_lib_$ac_lib_var=no"
5102 rm -f conftest*
5103 LIBS="$ac_save_LIBS"
5106 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5107 echo "$ac_t""yes" 1>&6
5108 HAVE_XAW3D=yes
5109 else
5110 echo "$ac_t""no" 1>&6
5113 else
5114 echo "$ac_t""no" 1>&6
5117 if test "${HAVE_XAW3D}" = "yes"; then
5118 cat >> confdefs.h <<\EOF
5119 #define HAVE_XAW3D 1
5127 USE_TOOLKIT_SCROLL_BARS=no
5128 if test "${with_toolkit_scroll_bars}" != "no"; then
5129 if test "${USE_X_TOOLKIT}" != "none"; then
5130 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
5131 cat >> confdefs.h <<\EOF
5132 #define USE_TOOLKIT_SCROLL_BARS 1
5135 HAVE_XAW3D=no
5136 USE_TOOLKIT_SCROLL_BARS=yes
5137 elif test "${HAVE_XAW3D}" = "yes"; then
5138 cat >> confdefs.h <<\EOF
5139 #define USE_TOOLKIT_SCROLL_BARS 1
5142 USE_TOOLKIT_SCROLL_BARS=yes
5148 if test "${with_xim}" != "no"; then
5149 cat >> confdefs.h <<\EOF
5150 #define USE_XIM 1
5155 ### Use -lXpm if available, unless `--with-xpm=no'.
5156 HAVE_XPM=no
5157 if test "${HAVE_X11}" = "yes"; then
5158 if test "${with_xpm}" != "no"; then
5159 ac_safe=`echo "X11/xpm.h" | sed 'y%./+-%__p_%'`
5160 echo $ac_n "checking for X11/xpm.h""... $ac_c" 1>&6
5161 echo "configure:5162: checking for X11/xpm.h" >&5
5162 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5163 echo $ac_n "(cached) $ac_c" 1>&6
5164 else
5165 cat > conftest.$ac_ext <<EOF
5166 #line 5167 "configure"
5167 #include "confdefs.h"
5168 #include <X11/xpm.h>
5170 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5171 { (eval echo configure:5172: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5172 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5173 if test -z "$ac_err"; then
5174 rm -rf conftest*
5175 eval "ac_cv_header_$ac_safe=yes"
5176 else
5177 echo "$ac_err" >&5
5178 echo "configure: failed program was:" >&5
5179 cat conftest.$ac_ext >&5
5180 rm -rf conftest*
5181 eval "ac_cv_header_$ac_safe=no"
5183 rm -f conftest*
5185 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5186 echo "$ac_t""yes" 1>&6
5187 echo $ac_n "checking for XpmReadFileToPixmap in -lXpm""... $ac_c" 1>&6
5188 echo "configure:5189: checking for XpmReadFileToPixmap in -lXpm" >&5
5189 ac_lib_var=`echo Xpm'_'XpmReadFileToPixmap | sed 'y%./+-%__p_%'`
5190 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5191 echo $ac_n "(cached) $ac_c" 1>&6
5192 else
5193 ac_save_LIBS="$LIBS"
5194 LIBS="-lXpm -lX11 $LIBS"
5195 cat > conftest.$ac_ext <<EOF
5196 #line 5197 "configure"
5197 #include "confdefs.h"
5198 /* Override any gcc2 internal prototype to avoid an error. */
5199 /* We use char because int might match the return type of a gcc2
5200 builtin and then its argument prototype would still apply. */
5201 char XpmReadFileToPixmap();
5203 int main() {
5204 XpmReadFileToPixmap()
5205 ; return 0; }
5207 if { (eval echo configure:5208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5208 rm -rf conftest*
5209 eval "ac_cv_lib_$ac_lib_var=yes"
5210 else
5211 echo "configure: failed program was:" >&5
5212 cat conftest.$ac_ext >&5
5213 rm -rf conftest*
5214 eval "ac_cv_lib_$ac_lib_var=no"
5216 rm -f conftest*
5217 LIBS="$ac_save_LIBS"
5220 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5221 echo "$ac_t""yes" 1>&6
5222 HAVE_XPM=yes
5223 else
5224 echo "$ac_t""no" 1>&6
5227 else
5228 echo "$ac_t""no" 1>&6
5231 if test "${HAVE_XPM}" = "yes"; then
5232 echo $ac_n "checking for XpmReturnAllocPixels preprocessor define""... $ac_c" 1>&6
5233 echo "configure:5234: checking for XpmReturnAllocPixels preprocessor define" >&5
5234 cat > conftest.$ac_ext <<EOF
5235 #line 5236 "configure"
5236 #include "confdefs.h"
5237 #include "X11/xpm.h"
5238 #ifndef XpmReturnAllocPixels
5239 no_return_alloc_pixels
5240 #endif
5243 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5244 egrep "no_return_alloc_pixels" >/dev/null 2>&1; then
5245 rm -rf conftest*
5246 HAVE_XPM=no
5247 else
5248 rm -rf conftest*
5249 HAVE_XPM=yes
5251 rm -f conftest*
5254 if test "${HAVE_XPM}" = "yes"; then
5255 echo "$ac_t""yes" 1>&6
5256 else
5257 echo "$ac_t""no" 1>&6
5262 if test "${HAVE_XPM}" = "yes"; then
5263 cat >> confdefs.h <<\EOF
5264 #define HAVE_XPM 1
5270 ### Use -ljpeg if available, unless `--with-jpeg=no'.
5271 HAVE_JPEG=no
5272 if test "${HAVE_X11}" = "yes"; then
5273 if test "${with_jpeg}" != "no"; then
5274 ac_safe=`echo "jerror.h" | sed 'y%./+-%__p_%'`
5275 echo $ac_n "checking for jerror.h""... $ac_c" 1>&6
5276 echo "configure:5277: checking for jerror.h" >&5
5277 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5278 echo $ac_n "(cached) $ac_c" 1>&6
5279 else
5280 cat > conftest.$ac_ext <<EOF
5281 #line 5282 "configure"
5282 #include "confdefs.h"
5283 #include <jerror.h>
5285 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5286 { (eval echo configure:5287: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5287 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5288 if test -z "$ac_err"; then
5289 rm -rf conftest*
5290 eval "ac_cv_header_$ac_safe=yes"
5291 else
5292 echo "$ac_err" >&5
5293 echo "configure: failed program was:" >&5
5294 cat conftest.$ac_ext >&5
5295 rm -rf conftest*
5296 eval "ac_cv_header_$ac_safe=no"
5298 rm -f conftest*
5300 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5301 echo "$ac_t""yes" 1>&6
5302 echo $ac_n "checking for jpeg_destroy_compress in -ljpeg""... $ac_c" 1>&6
5303 echo "configure:5304: checking for jpeg_destroy_compress in -ljpeg" >&5
5304 ac_lib_var=`echo jpeg'_'jpeg_destroy_compress | sed 'y%./+-%__p_%'`
5305 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5306 echo $ac_n "(cached) $ac_c" 1>&6
5307 else
5308 ac_save_LIBS="$LIBS"
5309 LIBS="-ljpeg $LIBS"
5310 cat > conftest.$ac_ext <<EOF
5311 #line 5312 "configure"
5312 #include "confdefs.h"
5313 /* Override any gcc2 internal prototype to avoid an error. */
5314 /* We use char because int might match the return type of a gcc2
5315 builtin and then its argument prototype would still apply. */
5316 char jpeg_destroy_compress();
5318 int main() {
5319 jpeg_destroy_compress()
5320 ; return 0; }
5322 if { (eval echo configure:5323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5323 rm -rf conftest*
5324 eval "ac_cv_lib_$ac_lib_var=yes"
5325 else
5326 echo "configure: failed program was:" >&5
5327 cat conftest.$ac_ext >&5
5328 rm -rf conftest*
5329 eval "ac_cv_lib_$ac_lib_var=no"
5331 rm -f conftest*
5332 LIBS="$ac_save_LIBS"
5335 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5336 echo "$ac_t""yes" 1>&6
5337 HAVE_JPEG=yes
5338 else
5339 echo "$ac_t""no" 1>&6
5342 else
5343 echo "$ac_t""no" 1>&6
5348 if test "${HAVE_JPEG}" = "yes"; then
5349 cat >> confdefs.h <<\EOF
5350 #define HAVE_JPEG 1
5353 cat > conftest.$ac_ext <<EOF
5354 #line 5355 "configure"
5355 #include "confdefs.h"
5356 #include <jpeglib.h>
5357 version=JPEG_LIB_VERSION
5360 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5361 egrep "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then
5362 rm -rf conftest*
5363 cat >> confdefs.h <<\EOF
5364 #define HAVE_JPEG 1
5367 else
5368 rm -rf conftest*
5369 echo "configure: warning: libjpeg found, but not version 6b or later" 1>&2
5370 HAVE_JPEG=no
5372 rm -f conftest*
5377 ### Use -lpng if available, unless `--with-png=no'.
5378 HAVE_PNG=no
5379 if test "${HAVE_X11}" = "yes"; then
5380 if test "${with_png}" != "no"; then
5381 ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'`
5382 echo $ac_n "checking for png.h""... $ac_c" 1>&6
5383 echo "configure:5384: checking for png.h" >&5
5384 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5385 echo $ac_n "(cached) $ac_c" 1>&6
5386 else
5387 cat > conftest.$ac_ext <<EOF
5388 #line 5389 "configure"
5389 #include "confdefs.h"
5390 #include <png.h>
5392 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5393 { (eval echo configure:5394: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5394 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5395 if test -z "$ac_err"; then
5396 rm -rf conftest*
5397 eval "ac_cv_header_$ac_safe=yes"
5398 else
5399 echo "$ac_err" >&5
5400 echo "configure: failed program was:" >&5
5401 cat conftest.$ac_ext >&5
5402 rm -rf conftest*
5403 eval "ac_cv_header_$ac_safe=no"
5405 rm -f conftest*
5407 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5408 echo "$ac_t""yes" 1>&6
5409 echo $ac_n "checking for png_get_channels in -lpng""... $ac_c" 1>&6
5410 echo "configure:5411: checking for png_get_channels in -lpng" >&5
5411 ac_lib_var=`echo png'_'png_get_channels | sed 'y%./+-%__p_%'`
5412 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5413 echo $ac_n "(cached) $ac_c" 1>&6
5414 else
5415 ac_save_LIBS="$LIBS"
5416 LIBS="-lpng -lz -lm $LIBS"
5417 cat > conftest.$ac_ext <<EOF
5418 #line 5419 "configure"
5419 #include "confdefs.h"
5420 /* Override any gcc2 internal prototype to avoid an error. */
5421 /* We use char because int might match the return type of a gcc2
5422 builtin and then its argument prototype would still apply. */
5423 char png_get_channels();
5425 int main() {
5426 png_get_channels()
5427 ; return 0; }
5429 if { (eval echo configure:5430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5430 rm -rf conftest*
5431 eval "ac_cv_lib_$ac_lib_var=yes"
5432 else
5433 echo "configure: failed program was:" >&5
5434 cat conftest.$ac_ext >&5
5435 rm -rf conftest*
5436 eval "ac_cv_lib_$ac_lib_var=no"
5438 rm -f conftest*
5439 LIBS="$ac_save_LIBS"
5442 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5443 echo "$ac_t""yes" 1>&6
5444 HAVE_PNG=yes
5445 else
5446 echo "$ac_t""no" 1>&6
5449 else
5450 echo "$ac_t""no" 1>&6
5455 if test "${HAVE_PNG}" = "yes"; then
5456 cat >> confdefs.h <<\EOF
5457 #define HAVE_PNG 1
5463 ### Use -ltiff if available, unless `--with-tiff=no'.
5464 HAVE_TIFF=no
5465 if test "${HAVE_X11}" = "yes"; then
5466 if test "${with_tiff}" != "no"; then
5467 ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'`
5468 echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6
5469 echo "configure:5470: checking for tiffio.h" >&5
5470 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5471 echo $ac_n "(cached) $ac_c" 1>&6
5472 else
5473 cat > conftest.$ac_ext <<EOF
5474 #line 5475 "configure"
5475 #include "confdefs.h"
5476 #include <tiffio.h>
5478 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5479 { (eval echo configure:5480: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5480 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5481 if test -z "$ac_err"; then
5482 rm -rf conftest*
5483 eval "ac_cv_header_$ac_safe=yes"
5484 else
5485 echo "$ac_err" >&5
5486 echo "configure: failed program was:" >&5
5487 cat conftest.$ac_ext >&5
5488 rm -rf conftest*
5489 eval "ac_cv_header_$ac_safe=no"
5491 rm -f conftest*
5493 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5494 echo "$ac_t""yes" 1>&6
5495 tifflibs="-lz -lm"
5496 # At least one tiff package requires the jpeg library.
5497 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
5498 echo $ac_n "checking for TIFFGetVersion in -ltiff""... $ac_c" 1>&6
5499 echo "configure:5500: checking for TIFFGetVersion in -ltiff" >&5
5500 ac_lib_var=`echo tiff'_'TIFFGetVersion | sed 'y%./+-%__p_%'`
5501 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5502 echo $ac_n "(cached) $ac_c" 1>&6
5503 else
5504 ac_save_LIBS="$LIBS"
5505 LIBS="-ltiff $tifflibs $LIBS"
5506 cat > conftest.$ac_ext <<EOF
5507 #line 5508 "configure"
5508 #include "confdefs.h"
5509 /* Override any gcc2 internal prototype to avoid an error. */
5510 /* We use char because int might match the return type of a gcc2
5511 builtin and then its argument prototype would still apply. */
5512 char TIFFGetVersion();
5514 int main() {
5515 TIFFGetVersion()
5516 ; return 0; }
5518 if { (eval echo configure:5519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5519 rm -rf conftest*
5520 eval "ac_cv_lib_$ac_lib_var=yes"
5521 else
5522 echo "configure: failed program was:" >&5
5523 cat conftest.$ac_ext >&5
5524 rm -rf conftest*
5525 eval "ac_cv_lib_$ac_lib_var=no"
5527 rm -f conftest*
5528 LIBS="$ac_save_LIBS"
5531 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5532 echo "$ac_t""yes" 1>&6
5533 HAVE_TIFF=yes
5534 else
5535 echo "$ac_t""no" 1>&6
5538 else
5539 echo "$ac_t""no" 1>&6
5544 if test "${HAVE_TIFF}" = "yes"; then
5545 cat >> confdefs.h <<\EOF
5546 #define HAVE_TIFF 1
5552 ### Use -lgif if available, unless `--with-gif=no'.
5553 HAVE_GIF=no
5554 if test "${HAVE_X11}" = "yes"; then
5555 if test "${with_gif}" != "no"; then
5556 ac_safe=`echo "gif_lib.h" | sed 'y%./+-%__p_%'`
5557 echo $ac_n "checking for gif_lib.h""... $ac_c" 1>&6
5558 echo "configure:5559: checking for gif_lib.h" >&5
5559 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5560 echo $ac_n "(cached) $ac_c" 1>&6
5561 else
5562 cat > conftest.$ac_ext <<EOF
5563 #line 5564 "configure"
5564 #include "confdefs.h"
5565 #include <gif_lib.h>
5567 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5568 { (eval echo configure:5569: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5569 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5570 if test -z "$ac_err"; then
5571 rm -rf conftest*
5572 eval "ac_cv_header_$ac_safe=yes"
5573 else
5574 echo "$ac_err" >&5
5575 echo "configure: failed program was:" >&5
5576 cat conftest.$ac_ext >&5
5577 rm -rf conftest*
5578 eval "ac_cv_header_$ac_safe=no"
5580 rm -f conftest*
5582 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5583 echo "$ac_t""yes" 1>&6
5584 # EGifPutExtensionLast only exists from version libungif-4.1.0b1.
5585 # Earlier versions can crash Emacs.
5586 echo $ac_n "checking for EGifPutExtensionLast in -lungif""... $ac_c" 1>&6
5587 echo "configure:5588: checking for EGifPutExtensionLast in -lungif" >&5
5588 ac_lib_var=`echo ungif'_'EGifPutExtensionLast | sed 'y%./+-%__p_%'`
5589 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5590 echo $ac_n "(cached) $ac_c" 1>&6
5591 else
5592 ac_save_LIBS="$LIBS"
5593 LIBS="-lungif $LIBS"
5594 cat > conftest.$ac_ext <<EOF
5595 #line 5596 "configure"
5596 #include "confdefs.h"
5597 /* Override any gcc2 internal prototype to avoid an error. */
5598 /* We use char because int might match the return type of a gcc2
5599 builtin and then its argument prototype would still apply. */
5600 char EGifPutExtensionLast();
5602 int main() {
5603 EGifPutExtensionLast()
5604 ; return 0; }
5606 if { (eval echo configure:5607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5607 rm -rf conftest*
5608 eval "ac_cv_lib_$ac_lib_var=yes"
5609 else
5610 echo "configure: failed program was:" >&5
5611 cat conftest.$ac_ext >&5
5612 rm -rf conftest*
5613 eval "ac_cv_lib_$ac_lib_var=no"
5615 rm -f conftest*
5616 LIBS="$ac_save_LIBS"
5619 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5620 echo "$ac_t""yes" 1>&6
5621 HAVE_GIF=yes
5622 else
5623 echo "$ac_t""no" 1>&6
5626 else
5627 echo "$ac_t""no" 1>&6
5632 if test "${HAVE_GIF}" = "yes"; then
5633 cat >> confdefs.h <<\EOF
5634 #define HAVE_GIF 1
5640 # If netdb.h doesn't declare h_errno, we must declare it by hand.
5641 echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
5642 echo "configure:5643: checking whether netdb declares h_errno" >&5
5643 if eval "test \"`echo '$''{'emacs_cv_netdb_declares_h_errno'+set}'`\" = set"; then
5644 echo $ac_n "(cached) $ac_c" 1>&6
5645 else
5646 cat > conftest.$ac_ext <<EOF
5647 #line 5648 "configure"
5648 #include "confdefs.h"
5649 #include <netdb.h>
5650 int main() {
5651 return h_errno;
5652 ; return 0; }
5654 if { (eval echo configure:5655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5655 rm -rf conftest*
5656 emacs_cv_netdb_declares_h_errno=yes
5657 else
5658 echo "configure: failed program was:" >&5
5659 cat conftest.$ac_ext >&5
5660 rm -rf conftest*
5661 emacs_cv_netdb_declares_h_errno=no
5663 rm -f conftest*
5666 echo "$ac_t""$emacs_cv_netdb_declares_h_errno" 1>&6
5667 if test $emacs_cv_netdb_declares_h_errno = yes; then
5668 cat >> confdefs.h <<\EOF
5669 #define HAVE_H_ERRNO 1
5674 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
5675 # for constant arguments. Useless!
5676 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
5677 echo "configure:5678: checking for working alloca.h" >&5
5678 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
5679 echo $ac_n "(cached) $ac_c" 1>&6
5680 else
5681 cat > conftest.$ac_ext <<EOF
5682 #line 5683 "configure"
5683 #include "confdefs.h"
5684 #include <alloca.h>
5685 int main() {
5686 char *p = alloca(2 * sizeof(int));
5687 ; return 0; }
5689 if { (eval echo configure:5690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5690 rm -rf conftest*
5691 ac_cv_header_alloca_h=yes
5692 else
5693 echo "configure: failed program was:" >&5
5694 cat conftest.$ac_ext >&5
5695 rm -rf conftest*
5696 ac_cv_header_alloca_h=no
5698 rm -f conftest*
5701 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
5702 if test $ac_cv_header_alloca_h = yes; then
5703 cat >> confdefs.h <<\EOF
5704 #define HAVE_ALLOCA_H 1
5709 echo $ac_n "checking for alloca""... $ac_c" 1>&6
5710 echo "configure:5711: checking for alloca" >&5
5711 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
5712 echo $ac_n "(cached) $ac_c" 1>&6
5713 else
5714 cat > conftest.$ac_ext <<EOF
5715 #line 5716 "configure"
5716 #include "confdefs.h"
5718 #ifdef __GNUC__
5719 # define alloca __builtin_alloca
5720 #else
5721 # ifdef _MSC_VER
5722 # include <malloc.h>
5723 # define alloca _alloca
5724 # else
5725 # if HAVE_ALLOCA_H
5726 # include <alloca.h>
5727 # else
5728 # ifdef _AIX
5729 #pragma alloca
5730 # else
5731 # ifndef alloca /* predefined by HP cc +Olibcalls */
5732 char *alloca ();
5733 # endif
5734 # endif
5735 # endif
5736 # endif
5737 #endif
5739 int main() {
5740 char *p = (char *) alloca(1);
5741 ; return 0; }
5743 if { (eval echo configure:5744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5744 rm -rf conftest*
5745 ac_cv_func_alloca_works=yes
5746 else
5747 echo "configure: failed program was:" >&5
5748 cat conftest.$ac_ext >&5
5749 rm -rf conftest*
5750 ac_cv_func_alloca_works=no
5752 rm -f conftest*
5755 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
5756 if test $ac_cv_func_alloca_works = yes; then
5757 cat >> confdefs.h <<\EOF
5758 #define HAVE_ALLOCA 1
5763 if test $ac_cv_func_alloca_works = no; then
5764 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
5765 # that cause trouble. Some versions do not even contain alloca or
5766 # contain a buggy version. If you still want to use their alloca,
5767 # use ar to extract alloca.o from them instead of compiling alloca.c.
5768 ALLOCA=alloca.${ac_objext}
5769 cat >> confdefs.h <<\EOF
5770 #define C_ALLOCA 1
5774 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
5775 echo "configure:5776: checking whether alloca needs Cray hooks" >&5
5776 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
5777 echo $ac_n "(cached) $ac_c" 1>&6
5778 else
5779 cat > conftest.$ac_ext <<EOF
5780 #line 5781 "configure"
5781 #include "confdefs.h"
5782 #if defined(CRAY) && ! defined(CRAY2)
5783 webecray
5784 #else
5785 wenotbecray
5786 #endif
5789 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5790 egrep "webecray" >/dev/null 2>&1; then
5791 rm -rf conftest*
5792 ac_cv_os_cray=yes
5793 else
5794 rm -rf conftest*
5795 ac_cv_os_cray=no
5797 rm -f conftest*
5801 echo "$ac_t""$ac_cv_os_cray" 1>&6
5802 if test $ac_cv_os_cray = yes; then
5803 for ac_func in _getb67 GETB67 getb67; do
5804 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5805 echo "configure:5806: checking for $ac_func" >&5
5806 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5807 echo $ac_n "(cached) $ac_c" 1>&6
5808 else
5809 cat > conftest.$ac_ext <<EOF
5810 #line 5811 "configure"
5811 #include "confdefs.h"
5812 /* System header to define __stub macros and hopefully few prototypes,
5813 which can conflict with char $ac_func(); below. */
5814 #include <assert.h>
5815 /* Override any gcc2 internal prototype to avoid an error. */
5816 /* We use char because int might match the return type of a gcc2
5817 builtin and then its argument prototype would still apply. */
5818 char $ac_func();
5820 int main() {
5822 /* The GNU C library defines this for functions which it implements
5823 to always fail with ENOSYS. Some functions are actually named
5824 something starting with __ and the normal name is an alias. */
5825 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5826 choke me
5827 #else
5828 $ac_func();
5829 #endif
5831 ; return 0; }
5833 if { (eval echo configure:5834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5834 rm -rf conftest*
5835 eval "ac_cv_func_$ac_func=yes"
5836 else
5837 echo "configure: failed program was:" >&5
5838 cat conftest.$ac_ext >&5
5839 rm -rf conftest*
5840 eval "ac_cv_func_$ac_func=no"
5842 rm -f conftest*
5845 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5846 echo "$ac_t""yes" 1>&6
5847 cat >> confdefs.h <<EOF
5848 #define CRAY_STACKSEG_END $ac_func
5851 break
5852 else
5853 echo "$ac_t""no" 1>&6
5856 done
5859 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
5860 echo "configure:5861: checking stack direction for C alloca" >&5
5861 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
5862 echo $ac_n "(cached) $ac_c" 1>&6
5863 else
5864 if test "$cross_compiling" = yes; then
5865 ac_cv_c_stack_direction=0
5866 else
5867 cat > conftest.$ac_ext <<EOF
5868 #line 5869 "configure"
5869 #include "confdefs.h"
5870 find_stack_direction ()
5872 static char *addr = 0;
5873 auto char dummy;
5874 if (addr == 0)
5876 addr = &dummy;
5877 return find_stack_direction ();
5879 else
5880 return (&dummy > addr) ? 1 : -1;
5882 main ()
5884 exit (find_stack_direction() < 0);
5887 if { (eval echo configure:5888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5888 then
5889 ac_cv_c_stack_direction=1
5890 else
5891 echo "configure: failed program was:" >&5
5892 cat conftest.$ac_ext >&5
5893 rm -fr conftest*
5894 ac_cv_c_stack_direction=-1
5896 rm -fr conftest*
5901 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
5902 cat >> confdefs.h <<EOF
5903 #define STACK_DIRECTION $ac_cv_c_stack_direction
5909 # fmod, logb, and frexp are found in -lm on most systems.
5910 # On HPUX 9.01, -lm does not contain logb, so check for sqrt.
5911 echo $ac_n "checking for sqrt in -lm""... $ac_c" 1>&6
5912 echo "configure:5913: checking for sqrt in -lm" >&5
5913 ac_lib_var=`echo m'_'sqrt | sed 'y%./+-%__p_%'`
5914 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5915 echo $ac_n "(cached) $ac_c" 1>&6
5916 else
5917 ac_save_LIBS="$LIBS"
5918 LIBS="-lm $LIBS"
5919 cat > conftest.$ac_ext <<EOF
5920 #line 5921 "configure"
5921 #include "confdefs.h"
5922 /* Override any gcc2 internal prototype to avoid an error. */
5923 /* We use char because int might match the return type of a gcc2
5924 builtin and then its argument prototype would still apply. */
5925 char sqrt();
5927 int main() {
5928 sqrt()
5929 ; return 0; }
5931 if { (eval echo configure:5932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5932 rm -rf conftest*
5933 eval "ac_cv_lib_$ac_lib_var=yes"
5934 else
5935 echo "configure: failed program was:" >&5
5936 cat conftest.$ac_ext >&5
5937 rm -rf conftest*
5938 eval "ac_cv_lib_$ac_lib_var=no"
5940 rm -f conftest*
5941 LIBS="$ac_save_LIBS"
5944 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5945 echo "$ac_t""yes" 1>&6
5946 ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5947 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5948 cat >> confdefs.h <<EOF
5949 #define $ac_tr_lib 1
5952 LIBS="-lm $LIBS"
5954 else
5955 echo "$ac_t""no" 1>&6
5959 # Check for mail-locking functions in a "mail" library
5960 echo $ac_n "checking for maillock in -lmail""... $ac_c" 1>&6
5961 echo "configure:5962: checking for maillock in -lmail" >&5
5962 ac_lib_var=`echo mail'_'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="-lmail $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 mail | 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="-lmail $LIBS"
6003 else
6004 echo "$ac_t""no" 1>&6
6007 echo $ac_n "checking for maillock in -llockfile""... $ac_c" 1>&6
6008 echo "configure:6009: checking for maillock in -llockfile" >&5
6009 ac_lib_var=`echo lockfile'_'maillock | sed 'y%./+-%__p_%'`
6010 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6011 echo $ac_n "(cached) $ac_c" 1>&6
6012 else
6013 ac_save_LIBS="$LIBS"
6014 LIBS="-llockfile $LIBS"
6015 cat > conftest.$ac_ext <<EOF
6016 #line 6017 "configure"
6017 #include "confdefs.h"
6018 /* Override any gcc2 internal prototype to avoid an error. */
6019 /* We use char because int might match the return type of a gcc2
6020 builtin and then its argument prototype would still apply. */
6021 char maillock();
6023 int main() {
6024 maillock()
6025 ; return 0; }
6027 if { (eval echo configure:6028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6028 rm -rf conftest*
6029 eval "ac_cv_lib_$ac_lib_var=yes"
6030 else
6031 echo "configure: failed program was:" >&5
6032 cat conftest.$ac_ext >&5
6033 rm -rf conftest*
6034 eval "ac_cv_lib_$ac_lib_var=no"
6036 rm -f conftest*
6037 LIBS="$ac_save_LIBS"
6040 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6041 echo "$ac_t""yes" 1>&6
6042 ac_tr_lib=HAVE_LIB`echo lockfile | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6043 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6044 cat >> confdefs.h <<EOF
6045 #define $ac_tr_lib 1
6048 LIBS="-llockfile $LIBS"
6050 else
6051 echo "$ac_t""no" 1>&6
6054 # If we have the shared liblockfile, assume we must use it for mail
6055 # locking (e.g. Debian). If we couldn't link against liblockfile
6056 # (no liblockfile.a installed), ensure that we don't need to.
6057 if test "$ac_cv_lib_lockfile_maillock" = no; then
6058 # Extract the first word of "liblockfile.so", so it can be a program name with args.
6059 set dummy liblockfile.so; ac_word=$2
6060 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6061 echo "configure:6062: checking for $ac_word" >&5
6062 if eval "test \"`echo '$''{'ac_cv_prog_liblockfile'+set}'`\" = set"; then
6063 echo $ac_n "(cached) $ac_c" 1>&6
6064 else
6065 if test -n "$liblockfile"; then
6066 ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
6067 else
6068 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6069 ac_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
6070 for ac_dir in $ac_dummy; do
6071 test -z "$ac_dir" && ac_dir=.
6072 if test -f $ac_dir/$ac_word; then
6073 ac_cv_prog_liblockfile="yes"
6074 break
6076 done
6077 IFS="$ac_save_ifs"
6078 test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
6081 liblockfile="$ac_cv_prog_liblockfile"
6082 if test -n "$liblockfile"; then
6083 echo "$ac_t""$liblockfile" 1>&6
6084 else
6085 echo "$ac_t""no" 1>&6
6088 if test $ac_cv_prog_liblockfile = yes; then
6089 { echo "configure: error: Shared liblockfile found but can't link against it.
6090 This probably means that movemail could lose mail.
6091 There may be a \`development' package to install containing liblockfile." 1>&2; exit 1; }
6092 else cat >> confdefs.h <<\EOF
6093 #define LIBMAIL -llockfile
6097 else :
6099 for ac_func in touchlock
6101 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6102 echo "configure:6103: checking for $ac_func" >&5
6103 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6104 echo $ac_n "(cached) $ac_c" 1>&6
6105 else
6106 cat > conftest.$ac_ext <<EOF
6107 #line 6108 "configure"
6108 #include "confdefs.h"
6109 /* System header to define __stub macros and hopefully few prototypes,
6110 which can conflict with char $ac_func(); below. */
6111 #include <assert.h>
6112 /* Override any gcc2 internal prototype to avoid an error. */
6113 /* We use char because int might match the return type of a gcc2
6114 builtin and then its argument prototype would still apply. */
6115 char $ac_func();
6117 int main() {
6119 /* The GNU C library defines this for functions which it implements
6120 to always fail with ENOSYS. Some functions are actually named
6121 something starting with __ and the normal name is an alias. */
6122 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6123 choke me
6124 #else
6125 $ac_func();
6126 #endif
6128 ; return 0; }
6130 if { (eval echo configure:6131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6131 rm -rf conftest*
6132 eval "ac_cv_func_$ac_func=yes"
6133 else
6134 echo "configure: failed program was:" >&5
6135 cat conftest.$ac_ext >&5
6136 rm -rf conftest*
6137 eval "ac_cv_func_$ac_func=no"
6139 rm -f conftest*
6142 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6143 echo "$ac_t""yes" 1>&6
6144 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6145 cat >> confdefs.h <<EOF
6146 #define $ac_tr_func 1
6149 else
6150 echo "$ac_t""no" 1>&6
6152 done
6154 for ac_hdr in maillock.h
6156 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6157 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6158 echo "configure:6159: checking for $ac_hdr" >&5
6159 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6160 echo $ac_n "(cached) $ac_c" 1>&6
6161 else
6162 cat > conftest.$ac_ext <<EOF
6163 #line 6164 "configure"
6164 #include "confdefs.h"
6165 #include <$ac_hdr>
6167 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6168 { (eval echo configure:6169: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6169 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6170 if test -z "$ac_err"; then
6171 rm -rf conftest*
6172 eval "ac_cv_header_$ac_safe=yes"
6173 else
6174 echo "$ac_err" >&5
6175 echo "configure: failed program was:" >&5
6176 cat conftest.$ac_ext >&5
6177 rm -rf conftest*
6178 eval "ac_cv_header_$ac_safe=no"
6180 rm -f conftest*
6182 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6183 echo "$ac_t""yes" 1>&6
6184 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6185 cat >> confdefs.h <<EOF
6186 #define $ac_tr_hdr 1
6189 else
6190 echo "$ac_t""no" 1>&6
6192 done
6195 for ac_func in gethostname getdomainname dup2 \
6196 rename closedir mkdir rmdir sysinfo \
6197 random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime res_init setsid \
6198 strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \
6199 utimes setrlimit setpgid getcwd getwd shutdown strftime getaddrinfo \
6200 __fpending mblen mbrlen strsignal setitimer ualarm index rindex \
6201 gai_strerror mkstemp
6203 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6204 echo "configure:6205: checking for $ac_func" >&5
6205 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6206 echo $ac_n "(cached) $ac_c" 1>&6
6207 else
6208 cat > conftest.$ac_ext <<EOF
6209 #line 6210 "configure"
6210 #include "confdefs.h"
6211 /* System header to define __stub macros and hopefully few prototypes,
6212 which can conflict with char $ac_func(); below. */
6213 #include <assert.h>
6214 /* Override any gcc2 internal prototype to avoid an error. */
6215 /* We use char because int might match the return type of a gcc2
6216 builtin and then its argument prototype would still apply. */
6217 char $ac_func();
6219 int main() {
6221 /* The GNU C library defines this for functions which it implements
6222 to always fail with ENOSYS. Some functions are actually named
6223 something starting with __ and the normal name is an alias. */
6224 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6225 choke me
6226 #else
6227 $ac_func();
6228 #endif
6230 ; return 0; }
6232 if { (eval echo configure:6233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6233 rm -rf conftest*
6234 eval "ac_cv_func_$ac_func=yes"
6235 else
6236 echo "configure: failed program was:" >&5
6237 cat conftest.$ac_ext >&5
6238 rm -rf conftest*
6239 eval "ac_cv_func_$ac_func=no"
6241 rm -f conftest*
6244 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6245 echo "$ac_t""yes" 1>&6
6246 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6247 cat >> confdefs.h <<EOF
6248 #define $ac_tr_func 1
6251 else
6252 echo "$ac_t""no" 1>&6
6254 done
6257 for ac_hdr in sys/time.h unistd.h
6259 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6260 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6261 echo "configure:6262: checking for $ac_hdr" >&5
6262 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6263 echo $ac_n "(cached) $ac_c" 1>&6
6264 else
6265 cat > conftest.$ac_ext <<EOF
6266 #line 6267 "configure"
6267 #include "confdefs.h"
6268 #include <$ac_hdr>
6270 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6271 { (eval echo configure:6272: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6272 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6273 if test -z "$ac_err"; then
6274 rm -rf conftest*
6275 eval "ac_cv_header_$ac_safe=yes"
6276 else
6277 echo "$ac_err" >&5
6278 echo "configure: failed program was:" >&5
6279 cat conftest.$ac_ext >&5
6280 rm -rf conftest*
6281 eval "ac_cv_header_$ac_safe=no"
6283 rm -f conftest*
6285 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6286 echo "$ac_t""yes" 1>&6
6287 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6288 cat >> confdefs.h <<EOF
6289 #define $ac_tr_hdr 1
6292 else
6293 echo "$ac_t""no" 1>&6
6295 done
6297 for ac_func in alarm
6299 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6300 echo "configure:6301: checking for $ac_func" >&5
6301 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6302 echo $ac_n "(cached) $ac_c" 1>&6
6303 else
6304 cat > conftest.$ac_ext <<EOF
6305 #line 6306 "configure"
6306 #include "confdefs.h"
6307 /* System header to define __stub macros and hopefully few prototypes,
6308 which can conflict with char $ac_func(); below. */
6309 #include <assert.h>
6310 /* Override any gcc2 internal prototype to avoid an error. */
6311 /* We use char because int might match the return type of a gcc2
6312 builtin and then its argument prototype would still apply. */
6313 char $ac_func();
6315 int main() {
6317 /* The GNU C library defines this for functions which it implements
6318 to always fail with ENOSYS. Some functions are actually named
6319 something starting with __ and the normal name is an alias. */
6320 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6321 choke me
6322 #else
6323 $ac_func();
6324 #endif
6326 ; return 0; }
6328 if { (eval echo configure:6329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6329 rm -rf conftest*
6330 eval "ac_cv_func_$ac_func=yes"
6331 else
6332 echo "configure: failed program was:" >&5
6333 cat conftest.$ac_ext >&5
6334 rm -rf conftest*
6335 eval "ac_cv_func_$ac_func=no"
6337 rm -f conftest*
6340 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6341 echo "$ac_t""yes" 1>&6
6342 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6343 cat >> confdefs.h <<EOF
6344 #define $ac_tr_func 1
6347 else
6348 echo "$ac_t""no" 1>&6
6350 done
6352 echo $ac_n "checking for working mktime""... $ac_c" 1>&6
6353 echo "configure:6354: checking for working mktime" >&5
6354 if eval "test \"`echo '$''{'ac_cv_func_working_mktime'+set}'`\" = set"; then
6355 echo $ac_n "(cached) $ac_c" 1>&6
6356 else
6357 if test "$cross_compiling" = yes; then
6358 ac_cv_func_working_mktime=no
6359 else
6360 cat > conftest.$ac_ext <<EOF
6361 #line 6362 "configure"
6362 #include "confdefs.h"
6363 /* Test program from Paul Eggert (eggert@twinsun.com)
6364 and Tony Leneis (tony@plaza.ds.adp.com). */
6365 #if TIME_WITH_SYS_TIME
6366 # include <sys/time.h>
6367 # include <time.h>
6368 #else
6369 # if HAVE_SYS_TIME_H
6370 # include <sys/time.h>
6371 # else
6372 # include <time.h>
6373 # endif
6374 #endif
6376 #if HAVE_UNISTD_H
6377 # include <unistd.h>
6378 #endif
6380 #if !HAVE_ALARM
6381 # define alarm(X) /* empty */
6382 #endif
6384 /* Work around redefinition to rpl_putenv by other config tests. */
6385 #undef putenv
6387 static time_t time_t_max;
6389 /* Values we'll use to set the TZ environment variable. */
6390 static const char *const tz_strings[] = {
6391 (const char *) 0, "TZ=GMT0", "TZ=JST-9",
6392 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
6394 #define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
6396 /* Fail if mktime fails to convert a date in the spring-forward gap.
6397 Based on a problem report from Andreas Jaeger. */
6398 static void
6399 spring_forward_gap ()
6401 /* glibc (up to about 1998-10-07) failed this test) */
6402 struct tm tm;
6404 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
6405 instead of "TZ=America/Vancouver" in order to detect the bug even
6406 on systems that don't support the Olson extension, or don't have the
6407 full zoneinfo tables installed. */
6408 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
6410 tm.tm_year = 98;
6411 tm.tm_mon = 3;
6412 tm.tm_mday = 5;
6413 tm.tm_hour = 2;
6414 tm.tm_min = 0;
6415 tm.tm_sec = 0;
6416 tm.tm_isdst = -1;
6417 if (mktime (&tm) == (time_t)-1)
6418 exit (1);
6421 static void
6422 mktime_test (now)
6423 time_t now;
6425 struct tm *lt;
6426 if ((lt = localtime (&now)) && mktime (lt) != now)
6427 exit (1);
6428 now = time_t_max - now;
6429 if ((lt = localtime (&now)) && mktime (lt) != now)
6430 exit (1);
6433 static void
6434 irix_6_4_bug ()
6436 /* Based on code from Ariel Faigon. */
6437 struct tm tm;
6438 tm.tm_year = 96;
6439 tm.tm_mon = 3;
6440 tm.tm_mday = 0;
6441 tm.tm_hour = 0;
6442 tm.tm_min = 0;
6443 tm.tm_sec = 0;
6444 tm.tm_isdst = -1;
6445 mktime (&tm);
6446 if (tm.tm_mon != 2 || tm.tm_mday != 31)
6447 exit (1);
6450 static void
6451 bigtime_test (j)
6452 int j;
6454 struct tm tm;
6455 time_t now;
6456 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
6457 now = mktime (&tm);
6458 if (now != (time_t) -1)
6460 struct tm *lt = localtime (&now);
6461 if (! (lt
6462 && lt->tm_year == tm.tm_year
6463 && lt->tm_mon == tm.tm_mon
6464 && lt->tm_mday == tm.tm_mday
6465 && lt->tm_hour == tm.tm_hour
6466 && lt->tm_min == tm.tm_min
6467 && lt->tm_sec == tm.tm_sec
6468 && lt->tm_yday == tm.tm_yday
6469 && lt->tm_wday == tm.tm_wday
6470 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
6471 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
6472 exit (1);
6477 main ()
6479 time_t t, delta;
6480 int i, j;
6482 /* This test makes some buggy mktime implementations loop.
6483 Give up after 60 seconds; a mktime slower than that
6484 isn't worth using anyway. */
6485 alarm (60);
6487 for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2)
6488 continue;
6489 time_t_max--;
6490 delta = time_t_max / 997; /* a suitable prime number */
6491 for (i = 0; i < N_STRINGS; i++)
6493 if (tz_strings[i])
6494 putenv (tz_strings[i]);
6496 for (t = 0; t <= time_t_max - delta; t += delta)
6497 mktime_test (t);
6498 mktime_test ((time_t) 60 * 60);
6499 mktime_test ((time_t) 60 * 60 * 24);
6501 for (j = 1; 0 < j; j *= 2)
6502 bigtime_test (j);
6503 bigtime_test (j - 1);
6505 irix_6_4_bug ();
6506 spring_forward_gap ();
6507 exit (0);
6510 if { (eval echo configure:6511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6511 then
6512 ac_cv_func_working_mktime=yes
6513 else
6514 echo "configure: failed program was:" >&5
6515 cat conftest.$ac_ext >&5
6516 rm -fr conftest*
6517 ac_cv_func_working_mktime=no
6519 rm -fr conftest*
6524 echo "$ac_t""$ac_cv_func_working_mktime" 1>&6
6525 if test $ac_cv_func_working_mktime = no; then
6526 LIBOBJS="$LIBOBJS mktime.${ac_objext}"
6529 if test "$ac_cv_func_working_mktime" = no; then
6530 cat >> confdefs.h <<\EOF
6531 #define BROKEN_MKTIME 1
6536 ac_have_func=no # yes means we've found a way to get the load average.
6538 # Some systems have getloadavg without any extra libraries.
6539 echo $ac_n "checking for getloadavg""... $ac_c" 1>&6
6540 echo "configure:6541: checking for getloadavg" >&5
6541 if eval "test \"`echo '$''{'ac_cv_func_getloadavg'+set}'`\" = set"; then
6542 echo $ac_n "(cached) $ac_c" 1>&6
6543 else
6544 cat > conftest.$ac_ext <<EOF
6545 #line 6546 "configure"
6546 #include "confdefs.h"
6547 /* System header to define __stub macros and hopefully few prototypes,
6548 which can conflict with char getloadavg(); below. */
6549 #include <assert.h>
6550 /* Override any gcc2 internal prototype to avoid an error. */
6551 /* We use char because int might match the return type of a gcc2
6552 builtin and then its argument prototype would still apply. */
6553 char getloadavg();
6555 int main() {
6557 /* The GNU C library defines this for functions which it implements
6558 to always fail with ENOSYS. Some functions are actually named
6559 something starting with __ and the normal name is an alias. */
6560 #if defined (__stub_getloadavg) || defined (__stub___getloadavg)
6561 choke me
6562 #else
6563 getloadavg();
6564 #endif
6566 ; return 0; }
6568 if { (eval echo configure:6569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6569 rm -rf conftest*
6570 eval "ac_cv_func_getloadavg=yes"
6571 else
6572 echo "configure: failed program was:" >&5
6573 cat conftest.$ac_ext >&5
6574 rm -rf conftest*
6575 eval "ac_cv_func_getloadavg=no"
6577 rm -f conftest*
6580 if eval "test \"`echo '$ac_cv_func_'getloadavg`\" = yes"; then
6581 echo "$ac_t""yes" 1>&6
6582 ac_have_func=yes
6583 else
6584 echo "$ac_t""no" 1>&6
6588 if test $ac_have_func = no; then
6589 # Some systems with -lutil have (and need) -lkvm as well, some do not.
6590 # On Solaris, -lkvm requires nlist from -lelf, so check that first
6591 # to get the right answer into the cache.
6592 echo $ac_n "checking for elf_begin in -lelf""... $ac_c" 1>&6
6593 echo "configure:6594: checking for elf_begin in -lelf" >&5
6594 ac_lib_var=`echo elf'_'elf_begin | sed 'y%./+-%__p_%'`
6595 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6596 echo $ac_n "(cached) $ac_c" 1>&6
6597 else
6598 ac_save_LIBS="$LIBS"
6599 LIBS="-lelf $LIBS"
6600 cat > conftest.$ac_ext <<EOF
6601 #line 6602 "configure"
6602 #include "confdefs.h"
6603 /* Override any gcc2 internal prototype to avoid an error. */
6604 /* We use char because int might match the return type of a gcc2
6605 builtin and then its argument prototype would still apply. */
6606 char elf_begin();
6608 int main() {
6609 elf_begin()
6610 ; return 0; }
6612 if { (eval echo configure:6613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6613 rm -rf conftest*
6614 eval "ac_cv_lib_$ac_lib_var=yes"
6615 else
6616 echo "configure: failed program was:" >&5
6617 cat conftest.$ac_ext >&5
6618 rm -rf conftest*
6619 eval "ac_cv_lib_$ac_lib_var=no"
6621 rm -f conftest*
6622 LIBS="$ac_save_LIBS"
6625 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6626 echo "$ac_t""yes" 1>&6
6627 LIBS="-lelf $LIBS"
6628 else
6629 echo "$ac_t""no" 1>&6
6632 echo $ac_n "checking for kvm_open in -lkvm""... $ac_c" 1>&6
6633 echo "configure:6634: checking for kvm_open in -lkvm" >&5
6634 ac_lib_var=`echo kvm'_'kvm_open | sed 'y%./+-%__p_%'`
6635 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6636 echo $ac_n "(cached) $ac_c" 1>&6
6637 else
6638 ac_save_LIBS="$LIBS"
6639 LIBS="-lkvm $LIBS"
6640 cat > conftest.$ac_ext <<EOF
6641 #line 6642 "configure"
6642 #include "confdefs.h"
6643 /* Override any gcc2 internal prototype to avoid an error. */
6644 /* We use char because int might match the return type of a gcc2
6645 builtin and then its argument prototype would still apply. */
6646 char kvm_open();
6648 int main() {
6649 kvm_open()
6650 ; return 0; }
6652 if { (eval echo configure:6653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6653 rm -rf conftest*
6654 eval "ac_cv_lib_$ac_lib_var=yes"
6655 else
6656 echo "configure: failed program was:" >&5
6657 cat conftest.$ac_ext >&5
6658 rm -rf conftest*
6659 eval "ac_cv_lib_$ac_lib_var=no"
6661 rm -f conftest*
6662 LIBS="$ac_save_LIBS"
6665 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6666 echo "$ac_t""yes" 1>&6
6667 LIBS="-lkvm $LIBS"
6668 else
6669 echo "$ac_t""no" 1>&6
6672 # Check for the 4.4BSD definition of getloadavg.
6673 echo $ac_n "checking for getloadavg in -lutil""... $ac_c" 1>&6
6674 echo "configure:6675: checking for getloadavg in -lutil" >&5
6675 ac_lib_var=`echo util'_'getloadavg | sed 'y%./+-%__p_%'`
6676 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6677 echo $ac_n "(cached) $ac_c" 1>&6
6678 else
6679 ac_save_LIBS="$LIBS"
6680 LIBS="-lutil $LIBS"
6681 cat > conftest.$ac_ext <<EOF
6682 #line 6683 "configure"
6683 #include "confdefs.h"
6684 /* Override any gcc2 internal prototype to avoid an error. */
6685 /* We use char because int might match the return type of a gcc2
6686 builtin and then its argument prototype would still apply. */
6687 char getloadavg();
6689 int main() {
6690 getloadavg()
6691 ; return 0; }
6693 if { (eval echo configure:6694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6694 rm -rf conftest*
6695 eval "ac_cv_lib_$ac_lib_var=yes"
6696 else
6697 echo "configure: failed program was:" >&5
6698 cat conftest.$ac_ext >&5
6699 rm -rf conftest*
6700 eval "ac_cv_lib_$ac_lib_var=no"
6702 rm -f conftest*
6703 LIBS="$ac_save_LIBS"
6706 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6707 echo "$ac_t""yes" 1>&6
6708 LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes
6709 else
6710 echo "$ac_t""no" 1>&6
6715 if test $ac_have_func = no; then
6716 # There is a commonly available library for RS/6000 AIX.
6717 # Since it is not a standard part of AIX, it might be installed locally.
6718 ac_getloadavg_LIBS="$LIBS"; LIBS="-L/usr/local/lib $LIBS"
6719 echo $ac_n "checking for getloadavg in -lgetloadavg""... $ac_c" 1>&6
6720 echo "configure:6721: checking for getloadavg in -lgetloadavg" >&5
6721 ac_lib_var=`echo getloadavg'_'getloadavg | sed 'y%./+-%__p_%'`
6722 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6723 echo $ac_n "(cached) $ac_c" 1>&6
6724 else
6725 ac_save_LIBS="$LIBS"
6726 LIBS="-lgetloadavg $LIBS"
6727 cat > conftest.$ac_ext <<EOF
6728 #line 6729 "configure"
6729 #include "confdefs.h"
6730 /* Override any gcc2 internal prototype to avoid an error. */
6731 /* We use char because int might match the return type of a gcc2
6732 builtin and then its argument prototype would still apply. */
6733 char getloadavg();
6735 int main() {
6736 getloadavg()
6737 ; return 0; }
6739 if { (eval echo configure:6740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6740 rm -rf conftest*
6741 eval "ac_cv_lib_$ac_lib_var=yes"
6742 else
6743 echo "configure: failed program was:" >&5
6744 cat conftest.$ac_ext >&5
6745 rm -rf conftest*
6746 eval "ac_cv_lib_$ac_lib_var=no"
6748 rm -f conftest*
6749 LIBS="$ac_save_LIBS"
6752 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6753 echo "$ac_t""yes" 1>&6
6754 LIBS="-lgetloadavg $LIBS"
6755 else
6756 echo "$ac_t""no" 1>&6
6757 LIBS="$ac_getloadavg_LIBS"
6762 # Make sure it is really in the library, if we think we found it.
6763 for ac_func in getloadavg
6765 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6766 echo "configure:6767: checking for $ac_func" >&5
6767 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6768 echo $ac_n "(cached) $ac_c" 1>&6
6769 else
6770 cat > conftest.$ac_ext <<EOF
6771 #line 6772 "configure"
6772 #include "confdefs.h"
6773 /* System header to define __stub macros and hopefully few prototypes,
6774 which can conflict with char $ac_func(); below. */
6775 #include <assert.h>
6776 /* Override any gcc2 internal prototype to avoid an error. */
6777 /* We use char because int might match the return type of a gcc2
6778 builtin and then its argument prototype would still apply. */
6779 char $ac_func();
6781 int main() {
6783 /* The GNU C library defines this for functions which it implements
6784 to always fail with ENOSYS. Some functions are actually named
6785 something starting with __ and the normal name is an alias. */
6786 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6787 choke me
6788 #else
6789 $ac_func();
6790 #endif
6792 ; return 0; }
6794 if { (eval echo configure:6795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6795 rm -rf conftest*
6796 eval "ac_cv_func_$ac_func=yes"
6797 else
6798 echo "configure: failed program was:" >&5
6799 cat conftest.$ac_ext >&5
6800 rm -rf conftest*
6801 eval "ac_cv_func_$ac_func=no"
6803 rm -f conftest*
6806 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6807 echo "$ac_t""yes" 1>&6
6808 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6809 cat >> confdefs.h <<EOF
6810 #define $ac_tr_func 1
6813 else
6814 echo "$ac_t""no" 1>&6
6815 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
6817 done
6821 if test $ac_cv_func_getloadavg = yes; then
6822 cat >> confdefs.h <<\EOF
6823 #define HAVE_GETLOADAVG 1
6826 ac_have_func=yes
6827 else
6828 # Figure out what our getloadavg.c needs.
6829 ac_have_func=no
6830 ac_safe=`echo "sys/dg_sys_info.h" | sed 'y%./+-%__p_%'`
6831 echo $ac_n "checking for sys/dg_sys_info.h""... $ac_c" 1>&6
6832 echo "configure:6833: checking for sys/dg_sys_info.h" >&5
6833 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6834 echo $ac_n "(cached) $ac_c" 1>&6
6835 else
6836 cat > conftest.$ac_ext <<EOF
6837 #line 6838 "configure"
6838 #include "confdefs.h"
6839 #include <sys/dg_sys_info.h>
6841 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6842 { (eval echo configure:6843: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6843 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6844 if test -z "$ac_err"; then
6845 rm -rf conftest*
6846 eval "ac_cv_header_$ac_safe=yes"
6847 else
6848 echo "$ac_err" >&5
6849 echo "configure: failed program was:" >&5
6850 cat conftest.$ac_ext >&5
6851 rm -rf conftest*
6852 eval "ac_cv_header_$ac_safe=no"
6854 rm -f conftest*
6856 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6857 echo "$ac_t""yes" 1>&6
6858 ac_have_func=yes; cat >> confdefs.h <<\EOF
6859 #define DGUX 1
6862 echo $ac_n "checking for dg_sys_info in -ldgc""... $ac_c" 1>&6
6863 echo "configure:6864: checking for dg_sys_info in -ldgc" >&5
6864 ac_lib_var=`echo dgc'_'dg_sys_info | sed 'y%./+-%__p_%'`
6865 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6866 echo $ac_n "(cached) $ac_c" 1>&6
6867 else
6868 ac_save_LIBS="$LIBS"
6869 LIBS="-ldgc $LIBS"
6870 cat > conftest.$ac_ext <<EOF
6871 #line 6872 "configure"
6872 #include "confdefs.h"
6873 /* Override any gcc2 internal prototype to avoid an error. */
6874 /* We use char because int might match the return type of a gcc2
6875 builtin and then its argument prototype would still apply. */
6876 char dg_sys_info();
6878 int main() {
6879 dg_sys_info()
6880 ; return 0; }
6882 if { (eval echo configure:6883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6883 rm -rf conftest*
6884 eval "ac_cv_lib_$ac_lib_var=yes"
6885 else
6886 echo "configure: failed program was:" >&5
6887 cat conftest.$ac_ext >&5
6888 rm -rf conftest*
6889 eval "ac_cv_lib_$ac_lib_var=no"
6891 rm -f conftest*
6892 LIBS="$ac_save_LIBS"
6895 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6896 echo "$ac_t""yes" 1>&6
6897 ac_tr_lib=HAVE_LIB`echo dgc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6898 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6899 cat >> confdefs.h <<EOF
6900 #define $ac_tr_lib 1
6903 LIBS="-ldgc $LIBS"
6905 else
6906 echo "$ac_t""no" 1>&6
6909 else
6910 echo "$ac_t""no" 1>&6
6914 # We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
6915 # uses stabs), but it is still SVR4. We cannot check for <elf.h> because
6916 # Irix 4.0.5F has the header but not the library.
6917 if test $ac_have_func = no && test $ac_cv_lib_elf_elf_begin = yes; then
6918 ac_have_func=yes; cat >> confdefs.h <<\EOF
6919 #define SVR4 1
6924 if test $ac_have_func = no; then
6925 ac_safe=`echo "inq_stats/cpustats.h" | sed 'y%./+-%__p_%'`
6926 echo $ac_n "checking for inq_stats/cpustats.h""... $ac_c" 1>&6
6927 echo "configure:6928: checking for inq_stats/cpustats.h" >&5
6928 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6929 echo $ac_n "(cached) $ac_c" 1>&6
6930 else
6931 cat > conftest.$ac_ext <<EOF
6932 #line 6933 "configure"
6933 #include "confdefs.h"
6934 #include <inq_stats/cpustats.h>
6936 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6937 { (eval echo configure:6938: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6938 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6939 if test -z "$ac_err"; then
6940 rm -rf conftest*
6941 eval "ac_cv_header_$ac_safe=yes"
6942 else
6943 echo "$ac_err" >&5
6944 echo "configure: failed program was:" >&5
6945 cat conftest.$ac_ext >&5
6946 rm -rf conftest*
6947 eval "ac_cv_header_$ac_safe=no"
6949 rm -f conftest*
6951 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6952 echo "$ac_t""yes" 1>&6
6953 ac_have_func=yes; cat >> confdefs.h <<\EOF
6954 #define UMAX 1
6957 cat >> confdefs.h <<\EOF
6958 #define UMAX4_3 1
6961 else
6962 echo "$ac_t""no" 1>&6
6967 if test $ac_have_func = no; then
6968 ac_safe=`echo "sys/cpustats.h" | sed 'y%./+-%__p_%'`
6969 echo $ac_n "checking for sys/cpustats.h""... $ac_c" 1>&6
6970 echo "configure:6971: checking for sys/cpustats.h" >&5
6971 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6972 echo $ac_n "(cached) $ac_c" 1>&6
6973 else
6974 cat > conftest.$ac_ext <<EOF
6975 #line 6976 "configure"
6976 #include "confdefs.h"
6977 #include <sys/cpustats.h>
6979 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6980 { (eval echo configure:6981: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6981 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6982 if test -z "$ac_err"; then
6983 rm -rf conftest*
6984 eval "ac_cv_header_$ac_safe=yes"
6985 else
6986 echo "$ac_err" >&5
6987 echo "configure: failed program was:" >&5
6988 cat conftest.$ac_ext >&5
6989 rm -rf conftest*
6990 eval "ac_cv_header_$ac_safe=no"
6992 rm -f conftest*
6994 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6995 echo "$ac_t""yes" 1>&6
6996 ac_have_func=yes; cat >> confdefs.h <<\EOF
6997 #define UMAX 1
7000 else
7001 echo "$ac_t""no" 1>&6
7006 if test $ac_have_func = no; then
7007 for ac_hdr in mach/mach.h
7009 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7010 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7011 echo "configure:7012: checking for $ac_hdr" >&5
7012 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7013 echo $ac_n "(cached) $ac_c" 1>&6
7014 else
7015 cat > conftest.$ac_ext <<EOF
7016 #line 7017 "configure"
7017 #include "confdefs.h"
7018 #include <$ac_hdr>
7020 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7021 { (eval echo configure:7022: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7022 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7023 if test -z "$ac_err"; then
7024 rm -rf conftest*
7025 eval "ac_cv_header_$ac_safe=yes"
7026 else
7027 echo "$ac_err" >&5
7028 echo "configure: failed program was:" >&5
7029 cat conftest.$ac_ext >&5
7030 rm -rf conftest*
7031 eval "ac_cv_header_$ac_safe=no"
7033 rm -f conftest*
7035 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7036 echo "$ac_t""yes" 1>&6
7037 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7038 cat >> confdefs.h <<EOF
7039 #define $ac_tr_hdr 1
7042 else
7043 echo "$ac_t""no" 1>&6
7045 done
7049 ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'`
7050 echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
7051 echo "configure:7052: checking for nlist.h" >&5
7052 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7053 echo $ac_n "(cached) $ac_c" 1>&6
7054 else
7055 cat > conftest.$ac_ext <<EOF
7056 #line 7057 "configure"
7057 #include "confdefs.h"
7058 #include <nlist.h>
7060 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7061 { (eval echo configure:7062: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7062 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7063 if test -z "$ac_err"; then
7064 rm -rf conftest*
7065 eval "ac_cv_header_$ac_safe=yes"
7066 else
7067 echo "$ac_err" >&5
7068 echo "configure: failed program was:" >&5
7069 cat conftest.$ac_ext >&5
7070 rm -rf conftest*
7071 eval "ac_cv_header_$ac_safe=no"
7073 rm -f conftest*
7075 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7076 echo "$ac_t""yes" 1>&6
7077 cat >> confdefs.h <<\EOF
7078 #define NLIST_STRUCT 1
7081 echo $ac_n "checking for n_un in struct nlist""... $ac_c" 1>&6
7082 echo "configure:7083: checking for n_un in struct nlist" >&5
7083 if eval "test \"`echo '$''{'ac_cv_struct_nlist_n_un'+set}'`\" = set"; then
7084 echo $ac_n "(cached) $ac_c" 1>&6
7085 else
7086 cat > conftest.$ac_ext <<EOF
7087 #line 7088 "configure"
7088 #include "confdefs.h"
7089 #include <nlist.h>
7090 int main() {
7091 struct nlist n; n.n_un.n_name = 0;
7092 ; return 0; }
7094 if { (eval echo configure:7095: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7095 rm -rf conftest*
7096 ac_cv_struct_nlist_n_un=yes
7097 else
7098 echo "configure: failed program was:" >&5
7099 cat conftest.$ac_ext >&5
7100 rm -rf conftest*
7101 ac_cv_struct_nlist_n_un=no
7103 rm -f conftest*
7106 echo "$ac_t""$ac_cv_struct_nlist_n_un" 1>&6
7107 if test $ac_cv_struct_nlist_n_un = yes; then
7108 cat >> confdefs.h <<\EOF
7109 #define NLIST_NAME_UNION 1
7114 else
7115 echo "$ac_t""no" 1>&6
7117 fi # Do not have getloadavg in system libraries.
7119 # Some definitions of getloadavg require that the program be installed setgid.
7120 echo $ac_n "checking whether getloadavg requires setgid""... $ac_c" 1>&6
7121 echo "configure:7122: checking whether getloadavg requires setgid" >&5
7122 if eval "test \"`echo '$''{'ac_cv_func_getloadavg_setgid'+set}'`\" = set"; then
7123 echo $ac_n "(cached) $ac_c" 1>&6
7124 else
7125 cat > conftest.$ac_ext <<EOF
7126 #line 7127 "configure"
7127 #include "confdefs.h"
7128 #include "$srcdir/getloadavg.c"
7129 #ifdef LDAV_PRIVILEGED
7130 Yowza Am I SETGID yet
7131 #endif
7133 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7134 egrep "Yowza Am I SETGID yet" >/dev/null 2>&1; then
7135 rm -rf conftest*
7136 ac_cv_func_getloadavg_setgid=yes
7137 else
7138 rm -rf conftest*
7139 ac_cv_func_getloadavg_setgid=no
7141 rm -f conftest*
7145 echo "$ac_t""$ac_cv_func_getloadavg_setgid" 1>&6
7146 if test $ac_cv_func_getloadavg_setgid = yes; then
7147 NEED_SETGID=true; cat >> confdefs.h <<\EOF
7148 #define GETLOADAVG_PRIVILEGED 1
7151 else
7152 NEED_SETGID=false
7155 if test $ac_cv_func_getloadavg_setgid = yes; then
7156 echo $ac_n "checking group of /dev/kmem""... $ac_c" 1>&6
7157 echo "configure:7158: checking group of /dev/kmem" >&5
7158 if eval "test \"`echo '$''{'ac_cv_group_kmem'+set}'`\" = set"; then
7159 echo $ac_n "(cached) $ac_c" 1>&6
7160 else
7161 # On Solaris, /dev/kmem is a symlink. Get info on the real file.
7162 ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null`
7163 # If we got an error (system does not support symlinks), try without -L.
7164 test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem`
7165 ac_cv_group_kmem=`echo $ac_ls_output \
7166 | sed -ne 's/[ ][ ]*/ /g;
7167 s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/;
7168 / /s/.* //;p;'`
7172 echo "$ac_t""$ac_cv_group_kmem" 1>&6
7173 KMEM_GROUP=$ac_cv_group_kmem
7177 echo $ac_n "checking for _LARGEFILE_SOURCE value needed for large files""... $ac_c" 1>&6
7178 echo "configure:7179: checking for _LARGEFILE_SOURCE value needed for large files" >&5
7179 if eval "test \"`echo '$''{'ac_cv_sys_largefile_source'+set}'`\" = set"; then
7180 echo $ac_n "(cached) $ac_c" 1>&6
7181 else
7182 ac_cv_sys_largefile_source=no
7183 cat > conftest.$ac_ext <<EOF
7184 #line 7185 "configure"
7185 #include "confdefs.h"
7186 #include <stdio.h>
7187 int main() {
7188 return !fseeko;
7189 ; return 0; }
7191 if { (eval echo configure:7192: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7193 else
7194 echo "configure: failed program was:" >&5
7195 cat conftest.$ac_ext >&5
7196 rm -rf conftest*
7197 cat > conftest.$ac_ext <<EOF
7198 #line 7199 "configure"
7199 #include "confdefs.h"
7200 #define _LARGEFILE_SOURCE 1
7201 #include <stdio.h>
7203 int main() {
7204 return !fseeko;
7205 ; return 0; }
7207 if { (eval echo configure:7208: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7208 rm -rf conftest*
7209 ac_cv_sys_largefile_source=1
7210 else
7211 echo "configure: failed program was:" >&5
7212 cat conftest.$ac_ext >&5
7214 rm -f conftest*
7216 rm -f conftest*
7219 echo "$ac_t""$ac_cv_sys_largefile_source" 1>&6
7220 if test "$ac_cv_sys_largefile_source" != no; then
7221 cat >> confdefs.h <<EOF
7222 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
7226 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
7227 # in glibc 2.1.3, but that breaks too many other things.
7228 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
7230 echo $ac_n "checking for fseeko""... $ac_c" 1>&6
7231 echo "configure:7232: checking for fseeko" >&5
7232 if eval "test \"`echo '$''{'ac_cv_func_fseeko'+set}'`\" = set"; then
7233 echo $ac_n "(cached) $ac_c" 1>&6
7234 else
7235 ac_cv_func_fseeko=no
7236 cat > conftest.$ac_ext <<EOF
7237 #line 7238 "configure"
7238 #include "confdefs.h"
7239 #include <stdio.h>
7240 int main() {
7241 return fseeko && fseeko (stdin, 0, 0);
7242 ; return 0; }
7244 if { (eval echo configure:7245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7245 rm -rf conftest*
7246 ac_cv_func_fseeko=yes
7247 else
7248 echo "configure: failed program was:" >&5
7249 cat conftest.$ac_ext >&5
7251 rm -f conftest*
7254 echo "$ac_t""$ac_cv_func_fseeko" 1>&6
7255 if test $ac_cv_func_fseeko != no; then
7256 cat >> confdefs.h <<\EOF
7257 #define HAVE_FSEEKO 1
7262 # UNIX98 PTYs.
7263 for ac_func in grantpt
7265 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7266 echo "configure:7267: checking for $ac_func" >&5
7267 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7268 echo $ac_n "(cached) $ac_c" 1>&6
7269 else
7270 cat > conftest.$ac_ext <<EOF
7271 #line 7272 "configure"
7272 #include "confdefs.h"
7273 /* System header to define __stub macros and hopefully few prototypes,
7274 which can conflict with char $ac_func(); below. */
7275 #include <assert.h>
7276 /* Override any gcc2 internal prototype to avoid an error. */
7277 /* We use char because int might match the return type of a gcc2
7278 builtin and then its argument prototype would still apply. */
7279 char $ac_func();
7281 int main() {
7283 /* The GNU C library defines this for functions which it implements
7284 to always fail with ENOSYS. Some functions are actually named
7285 something starting with __ and the normal name is an alias. */
7286 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7287 choke me
7288 #else
7289 $ac_func();
7290 #endif
7292 ; return 0; }
7294 if { (eval echo configure:7295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7295 rm -rf conftest*
7296 eval "ac_cv_func_$ac_func=yes"
7297 else
7298 echo "configure: failed program was:" >&5
7299 cat conftest.$ac_ext >&5
7300 rm -rf conftest*
7301 eval "ac_cv_func_$ac_func=no"
7303 rm -f conftest*
7306 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7307 echo "$ac_t""yes" 1>&6
7308 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7309 cat >> confdefs.h <<EOF
7310 #define $ac_tr_func 1
7313 else
7314 echo "$ac_t""no" 1>&6
7316 done
7319 # PTY-related GNU extensions.
7320 for ac_func in getpt
7322 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7323 echo "configure:7324: checking for $ac_func" >&5
7324 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7325 echo $ac_n "(cached) $ac_c" 1>&6
7326 else
7327 cat > conftest.$ac_ext <<EOF
7328 #line 7329 "configure"
7329 #include "confdefs.h"
7330 /* System header to define __stub macros and hopefully few prototypes,
7331 which can conflict with char $ac_func(); below. */
7332 #include <assert.h>
7333 /* Override any gcc2 internal prototype to avoid an error. */
7334 /* We use char because int might match the return type of a gcc2
7335 builtin and then its argument prototype would still apply. */
7336 char $ac_func();
7338 int main() {
7340 /* The GNU C library defines this for functions which it implements
7341 to always fail with ENOSYS. Some functions are actually named
7342 something starting with __ and the normal name is an alias. */
7343 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7344 choke me
7345 #else
7346 $ac_func();
7347 #endif
7349 ; return 0; }
7351 if { (eval echo configure:7352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7352 rm -rf conftest*
7353 eval "ac_cv_func_$ac_func=yes"
7354 else
7355 echo "configure: failed program was:" >&5
7356 cat conftest.$ac_ext >&5
7357 rm -rf conftest*
7358 eval "ac_cv_func_$ac_func=no"
7360 rm -f conftest*
7363 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7364 echo "$ac_t""yes" 1>&6
7365 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7366 cat >> confdefs.h <<EOF
7367 #define $ac_tr_func 1
7370 else
7371 echo "$ac_t""no" 1>&6
7373 done
7376 # Check this now, so that we will NOT find the above functions in ncurses.
7377 # That is because we have not set up to link ncurses in lib-src.
7378 # It's better to believe a function is not available
7379 # than to expect to find it in ncurses.
7380 echo $ac_n "checking for tparm in -lncurses""... $ac_c" 1>&6
7381 echo "configure:7382: checking for tparm in -lncurses" >&5
7382 ac_lib_var=`echo ncurses'_'tparm | sed 'y%./+-%__p_%'`
7383 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7384 echo $ac_n "(cached) $ac_c" 1>&6
7385 else
7386 ac_save_LIBS="$LIBS"
7387 LIBS="-lncurses $LIBS"
7388 cat > conftest.$ac_ext <<EOF
7389 #line 7390 "configure"
7390 #include "confdefs.h"
7391 /* Override any gcc2 internal prototype to avoid an error. */
7392 /* We use char because int might match the return type of a gcc2
7393 builtin and then its argument prototype would still apply. */
7394 char tparm();
7396 int main() {
7397 tparm()
7398 ; return 0; }
7400 if { (eval echo configure:7401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7401 rm -rf conftest*
7402 eval "ac_cv_lib_$ac_lib_var=yes"
7403 else
7404 echo "configure: failed program was:" >&5
7405 cat conftest.$ac_ext >&5
7406 rm -rf conftest*
7407 eval "ac_cv_lib_$ac_lib_var=no"
7409 rm -f conftest*
7410 LIBS="$ac_save_LIBS"
7413 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7414 echo "$ac_t""yes" 1>&6
7415 ac_tr_lib=HAVE_LIB`echo ncurses | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7416 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7417 cat >> confdefs.h <<EOF
7418 #define $ac_tr_lib 1
7421 LIBS="-lncurses $LIBS"
7423 else
7424 echo "$ac_t""no" 1>&6
7428 # Do we need the Hesiod library to provide the support routines?
7429 if test "$with_hesiod" = yes ; then
7430 # Don't set $LIBS here -- see comments above.
7431 resolv=no
7432 echo $ac_n "checking for res_send""... $ac_c" 1>&6
7433 echo "configure:7434: checking for res_send" >&5
7434 if eval "test \"`echo '$''{'ac_cv_func_res_send'+set}'`\" = set"; then
7435 echo $ac_n "(cached) $ac_c" 1>&6
7436 else
7437 cat > conftest.$ac_ext <<EOF
7438 #line 7439 "configure"
7439 #include "confdefs.h"
7440 /* System header to define __stub macros and hopefully few prototypes,
7441 which can conflict with char res_send(); below. */
7442 #include <assert.h>
7443 /* Override any gcc2 internal prototype to avoid an error. */
7444 /* We use char because int might match the return type of a gcc2
7445 builtin and then its argument prototype would still apply. */
7446 char res_send();
7448 int main() {
7450 /* The GNU C library defines this for functions which it implements
7451 to always fail with ENOSYS. Some functions are actually named
7452 something starting with __ and the normal name is an alias. */
7453 #if defined (__stub_res_send) || defined (__stub___res_send)
7454 choke me
7455 #else
7456 res_send();
7457 #endif
7459 ; return 0; }
7461 if { (eval echo configure:7462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7462 rm -rf conftest*
7463 eval "ac_cv_func_res_send=yes"
7464 else
7465 echo "configure: failed program was:" >&5
7466 cat conftest.$ac_ext >&5
7467 rm -rf conftest*
7468 eval "ac_cv_func_res_send=no"
7470 rm -f conftest*
7473 if eval "test \"`echo '$ac_cv_func_'res_send`\" = yes"; then
7474 echo "$ac_t""yes" 1>&6
7476 else
7477 echo "$ac_t""no" 1>&6
7478 echo $ac_n "checking for __res_send""... $ac_c" 1>&6
7479 echo "configure:7480: checking for __res_send" >&5
7480 if eval "test \"`echo '$''{'ac_cv_func___res_send'+set}'`\" = set"; then
7481 echo $ac_n "(cached) $ac_c" 1>&6
7482 else
7483 cat > conftest.$ac_ext <<EOF
7484 #line 7485 "configure"
7485 #include "confdefs.h"
7486 /* System header to define __stub macros and hopefully few prototypes,
7487 which can conflict with char __res_send(); below. */
7488 #include <assert.h>
7489 /* Override any gcc2 internal prototype to avoid an error. */
7490 /* We use char because int might match the return type of a gcc2
7491 builtin and then its argument prototype would still apply. */
7492 char __res_send();
7494 int main() {
7496 /* The GNU C library defines this for functions which it implements
7497 to always fail with ENOSYS. Some functions are actually named
7498 something starting with __ and the normal name is an alias. */
7499 #if defined (__stub___res_send) || defined (__stub_____res_send)
7500 choke me
7501 #else
7502 __res_send();
7503 #endif
7505 ; return 0; }
7507 if { (eval echo configure:7508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7508 rm -rf conftest*
7509 eval "ac_cv_func___res_send=yes"
7510 else
7511 echo "configure: failed program was:" >&5
7512 cat conftest.$ac_ext >&5
7513 rm -rf conftest*
7514 eval "ac_cv_func___res_send=no"
7516 rm -f conftest*
7519 if eval "test \"`echo '$ac_cv_func_'__res_send`\" = yes"; then
7520 echo "$ac_t""yes" 1>&6
7522 else
7523 echo "$ac_t""no" 1>&6
7524 echo $ac_n "checking for res_send in -lresolv""... $ac_c" 1>&6
7525 echo "configure:7526: checking for res_send in -lresolv" >&5
7526 ac_lib_var=`echo resolv'_'res_send | sed 'y%./+-%__p_%'`
7527 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7528 echo $ac_n "(cached) $ac_c" 1>&6
7529 else
7530 ac_save_LIBS="$LIBS"
7531 LIBS="-lresolv $LIBS"
7532 cat > conftest.$ac_ext <<EOF
7533 #line 7534 "configure"
7534 #include "confdefs.h"
7535 /* Override any gcc2 internal prototype to avoid an error. */
7536 /* We use char because int might match the return type of a gcc2
7537 builtin and then its argument prototype would still apply. */
7538 char res_send();
7540 int main() {
7541 res_send()
7542 ; return 0; }
7544 if { (eval echo configure:7545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7545 rm -rf conftest*
7546 eval "ac_cv_lib_$ac_lib_var=yes"
7547 else
7548 echo "configure: failed program was:" >&5
7549 cat conftest.$ac_ext >&5
7550 rm -rf conftest*
7551 eval "ac_cv_lib_$ac_lib_var=no"
7553 rm -f conftest*
7554 LIBS="$ac_save_LIBS"
7557 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7558 echo "$ac_t""yes" 1>&6
7559 resolv=yes
7560 else
7561 echo "$ac_t""no" 1>&6
7562 echo $ac_n "checking for __res_send in -lresolv""... $ac_c" 1>&6
7563 echo "configure:7564: checking for __res_send in -lresolv" >&5
7564 ac_lib_var=`echo resolv'_'__res_send | sed 'y%./+-%__p_%'`
7565 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7566 echo $ac_n "(cached) $ac_c" 1>&6
7567 else
7568 ac_save_LIBS="$LIBS"
7569 LIBS="-lresolv $LIBS"
7570 cat > conftest.$ac_ext <<EOF
7571 #line 7572 "configure"
7572 #include "confdefs.h"
7573 /* Override any gcc2 internal prototype to avoid an error. */
7574 /* We use char because int might match the return type of a gcc2
7575 builtin and then its argument prototype would still apply. */
7576 char __res_send();
7578 int main() {
7579 __res_send()
7580 ; return 0; }
7582 if { (eval echo configure:7583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7583 rm -rf conftest*
7584 eval "ac_cv_lib_$ac_lib_var=yes"
7585 else
7586 echo "configure: failed program was:" >&5
7587 cat conftest.$ac_ext >&5
7588 rm -rf conftest*
7589 eval "ac_cv_lib_$ac_lib_var=no"
7591 rm -f conftest*
7592 LIBS="$ac_save_LIBS"
7595 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7596 echo "$ac_t""yes" 1>&6
7597 resolv=yes
7598 else
7599 echo "$ac_t""no" 1>&6
7608 if test "$resolv" = yes ; then
7609 RESOLVLIB=-lresolv
7610 cat >> confdefs.h <<\EOF
7611 #define HAVE_LIBRESOLV 1
7614 else
7615 RESOLVLIB=
7617 echo $ac_n "checking for hes_getmailhost""... $ac_c" 1>&6
7618 echo "configure:7619: checking for hes_getmailhost" >&5
7619 if eval "test \"`echo '$''{'ac_cv_func_hes_getmailhost'+set}'`\" = set"; then
7620 echo $ac_n "(cached) $ac_c" 1>&6
7621 else
7622 cat > conftest.$ac_ext <<EOF
7623 #line 7624 "configure"
7624 #include "confdefs.h"
7625 /* System header to define __stub macros and hopefully few prototypes,
7626 which can conflict with char hes_getmailhost(); below. */
7627 #include <assert.h>
7628 /* Override any gcc2 internal prototype to avoid an error. */
7629 /* We use char because int might match the return type of a gcc2
7630 builtin and then its argument prototype would still apply. */
7631 char hes_getmailhost();
7633 int main() {
7635 /* The GNU C library defines this for functions which it implements
7636 to always fail with ENOSYS. Some functions are actually named
7637 something starting with __ and the normal name is an alias. */
7638 #if defined (__stub_hes_getmailhost) || defined (__stub___hes_getmailhost)
7639 choke me
7640 #else
7641 hes_getmailhost();
7642 #endif
7644 ; return 0; }
7646 if { (eval echo configure:7647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7647 rm -rf conftest*
7648 eval "ac_cv_func_hes_getmailhost=yes"
7649 else
7650 echo "configure: failed program was:" >&5
7651 cat conftest.$ac_ext >&5
7652 rm -rf conftest*
7653 eval "ac_cv_func_hes_getmailhost=no"
7655 rm -f conftest*
7658 if eval "test \"`echo '$ac_cv_func_'hes_getmailhost`\" = yes"; then
7659 echo "$ac_t""yes" 1>&6
7661 else
7662 echo "$ac_t""no" 1>&6
7663 echo $ac_n "checking for hes_getmailhost in -lhesiod""... $ac_c" 1>&6
7664 echo "configure:7665: checking for hes_getmailhost in -lhesiod" >&5
7665 ac_lib_var=`echo hesiod'_'hes_getmailhost | sed 'y%./+-%__p_%'`
7666 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7667 echo $ac_n "(cached) $ac_c" 1>&6
7668 else
7669 ac_save_LIBS="$LIBS"
7670 LIBS="-lhesiod $RESOLVLIB $LIBS"
7671 cat > conftest.$ac_ext <<EOF
7672 #line 7673 "configure"
7673 #include "confdefs.h"
7674 /* Override any gcc2 internal prototype to avoid an error. */
7675 /* We use char because int might match the return type of a gcc2
7676 builtin and then its argument prototype would still apply. */
7677 char hes_getmailhost();
7679 int main() {
7680 hes_getmailhost()
7681 ; return 0; }
7683 if { (eval echo configure:7684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7684 rm -rf conftest*
7685 eval "ac_cv_lib_$ac_lib_var=yes"
7686 else
7687 echo "configure: failed program was:" >&5
7688 cat conftest.$ac_ext >&5
7689 rm -rf conftest*
7690 eval "ac_cv_lib_$ac_lib_var=no"
7692 rm -f conftest*
7693 LIBS="$ac_save_LIBS"
7696 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7697 echo "$ac_t""yes" 1>&6
7698 cat >> confdefs.h <<\EOF
7699 #define HAVE_LIBHESIOD 1
7702 else
7703 echo "$ac_t""no" 1>&6
7711 # These tell us which Kerberos-related libraries to use.
7712 if test "${with_kerberos+set}" = set; then
7713 echo $ac_n "checking for com_err in -lcom_err""... $ac_c" 1>&6
7714 echo "configure:7715: checking for com_err in -lcom_err" >&5
7715 ac_lib_var=`echo com_err'_'com_err | 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="-lcom_err $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 com_err();
7729 int main() {
7730 com_err()
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 com_err | 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="-lcom_err $LIBS"
7756 else
7757 echo "$ac_t""no" 1>&6
7760 echo $ac_n "checking for mit_des_cbc_encrypt in -lk5crypto""... $ac_c" 1>&6
7761 echo "configure:7762: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
7762 ac_lib_var=`echo k5crypto'_'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="-lk5crypto $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 k5crypto | 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="-lk5crypto $LIBS"
7803 else
7804 echo "$ac_t""no" 1>&6
7807 echo $ac_n "checking for mit_des_cbc_encrypt in -lcrypto""... $ac_c" 1>&6
7808 echo "configure:7809: checking for mit_des_cbc_encrypt in -lcrypto" >&5
7809 ac_lib_var=`echo crypto'_'mit_des_cbc_encrypt | 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="-lcrypto $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 mit_des_cbc_encrypt();
7823 int main() {
7824 mit_des_cbc_encrypt()
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 crypto | 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="-lcrypto $LIBS"
7850 else
7851 echo "$ac_t""no" 1>&6
7854 echo $ac_n "checking for krb5_init_context in -lkrb5""... $ac_c" 1>&6
7855 echo "configure:7856: checking for krb5_init_context in -lkrb5" >&5
7856 ac_lib_var=`echo krb5'_'krb5_init_context | sed 'y%./+-%__p_%'`
7857 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7858 echo $ac_n "(cached) $ac_c" 1>&6
7859 else
7860 ac_save_LIBS="$LIBS"
7861 LIBS="-lkrb5 $LIBS"
7862 cat > conftest.$ac_ext <<EOF
7863 #line 7864 "configure"
7864 #include "confdefs.h"
7865 /* Override any gcc2 internal prototype to avoid an error. */
7866 /* We use char because int might match the return type of a gcc2
7867 builtin and then its argument prototype would still apply. */
7868 char krb5_init_context();
7870 int main() {
7871 krb5_init_context()
7872 ; return 0; }
7874 if { (eval echo configure:7875: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7875 rm -rf conftest*
7876 eval "ac_cv_lib_$ac_lib_var=yes"
7877 else
7878 echo "configure: failed program was:" >&5
7879 cat conftest.$ac_ext >&5
7880 rm -rf conftest*
7881 eval "ac_cv_lib_$ac_lib_var=no"
7883 rm -f conftest*
7884 LIBS="$ac_save_LIBS"
7887 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7888 echo "$ac_t""yes" 1>&6
7889 ac_tr_lib=HAVE_LIB`echo krb5 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7890 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7891 cat >> confdefs.h <<EOF
7892 #define $ac_tr_lib 1
7895 LIBS="-lkrb5 $LIBS"
7897 else
7898 echo "$ac_t""no" 1>&6
7901 if test "${with_kerberos5+set}" != set; then
7902 echo $ac_n "checking for des_cbc_encrypt in -ldes425""... $ac_c" 1>&6
7903 echo "configure:7904: checking for des_cbc_encrypt in -ldes425" >&5
7904 ac_lib_var=`echo des425'_'des_cbc_encrypt | sed 'y%./+-%__p_%'`
7905 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7906 echo $ac_n "(cached) $ac_c" 1>&6
7907 else
7908 ac_save_LIBS="$LIBS"
7909 LIBS="-ldes425 $LIBS"
7910 cat > conftest.$ac_ext <<EOF
7911 #line 7912 "configure"
7912 #include "confdefs.h"
7913 /* Override any gcc2 internal prototype to avoid an error. */
7914 /* We use char because int might match the return type of a gcc2
7915 builtin and then its argument prototype would still apply. */
7916 char des_cbc_encrypt();
7918 int main() {
7919 des_cbc_encrypt()
7920 ; return 0; }
7922 if { (eval echo configure:7923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7923 rm -rf conftest*
7924 eval "ac_cv_lib_$ac_lib_var=yes"
7925 else
7926 echo "configure: failed program was:" >&5
7927 cat conftest.$ac_ext >&5
7928 rm -rf conftest*
7929 eval "ac_cv_lib_$ac_lib_var=no"
7931 rm -f conftest*
7932 LIBS="$ac_save_LIBS"
7935 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7936 echo "$ac_t""yes" 1>&6
7937 ac_tr_lib=HAVE_LIB`echo des425 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7938 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7939 cat >> confdefs.h <<EOF
7940 #define $ac_tr_lib 1
7943 LIBS="-ldes425 $LIBS"
7945 else
7946 echo "$ac_t""no" 1>&6
7947 echo $ac_n "checking for des_cbc_encrypt in -ldes""... $ac_c" 1>&6
7948 echo "configure:7949: checking for des_cbc_encrypt in -ldes" >&5
7949 ac_lib_var=`echo des'_'des_cbc_encrypt | sed 'y%./+-%__p_%'`
7950 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7951 echo $ac_n "(cached) $ac_c" 1>&6
7952 else
7953 ac_save_LIBS="$LIBS"
7954 LIBS="-ldes $LIBS"
7955 cat > conftest.$ac_ext <<EOF
7956 #line 7957 "configure"
7957 #include "confdefs.h"
7958 /* Override any gcc2 internal prototype to avoid an error. */
7959 /* We use char because int might match the return type of a gcc2
7960 builtin and then its argument prototype would still apply. */
7961 char des_cbc_encrypt();
7963 int main() {
7964 des_cbc_encrypt()
7965 ; return 0; }
7967 if { (eval echo configure:7968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7968 rm -rf conftest*
7969 eval "ac_cv_lib_$ac_lib_var=yes"
7970 else
7971 echo "configure: failed program was:" >&5
7972 cat conftest.$ac_ext >&5
7973 rm -rf conftest*
7974 eval "ac_cv_lib_$ac_lib_var=no"
7976 rm -f conftest*
7977 LIBS="$ac_save_LIBS"
7980 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7981 echo "$ac_t""yes" 1>&6
7982 ac_tr_lib=HAVE_LIB`echo des | sed -e 's/^a-zA-Z0-9_/_/g' \
7983 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7984 cat >> confdefs.h <<EOF
7985 #define $ac_tr_lib 1
7988 LIBS="-ldes $LIBS"
7990 else
7991 echo "$ac_t""no" 1>&6
7996 echo $ac_n "checking for krb_get_cred in -lkrb4""... $ac_c" 1>&6
7997 echo "configure:7998: checking for krb_get_cred in -lkrb4" >&5
7998 ac_lib_var=`echo krb4'_'krb_get_cred | sed 'y%./+-%__p_%'`
7999 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8000 echo $ac_n "(cached) $ac_c" 1>&6
8001 else
8002 ac_save_LIBS="$LIBS"
8003 LIBS="-lkrb4 $LIBS"
8004 cat > conftest.$ac_ext <<EOF
8005 #line 8006 "configure"
8006 #include "confdefs.h"
8007 /* Override any gcc2 internal prototype to avoid an error. */
8008 /* We use char because int might match the return type of a gcc2
8009 builtin and then its argument prototype would still apply. */
8010 char krb_get_cred();
8012 int main() {
8013 krb_get_cred()
8014 ; return 0; }
8016 if { (eval echo configure:8017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8017 rm -rf conftest*
8018 eval "ac_cv_lib_$ac_lib_var=yes"
8019 else
8020 echo "configure: failed program was:" >&5
8021 cat conftest.$ac_ext >&5
8022 rm -rf conftest*
8023 eval "ac_cv_lib_$ac_lib_var=no"
8025 rm -f conftest*
8026 LIBS="$ac_save_LIBS"
8029 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8030 echo "$ac_t""yes" 1>&6
8031 ac_tr_lib=HAVE_LIB`echo krb4 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8032 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8033 cat >> confdefs.h <<EOF
8034 #define $ac_tr_lib 1
8037 LIBS="-lkrb4 $LIBS"
8039 else
8040 echo "$ac_t""no" 1>&6
8041 echo $ac_n "checking for krb_get_cred in -lkrb""... $ac_c" 1>&6
8042 echo "configure:8043: checking for krb_get_cred in -lkrb" >&5
8043 ac_lib_var=`echo krb'_'krb_get_cred | sed 'y%./+-%__p_%'`
8044 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8045 echo $ac_n "(cached) $ac_c" 1>&6
8046 else
8047 ac_save_LIBS="$LIBS"
8048 LIBS="-lkrb $LIBS"
8049 cat > conftest.$ac_ext <<EOF
8050 #line 8051 "configure"
8051 #include "confdefs.h"
8052 /* Override any gcc2 internal prototype to avoid an error. */
8053 /* We use char because int might match the return type of a gcc2
8054 builtin and then its argument prototype would still apply. */
8055 char krb_get_cred();
8057 int main() {
8058 krb_get_cred()
8059 ; return 0; }
8061 if { (eval echo configure:8062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8062 rm -rf conftest*
8063 eval "ac_cv_lib_$ac_lib_var=yes"
8064 else
8065 echo "configure: failed program was:" >&5
8066 cat conftest.$ac_ext >&5
8067 rm -rf conftest*
8068 eval "ac_cv_lib_$ac_lib_var=no"
8070 rm -f conftest*
8071 LIBS="$ac_save_LIBS"
8074 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8075 echo "$ac_t""yes" 1>&6
8076 ac_tr_lib=HAVE_LIB`echo krb | sed -e 's/^a-zA-Z0-9_/_/g' \
8077 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8078 cat >> confdefs.h <<EOF
8079 #define $ac_tr_lib 1
8082 LIBS="-lkrb $LIBS"
8084 else
8085 echo "$ac_t""no" 1>&6
8092 if test "${with_kerberos5+set}" = set; then
8093 for ac_hdr in krb5.h
8095 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8096 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8097 echo "configure:8098: checking for $ac_hdr" >&5
8098 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8099 echo $ac_n "(cached) $ac_c" 1>&6
8100 else
8101 cat > conftest.$ac_ext <<EOF
8102 #line 8103 "configure"
8103 #include "confdefs.h"
8104 #include <$ac_hdr>
8106 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8107 { (eval echo configure:8108: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8108 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8109 if test -z "$ac_err"; then
8110 rm -rf conftest*
8111 eval "ac_cv_header_$ac_safe=yes"
8112 else
8113 echo "$ac_err" >&5
8114 echo "configure: failed program was:" >&5
8115 cat conftest.$ac_ext >&5
8116 rm -rf conftest*
8117 eval "ac_cv_header_$ac_safe=no"
8119 rm -f conftest*
8121 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8122 echo "$ac_t""yes" 1>&6
8123 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8124 cat >> confdefs.h <<EOF
8125 #define $ac_tr_hdr 1
8128 else
8129 echo "$ac_t""no" 1>&6
8131 done
8133 else
8134 for ac_hdr in des.h
8136 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8137 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8138 echo "configure:8139: checking for $ac_hdr" >&5
8139 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8140 echo $ac_n "(cached) $ac_c" 1>&6
8141 else
8142 cat > conftest.$ac_ext <<EOF
8143 #line 8144 "configure"
8144 #include "confdefs.h"
8145 #include <$ac_hdr>
8147 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8148 { (eval echo configure:8149: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8149 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8150 if test -z "$ac_err"; then
8151 rm -rf conftest*
8152 eval "ac_cv_header_$ac_safe=yes"
8153 else
8154 echo "$ac_err" >&5
8155 echo "configure: failed program was:" >&5
8156 cat conftest.$ac_ext >&5
8157 rm -rf conftest*
8158 eval "ac_cv_header_$ac_safe=no"
8160 rm -f conftest*
8162 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8163 echo "$ac_t""yes" 1>&6
8164 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8165 cat >> confdefs.h <<EOF
8166 #define $ac_tr_hdr 1
8169 else
8170 echo "$ac_t""no" 1>&6
8171 for ac_hdr in kerberosIV/des.h
8173 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8174 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8175 echo "configure:8176: checking for $ac_hdr" >&5
8176 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8177 echo $ac_n "(cached) $ac_c" 1>&6
8178 else
8179 cat > conftest.$ac_ext <<EOF
8180 #line 8181 "configure"
8181 #include "confdefs.h"
8182 #include <$ac_hdr>
8184 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8185 { (eval echo configure:8186: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8186 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8187 if test -z "$ac_err"; then
8188 rm -rf conftest*
8189 eval "ac_cv_header_$ac_safe=yes"
8190 else
8191 echo "$ac_err" >&5
8192 echo "configure: failed program was:" >&5
8193 cat conftest.$ac_ext >&5
8194 rm -rf conftest*
8195 eval "ac_cv_header_$ac_safe=no"
8197 rm -f conftest*
8199 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8200 echo "$ac_t""yes" 1>&6
8201 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8202 cat >> confdefs.h <<EOF
8203 #define $ac_tr_hdr 1
8206 else
8207 echo "$ac_t""no" 1>&6
8208 for ac_hdr in kerberos/des.h
8210 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8211 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8212 echo "configure:8213: checking for $ac_hdr" >&5
8213 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8214 echo $ac_n "(cached) $ac_c" 1>&6
8215 else
8216 cat > conftest.$ac_ext <<EOF
8217 #line 8218 "configure"
8218 #include "confdefs.h"
8219 #include <$ac_hdr>
8221 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8222 { (eval echo configure:8223: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8223 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8224 if test -z "$ac_err"; then
8225 rm -rf conftest*
8226 eval "ac_cv_header_$ac_safe=yes"
8227 else
8228 echo "$ac_err" >&5
8229 echo "configure: failed program was:" >&5
8230 cat conftest.$ac_ext >&5
8231 rm -rf conftest*
8232 eval "ac_cv_header_$ac_safe=no"
8234 rm -f conftest*
8236 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8237 echo "$ac_t""yes" 1>&6
8238 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8239 cat >> confdefs.h <<EOF
8240 #define $ac_tr_hdr 1
8243 else
8244 echo "$ac_t""no" 1>&6
8246 done
8249 done
8252 done
8254 for ac_hdr in krb.h
8256 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8257 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8258 echo "configure:8259: checking for $ac_hdr" >&5
8259 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8260 echo $ac_n "(cached) $ac_c" 1>&6
8261 else
8262 cat > conftest.$ac_ext <<EOF
8263 #line 8264 "configure"
8264 #include "confdefs.h"
8265 #include <$ac_hdr>
8267 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8268 { (eval echo configure:8269: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8269 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8270 if test -z "$ac_err"; then
8271 rm -rf conftest*
8272 eval "ac_cv_header_$ac_safe=yes"
8273 else
8274 echo "$ac_err" >&5
8275 echo "configure: failed program was:" >&5
8276 cat conftest.$ac_ext >&5
8277 rm -rf conftest*
8278 eval "ac_cv_header_$ac_safe=no"
8280 rm -f conftest*
8282 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8283 echo "$ac_t""yes" 1>&6
8284 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8285 cat >> confdefs.h <<EOF
8286 #define $ac_tr_hdr 1
8289 else
8290 echo "$ac_t""no" 1>&6
8291 for ac_hdr in kerberosIV/krb.h
8293 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8294 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8295 echo "configure:8296: checking for $ac_hdr" >&5
8296 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8297 echo $ac_n "(cached) $ac_c" 1>&6
8298 else
8299 cat > conftest.$ac_ext <<EOF
8300 #line 8301 "configure"
8301 #include "confdefs.h"
8302 #include <$ac_hdr>
8304 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8305 { (eval echo configure:8306: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8306 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8307 if test -z "$ac_err"; then
8308 rm -rf conftest*
8309 eval "ac_cv_header_$ac_safe=yes"
8310 else
8311 echo "$ac_err" >&5
8312 echo "configure: failed program was:" >&5
8313 cat conftest.$ac_ext >&5
8314 rm -rf conftest*
8315 eval "ac_cv_header_$ac_safe=no"
8317 rm -f conftest*
8319 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8320 echo "$ac_t""yes" 1>&6
8321 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8322 cat >> confdefs.h <<EOF
8323 #define $ac_tr_hdr 1
8326 else
8327 echo "$ac_t""no" 1>&6
8328 for ac_hdr in kerberos/krb.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
8369 done
8372 done
8375 for ac_hdr in com_err.h
8377 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8378 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8379 echo "configure:8380: checking for $ac_hdr" >&5
8380 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8381 echo $ac_n "(cached) $ac_c" 1>&6
8382 else
8383 cat > conftest.$ac_ext <<EOF
8384 #line 8385 "configure"
8385 #include "confdefs.h"
8386 #include <$ac_hdr>
8388 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8389 { (eval echo configure:8390: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8390 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8391 if test -z "$ac_err"; then
8392 rm -rf conftest*
8393 eval "ac_cv_header_$ac_safe=yes"
8394 else
8395 echo "$ac_err" >&5
8396 echo "configure: failed program was:" >&5
8397 cat conftest.$ac_ext >&5
8398 rm -rf conftest*
8399 eval "ac_cv_header_$ac_safe=no"
8401 rm -f conftest*
8403 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8404 echo "$ac_t""yes" 1>&6
8405 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8406 cat >> confdefs.h <<EOF
8407 #define $ac_tr_hdr 1
8410 else
8411 echo "$ac_t""no" 1>&6
8413 done
8417 # Solaris requires -lintl if you want strerror (which calls dgettext)
8418 # to return localized messages.
8419 echo $ac_n "checking for dgettext in -lintl""... $ac_c" 1>&6
8420 echo "configure:8421: checking for dgettext in -lintl" >&5
8421 ac_lib_var=`echo intl'_'dgettext | sed 'y%./+-%__p_%'`
8422 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8423 echo $ac_n "(cached) $ac_c" 1>&6
8424 else
8425 ac_save_LIBS="$LIBS"
8426 LIBS="-lintl $LIBS"
8427 cat > conftest.$ac_ext <<EOF
8428 #line 8429 "configure"
8429 #include "confdefs.h"
8430 /* Override any gcc2 internal prototype to avoid an error. */
8431 /* We use char because int might match the return type of a gcc2
8432 builtin and then its argument prototype would still apply. */
8433 char dgettext();
8435 int main() {
8436 dgettext()
8437 ; return 0; }
8439 if { (eval echo configure:8440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8440 rm -rf conftest*
8441 eval "ac_cv_lib_$ac_lib_var=yes"
8442 else
8443 echo "configure: failed program was:" >&5
8444 cat conftest.$ac_ext >&5
8445 rm -rf conftest*
8446 eval "ac_cv_lib_$ac_lib_var=no"
8448 rm -f conftest*
8449 LIBS="$ac_save_LIBS"
8452 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8453 echo "$ac_t""yes" 1>&6
8454 ac_tr_lib=HAVE_LIB`echo intl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8455 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8456 cat >> confdefs.h <<EOF
8457 #define $ac_tr_lib 1
8460 LIBS="-lintl $LIBS"
8462 else
8463 echo "$ac_t""no" 1>&6
8467 echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
8468 echo "configure:8469: checking whether localtime caches TZ" >&5
8469 if eval "test \"`echo '$''{'emacs_cv_localtime_cache'+set}'`\" = set"; then
8470 echo $ac_n "(cached) $ac_c" 1>&6
8471 else
8472 if test x$ac_cv_func_tzset = xyes; then
8473 if test "$cross_compiling" = yes; then
8474 # If we have tzset, assume the worst when cross-compiling.
8475 emacs_cv_localtime_cache=yes
8476 else
8477 cat > conftest.$ac_ext <<EOF
8478 #line 8479 "configure"
8479 #include "confdefs.h"
8480 #include <time.h>
8481 extern char **environ;
8482 unset_TZ ()
8484 char **from, **to;
8485 for (to = from = environ; (*to = *from); from++)
8486 if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
8487 to++;
8489 char TZ_GMT0[] = "TZ=GMT0";
8490 char TZ_PST8[] = "TZ=PST8";
8491 main()
8493 time_t now = time ((time_t *) 0);
8494 int hour_GMT0, hour_unset;
8495 if (putenv (TZ_GMT0) != 0)
8496 exit (1);
8497 hour_GMT0 = localtime (&now)->tm_hour;
8498 unset_TZ ();
8499 hour_unset = localtime (&now)->tm_hour;
8500 if (putenv (TZ_PST8) != 0)
8501 exit (1);
8502 if (localtime (&now)->tm_hour == hour_GMT0)
8503 exit (1);
8504 unset_TZ ();
8505 if (localtime (&now)->tm_hour != hour_unset)
8506 exit (1);
8507 exit (0);
8510 if { (eval echo configure:8511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8511 then
8512 emacs_cv_localtime_cache=no
8513 else
8514 echo "configure: failed program was:" >&5
8515 cat conftest.$ac_ext >&5
8516 rm -fr conftest*
8517 emacs_cv_localtime_cache=yes
8519 rm -fr conftest*
8522 else
8523 # If we lack tzset, report that localtime does not cache TZ,
8524 # since we can't invalidate the cache if we don't have tzset.
8525 emacs_cv_localtime_cache=no
8528 echo "$ac_t""$emacs_cv_localtime_cache" 1>&6
8529 if test $emacs_cv_localtime_cache = yes; then
8530 cat >> confdefs.h <<\EOF
8531 #define LOCALTIME_CACHE 1
8536 if test "x$HAVE_TIMEVAL" = xyes; then
8537 for ac_func in gettimeofday
8539 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8540 echo "configure:8541: checking for $ac_func" >&5
8541 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8542 echo $ac_n "(cached) $ac_c" 1>&6
8543 else
8544 cat > conftest.$ac_ext <<EOF
8545 #line 8546 "configure"
8546 #include "confdefs.h"
8547 /* System header to define __stub macros and hopefully few prototypes,
8548 which can conflict with char $ac_func(); below. */
8549 #include <assert.h>
8550 /* Override any gcc2 internal prototype to avoid an error. */
8551 /* We use char because int might match the return type of a gcc2
8552 builtin and then its argument prototype would still apply. */
8553 char $ac_func();
8555 int main() {
8557 /* The GNU C library defines this for functions which it implements
8558 to always fail with ENOSYS. Some functions are actually named
8559 something starting with __ and the normal name is an alias. */
8560 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8561 choke me
8562 #else
8563 $ac_func();
8564 #endif
8566 ; return 0; }
8568 if { (eval echo configure:8569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8569 rm -rf conftest*
8570 eval "ac_cv_func_$ac_func=yes"
8571 else
8572 echo "configure: failed program was:" >&5
8573 cat conftest.$ac_ext >&5
8574 rm -rf conftest*
8575 eval "ac_cv_func_$ac_func=no"
8577 rm -f conftest*
8580 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8581 echo "$ac_t""yes" 1>&6
8582 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8583 cat >> confdefs.h <<EOF
8584 #define $ac_tr_func 1
8587 else
8588 echo "$ac_t""no" 1>&6
8590 done
8592 echo $ac_n "checking whether gettimeofday can accept two arguments""... $ac_c" 1>&6
8593 echo "configure:8594: checking whether gettimeofday can accept two arguments" >&5
8594 if eval "test \"`echo '$''{'emacs_cv_gettimeofday_two_arguments'+set}'`\" = set"; then
8595 echo $ac_n "(cached) $ac_c" 1>&6
8596 else
8597 cat > conftest.$ac_ext <<EOF
8598 #line 8599 "configure"
8599 #include "confdefs.h"
8601 #ifdef TIME_WITH_SYS_TIME
8602 #include <sys/time.h>
8603 #include <time.h>
8604 #else
8605 #ifdef HAVE_SYS_TIME_H
8606 #include <sys/time.h>
8607 #else
8608 #include <time.h>
8609 #endif
8610 #endif
8611 int main() {
8612 struct timeval time;
8613 gettimeofday (&time, 0);
8614 ; return 0; }
8616 if { (eval echo configure:8617: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8617 rm -rf conftest*
8618 emacs_cv_gettimeofday_two_arguments=yes
8619 else
8620 echo "configure: failed program was:" >&5
8621 cat conftest.$ac_ext >&5
8622 rm -rf conftest*
8623 emacs_cv_gettimeofday_two_arguments=no
8625 rm -f conftest*
8628 echo "$ac_t""$emacs_cv_gettimeofday_two_arguments" 1>&6
8629 if test $emacs_cv_gettimeofday_two_arguments = no; then
8630 cat >> confdefs.h <<\EOF
8631 #define GETTIMEOFDAY_ONE_ARGUMENT 1
8637 if test "$ac_cv_func_gettimeofday" = yes; then
8638 echo $ac_n "checking for struct timezone""... $ac_c" 1>&6
8639 echo "configure:8640: checking for struct timezone" >&5
8640 if eval "test \"`echo '$''{'emacs_cv_struct_timezone'+set}'`\" = set"; then
8641 echo $ac_n "(cached) $ac_c" 1>&6
8642 else
8643 cat > conftest.$ac_ext <<EOF
8644 #line 8645 "configure"
8645 #include "confdefs.h"
8646 #include <sys/time.h>
8647 int main() {
8648 struct timezone tz;
8649 ; return 0; }
8651 if { (eval echo configure:8652: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8652 rm -rf conftest*
8653 if test "$cross_compiling" = yes; then
8654 emacs_cv_struct_timezone=yes
8655 else
8656 cat > conftest.$ac_ext <<EOF
8657 #line 8658 "configure"
8658 #include "confdefs.h"
8660 #ifdef TIME_WITH_SYS_TIME
8661 #include <sys/time.h>
8662 #include <time.h>
8663 #else
8664 #ifdef HAVE_SYS_TIME_H
8665 #include <sys/time.h>
8666 #else
8667 #include <time.h>
8668 #endif
8669 #endif
8670 main () {
8671 struct timeval time;
8672 struct timezone dummy;
8673 exit (gettimeofday (&time, &dummy));
8676 if { (eval echo configure:8677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8677 then
8678 emacs_cv_struct_timezone=yes
8679 else
8680 echo "configure: failed program was:" >&5
8681 cat conftest.$ac_ext >&5
8682 rm -fr conftest*
8683 emacs_cv_struct_timezone=no
8685 rm -fr conftest*
8688 else
8689 echo "configure: failed program was:" >&5
8690 cat conftest.$ac_ext >&5
8691 rm -rf conftest*
8692 emacs_cv_struct_timezone=no
8694 rm -f conftest*
8697 echo "$ac_t""$emacs_cv_struct_timezone" 1>&6
8700 ok_so_far=yes
8701 echo $ac_n "checking for socket""... $ac_c" 1>&6
8702 echo "configure:8703: checking for socket" >&5
8703 if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then
8704 echo $ac_n "(cached) $ac_c" 1>&6
8705 else
8706 cat > conftest.$ac_ext <<EOF
8707 #line 8708 "configure"
8708 #include "confdefs.h"
8709 /* System header to define __stub macros and hopefully few prototypes,
8710 which can conflict with char socket(); below. */
8711 #include <assert.h>
8712 /* Override any gcc2 internal prototype to avoid an error. */
8713 /* We use char because int might match the return type of a gcc2
8714 builtin and then its argument prototype would still apply. */
8715 char socket();
8717 int main() {
8719 /* The GNU C library defines this for functions which it implements
8720 to always fail with ENOSYS. Some functions are actually named
8721 something starting with __ and the normal name is an alias. */
8722 #if defined (__stub_socket) || defined (__stub___socket)
8723 choke me
8724 #else
8725 socket();
8726 #endif
8728 ; return 0; }
8730 if { (eval echo configure:8731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8731 rm -rf conftest*
8732 eval "ac_cv_func_socket=yes"
8733 else
8734 echo "configure: failed program was:" >&5
8735 cat conftest.$ac_ext >&5
8736 rm -rf conftest*
8737 eval "ac_cv_func_socket=no"
8739 rm -f conftest*
8742 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
8743 echo "$ac_t""yes" 1>&6
8745 else
8746 echo "$ac_t""no" 1>&6
8747 ok_so_far=no
8750 if test $ok_so_far = yes; then
8751 ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'`
8752 echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6
8753 echo "configure:8754: checking for netinet/in.h" >&5
8754 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8755 echo $ac_n "(cached) $ac_c" 1>&6
8756 else
8757 cat > conftest.$ac_ext <<EOF
8758 #line 8759 "configure"
8759 #include "confdefs.h"
8760 #include <netinet/in.h>
8762 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8763 { (eval echo configure:8764: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8764 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8765 if test -z "$ac_err"; then
8766 rm -rf conftest*
8767 eval "ac_cv_header_$ac_safe=yes"
8768 else
8769 echo "$ac_err" >&5
8770 echo "configure: failed program was:" >&5
8771 cat conftest.$ac_ext >&5
8772 rm -rf conftest*
8773 eval "ac_cv_header_$ac_safe=no"
8775 rm -f conftest*
8777 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8778 echo "$ac_t""yes" 1>&6
8780 else
8781 echo "$ac_t""no" 1>&6
8782 ok_so_far=no
8786 if test $ok_so_far = yes; then
8787 ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'`
8788 echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6
8789 echo "configure:8790: checking for arpa/inet.h" >&5
8790 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8791 echo $ac_n "(cached) $ac_c" 1>&6
8792 else
8793 cat > conftest.$ac_ext <<EOF
8794 #line 8795 "configure"
8795 #include "confdefs.h"
8796 #include <arpa/inet.h>
8798 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8799 { (eval echo configure:8800: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8800 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8801 if test -z "$ac_err"; then
8802 rm -rf conftest*
8803 eval "ac_cv_header_$ac_safe=yes"
8804 else
8805 echo "$ac_err" >&5
8806 echo "configure: failed program was:" >&5
8807 cat conftest.$ac_ext >&5
8808 rm -rf conftest*
8809 eval "ac_cv_header_$ac_safe=no"
8811 rm -f conftest*
8813 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8814 echo "$ac_t""yes" 1>&6
8816 else
8817 echo "$ac_t""no" 1>&6
8818 ok_so_far=no
8822 if test $ok_so_far = yes; then
8823 cat >> confdefs.h <<\EOF
8824 #define HAVE_INET_SOCKETS 1
8829 if test -f /usr/lpp/X11/bin/smt.exp; then
8830 cat >> confdefs.h <<\EOF
8831 #define HAVE_AIX_SMT_EXP 1
8836 echo $ac_n "checking whether system supports dynamic ptys""... $ac_c" 1>&6
8837 echo "configure:8838: checking whether system supports dynamic ptys" >&5
8838 if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then
8839 echo "$ac_t""yes" 1>&6
8840 cat >> confdefs.h <<\EOF
8841 #define HAVE_DEV_PTMX 1
8844 else
8845 echo "$ac_t""no" 1>&6
8848 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
8849 echo "configure:8850: checking for pid_t" >&5
8850 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
8851 echo $ac_n "(cached) $ac_c" 1>&6
8852 else
8853 cat > conftest.$ac_ext <<EOF
8854 #line 8855 "configure"
8855 #include "confdefs.h"
8856 #include <sys/types.h>
8857 #if STDC_HEADERS
8858 #include <stdlib.h>
8859 #include <stddef.h>
8860 #endif
8862 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8863 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
8864 rm -rf conftest*
8865 ac_cv_type_pid_t=yes
8866 else
8867 rm -rf conftest*
8868 ac_cv_type_pid_t=no
8870 rm -f conftest*
8873 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
8874 if test $ac_cv_type_pid_t = no; then
8875 cat >> confdefs.h <<\EOF
8876 #define pid_t int
8881 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
8882 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
8883 echo "configure:8884: checking for vfork.h" >&5
8884 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8885 echo $ac_n "(cached) $ac_c" 1>&6
8886 else
8887 cat > conftest.$ac_ext <<EOF
8888 #line 8889 "configure"
8889 #include "confdefs.h"
8890 #include <vfork.h>
8892 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8893 { (eval echo configure:8894: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8894 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8895 if test -z "$ac_err"; then
8896 rm -rf conftest*
8897 eval "ac_cv_header_$ac_safe=yes"
8898 else
8899 echo "$ac_err" >&5
8900 echo "configure: failed program was:" >&5
8901 cat conftest.$ac_ext >&5
8902 rm -rf conftest*
8903 eval "ac_cv_header_$ac_safe=no"
8905 rm -f conftest*
8907 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8908 echo "$ac_t""yes" 1>&6
8909 cat >> confdefs.h <<\EOF
8910 #define HAVE_VFORK_H 1
8913 else
8914 echo "$ac_t""no" 1>&6
8917 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
8918 echo "configure:8919: checking for working vfork" >&5
8919 if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
8920 echo $ac_n "(cached) $ac_c" 1>&6
8921 else
8922 if test "$cross_compiling" = yes; then
8923 echo $ac_n "checking for vfork""... $ac_c" 1>&6
8924 echo "configure:8925: checking for vfork" >&5
8925 if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
8926 echo $ac_n "(cached) $ac_c" 1>&6
8927 else
8928 cat > conftest.$ac_ext <<EOF
8929 #line 8930 "configure"
8930 #include "confdefs.h"
8931 /* System header to define __stub macros and hopefully few prototypes,
8932 which can conflict with char vfork(); below. */
8933 #include <assert.h>
8934 /* Override any gcc2 internal prototype to avoid an error. */
8935 /* We use char because int might match the return type of a gcc2
8936 builtin and then its argument prototype would still apply. */
8937 char vfork();
8939 int main() {
8941 /* The GNU C library defines this for functions which it implements
8942 to always fail with ENOSYS. Some functions are actually named
8943 something starting with __ and the normal name is an alias. */
8944 #if defined (__stub_vfork) || defined (__stub___vfork)
8945 choke me
8946 #else
8947 vfork();
8948 #endif
8950 ; return 0; }
8952 if { (eval echo configure:8953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8953 rm -rf conftest*
8954 eval "ac_cv_func_vfork=yes"
8955 else
8956 echo "configure: failed program was:" >&5
8957 cat conftest.$ac_ext >&5
8958 rm -rf conftest*
8959 eval "ac_cv_func_vfork=no"
8961 rm -f conftest*
8964 if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
8965 echo "$ac_t""yes" 1>&6
8967 else
8968 echo "$ac_t""no" 1>&6
8971 ac_cv_func_vfork_works=$ac_cv_func_vfork
8972 else
8973 cat > conftest.$ac_ext <<EOF
8974 #line 8975 "configure"
8975 #include "confdefs.h"
8976 /* Thanks to Paul Eggert for this test. */
8977 #include <stdio.h>
8978 #include <sys/types.h>
8979 #include <sys/stat.h>
8980 #ifdef HAVE_UNISTD_H
8981 #include <unistd.h>
8982 #endif
8983 #ifdef HAVE_VFORK_H
8984 #include <vfork.h>
8985 #endif
8986 /* On some sparc systems, changes by the child to local and incoming
8987 argument registers are propagated back to the parent.
8988 The compiler is told about this with #include <vfork.h>,
8989 but some compilers (e.g. gcc -O) don't grok <vfork.h>.
8990 Test for this by using a static variable whose address
8991 is put into a register that is clobbered by the vfork. */
8992 static
8993 #ifdef __cplusplus
8994 sparc_address_test (int arg)
8995 #else
8996 sparc_address_test (arg) int arg;
8997 #endif
8999 static pid_t child;
9000 if (!child) {
9001 child = vfork ();
9002 if (child < 0) {
9003 perror ("vfork");
9004 _exit(2);
9006 if (!child) {
9007 arg = getpid();
9008 write(-1, "", 0);
9009 _exit (arg);
9013 main() {
9014 pid_t parent = getpid ();
9015 pid_t child;
9017 sparc_address_test ();
9019 child = vfork ();
9021 if (child == 0) {
9022 /* Here is another test for sparc vfork register problems.
9023 This test uses lots of local variables, at least
9024 as many local variables as main has allocated so far
9025 including compiler temporaries. 4 locals are enough for
9026 gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
9027 A buggy compiler should reuse the register of parent
9028 for one of the local variables, since it will think that
9029 parent can't possibly be used any more in this routine.
9030 Assigning to the local variable will thus munge parent
9031 in the parent process. */
9032 pid_t
9033 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
9034 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
9035 /* Convince the compiler that p..p7 are live; otherwise, it might
9036 use the same hardware register for all 8 local variables. */
9037 if (p != p1 || p != p2 || p != p3 || p != p4
9038 || p != p5 || p != p6 || p != p7)
9039 _exit(1);
9041 /* On some systems (e.g. IRIX 3.3),
9042 vfork doesn't separate parent from child file descriptors.
9043 If the child closes a descriptor before it execs or exits,
9044 this munges the parent's descriptor as well.
9045 Test for this by closing stdout in the child. */
9046 _exit(close(fileno(stdout)) != 0);
9047 } else {
9048 int status;
9049 struct stat st;
9051 while (wait(&status) != child)
9053 exit(
9054 /* Was there some problem with vforking? */
9055 child < 0
9057 /* Did the child fail? (This shouldn't happen.) */
9058 || status
9060 /* Did the vfork/compiler bug occur? */
9061 || parent != getpid()
9063 /* Did the file descriptor bug occur? */
9064 || fstat(fileno(stdout), &st) != 0
9069 if { (eval echo configure:9070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9070 then
9071 ac_cv_func_vfork_works=yes
9072 else
9073 echo "configure: failed program was:" >&5
9074 cat conftest.$ac_ext >&5
9075 rm -fr conftest*
9076 ac_cv_func_vfork_works=no
9078 rm -fr conftest*
9083 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
9084 if test $ac_cv_func_vfork_works = no; then
9085 cat >> confdefs.h <<\EOF
9086 #define vfork fork
9092 # Fixme: This should be replaced when we have autoconf 2.14.
9093 echo $ac_n "checking for size_t""... $ac_c" 1>&6
9094 echo "configure:9095: checking for size_t" >&5
9095 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
9096 echo $ac_n "(cached) $ac_c" 1>&6
9097 else
9098 cat > conftest.$ac_ext <<EOF
9099 #line 9100 "configure"
9100 #include "confdefs.h"
9101 #include <sys/types.h>
9102 #if STDC_HEADERS
9103 #include <stdlib.h>
9104 #include <stddef.h>
9105 #endif
9107 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9108 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
9109 rm -rf conftest*
9110 ac_cv_type_size_t=yes
9111 else
9112 rm -rf conftest*
9113 ac_cv_type_size_t=no
9115 rm -f conftest*
9118 echo "$ac_t""$ac_cv_type_size_t" 1>&6
9119 if test $ac_cv_type_size_t = no; then
9120 cat >> confdefs.h <<\EOF
9121 #define size_t unsigned
9127 # Set up the CFLAGS for real compilation, so we can substitute it.
9128 CFLAGS="$REAL_CFLAGS"
9129 CPPFLAGS="$REAL_CPPFLAGS"
9131 #### Find out which version of Emacs this is.
9132 version=`grep 'defconst[ ]*emacs-version' ${srcdir}/lisp/version.el \
9133 | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`
9134 if test x"${version}" = x; then
9135 { echo "configure: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." 1>&2; exit 1; }
9138 ### Specify what sort of things we'll be editing into Makefile and config.h.
9139 ### Use configuration here uncanonicalized to avoid exceeding size limits.
9171 cat >> confdefs.h <<EOF
9172 #define EMACS_CONFIGURATION "${canonical}"
9175 cat >> confdefs.h <<EOF
9176 #define EMACS_CONFIG_OPTIONS "${ac_configure_args}"
9179 cat >> confdefs.h <<EOF
9180 #define config_machfile "${machfile}"
9183 cat >> confdefs.h <<EOF
9184 #define config_opsysfile "${opsysfile}"
9187 cat >> confdefs.h <<EOF
9188 #define LD_SWITCH_X_SITE ${LD_SWITCH_X_SITE}
9191 cat >> confdefs.h <<EOF
9192 #define LD_SWITCH_X_SITE_AUX ${LD_SWITCH_X_SITE_AUX}
9195 cat >> confdefs.h <<EOF
9196 #define C_SWITCH_X_SITE ${C_SWITCH_X_SITE}
9199 cat >> confdefs.h <<EOF
9200 #define UNEXEC_SRC ${UNEXEC_SRC}
9204 if test "${HAVE_X_WINDOWS}" = "yes" ; then
9205 cat >> confdefs.h <<\EOF
9206 #define HAVE_X_WINDOWS 1
9210 if test "${USE_X_TOOLKIT}" != "none" ; then
9211 cat >> confdefs.h <<\EOF
9212 #define USE_X_TOOLKIT 1
9216 if test "${HAVE_X11}" = "yes" ; then
9217 cat >> confdefs.h <<\EOF
9218 #define HAVE_X11 1
9222 if test "${HAVE_XFREE386}" = "yes" ; then
9223 cat >> confdefs.h <<\EOF
9224 #define HAVE_XFREE386 1
9228 if test "${HAVE_MENUS}" = "yes" ; then
9229 cat >> confdefs.h <<\EOF
9230 #define HAVE_MENUS 1
9234 if test "${GNU_MALLOC}" = "yes" ; then
9235 cat >> confdefs.h <<\EOF
9236 #define GNU_MALLOC 1
9240 if test "${REL_ALLOC}" = "yes" ; then
9241 cat >> confdefs.h <<\EOF
9242 #define REL_ALLOC 1
9247 #### Report on what we decided to do.
9248 echo "
9249 Configured for \`${canonical}'.
9251 Where should the build process find the source code? ${srcdir}
9252 What operating system and machine description files should Emacs use?
9253 \`${opsysfile}' and \`${machfile}'
9254 What compiler should emacs be built with? ${CC} ${CFLAGS}
9255 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
9256 Should Emacs use a relocating allocator for buffers? ${REL_ALLOC}
9257 Should Emacs use mmap(2) for buffer allocation? $use_mmap_for_buffers
9258 What window system should Emacs use? ${window_system}
9259 What toolkit should Emacs use? ${USE_X_TOOLKIT}"
9261 if test -n "${x_includes}"; then
9262 echo " Where do we find X Windows header files? ${x_includes}"
9263 else
9264 echo " Where do we find X Windows header files? Standard dirs"
9266 if test -n "${x_libraries}"; then
9267 echo " Where do we find X Windows libraries? ${x_libraries}"
9268 else
9269 echo " Where do we find X Windows libraries? Standard dirs"
9272 echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}"
9273 echo " Does Emacs use -lXpm? ${HAVE_XPM}"
9274 echo " Does Emacs use -ljpeg? ${HAVE_JPEG}"
9275 echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
9276 echo " Does Emacs use -lungif? ${HAVE_GIF}"
9277 echo " Does Emacs use -lpng? ${HAVE_PNG}"
9278 echo " Does Emacs use X toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}"
9279 echo
9281 # Remove any trailing slashes in these variables.
9282 test "${prefix}" != NONE &&
9283 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
9284 test "${exec_prefix}" != NONE &&
9285 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
9287 ## Check if the C preprocessor will convert `..' to `. .'. If so, set
9288 ## CPP_NEED_TRADITIONAL to `yes' so that the code to generate Makefile
9289 ## from Makefile.c can correctly provide the arg `-traditional' to the
9290 ## C preprocessor.
9292 cat > conftest.$ac_ext <<EOF
9293 #line 9294 "configure"
9294 #include "confdefs.h"
9295 yes..yes
9297 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9298 egrep "yes..yes" >/dev/null 2>&1; then
9299 rm -rf conftest*
9300 CPP_NEED_TRADITIONAL=no
9301 else
9302 rm -rf conftest*
9303 CPP_NEED_TRADITIONAL=yes
9305 rm -f conftest*
9308 trap '' 1 2 15
9309 cat > confcache <<\EOF
9310 # This file is a shell script that caches the results of configure
9311 # tests run on this system so they can be shared between configure
9312 # scripts and configure runs. It is not useful on other systems.
9313 # If it contains results you don't want to keep, you may remove or edit it.
9315 # By default, configure uses ./config.cache as the cache file,
9316 # creating it if it does not exist already. You can give configure
9317 # the --cache-file=FILE option to use a different cache file; that is
9318 # what configure does when it calls configure scripts in
9319 # subdirectories, so they share the cache.
9320 # Giving --cache-file=/dev/null disables caching, for debugging configure.
9321 # config.status only pays attention to the cache file if you give it the
9322 # --recheck option to rerun configure.
9325 # The following way of writing the cache mishandles newlines in values,
9326 # but we know of no workaround that is simple, portable, and efficient.
9327 # So, don't put newlines in cache variables' values.
9328 # Ultrix sh set writes to stderr and can't be redirected directly,
9329 # and sets the high bit in the cache file unless we assign to the vars.
9330 (set) 2>&1 |
9331 case `(ac_space=' '; set | grep ac_space) 2>&1` in
9332 *ac_space=\ *)
9333 # `set' does not quote correctly, so add quotes (double-quote substitution
9334 # turns \\\\ into \\, and sed turns \\ into \).
9335 sed -n \
9336 -e "s/'/'\\\\''/g" \
9337 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
9340 # `set' quotes correctly as required by POSIX, so do not add quotes.
9341 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
9343 esac >> confcache
9344 if cmp -s $cache_file confcache; then
9346 else
9347 if test -w $cache_file; then
9348 echo "updating cache $cache_file"
9349 cat confcache > $cache_file
9350 else
9351 echo "not updating unwritable cache $cache_file"
9354 rm -f confcache
9356 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
9358 test "x$prefix" = xNONE && prefix=$ac_default_prefix
9359 # Let make expand exec_prefix.
9360 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9362 # Any assignment to VPATH causes Sun make to only execute
9363 # the first set of double-colon rules, so remove it if not needed.
9364 # If there is a colon in the path, we need to keep it.
9365 if test "x$srcdir" = x.; then
9366 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
9369 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
9371 DEFS=-DHAVE_CONFIG_H
9373 # Without the "./", some shells look in PATH for config.status.
9374 : ${CONFIG_STATUS=./config.status}
9376 echo creating $CONFIG_STATUS
9377 rm -f $CONFIG_STATUS
9378 cat > $CONFIG_STATUS <<EOF
9379 #! /bin/sh
9380 # Generated automatically by configure.
9381 # Run this file to recreate the current configuration.
9382 # This directory was configured as follows,
9383 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
9385 # $0 $ac_configure_args
9387 # Compiler output produced by configure, useful for debugging
9388 # configure, is in ./config.log if it exists.
9390 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
9391 for ac_option
9393 case "\$ac_option" in
9394 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
9395 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
9396 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
9397 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
9398 echo "$CONFIG_STATUS generated by autoconf version 2.13"
9399 exit 0 ;;
9400 -help | --help | --hel | --he | --h)
9401 echo "\$ac_cs_usage"; exit 0 ;;
9402 *) echo "\$ac_cs_usage"; exit 1 ;;
9403 esac
9404 done
9406 ac_given_srcdir=$srcdir
9407 ac_given_INSTALL="$INSTALL"
9409 trap 'rm -fr `echo "Makefile lib-src/Makefile.c:lib-src/Makefile.in oldXMenu/Makefile \
9410 man/Makefile lwlib/Makefile src/Makefile.c:src/Makefile.in \
9411 lisp/Makefile leim/Makefile src/config.h:src/config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
9413 cat >> $CONFIG_STATUS <<EOF
9415 # Protect against being on the right side of a sed subst in config.status.
9416 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
9417 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
9418 $ac_vpsub
9419 $extrasub
9420 s%@SHELL@%$SHELL%g
9421 s%@CFLAGS@%$CFLAGS%g
9422 s%@CPPFLAGS@%$CPPFLAGS%g
9423 s%@CXXFLAGS@%$CXXFLAGS%g
9424 s%@FFLAGS@%$FFLAGS%g
9425 s%@DEFS@%$DEFS%g
9426 s%@LDFLAGS@%$LDFLAGS%g
9427 s%@LIBS@%$LIBS%g
9428 s%@exec_prefix@%$exec_prefix%g
9429 s%@prefix@%$prefix%g
9430 s%@program_transform_name@%$program_transform_name%g
9431 s%@bindir@%$bindir%g
9432 s%@sbindir@%$sbindir%g
9433 s%@libexecdir@%$libexecdir%g
9434 s%@datadir@%$datadir%g
9435 s%@sysconfdir@%$sysconfdir%g
9436 s%@sharedstatedir@%$sharedstatedir%g
9437 s%@localstatedir@%$localstatedir%g
9438 s%@libdir@%$libdir%g
9439 s%@includedir@%$includedir%g
9440 s%@oldincludedir@%$oldincludedir%g
9441 s%@infodir@%$infodir%g
9442 s%@mandir@%$mandir%g
9443 s%@host@%$host%g
9444 s%@host_alias@%$host_alias%g
9445 s%@host_cpu@%$host_cpu%g
9446 s%@host_vendor@%$host_vendor%g
9447 s%@host_os@%$host_os%g
9448 s%@CC@%$CC%g
9449 s%@LN_S@%$LN_S%g
9450 s%@CPP@%$CPP%g
9451 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
9452 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
9453 s%@INSTALL_DATA@%$INSTALL_DATA%g
9454 s%@YACC@%$YACC%g
9455 s%@RANLIB@%$RANLIB%g
9456 s%@LIBSOUND@%$LIBSOUND%g
9457 s%@SET_MAKE@%$SET_MAKE%g
9458 s%@ALLOCA@%$ALLOCA%g
9459 s%@liblockfile@%$liblockfile%g
9460 s%@LIBOBJS@%$LIBOBJS%g
9461 s%@NEED_SETGID@%$NEED_SETGID%g
9462 s%@KMEM_GROUP@%$KMEM_GROUP%g
9463 s%@version@%$version%g
9464 s%@configuration@%$configuration%g
9465 s%@canonical@%$canonical%g
9466 s%@srcdir@%$srcdir%g
9467 s%@lispdir@%$lispdir%g
9468 s%@locallisppath@%$locallisppath%g
9469 s%@lisppath@%$lisppath%g
9470 s%@x_default_search_path@%$x_default_search_path%g
9471 s%@etcdir@%$etcdir%g
9472 s%@archlibdir@%$archlibdir%g
9473 s%@docdir@%$docdir%g
9474 s%@bitmapdir@%$bitmapdir%g
9475 s%@c_switch_system@%$c_switch_system%g
9476 s%@c_switch_machine@%$c_switch_machine%g
9477 s%@LD_SWITCH_X_SITE@%$LD_SWITCH_X_SITE%g
9478 s%@LD_SWITCH_X_SITE_AUX@%$LD_SWITCH_X_SITE_AUX%g
9479 s%@C_SWITCH_X_SITE@%$C_SWITCH_X_SITE%g
9480 s%@X_TOOLKIT_TYPE@%$X_TOOLKIT_TYPE%g
9481 s%@machfile@%$machfile%g
9482 s%@opsysfile@%$opsysfile%g
9483 s%@GETLOADAVG_LIBS@%$GETLOADAVG_LIBS%g
9485 CEOF
9488 cat >> $CONFIG_STATUS <<\EOF
9490 # Split the substitutions into bite-sized pieces for seds with
9491 # small command number limits, like on Digital OSF/1 and HP-UX.
9492 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
9493 ac_file=1 # Number of current file.
9494 ac_beg=1 # First line for current file.
9495 ac_end=$ac_max_sed_cmds # Line after last line for current file.
9496 ac_more_lines=:
9497 ac_sed_cmds=""
9498 while $ac_more_lines; do
9499 if test $ac_beg -gt 1; then
9500 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
9501 else
9502 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
9504 if test ! -s conftest.s$ac_file; then
9505 ac_more_lines=false
9506 rm -f conftest.s$ac_file
9507 else
9508 if test -z "$ac_sed_cmds"; then
9509 ac_sed_cmds="sed -f conftest.s$ac_file"
9510 else
9511 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
9513 ac_file=`expr $ac_file + 1`
9514 ac_beg=$ac_end
9515 ac_end=`expr $ac_end + $ac_max_sed_cmds`
9517 done
9518 if test -z "$ac_sed_cmds"; then
9519 ac_sed_cmds=cat
9523 cat >> $CONFIG_STATUS <<EOF
9525 CONFIG_FILES=\${CONFIG_FILES-"Makefile lib-src/Makefile.c:lib-src/Makefile.in oldXMenu/Makefile \
9526 man/Makefile lwlib/Makefile src/Makefile.c:src/Makefile.in \
9527 lisp/Makefile leim/Makefile"}
9529 cat >> $CONFIG_STATUS <<\EOF
9530 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
9531 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9532 case "$ac_file" in
9533 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9534 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9535 *) ac_file_in="${ac_file}.in" ;;
9536 esac
9538 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
9540 # Remove last slash and all that follows it. Not all systems have dirname.
9541 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9542 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9543 # The file is in a subdirectory.
9544 test ! -d "$ac_dir" && mkdir "$ac_dir"
9545 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
9546 # A "../" for each directory in $ac_dir_suffix.
9547 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
9548 else
9549 ac_dir_suffix= ac_dots=
9552 case "$ac_given_srcdir" in
9553 .) srcdir=.
9554 if test -z "$ac_dots"; then top_srcdir=.
9555 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
9556 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
9557 *) # Relative path.
9558 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
9559 top_srcdir="$ac_dots$ac_given_srcdir" ;;
9560 esac
9562 case "$ac_given_INSTALL" in
9563 [/$]*) INSTALL="$ac_given_INSTALL" ;;
9564 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
9565 esac
9567 echo creating "$ac_file"
9568 rm -f "$ac_file"
9569 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
9570 case "$ac_file" in
9571 *Makefile*) ac_comsub="1i\\
9572 # $configure_input" ;;
9573 *) ac_comsub= ;;
9574 esac
9576 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9577 sed -e "$ac_comsub
9578 s%@configure_input@%$configure_input%g
9579 s%@srcdir@%$srcdir%g
9580 s%@top_srcdir@%$top_srcdir%g
9581 s%@INSTALL@%$INSTALL%g
9582 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
9583 fi; done
9584 rm -f conftest.s*
9586 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
9587 # NAME is the cpp macro being defined and VALUE is the value it is being given.
9589 # ac_d sets the value in "#define NAME VALUE" lines.
9590 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
9591 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
9592 ac_dC='\3'
9593 ac_dD='%g'
9594 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
9595 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
9596 ac_uB='\([ ]\)%\1#\2define\3'
9597 ac_uC=' '
9598 ac_uD='\4%g'
9599 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
9600 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
9601 ac_eB='$%\1#\2define\3'
9602 ac_eC=' '
9603 ac_eD='%g'
9605 if test "${CONFIG_HEADERS+set}" != set; then
9607 cat >> $CONFIG_STATUS <<EOF
9608 CONFIG_HEADERS="src/config.h:src/config.in"
9610 cat >> $CONFIG_STATUS <<\EOF
9612 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
9613 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9614 case "$ac_file" in
9615 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9616 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9617 *) ac_file_in="${ac_file}.in" ;;
9618 esac
9620 echo creating $ac_file
9622 rm -f conftest.frag conftest.in conftest.out
9623 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9624 cat $ac_file_inputs > conftest.in
9628 # Transform confdefs.h into a sed script conftest.vals that substitutes
9629 # the proper values into config.h.in to produce config.h. And first:
9630 # Protect against being on the right side of a sed subst in config.status.
9631 # Protect against being in an unquoted here document in config.status.
9632 rm -f conftest.vals
9633 cat > conftest.hdr <<\EOF
9634 s/[\\&%]/\\&/g
9635 s%[\\$`]%\\&%g
9636 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
9637 s%ac_d%ac_u%gp
9638 s%ac_u%ac_e%gp
9640 sed -n -f conftest.hdr confdefs.h > conftest.vals
9641 rm -f conftest.hdr
9643 # This sed command replaces #undef with comments. This is necessary, for
9644 # example, in the case of _POSIX_SOURCE, which is predefined and required
9645 # on some systems where configure will not decide to define it.
9646 cat >> conftest.vals <<\EOF
9647 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
9650 # Break up conftest.vals because some shells have a limit on
9651 # the size of here documents, and old seds have small limits too.
9653 rm -f conftest.tail
9654 while :
9656 ac_lines=`grep -c . conftest.vals`
9657 # grep -c gives empty output for an empty file on some AIX systems.
9658 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
9659 # Write a limited-size here document to conftest.frag.
9660 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
9661 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
9662 echo 'CEOF
9663 sed -f conftest.frag conftest.in > conftest.out
9664 rm -f conftest.in
9665 mv conftest.out conftest.in
9666 ' >> $CONFIG_STATUS
9667 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
9668 rm -f conftest.vals
9669 mv conftest.tail conftest.vals
9670 done
9671 rm -f conftest.vals
9673 cat >> $CONFIG_STATUS <<\EOF
9674 rm -f conftest.frag conftest.h
9675 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
9676 cat conftest.in >> conftest.h
9677 rm -f conftest.in
9678 if cmp -s $ac_file conftest.h 2>/dev/null; then
9679 echo "$ac_file is unchanged"
9680 rm -f conftest.h
9681 else
9682 # Remove last slash and all that follows it. Not all systems have dirname.
9683 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9684 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9685 # The file is in a subdirectory.
9686 test ! -d "$ac_dir" && mkdir "$ac_dir"
9688 rm -f $ac_file
9689 mv conftest.h $ac_file
9691 fi; done
9694 cat >> $CONFIG_STATUS <<EOF
9695 GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPP_NEED_TRADITIONAL="$CPP_NEED_TRADITIONAL" CPPFLAGS="$CPPFLAGS"
9697 cat >> $CONFIG_STATUS <<\EOF
9700 ### Make the necessary directories, if they don't exist.
9701 for dir in etc lisp ; do
9702 test -d ${dir} || mkdir ${dir}
9703 done
9705 # Build src/Makefile from ${srcdir}/src/Makefile.c
9706 # and lib-src/Makefile from ${srcdir}/lib-src/Makefile.c
9707 # This must be done after src/config.h is built, since we rely on that file.
9709 # Now get this: Some word that is part of the ${srcdir} directory name
9710 # or the ${configuration} value might, just might, happen to be an
9711 # identifier like `sun4' or `i386' or something, and be predefined by
9712 # the C preprocessor to some helpful value like 1, or maybe the empty
9713 # string. Needless to say consequent macro substitutions are less
9714 # than conducive to the makefile finding the correct directory.
9715 undefs="`echo $top_srcdir $configuration $canonical |
9716 sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/^/ /' -e 's/ *$//' \
9717 -e 's/ */ -U/g' -e 's/-U[0-9][^ ]*//g' \
9720 echo creating src/epaths.h
9721 ${MAKE-make} epaths-force
9723 # As of 2000-11-19, newest development versions of GNU cpp preprocess
9724 # `..' to `. .' unless invoked with -traditional
9726 if test "x$GCC" = xyes && test "x$CPP_NEED_TRADITIONAL" = xyes; then
9727 CPPFLAGS="$CPPFLAGS -traditional"
9730 echo creating lib-src/Makefile
9731 ( cd lib-src
9732 rm -f junk.c junk1.c junk2.c
9733 sed -e '/start of cpp stuff/q' \
9734 < Makefile.c > junk1.c
9735 sed -e '1,/start of cpp stuff/d'\
9736 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
9737 < Makefile.c > junk.c
9738 $CPP $undefs -I. -I$top_srcdir/src $CPPFLAGS junk.c | \
9739 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
9740 cat junk1.c junk2.c > Makefile.new
9741 rm -f junk.c junk1.c junk2.c
9742 chmod 444 Makefile.new
9743 mv -f Makefile.new Makefile
9746 echo creating src/Makefile
9747 ( cd src
9748 rm -f junk.c junk1.c junk2.c
9749 sed -e '/start of cpp stuff/q' \
9750 < Makefile.c > junk1.c
9751 sed -e '1,/start of cpp stuff/d'\
9752 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
9753 < Makefile.c > junk.c
9754 $CPP $undefs -I. -I$top_srcdir/src $CPPFLAGS junk.c | \
9755 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
9756 cat junk1.c junk2.c > Makefile.new
9757 rm -f junk.c junk1.c junk2.c
9758 chmod 444 Makefile.new
9759 mv -f Makefile.new Makefile
9762 if test ! -f src/.gdbinit && test -f $top_srcdir/src/.gdbinit; then
9763 echo creating src/.gdbinit
9764 echo source $top_srcdir/src/.gdbinit > src/.gdbinit
9767 # This is how we know whether to re-run configure in certain cases.
9768 touch src/config.stamp
9771 exit 0
9773 chmod +x $CONFIG_STATUS
9774 rm -fr confdefs* $ac_clean_files
9775 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1